@megafon/ui-core 2.1.4 → 3.0.0-beta.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/CHANGELOG.md +62 -0
- package/dist/es/colors/ColorItem/ColorItem.css +1 -8
- package/dist/es/colors/ColorItem/ColorItem.js +1 -1
- package/dist/es/colors/Colors.css +3 -11
- package/dist/es/colors/Colors.js +51 -4
- package/dist/es/colors/colorsData.js +78 -71
- package/dist/es/components/Accordion/Accordion.css +6 -12
- package/dist/es/components/Banner/Banner.css +2 -9
- package/dist/es/components/Banner/BannerDot.css +4 -11
- package/dist/es/components/Button/Button.css +83 -74
- package/dist/es/components/Calendar/Calendar.css +0 -7
- package/dist/es/components/Calendar/components/Day/Day.css +10 -17
- package/dist/es/components/Calendar/components/Month/Month.css +3 -10
- package/dist/es/components/Carousel/Carousel.css +4 -11
- package/dist/es/components/Checkbox/Checkbox.css +18 -25
- package/dist/es/components/ContentArea/ContentArea.css +61 -20
- package/dist/es/components/ContentArea/ContentArea.d.ts +0 -1
- package/dist/es/components/ContentArea/ContentArea.js +0 -1
- package/dist/es/components/Counter/Counter.css +61 -11
- package/dist/es/components/Grid/Grid.css +47 -0
- package/dist/es/components/Grid/GridColumn.css +0 -7
- package/dist/es/components/Header/Header.css +8 -12
- package/dist/es/components/Header/Header.d.ts +1 -1
- package/dist/es/components/Header/Header.js +2 -2
- package/dist/es/components/InputLabel/InputLabel.css +0 -7
- package/dist/es/components/List/List.css +9 -13
- package/dist/es/components/List/List.d.ts +1 -1
- package/dist/es/components/List/List.js +2 -2
- package/dist/es/components/List/ListItem.css +0 -7
- package/dist/es/components/Logo/Logo.css +0 -7
- package/dist/es/components/Logo/Logo.js +4 -8
- package/dist/es/components/NavArrow/NavArrow.css +5 -12
- package/dist/es/components/Notification/Notification.css +88 -24
- package/dist/es/components/Pagination/Pagination.css +0 -7
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +56 -9
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +47 -0
- package/dist/es/components/Paragraph/Paragraph.css +7 -17
- package/dist/es/components/Paragraph/Paragraph.d.ts +0 -1
- package/dist/es/components/Paragraph/Paragraph.js +1 -2
- package/dist/es/components/Preloader/Preloader.css +5 -12
- package/dist/es/components/RadioButton/RadioButton.css +7 -14
- package/dist/es/components/RadioButton/RadioButton.d.ts +5 -1
- package/dist/es/components/RadioButton/RadioButton.js +7 -5
- package/dist/es/components/Search/Search.css +20 -25
- package/dist/es/components/Select/Select.css +29 -35
- package/dist/es/components/Switcher/Switcher.css +18 -28
- package/dist/es/components/Tabs/Tabs.css +30 -37
- package/dist/es/components/TextField/TextField.css +27 -33
- package/dist/es/components/TextLink/TextLink.css +10 -14
- package/dist/es/components/TextLink/TextLink.d.ts +1 -1
- package/dist/es/components/TextLink/TextLink.js +1 -1
- package/dist/es/components/Tile/Tile.css +2 -8
- package/dist/es/components/Tooltip/Tooltip.css +1 -8
- package/dist/lib/colors/ColorItem/ColorItem.css +1 -8
- package/dist/lib/colors/ColorItem/ColorItem.js +1 -1
- package/dist/lib/colors/Colors.css +3 -11
- package/dist/lib/colors/Colors.js +53 -4
- package/dist/lib/colors/colorsData.js +78 -71
- package/dist/lib/components/Accordion/Accordion.css +6 -12
- package/dist/lib/components/Banner/Banner.css +2 -9
- package/dist/lib/components/Banner/BannerDot.css +4 -11
- package/dist/lib/components/Button/Button.css +83 -74
- package/dist/lib/components/Calendar/Calendar.css +0 -7
- package/dist/lib/components/Calendar/components/Day/Day.css +10 -17
- package/dist/lib/components/Calendar/components/Month/Month.css +3 -10
- package/dist/lib/components/Carousel/Carousel.css +4 -11
- package/dist/lib/components/Checkbox/Checkbox.css +18 -25
- package/dist/lib/components/ContentArea/ContentArea.css +61 -20
- package/dist/lib/components/ContentArea/ContentArea.d.ts +0 -1
- package/dist/lib/components/ContentArea/ContentArea.js +0 -1
- package/dist/lib/components/Counter/Counter.css +61 -11
- package/dist/lib/components/Grid/Grid.css +47 -0
- package/dist/lib/components/Grid/GridColumn.css +0 -7
- package/dist/lib/components/Header/Header.css +8 -12
- package/dist/lib/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/Header/Header.js +2 -2
- package/dist/lib/components/InputLabel/InputLabel.css +0 -7
- package/dist/lib/components/List/List.css +9 -13
- package/dist/lib/components/List/List.d.ts +1 -1
- package/dist/lib/components/List/List.js +2 -2
- package/dist/lib/components/List/ListItem.css +0 -7
- package/dist/lib/components/Logo/Logo.css +0 -7
- package/dist/lib/components/Logo/Logo.js +4 -8
- package/dist/lib/components/NavArrow/NavArrow.css +5 -12
- package/dist/lib/components/Notification/Notification.css +88 -24
- package/dist/lib/components/Pagination/Pagination.css +0 -7
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +56 -9
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +47 -0
- package/dist/lib/components/Paragraph/Paragraph.css +7 -17
- package/dist/lib/components/Paragraph/Paragraph.d.ts +0 -1
- package/dist/lib/components/Paragraph/Paragraph.js +1 -2
- package/dist/lib/components/Preloader/Preloader.css +5 -12
- package/dist/lib/components/RadioButton/RadioButton.css +7 -14
- package/dist/lib/components/RadioButton/RadioButton.d.ts +5 -1
- package/dist/lib/components/RadioButton/RadioButton.js +6 -4
- package/dist/lib/components/Search/Search.css +20 -25
- package/dist/lib/components/Select/Select.css +29 -35
- package/dist/lib/components/Switcher/Switcher.css +18 -28
- package/dist/lib/components/Tabs/Tabs.css +30 -37
- package/dist/lib/components/TextField/TextField.css +27 -33
- package/dist/lib/components/TextLink/TextLink.css +10 -14
- package/dist/lib/components/TextLink/TextLink.d.ts +1 -1
- package/dist/lib/components/TextLink/TextLink.js +1 -1
- package/dist/lib/components/Tile/Tile.css +2 -8
- package/dist/lib/components/Tooltip/Tooltip.css +1 -8
- package/package.json +4 -4
- package/styles/base.css +54 -0
- package/styles/base.less +61 -73
|
@@ -1,54 +1,44 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.mfui-switcher {
|
|
9
2
|
top: 22px;
|
|
10
3
|
right: 28px;
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
4
|
+
width: 40px;
|
|
5
|
+
height: 24px;
|
|
13
6
|
border-radius: 15.5px;
|
|
14
|
-
background-color:
|
|
15
|
-
-webkit-box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
|
|
16
|
-
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
|
|
7
|
+
background-color: var(--spbSky1);
|
|
17
8
|
cursor: pointer;
|
|
18
9
|
-webkit-transition: all 0.3s;
|
|
19
10
|
transition: all 0.3s;
|
|
20
11
|
}
|
|
21
12
|
.mfui-switcher_no-touch:hover {
|
|
22
|
-
background-color:
|
|
13
|
+
background-color: var(--spbSky1);
|
|
23
14
|
}
|
|
24
15
|
.mfui-switcher__pointer {
|
|
25
16
|
position: relative;
|
|
26
|
-
top:
|
|
27
|
-
left:
|
|
28
|
-
width:
|
|
29
|
-
height:
|
|
30
|
-
border: 1px solid #D8D8D8;
|
|
17
|
+
top: 2px;
|
|
18
|
+
left: 2px;
|
|
19
|
+
width: 20px;
|
|
20
|
+
height: 20px;
|
|
31
21
|
border-radius: 50%;
|
|
32
|
-
background-color:
|
|
33
|
-
-webkit-box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
|
|
34
|
-
box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
|
|
22
|
+
background-color: var(--base);
|
|
35
23
|
-webkit-transition: all 0.3s;
|
|
36
24
|
transition: all 0.3s;
|
|
37
25
|
}
|
|
38
26
|
.mfui-switcher_checked {
|
|
39
|
-
background-color:
|
|
27
|
+
background-color: var(--brandGreen);
|
|
40
28
|
}
|
|
41
29
|
.mfui-switcher_checked .mfui-switcher__pointer {
|
|
42
|
-
left:
|
|
30
|
+
left: 18px;
|
|
43
31
|
}
|
|
44
32
|
.mfui-switcher_checked.mfui-switcher_no-touch:hover {
|
|
45
|
-
background-color:
|
|
33
|
+
background-color: var(--buttonHoverGreen);
|
|
46
34
|
}
|
|
47
35
|
.mfui-switcher_disabled {
|
|
48
|
-
background-color:
|
|
36
|
+
background-color: var(--spbSky1);
|
|
49
37
|
cursor: default;
|
|
50
38
|
}
|
|
51
|
-
.mfui-switcher_checked.mfui-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
.mfui-switcher_disabled.mfui-switcher_checked.mfui-switcher_no-touch.mfui-switcher:hover {
|
|
40
|
+
background-color: var(--spbSky1);
|
|
41
|
+
}
|
|
42
|
+
.mfui-switcher_disabled .mfui-switcher__pointer {
|
|
43
|
+
background-color: var(--spbSky2);
|
|
54
44
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.mfui-tabs__swiper {
|
|
9
2
|
font-family: inherit;
|
|
10
3
|
font-size: 15px;
|
|
@@ -28,13 +21,13 @@ h5 {
|
|
|
28
21
|
}
|
|
29
22
|
.mfui-tabs__swiper:before {
|
|
30
23
|
left: 0;
|
|
31
|
-
background: -webkit-gradient(linear, left top, right top, from(
|
|
32
|
-
background: linear-gradient(to right,
|
|
24
|
+
background: -webkit-gradient(linear, left top, right top, from(var(--base)), to(rgba(255, 255, 255, 0)));
|
|
25
|
+
background: linear-gradient(to right, var(--base), rgba(255, 255, 255, 0));
|
|
33
26
|
}
|
|
34
27
|
.mfui-tabs__swiper:after {
|
|
35
28
|
right: 0;
|
|
36
|
-
background: -webkit-gradient(linear, right top, left top, from(
|
|
37
|
-
background: linear-gradient(to left,
|
|
29
|
+
background: -webkit-gradient(linear, right top, left top, from(var(--base)), to(rgba(255, 255, 255, 0)));
|
|
30
|
+
background: linear-gradient(to left, var(--base), rgba(255, 255, 255, 0));
|
|
38
31
|
}
|
|
39
32
|
.mfui-tabs__swiper_beginning:before {
|
|
40
33
|
display: none;
|
|
@@ -80,19 +73,19 @@ h5 {
|
|
|
80
73
|
-webkit-box-sizing: content-box;
|
|
81
74
|
box-sizing: content-box;
|
|
82
75
|
height: 32px;
|
|
83
|
-
color:
|
|
76
|
+
color: var(--content);
|
|
84
77
|
white-space: nowrap;
|
|
85
78
|
text-decoration: none;
|
|
86
79
|
cursor: pointer;
|
|
87
|
-
fill:
|
|
80
|
+
fill: var(--content);
|
|
88
81
|
}
|
|
89
82
|
.mfui-tabs__tab-inner:hover {
|
|
90
|
-
color:
|
|
91
|
-
fill:
|
|
83
|
+
color: var(--brandGreen);
|
|
84
|
+
fill: var(--brandGreen);
|
|
92
85
|
}
|
|
93
86
|
.mfui-tabs__tab-inner_current {
|
|
94
|
-
color:
|
|
95
|
-
fill:
|
|
87
|
+
color: var(--brandGreen);
|
|
88
|
+
fill: var(--brandGreen);
|
|
96
89
|
}
|
|
97
90
|
.mfui-tabs__tab-icon {
|
|
98
91
|
width: 32px;
|
|
@@ -116,7 +109,7 @@ h5 {
|
|
|
116
109
|
bottom: 0;
|
|
117
110
|
left: 0;
|
|
118
111
|
height: 2px;
|
|
119
|
-
background-color:
|
|
112
|
+
background-color: var(--brandGreen);
|
|
120
113
|
-webkit-transition-duration: 0.3s;
|
|
121
114
|
transition-duration: 0.3s;
|
|
122
115
|
}
|
|
@@ -128,11 +121,11 @@ h5 {
|
|
|
128
121
|
width: 16px;
|
|
129
122
|
height: 16px;
|
|
130
123
|
border-radius: 50%;
|
|
131
|
-
background-color:
|
|
124
|
+
background-color: var(--content);
|
|
132
125
|
-webkit-transform: translateY(-50%);
|
|
133
126
|
transform: translateY(-50%);
|
|
134
127
|
cursor: pointer;
|
|
135
|
-
fill:
|
|
128
|
+
fill: var(--base);
|
|
136
129
|
}
|
|
137
130
|
@media screen and (max-width: 1023px) {
|
|
138
131
|
.mfui-tabs__arrow {
|
|
@@ -206,7 +199,7 @@ h5 {
|
|
|
206
199
|
justify-content: center;
|
|
207
200
|
}
|
|
208
201
|
.mfui-tabs_h-align_center .mfui-tabs__tab {
|
|
209
|
-
border-bottom: 1px solid
|
|
202
|
+
border-bottom: 1px solid var(--stcWhite);
|
|
210
203
|
}
|
|
211
204
|
.mfui-tabs_h-align_left .mfui-tabs__swiper-wrapper {
|
|
212
205
|
position: relative;
|
|
@@ -218,7 +211,7 @@ h5 {
|
|
|
218
211
|
left: 0;
|
|
219
212
|
width: 100%;
|
|
220
213
|
height: 1px;
|
|
221
|
-
background-color:
|
|
214
|
+
background-color: var(--spbSky2);
|
|
222
215
|
}
|
|
223
216
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
224
217
|
.mfui-tabs_indents .mfui-tabs__swiper {
|
|
@@ -238,37 +231,37 @@ h5 {
|
|
|
238
231
|
right: 0;
|
|
239
232
|
left: 0;
|
|
240
233
|
z-index: 100;
|
|
241
|
-
background-color:
|
|
234
|
+
background-color: var(--base);
|
|
242
235
|
}
|
|
243
236
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__swiper:before {
|
|
244
237
|
left: 0;
|
|
245
|
-
background: -webkit-gradient(linear, left top, right top, from(
|
|
246
|
-
background: linear-gradient(to right,
|
|
238
|
+
background: -webkit-gradient(linear, left top, right top, from(var(--brandGreen)), to(transparent));
|
|
239
|
+
background: linear-gradient(to right, var(--brandGreen), transparent);
|
|
247
240
|
}
|
|
248
241
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__swiper:after {
|
|
249
242
|
right: 0;
|
|
250
|
-
background: -webkit-gradient(linear, right top, left top, from(
|
|
251
|
-
background: linear-gradient(to left,
|
|
243
|
+
background: -webkit-gradient(linear, right top, left top, from(var(--brandGreen)), to(transparent));
|
|
244
|
+
background: linear-gradient(to left, var(--brandGreen), transparent);
|
|
252
245
|
}
|
|
253
246
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab {
|
|
254
|
-
border-color:
|
|
247
|
+
border-color: var(--stcBlack5);
|
|
255
248
|
}
|
|
256
249
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner {
|
|
257
|
-
color:
|
|
258
|
-
fill:
|
|
250
|
+
color: var(--stcWhite50);
|
|
251
|
+
fill: var(--stcWhite50);
|
|
259
252
|
}
|
|
260
253
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner:hover {
|
|
261
|
-
color:
|
|
262
|
-
fill:
|
|
254
|
+
color: var(--stcWhite);
|
|
255
|
+
fill: var(--stcWhite);
|
|
263
256
|
}
|
|
264
257
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner_current {
|
|
265
|
-
color:
|
|
266
|
-
fill:
|
|
258
|
+
color: var(--stcWhite);
|
|
259
|
+
fill: var(--stcWhite);
|
|
267
260
|
}
|
|
268
261
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__underline {
|
|
269
|
-
background-color:
|
|
262
|
+
background-color: var(--stcWhite);
|
|
270
263
|
}
|
|
271
264
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__arrow {
|
|
272
|
-
background-color:
|
|
273
|
-
fill:
|
|
265
|
+
background-color: var(--stcWhite);
|
|
266
|
+
fill: var(--brandGreen);
|
|
274
267
|
}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.mfui-text-field {
|
|
9
2
|
font-family: inherit;
|
|
10
3
|
font-size: 15px;
|
|
11
4
|
line-height: 24px;
|
|
12
|
-
color:
|
|
5
|
+
color: var(--content);
|
|
13
6
|
}
|
|
14
7
|
.mfui-text-field__field {
|
|
15
8
|
font-family: inherit;
|
|
@@ -45,13 +38,13 @@ h5 {
|
|
|
45
38
|
overflow: auto;
|
|
46
39
|
}
|
|
47
40
|
.mfui-text-field input::-webkit-input-placeholder {
|
|
48
|
-
color:
|
|
41
|
+
color: var(--spbSky3);
|
|
49
42
|
}
|
|
50
43
|
.mfui-text-field input:-moz-placeholder {
|
|
51
|
-
color:
|
|
44
|
+
color: var(--spbSky3);
|
|
52
45
|
}
|
|
53
46
|
.mfui-text-field input:-ms-input-placeholder {
|
|
54
|
-
color:
|
|
47
|
+
color: var(--spbSky3);
|
|
55
48
|
}
|
|
56
49
|
.mfui-text-field input::-ms-clear,
|
|
57
50
|
.mfui-text-field input::-ms-reveal {
|
|
@@ -62,7 +55,7 @@ h5 {
|
|
|
62
55
|
-webkit-box-flex: 1;
|
|
63
56
|
-ms-flex: 1 0 100px;
|
|
64
57
|
flex: 1 0 100px;
|
|
65
|
-
background:
|
|
58
|
+
background: var(--base);
|
|
66
59
|
}
|
|
67
60
|
.mfui-text-field__icon-box {
|
|
68
61
|
position: absolute;
|
|
@@ -83,6 +76,7 @@ h5 {
|
|
|
83
76
|
box-sizing: border-box;
|
|
84
77
|
padding-right: 16px;
|
|
85
78
|
text-align: center;
|
|
79
|
+
fill: var(--content);
|
|
86
80
|
}
|
|
87
81
|
.mfui-text-field__icon-box_error,
|
|
88
82
|
.mfui-text-field__icon-box_password,
|
|
@@ -105,7 +99,7 @@ h5 {
|
|
|
105
99
|
}
|
|
106
100
|
.mfui-text-field__require-mark {
|
|
107
101
|
margin-left: 1px;
|
|
108
|
-
color:
|
|
102
|
+
color: var(--fury);
|
|
109
103
|
font-size: 20px;
|
|
110
104
|
line-height: 0;
|
|
111
105
|
}
|
|
@@ -123,64 +117,64 @@ h5 {
|
|
|
123
117
|
opacity: 0.5;
|
|
124
118
|
}
|
|
125
119
|
.mfui-text-field__counter_error {
|
|
126
|
-
color:
|
|
120
|
+
color: var(--fury);
|
|
127
121
|
opacity: 1;
|
|
128
122
|
}
|
|
129
123
|
.mfui-text-field_theme_default .mfui-text-field__field {
|
|
130
|
-
border: 1px solid
|
|
131
|
-
color:
|
|
124
|
+
border: 1px solid var(--spbSky2);
|
|
125
|
+
color: var(--content);
|
|
132
126
|
background-color: transparent;
|
|
133
127
|
}
|
|
134
128
|
.mfui-text-field_theme_default .mfui-text-field__field-wrapper_no-touch:hover .mfui-text-field__field,
|
|
135
129
|
.mfui-text-field_theme_default .mfui-text-field__field:focus {
|
|
136
|
-
border-color:
|
|
130
|
+
border-color: var(--content);
|
|
137
131
|
}
|
|
138
132
|
.mfui-text-field_theme_default.mfui-text-field_valid .mfui-text-field__field-wrapper_no-touch:hover .mfui-text-field__field,
|
|
139
133
|
.mfui-text-field_theme_default.mfui-text-field_valid .mfui-text-field__field {
|
|
140
|
-
border-color:
|
|
134
|
+
border-color: var(--brandGreen);
|
|
141
135
|
}
|
|
142
136
|
.mfui-text-field_theme_default.mfui-text-field_valid .mfui-text-field__icon {
|
|
143
|
-
fill:
|
|
137
|
+
fill: var(--brandGreen);
|
|
144
138
|
}
|
|
145
139
|
.mfui-text-field_theme_default.mfui-text-field_error .mfui-text-field__field-wrapper:hover .mfui-text-field__field,
|
|
146
140
|
.mfui-text-field_theme_default.mfui-text-field_error .mfui-text-field__field {
|
|
147
|
-
border-color:
|
|
141
|
+
border-color: var(--fury);
|
|
148
142
|
}
|
|
149
143
|
.mfui-text-field_theme_default.mfui-text-field_error .mfui-text-field__icon {
|
|
150
|
-
fill:
|
|
144
|
+
fill: var(--fury);
|
|
151
145
|
}
|
|
152
146
|
.mfui-text-field_theme_default.mfui-text-field_error .mfui-text-field__text_error {
|
|
153
|
-
color:
|
|
147
|
+
color: var(--fury);
|
|
154
148
|
}
|
|
155
149
|
.mfui-text-field_theme_white .mfui-text-field__field {
|
|
156
|
-
border: 1px solid
|
|
157
|
-
color:
|
|
150
|
+
border: 1px solid var(--base);
|
|
151
|
+
color: var(--content);
|
|
158
152
|
}
|
|
159
153
|
.mfui-text-field_theme_white .mfui-text-field__field-wrapper:hover .mfui-text-field__field,
|
|
160
154
|
.mfui-text-field_theme_white .mfui-text-field__field:focus {
|
|
161
|
-
border-color:
|
|
155
|
+
border-color: var(--content);
|
|
162
156
|
}
|
|
163
157
|
.mfui-text-field_theme_white.mfui-text-field_error .mfui-text-field__field-wrapper:hover .mfui-text-field__field,
|
|
164
158
|
.mfui-text-field_theme_white.mfui-text-field_error .mfui-text-field__field {
|
|
165
|
-
border-color:
|
|
159
|
+
border-color: var(--fury);
|
|
166
160
|
}
|
|
167
161
|
.mfui-text-field_theme_white.mfui-text-field_error .mfui-text-field__icon {
|
|
168
|
-
fill:
|
|
162
|
+
fill: var(--fury);
|
|
169
163
|
}
|
|
170
164
|
.mfui-text-field_theme_white.mfui-text-field_error .mfui-text-field__text_error {
|
|
171
|
-
color:
|
|
165
|
+
color: var(--fury);
|
|
172
166
|
}
|
|
173
167
|
.mfui-text-field__text_success {
|
|
174
|
-
color:
|
|
168
|
+
color: var(--brandGreen);
|
|
175
169
|
}
|
|
176
170
|
.mfui-text-field_disabled .mfui-text-field__field-wrapper {
|
|
177
|
-
background-color:
|
|
171
|
+
background-color: var(--spbSky1) !important;
|
|
178
172
|
}
|
|
179
173
|
.mfui-text-field_disabled .mfui-text-field__field {
|
|
180
|
-
border-color:
|
|
181
|
-
color:
|
|
174
|
+
border-color: var(--spbSky1) !important;
|
|
175
|
+
color: var(--content) !important;
|
|
182
176
|
cursor: default !important;
|
|
183
|
-
-webkit-text-fill-color:
|
|
177
|
+
-webkit-text-fill-color: var(--content) !important;
|
|
184
178
|
}
|
|
185
179
|
.mfui-text-field_disabled .mfui-text-field__icon-box {
|
|
186
180
|
cursor: default !important;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.mfui-text-link {
|
|
9
2
|
font-family: inherit;
|
|
10
3
|
font-size: inherit;
|
|
@@ -34,20 +27,23 @@ h5 {
|
|
|
34
27
|
.mfui-text-link_underline-style_none:hover {
|
|
35
28
|
text-decoration: none;
|
|
36
29
|
}
|
|
30
|
+
.mfui-text-link_color_default {
|
|
31
|
+
color: var(--content);
|
|
32
|
+
}
|
|
33
|
+
.mfui-text-link_color_black {
|
|
34
|
+
color: var(--stcBlack);
|
|
35
|
+
}
|
|
37
36
|
.mfui-text-link_color_white {
|
|
38
|
-
color:
|
|
37
|
+
color: var(--stcWhite);
|
|
39
38
|
}
|
|
40
39
|
.mfui-text-link_color_blue {
|
|
41
|
-
color:
|
|
40
|
+
color: var(--systemBlue);
|
|
42
41
|
}
|
|
43
42
|
.mfui-text-link_color_green {
|
|
44
|
-
color:
|
|
45
|
-
}
|
|
46
|
-
.mfui-text-link_color_black {
|
|
47
|
-
color: #333333;
|
|
43
|
+
color: var(--brandGreen);
|
|
48
44
|
}
|
|
49
45
|
.mfui-text-link_color_gray {
|
|
50
|
-
color:
|
|
46
|
+
color: var(--spbSky3);
|
|
51
47
|
}
|
|
52
48
|
.mfui-text-link_color_inherit {
|
|
53
49
|
color: inherit;
|
|
@@ -3,7 +3,7 @@ import './TextLink.less';
|
|
|
3
3
|
import { ILinkProps } from '../Link/Link';
|
|
4
4
|
export interface ITextLinkProps extends ILinkProps {
|
|
5
5
|
/** Цвет */
|
|
6
|
-
color?: 'white' | 'black' | 'gray' | '
|
|
6
|
+
color?: 'default' | 'white' | 'black' | 'gray' | 'green' | 'blue' | 'inherit';
|
|
7
7
|
/** Отображение подчеркивания */
|
|
8
8
|
underlineVisibility?: 'hover' | 'always';
|
|
9
9
|
/** Стиль подчеркивания */
|
|
@@ -31,7 +31,7 @@ var TextLink = function TextLink(_ref) {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
TextLink.propTypes = {
|
|
34
|
-
color: PropTypes.oneOf(['
|
|
34
|
+
color: PropTypes.oneOf(['default', 'white', 'black', 'gray', 'green', 'inherit']),
|
|
35
35
|
underlineVisibility: PropTypes.oneOf(['hover', 'always']),
|
|
36
36
|
underlineStyle: PropTypes.oneOf(['solid', 'dashed', 'border', 'none']),
|
|
37
37
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.string, PropTypes.node])
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.mfui-tooltip {
|
|
9
2
|
z-index: 100;
|
|
10
3
|
visibility: hidden;
|
|
@@ -48,7 +41,7 @@ h5 {
|
|
|
48
41
|
left: 0;
|
|
49
42
|
-webkit-transform: rotate(45deg);
|
|
50
43
|
transform: rotate(45deg);
|
|
51
|
-
background-color:
|
|
44
|
+
background-color: var(--base);
|
|
52
45
|
}
|
|
53
46
|
.mfui-tooltip__arrow-shadow {
|
|
54
47
|
width: 12px;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.color-item {
|
|
9
2
|
display: -webkit-box;
|
|
10
3
|
display: -ms-flexbox;
|
|
@@ -46,7 +39,7 @@ h5 {
|
|
|
46
39
|
line-height: 20px;
|
|
47
40
|
}
|
|
48
41
|
.color-item__code {
|
|
49
|
-
color:
|
|
42
|
+
color: var(--spbSky3);
|
|
50
43
|
font-size: 12px;
|
|
51
44
|
line-height: 18px;
|
|
52
45
|
}
|
|
@@ -37,7 +37,7 @@ var ColorItem = function ColorItem(_ref) {
|
|
|
37
37
|
}), !!parentColorCode && /*#__PURE__*/React.createElement("div", {
|
|
38
38
|
className: cn('parent-color'),
|
|
39
39
|
style: {
|
|
40
|
-
background: parentColorCode
|
|
40
|
+
background: "var(--".concat(parentColorCode, ")")
|
|
41
41
|
}
|
|
42
42
|
})), /*#__PURE__*/React.createElement("span", {
|
|
43
43
|
className: cn('name')
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
h1,
|
|
2
|
-
h2,
|
|
3
|
-
h3,
|
|
4
|
-
h4,
|
|
5
|
-
h5 {
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
1
|
.colors__inner {
|
|
9
2
|
margin: 0 -80px;
|
|
10
3
|
padding: 56px 80px 40px;
|
|
11
|
-
background-color:
|
|
4
|
+
background-color: var(--spbSky0);
|
|
12
5
|
}
|
|
13
6
|
@media screen and (max-width: 1120px) {
|
|
14
7
|
.colors__inner {
|
|
@@ -90,7 +83,6 @@ h5 {
|
|
|
90
83
|
.colors__description {
|
|
91
84
|
position: relative;
|
|
92
85
|
padding-top: 15px;
|
|
93
|
-
color: #33333380;
|
|
94
86
|
font-size: 12px;
|
|
95
87
|
line-height: 18px;
|
|
96
88
|
text-align: center;
|
|
@@ -198,7 +190,7 @@ h5 {
|
|
|
198
190
|
display: block;
|
|
199
191
|
width: 100%;
|
|
200
192
|
height: 1px;
|
|
201
|
-
background-color:
|
|
193
|
+
background-color: var(--spbSky2);
|
|
202
194
|
-webkit-transform: translateY(-50%);
|
|
203
195
|
transform: translateY(-50%);
|
|
204
196
|
}
|
|
@@ -209,7 +201,7 @@ h5 {
|
|
|
209
201
|
position: absolute;
|
|
210
202
|
width: 1px;
|
|
211
203
|
height: 4px;
|
|
212
|
-
background-color:
|
|
204
|
+
background-color: var(--spbSky2);
|
|
213
205
|
}
|
|
214
206
|
.colors__underline:after,
|
|
215
207
|
.colors__underline:before {
|
|
@@ -11,10 +11,14 @@ require("core-js/modules/es.symbol");
|
|
|
11
11
|
|
|
12
12
|
require("core-js/modules/es.symbol.description");
|
|
13
13
|
|
|
14
|
+
require("core-js/modules/es.array.includes");
|
|
15
|
+
|
|
14
16
|
require("core-js/modules/es.array.map");
|
|
15
17
|
|
|
16
18
|
require("core-js/modules/es.function.name");
|
|
17
19
|
|
|
20
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
21
|
+
|
|
18
22
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
19
23
|
|
|
20
24
|
var React = _interopRequireWildcard(require("react"));
|
|
@@ -130,10 +134,55 @@ var basic = _colorsData["default"].basic,
|
|
|
130
134
|
gradientColors = _colorsData["default"].gradientColors,
|
|
131
135
|
staticColors = _colorsData["default"].staticColors,
|
|
132
136
|
staticOpacity = _colorsData["default"].staticOpacity,
|
|
133
|
-
soft = _colorsData["default"].soft;
|
|
137
|
+
soft = _colorsData["default"].soft; // TODO: refactor this
|
|
138
|
+
|
|
139
|
+
var getThemeFromLocalStorage = function getThemeFromLocalStorage() {
|
|
140
|
+
var theme = 'light';
|
|
141
|
+
|
|
142
|
+
if (typeof window !== 'undefined') {
|
|
143
|
+
var localStorageTheme = String(window.localStorage.getItem('theme'));
|
|
144
|
+
|
|
145
|
+
if (['light', 'dark'].includes(localStorageTheme)) {
|
|
146
|
+
theme = localStorageTheme;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return theme;
|
|
151
|
+
};
|
|
152
|
+
|
|
134
153
|
var cn = (0, _uiHelpers.cnCreate)('colors');
|
|
135
154
|
|
|
136
155
|
var Colors = function Colors() {
|
|
156
|
+
var _React$useState = React.useState(getThemeFromLocalStorage()),
|
|
157
|
+
_React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
|
|
158
|
+
setCurrentTheme = _React$useState2[1];
|
|
159
|
+
|
|
160
|
+
var getCurrentColorValue = function getCurrentColorValue(code) {
|
|
161
|
+
return typeof document !== 'undefined' ? document.documentElement.style.getPropertyValue("--".concat(code)) : '';
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
React.useEffect(function () {
|
|
165
|
+
// theme switcher from src/gatsby-theme-docz/components/SideBar/index.tsx
|
|
166
|
+
var themeSwitcher = document.querySelector('[data-current-theme]');
|
|
167
|
+
|
|
168
|
+
if (themeSwitcher) {
|
|
169
|
+
var themeSwitcherObserver = new MutationObserver(function (mutationsList) {
|
|
170
|
+
var data = mutationsList[0];
|
|
171
|
+
setCurrentTheme(data.oldValue === 'light' ? 'dark' : 'light');
|
|
172
|
+
});
|
|
173
|
+
var config = {
|
|
174
|
+
attributeOldValue: true,
|
|
175
|
+
attributeFilter: ['data-current-theme']
|
|
176
|
+
};
|
|
177
|
+
themeSwitcherObserver.observe(themeSwitcher, config);
|
|
178
|
+
return function () {
|
|
179
|
+
return themeSwitcherObserver.disconnect();
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return undefined;
|
|
184
|
+
}, []);
|
|
185
|
+
|
|
137
186
|
var renderUnderline = function renderUnderline() {
|
|
138
187
|
return /*#__PURE__*/React.createElement("div", {
|
|
139
188
|
className: cn('underline')
|
|
@@ -169,7 +218,7 @@ var Colors = function Colors() {
|
|
|
169
218
|
return /*#__PURE__*/React.createElement(_ColorItem["default"], {
|
|
170
219
|
className: cn('item'),
|
|
171
220
|
colorName: name,
|
|
172
|
-
colorCode: code,
|
|
221
|
+
colorCode: getCurrentColorValue(code),
|
|
173
222
|
key: name,
|
|
174
223
|
border: border
|
|
175
224
|
});
|
|
@@ -199,7 +248,7 @@ var Colors = function Colors() {
|
|
|
199
248
|
return /*#__PURE__*/React.createElement(_ColorItem["default"], {
|
|
200
249
|
className: cn('item'),
|
|
201
250
|
colorName: name,
|
|
202
|
-
colorCode: code,
|
|
251
|
+
colorCode: getCurrentColorValue(code),
|
|
203
252
|
gradient: gradient,
|
|
204
253
|
key: name,
|
|
205
254
|
border: border
|
|
@@ -231,7 +280,7 @@ var Colors = function Colors() {
|
|
|
231
280
|
soft: true
|
|
232
281
|
}),
|
|
233
282
|
colorName: name,
|
|
234
|
-
colorCode: code,
|
|
283
|
+
colorCode: getCurrentColorValue(code),
|
|
235
284
|
parentColorCode: parentColor,
|
|
236
285
|
key: name
|
|
237
286
|
});
|