@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.esm.js CHANGED
@@ -57,8 +57,8 @@ function _objectWithoutProperties(e, t) {
57
57
  r,
58
58
  i = _objectWithoutPropertiesLoose(e, t);
59
59
  if (Object.getOwnPropertySymbols) {
60
- var s = Object.getOwnPropertySymbols(e);
61
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
60
+ var n = Object.getOwnPropertySymbols(e);
61
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
62
62
  }
63
63
  return i;
64
64
  }
@@ -66,7 +66,7 @@ function _objectWithoutPropertiesLoose(r, e) {
66
66
  if (null == r) return {};
67
67
  var t = {};
68
68
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
69
- if (e.includes(n)) continue;
69
+ if (-1 !== e.indexOf(n)) continue;
70
70
  t[n] = r[n];
71
71
  }
72
72
  return t;
@@ -3814,7 +3814,7 @@ Select.propTypes = {
3814
3814
  rightElementStyles: PropTypes.object
3815
3815
  };
3816
3816
 
3817
- const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
3817
+ const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
3818
3818
 
3819
3819
  /**
3820
3820
  * A component used in the homepage/midfunnel refresh of 2024
@@ -3831,6 +3831,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
3831
3831
  isInvalid,
3832
3832
  isDisabled,
3833
3833
  isRequired,
3834
+ isHighlighted,
3834
3835
  rightElement,
3835
3836
  leftElement,
3836
3837
  rightElementStyles,
@@ -3864,10 +3865,13 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
3864
3865
  }, props, {
3865
3866
  isDisabled: isDisabled,
3866
3867
  color: isInvalid || !label ? 'gray.600' : 'black',
3867
- borderColor: isInvalid ? 'error' : 'gray.200',
3868
+ borderColor: isInvalid ? 'error' : isHighlighted ? 'primary.default' : 'gray.200',
3868
3869
  _focus: {
3869
3870
  borderColor: isInvalid ? 'error' : 'primary.default'
3870
3871
  },
3872
+ _hover: {
3873
+ borderColor: isHighlighted ? 'primary.default' : 'gray.300'
3874
+ },
3871
3875
  paddingTop: label ? 'var(--chakra-sizes-5-5)' : '3',
3872
3876
  textTransform: "none"
3873
3877
  }), buttonValue));
@@ -4623,14 +4627,16 @@ const ToggleButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
4623
4627
  onChange,
4624
4628
  value,
4625
4629
  children,
4626
- groupProps
4630
+ groupProps,
4631
+ buttonGroupStyles: _buttonGroupStyles = {},
4632
+ childrenStyles = {}
4627
4633
  } = props;
4628
4634
  if (!children) throw new Error('Children required');
4629
4635
 
4630
4636
  // iterate over array of child nodes to apply extended props
4631
4637
  return /*#__PURE__*/React__default.createElement(ButtonGroup, _extends$6({
4632
4638
  ref: ref,
4633
- sx: _objectSpread2({}, buttonGroupStyles)
4639
+ sx: _objectSpread2(_objectSpread2({}, buttonGroupStyles), _buttonGroupStyles)
4634
4640
  }, groupProps), React__default.Children.map(children, CHILD => {
4635
4641
  var _CHILD$props3;
4636
4642
  return /*#__PURE__*/React__default.cloneElement(CHILD, _objectSpread2({
@@ -4640,9 +4646,9 @@ const ToggleButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
4640
4646
  onChange(CHILD === null || CHILD === void 0 || (_CHILD$props2 = CHILD.props) === null || _CHILD$props2 === void 0 ? void 0 : _CHILD$props2.value);
4641
4647
  }
4642
4648
  }, value !== (CHILD === null || CHILD === void 0 || (_CHILD$props3 = CHILD.props) === null || _CHILD$props3 === void 0 ? void 0 : _CHILD$props3.value) ? {
4643
- sx: _objectSpread2(_objectSpread2({}, defaultStyles), inactiveStyles)
4649
+ sx: _objectSpread2(_objectSpread2(_objectSpread2({}, defaultStyles), inactiveStyles), childrenStyles)
4644
4650
  } : {
4645
- sx: _objectSpread2(_objectSpread2({}, defaultStyles), activeStyles)
4651
+ sx: _objectSpread2(_objectSpread2(_objectSpread2({}, defaultStyles), activeStyles), childrenStyles)
4646
4652
  }));
4647
4653
  }));
4648
4654
  });