@typeolymp/ui-components 3.0.17 → 3.0.18

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.
@@ -2,7 +2,7 @@ import { FC } from "react";
2
2
  export declare type PropsType = {
3
3
  type: "check" | "chevronUp" | "chevronRight" | "chevronDown" | "chevronLeft" | "eye" | "eyeInvisible" | "warning" | "questionCircle" | "play" | "lock" | "unlock" | "cross" | "bulb" | "star" | "setting" | "reload" | "expand" | "calendar" | "plus" | "envelope" | "facebook" | "instagram" | "menuAlt" | "link" | "heart" | "thunder" | "fire" | "control" | "fileAdd" | "fileCheck" | "fileError" | "fileArrow" | "download" | "upload" | "dotsVertical" | "dotsHorizontal" | "bell" | "bin" | "user" | "search" | "infoCircle" | "swap" | "login" | "logout" | "edit" | "archive" | "unarchive" | "keyboard";
4
4
  size?: "tiny" | "small" | "medium" | "large";
5
- color?: "blue" | "green" | "orange" | "red" | "purple" | "gray" | "darkGray" | "lightGray" | "white";
5
+ color?: "blue" | "green" | "darkGreen" | "orange" | "red" | "purple" | "gray" | "darkGray" | "lightGray" | "white";
6
6
  onClick?(e?: MouseEvent): void;
7
7
  };
8
8
  declare const Icon: FC<PropsType>;
package/build/index.es.js CHANGED
@@ -37,10 +37,10 @@ var theme = {
37
37
  // darker: "#126994",
38
38
  },
