@megafon/ui-core 6.2.1 → 7.0.0
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,11 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import "core-js/modules/es.array.concat.js";
|
|
3
3
|
import "core-js/modules/es.array.map.js";
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import * as React from 'react';
|
|
5
5
|
import { checkEventIsClickOrEnterPress, cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import "./Month.css";
|
|
8
|
-
|
|
9
7
|
var ArrowLeft = function ArrowLeft(props) {
|
|
10
8
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
11
9
|
viewBox: "0 0 20 20"
|
|
@@ -15,7 +13,6 @@ var ArrowLeft = function ArrowLeft(props) {
|
|
|
15
13
|
clipRule: "evenodd"
|
|
16
14
|
}));
|
|
17
15
|
};
|
|
18
|
-
|
|
19
16
|
var ArrowRight = function ArrowRight(props) {
|
|
20
17
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
18
|
viewBox: "0 0 20 20"
|
|
@@ -25,40 +22,34 @@ var ArrowRight = function ArrowRight(props) {
|
|
|
25
22
|
clipRule: "evenodd"
|
|
26
23
|
}));
|
|
27
24
|
};
|
|
28
|
-
|
|
29
25
|
var cn = cnCreate('mfui-month');
|
|
30
|
-
|
|
31
26
|
var Month = function Month(_ref) {
|
|
32
27
|
var dataAttrs = _ref.dataAttrs,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
isPrevMonthDisabled = _ref.isPrevMonthDisabled,
|
|
29
|
+
isNextMonthDisabled = _ref.isNextMonthDisabled,
|
|
30
|
+
year = _ref.year,
|
|
31
|
+
monthLabel = _ref.monthLabel,
|
|
32
|
+
weekdayLabels = _ref.weekdayLabels,
|
|
33
|
+
goToPreviousMonth = _ref.goToPreviousMonth,
|
|
34
|
+
goToNextMonth = _ref.goToNextMonth,
|
|
35
|
+
_ref$isModern = _ref.isModern,
|
|
36
|
+
isModern = _ref$isModern === void 0 ? false : _ref$isModern,
|
|
37
|
+
children = _ref.children;
|
|
44
38
|
var handleArrowLeftClick = function handleArrowLeftClick(e) {
|
|
45
39
|
if (checkEventIsClickOrEnterPress(e)) {
|
|
46
40
|
!isPrevMonthDisabled && goToPreviousMonth();
|
|
47
41
|
}
|
|
48
42
|
};
|
|
49
|
-
|
|
50
43
|
var handleArrowRightClick = function handleArrowRightClick(e) {
|
|
51
44
|
if (checkEventIsClickOrEnterPress(e)) {
|
|
52
45
|
!isNextMonthDisabled && goToNextMonth();
|
|
53
46
|
}
|
|
54
47
|
};
|
|
55
|
-
|
|
56
48
|
var getTabIndex = function getTabIndex(hasFocus) {
|
|
57
49
|
var tabIndexWithFocus = 0;
|
|
58
50
|
var tabIndexWithoutFocus = -1;
|
|
59
51
|
return hasFocus ? tabIndexWithFocus : tabIndexWithoutFocus;
|
|
60
52
|
};
|
|
61
|
-
|
|
62
53
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
63
54
|
className: cn({
|
|
64
55
|
modern: isModern
|
|
@@ -94,20 +85,4 @@ var Month = function Month(_ref) {
|
|
|
94
85
|
className: cn('days')
|
|
95
86
|
}, children));
|
|
96
87
|
};
|
|
97
|
-
|
|
98
|
-
Month.propTypes = {
|
|
99
|
-
dataAttrs: PropTypes.shape({
|
|
100
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
101
|
-
arrowLeft: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
102
|
-
arrowRight: PropTypes.objectOf(PropTypes.string.isRequired)
|
|
103
|
-
}),
|
|
104
|
-
isPrevMonthDisabled: PropTypes.bool.isRequired,
|
|
105
|
-
isNextMonthDisabled: PropTypes.bool.isRequired,
|
|
106
|
-
year: PropTypes.number.isRequired,
|
|
107
|
-
monthLabel: PropTypes.string.isRequired,
|
|
108
|
-
weekdayLabels: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired,
|
|
109
|
-
goToPreviousMonth: PropTypes.func.isRequired,
|
|
110
|
-
goToNextMonth: PropTypes.func.isRequired,
|
|
111
|
-
isModern: PropTypes.bool
|
|
112
|
-
};
|
|
113
88
|
export default Month;
|
|
@@ -1,48 +1 @@
|
|
|
1
|
-
.mfui-caption {
|
|
2
|
-
font-family: inherit;
|
|
3
|
-
font-size: 12px;
|
|
4
|
-
line-height: 18px;
|
|
5
|
-
margin: 0;
|
|
6
|
-
}
|
|
7
|
-
.mfui-caption_variant_normal {
|
|
8
|
-
font-weight: 400;
|
|
9
|
-
}
|
|
10
|
-
.mfui-caption_variant_medium {
|
|
11
|
-
font-weight: 500;
|
|
12
|
-
}
|
|
13
|
-
.mfui-caption_space_wide {
|
|
14
|
-
line-height: 18px;
|
|
15
|
-
}
|
|
16
|
-
.mfui-caption_space_tight {
|
|
17
|
-
line-height: 14px;
|
|
18
|
-
}
|
|
19
|
-
.mfui-caption_align_left {
|
|
20
|
-
text-align: left;
|
|
21
|
-
}
|
|
22
|
-
.mfui-caption_align_center {
|
|
23
|
-
text-align: center;
|
|
24
|
-
}
|
|
25
|
-
.mfui-caption_align_right {
|
|
26
|
-
text-align: right;
|
|
27
|
-
}
|
|
28
|
-
.mfui-caption_has-margin {
|
|
29
|
-
margin: 0 0 16px;
|
|
30
|
-
}
|
|
31
|
-
.mfui-caption_color_inherit {
|
|
32
|
-
color: inherit;
|
|
33
|
-
}
|
|
34
|
-
.mfui-caption_color_default {
|
|
35
|
-
color: var(--content);
|
|
36
|
-
}
|
|
37
|
-
.mfui-caption_color_gray {
|
|
38
|
-
color: var(--spbSky3);
|
|
39
|
-
}
|
|
40
|
-
.mfui-caption_color_white {
|
|
41
|
-
color: var(--stcWhite);
|
|
42
|
-
}
|
|
43
|
-
.mfui-caption_color_green {
|
|
44
|
-
color: var(--brandGreen);
|
|
45
|
-
}
|
|
46
|
-
.mfui-caption_color_purple {
|
|
47
|
-
color: var(--brandPurple);
|
|
48
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-caption{font-family:inherit;font-size:12px;line-height:18px;margin:0}.mfui-caption_variant_normal{font-weight:400}.mfui-caption_variant_medium{font-weight:500}.mfui-caption_space_wide{line-height:18px}.mfui-caption_space_tight{line-height:14px}.mfui-caption_align_left{text-align:left}.mfui-caption_align_center{text-align:center}.mfui-caption_align_right{text-align:right}.mfui-caption_has-margin{margin:0 0 16px}.mfui-caption_color_inherit{color:inherit}.mfui-caption_color_default{color:var(--content)}.mfui-caption_color_gray{color:var(--spbSky3)}.mfui-caption_color_white{color:var(--stcWhite)}.mfui-caption_color_green{color:var(--brandGreen)}.mfui-caption_color_purple{color:var(--brandPurple)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import './Caption.
|
|
2
|
+
import './Caption.scss';
|
|
3
3
|
declare const COLORS: {
|
|
4
4
|
readonly INHERIT: "inherit";
|
|
5
5
|
readonly DEFAULT: "default";
|
|
@@ -8,7 +8,7 @@ declare const COLORS: {
|
|
|
8
8
|
readonly GREEN: "green";
|
|
9
9
|
readonly PURPLE: "purple";
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type ColorType = (typeof COLORS)[keyof typeof COLORS];
|
|
12
12
|
export interface ICaptionProps {
|
|
13
13
|
/** Выравнивание по горизонтали */
|
|
14
14
|
align?: 'left' | 'center' | 'right';
|
|
@@ -26,6 +26,8 @@ export interface ICaptionProps {
|
|
|
26
26
|
dataAttrs?: {
|
|
27
27
|
root?: Record<string, string>;
|
|
28
28
|
};
|
|
29
|
+
/** Дочерние элементы */
|
|
30
|
+
children?: React.ReactNode;
|
|
29
31
|
}
|
|
30
32
|
declare const Caption: React.FC<ICaptionProps>;
|
|
31
33
|
export default Caption;
|
|
@@ -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 "./Caption.css";
|
|
7
5
|
var COLORS = {
|
|
8
6
|
INHERIT: 'inherit',
|
|
@@ -13,20 +11,19 @@ var COLORS = {
|
|
|
13
11
|
PURPLE: 'purple'
|
|
14
12
|
};
|
|
15
13
|
var cn = cnCreate('mfui-caption');
|
|
16
|
-
|
|
17
14
|
var Caption = function Caption(_ref) {
|
|
18
15
|
var align = _ref.align,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
_ref$color = _ref.color,
|
|
17
|
+
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
18
|
+
_ref$space = _ref.space,
|
|
19
|
+
space = _ref$space === void 0 ? 'wide' : _ref$space,
|
|
20
|
+
_ref$variant = _ref.variant,
|
|
21
|
+
variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
|
|
22
|
+
className = _ref.className,
|
|
23
|
+
_ref$hasMargin = _ref.hasMargin,
|
|
24
|
+
hasMargin = _ref$hasMargin === void 0 ? true : _ref$hasMargin,
|
|
25
|
+
dataAttrs = _ref.dataAttrs,
|
|
26
|
+
children = _ref.children;
|
|
30
27
|
return /*#__PURE__*/React.createElement("p", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
31
28
|
className: cn({
|
|
32
29
|
align: align,
|
|
@@ -37,15 +34,4 @@ var Caption = function Caption(_ref) {
|
|
|
37
34
|
}, className)
|
|
38
35
|
}), children);
|
|
39
36
|
};
|
|
40
|
-
|
|
41
|
-
Caption.propTypes = {
|
|
42
|
-
dataAttrs: PropTypes.shape({
|
|
43
|
-
root: PropTypes.objectOf(PropTypes.string.isRequired)
|
|
44
|
-
}),
|
|
45
|
-
align: PropTypes.oneOf(['left', 'center', 'right']),
|
|
46
|
-
space: PropTypes.oneOf(['wide', 'tight']),
|
|
47
|
-
variant: PropTypes.oneOf(['normal', 'medium']),
|
|
48
|
-
hasMargin: PropTypes.bool,
|
|
49
|
-
color: PropTypes.oneOf(Object.values(COLORS))
|
|
50
|
-
};
|
|
51
37
|
export default Caption;
|
|
@@ -1,215 +1 @@
|
|
|
1
|
-
.mfui-carousel {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: -webkit-box;
|
|
4
|
-
display: -ms-flexbox;
|
|
5
|
-
display: flex;
|
|
6
|
-
}
|
|
7
|
-
.mfui-carousel__swiper {
|
|
8
|
-
position: relative;
|
|
9
|
-
display: -webkit-box;
|
|
10
|
-
display: -ms-flexbox;
|
|
11
|
-
display: flex;
|
|
12
|
-
-webkit-box-flex: 1;
|
|
13
|
-
-ms-flex-positive: 1;
|
|
14
|
-
flex-grow: 1;
|
|
15
|
-
-ms-flex-negative: 1;
|
|
16
|
-
flex-shrink: 1;
|
|
17
|
-
-ms-flex-wrap: wrap;
|
|
18
|
-
flex-wrap: wrap;
|
|
19
|
-
margin: -20px 0 -25px;
|
|
20
|
-
padding: 20px 0 25px;
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
@media screen and (min-width: 1024px) {
|
|
24
|
-
.mfui-carousel__swiper {
|
|
25
|
-
margin-right: -20px !important;
|
|
26
|
-
margin-left: -20px !important;
|
|
27
|
-
padding-right: 20px !important;
|
|
28
|
-
padding-left: 20px !important;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
32
|
-
.mfui-carousel__swiper_default-inner-indents {
|
|
33
|
-
margin-right: -48px;
|
|
34
|
-
margin-left: -48px;
|
|
35
|
-
padding-right: 48px;
|
|
36
|
-
padding-left: 48px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
@media screen and (max-width: 767px) {
|
|
40
|
-
.mfui-carousel__swiper_default-inner-indents {
|
|
41
|
-
margin-right: -16px;
|
|
42
|
-
margin-left: -16px;
|
|
43
|
-
padding-right: 32px;
|
|
44
|
-
padding-left: 16px;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.mfui-carousel__swiper_gradient:before,
|
|
48
|
-
.mfui-carousel__swiper_gradient:after {
|
|
49
|
-
content: '';
|
|
50
|
-
position: absolute;
|
|
51
|
-
top: 0;
|
|
52
|
-
bottom: 0;
|
|
53
|
-
z-index: 5;
|
|
54
|
-
width: var(--gap);
|
|
55
|
-
}
|
|
56
|
-
@media screen and (max-width: 1023px) {
|
|
57
|
-
.mfui-carousel__swiper_gradient:before,
|
|
58
|
-
.mfui-carousel__swiper_gradient:after {
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
.mfui-carousel__swiper_gradient:before {
|
|
63
|
-
left: 0;
|
|
64
|
-
background: -webkit-gradient(linear, right top, left top, from(transparent), to(var(--gradientColor)));
|
|
65
|
-
background: linear-gradient(270deg, transparent 0%, var(--gradientColor) 100%);
|
|
66
|
-
}
|
|
67
|
-
.mfui-carousel__swiper_gradient:after {
|
|
68
|
-
right: 0;
|
|
69
|
-
background: -webkit-gradient(linear, right top, left top, from(var(--gradientColor)), to(transparent));
|
|
70
|
-
background: linear-gradient(270deg, var(--gradientColor) 0%, transparent 100%);
|
|
71
|
-
}
|
|
72
|
-
.mfui-carousel__swiper_gradient-color_default {
|
|
73
|
-
--gradientColor: var(--base);
|
|
74
|
-
}
|
|
75
|
-
.mfui-carousel__swiper_gradient-color_green {
|
|
76
|
-
--gradientColor: var(--brandGreen);
|
|
77
|
-
}
|
|
78
|
-
.mfui-carousel__swiper_gradient-color_black {
|
|
79
|
-
--gradientColor: var(--stcBlack);
|
|
80
|
-
}
|
|
81
|
-
.mfui-carousel__swiper_gradient-color_spbSky0 {
|
|
82
|
-
--gradientColor: var(--spbSky0);
|
|
83
|
-
}
|
|
84
|
-
.mfui-carousel__swiper_gradient-color_spbSky1 {
|
|
85
|
-
--gradientColor: var(--spbSky1);
|
|
86
|
-
}
|
|
87
|
-
.mfui-carousel__swiper_gradient-color_spbSky2 {
|
|
88
|
-
--gradientColor: var(--spbSky2);
|
|
89
|
-
}
|
|
90
|
-
.mfui-carousel .swiper-wrapper {
|
|
91
|
-
z-index: 1;
|
|
92
|
-
display: -webkit-box;
|
|
93
|
-
display: -ms-flexbox;
|
|
94
|
-
display: flex;
|
|
95
|
-
}
|
|
96
|
-
.mfui-carousel__slide {
|
|
97
|
-
-ms-flex-negative: 0;
|
|
98
|
-
flex-shrink: 0;
|
|
99
|
-
}
|
|
100
|
-
@media screen and (min-width: 1024px) {
|
|
101
|
-
.mfui-carousel__slide {
|
|
102
|
-
-webkit-backface-visibility: hidden;
|
|
103
|
-
backface-visibility: hidden;
|
|
104
|
-
opacity: 0;
|
|
105
|
-
-webkit-transition: opacity 0.2s;
|
|
106
|
-
transition: opacity 0.2s;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
@media screen and (min-width: 1024px) {
|
|
110
|
-
.mfui-carousel .swiper-slide-visible {
|
|
111
|
-
opacity: 1;
|
|
112
|
-
-webkit-transition: opacity 0.4s;
|
|
113
|
-
transition: opacity 0.4s;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
.mfui-carousel__arrow {
|
|
117
|
-
position: absolute;
|
|
118
|
-
top: 50%;
|
|
119
|
-
z-index: 6;
|
|
120
|
-
-webkit-transform: translateY(calc(-50% - 40px / 2));
|
|
121
|
-
transform: translateY(calc(-50% - 40px / 2));
|
|
122
|
-
}
|
|
123
|
-
@media screen and (max-width: 1023px) {
|
|
124
|
-
.mfui-carousel__arrow {
|
|
125
|
-
display: none;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
.mfui-carousel__arrow_prev {
|
|
129
|
-
right: calc(100% + 12px);
|
|
130
|
-
}
|
|
131
|
-
@media screen and (min-width: 1280px) {
|
|
132
|
-
.mfui-carousel__arrow_prev {
|
|
133
|
-
right: calc(100% + 20px);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
.mfui-carousel__arrow_next {
|
|
137
|
-
left: calc(100% + 12px);
|
|
138
|
-
}
|
|
139
|
-
@media screen and (min-width: 1280px) {
|
|
140
|
-
.mfui-carousel__arrow_next {
|
|
141
|
-
left: calc(100% + 20px);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
.mfui-carousel__arrow_locked {
|
|
145
|
-
display: none;
|
|
146
|
-
}
|
|
147
|
-
.mfui-carousel .swiper-pagination {
|
|
148
|
-
display: -webkit-box;
|
|
149
|
-
display: -ms-flexbox;
|
|
150
|
-
display: flex;
|
|
151
|
-
gap: 12px;
|
|
152
|
-
-webkit-box-align: center;
|
|
153
|
-
-ms-flex-align: center;
|
|
154
|
-
align-items: center;
|
|
155
|
-
-webkit-box-pack: center;
|
|
156
|
-
-ms-flex-pack: center;
|
|
157
|
-
justify-content: center;
|
|
158
|
-
justify-self: center;
|
|
159
|
-
-webkit-box-ordinal-group: 3;
|
|
160
|
-
-ms-flex-order: 2;
|
|
161
|
-
order: 2;
|
|
162
|
-
width: 100%;
|
|
163
|
-
padding-top: 32px;
|
|
164
|
-
border-radius: 12px;
|
|
165
|
-
}
|
|
166
|
-
.mfui-carousel .swiper-pagination.swiper-pagination-lock {
|
|
167
|
-
display: none;
|
|
168
|
-
}
|
|
169
|
-
.mfui-carousel .swiper-pagination-bullet {
|
|
170
|
-
display: -webkit-box;
|
|
171
|
-
display: -ms-flexbox;
|
|
172
|
-
display: flex;
|
|
173
|
-
-webkit-box-align: center;
|
|
174
|
-
-ms-flex-align: center;
|
|
175
|
-
align-items: center;
|
|
176
|
-
-webkit-box-pack: center;
|
|
177
|
-
-ms-flex-pack: center;
|
|
178
|
-
justify-content: center;
|
|
179
|
-
-webkit-box-sizing: border-box;
|
|
180
|
-
box-sizing: border-box;
|
|
181
|
-
width: 8px;
|
|
182
|
-
height: 8px;
|
|
183
|
-
border-radius: 50%;
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
-webkit-transition: width 0.5s, background-color 0.3s;
|
|
186
|
-
transition: width 0.5s, background-color 0.3s;
|
|
187
|
-
}
|
|
188
|
-
.mfui-carousel .swiper-pagination-bullet:before {
|
|
189
|
-
content: '';
|
|
190
|
-
display: block;
|
|
191
|
-
width: 100%;
|
|
192
|
-
height: 100%;
|
|
193
|
-
border-radius: 50%;
|
|
194
|
-
-webkit-transition: border-radius 0.5s;
|
|
195
|
-
transition: border-radius 0.5s;
|
|
196
|
-
}
|
|
197
|
-
.mfui-carousel_nav-theme_green .swiper-pagination-bullet:before {
|
|
198
|
-
background-color: var(--stcWhite50);
|
|
199
|
-
}
|
|
200
|
-
.mfui-carousel_nav-theme_light .swiper-pagination-bullet:before {
|
|
201
|
-
background-color: var(--spbSky2);
|
|
202
|
-
}
|
|
203
|
-
.mfui-carousel .swiper-pagination-bullet-active {
|
|
204
|
-
width: 20px;
|
|
205
|
-
cursor: default;
|
|
206
|
-
}
|
|
207
|
-
.mfui-carousel .swiper-pagination-bullet-active:before {
|
|
208
|
-
border-radius: 4px;
|
|
209
|
-
}
|
|
210
|
-
.mfui-carousel_nav-theme_green .swiper-pagination-bullet-active:before {
|
|
211
|
-
background-color: var(--base);
|
|
212
|
-
}
|
|
213
|
-
.mfui-carousel_nav-theme_light .swiper-pagination-bullet-active:before {
|
|
214
|
-
background-color: var(--brandGreen);
|
|
215
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-carousel,.mfui-carousel__swiper{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.mfui-carousel__swiper{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:-20px 0 -25px;overflow:hidden;padding:20px 0 25px}@media screen and (min-width:1024px){.mfui-carousel__swiper{margin-left:-20px!important;margin-right:-20px!important;padding-left:20px!important;padding-right:20px!important}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-carousel__swiper_default-inner-indents{margin-left:-48px;margin-right:-48px;padding-left:48px;padding-right:48px}}@media screen and (max-width:767px){.mfui-carousel__swiper_default-inner-indents{margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:32px}}.mfui-carousel__swiper_gradient:after,.mfui-carousel__swiper_gradient:before{bottom:0;content:"";position:absolute;top:0;width:var(--gap);z-index:5}@media screen and (max-width:1023px){.mfui-carousel__swiper_gradient:after,.mfui-carousel__swiper_gradient:before{display:none}}.mfui-carousel__swiper_gradient:before{background:-webkit-gradient(linear,right top,left top,from(transparent),to(var(--gradientColor)));background:linear-gradient(270deg,transparent 0,var(--gradientColor) 100%);left:0}.mfui-carousel__swiper_gradient:after{background:-webkit-gradient(linear,right top,left top,from(var(--gradientColor)),to(transparent));background:linear-gradient(270deg,var(--gradientColor) 0,transparent 100%);right:0}.mfui-carousel__swiper_gradient-color_default{--gradientColor:var(--base)}.mfui-carousel__swiper_gradient-color_green{--gradientColor:var(--brandGreen)}.mfui-carousel__swiper_gradient-color_black{--gradientColor:var(--stcBlack)}.mfui-carousel__swiper_gradient-color_spbSky0{--gradientColor:var(--spbSky0)}.mfui-carousel__swiper_gradient-color_spbSky1{--gradientColor:var(--spbSky1)}.mfui-carousel__swiper_gradient-color_spbSky2{--gradientColor:var(--spbSky2)}.mfui-carousel .swiper-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;z-index:1}.mfui-carousel__slide{-ms-flex-negative:0;flex-shrink:0}@media screen and (min-width:1024px){.mfui-carousel__slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;opacity:0;-webkit-transition:opacity .2s;transition:opacity .2s}.mfui-carousel .swiper-slide-visible{opacity:1;-webkit-transition:opacity .4s;transition:opacity .4s}}.mfui-carousel__arrow{position:absolute;top:50%;-webkit-transform:translateY(calc(-50% - 20px));transform:translateY(calc(-50% - 20px));z-index:6}@media screen and (max-width:1023px){.mfui-carousel__arrow{display:none}}.mfui-carousel__arrow_prev{right:calc(100% + 12px)}@media screen and (min-width:1280px){.mfui-carousel__arrow_prev{right:calc(100% + 20px)}}.mfui-carousel__arrow_next{left:calc(100% + 12px)}@media screen and (min-width:1280px){.mfui-carousel__arrow_next{left:calc(100% + 20px)}}.mfui-carousel__arrow_locked{display:none}.mfui-carousel .swiper-pagination{display:-webkit-box;display:-ms-flexbox;display:flex;gap:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;justify-self:center;-webkit-box-ordinal-group:3;-ms-flex-order:2;border-radius:12px;order:2;padding-top:32px;width:100%}.mfui-carousel .swiper-pagination.swiper-pagination-lock{display:none}.mfui-carousel .swiper-pagination-bullet{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;height:8px;justify-content:center;-webkit-transition:width .5s,background-color .3s;transition:width .5s,background-color .3s;width:8px}.mfui-carousel .swiper-pagination-bullet:before{border-radius:50%;content:"";display:block;height:100%;-webkit-transition:border-radius .5s;transition:border-radius .5s;width:100%}.mfui-carousel_nav-theme_green .swiper-pagination-bullet:before{background-color:var(--stcWhite50)}.mfui-carousel_nav-theme_light .swiper-pagination-bullet:before{background-color:var(--spbSky2)}.mfui-carousel .swiper-pagination-bullet-active{cursor:default;width:20px}.mfui-carousel .swiper-pagination-bullet-active:before{border-radius:4px}.mfui-carousel_nav-theme_green .swiper-pagination-bullet-active:before{background-color:var(--base)}.mfui-carousel_nav-theme_light .swiper-pagination-bullet-active:before{background-color:var(--brandGreen)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { PaginationOptions } from 'swiper/types
|
|
4
|
-
import './Carousel.
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SwiperClass } from 'swiper/react';
|
|
3
|
+
import { PaginationOptions } from 'swiper/types';
|
|
4
|
+
import './Carousel.scss';
|
|
5
5
|
export declare const NavTheme: {
|
|
6
6
|
readonly LIGHT: "light";
|
|
7
7
|
readonly GREEN: "green";
|
|
@@ -21,11 +21,11 @@ declare const GradientTheme: {
|
|
|
21
21
|
readonly SPB_SKY_1: "spbSky1";
|
|
22
22
|
readonly SPB_SKY_2: "spbSky2";
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export
|
|
24
|
+
type SlidesPerViewType = (typeof SlidesPerView)[keyof typeof SlidesPerView];
|
|
25
|
+
type NavThemeType = (typeof NavTheme)[keyof typeof NavTheme];
|
|
26
|
+
type EffectThemeType = (typeof EffectTheme)[keyof typeof EffectTheme];
|
|
27
|
+
type GradientThemeType = (typeof GradientTheme)[keyof typeof GradientTheme];
|
|
28
|
+
export type SlidesSettingsType = {
|
|
29
29
|
[key: number]: {
|
|
30
30
|
slidesPerView: number | SlidesPerViewType;
|
|
31
31
|
slidesPerGroup?: number;
|
|
@@ -84,7 +84,7 @@ export interface ICarouselProps {
|
|
|
84
84
|
/** Свайп к слайду, по которому произведен клик */
|
|
85
85
|
slideToClickedSlide?: boolean;
|
|
86
86
|
/** Ref на swiper */
|
|
87
|
-
getSwiper?: (instance:
|
|
87
|
+
getSwiper?: (instance: SwiperClass) => void;
|
|
88
88
|
/** Обработчик клика по стрелке вперед (должен быть обернут в useCallback) */
|
|
89
89
|
onNextClick?: (index: number) => void;
|
|
90
90
|
/** Обработчик клика по стрелке назад (должен быть обернут в useCallback) */
|
|
@@ -95,6 +95,7 @@ export interface ICarouselProps {
|
|
|
95
95
|
gradient?: boolean;
|
|
96
96
|
/** Цвет градиента */
|
|
97
97
|
gradientColor?: GradientThemeType;
|
|
98
|
+
children?: React.ReactNode;
|
|
98
99
|
}
|
|
99
100
|
declare const Carousel: React.FC<ICarouselProps>;
|
|
100
101
|
export default Carousel;
|