@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.
- package/CHANGELOG.md +156 -9
- package/dist/es/colors/ColorItem/ColorItem.css +1 -8
- package/dist/es/colors/ColorItem/ColorItem.js +1 -1
- package/dist/es/colors/Colors.css +3 -11
- package/dist/es/colors/Colors.d.ts +2 -2
- package/dist/es/colors/Colors.js +64 -4
- package/dist/es/colors/colorsData.js +78 -71
- package/dist/es/components/Accordion/Accordion.css +7 -27
- package/dist/es/components/Accordion/Accordion.d.ts +12 -7
- package/dist/es/components/Accordion/Accordion.js +25 -20
- package/dist/es/components/Banner/Banner.css +2 -37
- package/dist/es/components/Banner/Banner.d.ts +10 -2
- package/dist/es/components/Banner/Banner.js +35 -26
- package/dist/es/components/Banner/BannerDot.css +4 -11
- package/dist/es/components/Banner/BannerDot.d.ts +3 -0
- package/dist/es/components/Banner/BannerDot.js +8 -3
- package/dist/es/components/Button/Button.css +83 -74
- package/dist/es/components/Button/Button.d.ts +8 -2
- package/dist/es/components/Button/Button.js +16 -8
- package/dist/es/components/Calendar/Calendar.css +0 -7
- package/dist/es/components/Calendar/Calendar.js +2 -3
- package/dist/es/components/Calendar/components/Day/Day.css +10 -17
- package/dist/es/components/Calendar/components/Day/Day.js +1 -1
- package/dist/es/components/Calendar/components/Month/Month.css +3 -10
- package/dist/es/components/Calendar/components/Month/Month.js +21 -5
- package/dist/es/components/Carousel/Carousel.css +4 -11
- package/dist/es/components/Carousel/Carousel.d.ts +9 -2
- package/dist/es/components/Carousel/Carousel.js +28 -25
- package/dist/es/components/Checkbox/Checkbox.css +18 -25
- package/dist/es/components/Checkbox/Checkbox.d.ts +11 -27
- package/dist/es/components/Checkbox/Checkbox.js +77 -90
- package/dist/es/components/Collapse/Collapse.d.ts +15 -3
- package/dist/es/components/Collapse/Collapse.js +11 -4
- package/dist/es/components/ContentArea/ContentArea.css +18 -28
- package/dist/es/components/ContentArea/ContentArea.d.ts +2 -7
- package/dist/es/components/ContentArea/ContentArea.js +5 -39
- package/dist/es/components/Counter/Counter.css +14 -11
- package/dist/es/components/Counter/Counter.js +3 -3
- package/dist/es/components/Grid/GridColumn.css +0 -7
- package/dist/es/components/Header/Header.css +8 -12
- package/dist/es/components/Header/Header.d.ts +7 -21
- package/dist/es/components/Header/Header.js +31 -67
- package/dist/es/components/InputLabel/InputLabel.css +0 -7
- package/dist/es/components/InputLabel/InputLabel.d.ts +3 -0
- package/dist/es/components/InputLabel/InputLabel.js +9 -4
- package/dist/es/components/Link/Link.d.ts +3 -3
- package/dist/es/components/Link/Link.js +32 -21
- package/dist/es/components/List/List.css +9 -13
- package/dist/es/components/List/List.d.ts +1 -1
- package/dist/es/components/List/List.js +2 -2
- package/dist/es/components/List/ListItem.css +0 -7
- package/dist/es/components/Logo/Logo.css +0 -7
- package/dist/es/components/Logo/Logo.js +4 -8
- package/dist/es/components/NavArrow/NavArrow.css +5 -12
- package/dist/es/components/Notification/Notification.css +41 -24
- package/dist/es/components/Notification/Notification.d.ts +8 -0
- package/dist/es/components/Notification/Notification.js +21 -4
- package/dist/es/components/Pagination/Pagination.css +0 -7
- package/dist/es/components/Pagination/Pagination.d.ts +9 -2
- package/dist/es/components/Pagination/Pagination.js +20 -3
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +9 -9
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +6 -3
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +12 -7
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +5 -2
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +10 -2
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +5 -2
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +6 -1
- package/dist/es/components/Pagination/helpers.d.ts +1 -1
- package/dist/es/components/Paragraph/Paragraph.css +10 -31
- package/dist/es/components/Paragraph/Paragraph.d.ts +9 -13
- package/dist/es/components/Paragraph/Paragraph.js +14 -40
- package/dist/es/components/Preloader/Preloader.css +5 -12
- package/dist/es/components/Preloader/Preloader.d.ts +4 -0
- package/dist/es/components/Preloader/Preloader.js +10 -5
- package/dist/es/components/RadioButton/RadioButton.css +7 -14
- package/dist/es/components/RadioButton/RadioButton.d.ts +8 -28
- package/dist/es/components/RadioButton/RadioButton.js +50 -85
- package/dist/es/components/Search/Search.css +20 -25
- package/dist/es/components/Search/Search.js +3 -4
- package/dist/es/components/Select/Select.css +34 -37
- package/dist/es/components/Select/Select.d.ts +43 -50
- package/dist/es/components/Select/Select.js +382 -461
- package/dist/es/components/Select/reducer/selectReducer.d.ts +34 -0
- package/dist/es/components/Select/reducer/selectReducer.js +123 -0
- package/dist/es/components/Switcher/Switcher.css +19 -25
- package/dist/es/components/Switcher/Switcher.js +1 -1
- package/dist/es/components/Tabs/Tab.d.ts +5 -2
- package/dist/es/components/Tabs/Tab.js +4 -2
- package/dist/es/components/Tabs/Tabs.css +30 -37
- package/dist/es/components/Tabs/Tabs.d.ts +8 -2
- package/dist/es/components/Tabs/Tabs.js +68 -105
- package/dist/es/components/TextField/TextField.css +27 -33
- package/dist/es/components/TextField/TextField.d.ts +9 -3
- package/dist/es/components/TextField/TextField.js +32 -24
- package/dist/es/components/TextLink/TextLink.css +10 -14
- package/dist/es/components/TextLink/TextLink.d.ts +1 -1
- package/dist/es/components/TextLink/TextLink.js +7 -2
- package/dist/es/components/Tile/Tile.css +2 -8
- package/dist/es/components/Tile/Tile.d.ts +5 -2
- package/dist/es/components/Tile/Tile.js +2 -2
- package/dist/es/components/Tooltip/Tooltip.css +1 -8
- package/dist/es/components/Tooltip/Tooltip.d.ts +8 -2
- package/dist/es/components/Tooltip/Tooltip.js +28 -27
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +1 -0
- package/dist/lib/colors/ColorItem/ColorItem.css +1 -8
- package/dist/lib/colors/ColorItem/ColorItem.js +1 -1
- package/dist/lib/colors/Colors.css +3 -11
- package/dist/lib/colors/Colors.d.ts +2 -2
- package/dist/lib/colors/Colors.js +63 -4
- package/dist/lib/colors/colorsData.js +78 -71
- package/dist/lib/components/Accordion/Accordion.css +7 -27
- package/dist/lib/components/Accordion/Accordion.d.ts +12 -7
- package/dist/lib/components/Accordion/Accordion.js +24 -19
- package/dist/lib/components/Banner/Banner.css +2 -37
- package/dist/lib/components/Banner/Banner.d.ts +10 -2
- package/dist/lib/components/Banner/Banner.js +35 -25
- package/dist/lib/components/Banner/BannerDot.css +4 -11
- package/dist/lib/components/Banner/BannerDot.d.ts +3 -0
- package/dist/lib/components/Banner/BannerDot.js +10 -2
- package/dist/lib/components/Button/Button.css +83 -74
- package/dist/lib/components/Button/Button.d.ts +8 -2
- package/dist/lib/components/Button/Button.js +16 -8
- package/dist/lib/components/Calendar/Calendar.css +0 -7
- package/dist/lib/components/Calendar/Calendar.js +3 -3
- package/dist/lib/components/Calendar/components/Day/Day.css +10 -17
- package/dist/lib/components/Calendar/components/Day/Day.js +1 -1
- package/dist/lib/components/Calendar/components/Month/Month.css +3 -10
- package/dist/lib/components/Calendar/components/Month/Month.js +20 -4
- package/dist/lib/components/Carousel/Carousel.css +4 -11
- package/dist/lib/components/Carousel/Carousel.d.ts +9 -2
- package/dist/lib/components/Carousel/Carousel.js +26 -23
- package/dist/lib/components/Checkbox/Checkbox.css +18 -25
- package/dist/lib/components/Checkbox/Checkbox.d.ts +11 -27
- package/dist/lib/components/Checkbox/Checkbox.js +82 -125
- package/dist/lib/components/Collapse/Collapse.d.ts +15 -3
- package/dist/lib/components/Collapse/Collapse.js +13 -4
- package/dist/lib/components/ContentArea/ContentArea.css +18 -28
- package/dist/lib/components/ContentArea/ContentArea.d.ts +2 -7
- package/dist/lib/components/ContentArea/ContentArea.js +5 -42
- package/dist/lib/components/Counter/Counter.css +14 -11
- package/dist/lib/components/Counter/Counter.js +3 -3
- package/dist/lib/components/Grid/GridColumn.css +0 -7
- package/dist/lib/components/Header/Header.css +8 -12
- package/dist/lib/components/Header/Header.d.ts +7 -21
- package/dist/lib/components/Header/Header.js +31 -98
- package/dist/lib/components/InputLabel/InputLabel.css +0 -7
- package/dist/lib/components/InputLabel/InputLabel.d.ts +3 -0
- package/dist/lib/components/InputLabel/InputLabel.js +11 -3
- package/dist/lib/components/Link/Link.d.ts +3 -3
- package/dist/lib/components/Link/Link.js +44 -26
- package/dist/lib/components/List/List.css +9 -13
- package/dist/lib/components/List/List.d.ts +1 -1
- package/dist/lib/components/List/List.js +2 -2
- package/dist/lib/components/List/ListItem.css +0 -7
- package/dist/lib/components/Logo/Logo.css +0 -7
- package/dist/lib/components/Logo/Logo.js +4 -8
- package/dist/lib/components/NavArrow/NavArrow.css +5 -12
- package/dist/lib/components/Notification/Notification.css +41 -24
- package/dist/lib/components/Notification/Notification.d.ts +8 -0
- package/dist/lib/components/Notification/Notification.js +20 -3
- package/dist/lib/components/Pagination/Pagination.css +0 -7
- package/dist/lib/components/Pagination/Pagination.d.ts +9 -2
- package/dist/lib/components/Pagination/Pagination.js +20 -2
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +9 -9
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +6 -3
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +12 -6
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +5 -2
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +9 -1
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +5 -2
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +6 -1
- package/dist/lib/components/Pagination/helpers.d.ts +1 -1
- package/dist/lib/components/Paragraph/Paragraph.css +10 -31
- package/dist/lib/components/Paragraph/Paragraph.d.ts +9 -13
- package/dist/lib/components/Paragraph/Paragraph.js +15 -41
- package/dist/lib/components/Preloader/Preloader.css +5 -12
- package/dist/lib/components/Preloader/Preloader.d.ts +4 -0
- package/dist/lib/components/Preloader/Preloader.js +10 -4
- package/dist/lib/components/RadioButton/RadioButton.css +7 -14
- package/dist/lib/components/RadioButton/RadioButton.d.ts +8 -28
- package/dist/lib/components/RadioButton/RadioButton.js +51 -117
- package/dist/lib/components/Search/Search.css +20 -25
- package/dist/lib/components/Search/Search.js +3 -4
- package/dist/lib/components/Select/Select.css +34 -37
- package/dist/lib/components/Select/Select.d.ts +43 -50
- package/dist/lib/components/Select/Select.js +375 -483
- package/dist/lib/components/Select/reducer/selectReducer.d.ts +34 -0
- package/dist/lib/components/Select/reducer/selectReducer.js +136 -0
- package/dist/lib/components/Switcher/Switcher.css +19 -25
- package/dist/lib/components/Switcher/Switcher.js +1 -1
- package/dist/lib/components/Tabs/Tab.d.ts +5 -2
- package/dist/lib/components/Tabs/Tab.js +4 -2
- package/dist/lib/components/Tabs/Tabs.css +30 -37
- package/dist/lib/components/Tabs/Tabs.d.ts +8 -2
- package/dist/lib/components/Tabs/Tabs.js +68 -105
- package/dist/lib/components/TextField/TextField.css +27 -33
- package/dist/lib/components/TextField/TextField.d.ts +9 -3
- package/dist/lib/components/TextField/TextField.js +30 -23
- package/dist/lib/components/TextLink/TextLink.css +10 -14
- package/dist/lib/components/TextLink/TextLink.d.ts +1 -1
- package/dist/lib/components/TextLink/TextLink.js +7 -2
- package/dist/lib/components/Tile/Tile.css +2 -8
- package/dist/lib/components/Tile/Tile.d.ts +5 -2
- package/dist/lib/components/Tile/Tile.js +2 -2
- package/dist/lib/components/Tooltip/Tooltip.css +1 -8
- package/dist/lib/components/Tooltip/Tooltip.d.ts +8 -2
- package/dist/lib/components/Tooltip/Tooltip.js +27 -26
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +8 -0
- package/package.json +5 -4
- package/styles/base.less +2 -73
- package/styles/colors.css +60 -0
- 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:
|
|
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:
|
|
211
|
-
background-color:
|
|
203
|
+
color: var(--stcWhite);
|
|
204
|
+
background-color: var(--brandGreen);
|
|
212
205
|
}
|
|
213
206
|
.mfui-button_type_primary.mfui-button_theme_green svg {
|
|
214
|
-
fill:
|
|
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:
|
|
218
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
219
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
223
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
224
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
228
|
-
background-color:
|
|
220
|
+
color: var(--stcWhite);
|
|
221
|
+
background-color: var(--brandPurple);
|
|
229
222
|
}
|
|
230
223
|
.mfui-button_type_primary.mfui-button_theme_purple svg {
|
|
231
|
-
fill:
|
|
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:
|
|
235
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
236
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
240
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
241
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
245
|
-
background-color:
|
|
237
|
+
color: var(--stcBlack);
|
|
238
|
+
background-color: var(--stcWhite);
|
|
246
239
|
}
|
|
247
240
|
.mfui-button_type_primary.mfui-button_theme_white svg {
|
|
248
|
-
fill:
|
|
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:
|
|
252
|
-
background-color:
|
|
253
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
254
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
261
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
262
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
258
|
+
color: var(--brandGreen);
|
|
266
259
|
background-color: transparent;
|
|
267
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
268
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
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:
|
|
274
|
+
background-color: var(--brandGreen14);
|
|
278
275
|
}
|
|
279
276
|
.mfui-button_type_outline.mfui-button_theme_purple {
|
|
280
|
-
color:
|
|
277
|
+
color: var(--brandPurple);
|
|
281
278
|
background-color: transparent;
|
|
282
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
283
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
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:
|
|
293
|
+
background-color: var(--brandPurple14);
|
|
293
294
|
}
|
|
294
295
|
.mfui-button_type_outline.mfui-button_theme_white {
|
|
295
|
-
color:
|
|
296
|
+
color: var(--stcWhite);
|
|
296
297
|
background-color: transparent;
|
|
297
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
298
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
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:
|
|
312
|
+
background-color: var(--base14);
|
|
308
313
|
}
|
|
309
314
|
.mfui-button_type_outline.mfui-button_theme_black {
|
|
310
|
-
color:
|
|
315
|
+
color: var(--stcBlack);
|
|
311
316
|
background-color: transparent;
|
|
312
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
313
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
336
|
-
background-color:
|
|
337
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
338
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
359
|
+
color: var(--stcWhite50);
|
|
351
360
|
background-color: transparent;
|
|
352
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
353
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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:
|
|
374
|
+
color: var(--spbSky3);
|
|
366
375
|
background-color: transparent;
|
|
367
|
-
-webkit-box-shadow: inset 0 0 0 1px
|
|
368
|
-
box-shadow: inset 0 0 0 1px
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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])]),
|
|
@@ -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);
|
|
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
|
|
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:
|
|
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:
|
|
48
|
-
background-color:
|
|
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:
|
|
52
|
-
background-color:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
-
|
|
41
|
+
var handleArrowLeftClick = function handleArrowLeftClick(e) {
|
|
42
|
+
if (checkEventIsClickOrEnterPress(e)) {
|
|
43
|
+
!isPrevMonthDisabled && goToPreviousMonth();
|
|
44
|
+
}
|
|
43
45
|
};
|
|
44
46
|
|
|
45
|
-
var handleArrowRightClick = function handleArrowRightClick() {
|
|
46
|
-
|
|
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:
|
|
154
|
+
background-color: var(--stcWhite50);
|
|
162
155
|
}
|
|
163
156
|
.mfui-carousel_nav-theme_light .swiper-pagination-bullet:before {
|
|
164
|
-
background-color:
|
|
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:
|
|
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:
|
|
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
|
|
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
|
/** Смена слайдов с зацикливанием */
|