@megafon/ui-core 2.0.0 → 2.1.3

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 (55) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/es/colors/ColorItem/ColorItem.css +52 -0
  3. package/dist/es/colors/ColorItem/ColorItem.d.ts +12 -0
  4. package/dist/es/colors/ColorItem/ColorItem.js +35 -0
  5. package/dist/es/colors/Colors.css +203 -32
  6. package/dist/es/colors/Colors.js +243 -35
  7. package/dist/es/colors/colorsData.d.ts +20 -7
  8. package/dist/es/colors/colorsData.js +204 -61
  9. package/dist/es/components/Banner/BannerDot.css +2 -2
  10. package/dist/es/components/Button/Button.css +11 -11
  11. package/dist/es/components/Button/Button.js +11 -4
  12. package/dist/es/components/Carousel/Carousel.css +1 -1
  13. package/dist/es/components/Carousel/Carousel.js +6 -1
  14. package/dist/es/components/ContentArea/ContentArea.css +4 -0
  15. package/dist/es/components/ContentArea/ContentArea.d.ts +13 -9
  16. package/dist/es/components/ContentArea/ContentArea.js +39 -6
  17. package/dist/es/components/Counter/Counter.css +3 -3
  18. package/dist/es/components/NavArrow/NavArrow.css +1 -1
  19. package/dist/es/components/Notification/Notification.css +10 -19
  20. package/dist/es/components/Paragraph/Paragraph.css +2 -0
  21. package/dist/es/components/Paragraph/Paragraph.d.ts +17 -1
  22. package/dist/es/components/Paragraph/Paragraph.js +40 -1
  23. package/dist/es/components/Tabs/Tab.d.ts +2 -0
  24. package/dist/es/components/Tabs/Tabs.css +2 -2
  25. package/dist/es/components/Tabs/Tabs.d.ts +2 -0
  26. package/dist/es/components/Tabs/Tabs.js +12 -2
  27. package/dist/es/components/TextField/TextField.js +8 -3
  28. package/dist/lib/colors/ColorItem/ColorItem.css +52 -0
  29. package/dist/lib/colors/ColorItem/ColorItem.d.ts +12 -0
  30. package/dist/lib/colors/ColorItem/ColorItem.js +50 -0
  31. package/dist/lib/colors/Colors.css +203 -32
  32. package/dist/lib/colors/Colors.js +250 -36
  33. package/dist/lib/colors/colorsData.d.ts +20 -7
  34. package/dist/lib/colors/colorsData.js +204 -61
  35. package/dist/lib/components/Banner/BannerDot.css +2 -2
  36. package/dist/lib/components/Button/Button.css +11 -11
  37. package/dist/lib/components/Button/Button.js +12 -4
  38. package/dist/lib/components/Carousel/Carousel.css +1 -1
  39. package/dist/lib/components/Carousel/Carousel.js +6 -1
  40. package/dist/lib/components/ContentArea/ContentArea.css +4 -0
  41. package/dist/lib/components/ContentArea/ContentArea.d.ts +13 -9
  42. package/dist/lib/components/ContentArea/ContentArea.js +42 -6
  43. package/dist/lib/components/Counter/Counter.css +3 -3
  44. package/dist/lib/components/NavArrow/NavArrow.css +1 -1
  45. package/dist/lib/components/Notification/Notification.css +10 -19
  46. package/dist/lib/components/Paragraph/Paragraph.css +2 -0
  47. package/dist/lib/components/Paragraph/Paragraph.d.ts +17 -1
  48. package/dist/lib/components/Paragraph/Paragraph.js +44 -1
  49. package/dist/lib/components/Tabs/Tab.d.ts +2 -0
  50. package/dist/lib/components/Tabs/Tabs.css +2 -2
  51. package/dist/lib/components/Tabs/Tabs.d.ts +2 -0
  52. package/dist/lib/components/Tabs/Tabs.js +12 -2
  53. package/dist/lib/components/TextField/TextField.js +8 -3
  54. package/package.json +4 -3
  55. package/styles/base.less +87 -39
