@megafon/ui-core 2.1.3 → 3.0.0-beta.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/dist/es/colors/ColorItem/ColorItem.css +1 -8
  3. package/dist/es/colors/ColorItem/ColorItem.js +1 -1
  4. package/dist/es/colors/Colors.css +6 -14
  5. package/dist/es/colors/Colors.js +36 -5
  6. package/dist/es/colors/colorsData.js +84 -68
  7. package/dist/es/components/Accordion/Accordion.css +6 -12
  8. package/dist/es/components/Banner/Banner.css +2 -9
  9. package/dist/es/components/Banner/BannerDot.css +4 -11
  10. package/dist/es/components/Button/Button.css +83 -74
  11. package/dist/es/components/Calendar/Calendar.css +0 -7
  12. package/dist/es/components/Calendar/components/Day/Day.css +10 -17
  13. package/dist/es/components/Calendar/components/Month/Month.css +3 -10
  14. package/dist/es/components/Carousel/Carousel.css +4 -11
  15. package/dist/es/components/Checkbox/Checkbox.css +18 -25
  16. package/dist/es/components/ContentArea/ContentArea.css +61 -20
  17. package/dist/es/components/ContentArea/ContentArea.d.ts +0 -1
  18. package/dist/es/components/ContentArea/ContentArea.js +0 -1
  19. package/dist/es/components/Counter/Counter.css +61 -11
  20. package/dist/es/components/Grid/Grid.css +47 -0
  21. package/dist/es/components/Grid/GridColumn.css +0 -7
  22. package/dist/es/components/Header/Header.css +8 -12
  23. package/dist/es/components/Header/Header.d.ts +1 -1
  24. package/dist/es/components/Header/Header.js +2 -2
  25. package/dist/es/components/InputLabel/InputLabel.css +0 -7
  26. package/dist/es/components/List/List.css +9 -13
  27. package/dist/es/components/List/List.d.ts +1 -1
  28. package/dist/es/components/List/List.js +2 -2
  29. package/dist/es/components/List/ListItem.css +0 -7
  30. package/dist/es/components/Logo/Logo.css +0 -7
  31. package/dist/es/components/Logo/Logo.js +4 -8
  32. package/dist/es/components/NavArrow/NavArrow.css +5 -12
  33. package/dist/es/components/Notification/Notification.css +88 -24
  34. package/dist/es/components/Pagination/Pagination.css +0 -7
  35. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +56 -9
  36. package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +47 -0
  37. package/dist/es/components/Paragraph/Paragraph.css +7 -17
  38. package/dist/es/components/Paragraph/Paragraph.d.ts +0 -1
  39. package/dist/es/components/Paragraph/Paragraph.js +1 -2
  40. package/dist/es/components/Preloader/Preloader.css +5 -12
  41. package/dist/es/components/RadioButton/RadioButton.css +7 -14
  42. package/dist/es/components/RadioButton/RadioButton.d.ts +5 -1
  43. package/dist/es/components/RadioButton/RadioButton.js +7 -5
  44. package/dist/es/components/Search/Search.css +20 -25
  45. package/dist/es/components/Select/Select.css +29 -35
  46. package/dist/es/components/Switcher/Switcher.css +18 -28
  47. package/dist/es/components/Tabs/Tabs.css +30 -37
  48. package/dist/es/components/Tabs/Tabs.js +41 -32
  49. package/dist/es/components/TextField/TextField.css +27 -33
  50. package/dist/es/components/TextLink/TextLink.css +10 -14
  51. package/dist/es/components/TextLink/TextLink.d.ts +1 -1
  52. package/dist/es/components/TextLink/TextLink.js +1 -1
  53. package/dist/es/components/Tile/Tile.css +2 -8
  54. package/dist/es/components/Tooltip/Tooltip.css +1 -8
  55. package/dist/lib/colors/ColorItem/ColorItem.css +1 -8
  56. package/dist/lib/colors/ColorItem/ColorItem.js +1 -1
  57. package/dist/lib/colors/Colors.css +6 -14
  58. package/dist/lib/colors/Colors.js +37 -5
  59. package/dist/lib/colors/colorsData.js +84 -68
  60. package/dist/lib/components/Accordion/Accordion.css +6 -12
  61. package/dist/lib/components/Banner/Banner.css +2 -9
  62. package/dist/lib/components/Banner/BannerDot.css +4 -11
  63. package/dist/lib/components/Button/Button.css +83 -74
  64. package/dist/lib/components/Calendar/Calendar.css +0 -7
  65. package/dist/lib/components/Calendar/components/Day/Day.css +10 -17
  66. package/dist/lib/components/Calendar/components/Month/Month.css +3 -10
  67. package/dist/lib/components/Carousel/Carousel.css +4 -11
  68. package/dist/lib/components/Checkbox/Checkbox.css +18 -25
  69. package/dist/lib/components/ContentArea/ContentArea.css +61 -20
  70. package/dist/lib/components/ContentArea/ContentArea.d.ts +0 -1
  71. package/dist/lib/components/ContentArea/ContentArea.js +0 -1
  72. package/dist/lib/components/Counter/Counter.css +61 -11
  73. package/dist/lib/components/Grid/Grid.css +47 -0
  74. package/dist/lib/components/Grid/GridColumn.css +0 -7
  75. package/dist/lib/components/Header/Header.css +8 -12
  76. package/dist/lib/components/Header/Header.d.ts +1 -1
  77. package/dist/lib/components/Header/Header.js +2 -2
  78. package/dist/lib/components/InputLabel/InputLabel.css +0 -7
  79. package/dist/lib/components/List/List.css +9 -13
  80. package/dist/lib/components/List/List.d.ts +1 -1
  81. package/dist/lib/components/List/List.js +2 -2
  82. package/dist/lib/components/List/ListItem.css +0 -7
  83. package/dist/lib/components/Logo/Logo.css +0 -7
  84. package/dist/lib/components/Logo/Logo.js +4 -8
  85. package/dist/lib/components/NavArrow/NavArrow.css +5 -12
  86. package/dist/lib/components/Notification/Notification.css +88 -24
  87. package/dist/lib/components/Pagination/Pagination.css +0 -7
  88. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +56 -9
  89. package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +47 -0
  90. package/dist/lib/components/Paragraph/Paragraph.css +7 -17
  91. package/dist/lib/components/Paragraph/Paragraph.d.ts +0 -1
  92. package/dist/lib/components/Paragraph/Paragraph.js +1 -2
  93. package/dist/lib/components/Preloader/Preloader.css +5 -12
  94. package/dist/lib/components/RadioButton/RadioButton.css +7 -14
  95. package/dist/lib/components/RadioButton/RadioButton.d.ts +5 -1
  96. package/dist/lib/components/RadioButton/RadioButton.js +6 -4
  97. package/dist/lib/components/Search/Search.css +20 -25
  98. package/dist/lib/components/Select/Select.css +29 -35
  99. package/dist/lib/components/Switcher/Switcher.css +18 -28
  100. package/dist/lib/components/Tabs/Tabs.css +30 -37
  101. package/dist/lib/components/Tabs/Tabs.js +41 -32
  102. package/dist/lib/components/TextField/TextField.css +27 -33
  103. package/dist/lib/components/TextLink/TextLink.css +10 -14
  104. package/dist/lib/components/TextLink/TextLink.d.ts +1 -1
  105. package/dist/lib/components/TextLink/TextLink.js +1 -1
  106. package/dist/lib/components/Tile/Tile.css +2 -8
  107. package/dist/lib/components/Tooltip/Tooltip.css +1 -8
  108. package/package.json +4 -4
  109. package/styles/base.css +54 -0
  110. package/styles/base.less +61 -75
