@megafon/ui-core 6.2.1 → 7.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/colors/ColorItem/ColorItem.css +1 -45
- package/dist/es/colors/ColorItem/ColorItem.d.ts +2 -2
- package/dist/es/colors/ColorItem/ColorItem.js +5 -7
- package/dist/es/colors/Colors.css +1 -233
- package/dist/es/colors/Colors.d.ts +1 -1
- package/dist/es/colors/Colors.js +33 -55
- package/dist/es/colors/colorsData.d.ts +4 -4
- package/dist/es/components/Accordion/Accordion.css +1 -89
- package/dist/es/components/Accordion/Accordion.d.ts +2 -1
- package/dist/es/components/Accordion/Accordion.js +22 -65
- package/dist/es/components/Avatar/Avatar.css +1 -52
- package/dist/es/components/Avatar/Avatar.d.ts +1 -1
- package/dist/es/components/Avatar/Avatar.js +9 -27
- package/dist/es/components/Badges/CounterBadge/CounterBadge.css +1 -0
- package/dist/{lib/components/Badges/components → es/components/Badges}/CounterBadge/CounterBadge.d.ts +2 -2
- package/dist/es/components/Badges/{components/CounterBadge → CounterBadge}/CounterBadge.js +10 -28
- package/dist/es/components/Badges/NotificationBadge/NotificationBadge.css +1 -0
- package/dist/{lib/components/Badges/components → es/components/Badges}/NotificationBadge/NotificationBadge.d.ts +3 -3
- package/dist/es/components/Badges/{components/NotificationBadge → NotificationBadge}/NotificationBadge.js +8 -22
- package/dist/es/components/Badges/PriceBadge/PriceBadge.css +1 -0
- package/dist/es/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.d.ts +4 -4
- package/dist/es/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.js +11 -54
- package/dist/es/components/Badges/PromoBadge/PromoBadge.css +1 -0
- package/dist/es/components/Badges/{components/PromoBadge → PromoBadge}/PromoBadge.d.ts +4 -4
- package/dist/es/components/Badges/{components/PromoBadge → PromoBadge}/PromoBadge.js +9 -23
- package/dist/es/components/Badges/TimerBadge/TimerBadge.css +1 -0
- package/dist/{lib/components/Badges/components → es/components/Badges}/TimerBadge/TimerBadge.d.ts +2 -2
- package/dist/es/components/Badges/{components/TimerBadge → TimerBadge}/TimerBadge.js +22 -46
- package/dist/es/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.js +5 -32
- package/dist/es/components/Banner/Banner.css +1 -195
- package/dist/es/components/Banner/Banner.d.ts +5 -4
- package/dist/es/components/Banner/Banner.js +82 -130
- package/dist/es/components/Banner/BannerDot.css +1 -69
- package/dist/es/components/Banner/BannerDot.d.ts +1 -1
- package/dist/es/components/Banner/BannerDot.js +6 -22
- package/dist/es/components/Banner/slidesSettings.d.ts +4 -2
- package/dist/es/components/Banner/slidesSettings.js +3 -6
- package/dist/es/components/Button/Button.css +1 -814
- package/dist/es/components/Button/Button.d.ts +7 -6
- package/dist/es/components/Button/Button.js +44 -104
- package/dist/es/components/Calendar/Calendar.css +1 -24
- package/dist/es/components/Calendar/Calendar.d.ts +4 -4
- package/dist/es/components/Calendar/Calendar.js +75 -144
- package/dist/es/components/Calendar/components/_Day/Day.css +1 -0
- package/dist/es/components/Calendar/components/{Day → _Day}/Day.d.ts +4 -4
- package/dist/es/components/Calendar/components/{Day → _Day}/Day.js +21 -53
- package/dist/es/components/Calendar/components/_Month/Month.css +1 -0
- package/dist/es/components/Calendar/components/{Month → _Month}/Month.d.ts +3 -2
- package/dist/es/components/Calendar/components/{Month → _Month}/Month.js +11 -36
- package/dist/es/components/Caption/Caption.css +1 -48
- package/dist/es/components/Caption/Caption.d.ts +4 -2
- package/dist/es/components/Caption/Caption.js +11 -25
- package/dist/es/components/Carousel/Carousel.css +1 -215
- package/dist/es/components/Carousel/Carousel.d.ts +11 -10
- package/dist/es/components/Carousel/Carousel.js +135 -162
- package/dist/es/components/Carousel/checkBreakpointsPropTypes.d.ts +1 -1
- package/dist/es/components/Carousel/checkBreakpointsPropTypes.js +1 -4
- package/dist/es/components/Carousel/useGradient.d.ts +1 -1
- package/dist/es/components/Carousel/useGradient.js +9 -13
- package/dist/es/components/Checkbox/Checkbox.css +1 -150
- package/dist/es/components/Checkbox/Checkbox.d.ts +4 -4
- package/dist/es/components/Checkbox/Checkbox.js +21 -50
- package/dist/es/components/Chips/Chip.css +1 -132
- package/dist/es/components/Chips/Chip.d.ts +6 -26
- package/dist/es/components/Chips/Chip.js +17 -42
- package/dist/es/components/Chips/Chips.css +1 -19
- package/dist/es/components/Chips/Chips.d.ts +2 -2
- package/dist/es/components/Chips/Chips.js +32 -56
- package/dist/es/components/Chips/components/ChipsDropdown.css +1 -106
- package/dist/es/components/Chips/components/ChipsDropdown.d.ts +2 -2
- package/dist/es/components/Chips/components/ChipsDropdown.js +12 -27
- package/dist/es/components/ContentArea/ContentArea.css +1 -109
- package/dist/es/components/ContentArea/ContentArea.d.ts +5 -4
- package/dist/es/components/ContentArea/ContentArea.js +9 -28
- package/dist/es/components/ContentView/ContentView.css +1 -103
- package/dist/es/components/ContentView/ContentView.d.ts +3 -2
- package/dist/es/components/ContentView/ContentView.js +12 -46
- package/dist/es/components/Counter/Counter.css +1 -123
- package/dist/es/components/Counter/Counter.d.ts +1 -1
- package/dist/es/components/Counter/Counter.js +20 -55
- package/dist/es/components/Grid/Grid.css +1 -102
- package/dist/es/components/Grid/Grid.d.ts +1 -1
- package/dist/es/components/Grid/Grid.js +8 -24
- package/dist/es/components/Grid/GridColumn.css +1 -3102
- package/dist/es/components/Grid/GridColumn.d.ts +2 -2
- package/dist/es/components/Grid/GridColumn.js +33 -62
- package/dist/es/components/Header/Header.css +1 -122
- package/dist/es/components/Header/Header.d.ts +3 -1
- package/dist/es/components/Header/Header.js +13 -28
- package/dist/es/components/Link/Link.d.ts +2 -2
- package/dist/es/components/Link/Link.js +9 -25
- package/dist/es/components/List/List.css +1 -66
- package/dist/es/components/List/List.d.ts +2 -1
- package/dist/es/components/List/List.js +8 -18
- package/dist/es/components/List/ListItem.css +1 -6
- package/dist/es/components/List/ListItem.d.ts +2 -1
- package/dist/es/components/List/ListItem.js +1 -7
- package/dist/es/components/ListData/ListData.css +1 -162
- package/dist/es/components/ListData/ListData.d.ts +6 -34
- package/dist/es/components/ListData/ListData.js +22 -65
- package/dist/es/components/ListData/ListDataGroup.css +1 -15
- package/dist/es/components/ListData/ListDataGroup.d.ts +4 -4
- package/dist/es/components/ListData/ListDataGroup.js +29 -74
- package/dist/es/components/ListData/components/ListDataSortable.css +1 -79
- package/dist/es/components/ListData/components/ListDataSortable.d.ts +4 -4
- package/dist/es/components/ListData/components/ListDataSortable.js +21 -42
- package/dist/es/components/ListData/helpers.js +1 -8
- package/dist/es/components/Logo/Logo.css +1 -43
- package/dist/es/components/Logo/Logo.d.ts +1 -1
- package/dist/es/components/Logo/Logo.js +9 -25
- package/dist/es/components/Modal/Modal.css +1 -0
- package/dist/es/components/Modal/Modal.d.ts +106 -0
- package/dist/es/components/Modal/Modal.js +278 -0
- package/dist/es/components/Modal/_ModalContent/ModalContent.css +1 -0
- package/dist/es/components/Modal/_ModalContent/ModalContent.d.ts +8 -0
- package/dist/es/components/Modal/_ModalContent/ModalContent.js +168 -0
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.css +1 -0
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.d.ts +8 -0
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.js +32 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +1 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.d.ts +12 -0
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.js +114 -0
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +1 -0
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +8 -0
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +55 -0
- package/dist/es/components/Modal/mocks.d.ts +3 -0
- package/dist/es/components/Modal/mocks.js +79 -0
- package/dist/es/components/Modal/types.d.ts +27 -0
- package/dist/es/components/Modal/types.js +1 -0
- package/dist/es/components/Modal/utils/utils.d.ts +18 -0
- package/dist/es/components/Modal/utils/utils.js +66 -0
- package/dist/es/components/NavArrow/NavArrow.css +1 -63
- package/dist/es/components/NavArrow/NavArrow.d.ts +3 -3
- package/dist/es/components/NavArrow/NavArrow.js +8 -28
- package/dist/es/components/Notification/Notification.css +1 -350
- package/dist/es/components/Notification/Notification.d.ts +5 -4
- package/dist/es/components/Notification/Notification.js +61 -131
- package/dist/es/components/Pagination/Pagination.css +1 -5
- package/dist/es/components/Pagination/Pagination.d.ts +4 -3
- package/dist/es/components/Pagination/Pagination.js +7 -22
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +1 -62
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +5 -4
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +10 -26
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -10
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +3 -2
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -22
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +1 -17
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +3 -2
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +7 -23
- package/dist/es/components/Pagination/helpers.js +0 -3
- package/dist/es/components/Pagination/usePagination.d.ts +2 -1
- package/dist/es/components/Pagination/usePagination.js +6 -18
- package/dist/es/components/Paragraph/Paragraph.css +1 -43
- package/dist/es/components/Paragraph/Paragraph.d.ts +4 -2
- package/dist/es/components/Paragraph/Paragraph.js +9 -22
- package/dist/es/components/Preloader/Preloader.css +1 -224
- package/dist/es/components/Preloader/Preloader.d.ts +3 -3
- package/dist/es/components/Preloader/Preloader.js +16 -36
- package/dist/es/components/RadioButton/RadioButton.css +1 -120
- package/dist/es/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/es/components/RadioButton/RadioButton.js +18 -50
- package/dist/es/components/Row/Row.css +1 -238
- package/dist/es/components/Row/Row.d.ts +2 -2
- package/dist/es/components/Row/Row.js +23 -48
- package/dist/es/components/ScrollBar/ScrollBar.css +1 -0
- package/dist/es/components/ScrollBar/ScrollBar.d.ts +34 -0
- package/dist/es/components/ScrollBar/ScrollBar.js +86 -0
- package/dist/es/components/Search/Search.css +1 -453
- package/dist/es/components/Search/Search.d.ts +7 -8
- package/dist/es/components/Search/Search.js +54 -149
- package/dist/es/components/Select/Select.css +1 -389
- package/dist/es/components/Select/Select.d.ts +8 -84
- package/dist/es/components/Select/Select.js +52 -142
- package/dist/es/components/Select/reducer/selectReducer.d.ts +1 -1
- package/dist/es/components/Select/reducer/selectReducer.js +18 -32
- package/dist/es/components/Selector/Selector.css +1 -132
- package/dist/es/components/Selector/Selector.d.ts +1 -1
- package/dist/es/components/Selector/Selector.js +23 -50
- package/dist/es/components/Sliders/Slider/Slider.css +1 -128
- package/dist/es/components/Sliders/Slider/Slider.d.ts +1 -1
- package/dist/es/components/Sliders/Slider/Slider.js +25 -56
- package/dist/es/components/Sliders/SliderRange/SliderRange.css +1 -169
- package/dist/es/components/Sliders/SliderRange/SliderRange.d.ts +1 -1
- package/dist/es/components/Sliders/SliderRange/SliderRange.js +33 -80
- package/dist/es/components/Sliders/SliderRange/helpers.js +0 -2
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.css +1 -219
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.d.ts +1 -1
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.js +36 -85
- package/dist/es/components/Sliders/SliderRatio/helpers.js +1 -1
- package/dist/es/components/Sliders/SliderRatio/types.d.ts +1 -1
- package/dist/es/components/Sliders/SliderRatio/types.js +0 -1
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.css +1 -84
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.d.ts +2 -2
- package/dist/es/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.js +11 -35
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.css +1 -15
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.d.ts +2 -2
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.js +6 -20
- package/dist/es/components/Sliders/components/SliderScale/helpers.js +12 -16
- package/dist/es/components/Sliders/helpers.js +1 -5
- package/dist/es/components/Snackbar/Snackbar.css +1 -220
- package/dist/es/components/Snackbar/Snackbar.d.ts +3 -3
- package/dist/es/components/Snackbar/Snackbar.js +44 -82
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.css +1 -66
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.d.ts +3 -3
- package/dist/es/components/Snackbar/SnackbarTimer/SnackbarTimer.js +9 -17
- package/dist/es/components/Switcher/Switcher.css +1 -160
- package/dist/es/components/Switcher/Switcher.d.ts +2 -1
- package/dist/es/components/Switcher/Switcher.js +17 -39
- package/dist/es/components/Tabs/Tab.js +0 -14
- package/dist/es/components/Tabs/Tabs.css +1 -306
- package/dist/es/components/Tabs/Tabs.d.ts +6 -5
- package/dist/es/components/Tabs/Tabs.js +110 -166
- package/dist/es/components/TextField/TextField.css +1 -343
- package/dist/es/components/TextField/TextField.d.ts +3 -3
- package/dist/es/components/TextField/TextField.js +85 -193
- package/dist/es/components/TextField/utils/countGraphemes.js +10 -18
- package/dist/es/components/TextLink/TextLink.css +1 -50
- package/dist/es/components/TextLink/TextLink.d.ts +2 -2
- package/dist/es/components/TextLink/TextLink.js +14 -27
- package/dist/es/components/Tile/Tile.css +1 -43
- package/dist/es/components/Tile/Tile.d.ts +7 -5
- package/dist/es/components/Tile/Tile.js +16 -36
- package/dist/es/components/Tooltip/Tooltip.css +1 -335
- package/dist/es/components/Tooltip/Tooltip.d.ts +9 -8
- package/dist/es/components/Tooltip/Tooltip.js +58 -139
- package/dist/es/components/_Collapse/Collapse.css +1 -0
- package/dist/{lib/components/Collapse → es/components/_Collapse}/Collapse.d.ts +3 -3
- package/dist/es/components/{Collapse → _Collapse}/Collapse.js +25 -62
- package/dist/es/hooks/usePrevious.js +0 -2
- package/dist/es/hooks/useResolution.d.ts +1 -1
- package/dist/es/hooks/useResolution.js +5 -11
- package/dist/es/hooks/useSwipe.d.ts +1 -1
- package/dist/es/hooks/useSwipe.js +17 -44
- package/dist/es/index.d.ts +16 -9
- package/dist/es/index.js +17 -10
- package/dist/es/styles/base.css +1 -0
- package/dist/lib/colors/ColorItem/ColorItem.css +1 -45
- package/dist/lib/colors/ColorItem/ColorItem.d.ts +2 -2
- package/dist/lib/colors/ColorItem/ColorItem.js +9 -18
- package/dist/lib/colors/Colors.css +1 -233
- package/dist/lib/colors/Colors.d.ts +1 -1
- package/dist/lib/colors/Colors.js +38 -80
- package/dist/lib/colors/colorsData.d.ts +4 -4
- package/dist/lib/colors/colorsData.js +1 -2
- package/dist/lib/components/Accordion/Accordion.css +1 -89
- package/dist/lib/components/Accordion/Accordion.d.ts +2 -1
- package/dist/lib/components/Accordion/Accordion.js +27 -82
- package/dist/lib/components/Avatar/Avatar.css +1 -52
- package/dist/lib/components/Avatar/Avatar.d.ts +1 -1
- package/dist/lib/components/Avatar/Avatar.js +14 -42
- package/dist/lib/components/Badges/CounterBadge/CounterBadge.css +1 -0
- package/dist/{es/components/Badges/components → lib/components/Badges}/CounterBadge/CounterBadge.d.ts +2 -2
- package/dist/lib/components/Badges/CounterBadge/CounterBadge.js +52 -0
- package/dist/lib/components/Badges/NotificationBadge/NotificationBadge.css +1 -0
- package/dist/{es/components/Badges/components → lib/components/Badges}/NotificationBadge/NotificationBadge.d.ts +3 -3
- package/dist/lib/components/Badges/NotificationBadge/NotificationBadge.js +44 -0
- package/dist/lib/components/Badges/PriceBadge/PriceBadge.css +1 -0
- package/dist/lib/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.d.ts +4 -4
- package/dist/lib/components/Badges/{components/PriceBadge → PriceBadge}/PriceBadge.js +20 -76
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.css +1 -0
- package/dist/lib/components/Badges/{components/PromoBadge → PromoBadge}/PromoBadge.d.ts +4 -4
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.js +56 -0
- package/dist/lib/components/Badges/TimerBadge/TimerBadge.css +1 -0
- package/dist/{es/components/Badges/components → lib/components/Badges}/TimerBadge/TimerBadge.d.ts +2 -2
- package/dist/lib/components/Badges/TimerBadge/TimerBadge.js +96 -0
- package/dist/lib/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.js +12 -56
- package/dist/lib/components/Banner/Banner.css +1 -195
- package/dist/lib/components/Banner/Banner.d.ts +5 -4
- package/dist/lib/components/Banner/Banner.js +94 -164
- package/dist/lib/components/Banner/BannerDot.css +1 -69
- package/dist/lib/components/Banner/BannerDot.d.ts +1 -1
- package/dist/lib/components/Banner/BannerDot.js +11 -37
- package/dist/lib/components/Banner/slidesSettings.d.ts +4 -2
- package/dist/lib/components/Banner/slidesSettings.js +5 -12
- package/dist/lib/components/Button/Button.css +1 -814
- package/dist/lib/components/Button/Button.d.ts +7 -6
- package/dist/lib/components/Button/Button.js +71 -158
- package/dist/lib/components/Calendar/Calendar.css +1 -24
- package/dist/lib/components/Calendar/Calendar.d.ts +4 -4
- package/dist/lib/components/Calendar/Calendar.js +90 -191
- package/dist/lib/components/Calendar/components/_Day/Day.css +1 -0
- package/dist/lib/components/Calendar/components/{Day → _Day}/Day.d.ts +4 -4
- package/dist/lib/components/Calendar/components/{Day → _Day}/Day.js +29 -72
- package/dist/lib/components/Calendar/components/_Month/Month.css +1 -0
- package/dist/lib/components/Calendar/components/{Month → _Month}/Month.d.ts +3 -2
- package/dist/lib/components/Calendar/components/_Month/Month.js +97 -0
- package/dist/lib/components/Caption/Caption.css +1 -48
- package/dist/lib/components/Caption/Caption.d.ts +4 -2
- package/dist/lib/components/Caption/Caption.js +16 -41
- package/dist/lib/components/Carousel/Carousel.css +1 -215
- package/dist/lib/components/Carousel/Carousel.d.ts +11 -10
- package/dist/lib/components/Carousel/Carousel.js +223 -228
- package/dist/lib/components/Carousel/checkBreakpointsPropTypes.d.ts +1 -1
- package/dist/lib/components/Carousel/checkBreakpointsPropTypes.js +6 -18
- package/dist/lib/components/Carousel/useGradient.d.ts +1 -1
- package/dist/lib/components/Carousel/useGradient.js +12 -25
- package/dist/lib/components/Checkbox/Checkbox.css +1 -150
- package/dist/lib/components/Checkbox/Checkbox.d.ts +4 -4
- package/dist/lib/components/Checkbox/Checkbox.js +35 -75
- package/dist/lib/components/Chips/Chip.css +1 -132
- package/dist/lib/components/Chips/Chip.d.ts +6 -26
- package/dist/lib/components/Chips/Chip.js +36 -76
- package/dist/lib/components/Chips/Chips.css +1 -19
- package/dist/lib/components/Chips/Chips.d.ts +2 -2
- package/dist/lib/components/Chips/Chips.js +47 -92
- package/dist/lib/components/Chips/components/ChipsDropdown.css +1 -106
- package/dist/lib/components/Chips/components/ChipsDropdown.d.ts +2 -2
- package/dist/lib/components/Chips/components/ChipsDropdown.js +31 -67
- package/dist/lib/components/ContentArea/ContentArea.css +1 -109
- package/dist/lib/components/ContentArea/ContentArea.d.ts +5 -4
- package/dist/lib/components/ContentArea/ContentArea.js +14 -44
- package/dist/lib/components/ContentView/ContentView.css +1 -103
- package/dist/lib/components/ContentView/ContentView.d.ts +3 -2
- package/dist/lib/components/ContentView/ContentView.js +17 -63
- package/dist/lib/components/Counter/Counter.css +1 -123
- package/dist/lib/components/Counter/Counter.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.js +25 -71
- package/dist/lib/components/Grid/Grid.css +1 -102
- package/dist/lib/components/Grid/Grid.d.ts +1 -1
- package/dist/lib/components/Grid/Grid.js +13 -40
- package/dist/lib/components/Grid/GridColumn.css +1 -3102
- package/dist/lib/components/Grid/GridColumn.d.ts +2 -2
- package/dist/lib/components/Grid/GridColumn.js +38 -77
- package/dist/lib/components/Header/Header.css +1 -122
- package/dist/lib/components/Header/Header.d.ts +3 -1
- package/dist/lib/components/Header/Header.js +18 -43
- package/dist/lib/components/Link/Link.d.ts +2 -2
- package/dist/lib/components/Link/Link.js +15 -34
- package/dist/lib/components/List/List.css +1 -66
- package/dist/lib/components/List/List.d.ts +2 -1
- package/dist/lib/components/List/List.js +12 -30
- package/dist/lib/components/List/ListItem.css +1 -6
- package/dist/lib/components/List/ListItem.d.ts +2 -1
- package/dist/lib/components/List/ListItem.js +5 -19
- package/dist/lib/components/ListData/ListData.css +1 -162
- package/dist/lib/components/ListData/ListData.d.ts +6 -34
- package/dist/lib/components/ListData/ListData.js +51 -111
- package/dist/lib/components/ListData/ListDataGroup.css +1 -15
- package/dist/lib/components/ListData/ListDataGroup.d.ts +4 -4
- package/dist/lib/components/ListData/ListDataGroup.js +48 -118
- package/dist/lib/components/ListData/components/ListDataSortable.css +1 -79
- package/dist/lib/components/ListData/components/ListDataSortable.d.ts +4 -4
- package/dist/lib/components/ListData/components/ListDataSortable.js +35 -74
- package/dist/lib/components/ListData/helpers.js +7 -25
- package/dist/lib/components/Logo/Logo.css +1 -43
- package/dist/lib/components/Logo/Logo.d.ts +1 -1
- package/dist/lib/components/Logo/Logo.js +14 -41
- package/dist/lib/components/Modal/Modal.css +1 -0
- package/dist/lib/components/Modal/Modal.d.ts +106 -0
- package/dist/lib/components/Modal/Modal.js +287 -0
- package/dist/lib/components/Modal/_ModalContent/ModalContent.css +1 -0
- package/dist/lib/components/Modal/_ModalContent/ModalContent.d.ts +8 -0
- package/dist/lib/components/Modal/_ModalContent/ModalContent.js +177 -0
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.css +1 -0
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.d.ts +8 -0
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.js +41 -0
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +1 -0
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.d.ts +12 -0
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.js +123 -0
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +1 -0
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +8 -0
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +64 -0
- package/dist/lib/components/Modal/mocks.d.ts +3 -0
- package/dist/lib/components/Modal/mocks.js +85 -0
- package/dist/lib/components/Modal/types.d.ts +27 -0
- package/dist/lib/components/Modal/types.js +5 -0
- package/dist/lib/components/Modal/utils/utils.d.ts +18 -0
- package/dist/lib/components/Modal/utils/utils.js +72 -0
- package/dist/lib/components/NavArrow/NavArrow.css +1 -63
- package/dist/lib/components/NavArrow/NavArrow.d.ts +3 -3
- package/dist/lib/components/NavArrow/NavArrow.js +15 -47
- package/dist/lib/components/Notification/Notification.css +1 -350
- package/dist/lib/components/Notification/Notification.d.ts +5 -4
- package/dist/lib/components/Notification/Notification.js +114 -201
- package/dist/lib/components/Pagination/Pagination.css +1 -5
- package/dist/lib/components/Pagination/Pagination.d.ts +4 -3
- package/dist/lib/components/Pagination/Pagination.js +19 -51
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +1 -62
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +5 -4
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +12 -35
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -10
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +3 -2
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +7 -32
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.css +1 -17
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +3 -2
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +9 -32
- package/dist/lib/components/Pagination/helpers.js +1 -6
- package/dist/lib/components/Pagination/usePagination.d.ts +2 -1
- package/dist/lib/components/Pagination/usePagination.js +10 -36
- package/dist/lib/components/Paragraph/Paragraph.css +1 -43
- package/dist/lib/components/Paragraph/Paragraph.d.ts +4 -2
- package/dist/lib/components/Paragraph/Paragraph.js +14 -38
- package/dist/lib/components/Preloader/Preloader.css +1 -224
- package/dist/lib/components/Preloader/Preloader.d.ts +3 -3
- package/dist/lib/components/Preloader/Preloader.js +23 -58
- package/dist/lib/components/RadioButton/RadioButton.css +1 -120
- package/dist/lib/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/lib/components/RadioButton/RadioButton.js +23 -70
- package/dist/lib/components/Row/Row.css +1 -238
- package/dist/lib/components/Row/Row.d.ts +2 -2
- package/dist/lib/components/Row/Row.js +40 -76
- package/dist/lib/components/ScrollBar/ScrollBar.css +1 -0
- package/dist/lib/components/ScrollBar/ScrollBar.d.ts +34 -0
- package/dist/lib/components/ScrollBar/ScrollBar.js +94 -0
- package/dist/lib/components/Search/Search.css +1 -453
- package/dist/lib/components/Search/Search.d.ts +7 -8
- package/dist/lib/components/Search/Search.js +122 -262
- package/dist/lib/components/Select/Select.css +1 -389
- package/dist/lib/components/Select/Select.d.ts +8 -84
- package/dist/lib/components/Select/Select.js +70 -187
- package/dist/lib/components/Select/reducer/selectReducer.d.ts +1 -1
- package/dist/lib/components/Select/reducer/selectReducer.js +22 -42
- package/dist/lib/components/Selector/Selector.css +1 -132
- package/dist/lib/components/Selector/Selector.d.ts +1 -1
- package/dist/lib/components/Selector/Selector.js +28 -71
- package/dist/lib/components/Sliders/Slider/Slider.css +1 -128
- package/dist/lib/components/Sliders/Slider/Slider.d.ts +1 -1
- package/dist/lib/components/Sliders/Slider/Slider.js +30 -76
- package/dist/lib/components/Sliders/SliderRange/SliderRange.css +1 -169
- package/dist/lib/components/Sliders/SliderRange/SliderRange.d.ts +1 -1
- package/dist/lib/components/Sliders/SliderRange/SliderRange.js +38 -101
- package/dist/lib/components/Sliders/SliderRange/helpers.js +5 -18
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.css +1 -219
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.d.ts +1 -1
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.js +41 -112
- package/dist/lib/components/Sliders/SliderRatio/helpers.js +9 -28
- package/dist/lib/components/Sliders/SliderRatio/types.d.ts +1 -1
- package/dist/lib/components/Sliders/SliderRatio/types.js +0 -2
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.css +1 -84
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.d.ts +2 -2
- package/dist/lib/components/Sliders/components/SliderDisplayValue/SliderDisplayValue.js +18 -57
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.css +1 -15
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.d.ts +2 -2
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.js +12 -40
- package/dist/lib/components/Sliders/components/SliderScale/helpers.js +16 -34
- package/dist/lib/components/Sliders/helpers.js +5 -22
- package/dist/lib/components/Snackbar/Snackbar.css +1 -220
- package/dist/lib/components/Snackbar/Snackbar.d.ts +3 -3
- package/dist/lib/components/Snackbar/Snackbar.js +82 -139
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.css +1 -66
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.d.ts +3 -3
- package/dist/lib/components/Snackbar/SnackbarTimer/SnackbarTimer.js +18 -37
- package/dist/lib/components/Switcher/Switcher.css +1 -160
- package/dist/lib/components/Switcher/Switcher.d.ts +2 -1
- package/dist/lib/components/Switcher/Switcher.js +22 -53
- package/dist/lib/components/Tabs/Tab.js +5 -26
- package/dist/lib/components/Tabs/Tabs.css +1 -306
- package/dist/lib/components/Tabs/Tabs.d.ts +6 -5
- package/dist/lib/components/Tabs/Tabs.js +121 -200
- package/dist/lib/components/TextField/TextField.css +1 -343
- package/dist/lib/components/TextField/TextField.d.ts +3 -3
- package/dist/lib/components/TextField/TextField.js +119 -244
- package/dist/lib/components/TextField/utils/countGraphemes.js +11 -28
- package/dist/lib/components/TextLink/TextLink.css +1 -50
- package/dist/lib/components/TextLink/TextLink.d.ts +2 -2
- package/dist/lib/components/TextLink/TextLink.js +19 -42
- package/dist/lib/components/Tile/Tile.css +1 -43
- package/dist/lib/components/Tile/Tile.d.ts +7 -5
- package/dist/lib/components/Tile/Tile.js +27 -55
- package/dist/lib/components/Tooltip/Tooltip.css +1 -335
- package/dist/lib/components/Tooltip/Tooltip.d.ts +9 -8
- package/dist/lib/components/Tooltip/Tooltip.js +111 -219
- package/dist/lib/components/_Collapse/Collapse.css +1 -0
- package/dist/{es/components/Collapse → lib/components/_Collapse}/Collapse.d.ts +3 -3
- package/dist/lib/components/_Collapse/Collapse.js +95 -0
- package/dist/lib/constants/throttleTime.js +2 -3
- package/dist/lib/hooks/usePrevious.js +4 -11
- package/dist/lib/hooks/useResolution.d.ts +1 -1
- package/dist/lib/hooks/useResolution.js +10 -24
- package/dist/lib/hooks/useSwipe.d.ts +1 -1
- package/dist/lib/hooks/useSwipe.js +22 -64
- package/dist/lib/index.d.ts +16 -9
- package/dist/lib/index.js +83 -102
- package/dist/lib/styles/base.css +1 -0
- package/package.json +106 -101
- package/styles/base.scss +150 -0
- package/styles/colors.css +53 -0
- package/CHANGELOG.md +0 -4062
- package/dist/es/components/Avatar/doc/i/img.png +0 -0
- package/dist/es/components/Badges/components/CounterBadge/CounterBadge.css +0 -54
- package/dist/es/components/Badges/components/NotificationBadge/NotificationBadge.css +0 -58
- package/dist/es/components/Badges/components/PriceBadge/PriceBadge.css +0 -119
- package/dist/es/components/Badges/components/PromoBadge/PromoBadge.css +0 -69
- package/dist/es/components/Badges/components/TimerBadge/TimerBadge.css +0 -60
- package/dist/es/components/Calendar/components/Day/Day.css +0 -243
- package/dist/es/components/Calendar/components/Month/Month.css +0 -135
- package/dist/es/components/Collapse/Collapse.css +0 -3
- package/dist/es/components/ListData/doc/i/img.png +0 -0
- package/dist/es/components/Selector/doc/Selector.example.css +0 -17
- package/dist/lib/components/Avatar/doc/i/img.png +0 -0
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.css +0 -54
- package/dist/lib/components/Badges/components/CounterBadge/CounterBadge.js +0 -81
- package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.css +0 -58
- package/dist/lib/components/Badges/components/NotificationBadge/NotificationBadge.js +0 -71
- package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.css +0 -119
- package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.css +0 -69
- package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.js +0 -84
- package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.css +0 -60
- package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.js +0 -135
- package/dist/lib/components/Calendar/components/Day/Day.css +0 -243
- package/dist/lib/components/Calendar/components/Month/Month.css +0 -135
- package/dist/lib/components/Calendar/components/Month/Month.js +0 -127
- package/dist/lib/components/Collapse/Collapse.css +0 -3
- package/dist/lib/components/Collapse/Collapse.js +0 -141
- package/dist/lib/components/ListData/doc/i/img.png +0 -0
- package/dist/lib/components/Selector/doc/Selector.example.css +0 -17
- package/styles/base.less +0 -171
- /package/dist/es/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.d.ts +0 -0
- /package/dist/lib/components/Badges/{components/TimerBadge → TimerBadge/components}/Timer/Timer.d.ts +0 -0
|
@@ -1,162 +1 @@
|
|
|
1
|
-
.mfui-list-data {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: -webkit-box;
|
|
4
|
-
display: -ms-flexbox;
|
|
5
|
-
display: flex;
|
|
6
|
-
-webkit-box-align: center;
|
|
7
|
-
-ms-flex-align: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
-webkit-box-sizing: border-box;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: -webkit-fit-content;
|
|
13
|
-
height: -moz-fit-content;
|
|
14
|
-
height: fit-content;
|
|
15
|
-
padding: 8px 16px 8px 12px;
|
|
16
|
-
border: none;
|
|
17
|
-
color: var(--content);
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
background-color: transparent;
|
|
20
|
-
-webkit-transition: background-color, opacity;
|
|
21
|
-
transition: background-color, opacity;
|
|
22
|
-
-webkit-transition-duration: 0.3s;
|
|
23
|
-
transition-duration: 0.3s;
|
|
24
|
-
}
|
|
25
|
-
.mfui-list-data__icon-container {
|
|
26
|
-
display: -webkit-box;
|
|
27
|
-
display: -ms-flexbox;
|
|
28
|
-
display: flex;
|
|
29
|
-
-ms-flex-negative: 0;
|
|
30
|
-
flex-shrink: 0;
|
|
31
|
-
-webkit-box-align: center;
|
|
32
|
-
-ms-flex-align: center;
|
|
33
|
-
align-items: center;
|
|
34
|
-
-webkit-box-pack: center;
|
|
35
|
-
-ms-flex-pack: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
width: 40px;
|
|
38
|
-
height: 40px;
|
|
39
|
-
margin-right: 8px;
|
|
40
|
-
}
|
|
41
|
-
.mfui-list-data__icon-container svg {
|
|
42
|
-
fill: var(--content);
|
|
43
|
-
}
|
|
44
|
-
.mfui-list-data__icon-container_colored {
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
background-color: var(--brandGreen20);
|
|
47
|
-
}
|
|
48
|
-
.mfui-list-data__icon-container_colored svg {
|
|
49
|
-
fill: var(--brandGreen);
|
|
50
|
-
}
|
|
51
|
-
.mfui-list-data__icon {
|
|
52
|
-
width: 32px;
|
|
53
|
-
min-width: 32px;
|
|
54
|
-
height: 32px;
|
|
55
|
-
}
|
|
56
|
-
.mfui-list-data__icon_small {
|
|
57
|
-
width: 20px;
|
|
58
|
-
min-width: 20px;
|
|
59
|
-
height: 20px;
|
|
60
|
-
}
|
|
61
|
-
.mfui-list-data__header {
|
|
62
|
-
display: grid;
|
|
63
|
-
grid-template-columns: 100%;
|
|
64
|
-
margin-right: auto;
|
|
65
|
-
padding-left: 4px;
|
|
66
|
-
}
|
|
67
|
-
.mfui-list-data__header_gap {
|
|
68
|
-
padding-right: 8px;
|
|
69
|
-
}
|
|
70
|
-
.mfui-list-data__header_align {
|
|
71
|
-
-ms-flex-item-align: end;
|
|
72
|
-
align-self: flex-end;
|
|
73
|
-
}
|
|
74
|
-
.mfui-list-data__title {
|
|
75
|
-
font-size: 15px;
|
|
76
|
-
line-height: 24px;
|
|
77
|
-
/* stylelint-disable-next-line value-no-vendor-prefix */
|
|
78
|
-
display: -webkit-box;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
white-space: normal;
|
|
81
|
-
text-overflow: ellipsis;
|
|
82
|
-
-webkit-box-orient: vertical;
|
|
83
|
-
-webkit-line-clamp: 2;
|
|
84
|
-
font-weight: 500;
|
|
85
|
-
line-height: 18px;
|
|
86
|
-
}
|
|
87
|
-
.mfui-list-data__title-link {
|
|
88
|
-
color: var(--content);
|
|
89
|
-
}
|
|
90
|
-
.mfui-list-data__sub-title {
|
|
91
|
-
font-size: 12px;
|
|
92
|
-
line-height: 18px;
|
|
93
|
-
margin-top: 4px;
|
|
94
|
-
overflow: hidden;
|
|
95
|
-
color: var(--spbSky3);
|
|
96
|
-
font-weight: 400;
|
|
97
|
-
white-space: nowrap;
|
|
98
|
-
text-overflow: ellipsis;
|
|
99
|
-
}
|
|
100
|
-
.mfui-list-data__value-container {
|
|
101
|
-
display: grid;
|
|
102
|
-
grid-template-columns: -webkit-min-content;
|
|
103
|
-
grid-template-columns: min-content;
|
|
104
|
-
align-self: flex-start;
|
|
105
|
-
padding-left: 12px;
|
|
106
|
-
}
|
|
107
|
-
.mfui-list-data__value {
|
|
108
|
-
font-size: 15px;
|
|
109
|
-
line-height: 24px;
|
|
110
|
-
/* stylelint-disable-next-line value-no-vendor-prefix */
|
|
111
|
-
display: -webkit-box;
|
|
112
|
-
overflow: hidden;
|
|
113
|
-
white-space: normal;
|
|
114
|
-
text-overflow: ellipsis;
|
|
115
|
-
-webkit-box-orient: vertical;
|
|
116
|
-
-webkit-line-clamp: 2;
|
|
117
|
-
max-width: 110px;
|
|
118
|
-
line-height: 18px;
|
|
119
|
-
}
|
|
120
|
-
.mfui-list-data__value_color_green {
|
|
121
|
-
color: var(--brandGreen);
|
|
122
|
-
}
|
|
123
|
-
.mfui-list-data__sub-value {
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
line-height: 18px;
|
|
126
|
-
max-width: 110px;
|
|
127
|
-
margin-top: 4px;
|
|
128
|
-
overflow: hidden;
|
|
129
|
-
color: var(--spbSky3);
|
|
130
|
-
font-weight: 400;
|
|
131
|
-
white-space: nowrap;
|
|
132
|
-
text-overflow: ellipsis;
|
|
133
|
-
}
|
|
134
|
-
.mfui-list-data__action-icon {
|
|
135
|
-
fill: var(--spbSky3);
|
|
136
|
-
}
|
|
137
|
-
.mfui-list-data__action-icon_active {
|
|
138
|
-
cursor: pointer;
|
|
139
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
140
|
-
-webkit-transition: fill 0.3s;
|
|
141
|
-
transition: fill 0.3s;
|
|
142
|
-
}
|
|
143
|
-
.mfui-list-data__action-icon_active:hover {
|
|
144
|
-
fill: var(--content);
|
|
145
|
-
}
|
|
146
|
-
.mfui-list-data__children_event-none {
|
|
147
|
-
pointer-events: none;
|
|
148
|
-
}
|
|
149
|
-
.mfui-list-data_active:not(.mfui-list-data_disabled) {
|
|
150
|
-
border-radius: 12px;
|
|
151
|
-
cursor: pointer;
|
|
152
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
153
|
-
}
|
|
154
|
-
.mfui-list-data_active:not(.mfui-list-data_disabled):hover {
|
|
155
|
-
background-color: var(--spbSky0);
|
|
156
|
-
}
|
|
157
|
-
.mfui-list-data_disabled {
|
|
158
|
-
opacity: 0.5;
|
|
159
|
-
}
|
|
160
|
-
.mfui-list-data_disabled .mfui-list-data__title-link {
|
|
161
|
-
pointer-events: none;
|
|
162
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-list-data{background-color:transparent;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:8px 16px 8px 12px;position:relative;text-decoration:none;-webkit-transition:background-color,opacity;transition:background-color,opacity;-webkit-transition-duration:.3s;transition-duration:.3s;width:100%}.mfui-list-data,.mfui-list-data__icon-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-list-data__icon-container{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;height:40px;justify-content:center;margin-right:8px;width:40px}.mfui-list-data__icon-container svg{fill:var(--content)}.mfui-list-data__icon-container_colored{background-color:var(--brandGreen20);border-radius:50%}.mfui-list-data__icon-container_colored svg{fill:var(--brandGreen)}.mfui-list-data__icon{height:32px;min-width:32px;width:32px}.mfui-list-data__icon_small{height:20px;min-width:20px;width:20px}.mfui-list-data__header{display:grid;grid-template-columns:100%;margin-right:auto;padding-left:4px}.mfui-list-data__header_gap{padding-right:8px}.mfui-list-data__header_align{-ms-flex-item-align:end;align-self:flex-end}.mfui-list-data__title{display:-webkit-box;font-size:15px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-weight:500;line-height:18px}.mfui-list-data__title-link{color:var(--content)}.mfui-list-data__sub-title{color:var(--spbSky3);font-size:12px;font-weight:400;line-height:18px;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-list-data__value-container{align-self:flex-start;display:grid;grid-template-columns:-webkit-min-content;grid-template-columns:min-content;padding-left:12px}.mfui-list-data__value{display:-webkit-box;font-size:15px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:18px;max-width:110px}.mfui-list-data__value_color_green{color:var(--brandGreen)}.mfui-list-data__sub-value{color:var(--spbSky3);font-size:12px;font-weight:400;line-height:18px;margin-top:4px;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mfui-list-data__action-icon{fill:var(--spbSky3)}.mfui-list-data__action-icon_active{cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-transition:fill .3s;transition:fill .3s}.mfui-list-data__action-icon_active:hover{fill:var(--content)}.mfui-list-data__children_event-none{pointer-events:none}.mfui-list-data_active:not(.mfui-list-data_disabled){border-radius:12px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-list-data_active:not(.mfui-list-data_disabled):hover{background-color:var(--spbSky0)}.mfui-list-data_disabled{opacity:.5}.mfui-list-data_disabled .mfui-list-data__title-link{pointer-events:none}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare type TitlePropsType = {
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './ListData.scss';
|
|
3
|
+
type Target = '_self' | '_blank' | '_parent' | '_top';
|
|
4
|
+
export type TitlePropsType = {
|
|
6
5
|
/** Текст заголовка */
|
|
7
6
|
text: string;
|
|
8
7
|
/** Ссылка */
|
|
@@ -16,12 +15,12 @@ declare const ValueColors: {
|
|
|
16
15
|
readonly DEFAULT: "default";
|
|
17
16
|
readonly GREEN: "green";
|
|
18
17
|
};
|
|
19
|
-
export
|
|
18
|
+
export type ValueColorsType = (typeof ValueColors)[keyof typeof ValueColors];
|
|
20
19
|
declare const Actions: {
|
|
21
20
|
readonly DELETE: "delete";
|
|
22
21
|
readonly CONTROL: "control";
|
|
23
22
|
};
|
|
24
|
-
export
|
|
23
|
+
export type ActionsType = (typeof Actions)[keyof typeof Actions];
|
|
25
24
|
export interface IListDataProps {
|
|
26
25
|
/** Заголовок */
|
|
27
26
|
title: string | TitlePropsType;
|
|
@@ -64,31 +63,4 @@ export interface IListDataProps {
|
|
|
64
63
|
children?: React.ReactNode;
|
|
65
64
|
}
|
|
66
65
|
declare const ListData: React.FC<IListDataProps>;
|
|
67
|
-
export declare const ListDataPropType: {
|
|
68
|
-
title: PropTypes.Validator<string | PropTypes.InferProps<{
|
|
69
|
-
text: PropTypes.Validator<string>;
|
|
70
|
-
href: PropTypes.Validator<string>;
|
|
71
|
-
target: PropTypes.Requireable<string>;
|
|
72
|
-
rel: PropTypes.Requireable<string>;
|
|
73
|
-
}>>;
|
|
74
|
-
subTitle: PropTypes.Requireable<string>;
|
|
75
|
-
value: PropTypes.Requireable<string>;
|
|
76
|
-
valueColor: PropTypes.Requireable<"default" | "green">;
|
|
77
|
-
subValue: PropTypes.Requireable<string>;
|
|
78
|
-
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
79
|
-
isIconColored: PropTypes.Requireable<boolean>;
|
|
80
|
-
avatar: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
81
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
82
|
-
actionType: PropTypes.Requireable<"delete" | "control">;
|
|
83
|
-
onAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
85
|
-
className: PropTypes.Requireable<string>;
|
|
86
|
-
classes: PropTypes.Requireable<{
|
|
87
|
-
[x: string]: string | null | undefined;
|
|
88
|
-
}>;
|
|
89
|
-
dataAttrs: PropTypes.Requireable<{
|
|
90
|
-
[x: string]: object | null | undefined;
|
|
91
|
-
}>;
|
|
92
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
93
|
-
};
|
|
94
66
|
export default ListData;
|
|
@@ -2,12 +2,9 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import "core-js/modules/es.parse-int.js";
|
|
5
|
-
import
|
|
6
|
-
import React from 'react';
|
|
5
|
+
import * as React from 'react';
|
|
7
6
|
import { cnCreate, convert, filterDataAttrs, textConvertConfig } from '@megafon/ui-helpers';
|
|
8
|
-
import * as PropTypes from 'prop-types';
|
|
9
7
|
import "./ListData.css";
|
|
10
|
-
|
|
11
8
|
var DeleteIcon = function DeleteIcon(props) {
|
|
12
9
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
10
|
viewBox: "0 0 20 20"
|
|
@@ -15,7 +12,6 @@ var DeleteIcon = function DeleteIcon(props) {
|
|
|
15
12
|
d: "M16 4h-3.2c-.4-1.2-1.5-2-2.8-2s-2.4.8-2.8 2H4v4h1l1 10h8l1-10h1V4zM5 5h3v-.4C8.2 3.7 9.1 3 10 3s1.8.7 2 1.6V5h3v2H5V5zm8 12H7l-.9-9H14l-1 9z"
|
|
16
13
|
}));
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var NothingIcon = function NothingIcon(props) {
|
|
20
16
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
17
|
viewBox: "0 0 32 32"
|
|
@@ -33,7 +29,6 @@ var NothingIcon = function NothingIcon(props) {
|
|
|
33
29
|
r: 1.5
|
|
34
30
|
}));
|
|
35
31
|
};
|
|
36
|
-
|
|
37
32
|
var LINE_COUNT = 2;
|
|
38
33
|
var ValueColors = {
|
|
39
34
|
DEFAULT: 'default',
|
|
@@ -44,41 +39,36 @@ var Actions = {
|
|
|
44
39
|
CONTROL: 'control'
|
|
45
40
|
};
|
|
46
41
|
var cn = cnCreate('mfui-list-data');
|
|
47
|
-
|
|
48
42
|
var ListData = function ListData(_ref) {
|
|
49
43
|
var title = _ref.title,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
44
|
+
subTitle = _ref.subTitle,
|
|
45
|
+
value = _ref.value,
|
|
46
|
+
valueColor = _ref.valueColor,
|
|
47
|
+
subValue = _ref.subValue,
|
|
48
|
+
icon = _ref.icon,
|
|
49
|
+
_ref$isIconColored = _ref.isIconColored,
|
|
50
|
+
isIconColored = _ref$isIconColored === void 0 ? false : _ref$isIconColored,
|
|
51
|
+
avatar = _ref.avatar,
|
|
52
|
+
_ref$disabled = _ref.disabled,
|
|
53
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
54
|
+
actionType = _ref.actionType,
|
|
55
|
+
onClick = _ref.onClick,
|
|
56
|
+
onAction = _ref.onAction,
|
|
57
|
+
className = _ref.className,
|
|
58
|
+
_ref$classes = _ref.classes,
|
|
59
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
60
|
+
dataAttrs = _ref.dataAttrs,
|
|
61
|
+
children = _ref.children;
|
|
68
62
|
var valueRef = React.useRef(null);
|
|
69
|
-
|
|
70
63
|
var _React$useState = React.useState('right'),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
65
|
+
valueAlignment = _React$useState2[0],
|
|
66
|
+
setValueAlignment = _React$useState2[1];
|
|
75
67
|
var isActive = !!onClick && !(_typeof(title) === 'object' && (title === null || title === void 0 ? void 0 : title.href));
|
|
76
68
|
var showActionElement = !!actionType || !!children;
|
|
77
|
-
|
|
78
69
|
var handleClick = function handleClick(e) {
|
|
79
70
|
!disabled && (onClick === null || onClick === void 0 ? void 0 : onClick(e));
|
|
80
71
|
};
|
|
81
|
-
|
|
82
72
|
var handleAction = React.useCallback(function (e) {
|
|
83
73
|
e.stopPropagation();
|
|
84
74
|
!disabled && (onAction === null || onAction === void 0 ? void 0 : onAction(e));
|
|
@@ -87,7 +77,6 @@ var ListData = function ListData(_ref) {
|
|
|
87
77
|
if (!valueRef.current) {
|
|
88
78
|
return;
|
|
89
79
|
}
|
|
90
|
-
|
|
91
80
|
var lineHeight = parseInt(getComputedStyle(valueRef.current).lineHeight, 10);
|
|
92
81
|
var actualHeight = valueRef.current.offsetHeight;
|
|
93
82
|
var currentLineCount = actualHeight / lineHeight;
|
|
@@ -101,12 +90,10 @@ var ListData = function ListData(_ref) {
|
|
|
101
90
|
target: title === null || title === void 0 ? void 0 : title.target,
|
|
102
91
|
rel: title === null || title === void 0 ? void 0 : title.rel
|
|
103
92
|
}, title.text));
|
|
104
|
-
|
|
105
93
|
var renderIcon = function renderIcon() {
|
|
106
94
|
if (!icon && !avatar) {
|
|
107
95
|
return null;
|
|
108
96
|
}
|
|
109
|
-
|
|
110
97
|
return /*#__PURE__*/React.createElement("div", {
|
|
111
98
|
className: cn('icon-container', {
|
|
112
99
|
colored: isIconColored && !avatar
|
|
@@ -115,7 +102,6 @@ var ListData = function ListData(_ref) {
|
|
|
115
102
|
className: cn('icon')
|
|
116
103
|
}, icon));
|
|
117
104
|
};
|
|
118
|
-
|
|
119
105
|
var renderExtraContent = function renderExtraContent() {
|
|
120
106
|
if (children) {
|
|
121
107
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -124,7 +110,6 @@ var ListData = function ListData(_ref) {
|
|
|
124
110
|
})
|
|
125
111
|
}, children);
|
|
126
112
|
}
|
|
127
|
-
|
|
128
113
|
if (value) {
|
|
129
114
|
return /*#__PURE__*/React.createElement("div", {
|
|
130
115
|
className: cn('value-container')
|
|
@@ -140,7 +125,6 @@ var ListData = function ListData(_ref) {
|
|
|
140
125
|
className: cn('sub-value')
|
|
141
126
|
}, subValue));
|
|
142
127
|
}
|
|
143
|
-
|
|
144
128
|
if (actionType) {
|
|
145
129
|
var isDelete = actionType === Actions.DELETE;
|
|
146
130
|
var ActionIcon = isDelete ? DeleteIcon : NothingIcon;
|
|
@@ -156,10 +140,8 @@ var ListData = function ListData(_ref) {
|
|
|
156
140
|
})
|
|
157
141
|
}));
|
|
158
142
|
}
|
|
159
|
-
|
|
160
143
|
return null;
|
|
161
144
|
};
|
|
162
|
-
|
|
163
145
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
164
146
|
className: cn({
|
|
165
147
|
active: isActive,
|
|
@@ -175,29 +157,4 @@ var ListData = function ListData(_ref) {
|
|
|
175
157
|
className: cn('sub-title', [classes.subtitle])
|
|
176
158
|
}, subTitle)), renderExtraContent());
|
|
177
159
|
};
|
|
178
|
-
|
|
179
|
-
export var ListDataPropType = {
|
|
180
|
-
title: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
181
|
-
text: PropTypes.string.isRequired,
|
|
182
|
-
href: PropTypes.string.isRequired,
|
|
183
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
|
184
|
-
rel: PropTypes.string
|
|
185
|
-
})]).isRequired,
|
|
186
|
-
subTitle: PropTypes.string,
|
|
187
|
-
value: PropTypes.string,
|
|
188
|
-
valueColor: PropTypes.oneOf(Object.values(ValueColors)),
|
|
189
|
-
subValue: PropTypes.string,
|
|
190
|
-
icon: PropTypes.element,
|
|
191
|
-
isIconColored: PropTypes.bool,
|
|
192
|
-
avatar: PropTypes.element,
|
|
193
|
-
disabled: PropTypes.bool,
|
|
194
|
-
actionType: PropTypes.oneOf(Object.values(Actions)),
|
|
195
|
-
onAction: PropTypes.func,
|
|
196
|
-
onClick: PropTypes.func,
|
|
197
|
-
className: PropTypes.string,
|
|
198
|
-
classes: PropTypes.objectOf(PropTypes.string),
|
|
199
|
-
dataAttrs: PropTypes.objectOf(PropTypes.object),
|
|
200
|
-
children: PropTypes.node
|
|
201
|
-
};
|
|
202
|
-
ListData.propTypes = ListDataPropType;
|
|
203
160
|
export default ListData;
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
.mfui-list-data-group
|
|
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-sizing: border-box;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
overflow-y: hidden;
|
|
12
|
-
}
|
|
13
|
-
.mfui-list-data-group__item_divider:not(:last-child) {
|
|
14
|
-
border-bottom: 1px solid var(--spbSky1);
|
|
15
|
-
}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-list-data-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;overflow-y:hidden}.mfui-list-data-group__item_divider:not(:last-child){border-bottom:1px solid var(--spbSky1)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { DragEndEvent, DragStartEvent } from '@dnd-kit/core';
|
|
3
3
|
import { ActivatorNodesType, GapSizesType } from './components/ListDataSortable';
|
|
4
4
|
import { IListDataProps } from './ListData';
|
|
5
|
-
import './ListDataGroup.
|
|
6
|
-
export
|
|
5
|
+
import './ListDataGroup.scss';
|
|
6
|
+
export type ListItemPropsType = IListDataProps & {
|
|
7
7
|
id: string | number;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type DragOverlayPropsType = {
|
|
10
10
|
className?: string;
|
|
11
11
|
zIndex?: number;
|
|
12
12
|
};
|
|
@@ -1,69 +1,55 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import "core-js/modules/es.array.index-of.js";
|
|
4
3
|
import "core-js/modules/es.symbol.js";
|
|
5
4
|
import "core-js/modules/es.array.find-index.js";
|
|
5
|
+
import "core-js/modules/es.array.index-of.js";
|
|
6
6
|
import "core-js/modules/es.array.map.js";
|
|
7
|
-
import "core-js/modules/es.object.values.js";
|
|
8
|
-
|
|
9
7
|
var __rest = this && this.__rest || function (s, e) {
|
|
10
8
|
var t = {};
|
|
11
|
-
|
|
12
|
-
for (var p in s) {
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14
|
-
}
|
|
15
|
-
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
16
10
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
11
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
18
12
|
}
|
|
19
13
|
return t;
|
|
20
14
|
};
|
|
21
|
-
|
|
22
|
-
import React from 'react';
|
|
15
|
+
import * as React from 'react';
|
|
23
16
|
import { closestCenter, DndContext, DragOverlay, KeyboardSensor, MouseSensor, TouchSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
24
17
|
import { arrayMove, SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
25
18
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
26
|
-
import * as PropTypes from 'prop-types';
|
|
27
19
|
import ListDataSortable, { ActivatorNodes, GapSizes } from "./components/ListDataSortable";
|
|
28
20
|
import { restrictToElement, restrictToVerticalAxis } from "./helpers";
|
|
29
|
-
import { ListDataPropType } from "./ListData";
|
|
30
21
|
import "./ListDataGroup.css";
|
|
31
22
|
var SCREEN_READER_INSTRUCTION = "\u0427\u0442\u043E\u0431\u044B \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0435\u0440\u0435\u0442\u0430\u0441\u043A\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442, \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043F\u0440\u043E\u0431\u0435\u043B.\n \u041F\u0440\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0441\u043A\u0438\u0432\u0430\u043D\u0438\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0441\u043E \u0441\u0442\u0440\u0435\u043B\u043A\u0430\u043C\u0438 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430.\n \u0421\u043D\u043E\u0432\u0430 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043F\u0440\u043E\u0431\u0435\u043B, \u0447\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0432 \u0435\u0433\u043E \u043D\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 escape \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B.";
|
|
32
23
|
var cn = cnCreate('mfui-list-data-group');
|
|
33
|
-
|
|
34
24
|
var ListDataGroup = function ListDataGroup(_ref) {
|
|
35
25
|
var items = _ref.items,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
_ref$activatorNode = _ref.activatorNode,
|
|
27
|
+
activatorNode = _ref$activatorNode === void 0 ? ActivatorNodes.CONTROL : _ref$activatorNode,
|
|
28
|
+
_ref$gap = _ref.gap,
|
|
29
|
+
gap = _ref$gap === void 0 ? GapSizes.NONE : _ref$gap,
|
|
30
|
+
_ref$showDivider = _ref.showDivider,
|
|
31
|
+
showDivider = _ref$showDivider === void 0 ? false : _ref$showDivider,
|
|
32
|
+
onDragStart = _ref.onDragStart,
|
|
33
|
+
onDragEnd = _ref.onDragEnd,
|
|
34
|
+
_ref$disabled = _ref.disabled,
|
|
35
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
36
|
+
dragOverlayProps = _ref.dragOverlayProps,
|
|
37
|
+
className = _ref.className,
|
|
38
|
+
_ref$classes = _ref.classes,
|
|
39
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
40
|
+
dataAttrs = _ref.dataAttrs;
|
|
52
41
|
var _React$useState = React.useState(items),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
43
|
+
itemsList = _React$useState2[0],
|
|
44
|
+
setItemsList = _React$useState2[1];
|
|
57
45
|
var _React$useState3 = React.useState(null),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
47
|
+
activeId = _React$useState4[0],
|
|
48
|
+
setActiveId = _React$useState4[1];
|
|
62
49
|
var _React$useState5 = React.useState(null),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
50
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
51
|
+
dragEndEvent = _React$useState6[0],
|
|
52
|
+
setDragEndEvent = _React$useState6[1];
|
|
67
53
|
var boundaryRef = React.useRef(null);
|
|
68
54
|
var sensors = useSensors(useSensor(KeyboardSensor, {
|
|
69
55
|
coordinateGetter: sortableKeyboardCoordinates
|
|
@@ -83,8 +69,7 @@ var ListDataGroup = function ListDataGroup(_ref) {
|
|
|
83
69
|
}, [setActiveId]);
|
|
84
70
|
var handleDragEnd = React.useCallback(function (event) {
|
|
85
71
|
var active = event.active,
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
over = event.over;
|
|
88
73
|
if ((over === null || over === void 0 ? void 0 : over.id) && active.id !== over.id) {
|
|
89
74
|
setItemsList(function (prevItemsList) {
|
|
90
75
|
var oldIndex = prevItemsList.findIndex(function (item) {
|
|
@@ -96,7 +81,6 @@ var ListDataGroup = function ListDataGroup(_ref) {
|
|
|
96
81
|
return arrayMove(prevItemsList, oldIndex, newIndex);
|
|
97
82
|
});
|
|
98
83
|
}
|
|
99
|
-
|
|
100
84
|
setActiveId(null);
|
|
101
85
|
setDragEndEvent(event);
|
|
102
86
|
}, []);
|
|
@@ -106,11 +90,9 @@ var ListDataGroup = function ListDataGroup(_ref) {
|
|
|
106
90
|
setDragEndEvent(null);
|
|
107
91
|
}
|
|
108
92
|
}, [itemsList, onDragEnd, dragEndEvent]);
|
|
109
|
-
|
|
110
93
|
var renderSortableItem = function renderSortableItem(_a, index, isDragOverlay) {
|
|
111
94
|
var id = _a.id,
|
|
112
|
-
|
|
113
|
-
|
|
95
|
+
item = __rest(_a, ["id"]);
|
|
114
96
|
return /*#__PURE__*/React.createElement("div", {
|
|
115
97
|
key: id,
|
|
116
98
|
className: cn('item', {
|
|
@@ -133,20 +115,16 @@ var ListDataGroup = function ListDataGroup(_ref) {
|
|
|
133
115
|
}
|
|
134
116
|
}));
|
|
135
117
|
};
|
|
136
|
-
|
|
137
118
|
var renderDragOverlay = function renderDragOverlay() {
|
|
138
119
|
var activeIndex = itemsList.findIndex(function (item) {
|
|
139
120
|
return item.id === activeId;
|
|
140
121
|
});
|
|
141
122
|
var activeItem = itemsList[activeIndex];
|
|
142
|
-
|
|
143
123
|
if (activeItem) {
|
|
144
124
|
return renderSortableItem(activeItem, activeIndex, true);
|
|
145
125
|
}
|
|
146
|
-
|
|
147
126
|
return null;
|
|
148
127
|
};
|
|
149
|
-
|
|
150
128
|
return /*#__PURE__*/React.createElement(DndContext, {
|
|
151
129
|
sensors: sensors,
|
|
152
130
|
collisionDetection: closestCenter,
|
|
@@ -169,27 +147,4 @@ var ListDataGroup = function ListDataGroup(_ref) {
|
|
|
169
147
|
return renderSortableItem(item, index);
|
|
170
148
|
}))), /*#__PURE__*/React.createElement(DragOverlay, dragOverlayProps, activeId ? renderDragOverlay() : null));
|
|
171
149
|
};
|
|
172
|
-
|
|
173
|
-
ListDataGroup.propTypes = {
|
|
174
|
-
items: PropTypes.arrayOf(PropTypes.shape(_extends({
|
|
175
|
-
id: PropTypes.string.isRequired
|
|
176
|
-
}, ListDataPropType)).isRequired).isRequired,
|
|
177
|
-
activatorNode: PropTypes.oneOf(Object.values(ActivatorNodes)),
|
|
178
|
-
gap: PropTypes.oneOf(Object.values(GapSizes)),
|
|
179
|
-
showDivider: PropTypes.bool,
|
|
180
|
-
onDragStart: PropTypes.func,
|
|
181
|
-
onDragEnd: PropTypes.func,
|
|
182
|
-
disabled: PropTypes.bool,
|
|
183
|
-
dragOverlayProps: PropTypes.shape({
|
|
184
|
-
className: PropTypes.string,
|
|
185
|
-
zIndex: PropTypes.number
|
|
186
|
-
}),
|
|
187
|
-
className: PropTypes.string,
|
|
188
|
-
classes: PropTypes.shape({
|
|
189
|
-
root: PropTypes.string,
|
|
190
|
-
cell: PropTypes.string,
|
|
191
|
-
control: PropTypes.string
|
|
192
|
-
}),
|
|
193
|
-
dataAttrs: PropTypes.objectOf(PropTypes.object)
|
|
194
|
-
};
|
|
195
150
|
export default ListDataGroup;
|