@megafon/ui-core 2.1.2 → 3.0.0-beta.0
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 +50 -0
- package/dist/es/colors/ColorItem/ColorItem.css +48 -1
- package/dist/es/colors/Colors.css +54 -7
- package/dist/es/colors/Colors.js +2 -2
- package/dist/es/colors/colorsData.js +24 -8
- package/dist/es/components/Accordion/Accordion.css +53 -5
- package/dist/es/components/Banner/Banner.css +49 -2
- package/dist/es/components/Banner/BannerDot.css +51 -4
- package/dist/es/components/Button/Button.css +124 -67
- package/dist/es/components/Calendar/Calendar.css +47 -0
- package/dist/es/components/Calendar/components/Day/Day.css +57 -10
- package/dist/es/components/Calendar/components/Month/Month.css +50 -3
- package/dist/es/components/Carousel/Carousel.css +51 -4
- package/dist/es/components/Checkbox/Checkbox.css +65 -18
- package/dist/es/components/ContentArea/ContentArea.css +63 -20
- package/dist/es/components/ContentArea/ContentArea.d.ts +3 -2
- package/dist/es/components/ContentArea/ContentArea.js +13 -6
- 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 +47 -0
- package/dist/es/components/Header/Header.css +55 -5
- 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 +47 -0
- package/dist/es/components/List/List.css +56 -6
- 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 +47 -0
- package/dist/es/components/Logo/Logo.css +47 -0
- package/dist/es/components/Logo/Logo.js +4 -8
- package/dist/es/components/NavArrow/NavArrow.css +52 -5
- package/dist/es/components/Notification/Notification.css +88 -24
- package/dist/es/components/Pagination/Pagination.css +47 -0
- 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 +54 -10
- 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 +52 -5
- package/dist/es/components/RadioButton/RadioButton.css +54 -7
- 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 +67 -18
- package/dist/es/components/Select/Select.css +76 -28
- package/dist/es/components/Switcher/Switcher.css +65 -21
- package/dist/es/components/Tabs/Tabs.css +77 -30
- package/dist/es/components/Tabs/Tabs.js +41 -32
- package/dist/es/components/TextField/TextField.css +74 -26
- package/dist/es/components/TextLink/TextLink.css +57 -7
- 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 +49 -1
- package/dist/es/components/Tooltip/Tooltip.css +48 -1
- package/dist/es/styles/base.css +54 -0
- package/dist/lib/colors/ColorItem/ColorItem.css +48 -1
- package/dist/lib/colors/Colors.css +54 -7
- package/dist/lib/colors/Colors.js +2 -2
- package/dist/lib/colors/colorsData.js +24 -8
- package/dist/lib/components/Accordion/Accordion.css +53 -5
- package/dist/lib/components/Banner/Banner.css +49 -2
- package/dist/lib/components/Banner/BannerDot.css +51 -4
- package/dist/lib/components/Button/Button.css +124 -67
- package/dist/lib/components/Calendar/Calendar.css +47 -0
- package/dist/lib/components/Calendar/components/Day/Day.css +57 -10
- package/dist/lib/components/Calendar/components/Month/Month.css +50 -3
- package/dist/lib/components/Carousel/Carousel.css +51 -4
- package/dist/lib/components/Checkbox/Checkbox.css +65 -18
- package/dist/lib/components/ContentArea/ContentArea.css +63 -20
- package/dist/lib/components/ContentArea/ContentArea.d.ts +3 -2
- package/dist/lib/components/ContentArea/ContentArea.js +13 -6
- 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 +47 -0
- package/dist/lib/components/Header/Header.css +55 -5
- 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 +47 -0
- package/dist/lib/components/List/List.css +56 -6
- 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 +47 -0
- package/dist/lib/components/Logo/Logo.css +47 -0
- package/dist/lib/components/Logo/Logo.js +4 -8
- package/dist/lib/components/NavArrow/NavArrow.css +52 -5
- package/dist/lib/components/Notification/Notification.css +88 -24
- package/dist/lib/components/Pagination/Pagination.css +47 -0
- 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 +54 -10
- 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 +52 -5
- package/dist/lib/components/RadioButton/RadioButton.css +54 -7
- 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 +67 -18
- package/dist/lib/components/Select/Select.css +76 -28
- package/dist/lib/components/Switcher/Switcher.css +65 -21
- package/dist/lib/components/Tabs/Tabs.css +77 -30
- package/dist/lib/components/Tabs/Tabs.js +41 -32
- package/dist/lib/components/TextField/TextField.css +74 -26
- package/dist/lib/components/TextLink/TextLink.css +57 -7
- 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 +49 -1
- package/dist/lib/components/Tooltip/Tooltip.css +48 -1
- package/dist/lib/styles/base.css +54 -0
- package/package.json +4 -4
- package/styles/base.less +61 -75
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--green: #00B956;
|
|
3
|
+
--purple: #731982;
|
|
4
|
+
--base: #FFFFFF;
|
|
5
|
+
--content: #333333;
|
|
6
|
+
--spbSky0: #F6F6F6;
|
|
7
|
+
--spbSky1: #EDEDED;
|
|
8
|
+
--spbSky2: #D8D8D8;
|
|
9
|
+
--spbSky3: #999999;
|
|
10
|
+
--warmRedC: #EB5A40;
|
|
11
|
+
--137C: #FFA717;
|
|
12
|
+
--311C: #5BD9E5;
|
|
13
|
+
--reflexBlue: #444189;
|
|
14
|
+
--fury: #F62434;
|
|
15
|
+
--systemBlue: #34AAF2;
|
|
16
|
+
--background: #FFFFFF;
|
|
17
|
+
--buttonHoverGreen: #10E272;
|
|
18
|
+
--buttonhoverPurple: #534455;
|
|
19
|
+
--buttonDown: #404D46;
|
|
20
|
+
--gradientBasic: linear-gradient(90deg, #01873F 0%, #00B956 74%, #14CD6A 100%);
|
|
21
|
+
--gradientVIP: linear-gradient(90deg, #5B1168 0%, #731982 74%, #821E93 100%);
|
|
22
|
+
--gradientExclusive: linear-gradient(90deg, #2A2674 0%, #444189 74%, #504D93 100%);
|
|
23
|
+
--STCWhite: #FFFFFF;
|
|
24
|
+
--STCBlack: #333333;
|
|
25
|
+
--STCWhite5: #FFFFFF0D;
|
|
26
|
+
--STCWhite10: #FFFFFF1A;
|
|
27
|
+
--STCWhite20: #FFFFFF33;
|
|
28
|
+
--STCWhite50: #FFFFFF80;
|
|
29
|
+
--STCBlack5: #3333330D;
|
|
30
|
+
--STCBlack10: #3333331A;
|
|
31
|
+
--STCBlack20: #33333333;
|
|
32
|
+
--STCBlack50: #33333380;
|
|
33
|
+
--green80: #0CDC78;
|
|
34
|
+
--green20: #DDFFEC;
|
|
35
|
+
--purple80: #AA67C1;
|
|
36
|
+
--purple20: #FFEEFF;
|
|
37
|
+
--warmRedC80: #FF765D;
|
|
38
|
+
--warmRedC20: #FFCFC7;
|
|
39
|
+
--137C80: #FFB945;
|
|
40
|
+
--137C20: #FFEDD1;
|
|
41
|
+
--311C80: #62E3FF;
|
|
42
|
+
--311C20: #E1FAFF;
|
|
43
|
+
--reflexBlue80: #554FC9;
|
|
44
|
+
--reflexBlue20: #EBEAFF;
|
|
45
|
+
--fury80: #F8505D;
|
|
46
|
+
--fury20: #FFC5C9;
|
|
47
|
+
}
|
|
1
48
|
h1,
|
|
2
49
|
h2,
|
|
3
50
|
h3,
|
|
@@ -13,7 +60,7 @@ h5 {
|
|
|
13
60
|
position: relative;
|
|
14
61
|
z-index: 1;
|
|
15
62
|
min-height: 40px;
|
|
16
|
-
color:
|
|
63
|
+
color: var(--content);
|
|
17
64
|
}
|
|
18
65
|
.mfui-select__inner {
|
|
19
66
|
position: relative;
|
|
@@ -25,8 +72,8 @@ h5 {
|
|
|
25
72
|
box-sizing: border-box;
|
|
26
73
|
width: 100%;
|
|
27
74
|
height: 48px;
|
|
28
|
-
border: 1px solid
|
|
29
|
-
background-color:
|
|
75
|
+
border: 1px solid var(--spbSky2);
|
|
76
|
+
background-color: var(--base);
|
|
30
77
|
outline: none;
|
|
31
78
|
cursor: pointer;
|
|
32
79
|
}
|
|
@@ -40,7 +87,7 @@ h5 {
|
|
|
40
87
|
border-right: 5px solid transparent;
|
|
41
88
|
border-bottom: none;
|
|
42
89
|
border-left: 5px solid transparent;
|
|
43
|
-
color:
|
|
90
|
+
color: var(--content);
|
|
44
91
|
-webkit-transform: translateY(-50%);
|
|
45
92
|
transform: translateY(-50%);
|
|
46
93
|
cursor: pointer;
|
|
@@ -59,6 +106,7 @@ h5 {
|
|
|
59
106
|
border: none;
|
|
60
107
|
border-radius: 0;
|
|
61
108
|
overflow: auto;
|
|
109
|
+
color: var(--content);
|
|
62
110
|
background-color: transparent;
|
|
63
111
|
outline: none;
|
|
64
112
|
-webkit-box-shadow: none;
|
|
@@ -70,7 +118,7 @@ h5 {
|
|
|
70
118
|
appearance: none;
|
|
71
119
|
}
|
|
72
120
|
.mfui-select_no-touch .mfui-select__control:hover {
|
|
73
|
-
border-color:
|
|
121
|
+
border-color: var(--content);
|
|
74
122
|
}
|
|
75
123
|
.mfui-select__title {
|
|
76
124
|
position: relative;
|
|
@@ -86,7 +134,7 @@ h5 {
|
|
|
86
134
|
outline: none;
|
|
87
135
|
}
|
|
88
136
|
.mfui-select__title_placeholder {
|
|
89
|
-
color:
|
|
137
|
+
color: var(--spbSky3);
|
|
90
138
|
}
|
|
91
139
|
.mfui-select__title-inner {
|
|
92
140
|
position: relative;
|
|
@@ -111,26 +159,26 @@ h5 {
|
|
|
111
159
|
right: 0;
|
|
112
160
|
bottom: 0;
|
|
113
161
|
width: 40px;
|
|
114
|
-
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(
|
|
115
|
-
background: linear-gradient(to right, rgba(255, 255, 255, 0),
|
|
162
|
+
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(var(--base)));
|
|
163
|
+
background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--base));
|
|
116
164
|
}
|
|
117
165
|
.mfui-select__require-mark {
|
|
118
166
|
margin-left: 1px;
|
|
119
|
-
color:
|
|
167
|
+
color: var(--fury);
|
|
120
168
|
font-size: 20px;
|
|
121
169
|
line-height: 0;
|
|
122
170
|
}
|
|
123
171
|
.mfui-select input::-webkit-input-placeholder {
|
|
124
|
-
color:
|
|
172
|
+
color: var(--spbSky3);
|
|
125
173
|
}
|
|
126
174
|
.mfui-select input::-moz-placeholder {
|
|
127
|
-
color:
|
|
175
|
+
color: var(--spbSky3);
|
|
128
176
|
}
|
|
129
177
|
.mfui-select input:-moz-placeholder {
|
|
130
|
-
color:
|
|
178
|
+
color: var(--spbSky3);
|
|
131
179
|
}
|
|
132
180
|
.mfui-select input:-ms-input-placeholder {
|
|
133
|
-
color:
|
|
181
|
+
color: var(--spbSky3);
|
|
134
182
|
}
|
|
135
183
|
.mfui-select__list {
|
|
136
184
|
position: absolute;
|
|
@@ -139,7 +187,7 @@ h5 {
|
|
|
139
187
|
left: 0;
|
|
140
188
|
z-index: 10;
|
|
141
189
|
display: none;
|
|
142
|
-
background-color:
|
|
190
|
+
background-color: var(--base);
|
|
143
191
|
-webkit-box-shadow: 0 1px 16px rgba(0, 0, 0, 0.2);
|
|
144
192
|
box-shadow: 0 1px 16px rgba(0, 0, 0, 0.2);
|
|
145
193
|
}
|
|
@@ -153,11 +201,11 @@ h5 {
|
|
|
153
201
|
.mfui-select__list-item {
|
|
154
202
|
font-family: inherit;
|
|
155
203
|
padding: 8px 32px;
|
|
156
|
-
background-color:
|
|
204
|
+
background-color: var(--base);
|
|
157
205
|
cursor: pointer;
|
|
158
206
|
}
|
|
159
207
|
.mfui-select__list-item_active {
|
|
160
|
-
background-color:
|
|
208
|
+
background-color: var(--spbSky0);
|
|
161
209
|
}
|
|
162
210
|
.mfui-select__item-title {
|
|
163
211
|
position: relative;
|
|
@@ -180,12 +228,12 @@ h5 {
|
|
|
180
228
|
right: 0;
|
|
181
229
|
bottom: 0;
|
|
182
230
|
width: 40px;
|
|
183
|
-
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(
|
|
184
|
-
background: linear-gradient(to right, rgba(255, 255, 255, 0),
|
|
231
|
+
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(var(--base)));
|
|
232
|
+
background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--base));
|
|
185
233
|
}
|
|
186
234
|
.mfui-select__list-item_active .mfui-select__item-title:after {
|
|
187
|
-
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(
|
|
188
|
-
background: linear-gradient(to right, rgba(255, 255, 255, 0),
|
|
235
|
+
background: -webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), to(var(--spbSky0)));
|
|
236
|
+
background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--spbSky0));
|
|
189
237
|
}
|
|
190
238
|
.mfui-select__not-found {
|
|
191
239
|
padding: 8px 32px;
|
|
@@ -208,26 +256,26 @@ h5 {
|
|
|
208
256
|
}
|
|
209
257
|
.mfui-select_open .mfui-select__list {
|
|
210
258
|
display: block;
|
|
211
|
-
border-color:
|
|
259
|
+
border-color: var(--content);
|
|
212
260
|
}
|
|
213
261
|
.mfui-select_open .mfui-select__control {
|
|
214
|
-
border-color:
|
|
262
|
+
border-color: var(--content);
|
|
215
263
|
}
|
|
216
264
|
.mfui-select_valid .mfui-select__control {
|
|
217
|
-
border-color:
|
|
265
|
+
border-color: var(--green) !important;
|
|
218
266
|
}
|
|
219
267
|
.mfui-select_valid .mfui-select__text {
|
|
220
|
-
color:
|
|
268
|
+
color: var(--green);
|
|
221
269
|
}
|
|
222
270
|
.mfui-select_error .mfui-select__control {
|
|
223
|
-
border-color:
|
|
271
|
+
border-color: var(--fury) !important;
|
|
224
272
|
}
|
|
225
273
|
.mfui-select_error .mfui-select__text {
|
|
226
|
-
color:
|
|
274
|
+
color: var(--fury);
|
|
227
275
|
}
|
|
228
276
|
.mfui-select_disabled .mfui-select__control {
|
|
229
|
-
border-color:
|
|
230
|
-
background-color:
|
|
277
|
+
border-color: var(--spbSky1);
|
|
278
|
+
background-color: var(--spbSky1);
|
|
231
279
|
-webkit-user-select: none;
|
|
232
280
|
-moz-user-select: none;
|
|
233
281
|
-ms-user-select: none;
|
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--green: #00B956;
|
|
3
|
+
--purple: #731982;
|
|
4
|
+
--base: #FFFFFF;
|
|
5
|
+
--content: #333333;
|
|
6
|
+
--spbSky0: #F6F6F6;
|
|
7
|
+
--spbSky1: #EDEDED;
|
|
8
|
+
--spbSky2: #D8D8D8;
|
|
9
|
+
--spbSky3: #999999;
|
|
10
|
+
--warmRedC: #EB5A40;
|
|
11
|
+
--137C: #FFA717;
|
|
12
|
+
--311C: #5BD9E5;
|
|
13
|
+
--reflexBlue: #444189;
|
|
14
|
+
--fury: #F62434;
|
|
15
|
+
--systemBlue: #34AAF2;
|
|
16
|
+
--background: #FFFFFF;
|
|
17
|
+
--buttonHoverGreen: #10E272;
|
|
18
|
+
--buttonhoverPurple: #534455;
|
|
19
|
+
--buttonDown: #404D46;
|
|
20
|
+
--gradientBasic: linear-gradient(90deg, #01873F 0%, #00B956 74%, #14CD6A 100%);
|
|
21
|
+
--gradientVIP: linear-gradient(90deg, #5B1168 0%, #731982 74%, #821E93 100%);
|
|
22
|
+
--gradientExclusive: linear-gradient(90deg, #2A2674 0%, #444189 74%, #504D93 100%);
|
|
23
|
+
--STCWhite: #FFFFFF;
|
|
24
|
+
--STCBlack: #333333;
|
|
25
|
+
--STCWhite5: #FFFFFF0D;
|
|
26
|
+
--STCWhite10: #FFFFFF1A;
|
|
27
|
+
--STCWhite20: #FFFFFF33;
|
|
28
|
+
--STCWhite50: #FFFFFF80;
|
|
29
|
+
--STCBlack5: #3333330D;
|
|
30
|
+
--STCBlack10: #3333331A;
|
|
31
|
+
--STCBlack20: #33333333;
|
|
32
|
+
--STCBlack50: #33333380;
|
|
33
|
+
--green80: #0CDC78;
|
|
34
|
+
--green20: #DDFFEC;
|
|
35
|
+
--purple80: #AA67C1;
|
|
36
|
+
--purple20: #FFEEFF;
|
|
37
|
+
--warmRedC80: #FF765D;
|
|
38
|
+
--warmRedC20: #FFCFC7;
|
|
39
|
+
--137C80: #FFB945;
|
|
40
|
+
--137C20: #FFEDD1;
|
|
41
|
+
--311C80: #62E3FF;
|
|
42
|
+
--311C20: #E1FAFF;
|
|
43
|
+
--reflexBlue80: #554FC9;
|
|
44
|
+
--reflexBlue20: #EBEAFF;
|
|
45
|
+
--fury80: #F8505D;
|
|
46
|
+
--fury20: #FFC5C9;
|
|
47
|
+
}
|
|
1
48
|
h1,
|
|
2
49
|
h2,
|
|
3
50
|
h3,
|
|
@@ -8,47 +55,44 @@ h5 {
|
|
|
8
55
|
.mfui-switcher {
|
|
9
56
|
top: 22px;
|
|
10
57
|
right: 28px;
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
58
|
+
width: 40px;
|
|
59
|
+
height: 24px;
|
|
13
60
|
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);
|
|
61
|
+
background-color: var(--spbSky1);
|
|
17
62
|
cursor: pointer;
|
|
18
63
|
-webkit-transition: all 0.3s;
|
|
19
64
|
transition: all 0.3s;
|
|
20
65
|
}
|
|
21
66
|
.mfui-switcher_no-touch:hover {
|
|
22
|
-
background-color:
|
|
67
|
+
background-color: var(--spbSky1);
|
|
23
68
|
}
|
|
24
69
|
.mfui-switcher__pointer {
|
|
25
70
|
position: relative;
|
|
26
|
-
top:
|
|
27
|
-
left:
|
|
28
|
-
width:
|
|
29
|
-
height:
|
|
30
|
-
border: 1px solid #D8D8D8;
|
|
71
|
+
top: 2px;
|
|
72
|
+
left: 2px;
|
|
73
|
+
width: 20px;
|
|
74
|
+
height: 20px;
|
|
31
75
|
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);
|
|
76
|
+
background-color: var(--base);
|
|
35
77
|
-webkit-transition: all 0.3s;
|
|
36
78
|
transition: all 0.3s;
|
|
37
79
|
}
|
|
38
80
|
.mfui-switcher_checked {
|
|
39
|
-
background-color:
|
|
81
|
+
background-color: var(--green);
|
|
40
82
|
}
|
|
41
83
|
.mfui-switcher_checked .mfui-switcher__pointer {
|
|
42
|
-
left:
|
|
84
|
+
left: 18px;
|
|
43
85
|
}
|
|
44
86
|
.mfui-switcher_checked.mfui-switcher_no-touch:hover {
|
|
45
|
-
background-color:
|
|
87
|
+
background-color: var(--buttonHoverGreen);
|
|
46
88
|
}
|
|
47
89
|
.mfui-switcher_disabled {
|
|
48
|
-
background-color:
|
|
90
|
+
background-color: var(--spbSky1);
|
|
49
91
|
cursor: default;
|
|
50
92
|
}
|
|
51
|
-
.mfui-switcher_checked.mfui-
|
|
52
|
-
|
|
53
|
-
|
|
93
|
+
.mfui-switcher_disabled.mfui-switcher_checked.mfui-switcher_no-touch.mfui-switcher:hover {
|
|
94
|
+
background-color: var(--spbSky1);
|
|
95
|
+
}
|
|
96
|
+
.mfui-switcher_disabled .mfui-switcher__pointer {
|
|
97
|
+
background-color: var(--spbSky2);
|
|
54
98
|
}
|
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--green: #00B956;
|
|
3
|
+
--purple: #731982;
|
|
4
|
+
--base: #FFFFFF;
|
|
5
|
+
--content: #333333;
|
|
6
|
+
--spbSky0: #F6F6F6;
|
|
7
|
+
--spbSky1: #EDEDED;
|
|
8
|
+
--spbSky2: #D8D8D8;
|
|
9
|
+
--spbSky3: #999999;
|
|
10
|
+
--warmRedC: #EB5A40;
|
|
11
|
+
--137C: #FFA717;
|
|
12
|
+
--311C: #5BD9E5;
|
|
13
|
+
--reflexBlue: #444189;
|
|
14
|
+
--fury: #F62434;
|
|
15
|
+
--systemBlue: #34AAF2;
|
|
16
|
+
--background: #FFFFFF;
|
|
17
|
+
--buttonHoverGreen: #10E272;
|
|
18
|
+
--buttonhoverPurple: #534455;
|
|
19
|
+
--buttonDown: #404D46;
|
|
20
|
+
--gradientBasic: linear-gradient(90deg, #01873F 0%, #00B956 74%, #14CD6A 100%);
|
|
21
|
+
--gradientVIP: linear-gradient(90deg, #5B1168 0%, #731982 74%, #821E93 100%);
|
|
22
|
+
--gradientExclusive: linear-gradient(90deg, #2A2674 0%, #444189 74%, #504D93 100%);
|
|
23
|
+
--STCWhite: #FFFFFF;
|
|
24
|
+
--STCBlack: #333333;
|
|
25
|
+
--STCWhite5: #FFFFFF0D;
|
|
26
|
+
--STCWhite10: #FFFFFF1A;
|
|
27
|
+
--STCWhite20: #FFFFFF33;
|
|
28
|
+
--STCWhite50: #FFFFFF80;
|
|
29
|
+
--STCBlack5: #3333330D;
|
|
30
|
+
--STCBlack10: #3333331A;
|
|
31
|
+
--STCBlack20: #33333333;
|
|
32
|
+
--STCBlack50: #33333380;
|
|
33
|
+
--green80: #0CDC78;
|
|
34
|
+
--green20: #DDFFEC;
|
|
35
|
+
--purple80: #AA67C1;
|
|
36
|
+
--purple20: #FFEEFF;
|
|
37
|
+
--warmRedC80: #FF765D;
|
|
38
|
+
--warmRedC20: #FFCFC7;
|
|
39
|
+
--137C80: #FFB945;
|
|
40
|
+
--137C20: #FFEDD1;
|
|
41
|
+
--311C80: #62E3FF;
|
|
42
|
+
--311C20: #E1FAFF;
|
|
43
|
+
--reflexBlue80: #554FC9;
|
|
44
|
+
--reflexBlue20: #EBEAFF;
|
|
45
|
+
--fury80: #F8505D;
|
|
46
|
+
--fury20: #FFC5C9;
|
|
47
|
+
}
|
|
1
48
|
h1,
|
|
2
49
|
h2,
|
|
3
50
|
h3,
|
|
@@ -28,13 +75,13 @@ h5 {
|
|
|
28
75
|
}
|
|
29
76
|
.mfui-tabs__swiper:before {
|
|
30
77
|
left: 0;
|
|
31
|
-
background: -webkit-gradient(linear, left top, right top, from(
|
|
32
|
-
background: linear-gradient(to right,
|
|
78
|
+
background: -webkit-gradient(linear, left top, right top, from(var(--base)), to(rgba(255, 255, 255, 0)));
|
|
79
|
+
background: linear-gradient(to right, var(--base), rgba(255, 255, 255, 0));
|
|
33
80
|
}
|
|
34
81
|
.mfui-tabs__swiper:after {
|
|
35
82
|
right: 0;
|
|
36
|
-
background: -webkit-gradient(linear, right top, left top, from(
|
|
37
|
-
background: linear-gradient(to left,
|
|
83
|
+
background: -webkit-gradient(linear, right top, left top, from(var(--base)), to(rgba(255, 255, 255, 0)));
|
|
84
|
+
background: linear-gradient(to left, var(--base), rgba(255, 255, 255, 0));
|
|
38
85
|
}
|
|
39
86
|
.mfui-tabs__swiper_beginning:before {
|
|
40
87
|
display: none;
|
|
@@ -80,19 +127,19 @@ h5 {
|
|
|
80
127
|
-webkit-box-sizing: content-box;
|
|
81
128
|
box-sizing: content-box;
|
|
82
129
|
height: 32px;
|
|
83
|
-
color:
|
|
130
|
+
color: var(--content);
|
|
84
131
|
white-space: nowrap;
|
|
85
132
|
text-decoration: none;
|
|
86
133
|
cursor: pointer;
|
|
87
|
-
fill:
|
|
134
|
+
fill: var(--content);
|
|
88
135
|
}
|
|
89
136
|
.mfui-tabs__tab-inner:hover {
|
|
90
|
-
color:
|
|
91
|
-
fill:
|
|
137
|
+
color: var(--green);
|
|
138
|
+
fill: var(--green);
|
|
92
139
|
}
|
|
93
140
|
.mfui-tabs__tab-inner_current {
|
|
94
|
-
color:
|
|
95
|
-
fill:
|
|
141
|
+
color: var(--green);
|
|
142
|
+
fill: var(--green);
|
|
96
143
|
}
|
|
97
144
|
.mfui-tabs__tab-icon {
|
|
98
145
|
width: 32px;
|
|
@@ -116,7 +163,7 @@ h5 {
|
|
|
116
163
|
bottom: 0;
|
|
117
164
|
left: 0;
|
|
118
165
|
height: 2px;
|
|
119
|
-
background-color:
|
|
166
|
+
background-color: var(--green);
|
|
120
167
|
-webkit-transition-duration: 0.3s;
|
|
121
168
|
transition-duration: 0.3s;
|
|
122
169
|
}
|
|
@@ -128,11 +175,11 @@ h5 {
|
|
|
128
175
|
width: 16px;
|
|
129
176
|
height: 16px;
|
|
130
177
|
border-radius: 50%;
|
|
131
|
-
background-color:
|
|
178
|
+
background-color: var(--content);
|
|
132
179
|
-webkit-transform: translateY(-50%);
|
|
133
180
|
transform: translateY(-50%);
|
|
134
181
|
cursor: pointer;
|
|
135
|
-
fill:
|
|
182
|
+
fill: var(--base);
|
|
136
183
|
}
|
|
137
184
|
@media screen and (max-width: 1023px) {
|
|
138
185
|
.mfui-tabs__arrow {
|
|
@@ -206,7 +253,7 @@ h5 {
|
|
|
206
253
|
justify-content: center;
|
|
207
254
|
}
|
|
208
255
|
.mfui-tabs_h-align_center .mfui-tabs__tab {
|
|
209
|
-
border-bottom: 1px solid
|
|
256
|
+
border-bottom: 1px solid var(--stcWhite);
|
|
210
257
|
}
|
|
211
258
|
.mfui-tabs_h-align_left .mfui-tabs__swiper-wrapper {
|
|
212
259
|
position: relative;
|
|
@@ -218,7 +265,7 @@ h5 {
|
|
|
218
265
|
left: 0;
|
|
219
266
|
width: 100%;
|
|
220
267
|
height: 1px;
|
|
221
|
-
background-color:
|
|
268
|
+
background-color: var(--spbSky2);
|
|
222
269
|
}
|
|
223
270
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
224
271
|
.mfui-tabs_indents .mfui-tabs__swiper {
|
|
@@ -238,37 +285,37 @@ h5 {
|
|
|
238
285
|
right: 0;
|
|
239
286
|
left: 0;
|
|
240
287
|
z-index: 100;
|
|
241
|
-
background-color:
|
|
288
|
+
background-color: var(--base);
|
|
242
289
|
}
|
|
243
290
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__swiper:before {
|
|
244
291
|
left: 0;
|
|
245
|
-
background: -webkit-gradient(linear, left top, right top, from(
|
|
246
|
-
background: linear-gradient(to right,
|
|
292
|
+
background: -webkit-gradient(linear, left top, right top, from(var(--green)), to(transparent));
|
|
293
|
+
background: linear-gradient(to right, var(--green), transparent);
|
|
247
294
|
}
|
|
248
295
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__swiper:after {
|
|
249
296
|
right: 0;
|
|
250
|
-
background: -webkit-gradient(linear, right top, left top, from(
|
|
251
|
-
background: linear-gradient(to left,
|
|
297
|
+
background: -webkit-gradient(linear, right top, left top, from(var(--green)), to(transparent));
|
|
298
|
+
background: linear-gradient(to left, var(--green), transparent);
|
|
252
299
|
}
|
|
253
300
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab {
|
|
254
|
-
border-color:
|
|
301
|
+
border-color: var(--stcBlack5);
|
|
255
302
|
}
|
|
256
303
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner {
|
|
257
|
-
color:
|
|
258
|
-
fill:
|
|
304
|
+
color: var(--stcWhite50);
|
|
305
|
+
fill: var(--stcWhite50);
|
|
259
306
|
}
|
|
260
307
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner:hover {
|
|
261
|
-
color:
|
|
262
|
-
fill:
|
|
308
|
+
color: var(--stcWhite);
|
|
309
|
+
fill: var(--stcWhite);
|
|
263
310
|
}
|
|
264
311
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner_current {
|
|
265
|
-
color:
|
|
266
|
-
fill:
|
|
312
|
+
color: var(--stcWhite);
|
|
313
|
+
fill: var(--stcWhite);
|
|
267
314
|
}
|
|
268
315
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__underline {
|
|
269
|
-
background-color:
|
|
316
|
+
background-color: var(--stcWhite);
|
|
270
317
|
}
|
|
271
318
|
.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__arrow {
|
|
272
|
-
background-color:
|
|
273
|
-
fill:
|
|
319
|
+
background-color: var(--stcWhite);
|
|
320
|
+
fill: var(--green);
|
|
274
321
|
}
|
|
@@ -96,36 +96,41 @@ var Tabs = function Tabs(_ref) {
|
|
|
96
96
|
|
|
97
97
|
var _React$useState9 = React.useState(0),
|
|
98
98
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
activeTabWidth = _React$useState10[0],
|
|
100
|
+
setActiveTabWidth = _React$useState10[1];
|
|
101
101
|
|
|
102
102
|
var _React$useState11 = React.useState(0),
|
|
103
103
|
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
underlineWidth = _React$useState12[0],
|
|
105
|
+
setUnderlineWidth = _React$useState12[1];
|
|
106
106
|
|
|
107
|
-
var _React$useState13 = React.useState(
|
|
107
|
+
var _React$useState13 = React.useState(0),
|
|
108
108
|
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
underlineTranslate = _React$useState14[0],
|
|
110
|
+
setUnderlineTranslate = _React$useState14[1];
|
|
111
111
|
|
|
112
|
-
var _React$useState15 = React.useState('
|
|
112
|
+
var _React$useState15 = React.useState('none'),
|
|
113
113
|
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
underlineTransition = _React$useState16[0],
|
|
115
|
+
setUnderlineTransition = _React$useState16[1];
|
|
116
116
|
|
|
117
|
-
var _React$useState17 = React.useState(
|
|
117
|
+
var _React$useState17 = React.useState('auto'),
|
|
118
118
|
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
tabListHeight = _React$useState18[0],
|
|
120
|
+
setTabListHeight = _React$useState18[1];
|
|
121
121
|
|
|
122
|
-
var _React$useState19 = React.useState(
|
|
122
|
+
var _React$useState19 = React.useState(false),
|
|
123
|
+
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
124
|
+
isSticky = _React$useState20[0],
|
|
125
|
+
setSticky = _React$useState20[1];
|
|
126
|
+
|
|
127
|
+
var _React$useState21 = React.useState({
|
|
123
128
|
left: 0,
|
|
124
129
|
right: 0
|
|
125
130
|
}),
|
|
126
|
-
_React$
|
|
127
|
-
stickyOffset = _React$
|
|
128
|
-
setStickyOffset = _React$
|
|
131
|
+
_React$useState22 = _slicedToArray(_React$useState21, 2),
|
|
132
|
+
stickyOffset = _React$useState22[0],
|
|
133
|
+
setStickyOffset = _React$useState22[1];
|
|
129
134
|
|
|
130
135
|
var setTabRef = React.useCallback(function (tab) {
|
|
131
136
|
tab && tabsRef.current.push(tab);
|
|
@@ -135,12 +140,6 @@ var Tabs = function Tabs(_ref) {
|
|
|
135
140
|
return;
|
|
136
141
|
}
|
|
137
142
|
|
|
138
|
-
var tabNodeChild = tabsRef.current[currentIndex].firstElementChild;
|
|
139
|
-
|
|
140
|
-
var _ref2 = tabNodeChild || {},
|
|
141
|
-
_ref2$clientWidth = _ref2.clientWidth,
|
|
142
|
-
clientWidth = _ref2$clientWidth === void 0 ? 0 : _ref2$clientWidth;
|
|
143
|
-
|
|
144
143
|
var translate = _toConsumableArray(tabsRef.current).splice(0, currentIndex).reduce(function (accWidth, node) {
|
|
145
144
|
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
146
145
|
width = _node$getBoundingClie.width;
|
|
@@ -148,9 +147,9 @@ var Tabs = function Tabs(_ref) {
|
|
|
148
147
|
return accWidth + width;
|
|
149
148
|
}, 0);
|
|
150
149
|
|
|
151
|
-
setUnderlineWidth(
|
|
150
|
+
setUnderlineWidth(activeTabWidth);
|
|
152
151
|
setUnderlineTranslate(translate);
|
|
153
|
-
}, [currentIndex]);
|
|
152
|
+
}, [currentIndex, activeTabWidth]);
|
|
154
153
|
var calculateSticky = React.useCallback(function () {
|
|
155
154
|
if (!sticky || !rootRef.current || !tabListRef.current) {
|
|
156
155
|
return;
|
|
@@ -247,12 +246,12 @@ var Tabs = function Tabs(_ref) {
|
|
|
247
246
|
}, []);
|
|
248
247
|
React.useEffect(function () {
|
|
249
248
|
var observer = new IntersectionObserver(function (entries) {
|
|
250
|
-
entries.forEach(function (
|
|
251
|
-
var isIntersecting =
|
|
252
|
-
|
|
253
|
-
top =
|
|
254
|
-
left =
|
|
255
|
-
right =
|
|
249
|
+
entries.forEach(function (_ref2) {
|
|
250
|
+
var isIntersecting = _ref2.isIntersecting,
|
|
251
|
+
_ref2$boundingClientR = _ref2.boundingClientRect,
|
|
252
|
+
top = _ref2$boundingClientR.top,
|
|
253
|
+
left = _ref2$boundingClientR.left,
|
|
254
|
+
right = _ref2$boundingClientR.right;
|
|
256
255
|
|
|
257
256
|
if (!sticky || !rootRef.current || !tabListRef.current) {
|
|
258
257
|
return;
|
|
@@ -294,10 +293,20 @@ var Tabs = function Tabs(_ref) {
|
|
|
294
293
|
}, [calculateSticky]);
|
|
295
294
|
React.useEffect(function () {
|
|
296
295
|
var handleResize = throttle(function () {
|
|
297
|
-
calculateUnderline();
|
|
298
296
|
calculateSticky();
|
|
299
297
|
}, 300);
|
|
298
|
+
var activeTabNode = tabsRef.current[currentIndex];
|
|
299
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
300
|
+
if (!entries.length || !entries[0]) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
var width = entries[0].contentRect.width;
|
|
305
|
+
setActiveTabWidth(width);
|
|
306
|
+
calculateUnderline();
|
|
307
|
+
});
|
|
300
308
|
calculateUnderline();
|
|
309
|
+
resizeObserver.observe(activeTabNode);
|
|
301
310
|
window.addEventListener('resize', handleResize);
|
|
302
311
|
return function () {
|
|
303
312
|
window.removeEventListener('resize', handleResize);
|