@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,45 +1 @@
|
|
|
1
|
-
.color-item
|
|
2
|
-
display: -webkit-box;
|
|
3
|
-
display: -ms-flexbox;
|
|
4
|
-
display: flex;
|
|
5
|
-
-webkit-box-orient: vertical;
|
|
6
|
-
-webkit-box-direction: normal;
|
|
7
|
-
-ms-flex-direction: column;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
-webkit-box-align: center;
|
|
10
|
-
-ms-flex-align: center;
|
|
11
|
-
align-items: center;
|
|
12
|
-
width: 120px;
|
|
13
|
-
text-align: center;
|
|
14
|
-
}
|
|
15
|
-
.color-item__container {
|
|
16
|
-
position: relative;
|
|
17
|
-
width: 48px;
|
|
18
|
-
height: 48px;
|
|
19
|
-
margin-bottom: 8px;
|
|
20
|
-
}
|
|
21
|
-
.color-item__color {
|
|
22
|
-
position: relative;
|
|
23
|
-
z-index: 0;
|
|
24
|
-
width: 100%;
|
|
25
|
-
height: 100%;
|
|
26
|
-
border-radius: 50%;
|
|
27
|
-
}
|
|
28
|
-
.color-item__parent-color {
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 0;
|
|
31
|
-
right: 0;
|
|
32
|
-
z-index: 1;
|
|
33
|
-
width: 16px;
|
|
34
|
-
height: 16px;
|
|
35
|
-
border-radius: 50%;
|
|
36
|
-
}
|
|
37
|
-
.color-item__name {
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
line-height: 20px;
|
|
40
|
-
}
|
|
41
|
-
.color-item__code {
|
|
42
|
-
color: var(--spbSky3);
|
|
43
|
-
font-size: 12px;
|
|
44
|
-
line-height: 18px;
|
|
45
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.color-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;width:120px}.color-item__container{height:48px;margin-bottom:8px;position:relative;width:48px}.color-item__color{border-radius:50%;height:100%;position:relative;width:100%;z-index:0}.color-item__parent-color{border-radius:50%;height:16px;position:absolute;right:0;top:0;width:16px;z-index:1}.color-item__name{font-size:14px;line-height:20px}.color-item__code{color:var(--spbSky3);font-size:12px;line-height:18px}
|
|
@@ -2,14 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import { cnCreate } from '@megafon/ui-helpers';
|
|
3
3
|
import "./ColorItem.css";
|
|
4
4
|
var cn = cnCreate('color-item');
|
|
5
|
-
|
|
6
5
|
var ColorItem = function ColorItem(_ref) {
|
|
7
6
|
var colorCode = _ref.colorCode,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
colorName = _ref.colorName,
|
|
8
|
+
parentColorCode = _ref.parentColorCode,
|
|
9
|
+
gradient = _ref.gradient,
|
|
10
|
+
border = _ref.border,
|
|
11
|
+
className = _ref.className;
|
|
13
12
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
13
|
className: cn([className])
|
|
15
14
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -31,5 +30,4 @@ var ColorItem = function ColorItem(_ref) {
|
|
|
31
30
|
className: cn('code')
|
|
32
31
|
}, colorCode));
|
|
33
32
|
};
|
|
34
|
-
|
|
35
33
|
export default ColorItem;
|
|
@@ -1,233 +1 @@
|
|
|
1
|
-
.colors__inner {
|
|
2
|
-
margin: 0 -80px;
|
|
3
|
-
padding: 56px 80px 40px;
|
|
4
|
-
background-color: var(--spbSky0);
|
|
5
|
-
-webkit-transition: background-color 0.3s;
|
|
6
|
-
transition: background-color 0.3s;
|
|
7
|
-
}
|
|
8
|
-
@media screen and (max-width: 1120px) {
|
|
9
|
-
.colors__inner {
|
|
10
|
-
margin: 0 -24px;
|
|
11
|
-
padding: 24px;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
@media screen and (max-width: 350px) {
|
|
15
|
-
.colors__inner {
|
|
16
|
-
margin: 0 -15px;
|
|
17
|
-
padding: 15px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
.colors__title {
|
|
21
|
-
margin-bottom: 8px;
|
|
22
|
-
}
|
|
23
|
-
.colors__title-note {
|
|
24
|
-
margin-bottom: 60px;
|
|
25
|
-
}
|
|
26
|
-
.colors__group-title {
|
|
27
|
-
margin-bottom: 24px;
|
|
28
|
-
}
|
|
29
|
-
@media screen and (min-width: 768px) {
|
|
30
|
-
.colors__group-title {
|
|
31
|
-
margin-bottom: 36px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
@media screen and (max-width: 1023px) {
|
|
35
|
-
.colors__basic-group {
|
|
36
|
-
display: -webkit-box;
|
|
37
|
-
display: -ms-flexbox;
|
|
38
|
-
display: flex;
|
|
39
|
-
-webkit-box-orient: vertical;
|
|
40
|
-
-webkit-box-direction: normal;
|
|
41
|
-
-ms-flex-direction: column;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
margin-bottom: 24px;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.colors__basic-group:last-child {
|
|
47
|
-
margin-bottom: 0;
|
|
48
|
-
}
|
|
49
|
-
@media screen and (min-width: 768px) {
|
|
50
|
-
.colors__basic-group:last-child {
|
|
51
|
-
padding-left: 24px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.colors__list,
|
|
55
|
-
.colors__group {
|
|
56
|
-
display: -webkit-box;
|
|
57
|
-
display: -ms-flexbox;
|
|
58
|
-
display: flex;
|
|
59
|
-
-webkit-box-pack: justify;
|
|
60
|
-
-ms-flex-pack: justify;
|
|
61
|
-
justify-content: space-between;
|
|
62
|
-
}
|
|
63
|
-
@media screen and (max-width: 1023px) {
|
|
64
|
-
.colors__list,
|
|
65
|
-
.colors__group {
|
|
66
|
-
-ms-flex-wrap: wrap;
|
|
67
|
-
flex-wrap: wrap;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
.colors__list {
|
|
71
|
-
-webkit-box-pack: space-evenly;
|
|
72
|
-
-ms-flex-pack: space-evenly;
|
|
73
|
-
justify-content: space-evenly;
|
|
74
|
-
padding-bottom: 12px;
|
|
75
|
-
}
|
|
76
|
-
@media screen and (max-width: 1023px) {
|
|
77
|
-
.colors__list {
|
|
78
|
-
-webkit-box-ordinal-group: 3;
|
|
79
|
-
-ms-flex-order: 2;
|
|
80
|
-
order: 2;
|
|
81
|
-
padding-bottom: 0;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
.colors__list_soft {
|
|
85
|
-
-ms-flex-wrap: wrap;
|
|
86
|
-
flex-wrap: wrap;
|
|
87
|
-
}
|
|
88
|
-
.colors__description {
|
|
89
|
-
position: relative;
|
|
90
|
-
padding-top: 11px;
|
|
91
|
-
color: var(--spbSky3);
|
|
92
|
-
font-size: 12px;
|
|
93
|
-
line-height: 18px;
|
|
94
|
-
text-align: center;
|
|
95
|
-
-webkit-transition: color 0.3s;
|
|
96
|
-
transition: color 0.3s;
|
|
97
|
-
}
|
|
98
|
-
@media screen and (max-width: 1023px) {
|
|
99
|
-
.colors__description {
|
|
100
|
-
-webkit-box-ordinal-group: 1;
|
|
101
|
-
-ms-flex-order: 0;
|
|
102
|
-
order: 0;
|
|
103
|
-
margin-bottom: 18px;
|
|
104
|
-
padding-top: 0;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
.colors__container {
|
|
108
|
-
max-width: 978px;
|
|
109
|
-
}
|
|
110
|
-
.colors__line {
|
|
111
|
-
display: -webkit-box;
|
|
112
|
-
display: -ms-flexbox;
|
|
113
|
-
display: flex;
|
|
114
|
-
-webkit-box-orient: vertical;
|
|
115
|
-
-webkit-box-direction: normal;
|
|
116
|
-
-ms-flex-direction: column;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
margin-bottom: 18px;
|
|
119
|
-
}
|
|
120
|
-
@media screen and (min-width: 768px) {
|
|
121
|
-
.colors__line {
|
|
122
|
-
margin-bottom: 48px;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
.colors__item {
|
|
126
|
-
margin-bottom: 18px;
|
|
127
|
-
}
|
|
128
|
-
@media screen and (min-width: 1024px) {
|
|
129
|
-
.colors__item {
|
|
130
|
-
margin-right: 24px;
|
|
131
|
-
margin-bottom: 0;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
.colors__item:last-child {
|
|
135
|
-
margin-right: 0;
|
|
136
|
-
}
|
|
137
|
-
.colors__item_soft {
|
|
138
|
-
display: -webkit-box;
|
|
139
|
-
display: -ms-flexbox;
|
|
140
|
-
display: flex;
|
|
141
|
-
-webkit-box-pack: center;
|
|
142
|
-
-ms-flex-pack: center;
|
|
143
|
-
justify-content: center;
|
|
144
|
-
margin-right: 0;
|
|
145
|
-
}
|
|
146
|
-
@media screen and (min-width: 1024px) {
|
|
147
|
-
.colors__item_soft {
|
|
148
|
-
width: 14.28571429%;
|
|
149
|
-
min-width: 120px;
|
|
150
|
-
margin-bottom: 36px;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
.colors__diagram {
|
|
154
|
-
max-width: 259px;
|
|
155
|
-
margin: 0 auto 24px;
|
|
156
|
-
}
|
|
157
|
-
@media screen and (min-width: 1024px) {
|
|
158
|
-
.colors__diagram {
|
|
159
|
-
width: 259px;
|
|
160
|
-
min-width: 259px;
|
|
161
|
-
height: 259px;
|
|
162
|
-
margin: 0 40px 0 0;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
.colors__soft {
|
|
166
|
-
padding: 24px 16px;
|
|
167
|
-
}
|
|
168
|
-
@media screen and (min-width: 1024px) {
|
|
169
|
-
.colors__soft {
|
|
170
|
-
padding: 36px 32px 30px;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
.colors__soft-list {
|
|
174
|
-
display: -webkit-box;
|
|
175
|
-
display: -ms-flexbox;
|
|
176
|
-
display: flex;
|
|
177
|
-
-webkit-box-orient: vertical;
|
|
178
|
-
-webkit-box-direction: normal;
|
|
179
|
-
-ms-flex-direction: column;
|
|
180
|
-
flex-direction: column;
|
|
181
|
-
-webkit-box-flex: 1;
|
|
182
|
-
-ms-flex-positive: 1;
|
|
183
|
-
flex-grow: 1;
|
|
184
|
-
}
|
|
185
|
-
.colors__underline {
|
|
186
|
-
position: relative;
|
|
187
|
-
width: 100%;
|
|
188
|
-
height: 8px;
|
|
189
|
-
}
|
|
190
|
-
@media screen and (max-width: 1023px) {
|
|
191
|
-
.colors__underline {
|
|
192
|
-
display: none;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
.colors__pointer {
|
|
196
|
-
position: absolute;
|
|
197
|
-
top: 50%;
|
|
198
|
-
display: block;
|
|
199
|
-
width: 100%;
|
|
200
|
-
height: 1px;
|
|
201
|
-
background-color: var(--spbSky2);
|
|
202
|
-
-webkit-transform: translateY(-50%);
|
|
203
|
-
transform: translateY(-50%);
|
|
204
|
-
}
|
|
205
|
-
.colors__underline:after,
|
|
206
|
-
.colors__underline:before,
|
|
207
|
-
.colors__pointer:after {
|
|
208
|
-
content: '';
|
|
209
|
-
position: absolute;
|
|
210
|
-
width: 1px;
|
|
211
|
-
height: 4px;
|
|
212
|
-
background-color: var(--spbSky2);
|
|
213
|
-
}
|
|
214
|
-
.colors__underline:after,
|
|
215
|
-
.colors__underline:before {
|
|
216
|
-
top: 0;
|
|
217
|
-
border-top-left-radius: 8px;
|
|
218
|
-
border-top-right-radius: 8px;
|
|
219
|
-
}
|
|
220
|
-
.colors__underline:before {
|
|
221
|
-
left: 0;
|
|
222
|
-
}
|
|
223
|
-
.colors__underline:after {
|
|
224
|
-
right: 0;
|
|
225
|
-
}
|
|
226
|
-
.colors__pointer:after {
|
|
227
|
-
top: 100%;
|
|
228
|
-
left: 50%;
|
|
229
|
-
border-bottom-right-radius: 8px;
|
|
230
|
-
border-bottom-left-radius: 8px;
|
|
231
|
-
-webkit-transform: translateX(-50%);
|
|
232
|
-
transform: translateX(-50%);
|
|
233
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.colors__inner{background-color:var(--spbSky0);margin:0 -80px;padding:56px 80px 40px;-webkit-transition:background-color .3s;transition:background-color .3s}@media screen and (max-width:1120px){.colors__inner{margin:0 -24px;padding:24px}}@media screen and (max-width:350px){.colors__inner{margin:0 -15px;padding:15px}}.colors__title{margin-bottom:8px}.colors__title-note{margin-bottom:60px}.colors__group-title{margin-bottom:24px}@media screen and (min-width:768px){.colors__group-title{margin-bottom:36px}}@media screen and (max-width:1023px){.colors__basic-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:24px}}.colors__basic-group:last-child{margin-bottom:0}@media screen and (min-width:768px){.colors__basic-group:last-child{padding-left:24px}}.colors__group,.colors__list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}@media screen and (max-width:1023px){.colors__group,.colors__list{-ms-flex-wrap:wrap;flex-wrap:wrap}}.colors__list{-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly;padding-bottom:12px}@media screen and (max-width:1023px){.colors__list{-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2;padding-bottom:0}}.colors__list_soft{-ms-flex-wrap:wrap;flex-wrap:wrap}.colors__description{color:var(--spbSky3);font-size:12px;line-height:18px;padding-top:11px;position:relative;text-align:center;-webkit-transition:color .3s;transition:color .3s}@media screen and (max-width:1023px){.colors__description{-webkit-box-ordinal-group:1;-ms-flex-order:0;margin-bottom:18px;order:0;padding-top:0}}.colors__container{max-width:978px}.colors__line{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:18px}@media screen and (min-width:768px){.colors__line{margin-bottom:48px}}.colors__item{margin-bottom:18px}@media screen and (min-width:1024px){.colors__item{margin-bottom:0;margin-right:24px}}.colors__item:last-child{margin-right:0}.colors__item_soft{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:0}@media screen and (min-width:1024px){.colors__item_soft{margin-bottom:36px;min-width:120px;width:100%/7}}.colors__diagram{margin:0 auto 24px;max-width:259px}@media screen and (min-width:1024px){.colors__diagram{height:259px;margin:0 40px 0 0;min-width:259px;width:259px}}.colors__soft{padding:24px 16px}@media screen and (min-width:1024px){.colors__soft{padding:36px 32px 30px}}.colors__soft-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.colors__underline{height:8px;position:relative;width:100%}@media screen and (max-width:1023px){.colors__underline{display:none}}.colors__pointer{background-color:var(--spbSky2);display:block;height:1px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:100%}.colors__pointer:after,.colors__underline:after,.colors__underline:before{background-color:var(--spbSky2);content:"";height:4px;position:absolute;width:1px}.colors__underline:after,.colors__underline:before{border-top-left-radius:8px;border-top-right-radius:8px;top:0}.colors__underline:before{left:0}.colors__underline:after{right:0}.colors__pointer:after{border-bottom-left-radius:8px;border-bottom-right-radius:8px;left:50%;top:100%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}
|
package/dist/es/colors/Colors.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import "core-js/modules/es.array.includes.js";
|
|
4
|
-
import "core-js/modules/es.array.map.js";
|
|
5
3
|
import "core-js/modules/es.symbol.js";
|
|
6
4
|
import "core-js/modules/es.symbol.description.js";
|
|
5
|
+
import "core-js/modules/es.array.includes.js";
|
|
6
|
+
import "core-js/modules/es.array.map.js";
|
|
7
7
|
import "core-js/modules/es.function.name.js";
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { cnCreate } from '@megafon/ui-helpers';
|
|
@@ -15,7 +15,6 @@ import Tile from "../components/Tile/Tile";
|
|
|
15
15
|
import ColorItem from "./ColorItem/ColorItem";
|
|
16
16
|
import colorsData from "./colorsData";
|
|
17
17
|
import "./Colors.css";
|
|
18
|
-
|
|
19
18
|
var DiagramDark = function DiagramDark(props) {
|
|
20
19
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
20
|
viewBox: "0 0 260 261",
|
|
@@ -111,7 +110,6 @@ var DiagramDark = function DiagramDark(props) {
|
|
|
111
110
|
fill: "#fff"
|
|
112
111
|
}));
|
|
113
112
|
};
|
|
114
|
-
|
|
115
113
|
var DiagramLight = function DiagramLight(props) {
|
|
116
114
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
117
115
|
viewBox: "0 0 259 259",
|
|
@@ -194,58 +192,46 @@ var DiagramLight = function DiagramLight(props) {
|
|
|
194
192
|
fill: "#fff"
|
|
195
193
|
}));
|
|
196
194
|
};
|
|
197
|
-
|
|
198
195
|
var basic = colorsData.basic,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
secondary = colorsData.secondary,
|
|
197
|
+
system = colorsData.system,
|
|
198
|
+
gradientColors = colorsData.gradientColors,
|
|
199
|
+
staticColors = colorsData.staticColors,
|
|
200
|
+
staticOpacity = colorsData.staticOpacity,
|
|
201
|
+
soft = colorsData.soft;
|
|
202
|
+
// TODO: refactor this
|
|
206
203
|
var getThemeFromLocalStorage = function getThemeFromLocalStorage() {
|
|
207
204
|
var theme = 'light';
|
|
208
|
-
|
|
209
205
|
if (typeof window !== 'undefined') {
|
|
210
206
|
var localStorageTheme = String(window.localStorage.getItem('theme'));
|
|
211
|
-
|
|
212
207
|
if (['light', 'dark'].includes(localStorageTheme)) {
|
|
213
208
|
theme = localStorageTheme;
|
|
214
209
|
}
|
|
215
210
|
}
|
|
216
|
-
|
|
217
211
|
return theme;
|
|
218
212
|
};
|
|
219
|
-
|
|
220
213
|
var cn = cnCreate('colors');
|
|
221
|
-
|
|
222
214
|
var Colors = function Colors() {
|
|
223
215
|
var _React$useState = React.useState(getThemeFromLocalStorage()),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
216
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
217
|
+
currentTheme = _React$useState2[0],
|
|
218
|
+
setCurrentTheme = _React$useState2[1];
|
|
228
219
|
var _React$useState3 = React.useState(false),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
220
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
221
|
+
setLoad = _React$useState4[1];
|
|
232
222
|
React.useEffect(function () {
|
|
233
223
|
function load() {
|
|
234
224
|
setLoad(true);
|
|
235
225
|
document.removeEventListener('css-var-load', load);
|
|
236
226
|
}
|
|
237
|
-
|
|
238
227
|
document.addEventListener('css-var-load', load);
|
|
239
228
|
}, []);
|
|
240
|
-
|
|
241
229
|
var getCurrentColorValue = function getCurrentColorValue(code) {
|
|
242
230
|
return typeof document !== 'undefined' ? document.documentElement.style.getPropertyValue("--".concat(code)) : '';
|
|
243
231
|
};
|
|
244
|
-
|
|
245
232
|
React.useEffect(function () {
|
|
246
233
|
// theme switcher from src/gatsby-theme-docz/components/SideBar/index.tsx
|
|
247
234
|
var themeSwitcher = document.querySelector('[data-current-theme]');
|
|
248
|
-
|
|
249
235
|
if (themeSwitcher) {
|
|
250
236
|
var themeSwitcherObserver = new MutationObserver(function (mutationsList) {
|
|
251
237
|
var data = mutationsList[0];
|
|
@@ -260,10 +246,8 @@ var Colors = function Colors() {
|
|
|
260
246
|
return themeSwitcherObserver.disconnect();
|
|
261
247
|
};
|
|
262
248
|
}
|
|
263
|
-
|
|
264
249
|
return undefined;
|
|
265
250
|
}, []);
|
|
266
|
-
|
|
267
251
|
var renderUnderline = function renderUnderline() {
|
|
268
252
|
return /*#__PURE__*/React.createElement("div", {
|
|
269
253
|
className: cn('underline')
|
|
@@ -271,11 +255,10 @@ var Colors = function Colors() {
|
|
|
271
255
|
className: cn('pointer')
|
|
272
256
|
}));
|
|
273
257
|
};
|
|
274
|
-
|
|
275
258
|
var renderBasicColors = function renderBasicColors() {
|
|
276
259
|
var title = basic.title,
|
|
277
|
-
|
|
278
|
-
|
|
260
|
+
_basic$colorsGroup = basic.colorsGroup,
|
|
261
|
+
colorsGroup = _basic$colorsGroup === void 0 ? [] : _basic$colorsGroup;
|
|
279
262
|
return /*#__PURE__*/React.createElement("div", {
|
|
280
263
|
className: cn('line')
|
|
281
264
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -283,7 +266,7 @@ var Colors = function Colors() {
|
|
|
283
266
|
className: cn('group-title')
|
|
284
267
|
}, title), /*#__PURE__*/React.createElement(Grid, null, colorsGroup.map(function (_ref, index) {
|
|
285
268
|
var description = _ref.description,
|
|
286
|
-
|
|
269
|
+
colors = _ref.colors;
|
|
287
270
|
return /*#__PURE__*/React.createElement(GridColumn, {
|
|
288
271
|
key: description,
|
|
289
272
|
className: cn('basic-group'),
|
|
@@ -293,9 +276,9 @@ var Colors = function Colors() {
|
|
|
293
276
|
className: cn('list')
|
|
294
277
|
}, colors.map(function (_ref2) {
|
|
295
278
|
var name = _ref2.name,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
279
|
+
code = _ref2.code,
|
|
280
|
+
_ref2$border = _ref2.border,
|
|
281
|
+
border = _ref2$border === void 0 ? '' : _ref2$border;
|
|
299
282
|
return /*#__PURE__*/React.createElement(ColorItem, {
|
|
300
283
|
className: cn('item'),
|
|
301
284
|
colorName: name,
|
|
@@ -308,10 +291,8 @@ var Colors = function Colors() {
|
|
|
308
291
|
}, description));
|
|
309
292
|
})));
|
|
310
293
|
};
|
|
311
|
-
|
|
312
294
|
var renderColorBlock = function renderColorBlock(items) {
|
|
313
295
|
var _a, _b;
|
|
314
|
-
|
|
315
296
|
return /*#__PURE__*/React.createElement("div", {
|
|
316
297
|
className: cn('line')
|
|
317
298
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -321,11 +302,11 @@ var Colors = function Colors() {
|
|
|
321
302
|
className: cn('list')
|
|
322
303
|
}, (_a = items.colorsList) === null || _a === void 0 ? void 0 : _a.colors.map(function (_ref3) {
|
|
323
304
|
var name = _ref3.name,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
305
|
+
code = _ref3.code,
|
|
306
|
+
_ref3$gradient = _ref3.gradient,
|
|
307
|
+
gradient = _ref3$gradient === void 0 ? '' : _ref3$gradient,
|
|
308
|
+
_ref3$border = _ref3.border,
|
|
309
|
+
border = _ref3$border === void 0 ? '' : _ref3$border;
|
|
329
310
|
return /*#__PURE__*/React.createElement(ColorItem, {
|
|
330
311
|
className: cn('item'),
|
|
331
312
|
colorName: name,
|
|
@@ -338,13 +319,12 @@ var Colors = function Colors() {
|
|
|
338
319
|
className: cn('description')
|
|
339
320
|
}, (_b = items.colorsList) === null || _b === void 0 ? void 0 : _b.description));
|
|
340
321
|
};
|
|
341
|
-
|
|
342
322
|
var renderSoftColors = function renderSoftColors() {
|
|
343
|
-
var _soft$colorsList = soft.colorsList
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
323
|
+
var _soft$colorsList = soft.colorsList,
|
|
324
|
+
_soft$colorsList2 = _soft$colorsList === void 0 ? {} : _soft$colorsList,
|
|
325
|
+
_soft$colorsList2$col = _soft$colorsList2.colors,
|
|
326
|
+
colors = _soft$colorsList2$col === void 0 ? [] : _soft$colorsList2$col,
|
|
327
|
+
description = _soft$colorsList2.description;
|
|
348
328
|
return /*#__PURE__*/React.createElement("div", {
|
|
349
329
|
className: cn('soft-list')
|
|
350
330
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -353,9 +333,9 @@ var Colors = function Colors() {
|
|
|
353
333
|
})
|
|
354
334
|
}, colors.map(function (_ref4) {
|
|
355
335
|
var name = _ref4.name,
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
336
|
+
code = _ref4.code,
|
|
337
|
+
_ref4$parentColor = _ref4.parentColor,
|
|
338
|
+
parentColor = _ref4$parentColor === void 0 ? '' : _ref4$parentColor;
|
|
359
339
|
return /*#__PURE__*/React.createElement(ColorItem, {
|
|
360
340
|
className: cn('item', {
|
|
361
341
|
soft: true
|
|
@@ -369,7 +349,6 @@ var Colors = function Colors() {
|
|
|
369
349
|
className: cn('description')
|
|
370
350
|
}, description));
|
|
371
351
|
};
|
|
372
|
-
|
|
373
352
|
return /*#__PURE__*/React.createElement("div", {
|
|
374
353
|
className: cn()
|
|
375
354
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -414,5 +393,4 @@ var Colors = function Colors() {
|
|
|
414
393
|
className: cn('diagram')
|
|
415
394
|
}, currentTheme === 'light' && /*#__PURE__*/React.createElement(DiagramLight, null), currentTheme === 'dark' && /*#__PURE__*/React.createElement(DiagramDark, null)), renderSoftColors()))));
|
|
416
395
|
};
|
|
417
|
-
|
|
418
396
|
export default Colors;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
type ColorType = {
|
|
2
2
|
name: string;
|
|
3
3
|
code: string;
|
|
4
4
|
border?: string;
|
|
5
5
|
parentColor?: string;
|
|
6
6
|
gradient?: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ColorsListType = {
|
|
9
9
|
description: string;
|
|
10
10
|
colors: ColorType[];
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type ColorsItemType = {
|
|
13
13
|
title: string;
|
|
14
14
|
colorsList?: ColorsListType;
|
|
15
15
|
colorsGroup?: ColorsListType[];
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type ColorsType = {
|
|
18
18
|
[key: string]: ColorsItemType;
|
|
19
19
|
};
|
|
20
20
|
declare const colors: ColorsType;
|
|
@@ -1,89 +1 @@
|
|
|
1
|
-
.mfui-accordion {
|
|
2
|
-
border-radius: 12px;
|
|
3
|
-
background: var(--spbSky0);
|
|
4
|
-
}
|
|
5
|
-
.mfui-accordion + .mfui-accordion {
|
|
6
|
-
margin-top: 8px;
|
|
7
|
-
}
|
|
8
|
-
@media screen and (min-width: 768px) {
|
|
9
|
-
.mfui-accordion + .mfui-accordion {
|
|
10
|
-
margin-top: 12px;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
.mfui-accordion__title-wrap {
|
|
14
|
-
position: relative;
|
|
15
|
-
padding: 16px 44px 16px 16px;
|
|
16
|
-
border-radius: 12px;
|
|
17
|
-
outline: none;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
-webkit-transition: background-color 0.3s;
|
|
20
|
-
transition: background-color 0.3s;
|
|
21
|
-
}
|
|
22
|
-
@media screen and (min-width: 768px) {
|
|
23
|
-
.mfui-accordion__title-wrap {
|
|
24
|
-
padding: 24px 56px 24px 24px;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
.mfui-accordion__title-wrap:hover {
|
|
28
|
-
background-color: var(--spbSky1);
|
|
29
|
-
}
|
|
30
|
-
@media screen and (max-width: 1023px) {
|
|
31
|
-
.mfui-accordion__title-wrap:focus {
|
|
32
|
-
background-color: inherit;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
.mfui-accordion__icon-box {
|
|
36
|
-
position: absolute;
|
|
37
|
-
top: 50%;
|
|
38
|
-
right: 20px;
|
|
39
|
-
display: -webkit-box;
|
|
40
|
-
display: -ms-flexbox;
|
|
41
|
-
display: flex;
|
|
42
|
-
-webkit-box-align: center;
|
|
43
|
-
-ms-flex-align: center;
|
|
44
|
-
align-items: center;
|
|
45
|
-
-webkit-box-pack: center;
|
|
46
|
-
-ms-flex-pack: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
width: 24px;
|
|
49
|
-
height: 24px;
|
|
50
|
-
border-radius: 50%;
|
|
51
|
-
background-color: var(--stcWhite);
|
|
52
|
-
-webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
53
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
54
|
-
-webkit-transform: translateY(-50%);
|
|
55
|
-
transform: translateY(-50%);
|
|
56
|
-
}
|
|
57
|
-
@media screen and (min-width: 768px) {
|
|
58
|
-
.mfui-accordion__icon-box {
|
|
59
|
-
right: 24px;
|
|
60
|
-
width: 32px;
|
|
61
|
-
height: 32px;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
.mfui-accordion__icon {
|
|
65
|
-
width: 20px;
|
|
66
|
-
height: 20px;
|
|
67
|
-
-webkit-transition: -webkit-transform 0.6s;
|
|
68
|
-
transition: -webkit-transform 0.6s;
|
|
69
|
-
transition: transform 0.6s;
|
|
70
|
-
transition: transform 0.6s, -webkit-transform 0.6s;
|
|
71
|
-
}
|
|
72
|
-
@media screen and (min-width: 768px) {
|
|
73
|
-
.mfui-accordion__icon {
|
|
74
|
-
width: 32px;
|
|
75
|
-
height: 32px;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
.mfui-accordion__content-inner {
|
|
79
|
-
padding: 4px 20px 20px 16px;
|
|
80
|
-
}
|
|
81
|
-
@media screen and (min-width: 768px) {
|
|
82
|
-
.mfui-accordion__content-inner {
|
|
83
|
-
padding: 4px 24px 20px;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
.mfui-accordion_opened .mfui-accordion__icon {
|
|
87
|
-
-webkit-transform: rotate(180deg);
|
|
88
|
-
transform: rotate(180deg);
|
|
89
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-accordion{background:var(--spbSky0);border-radius:12px}.mfui-accordion+.mfui-accordion{margin-top:8px}@media screen and (min-width:768px){.mfui-accordion+.mfui-accordion{margin-top:12px}}.mfui-accordion__title-wrap{border-radius:12px;cursor:pointer;outline:none;padding:16px 44px 16px 16px;position:relative;-webkit-transition:background-color .3s;transition:background-color .3s}@media screen and (min-width:768px){.mfui-accordion__title-wrap{padding:24px 56px 24px 24px}}.mfui-accordion__title-wrap:hover{background-color:var(--spbSky1)}@media screen and (max-width:1023px){.mfui-accordion__title-wrap:focus{background-color:inherit}}.mfui-accordion__icon-box{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;right:20px;top:50%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;background-color:var(--stcWhite);border-radius:50%;-webkit-box-shadow:0 4px 12px rgba(0,0,0,.08);box-shadow:0 4px 12px rgba(0,0,0,.08);height:24px;justify-content:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:24px}@media screen and (min-width:768px){.mfui-accordion__icon-box{height:32px;right:24px;width:32px}}.mfui-accordion__icon{height:20px;-webkit-transition:-webkit-transform .6s;transition:-webkit-transform .6s;transition:transform .6s;transition:transform .6s,-webkit-transform .6s;width:20px}@media screen and (min-width:768px){.mfui-accordion__icon{height:32px;width:32px}}.mfui-accordion__content-inner{padding:4px 20px 20px 16px}@media screen and (min-width:768px){.mfui-accordion__content-inner{padding:4px 24px 20px}}.mfui-accordion_opened .mfui-accordion__icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IHeaderProps } from '../Header/Header';
|
|
3
|
-
import './Accordion.
|
|
3
|
+
import './Accordion.scss';
|
|
4
4
|
export interface IAccordionProps {
|
|
5
5
|
/** Ссылка на корневой элемент */
|
|
6
6
|
rootRef?: React.Ref<HTMLDivElement>;
|
|
@@ -36,6 +36,7 @@ export interface IAccordionProps {
|
|
|
36
36
|
arrowUp?: Record<string, string>;
|
|
37
37
|
arrowDown?: Record<string, string>;
|
|
38
38
|
};
|
|
39
|
+
children?: React.ReactNode;
|
|
39
40
|
/** Обработчик клика */
|
|
40
41
|
onClickAccordion?: (isOpened: boolean) => void;
|
|
41
42
|
}
|