@@ -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: 48px;
12
- height: 28px;
4
+ width: 40px;
5
+ height: 24px;
13
6
  border-radius: 15.5px;
14
- background-color: #FFFFFF;
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: #EDEDED;
13
+ background-color: var(--spbSky1);
23
14
  }
24
15
  .mfui-switcher__pointer {
25
16
  position: relative;
26
- top: 1px;
27
- left: 0;
28
- width: 24px;
29
- height: 24px;
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: #FFFFFF;
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: #00B956;
27
+ background-color: var(--brandGreen);
40
28
  }
41
29
  .mfui-switcher_checked .mfui-switcher__pointer {
42
- left: 22px;
30
+ left: 18px;
43
31
  }
44
32
  .mfui-switcher_checked.mfui-switcher_no-touch:hover {
45
- background-color: #10E272;
33
+ background-color: var(--buttonHoverGreen);
46
34
  }
47
35
  .mfui-switcher_disabled {
48
- background-color: #EDEDED;
36
+ background-color: var(--spbSky1);
49
37
  cursor: default;
50
38
  }
51
- .mfui-switcher_checked.mfui-switcher_disabled,
52
- .mfui-switcher_checked.mfui-switcher_disabled.mfui-switcher_no-touch:hover {
53
- background-color: #D8D8D8;
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(#FFFFFF), to(rgba(255, 255, 255, 0)));
32
- background: linear-gradient(to right, #FFFFFF, rgba(255, 255, 255, 0));
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(#FFFFFF), to(rgba(255, 255, 255, 0)));
37
- background: linear-gradient(to left, #FFFFFF, rgba(255, 255, 255, 0));
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: #333333;
76
+ color: var(--content);
84
77
  white-space: nowrap;
85
78
  text-decoration: none;
86
79
  cursor: pointer;
87
- fill: #333333;
80
+ fill: var(--content);
88
81
  }
89
82
  .mfui-tabs__tab-inner:hover {
90
- color: #00B956;
91
- fill: #00B956;
83
+ color: var(--brandGreen);
84
+ fill: var(--brandGreen);
92
85
  }
93
86
  .mfui-tabs__tab-inner_current {
94
- color: #00B956;
95
- fill: #00B956;
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: #00B956;
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: #333333;
124
+ background-color: var(--content);
132
125
  -webkit-transform: translateY(-50%);
133
126
  transform: translateY(-50%);
134
127
  cursor: pointer;
135
- fill: #FFFFFF;
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 #D8D8D8;
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: #D8D8D8;
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: #FFFFFF;
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(#00B956), to(transparent));
246
- background: linear-gradient(to right, #00B956, transparent);
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(#00B956), to(transparent));
251
- background: linear-gradient(to left, #00B956, transparent);
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: rgba(237, 237, 237, 0.5);
247
+ border-color: var(--stcBlack5);
255
248
  }
256
249
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner {
257
- color: #FFFFFF80;
258
- fill: #FFFFFF80;
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: #FFFFFF;
262
- fill: #FFFFFF;
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: #FFFFFF;
266
- fill: #FFFFFF;
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: #FFFFFF;
262
+ background-color: var(--stcWhite);
270
263
  }
271
264
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__arrow {
272
- background-color: #FFFFFF;
273
- fill: #00B956;
265
+ background-color: var(--stcWhite);
266
+ fill: var(--brandGreen);
274
267
  }
@@ -126,36 +126,41 @@ var Tabs = function Tabs(_ref) {
126
126
 
127
127
  var _React$useState9 = React.useState(0),
128
128
  _React$useState10 = (0, _slicedToArray2["default"])(_React$useState9, 2),
129
- underlineWidth = _React$useState10[0],
130
- setUnderlineWidth = _React$useState10[1];
129
+ activeTabWidth = _React$useState10[0],
130
+ setActiveTabWidth = _React$useState10[1];
131
131
 
132
132
  var _React$useState11 = React.useState(0),
133
133
  _React$useState12 = (0, _slicedToArray2["default"])(_React$useState11, 2),
134
- underlineTranslate = _React$useState12[0],
135
- setUnderlineTranslate = _React$useState12[1];
134
+ underlineWidth = _React$useState12[0],
135
+ setUnderlineWidth = _React$useState12[1];
136
136
 
137
- var _React$useState13 = React.useState('none'),
137
+ var _React$useState13 = React.useState(0),
138
138
  _React$useState14 = (0, _slicedToArray2["default"])(_React$useState13, 2),
139
- underlineTransition = _React$useState14[0],
140
- setUnderlineTransition = _React$useState14[1];
139
+ underlineTranslate = _React$useState14[0],
140
+ setUnderlineTranslate = _React$useState14[1];
141
141
 
142
- var _React$useState15 = React.useState('auto'),
142
+ var _React$useState15 = React.useState('none'),
143
143
  _React$useState16 = (0, _slicedToArray2["default"])(_React$useState15, 2),
144
- tabListHeight = _React$useState16[0],
145
- setTabListHeight = _React$useState16[1];
144
+ underlineTransition = _React$useState16[0],
145
+ setUnderlineTransition = _React$useState16[1];
146
146
 
147
- var _React$useState17 = React.useState(false),
147
+ var _React$useState17 = React.useState('auto'),
148
148
  _React$useState18 = (0, _slicedToArray2["default"])(_React$useState17, 2),
149
- isSticky = _React$useState18[0],
150
- setSticky = _React$useState18[1];
149
+ tabListHeight = _React$useState18[0],
150
+ setTabListHeight = _React$useState18[1];
151
151
 
152
- var _React$useState19 = React.useState({
152
+ var _React$useState19 = React.useState(false),
153
+ _React$useState20 = (0, _slicedToArray2["default"])(_React$useState19, 2),
154
+ isSticky = _React$useState20[0],
155
+ setSticky = _React$useState20[1];
156
+
157
+ var _React$useState21 = React.useState({
153
158
  left: 0,
154
159
  right: 0
155
160
  }),
156
- _React$useState20 = (0, _slicedToArray2["default"])(_React$useState19, 2),
157
- stickyOffset = _React$useState20[0],
158
- setStickyOffset = _React$useState20[1];
161
+ _React$useState22 = (0, _slicedToArray2["default"])(_React$useState21, 2),
162
+ stickyOffset = _React$useState22[0],
163
+ setStickyOffset = _React$useState22[1];
159
164
 
160
165
  var setTabRef = React.useCallback(function (tab) {
161
166
  tab && tabsRef.current.push(tab);
@@ -165,21 +170,15 @@ var Tabs = function Tabs(_ref) {
165
170
  return;
166
171
  }
167
172
 
168
- var tabNodeChild = tabsRef.current[currentIndex].firstElementChild;
169
-
170
- var _ref2 = tabNodeChild || {},
171
- _ref2$clientWidth = _ref2.clientWidth,
172
- clientWidth = _ref2$clientWidth === void 0 ? 0 : _ref2$clientWidth;
173
-
174
173
  var translate = (0, _toConsumableArray2["default"])(tabsRef.current).splice(0, currentIndex).reduce(function (accWidth, node) {
175
174
  var _node$getBoundingClie = node.getBoundingClientRect(),
176
175
  width = _node$getBoundingClie.width;
177
176
 
178
177
  return accWidth + width;
179
178
  }, 0);
180
- setUnderlineWidth(clientWidth);
179
+ setUnderlineWidth(activeTabWidth);
181
180
  setUnderlineTranslate(translate);
182
- }, [currentIndex]);
181
+ }, [currentIndex, activeTabWidth]);
183
182
  var calculateSticky = React.useCallback(function () {
184
183
  if (!sticky || !rootRef.current || !tabListRef.current) {
185
184
  return;
@@ -276,12 +275,12 @@ var Tabs = function Tabs(_ref) {
276
275
  }, []);
277
276
  React.useEffect(function () {
278
277
  var observer = new IntersectionObserver(function (entries) {
279
- entries.forEach(function (_ref3) {
280
- var isIntersecting = _ref3.isIntersecting,
281
- _ref3$boundingClientR = _ref3.boundingClientRect,
282
- top = _ref3$boundingClientR.top,
283
- left = _ref3$boundingClientR.left,
284
- right = _ref3$boundingClientR.right;
278
+ entries.forEach(function (_ref2) {
279
+ var isIntersecting = _ref2.isIntersecting,
280
+ _ref2$boundingClientR = _ref2.boundingClientRect,
281
+ top = _ref2$boundingClientR.top,
282
+ left = _ref2$boundingClientR.left,
283
+ right = _ref2$boundingClientR.right;
285
284
 
286
285
  if (!sticky || !rootRef.current || !tabListRef.current) {
287
286
  return;
@@ -323,10 +322,20 @@ var Tabs = function Tabs(_ref) {
323
322
  }, [calculateSticky]);
324
323
  React.useEffect(function () {
325
324
  var handleResize = (0, _lodash["default"])(function () {
326
- calculateUnderline();
327
325
  calculateSticky();
328
326
  }, 300);
327
+ var activeTabNode = tabsRef.current[currentIndex];
328
+ var resizeObserver = new ResizeObserver(function (entries) {
329
+ if (!entries.length || !entries[0]) {
330
+ return;
331
+ }
332
+
333
+ var width = entries[0].contentRect.width;
334
+ setActiveTabWidth(width);
335
+ calculateUnderline();
336
+ });
329
337
  calculateUnderline();
338
+ resizeObserver.observe(activeTabNode);
330
339
  window.addEventListener('resize', handleResize);
331
340
  return function () {
332
341
  window.removeEventListener('resize', handleResize);
@@ -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: #333333;
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: #b3b3b3;
41
+ color: var(--spbSky3);
49
42
  }
50
43
  .mfui-text-field input:-moz-placeholder {
51
- color: #b3b3b3;
44
+ color: var(--spbSky3);
52
45
  }
53
46
  .mfui-text-field input:-ms-input-placeholder {
54
- color: #b3b3b3;
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: #FFFFFF;
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: #F62434;
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: #F62434;
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 #D8D8D8;
131
- color: #333333;
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: #333333;
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: #00B956;
134
+ border-color: var(--brandGreen);
141
135
  }
142
136
  .mfui-text-field_theme_default.mfui-text-field_valid .mfui-text-field__icon {
143
- fill: #00B956;
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: #F62434;
141
+ border-color: var(--fury);
148
142
  }
149
143
  .mfui-text-field_theme_default.mfui-text-field_error .mfui-text-field__icon {
150
- fill: #F62434;
144
+ fill: var(--fury);
151
145
  }
152
146
  .mfui-text-field_theme_default.mfui-text-field_error .mfui-text-field__text_error {
153
- color: #F62434;
147
+ color: var(--fury);
154
148
  }
155
149
  .mfui-text-field_theme_white .mfui-text-field__field {
156
- border: 1px solid #FFFFFF;
157
- color: #333333;
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: #333333;
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: #F62434;
159
+ border-color: var(--fury);
166
160
  }
167
161
  .mfui-text-field_theme_white.mfui-text-field_error .mfui-text-field__icon {
168
- fill: #F62434;
162
+ fill: var(--fury);
169
163
  }
170
164
  .mfui-text-field_theme_white.mfui-text-field_error .mfui-text-field__text_error {
171
- color: #F62434;
165
+ color: var(--fury);
172
166
  }
173
167
  .mfui-text-field__text_success {
174
- color: #00B956;
168
+ color: var(--brandGreen);
175
169
  }
176
170
  .mfui-text-field_disabled .mfui-text-field__field-wrapper {
177
- background-color: #EDEDED !important;
171
+ background-color: var(--spbSky1) !important;
178
172
  }
179
173
  .mfui-text-field_disabled .mfui-text-field__field {
180
- border-color: #EDEDED !important;
181
- color: #333333 !important;
174
+ border-color: var(--spbSky1) !important;
175
+ color: var(--content) !important;
182
176
  cursor: default !important;
183
- -webkit-text-fill-color: #333333 !important;
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: #FFFFFF;
37
+ color: var(--stcWhite);
39
38
  }
40
39
  .mfui-text-link_color_blue {
41
- color: #34AAF2;
40
+ color: var(--systemBlue);
42
41
  }
43
42
  .mfui-text-link_color_green {
44
- color: #00B956;
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: #999999;
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' | 'blue' | 'green' | 'inherit';
6
+ color?: 'default' | 'white' | 'black' | 'gray' | 'green' | 'blue' | 'inherit';
7
7
  /** Отображение подчеркивания */
8
8
  underlineVisibility?: 'hover' | 'always';
9
9
  /** Стиль подчеркивания */
@@ -49,7 +49,7 @@ var TextLink = function TextLink(_ref) {
49
49
  };
50
50
 
51
51
  TextLink.propTypes = {
52
- color: PropTypes.oneOf(['white', 'black', 'gray', 'blue', 'green', 'inherit']),
52
+ color: PropTypes.oneOf(['default', 'white', 'black', 'gray', 'green', 'inherit']),
53
53
  underlineVisibility: PropTypes.oneOf(['hover', 'always']),
54
54
  underlineStyle: PropTypes.oneOf(['solid', 'dashed', 'border', 'none']),
55
55
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element), PropTypes.element, PropTypes.string, PropTypes.node])
@@ -1,12 +1,6 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
1
  .mfui-tile {
9
- background-color: #FFFFFF;
2
+ color: var(--content);
3
+ background-color: var(--background);
10
4
  }
11
5
  .mfui-tile_radius_rounded {
12
6
  border-radius: 8px;
@@ -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: #FFFFFF;
44
+ background-color: var(--base);
52
45
  }
53
46
  .mfui-tooltip__arrow-shadow {
54
47
  width: 12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "2.1.3",
3
+ "version": "3.0.0-beta.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -53,7 +53,7 @@
53
53
  "@babel/preset-env": "^7.8.6",
54
54
  "@babel/preset-react": "^7.8.3",
55
55
  "@babel/preset-typescript": "^7.8.3",
56
- "@megafon/ui-icons": "^0.1.1",
56
+ "@megafon/ui-icons": "^1.0.0-beta.1",
57
57
  "@svgr/core": "^2.4.1",
58
58
  "@testing-library/react-hooks": "^7.0.1",
59
59
  "@types/enzyme": "^3.10.5",
@@ -85,7 +85,7 @@
85
85
  "dependencies": {
86
86
  "@babel/runtime": "^7.8.4",
87
87
  "@datepicker-react/hooks": "^2.7.0",
88
- "@megafon/ui-helpers": "^1.0.0",
88
+ "@megafon/ui-helpers": "^2.0.0-beta.1",
89
89
  "@popperjs/core": "^2.5.3",
90
90
  "core-js": "^3.6.4",
91
91
  "date-fns": "^2.16.1",
@@ -96,5 +96,5 @@
96
96
  "react-popper": "^2.2.3",
97
97
  "swiper": "^6.5.6"
98
98
  },
99
- "gitHead": "884922566102445160ff8cbc20f6d54142b621e5"
99
+ "gitHead": "173ac72d7b6b8ce7c387e89c91371a0f119dc61d"
100
100
  }
@@ -0,0 +1,54 @@
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
+ }
48
+ h1,
49
+ h2,
50
+ h3,
51
+ h4,
52
+ h5 {
53
+ margin: 0;
54
+ }