@@ -1,8 +1,21 @@
1
- declare const _default: {
1
+ declare type ColorType = {
2
+ name: string;
3
+ code: string;
4
+ border?: string;
5
+ parentColor?: string;
6
+ gradient?: string;
7
+ };
8
+ declare type ColorsListType = {
9
+ description: string;
10
+ colors: ColorType[];
11
+ };
12
+ export declare type ColorsItemType = {
2
13
  title: string;
3
- items: {
4
- name: string;
5
- value: string;
6
- }[];
7
- }[];
8
- export default _default;
14
+ colorsList?: ColorsListType;
15
+ colorsGroup?: ColorsListType[];
16
+ };
17
+ export declare type ColorsType = {
18
+ [key: string]: ColorsItemType;
19
+ };
20
+ declare const colors: ColorsType;
21
+ export default colors;
@@ -4,65 +4,208 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = [{
8
- title: 'Basic Colors',
9
- items: [{
10
- name: 'Green',
11
- value: '#00B956'
12
- }, {
13
- name: 'Purple',
14
- value: '#731982'
15
- }, {
16
- name: 'Clear White',
17
- value: '#FFFFFF'
18
- }, {
19
- name: 'Spb Sky 0',
20
- value: '#F6F6F6'
21
- }, {
22
- name: 'Spb Sky 1',
23
- value: '#EDEDED'
24
- }, {
25
- name: 'Spb Sky 2',
26
- value: '#D8D8D8'
27
- }, {
28
- name: 'Fresh Asphalt',
29
- value: '#333333'
30
- }, {
31
- name: 'Full Black',
32
- value: '#000000'
33
- }]
34
- }, {
35
- title: 'Secondary Colors',
36
- items: [{
37
- name: 'Warm RedC',
38
- value: '#EB5A40'
39
- }, {
40
- name: '137C',
41
- value: '#FFA717'
42
- }, {
43
- name: 'Pantone311C',
44
- value: '#5BD9E5'
45
- }, {
46
- name: 'Reflex Blue',
47
- value: '#444189'
48
- }]
49
- }, {
50
- title: 'System Colors',
51
- items: [{
52
- name: 'Fury',
53
- value: '#F62434'
54
- }, {
55
- name: 'Link',
56
- value: '#34AAF2'
57
- }, {
58
- name: 'Button Hover Green',
59
- value: '#10E272'
60
- }, {
61
- name: 'Button hover Purple',
62
- value: '#A500BF'
63
- }, {
64
- name: 'Button Down',
65
- value: '#404D46'
66
- }]
67
- }];
7
+ var colors = {
8
+ basic: {
9
+ title: 'Basic',
10
+ colorsGroup: [{
11
+ description: 'Основные цвета бренда',
12
+ colors: [{
13
+ name: 'Green',
14
+ code: '#00B956'
15
+ }, {
16
+ name: 'Purple',
17
+ code: '#731982'
18
+ }]
19
+ }, {
20
+ description: 'Градация оттенков серого',
21
+ colors: [{
22
+ name: 'Base',
23
+ code: '#FFFFFF',
24
+ border: '1px solid #EDEDED'
25
+ }, {
26
+ name: 'Content',
27
+ code: '#333333'
28
+ }, {
29
+ name: 'Spb Sky 0',
30
+ code: '#F6F6F6',
31
+ border: '2px solid #EDEDED'
32
+ }, {
33
+ name: 'Spb Sky 1',
34
+ code: '#EDEDED'
35
+ }, {
36
+ name: 'Spb Sky 2',
37
+ code: '#D8D8D8'
38
+ }, {
39
+ name: 'Spb Sky 3',
40
+ code: '#999999'
41
+ }]
42
+ }]
43
+ },
44
+ secondary: {
45
+ title: 'Secondary',
46
+ colorsList: {
47
+ description: 'Акцентные цвета',
48
+ colors: [{
49
+ name: 'Warm Red C',
50
+ code: '#EB5A40'
51
+ }, {
52
+ name: '137C',
53
+ code: '#FFA717'
54
+ }, {
55
+ name: '311C',
56
+ code: '#5BD9E5'
57
+ }, {
58
+ name: 'Reflex Blue',
59
+ code: '#444189'
60
+ }]
61
+ }
62
+ },
63
+ system: {
64
+ title: 'System',
65
+ colorsList: {
66
+ description: 'Системные цвета, используемые для отображения состояний интерфейсов и ссылок',
67
+ colors: [{
68
+ name: 'Fury',
69
+ code: '#F62434'
70
+ }, {
71
+ name: 'System Blue',
72
+ code: '#34AAF2'
73
+ }, {
74
+ name: 'Background',
75
+ code: '#FFFFFF'
76
+ }]
77
+ }
78
+ },
79
+ gradientColors: {
80
+ title: 'Gradient',
81
+ colorsList: {
82
+ description: 'Градиентные заливки ',
83
+ colors: [{
84
+ name: 'Basic',
85
+ code: '#01873F #00B956 #14CD6A',
86
+ gradient: 'linear-gradient(90deg, #01873F 0%, #00B956 74%, #14CD6A 100%)'
87
+ }, {
88
+ name: 'VIP',
89
+ code: '#5B1168 #731982 #821E93',
90
+ gradient: 'linear-gradient(90deg, #5B1168 0%, #731982 74%, #821E93 100%)'
91
+ }, {
92
+ name: 'Exclusive',
93
+ code: '#2A2674 #444189 #504D93',
94
+ gradient: 'linear-gradient(90deg, #2A2674 0%, #444189 74%, #504D93 100%)'
95
+ }]
96
+ }
97
+ },
98
+ staticColors: {
99
+ title: 'Static',
100
+ colorsList: {
101
+ description: 'Цвета не зависящие от темы',
102
+ colors: [{
103
+ name: 'STC White',
104
+ code: '#FFFFFFF',
105
+ border: '1px solid #EDEDED'
106
+ }, {
107
+ name: 'STC Black',
108
+ code: '#333333'
109
+ }]
110
+ }
111
+ },
112
+ staticOpacity: {
113
+ title: 'Static Opacity',
114
+ colorsList: {
115
+ description: 'Цвета c прозрачностью не зависящие от темы',
116
+ colors: [{
117
+ name: 'STC White 5%',
118
+ code: '#FFFFFF0D',
119
+ border: '1px solid #EDEDED'
120
+ }, {
121
+ name: 'STC White 10%',
122
+ code: '#FFFFFF1A',
123
+ border: '1px solid #EDEDED'
124
+ }, {
125
+ name: 'STC White 20%',
126
+ code: '#FFFFFF33',
127
+ border: '1px solid #EDEDED'
128
+ }, {
129
+ name: 'STC White 50%',
130
+ code: '#FFFFFF80'
131
+ }, {
132
+ name: 'STC Black 5%',
133
+ code: '#3333330D'
134
+ }, {
135
+ name: 'STC Black 10%',
136
+ code: '#3333331A'
137
+ }, {
138
+ name: 'STC Black 20%',
139
+ code: '#33333333'
140
+ }, {
141
+ name: 'STC Black 50%',
142
+ code: '#33333380'
143
+ }]
144
+ }
145
+ },
146
+ soft: {
147
+ title: 'Soft',
148
+ colorsList: {
149
+ description: 'Дополнительная (вспомогательная) палитра, образованная от Basic, Secondary и System цветов. Каждый цвет из Soft палитры работает в паре с его родительским цветом.',
150
+ colors: [{
151
+ name: 'Green 80',
152
+ code: '#0CDC78',
153
+ parentColor: '#00B956'
154
+ }, {
155
+ name: 'Purple 80',
156
+ code: '#AA67C1',
157
+ parentColor: '#731982'
158
+ }, {
159
+ name: 'Warm Red C 80',
160
+ code: '#FF765D',
161
+ parentColor: '#EB5A40'
162
+ }, {
163
+ name: '137C 80',
164
+ code: '#FFB945',
165
+ parentColor: '#FFB945'
166
+ }, {
167
+ name: '311C 80',
168
+ code: '#62E3FF',
169
+ parentColor: '#5BD9E5'
170
+ }, {
171
+ name: 'Reflex Blue 80',
172
+ code: '#554FC9',
173
+ parentColor: '#444189'
174
+ }, {
175
+ name: 'Fury 80',
176
+ code: '#F8505D',
177
+ parentColor: '#F62434'
178
+ }, {
179
+ name: 'Green 20',
180
+ code: '#DDFFEC',
181
+ parentColor: '#00B956'
182
+ }, {
183
+ name: 'Purple 20',
184
+ code: '#FFEEFF',
185
+ parentColor: '#731982'
186
+ }, {
187
+ name: 'Warm Red C 20',
188
+ code: '#FFCFC7',
189
+ parentColor: '#EB5A40'
190
+ }, {
191
+ name: '137C 20',
192
+ code: '#FFEDD1',
193
+ parentColor: '#FFB945'
194
+ }, {
195
+ name: '311C 20',
196
+ code: '#E1FAFF',
197
+ parentColor: '#5BD9E5'
198
+ }, {
199
+ name: 'Reflex Blue 20',
200
+ code: '#EBEAFF',
201
+ parentColor: '#444189'
202
+ }, {
203
+ name: 'Fury 20',
204
+ code: '#FFC5C9',
205
+ parentColor: '#F62434'
206
+ }]
207
+ }
208
+ }
209
+ };
210
+ var _default = colors;
68
211
  exports["default"] = _default;
