@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 +17 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +17 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -997,18 +997,20 @@ Button$1.defaultProps = {
|
|
|
997
997
|
type: 'button'
|
|
998
998
|
};
|
|
999
999
|
|
|
1000
|
-
const _excluded$s = ["header", "children"];
|
|
1000
|
+
const _excluded$s = ["header", "drawerCloseButton", "children", "headerProps"];
|
|
1001
1001
|
const Drawer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1002
1002
|
let {
|
|
1003
1003
|
header,
|
|
1004
|
-
|
|
1004
|
+
drawerCloseButton,
|
|
1005
|
+
children,
|
|
1006
|
+
headerProps
|
|
1005
1007
|
} = _ref,
|
|
1006
1008
|
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
1007
1009
|
return /*#__PURE__*/React__default.createElement(Drawer$1, _extends$6({
|
|
1008
1010
|
placement: "right"
|
|
1009
1011
|
}, props, {
|
|
1010
1012
|
ref: ref
|
|
1011
|
-
}), /*#__PURE__*/React__default.createElement(DrawerOverlay, null), /*#__PURE__*/React__default.createElement(DrawerContent, null, /*#__PURE__*/React__default.createElement(DrawerHeader,
|
|
1013
|
+
}), /*#__PURE__*/React__default.createElement(DrawerOverlay, null), /*#__PURE__*/React__default.createElement(DrawerContent, null, /*#__PURE__*/React__default.createElement(DrawerHeader, headerProps, header, drawerCloseButton || /*#__PURE__*/React__default.createElement(DrawerCloseButton, null)), children));
|
|
1012
1014
|
});
|
|
1013
1015
|
Drawer.propTypes = {
|
|
1014
1016
|
children: PropTypes.node.isRequired,
|
|
@@ -3814,7 +3816,7 @@ Select.propTypes = {
|
|
|
3814
3816
|
rightElementStyles: PropTypes.object
|
|
3815
3817
|
};
|
|
3816
3818
|
|
|
3817
|
-
const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
3819
|
+
const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
3818
3820
|
|
|
3819
3821
|
/**
|
|
3820
3822
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -3831,6 +3833,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3831
3833
|
isInvalid,
|
|
3832
3834
|
isDisabled,
|
|
3833
3835
|
isRequired,
|
|
3836
|
+
isHighlighted,
|
|
3834
3837
|
rightElement,
|
|
3835
3838
|
leftElement,
|
|
3836
3839
|
rightElementStyles,
|
|
@@ -3864,10 +3867,13 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
3864
3867
|
}, props, {
|
|
3865
3868
|
isDisabled: isDisabled,
|
|
3866
3869
|
color: isInvalid || !label ? 'gray.600' : 'black',
|
|
3867
|
-
borderColor: isInvalid ? 'error' : 'gray.200',
|
|
3870
|
+
borderColor: isInvalid ? 'error' : isHighlighted ? 'primary.default' : 'gray.200',
|
|
3868
3871
|
_focus: {
|
|
3869
3872
|
borderColor: isInvalid ? 'error' : 'primary.default'
|
|
3870
3873
|
},
|
|
3874
|
+
_hover: {
|
|
3875
|
+
borderColor: isHighlighted ? 'primary.default' : 'gray.300'
|
|
3876
|
+
},
|
|
3871
3877
|
paddingTop: label ? 'var(--chakra-sizes-5-5)' : '3',
|
|
3872
3878
|
textTransform: "none"
|
|
3873
3879
|
}), buttonValue));
|
|
@@ -4623,14 +4629,16 @@ const ToggleButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4623
4629
|
onChange,
|
|
4624
4630
|
value,
|
|
4625
4631
|
children,
|
|
4626
|
-
groupProps
|
|
4632
|
+
groupProps,
|
|
4633
|
+
buttonGroupStyles: _buttonGroupStyles = {},
|
|
4634
|
+
childrenStyles = {}
|
|
4627
4635
|
} = props;
|
|
4628
4636
|
if (!children) throw new Error('Children required');
|
|
4629
4637
|
|
|
4630
4638
|
// iterate over array of child nodes to apply extended props
|
|
4631
4639
|
return /*#__PURE__*/React__default.createElement(ButtonGroup, _extends$6({
|
|
4632
4640
|
ref: ref,
|
|
4633
|
-
sx: _objectSpread2({}, buttonGroupStyles)
|
|
4641
|
+
sx: _objectSpread2(_objectSpread2({}, buttonGroupStyles), _buttonGroupStyles)
|
|
4634
4642
|
}, groupProps), React__default.Children.map(children, CHILD => {
|
|
4635
4643
|
var _CHILD$props3;
|
|
4636
4644
|
return /*#__PURE__*/React__default.cloneElement(CHILD, _objectSpread2({
|
|
@@ -4639,10 +4647,8 @@ const ToggleButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4639
4647
|
if (value === (CHILD === null || CHILD === void 0 || (_CHILD$props = CHILD.props) === null || _CHILD$props === void 0 ? void 0 : _CHILD$props.value)) return;
|
|
4640
4648
|
onChange(CHILD === null || CHILD === void 0 || (_CHILD$props2 = CHILD.props) === null || _CHILD$props2 === void 0 ? void 0 : _CHILD$props2.value);
|
|
4641
4649
|
}
|
|
4642
|
-
},
|
|
4643
|
-
sx: _objectSpread2(_objectSpread2({}, defaultStyles), inactiveStyles)
|
|
4644
|
-
} : {
|
|
4645
|
-
sx: _objectSpread2(_objectSpread2({}, defaultStyles), activeStyles)
|
|
4650
|
+
}, {
|
|
4651
|
+
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)
|
|
4646
4652
|
}));
|
|
4647
4653
|
}));
|
|
4648
4654
|
});
|