@spothero/ui 25.1.3 → 25.1.5

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
@@ -1025,18 +1025,20 @@ Button$1.defaultProps = {
1025
1025
  type: 'button'
1026
1026
  };
1027
1027
 
1028
- const _excluded$s = ["header", "children"];
1028
+ const _excluded$s = ["header", "drawerCloseButton", "children", "headerProps"];
1029
1029
  const Drawer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
1030
1030
  let {
1031
1031
  header,
1032
- children
1032
+ drawerCloseButton,
1033
+ children,
1034
+ headerProps
1033
1035
  } = _ref,
1034
1036
  props = _objectWithoutProperties(_ref, _excluded$s);
1035
1037
  return /*#__PURE__*/React__namespace.default.createElement(react.Drawer, _extends$6({
1036
1038
  placement: "right"
1037
1039
  }, props, {
1038
1040
  ref: ref
1039
- }), /*#__PURE__*/React__namespace.default.createElement(react.DrawerOverlay, null), /*#__PURE__*/React__namespace.default.createElement(react.DrawerContent, null, /*#__PURE__*/React__namespace.default.createElement(react.DrawerHeader, null, header, /*#__PURE__*/React__namespace.default.createElement(react.DrawerCloseButton, null)), children));
1041
+ }), /*#__PURE__*/React__namespace.default.createElement(react.DrawerOverlay, null), /*#__PURE__*/React__namespace.default.createElement(react.DrawerContent, null, /*#__PURE__*/React__namespace.default.createElement(react.DrawerHeader, headerProps, header, drawerCloseButton || /*#__PURE__*/React__namespace.default.createElement(react.DrawerCloseButton, null)), children));
1040
1042
  });
1041
1043
  Drawer.propTypes = {
1042
1044
  children: PropTypes__default.default.node.isRequired,
@@ -3842,7 +3844,7 @@ Select.propTypes = {
3842
3844
  rightElementStyles: PropTypes__default.default.object
3843
3845
  };
3844
3846
 
3845
- const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
3847
+ const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
3846
3848
 
3847
3849
  /**
3848
3850
  * A component used in the homepage/midfunnel refresh of 2024
@@ -3859,6 +3861,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
3859
3861
  isInvalid,
3860
3862
  isDisabled,
3861
3863
  isRequired,
3864
+ isHighlighted,
3862
3865
  rightElement,
3863
3866
  leftElement,
3864
3867
  rightElementStyles,
@@ -3892,10 +3895,13 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
3892
3895
  }, props, {
3893
3896
  isDisabled: isDisabled,
3894
3897
  color: isInvalid || !label ? 'gray.600' : 'black',
3895
- borderColor: isInvalid ? 'error' : 'gray.200',
3898
+ borderColor: isInvalid ? 'error' : isHighlighted ? 'primary.default' : 'gray.200',
3896
3899
  _focus: {
3897
3900
  borderColor: isInvalid ? 'error' : 'primary.default'
3898
3901
  },
3902
+ _hover: {
3903
+ borderColor: isHighlighted ? 'primary.default' : 'gray.300'
3904
+ },
3899
3905
  paddingTop: label ? 'var(--chakra-sizes-5-5)' : '3',
3900
3906
  textTransform: "none"
3901
3907
  }), buttonValue));
@@ -4651,14 +4657,16 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
4651
4657
  onChange,
4652
4658
  value,
4653
4659
  children,
4654
- groupProps
4660
+ groupProps,
4661
+ buttonGroupStyles: _buttonGroupStyles = {},
4662
+ childrenStyles = {}
4655
4663
  } = props;
4656
4664
  if (!children) throw new Error('Children required');
4657
4665
 
4658
4666
  // iterate over array of child nodes to apply extended props
4659
4667
  return /*#__PURE__*/React__namespace.default.createElement(react.ButtonGroup, _extends$6({
4660
4668
  ref: ref,
4661
- sx: _objectSpread2({}, buttonGroupStyles)
4669
+ sx: _objectSpread2(_objectSpread2({}, buttonGroupStyles), _buttonGroupStyles)
4662
4670
  }, groupProps), React__namespace.default.Children.map(children, CHILD => {
4663
4671
  var _CHILD$props3;
4664
4672
  return /*#__PURE__*/React__namespace.default.cloneElement(CHILD, _objectSpread2({
@@ -4667,10 +4675,8 @@ const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
4667
4675
  if (value === (CHILD === null || CHILD === void 0 || (_CHILD$props = CHILD.props) === null || _CHILD$props === void 0 ? void 0 : _CHILD$props.value)) return;
4668
4676
  onChange(CHILD === null || CHILD === void 0 || (_CHILD$props2 = CHILD.props) === null || _CHILD$props2 === void 0 ? void 0 : _CHILD$props2.value);
4669
4677
  }
4670
- }, 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)
4672
- } : {
4673
- sx: _objectSpread2(_objectSpread2({}, defaultStyles), activeStyles)
4678
+ }, {
4679
+ sx: _objectSpread2(_objectSpread2(_objectSpread2({}, defaultStyles), value !== (CHILD === null || CHILD === void 0 || (_CHILD$props3 = CHILD.props) === null || _CHILD$props3 === void 0 ? void 0 : _CHILD$props3.value) ? inactiveStyles : activeStyles), childrenStyles)
4674
4680
  }));
4675
4681
  }));
4676
4682
  });