@typeolymp/ui-components 3.0.17 → 3.0.19
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/Button/index.d.ts +1 -1
- package/build/components/atoms/Icon/index.d.ts +1 -1
- package/build/index.es.js +60 -9
- package/build/index.es.js.map +1 -1
- package/build/index.js +60 -9
- package/build/index.js.map +1 -1
- package/build/utils/theme/types.d.ts +4 -3
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { PropsType as IconPropsType } from "../Icon";
|
|
3
3
|
export declare type PropsType = {
|
|
4
4
|
label: string | JSX.Element;
|
|
5
|
-
color?: "blue" | "green" | "red" | "white";
|
|
5
|
+
color?: "blue" | "green" | "darkGreen" | "red" | "purple" | "white";
|
|
6
6
|
size?: "small" | "medium";
|
|
7
7
|
fluid?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -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,15 +37,21 @@ var theme = {
|
|
|
37
37
|
// darker: "#126994",
|
|
38
38
|
},
|
|
39
39
|
green: {
|
|
40
|
-
light: "#
|
|
41
|
-
base: "#
|
|
42
|
-
dark: "#
|
|
43
|
-
darker: "#
|
|
40
|
+
light: "#CBFF95",
|
|
41
|
+
base: "#89F625",
|
|
42
|
+
dark: "#4FB100",
|
|
43
|
+
darker: "#32690B",
|
|
44
44
|
// light: "#8BDCAE",
|
|
45
45
|
// base: "#3DC478",
|
|
46
46
|
// dark: "#319D60",
|
|
47
47
|
// darker: "#257648",
|
|
48
48
|
},
|
|
49
|
+
darkGreen: {
|
|
50
|
+
light: "#6AEBC0",
|
|
51
|
+
base: "#00906C",
|
|
52
|
+
dark: "#007C60",
|
|
53
|
+
darker: "#045041",
|
|
54
|
+
},
|
|
49
55
|
purple: {
|
|
50
56
|
light: "#9870ff",
|
|
51
57
|
base: "#6f0fff",
|
|
@@ -3514,6 +3520,8 @@ var Wrapper$a = styled.div(templateObject_1$W || (templateObject_1$W = __makeTem
|
|
|
3514
3520
|
return theme.colors.blue.base;
|
|
3515
3521
|
case "green":
|
|
3516
3522
|
return theme.colors.green.base;
|
|
3523
|
+
case "darkGreen":
|
|
3524
|
+
return theme.colors.green.darker;
|
|
3517
3525
|
case "orange":
|
|
3518
3526
|
return theme.colors.orange.base;
|
|
3519
3527
|
case "red":
|
|
@@ -3542,6 +3550,8 @@ var Wrapper$a = styled.div(templateObject_1$W || (templateObject_1$W = __makeTem
|
|
|
3542
3550
|
return theme.colors.blue.dark;
|
|
3543
3551
|
case "green":
|
|
3544
3552
|
return theme.colors.green.dark;
|
|
3553
|
+
case "darkGreen":
|
|
3554
|
+
return theme.colors.green.darker;
|
|
3545
3555
|
case "orange":
|
|
3546
3556
|
return theme.colors.orange.dark;
|
|
3547
3557
|
case "red":
|
|
@@ -3607,7 +3617,7 @@ var icons = {
|
|
|
3607
3617
|
};
|
|
3608
3618
|
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
3619
|
|
|
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:
|
|
3620
|
+
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
3621
|
var fluid = _a.fluid;
|
|
3612
3622
|
return (fluid ? "100%" : "fit-content");
|
|
3613
3623
|
}, function (_a) {
|
|
@@ -3621,6 +3631,10 @@ var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __m
|
|
|
3621
3631
|
return theme.colors.blue.base;
|
|
3622
3632
|
case "green":
|
|
3623
3633
|
return theme.colors.green.base;
|
|
3634
|
+
case "darkGreen":
|
|
3635
|
+
return theme.colors.darkGreen.base;
|
|
3636
|
+
case "purple":
|
|
3637
|
+
return theme.colors.purple.base;
|
|
3624
3638
|
case "red":
|
|
3625
3639
|
return theme.colors.red.base;
|
|
3626
3640
|
case "white":
|
|
@@ -3634,6 +3648,10 @@ var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __m
|
|
|
3634
3648
|
return "inset 0 -3px 0 ".concat(theme.colors.blue.dark);
|
|
3635
3649
|
case "green":
|
|
3636
3650
|
return "inset 0 -3px 0 ".concat(theme.colors.green.dark);
|
|
3651
|
+
case "darkGreen":
|
|
3652
|
+
return "inset 0 -3px 0 ".concat(theme.colors.darkGreen.darker);
|
|
3653
|
+
case "purple":
|
|
3654
|
+
return "inset 0 -3px 0 ".concat(theme.colors.purple.darker);
|
|
3637
3655
|
case "red":
|
|
3638
3656
|
return "inset 0 -3px 0 ".concat(theme.colors.red.dark);
|
|
3639
3657
|
case "white":
|
|
@@ -3644,9 +3662,17 @@ var StyledButton = styled.button(templateObject_1$V || (templateObject_1$V = __m
|
|
|
3644
3662
|
return color === "white" ? "1px solid #e4e4e4" : "none";
|
|
3645
3663
|
}, function (_a) {
|
|
3646
3664
|
var color = _a.color;
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
:
|
|
3665
|
+
switch (color) {
|
|
3666
|
+
default:
|
|
3667
|
+
case "blue":
|
|
3668
|
+
case "red":
|
|
3669
|
+
case "darkGreen":
|
|
3670
|
+
return theme.colors.lightGray.light;
|
|
3671
|
+
case "green":
|
|
3672
|
+
return theme.colors.green.darker;
|
|
3673
|
+
case "white":
|
|
3674
|
+
return theme.colors.darkGray.light;
|
|
3675
|
+
}
|
|
3650
3676
|
}, theme.fonts.heading, function (_a) {
|
|
3651
3677
|
var size = _a.size;
|
|
3652
3678
|
return !size ? theme.button.medium.fontSize : theme.button[size].fontSize;
|
|
@@ -3726,7 +3752,13 @@ var Button$1 = forwardRef(function (_a, ref) {
|
|
|
3726
3752
|
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
3753
|
}
|
|
3728
3754
|
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({
|
|
3755
|
+
renderIcon({
|
|
3756
|
+
color: color === "white"
|
|
3757
|
+
? "gray"
|
|
3758
|
+
: color === "green"
|
|
3759
|
+
? "darkGreen"
|
|
3760
|
+
: "white",
|
|
3761
|
+
}), jsx$1("span", { children: label })] })) })));
|
|
3730
3762
|
});
|
|
3731
3763
|
|
|
3732
3764
|
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) {
|
|
@@ -3821,6 +3853,7 @@ exports.Color = void 0;
|
|
|
3821
3853
|
Color["YELLOW"] = "yellow";
|
|
3822
3854
|
Color["BLUE"] = "blue";
|
|
3823
3855
|
Color["GREEN"] = "green";
|
|
3856
|
+
Color["DARK_GREEN"] = "darkGreen";
|
|
3824
3857
|
Color["PURPLE"] = "purple";
|
|
3825
3858
|
Color["PINK"] = "pink";
|
|
3826
3859
|
Color["ORANGE"] = "orange";
|
|
@@ -4009,6 +4042,8 @@ exports.NotificationType = void 0;
|
|
|
4009
4042
|
(function (NotificationType) {
|
|
4010
4043
|
NotificationType["STUDENT_UPGRADE_REQUEST"] = "studentUpgradeRequest";
|
|
4011
4044
|
NotificationType["STUDENT_RESET_PASSWORD_REQUEST"] = "studentResetPasswordRequest";
|
|
4045
|
+
NotificationType["STUDENT_COMPLETED_CHAPTER"] = "studentCompletedChapter";
|
|
4046
|
+
NotificationType["STUDENT_EXAM_RESULT"] = "studentExamResult";
|
|
4012
4047
|
NotificationType["TUTOR_INVITE"] = "tutorInvite";
|
|
4013
4048
|
})(exports.NotificationType || (exports.NotificationType = {}));
|
|
4014
4049
|
|
|
@@ -4045,6 +4080,21 @@ exports.TextTopic = void 0;
|
|
|
4045
4080
|
|
|
4046
4081
|
}(TextTopic));
|
|
4047
4082
|
|
|
4083
|
+
var TutorEmailPreference = {};
|
|
4084
|
+
|
|
4085
|
+
(function (exports) {
|
|
4086
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4087
|
+
exports.TutorEmailPreference = void 0;
|
|
4088
|
+
(function (TutorEmailPreference) {
|
|
4089
|
+
TutorEmailPreference["STUDENT_UPGRADE_REQUEST"] = "studentUpgradeRequest";
|
|
4090
|
+
TutorEmailPreference["STUDENT_RESET_PASSWORD_REQUEST"] = "studentResetPasswordRequest";
|
|
4091
|
+
TutorEmailPreference["STUDENT_COMPLETED_CHAPTER"] = "studentCompletedChapter";
|
|
4092
|
+
TutorEmailPreference["STUDENT_EXAM_RESULT"] = "studentExamResult";
|
|
4093
|
+
TutorEmailPreference["CLASSROOM_INVITATION"] = "classroomInvitation";
|
|
4094
|
+
})(exports.TutorEmailPreference || (exports.TutorEmailPreference = {}));
|
|
4095
|
+
|
|
4096
|
+
}(TutorEmailPreference));
|
|
4097
|
+
|
|
4048
4098
|
(function (exports) {
|
|
4049
4099
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4050
4100
|
if (k2 === undefined) k2 = k;
|
|
@@ -4077,6 +4127,7 @@ __exportStar(NodeEnv, exports);
|
|
|
4077
4127
|
__exportStar(NotificationType, exports);
|
|
4078
4128
|
__exportStar(Plan, exports);
|
|
4079
4129
|
__exportStar(TextTopic, exports);
|
|
4130
|
+
__exportStar(TutorEmailPreference, exports);
|
|
4080
4131
|
|
|
4081
4132
|
}(enums));
|
|
4082
4133
|
|