@megafon/ui-core 2.5.0 → 3.0.0-beta.11

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 (213) hide show
  1. package/CHANGELOG.md +156 -9
  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 +3 -11
  5. package/dist/es/colors/Colors.d.ts +2 -2
  6. package/dist/es/colors/Colors.js +64 -4
  7. package/dist/es/colors/colorsData.js +78 -71
  8. package/dist/es/components/Accordion/Accordion.css +7 -27
  9. package/dist/es/components/Accordion/Accordion.d.ts +12 -7
  10. package/dist/es/components/Accordion/Accordion.js +25 -20
  11. package/dist/es/components/Banner/Banner.css +2 -37
  12. package/dist/es/components/Banner/Banner.d.ts +10 -2
  13. package/dist/es/components/Banner/Banner.js +35 -26
  14. package/dist/es/components/Banner/BannerDot.css +4 -11
  15. package/dist/es/components/Banner/BannerDot.d.ts +3 -0
  16. package/dist/es/components/Banner/BannerDot.js +8 -3
  17. package/dist/es/components/Button/Button.css +83 -74
  18. package/dist/es/components/Button/Button.d.ts +8 -2
  19. package/dist/es/components/Button/Button.js +16 -8
  20. package/dist/es/components/Calendar/Calendar.css +0 -7
  21. package/dist/es/components/Calendar/Calendar.js +2 -3
  22. package/dist/es/components/Calendar/components/Day/Day.css +10 -17
  23. package/dist/es/components/Calendar/components/Day/Day.js +1 -1
  24. package/dist/es/components/Calendar/components/Month/Month.css +3 -10
  25. package/dist/es/components/Calendar/components/Month/Month.js +21 -5
  26. package/dist/es/components/Carousel/Carousel.css +4 -11
  27. package/dist/es/components/Carousel/Carousel.d.ts +9 -2
  28. package/dist/es/components/Carousel/Carousel.js +28 -25
  29. package/dist/es/components/Checkbox/Checkbox.css +18 -25
  30. package/dist/es/components/Checkbox/Checkbox.d.ts +11 -27
  31. package/dist/es/components/Checkbox/Checkbox.js +77 -90
  32. package/dist/es/components/Collapse/Collapse.d.ts +15 -3
  33. package/dist/es/components/Collapse/Collapse.js +11 -4
  34. package/dist/es/components/ContentArea/ContentArea.css +18 -28
  35. package/dist/es/components/ContentArea/ContentArea.d.ts +2 -7
  36. package/dist/es/components/ContentArea/ContentArea.js +5 -39
  37. package/dist/es/components/Counter/Counter.css +14 -11
  38. package/dist/es/components/Counter/Counter.js +3 -3
  39. package/dist/es/components/Grid/GridColumn.css +0 -7
  40. package/dist/es/components/Header/Header.css +8 -12
  41. package/dist/es/components/Header/Header.d.ts +7 -21
  42. package/dist/es/components/Header/Header.js +31 -67
  43. package/dist/es/components/InputLabel/InputLabel.css +0 -7
  44. package/dist/es/components/InputLabel/InputLabel.d.ts +3 -0
  45. package/dist/es/components/InputLabel/InputLabel.js +9 -4
  46. package/dist/es/components/Link/Link.d.ts +3 -3
  47. package/dist/es/components/Link/Link.js +32 -21
  48. package/dist/es/components/List/List.css +9 -13
  49. package/dist/es/components/List/List.d.ts +1 -1
  50. package/dist/es/components/List/List.js +2 -2
  51. package/dist/es/components/List/ListItem.css +0 -7
  52. package/dist/es/components/Logo/Logo.css +0 -7
  53. package/dist/es/components/Logo/Logo.js +4 -8
  54. package/dist/es/components/NavArrow/NavArrow.css +5 -12
  55. package/dist/es/components/Notification/Notification.css +41 -24
  56. package/dist/es/components/Notification/Notification.d.ts +8 -0
  57. package/dist/es/components/Notification/Notification.js +21 -4
  58. package/dist/es/components/Pagination/Pagination.css +0 -7
  59. package/dist/es/components/Pagination/Pagination.d.ts +9 -2
  60. package/dist/es/components/Pagination/Pagination.js +20 -3
  61. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +9 -9
  62. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +6 -3
  63. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +12 -7
  64. package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +5 -2
  65. package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +10 -2
  66. package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +5 -2
  67. package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +6 -1
  68. package/dist/es/components/Pagination/helpers.d.ts +1 -1
  69. package/dist/es/components/Paragraph/Paragraph.css +10 -31
  70. package/dist/es/components/Paragraph/Paragraph.d.ts +9 -13
  71. package/dist/es/components/Paragraph/Paragraph.js +14 -40
  72. package/dist/es/components/Preloader/Preloader.css +5 -12
  73. package/dist/es/components/Preloader/Preloader.d.ts +4 -0
  74. package/dist/es/components/Preloader/Preloader.js +10 -5
  75. package/dist/es/components/RadioButton/RadioButton.css +7 -14
  76. package/dist/es/components/RadioButton/RadioButton.d.ts +8 -28
  77. package/dist/es/components/RadioButton/RadioButton.js +50 -85
  78. package/dist/es/components/Search/Search.css +20 -25
  79. package/dist/es/components/Search/Search.js +3 -4
  80. package/dist/es/components/Select/Select.css +34 -37
  81. package/dist/es/components/Select/Select.d.ts +43 -50
  82. package/dist/es/components/Select/Select.js +382 -461
  83. package/dist/es/components/Select/reducer/selectReducer.d.ts +34 -0
  84. package/dist/es/components/Select/reducer/selectReducer.js +123 -0
  85. package/dist/es/components/Switcher/Switcher.css +19 -25
  86. package/dist/es/components/Switcher/Switcher.js +1 -1
  87. package/dist/es/components/Tabs/Tab.d.ts +5 -2
  88. package/dist/es/components/Tabs/Tab.js +4 -2
  89. package/dist/es/components/Tabs/Tabs.css +30 -37
  90. package/dist/es/components/Tabs/Tabs.d.ts +8 -2
  91. package/dist/es/components/Tabs/Tabs.js +68 -105
  92. package/dist/es/components/TextField/TextField.css +27 -33
  93. package/dist/es/components/TextField/TextField.d.ts +9 -3
  94. package/dist/es/components/TextField/TextField.js +32 -24
  95. package/dist/es/components/TextLink/TextLink.css +10 -14
  96. package/dist/es/components/TextLink/TextLink.d.ts +1 -1
  97. package/dist/es/components/TextLink/TextLink.js +7 -2
  98. package/dist/es/components/Tile/Tile.css +2 -8
  99. package/dist/es/components/Tile/Tile.d.ts +5 -2
  100. package/dist/es/components/Tile/Tile.js +2 -2
  101. package/dist/es/components/Tooltip/Tooltip.css +1 -8
  102. package/dist/es/components/Tooltip/Tooltip.d.ts +8 -2
  103. package/dist/es/components/Tooltip/Tooltip.js +28 -27
  104. package/dist/es/index.d.ts +1 -0
  105. package/dist/es/index.js +1 -0
  106. package/dist/lib/colors/ColorItem/ColorItem.css +1 -8
  107. package/dist/lib/colors/ColorItem/ColorItem.js +1 -1
  108. package/dist/lib/colors/Colors.css +3 -11
  109. package/dist/lib/colors/Colors.d.ts +2 -2
  110. package/dist/lib/colors/Colors.js +63 -4
  111. package/dist/lib/colors/colorsData.js +78 -71
  112. package/dist/lib/components/Accordion/Accordion.css +7 -27
  113. package/dist/lib/components/Accordion/Accordion.d.ts +12 -7
  114. package/dist/lib/components/Accordion/Accordion.js +24 -19
  115. package/dist/lib/components/Banner/Banner.css +2 -37
  116. package/dist/lib/components/Banner/Banner.d.ts +10 -2
  117. package/dist/lib/components/Banner/Banner.js +35 -25
  118. package/dist/lib/components/Banner/BannerDot.css +4 -11
  119. package/dist/lib/components/Banner/BannerDot.d.ts +3 -0
  120. package/dist/lib/components/Banner/BannerDot.js +10 -2
  121. package/dist/lib/components/Button/Button.css +83 -74
  122. package/dist/lib/components/Button/Button.d.ts +8 -2
  123. package/dist/lib/components/Button/Button.js +16 -8
  124. package/dist/lib/components/Calendar/Calendar.css +0 -7
  125. package/dist/lib/components/Calendar/Calendar.js +3 -3
  126. package/dist/lib/components/Calendar/components/Day/Day.css +10 -17
  127. package/dist/lib/components/Calendar/components/Day/Day.js +1 -1
  128. package/dist/lib/components/Calendar/components/Month/Month.css +3 -10
  129. package/dist/lib/components/Calendar/components/Month/Month.js +20 -4
  130. package/dist/lib/components/Carousel/Carousel.css +4 -11
  131. package/dist/lib/components/Carousel/Carousel.d.ts +9 -2
  132. package/dist/lib/components/Carousel/Carousel.js +26 -23
  133. package/dist/lib/components/Checkbox/Checkbox.css +18 -25
  134. package/dist/lib/components/Checkbox/Checkbox.d.ts +11 -27
  135. package/dist/lib/components/Checkbox/Checkbox.js +82 -125
  136. package/dist/lib/components/Collapse/Collapse.d.ts +15 -3
  137. package/dist/lib/components/Collapse/Collapse.js +13 -4
  138. package/dist/lib/components/ContentArea/ContentArea.css +18 -28
  139. package/dist/lib/components/ContentArea/ContentArea.d.ts +2 -7
  140. package/dist/lib/components/ContentArea/ContentArea.js +5 -42
  141. package/dist/lib/components/Counter/Counter.css +14 -11
  142. package/dist/lib/components/Counter/Counter.js +3 -3
  143. package/dist/lib/components/Grid/GridColumn.css +0 -7
  144. package/dist/lib/components/Header/Header.css +8 -12
  145. package/dist/lib/components/Header/Header.d.ts +7 -21
  146. package/dist/lib/components/Header/Header.js +31 -98
  147. package/dist/lib/components/InputLabel/InputLabel.css +0 -7
  148. package/dist/lib/components/InputLabel/InputLabel.d.ts +3 -0
  149. package/dist/lib/components/InputLabel/InputLabel.js +11 -3
  150. package/dist/lib/components/Link/Link.d.ts +3 -3
  151. package/dist/lib/components/Link/Link.js +44 -26
  152. package/dist/lib/components/List/List.css +9 -13
  153. package/dist/lib/components/List/List.d.ts +1 -1
  154. package/dist/lib/components/List/List.js +2 -2
  155. package/dist/lib/components/List/ListItem.css +0 -7
  156. package/dist/lib/components/Logo/Logo.css +0 -7
  157. package/dist/lib/components/Logo/Logo.js +4 -8
  158. package/dist/lib/components/NavArrow/NavArrow.css +5 -12
  159. package/dist/lib/components/Notification/Notification.css +41 -24
  160. package/dist/lib/components/Notification/Notification.d.ts +8 -0
  161. package/dist/lib/components/Notification/Notification.js +20 -3
  162. package/dist/lib/components/Pagination/Pagination.css +0 -7
  163. package/dist/lib/components/Pagination/Pagination.d.ts +9 -2
  164. package/dist/lib/components/Pagination/Pagination.js +20 -2
  165. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +9 -9
  166. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +6 -3
  167. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +12 -6
  168. package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +5 -2
  169. package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +9 -1
  170. package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +5 -2
  171. package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +6 -1
  172. package/dist/lib/components/Pagination/helpers.d.ts +1 -1
  173. package/dist/lib/components/Paragraph/Paragraph.css +10 -31
  174. package/dist/lib/components/Paragraph/Paragraph.d.ts +9 -13
  175. package/dist/lib/components/Paragraph/Paragraph.js +15 -41
  176. package/dist/lib/components/Preloader/Preloader.css +5 -12
  177. package/dist/lib/components/Preloader/Preloader.d.ts +4 -0
  178. package/dist/lib/components/Preloader/Preloader.js +10 -4
  179. package/dist/lib/components/RadioButton/RadioButton.css +7 -14
  180. package/dist/lib/components/RadioButton/RadioButton.d.ts +8 -28
  181. package/dist/lib/components/RadioButton/RadioButton.js +51 -117
  182. package/dist/lib/components/Search/Search.css +20 -25
  183. package/dist/lib/components/Search/Search.js +3 -4
  184. package/dist/lib/components/Select/Select.css +34 -37
  185. package/dist/lib/components/Select/Select.d.ts +43 -50
  186. package/dist/lib/components/Select/Select.js +375 -483
  187. package/dist/lib/components/Select/reducer/selectReducer.d.ts +34 -0
  188. package/dist/lib/components/Select/reducer/selectReducer.js +136 -0
  189. package/dist/lib/components/Switcher/Switcher.css +19 -25
  190. package/dist/lib/components/Switcher/Switcher.js +1 -1
  191. package/dist/lib/components/Tabs/Tab.d.ts +5 -2
  192. package/dist/lib/components/Tabs/Tab.js +4 -2
  193. package/dist/lib/components/Tabs/Tabs.css +30 -37
  194. package/dist/lib/components/Tabs/Tabs.d.ts +8 -2
  195. package/dist/lib/components/Tabs/Tabs.js +68 -105
  196. package/dist/lib/components/TextField/TextField.css +27 -33
  197. package/dist/lib/components/TextField/TextField.d.ts +9 -3
  198. package/dist/lib/components/TextField/TextField.js +30 -23
  199. package/dist/lib/components/TextLink/TextLink.css +10 -14
  200. package/dist/lib/components/TextLink/TextLink.d.ts +1 -1
  201. package/dist/lib/components/TextLink/TextLink.js +7 -2
  202. package/dist/lib/components/Tile/Tile.css +2 -8
  203. package/dist/lib/components/Tile/Tile.d.ts +5 -2
  204. package/dist/lib/components/Tile/Tile.js +2 -2
  205. package/dist/lib/components/Tooltip/Tooltip.css +1 -8
  206. package/dist/lib/components/Tooltip/Tooltip.d.ts +8 -2
  207. package/dist/lib/components/Tooltip/Tooltip.js +27 -26
  208. package/dist/lib/index.d.ts +1 -0
  209. package/dist/lib/index.js +8 -0
  210. package/package.json +5 -4
  211. package/styles/base.less +2 -73
  212. package/styles/colors.css +60 -0
  213. package/styles/colorsDark.css +62 -0
