forstok-ui-lib 8.5.13 → 8.5.14
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/button/styles.ts +0 -3
- package/src/components/text/styles.ts +46 -34
package/package.json
CHANGED
|
@@ -1,76 +1,88 @@
|
|
|
1
|
-
import styled, { css } from
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
2
|
|
|
3
|
-
const elipsisStyle = css
|
|
3
|
+
const elipsisStyle = css`
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
text-overflow: ellipsis;
|
|
6
6
|
white-space: nowrap;
|
|
7
7
|
display: block;
|
|
8
8
|
max-width: 100%;
|
|
9
9
|
width: auto;
|
|
10
|
-
|
|
10
|
+
`;
|
|
11
11
|
|
|
12
|
-
const getTextModifiedStyled = ({
|
|
12
|
+
const getTextModifiedStyled = ({
|
|
13
|
+
$color,
|
|
14
|
+
$elipsis,
|
|
15
|
+
}: {
|
|
16
|
+
$color?: string;
|
|
17
|
+
$elipsis: boolean;
|
|
18
|
+
}) => {
|
|
13
19
|
let style = ``;
|
|
14
|
-
if ($color ===
|
|
20
|
+
if ($color === "mute") {
|
|
15
21
|
style += `
|
|
16
22
|
color: var(--mt-clr);
|
|
17
|
-
|
|
18
|
-
} else if ($color ===
|
|
23
|
+
`;
|
|
24
|
+
} else if ($color === "blue") {
|
|
19
25
|
style += `
|
|
20
26
|
color: var(--pri-clr-lnk__hvr);
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
&:hover {
|
|
28
|
+
text-decoration: underline;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
} else if ($color === "green") {
|
|
23
32
|
style += `
|
|
24
33
|
color: green;
|
|
25
|
-
|
|
26
|
-
} else if ($color ===
|
|
34
|
+
`;
|
|
35
|
+
} else if ($color === "red") {
|
|
27
36
|
style += `
|
|
28
37
|
color: var(--sta-clr);
|
|
29
|
-
|
|
30
|
-
} else if ($color ===
|
|
38
|
+
`;
|
|
39
|
+
} else if ($color === "grey") {
|
|
31
40
|
style += `
|
|
32
41
|
color: var(--mt-clr);
|
|
33
|
-
|
|
34
|
-
} else if ($color ===
|
|
42
|
+
`;
|
|
43
|
+
} else if ($color === "darkgrey") {
|
|
35
44
|
style += `
|
|
36
45
|
color: var(--mt-clr);
|
|
37
|
-
|
|
38
|
-
} else if ($color ===
|
|
46
|
+
`;
|
|
47
|
+
} else if ($color === "supergrey") {
|
|
39
48
|
style += `
|
|
40
49
|
color: #929291;
|
|
41
|
-
|
|
42
|
-
} else if ($color ===
|
|
50
|
+
`;
|
|
51
|
+
} else if ($color === "orange") {
|
|
43
52
|
style += `
|
|
44
53
|
color: orange;
|
|
45
|
-
|
|
46
|
-
} else if($color ===
|
|
54
|
+
`;
|
|
55
|
+
} else if ($color === "yellow") {
|
|
47
56
|
style += `
|
|
48
57
|
color: #F8813E;
|
|
49
|
-
|
|
50
|
-
} else if ($color ===
|
|
58
|
+
`;
|
|
59
|
+
} else if ($color === "black") {
|
|
51
60
|
style += `
|
|
52
61
|
color: #000000;
|
|
53
|
-
|
|
54
|
-
} else if ($color ===
|
|
62
|
+
`;
|
|
63
|
+
} else if ($color === "lightgreen") {
|
|
55
64
|
style += `
|
|
56
65
|
color: #21BA45;
|
|
57
|
-
|
|
58
|
-
} else if ($color ===
|
|
66
|
+
`;
|
|
67
|
+
} else if ($color === "mate") {
|
|
59
68
|
style += `
|
|
60
69
|
color: #495057;
|
|
61
|
-
|
|
62
|
-
} else if ($color ===
|
|
70
|
+
`;
|
|
71
|
+
} else if ($color === "initial") {
|
|
63
72
|
style += `
|
|
64
73
|
color: var(--pri-clr);
|
|
65
|
-
|
|
74
|
+
`;
|
|
66
75
|
}
|
|
67
76
|
if ($elipsis) {
|
|
68
|
-
style += elipsisStyle
|
|
77
|
+
style += elipsisStyle;
|
|
69
78
|
}
|
|
70
79
|
return style;
|
|
71
|
-
}
|
|
80
|
+
};
|
|
72
81
|
|
|
73
|
-
export const TextContainer = styled.span<{
|
|
82
|
+
export const TextContainer = styled.span<{
|
|
83
|
+
$color?: string;
|
|
84
|
+
$elipsis: boolean;
|
|
85
|
+
}>`
|
|
74
86
|
display: grid;
|
|
75
87
|
line-height: normal;
|
|
76
88
|
i {
|
|
@@ -78,4 +90,4 @@ export const TextContainer = styled.span<{ $color?: string, $elipsis: boolean }>
|
|
|
78
90
|
margin-left: 5px;
|
|
79
91
|
}
|
|
80
92
|
${getTextModifiedStyled}
|
|
81
|
-
|
|
93
|
+
`;
|