@taikai/rocket-kit 3.0.0-beta.4 → 3.0.0-beta.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/rocket-kit.cjs.development.js +15 -12
- package/dist/rocket-kit.cjs.development.js.map +1 -1
- package/dist/rocket-kit.cjs.production.min.js +3 -3
- package/dist/rocket-kit.cjs.production.min.js.map +1 -1
- package/dist/rocket-kit.esm.js +15 -12
- package/dist/rocket-kit.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/rocket-kit.esm.js
CHANGED
|
@@ -259,11 +259,11 @@ const ButtonWrapper = /*#__PURE__*/_styled.button.withConfig({
|
|
|
259
259
|
var _props$color;
|
|
260
260
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
261
261
|
}, props => {
|
|
262
|
-
var _props$txtColor;
|
|
263
|
-
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : '
|
|
262
|
+
var _props$color2, _props$txtColor;
|
|
263
|
+
return props.variant === 'outline' && !props.txtColor ? useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').color : useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'white').color;
|
|
264
264
|
}, props => {
|
|
265
|
-
var _props$
|
|
266
|
-
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$
|
|
265
|
+
var _props$color3;
|
|
266
|
+
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color3 = props.color) != null ? _props$color3 : 'black').hover;
|
|
267
267
|
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? rem('80px') : rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, props => props.variant === 'solid' ? '' : 'var(--button)', /*#__PURE__*/rem(typography.defaultSize), typography.medium, /*#__PURE__*/rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
268
268
|
|
|
269
269
|
const Button = props => {
|
|
@@ -271,7 +271,7 @@ const Button = props => {
|
|
|
271
271
|
variant = 'solid',
|
|
272
272
|
rounded = false,
|
|
273
273
|
color = 'purple500',
|
|
274
|
-
txtColor
|
|
274
|
+
txtColor,
|
|
275
275
|
type,
|
|
276
276
|
className = 'button',
|
|
277
277
|
style,
|
|
@@ -417,11 +417,11 @@ const ButtonLinkStyle = /*#__PURE__*/_styled.a.withConfig({
|
|
|
417
417
|
var _props$color;
|
|
418
418
|
return useColor((_props$color = props.color) != null ? _props$color : 'black').color;
|
|
419
419
|
}, props => {
|
|
420
|
-
var _props$txtColor;
|
|
421
|
-
return useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : '
|
|
420
|
+
var _props$color2, _props$txtColor;
|
|
421
|
+
return props.variant === 'outline' && !props.txtColor ? useColor((_props$color2 = props.color) != null ? _props$color2 : 'black').color : useColor((_props$txtColor = props.txtColor) != null ? _props$txtColor : 'white').color;
|
|
422
422
|
}, props => {
|
|
423
|
-
var _props$
|
|
424
|
-
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$
|
|
423
|
+
var _props$color3;
|
|
424
|
+
return props.color === 'white' ? colors.grey100 : props.color === 'black' ? colors.grey900 : useColor((_props$color3 = props.color) != null ? _props$color3 : 'black').hover;
|
|
425
425
|
}, props => props.variant === 'outline' ? button.borderWidth : 0, props => props.variant === 'text' ? 0 : props.rounded ? '999px' : button.borderRadius, props => props.variant === 'solid' ? 'var(--bg)' : 'transparent', props => props.value ? rem('80px') : rem('42px'), button.height, props => props.value ? `0 ${button.padding}` : 0, misc.transitionDuration, props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? 'var(--hover)' : 'transparent', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.variant === 'solid' ? '' : 'var(--hover)', props => props.iconPosition === 'right' ? button.iconSpacing : 0, props => props.iconPosition === 'left' ? button.iconSpacing : 0, /*#__PURE__*/rem(typography.defaultSize), typography.medium, /*#__PURE__*/rem(typography.defaultSize), props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration, props => props.iconPosition === 'left' ? 2 : 1, props => props.iconPosition === 'left' ? 1 : 2, button.iconSize, button.iconSize, props => props.variant === 'solid' || props.variant === 'outline' ? 'var(--txt)' : 'var(--bg)', misc.transitionDuration);
|
|
426
426
|
|
|
427
427
|
const ButtonLink = props => {
|
|
@@ -429,7 +429,7 @@ const ButtonLink = props => {
|
|
|
429
429
|
variant = 'solid',
|
|
430
430
|
rounded = false,
|
|
431
431
|
color = 'purple500',
|
|
432
|
-
txtColor
|
|
432
|
+
txtColor,
|
|
433
433
|
className = 'button-link',
|
|
434
434
|
style,
|
|
435
435
|
action = () => {},
|
|
@@ -2544,7 +2544,7 @@ const ModalFooter = props => {
|
|
|
2544
2544
|
style: style
|
|
2545
2545
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
2546
2546
|
variant: "outline",
|
|
2547
|
-
color: "
|
|
2547
|
+
color: "grey300",
|
|
2548
2548
|
action: closeAction,
|
|
2549
2549
|
value: closeValue
|
|
2550
2550
|
}), children);
|
|
@@ -5831,7 +5831,7 @@ const Modal = props => {
|
|
|
5831
5831
|
className: "modal"
|
|
5832
5832
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, title && /*#__PURE__*/React.createElement("h2", null, title), /*#__PURE__*/React.createElement(Button, {
|
|
5833
5833
|
color: "white",
|
|
5834
|
-
txtColor: "
|
|
5834
|
+
txtColor: "grey300",
|
|
5835
5835
|
icon: "cross",
|
|
5836
5836
|
ariaLabel: "Close",
|
|
5837
5837
|
action: hide,
|
|
@@ -5895,6 +5895,9 @@ const ModalDrawer = props => {
|
|
|
5895
5895
|
} else {
|
|
5896
5896
|
document.documentElement.style.overflow = '';
|
|
5897
5897
|
}
|
|
5898
|
+
return () => {
|
|
5899
|
+
document.documentElement.style.overflow = '';
|
|
5900
|
+
};
|
|
5898
5901
|
}, [isShowing]);
|
|
5899
5902
|
useEffect(() => {
|
|
5900
5903
|
const fixViewport = () => {
|