@@ -1,10 +1,3 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
1
  .mfui-button {
9
2
  font-family: inherit;
10
3
  font-size: 15px;
@@ -15,7 +8,7 @@ h5 {
15
8
  padding: 0 32px;
16
9
  border: none;
17
10
  border-radius: 30px;
18
- color: #FFFFFF;
11
+ color: var(--stcWhite);
19
12
  font-weight: 500;
20
13
  text-align: center;
21
14
  text-decoration: none;
@@ -207,119 +200,135 @@ h5 {
207
200
  display: none;
208
201
  }
209
202
  .mfui-button_type_primary.mfui-button_theme_green {
210
- color: #FFFFFF;
211
- background-color: #00B956;
203
+ color: var(--stcWhite);
204
+ background-color: var(--brandGreen);
212
205
  }
213
206
  .mfui-button_type_primary.mfui-button_theme_green svg {
214
- fill: #FFFFFF;
207
+ fill: var(--stcWhite);
215
208
  }
216
209
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_green:not(.mfui-button_loading):hover {
217
- background-color: #10E272;
218
- -webkit-box-shadow: inset 0 0 0 1px #10E272;
219
- box-shadow: inset 0 0 0 1px #10E272;
210
+ background-color: var(--buttonHoverGreen);
211
+ -webkit-box-shadow: inset 0 0 0 1px var(--buttonHoverGreen);
212
+ box-shadow: inset 0 0 0 1px var(--buttonHoverGreen);
220
213
  }
221
214
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_green:not(.mfui-button_loading):active {
222
- background-color: #404D46;
223
- -webkit-box-shadow: inset 0 0 0 1px #404D46;
224
- box-shadow: inset 0 0 0 1px #404D46;
215
+ background-color: var(--buttonDown);
216
+ -webkit-box-shadow: inset 0 0 0 1px var(--buttonDown);
217
+ box-shadow: inset 0 0 0 1px var(--buttonDown);
225
218
  }
226
219
  .mfui-button_type_primary.mfui-button_theme_purple {
227
- color: #FFFFFF;
228
- background-color: #731982;
220
+ color: var(--stcWhite);
221
+ background-color: var(--brandPurple);
229
222
  }
230
223
  .mfui-button_type_primary.mfui-button_theme_purple svg {
231
- fill: #FFFFFF;
224
+ fill: var(--stcWhite);
232
225
  }
233
226
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_purple:not(.mfui-button_loading):hover {
234
- background-color: #534455;
235
- -webkit-box-shadow: inset 0 0 0 1px #534455;
236
- box-shadow: inset 0 0 0 1px #534455;
227
+ background-color: var(--buttonhoverPurple);
228
+ -webkit-box-shadow: inset 0 0 0 1px var(--buttonhoverPurple);
229
+ box-shadow: inset 0 0 0 1px var(--buttonhoverPurple);
237
230
  }
238
231
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_purple:not(.mfui-button_loading):active {
239
- background-color: #404D46;
240
- -webkit-box-shadow: inset 0 0 0 1px #404D46;
241
- box-shadow: inset 0 0 0 1px #404D46;
232
+ background-color: var(--buttonDown);
233
+ -webkit-box-shadow: inset 0 0 0 1px var(--buttonDown);
234
+ box-shadow: inset 0 0 0 1px var(--buttonDown);
242
235
  }
243
236
  .mfui-button_type_primary.mfui-button_theme_white {
244
- color: #333333;
245
- background-color: #FFFFFF;
237
+ color: var(--stcBlack);
238
+ background-color: var(--stcWhite);
246
239
  }
247
240
  .mfui-button_type_primary.mfui-button_theme_white svg {
248
- fill: #333333;
241
+ fill: var(--stcBlack);
249
242
  }
250
243
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_white:not(.mfui-button_loading):hover {
251
- color: #FFFFFF;
252
- background-color: #10E272;
253
- -webkit-box-shadow: inset 0 0 0 1px #10E272;
254
- box-shadow: inset 0 0 0 1px #10E272;
244
+ color: var(--stcBlack);
245
+ background-color: var(--buttonHoverGreen);
246
+ -webkit-box-shadow: inset 0 0 0 1px var(--buttonHoverGreen);
247
+ box-shadow: inset 0 0 0 1px var(--buttonHoverGreen);
255
248
  }
256
249
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_white:not(.mfui-button_loading):hover svg {
257
- fill: #FFFFFF;
250
+ fill: var(--stcBlack);
258
251
  }
259
252
  .mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_white:not(.mfui-button_loading):active {
260
- background-color: #404D46;
261
- -webkit-box-shadow: inset 0 0 0 1px #404D46;
262
- box-shadow: inset 0 0 0 1px #404D46;
253
+ background-color: var(--buttonDown);
254
+ -webkit-box-shadow: inset 0 0 0 1px var(--buttonDown);
255
+ box-shadow: inset 0 0 0 1px var(--buttonDown);
263
256
  }
264
257
  .mfui-button_type_outline.mfui-button_theme_green {
265
- color: #00B956;
258
+ color: var(--brandGreen);
266
259
  background-color: transparent;
267
- -webkit-box-shadow: inset 0 0 0 1px #00B956;
268
- box-shadow: inset 0 0 0 1px #00B956;
260
+ -webkit-box-shadow: inset 0 0 0 1px var(--brandGreen);
261
+ box-shadow: inset 0 0 0 1px var(--brandGreen);
269
262
  }
270
263
  .mfui-button_type_outline.mfui-button_theme_green svg {
271
- fill: #00B956;
264
+ fill: var(--brandGreen);
265
+ }
266
+ .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_green {
267
+ --brandGreen7: rgba(0, 185, 86, 0.07);
268
+ --brandGreen14: rgba(0, 185, 86, 0.14);
272
269
  }
273
270
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_green:not(.mfui-button_loading):hover {
274
- background-color: rgba(0, 185, 86, 0.07);
271
+ background-color: var(--brandGreen7);
275
272
  }
276
273
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_green:not(.mfui-button_loading):active {
277
- background-color: rgba(0, 185, 86, 0.14);
274
+ background-color: var(--brandGreen14);
278
275
  }
279
276
  .mfui-button_type_outline.mfui-button_theme_purple {
280
- color: #731982;
277
+ color: var(--brandPurple);
281
278
  background-color: transparent;
282
- -webkit-box-shadow: inset 0 0 0 1px #731982;
283
- box-shadow: inset 0 0 0 1px #731982;
279
+ -webkit-box-shadow: inset 0 0 0 1px var(--brandPurple);
280
+ box-shadow: inset 0 0 0 1px var(--brandPurple);
284
281
  }
285
282
  .mfui-button_type_outline.mfui-button_theme_purple svg {
286
- fill: #731982;
283
+ fill: var(--brandPurple);
284
+ }
285
+ .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_purple {
286
+ --brandPurple7: rgba(115, 25, 130, 0.07);
287
+ --brandPurple14: rgba(115, 25, 130, 0.14);
287
288
  }
288
289
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_purple:not(.mfui-button_loading):hover {
289
- background-color: rgba(115, 25, 130, 0.07);
290
+ background-color: var(--brandPurple7);
290
291
  }
291
292
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_purple:not(.mfui-button_loading):active {
292
- background-color: rgba(115, 25, 130, 0.14);
293
+ background-color: var(--brandPurple14);
293
294
  }
294
295
  .mfui-button_type_outline.mfui-button_theme_white {
295
- color: #FFFFFF;
296
+ color: var(--stcWhite);
296
297
  background-color: transparent;
297
- -webkit-box-shadow: inset 0 0 0 1px #FFFFFF;
298
- box-shadow: inset 0 0 0 1px #FFFFFF;
298
+ -webkit-box-shadow: inset 0 0 0 1px var(--stcWhite);
299
+ box-shadow: inset 0 0 0 1px var(--stcWhite);
299
300
  }
300
301
  .mfui-button_type_outline.mfui-button_theme_white svg {
301
- fill: #FFFFFF;
302
+ fill: var(--stcWhite);
303
+ }
304
+ .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white {
305
+ --base7: rgba(255, 255, 255, 0.07);
306
+ --base14: rgba(255, 255, 255, 0.14);
302
307
  }
303
308
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white:not(.mfui-button_loading):hover {
304
- background-color: rgba(255, 255, 255, 0.07);
309
+ background-color: var(--base7);
305
310
  }
306
311
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white:not(.mfui-button_loading):active {
307
- background-color: rgba(255, 255, 255, 0.14);
312
+ background-color: var(--base14);
308
313
  }
309
314
  .mfui-button_type_outline.mfui-button_theme_black {
310
- color: #333333;
315
+ color: var(--stcBlack);
311
316
  background-color: transparent;
312
- -webkit-box-shadow: inset 0 0 0 1px #333333;
313
- box-shadow: inset 0 0 0 1px #333333;
317
+ -webkit-box-shadow: inset 0 0 0 1px var(--stcBlack);
318
+ box-shadow: inset 0 0 0 1px var(--stcBlack);
314
319
  }
315
320
  .mfui-button_type_outline.mfui-button_theme_black svg {
316
- fill: #333333;
321
+ fill: var(--stcBlack);
322
+ }
323
+ .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_black {
324
+ --content7: rgba(51, 51, 51, 0.07);
325
+ --content14: rgba(51, 51, 51, 0.14);
317
326
  }
318
327
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_black:not(.mfui-button_loading):hover {
319
- background-color: rgba(51, 51, 51, 0.07);
328
+ background-color: var(--content7);
320
329
  }
321
330
  .mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_black:not(.mfui-button_loading):active {
322
- background-color: rgba(51, 51, 51, 0.14);
331
+ background-color: var(--content14);
323
332
  }
324
333
  .mfui-button_full-width {
325
334
  display: block;
@@ -332,44 +341,44 @@ h5 {
332
341
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled,
333
342
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:hover,
334
343
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:active {
335
- color: #33333380;
336
- background-color: #EDEDED;
337
- -webkit-box-shadow: inset 0 0 0 1px #D8D8D8;
338
- box-shadow: inset 0 0 0 1px #D8D8D8;
344
+ color: var(--spbSky3);
345
+ background-color: var(--spbSky1);
346
+ -webkit-box-shadow: inset 0 0 0 1px var(--spbSky3);
347
+ box-shadow: inset 0 0 0 1px var(--spbSky3);
339
348
  }
340
349
  .mfui-button.mfui-button_type_primary.mfui-button_disabled svg,
341
350
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled svg,
342
351
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:hover svg,
343
352
  .mfui-button.mfui-button_no-touch.mfui-button_type_primary.mfui-button_disabled:active svg {
344
- fill: #33333380;
353
+ fill: var(--spbSky3);
345
354
  }
346
355
  .mfui-button.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled,
347
356
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled,
348
357
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:hover,
349
358
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:active {
350
- color: #FFFFFF80;
359
+ color: var(--stcWhite50);
351
360
  background-color: transparent;
352
- -webkit-box-shadow: inset 0 0 0 1px #FFFFFF80;
353
- box-shadow: inset 0 0 0 1px #FFFFFF80;
361
+ -webkit-box-shadow: inset 0 0 0 1px var(--stcWhite50);
362
+ box-shadow: inset 0 0 0 1px var(--stcWhite50);
354
363
  }
355
364
  .mfui-button.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled svg,
356
365
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled svg,
357
366
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:hover svg,
358
367
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white.mfui-button_disabled:active svg {
359
- fill: #FFFFFF80;
368
+ fill: var(--stcWhite50);
360
369
  }
361
370
  .mfui-button.mfui-button_type_outline.mfui-button_disabled,
362
371
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled,
363
372
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:hover,
364
373
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:active {
365
- color: #33333380;
374
+ color: var(--spbSky3);
366
375
  background-color: transparent;
367
- -webkit-box-shadow: inset 0 0 0 1px #D8D8D8;
368
- box-shadow: inset 0 0 0 1px #D8D8D8;
376
+ -webkit-box-shadow: inset 0 0 0 1px var(--spbSky3);
377
+ box-shadow: inset 0 0 0 1px var(--spbSky3);
369
378
  }
370
379
  .mfui-button.mfui-button_type_outline.mfui-button_disabled svg,
371
380
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled svg,
372
381
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:hover svg,
373
382
  .mfui-button.mfui-button_no-touch.mfui-button_type_outline.mfui-button_disabled:active svg {
374
- fill: #33333380;
383
+ fill: var(--spbSky3);
375
384
  }
@@ -1,5 +1,4 @@
1
1
  import React, { Ref } from 'react';
2
- import { IFilterDataAttrs } from '@megafon/ui-helpers';
3
2
  import './Button.less';
4
3
  export declare const ButtonTypes: {
5
4
  readonly PRIMARY: "primary";
@@ -19,7 +18,7 @@ export declare const ButtonSizes: {
19
18
  readonly LARGE: "large";
20
19
  };
21
20
  declare type ButtonSizesType = typeof ButtonSizes[keyof typeof ButtonSizes];
22
- export interface IButtonProps extends IFilterDataAttrs {
21
+ export interface IButtonProps {
23
22
  /** Дополнительный класс корневого элемента */
24
23
  className?: string | string[];
25
24
  /** Дополнительные классы для внутренних элементов */
@@ -31,6 +30,13 @@ export interface IButtonProps extends IFilterDataAttrs {
31
30
  /** Inner container class */
32
31
  inner?: string;
33
32
  };
33
+ /** Дополнительные data атрибуты к внутренним элементам */
34
+ dataAttrs?: {
35
+ root?: Record<string, string>;
36
+ content?: Record<string, string>;
37
+ inner?: Record<string, string>;
38
+ loader?: Record<string, string>;
39
+ };
34
40
  /** Тема компонента */
35
41
  theme?: ButtonThemesType;
36
42
  /** Тип компонента */
@@ -96,7 +96,7 @@ var Button = function Button(_ref) {
96
96
  return;
97
97
  }
98
98
 
99
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
99
+ onClick && onClick(e);
100
100
  }, [disabled, onClick]);
101
101
  var currentTheme = React.useMemo(function () {
102
102
  return type === ButtonTypes.PRIMARY && theme === ButtonThemes.BLACK ? ButtonThemes.GREEN : theme;
@@ -121,9 +121,9 @@ var Button = function Button(_ref) {
121
121
  return null;
122
122
  }
123
123
 
124
- return /*#__PURE__*/React.createElement("div", {
124
+ return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.content), {
125
125
  className: cn('content', contentClassName)
126
- }, icon && /*#__PURE__*/React.createElement("div", {
126
+ }), icon && /*#__PURE__*/React.createElement("div", {
127
127
  className: cn('icon')
128
128
  }, icon), children && /*#__PURE__*/React.createElement("span", {
129
129
  className: cn('text')
@@ -145,6 +145,9 @@ var Button = function Button(_ref) {
145
145
  }, [icon, children]);
146
146
  var renderedLoader = React.useMemo(function () {
147
147
  return /*#__PURE__*/React.createElement(Preloader, {
148
+ dataAttrs: {
149
+ root: filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.loader)
150
+ },
148
151
  color: loaderColor,
149
152
  sizeAll: getLoaderSize(sizeAll),
150
153
  sizeWide: sizeWide && getLoaderSize(sizeWide),
@@ -152,7 +155,7 @@ var Button = function Button(_ref) {
152
155
  sizeTablet: sizeTablet && getLoaderSize(sizeTablet),
153
156
  sizeMobile: sizeMobile && getLoaderSize(sizeMobile)
154
157
  });
155
- }, [sizeAll, sizeWide, sizeDesktop, sizeTablet, sizeMobile, loaderColor]);
158
+ }, [sizeAll, sizeWide, sizeDesktop, sizeTablet, sizeMobile]);
156
159
 
157
160
  var setRelAttribute = function setRelAttribute() {
158
161
  if (ElementType !== 'a') {
@@ -174,7 +177,7 @@ var Button = function Button(_ref) {
174
177
  React.useEffect(function () {
175
178
  setTouch(detectTouch());
176
179
  }, []);
177
- return /*#__PURE__*/React.createElement(ElementType, _extends({}, filterDataAttrs(dataAttrs), {
180
+ return /*#__PURE__*/React.createElement(ElementType, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
178
181
  className: cn({
179
182
  type: type,
180
183
  theme: currentTheme,
@@ -197,9 +200,9 @@ var Button = function Button(_ref) {
197
200
  onClick: handleClick,
198
201
  disabled: !href && disabled,
199
202
  ref: buttonRef
200
- }), /*#__PURE__*/React.createElement("div", {
203
+ }), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner), {
201
204
  className: cn('inner', innerClassName)
202
- }, !showLoader ? renderedContent : renderedLoader));
205
+ }), !showLoader ? renderedContent : renderedLoader));
203
206
  };
204
207
 
205
208
  Button.propTypes = {
@@ -208,6 +211,12 @@ Button.propTypes = {
208
211
  content: PropTypes.string,
209
212
  inner: PropTypes.string
210
213
  }),
214
+ dataAttrs: PropTypes.shape({
215
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
216
+ content: PropTypes.objectOf(PropTypes.string.isRequired),
217
+ inner: PropTypes.objectOf(PropTypes.string.isRequired),
218
+ loader: PropTypes.objectOf(PropTypes.string.isRequired)
219
+ }),
211
220
  theme: PropTypes.oneOf(Object.values(ButtonThemes)),
212
221
  type: PropTypes.oneOf(Object.values(ButtonTypes)),
213
222
  href: PropTypes.string,
@@ -225,7 +234,6 @@ Button.propTypes = {
225
234
  showArrow: PropTypes.bool,
226
235
  icon: PropTypes.element,
227
236
  disabled: PropTypes.bool,
228
- dataAttrs: PropTypes.objectOf(PropTypes.string.isRequired),
229
237
  buttonRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
230
238
  current: PropTypes.elementType
231
239
  }), PropTypes.any])]),
@@ -1,10 +1,3 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
1
  .mfui-calendar {
9
2
  display: -webkit-inline-box;
10
3
  display: -ms-inline-flexbox;
@@ -113,7 +113,7 @@ var Calendar = function Calendar(_ref) {
113
113
  useEffect(function () {
114
114
  var propsStartDate = calendarStateFromProps.startDate;
115
115
  setCalendarState(calendarStateFromProps);
116
- propsStartDate && goToDate(propsStartDate); // eslint-disable-next-line react-hooks/exhaustive-deps
116
+ propsStartDate && goToDate(propsStartDate);
117
117
  }, [calendarStateFromProps]);
118
118
 
119
119
  var getCalendarState = function getCalendarState(date) {
@@ -178,7 +178,7 @@ var Calendar = function Calendar(_ref) {
178
178
  var nextStartDate = nextState.startDate,
179
179
  nextEndDate = nextState.endDate;
180
180
  setCalendarState(nextState);
181
- onChange === null || onChange === void 0 ? void 0 : onChange(nextStartDate, nextEndDate);
181
+ onChange && onChange(nextStartDate, nextEndDate);
182
182
  };
183
183
 
184
184
  var handleDateHover = function handleDateHover(date) {
@@ -224,7 +224,6 @@ var Calendar = function Calendar(_ref) {
224
224
  var month = _ref2.month,
225
225
  year = _ref2.year;
226
226
 
227
- // eslint-disable-next-line react-hooks/rules-of-hooks
228
227
  var _useMonth = useMonth({
229
228
  year: year,
230
229
  month: month,
@@ -1,10 +1,3 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
1
  .mfui-day {
9
2
  position: relative;
10
3
  -webkit-box-sizing: content-box;
@@ -13,7 +6,7 @@ h5 {
13
6
  height: 32px;
14
7
  padding: 0 10px 8px 0;
15
8
  border: none;
16
- color: #333333;
9
+ color: var(--content);
17
10
  line-height: 24px;
18
11
  text-decoration: none;
19
12
  background-color: rgba(0, 0, 0, 0);
@@ -44,16 +37,16 @@ h5 {
44
37
  width: 32px;
45
38
  height: 32px;
46
39
  border-radius: 50% !important;
47
- color: #333333;
48
- background-color: #F6F6F6;
40
+ color: var(--content);
41
+ background-color: var(--spbSky0);
49
42
  }
50
43
  .mfui-day:not(:disabled):not(.mfui-day_active):hover:after {
51
- color: #333333;
52
- background-color: #F6F6F6;
44
+ color: var(--content);
45
+ background-color: var(--spbSky0);
53
46
  }
54
47
  .mfui-day:not(:disabled):not(.mfui-day_active):focus:after,
55
48
  .mfui-day_active:after {
56
- background-color: #00B956;
49
+ background-color: var(--brandGreen);
57
50
  }
58
51
  .mfui-day_disabled {
59
52
  cursor: default;
@@ -62,7 +55,7 @@ h5 {
62
55
  }
63
56
  .mfui-day_active,
64
57
  .mfui-day:not(:disabled):not(.mfui-day_active):focus {
65
- color: #FFFFFF;
58
+ color: var(--stcWhite);
66
59
  }
67
60
  .mfui-day_active + .mfui-day_active:before,
68
61
  .mfui-day_between:hover + .mfui-day:not(.mfui-day_monday).mfui-day_active:before {
@@ -74,7 +67,7 @@ h5 {
74
67
  display: block;
75
68
  width: 32px;
76
69
  height: 32px;
77
- background-color: #EDEDED;
70
+ background-color: var(--spbSky1);
78
71
  }
79
72
  .mfui-day_between {
80
73
  position: relative;
@@ -89,7 +82,7 @@ h5 {
89
82
  display: block;
90
83
  height: 32px;
91
84
  padding: 0 20px;
92
- background-color: #EDEDED;
85
+ background-color: var(--spbSky1);
93
86
  }
94
87
  .mfui-day_between:after {
95
88
  content: '';
@@ -100,7 +93,7 @@ h5 {
100
93
  display: block;
101
94
  width: 40px;
102
95
  height: 32px;
103
- background-color: #EDEDED;
96
+ background-color: var(--spbSky1);
104
97
  }
105
98
  .mfui-day_sunday,
106
99
  .mfui-day_last {
@@ -60,7 +60,7 @@ var Day = function Day(_a) {
60
60
  };
61
61
 
62
62
  var handleMouseLeave = function handleMouseLeave() {
63
- onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave();
63
+ onMouseLeave && onMouseLeave();
64
64
  };
65
65
 
66
66
  return /*#__PURE__*/React.createElement("button", {
@@ -1,10 +1,3 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
1
  .mfui-month {
9
2
  position: relative;
10
3
  z-index: 1;
@@ -42,7 +35,7 @@ h5 {
42
35
  -moz-user-select: none;
43
36
  -ms-user-select: none;
44
37
  user-select: none;
45
- fill: #333333;
38
+ fill: var(--content);
46
39
  }
47
40
  .mfui-month__title {
48
41
  font-size: 15px;
@@ -56,7 +49,7 @@ h5 {
56
49
  grid-template-columns: repeat(7, 1fr);
57
50
  width: 272px;
58
51
  padding-bottom: 13px;
59
- border-bottom: 1px solid #EDEDED;
52
+ border-bottom: 1px solid var(--spbSky1);
60
53
  -webkit-column-gap: 22px;
61
54
  -moz-column-gap: 22px;
62
55
  column-gap: 22px;
@@ -66,7 +59,7 @@ h5 {
66
59
  line-height: 16px;
67
60
  width: 20px;
68
61
  height: 16px;
69
- color: #333333;
62
+ color: var(--content);
70
63
  font-weight: 600;
71
64
  line-height: 24px;
72
65
  text-align: center;
@@ -2,7 +2,7 @@ import "core-js/modules/es.array.concat";
2
2
  import "core-js/modules/es.array.map";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  import React from 'react';
5
- import { cnCreate } from '@megafon/ui-helpers';
5
+ import { checkEventIsClickOrEnterPress, cnCreate } from '@megafon/ui-helpers';
6
6
  import "./Month.css";
7
7
  import PropTypes from 'prop-types';
8
8
 
@@ -38,12 +38,22 @@ var Month = function Month(_ref) {
38
38
  goToNextMonth = _ref.goToNextMonth,
39
39
  children = _ref.children;
40
40
 
41
- var handleArrowLeftClick = function handleArrowLeftClick() {
42
- !isPrevMonthDisabled && goToPreviousMonth();
41
+ var handleArrowLeftClick = function handleArrowLeftClick(e) {
42
+ if (checkEventIsClickOrEnterPress(e)) {
43
+ !isPrevMonthDisabled && goToPreviousMonth();
44
+ }
43
45
  };
44
46
 
45
- var handleArrowRightClick = function handleArrowRightClick() {
46
- !isNextMonthDisabled && goToNextMonth();
47
+ var handleArrowRightClick = function handleArrowRightClick(e) {
48
+ if (checkEventIsClickOrEnterPress(e)) {
49
+ !isNextMonthDisabled && goToNextMonth();
50
+ }
51
+ };
52
+
53
+ var getTabIndex = function getTabIndex(hasFocus) {
54
+ var tabIndexWithFocus = 0;
55
+ var tabIndexWithoutFocus = -1;
56
+ return hasFocus ? tabIndexWithFocus : tabIndexWithoutFocus;
47
57
  };
48
58
 
49
59
  return /*#__PURE__*/React.createElement("div", {
@@ -51,16 +61,22 @@ var Month = function Month(_ref) {
51
61
  }, /*#__PURE__*/React.createElement("div", {
52
62
  className: cn('header')
53
63
  }, /*#__PURE__*/React.createElement(ArrowLeft, {
64
+ role: "button",
65
+ tabIndex: getTabIndex(!isPrevMonthDisabled),
54
66
  className: cn('arrow', {
55
67
  disabled: isPrevMonthDisabled
56
68
  }),
69
+ onKeyDown: handleArrowLeftClick,
57
70
  onClick: handleArrowLeftClick
58
71
  }), /*#__PURE__*/React.createElement("span", {
59
72
  className: cn('title')
60
73
  }, "".concat(monthLabel, " ").concat(year)), /*#__PURE__*/React.createElement(ArrowRight, {
74
+ role: "button",
75
+ tabIndex: getTabIndex(!isNextMonthDisabled),
61
76
  className: cn('arrow', {
62
77
  disabled: isNextMonthDisabled
63
78
  }),
79
+ onKeyDown: handleArrowRightClick,
64
80
  onClick: handleArrowRightClick
65
81
  })), /*#__PURE__*/React.createElement("div", {
66
82
  className: cn('weekday-labels')
@@ -1,10 +1,3 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
1
  .mfui-carousel {
9
2
  position: relative;
10
3
  display: -webkit-box;
@@ -158,10 +151,10 @@ h5 {
158
151
  margin-right: 8px;
159
152
  }
160
153
  .mfui-carousel_nav-theme_green .swiper-pagination-bullet:before {
161
- background-color: #FFFFFF80;
154
+ background-color: var(--stcWhite50);
162
155
  }
163
156
  .mfui-carousel_nav-theme_light .swiper-pagination-bullet:before {
164
- background-color: rgba(51, 51, 51, 0.25);
157
+ background-color: var(--spbSky2);
165
158
  }
166
159
  .mfui-carousel .swiper-pagination-bullet-active {
167
160
  padding: 0;
@@ -172,12 +165,12 @@ h5 {
172
165
  cursor: default;
173
166
  }
174
167
  .mfui-carousel_nav-theme_green .swiper-pagination-bullet-active:before {
175
- background-color: #FFFFFF;
168
+ background-color: var(--base);
176
169
  }
177
170
  .mfui-carousel_nav-theme_light .swiper-pagination-bullet-active {
178
171
  padding: 0;
179
172
  cursor: default;
180
173
  }
181
174
  .mfui-carousel_nav-theme_light .swiper-pagination-bullet-active:before {
182
- background-color: #731982;
175
+ background-color: var(--brandPurple);
183
176
  }
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import { IFilterDataAttrs } from '@megafon/ui-helpers';
3
2
  import SwiperCore from 'swiper';
4
3
  import { PaginationOptions } from 'swiper/types/components/pagination';
5
4
  import './Carousel.less';
@@ -24,7 +23,7 @@ export declare type SlidesSettingsType = {
24
23
  spaceBetween: number;
25
24
  };
26
25
  };
27
- export interface ICarouselProps extends IFilterDataAttrs {
26
+ export interface ICarouselProps {
28
27
  /** Ссылка на корневой элемент */
29
28
  rootRef?: React.Ref<HTMLDivElement>;
30
29
  /** Дополнительные классы для корневого элемента */
@@ -39,6 +38,14 @@ export interface ICarouselProps extends IFilterDataAttrs {
39
38
  next?: string;
40
39
  slide?: string;
41
40
  };
41
+ /** Дополнительные data атрибуты к внутренним элементам */
42
+ dataAttrs?: {
43
+ root?: Record<string, string>;
44
+ slider?: Record<string, string>;
45
+ prev?: Record<string, string>;
46
+ next?: Record<string, string>;
47
+ slide?: Record<string, string>;
48
+ };
42
49
  /** Настройки слайдов */
43
50
  slidesSettings?: SlidesSettingsType;
44
51
  /** Смена слайдов с зацикливанием */