@typeolymp/ui-components 3.0.16 → 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.
- package/build/components/atoms/Icon/index.d.ts +1 -1
- package/build/index.es.js +78 -45
- package/build/index.es.js.map +1 -1
- package/build/index.js +78 -45
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
@@ -7,58 +7,74 @@ import { findDOMNode } from 'react-dom';
|
|
|
7
7
|
var theme = {
|
|
8
8
|
colors: {
|
|
9
9
|
red: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
light: "#F7778C",
|
|
15
|
-
base: "#F21C40",
|
|
16
|
-
dark: "#C21633",
|
|
17
|
-
darker: "#911126",
|
|
10
|
+
light: "#FF5975",
|
|
11
|
+
base: "#FC032D",
|
|
12
|
+
dark: "#AF0522",
|
|
13
|
+
darker: "#900C22",
|
|
14
|
+
// light: "#F7778C",
|
|
15
|
+
// base: "#F21C40",
|
|
16
|
+
// dark: "#C21633",
|
|
17
|
+
// darker: "#911126",
|
|
18
18
|
},
|
|
19
19
|
yellow: {
|
|
20
|
-
light: "#
|
|
21
|
-
base: "#
|
|
22
|
-
dark: "#
|
|
23
|
-
darker: "#
|
|
20
|
+
light: "#FFDB1B",
|
|
21
|
+
base: "#E29400",
|
|
22
|
+
dark: "#BB6802",
|
|
23
|
+
darker: "#7C420B",
|
|
24
|
+
// light: "#FFE867",
|
|
25
|
+
// base: "#FFD801",
|
|
26
|
+
// dark: "#CCAD01",
|
|
27
|
+
// darker: "#998201",
|
|
24
28
|
},
|
|
25
29
|
blue: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
light: "#78CDFA",
|
|
31
|
-
base: "#1AAFF6",
|
|
32
|
-
dark: "#148CC5",
|
|
33
|
-
darker: "#126994",
|
|
30
|
+
light: "#B8E0FF",
|
|
31
|
+
base: "#15A1FF",
|
|
32
|
+
dark: "#0074CE",
|
|
33
|
+
darker: "#084172",
|
|
34
|
+
// light: "#78CDFA",
|
|
35
|
+
// base: "#1AAFF6",
|
|
36
|
+
// dark: "#148CC5",
|
|
37
|
+
// darker: "#126994",
|
|
34
38
|
},
|
|
35
39
|
green: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
light: "#8BDCAE",
|
|
41
|
-
base: "#3DC478",
|
|
42
|
-
dark: "#319D60",
|
|
43
|
-
darker: "#257648",
|
|
40
|
+
light: "#CBFF95",
|
|
41
|
+
base: "#89F625",
|
|
42
|
+
dark: "#4FB100",
|
|
43
|
+
darker: "#32690B",
|
|
44
|
+
// light: "#8BDCAE",
|
|
45
|
+
// base: "#3DC478",
|
|
46
|
+
// dark: "#319D60",
|
|
47
|
+
// darker: "#257648",
|
|
44
48
|
},
|
|
45
49
|
purple: {
|
|
46
|
-
light: "#
|
|
47
|
-
base: "#
|
|
48
|
-
dark: "#
|
|
49
|
-
darker: "#
|
|
50
|
+
light: "#9870ff",
|
|
51
|
+
base: "#6f0fff",
|
|
52
|
+
dark: "#5b00da",
|
|
53
|
+
darker: "#5100c0",
|
|
54
|
+
// light: "#C69BDA",
|
|
55
|
+
// base: "#A059C1",
|
|
56
|
+
// dark: "#80479A",
|
|
57
|
+
// darker: "#603574",
|
|
50
58
|
},
|
|
51
59
|
pink: {
|
|
52
|
-
light: "#
|
|
53
|
-
base: "#
|
|
54
|
-
dark: "#
|
|
55
|
-
darker: "#
|
|
60
|
+
light: "#FCCEFF",
|
|
61
|
+
base: "#FCCEFF",
|
|
62
|
+
dark: "#F73EF7",
|
|
63
|
+
darker: "#791671",
|
|
64
|
+
// light: "#FE67B7",
|
|
65
|
+
// base: "#FE0187",
|
|
66
|
+
// dark: "#CB016C",
|
|
67
|
+
// darker: "#980151",
|
|
56
68
|
},
|
|
57
69
|
orange: {
|
|
58
|
-
light: "#
|
|
59
|
-
base: "#
|
|
60
|
-
dark: "#
|
|
61
|
-
darker: "#
|
|
70
|
+
light: "#FFB96D",
|
|
71
|
+
base: "#FF5A00",
|
|
72
|
+
dark: "#CC3F02",
|
|
73
|
+
darker: "#822B0C",
|
|
74
|
+
// light: "#FFC466",
|
|
75
|
+
// base: "#FF9D00",
|
|
76
|
+
// dark: "#CD7E02",
|
|
77
|
+
// darker: "#995E00",
|
|
62
78
|
},
|
|
63
79
|
darkGray: {
|
|
64
80
|
light: "#7C7F82",
|
|
@@ -3498,6 +3514,8 @@ var Wrapper$a = styled.div(templateObject_1$W || (templateObject_1$W = __makeTem
|
|
|
3498
3514
|
return theme.colors.blue.base;
|
|
3499
3515
|
case "green":
|
|
3500
3516
|
return theme.colors.green.base;
|
|
3517
|
+
case "darkGreen":
|
|
3518
|
+
return theme.colors.green.darker;
|
|
3501
3519
|
case "orange":
|
|
3502
3520
|
return theme.colors.orange.base;
|
|
3503
3521
|
case "red":
|
|
@@ -3526,6 +3544,8 @@ var Wrapper$a = styled.div(templateObject_1$W || (templateObject_1$W = __makeTem
|
|
|
3526
3544
|
return theme.colors.blue.dark;
|
|
3527
3545
|
case "green":
|
|
3528
3546
|
return theme.colors.green.dark;
|
|
3547
|
+
case "darkGreen":
|
|
3548
|
+
return theme.colors.green.darker;
|
|
3529
3549
|
case "orange":
|
|
3530
3550
|
return theme.colors.orange.dark;
|
|
3531
3551
|
case "red":
|
|
@@ -3591,7 +3611,7 @@ var icons = {
|
|
|
3591
3611
|
};
|
|
3592
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] })) }))); };
|
|
3593
3613
|
|
|
3594
|
-
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:
|
|
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) {
|
|
3595
3615
|
var fluid = _a.fluid;
|
|
3596
3616
|
return (fluid ? "100%" : "fit-content");
|
|
3597
3617
|
}, function (_a) {
|
|
@@ -3628,9 +3648,16 @@ var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __m
|
|
|
3628
3648
|
return color === "white" ? "1px solid #e4e4e4" : "none";
|
|
3629
3649
|
}, function (_a) {
|
|
3630
3650
|
var color = _a.color;
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
:
|
|
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
|
+
}
|
|
3634
3661
|
}, theme.fonts.heading, function (_a) {
|
|
3635
3662
|
var size = _a.size;
|
|
3636
3663
|
return !size ? theme.button.medium.fontSize : theme.button[size].fontSize;
|
|
@@ -3710,7 +3737,13 @@ var Button$1 = forwardRef(function (_a, ref) {
|
|
|
3710
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 })] }) })));
|
|
3711
3738
|
}
|
|
3712
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 &&
|
|
3713
|
-
renderIcon({
|
|
3740
|
+
renderIcon({
|
|
3741
|
+
color: color === "white"
|
|
3742
|
+
? "gray"
|
|
3743
|
+
: color === "green"
|
|
3744
|
+
? "darkGreen"
|
|
3745
|
+
: "white",
|
|
3746
|
+
}), jsx$1("span", { children: label })] })) })));
|
|
3714
3747
|
});
|
|
3715
3748
|
|
|
3716
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) {
|