@@ -27,7 +27,7 @@ h5 {
27
27
  width: 100%;
28
28
  height: 100%;
29
29
  border-radius: 50%;
30
- background-color: rgba(255, 255, 255, 0.5);
30
+ background-color: #FFFFFF80;
31
31
  }
32
32
  .mfui-banner-dot_active {
33
33
  padding: 0;
@@ -54,7 +54,7 @@ h5 {
54
54
  transform-origin: center;
55
55
  -webkit-animation: timer linear;
56
56
  animation: timer linear;
57
- fill: rgba(255, 255, 255, 0.5);
57
+ fill: #FFFFFF80;
58
58
  stroke: #FFFFFF;
59
59
  stroke-width: 100;
60
60
  stroke-dasharray: 1000;
@@ -231,9 +231,9 @@ h5 {
231
231
  fill: #FFFFFF;
232
232
  }
233
233
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_purple:not(.mfui-button_loading):hover {
234
- background-color: #A500BF;
235
- -webkit-box-shadow: inset 0 0 0 1px #A500BF;
236
- box-shadow: inset 0 0 0 1px #A500BF;
234
+ background-color: #534455;
235
+ -webkit-box-shadow: inset 0 0 0 1px #534455;
236
+ box-shadow: inset 0 0 0 1px #534455;
237
237
  }
238
238
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_purple:not(.mfui-button_loading):active {
239
239
  background-color: #404D46;
@@ -332,7 +332,7 @@ h5 {
332
332
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled,
333
333
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:hover,
334
334
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:active {
335
- color: rgba(51, 51, 51, 0.5);
335
+ color: #33333380;
336
336
  background-color: #EDEDED;
337
337
  -webkit-box-shadow: inset 0 0 0 1px #D8D8D8;
338
338
  box-shadow: inset 0 0 0 1px #D8D8D8;
@@ -341,28 +341,28 @@ h5 {
341
341
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled svg,
342
342
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:hover svg,
343
343
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:active svg {
344
- fill: rgba(51, 51, 51, 0.5);
344
+ fill: #33333380;
345
345
  }
346
346
  .mfui-button.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled,
347
347
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled,
348
348
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:hover,
349
349
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:active {
350
- color: rgba(255, 255, 255, 0.5);
350
+ color: #FFFFFF80;
351
351
  background-color: transparent;
352
- -webkit-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
353
- box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
352
+ -webkit-box-shadow: inset 0 0 0 1px #FFFFFF80;
353
+ box-shadow: inset 0 0 0 1px #FFFFFF80;
354
354
  }
355
355
  .mfui-button.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled svg,
356
356
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled svg,
357
357
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:hover svg,
358
358
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:active svg {
359
- fill: rgba(255, 255, 255, 0.5);
359
+ fill: #FFFFFF80;
360
360
  }
361
361
  .mfui-button.mfui-button_type_outline.mfui-button_disabled,
362
362
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled,
363
363
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:hover,
364
364
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:active {
365
- color: rgba(51, 51, 51, 0.5);
365
+ color: #33333380;
366
366
  background-color: transparent;
367
367
  -webkit-box-shadow: inset 0 0 0 1px #D8D8D8;
368
368
  box-shadow: inset 0 0 0 1px #D8D8D8;
@@ -371,5 +371,5 @@ h5 {
371
371
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled svg,
372
372
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:hover svg,
373
373
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:active svg {
374
- fill: rgba(51, 51, 51, 0.5);
374
+ fill: #33333380;
375
375
  }
@@ -15,6 +15,8 @@ require("core-js/modules/es.object.values");
15
15
 
16
16
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
17
 
18
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
19
+
18
20
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
19
21
 
20
22
  var _react = _interopRequireDefault(require("react"));
@@ -108,9 +110,10 @@ var Button = function Button(_ref) {
108
110
  dataAttrs = _ref.dataAttrs,
109
111
  buttonRef = _ref.buttonRef;
110
112
 
111
- var isTouch = _react["default"].useMemo(function () {
112
- return (0, _uiHelpers.detectTouch)();
113
- }, []);
113
+ var _React$useState = _react["default"].useState(false),
114
+ _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
115
+ isTouch = _React$useState2[0],
116
+ setTouch = _React$useState2[1];
114
117
 
115
118
  var ElementType = href ? 'a' : 'button';
116
119
 
@@ -201,6 +204,11 @@ var Button = function Button(_ref) {
201
204
  };
202
205
 
203
206
  var classNameValue = Array.isArray(className) ? [].concat((0, _toConsumableArray2["default"])(className), [rootClassName]) : [className, rootClassName];
207
+
208
+ _react["default"].useEffect(function () {
209
+ setTouch((0, _uiHelpers.detectTouch)());
210
+ }, []);
211
+
204
212
  return /*#__PURE__*/_react["default"].createElement(ElementType, (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs), {
205
213
  className: cn({
206
214
  type: type,
@@ -217,7 +225,7 @@ var Button = function Button(_ref) {
217
225
  'content-type': contentType
218
226
  }, classNameValue),
219
227
  href: href,
220
- download: href && download,
228
+ download: !!href && download,
221
229
  target: href ? target : undefined,
222
230
  rel: setRelAttribute(),
223
231
  type: href ? undefined : actionType,
@@ -158,7 +158,7 @@ h5 {
158
158
  margin-right: 8px;
159
159
  }
160
160
  .mfui-carousel_nav-theme_green .swiper-pagination-bullet:before {
161
- background-color: rgba(255, 255, 255, 0.5);
161
+ background-color: #FFFFFF80;
162
162
  }
163
163
  .mfui-carousel_nav-theme_light .swiper-pagination-bullet:before {
164
164
  background-color: rgba(51, 51, 51, 0.25);
@@ -241,6 +241,10 @@ var Carousel = function Carousel(_ref) {
241
241
  };
242
242
  };
243
243
 
244
+ var disableFocusOnSlideClick = function disableFocusOnSlideClick(e) {
245
+ e.nativeEvent.preventDefault();
246
+ };
247
+
244
248
  return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs), {
245
249
  ref: rootRef,
246
250
  className: cn({
@@ -282,7 +286,8 @@ var Carousel = function Carousel(_ref) {
282
286
  return /*#__PURE__*/React.createElement(_react2.SwiperSlide, {
283
287
  key: i,
284
288
  className: cn('slide', slideClass),
285
- onFocus: handleSlideFocus(i)
289
+ onFocus: handleSlideFocus(i),
290
+ onMouseDown: disableFocusOnSlideClick
286
291
  }, child);
287
292
  })), /*#__PURE__*/React.createElement(_NavArrow["default"], {
288
293
  className: cn('arrow', {
@@ -5,6 +5,7 @@ h4,
5
5
  h5 {
6
6
  margin: 0;
7
7
  }
8
+ .mfui-content-area_color_base,
8
9
  .mfui-content-area_color_white {
9
10
  background-color: #FFFFFF;
10
11
  }
@@ -26,6 +27,7 @@ h5 {
26
27
  .mfui-content-area_color_spbSky2 {
27
28
  background-color: #D8D8D8;
28
29
  }
30
+ .mfui-content-area_color_content,
29
31
  .mfui-content-area_color_freshAsphalt {
30
32
  background-color: #333333;
31
33
  }
@@ -80,6 +82,7 @@ h5 {
80
82
  padding-right: 0;
81
83
  padding-left: 0;
82
84
  }
85
+ .mfui-content-area__inner_color_base,
83
86
  .mfui-content-area__inner_color_white {
84
87
  background-color: #FFFFFF;
85
88
  }
@@ -101,6 +104,7 @@ h5 {
101
104
  .mfui-content-area__inner_color_spbSky2 {
102
105
  background-color: #D8D8D8;
103
106
  }
107
+ .mfui-content-area__inner_color_content,
104
108
  .mfui-content-area__inner_color_freshAsphalt {
105
109
  background-color: #333333;
106
110
  }
@@ -1,15 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import './ContentArea.less';
3
3
  declare const BACKGROUND_COLORS: {
4
- WHITE: string;
5
- TRANSPARENT: string;
6
- GREEN: string;
7
- PURPLE: string;
8
- SPB_SKY_0: string;
9
- SPB_SKY_1: string;
10
- SPB_SKY_2: string;
11
- FRESH_ASPHALT: string;
12
- FULL_BLACK: string;
4
+ readonly BASE: "base";
5
+ readonly TRANSPARENT: "transparent";
6
+ readonly GREEN: "green";
7
+ readonly PURPLE: "purple";
8
+ readonly SPB_SKY_0: "spbSky0";
9
+ readonly SPB_SKY_1: "spbSky1";
10
+ readonly SPB_SKY_2: "spbSky2";
11
+ readonly CONTENT: "content";
12
+ readonly FULL_BLACK: "fullBlack";
13
+ /** @deprecated */
14
+ readonly WHITE: "white";
15
+ /** @deprecated */
16
+ readonly FRESH_ASPHALT: "freshAsphalt";
13
17
  };
14
18
  export declare type BackgroundColorType = typeof BACKGROUND_COLORS[keyof typeof BACKGROUND_COLORS];
15
19
  declare const DisableIndents: {
@@ -7,8 +7,14 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
+ require("core-js/modules/es.array.concat");
11
+
12
+ require("core-js/modules/es.array.includes");
13
+
10
14
  require("core-js/modules/es.object.values");
11
15
 
16
+ require("core-js/modules/es.string.includes");
17
+
12
18
  var React = _interopRequireWildcard(require("react"));
13
19
 
14
20
  var _uiHelpers = require("@megafon/ui-helpers");
@@ -20,15 +26,21 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
20
26
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
27
 
22
28
  var BACKGROUND_COLORS = {
23
- WHITE: 'white',
29
+ BASE: 'base',
24
30
  TRANSPARENT: 'transparent',
25
31
  GREEN: 'green',
26
32
  PURPLE: 'purple',
27
33
  SPB_SKY_0: 'spbSky0',
28
34
  SPB_SKY_1: 'spbSky1',
29
35
  SPB_SKY_2: 'spbSky2',
30
- FRESH_ASPHALT: 'freshAsphalt',
31
- FULL_BLACK: 'fullBlack'
36
+ CONTENT: 'content',
37
+ FULL_BLACK: 'fullBlack',
38
+
39
+ /** @deprecated */
40
+ WHITE: 'white',
41
+
42
+ /** @deprecated */
43
+ FRESH_ASPHALT: 'freshAsphalt'
32
44
  };
33
45
  var DisableIndents = {
34
46
  MOBILE: 'mobile',
@@ -57,15 +69,39 @@ var ContentArea = function ContentArea(_ref) {
57
69
  }, children));
58
70
  };
59
71
 
72
+ var colorsCustomPropTypes = function colorsCustomPropTypes(props, propName, componentName) {
73
+ var deprecatedBlackValue = BACKGROUND_COLORS.FRESH_ASPHALT;
74
+ var deprecatedWhiteValue = BACKGROUND_COLORS.WHITE;
75
+ var propValue = props[propName];
76
+
77
+ if (propValue && !Object.values(BACKGROUND_COLORS).includes(propValue)) {
78
+ return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n expected one of [").concat(Object.values(BACKGROUND_COLORS), "]"));
79
+ }
80
+
81
+ if (propValue && propValue === deprecatedBlackValue) {
82
+ return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedBlackValue, "' is deprecated, please use value '").concat(BACKGROUND_COLORS.CONTENT, "'"));
83
+ }
84
+
85
+ if (propValue && propValue === deprecatedWhiteValue) {
86
+ return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedWhiteValue, "' is deprecated, please use value '").concat(BACKGROUND_COLORS.BASE, "'"));
87
+ }
88
+
89
+ return null;
90
+ };
91
+
60
92
  ContentArea.propTypes = {
61
- outerBackgroundColor: PropTypes.oneOf(Object.values(BACKGROUND_COLORS)),
62
- innerBackgroundColor: PropTypes.oneOf(Object.values(BACKGROUND_COLORS)),
63
93
  disableIndents: PropTypes.oneOf(Object.values(DisableIndents)),
64
94
  className: PropTypes.string,
65
95
  classes: PropTypes.shape({
66
96
  root: PropTypes.string,
67
97
  inner: PropTypes.string
68
- })
98
+ }),
99
+ outerBackgroundColor: function outerBackgroundColor(props, propName, componentName) {
100
+ return colorsCustomPropTypes(props, propName, componentName);
101
+ },
102
+ innerBackgroundColor: function innerBackgroundColor(props, propName, componentName) {
103
+ return colorsCustomPropTypes(props, propName, componentName);
104
+ }
69
105
  };
70
106
  ContentArea.defaultProps = {
71
107
  outerBackgroundColor: 'transparent',
@@ -59,7 +59,7 @@ h5 {
59
59
  cursor: default;
60
60
  }
61
61
  .mfui-counter__btn:disabled .mfui-counter__icon {
62
- fill: rgba(51, 51, 51, 0.5);
62
+ fill: #33333380;
63
63
  }
64
64
  .mfui-counter__btn_left {
65
65
  border-top-left-radius: 50px;
@@ -113,8 +113,8 @@ h5 {
113
113
  .mfui-counter_disabled .mfui-counter__input {
114
114
  background-color: #EDEDED;
115
115
  cursor: default;
116
- color: rgba(51, 51, 51, 0.5);
116
+ color: #33333380;
117
117
  }
118
118
  .mfui-counter_disabled .mfui-counter__icon {
119
- fill: rgba(51, 51, 51, 0.5);
119
+ fill: #33333380;
120
120
  }
@@ -35,7 +35,7 @@ h5 {
35
35
  background-color: #731982;
36
36
  }
37
37
  .mfui-nav-arrow_theme_purple:hover:not(:disabled) {
38
- background-color: #A500BF;
38
+ background-color: #534455;
39
39
  }
40
40
  .mfui-nav-arrow_theme_dark {
41
41
  background-color: rgba(0, 0, 0, 0.25);