@megafon/ui-core 6.2.1 → 7.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/colors/ColorItem/ColorItem.css +1 -45
- package/dist/es/colors/ColorItem/ColorItem.d.ts +2 -2
- package/dist/es/colors/ColorItem/ColorItem.js +5 -7
- package/dist/es/colors/Colors.css +1 -233
- package/dist/es/colors/Colors.d.ts +1 -1
- package/dist/es/colors/Colors.js +33 -55
- package/dist/es/colors/colorsData.d.ts +4 -4
- package/dist/es/components/Accordion/Accordion.css +1 -89
- package/dist/es/components/Accordion/Accordion.d.ts +2 -1
- package/dist/es/components/Accordion/Accordion.js +22 -65
- package/dist/es/components/Avatar/Avatar.css +1 -52
- package/dist/es/components/Avatar/Avatar.d.ts +1 -1
- package/dist/es/components/Avatar/Avatar.js +9 -27
- package/dist/es/components/Badges/CounterBadge/CounterBadge.css +1 -0
- package/dist/{lib/components/Badges/components → es/components/Badges}/CounterBadge/CounterBadge.d.ts +2 -2
- package/dist/es/components/Badges/{components/CounterBadge → CounterBadge}/CounterBadge.js +10 -28
- package/dist/es/components/Badges/NotificationBadge/NotificationBadge.css +1 -0
- package/dist/{lib/components/Badges/components → es/components/Badges}/NotificationBadge/NotificationBadge.d.ts +3 -3
- package/dist/es/components/Badges/{components/NotificationBadge → NotificationBadge}/NotificationBadge.js +8 -22
- package/dist/es/components/Badges/PriceBadge/PriceBadge.css +1 -0
- package/dist/es/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.d.ts +4 -4
- package/dist/es/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.js +11 -54
- package/dist/es/components/Badges/PromoBadge/PromoBadge.css +1 -0
- package/dist/es/components/Badges/{components/PromoBadge → PromoBadge}/PromoBadge.d.ts +4 -4
- package/dist/es/components/Badges/{components/PromoBadge → PromoBadge}/PromoBadge.js +9 -23
- package/dist/es/components/Badges/TimerBadge/TimerBadge.css +1 -0
- package/dist/{lib/components/Badges/components → es/components/Badges}/TimerBadge/TimerBadge.d.ts +2 -2
- package/dist/es/components/Badges/{components/TimerBadge → TimerBadge}/TimerBadge.js +22 -46
- package/dist/es/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.js +5 -32
- package/dist/es/components/Banner/Banner.css +1 -195
- package/dist/es/components/Banner/Banner.d.ts +5 -4
- package/dist/es/components/Banner/Banner.js +82 -130
- package/dist/es/components/Banner/BannerDot.css +1 -69
- package/dist/es/components/Banner/BannerDot.d.ts +1 -1
- package/dist/es/components/Banner/BannerDot.js +6 -22
- package/dist/es/components/Banner/slidesSettings.d.ts +4 -2
- package/dist/es/components/Banner/slidesSettings.js +3 -6
- package/dist/es/components/Button/Button.css +1 -814
- package/dist/es/components/Button/Button.d.ts +7 -6
- package/dist/es/components/Button/Button.js +44 -104
- package/dist/es/components/Calendar/Calendar.css +1 -24
- package/dist/es/components/Calendar/Calendar.d.ts +4 -4
- package/dist/es/components/Calendar/Calendar.js +75 -144
- package/dist/es/components/Calendar/components/_Day/Day.css +1 -0
- package/dist/es/components/Calendar/components/{Day → _Day}/Day.d.ts +4 -4
- package/dist/es/components/Calendar/components/{Day → _Day}/Day.js +21 -53
- package/dist/es/components/Calendar/components/_Month/Month.css +1 -0
- package/dist/es/components/Calendar/components/{Month → _Month}/Month.d.ts +3 -2
- package/dist/es/components/Calendar/components/{Month → _Month}/Month.js +11 -36
- package/dist/es/components/Caption/Caption.css +1 -48
- package/dist/es/components/Caption/Caption.d.ts +4 -2
- package/dist/es/components/Caption/Caption.js +11 -25
- package/dist/es/components/Carousel/Carousel.css +1 -215
- package/dist/es/components/Carousel/Carousel.d.ts +11 -10
- package/dist/es/components/Carousel/Carousel.js +135 -162
- package/dist/es/components/Carousel/checkBreakpointsPropTypes.d.ts +1 -1
- package/dist/es/components/Carousel/checkBreakpointsPropTypes.js +1 -4
- package/dist/es/components/Carousel/useGradient.d.ts +1 -1
- package/dist/es/components/Carousel/useGradient.js +9 -13
- package/dist/es/components/Checkbox/Checkbox.css +1 -150
- package/dist/es/components/Checkbox/Checkbox.d.ts +4 -4
- package/dist/es/components/Checkbox/Checkbox.js +21 -50
- package/dist/es/components/Chips/Chip.css +1 -132
- package/dist/es/components/Chips/Chip.d.ts +6 -26
- package/dist/es/components/Chips/Chip.js +17 -42
- package/dist/es/components/Chips/Chips.css +1 -19
- package/dist/es/components/Chips/Chips.d.ts +2 -2
- package/dist/es/components/Chips/Chips.js +32 -56
- package/dist/es/components/Chips/components/ChipsDropdown.css +1 -106
- package/dist/es/components/Chips/components/ChipsDropdown.d.ts +2 -2
- package/dist/es/components/Chips/components/ChipsDropdown.js +12 -27
- package/dist/es/components/ContentArea/ContentArea.css +1 -109
- package/dist/es/components/ContentArea/ContentArea.d.ts +5 -4
- package/dist/es/components/ContentArea/ContentArea.js +9 -28
- package/dist/es/components/ContentView/ContentView.css +1 -103
- package/dist/es/components/ContentView/ContentView.d.ts +3 -2
- package/dist/es/components/ContentView/ContentView.js +12 -46
- package/dist/es/components/Counter/Counter.css +1 -123
- package/dist/es/components/Counter/Counter.d.ts +1 -1
- package/dist/es/components/Counter/Counter.js +20 -55
- package/dist/es/components/Grid/Grid.css +1 -102
- package/dist/es/components/Grid/Grid.d.ts +1 -1
- package/dist/es/components/Grid/Grid.js +8 -24
- package/dist/es/components/Grid/GridColumn.css +1 -3102
- package/dist/es/components/Grid/GridColumn.d.ts +2 -2
- package/dist/es/components/Grid/GridColumn.js +33 -62
- package/dist/es/components/Header/Header.css +1 -122
- package/dist/es/components/Header/Header.d.ts +3 -1
- package/dist/es/components/Header/Header.js +13 -28
- package/dist/es/components/Link/Link.d.ts +2 -2
- package/dist/es/components/Link/Link.js +9 -25
- package/dist/es/components/List/List.css +1 -66
- package/dist/es/components/List/List.d.ts +2 -1
- package/dist/es/components/List/List.js +8 -18
- package/dist/es/components/List/ListItem.css +1 -6
- package/dist/es/components/List/ListItem.d.ts +2 -1
- package/dist/es/components/List/ListItem.js +1 -7
- package/dist/es/components/ListData/ListData.css +1 -162
- package/dist/es/components/ListData/ListData.d.ts +6 -34
- package/dist/es/components/ListData/ListData.js +22 -65
- package/dist/es/components/ListData/ListDataGroup.css +1 -15
- package/dist/es/components/ListData/ListDataGroup.d.ts +4 -4
- package/dist/es/components/ListData/ListDataGroup.js +29 -74
- package/dist/es/components/ListData/components/ListDataSortable.css +1 -79
- package/dist/es/components/ListData/components/ListDataSortable.d.ts +4 -4
- package/dist/es/components/ListData/components/ListDataSortable.js +21 -42
- package/dist/es/components/ListData/helpers.js +1 -8
- package/dist/es/components/Logo/Logo.css +1 -43
- package/dist/es/components/Logo/Logo.d.ts +1 -1
- package/dist/es/components/Logo/Logo.js +9 -25
- package/dist/es/components/Modal/Modal.css +1 -0
- package/dist/es/components/Modal/Modal.d.ts +106 -0
- package/dist/es/components/Modal/Modal.js +278 -0
- package/dist/es/components/Modal/_ModalContent/ModalContent.css +1 -0
- package/dist/es/components/Modal/_ModalContent/ModalContent.d.ts +8 -0
- package/dist/es/components/Modal/_ModalContent/ModalContent.js +168 -0
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.css +1 -0
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.d.ts +8 -0
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.js +32 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +1 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.d.ts +12 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.js +114 -0
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +1 -0
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +8 -0
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +55 -0
- package/dist/es/components/Modal/mocks.d.ts +3 -0
- package/dist/es/components/Modal/mocks.js +79 -0
- package/dist/es/components/Modal/types.d.ts +27 -0
- package/dist/es/components/Modal/types.js +1 -0
- package/dist/es/components/Modal/utils/utils.d.ts +18 -0
- package/dist/es/components/Modal/utils/utils.js +66 -0
- package/dist/es/components/NavArrow/NavArrow.css +1 -63
- package/dist/es/components/NavArrow/NavArrow.d.ts +3 -3
- package/dist/es/components/NavArrow/NavArrow.js +8 -28
- package/dist/es/components/Notification/Notification.css +1 -350
- package/dist/es/components/Notification/Notification.d.ts +5 -4
- package/dist/es/components/Notification/Notification.js +61 -131
- package/dist/es/components/Pagination/Pagination.css +1 -5
- package/dist/es/components/Pagination/Pagination.d.ts +4 -3
- package/dist/es/components/Pagination/Pagination.js +7 -22
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +1 -62
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +5 -4
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +10 -26
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -10
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +3 -2
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -22
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +1 -17
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +3 -2
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +7 -23
- package/dist/es/components/Pagination/helpers.js +0 -3
- package/dist/es/components/Pagination/usePagination.d.ts +2 -1
- package/dist/es/components/Pagination/usePagination.js +6 -18
- package/dist/es/components/Paragraph/Paragraph.css +1 -43
- package/dist/es/components/Paragraph/Paragraph.d.ts +4 -2
- package/dist/es/components/Paragraph/Paragraph.js +9 -22
- package/dist/es/components/Preloader/Preloader.css +1 -224
- package/dist/es/components/Preloader/Preloader.d.ts +3 -3
- package/dist/es/components/Preloader/Preloader.js +16 -36
- package/dist/es/components/RadioButton/RadioButton.css +1 -120
- package/dist/es/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/es/components/RadioButton/RadioButton.js +18 -50
- package/dist/es/components/Row/Row.css +1 -238
- package/dist/es/components/Row/Row.d.ts +2 -2
- package/dist/es/components/Row/Row.js +23 -48
- package/dist/es/components/ScrollBar/ScrollBar.css +1 -0
- package/dist/es/components/ScrollBar/ScrollBar.d.ts +34 -0
- package/dist/es/components/ScrollBar/ScrollBar.js +86 -0
- package/dist/es/components/Search/Search.css +1 -453
- package/dist/es/components/Search/Search.d.ts +7 -8
- package/dist/es/components/Search/Search.js +54 -149
- package/dist/es/components/Select/Select.css +1 -389
- package/dist/es/components/Select/Select.d.ts +8 -84
- package/dist/es/components/Select/Select.js +52 -142
- package/dist/es/components/Select/reducer/selectReducer.d.ts +1 -1
- package/dist/es/components/Select/reducer/selectReducer.js +18 -32
- package/dist/es/components/Selector/Selector.css +1 -132
- package/dist/es/components/Selector/Selector.d.ts +1 -1
- package/dist/es/components/Selector/Selector.js +23 -50
- package/dist/es/components/Sliders/Slider/Slider.css +1 -128
- package/dist/es/components/Sliders/Slider/Slider.d.ts +1 -1
- package/dist/es/components/Sliders/Slider/Slider.js +25 -56
- package/dist/es/components/Sliders/SliderRange/SliderRange.css +1 -169
- package/dist/es/components/Sliders/SliderRange/SliderRange.d.ts +1 -1
- package/dist/es/components/Sliders/SliderRange/SliderRange.js +33 -80
- package/dist/es/components/Sliders/SliderRange/helpers.js +0 -2
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.css +1 -219
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.d.ts +1 -1
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.js +36 -85
- package/dist/es/components/Sliders/SliderRatio/helpers.js +1 -1
- package/dist/es/components/Sliders/SliderRatio/types.d.ts +1 -1
- package/dist/es/components/Sliders/SliderRatio/types.js +0 -1
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.css +1 -84
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.d.ts +2 -2
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.js +11 -35
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.css +1 -15
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.d.ts +2 -2
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.js +6 -20
- package/dist/es/components/Sliders/components/SliderScale/helpers.js +12 -16
- package/dist/es/components/Sliders/helpers.js +1 -5
- package/dist/es/components/Snackbar/Snackbar.css +1 -220
- package/dist/es/components/Snackbar/Snackbar.d.ts +3 -3
- package/dist/es/components/Snackbar/Snackbar.js +44 -82
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.css +1 -66
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.d.ts +3 -3
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.js +9 -17
- package/dist/es/components/Switcher/Switcher.css +1 -160
- package/dist/es/components/Switcher/Switcher.d.ts +2 -1
- package/dist/es/components/Switcher/Switcher.js +17 -39
- package/dist/es/components/Tabs/Tab.js +0 -14
- package/dist/es/components/Tabs/Tabs.css +1 -306
- package/dist/es/components/Tabs/Tabs.d.ts +6 -5
- package/dist/es/components/Tabs/Tabs.js +110 -166
- package/dist/es/components/TextField/TextField.css +1 -343
- package/dist/es/components/TextField/TextField.d.ts +3 -3
- package/dist/es/components/TextField/TextField.js +85 -193
- package/dist/es/components/TextField/utils/countGraphemes.js +10 -18
- package/dist/es/components/TextLink/TextLink.css +1 -50
- package/dist/es/components/TextLink/TextLink.d.ts +2 -2
- package/dist/es/components/TextLink/TextLink.js +14 -27
- package/dist/es/components/Tile/Tile.css +1 -43
- package/dist/es/components/Tile/Tile.d.ts +7 -5
- package/dist/es/components/Tile/Tile.js +16 -36
- package/dist/es/components/Tooltip/Tooltip.css +1 -335
- package/dist/es/components/Tooltip/Tooltip.d.ts +9 -8
- package/dist/es/components/Tooltip/Tooltip.js +58 -139
- package/dist/es/components/_Collapse/Collapse.css +1 -0
- package/dist/{lib/components/Collapse → es/components/_Collapse}/Collapse.d.ts +3 -3
- package/dist/es/components/{Collapse → _Collapse}/Collapse.js +25 -62
- package/dist/es/hooks/usePrevious.js +0 -2
- package/dist/es/hooks/useResolution.d.ts +1 -1
- package/dist/es/hooks/useResolution.js +5 -11
- package/dist/es/hooks/useSwipe.d.ts +1 -1
- package/dist/es/hooks/useSwipe.js +17 -44
- package/dist/es/index.d.ts +16 -9
- package/dist/es/index.js +17 -10
- package/dist/es/styles/base.css +1 -0
- package/dist/lib/colors/ColorItem/ColorItem.css +1 -45
- package/dist/lib/colors/ColorItem/ColorItem.d.ts +2 -2
- package/dist/lib/colors/ColorItem/ColorItem.js +9 -18
- package/dist/lib/colors/Colors.css +1 -233
- package/dist/lib/colors/Colors.d.ts +1 -1
- package/dist/lib/colors/Colors.js +38 -80
- package/dist/lib/colors/colorsData.d.ts +4 -4
- package/dist/lib/colors/colorsData.js +1 -2
- package/dist/lib/components/Accordion/Accordion.css +1 -89
- package/dist/lib/components/Accordion/Accordion.d.ts +2 -1
- package/dist/lib/components/Accordion/Accordion.js +27 -82
- package/dist/lib/components/Avatar/Avatar.css +1 -52
- package/dist/lib/components/Avatar/Avatar.d.ts +1 -1
- package/dist/lib/components/Avatar/Avatar.js +14 -42
- package/dist/lib/components/Badges/CounterBadge/CounterBadge.css +1 -0
- package/dist/{es/components/Badges/components → lib/components/Badges}/CounterBadge/CounterBadge.d.ts +2 -2
- package/dist/lib/components/Badges/CounterBadge/CounterBadge.js +52 -0
- package/dist/lib/components/Badges/NotificationBadge/NotificationBadge.css +1 -0
- package/dist/{es/components/Badges/components → lib/components/Badges}/NotificationBadge/NotificationBadge.d.ts +3 -3
- package/dist/lib/components/Badges/NotificationBadge/NotificationBadge.js +44 -0
- package/dist/lib/components/Badges/PriceBadge/PriceBadge.css +1 -0
- package/dist/lib/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.d.ts +4 -4
- package/dist/lib/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.js +20 -76
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.css +1 -0
- package/dist/lib/components/Badges/{components/PromoBadge → PromoBadge}/PromoBadge.d.ts +4 -4
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.js +56 -0
- package/dist/lib/components/Badges/TimerBadge/TimerBadge.css +1 -0
- package/dist/{es/components/Badges/components → lib/components/Badges}/TimerBadge/TimerBadge.d.ts +2 -2
- package/dist/lib/components/Badges/TimerBadge/TimerBadge.js +96 -0
- package/dist/lib/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.js +12 -56
- package/dist/lib/components/Banner/Banner.css +1 -195
- package/dist/lib/components/Banner/Banner.d.ts +5 -4
- package/dist/lib/components/Banner/Banner.js +94 -164
- package/dist/lib/components/Banner/BannerDot.css +1 -69
- package/dist/lib/components/Banner/BannerDot.d.ts +1 -1
- package/dist/lib/components/Banner/BannerDot.js +11 -37
- package/dist/lib/components/Banner/slidesSettings.d.ts +4 -2
- package/dist/lib/components/Banner/slidesSettings.js +5 -12
- package/dist/lib/components/Button/Button.css +1 -814
- package/dist/lib/components/Button/Button.d.ts +7 -6
- package/dist/lib/components/Button/Button.js +71 -158
- package/dist/lib/components/Calendar/Calendar.css +1 -24
- package/dist/lib/components/Calendar/Calendar.d.ts +4 -4
- package/dist/lib/components/Calendar/Calendar.js +90 -191
- package/dist/lib/components/Calendar/components/_Day/Day.css +1 -0
- package/dist/lib/components/Calendar/components/{Day → _Day}/Day.d.ts +4 -4
- package/dist/lib/components/Calendar/components/{Day → _Day}/Day.js +29 -72
- package/dist/lib/components/Calendar/components/_Month/Month.css +1 -0
- package/dist/lib/components/Calendar/components/{Month → _Month}/Month.d.ts +3 -2
- package/dist/lib/components/Calendar/components/_Month/Month.js +97 -0
- package/dist/lib/components/Caption/Caption.css +1 -48
- package/dist/lib/components/Caption/Caption.d.ts +4 -2
- package/dist/lib/components/Caption/Caption.js +16 -41
- package/dist/lib/components/Carousel/Carousel.css +1 -215
- package/dist/lib/components/Carousel/Carousel.d.ts +11 -10
- package/dist/lib/components/Carousel/Carousel.js +223 -228
- package/dist/lib/components/Carousel/checkBreakpointsPropTypes.d.ts +1 -1
- package/dist/lib/components/Carousel/checkBreakpointsPropTypes.js +6 -18
- package/dist/lib/components/Carousel/useGradient.d.ts +1 -1
- package/dist/lib/components/Carousel/useGradient.js +12 -25
- package/dist/lib/components/Checkbox/Checkbox.css +1 -150
- package/dist/lib/components/Checkbox/Checkbox.d.ts +4 -4
- package/dist/lib/components/Checkbox/Checkbox.js +35 -75
- package/dist/lib/components/Chips/Chip.css +1 -132
- package/dist/lib/components/Chips/Chip.d.ts +6 -26
- package/dist/lib/components/Chips/Chip.js +36 -76
- package/dist/lib/components/Chips/Chips.css +1 -19
- package/dist/lib/components/Chips/Chips.d.ts +2 -2
- package/dist/lib/components/Chips/Chips.js +47 -92
- package/dist/lib/components/Chips/components/ChipsDropdown.css +1 -106
- package/dist/lib/components/Chips/components/ChipsDropdown.d.ts +2 -2
- package/dist/lib/components/Chips/components/ChipsDropdown.js +31 -67
- package/dist/lib/components/ContentArea/ContentArea.css +1 -109
- package/dist/lib/components/ContentArea/ContentArea.d.ts +5 -4
- package/dist/lib/components/ContentArea/ContentArea.js +14 -44
- package/dist/lib/components/ContentView/ContentView.css +1 -103
- package/dist/lib/components/ContentView/ContentView.d.ts +3 -2
- package/dist/lib/components/ContentView/ContentView.js +17 -63
- package/dist/lib/components/Counter/Counter.css +1 -123
- package/dist/lib/components/Counter/Counter.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.js +25 -71
- package/dist/lib/components/Grid/Grid.css +1 -102
- package/dist/lib/components/Grid/Grid.d.ts +1 -1
- package/dist/lib/components/Grid/Grid.js +13 -40
- package/dist/lib/components/Grid/GridColumn.css +1 -3102
- package/dist/lib/components/Grid/GridColumn.d.ts +2 -2
- package/dist/lib/components/Grid/GridColumn.js +38 -77
- package/dist/lib/components/Header/Header.css +1 -122
- package/dist/lib/components/Header/Header.d.ts +3 -1
- package/dist/lib/components/Header/Header.js +18 -43
- package/dist/lib/components/Link/Link.d.ts +2 -2
- package/dist/lib/components/Link/Link.js +15 -34
- package/dist/lib/components/List/List.css +1 -66
- package/dist/lib/components/List/List.d.ts +2 -1
- package/dist/lib/components/List/List.js +12 -30
- package/dist/lib/components/List/ListItem.css +1 -6
- package/dist/lib/components/List/ListItem.d.ts +2 -1
- package/dist/lib/components/List/ListItem.js +5 -19
- package/dist/lib/components/ListData/ListData.css +1 -162
- package/dist/lib/components/ListData/ListData.d.ts +6 -34
- package/dist/lib/components/ListData/ListData.js +51 -111
- package/dist/lib/components/ListData/ListDataGroup.css +1 -15
- package/dist/lib/components/ListData/ListDataGroup.d.ts +4 -4
- package/dist/lib/components/ListData/ListDataGroup.js +48 -118
- package/dist/lib/components/ListData/components/ListDataSortable.css +1 -79
- package/dist/lib/components/ListData/components/ListDataSortable.d.ts +4 -4
- package/dist/lib/components/ListData/components/ListDataSortable.js +35 -74
- package/dist/lib/components/ListData/helpers.js +7 -25
- package/dist/lib/components/Logo/Logo.css +1 -43
- package/dist/lib/components/Logo/Logo.d.ts +1 -1
- package/dist/lib/components/Logo/Logo.js +14 -41
- package/dist/lib/components/Modal/Modal.css +1 -0
- package/dist/lib/components/Modal/Modal.d.ts +106 -0
- package/dist/lib/components/Modal/Modal.js +287 -0
- package/dist/lib/components/Modal/_ModalContent/ModalContent.css +1 -0
- package/dist/lib/components/Modal/_ModalContent/ModalContent.d.ts +8 -0
- package/dist/lib/components/Modal/_ModalContent/ModalContent.js +177 -0
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.css +1 -0
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.d.ts +8 -0
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.js +41 -0
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +1 -0
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.d.ts +12 -0
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.js +123 -0
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +1 -0
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +8 -0
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +64 -0
- package/dist/lib/components/Modal/mocks.d.ts +3 -0
- package/dist/lib/components/Modal/mocks.js +85 -0
- package/dist/lib/components/Modal/types.d.ts +27 -0
- package/dist/lib/components/Modal/types.js +5 -0
- package/dist/lib/components/Modal/utils/utils.d.ts +18 -0
- package/dist/lib/components/Modal/utils/utils.js +72 -0
- package/dist/lib/components/NavArrow/NavArrow.css +1 -63
- package/dist/lib/components/NavArrow/NavArrow.d.ts +3 -3
- package/dist/lib/components/NavArrow/NavArrow.js +15 -47
- package/dist/lib/components/Notification/Notification.css +1 -350
- package/dist/lib/components/Notification/Notification.d.ts +5 -4
- package/dist/lib/components/Notification/Notification.js +114 -201
- package/dist/lib/components/Pagination/Pagination.css +1 -5
- package/dist/lib/components/Pagination/Pagination.d.ts +4 -3
- package/dist/lib/components/Pagination/Pagination.js +19 -51
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +1 -62
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +5 -4
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +12 -35
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -10
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +3 -2
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +7 -32
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +1 -17
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +3 -2
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +9 -32
- package/dist/lib/components/Pagination/helpers.js +1 -6
- package/dist/lib/components/Pagination/usePagination.d.ts +2 -1
- package/dist/lib/components/Pagination/usePagination.js +10 -36
- package/dist/lib/components/Paragraph/Paragraph.css +1 -43
- package/dist/lib/components/Paragraph/Paragraph.d.ts +4 -2
- package/dist/lib/components/Paragraph/Paragraph.js +14 -38
- package/dist/lib/components/Preloader/Preloader.css +1 -224
- package/dist/lib/components/Preloader/Preloader.d.ts +3 -3
- package/dist/lib/components/Preloader/Preloader.js +23 -58
- package/dist/lib/components/RadioButton/RadioButton.css +1 -120
- package/dist/lib/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/lib/components/RadioButton/RadioButton.js +23 -70
- package/dist/lib/components/Row/Row.css +1 -238
- package/dist/lib/components/Row/Row.d.ts +2 -2
- package/dist/lib/components/Row/Row.js +40 -76
- package/dist/lib/components/ScrollBar/ScrollBar.css +1 -0
- package/dist/lib/components/ScrollBar/ScrollBar.d.ts +34 -0
- package/dist/lib/components/ScrollBar/ScrollBar.js +94 -0
- package/dist/lib/components/Search/Search.css +1 -453
- package/dist/lib/components/Search/Search.d.ts +7 -8
- package/dist/lib/components/Search/Search.js +122 -262
- package/dist/lib/components/Select/Select.css +1 -389
- package/dist/lib/components/Select/Select.d.ts +8 -84
- package/dist/lib/components/Select/Select.js +70 -187
- package/dist/lib/components/Select/reducer/selectReducer.d.ts +1 -1
- package/dist/lib/components/Select/reducer/selectReducer.js +22 -42
- package/dist/lib/components/Selector/Selector.css +1 -132
- package/dist/lib/components/Selector/Selector.d.ts +1 -1
- package/dist/lib/components/Selector/Selector.js +28 -71
- package/dist/lib/components/Sliders/Slider/Slider.css +1 -128
- package/dist/lib/components/Sliders/Slider/Slider.d.ts +1 -1
- package/dist/lib/components/Sliders/Slider/Slider.js +30 -76
- package/dist/lib/components/Sliders/SliderRange/SliderRange.css +1 -169
- package/dist/lib/components/Sliders/SliderRange/SliderRange.d.ts +1 -1
- package/dist/lib/components/Sliders/SliderRange/SliderRange.js +38 -101
- package/dist/lib/components/Sliders/SliderRange/helpers.js +5 -18
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.css +1 -219
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.d.ts +1 -1
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.js +41 -112
- package/dist/lib/components/Sliders/SliderRatio/helpers.js +9 -28
- package/dist/lib/components/Sliders/SliderRatio/types.d.ts +1 -1
- package/dist/lib/components/Sliders/SliderRatio/types.js +0 -2
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.css +1 -84
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.d.ts +2 -2
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.js +18 -57
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.css +1 -15
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.d.ts +2 -2
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.js +12 -40
- package/dist/lib/components/Sliders/components/SliderScale/helpers.js +16 -34
- package/dist/lib/components/Sliders/helpers.js +5 -22
- package/dist/lib/components/Snackbar/Snackbar.css +1 -220
- package/dist/lib/components/Snackbar/Snackbar.d.ts +3 -3
- package/dist/lib/components/Snackbar/Snackbar.js +82 -139
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.css +1 -66
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.d.ts +3 -3
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.js +18 -37
- package/dist/lib/components/Switcher/Switcher.css +1 -160
- package/dist/lib/components/Switcher/Switcher.d.ts +2 -1
- package/dist/lib/components/Switcher/Switcher.js +22 -53
- package/dist/lib/components/Tabs/Tab.js +5 -26
- package/dist/lib/components/Tabs/Tabs.css +1 -306
- package/dist/lib/components/Tabs/Tabs.d.ts +6 -5
- package/dist/lib/components/Tabs/Tabs.js +121 -200
- package/dist/lib/components/TextField/TextField.css +1 -343
- package/dist/lib/components/TextField/TextField.d.ts +3 -3
- package/dist/lib/components/TextField/TextField.js +119 -244
- package/dist/lib/components/TextField/utils/countGraphemes.js +11 -28
- package/dist/lib/components/TextLink/TextLink.css +1 -50
- package/dist/lib/components/TextLink/TextLink.d.ts +2 -2
- package/dist/lib/components/TextLink/TextLink.js +19 -42
- package/dist/lib/components/Tile/Tile.css +1 -43
- package/dist/lib/components/Tile/Tile.d.ts +7 -5
- package/dist/lib/components/Tile/Tile.js +27 -55
- package/dist/lib/components/Tooltip/Tooltip.css +1 -335
- package/dist/lib/components/Tooltip/Tooltip.d.ts +9 -8
- package/dist/lib/components/Tooltip/Tooltip.js +111 -219
- package/dist/lib/components/_Collapse/Collapse.css +1 -0
- package/dist/{es/components/Collapse → lib/components/_Collapse}/Collapse.d.ts +3 -3
- package/dist/lib/components/_Collapse/Collapse.js +95 -0
- package/dist/lib/constants/throttleTime.js +2 -3
- package/dist/lib/hooks/usePrevious.js +4 -11
- package/dist/lib/hooks/useResolution.d.ts +1 -1
- package/dist/lib/hooks/useResolution.js +10 -24
- package/dist/lib/hooks/useSwipe.d.ts +1 -1
- package/dist/lib/hooks/useSwipe.js +22 -64
- package/dist/lib/index.d.ts +16 -9
- package/dist/lib/index.js +83 -102
- package/dist/lib/styles/base.css +1 -0
- package/package.json +106 -101
- package/styles/base.scss +150 -0
- package/styles/colors.css +53 -0
- package/CHANGELOG.md +0 -4062
- package/dist/es/components/Avatar/doc/i/img.png +0 -0
- package/dist/es/components/Badges/components/CounterBadge/CounterBadge.css +0 -54
- package/dist/es/components/Badges/components/NotificationBadge/NotificationBadge.css +0 -58
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.css +0 -119
- package/dist/es/components/Badges/components/PromoBadge/PromoBadge.css +0 -69
- package/dist/es/components/Badges/components/TimerBadge/TimerBadge.css +0 -60
- package/dist/es/components/Calendar/components/Day/Day.css +0 -243
- package/dist/es/components/Calendar/components/Month/Month.css +0 -135
- package/dist/es/components/Collapse/Collapse.css +0 -3
- package/dist/es/components/ListData/doc/i/img.png +0 -0
- package/dist/es/components/Selector/doc/Selector.example.css +0 -17
- package/dist/lib/components/Avatar/doc/i/img.png +0 -0
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.css +0 -54
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.js +0 -81
- package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.css +0 -58
- package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.js +0 -71
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.css +0 -119
- package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.css +0 -69
- package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.js +0 -84
- package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.css +0 -60
- package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.js +0 -135
- package/dist/lib/components/Calendar/components/Day/Day.css +0 -243
- package/dist/lib/components/Calendar/components/Month/Month.css +0 -135
- package/dist/lib/components/Calendar/components/Month/Month.js +0 -127
- package/dist/lib/components/Collapse/Collapse.css +0 -3
- package/dist/lib/components/Collapse/Collapse.js +0 -141
- package/dist/lib/components/ListData/doc/i/img.png +0 -0
- package/dist/lib/components/Selector/doc/Selector.example.css +0 -17
- package/styles/base.less +0 -171
- /package/dist/es/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.d.ts +0 -0
- /package/dist/lib/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import './PromoBadge.
|
|
2
|
+
import './PromoBadge.scss';
|
|
3
3
|
export declare const PromoBadgeColors: {
|
|
4
4
|
readonly '137C': "137c";
|
|
5
5
|
readonly BRAND_PURPLE_20: "brand-purple-20";
|
|
@@ -9,12 +9,12 @@ export declare const PromoBadgeColors: {
|
|
|
9
9
|
readonly WARM_RED: "warm-red";
|
|
10
10
|
readonly GRADIENT_PURPLE: "gradient-purple";
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type PromoBadgeColorsType = (typeof PromoBadgeColors)[keyof typeof PromoBadgeColors];
|
|
13
13
|
export declare const PromoBadgeSize: {
|
|
14
14
|
readonly SMALL: "small";
|
|
15
15
|
readonly MEDIUM: "medium";
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type PromoBadgeSizeType = (typeof PromoBadgeSize)[keyof typeof PromoBadgeSize];
|
|
18
18
|
export declare const PromoBadgeTypes: {
|
|
19
19
|
readonly HIT: "hit";
|
|
20
20
|
readonly NEW: "new";
|
|
@@ -23,7 +23,7 @@ export declare const PromoBadgeTypes: {
|
|
|
23
23
|
readonly USER_CHOICE: "user-choice";
|
|
24
24
|
readonly INTERESTS: "interests";
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
type PromoBadgeTypesType = (typeof PromoBadgeTypes)[keyof typeof PromoBadgeTypes];
|
|
27
27
|
export interface IPromoBadgeProps {
|
|
28
28
|
/** Цвет промо-бэйджа */
|
|
29
29
|
color?: PromoBadgeColorsType;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import "core-js/modules/es.object.values.js";
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
|
-
import * as PropTypes from 'prop-types';
|
|
6
4
|
import "./PromoBadge.css";
|
|
7
5
|
export var PromoBadgeColors = {
|
|
8
6
|
'137C': '137c',
|
|
@@ -16,8 +14,8 @@ export var PromoBadgeColors = {
|
|
|
16
14
|
export var PromoBadgeSize = {
|
|
17
15
|
SMALL: 'small',
|
|
18
16
|
MEDIUM: 'medium'
|
|
19
|
-
};
|
|
20
|
-
|
|
17
|
+
};
|
|
18
|
+
// DEPRECATED
|
|
21
19
|
export var PromoBadgeTypes = {
|
|
22
20
|
HIT: 'hit',
|
|
23
21
|
NEW: 'new',
|
|
@@ -27,16 +25,15 @@ export var PromoBadgeTypes = {
|
|
|
27
25
|
INTERESTS: 'interests'
|
|
28
26
|
};
|
|
29
27
|
var cn = cnCreate('mfui-promo-badge');
|
|
30
|
-
|
|
31
28
|
var PromoBadge = function PromoBadge(_ref) {
|
|
32
29
|
var color = _ref.color,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
_ref$size = _ref.size,
|
|
31
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
32
|
+
_ref$type = _ref.type,
|
|
33
|
+
type = _ref$type === void 0 ? PromoBadgeTypes.HIT : _ref$type,
|
|
34
|
+
className = _ref.className,
|
|
35
|
+
children = _ref.children,
|
|
36
|
+
dataAttrs = _ref.dataAttrs;
|
|
40
37
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
41
38
|
className: cn({
|
|
42
39
|
color: color,
|
|
@@ -47,15 +44,4 @@ var PromoBadge = function PromoBadge(_ref) {
|
|
|
47
44
|
className: cn('text')
|
|
48
45
|
}, children));
|
|
49
46
|
};
|
|
50
|
-
|
|
51
|
-
PromoBadge.propTypes = {
|
|
52
|
-
color: PropTypes.oneOf(Object.values(PromoBadgeColors)),
|
|
53
|
-
// DEPRECATED
|
|
54
|
-
type: PropTypes.oneOf(Object.values(PromoBadgeTypes)),
|
|
55
|
-
className: PropTypes.string,
|
|
56
|
-
dataAttrs: PropTypes.shape({
|
|
57
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
|
58
|
-
}),
|
|
59
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.element.isRequired), PropTypes.element, PropTypes.string]).isRequired
|
|
60
|
-
};
|
|
61
47
|
export default PromoBadge;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-timer-badge{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:var(--base);border:1px solid var(--spbSky1);border-radius:12px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;overflow:hidden;padding:1px 8px 1px 2px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.mfui-timer-badge_theme_grey .mfui-timer-badge__text{color:var(--spbSky3)}.mfui-timer-badge_theme_grey .mfui-timer-badge__icon{fill:var(--spbSky3)}.mfui-timer-badge_theme_red .mfui-timer-badge__text{color:var(--fury)}.mfui-timer-badge_theme_red .mfui-timer-badge__icon{fill:var(--fury)}.mfui-timer-badge__text{font-family:inherit;font-size:12px;font-weight:500;line-height:18px;margin-left:2px}.mfui-timer-badge__icon{height:20px;width:20px}.mfui-timer-badge__icon-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mfui-timer-badge__icon-container_shadow:before{border-radius:50%;-webkit-box-shadow:0 0 6px var(--fury);box-shadow:0 0 6px var(--fury);content:"";height:16px;left:2px;position:absolute;top:2px;width:16px}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "core-js/modules/es.date.now.js";
|
|
4
|
-
import "core-js/modules/es.date.to-string.js";
|
|
5
4
|
import "core-js/modules/web.timers.js";
|
|
6
|
-
import
|
|
5
|
+
import * as React from 'react';
|
|
7
6
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
8
|
-
import
|
|
9
|
-
import Timer from "./Timer/Timer";
|
|
7
|
+
import Timer from "./components/Timer/Timer";
|
|
10
8
|
import "./TimerBadge.css";
|
|
11
|
-
|
|
12
9
|
var TimerIcon = function TimerIcon(props) {
|
|
13
10
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
11
|
viewBox: "0 0 20 20"
|
|
@@ -18,7 +15,6 @@ var TimerIcon = function TimerIcon(props) {
|
|
|
18
15
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm1-8.414V5H9v5.414l3 3L13.414 12 11 9.586z"
|
|
19
16
|
}));
|
|
20
17
|
};
|
|
21
|
-
|
|
22
18
|
var SECONDS_IN_HOUR = 3600;
|
|
23
19
|
var MS_IN_SECOND = 1000;
|
|
24
20
|
export var TIMEOUT = 1000;
|
|
@@ -27,43 +23,38 @@ var TimerBadgeTheme = {
|
|
|
27
23
|
GREY: 'grey'
|
|
28
24
|
};
|
|
29
25
|
var cn = cnCreate('mfui-timer-badge');
|
|
30
|
-
|
|
31
26
|
var TimerBadge = function TimerBadge(_ref) {
|
|
32
27
|
var expirationDate = _ref.expirationDate,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
_ref$countdownStart = _ref.countdownStart,
|
|
29
|
+
countdownStart = _ref$countdownStart === void 0 ? 86400 : _ref$countdownStart,
|
|
30
|
+
_ref$hasPrefix = _ref.hasPrefix,
|
|
31
|
+
hasPrefix = _ref$hasPrefix === void 0 ? false : _ref$hasPrefix,
|
|
32
|
+
_ref$countdownText = _ref.countdownText,
|
|
33
|
+
countdownText = _ref$countdownText === void 0 ? 'Закончится через' : _ref$countdownText,
|
|
34
|
+
_ref$expirationDateTe = _ref.expirationDateText,
|
|
35
|
+
expirationDateText = _ref$expirationDateTe === void 0 ? 'Воспользуйтесь до' : _ref$expirationDateTe,
|
|
36
|
+
className = _ref.className,
|
|
37
|
+
dataAttrs = _ref.dataAttrs;
|
|
43
38
|
var remainingTime = (expirationDate.getTime() - Date.now()) / MS_IN_SECOND;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
showCountdown = _useState4[0],
|
|
53
|
-
setShowCountdown = _useState4[1];
|
|
54
|
-
|
|
39
|
+
var _React$useState = React.useState(remainingTime),
|
|
40
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
+
actualRemainingTime = _React$useState2[0],
|
|
42
|
+
setActualRemainingTime = _React$useState2[1];
|
|
43
|
+
var _React$useState3 = React.useState(false),
|
|
44
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
45
|
+
showCountdown = _React$useState4[0],
|
|
46
|
+
setShowCountdown = _React$useState4[1];
|
|
55
47
|
var isLastHour = actualRemainingTime < SECONDS_IN_HOUR;
|
|
56
48
|
var isTimeExpired = actualRemainingTime < 1;
|
|
57
49
|
var theme = showCountdown ? TimerBadgeTheme.RED : TimerBadgeTheme.GREY;
|
|
58
50
|
var additionalText = showCountdown ? countdownText : expirationDateText;
|
|
59
|
-
useEffect(function () {
|
|
51
|
+
React.useEffect(function () {
|
|
60
52
|
setShowCountdown(actualRemainingTime < countdownStart);
|
|
61
53
|
}, [actualRemainingTime, countdownStart]);
|
|
62
|
-
useEffect(function () {
|
|
54
|
+
React.useEffect(function () {
|
|
63
55
|
if (isTimeExpired) {
|
|
64
56
|
return undefined;
|
|
65
57
|
}
|
|
66
|
-
|
|
67
58
|
var timeoutId = window.setTimeout(function () {
|
|
68
59
|
return setActualRemainingTime(actualRemainingTime - 1);
|
|
69
60
|
}, TIMEOUT);
|
|
@@ -93,19 +84,4 @@ var TimerBadge = function TimerBadge(_ref) {
|
|
|
93
84
|
}
|
|
94
85
|
})));
|
|
95
86
|
};
|
|
96
|
-
|
|
97
|
-
TimerBadge.propTypes = {
|
|
98
|
-
expirationDate: PropTypes.instanceOf(Date).isRequired,
|
|
99
|
-
countdownStart: PropTypes.number,
|
|
100
|
-
hasPrefix: PropTypes.bool,
|
|
101
|
-
countdownText: PropTypes.string,
|
|
102
|
-
expirationDateText: PropTypes.string,
|
|
103
|
-
className: PropTypes.string,
|
|
104
|
-
dataAttrs: PropTypes.shape({
|
|
105
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
106
|
-
text: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
107
|
-
timer: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
108
|
-
iconContainer: PropTypes.objectOf(PropTypes.string.isRequired)
|
|
109
|
-
})
|
|
110
|
-
};
|
|
111
87
|
export default TimerBadge;
|
package/dist/es/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.js
RENAMED
|
@@ -1,70 +1,54 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import "core-js/modules/es.math.trunc.js";
|
|
3
2
|
import "core-js/modules/es.array.concat.js";
|
|
4
|
-
import "core-js/modules/es.
|
|
3
|
+
import "core-js/modules/es.math.trunc.js";
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
7
6
|
import format from 'date-fns/format';
|
|
8
7
|
import ruLocale from 'date-fns/locale/ru';
|
|
9
|
-
import * as PropTypes from 'prop-types';
|
|
10
8
|
var SECONDS_IN_DAY = 86400;
|
|
11
9
|
var SECONDS_IN_HOUR = 3600;
|
|
12
10
|
var SECONDS_IN_MINUTE = 60;
|
|
13
|
-
|
|
14
11
|
var formatDate = function formatDate(date, pattern) {
|
|
15
12
|
return format(date, pattern, {
|
|
16
13
|
locale: ruLocale
|
|
17
14
|
});
|
|
18
15
|
};
|
|
19
|
-
|
|
20
16
|
export var getCountdownText = function getCountdownText() {
|
|
21
17
|
var remainingTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
22
18
|
var isMoreHourAndLessDay = remainingTime >= SECONDS_IN_HOUR && remainingTime < SECONDS_IN_DAY;
|
|
23
|
-
|
|
24
19
|
var truncTime = function truncTime() {
|
|
25
20
|
var divider = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
26
21
|
return Math.trunc(remainingTime / divider);
|
|
27
22
|
};
|
|
28
|
-
|
|
29
23
|
switch (true) {
|
|
30
24
|
case remainingTime <= 0:
|
|
31
25
|
{
|
|
32
26
|
return '';
|
|
33
27
|
}
|
|
34
|
-
|
|
35
28
|
case remainingTime < SECONDS_IN_MINUTE:
|
|
36
29
|
{
|
|
37
30
|
var seconds = truncTime();
|
|
38
31
|
return "".concat(seconds, " \u0441\u0435\u043A");
|
|
39
32
|
}
|
|
40
|
-
|
|
41
33
|
case remainingTime < SECONDS_IN_HOUR:
|
|
42
34
|
{
|
|
43
35
|
var minutes = truncTime(SECONDS_IN_MINUTE);
|
|
44
36
|
return "".concat(minutes, " \u043C\u0438\u043D");
|
|
45
37
|
}
|
|
46
|
-
|
|
47
38
|
case isMoreHourAndLessDay:
|
|
48
39
|
{
|
|
49
40
|
var hours = truncTime(SECONDS_IN_HOUR);
|
|
50
41
|
var secondsLeft = remainingTime - hours * SECONDS_IN_HOUR;
|
|
51
|
-
|
|
52
42
|
var _minutes = Math.trunc(secondsLeft / SECONDS_IN_MINUTE);
|
|
53
|
-
|
|
54
43
|
return _minutes ? "".concat(hours, " \u0447 ").concat(_minutes, " \u043C\u0438\u043D") : "".concat(hours, " \u0447");
|
|
55
44
|
}
|
|
56
|
-
|
|
57
45
|
case remainingTime >= SECONDS_IN_DAY:
|
|
58
46
|
{
|
|
59
47
|
var days = truncTime(SECONDS_IN_DAY);
|
|
60
|
-
|
|
61
48
|
var _secondsLeft = remainingTime - days * SECONDS_IN_DAY;
|
|
62
|
-
|
|
63
49
|
var _hours = Math.trunc(_secondsLeft / SECONDS_IN_HOUR);
|
|
64
|
-
|
|
65
50
|
return _hours ? "".concat(days, " \u0434\u043D ").concat(_hours, " \u0447") : "".concat(days, " \u0434\u043D");
|
|
66
51
|
}
|
|
67
|
-
|
|
68
52
|
default:
|
|
69
53
|
{
|
|
70
54
|
return '';
|
|
@@ -72,25 +56,14 @@ export var getCountdownText = function getCountdownText() {
|
|
|
72
56
|
}
|
|
73
57
|
};
|
|
74
58
|
var cn = cnCreate('mfui-timer');
|
|
75
|
-
|
|
76
59
|
var Timer = function Timer(_ref) {
|
|
77
60
|
var actualRemainingTime = _ref.actualRemainingTime,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
61
|
+
expirationDate = _ref.expirationDate,
|
|
62
|
+
showCountdown = _ref.showCountdown,
|
|
63
|
+
additionalText = _ref.additionalText,
|
|
64
|
+
dataAttrs = _ref.dataAttrs;
|
|
82
65
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
83
66
|
className: cn()
|
|
84
67
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), additionalText && /*#__PURE__*/React.createElement("span", null, additionalText, " "), /*#__PURE__*/React.createElement("span", null, showCountdown ? getCountdownText(actualRemainingTime) : formatDate(expirationDate, 'dd MMMM yyyy')));
|
|
85
68
|
};
|
|
86
|
-
|
|
87
|
-
Timer.propTypes = {
|
|
88
|
-
expirationDate: PropTypes.instanceOf(Date).isRequired,
|
|
89
|
-
actualRemainingTime: PropTypes.number.isRequired,
|
|
90
|
-
showCountdown: PropTypes.bool.isRequired,
|
|
91
|
-
additionalText: PropTypes.string,
|
|
92
|
-
dataAttrs: PropTypes.shape({
|
|
93
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
|
94
|
-
})
|
|
95
|
-
};
|
|
96
69
|
export default Timer;
|
|
@@ -1,195 +1 @@
|
|
|
1
|
-
.mfui-banner {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
.mfui-banner .swiper-wrapper {
|
|
5
|
-
display: -webkit-box;
|
|
6
|
-
display: -ms-flexbox;
|
|
7
|
-
display: flex;
|
|
8
|
-
}
|
|
9
|
-
.mfui-banner .mfui-banner__swiper-container {
|
|
10
|
-
position: relative;
|
|
11
|
-
}
|
|
12
|
-
.mfui-banner__swiper {
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
}
|
|
15
|
-
.mfui-banner__slide {
|
|
16
|
-
-ms-flex-negative: 0;
|
|
17
|
-
flex-shrink: 0;
|
|
18
|
-
height: 500px;
|
|
19
|
-
}
|
|
20
|
-
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
|
21
|
-
.mfui-banner__slide {
|
|
22
|
-
height: 420px;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
@media screen and (min-width: 1280px) {
|
|
26
|
-
.mfui-banner__slide {
|
|
27
|
-
height: 400px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.mfui-banner__slide-content {
|
|
31
|
-
margin-right: -1px;
|
|
32
|
-
border-right: 1px solid transparent;
|
|
33
|
-
}
|
|
34
|
-
@media screen and (max-width: 1023px) {
|
|
35
|
-
.mfui-banner__slide-content {
|
|
36
|
-
height: 100%;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
.mfui-banner_auto-height .mfui-banner__slide {
|
|
40
|
-
height: auto;
|
|
41
|
-
}
|
|
42
|
-
.mfui-banner .mfui-banner__arrow {
|
|
43
|
-
position: absolute;
|
|
44
|
-
top: 50%;
|
|
45
|
-
z-index: 10;
|
|
46
|
-
translate: 0 -50%;
|
|
47
|
-
-webkit-transition: scale 0.2s linear;
|
|
48
|
-
transition: scale 0.2s linear;
|
|
49
|
-
}
|
|
50
|
-
@media screen and (max-width: 767px) {
|
|
51
|
-
.mfui-banner .mfui-banner__arrow {
|
|
52
|
-
display: none;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
.mfui-banner .mfui-banner__arrow_theme_white {
|
|
56
|
-
width: 64px;
|
|
57
|
-
height: 64px;
|
|
58
|
-
}
|
|
59
|
-
@media screen and (max-width: 1023px) {
|
|
60
|
-
.mfui-banner .mfui-banner__arrow_theme_white {
|
|
61
|
-
display: none;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
.mfui-banner .mfui-banner__arrow_prev {
|
|
65
|
-
left: 12px;
|
|
66
|
-
}
|
|
67
|
-
@media screen and (max-width: 767px) {
|
|
68
|
-
.mfui-banner .mfui-banner__arrow_prev {
|
|
69
|
-
left: 8px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
73
|
-
.mfui-banner .mfui-banner__arrow_prev {
|
|
74
|
-
left: 16px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
@media screen and (min-width: 1280px) {
|
|
78
|
-
.mfui-banner .mfui-banner__arrow_prev {
|
|
79
|
-
left: 20px;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
.mfui-banner .mfui-banner__arrow_next {
|
|
83
|
-
right: 12px;
|
|
84
|
-
}
|
|
85
|
-
@media screen and (max-width: 767px) {
|
|
86
|
-
.mfui-banner .mfui-banner__arrow_next {
|
|
87
|
-
right: 8px;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
91
|
-
.mfui-banner .mfui-banner__arrow_next {
|
|
92
|
-
right: 16px;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
@media screen and (min-width: 1280px) {
|
|
96
|
-
.mfui-banner .mfui-banner__arrow_next {
|
|
97
|
-
right: 20px;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
.mfui-banner .mfui-banner__arrow_prev.mfui-banner__arrow_theme_white {
|
|
101
|
-
left: 0;
|
|
102
|
-
translate: -50% -50%;
|
|
103
|
-
}
|
|
104
|
-
.mfui-banner .mfui-banner__arrow_next.mfui-banner__arrow_theme_white {
|
|
105
|
-
right: 0;
|
|
106
|
-
translate: 50% -50%;
|
|
107
|
-
}
|
|
108
|
-
.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover {
|
|
109
|
-
scale: 1.25;
|
|
110
|
-
}
|
|
111
|
-
.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active {
|
|
112
|
-
scale: 1.125;
|
|
113
|
-
}
|
|
114
|
-
.mfui-banner__pagination {
|
|
115
|
-
left: 50%;
|
|
116
|
-
z-index: 10;
|
|
117
|
-
display: -webkit-box;
|
|
118
|
-
display: -ms-flexbox;
|
|
119
|
-
display: flex;
|
|
120
|
-
gap: 12px;
|
|
121
|
-
-webkit-box-align: center;
|
|
122
|
-
-ms-flex-align: center;
|
|
123
|
-
align-items: center;
|
|
124
|
-
-webkit-box-pack: center;
|
|
125
|
-
-ms-flex-pack: center;
|
|
126
|
-
justify-content: center;
|
|
127
|
-
margin-top: 32px;
|
|
128
|
-
}
|
|
129
|
-
.mfui-banner__pagination_bottom-offset {
|
|
130
|
-
position: absolute;
|
|
131
|
-
bottom: 60px;
|
|
132
|
-
left: 50%;
|
|
133
|
-
z-index: 10;
|
|
134
|
-
-webkit-transform: translateX(-50%);
|
|
135
|
-
transform: translateX(-50%);
|
|
136
|
-
}
|
|
137
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
138
|
-
.mfui-banner__pagination_bottom-offset {
|
|
139
|
-
bottom: 89px;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
|
143
|
-
.mfui-banner__pagination_bottom-offset {
|
|
144
|
-
bottom: 90px;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
@media screen and (min-width: 1280px) and (max-width: 1439px) {
|
|
148
|
-
.mfui-banner__pagination_bottom-offset {
|
|
149
|
-
bottom: 65px;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
@media screen and (min-width: 1440px) {
|
|
153
|
-
.mfui-banner__pagination_bottom-offset {
|
|
154
|
-
bottom: 72px;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
.mfui-banner_radius_rounded .mfui-banner__swiper {
|
|
158
|
-
border-radius: 24px;
|
|
159
|
-
}
|
|
160
|
-
@media screen and (max-width: 767px) {
|
|
161
|
-
.mfui-banner_show-next-slide .mfui-banner__swiper {
|
|
162
|
-
margin-right: -16px;
|
|
163
|
-
margin-left: -16px;
|
|
164
|
-
padding-right: 32px;
|
|
165
|
-
padding-left: 16px;
|
|
166
|
-
border-radius: 0;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
@media screen and (max-width: 767px) {
|
|
170
|
-
.mfui-banner_show-next-slide .mfui-banner__slide-content {
|
|
171
|
-
margin-right: 0;
|
|
172
|
-
border-right: none;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
@media screen and (max-width: 767px) {
|
|
176
|
-
.mfui-banner_show-next-slide.mfui-banner_radius_rounded .mfui-banner__slide-content {
|
|
177
|
-
border-radius: 24px;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
.mfui-banner_background-color_green .mfui-banner__swiper {
|
|
181
|
-
background-color: var(--brandGreen);
|
|
182
|
-
}
|
|
183
|
-
.mfui-banner_background-color_purple .mfui-banner__swiper {
|
|
184
|
-
background-color: var(--brandPurple);
|
|
185
|
-
}
|
|
186
|
-
.mfui-banner_background-color_gradient .mfui-banner__swiper {
|
|
187
|
-
background: -webkit-gradient(linear, right top, left top, from(#ADA6BA), to(#F6F2F9));
|
|
188
|
-
background: linear-gradient(270deg, #ADA6BA 0%, #F6F2F9 100%);
|
|
189
|
-
}
|
|
190
|
-
.mfui-banner_background-color_light .mfui-banner__swiper {
|
|
191
|
-
background-color: #F6F2F9;
|
|
192
|
-
}
|
|
193
|
-
.mfui-banner_background-color_spbSky0 .mfui-banner__swiper {
|
|
194
|
-
background-color: var(--spbSky0);
|
|
195
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-banner{position:relative}.mfui-banner .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.mfui-banner .mfui-banner__swiper-container{position:relative}.mfui-banner__swiper{overflow:hidden}.mfui-banner__slide{-ms-flex-negative:0;flex-shrink:0;height:500px}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__slide{height:420px}}@media screen and (min-width:1280px){.mfui-banner__slide{height:400px}}.mfui-banner__slide-content{border-right:1px solid transparent;margin-right:-1px}@media screen and (max-width:1023px){.mfui-banner__slide-content{height:100%}}.mfui-banner_auto-height .mfui-banner__slide{height:auto}.mfui-banner .mfui-banner__arrow{position:absolute;top:50%;-webkit-transition:scale .2s linear;transition:scale .2s linear;translate:0 -50%;z-index:10}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow{display:none}}.mfui-banner .mfui-banner__arrow_theme_white{height:64px;width:64px}@media screen and (max-width:1023px){.mfui-banner .mfui-banner__arrow_theme_white{display:none}}.mfui-banner .mfui-banner__arrow_prev{left:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_prev{left:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_prev{left:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_prev{left:20px}}.mfui-banner .mfui-banner__arrow_next{right:12px}@media screen and (max-width:767px){.mfui-banner .mfui-banner__arrow_next{right:8px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner .mfui-banner__arrow_next{right:16px}}@media screen and (min-width:1280px){.mfui-banner .mfui-banner__arrow_next{right:20px}}.mfui-banner .mfui-banner__arrow_prev.mfui-banner__arrow_theme_white{left:0;translate:-50% -50%}.mfui-banner .mfui-banner__arrow_next.mfui-banner__arrow_theme_white{right:0;translate:50% -50%}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:hover{scale:1.25}.mfui-banner_no-touch .mfui-banner__arrow_theme_white:active{scale:1.125}.mfui-banner__pagination{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;left:50%;z-index:10;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-top:32px}.mfui-banner__pagination_bottom-offset{bottom:60px;left:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:10}@media screen and (min-width:768px) and (max-width:1023px){.mfui-banner__pagination_bottom-offset{bottom:89px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-banner__pagination_bottom-offset{bottom:90px}}@media screen and (min-width:1280px) and (max-width:1439px){.mfui-banner__pagination_bottom-offset{bottom:65px}}@media screen and (min-width:1440px){.mfui-banner__pagination_bottom-offset{bottom:72px}}.mfui-banner_radius_rounded .mfui-banner__swiper{border-radius:24px}@media screen and (max-width:767px){.mfui-banner_show-next-slide .mfui-banner__swiper{border-radius:0;margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}.mfui-banner_show-next-slide .mfui-banner__slide-content{border-right:none;margin-right:0}.mfui-banner_show-next-slide.mfui-banner_radius_rounded .mfui-banner__slide-content{border-radius:24px}}.mfui-banner_background-color_green .mfui-banner__swiper{background-color:var(--brandGreen)}.mfui-banner_background-color_purple .mfui-banner__swiper{background-color:var(--brandPurple)}.mfui-banner_background-color_gradient .mfui-banner__swiper{background:-webkit-gradient(linear,right top,left top,from(#ada6ba),to(#f6f2f9));background:linear-gradient(270deg,#ada6ba,#f6f2f9)}.mfui-banner_background-color_light .mfui-banner__swiper{background-color:#f6f2f9}.mfui-banner_background-color_spbSky0 .mfui-banner__swiper{background-color:var(--spbSky0)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import SwiperCore from 'swiper';
|
|
3
3
|
import { ThemeType as ArrowThemeType } from '../NavArrow/NavArrow';
|
|
4
|
-
import './Banner.
|
|
4
|
+
import './Banner.scss';
|
|
5
5
|
export declare const BackgroundColor: {
|
|
6
6
|
readonly TRANSPARENT: "transparent";
|
|
7
7
|
readonly GREEN: "green";
|
|
@@ -10,17 +10,17 @@ export declare const BackgroundColor: {
|
|
|
10
10
|
readonly GRADIENT: "gradient";
|
|
11
11
|
readonly LIGHT: "light";
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type BackgroundColorType = (typeof BackgroundColor)[keyof typeof BackgroundColor];
|
|
14
14
|
export declare const Radius: {
|
|
15
15
|
readonly CORNERS: "corners";
|
|
16
16
|
readonly ROUNDED: "rounded";
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type RadiusType = (typeof Radius)[keyof typeof Radius];
|
|
19
19
|
export declare const NavTheme: {
|
|
20
20
|
readonly LIGHT: "light";
|
|
21
21
|
readonly DARK: "dark";
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
type NavThemeType = (typeof NavTheme)[keyof typeof NavTheme];
|
|
24
24
|
export interface IBannerProps {
|
|
25
25
|
/** Сss класс для внешнего контейнера */
|
|
26
26
|
className?: string;
|
|
@@ -69,6 +69,7 @@ export interface IBannerProps {
|
|
|
69
69
|
noIncreaseAutoplayDelay?: boolean;
|
|
70
70
|
/** Показать часть следующего слайда */
|
|
71
71
|
showNextSlide?: boolean;
|
|
72
|
+
children?: React.ReactNode;
|
|
72
73
|
/** Ref на swiper */
|
|
73
74
|
getSwiper?: (instance: SwiperCore) => void;
|
|
74
75
|
/** Обработчик клика по стрелке "вперед" (должен быть обернут в useCallback) */
|