forstok-ui-lib 8.5.13 → 8.5.15
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 +31 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/button/styles.ts +0 -3
- package/src/components/link/styles.ts +95 -44
- package/src/components/text/styles.ts +43 -34
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Link } from
|
|
2
|
-
import styled, { css } from
|
|
1
|
+
import { Link } from "react-router-dom";
|
|
2
|
+
import styled, { css } from "styled-components";
|
|
3
3
|
|
|
4
|
-
import IconXls from
|
|
5
|
-
import { multiElipsis } from
|
|
6
|
-
import { LinkMode } from
|
|
4
|
+
import IconXls from "../../assets/images/icons/xls.svg";
|
|
5
|
+
import { multiElipsis } from "../../assets/stylesheets/bases.styles";
|
|
6
|
+
import { LinkMode } from "./typed";
|
|
7
7
|
|
|
8
8
|
const ButtonStyles = css`
|
|
9
9
|
position: relative;
|
|
@@ -14,16 +14,21 @@ const ButtonStyles = css`
|
|
|
14
14
|
height: 30px;
|
|
15
15
|
align-items: center;
|
|
16
16
|
transform-origin: 100% 0%;
|
|
17
|
-
transition:
|
|
18
|
-
|
|
17
|
+
transition:
|
|
18
|
+
color 0.15s ease-in-out,
|
|
19
|
+
background-color 0.15s ease-in-out,
|
|
20
|
+
border-color 0.15s ease-in-out,
|
|
21
|
+
box-shadow 0.15s ease-in-out,
|
|
22
|
+
-webkit-box-shadow 0.15s ease-in-out;
|
|
23
|
+
&,
|
|
19
24
|
&:hover {
|
|
20
25
|
text-decoration: none;
|
|
21
26
|
}
|
|
22
|
-
|
|
27
|
+
`;
|
|
23
28
|
const modeStyles = {
|
|
24
29
|
clear: css`
|
|
25
30
|
color: var(--pri-clr-lnk);
|
|
26
|
-
&,
|
|
31
|
+
&,
|
|
27
32
|
&:hover {
|
|
28
33
|
text-decoration: none;
|
|
29
34
|
}
|
|
@@ -33,7 +38,7 @@ const modeStyles = {
|
|
|
33
38
|
`,
|
|
34
39
|
clearR: css`
|
|
35
40
|
color: var(--pri-clr-lnk);
|
|
36
|
-
&,
|
|
41
|
+
&,
|
|
37
42
|
&:hover {
|
|
38
43
|
text-decoration: none;
|
|
39
44
|
}
|
|
@@ -42,10 +47,15 @@ const modeStyles = {
|
|
|
42
47
|
}
|
|
43
48
|
`,
|
|
44
49
|
blue: css`
|
|
45
|
-
|
|
50
|
+
& {
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
}
|
|
53
|
+
&,
|
|
46
54
|
&:hover {
|
|
47
55
|
color: var(--pri-clr-lnk__hvr);
|
|
48
|
-
|
|
56
|
+
}
|
|
57
|
+
&:hover {
|
|
58
|
+
text-decoration: underline;
|
|
49
59
|
}
|
|
50
60
|
`,
|
|
51
61
|
trans: css`
|
|
@@ -53,13 +63,13 @@ const modeStyles = {
|
|
|
53
63
|
height: auto;
|
|
54
64
|
padding: 0;
|
|
55
65
|
opacity: 1;
|
|
56
|
-
&,
|
|
57
|
-
&:hover {
|
|
66
|
+
&,
|
|
67
|
+
&:hover {
|
|
58
68
|
color: var(--pri-clr-lnk__hvr);
|
|
59
69
|
text-decoration: none;
|
|
60
|
-
}
|
|
70
|
+
}
|
|
61
71
|
&:hover {
|
|
62
|
-
opacity: .9;
|
|
72
|
+
opacity: 0.9;
|
|
63
73
|
}
|
|
64
74
|
`,
|
|
65
75
|
hover: css`
|
|
@@ -71,7 +81,7 @@ const modeStyles = {
|
|
|
71
81
|
left: -6px;
|
|
72
82
|
color: initial;
|
|
73
83
|
grid-gap: 4px;
|
|
74
|
-
&:hover {
|
|
84
|
+
&:hover {
|
|
75
85
|
border-radius: var(--ter-rd);
|
|
76
86
|
box-shadow: 1px 1px var(--pri-clr-ln);
|
|
77
87
|
background-color: var(--mt-clr-bg__fc);
|
|
@@ -83,10 +93,10 @@ const modeStyles = {
|
|
|
83
93
|
color: var(--ter-clr);
|
|
84
94
|
background-color: var(--cl-clr-bg);
|
|
85
95
|
border: 1px solid var(--sec-clr-ln);
|
|
86
|
-
&,
|
|
87
|
-
&:hover {
|
|
96
|
+
&,
|
|
97
|
+
&:hover {
|
|
88
98
|
background-color: var(--cl-clr-bg__hvr);
|
|
89
|
-
}
|
|
99
|
+
}
|
|
90
100
|
`,
|
|
91
101
|
redB: css`
|
|
92
102
|
${ButtonStyles}
|
|
@@ -94,7 +104,7 @@ const modeStyles = {
|
|
|
94
104
|
background-color: var(--act-clr-bg);
|
|
95
105
|
&:hover {
|
|
96
106
|
background-color: var(--act-clr-bg__hvr);
|
|
97
|
-
}
|
|
107
|
+
}
|
|
98
108
|
`,
|
|
99
109
|
greyB: css`
|
|
100
110
|
${ButtonStyles}
|
|
@@ -102,7 +112,7 @@ const modeStyles = {
|
|
|
102
112
|
background-color: var(--mt-clr-bg__fc);
|
|
103
113
|
&:hover {
|
|
104
114
|
background-color: var(--cl-clr-bg__hvr);
|
|
105
|
-
}
|
|
115
|
+
}
|
|
106
116
|
`,
|
|
107
117
|
table: css`
|
|
108
118
|
display: block;
|
|
@@ -110,22 +120,39 @@ const modeStyles = {
|
|
|
110
120
|
text-wrap: wrap;
|
|
111
121
|
word-wrap: break-word;
|
|
112
122
|
font-size: 13px;
|
|
113
|
-
|
|
114
|
-
} as const
|
|
115
|
-
const getLinkModifiedStyled = ({
|
|
123
|
+
`,
|
|
124
|
+
} as const;
|
|
125
|
+
const getLinkModifiedStyled = ({
|
|
126
|
+
mode,
|
|
127
|
+
$elipsis,
|
|
128
|
+
$activated,
|
|
129
|
+
$shadow,
|
|
130
|
+
$iconRight,
|
|
131
|
+
disabled,
|
|
132
|
+
}: {
|
|
133
|
+
mode?: LinkMode;
|
|
134
|
+
$elipsis: boolean;
|
|
135
|
+
$activated: boolean;
|
|
136
|
+
$shadow: boolean;
|
|
137
|
+
$iconRight?: string;
|
|
138
|
+
disabled: boolean;
|
|
139
|
+
}) => css`
|
|
116
140
|
${mode && modeStyles[mode]}
|
|
117
141
|
|
|
118
|
-
${$activated &&
|
|
142
|
+
${$activated &&
|
|
143
|
+
css`
|
|
119
144
|
color: var(--sta-clr);
|
|
120
145
|
font-weight: 400;
|
|
121
146
|
`}
|
|
122
147
|
|
|
123
|
-
${(mode ===
|
|
124
|
-
|
|
125
|
-
|
|
148
|
+
${(mode === "clear" || mode === "clearR") &&
|
|
149
|
+
css`
|
|
150
|
+
font-weight: ${$activated ? "600" : "normal"};
|
|
151
|
+
color: ${$activated ? "var(--pri-clr-lnk__act) !important" : "inherit"};
|
|
126
152
|
`}
|
|
127
153
|
|
|
128
|
-
${$elipsis &&
|
|
154
|
+
${$elipsis &&
|
|
155
|
+
css`
|
|
129
156
|
overflow: hidden;
|
|
130
157
|
text-overflow: ellipsis;
|
|
131
158
|
white-space: nowrap;
|
|
@@ -135,15 +162,17 @@ const getLinkModifiedStyled = ({ mode, $elipsis, $activated, $shadow, $iconRight
|
|
|
135
162
|
${multiElipsis}
|
|
136
163
|
`}
|
|
137
164
|
|
|
138
|
-
${$shadow &&
|
|
165
|
+
${$shadow &&
|
|
166
|
+
css`
|
|
139
167
|
box-shadow: var(--act-shd-bx);
|
|
140
168
|
`}
|
|
141
169
|
|
|
142
|
-
${$iconRight ===
|
|
170
|
+
${$iconRight === "xls" &&
|
|
171
|
+
css`
|
|
143
172
|
position: relative;
|
|
144
173
|
padding-right: 21px;
|
|
145
|
-
&:before {
|
|
146
|
-
content: url(${IconXls});
|
|
174
|
+
&:before {
|
|
175
|
+
content: url(${IconXls});
|
|
147
176
|
position: absolute;
|
|
148
177
|
right: 0px;
|
|
149
178
|
top: -4px;
|
|
@@ -152,26 +181,48 @@ const getLinkModifiedStyled = ({ mode, $elipsis, $activated, $shadow, $iconRight
|
|
|
152
181
|
}
|
|
153
182
|
`}
|
|
154
183
|
|
|
155
|
-
${disabled &&
|
|
156
|
-
|
|
184
|
+
${disabled &&
|
|
185
|
+
css`
|
|
186
|
+
color: #a9a9a9;
|
|
157
187
|
opacity: 0.7;
|
|
158
188
|
pointer-events: none;
|
|
159
189
|
`}
|
|
160
|
-
|
|
161
|
-
export const AnchorLinkContainer = styled.a<{
|
|
190
|
+
`;
|
|
191
|
+
export const AnchorLinkContainer = styled.a<{
|
|
192
|
+
mode?: LinkMode;
|
|
193
|
+
$elipsis: boolean;
|
|
194
|
+
$activated: boolean;
|
|
195
|
+
$shadow: boolean;
|
|
196
|
+
$iconRight?: string;
|
|
197
|
+
disabled: boolean;
|
|
198
|
+
}>`
|
|
162
199
|
${getLinkModifiedStyled}
|
|
163
|
-
|
|
200
|
+
`;
|
|
164
201
|
|
|
165
|
-
export const ElLinkContainer = styled.span<{
|
|
166
|
-
|
|
202
|
+
export const ElLinkContainer = styled.span<{
|
|
203
|
+
mode?: LinkMode;
|
|
204
|
+
$elipsis: boolean;
|
|
205
|
+
$activated: boolean;
|
|
206
|
+
$shadow: boolean;
|
|
207
|
+
$iconRight?: string;
|
|
208
|
+
disabled: boolean;
|
|
209
|
+
}>`
|
|
210
|
+
cursor: pointer;
|
|
167
211
|
${getLinkModifiedStyled}
|
|
168
|
-
|
|
212
|
+
`;
|
|
169
213
|
|
|
170
|
-
export const LinkContainer = styled(Link)<{
|
|
214
|
+
export const LinkContainer = styled(Link)<{
|
|
215
|
+
mode?: LinkMode;
|
|
216
|
+
$elipsis: boolean;
|
|
217
|
+
$activated: boolean;
|
|
218
|
+
$shadow: boolean;
|
|
219
|
+
$iconRight?: string;
|
|
220
|
+
disabled: boolean;
|
|
221
|
+
}>`
|
|
171
222
|
&._refHoverLink {
|
|
172
223
|
padding: 3px 0px 0px 6px;
|
|
173
224
|
position: relative;
|
|
174
225
|
top: -3px;
|
|
175
226
|
}
|
|
176
227
|
${getLinkModifiedStyled}
|
|
177
|
-
|
|
228
|
+
`;
|
|
@@ -1,76 +1,85 @@
|
|
|
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
|
-
} else if ($color ===
|
|
27
|
+
`;
|
|
28
|
+
} else if ($color === "green") {
|
|
23
29
|
style += `
|
|
24
30
|
color: green;
|
|
25
|
-
|
|
26
|
-
} else if ($color ===
|
|
31
|
+
`;
|
|
32
|
+
} else if ($color === "red") {
|
|
27
33
|
style += `
|
|
28
34
|
color: var(--sta-clr);
|
|
29
|
-
|
|
30
|
-
} else if ($color ===
|
|
35
|
+
`;
|
|
36
|
+
} else if ($color === "grey") {
|
|
31
37
|
style += `
|
|
32
38
|
color: var(--mt-clr);
|
|
33
|
-
|
|
34
|
-
} else if ($color ===
|
|
39
|
+
`;
|
|
40
|
+
} else if ($color === "darkgrey") {
|
|
35
41
|
style += `
|
|
36
42
|
color: var(--mt-clr);
|
|
37
|
-
|
|
38
|
-
} else if ($color ===
|
|
43
|
+
`;
|
|
44
|
+
} else if ($color === "supergrey") {
|
|
39
45
|
style += `
|
|
40
46
|
color: #929291;
|
|
41
|
-
|
|
42
|
-
} else if ($color ===
|
|
47
|
+
`;
|
|
48
|
+
} else if ($color === "orange") {
|
|
43
49
|
style += `
|
|
44
50
|
color: orange;
|
|
45
|
-
|
|
46
|
-
} else if($color ===
|
|
51
|
+
`;
|
|
52
|
+
} else if ($color === "yellow") {
|
|
47
53
|
style += `
|
|
48
54
|
color: #F8813E;
|
|
49
|
-
|
|
50
|
-
} else if ($color ===
|
|
55
|
+
`;
|
|
56
|
+
} else if ($color === "black") {
|
|
51
57
|
style += `
|
|
52
58
|
color: #000000;
|
|
53
|
-
|
|
54
|
-
} else if ($color ===
|
|
59
|
+
`;
|
|
60
|
+
} else if ($color === "lightgreen") {
|
|
55
61
|
style += `
|
|
56
62
|
color: #21BA45;
|
|
57
|
-
|
|
58
|
-
} else if ($color ===
|
|
63
|
+
`;
|
|
64
|
+
} else if ($color === "mate") {
|
|
59
65
|
style += `
|
|
60
66
|
color: #495057;
|
|
61
|
-
|
|
62
|
-
} else if ($color ===
|
|
67
|
+
`;
|
|
68
|
+
} else if ($color === "initial") {
|
|
63
69
|
style += `
|
|
64
70
|
color: var(--pri-clr);
|
|
65
|
-
|
|
71
|
+
`;
|
|
66
72
|
}
|
|
67
73
|
if ($elipsis) {
|
|
68
|
-
style += elipsisStyle
|
|
74
|
+
style += elipsisStyle;
|
|
69
75
|
}
|
|
70
76
|
return style;
|
|
71
|
-
}
|
|
77
|
+
};
|
|
72
78
|
|
|
73
|
-
export const TextContainer = styled.span<{
|
|
79
|
+
export const TextContainer = styled.span<{
|
|
80
|
+
$color?: string;
|
|
81
|
+
$elipsis: boolean;
|
|
82
|
+
}>`
|
|
74
83
|
display: grid;
|
|
75
84
|
line-height: normal;
|
|
76
85
|
i {
|
|
@@ -78,4 +87,4 @@ export const TextContainer = styled.span<{ $color?: string, $elipsis: boolean }>
|
|
|
78
87
|
margin-left: 5px;
|
|
79
88
|
}
|
|
80
89
|
${getTextModifiedStyled}
|
|
81
|
-
|
|
90
|
+
`;
|