@react-spectrum/buttongroup 3.6.13-nightly.4623 → 3.6.13

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.
@@ -33,14 +33,14 @@ $parcel$export(module.exports, "ButtonGroup", () => $d384d3249418a107$export$69b
33
33
  function $d384d3249418a107$var$ButtonGroup(props, ref) {
34
34
  let { scale: scale } = (0, $6iGPs$reactspectrumprovider.useProvider)();
35
35
  props = (0, $6iGPs$reactspectrumprovider.useProviderProps)(props);
36
- props = (0, $6iGPs$reactspectrumutils.useSlotProps)(props, "buttonGroup");
37
- let { children: children, orientation: orientation = "horizontal", isDisabled: isDisabled, align: align = "start", ...otherProps } = props;
36
+ props = (0, $6iGPs$reactspectrumutils.useSlotProps)(props, 'buttonGroup');
37
+ let { children: children, orientation: orientation = 'horizontal', isDisabled: isDisabled, align: align = 'start', ...otherProps } = props;
38
38
  let { styleProps: styleProps } = (0, $6iGPs$reactspectrumutils.useStyleProps)(otherProps);
39
39
  let domRef = (0, $6iGPs$reactspectrumutils.useDOMRef)(ref);
40
40
  let [hasOverflow, setHasOverflow] = (0, $6iGPs$reactariautils.useValueEffect)(false);
41
41
  let checkForOverflow = (0, $6iGPs$react.useCallback)(()=>{
42
42
  let computeHasOverflow = ()=>{
43
- if (domRef.current && orientation === "horizontal") {
43
+ if (domRef.current && orientation === 'horizontal') {
44
44
  let buttonGroupChildren = Array.from(domRef.current.children);
45
45
  let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors
46
46
  // If any buttons have negative X positions (align="end") or extend beyond
@@ -49,7 +49,7 @@ function $d384d3249418a107$var$ButtonGroup(props, ref) {
49
49
  return false;
50
50
  }
51
51
  };
52
- if (orientation === "horizontal") setHasOverflow(function*() {
52
+ if (orientation === 'horizontal') setHasOverflow(function*() {
53
53
  // Force to horizontal for measurement.
54
54
  yield false;
55
55
  // Measure, and update if there is overflow.
@@ -86,15 +86,15 @@ function $d384d3249418a107$var$ButtonGroup(props, ref) {
86
86
  ...(0, $6iGPs$reactariautils.filterDOMProps)(otherProps),
87
87
  ...styleProps,
88
88
  ref: domRef,
89
- className: (0, $6iGPs$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2e9803b3bbead7d0$exports))), "spectrum-ButtonGroup", {
90
- "spectrum-ButtonGroup--vertical": orientation === "vertical" || hasOverflow,
91
- "spectrum-ButtonGroup--alignEnd": align === "end",
92
- "spectrum-ButtonGroup--alignCenter": align === "center"
89
+ className: (0, $6iGPs$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2e9803b3bbead7d0$exports))), 'spectrum-ButtonGroup', {
90
+ 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,
91
+ 'spectrum-ButtonGroup--alignEnd': align === 'end',
92
+ 'spectrum-ButtonGroup--alignCenter': align === 'center'
93
93
  }, styleProps.className)
94
94
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($6iGPs$react))).createElement((0, $6iGPs$reactspectrumutils.SlotProvider), {
95
95
  slots: {
96
96
  button: {
97
- UNSAFE_className: (0, $6iGPs$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2e9803b3bbead7d0$exports))), "spectrum-ButtonGroup-Button")
97
+ UNSAFE_className: (0, $6iGPs$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2e9803b3bbead7d0$exports))), 'spectrum-ButtonGroup-Button')
98
98
  }
99
99
  }
100
100
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($6iGPs$react))).createElement((0, $6iGPs$reactspectrumprovider.Provider), {
@@ -27,14 +27,14 @@ function $parcel$interopDefault(a) {
27
27
  function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
28
28
  let { scale: scale } = (0, $i2wAT$useProvider)();
29
29
  props = (0, $i2wAT$useProviderProps)(props);
30
- props = (0, $i2wAT$useSlotProps)(props, "buttonGroup");
31
- let { children: children, orientation: orientation = "horizontal", isDisabled: isDisabled, align: align = "start", ...otherProps } = props;
30
+ props = (0, $i2wAT$useSlotProps)(props, 'buttonGroup');
31
+ let { children: children, orientation: orientation = 'horizontal', isDisabled: isDisabled, align: align = 'start', ...otherProps } = props;
32
32
  let { styleProps: styleProps } = (0, $i2wAT$useStyleProps)(otherProps);
33
33
  let domRef = (0, $i2wAT$useDOMRef)(ref);
34
34
  let [hasOverflow, setHasOverflow] = (0, $i2wAT$useValueEffect)(false);
35
35
  let checkForOverflow = (0, $i2wAT$useCallback)(()=>{
36
36
  let computeHasOverflow = ()=>{
37
- if (domRef.current && orientation === "horizontal") {
37
+ if (domRef.current && orientation === 'horizontal') {
38
38
  let buttonGroupChildren = Array.from(domRef.current.children);
39
39
  let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors
40
40
  // If any buttons have negative X positions (align="end") or extend beyond
@@ -43,7 +43,7 @@ function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
43
43
  return false;
44
44
  }
45
45
  };
46
- if (orientation === "horizontal") setHasOverflow(function*() {
46
+ if (orientation === 'horizontal') setHasOverflow(function*() {
47
47
  // Force to horizontal for measurement.
48
48
  yield false;
49
49
  // Measure, and update if there is overflow.
@@ -80,15 +80,15 @@ function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
80
80
  ...(0, $i2wAT$filterDOMProps)(otherProps),
81
81
  ...styleProps,
82
82
  ref: domRef,
83
- className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), "spectrum-ButtonGroup", {
84
- "spectrum-ButtonGroup--vertical": orientation === "vertical" || hasOverflow,
85
- "spectrum-ButtonGroup--alignEnd": align === "end",
86
- "spectrum-ButtonGroup--alignCenter": align === "center"
83
+ className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), 'spectrum-ButtonGroup', {
84
+ 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,
85
+ 'spectrum-ButtonGroup--alignEnd': align === 'end',
86
+ 'spectrum-ButtonGroup--alignCenter': align === 'center'
87
87
  }, styleProps.className)
88
88
  }, /*#__PURE__*/ (0, $i2wAT$react).createElement((0, $i2wAT$SlotProvider), {
89
89
  slots: {
90
90
  button: {
91
- UNSAFE_className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), "spectrum-ButtonGroup-Button")
91
+ UNSAFE_className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), 'spectrum-ButtonGroup-Button')
92
92
  }
93
93
  }
94
94
  }, /*#__PURE__*/ (0, $i2wAT$react).createElement((0, $i2wAT$Provider), {
@@ -27,14 +27,14 @@ function $parcel$interopDefault(a) {
27
27
  function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
28
28
  let { scale: scale } = (0, $i2wAT$useProvider)();
29
29
  props = (0, $i2wAT$useProviderProps)(props);
30
- props = (0, $i2wAT$useSlotProps)(props, "buttonGroup");
31
- let { children: children, orientation: orientation = "horizontal", isDisabled: isDisabled, align: align = "start", ...otherProps } = props;
30
+ props = (0, $i2wAT$useSlotProps)(props, 'buttonGroup');
31
+ let { children: children, orientation: orientation = 'horizontal', isDisabled: isDisabled, align: align = 'start', ...otherProps } = props;
32
32
  let { styleProps: styleProps } = (0, $i2wAT$useStyleProps)(otherProps);
33
33
  let domRef = (0, $i2wAT$useDOMRef)(ref);
34
34
  let [hasOverflow, setHasOverflow] = (0, $i2wAT$useValueEffect)(false);
35
35
  let checkForOverflow = (0, $i2wAT$useCallback)(()=>{
36
36
  let computeHasOverflow = ()=>{
37
- if (domRef.current && orientation === "horizontal") {
37
+ if (domRef.current && orientation === 'horizontal') {
38
38
  let buttonGroupChildren = Array.from(domRef.current.children);
39
39
  let maxX = domRef.current.offsetWidth + 1; // + 1 to account for rounding errors
40
40
  // If any buttons have negative X positions (align="end") or extend beyond
@@ -43,7 +43,7 @@ function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
43
43
  return false;
44
44
  }
45
45
  };
46
- if (orientation === "horizontal") setHasOverflow(function*() {
46
+ if (orientation === 'horizontal') setHasOverflow(function*() {
47
47
  // Force to horizontal for measurement.
48
48
  yield false;
49
49
  // Measure, and update if there is overflow.
@@ -80,15 +80,15 @@ function $bd4bfa55854eb3bf$var$ButtonGroup(props, ref) {
80
80
  ...(0, $i2wAT$filterDOMProps)(otherProps),
81
81
  ...styleProps,
82
82
  ref: domRef,
83
- className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), "spectrum-ButtonGroup", {
84
- "spectrum-ButtonGroup--vertical": orientation === "vertical" || hasOverflow,
85
- "spectrum-ButtonGroup--alignEnd": align === "end",
86
- "spectrum-ButtonGroup--alignCenter": align === "center"
83
+ className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), 'spectrum-ButtonGroup', {
84
+ 'spectrum-ButtonGroup--vertical': orientation === 'vertical' || hasOverflow,
85
+ 'spectrum-ButtonGroup--alignEnd': align === 'end',
86
+ 'spectrum-ButtonGroup--alignCenter': align === 'center'
87
87
  }, styleProps.className)
88
88
  }, /*#__PURE__*/ (0, $i2wAT$react).createElement((0, $i2wAT$SlotProvider), {
89
89
  slots: {
90
90
  button: {
91
- UNSAFE_className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), "spectrum-ButtonGroup-Button")
91
+ UNSAFE_className: (0, $i2wAT$classNames)((0, ($parcel$interopDefault($i2wAT$buttongroup_vars_cssmodulejs))), 'spectrum-ButtonGroup-Button')
92
92
  }
93
93
  }
94
94
  }, /*#__PURE__*/ (0, $i2wAT$react).createElement((0, $i2wAT$Provider), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/buttongroup",
3
- "version": "3.6.13-nightly.4623+b294de874",
3
+ "version": "3.6.13",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,15 +36,15 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/utils": "3.0.0-nightly.2911+b294de874",
40
- "@react-spectrum/utils": "3.0.0-nightly.2911+b294de874",
41
- "@react-types/buttongroup": "3.3.9-nightly.4623+b294de874",
42
- "@react-types/shared": "3.0.0-nightly.2911+b294de874",
39
+ "@react-aria/utils": "^3.24.1",
40
+ "@react-spectrum/utils": "^3.11.7",
41
+ "@react-types/buttongroup": "^3.3.9",
42
+ "@react-types/shared": "^3.23.1",
43
43
  "@swc/helpers": "^0.5.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@adobe/spectrum-css-temp": "3.0.0-nightly.2911+b294de874",
47
- "@spectrum-icons/workflow": "3.0.0-nightly.2911+b294de874"
46
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1",
47
+ "@spectrum-icons/workflow": "^4.0.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@react-spectrum/provider": "^3.0.0",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "b294de874c16fad64bc4b930ccee1c9ffeb1c20f"
56
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
57
57
  }