@megafon/ui-core 9.0.0-alpha.2 → 9.0.0-alpha.21
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/components/Accordion/Accordion.css +1 -1
- package/dist/es/components/Accordion/Accordion.d.ts +3 -1
- package/dist/es/components/Accordion/Accordion.js +3 -3
- package/dist/es/components/Avatar/Avatar.css +1 -1
- package/dist/es/components/Avatar/Avatar.d.ts +1 -1
- package/dist/es/components/Badges/CounterBadge/CounterBadge.js +1 -2
- package/dist/es/components/Badges/InfoBadge/InfoBadge.css +1 -0
- package/dist/es/components/Badges/InfoBadge/InfoBadge.d.ts +52 -0
- package/dist/es/components/Badges/InfoBadge/InfoBadge.js +226 -0
- package/dist/es/components/Badges/PriceBadge/PriceBadge.d.ts +1 -0
- package/dist/es/components/Badges/PriceBadge/PriceBadge.js +53 -13
- package/dist/es/components/Badges/PromoBadge/PromoBadge.css +1 -1
- package/dist/es/components/Badges/PromoBadge/PromoBadge.d.ts +1 -11
- package/dist/es/components/Badges/PromoBadge/PromoBadge.js +6 -16
- package/dist/es/components/Badges/StatusBadge/StatusBadge.css +1 -1
- package/dist/es/components/Badges/StatusBadge/StatusBadge.js +16 -7
- package/dist/es/components/Badges/TimerBadge/TimerBadge.d.ts +2 -0
- package/dist/es/components/Badges/TimerBadge/TimerBadge.js +6 -2
- package/dist/es/components/Buttons/Button/Button.css +1 -0
- package/dist/es/components/{Button → Buttons/Button}/Button.d.ts +5 -0
- package/dist/es/components/{Button → Buttons/Button}/Button.js +38 -12
- package/dist/es/components/Buttons/ButtonClose/ButtonClose.css +1 -0
- package/dist/es/components/Buttons/ButtonClose/ButtonClose.d.ts +34 -0
- package/dist/es/components/Buttons/ButtonClose/ButtonClose.js +69 -0
- package/dist/es/components/Calendar/components/_Month/Month.js +2 -6
- package/dist/es/components/Carousel/Carousel.css +1 -1
- package/dist/es/components/Carousel/Carousel.d.ts +9 -0
- package/dist/es/components/Carousel/Carousel.js +14 -2
- package/dist/es/components/Checkbox/Checkbox.css +1 -1
- package/dist/es/components/Checkbox/Checkbox.js +3 -2
- package/dist/es/components/Chips/Chips/Chip.css +1 -1
- package/dist/es/components/Chips/Chips/Chip.d.ts +9 -1
- package/dist/es/components/Chips/Chips/Chip.js +12 -7
- package/dist/es/components/Chips/Chips/Chips.d.ts +16 -1
- package/dist/es/components/Chips/Chips/Chips.js +28 -6
- package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.css +1 -1
- package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +12 -4
- package/dist/es/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.js +55 -47
- package/dist/es/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.d.ts +10 -1
- package/dist/es/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.js +12 -7
- package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.css +1 -1
- package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.d.ts +7 -0
- package/dist/es/components/Chips/ChipsSuggest/ChipSuggest.js +7 -0
- package/dist/es/components/Chips/ChipsSuggest/ChipsSuggest.d.ts +4 -2
- package/dist/es/components/Chips/ChipsSuggest/ChipsSuggest.js +3 -0
- package/dist/es/components/ContentArea/ContentArea.css +1 -1
- package/dist/es/components/ContentArea/ContentArea.d.ts +3 -2
- package/dist/es/components/ContentArea/ContentArea.js +5 -0
- package/dist/es/components/ContentView/ContentView.css +1 -1
- package/dist/es/components/ContentView/ContentView.d.ts +15 -4
- package/dist/es/components/ContentView/ContentView.js +17 -4
- package/dist/es/components/Counter/Counter.css +1 -1
- package/dist/es/components/Counter/Counter.d.ts +2 -0
- package/dist/es/components/Counter/Counter.js +6 -3
- package/dist/es/components/Dropdown/Dropdown.css +1 -1
- package/dist/es/components/Dropdown/Dropdown.d.ts +6 -2
- package/dist/es/components/Dropdown/Dropdown.js +31 -22
- package/dist/es/components/ErrorLoad/ErrorLoad.css +1 -1
- package/dist/es/components/ErrorLoad/ErrorLoad.d.ts +1 -1
- package/dist/es/components/ErrorLoad/ErrorLoad.js +2 -4
- package/dist/es/components/Link/Link.css +1 -0
- package/dist/es/components/Link/Link.d.ts +1 -0
- package/dist/es/components/Link/Link.js +4 -2
- package/dist/es/components/ListData/ListData.css +1 -1
- package/dist/es/components/ListData/ListData.d.ts +9 -1
- package/dist/es/components/ListData/ListData.js +20 -14
- package/dist/es/components/ListData/components/ListDataSortable.css +1 -1
- package/dist/es/components/ListData/components/ListDataSortable.js +1 -3
- package/dist/es/components/Modal/Modal.css +1 -1
- package/dist/es/components/Modal/Modal.d.ts +23 -9
- package/dist/es/components/Modal/Modal.js +34 -23
- package/dist/es/components/Modal/_ModalContent/ModalContent.css +1 -1
- package/dist/es/components/Modal/_ModalContent/ModalContent.js +37 -39
- package/dist/es/components/Modal/_ModalDesktop/ModalDesktop.css +1 -1
- package/dist/es/components/Modal/_ModalMobile/ModalMobile.css +1 -0
- package/dist/es/components/Modal/{_ModalMobileBottom/ModalMobileBottom.d.ts → _ModalMobile/ModalMobile.d.ts} +6 -5
- package/dist/es/components/Modal/{_ModalMobileBottom/ModalMobileBottom.js → _ModalMobile/ModalMobile.js} +35 -26
- package/dist/es/components/Modal/mocks.js +0 -1
- package/dist/es/components/Modal/types.d.ts +1 -2
- package/dist/es/components/NavArrow/NavArrow.css +1 -1
- package/dist/es/components/NavArrow/NavArrow.js +4 -4
- package/dist/es/components/Notification/Notification.css +1 -1
- package/dist/es/components/Notification/Notification.d.ts +0 -11
- package/dist/es/components/Notification/Notification.js +19 -38
- package/dist/es/components/Pagination/Pagination.css +1 -1
- package/dist/es/components/Pagination/Pagination.d.ts +1 -3
- package/dist/es/components/Pagination/Pagination.js +4 -13
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.css +1 -1
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.d.ts +1 -2
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +0 -2
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -1
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +1 -3
- package/dist/es/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -16
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +1 -2
- package/dist/es/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +4 -4
- package/dist/es/components/Pagination/types.d.ts +1 -11
- package/dist/es/components/Pagination/types.js +1 -4
- package/dist/es/components/Pagination/usePagination.d.ts +2 -2
- package/dist/es/components/Pagination/usePagination.js +11 -29
- package/dist/es/components/Parameter/Parameter.d.ts +0 -3
- package/dist/es/components/Parameter/Parameter.js +3 -4
- package/dist/es/components/RadioButton/RadioButton.css +1 -1
- package/dist/es/components/Row/Row.css +1 -1
- package/dist/es/components/Row/Row.js +6 -4
- package/dist/es/components/ScrollBar/ScrollBar.d.ts +2 -0
- package/dist/es/components/ScrollBar/ScrollBar.js +6 -1
- package/dist/es/components/Search/Search.css +1 -1
- package/dist/es/components/Search/Search.d.ts +2 -2
- package/dist/es/components/Search/Search.js +72 -68
- package/dist/es/components/Select/Select.css +1 -1
- package/dist/es/components/Select/Select.d.ts +11 -20
- package/dist/es/components/Select/Select.js +40 -88
- package/dist/es/components/Select/reducer/selectReducer.js +1 -1
- package/dist/es/components/Selector/Selector.css +1 -1
- package/dist/es/components/Sliders/Slider/Slider.css +1 -1
- package/dist/es/components/Sliders/Slider/Slider.d.ts +12 -0
- package/dist/es/components/Sliders/Slider/Slider.js +26 -7
- package/dist/es/components/Sliders/SliderRange/SliderRange.css +1 -1
- package/dist/es/components/Sliders/SliderRange/SliderRange.d.ts +3 -0
- package/dist/es/components/Sliders/SliderRange/SliderRange.js +4 -1
- package/dist/es/components/Sliders/SliderRatio/SliderRatio.css +1 -1
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.css +1 -1
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.d.ts +6 -0
- package/dist/es/components/Sliders/components/SliderScale/SliderScale.js +8 -1
- package/dist/es/components/Sliders/helpers.d.ts +1 -0
- package/dist/es/components/Sliders/helpers.js +7 -0
- package/dist/es/components/Snackbar/Snackbar.css +1 -1
- package/dist/es/components/Snackbar/Snackbar.js +20 -21
- package/dist/es/components/Stepper/Stepper.css +1 -0
- package/dist/es/components/Stepper/Stepper.d.ts +52 -0
- package/dist/es/components/Stepper/Stepper.js +159 -0
- package/dist/es/components/Stepper/StepperItem.css +1 -0
- package/dist/es/components/Stepper/StepperItem.d.ts +57 -0
- package/dist/es/components/Stepper/StepperItem.js +101 -0
- package/dist/es/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/es/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/es/components/Stepper/img/separator.png +0 -0
- package/dist/es/components/Switcher/Switcher.css +1 -1
- package/dist/es/components/Switcher/Switcher.d.ts +5 -0
- package/dist/es/components/Switcher/Switcher.js +22 -10
- package/dist/es/components/Tabs/Tabs.css +1 -1
- package/dist/es/components/Tabs/Tabs.d.ts +2 -0
- package/dist/es/components/Tabs/Tabs.js +64 -55
- package/dist/es/components/TextField/TextField.css +1 -1
- package/dist/es/components/TextField/TextField.d.ts +2 -2
- package/dist/es/components/TextField/TextField.js +16 -9
- package/dist/es/components/Tooltip/Tooltip.css +1 -1
- package/dist/es/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/es/components/Tooltip/Tooltip.js +22 -17
- package/dist/es/components/UploadForm/UploadField/UploadField.css +1 -1
- package/dist/es/components/UploadForm/UploadField/UploadField.d.ts +4 -1
- package/dist/es/components/UploadForm/UploadField/UploadField.js +8 -2
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.d.ts +3 -1
- package/dist/es/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.js +30 -5
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.d.ts +3 -1
- package/dist/es/components/UploadForm/UploadFileItem/UploadFileItem.js +9 -6
- package/dist/es/components/UploadForm/UploadFileItem/components/_UploadFileItemIcon/UploadFileItemIcon.js +6 -0
- package/dist/es/hooks/useResolution.js +15 -23
- package/dist/es/index.d.ts +6 -3
- package/dist/es/index.js +6 -3
- package/dist/lib/components/Accordion/Accordion.css +1 -1
- package/dist/lib/components/Accordion/Accordion.d.ts +3 -1
- package/dist/lib/components/Accordion/Accordion.js +3 -3
- package/dist/lib/components/Avatar/Avatar.css +1 -1
- package/dist/lib/components/Avatar/Avatar.d.ts +1 -1
- package/dist/lib/components/Badges/CounterBadge/CounterBadge.js +1 -2
- package/dist/lib/components/Badges/InfoBadge/InfoBadge.css +1 -0
- package/dist/lib/components/Badges/InfoBadge/InfoBadge.d.ts +52 -0
- package/dist/lib/components/Badges/InfoBadge/InfoBadge.js +235 -0
- package/dist/lib/components/Badges/PriceBadge/PriceBadge.d.ts +1 -0
- package/dist/lib/components/Badges/PriceBadge/PriceBadge.js +54 -13
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.css +1 -1
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.d.ts +1 -11
- package/dist/lib/components/Badges/PromoBadge/PromoBadge.js +7 -17
- package/dist/lib/components/Badges/StatusBadge/StatusBadge.css +1 -1
- package/dist/lib/components/Badges/StatusBadge/StatusBadge.js +16 -7
- package/dist/lib/components/Badges/TimerBadge/TimerBadge.d.ts +2 -0
- package/dist/lib/components/Badges/TimerBadge/TimerBadge.js +6 -2
- package/dist/lib/components/Buttons/Button/Button.css +1 -0
- package/dist/lib/components/{Button → Buttons/Button}/Button.d.ts +5 -0
- package/dist/lib/components/{Button → Buttons/Button}/Button.js +38 -12
- package/dist/lib/components/Buttons/ButtonClose/ButtonClose.css +1 -0
- package/dist/lib/components/Buttons/ButtonClose/ButtonClose.d.ts +34 -0
- package/dist/lib/components/Buttons/ButtonClose/ButtonClose.js +78 -0
- package/dist/lib/components/Calendar/components/_Month/Month.js +2 -6
- package/dist/lib/components/Carousel/Carousel.css +1 -1
- package/dist/lib/components/Carousel/Carousel.d.ts +9 -0
- package/dist/lib/components/Carousel/Carousel.js +15 -3
- package/dist/lib/components/Checkbox/Checkbox.css +1 -1
- package/dist/lib/components/Checkbox/Checkbox.js +3 -2
- package/dist/lib/components/Chips/Chips/Chip.css +1 -1
- package/dist/lib/components/Chips/Chips/Chip.d.ts +9 -1
- package/dist/lib/components/Chips/Chips/Chip.js +13 -8
- package/dist/lib/components/Chips/Chips/Chips.d.ts +16 -1
- package/dist/lib/components/Chips/Chips/Chips.js +28 -6
- package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.css +1 -1
- package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.d.ts +12 -4
- package/dist/lib/components/Chips/Chips/components/ChipsDropdown/ChipsDropdown.js +55 -47
- package/dist/lib/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.d.ts +10 -1
- package/dist/lib/components/Chips/Chips/components/ChipsScrollPanel/ChipsScrollPanel.js +11 -6
- package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.css +1 -1
- package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.d.ts +7 -0
- package/dist/lib/components/Chips/ChipsSuggest/ChipSuggest.js +8 -1
- package/dist/lib/components/Chips/ChipsSuggest/ChipsSuggest.d.ts +4 -2
- package/dist/lib/components/Chips/ChipsSuggest/ChipsSuggest.js +3 -0
- package/dist/lib/components/ContentArea/ContentArea.css +1 -1
- package/dist/lib/components/ContentArea/ContentArea.d.ts +3 -2
- package/dist/lib/components/ContentArea/ContentArea.js +5 -0
- package/dist/lib/components/ContentView/ContentView.css +1 -1
- package/dist/lib/components/ContentView/ContentView.d.ts +15 -4
- package/dist/lib/components/ContentView/ContentView.js +17 -4
- package/dist/lib/components/Counter/Counter.css +1 -1
- package/dist/lib/components/Counter/Counter.d.ts +2 -0
- package/dist/lib/components/Counter/Counter.js +6 -3
- package/dist/lib/components/Dropdown/Dropdown.css +1 -1
- package/dist/lib/components/Dropdown/Dropdown.d.ts +6 -2
- package/dist/lib/components/Dropdown/Dropdown.js +31 -22
- package/dist/lib/components/ErrorLoad/ErrorLoad.css +1 -1
- package/dist/lib/components/ErrorLoad/ErrorLoad.d.ts +1 -1
- package/dist/lib/components/ErrorLoad/ErrorLoad.js +2 -4
- package/dist/lib/components/Link/Link.css +1 -0
- package/dist/lib/components/Link/Link.d.ts +1 -0
- package/dist/lib/components/Link/Link.js +2 -1
- package/dist/lib/components/ListData/ListData.css +1 -1
- package/dist/lib/components/ListData/ListData.d.ts +9 -1
- package/dist/lib/components/ListData/ListData.js +20 -14
- package/dist/lib/components/ListData/components/ListDataSortable.css +1 -1
- package/dist/lib/components/ListData/components/ListDataSortable.js +1 -3
- package/dist/lib/components/Modal/Modal.css +1 -1
- package/dist/lib/components/Modal/Modal.d.ts +23 -9
- package/dist/lib/components/Modal/Modal.js +35 -24
- package/dist/lib/components/Modal/_ModalContent/ModalContent.css +1 -1
- package/dist/lib/components/Modal/_ModalContent/ModalContent.js +37 -39
- package/dist/lib/components/Modal/_ModalDesktop/ModalDesktop.css +1 -1
- package/dist/lib/components/Modal/_ModalMobile/ModalMobile.css +1 -0
- package/dist/lib/components/Modal/{_ModalMobileBottom/ModalMobileBottom.d.ts → _ModalMobile/ModalMobile.d.ts} +6 -5
- package/dist/lib/components/Modal/{_ModalMobileBottom/ModalMobileBottom.js → _ModalMobile/ModalMobile.js} +34 -25
- package/dist/lib/components/Modal/mocks.js +0 -1
- package/dist/lib/components/Modal/types.d.ts +1 -2
- package/dist/lib/components/NavArrow/NavArrow.css +1 -1
- package/dist/lib/components/NavArrow/NavArrow.js +4 -4
- package/dist/lib/components/Notification/Notification.css +1 -1
- package/dist/lib/components/Notification/Notification.d.ts +0 -11
- package/dist/lib/components/Notification/Notification.js +18 -37
- package/dist/lib/components/Pagination/Pagination.css +1 -1
- package/dist/lib/components/Pagination/Pagination.d.ts +1 -3
- package/dist/lib/components/Pagination/Pagination.js +4 -13
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.css +1 -1
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.d.ts +1 -2
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +0 -2
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.css +1 -1
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.d.ts +1 -3
- package/dist/lib/components/Pagination/components/PaginationButtons/PaginationButtons.js +5 -16
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.d.ts +1 -2
- package/dist/lib/components/Pagination/components/PaginationNavigation/PaginationNavigation.js +4 -4
- package/dist/lib/components/Pagination/types.d.ts +1 -11
- package/dist/lib/components/Pagination/types.js +1 -6
- package/dist/lib/components/Pagination/usePagination.d.ts +2 -2
- package/dist/lib/components/Pagination/usePagination.js +11 -29
- package/dist/lib/components/Parameter/Parameter.d.ts +0 -3
- package/dist/lib/components/Parameter/Parameter.js +3 -4
- package/dist/lib/components/RadioButton/RadioButton.css +1 -1
- package/dist/lib/components/Row/Row.css +1 -1
- package/dist/lib/components/Row/Row.js +5 -3
- package/dist/lib/components/ScrollBar/ScrollBar.d.ts +2 -0
- package/dist/lib/components/ScrollBar/ScrollBar.js +6 -1
- package/dist/lib/components/Search/Search.css +1 -1
- package/dist/lib/components/Search/Search.d.ts +2 -2
- package/dist/lib/components/Search/Search.js +72 -68
- package/dist/lib/components/Select/Select.css +1 -1
- package/dist/lib/components/Select/Select.d.ts +11 -20
- package/dist/lib/components/Select/Select.js +40 -88
- package/dist/lib/components/Select/reducer/selectReducer.js +1 -1
- package/dist/lib/components/Selector/Selector.css +1 -1
- package/dist/lib/components/Sliders/Slider/Slider.css +1 -1
- package/dist/lib/components/Sliders/Slider/Slider.d.ts +12 -0
- package/dist/lib/components/Sliders/Slider/Slider.js +25 -6
- package/dist/lib/components/Sliders/SliderRange/SliderRange.css +1 -1
- package/dist/lib/components/Sliders/SliderRange/SliderRange.d.ts +3 -0
- package/dist/lib/components/Sliders/SliderRange/SliderRange.js +4 -1
- package/dist/lib/components/Sliders/SliderRatio/SliderRatio.css +1 -1
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.css +1 -1
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.d.ts +6 -0
- package/dist/lib/components/Sliders/components/SliderScale/SliderScale.js +9 -2
- package/dist/lib/components/Sliders/helpers.d.ts +1 -0
- package/dist/lib/components/Sliders/helpers.js +8 -1
- package/dist/lib/components/Snackbar/Snackbar.css +1 -1
- package/dist/lib/components/Snackbar/Snackbar.js +20 -21
- package/dist/lib/components/Stepper/Stepper.css +1 -0
- package/dist/lib/components/Stepper/Stepper.d.ts +52 -0
- package/dist/lib/components/Stepper/Stepper.js +168 -0
- package/dist/lib/components/Stepper/StepperItem.css +1 -0
- package/dist/lib/components/Stepper/StepperItem.d.ts +57 -0
- package/dist/lib/components/Stepper/StepperItem.js +110 -0
- package/dist/lib/components/Stepper/img/separator-mobile.png +0 -0
- package/dist/lib/components/Stepper/img/separator-vertical.png +0 -0
- package/dist/lib/components/Stepper/img/separator.png +0 -0
- package/dist/lib/components/Switcher/Switcher.css +1 -1
- package/dist/lib/components/Switcher/Switcher.d.ts +5 -0
- package/dist/lib/components/Switcher/Switcher.js +21 -9
- package/dist/lib/components/Tabs/Tabs.css +1 -1
- package/dist/lib/components/Tabs/Tabs.d.ts +2 -0
- package/dist/lib/components/Tabs/Tabs.js +64 -55
- package/dist/lib/components/TextField/TextField.css +1 -1
- package/dist/lib/components/TextField/TextField.d.ts +2 -2
- package/dist/lib/components/TextField/TextField.js +16 -9
- package/dist/lib/components/Tooltip/Tooltip.css +1 -1
- package/dist/lib/components/Tooltip/Tooltip.d.ts +9 -0
- package/dist/lib/components/Tooltip/Tooltip.js +23 -18
- package/dist/lib/components/UploadForm/UploadField/UploadField.css +1 -1
- package/dist/lib/components/UploadForm/UploadField/UploadField.d.ts +4 -1
- package/dist/lib/components/UploadForm/UploadField/UploadField.js +8 -2
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.css +1 -1
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.d.ts +3 -1
- package/dist/lib/components/UploadForm/UploadField/components/_UploadFieldDropArea/UploadFieldDropArea.js +30 -5
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.css +1 -1
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.d.ts +3 -1
- package/dist/lib/components/UploadForm/UploadFileItem/UploadFileItem.js +9 -6
- package/dist/lib/components/UploadForm/UploadFileItem/components/_UploadFileItemIcon/UploadFileItemIcon.js +6 -0
- package/dist/lib/hooks/useResolution.js +15 -23
- package/dist/lib/index.d.ts +6 -3
- package/dist/lib/index.js +32 -11
- package/package.json +5 -5
- package/styles/base.scss +54 -0
- package/styles/colors.css +14 -0
- package/dist/es/components/Button/Button.css +0 -1
- package/dist/es/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +0 -1
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +0 -1
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +0 -8
- package/dist/es/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +0 -56
- package/dist/lib/components/Button/Button.css +0 -1
- package/dist/lib/components/Modal/_ModalMobileBottom/ModalMobileBottom.css +0 -1
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.css +0 -1
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.d.ts +0 -8
- package/dist/lib/components/Modal/_ModalMobileFullScreen/ModalMobileFullScreen.js +0 -65
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-content-area_background-color_transparent{background-color:transparent}.mfui-9-content-area_background-color_black{background-color:var(--stcBlack)}.mfui-9-content-area_background-color_white{background-color:var(--stcWhite)}.mfui-9-content-area_background-color_green{background-color:var(--brandGreen)}.mfui-9-content-area_background-color_purple{background-color:var(--brandPurple)}.mfui-9-content-area_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-9-content-area_background-color_spbSky1{background-color:var(--spbSky1)}.mfui-9-content-area_background-color_spbSky2{background-color:var(--spbSky2)}.mfui-9-content-area__inner{-webkit-box-sizing:content-box;box-sizing:content-box;margin:0 auto;max-width:1440px;padding-left:80px;padding-right:80px}@media screen and (max-width:767px){.mfui-9-content-area__inner{padding-left:16px;padding-right:16px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-content-area__inner{padding-left:48px;padding-right:48px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-content-area__inner{padding-left:64px;padding-right:64px}}@media screen and (max-width:767px){.mfui-9-content-area__inner_disable-indents_mobile{padding-left:0;padding-right:0}}@media screen and (max-width:1023px){.mfui-9-content-area__inner_disable-indents_mobile-tablet{padding-left:0;padding-right:0}}@media screen and (min-width:768px){.mfui-9-content-area__inner_disable-indents_tablet-desktop{padding-left:0;padding-right:0}}.mfui-9-content-area__inner_disable-indents_all{padding-left:0;padding-right:0}@media screen and (max-width:359px){.mfui-9-content-area__inner_indents_small-mobile{padding-left:8px;padding-right:8px}}.mfui-9-content-area__inner_background-color_transparent{background-color:transparent}.mfui-9-content-area__inner_background-color_black{background-color:var(--stcBlack)}.mfui-9-content-area__inner_background-color_white{background-color:var(--stcWhite)}.mfui-9-content-area__inner_background-color_green{background-color:var(--brandGreen)}.mfui-9-content-area__inner_background-color_purple{background-color:var(--brandPurple)}.mfui-9-content-area__inner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-9-content-area__inner_background-color_spbSky1{background-color:var(--spbSky1)}.mfui-9-content-area__inner_background-color_spbSky2{background-color:var(--spbSky2)}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-content-area_background-color_transparent{background-color:transparent}.mfui-9-content-area_background-color_black{background-color:var(--stcBlack)}.mfui-9-content-area_background-color_white{background-color:var(--stcWhite)}.mfui-9-content-area_background-color_green{background-color:var(--brandGreen)}.mfui-9-content-area_background-color_purple{background-color:var(--brandPurple)}.mfui-9-content-area_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-9-content-area_background-color_spbSky1{background-color:var(--spbSky1)}.mfui-9-content-area_background-color_spbSky2{background-color:var(--spbSky2)}.mfui-9-content-area__inner{-webkit-box-sizing:content-box;box-sizing:content-box;margin:0 auto;max-width:1440px;padding-left:80px;padding-right:80px}@media screen and (max-width:767px){.mfui-9-content-area__inner{padding-left:16px;padding-right:16px}}@media screen and (min-width:768px) and (max-width:1023px){.mfui-9-content-area__inner{padding-left:48px;padding-right:48px}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-content-area__inner{padding-left:64px;padding-right:64px}}@media screen and (max-width:767px){.mfui-9-content-area__inner_disable-indents_mobile{padding-left:0;padding-right:0}}@media screen and (max-width:1023px){.mfui-9-content-area__inner_disable-indents_mobile-desktop-small,.mfui-9-content-area__inner_disable-indents_mobile-tablet{padding-left:0;padding-right:0}}@media screen and (min-width:1024px) and (max-width:1279px){.mfui-9-content-area__inner_disable-indents_mobile-desktop-small{padding-left:0;padding-right:0}}@media screen and (min-width:768px){.mfui-9-content-area__inner_disable-indents_tablet-desktop{padding-left:0;padding-right:0}}.mfui-9-content-area__inner_disable-indents_all{padding-left:0;padding-right:0}@media screen and (max-width:359px){.mfui-9-content-area__inner_indents_small-mobile{padding-left:8px;padding-right:8px}}.mfui-9-content-area__inner_background-color_transparent{background-color:transparent}.mfui-9-content-area__inner_background-color_black{background-color:var(--stcBlack)}.mfui-9-content-area__inner_background-color_white{background-color:var(--stcWhite)}.mfui-9-content-area__inner_background-color_green{background-color:var(--brandGreen)}.mfui-9-content-area__inner_background-color_purple{background-color:var(--brandPurple)}.mfui-9-content-area__inner_background-color_spbSky0{background-color:var(--spbSky0)}.mfui-9-content-area__inner_background-color_spbSky1{background-color:var(--spbSky1)}.mfui-9-content-area__inner_background-color_spbSky2{background-color:var(--spbSky2)}
|
|
@@ -14,6 +14,7 @@ export type BackgroundColorType = (typeof BACKGROUND_COLORS)[keyof typeof BACKGR
|
|
|
14
14
|
declare const DisableIndents: {
|
|
15
15
|
readonly MOBILE: "mobile";
|
|
16
16
|
readonly MOBILE_TABLET: "mobile-tablet";
|
|
17
|
+
readonly MOBILE_DESKTOP_SMALL: "mobile-desktop-small";
|
|
17
18
|
readonly TABLET_DESKTOP: "tablet-desktop";
|
|
18
19
|
readonly ALL: "all";
|
|
19
20
|
};
|
|
@@ -22,7 +23,7 @@ declare const Indents: {
|
|
|
22
23
|
};
|
|
23
24
|
type DisableIndentsType = (typeof DisableIndents)[keyof typeof DisableIndents];
|
|
24
25
|
type IndentsType = (typeof Indents)[keyof typeof Indents];
|
|
25
|
-
export interface
|
|
26
|
+
export interface IContentAreaProps {
|
|
26
27
|
/** Фоновый цвет внешнего контейнера */
|
|
27
28
|
outerBackgroundColor?: BackgroundColorType;
|
|
28
29
|
/** Фоновый цвет внутреннего контейнера */
|
|
@@ -45,5 +46,5 @@ export interface IConrentAreaProps {
|
|
|
45
46
|
};
|
|
46
47
|
children: React.ReactNode;
|
|
47
48
|
}
|
|
48
|
-
declare const ContentArea: React.FC<
|
|
49
|
+
declare const ContentArea: React.FC<IContentAreaProps>;
|
|
49
50
|
export default ContentArea;
|
|
@@ -14,8 +14,13 @@ var BACKGROUND_COLORS = {
|
|
|
14
14
|
};
|
|
15
15
|
var DisableIndents = {
|
|
16
16
|
MOBILE: 'mobile',
|
|
17
|
+
// <= 767
|
|
17
18
|
MOBILE_TABLET: 'mobile-tablet',
|
|
19
|
+
// <= 1023
|
|
20
|
+
MOBILE_DESKTOP_SMALL: 'mobile-desktop-small',
|
|
21
|
+
// <= 1279
|
|
18
22
|
TABLET_DESKTOP: 'tablet-desktop',
|
|
23
|
+
// >= 768
|
|
19
24
|
ALL: 'all'
|
|
20
25
|
};
|
|
21
26
|
var Indents = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-content-view{color:var(--content);min-width:240px;padding:0 16px;text-align:center}.mfui-9-content-view__image{display:inline-block;margin-bottom:24px;max-width:144px;vertical-align:top}.mfui-9-content-view__bg-image{background-repeat:no-repeat;background-size:100%;display:inline-block;height:144px;margin-bottom:24px;vertical-align:top;width:144px}.mfui-9-content-view__bg-image_type_waiting{background-image:url(img/waiting.png)}.mfui-9-content-view__bg-image_type_error{background-image:url(img/error.png)}.mfui-9-content-view__bg-image_type_submit{background-image:url(img/submit.png)}.mfui-9-content-view__bg-image_type_success{background-image:url(img/success.png)}.mfui-9-content-view__bg-image_type_fail{background-image:url(img/fail.png)}.mfui-9-content-view__bg-image_type_update{background-image:url(img/update.png)}.mfui-9-content-view__bg-image_type_alarm{background-image:url(img/alarm.png)}.mfui-9-content-view__bg-image_type_empty{background-image:url(img/empty.png)}.mfui-9-content-view__bg-image_type_searchNoResult{background-image:url(img/searchNoResult.png)}.mfui-9-content-view__title{font-size:18px;font-weight:500;line-height:24px}@media screen and (min-width:768px){.mfui-9-content-view__title{font-size:20px;letter-spacing:.5px;line-height:28px}}.mfui-9-content-view__text{font-size:15px;font-weight:400;line-height:24px;margin-top:4px}.mfui-9-content-view__buttons{gap:12px;padding-top:32px}.mfui-9-content-view__buttons
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-content-view{color:var(--content);min-width:240px;padding:0 16px;text-align:center}.mfui-9-content-view__image{display:inline-block;margin-bottom:24px;max-width:144px;vertical-align:top}.mfui-9-content-view__bg-image{background-repeat:no-repeat;background-size:100%;display:inline-block;height:144px;margin-bottom:24px;vertical-align:top;width:144px}.mfui-9-content-view__bg-image_type_waiting{background-image:url(img/waiting.png)}.mfui-9-content-view__bg-image_type_error{background-image:url(img/error.png)}.mfui-9-content-view__bg-image_type_submit{background-image:url(img/submit.png)}.mfui-9-content-view__bg-image_type_success{background-image:url(img/success.png)}.mfui-9-content-view__bg-image_type_fail{background-image:url(img/fail.png)}.mfui-9-content-view__bg-image_type_update{background-image:url(img/update.png)}.mfui-9-content-view__bg-image_type_alarm{background-image:url(img/alarm.png)}.mfui-9-content-view__bg-image_type_empty{background-image:url(img/empty.png)}.mfui-9-content-view__bg-image_type_searchNoResult{background-image:url(img/searchNoResult.png)}.mfui-9-content-view__title{font-size:18px;font-weight:500;line-height:24px}@media screen and (min-width:768px){.mfui-9-content-view__title{font-size:20px;letter-spacing:.5px;line-height:28px}}.mfui-9-content-view__text{font-size:15px;font-weight:400;line-height:24px;margin-top:4px}.mfui-9-content-view__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-top:32px}@media screen and (min-width:768px){.mfui-9-content-view__buttons{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}}.mfui-9-content-view__buttons_fullwidth{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}@media screen and (min-width:768px){.mfui-9-content-view__link_indent{margin-left:16px}}.mfui-9-content-view_fullscreen{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;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-height:100%}.mfui-9-content-view_fullscreen .mfui-9-content-view__content{margin-top:auto}.mfui-9-content-view_fullscreen .mfui-9-content-view__buttons{margin-top:auto;padding-bottom:24px}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import './ContentView.scss';
|
|
3
|
-
type
|
|
3
|
+
type ButtonParamsType = {
|
|
4
4
|
/** Текст */
|
|
5
5
|
text?: string;
|
|
6
6
|
/** Атрибут href */
|
|
@@ -14,12 +14,19 @@ type ElementType = {
|
|
|
14
14
|
/** Обработчик клика */
|
|
15
15
|
onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
|
|
16
16
|
};
|
|
17
|
+
type LinkParamsType = ButtonParamsType & {
|
|
18
|
+
/** Тема */
|
|
19
|
+
theme?: 'green' | 'gray';
|
|
20
|
+
/** Тип */
|
|
21
|
+
type?: 'primary' | 'text';
|
|
22
|
+
};
|
|
17
23
|
export interface IContentViewProps {
|
|
18
24
|
/** Дополнительный класс корневого элемента */
|
|
19
25
|
className?: string;
|
|
20
26
|
/** Дополнительные классы для внутренних элементов */
|
|
21
27
|
classes?: {
|
|
22
28
|
title?: string;
|
|
29
|
+
buttons?: string;
|
|
23
30
|
button?: string;
|
|
24
31
|
link?: string;
|
|
25
32
|
bgImage?: string;
|
|
@@ -33,9 +40,13 @@ export interface IContentViewProps {
|
|
|
33
40
|
/** Ссылка на изображение */
|
|
34
41
|
src?: string;
|
|
35
42
|
/** Параметры кнопки */
|
|
36
|
-
buttonParams?:
|
|
37
|
-
/** Параметры ссылки */
|
|
38
|
-
linkParams?:
|
|
43
|
+
buttonParams?: ButtonParamsType;
|
|
44
|
+
/** Параметры дополнительной кнопки (ссылки) */
|
|
45
|
+
linkParams?: LinkParamsType;
|
|
46
|
+
/** Растянуть кнопки на всю ширину контейнера */
|
|
47
|
+
isFullwidthButtons?: boolean;
|
|
48
|
+
/** Ограничить ширину кнопок на разрешении экрана 0-767 */
|
|
49
|
+
limitButtonsWidthOnMobile?: boolean;
|
|
39
50
|
/** Полноэкранный режим */
|
|
40
51
|
isFullscreen?: boolean;
|
|
41
52
|
/** Дополнительные data атрибуты к внутренним элементам */
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import "core-js/modules/es.string.link.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, convert, filterDataAttrs, titleConvertConfig } from '@megafon/ui-helpers';
|
|
5
|
-
import Button from "../Button/Button";
|
|
5
|
+
import Button from "../Buttons/Button/Button";
|
|
6
6
|
import "./ContentView.css";
|
|
7
7
|
var cn = cnCreate('mfui-9-content-view');
|
|
8
8
|
var ContentView = function ContentView(_ref) {
|
|
@@ -16,6 +16,10 @@ var ContentView = function ContentView(_ref) {
|
|
|
16
16
|
src = _ref.src,
|
|
17
17
|
buttonParams = _ref.buttonParams,
|
|
18
18
|
linkParams = _ref.linkParams,
|
|
19
|
+
_ref$isFullwidthButto = _ref.isFullwidthButtons,
|
|
20
|
+
isFullwidthButtons = _ref$isFullwidthButto === void 0 ? false : _ref$isFullwidthButto,
|
|
21
|
+
_ref$limitButtonsWidt = _ref.limitButtonsWidthOnMobile,
|
|
22
|
+
limitButtonsWidthOnMobile = _ref$limitButtonsWidt === void 0 ? false : _ref$limitButtonsWidt,
|
|
19
23
|
isFullscreen = _ref.isFullscreen,
|
|
20
24
|
dataAttrs = _ref.dataAttrs,
|
|
21
25
|
children = _ref.children;
|
|
@@ -39,24 +43,33 @@ var ContentView = function ContentView(_ref) {
|
|
|
39
43
|
}, convert(title, titleConvertConfig)), !!children && /*#__PURE__*/React.createElement("div", {
|
|
40
44
|
className: cn('text')
|
|
41
45
|
}, children)), showButtons && /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: cn('buttons'
|
|
46
|
+
className: cn('buttons', {
|
|
47
|
+
fullwidth: isFullwidthButtons
|
|
48
|
+
}, [classes.buttons])
|
|
43
49
|
}, !!(buttonParams === null || buttonParams === void 0 ? void 0 : buttonParams.text) && /*#__PURE__*/React.createElement(Button, {
|
|
44
50
|
className: cn('button', [classes.button]),
|
|
45
51
|
href: buttonParams.href,
|
|
46
52
|
target: buttonParams.target,
|
|
47
53
|
disabled: buttonParams.disabled,
|
|
48
54
|
showLoader: buttonParams.showLoader,
|
|
55
|
+
fullWidth: isFullwidthButtons,
|
|
56
|
+
fullWidthMobile: !limitButtonsWidthOnMobile,
|
|
49
57
|
onClick: buttonParams.onClick,
|
|
50
58
|
dataAttrs: {
|
|
51
59
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.button
|
|
52
60
|
}
|
|
53
61
|
}, buttonParams.text), !!(linkParams === null || linkParams === void 0 ? void 0 : linkParams.text) && /*#__PURE__*/React.createElement(Button, {
|
|
54
|
-
className: cn('link',
|
|
55
|
-
|
|
62
|
+
className: cn('link', {
|
|
63
|
+
indent: linkParams.type === 'text'
|
|
64
|
+
}, [classes.link]),
|
|
65
|
+
type: linkParams.type || 'primary',
|
|
66
|
+
theme: linkParams.theme || 'gray',
|
|
56
67
|
href: linkParams.href,
|
|
57
68
|
target: linkParams.target,
|
|
58
69
|
disabled: linkParams.disabled,
|
|
59
70
|
showLoader: linkParams.showLoader,
|
|
71
|
+
fullWidth: isFullwidthButtons,
|
|
72
|
+
fullWidthMobile: !limitButtonsWidthOnMobile,
|
|
60
73
|
onClick: linkParams.onClick,
|
|
61
74
|
dataAttrs: {
|
|
62
75
|
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.link
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-counter{-webkit-box-pack:justify;-ms-flex-pack:justify;
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-counter{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-sizing:border-box;box-sizing:border-box;justify-content:space-between;width:120px}.mfui-9-counter_size_small{height:32px}.mfui-9-counter_size_medium{height:40px}.mfui-9-counter_size_large{height:52px}.mfui-9-counter__btn{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--spbSky0);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:20px;height:100%;justify-content:center;margin:0;max-width:32px;outline:none;padding:0;text-decoration:none;-webkit-transition:background-color .3s,color .3s;transition:background-color .3s,color .3s;width:100%;fill:var(--content);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-counter__btn:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-counter__btn:focus{outline:none}@media screen and (min-width:768px){.mfui-9-counter__btn:hover{background-color:var(--spbSky1)}}.mfui-9-counter__btn:disabled{cursor:default}.mfui-9-counter__btn:disabled .mfui-9-counter__icon{fill:var(--spbSky2)}.mfui-9-counter__btn:disabled:hover{background-color:var(--spbSky0)}.mfui-9-counter__btn_left{border-bottom-left-radius:16px;border-top-left-radius:16px}.mfui-9-counter__btn_left:focus-visible{z-index:1}.mfui-9-counter__btn_right{border-bottom-right-radius:16px;border-top-right-radius:16px}.mfui-9-counter__icon{display:block;height:20px;width:20px}.mfui-9-counter__input-box{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden}.mfui-9-counter__input,.mfui-9-counter__input-box{-webkit-box-sizing:border-box;box-sizing:border-box;height:100%}.mfui-9-counter__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--spbSky0);border:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;color:var(--content);cursor:text;margin:0;outline:none;overflow:auto;padding:0;text-align:center;width:100%}.mfui-9-counter_disabled .mfui-9-counter__btn{cursor:default}.mfui-9-counter_disabled .mfui-9-counter__input{color:var(--spbSky3);cursor:default}.mfui-9-counter_disabled .mfui-9-counter__icon{fill:var(--spbSky2)}
|
|
@@ -8,6 +8,8 @@ export interface ICounterProps {
|
|
|
8
8
|
plus?: Record<string, string>;
|
|
9
9
|
input?: Record<string, string>;
|
|
10
10
|
};
|
|
11
|
+
/** Размер компонента */
|
|
12
|
+
size?: 'small' | 'medium' | 'large';
|
|
11
13
|
/** Переводит компонент в контролируемое состояние */
|
|
12
14
|
isControlled?: boolean;
|
|
13
15
|
/** Внешнее значение для контролируемого компонента */
|
|
@@ -10,19 +10,21 @@ var IconMinus = function IconMinus(props) {
|
|
|
10
10
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
11
11
|
viewBox: "0 0 20 20"
|
|
12
12
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
|
-
d: "
|
|
13
|
+
d: "M14 9a1 1 0 110 2H6a1 1 0 110-2h8z"
|
|
14
14
|
}));
|
|
15
15
|
};
|
|
16
16
|
var IconPlus = function IconPlus(props) {
|
|
17
17
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
18
18
|
viewBox: "0 0 20 20"
|
|
19
19
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
20
|
-
d: "
|
|
20
|
+
d: "M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z"
|
|
21
21
|
}));
|
|
22
22
|
};
|
|
23
23
|
var cn = cnCreate('mfui-9-counter');
|
|
24
24
|
var Counter = function Counter(_ref) {
|
|
25
25
|
var dataAttrs = _ref.dataAttrs,
|
|
26
|
+
_ref$size = _ref.size,
|
|
27
|
+
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
26
28
|
_ref$isControlled = _ref.isControlled,
|
|
27
29
|
isControlled = _ref$isControlled === void 0 ? false : _ref$isControlled,
|
|
28
30
|
_ref$value = _ref.value,
|
|
@@ -88,7 +90,8 @@ var Counter = function Counter(_ref) {
|
|
|
88
90
|
}, [handleValueChange, min, max]);
|
|
89
91
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
90
92
|
className: cn({
|
|
91
|
-
disabled: disabled
|
|
93
|
+
disabled: disabled,
|
|
94
|
+
size: size
|
|
92
95
|
}, [className, classes.root])
|
|
93
96
|
}), /*#__PURE__*/React.createElement("button", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.minus), {
|
|
94
97
|
className: cn('btn', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}@-webkit-keyframes dropdownAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes dropdownAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.mfui-9-dropdown{background-color:var(--base);border-radius:16px;-webkit-box-shadow:0 4px 16px rgba(0,0,0,.08);box-shadow:0 4px 16px rgba(0,0,0,.08);left:0;opacity:0;padding:16px;pointer-events:none;position:absolute;right:0;top:calc(100% +
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}@-webkit-keyframes dropdownAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes dropdownAppear{0%{opacity:0;-webkit-transform:translateY(-25px);transform:translateY(-25px)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.mfui-9-dropdown{background-color:var(--base);border-radius:16px;-webkit-box-shadow:0 4px 16px rgba(0,0,0,.08);box-shadow:0 4px 16px rgba(0,0,0,.08);left:0;opacity:0;padding:16px;pointer-events:none;position:absolute;right:0;top:calc(100% + 1px);-webkit-transform:translateY(-25px);transform:translateY(-25px);-webkit-transition:opacity .3s ease-in-out,-webkit-transform .3s ease-in-out;transition:opacity .3s ease-in-out,-webkit-transform .3s ease-in-out;transition:opacity .3s ease-in-out,transform .3s ease-in-out;transition:opacity .3s ease-in-out,transform .3s ease-in-out,-webkit-transform .3s ease-in-out;z-index:1000}.mfui-9-dropdown_visible{opacity:1;pointer-events:auto;-webkit-transform:translateY(0);transform:translateY(0)}.mfui-9-dropdown_short .mfui-9-dropdown__list{max-height:200px}.mfui-9-dropdown__list{max-height:300px;overflow-y:auto;scrollbar-color:var(--spbSky2) transparent;scrollbar-width:thin}.mfui-9-dropdown__list::-webkit-scrollbar{width:8px}.mfui-9-dropdown__item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:8px;color:var(--content);cursor:pointer;padding:12px 32px;-webkit-transition:background-color .2s;transition:background-color .2s}.mfui-9-dropdown__item:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:-4px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-dropdown__item:focus{outline:none}.mfui-9-dropdown__item:hover,.mfui-9-dropdown__item_hovered{background-color:var(--spbSky0)}.mfui-9-dropdown__item_active{font-weight:500}.mfui-9-dropdown__item_paddings_small{padding:8px 12px}.mfui-9-dropdown__item_paddings_large{padding:16px 20px}.mfui-9-dropdown__empty{color:var(--spbSky3);padding:12px 16px;text-align:center}.mfui-9-dropdown__header{overflow:hidden;width:100%}.mfui-9-dropdown_disabled{opacity:.5;pointer-events:none}
|
|
@@ -9,7 +9,7 @@ type ViewCallbackArguments = {
|
|
|
9
9
|
isItemActive: boolean;
|
|
10
10
|
filterValue?: string;
|
|
11
11
|
};
|
|
12
|
-
type DropdownItemsPaddingType = (typeof DropdownItemsPaddings)[keyof typeof DropdownItemsPaddings];
|
|
12
|
+
export type DropdownItemsPaddingType = (typeof DropdownItemsPaddings)[keyof typeof DropdownItemsPaddings];
|
|
13
13
|
export type DropdownItemType<T extends DropdownItemValueType> = {
|
|
14
14
|
/** Заголовок элемента */
|
|
15
15
|
title: string;
|
|
@@ -33,8 +33,12 @@ export interface IDropdownProps<T extends DropdownItemValueType> {
|
|
|
33
33
|
isOpen?: boolean;
|
|
34
34
|
/** Реф элемента, к которому привязывается дропдаун */
|
|
35
35
|
targetRef: React.RefObject<HTMLElement>;
|
|
36
|
+
/** Индекс выделенного элемента */
|
|
37
|
+
hoveredIndex?: number;
|
|
36
38
|
/** Текст при отсутствии элементов */
|
|
37
39
|
emptyText?: string;
|
|
40
|
+
/** Контент, отображаемый в шапке дропдауна */
|
|
41
|
+
headerContent?: React.ReactNode;
|
|
38
42
|
/** Отключение компонента */
|
|
39
43
|
disabled?: boolean;
|
|
40
44
|
/** Отображать короткий выпадающий список */
|
|
@@ -58,5 +62,5 @@ export interface IDropdownProps<T extends DropdownItemValueType> {
|
|
|
58
62
|
/** Обработчик закрытия списка */
|
|
59
63
|
onClose?: () => void;
|
|
60
64
|
}
|
|
61
|
-
declare const Dropdown: <T extends DropdownItemValueType>({ items, value, filterValue, isOpen, targetRef, emptyText, disabled, short, className, classes, dataAttrs, onItemClick, onClose, }: IDropdownProps<T>) => JSX.Element | null;
|
|
65
|
+
declare const Dropdown: <T extends DropdownItemValueType>({ items, value, filterValue, isOpen, hoveredIndex, targetRef, emptyText, headerContent, disabled, short, className, classes, dataAttrs, onItemClick, onClose, }: IDropdownProps<T>) => JSX.Element | null;
|
|
62
66
|
export default Dropdown;
|
|
@@ -1,6 +1,5 @@
|
|
|
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.find-index.js";
|
|
4
3
|
import "core-js/modules/es.array.map.js";
|
|
5
4
|
import * as React from 'react';
|
|
6
5
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
@@ -17,9 +16,11 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
17
16
|
filterValue = _ref.filterValue,
|
|
18
17
|
_ref$isOpen = _ref.isOpen,
|
|
19
18
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
19
|
+
hoveredIndex = _ref.hoveredIndex,
|
|
20
20
|
targetRef = _ref.targetRef,
|
|
21
21
|
_ref$emptyText = _ref.emptyText,
|
|
22
22
|
emptyText = _ref$emptyText === void 0 ? 'Нет элементов' : _ref$emptyText,
|
|
23
|
+
headerContent = _ref.headerContent,
|
|
23
24
|
_ref$disabled = _ref.disabled,
|
|
24
25
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
25
26
|
_ref$short = _ref["short"],
|
|
@@ -30,14 +31,14 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
30
31
|
dataAttrs = _ref.dataAttrs,
|
|
31
32
|
onItemClick = _ref.onItemClick,
|
|
32
33
|
onClose = _ref.onClose;
|
|
33
|
-
var _React$useState = React.useState(
|
|
34
|
+
var _React$useState = React.useState(false),
|
|
34
35
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var _React$useState3 = React.useState(
|
|
36
|
+
isVisible = _React$useState2[0],
|
|
37
|
+
setIsVisible = _React$useState2[1];
|
|
38
|
+
var _React$useState3 = React.useState(null),
|
|
38
39
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
mouseOverIndex = _React$useState4[0],
|
|
41
|
+
setMouseOverIndex = _React$useState4[1];
|
|
41
42
|
var dropdownRef = React.useRef(null);
|
|
42
43
|
var handleOutsideClick = React.useCallback(function (event) {
|
|
43
44
|
var target = event.target;
|
|
@@ -45,17 +46,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
45
46
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
46
47
|
}
|
|
47
48
|
}, [onClose, targetRef]);
|
|
48
|
-
var handleItemHover = function handleItemHover(index) {
|
|
49
|
-
return function () {
|
|
50
|
-
setHoveredIndex(index);
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
49
|
React.useEffect(function () {
|
|
54
50
|
if (isOpen) {
|
|
55
51
|
document.addEventListener('mousedown', handleOutsideClick);
|
|
56
|
-
setHoveredIndex(items.findIndex(function (item) {
|
|
57
|
-
return item.value === value;
|
|
58
|
-
}));
|
|
59
52
|
// Добавляем небольшую задержку перед показом для корректной анимации
|
|
60
53
|
requestAnimationFrame(function () {
|
|
61
54
|
setIsVisible(true);
|
|
@@ -63,6 +56,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
63
56
|
} else {
|
|
64
57
|
document.removeEventListener('mousedown', handleOutsideClick);
|
|
65
58
|
setIsVisible(false);
|
|
59
|
+
setMouseOverIndex(null);
|
|
66
60
|
}
|
|
67
61
|
return function () {
|
|
68
62
|
document.removeEventListener('mousedown', handleOutsideClick);
|
|
@@ -80,9 +74,19 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
80
74
|
}
|
|
81
75
|
return item.view;
|
|
82
76
|
};
|
|
77
|
+
var handleKeyDown = React.useCallback(function (e, index) {
|
|
78
|
+
if (e.code === 'Enter') {
|
|
79
|
+
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(index)(e);
|
|
80
|
+
}
|
|
81
|
+
}, [onItemClick]);
|
|
82
|
+
var handleItemMouseEnter = React.useCallback(function (index) {
|
|
83
|
+
return function () {
|
|
84
|
+
setMouseOverIndex(index);
|
|
85
|
+
};
|
|
86
|
+
}, []);
|
|
83
87
|
var renderItem = function renderItem(item, index) {
|
|
84
88
|
var isActive = item.value === value;
|
|
85
|
-
var isHovered = index === hoveredIndex;
|
|
89
|
+
var isHovered = index === (mouseOverIndex !== null && mouseOverIndex !== void 0 ? mouseOverIndex : hoveredIndex);
|
|
86
90
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
87
91
|
key: item.value
|
|
88
92
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, index + 1), {
|
|
@@ -92,25 +96,30 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
92
96
|
paddings: item.paddings
|
|
93
97
|
}, [classes.item]),
|
|
94
98
|
onClick: onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(index),
|
|
95
|
-
onMouseEnter: handleItemHover(index),
|
|
96
99
|
role: "option",
|
|
97
100
|
"aria-selected": isActive,
|
|
98
|
-
tabIndex:
|
|
101
|
+
tabIndex: 0,
|
|
102
|
+
onKeyDown: function onKeyDown(e) {
|
|
103
|
+
return handleKeyDown(e, index);
|
|
104
|
+
},
|
|
105
|
+
onMouseEnter: handleItemMouseEnter(index)
|
|
99
106
|
}), getItemContent(item, isActive));
|
|
100
107
|
};
|
|
101
108
|
if (!isOpen) {
|
|
102
109
|
return null;
|
|
103
110
|
}
|
|
104
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
112
|
+
ref: dropdownRef,
|
|
105
113
|
className: cn({
|
|
106
114
|
visible: isVisible,
|
|
107
115
|
disabled: disabled,
|
|
108
116
|
"short": _short
|
|
109
117
|
}, [className, classes.root]),
|
|
110
118
|
role: "listbox",
|
|
111
|
-
tabIndex:
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
tabIndex: -1
|
|
120
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), !!headerContent && /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: cn('header')
|
|
122
|
+
}, headerContent), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.list), {
|
|
114
123
|
className: cn('list', [classes.list])
|
|
115
124
|
}), items.length > 0 ? items.map(renderItem) : /*#__PURE__*/React.createElement("div", {
|
|
116
125
|
className: cn('empty')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-error-load{background:inherit}.mfui-9-error-load_cardinal_vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;-ms-flex-align:center;-ms-flex-item-align:stretch;align-self:stretch}.mfui-9-error-load_cardinal_horizontal,.mfui-9-error-load_cardinal_vertical{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.mfui-9-error-load_cardinal_horizontal{gap:8px;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-error-load__header{text-align:center}.mfui-9-error-load__text .mfui-9-error-load__caption_background_on-color,.mfui-9-error-load__text .mfui-9-error-load__header_background_on-color{color:var(--stcWhite)}.mfui-9-error-load__text .mfui-9-error-load__caption_background_on-base{color:var(--spbSky3)}.mfui-9-error-load__text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px}.mfui-9-error-load__text_cardinal_vertical{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:stretch;align-self:stretch}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-error-load{background:inherit}.mfui-9-error-load_cardinal_vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:12px;-ms-flex-align:center;-ms-flex-item-align:stretch;align-self:stretch}.mfui-9-error-load_cardinal_horizontal,.mfui-9-error-load_cardinal_vertical{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.mfui-9-error-load_cardinal_horizontal{gap:8px;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.mfui-9-error-load_cardinal_horizontal .mfui-9-error-load__header{text-align:left}.mfui-9-error-load__header{text-align:center}.mfui-9-error-load__text .mfui-9-error-load__caption_background_on-color,.mfui-9-error-load__text .mfui-9-error-load__header_background_on-color{color:var(--stcWhite)}.mfui-9-error-load__text .mfui-9-error-load__caption_background_on-base{color:var(--spbSky3)}.mfui-9-error-load__text{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:4px}.mfui-9-error-load__text_cardinal_vertical{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-item-align:stretch;align-self:stretch}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IButtonProps } from '../Button/Button';
|
|
2
|
+
import { IButtonProps } from '../Buttons/Button/Button';
|
|
3
3
|
import './ErrorLoad.scss';
|
|
4
4
|
type ButtonProps = Pick<IButtonProps, 'disabled' | 'showLoader' | 'onClick'>;
|
|
5
5
|
export interface IErrorLoadProps {
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import "core-js/modules/es.string.big.js";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
5
|
-
import Button from "../Button/Button";
|
|
5
|
+
import Button from "../Buttons/Button/Button";
|
|
6
6
|
import Caption from "../Caption/Caption";
|
|
7
7
|
import Header from "../Header/Header";
|
|
8
8
|
import "./ErrorLoad.css";
|
|
@@ -10,9 +10,7 @@ var RefreshIcon24 = function RefreshIcon24(props) {
|
|
|
10
10
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
11
11
|
viewBox: "0 0 32 32"
|
|
12
12
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
13
|
-
|
|
14
|
-
clipRule: "evenodd",
|
|
15
|
-
d: "M16.064 8C11.604 8 8 11.588 8 16s3.604 8 8.064 8c4.1 0 7.478-3.033 7.995-6.948l1.983.262C25.393 22.223 21.17 26 16.064 26 10.513 26 6 21.53 6 16S10.513 6 16.064 6c3.456 0 6.507 1.731 8.32 4.371l.704-2.345 1.915.575-1.419 4.726a1 1 0 01-1.228.675l-4.855-1.364.541-1.925 2.664.748A8.074 8.074 0 0016.064 8z"
|
|
13
|
+
d: "M15.698 5.172a11.6 11.6 0 019.24 4.562l.079-.83a1.547 1.547 0 013.083.285l-.353 3.797a2.323 2.323 0 01-2.526 2.098l-3.796-.352a1.549 1.549 0 01.286-3.083l.854.079a8.508 8.508 0 00-6.867-3.46c-4.703 0-8.493 3.776-8.493 8.406 0 4.63 3.79 8.405 8.493 8.405 3.787 0 6.989-2.452 8.086-5.828a1.549 1.549 0 012.946.957c-1.505 4.628-5.879 7.968-11.032 7.968-6.387 0-11.588-5.137-11.589-11.502 0-6.365 5.202-11.502 11.59-11.502z"
|
|
16
14
|
}));
|
|
17
15
|
};
|
|
18
16
|
var cn = cnCreate('mfui-9-error-load');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-link{border-radius:8px}.mfui-9-link:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-link:focus{outline:none}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { filterDataAttrs } from '@megafon/ui-helpers';
|
|
3
|
+
import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
|
|
4
|
+
import "./Link.css";
|
|
5
|
+
var cn = cnCreate('mfui-9-link');
|
|
4
6
|
var Link = function Link(_ref) {
|
|
5
7
|
var target = _ref.target,
|
|
6
8
|
href = _ref.href,
|
|
@@ -12,7 +14,7 @@ var Link = function Link(_ref) {
|
|
|
12
14
|
children = _ref.children,
|
|
13
15
|
dataAttrs = _ref.dataAttrs;
|
|
14
16
|
return /*#__PURE__*/React.createElement("a", _extends({
|
|
15
|
-
className: className,
|
|
17
|
+
className: cn([className]),
|
|
16
18
|
href: href,
|
|
17
19
|
target: target,
|
|
18
20
|
rel: rel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-list-data{
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-list-data{border:none;border-radius:16px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--content);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:12px 16px 12px 12px;position:relative;text-decoration:none;-webkit-transition:background-color,opacity,-webkit-box-shadow;transition:background-color,opacity,-webkit-box-shadow;transition:background-color,opacity,box-shadow;transition:background-color,opacity,box-shadow,-webkit-box-shadow;-webkit-transition-duration:.3s;transition-duration:.3s;width:100%}.mfui-9-list-data,.mfui-9-list-data__icon-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.mfui-9-list-data__icon-container{-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:12px;height:40px;justify-content:center;margin-right:8px;width:40px}.mfui-9-list-data__icon-container svg{fill:var(--content)}.mfui-9-list-data__icon-container_colored{background-color:var(--brandGreen20)}.mfui-9-list-data__icon-container_colored svg{fill:var(--brandGreen)}.mfui-9-list-data__icon{border-radius:8px;height:32px;min-width:32px;width:32px}.mfui-9-list-data__icon:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-list-data__icon:focus{outline:none}.mfui-9-list-data__icon_small{border-radius:8px;height:20px;min-width:20px;width:20px}.mfui-9-list-data__header{display:grid;grid-template-columns:100%;margin-right:auto;padding-left:4px}.mfui-9-list-data__header_gap{padding-right:8px}.mfui-9-list-data__header_align{-ms-flex-item-align:end;align-self:flex-end}.mfui-9-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-9-list-data__title-link{color:var(--content)}.mfui-9-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-9-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-9-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-9-list-data__value_color_green{color:var(--brandGreen)}.mfui-9-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-9-list-data__action-icon{fill:var(--spbSky3)}.mfui-9-list-data__action-icon_active{cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-transition:fill .3s;transition:fill .3s}.mfui-9-list-data__action-icon_active:hover{fill:var(--content)}.mfui-9-list-data__children{display:-webkit-box;display:-ms-flexbox;display:flex;gap:4px}.mfui-9-list-data__children_event-none{pointer-events:none}.mfui-9-list-data_active:not(.mfui-9-list-data_disabled){cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfui-9-list-data_active:not(.mfui-9-list-data_disabled):hover{background-color:var(--spbSky0)}.mfui-9-list-data_active:not(.mfui-9-list-data_disabled).mfui-9-list-data_view_gray:hover{background-color:var(--spbSky1)}.mfui-9-list-data_active:not(.mfui-9-list-data_disabled).mfui-9-list-data_view_white:hover{background-color:var(--base);-webkit-box-shadow:0 8px 28px 0 rgba(0,0,0,.1);box-shadow:0 8px 28px 0 rgba(0,0,0,.1)}.mfui-9-list-data_disabled{opacity:.5}.mfui-9-list-data_disabled .mfui-9-list-data__title-link{pointer-events:none}.mfui-9-list-data_view_default{background-color:transparent}.mfui-9-list-data_view_gray{background-color:var(--spbSky0)}.mfui-9-list-data_view_gray .mfui-9-list-data__icon-container,.mfui-9-list-data_view_white{background-color:var(--base)}
|
|
@@ -16,6 +16,12 @@ declare const ValueColors: {
|
|
|
16
16
|
readonly GREEN: "green";
|
|
17
17
|
};
|
|
18
18
|
export type ValueColorsType = (typeof ValueColors)[keyof typeof ValueColors];
|
|
19
|
+
declare const BackgroundViewColors: {
|
|
20
|
+
readonly DEFAULT: "default";
|
|
21
|
+
readonly GRAY: "gray";
|
|
22
|
+
readonly WHITE: "white";
|
|
23
|
+
};
|
|
24
|
+
export type BackgroundViewColorsType = (typeof BackgroundViewColors)[keyof typeof BackgroundViewColors];
|
|
19
25
|
declare const Actions: {
|
|
20
26
|
readonly DELETE: "delete";
|
|
21
27
|
readonly CONTROL: "control";
|
|
@@ -28,6 +34,8 @@ export interface IListDataProps {
|
|
|
28
34
|
subTitle?: string;
|
|
29
35
|
/** Значение */
|
|
30
36
|
value?: string;
|
|
37
|
+
/** Визуальный эффект фона */
|
|
38
|
+
backgroundView?: BackgroundViewColorsType;
|
|
31
39
|
/** Цвет */
|
|
32
40
|
valueColor?: ValueColorsType;
|
|
33
41
|
/** Дополнительное значение */
|
|
@@ -59,7 +67,7 @@ export interface IListDataProps {
|
|
|
59
67
|
root?: Record<string, string>;
|
|
60
68
|
actionIcon?: Record<string, string>;
|
|
61
69
|
};
|
|
62
|
-
/** Дочерние элементы: Button, Selector */
|
|
70
|
+
/** Дочерние элементы: Button, Selector, Badge */
|
|
63
71
|
children?: React.ReactNode;
|
|
64
72
|
}
|
|
65
73
|
declare const ListData: React.FC<IListDataProps>;
|
|
@@ -9,24 +9,20 @@ var DeleteIcon = function DeleteIcon(props) {
|
|
|
9
9
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10
10
|
viewBox: "0 0 20 20"
|
|
11
11
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
12
|
-
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
clipRule: "evenodd",
|
|
14
|
+
d: "M15.009 14.31c-.137 1.75-.205 2.626-.78 3.158-.574.532-1.452.532-3.207.532H8.98c-1.755 0-2.633 0-3.208-.532-.574-.532-.642-1.407-.779-3.158l-.571-7.326H15.58l-.571 7.326zm-2.846-4.97a.499.499 0 00-.706 0l-1.388 1.391-1.386-1.39a.498.498 0 00-.706 0 .502.502 0 000 .709l1.386 1.39-1.396 1.4a.502.502 0 000 .709.498.498 0 00.706 0l1.396-1.401 1.398 1.4a.498.498 0 00.706 0 .502.502 0 000-.707l-1.398-1.401 1.388-1.391a.502.502 0 000-.708z"
|
|
15
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
d: "M16.006 4a1 1 0 010 2h-12a1 1 0 110-2h12zm-3.979-2c.551 0 .997.446.997.997H6.977c0-.55.446-.997.997-.997h4.053z"
|
|
13
17
|
}));
|
|
14
18
|
};
|
|
15
19
|
var NothingIcon = function NothingIcon(props) {
|
|
16
20
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
17
21
|
viewBox: "0 0 32 32"
|
|
18
|
-
}, props), /*#__PURE__*/React.createElement("
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
23
|
-
cx: 16,
|
|
24
|
-
cy: 16,
|
|
25
|
-
r: 1.5
|
|
26
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
27
|
-
cx: 11,
|
|
28
|
-
cy: 16,
|
|
29
|
-
r: 1.5
|
|
22
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
fillRule: "evenodd",
|
|
24
|
+
clipRule: "evenodd",
|
|
25
|
+
d: "M28 16c0 6.627-5.373 12-12 12S4 22.627 4 16 9.373 4 16 4s12 5.373 12 12zM9.6 17.6a1.6 1.6 0 100-3.2 1.6 1.6 0 000 3.2zm6.4 0a1.6 1.6 0 100-3.2 1.6 1.6 0 000 3.2zm6.4 0a1.6 1.6 0 100-3.2 1.6 1.6 0 000 3.2z"
|
|
30
26
|
}));
|
|
31
27
|
};
|
|
32
28
|
var LINE_COUNT = 2;
|
|
@@ -34,6 +30,11 @@ var ValueColors = {
|
|
|
34
30
|
DEFAULT: 'default',
|
|
35
31
|
GREEN: 'green'
|
|
36
32
|
};
|
|
33
|
+
var BackgroundViewColors = {
|
|
34
|
+
DEFAULT: 'default',
|
|
35
|
+
GRAY: 'gray',
|
|
36
|
+
WHITE: 'white'
|
|
37
|
+
};
|
|
37
38
|
var Actions = {
|
|
38
39
|
DELETE: 'delete',
|
|
39
40
|
CONTROL: 'control'
|
|
@@ -43,6 +44,8 @@ var ListData = function ListData(_ref) {
|
|
|
43
44
|
var title = _ref.title,
|
|
44
45
|
subTitle = _ref.subTitle,
|
|
45
46
|
value = _ref.value,
|
|
47
|
+
_ref$backgroundView = _ref.backgroundView,
|
|
48
|
+
backgroundView = _ref$backgroundView === void 0 ? 'default' : _ref$backgroundView,
|
|
46
49
|
valueColor = _ref.valueColor,
|
|
47
50
|
subValue = _ref.subValue,
|
|
48
51
|
icon = _ref.icon,
|
|
@@ -133,7 +136,9 @@ var ListData = function ListData(_ref) {
|
|
|
133
136
|
small: isDelete
|
|
134
137
|
})
|
|
135
138
|
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.actionIcon), {
|
|
136
|
-
onClick: handleAction
|
|
139
|
+
onClick: handleAction,
|
|
140
|
+
tabIndex: disabled ? -1 : 0,
|
|
141
|
+
role: "button"
|
|
137
142
|
}), /*#__PURE__*/React.createElement(ActionIcon, {
|
|
138
143
|
className: cn('action-icon', {
|
|
139
144
|
active: !disabled
|
|
@@ -145,6 +150,7 @@ var ListData = function ListData(_ref) {
|
|
|
145
150
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
146
151
|
className: cn({
|
|
147
152
|
active: isActive,
|
|
153
|
+
view: backgroundView,
|
|
148
154
|
disabled: disabled
|
|
149
155
|
}, [className, classes.root]),
|
|
150
156
|
onClick: handleClick
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-list-data-sortable{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-9-list-data-sortable__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;border-radius:12px;justify-content:space-between}.mfui-9-list-data-sortable__item{padding-right:0}.mfui-9-list-data-sortable__control{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:12px 16px 12px 8px}.mfui-9-list-data-sortable__icon{height:32px;width:32px;fill:var(--spbSky2)}.mfui-9-list-data-sortable_gap_small{padding:2px 0}.mfui-9-list-data-sortable_gap_medium{padding:4px 0}.mfui-9-list-data-sortable_gap_large{padding:6px 0}.mfui-9-list-data-sortable_dragging{opacity:0}.mfui-9-list-data-sortable_drag-overlay .mfui-9-list-data-sortable__wrapper{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;background-color:var(--spbSky0)}.mfui-9-list-data-sortable_activator_cell:not(.mfui-9-list-data-sortable_disabled){cursor:-webkit-grab;cursor:grab}.mfui-9-list-data-sortable_activator_cell:not(.mfui-9-list-data-sortable_disabled).mfui-9-list-data-sortable_drag-overlay{cursor:-webkit-grabbing;cursor:grabbing}.mfui-9-list-data-sortable_activator_control:not(.mfui-9-list-data-sortable_disabled) .mfui-9-list-data-sortable__control{cursor:-webkit-grab;cursor:grab}.mfui-9-list-data-sortable_activator_control:not(.mfui-9-list-data-sortable_disabled).mfui-9-list-data-sortable_drag-overlay .mfui-9-list-data-sortable__control{cursor:-webkit-grabbing;cursor:grabbing}
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-list-data-sortable{border-radius:16px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfui-9-list-data-sortable:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:-6px}@-webkit-keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-list-data-sortable:focus{outline:none}.mfui-9-list-data-sortable__wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;border-radius:12px;justify-content:space-between}.mfui-9-list-data-sortable__item{padding-right:0}.mfui-9-list-data-sortable__control{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:8px;justify-content:center;margin:12px 16px 12px 8px}.mfui-9-list-data-sortable__control:focus-visible{-webkit-animation:focus-outline-shrink .3s linear forwards;animation:focus-outline-shrink .3s linear forwards;outline-offset:2px}@keyframes focus-outline-shrink{0%{outline:0 solid var(--137C)}to{outline:4px solid var(--137C)}}.mfui-9-list-data-sortable__control:focus{outline:none}.mfui-9-list-data-sortable__icon{height:32px;width:32px;fill:var(--spbSky2)}.mfui-9-list-data-sortable_gap_small{padding:2px 0}.mfui-9-list-data-sortable_gap_medium{padding:4px 0}.mfui-9-list-data-sortable_gap_large{padding:6px 0}.mfui-9-list-data-sortable_dragging{opacity:0}.mfui-9-list-data-sortable_drag-overlay .mfui-9-list-data-sortable__wrapper{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;background-color:var(--spbSky0)}.mfui-9-list-data-sortable_activator_cell:not(.mfui-9-list-data-sortable_disabled){cursor:-webkit-grab;cursor:grab}.mfui-9-list-data-sortable_activator_cell:not(.mfui-9-list-data-sortable_disabled).mfui-9-list-data-sortable_drag-overlay{cursor:-webkit-grabbing;cursor:grabbing}.mfui-9-list-data-sortable_activator_control:not(.mfui-9-list-data-sortable_disabled) .mfui-9-list-data-sortable__control{cursor:-webkit-grab;cursor:grab}.mfui-9-list-data-sortable_activator_control:not(.mfui-9-list-data-sortable_disabled).mfui-9-list-data-sortable_drag-overlay .mfui-9-list-data-sortable__control{cursor:-webkit-grabbing;cursor:grabbing}
|
|
@@ -12,9 +12,7 @@ var DragIcon = function DragIcon(props) {
|
|
|
12
12
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
13
|
viewBox: "0 0 32 32"
|
|
14
14
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
15
|
-
|
|
16
|
-
clipRule: "evenodd",
|
|
17
|
-
d: "M24 14H8v-2h16v2zm0 6H8v-2h16v2z"
|
|
15
|
+
d: "M22.4 17.799a1.6 1.6 0 110 3.199H9.6a1.6 1.6 0 110-3.2h12.8zm0-6.797a1.6 1.6 0 110 3.2H9.6a1.6 1.6 0 110-3.2h12.8z"
|
|
18
16
|
}));
|
|
19
17
|
};
|
|
20
18
|
export var ActivatorNodes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-open-body{height:100%;overflow:hidden}.mfui-9-modal__overlay{display:-webkit-box;display:-ms-flexbox;display:flex;left:0;position:fixed;top:0;z-index:1000;-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;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-animation:show-popup-overlay .3s ease-out forwards;animation:show-popup-overlay .3s ease-out forwards;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;justify-content:flex-start;opacity:0;padding:72px 0;width:100%}.mfui-9-modal__modal-content{margin:auto;position:relative}.mfui-9-modal_full-view .mfui-9-modal__overlay{display:block;padding:0}.mfui-9-modal_full-view .mfui-9-modal__modal-content{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:100%;width:100%}.mfui-9-modal_bottom-view .mfui-9-modal__overlay{bottom:0;display:block;height:auto;overflow:hidden;padding-bottom:0
|
|
1
|
+
h1,h2,h3,h4,h5{margin:0}.mfui-9-modal-open-body{height:100%;overflow:hidden}.mfui-9-modal__overlay{display:-webkit-box;display:-ms-flexbox;display:flex;left:0;position:fixed;top:0;z-index:1000;-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;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-animation:show-popup-overlay .3s ease-out forwards;animation:show-popup-overlay .3s ease-out forwards;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;justify-content:flex-start;opacity:0;padding:72px 0;width:100%}.mfui-9-modal__modal-content{margin:auto;position:relative}.mfui-9-modal_full-view .mfui-9-modal__overlay{display:block;padding:32px 0 0;top:32px}.mfui-9-modal_full-view .mfui-9-modal__modal-content{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:100%;width:100%}.mfui-9-modal_bottom-view .mfui-9-modal__overlay{bottom:0;display:block;height:auto;overflow:hidden;padding-bottom:0}.mfui-9-modal_bottom-view .mfui-9-modal__modal-content{height:100%;margin:0;outline:none;overflow:hidden}.mfui-9-modal_native-scroll .mfui-9-modal__overlay{overflow-x:hidden;overflow-y:scroll}@media screen and (hover:hover){.mfui-9-modal_native-scroll .mfui-9-modal__overlay{width:calc(100% + 15px)}}.mfui-9-modal_transition-end .mfui-9-modal__overlay{-webkit-animation:hide-popup-overlay .2s ease-in;animation:hide-popup-overlay .2s ease-in}@-webkit-keyframes show-popup-overlay{0%{opacity:0}to{opacity:1}}@keyframes show-popup-overlay{0%{opacity:0}to{opacity:1}}@-webkit-keyframes hide-popup-overlay{0%{opacity:1}to{opacity:0}}@keyframes hide-popup-overlay{0%{opacity:1}to{opacity:0}}
|