oolib 2.11.1 → 2.11.2
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/components/Buttons/index.styled.js +42 -42
- package/dist/components/Loader/index.styled.js +2 -2
- package/dist/components/OKELink/utils/index.js +2 -2
- package/dist/components/Section/index.styled.js +2 -2
- package/dist/components/TabBar/index.styled.js +2 -2
- package/dist/components/Tags/index.styled.js +15 -15
- package/dist/components/ToggleButton/styled.js +8 -8
- package/dist/components/UserRoleBadge/index.d.ts +2 -2
- package/dist/components/UserRoleBadge/index.js +2 -2
- package/dist/themes/typo.js +27 -27
- package/dist/utilsOolib/index.d.ts +4 -4
- package/dist/utilsOolib/index.js +10 -10
- package/package.json +1 -1
|
@@ -20,10 +20,10 @@ var SIZES = {
|
|
|
20
20
|
M: "4rem",
|
|
21
21
|
};
|
|
22
22
|
var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: none; // $none;\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n"], ["\n border: none; // $none;\n background-color: ", ";\n color: ", ";\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n"])), function (_a) {
|
|
23
|
-
var invert = _a.invert,
|
|
23
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
24
24
|
return invert
|
|
25
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
26
|
-
: (0, utilsOolib_1.getPrimaryColor100)(
|
|
25
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
26
|
+
: (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
27
27
|
}, function (_a) {
|
|
28
28
|
var invert = _a.invert;
|
|
29
29
|
return invert ? greyColor100 : white;
|
|
@@ -37,43 +37,43 @@ var ButtonPrimary = (0, styled_components_2.css)(templateObject_3 || (templateOb
|
|
|
37
37
|
return invert ? greyColor70 : greyColor15;
|
|
38
38
|
}, greyColor40);
|
|
39
39
|
}, function (_a) {
|
|
40
|
-
var invert = _a.invert,
|
|
40
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
41
41
|
return invert
|
|
42
|
-
? (0, utilsOolib_1.getPrimaryColor10)(
|
|
43
|
-
: (0, utilsOolib_1.getPrimaryColor40)(
|
|
42
|
+
? (0, utilsOolib_1.getPrimaryColor10)(colors)
|
|
43
|
+
: (0, utilsOolib_1.getPrimaryColor40)(colors);
|
|
44
44
|
}, function (_a) {
|
|
45
|
-
var invert = _a.invert,
|
|
45
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
46
46
|
return invert
|
|
47
47
|
? greyColor100
|
|
48
|
-
: (0, utilsOolib_1.getPrimaryColorText)(
|
|
48
|
+
: (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
49
49
|
});
|
|
50
50
|
var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n background-color: ", ";\n\n color: ", "; \n ", "\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", "; \n }\n"], ["\n border: 2px solid\n ", ";\n background-color: ", ";\n\n color: ", "; \n ", "\n ", "\n ", "\n &:hover {\n background-color: ", ";\n color: ", "; \n }\n"])), function (_a) {
|
|
51
|
-
var invert = _a.invert,
|
|
51
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
52
52
|
return invert
|
|
53
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
54
|
-
: (0, utilsOolib_1.getPrimaryColor100)(
|
|
53
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
54
|
+
: (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
55
55
|
}, function (_a) {
|
|
56
56
|
var invert = _a.invert;
|
|
57
57
|
return invert ? greyColor100 : white;
|
|
58
58
|
}, function (_a) {
|
|
59
|
-
var invert = _a.invert,
|
|
59
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
60
60
|
return invert
|
|
61
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
62
|
-
: (0, utilsOolib_1.getPrimaryColorText)(
|
|
61
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
62
|
+
: (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
63
63
|
}, function (_a) {
|
|
64
64
|
var color = _a.color;
|
|
65
65
|
return color && (0, styled_components_2.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
|
|
66
66
|
}, function (_a) {
|
|
67
67
|
var active = _a.active;
|
|
68
68
|
return active && (0, styled_components_2.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), function (_a) {
|
|
69
|
-
var invert = _a.invert,
|
|
69
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
70
70
|
return invert ?
|
|
71
|
-
(0, utilsOolib_1.getPrimaryColor40)(
|
|
71
|
+
(0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
72
72
|
:
|
|
73
|
-
(0, utilsOolib_1.getPrimaryColor10)(
|
|
73
|
+
(0, utilsOolib_1.getPrimaryColor10)(colors);
|
|
74
74
|
}, function (_a) {
|
|
75
|
-
var
|
|
76
|
-
return (0, utilsOolib_1.getPrimaryColorText)(
|
|
75
|
+
var colors = _a.theme.colors;
|
|
76
|
+
return (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
77
77
|
});
|
|
78
78
|
}, function (_a) {
|
|
79
79
|
var disabled = _a.disabled;
|
|
@@ -82,34 +82,34 @@ var ButtonSecondary = (0, styled_components_2.css)(templateObject_7 || (template
|
|
|
82
82
|
return invert ? greyColor80 : white;
|
|
83
83
|
}, greyColor15, greyColor40);
|
|
84
84
|
}, function (_a) {
|
|
85
|
-
var invert = _a.invert, active = _a.active,
|
|
85
|
+
var invert = _a.invert, active = _a.active, colors = _a.theme.colors;
|
|
86
86
|
return active
|
|
87
87
|
? ""
|
|
88
88
|
: invert
|
|
89
|
-
? (0, utilsOolib_1.getPrimaryColor10)(
|
|
90
|
-
: (0, utilsOolib_1.getPrimaryColor40)(
|
|
89
|
+
? (0, utilsOolib_1.getPrimaryColor10)(colors)
|
|
90
|
+
: (0, utilsOolib_1.getPrimaryColor40)(colors);
|
|
91
91
|
}, function (_a) {
|
|
92
|
-
var
|
|
93
|
-
return (0, utilsOolib_1.getPrimaryColorText)(
|
|
92
|
+
var colors = _a.theme.colors;
|
|
93
|
+
return (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
94
94
|
});
|
|
95
95
|
var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", "\n };\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n border: 2px solid\n ", ";\n box-shadow: -4px 4px 1px\n ", "\n };\n background-color: ", ";\n\n color: ", ";\n\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
96
|
-
var invert = _a.invert,
|
|
96
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
97
97
|
return invert
|
|
98
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
99
|
-
: (0, utilsOolib_1.getPrimaryColor100)(
|
|
98
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
99
|
+
: (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
100
100
|
}, function (_a) {
|
|
101
|
-
var invert = _a.invert,
|
|
101
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
102
102
|
return invert
|
|
103
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
104
|
-
: (0, utilsOolib_1.getPrimaryColor100)(
|
|
103
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
104
|
+
: (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
105
105
|
}, function (_a) {
|
|
106
106
|
var invert = _a.invert;
|
|
107
107
|
return invert ? greyColor100 : white;
|
|
108
108
|
}, function (_a) {
|
|
109
|
-
var invert = _a.invert,
|
|
109
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
110
110
|
return invert
|
|
111
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
112
|
-
: (0, utilsOolib_1.getPrimaryColorText)(
|
|
111
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
112
|
+
: (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
113
113
|
}, function (_a) {
|
|
114
114
|
var color = _a.color;
|
|
115
115
|
return color && (0, styled_components_2.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), color);
|
|
@@ -123,21 +123,21 @@ var ButtonCustom = (0, styled_components_2.css)(templateObject_10 || (templateOb
|
|
|
123
123
|
return invert ? greyColor80 : white;
|
|
124
124
|
});
|
|
125
125
|
}, function (_a) {
|
|
126
|
-
var invert = _a.invert,
|
|
126
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
127
127
|
return invert
|
|
128
128
|
? greyColor80
|
|
129
|
-
: (0, utilsOolib_1.getPrimaryColor40)(
|
|
129
|
+
: (0, utilsOolib_1.getPrimaryColor40)(colors);
|
|
130
130
|
});
|
|
131
131
|
var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", "; //$white;\n color: ", ";\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"], ["\n background-color: ", "; //$white;\n color: ", ";\n ", "\n ", "\n\n ", "\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
132
|
-
var active = _a.active,
|
|
133
|
-
return active ? (0, utilsOolib_1.getPrimaryColor40)(
|
|
132
|
+
var active = _a.active, colors = _a.theme.colors;
|
|
133
|
+
return active ? (0, utilsOolib_1.getPrimaryColor40)(colors) : "inherit";
|
|
134
134
|
}, function (_a) {
|
|
135
|
-
var invert = _a.invert, composition = _a.composition,
|
|
135
|
+
var invert = _a.invert, composition = _a.composition, colors = _a.theme.colors;
|
|
136
136
|
return invert
|
|
137
|
-
? (0, utilsOolib_1.getPrimaryColor40)(
|
|
137
|
+
? (0, utilsOolib_1.getPrimaryColor40)(colors)
|
|
138
138
|
: composition === "iconOnly"
|
|
139
139
|
? greyColor100
|
|
140
|
-
: (0, utilsOolib_1.getPrimaryColorText)(
|
|
140
|
+
: (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
141
141
|
}, function (_a) {
|
|
142
142
|
var color = _a.color;
|
|
143
143
|
return color && (0, styled_components_2.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), color);
|
|
@@ -151,12 +151,12 @@ var ButtonGhost = (0, styled_components_2.css)(templateObject_14 || (templateObj
|
|
|
151
151
|
var disabled = _a.disabled;
|
|
152
152
|
return disabled && (0, styled_components_2.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n color: ", "; //$greyColor40;\n pointer-events: none;\n "], ["\n color: ", "; //$greyColor40;\n pointer-events: none;\n "])), greyColor40);
|
|
153
153
|
}, function (_a) {
|
|
154
|
-
var invert = _a.invert, active = _a.active,
|
|
154
|
+
var invert = _a.invert, active = _a.active, colors = _a.theme.colors;
|
|
155
155
|
return active
|
|
156
156
|
? ""
|
|
157
157
|
: invert
|
|
158
158
|
? greyColor70
|
|
159
|
-
: (0, utilsOolib_1.getPrimaryColor10)(
|
|
159
|
+
: (0, utilsOolib_1.getPrimaryColor10)(colors);
|
|
160
160
|
});
|
|
161
161
|
var GoogleButton = (0, styled_components_2.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n color: #4285f4;\n border: 2px solid #4285f4;\n background-color: ", ";\n ", "\n"], ["\n color: #4285f4;\n border: 2px solid #4285f4;\n background-color: ", ";\n ", "\n"])), white, function (_a) {
|
|
162
162
|
var disabled = _a.disabled;
|
|
@@ -30,10 +30,10 @@ var utilsOolib_1 = require("../../utilsOolib");
|
|
|
30
30
|
var greyColor10 = colors_1.colors.greyColor10, greyColor70 = colors_1.colors.greyColor70, greyColor100 = colors_1.colors.greyColor100, white = colors_1.colors.white;
|
|
31
31
|
var spin = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"], ["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"])));
|
|
32
32
|
var StyledLoader = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-block;\n animation: ", " 1.2s linear infinite;\n border-radius: 50%;\n ", "\n"], ["\n display: inline-block;\n animation: ", " 1.2s linear infinite;\n border-radius: 50%;\n ", "\n"])), spin, function (_a) {
|
|
33
|
-
var M = _a.M, L = _a.L, invert = _a.invert,
|
|
33
|
+
var M = _a.M, L = _a.L, invert = _a.invert, colors = _a.theme.colors;
|
|
34
34
|
var size = M ? 10 : L ? 15 : 3;
|
|
35
35
|
var trackSize = size === 30 ? size / 5 : size / 7;
|
|
36
|
-
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", ";\n "], ["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", ";\n "])), size, size, trackSize, invert ? greyColor70 : greyColor10, invert ? white : (0, utilsOolib_1.getPrimaryColor100)(
|
|
36
|
+
return (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", ";\n "], ["\n width: ", "rem;\n height: ", "rem;\n border-style: solid;\n border-width: ", "rem;\n border-color: ", ";\n border-top-color: ", ";\n "])), size, size, trackSize, invert ? greyColor70 : greyColor10, invert ? white : (0, utilsOolib_1.getPrimaryColor100)(colors));
|
|
37
37
|
});
|
|
38
38
|
exports.StyledLoader = StyledLoader;
|
|
39
39
|
var StyledLoaderWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n text-align: center;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 1rem;\n\n ", ";\n"], ["\n text-align: center;\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 1rem;\n\n ", ";\n"])), function (_a) {
|
|
@@ -12,9 +12,9 @@ var setLinkColor = function (_a) {
|
|
|
12
12
|
case !!color:
|
|
13
13
|
return color;
|
|
14
14
|
case invert:
|
|
15
|
-
return (0, utilsOolib_1.getPrimaryColor40)(theme.
|
|
15
|
+
return (0, utilsOolib_1.getPrimaryColor40)(theme.colors);
|
|
16
16
|
default:
|
|
17
|
-
return (0, utilsOolib_1.getPrimaryColorText)(theme.
|
|
17
|
+
return (0, utilsOolib_1.getPrimaryColorText)(theme.colors);
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
exports.setLinkColor = setLinkColor;
|
|
@@ -40,8 +40,8 @@ var setBorder = function (_a) {
|
|
|
40
40
|
var setFill = function (_a) {
|
|
41
41
|
var _b;
|
|
42
42
|
var props = _a.props;
|
|
43
|
-
var colorsObj = ((_b = props.theme) === null || _b === void 0 ? void 0 : _b.
|
|
44
|
-
? __assign(__assign({}, colors_1.colors), props.theme.
|
|
43
|
+
var colorsObj = ((_b = props.theme) === null || _b === void 0 ? void 0 : _b.colors)
|
|
44
|
+
? __assign(__assign({}, colors_1.colors), props.theme.colors) : colors_1.colors;
|
|
45
45
|
var colorKey = Object.keys(props).find(function (p) { return !!colorsObj[p]; });
|
|
46
46
|
return colorKey ? "background-color: ".concat(colorsObj[colorKey], ";") : '';
|
|
47
47
|
};
|
|
@@ -32,8 +32,8 @@ var greyColor100 = themes_1.colors.greyColor100, greyColor10 = themes_1.colors.g
|
|
|
32
32
|
var tabBarWrapperStyle1 = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n :hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"], ["\n ", "\n :hover {\n background-color: ", ";\n }\n\n ", "\n\n ", "\n"])), (0, mixins_1.transition)("background-color"), greyColor5, function (_a) {
|
|
33
33
|
var active = _a.active;
|
|
34
34
|
return active && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n background-color: ", ";\n ::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: ", ";\n }\n "], ["\n position: relative;\n background-color: ", ";\n ::after {\n content: \"\";\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 3px;\n background-color: ", ";\n }\n "])), greyColor5, function (_a) {
|
|
35
|
-
var
|
|
36
|
-
return (0, utilsOolib_1.getPrimaryColor100)(
|
|
35
|
+
var colors = _a.theme.colors;
|
|
36
|
+
return (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
37
37
|
});
|
|
38
38
|
}, function (_a) {
|
|
39
39
|
var error = _a.error;
|
|
@@ -67,19 +67,19 @@ var StyledTagClear = styled_components_1.default.div(templateObject_11 || (templ
|
|
|
67
67
|
var size = _a.size;
|
|
68
68
|
return commonStyle({ size: size });
|
|
69
69
|
}, function (_a) {
|
|
70
|
-
var variant = _a.variant, size = _a.size, invert = _a.invert, grey = _a.grey,
|
|
70
|
+
var variant = _a.variant, size = _a.size, invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
|
|
71
71
|
if (variant === "primary") {
|
|
72
72
|
return grey
|
|
73
73
|
? (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15) : (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n "], ["\n background-color: ", ";\n color: ", ";\n "])), !invert
|
|
74
|
-
? (0, utilsOolib_1.getPrimaryColor100)(
|
|
75
|
-
: (0, utilsOolib_1.getPrimaryColor40)(
|
|
74
|
+
? (0, utilsOolib_1.getPrimaryColor100)(colors)
|
|
75
|
+
: (0, utilsOolib_1.getPrimaryColor40)(colors), !invert ? white : greyColor100);
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
78
|
// secondry
|
|
79
79
|
return grey
|
|
80
|
-
? (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: none;\n border: ", " solid ", ";\n color: ", ";\n "], ["\n background: none;\n border: ", " solid ", ";\n color: ", ";\n "])), size === "XS" ? "1px" : "2px", !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15) : (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background: none;\n border: ", " solid\n ", ";\n color: ", ";\n "], ["\n background: none;\n border: ", " solid\n ", ";\n color: ", ";\n "])), size === "XS" ? "1px" : "2px", !invert ? (0, utilsOolib_1.getPrimaryColor100)(
|
|
81
|
-
? (0, utilsOolib_1.getPrimaryColorText)(
|
|
82
|
-
: (0, utilsOolib_1.getPrimaryColor40)(
|
|
80
|
+
? (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: none;\n border: ", " solid ", ";\n color: ", ";\n "], ["\n background: none;\n border: ", " solid ", ";\n color: ", ";\n "])), size === "XS" ? "1px" : "2px", !invert ? greyColor15 : greyColor80, !invert ? greyColor80 : greyColor15) : (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background: none;\n border: ", " solid\n ", ";\n color: ", ";\n "], ["\n background: none;\n border: ", " solid\n ", ";\n color: ", ";\n "])), size === "XS" ? "1px" : "2px", !invert ? (0, utilsOolib_1.getPrimaryColor100)(colors) : (0, utilsOolib_1.getPrimaryColor40)(colors), !invert
|
|
81
|
+
? (0, utilsOolib_1.getPrimaryColorText)(colors)
|
|
82
|
+
: (0, utilsOolib_1.getPrimaryColor40)(colors));
|
|
83
83
|
}
|
|
84
84
|
}, function (_a) {
|
|
85
85
|
var variant = _a.variant;
|
|
@@ -87,30 +87,30 @@ var StyledTagClear = styled_components_1.default.div(templateObject_11 || (templ
|
|
|
87
87
|
});
|
|
88
88
|
exports.StyledTagClear = StyledTagClear;
|
|
89
89
|
var StyledTagClearIconWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n \tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n \theight: 100%;\n\tpadding-right: 0.75rem;\n\tpadding-left: 0.75rem;\n\t", ";\n\t", "\n"], ["\n \tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n \theight: 100%;\n\tpadding-right: 0.75rem;\n\tpadding-left: 0.75rem;\n\t", ";\n\t", "\n"])), (0, mixins_1.multiTransition)('color', 'background-color'), function (_a) {
|
|
90
|
-
var invert = _a.invert, grey = _a.grey,
|
|
90
|
+
var invert = _a.invert, grey = _a.grey, colors = _a.theme.colors;
|
|
91
91
|
return grey
|
|
92
|
-
? greyHover({ invert: invert,
|
|
93
|
-
: blueHover({ invert: invert,
|
|
92
|
+
? greyHover({ invert: invert, colors: colors })
|
|
93
|
+
: blueHover({ invert: invert, colors: colors });
|
|
94
94
|
});
|
|
95
95
|
exports.StyledTagClearIconWrapper = StyledTagClearIconWrapper;
|
|
96
96
|
var StyledTagSelect = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n ", "\n\n\t", "\n \n"], ["\n ", "\n ", "\n\n\t", "\n \n"])), function (_a) {
|
|
97
97
|
var size = _a.size;
|
|
98
98
|
return commonStyle({ size: size });
|
|
99
99
|
}, (0, mixins_1.multiTransition)("background-color"), function (_a) {
|
|
100
|
-
var selected = _a.selected, size = _a.size,
|
|
101
|
-
return (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n border: ", " solid ", ";\n cursor: pointer;\n background-color: ", ";\n\tcolor: ", ";\n\t\t", "\n "], ["\n border: ", " solid ", ";\n cursor: pointer;\n background-color: ", ";\n\tcolor: ", ";\n\t\t", "\n "])), size === "XS" ? "1px" : "2px", (0, utilsOolib_1.getPrimaryColor100)(
|
|
100
|
+
var selected = _a.selected, size = _a.size, colors = _a.theme.colors;
|
|
101
|
+
return (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n border: ", " solid ", ";\n cursor: pointer;\n background-color: ", ";\n\tcolor: ", ";\n\t\t", "\n "], ["\n border: ", " solid ", ";\n cursor: pointer;\n background-color: ", ";\n\tcolor: ", ";\n\t\t", "\n "])), size === "XS" ? "1px" : "2px", (0, utilsOolib_1.getPrimaryColor100)(colors), selected ? (0, utilsOolib_1.getPrimaryColor100)(colors) : null, !selected ? (0, utilsOolib_1.getPrimaryColorText)(colors) : white, !selected && (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["&:hover {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\t\t\n\t\t}"], ["&:hover {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\t\t\n\t\t}"])), (0, utilsOolib_1.getPrimaryColor40)(colors), (0, utilsOolib_1.getPrimaryColorText)(colors)));
|
|
102
102
|
});
|
|
103
103
|
exports.StyledTagSelect = StyledTagSelect;
|
|
104
104
|
var StyledTagLink = styled_components_1.default.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n \t", "\n\t", ";\n ", "\n"], ["\n \t", "\n\t", ";\n ", "\n"])), function (_a) {
|
|
105
105
|
var size = _a.size;
|
|
106
106
|
return commonStyle({ size: size });
|
|
107
107
|
}, (0, mixins_1.multiTransition)("background-color", "color"), function (_a) {
|
|
108
|
-
var variant = _a.variant, invert = _a.invert, size = _a.size,
|
|
108
|
+
var variant = _a.variant, invert = _a.invert, size = _a.size, colors = _a.theme.colors;
|
|
109
109
|
return variant === "primary"
|
|
110
110
|
? (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n \t\tbackground-color: ", ";\n \t\tcolor: ", ";\n\t\t\t\t", ";\n \t"], ["\n \t\tbackground-color: ", ";\n \t\tcolor: ", ";\n\t\t\t\t", ";\n \t"])), !invert
|
|
111
|
-
? (0, utilsOolib_1.getPrimaryColor100)(
|
|
112
|
-
: (0, utilsOolib_1.getPrimaryColor40)(
|
|
113
|
-
(0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n \t\tbackground: none;\n \t\tborder: ", " solid ", ";\n \t\tcolor: ", ";\n\t\t\t\t", "\n \t"], ["\n \t\tbackground: none;\n \t\tborder: ", " solid ", ";\n \t\tcolor: ", ";\n\t\t\t\t", "\n \t"])), size === "XS" ? "1px" : "2px", !invert ? (0, utilsOolib_1.getPrimaryColor100)(
|
|
111
|
+
? (0, utilsOolib_1.getPrimaryColor100)(colors)
|
|
112
|
+
: (0, utilsOolib_1.getPrimaryColor40)(colors), !invert ? white : greyColor100, blueHover({ invert: invert, colors: colors })) : // secondary
|
|
113
|
+
(0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n \t\tbackground: none;\n \t\tborder: ", " solid ", ";\n \t\tcolor: ", ";\n\t\t\t\t", "\n \t"], ["\n \t\tbackground: none;\n \t\tborder: ", " solid ", ";\n \t\tcolor: ", ";\n\t\t\t\t", "\n \t"])), size === "XS" ? "1px" : "2px", !invert ? (0, utilsOolib_1.getPrimaryColor100)(colors) : (0, utilsOolib_1.getPrimaryColor40)(colors), !invert ? (0, utilsOolib_1.getPrimaryColorText)(colors) : (0, utilsOolib_1.getPrimaryColor40)(colors), blueHover({ invert: invert, colors: colors }));
|
|
114
114
|
});
|
|
115
115
|
exports.StyledTagLink = StyledTagLink;
|
|
116
116
|
var StyledLink = (0, styled_components_1.default)(react_router_dom_1.NavLink)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n text-decoration: none;\n"], ["\n text-decoration: none;\n"])));
|
|
@@ -21,15 +21,15 @@ exports.StyledButtonSlider = styled_components_1.default.div(templateObject_2 ||
|
|
|
21
21
|
var disabled = _a.disabled;
|
|
22
22
|
return disabled ? 'not-allowed' : 'pointer';
|
|
23
23
|
}, function (_a) {
|
|
24
|
-
var
|
|
24
|
+
var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled;
|
|
25
25
|
if (disabled)
|
|
26
26
|
return greyColor10;
|
|
27
27
|
if (inactive)
|
|
28
|
-
return (0, utilsOolib_1.getPrimaryColor40)(
|
|
29
|
-
return (0, utilsOolib_1.getPrimaryColor100)(
|
|
28
|
+
return (0, utilsOolib_1.getPrimaryColor40)(colors);
|
|
29
|
+
return (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
30
30
|
}, function (_a) {
|
|
31
|
-
var
|
|
32
|
-
return disabled ? greyColor10 : (0, utilsOolib_1.getPrimaryColorText)(
|
|
31
|
+
var colors = _a.theme.colors, disabled = _a.disabled;
|
|
32
|
+
return disabled ? greyColor10 : (0, utilsOolib_1.getPrimaryColorText)(colors);
|
|
33
33
|
}, (0, mixins_1.transition)('background-color'));
|
|
34
34
|
exports.StyledToggleButton = styled_components_1.default.button(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 2rem;\n height: 2rem;\n background-color: ", ";\n outline: none;\n border-radius: ", ";\n cursor: ", ";\n border: 2px solid ", ";\n\n position: absolute;\n top: 0;\n left: ", ";\n ", "\n"], ["\n width: 2rem;\n height: 2rem;\n background-color: ", ";\n outline: none;\n border-radius: ", ";\n cursor: ", ";\n border: 2px solid ", ";\n\n position: absolute;\n top: 0;\n left: ", ";\n ", "\n"])), white, function (_a) {
|
|
35
35
|
var square = _a.square;
|
|
@@ -38,12 +38,12 @@ exports.StyledToggleButton = styled_components_1.default.button(templateObject_3
|
|
|
38
38
|
var disabled = _a.disabled;
|
|
39
39
|
return disabled ? 'not-allowed' : 'pointer';
|
|
40
40
|
}, function (_a) {
|
|
41
|
-
var
|
|
41
|
+
var colors = _a.theme.colors, inactive = _a.inactive, disabled = _a.disabled;
|
|
42
42
|
if (disabled)
|
|
43
43
|
return greyColor10;
|
|
44
44
|
if (inactive)
|
|
45
|
-
return (0, utilsOolib_1.getPrimaryColor40)(
|
|
46
|
-
return (0, utilsOolib_1.getPrimaryColor100)(
|
|
45
|
+
return (0, utilsOolib_1.getPrimaryColor40)(colors);
|
|
46
|
+
return (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
47
47
|
}, function (_a) {
|
|
48
48
|
var direction = _a.direction;
|
|
49
49
|
return direction === 'left' ? '0' : 'calc(100% - 2rem)';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export function UserRoleBadge({ role, value, className, theme: {
|
|
1
|
+
export function UserRoleBadge({ role, value, className, theme: { Roles } }: {
|
|
2
2
|
role: any;
|
|
3
3
|
value: any;
|
|
4
4
|
className: any;
|
|
5
5
|
theme: {
|
|
6
|
-
|
|
6
|
+
Roles: any;
|
|
7
7
|
};
|
|
8
8
|
}): JSX.Element;
|
|
@@ -9,14 +9,14 @@ var icons_1 = require("../../icons");
|
|
|
9
9
|
var BadgeAdmin = icons_1.icons.BadgeAdmin, BadgeSuperAdmin = icons_1.icons.BadgeSuperAdmin, BadgeMod = icons_1.icons.BadgeMod, BadgeVetted = icons_1.icons.BadgeVetted;
|
|
10
10
|
var UserRoleBadge = function (_a) {
|
|
11
11
|
var _b;
|
|
12
|
-
var role = _a.role, value = _a.value, className = _a.className,
|
|
12
|
+
var role = _a.role, value = _a.value, className = _a.className, Roles = _a.theme.Roles;
|
|
13
13
|
var badges = {
|
|
14
14
|
BadgeSuperAdmin: BadgeSuperAdmin,
|
|
15
15
|
BadgeAdmin: BadgeAdmin,
|
|
16
16
|
BadgeMod: BadgeMod,
|
|
17
17
|
BadgeVetted: BadgeVetted
|
|
18
18
|
};
|
|
19
|
-
var iconName = (_b =
|
|
19
|
+
var iconName = (_b = Roles[value || role]) === null || _b === void 0 ? void 0 : _b.badgeIcon;
|
|
20
20
|
var Icon = iconName && badges[iconName];
|
|
21
21
|
return (Icon ?
|
|
22
22
|
react_1.default.createElement("div", { className: className },
|
package/dist/themes/typo.js
CHANGED
|
@@ -41,7 +41,7 @@ var fontCss = (0, styled_components_1.css)(templateObject_3 || (templateObject_3
|
|
|
41
41
|
});
|
|
42
42
|
var SANS_0 = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n"])), function (_a) {
|
|
43
43
|
var theme = _a.theme;
|
|
44
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
44
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
45
45
|
case 'hi':
|
|
46
46
|
return "".concat(msW(2), "px");
|
|
47
47
|
default:
|
|
@@ -50,7 +50,7 @@ var SANS_0 = (0, styled_components_1.css)(templateObject_4 || (templateObject_4
|
|
|
50
50
|
}, sansSerif, fontCss);
|
|
51
51
|
var SANS_2 = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.7em;\n ", "\n ", "\n"], ["\n font-size: ", ";\n line-height: 1.7em;\n ", "\n ", "\n"])), function (_a) {
|
|
52
52
|
var theme = _a.theme;
|
|
53
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
53
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
54
54
|
case 'hi':
|
|
55
55
|
return "".concat(msW(3), "px");
|
|
56
56
|
default:
|
|
@@ -59,7 +59,7 @@ var SANS_2 = (0, styled_components_1.css)(templateObject_5 || (templateObject_5
|
|
|
59
59
|
}, fontCss, sansSerif);
|
|
60
60
|
var SANS_3 = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.5em;\n ", "\n ", "\n"], ["\n font-size: ", ";\n line-height: 1.5em;\n ", "\n ", "\n"])), function (_a) {
|
|
61
61
|
var theme = _a.theme;
|
|
62
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
62
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
63
63
|
case 'hi':
|
|
64
64
|
return "".concat(msW(4), "px");
|
|
65
65
|
default:
|
|
@@ -68,7 +68,7 @@ var SANS_3 = (0, styled_components_1.css)(templateObject_6 || (templateObject_6
|
|
|
68
68
|
}, fontCss, sansSerif);
|
|
69
69
|
var SANS_4 = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n"])), function (_a) {
|
|
70
70
|
var theme = _a.theme;
|
|
71
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
71
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
72
72
|
case 'hi':
|
|
73
73
|
return "".concat(msW(5), "px");
|
|
74
74
|
default:
|
|
@@ -77,7 +77,7 @@ var SANS_4 = (0, styled_components_1.css)(templateObject_7 || (templateObject_7
|
|
|
77
77
|
}, fontCss, sansSerif);
|
|
78
78
|
var SANS_4_5 = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
79
79
|
var theme = _a.theme;
|
|
80
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
80
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
81
81
|
case 'hi':
|
|
82
82
|
return "".concat(msW(5), "px");
|
|
83
83
|
default:
|
|
@@ -85,7 +85,7 @@ var SANS_4_5 = (0, styled_components_1.css)(templateObject_8 || (templateObject_
|
|
|
85
85
|
}
|
|
86
86
|
}, fontCss, sansSerif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
87
87
|
var theme = _a.theme;
|
|
88
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
88
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
89
89
|
case 'hi':
|
|
90
90
|
return "".concat(msW(6), "px");
|
|
91
91
|
default:
|
|
@@ -94,7 +94,7 @@ var SANS_4_5 = (0, styled_components_1.css)(templateObject_8 || (templateObject_
|
|
|
94
94
|
});
|
|
95
95
|
var SANS_5_6 = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
96
96
|
var theme = _a.theme;
|
|
97
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
97
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
98
98
|
case 'hi':
|
|
99
99
|
return "".concat(msW(6), "px");
|
|
100
100
|
default:
|
|
@@ -102,7 +102,7 @@ var SANS_5_6 = (0, styled_components_1.css)(templateObject_9 || (templateObject_
|
|
|
102
102
|
}
|
|
103
103
|
}, fontCss, sansSerif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
104
104
|
var theme = _a.theme;
|
|
105
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
105
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
106
106
|
case 'hi':
|
|
107
107
|
return "".concat(msW(7), "px");
|
|
108
108
|
default:
|
|
@@ -111,7 +111,7 @@ var SANS_5_6 = (0, styled_components_1.css)(templateObject_9 || (templateObject_
|
|
|
111
111
|
});
|
|
112
112
|
var SANS_7_8 = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
113
113
|
var theme = _a.theme;
|
|
114
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
114
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
115
115
|
case 'hi':
|
|
116
116
|
return "".concat(msW(8), "px");
|
|
117
117
|
default:
|
|
@@ -119,7 +119,7 @@ var SANS_7_8 = (0, styled_components_1.css)(templateObject_10 || (templateObject
|
|
|
119
119
|
}
|
|
120
120
|
}, fontCss, sansSerif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
121
121
|
var theme = _a.theme;
|
|
122
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
122
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
123
123
|
case 'hi':
|
|
124
124
|
return "".concat(msW(9), "px");
|
|
125
125
|
default:
|
|
@@ -128,7 +128,7 @@ var SANS_7_8 = (0, styled_components_1.css)(templateObject_10 || (templateObject
|
|
|
128
128
|
});
|
|
129
129
|
var SERIF_3 = (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.7em;\n ", "\n ", "\n"], ["\n font-size: ", ";\n line-height: 1.7em;\n ", "\n ", "\n"])), function (_a) {
|
|
130
130
|
var theme = _a.theme;
|
|
131
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
131
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
132
132
|
case 'hi':
|
|
133
133
|
return "".concat(msW(4), "px");
|
|
134
134
|
default:
|
|
@@ -137,7 +137,7 @@ var SERIF_3 = (0, styled_components_1.css)(templateObject_11 || (templateObject_
|
|
|
137
137
|
}, fontCss, serif);
|
|
138
138
|
var SERIF_3_4 = (0, styled_components_1.css)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.7em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.7em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
139
139
|
var theme = _a.theme;
|
|
140
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
140
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
141
141
|
case 'hi':
|
|
142
142
|
return "".concat(msW(4), "px");
|
|
143
143
|
default:
|
|
@@ -145,7 +145,7 @@ var SERIF_3_4 = (0, styled_components_1.css)(templateObject_12 || (templateObjec
|
|
|
145
145
|
}
|
|
146
146
|
}, fontCss, serif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
147
147
|
var theme = _a.theme;
|
|
148
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
148
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
149
149
|
case 'hi':
|
|
150
150
|
return "".concat(msW(5), "px");
|
|
151
151
|
default:
|
|
@@ -154,7 +154,7 @@ var SERIF_3_4 = (0, styled_components_1.css)(templateObject_12 || (templateObjec
|
|
|
154
154
|
});
|
|
155
155
|
var SERIF_4_5 = (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
156
156
|
var theme = _a.theme;
|
|
157
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
157
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
158
158
|
case 'hi':
|
|
159
159
|
return "".concat(msW(5), "px");
|
|
160
160
|
default:
|
|
@@ -162,7 +162,7 @@ var SERIF_4_5 = (0, styled_components_1.css)(templateObject_13 || (templateObjec
|
|
|
162
162
|
}
|
|
163
163
|
}, fontCss, serif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
164
164
|
var theme = _a.theme;
|
|
165
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
165
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
166
166
|
case 'hi':
|
|
167
167
|
return "".concat(msW(6), "px");
|
|
168
168
|
default:
|
|
@@ -171,7 +171,7 @@ var SERIF_4_5 = (0, styled_components_1.css)(templateObject_13 || (templateObjec
|
|
|
171
171
|
});
|
|
172
172
|
var SERIF_5_6 = (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
173
173
|
var theme = _a.theme;
|
|
174
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
174
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
175
175
|
case 'hi':
|
|
176
176
|
return "".concat(msW(6), "px");
|
|
177
177
|
default:
|
|
@@ -179,7 +179,7 @@ var SERIF_5_6 = (0, styled_components_1.css)(templateObject_14 || (templateObjec
|
|
|
179
179
|
}
|
|
180
180
|
}, fontCss, serif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
181
181
|
var theme = _a.theme;
|
|
182
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
182
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
183
183
|
case 'hi':
|
|
184
184
|
return "".concat(msW(7), "px");
|
|
185
185
|
default:
|
|
@@ -188,7 +188,7 @@ var SERIF_5_6 = (0, styled_components_1.css)(templateObject_14 || (templateObjec
|
|
|
188
188
|
});
|
|
189
189
|
var SERIF_6_7 = (0, styled_components_1.css)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
190
190
|
var theme = _a.theme;
|
|
191
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
191
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
192
192
|
case 'hi':
|
|
193
193
|
return "".concat(msW(7), "px");
|
|
194
194
|
default:
|
|
@@ -196,7 +196,7 @@ var SERIF_6_7 = (0, styled_components_1.css)(templateObject_15 || (templateObjec
|
|
|
196
196
|
}
|
|
197
197
|
}, fontCss, serif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
198
198
|
var theme = _a.theme;
|
|
199
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
199
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
200
200
|
case 'hi':
|
|
201
201
|
return "".concat(msW(8), "px");
|
|
202
202
|
default:
|
|
@@ -205,7 +205,7 @@ var SERIF_6_7 = (0, styled_components_1.css)(templateObject_15 || (templateObjec
|
|
|
205
205
|
});
|
|
206
206
|
var SERIF_7_8 = (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.6em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
207
207
|
var theme = _a.theme;
|
|
208
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
208
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
209
209
|
case 'hi':
|
|
210
210
|
return "".concat(msW(8), "px");
|
|
211
211
|
default:
|
|
@@ -213,7 +213,7 @@ var SERIF_7_8 = (0, styled_components_1.css)(templateObject_16 || (templateObjec
|
|
|
213
213
|
}
|
|
214
214
|
}, fontCss, serif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
215
215
|
var theme = _a.theme;
|
|
216
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
216
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
217
217
|
case 'hi':
|
|
218
218
|
return "".concat(msW(9), "px");
|
|
219
219
|
default:
|
|
@@ -222,7 +222,7 @@ var SERIF_7_8 = (0, styled_components_1.css)(templateObject_16 || (templateObjec
|
|
|
222
222
|
});
|
|
223
223
|
var SERIF_9_10 = (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n font-size: ", ";\n line-height: 1.5em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"], ["\n font-size: ", ";\n line-height: 1.5em;\n ", "\n ", "\n ", " {\n font-size: ", ";\n }\n"])), function (_a) {
|
|
224
224
|
var theme = _a.theme;
|
|
225
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
225
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
226
226
|
case 'hi':
|
|
227
227
|
return "".concat(msW(10), "px");
|
|
228
228
|
default:
|
|
@@ -230,7 +230,7 @@ var SERIF_9_10 = (0, styled_components_1.css)(templateObject_17 || (templateObje
|
|
|
230
230
|
}
|
|
231
231
|
}, fontCss, serif, (0, mixins_1.mediaQuery)('md'), function (_a) {
|
|
232
232
|
var theme = _a.theme;
|
|
233
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
233
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
234
234
|
case 'hi':
|
|
235
235
|
return "".concat(msW(11), "px");
|
|
236
236
|
default:
|
|
@@ -239,10 +239,10 @@ var SERIF_9_10 = (0, styled_components_1.css)(templateObject_17 || (templateObje
|
|
|
239
239
|
});
|
|
240
240
|
var LABEL = (0, styled_components_1.css)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n letter-spacing: ", "em;\n font-size: ", ";\n color: ", ";\n line-height: 1.6em;\n font-weight: 600;\n text-transform: uppercase;\n ", "\n"], ["\n letter-spacing: ", "em;\n font-size: ", ";\n color: ", ";\n line-height: 1.6em;\n font-weight: 600;\n text-transform: uppercase;\n ", "\n"])), function (_a) {
|
|
241
241
|
var theme = _a.theme;
|
|
242
|
-
return ((theme === null || theme === void 0 ? void 0 : theme.
|
|
242
|
+
return ((theme === null || theme === void 0 ? void 0 : theme.lang) === 'hi' ? 0 : 0.1);
|
|
243
243
|
}, function (_a) {
|
|
244
244
|
var theme = _a.theme;
|
|
245
|
-
switch (theme === null || theme === void 0 ? void 0 : theme.
|
|
245
|
+
switch (theme === null || theme === void 0 ? void 0 : theme.lang) {
|
|
246
246
|
case 'hi':
|
|
247
247
|
return "".concat(msW(2), "px");
|
|
248
248
|
default:
|
|
@@ -253,8 +253,8 @@ var LABEL = (0, styled_components_1.css)(templateObject_18 || (templateObject_18
|
|
|
253
253
|
return (invert ? white : color);
|
|
254
254
|
}, sansSerif);
|
|
255
255
|
var BLOCKQUOTE = (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n padding: 1.5rem;\n border-left: 4px solid\n ", ";\n ", ";\n font-style: italic;\n color: ", ";\n margin-inline-start: 25px;\n margin-inline-end: 25px;\n"], ["\n padding: 1.5rem;\n border-left: 4px solid\n ", ";\n ", ";\n font-style: italic;\n color: ", ";\n margin-inline-start: 25px;\n margin-inline-end: 25px;\n"])), function (_a) {
|
|
256
|
-
var invert = _a.invert,
|
|
257
|
-
return invert ? greyColor40 : (0, utilsOolib_1.getPrimaryColor100)(
|
|
256
|
+
var invert = _a.invert, colors = _a.theme.colors;
|
|
257
|
+
return invert ? greyColor40 : (0, utilsOolib_1.getPrimaryColor100)(colors);
|
|
258
258
|
}, SERIF_4_5, greyColor80);
|
|
259
259
|
exports.typo = {
|
|
260
260
|
serif: serif,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function useLocale(): (text: any) => any;
|
|
2
|
-
export function getPrimaryColor10(
|
|
3
|
-
export function getPrimaryColor40(
|
|
4
|
-
export function getPrimaryColor100(
|
|
5
|
-
export function getPrimaryColorText(
|
|
2
|
+
export function getPrimaryColor10(colors: any): any;
|
|
3
|
+
export function getPrimaryColor40(colors: any): any;
|
|
4
|
+
export function getPrimaryColor100(colors: any): any;
|
|
5
|
+
export function getPrimaryColorText(colors: any): any;
|
package/dist/utilsOolib/index.js
CHANGED
|
@@ -13,26 +13,26 @@ var primaryColor10 = colors_1.colors.primaryColor10, primaryColor40 = colors_1.c
|
|
|
13
13
|
var useLocale = function () {
|
|
14
14
|
var currentTheme = (0, styled_components_1.useTheme)();
|
|
15
15
|
var localize = function (text) {
|
|
16
|
-
return (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.
|
|
17
|
-
? currentTheme.
|
|
16
|
+
return (currentTheme === null || currentTheme === void 0 ? void 0 : currentTheme.localize)
|
|
17
|
+
? currentTheme.localize(text)
|
|
18
18
|
: text;
|
|
19
19
|
};
|
|
20
20
|
return localize;
|
|
21
21
|
};
|
|
22
22
|
exports.useLocale = useLocale;
|
|
23
|
-
var getPrimaryColor10 = function (
|
|
24
|
-
return (
|
|
23
|
+
var getPrimaryColor10 = function (colors) {
|
|
24
|
+
return (colors === null || colors === void 0 ? void 0 : colors.primaryColor10) || primaryColor10;
|
|
25
25
|
};
|
|
26
26
|
exports.getPrimaryColor10 = getPrimaryColor10;
|
|
27
|
-
var getPrimaryColor40 = function (
|
|
28
|
-
return (
|
|
27
|
+
var getPrimaryColor40 = function (colors) {
|
|
28
|
+
return (colors === null || colors === void 0 ? void 0 : colors.primaryColor40) || primaryColor40;
|
|
29
29
|
};
|
|
30
30
|
exports.getPrimaryColor40 = getPrimaryColor40;
|
|
31
|
-
var getPrimaryColor100 = function (
|
|
32
|
-
return (
|
|
31
|
+
var getPrimaryColor100 = function (colors) {
|
|
32
|
+
return (colors === null || colors === void 0 ? void 0 : colors.primaryColor100) || primaryColor100;
|
|
33
33
|
};
|
|
34
34
|
exports.getPrimaryColor100 = getPrimaryColor100;
|
|
35
|
-
var getPrimaryColorText = function (
|
|
36
|
-
return (
|
|
35
|
+
var getPrimaryColorText = function (colors) {
|
|
36
|
+
return (colors === null || colors === void 0 ? void 0 : colors.primaryColorText) || primaryColorText;
|
|
37
37
|
};
|
|
38
38
|
exports.getPrimaryColorText = getPrimaryColorText;
|