@spothero/ui 25.1.1 → 25.1.3-beta.1

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/index.cjs.js CHANGED
@@ -85,8 +85,8 @@ function _objectWithoutProperties(e, t) {
85
85
  r,
86
86
  i = _objectWithoutPropertiesLoose(e, t);
87
87
  if (Object.getOwnPropertySymbols) {
88
- var s = Object.getOwnPropertySymbols(e);
89
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
88
+ var n = Object.getOwnPropertySymbols(e);
89
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
90
90
  }
91
91
  return i;
92
92
  }
@@ -94,7 +94,7 @@ function _objectWithoutPropertiesLoose(r, e) {
94
94
  if (null == r) return {};
95
95
  var t = {};
96
96
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
97
- if (e.includes(n)) continue;
97
+ if (-1 !== e.indexOf(n)) continue;
98
98
  t[n] = r[n];
99
99
  }
100
100
  return t;
@@ -3842,7 +3842,7 @@ Select.propTypes = {
3842
3842
  rightElementStyles: PropTypes__default.default.object
3843
3843
  };
3844
3844
 
3845
- const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
3845
+ const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
3846
3846
 
3847
3847
  /**
3848
3848
  * A component used in the homepage/midfunnel refresh of 2024
@@ -3859,6 +3859,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
3859
3859
  isInvalid,
3860
3860
  isDisabled,
3861
3861
  isRequired,
3862
+ isHighlighted,
3862
3863
  rightElement,
3863
3864
  leftElement,
3864
3865
  rightElementStyles,
@@ -3892,10 +3893,13 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
3892
3893
  }, props, {
3893
3894
  isDisabled: isDisabled,
3894
3895
  color: isInvalid || !label ? 'gray.600' : 'black',
3895
- borderColor: isInvalid ? 'error' : 'gray.200',
3896
+ borderColor: isInvalid ? 'error' : isHighlighted ? 'primary.default' : 'gray.200',
3896
3897
  _focus: {
3897
3898
  borderColor: isInvalid ? 'error' : 'primary.default'
3898
3899
  },
3900
+ _hover: {
3901
+ borderColor: isHighlighted ? 'primary.default' : 'gray.300'
3902
+ },
3899
3903
  paddingTop: label ? 'var(--chakra-sizes-5-5)' : '3',
3900
3904
  textTransform: "none"
3901
3905
  }), buttonValue));
@@ -4651,14 +4655,16 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
4651
4655
  onChange,
4652
4656
  value,
4653
4657
  children,
4654
- groupProps
4658
+ groupProps,
4659
+ buttonGroupStyles: _buttonGroupStyles = {},
4660
+ childrenStyles = {}
4655
4661
  } = props;
4656
4662
  if (!children) throw new Error('Children required');
4657
4663
 
4658
4664
  // iterate over array of child nodes to apply extended props
4659
4665
  return /*#__PURE__*/React__namespace.default.createElement(react.ButtonGroup, _extends$6({
4660
4666
  ref: ref,
4661
- sx: _objectSpread2({}, buttonGroupStyles)
4667
+ sx: _objectSpread2(_objectSpread2({}, buttonGroupStyles), _buttonGroupStyles)
4662
4668
  }, groupProps), React__namespace.default.Children.map(children, CHILD => {
4663
4669
  var _CHILD$props3;
4664
4670
  return /*#__PURE__*/React__namespace.default.cloneElement(CHILD, _objectSpread2({
@@ -4668,9 +4674,9 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
4668
4674
  onChange(CHILD === null || CHILD === void 0 || (_CHILD$props2 = CHILD.props) === null || _CHILD$props2 === void 0 ? void 0 : _CHILD$props2.value);
4669
4675
  }
4670
4676
  }, value !== (CHILD === null || CHILD === void 0 || (_CHILD$props3 = CHILD.props) === null || _CHILD$props3 === void 0 ? void 0 : _CHILD$props3.value) ? {
4671
- sx: _objectSpread2(_objectSpread2({}, defaultStyles), inactiveStyles)
4677
+ sx: _objectSpread2(_objectSpread2(_objectSpread2({}, defaultStyles), inactiveStyles), childrenStyles)
4672
4678
  } : {
4673
- sx: _objectSpread2(_objectSpread2({}, defaultStyles), activeStyles)
4679
+ sx: _objectSpread2(_objectSpread2(_objectSpread2({}, defaultStyles), activeStyles), childrenStyles)
4674
4680
  }));
4675
4681
  }));
4676
4682
  });