39
39
  green: {
40
- light: "#2FD8A5",
41
- base: "#00906C",
42
- dark: "#007C60",
43
- darker: "#045041",
40
+ light: "#CBFF95",
41
+ base: "#89F625",
42
+ dark: "#4FB100",
43
+ darker: "#32690B",
44
44
  // light: "#8BDCAE",
45
45
  // base: "#3DC478",
46
46
  // dark: "#319D60",
@@ -3514,6 +3514,8 @@ var Wrapper$a = styled.div(templateObject_1$W || (templateObject_1$W = __makeTem
3514
3514
  return theme.colors.blue.base;
3515
3515
  case "green":
3516
3516
  return theme.colors.green.base;
3517
+ case "darkGreen":
3518
+ return theme.colors.green.darker;
3517
3519
  case "orange":
3518
3520
  return theme.colors.orange.base;
3519
3521
  case "red":
@@ -3542,6 +3544,8 @@ var Wrapper$a = styled.div(templateObject_1$W || (templateObject_1$W = __makeTem
3542
3544
  return theme.colors.blue.dark;
3543
3545
  case "green":
3544
3546
  return theme.colors.green.dark;
3547
+ case "darkGreen":
3548
+ return theme.colors.green.darker;
3545
3549
  case "orange":
3546
3550
  return theme.colors.orange.dark;
3547
3551
  case "red":
@@ -3607,7 +3611,7 @@ var icons = {
3607
3611
  };
3608
3612
  var Icon = function (props) { return (jsx$1(Wrapper$a, __assign$2({}, props, { children: jsx$1("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
3609
3613
 
3610
- var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __makeTemplateObject$1(["\n width: ", ";\n height: ", ";\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 13px 20px 16px;\n background-color: ", ";\n box-shadow: ", ";\n\n border: ", ";\n border-radius: 6px;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n\n svg {\n pointer-events: none;\n }\n\n span {\n color: ", ";\n font-family: ", ";\n font-style: normal;\n font-weight: bold;\n font-size: ", ";\n }\n\n :hover {\n opacity: ", ";\n background-color: ", ";\n }\n\n :active {\n position: relative;\n top: 3px;\n margin-bottom: 3px;\n box-shadow: none;\n height: ", "\n"], ["\n width: ", ";\n height: ", ";\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 13px 20px 16px;\n background-color: ", ";\n box-shadow: ", ";\n\n border: ", ";\n border-radius: 6px;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n\n svg {\n pointer-events: none;\n }\n\n span {\n color: ", ";\n font-family: ", ";\n font-style: normal;\n font-weight: bold;\n font-size: ", ";\n }\n\n :hover {\n opacity: ", ";\n background-color: ", ";\n }\n\n :active {\n position: relative;\n top: 3px;\n margin-bottom: 3px;\n box-shadow: none;\n height: ", "\n"])), function (_a) {
3614
+ var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __makeTemplateObject$1(["\n width: ", ";\n height: ", ";\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 13px 20px 16px;\n background-color: ", ";\n box-shadow: ", ";\n\n border: ", ";\n border-radius: 14px;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n\n svg {\n pointer-events: none;\n }\n\n span {\n color: ", ";\n font-family: ", ";\n font-style: normal;\n font-weight: bold;\n font-size: ", ";\n }\n\n :hover {\n opacity: ", ";\n background-color: ", ";\n }\n\n :active {\n position: relative;\n top: 3px;\n margin-bottom: 3px;\n box-shadow: none;\n height: ", "\n"], ["\n width: ", ";\n height: ", ";\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 13px 20px 16px;\n background-color: ", ";\n box-shadow: ", ";\n\n border: ", ";\n border-radius: 14px;\n box-sizing: border-box;\n text-decoration: none;\n cursor: pointer;\n\n svg {\n pointer-events: none;\n }\n\n span {\n color: ", ";\n font-family: ", ";\n font-style: normal;\n font-weight: bold;\n font-size: ", ";\n }\n\n :hover {\n opacity: ", ";\n background-color: ", ";\n }\n\n :active {\n position: relative;\n top: 3px;\n margin-bottom: 3px;\n box-shadow: none;\n height: ", "\n"])), function (_a) {
3611
3615
  var fluid = _a.fluid;
3612
3616
  return (fluid ? "100%" : "fit-content");
3613
3617
  }, function (_a) {
@@ -3644,9 +3648,16 @@ var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __m
3644
3648
  return color === "white" ? "1px solid #e4e4e4" : "none";
3645
3649
  }, function (_a) {
3646
3650
  var color = _a.color;
3647
- return color === "white"
3648
- ? theme.colors.darkGray.light
3649
- : theme.colors.lightGray.light;
3651
+ switch (color) {
3652
+ default:
3653
+ case "blue":
3654
+ case "red":
3655
+ return theme.colors.lightGray.light;
3656
+ case "green":
3657
+ return theme.colors.green.darker;
3658
+ case "white":
3659
+ return theme.colors.darkGray.light;
3660
+ }
3650
3661
  }, theme.fonts.heading, function (_a) {
3651
3662
  var size = _a.size;
3652
3663
  return !size ? theme.button.medium.fontSize : theme.button[size].fontSize;
@@ -3726,7 +3737,13 @@ var Button$1 = forwardRef(function (_a, ref) {
3726
3737
  return (jsx$1(DisabledButton, __assign$2({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref ? ref : buttonRef }, { children: jsxs(Fragment$1, { children: [icon && renderIcon({ color: "lightGray" }), jsx$1("span", { children: label })] }) })));
3727
3738
  }
3728
3739
  return (jsx$1(StyledButton, __assign$2({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref ? ref : buttonRef, onClick: onClick }, { children: isLoading ? (jsx$1(Loader, { dark: color === "white" })) : (jsxs(Fragment$1, { children: [icon &&
3729
- renderIcon({ color: color === "white" ? "gray" : "white" }), jsx$1("span", { children: label })] })) })));
3740
+ renderIcon({
3741
+ color: color === "white"
3742
+ ? "gray"
3743
+ : color === "green"
3744
+ ? "darkGreen"
3745
+ : "white",
3746
+ }), jsx$1("span", { children: label })] })) })));
3730
3747
  });
3731
3748
 
3732
3749
  var StyledCheckbox = styled.div(templateObject_1$T || (templateObject_1$T = __makeTemplateObject$1(["\n min-height: 25px;\n max-height: 25px;\n min-width: 25px;\n max-width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n cursor: ", ";\n background-color: ", ";\n\n svg {\n margin-left: -1px;\n fill: ", ";\n }\n\n input {\n display: none;\n }\n\n :focus {\n outline: 0;\n border-color: ", ";\n box-shadow: ", ";\n }\n"], ["\n min-height: 25px;\n max-height: 25px;\n min-width: 25px;\n max-width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n cursor: ", ";\n background-color: ", ";\n\n svg {\n margin-left: -1px;\n fill: ", ";\n }\n\n input {\n display: none;\n }\n\n :focus {\n outline: 0;\n border-color: ", ";\n box-shadow: ", ";\n }\n"])), function (_a) {