@coinswap-app/uikit 1.0.7 → 1.0.8

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
@@ -8434,7 +8434,7 @@ var Heading = styledComponents.styled(Text).attrs(function (_ref) {
8434
8434
  var _ref$as = _ref.as,
8435
8435
  as = _ref$as === void 0 ? tags.H2 : _ref$as;
8436
8436
  return {
8437
- bold: true,
8437
+ $bold: true,
8438
8438
  as: as
8439
8439
  };
8440
8440
  })(_templateObject$1$ || (_templateObject$1$ = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: 600;\n line-height: 1.1;\n\n ", " {\n font-size: ", ";\n }\n"])), function (_ref2) {
@@ -9515,7 +9515,11 @@ var getButtonVariantProp$2 = function getButtonVariantProp(prop) {
9515
9515
  return theme.button[variant][prop];
9516
9516
  };
9517
9517
  };
9518
- var StyledButton$1 = styledComponents.styled.button(_templateObject$1R || (_templateObject$1R = _taggedTemplateLiteral(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n font-family: inherit;\n font-size: 16px;\n font-weight: 700;\n color: white;\n /* max-content instead of auto for Safari fix */\n width: ", ";\n height: ", ";\n line-height: 1;\n letter-spacing: 0.03em;\n justify-content: center;\n outline: 0;\n padding: ", ";\n transition: all 0.5s;\n\n .dot {\n margin-top: 10px;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n display: inline-block;\n background-color: ", ";\n }\n\n &:hover:not(:disabled):not(.button--disabled):not(:active) {\n border-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: transparent;\n color: ", ";\n }\n\n ", "\n ", "\n ", "\n"])), function (_ref4) {
9518
+ var StyledButton$1 = styledComponents.styled.button.withConfig({
9519
+ shouldForwardProp: function shouldForwardProp(prop) {
9520
+ return !['variant', 'isLoading', 'fullWidth', 'lined', 'active', 'isActive'].includes(prop);
9521
+ }
9522
+ })(_templateObject$1R || (_templateObject$1R = _taggedTemplateLiteral(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n font-family: inherit;\n font-size: 16px;\n font-weight: 700;\n color: white;\n /* max-content instead of auto for Safari fix */\n width: ", ";\n height: ", ";\n line-height: 1;\n letter-spacing: 0.03em;\n justify-content: center;\n outline: 0;\n padding: ", ";\n transition: all 0.5s;\n\n .dot {\n margin-top: 10px;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n display: inline-block;\n background-color: ", ";\n }\n\n &:hover:not(:disabled):not(.button--disabled):not(:active) {\n border-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: transparent;\n color: ", ";\n }\n\n ", "\n ", "\n ", "\n"])), function (_ref4) {
9519
9523
  var fullWidth = _ref4.fullWidth;
9520
9524
  return fullWidth ? "100%" : "max-content";
9521
9525
  }, function (_ref5) {
@@ -9555,16 +9559,14 @@ var Button = function Button(_ref) {
9555
9559
  _ref$isLoading = _ref.isLoading,
9556
9560
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
9557
9561
  _ref$disabled = _ref.disabled,
9558
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
9559
- lined = _ref.lined,
9560
- props = _objectWithoutProperties(_ref, _excluded$m);
9562
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
9563
+ _ref.lined;
9564
+ var props = _objectWithoutProperties(_ref, _excluded$m);
9561
9565
  var internalProps = external ? getExternalLinkProps() : {};
9562
9566
  var isDisabled = isLoading || disabled;
9563
9567
  return /*#__PURE__*/jsxRuntime.jsxs(StyledButton$1, _objectSpread2(_objectSpread2(_objectSpread2({}, internalProps), props), {}, {
9564
- isLoading: isLoading,
9565
9568
  disabled: isDisabled,
9566
9569
  style: style,
9567
- lined: lined,
9568
9570
  children: [/*#__PURE__*/React.isValidElement(startIcon) && /*#__PURE__*/React.cloneElement(startIcon, {
9569
9571
  mr: "0.5rem"
9570
9572
  }), children, /*#__PURE__*/React.isValidElement(endIcon) && /*#__PURE__*/React.cloneElement(endIcon, {
@@ -9600,13 +9602,14 @@ var StyledTag = styledComponents.styled.div(_templateObject$1Q || (_templateObje
9600
9602
  return getColor(variant, theme);
9601
9603
  }, getThemeTextColor, getThemeTextColor);
9602
9604
 
9603
- var _excluded$l = ["isActive", "size", "variant", "as", "children", "tag", "hide"];
9605
+ var _excluded$l = ["isActive", "size", "variant", "as", "children", "tag", "hide"],
9606
+ _excluded2$1 = ["isActive"];
9604
9607
  var _templateObject$1P, _templateObject2$Z, _templateObject3$L;
9605
9608
  var ButtonBody = styledComponents.styled.div(_templateObject$1P || (_templateObject$1P = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n"])));
9606
9609
  var ButtonTag = styledComponents.styled(StyledTag)(_templateObject2$Z || (_templateObject2$Z = _taggedTemplateLiteral(["\n margin-left: 7px;\n font-weight: bold;\n font-size: 11px;\n padding: 1px 5px;\n height: unset;\n border-width: 1px;\n"])));
9607
9610
  var InactiveButton$1 = styledComponents.styled(Button).withConfig({
9608
9611
  shouldForwardProp: function shouldForwardProp(prop) {
9609
- return prop !== 'colorKey';
9612
+ return prop !== 'colorKey' && prop !== 'isActive';
9610
9613
  }
9611
9614
  })(_templateObject3$L || (_templateObject3$L = _taggedTemplateLiteral(["\n background-color: transparent;\n color: #535459;\n .dot {\n background-color: transparent;\n }\n\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"])));
9612
9615
  var ButtonMenuItem = function ButtonMenuItem(_ref) {
@@ -9621,13 +9624,16 @@ var ButtonMenuItem = function ButtonMenuItem(_ref) {
9621
9624
  tag = _ref.tag,
9622
9625
  hide = _ref.hide,
9623
9626
  props = _objectWithoutProperties(_ref, _excluded$l);
9627
+ // Remove isActive from props to prevent it from being passed to DOM
9628
+ props.isActive;
9629
+ var buttonProps = _objectWithoutProperties(props, _excluded2$1);
9624
9630
  if (!isActive) {
9625
9631
  return /*#__PURE__*/jsxRuntime.jsx(InactiveButton$1, _objectSpread2(_objectSpread2({
9626
9632
  forwardedAs: as,
9627
9633
  size: size,
9628
9634
  variant: "tertiary",
9629
9635
  colorKey: variant === variants$2.PRIMARY ? "primary" : "textSubtle"
9630
- }, props), {}, {
9636
+ }, buttonProps), {}, {
9631
9637
  style: {
9632
9638
  display: hide ? "none" : "flex"
9633
9639
  },
@@ -9643,7 +9649,7 @@ var ButtonMenuItem = function ButtonMenuItem(_ref) {
9643
9649
  as: as,
9644
9650
  size: size,
9645
9651
  variant: variant
9646
- }, props), {}, {
9652
+ }, buttonProps), {}, {
9647
9653
  style: {
9648
9654
  display: hide ? "none" : "flex"
9649
9655
  },
package/dist/index.esm.js CHANGED
@@ -8412,7 +8412,7 @@ var Heading = styled(Text).attrs(function (_ref) {
8412
8412
  var _ref$as = _ref.as,
8413
8413
  as = _ref$as === void 0 ? tags.H2 : _ref$as;
8414
8414
  return {
8415
- bold: true,
8415
+ $bold: true,
8416
8416
  as: as
8417
8417
  };
8418
8418
  })(_templateObject$1$ || (_templateObject$1$ = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: 600;\n line-height: 1.1;\n\n ", " {\n font-size: ", ";\n }\n"])), function (_ref2) {
@@ -9493,7 +9493,11 @@ var getButtonVariantProp$2 = function getButtonVariantProp(prop) {
9493
9493
  return theme.button[variant][prop];
9494
9494
  };
9495
9495
  };
9496
- var StyledButton$1 = styled.button(_templateObject$1R || (_templateObject$1R = _taggedTemplateLiteral(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n font-family: inherit;\n font-size: 16px;\n font-weight: 700;\n color: white;\n /* max-content instead of auto for Safari fix */\n width: ", ";\n height: ", ";\n line-height: 1;\n letter-spacing: 0.03em;\n justify-content: center;\n outline: 0;\n padding: ", ";\n transition: all 0.5s;\n\n .dot {\n margin-top: 10px;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n display: inline-block;\n background-color: ", ";\n }\n\n &:hover:not(:disabled):not(.button--disabled):not(:active) {\n border-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: transparent;\n color: ", ";\n }\n\n ", "\n ", "\n ", "\n"])), function (_ref4) {
9496
+ var StyledButton$1 = styled.button.withConfig({
9497
+ shouldForwardProp: function shouldForwardProp(prop) {
9498
+ return !['variant', 'isLoading', 'fullWidth', 'lined', 'active', 'isActive'].includes(prop);
9499
+ }
9500
+ })(_templateObject$1R || (_templateObject$1R = _taggedTemplateLiteral(["\n align-items: center;\n background-color: transparent;\n border: none;\n border-radius: 10px;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n font-family: inherit;\n font-size: 16px;\n font-weight: 700;\n color: white;\n /* max-content instead of auto for Safari fix */\n width: ", ";\n height: ", ";\n line-height: 1;\n letter-spacing: 0.03em;\n justify-content: center;\n outline: 0;\n padding: ", ";\n transition: all 0.5s;\n\n .dot {\n margin-top: 10px;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n display: inline-block;\n background-color: ", ";\n }\n\n &:hover:not(:disabled):not(.button--disabled):not(:active) {\n border-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: transparent;\n color: ", ";\n }\n\n ", "\n ", "\n ", "\n"])), function (_ref4) {
9497
9501
  var fullWidth = _ref4.fullWidth;
9498
9502
  return fullWidth ? "100%" : "max-content";
9499
9503
  }, function (_ref5) {
@@ -9533,16 +9537,14 @@ var Button = function Button(_ref) {
9533
9537
  _ref$isLoading = _ref.isLoading,
9534
9538
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
9535
9539
  _ref$disabled = _ref.disabled,
9536
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
9537
- lined = _ref.lined,
9538
- props = _objectWithoutProperties(_ref, _excluded$m);
9540
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
9541
+ _ref.lined;
9542
+ var props = _objectWithoutProperties(_ref, _excluded$m);
9539
9543
  var internalProps = external ? getExternalLinkProps() : {};
9540
9544
  var isDisabled = isLoading || disabled;
9541
9545
  return /*#__PURE__*/jsxs(StyledButton$1, _objectSpread2(_objectSpread2(_objectSpread2({}, internalProps), props), {}, {
9542
- isLoading: isLoading,
9543
9546
  disabled: isDisabled,
9544
9547
  style: style,
9545
- lined: lined,
9546
9548
  children: [/*#__PURE__*/React__default.isValidElement(startIcon) && /*#__PURE__*/React__default.cloneElement(startIcon, {
9547
9549
  mr: "0.5rem"
9548
9550
  }), children, /*#__PURE__*/React__default.isValidElement(endIcon) && /*#__PURE__*/React__default.cloneElement(endIcon, {
@@ -9578,13 +9580,14 @@ var StyledTag = styled.div(_templateObject$1Q || (_templateObject$1Q = _taggedTe
9578
9580
  return getColor(variant, theme);
9579
9581
  }, getThemeTextColor, getThemeTextColor);
9580
9582
 
9581
- var _excluded$l = ["isActive", "size", "variant", "as", "children", "tag", "hide"];
9583
+ var _excluded$l = ["isActive", "size", "variant", "as", "children", "tag", "hide"],
9584
+ _excluded2$1 = ["isActive"];
9582
9585
  var _templateObject$1P, _templateObject2$Z, _templateObject3$L;
9583
9586
  var ButtonBody = styled.div(_templateObject$1P || (_templateObject$1P = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n"])));
9584
9587
  var ButtonTag = styled(StyledTag)(_templateObject2$Z || (_templateObject2$Z = _taggedTemplateLiteral(["\n margin-left: 7px;\n font-weight: bold;\n font-size: 11px;\n padding: 1px 5px;\n height: unset;\n border-width: 1px;\n"])));
9585
9588
  var InactiveButton$1 = styled(Button).withConfig({
9586
9589
  shouldForwardProp: function shouldForwardProp(prop) {
9587
- return prop !== 'colorKey';
9590
+ return prop !== 'colorKey' && prop !== 'isActive';
9588
9591
  }
9589
9592
  })(_templateObject3$L || (_templateObject3$L = _taggedTemplateLiteral(["\n background-color: transparent;\n color: #535459;\n .dot {\n background-color: transparent;\n }\n\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"])));
9590
9593
  var ButtonMenuItem = function ButtonMenuItem(_ref) {
@@ -9599,13 +9602,16 @@ var ButtonMenuItem = function ButtonMenuItem(_ref) {
9599
9602
  tag = _ref.tag,
9600
9603
  hide = _ref.hide,
9601
9604
  props = _objectWithoutProperties(_ref, _excluded$l);
9605
+ // Remove isActive from props to prevent it from being passed to DOM
9606
+ props.isActive;
9607
+ var buttonProps = _objectWithoutProperties(props, _excluded2$1);
9602
9608
  if (!isActive) {
9603
9609
  return /*#__PURE__*/jsx(InactiveButton$1, _objectSpread2(_objectSpread2({
9604
9610
  forwardedAs: as,
9605
9611
  size: size,
9606
9612
  variant: "tertiary",
9607
9613
  colorKey: variant === variants$2.PRIMARY ? "primary" : "textSubtle"
9608
- }, props), {}, {
9614
+ }, buttonProps), {}, {
9609
9615
  style: {
9610
9616
  display: hide ? "none" : "flex"
9611
9617
  },
@@ -9621,7 +9627,7 @@ var ButtonMenuItem = function ButtonMenuItem(_ref) {
9621
9627
  as: as,
9622
9628
  size: size,
9623
9629
  variant: variant
9624
- }, props), {}, {
9630
+ }, buttonProps), {}, {
9625
9631
  style: {
9626
9632
  display: hide ? "none" : "flex"
9627
9633
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinswap-app/uikit",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Set of UI components for CoinSwap projects",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",