oolib 2.204.0 → 2.204.1
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.
|
@@ -44,6 +44,6 @@ var themes_1 = require("../../../v2/themes");
|
|
|
44
44
|
var load = (0, styled_components_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from { left: -100%; }\n to { left: 100%; }\n"], ["\n from { left: -100%; }\n to { left: 100%; }\n"])));
|
|
45
45
|
exports.StyledSkeletonLoader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n overflow: hidden;\n position: relative;\n background-color: ", ";\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n left: -100%;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to right, transparent 0%, ", " 50%, transparent 100%);\n animation: ", " 1s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n }\n"], ["\n overflow: hidden;\n position: relative;\n background-color: ", ";\n\n &::before {\n content: '';\n display: block;\n position: absolute;\n left: -100%;\n top: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(to right, transparent 0%, ", " 50%, transparent 100%);\n animation: ", " 1s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n }\n"])), function (_a) {
|
|
46
46
|
var theme = _a.theme;
|
|
47
|
-
return (0, getDynamicColors_1.
|
|
47
|
+
return (0, getDynamicColors_1.getSurfaceContainer)(theme === null || theme === void 0 ? void 0 : theme.colors);
|
|
48
48
|
}, themes_1.colors.grey5, load);
|
|
49
49
|
var templateObject_1, templateObject_2;
|
|
@@ -18,7 +18,7 @@ exports.TextLoader = void 0;
|
|
|
18
18
|
var react_1 = __importDefault(require("react"));
|
|
19
19
|
var styled_1 = require("../SkeletonLoader/styled");
|
|
20
20
|
var styled_components_1 = require("styled-components");
|
|
21
|
-
var
|
|
21
|
+
var getDynamicColors_1 = require("../../../v2/themes/utils/getDynamicColors");
|
|
22
22
|
/**
|
|
23
23
|
* @component Renders a text loader component with customizable styling.
|
|
24
24
|
*
|
|
@@ -29,6 +29,6 @@ var utilsOolib_1 = require("../../../utilsOolib");
|
|
|
29
29
|
var TextLoader = function (_a) {
|
|
30
30
|
var style = _a.style;
|
|
31
31
|
var theme = (0, styled_components_1.useTheme)();
|
|
32
|
-
return (react_1.default.createElement(styled_1.StyledSkeletonLoader, { style: __assign(__assign({ backgroundColor: (0,
|
|
32
|
+
return (react_1.default.createElement(styled_1.StyledSkeletonLoader, { style: __assign(__assign({ backgroundColor: (0, getDynamicColors_1.getSecondaryContainer)(theme === null || theme === void 0 ? void 0 : theme.colors) }, (style || {})), { width: (style === null || style === void 0 ? void 0 : style.width) || "8rem", height: (style === null || style === void 0 ? void 0 : style.height) || "1.5rem", borderRadius: '4px' }) }));
|
|
33
33
|
};
|
|
34
34
|
exports.TextLoader = TextLoader;
|
|
@@ -2,42 +2,56 @@ import { Colors2Type } from "../colors";
|
|
|
2
2
|
/**
|
|
3
3
|
* Get the primary Container color.
|
|
4
4
|
*
|
|
5
|
-
* @param {
|
|
5
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
6
6
|
* @return {string} The primary color text
|
|
7
7
|
*/
|
|
8
8
|
export declare const getPrimaryContainer: (colors?: Colors2Type) => string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Get the secondary Container color.
|
|
11
11
|
*
|
|
12
|
-
* @param {
|
|
13
|
-
* @return {string} The
|
|
12
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
13
|
+
* @return {string} The secondary color text
|
|
14
14
|
*/
|
|
15
15
|
export declare const getSecondaryContainer: (colors?: Colors2Type) => string;
|
|
16
16
|
/**
|
|
17
17
|
* get the tertiary Container color..
|
|
18
18
|
*
|
|
19
|
-
* @param {
|
|
20
|
-
* @return {string} The
|
|
19
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
20
|
+
* @return {string} The tertiary color text
|
|
21
21
|
*/
|
|
22
22
|
export declare const getTertiaryContainer: (colors?: Colors2Type) => string;
|
|
23
23
|
/**
|
|
24
24
|
* Get the onPrimary color.
|
|
25
25
|
*
|
|
26
|
-
* @param {
|
|
27
|
-
* @return {string} The
|
|
26
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
27
|
+
* @return {string} The onPrimary color text
|
|
28
28
|
*/
|
|
29
29
|
export declare const getOnPrimary: (colors?: Colors2Type) => string;
|
|
30
30
|
/**
|
|
31
31
|
* Get the onSecondary color.
|
|
32
32
|
*
|
|
33
|
-
* @param {
|
|
34
|
-
* @return {string} The
|
|
33
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
34
|
+
* @return {string} The onSecondary color text
|
|
35
35
|
*/
|
|
36
36
|
export declare const getOnSecondary: (colors?: Colors2Type) => string;
|
|
37
37
|
/**
|
|
38
38
|
* Get the onTertiary color.
|
|
39
39
|
*
|
|
40
|
-
* @param {
|
|
41
|
-
* @return {string} The
|
|
40
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
41
|
+
* @return {string} The onTertiary color text
|
|
42
42
|
*/
|
|
43
43
|
export declare const getOnTertiary: (colors?: Colors2Type) => string;
|
|
44
|
+
/**
|
|
45
|
+
* Get the surface Container color.
|
|
46
|
+
*
|
|
47
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
48
|
+
* @return {string} The surface container color text
|
|
49
|
+
*/
|
|
50
|
+
export declare const getSurfaceContainer: (colors?: Colors2Type) => string;
|
|
51
|
+
/**
|
|
52
|
+
* Get the surface Container Low color.
|
|
53
|
+
*
|
|
54
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
55
|
+
* @return {string} The surface container low color text
|
|
56
|
+
*/
|
|
57
|
+
export declare const getSurfaceContainerLow: (colors?: Colors2Type) => string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOnTertiary = exports.getOnSecondary = exports.getOnPrimary = exports.getTertiaryContainer = exports.getSecondaryContainer = exports.getPrimaryContainer = void 0;
|
|
3
|
+
exports.getSurfaceContainerLow = exports.getSurfaceContainer = exports.getOnTertiary = exports.getOnSecondary = exports.getOnPrimary = exports.getTertiaryContainer = exports.getSecondaryContainer = exports.getPrimaryContainer = void 0;
|
|
4
4
|
var colors_1 = require("../colors");
|
|
5
|
-
var primaryContainer = colors_1.colors.primaryContainer, secondaryContainer = colors_1.colors.secondaryContainer, tertiaryContainer = colors_1.colors.tertiaryContainer, onPrimary = colors_1.colors.onPrimary, onSecondary = colors_1.colors.onSecondary, onTertiary = colors_1.colors.onTertiary;
|
|
5
|
+
var primaryContainer = colors_1.colors.primaryContainer, secondaryContainer = colors_1.colors.secondaryContainer, tertiaryContainer = colors_1.colors.tertiaryContainer, onPrimary = colors_1.colors.onPrimary, onSecondary = colors_1.colors.onSecondary, onTertiary = colors_1.colors.onTertiary, surfaceContainer = colors_1.colors.surfaceContainer, surfaceContainerLow = colors_1.colors.surfaceContainerLow;
|
|
6
6
|
/**
|
|
7
7
|
* Get the primary Container color.
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
9
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
10
10
|
* @return {string} The primary color text
|
|
11
11
|
*/
|
|
12
12
|
var getPrimaryContainer = function (colors) {
|
|
@@ -14,10 +14,10 @@ var getPrimaryContainer = function (colors) {
|
|
|
14
14
|
};
|
|
15
15
|
exports.getPrimaryContainer = getPrimaryContainer;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Get the secondary Container color.
|
|
18
18
|
*
|
|
19
|
-
* @param {
|
|
20
|
-
* @return {string} The
|
|
19
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
20
|
+
* @return {string} The secondary color text
|
|
21
21
|
*/
|
|
22
22
|
var getSecondaryContainer = function (colors) {
|
|
23
23
|
return (colors === null || colors === void 0 ? void 0 : colors.secondaryContainer) || secondaryContainer;
|
|
@@ -26,8 +26,8 @@ exports.getSecondaryContainer = getSecondaryContainer;
|
|
|
26
26
|
/**
|
|
27
27
|
* get the tertiary Container color..
|
|
28
28
|
*
|
|
29
|
-
* @param {
|
|
30
|
-
* @return {string} The
|
|
29
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
30
|
+
* @return {string} The tertiary color text
|
|
31
31
|
*/
|
|
32
32
|
var getTertiaryContainer = function (colors) {
|
|
33
33
|
return (colors === null || colors === void 0 ? void 0 : colors.tertiaryContainer) || tertiaryContainer;
|
|
@@ -36,8 +36,8 @@ exports.getTertiaryContainer = getTertiaryContainer;
|
|
|
36
36
|
/**
|
|
37
37
|
* Get the onPrimary color.
|
|
38
38
|
*
|
|
39
|
-
* @param {
|
|
40
|
-
* @return {string} The
|
|
39
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
40
|
+
* @return {string} The onPrimary color text
|
|
41
41
|
*/
|
|
42
42
|
var getOnPrimary = function (colors) {
|
|
43
43
|
return (colors === null || colors === void 0 ? void 0 : colors.onPrimary) || onPrimary;
|
|
@@ -46,8 +46,8 @@ exports.getOnPrimary = getOnPrimary;
|
|
|
46
46
|
/**
|
|
47
47
|
* Get the onSecondary color.
|
|
48
48
|
*
|
|
49
|
-
* @param {
|
|
50
|
-
* @return {string} The
|
|
49
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
50
|
+
* @return {string} The onSecondary color text
|
|
51
51
|
*/
|
|
52
52
|
var getOnSecondary = function (colors) {
|
|
53
53
|
return (colors === null || colors === void 0 ? void 0 : colors.onSecondary) || onSecondary;
|
|
@@ -56,10 +56,30 @@ exports.getOnSecondary = getOnSecondary;
|
|
|
56
56
|
/**
|
|
57
57
|
* Get the onTertiary color.
|
|
58
58
|
*
|
|
59
|
-
* @param {
|
|
60
|
-
* @return {string} The
|
|
59
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
60
|
+
* @return {string} The onTertiary color text
|
|
61
61
|
*/
|
|
62
62
|
var getOnTertiary = function (colors) {
|
|
63
63
|
return (colors === null || colors === void 0 ? void 0 : colors.onTertiary) || onTertiary;
|
|
64
64
|
};
|
|
65
65
|
exports.getOnTertiary = getOnTertiary;
|
|
66
|
+
/**
|
|
67
|
+
* Get the surface Container color.
|
|
68
|
+
*
|
|
69
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
70
|
+
* @return {string} The surface container color text
|
|
71
|
+
*/
|
|
72
|
+
var getSurfaceContainer = function (colors) {
|
|
73
|
+
return (colors === null || colors === void 0 ? void 0 : colors.surfaceContainer) || surfaceContainer;
|
|
74
|
+
};
|
|
75
|
+
exports.getSurfaceContainer = getSurfaceContainer;
|
|
76
|
+
/**
|
|
77
|
+
* Get the surface Container Low color.
|
|
78
|
+
*
|
|
79
|
+
* @param {Colors2Type} colors - Optional colors object
|
|
80
|
+
* @return {string} The surface container low color text
|
|
81
|
+
*/
|
|
82
|
+
var getSurfaceContainerLow = function (colors) {
|
|
83
|
+
return (colors === null || colors === void 0 ? void 0 : colors.surfaceContainerLow) || surfaceContainerLow;
|
|
84
|
+
};
|
|
85
|
+
exports.getSurfaceContainerLow = getSurfaceContainerLow;
|