@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
package/build/index.js
CHANGED
|
@@ -64,15 +64,21 @@ var theme = {
|
|
|
64
64
|
// darker: "#126994",
|
|
65
65
|
},
|
|
66
66
|
green: {
|
|
67
|
-
light: "#
|
|
68
|
-
base: "#
|
|
69
|
-
dark: "#
|
|
70
|
-
darker: "#
|
|
67
|
+
light: "#CBFF95",
|
|
68
|
+
base: "#89F625",
|
|
69
|
+
dark: "#4FB100",
|
|
70
|
+
darker: "#32690B",
|
|
71
71
|
// light: "#8BDCAE",
|
|
72
72
|
// base: "#3DC478",
|
|
73
73
|
// dark: "#319D60",
|
|
74
74
|
// darker: "#257648",
|
|
75
75
|
},
|
|
76
|
+
darkGreen: {
|
|
77
|
+
light: "#6AEBC0",
|
|
78
|
+
base: "#00906C",
|
|
79
|
+
dark: "#007C60",
|
|
80
|
+
darker: "#045041",
|
|
81
|
+
},
|
|
76
82
|
purple: {
|
|
77
83
|
light: "#9870ff",
|
|
78
84
|
base: "#6f0fff",
|
|
@@ -3541,6 +3547,8 @@ var Wrapper$a = styled__default["default"].div(templateObject_1$W || (templateOb
|
|
|
3541
3547
|
return theme.colors.blue.base;
|
|
3542
3548
|
case "green":
|
|
3543
3549
|
return theme.colors.green.base;
|
|
3550
|
+
case "darkGreen":
|
|
3551
|
+
return theme.colors.green.darker;
|
|
3544
3552
|
case "orange":
|
|
3545
3553
|
return theme.colors.orange.base;
|
|
3546
3554
|
case "red":
|
|
@@ -3569,6 +3577,8 @@ var Wrapper$a = styled__default["default"].div(templateObject_1$W || (templateOb
|
|
|
3569
3577
|
return theme.colors.blue.dark;
|
|
3570
3578
|
case "green":
|
|
3571
3579
|
return theme.colors.green.dark;
|
|
3580
|
+
case "darkGreen":
|
|
3581
|
+
return theme.colors.green.darker;
|
|
3572
3582
|
case "orange":
|
|
3573
3583
|
return theme.colors.orange.dark;
|
|
3574
3584
|
case "red":
|
|
@@ -3634,7 +3644,7 @@ var icons = {
|
|
|
3634
3644
|
};
|
|
3635
3645
|
var Icon = function (props) { return (jsxRuntime.jsx(Wrapper$a, __assign$2({}, props, { children: jsxRuntime.jsx("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
|
|
3636
3646
|
|
|
3637
|
-
var StyledButton = styled__default["default"].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:
|
|
3647
|
+
var StyledButton = styled__default["default"].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) {
|
|
3638
3648
|
var fluid = _a.fluid;
|
|
3639
3649
|
return (fluid ? "100%" : "fit-content");
|
|
3640
3650
|
}, function (_a) {
|
|
@@ -3648,6 +3658,10 @@ var StyledButton = styled__default["default"].button(templateObject_1$V || (temp
|
|
|
3648
3658
|
return theme.colors.blue.base;
|
|
3649
3659
|
case "green":
|
|
3650
3660
|
return theme.colors.green.base;
|
|
3661
|
+
case "darkGreen":
|
|
3662
|
+
return theme.colors.darkGreen.base;
|
|
3663
|
+
case "purple":
|
|
3664
|
+
return theme.colors.purple.base;
|
|
3651
3665
|
case "red":
|
|
3652
3666
|
return theme.colors.red.base;
|
|
3653
3667
|
case "white":
|
|
@@ -3661,6 +3675,10 @@ var StyledButton = styled__default["default"].button(templateObject_1$V || (temp
|
|
|
3661
3675
|
return "inset 0 -3px 0 ".concat(theme.colors.blue.dark);
|
|
3662
3676
|
case "green":
|
|
3663
3677
|
return "inset 0 -3px 0 ".concat(theme.colors.green.dark);
|
|
3678
|
+
case "darkGreen":
|
|
3679
|
+
return "inset 0 -3px 0 ".concat(theme.colors.darkGreen.darker);
|
|
3680
|
+
case "purple":
|
|
3681
|
+
return "inset 0 -3px 0 ".concat(theme.colors.purple.darker);
|
|
3664
3682
|
case "red":
|
|
3665
3683
|
return "inset 0 -3px 0 ".concat(theme.colors.red.dark);
|
|
3666
3684
|
case "white":
|
|
@@ -3671,9 +3689,17 @@ var StyledButton = styled__default["default"].button(templateObject_1$V || (temp
|
|
|
3671
3689
|
return color === "white" ? "1px solid #e4e4e4" : "none";
|
|
3672
3690
|
}, function (_a) {
|
|
3673
3691
|
var color = _a.color;
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
:
|
|
3692
|
+
switch (color) {
|
|
3693
|
+
default:
|
|
3694
|
+
case "blue":
|
|
3695
|
+
case "red":
|
|
3696
|
+
case "darkGreen":
|
|
3697
|
+
return theme.colors.lightGray.light;
|
|
3698
|
+
case "green":
|
|
3699
|
+
return theme.colors.green.darker;
|
|
3700
|
+
case "white":
|
|
3701
|
+
return theme.colors.darkGray.light;
|
|
3702
|
+
}
|
|
3677
3703
|
}, theme.fonts.heading, function (_a) {
|
|
3678
3704
|
var size = _a.size;
|
|
3679
3705
|
return !size ? theme.button.medium.fontSize : theme.button[size].fontSize;
|
|
@@ -3753,7 +3779,13 @@ var Button$1 = React$3.forwardRef(function (_a, ref) {
|
|
|
3753
3779
|
return (jsxRuntime.jsx(DisabledButton, __assign$2({ color: color, size: size, fluid: fluid, type: type, tabIndex: tabIndex, as: as, href: href, ref: ref ? ref : buttonRef }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && renderIcon({ color: "lightGray" }), jsxRuntime.jsx("span", { children: label })] }) })));
|
|
3754
3780
|
}
|
|
3755
3781
|
return (jsxRuntime.jsx(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 ? (jsxRuntime.jsx(Loader, { dark: color === "white" })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon &&
|
|
3756
|
-
renderIcon({
|
|
3782
|
+
renderIcon({
|
|
3783
|
+
color: color === "white"
|
|
3784
|
+
? "gray"
|
|
3785
|
+
: color === "green"
|
|
3786
|
+
? "darkGreen"
|
|
3787
|
+
: "white",
|
|
3788
|
+
}), jsxRuntime.jsx("span", { children: label })] })) })));
|
|
3757
3789
|
});
|
|
3758
3790
|
|
|
3759
3791
|
var StyledCheckbox = styled__default["default"].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) {
|
|
@@ -3848,6 +3880,7 @@ exports.Color = void 0;
|
|
|
3848
3880
|
Color["YELLOW"] = "yellow";
|
|
3849
3881
|
Color["BLUE"] = "blue";
|
|
3850
3882
|
Color["GREEN"] = "green";
|
|
3883
|
+
Color["DARK_GREEN"] = "darkGreen";
|
|
3851
3884
|
Color["PURPLE"] = "purple";
|
|
3852
3885
|
Color["PINK"] = "pink";
|
|
3853
3886
|
Color["ORANGE"] = "orange";
|
|
@@ -4036,6 +4069,8 @@ exports.NotificationType = void 0;
|
|
|
4036
4069
|
(function (NotificationType) {
|
|
4037
4070
|
NotificationType["STUDENT_UPGRADE_REQUEST"] = "studentUpgradeRequest";
|
|
4038
4071
|
NotificationType["STUDENT_RESET_PASSWORD_REQUEST"] = "studentResetPasswordRequest";
|
|
4072
|
+
NotificationType["STUDENT_COMPLETED_CHAPTER"] = "studentCompletedChapter";
|
|
4073
|
+
NotificationType["STUDENT_EXAM_RESULT"] = "studentExamResult";
|
|
4039
4074
|
NotificationType["TUTOR_INVITE"] = "tutorInvite";
|
|
4040
4075
|
})(exports.NotificationType || (exports.NotificationType = {}));
|
|
4041
4076
|
|
|
@@ -4072,6 +4107,21 @@ exports.TextTopic = void 0;
|
|
|
4072
4107
|
|
|
4073
4108
|
}(TextTopic));
|
|
4074
4109
|
|
|
4110
|
+
var TutorEmailPreference = {};
|
|
4111
|
+
|
|
4112
|
+
(function (exports) {
|
|
4113
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4114
|
+
exports.TutorEmailPreference = void 0;
|
|
4115
|
+
(function (TutorEmailPreference) {
|
|
4116
|
+
TutorEmailPreference["STUDENT_UPGRADE_REQUEST"] = "studentUpgradeRequest";
|
|
4117
|
+
TutorEmailPreference["STUDENT_RESET_PASSWORD_REQUEST"] = "studentResetPasswordRequest";
|
|
4118
|
+
TutorEmailPreference["STUDENT_COMPLETED_CHAPTER"] = "studentCompletedChapter";
|
|
4119
|
+
TutorEmailPreference["STUDENT_EXAM_RESULT"] = "studentExamResult";
|
|
4120
|
+
TutorEmailPreference["CLASSROOM_INVITATION"] = "classroomInvitation";
|
|
4121
|
+
})(exports.TutorEmailPreference || (exports.TutorEmailPreference = {}));
|
|
4122
|
+
|
|
4123
|
+
}(TutorEmailPreference));
|
|
4124
|
+
|
|
4075
4125
|
(function (exports) {
|
|
4076
4126
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4077
4127
|
if (k2 === undefined) k2 = k;
|
|
@@ -4104,6 +4154,7 @@ __exportStar(NodeEnv, exports);
|
|
|
4104
4154
|
__exportStar(NotificationType, exports);
|
|
4105
4155
|
__exportStar(Plan, exports);
|
|
4106
4156
|
__exportStar(TextTopic, exports);
|
|
4157
|
+
__exportStar(TutorEmailPreference, exports);
|
|
4107
4158
|
|
|
4108
4159
|
}(enums));
|
|
4109
4160
|
|