@vkontakte/vkui 4.34.0 → 4.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.browserslistrc +5 -0
- package/.cache/.eslintcache +1 -1
- package/.cache/.stylelintcache +1 -1
- package/.cache/.tsbuildinfo +291 -268
- package/.cache/ts/src/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/.cache/ts/src/components/AppRoot/AppRoot.d.ts +1 -1
- package/.cache/ts/src/components/Button/Button.d.ts +1 -1
- package/.cache/ts/src/components/CardGrid/CardGrid.d.ts +1 -1
- package/.cache/ts/src/components/Checkbox/Checkbox.d.ts +1 -1
- package/.cache/ts/src/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/.cache/ts/src/components/ConfigProvider/ConfigProviderContext.d.ts +1 -0
- package/.cache/ts/src/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/.cache/ts/src/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +2 -1
- package/.cache/ts/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/.cache/ts/src/components/Dropdown/Dropdown.d.ts +46 -5
- package/.cache/ts/src/components/Epic/Epic.d.ts +1 -1
- package/.cache/ts/src/components/FocusTrap/FocusTrap.d.ts +1 -1
- package/.cache/ts/src/components/Group/Group.d.ts +1 -1
- package/.cache/ts/src/components/HorizontalScroll/HorizontalScroll.d.ts +1 -1
- package/.cache/ts/src/components/IconButton/IconButton.d.ts +1 -1
- package/.cache/ts/src/components/Input/Input.d.ts +1 -1
- package/.cache/ts/src/components/ModalCard/ModalCard.d.ts +1 -1
- package/.cache/ts/src/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/.cache/ts/src/components/ModalPage/ModalPage.d.ts +1 -1
- package/.cache/ts/src/components/ModalRoot/ModalRoot.d.ts +1 -1
- package/.cache/ts/src/components/ModalRoot/ModalRootAdaptive.d.ts +1 -1
- package/.cache/ts/src/components/ModalRoot/ModalRootDesktop.d.ts +1 -1
- package/.cache/ts/src/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/.cache/ts/src/components/Panel/Panel.d.ts +1 -1
- package/.cache/ts/src/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/.cache/ts/src/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/.cache/ts/src/components/PopoutRoot/PopoutRoot.d.ts +1 -1
- package/.cache/ts/src/components/Popper/Popper.d.ts +18 -1
- package/.cache/ts/src/components/PopperArrow/PopperArrow.d.ts +8 -0
- package/.cache/ts/src/components/Radio/Radio.d.ts +1 -1
- package/.cache/ts/src/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/.cache/ts/src/components/RichCell/RichCell.d.ts +1 -1
- package/.cache/ts/src/components/RichTooltip/RichTooltip.d.ts +7 -2
- package/.cache/ts/src/components/Search/Search.d.ts +1 -1
- package/.cache/ts/src/components/Select/Select.d.ts +1 -1
- package/.cache/ts/src/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/.cache/ts/src/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/.cache/ts/src/components/Snackbar/Snackbar.d.ts +5 -1
- package/.cache/ts/src/components/SplitCol/SplitCol.d.ts +1 -0
- package/.cache/ts/src/components/Tabbar/Tabbar.d.ts +8 -1
- package/.cache/ts/src/components/Tabs/Tabs.d.ts +14 -3
- package/.cache/ts/src/components/TabsItem/TabsItem.d.ts +22 -1
- package/.cache/ts/src/components/Tappable/Tappable.d.ts +1 -1
- package/.cache/ts/src/components/TextTooltip/TextTooltip.d.ts +5 -1
- package/.cache/ts/src/components/Textarea/Textarea.d.ts +4 -1
- package/.cache/ts/src/components/Tooltip/Tooltip.d.ts +18 -1
- package/.cache/ts/src/components/Typography/Headline/Headline.d.ts +3 -3
- package/.cache/ts/src/components/View/View.d.ts +2 -18
- package/.cache/ts/src/components/View/ViewInfinite.d.ts +1 -1
- package/.cache/ts/src/components/WriteBar/WriteBar.d.ts +5 -1
- package/.cache/ts/src/hoc/withAdaptivity.d.ts +1 -1
- package/.cache/ts/src/hoc/withContext.d.ts +1 -1
- package/.cache/ts/src/hoc/withPlatform.d.ts +1 -1
- package/.cache/ts/src/tokenized/index.d.ts +26 -0
- package/.eslintrc.json +14 -4
- package/dist/cjs/components/AppRoot/AppRoot.js +13 -15
- package/dist/cjs/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +6 -4
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/CardScroll/CardScroll.js +3 -1
- package/dist/cjs/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js +5 -0
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.js +7 -1
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.js +477 -553
- package/dist/cjs/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cjs/components/CustomSelectDropdown/CustomSelectDropdown.js +73 -35
- package/dist/cjs/components/CustomSelectDropdown/CustomSelectDropdown.js.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.js +147 -26
- package/dist/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/Epic/Epic.js +1 -6
- package/dist/cjs/components/Epic/Epic.js.map +1 -1
- package/dist/cjs/components/FocusTrap/FocusTrap.js +9 -10
- package/dist/cjs/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/cjs/components/FormField/FormField.js +4 -10
- package/dist/cjs/components/FormField/FormField.js.map +1 -1
- package/dist/cjs/components/HorizontalCell/HorizontalCell.js +4 -7
- package/dist/cjs/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js +1 -0
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/cjs/components/Input/Input.js +3 -6
- package/dist/cjs/components/Input/Input.js.map +1 -1
- package/dist/cjs/components/MiniInfoCell/MiniInfoCell.js +2 -2
- package/dist/cjs/components/MiniInfoCell/MiniInfoCell.js.map +1 -1
- package/dist/cjs/components/ModalCardBase/ModalCardBase.js +1 -0
- package/dist/cjs/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cjs/components/NativeSelect/NativeSelect.js +1 -0
- package/dist/cjs/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cjs/components/Panel/Panel.js +1 -0
- package/dist/cjs/components/Panel/Panel.js.map +1 -1
- package/dist/cjs/components/PanelHeader/PanelHeader.js +1 -0
- package/dist/cjs/components/PanelHeader/PanelHeader.js.map +1 -1
- package/dist/cjs/components/Popper/Popper.js +16 -22
- package/dist/cjs/components/Popper/Popper.js.map +1 -1
- package/dist/cjs/components/PopperArrow/PopperArrow.js +40 -0
- package/dist/cjs/components/PopperArrow/PopperArrow.js.map +1 -0
- package/dist/cjs/components/Radio/Radio.js +1 -0
- package/dist/cjs/components/Radio/Radio.js.map +1 -1
- package/dist/cjs/components/RangeSlider/UniversalSlider.js +1 -0
- package/dist/cjs/components/RangeSlider/UniversalSlider.js.map +1 -1
- package/dist/cjs/components/RichTooltip/RichTooltip.js +6 -15
- package/dist/cjs/components/RichTooltip/RichTooltip.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +1 -0
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/cjs/components/SelectMimicry/SelectMimicry.js +4 -1
- package/dist/cjs/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/cjs/components/SimpleCell/SimpleCell.js +21 -31
- package/dist/cjs/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.js +7 -11
- package/dist/cjs/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cjs/components/SplitCol/SplitCol.js +7 -1
- package/dist/cjs/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/cjs/components/SplitLayout/SplitLayout.js +5 -8
- package/dist/cjs/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/cjs/components/Tabbar/Tabbar.js +15 -14
- package/dist/cjs/components/Tabbar/Tabbar.js.map +1 -1
- package/dist/cjs/components/TabbarItem/TabbarItem.js +8 -10
- package/dist/cjs/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.js +23 -5
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/TabsItem/TabsItem.js +39 -22
- package/dist/cjs/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/cjs/components/TextTooltip/TextTooltip.js +6 -9
- package/dist/cjs/components/TextTooltip/TextTooltip.js.map +1 -1
- package/dist/cjs/components/Textarea/Textarea.js +5 -4
- package/dist/cjs/components/Textarea/Textarea.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +94 -71
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/Typography/Headline/Headline.js +11 -2
- package/dist/cjs/components/Typography/Headline/Headline.js.map +1 -1
- package/dist/cjs/components/View/View.js +388 -453
- package/dist/cjs/components/View/View.js.map +1 -1
- package/dist/cjs/components/WriteBar/WriteBar.js +12 -5
- package/dist/cjs/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/cjs/components/WriteBarIcon/WriteBarIcon.js +3 -8
- package/dist/cjs/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/cjs/hoc/withAdaptivity.js.map +1 -1
- package/dist/cjs/hoc/withContext.js.map +1 -1
- package/dist/cjs/hoc/withPlatform.js.map +1 -1
- package/dist/cjs/hooks/useOrientationChange.js +2 -1
- package/dist/cjs/hooks/useOrientationChange.js.map +1 -1
- package/dist/cjs/tokenized/index.js +104 -0
- package/dist/cjs/tokenized/index.js.map +1 -1
- package/dist/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts +1 -1
- package/dist/components/AppRoot/AppRoot.js +13 -15
- package/dist/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +6 -4
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/CardGrid/CardGrid.d.ts +1 -1
- package/dist/components/CardScroll/CardScroll.js +3 -1
- package/dist/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.js +5 -0
- package/dist/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderContext.d.ts +1 -0
- package/dist/components/ConfigProvider/ConfigProviderContext.js +3 -0
- package/dist/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/dist/components/CustomSelect/CustomSelect.js +473 -579
- package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +2 -1
- package/dist/components/CustomSelectDropdown/CustomSelectDropdown.js +71 -35
- package/dist/components/CustomSelectDropdown/CustomSelectDropdown.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +46 -5
- package/dist/components/Dropdown/Dropdown.js +137 -27
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Epic/Epic.d.ts +1 -1
- package/dist/components/Epic/Epic.js +1 -4
- package/dist/components/Epic/Epic.js.map +1 -1
- package/dist/components/FocusTrap/FocusTrap.d.ts +1 -1
- package/dist/components/FocusTrap/FocusTrap.js +9 -9
- package/dist/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/components/FormField/FormField.js +4 -8
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/Group/Group.d.ts +1 -1
- package/dist/components/HorizontalCell/HorizontalCell.js +3 -5
- package/dist/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/components/HorizontalScroll/HorizontalScroll.d.ts +1 -1
- package/dist/components/HorizontalScroll/HorizontalScroll.js +1 -0
- package/dist/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +3 -4
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/MiniInfoCell/MiniInfoCell.js +2 -2
- package/dist/components/MiniInfoCell/MiniInfoCell.js.map +1 -1
- package/dist/components/ModalCard/ModalCard.d.ts +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.js +1 -0
- package/dist/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/components/ModalPage/ModalPage.d.ts +1 -1
- package/dist/components/ModalRoot/ModalRoot.d.ts +1 -1
- package/dist/components/ModalRoot/ModalRootAdaptive.d.ts +1 -1
- package/dist/components/ModalRoot/ModalRootDesktop.d.ts +1 -1
- package/dist/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/dist/components/NativeSelect/NativeSelect.js +1 -0
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/components/Panel/Panel.d.ts +1 -1
- package/dist/components/Panel/Panel.js +1 -0
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/components/PanelHeader/PanelHeader.js +1 -0
- package/dist/components/PanelHeader/PanelHeader.js.map +1 -1
- package/dist/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/dist/components/PopoutRoot/PopoutRoot.d.ts +1 -1
- package/dist/components/Popper/Popper.d.ts +18 -1
- package/dist/components/Popper/Popper.js +15 -22
- package/dist/components/Popper/Popper.js.map +1 -1
- package/dist/components/PopperArrow/PopperArrow.d.ts +8 -0
- package/dist/components/PopperArrow/PopperArrow.js +27 -0
- package/dist/components/PopperArrow/PopperArrow.js.map +1 -0
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +1 -0
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/dist/components/RangeSlider/UniversalSlider.js +1 -0
- package/dist/components/RangeSlider/UniversalSlider.js.map +1 -1
- package/dist/components/RichCell/RichCell.d.ts +1 -1
- package/dist/components/RichTooltip/RichTooltip.d.ts +7 -2
- package/dist/components/RichTooltip/RichTooltip.js +5 -10
- package/dist/components/RichTooltip/RichTooltip.js.map +1 -1
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +1 -0
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/dist/components/SelectMimicry/SelectMimicry.js +4 -1
- package/dist/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/components/SimpleCell/SimpleCell.js +19 -28
- package/dist/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +5 -1
- package/dist/components/Snackbar/Snackbar.js +8 -11
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/SplitCol/SplitCol.d.ts +1 -0
- package/dist/components/SplitCol/SplitCol.js +3 -0
- package/dist/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/components/SplitLayout/SplitLayout.js +4 -7
- package/dist/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/components/Tabbar/Tabbar.d.ts +8 -1
- package/dist/components/Tabbar/Tabbar.js +15 -14
- package/dist/components/Tabbar/Tabbar.js.map +1 -1
- package/dist/components/TabbarItem/TabbarItem.js +7 -9
- package/dist/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +14 -3
- package/dist/components/Tabs/Tabs.js +23 -5
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/TabsItem/TabsItem.d.ts +22 -1
- package/dist/components/TabsItem/TabsItem.js +40 -21
- package/dist/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/components/Tappable/Tappable.d.ts +1 -1
- package/dist/components/TextTooltip/TextTooltip.d.ts +5 -1
- package/dist/components/TextTooltip/TextTooltip.js +5 -7
- package/dist/components/TextTooltip/TextTooltip.js.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +4 -1
- package/dist/components/Textarea/Textarea.js +5 -4
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +18 -1
- package/dist/components/Tooltip/Tooltip.js +89 -68
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Typography/Headline/Headline.d.ts +3 -3
- package/dist/components/Typography/Headline/Headline.js +10 -2
- package/dist/components/Typography/Headline/Headline.js.map +1 -1
- package/dist/components/View/View.d.ts +2 -18
- package/dist/components/View/View.js +384 -462
- package/dist/components/View/View.js.map +1 -1
- package/dist/components/View/ViewInfinite.d.ts +1 -1
- package/dist/components/WriteBar/WriteBar.d.ts +5 -1
- package/dist/components/WriteBar/WriteBar.js +10 -5
- package/dist/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/components/WriteBarIcon/WriteBarIcon.js +3 -6
- package/dist/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/components.css +143 -127
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheet/ActionSheet.css +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.css +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/dist/cssm/components/Alert/Alert.css +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.css +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.d.ts +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.js +13 -15
- package/dist/cssm/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cssm/components/Avatar/Avatar.css +3 -5
- package/dist/cssm/components/Badge/Badge.css +3 -3
- package/dist/cssm/components/Banner/Banner.css +5 -5
- package/dist/cssm/components/BaseGallery/BaseGallery.css +1 -1
- package/dist/cssm/components/Button/Button.css +53 -35
- package/dist/cssm/components/Button/Button.d.ts +1 -1
- package/dist/cssm/components/Button/Button.js +6 -4
- package/dist/cssm/components/Button/Button.js.map +1 -1
- package/dist/cssm/components/Calendar/Calendar.css +1 -1
- package/dist/cssm/components/CalendarDay/CalendarDay.css +1 -1
- package/dist/cssm/components/CalendarDays/CalendarDays.css +1 -1
- package/dist/cssm/components/CalendarHeader/CalendarHeader.css +1 -1
- package/dist/cssm/components/CalendarRange/CalendarRange.css +1 -1
- package/dist/cssm/components/CalendarTime/CalendarTime.css +1 -1
- package/dist/cssm/components/Card/Card.css +5 -6
- package/dist/cssm/components/CardGrid/CardGrid.css +1 -1
- package/dist/cssm/components/CardGrid/CardGrid.d.ts +1 -1
- package/dist/cssm/components/CardScroll/CardScroll.css +1 -1
- package/dist/cssm/components/CardScroll/CardScroll.js +3 -1
- package/dist/cssm/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cssm/components/Cell/Cell.css +3 -3
- package/dist/cssm/components/Cell/CellCheckbox/CellCheckbox.css +1 -1
- package/dist/cssm/components/Cell/CellDragger/CellDragger.css +1 -1
- package/dist/cssm/components/CellButton/CellButton.css +1 -1
- package/dist/cssm/components/Checkbox/Checkbox.css +1 -1
- package/dist/cssm/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/cssm/components/Chip/Chip.css +1 -1
- package/dist/cssm/components/ChipsInput/ChipsInput.css +1 -1
- package/dist/cssm/components/ChipsSelect/ChipsSelect.css +1 -1
- package/dist/cssm/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js +5 -0
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProviderContext.d.ts +1 -0
- package/dist/cssm/components/ConfigProvider/ConfigProviderContext.js +3 -0
- package/dist/cssm/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/cssm/components/ContentCard/ContentCard.css +1 -1
- package/dist/cssm/components/Counter/Counter.css +31 -31
- package/dist/cssm/components/CustomScrollView/CustomScrollView.css +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.css +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.js +473 -579
- package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.css +3 -3
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +2 -1
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.js +71 -35
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.js.map +1 -1
- package/dist/cssm/components/CustomSelectOption/CustomSelectOption.css +3 -3
- package/dist/cssm/components/DateInput/DateInput.css +1 -1
- package/dist/cssm/components/DatePicker/DatePicker.css +1 -1
- package/dist/cssm/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/cssm/components/DateRangeInput/DateRangeInput.css +1 -1
- package/dist/cssm/components/Dropdown/Dropdown.css +1 -1
- package/dist/cssm/components/Dropdown/Dropdown.d.ts +46 -5
- package/dist/cssm/components/Dropdown/Dropdown.js +137 -27
- package/dist/cssm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/cssm/components/Epic/Epic.css +1 -1
- package/dist/cssm/components/Epic/Epic.d.ts +1 -1
- package/dist/cssm/components/Epic/Epic.js +1 -4
- package/dist/cssm/components/Epic/Epic.js.map +1 -1
- package/dist/cssm/components/FixedLayout/FixedLayout.css +1 -1
- package/dist/cssm/components/FocusTrap/FocusTrap.d.ts +1 -1
- package/dist/cssm/components/FocusTrap/FocusTrap.js +9 -9
- package/dist/cssm/components/FocusTrap/FocusTrap.js.map +1 -1
- package/dist/cssm/components/FocusVisible/FocusVisible.css +1 -1
- package/dist/cssm/components/Footer/Footer.css +1 -1
- package/dist/cssm/components/FormField/FormField.css +9 -9
- package/dist/cssm/components/FormField/FormField.js +4 -8
- package/dist/cssm/components/FormField/FormField.js.map +1 -1
- package/dist/cssm/components/FormItem/FormItem.css +1 -1
- package/dist/cssm/components/FormLayout/FormLayout.css +1 -1
- package/dist/cssm/components/FormLayoutGroup/FormLayoutGroup.css +1 -1
- package/dist/cssm/components/FormStatus/FormStatus.css +1 -1
- package/dist/cssm/components/Gradient/Gradient.css +1 -1
- package/dist/cssm/components/GridAvatar/GridAvatar.css +1 -1
- package/dist/cssm/components/Group/Group.css +1 -1
- package/dist/cssm/components/Group/Group.d.ts +1 -1
- package/dist/cssm/components/Header/Header.css +1 -1
- package/dist/cssm/components/HorizontalCell/HorizontalCell.css +1 -1
- package/dist/cssm/components/HorizontalCell/HorizontalCell.js +3 -5
- package/dist/cssm/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.css +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.d.ts +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js +1 -0
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScrollArrow.css +3 -3
- package/dist/cssm/components/IconButton/IconButton.css +1 -1
- package/dist/cssm/components/IconButton/IconButton.d.ts +1 -1
- package/dist/cssm/components/InfoRow/InfoRow.css +1 -1
- package/dist/cssm/components/InitialsAvatar/InitialsAvatar.css +1 -1
- package/dist/cssm/components/Input/Input.css +1 -1
- package/dist/cssm/components/Input/Input.d.ts +1 -1
- package/dist/cssm/components/Input/Input.js +3 -4
- package/dist/cssm/components/Input/Input.js.map +1 -1
- package/dist/cssm/components/InputLike/InputLike.css +1 -1
- package/dist/cssm/components/InputLike/InputLikeDivider.css +1 -1
- package/dist/cssm/components/Link/Link.css +1 -1
- package/dist/cssm/components/MiniInfoCell/MiniInfoCell.css +1 -1
- package/dist/cssm/components/MiniInfoCell/MiniInfoCell.js +2 -2
- package/dist/cssm/components/MiniInfoCell/MiniInfoCell.js.map +1 -1
- package/dist/cssm/components/ModalCard/ModalCard.css +1 -1
- package/dist/cssm/components/ModalCard/ModalCard.d.ts +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.css +3 -3
- package/dist/cssm/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js +1 -0
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cssm/components/ModalDismissButton/ModalDismissButton.css +1 -1
- package/dist/cssm/components/ModalPage/ModalPage.css +1 -1
- package/dist/cssm/components/ModalPage/ModalPage.d.ts +1 -1
- package/dist/cssm/components/ModalPageHeader/ModalPageHeader.css +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.css +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.d.ts +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootAdaptive.d.ts +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootDesktop.d.ts +1 -1
- package/dist/cssm/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/dist/cssm/components/NativeSelect/NativeSelect.js +1 -0
- package/dist/cssm/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cssm/components/Pagination/Pagination.css +1 -1
- package/dist/cssm/components/Panel/Panel.css +1 -1
- package/dist/cssm/components/Panel/Panel.d.ts +1 -1
- package/dist/cssm/components/Panel/Panel.js +1 -0
- package/dist/cssm/components/Panel/Panel.js.map +1 -1
- package/dist/cssm/components/PanelHeader/PanelHeader.css +1 -1
- package/dist/cssm/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/cssm/components/PanelHeader/PanelHeader.js +1 -0
- package/dist/cssm/components/PanelHeader/PanelHeader.js.map +1 -1
- package/dist/cssm/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.css +1 -1
- package/dist/cssm/components/PanelHeaderContent/PanelHeaderContent.css +1 -1
- package/dist/cssm/components/PanelHeaderContext/PanelHeaderContext.css +1 -1
- package/dist/cssm/components/Placeholder/Placeholder.css +3 -3
- package/dist/cssm/components/PopoutRoot/PopoutRoot.css +1 -1
- package/dist/cssm/components/PopoutRoot/PopoutRoot.d.ts +1 -1
- package/dist/cssm/components/PopoutWrapper/PopoutWrapper.css +1 -1
- package/dist/cssm/components/Popper/Popper.css +1 -1
- package/dist/cssm/components/Popper/Popper.d.ts +18 -1
- package/dist/cssm/components/Popper/Popper.js +15 -22
- package/dist/cssm/components/Popper/Popper.js.map +1 -1
- package/dist/cssm/components/PopperArrow/PopperArrow.css +1 -0
- package/dist/cssm/components/PopperArrow/PopperArrow.d.ts +8 -0
- package/dist/cssm/components/PopperArrow/PopperArrow.js +28 -0
- package/dist/cssm/components/PopperArrow/PopperArrow.js.map +1 -0
- package/dist/cssm/components/Progress/Progress.css +1 -1
- package/dist/cssm/components/PromoBanner/PromoBanner.css +1 -1
- package/dist/cssm/components/PullToRefresh/PullToRefresh.css +3 -3
- package/dist/cssm/components/Radio/Radio.css +1 -1
- package/dist/cssm/components/Radio/Radio.d.ts +1 -1
- package/dist/cssm/components/Radio/Radio.js +1 -0
- package/dist/cssm/components/Radio/Radio.js.map +1 -1
- package/dist/cssm/components/RadioGroup/RadioGroup.css +1 -1
- package/dist/cssm/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/dist/cssm/components/RangeSlider/UniversalSlider.js +1 -0
- package/dist/cssm/components/RangeSlider/UniversalSlider.js.map +1 -1
- package/dist/cssm/components/Removable/Removable.css +1 -1
- package/dist/cssm/components/RichCell/RichCell.css +3 -3
- package/dist/cssm/components/RichCell/RichCell.d.ts +1 -1
- package/dist/cssm/components/RichTooltip/RichTooltip.css +3 -1
- package/dist/cssm/components/RichTooltip/RichTooltip.d.ts +7 -2
- package/dist/cssm/components/RichTooltip/RichTooltip.js +5 -10
- package/dist/cssm/components/RichTooltip/RichTooltip.js.map +1 -1
- package/dist/cssm/components/Root/Root.css +1 -1
- package/dist/cssm/components/ScreenSpinner/ScreenSpinner.css +1 -1
- package/dist/cssm/components/Search/Search.css +1 -1
- package/dist/cssm/components/Search/Search.d.ts +1 -1
- package/dist/cssm/components/SegmentedControl/SegmentedControl.css +1 -1
- package/dist/cssm/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.css +1 -1
- package/dist/cssm/components/Select/Select.css +1 -1
- package/dist/cssm/components/Select/Select.d.ts +1 -1
- package/dist/cssm/components/Select/Select.js +1 -0
- package/dist/cssm/components/Select/Select.js.map +1 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.js +4 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/cssm/components/Separator/Separator.css +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.css +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.js +19 -28
- package/dist/cssm/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cssm/components/SimpleCheckbox/SimpleCheckbox.css +1 -1
- package/dist/cssm/components/Slider/Slider.css +3 -3
- package/dist/cssm/components/SliderSwitch/SliderSwitch.css +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.css +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.d.ts +5 -1
- package/dist/cssm/components/Snackbar/Snackbar.js +8 -11
- package/dist/cssm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cssm/components/Spacing/Spacing.css +1 -1
- package/dist/cssm/components/Spinner/Spinner.css +1 -1
- package/dist/cssm/components/SplitCol/SplitCol.css +1 -1
- package/dist/cssm/components/SplitCol/SplitCol.d.ts +1 -0
- package/dist/cssm/components/SplitCol/SplitCol.js +3 -0
- package/dist/cssm/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/cssm/components/SplitLayout/SplitLayout.css +1 -1
- package/dist/cssm/components/SplitLayout/SplitLayout.js +4 -7
- package/dist/cssm/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/cssm/components/SubnavigationBar/SubnavigationBar.css +1 -1
- package/dist/cssm/components/SubnavigationButton/SubnavigationButton.css +1 -1
- package/dist/cssm/components/Switch/Switch.css +3 -3
- package/dist/cssm/components/Tabbar/Tabbar.css +5 -3
- package/dist/cssm/components/Tabbar/Tabbar.d.ts +8 -1
- package/dist/cssm/components/Tabbar/Tabbar.js +15 -14
- package/dist/cssm/components/Tabbar/Tabbar.js.map +1 -1
- package/dist/cssm/components/TabbarItem/TabbarItem.css +1 -1
- package/dist/cssm/components/TabbarItem/TabbarItem.js +7 -9
- package/dist/cssm/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/cssm/components/Tabs/Tabs.css +1 -1
- package/dist/cssm/components/Tabs/Tabs.d.ts +14 -3
- package/dist/cssm/components/Tabs/Tabs.js +23 -5
- package/dist/cssm/components/Tabs/Tabs.js.map +1 -1
- package/dist/cssm/components/TabsItem/TabsItem.css +5 -1
- package/dist/cssm/components/TabsItem/TabsItem.d.ts +22 -1
- package/dist/cssm/components/TabsItem/TabsItem.js +40 -21
- package/dist/cssm/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/cssm/components/Tappable/Tappable.css +5 -5
- package/dist/cssm/components/Tappable/Tappable.d.ts +1 -1
- package/dist/cssm/components/TextTooltip/TextTooltip.css +1 -1
- package/dist/cssm/components/TextTooltip/TextTooltip.d.ts +5 -1
- package/dist/cssm/components/TextTooltip/TextTooltip.js +5 -7
- package/dist/cssm/components/TextTooltip/TextTooltip.js.map +1 -1
- package/dist/cssm/components/Textarea/Textarea.css +1 -1
- package/dist/cssm/components/Textarea/Textarea.d.ts +4 -1
- package/dist/cssm/components/Textarea/Textarea.js +5 -4
- package/dist/cssm/components/Textarea/Textarea.js.map +1 -1
- package/dist/cssm/components/Tooltip/Tooltip.css +1 -1
- package/dist/cssm/components/Tooltip/Tooltip.d.ts +18 -1
- package/dist/cssm/components/Tooltip/Tooltip.js +89 -68
- package/dist/cssm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cssm/components/Typography/Caption/Caption.css +1 -1
- package/dist/cssm/components/Typography/Footnote/Footnote.css +1 -1
- package/dist/cssm/components/Typography/Headline/Headline.css +1 -1
- package/dist/cssm/components/Typography/Headline/Headline.d.ts +3 -3
- package/dist/cssm/components/Typography/Headline/Headline.js +10 -2
- package/dist/cssm/components/Typography/Headline/Headline.js.map +1 -1
- package/dist/cssm/components/Typography/Paragraph/Paragraph.css +1 -1
- package/dist/cssm/components/Typography/Subhead/Subhead.css +1 -1
- package/dist/cssm/components/Typography/Text/Text.css +1 -1
- package/dist/cssm/components/Typography/Title/Title.css +1 -1
- package/dist/cssm/components/UsersStack/UsersStack.css +5 -5
- package/dist/cssm/components/View/View.css +1 -1
- package/dist/cssm/components/View/View.d.ts +2 -18
- package/dist/cssm/components/View/View.js +384 -462
- package/dist/cssm/components/View/View.js.map +1 -1
- package/dist/cssm/components/View/ViewIOS.css +1 -1
- package/dist/cssm/components/View/ViewInfinite.d.ts +1 -1
- package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.css +1 -1
- package/dist/cssm/components/WriteBar/WriteBar.css +3 -1
- package/dist/cssm/components/WriteBar/WriteBar.d.ts +5 -1
- package/dist/cssm/components/WriteBar/WriteBar.js +10 -5
- package/dist/cssm/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.css +1 -1
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.js +3 -6
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/cssm/fonts/fonts.css +1 -1
- package/dist/cssm/hoc/withAdaptivity.d.ts +1 -1
- package/dist/cssm/hoc/withAdaptivity.js.map +1 -1
- package/dist/cssm/hoc/withContext.d.ts +1 -1
- package/dist/cssm/hoc/withContext.js.map +1 -1
- package/dist/cssm/hoc/withPlatform.d.ts +1 -1
- package/dist/cssm/hoc/withPlatform.js.map +1 -1
- package/dist/cssm/hooks/useOrientationChange.js +2 -1
- package/dist/cssm/hooks/useOrientationChange.js.map +1 -1
- package/dist/cssm/lib/calendar.d.ts +2 -2
- package/dist/cssm/styles/animations.css +1 -1
- package/dist/cssm/styles/bright_light.css +1 -1
- package/dist/cssm/styles/common.css +1 -1
- package/dist/cssm/styles/components.css +143 -127
- package/dist/cssm/styles/constants.css +3 -10
- package/dist/cssm/styles/space_gray.css +1 -1
- package/dist/cssm/styles/themes.css +1 -16
- package/dist/cssm/styles/unstable.css +3 -1
- package/dist/cssm/styles/vkcom_dark.css +1 -6
- package/dist/cssm/styles/vkcom_light.css +1 -11
- package/dist/cssm/tokenized/index.d.ts +26 -0
- package/dist/cssm/tokenized/index.js +13 -0
- package/dist/cssm/tokenized/index.js.map +1 -1
- package/dist/default_scheme.css +1 -1
- package/dist/default_scheme.css.map +1 -1
- package/dist/fonts.css +1 -1
- package/dist/fonts.css.map +1 -1
- package/dist/hoc/withAdaptivity.d.ts +1 -1
- package/dist/hoc/withAdaptivity.js.map +1 -1
- package/dist/hoc/withContext.d.ts +1 -1
- package/dist/hoc/withContext.js.map +1 -1
- package/dist/hoc/withPlatform.d.ts +1 -1
- package/dist/hoc/withPlatform.js.map +1 -1
- package/dist/hooks/useOrientationChange.js +2 -1
- package/dist/hooks/useOrientationChange.js.map +1 -1
- package/dist/lib/calendar.d.ts +2 -2
- package/dist/tokenized/index.d.ts +26 -0
- package/dist/tokenized/index.js +13 -0
- package/dist/tokenized/index.js.map +1 -1
- package/dist/unstable.css +3 -1
- package/dist/unstable.css.map +1 -1
- package/dist/vkui.css +144 -143
- package/dist/vkui.css.map +1 -1
- package/package.json +6 -5
- package/src/components/AppRoot/AppRoot.tsx +15 -11
- package/src/components/Badge/Badge.css +0 -5
- package/src/components/Button/Button.css +0 -4
- package/src/components/Button/Button.tsx +4 -2
- package/src/components/Button/Readme.md +30 -59
- package/src/components/CardScroll/CardScroll.tsx +1 -1
- package/src/components/Cell/Cell.css +3 -2
- package/src/components/ChipsInput/ChipsInput.css +2 -0
- package/src/components/ChipsSelect/ChipsSelect.tsx +8 -0
- package/src/components/ConfigProvider/ConfigProviderContext.tsx +2 -0
- package/src/components/Counter/Counter.css +30 -0
- package/src/components/CustomScrollView/CustomScrollView.css +10 -5
- package/src/components/CustomSelect/CustomSelect.tsx +543 -573
- package/src/components/CustomSelectDropdown/CustomSelectDropdown.tsx +45 -22
- package/src/components/Dropdown/Dropdown.css +12 -0
- package/src/components/Dropdown/Dropdown.tsx +174 -20
- package/src/components/Dropdown/Readme.md +1 -0
- package/src/components/Epic/Epic.tsx +1 -4
- package/src/components/FixedLayout/Readme.md +103 -109
- package/src/components/FocusTrap/FocusTrap.tsx +10 -10
- package/src/components/FormField/FormField.css +31 -22
- package/src/components/FormField/FormField.tsx +4 -8
- package/src/components/FormField/Readme.md +9 -82
- package/src/components/Group/Group.css +1 -1
- package/src/components/Group/Readme.md +1 -1
- package/src/components/HorizontalCell/HorizontalCell.css +25 -43
- package/src/components/HorizontalCell/HorizontalCell.tsx +3 -9
- package/src/components/HorizontalScroll/HorizontalScroll.css +23 -0
- package/src/components/HorizontalScroll/HorizontalScroll.tsx +2 -0
- package/src/components/IconButton/IconButton.css +46 -25
- package/src/components/Input/Input.css +20 -9
- package/src/components/Input/Input.tsx +6 -5
- package/src/components/Input/Readme.md +128 -24
- package/src/components/MiniInfoCell/MiniInfoCell.css +13 -3
- package/src/components/MiniInfoCell/MiniInfoCell.tsx +3 -3
- package/src/components/ModalCardBase/ModalCardBase.tsx +2 -0
- package/src/components/NativeSelect/NativeSelect.tsx +2 -0
- package/src/components/Panel/Panel.tsx +2 -0
- package/src/components/PanelHeader/PanelHeader.tsx +2 -0
- package/src/components/Popper/Popper.css +0 -35
- package/src/components/Popper/Popper.tsx +33 -25
- package/src/components/PopperArrow/PopperArrow.css +34 -0
- package/src/components/PopperArrow/PopperArrow.tsx +40 -0
- package/src/components/Radio/Radio.tsx +2 -0
- package/src/components/RangeSlider/UniversalSlider.tsx +2 -0
- package/src/components/RichTooltip/RichTooltip.css +44 -4
- package/src/components/RichTooltip/RichTooltip.tsx +9 -11
- package/src/components/ScreenSpinner/ScreenSpinner.css +1 -1
- package/src/components/Select/Select.css +23 -9
- package/src/components/Select/Select.tsx +2 -0
- package/src/components/SelectMimicry/SelectMimicry.tsx +6 -2
- package/src/components/SimpleCell/Readme.md +115 -129
- package/src/components/SimpleCell/SimpleCell.css +30 -68
- package/src/components/SimpleCell/SimpleCell.tsx +23 -25
- package/src/components/Snackbar/Readme.md +95 -123
- package/src/components/Snackbar/Snackbar.css +18 -27
- package/src/components/Snackbar/Snackbar.tsx +17 -11
- package/src/components/SplitCol/SplitCol.css +1 -1
- package/src/components/SplitCol/SplitCol.tsx +2 -0
- package/src/components/SplitLayout/SplitLayout.css +3 -7
- package/src/components/SplitLayout/SplitLayout.tsx +9 -6
- package/src/components/Switch/Switch.css +6 -2
- package/src/components/Tabbar/Tabbar.css +4 -1
- package/src/components/Tabbar/Tabbar.tsx +23 -12
- package/src/components/TabbarItem/TabbarItem.css +7 -5
- package/src/components/TabbarItem/TabbarItem.tsx +13 -7
- package/src/components/Tabs/Readme.md +191 -251
- package/src/components/Tabs/Tabs.css +27 -80
- package/src/components/Tabs/Tabs.tsx +45 -7
- package/src/components/TabsItem/Readme.md +1 -0
- package/src/components/TabsItem/TabsItem.css +191 -106
- package/src/components/TabsItem/TabsItem.tsx +72 -20
- package/src/components/TextTooltip/TextTooltip.css +41 -11
- package/src/components/TextTooltip/TextTooltip.tsx +9 -13
- package/src/components/Textarea/Textarea.css +7 -3
- package/src/components/Textarea/Textarea.tsx +5 -4
- package/src/components/Tooltip/Readme.md +128 -101
- package/src/components/Tooltip/Tooltip.css +29 -40
- package/src/components/Tooltip/Tooltip.tsx +98 -66
- package/src/components/Typography/Headline/Headline.tsx +15 -1
- package/src/components/View/Readme.md +2 -0
- package/src/components/View/View.tsx +451 -514
- package/src/components/WriteBar/WriteBar.css +27 -33
- package/src/components/WriteBar/WriteBar.tsx +16 -5
- package/src/components/WriteBarIcon/WriteBarIcon.css +6 -19
- package/src/components/WriteBarIcon/WriteBarIcon.tsx +6 -6
- package/src/hoc/withAdaptivity.tsx +4 -4
- package/src/hoc/withContext.tsx +1 -1
- package/src/hoc/withPlatform.tsx +1 -1
- package/src/hooks/useOrientationChange.ts +1 -0
- package/src/styles/components.css +1 -0
- package/src/styles/constants.css +8 -0
- package/src/tokenized/index.ts +39 -0
- package/tsconfig.json +1 -1
- package/.cache/ts/src/components/ClickPopper/ClickPopper.d.ts +0 -21
- package/dist/cjs/components/ClickPopper/ClickPopper.js +0 -96
- package/dist/cjs/components/ClickPopper/ClickPopper.js.map +0 -1
- package/dist/components/ClickPopper/ClickPopper.d.ts +0 -21
- package/dist/components/ClickPopper/ClickPopper.js +0 -71
- package/dist/components/ClickPopper/ClickPopper.js.map +0 -1
- package/dist/cssm/components/ClickPopper/ClickPopper.d.ts +0 -21
- package/dist/cssm/components/ClickPopper/ClickPopper.js +0 -71
- package/dist/cssm/components/ClickPopper/ClickPopper.js.map +0 -1
- package/src/components/ClickPopper/ClickPopper.tsx +0 -86
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { classNames } from "../../lib/classNames";
|
|
3
|
-
import {
|
|
3
|
+
import { animationEvent } from "../../lib/supportEvents";
|
|
4
4
|
import { IOS } from "../../lib/platform";
|
|
5
5
|
import { Touch, TouchEvent } from "../Touch/Touch";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { withContext } from "../../hoc/withContext";
|
|
9
|
-
import {
|
|
10
|
-
ConfigProviderContext,
|
|
11
|
-
ConfigProviderContextInterface,
|
|
12
|
-
} from "../ConfigProvider/ConfigProviderContext";
|
|
13
|
-
import { SplitColContext, SplitColContextProps } from "../SplitCol/SplitCol";
|
|
6
|
+
import { useConfigProvider } from "../ConfigProvider/ConfigProviderContext";
|
|
7
|
+
import { useSplitCol } from "../SplitCol/SplitCol";
|
|
14
8
|
import { AppRootPortal } from "../AppRoot/AppRootPortal";
|
|
15
|
-
import { canUseDOM,
|
|
16
|
-
import {
|
|
17
|
-
ScrollContext,
|
|
18
|
-
ScrollContextInterface,
|
|
19
|
-
} from "../AppRoot/ScrollContext";
|
|
9
|
+
import { canUseDOM, useDOM, blurActiveElement } from "../../lib/dom";
|
|
10
|
+
import { useScroll } from "../AppRoot/ScrollContext";
|
|
20
11
|
import { NavTransitionProvider } from "../NavTransitionContext/NavTransitionContext";
|
|
21
12
|
import { getNavId, NavIdProps } from "../../lib/getNavId";
|
|
22
13
|
import { warnOnce } from "../../lib/warnOnce";
|
|
14
|
+
import { usePlatform } from "../../hooks/usePlatform";
|
|
23
15
|
import { swipeBackExcluded } from "./utils";
|
|
16
|
+
import { useWaitTransitionFinish } from "../../hooks/useWaitTransitionFinish";
|
|
17
|
+
import { useTimeout } from "../../hooks/useTimeout";
|
|
18
|
+
import { usePrevious } from "../../hooks/usePrevious";
|
|
19
|
+
import { useIsomorphicLayoutEffect } from "../../lib/useIsomorphicLayoutEffect";
|
|
20
|
+
import { noop } from "../../lib/utils";
|
|
24
21
|
import "./View.css";
|
|
25
22
|
|
|
26
23
|
enum SwipeBackResults {
|
|
@@ -36,13 +33,10 @@ interface ViewsScrolls {
|
|
|
36
33
|
[index: string]: Scrolls;
|
|
37
34
|
}
|
|
38
35
|
|
|
39
|
-
type TransitionEventHandler = (e?: TransitionEvent) => void;
|
|
40
|
-
|
|
41
36
|
export let scrollsCache: ViewsScrolls = {};
|
|
42
37
|
|
|
43
38
|
export interface ViewProps
|
|
44
39
|
extends React.HTMLAttributes<HTMLElement>,
|
|
45
|
-
HasPlatform,
|
|
46
40
|
NavIdProps {
|
|
47
41
|
activePanel: string;
|
|
48
42
|
/**
|
|
@@ -71,18 +65,6 @@ export interface ViewProps
|
|
|
71
65
|
*/
|
|
72
66
|
onSwipeBackCancel?(): void;
|
|
73
67
|
history?: string[];
|
|
74
|
-
/**
|
|
75
|
-
* @ignore
|
|
76
|
-
*/
|
|
77
|
-
splitCol?: SplitColContextProps;
|
|
78
|
-
/**
|
|
79
|
-
* @ignore
|
|
80
|
-
*/
|
|
81
|
-
configProvider?: ConfigProviderContextInterface;
|
|
82
|
-
/**
|
|
83
|
-
* @ignore
|
|
84
|
-
*/
|
|
85
|
-
scroll?: ScrollContextInterface;
|
|
86
68
|
}
|
|
87
69
|
|
|
88
70
|
export interface ViewState {
|
|
@@ -106,410 +88,294 @@ export interface ViewState {
|
|
|
106
88
|
|
|
107
89
|
const warn = warnOnce("View");
|
|
108
90
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
static defaultProps: Partial<ViewProps> = {
|
|
134
|
-
history: [],
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
private readonly scrolls = scrollsCache[getNavId(this.props) as string] || {};
|
|
138
|
-
private transitionFinishTimeout: number | undefined = undefined;
|
|
139
|
-
private animationFinishTimeout: number | undefined = undefined;
|
|
140
|
-
|
|
141
|
-
get document() {
|
|
142
|
-
return this.props.document;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
get window() {
|
|
146
|
-
return this.props.window;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
get panels() {
|
|
150
|
-
return React.Children.toArray(this.props.children) as React.ReactElement[];
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
panelNodes: { [id: string]: HTMLDivElement | null } = {};
|
|
154
|
-
|
|
155
|
-
componentDidMount() {
|
|
156
|
-
if (process.env.NODE_ENV === "development") {
|
|
157
|
-
const { popout, modal } = this.props;
|
|
158
|
-
popout &&
|
|
159
|
-
warn(
|
|
160
|
-
"Свойство popout устарело и будет удалено в 5.0.0. Используйте одноименное свойство у SplitLayout."
|
|
161
|
-
);
|
|
162
|
-
modal &&
|
|
163
|
-
warn(
|
|
164
|
-
"Свойство modal устарело и будет удалено в 5.0.0. Используйте одноименное свойство у SplitLayout."
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
componentWillUnmount() {
|
|
170
|
-
const id = getNavId(this.props);
|
|
171
|
-
if (id) {
|
|
172
|
-
scrollsCache[id] = this.scrolls;
|
|
173
|
-
}
|
|
174
|
-
if (this.animationFinishTimeout) {
|
|
175
|
-
clearTimeout(this.animationFinishTimeout);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
componentDidUpdate(prevProps: ViewProps, prevState: ViewState) {
|
|
180
|
-
this.props.popout && !prevProps.popout && this.blurActiveElement();
|
|
181
|
-
this.props.modal && !prevProps.modal && this.blurActiveElement();
|
|
182
|
-
|
|
183
|
-
// Нужен переход
|
|
184
|
-
if (
|
|
185
|
-
prevProps.activePanel !== this.props.activePanel &&
|
|
186
|
-
!prevState.swipingBack &&
|
|
187
|
-
!prevState.browserSwipe
|
|
188
|
-
) {
|
|
189
|
-
const firstLayerId = this.panels
|
|
190
|
-
.map((panel) => getNavId(panel.props, warn))
|
|
191
|
-
.find(
|
|
192
|
-
(id) => id === prevProps.activePanel || id === this.props.activePanel
|
|
193
|
-
);
|
|
194
|
-
|
|
195
|
-
const isBack = firstLayerId === this.props.activePanel;
|
|
196
|
-
this.scrolls[prevProps.activePanel] = this.props.scroll?.getScroll().y;
|
|
197
|
-
|
|
198
|
-
if (this.shouldDisableTransitionMotion()) {
|
|
199
|
-
this.flushTransition(prevProps.activePanel, isBack);
|
|
200
|
-
} else {
|
|
201
|
-
this.blurActiveElement();
|
|
202
|
-
|
|
203
|
-
this.setState({
|
|
204
|
-
visiblePanels: [prevProps.activePanel, this.props.activePanel],
|
|
205
|
-
prevPanel: prevProps.activePanel,
|
|
206
|
-
nextPanel: this.props.activePanel,
|
|
207
|
-
activePanel: null,
|
|
208
|
-
animated: true,
|
|
209
|
-
isBack,
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
// Фолбек анимации перехода
|
|
213
|
-
if (!animationEvent.supported) {
|
|
214
|
-
if (this.animationFinishTimeout) {
|
|
215
|
-
clearTimeout(this.animationFinishTimeout);
|
|
216
|
-
}
|
|
217
|
-
this.animationFinishTimeout = setTimeout(
|
|
218
|
-
this.transitionEndHandler,
|
|
219
|
-
this.props.platform === IOS ? 600 : 300
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Закончилась анимация свайпа назад
|
|
226
|
-
if (
|
|
227
|
-
prevProps.activePanel !== this.props.activePanel &&
|
|
228
|
-
prevState.swipingBack
|
|
229
|
-
) {
|
|
230
|
-
const nextPanel = this.props.activePanel;
|
|
231
|
-
const prevPanel = prevProps.activePanel;
|
|
232
|
-
if (prevState.swipeBackPrevPanel !== null) {
|
|
233
|
-
this.scrolls[prevState.swipeBackPrevPanel] = 0;
|
|
234
|
-
}
|
|
235
|
-
this.setState(
|
|
236
|
-
{
|
|
237
|
-
swipeBackPrevPanel: null,
|
|
238
|
-
swipeBackNextPanel: null,
|
|
239
|
-
swipingBack: false,
|
|
240
|
-
swipeBackResult: null,
|
|
241
|
-
swipeBackStartX: 0,
|
|
242
|
-
swipeBackShift: 0,
|
|
243
|
-
activePanel: nextPanel,
|
|
244
|
-
visiblePanels: [nextPanel],
|
|
245
|
-
},
|
|
246
|
-
() => {
|
|
247
|
-
if (this.state.activePanel !== null) {
|
|
248
|
-
this.props.scroll?.scrollTo(
|
|
249
|
-
0,
|
|
250
|
-
this.scrolls[this.state.activePanel]
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
prevProps.onTransition &&
|
|
254
|
-
prevProps.onTransition({
|
|
255
|
-
isBack: true,
|
|
256
|
-
from: prevPanel,
|
|
257
|
-
to: nextPanel,
|
|
258
|
-
});
|
|
259
|
-
}
|
|
91
|
+
/**
|
|
92
|
+
* @see https://vkcom.github.io/VKUI/#/View
|
|
93
|
+
*/
|
|
94
|
+
export const View = ({
|
|
95
|
+
popout,
|
|
96
|
+
modal,
|
|
97
|
+
activePanel: activePanelProp,
|
|
98
|
+
history,
|
|
99
|
+
nav,
|
|
100
|
+
onTransition,
|
|
101
|
+
onSwipeBack,
|
|
102
|
+
onSwipeBackStart,
|
|
103
|
+
onSwipeBackCancel: onSwipeBackCancelProp,
|
|
104
|
+
children,
|
|
105
|
+
|
|
106
|
+
...restProps
|
|
107
|
+
}: ViewProps) => {
|
|
108
|
+
if (process.env.NODE_ENV === "development") {
|
|
109
|
+
popout &&
|
|
110
|
+
warn(
|
|
111
|
+
"Свойство popout устарело и будет удалено в 5.0.0. Используйте одноименное свойство у SplitLayout."
|
|
260
112
|
);
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
if (!prevState.swipingBack && this.state.swipingBack) {
|
|
265
|
-
this.props.onSwipeBackStart && this.props.onSwipeBackStart();
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
// Началась анимация завершения свайпа назад.
|
|
269
|
-
if (!prevState.swipeBackResult && this.state.swipeBackResult) {
|
|
270
|
-
this.waitTransitionFinish(
|
|
271
|
-
this.pickPanel(this.state.swipeBackNextPanel),
|
|
272
|
-
this.swipingBackTransitionEndHandler
|
|
113
|
+
modal &&
|
|
114
|
+
warn(
|
|
115
|
+
"Свойство modal устарело и будет удалено в 5.0.0. Используйте одноименное свойство у SplitLayout."
|
|
273
116
|
);
|
|
274
|
-
|
|
117
|
+
}
|
|
275
118
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
this.state.activePanel !== null
|
|
281
|
-
) {
|
|
282
|
-
this.props.scroll?.scrollTo(0, this.scrolls[this.state.activePanel]);
|
|
283
|
-
}
|
|
119
|
+
const scrolls = React.useRef(
|
|
120
|
+
scrollsCache[getNavId({ nav, id: restProps.id }) as string] || {}
|
|
121
|
+
);
|
|
122
|
+
const afterTransition = React.useRef(noop);
|
|
284
123
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
) {
|
|
290
|
-
this.setState({
|
|
291
|
-
browserSwipe: false,
|
|
292
|
-
nextPanel: null,
|
|
293
|
-
prevPanel: null,
|
|
294
|
-
animated: false,
|
|
295
|
-
visiblePanels: [this.props.activePanel],
|
|
296
|
-
activePanel: this.props.activePanel,
|
|
297
|
-
});
|
|
124
|
+
React.useEffect(() => () => {
|
|
125
|
+
const id = getNavId({ nav, id: restProps.id });
|
|
126
|
+
if (id) {
|
|
127
|
+
scrollsCache[id] = scrolls.current;
|
|
298
128
|
}
|
|
299
|
-
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const panelNodes = React.useRef<{ [id: string]: HTMLDivElement | null }>({});
|
|
132
|
+
|
|
133
|
+
const { window, document } = useDOM();
|
|
134
|
+
const scroll = useScroll();
|
|
135
|
+
const configProvider = useConfigProvider();
|
|
136
|
+
const splitCol = useSplitCol();
|
|
137
|
+
const platform = usePlatform();
|
|
138
|
+
|
|
139
|
+
const [animated, setAnimated] = React.useState(false);
|
|
140
|
+
|
|
141
|
+
const [visiblePanels, setVisiblePanels] = React.useState([activePanelProp]);
|
|
142
|
+
const [activePanel, setActivePanel] = React.useState<string | null>(
|
|
143
|
+
activePanelProp
|
|
144
|
+
);
|
|
145
|
+
const [isBack, setIsBack] = React.useState<boolean | undefined>(undefined);
|
|
146
|
+
const [prevPanel, setPrevPanel] = React.useState<string | null>(null);
|
|
147
|
+
const [nextPanel, setNextPanel] = React.useState<string | null>(null);
|
|
148
|
+
|
|
149
|
+
const [swipingBack, setSwipingBack] = React.useState<boolean>(false);
|
|
150
|
+
const [swipeBackStartX, setSwipeBackStartX] = React.useState<number>(0);
|
|
151
|
+
const [swipeBackShift, setSwipeBackShift] = React.useState<number>(0);
|
|
152
|
+
const [swipeBackNextPanel, setSwipeBackNextPanel] = React.useState<
|
|
153
|
+
string | null
|
|
154
|
+
>(null);
|
|
155
|
+
const [swipeBackPrevPanel, setSwipeBackPrevPanel] = React.useState<
|
|
156
|
+
string | null
|
|
157
|
+
>(null);
|
|
158
|
+
const [swipeBackResult, setSwipeBackResult] =
|
|
159
|
+
React.useState<SwipeBackResults | null>(null);
|
|
160
|
+
|
|
161
|
+
const [browserSwipe, setBrowserSwipe] = React.useState(false);
|
|
162
|
+
|
|
163
|
+
const prevActivePanel = usePrevious(activePanelProp);
|
|
164
|
+
const prevSwipingBack = usePrevious(swipingBack);
|
|
165
|
+
const prevBrowserSwipe = usePrevious(browserSwipe);
|
|
166
|
+
const prevSwipeBackResult = usePrevious(swipeBackResult);
|
|
167
|
+
const prevSwipeBackPrevPanel = usePrevious(swipeBackPrevPanel);
|
|
168
|
+
const prevOnTransition = usePrevious(onTransition);
|
|
169
|
+
|
|
170
|
+
const hasPopout = !!popout;
|
|
171
|
+
const hasModal = !!modal;
|
|
172
|
+
|
|
173
|
+
const panels = (
|
|
174
|
+
React.Children.toArray(children) as React.ReactElement[]
|
|
175
|
+
).filter((panel: React.ReactElement) => {
|
|
176
|
+
const panelId = getNavId(panel.props, warn);
|
|
300
177
|
|
|
301
|
-
shouldDisableTransitionMotion(): boolean {
|
|
302
178
|
return (
|
|
303
|
-
|
|
304
|
-
|
|
179
|
+
(panelId !== undefined && visiblePanels.includes(panelId)) ||
|
|
180
|
+
panelId === swipeBackPrevPanel ||
|
|
181
|
+
panelId === swipeBackNextPanel
|
|
305
182
|
);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
waitTransitionFinish(
|
|
309
|
-
elem: HTMLElement | null | undefined,
|
|
310
|
-
eventHandler: TransitionEventHandler
|
|
311
|
-
): void {
|
|
312
|
-
if (transitionEvent.supported && transitionEvent.name && elem) {
|
|
313
|
-
elem.removeEventListener(
|
|
314
|
-
transitionEvent.name as keyof HTMLElementEventMap,
|
|
315
|
-
eventHandler as EventListener
|
|
316
|
-
);
|
|
317
|
-
elem.addEventListener(
|
|
318
|
-
transitionEvent.name as keyof HTMLElementEventMap,
|
|
319
|
-
eventHandler as EventListener
|
|
320
|
-
);
|
|
321
|
-
} else {
|
|
322
|
-
if (this.transitionFinishTimeout) {
|
|
323
|
-
clearTimeout(this.transitionFinishTimeout);
|
|
324
|
-
}
|
|
325
|
-
this.transitionFinishTimeout = setTimeout(
|
|
326
|
-
eventHandler,
|
|
327
|
-
this.props.platform === IOS ? 600 : 300
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
183
|
+
});
|
|
331
184
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
(this.document.activeElement as HTMLElement).blur();
|
|
335
|
-
}
|
|
336
|
-
}
|
|
185
|
+
const disableAnimation =
|
|
186
|
+
configProvider?.transitionMotionEnabled === false || !splitCol?.animate;
|
|
337
187
|
|
|
338
|
-
pickPanel(id: string | null) {
|
|
188
|
+
const pickPanel = (id: string | null) => {
|
|
339
189
|
if (id === null) {
|
|
340
|
-
return
|
|
341
|
-
}
|
|
342
|
-
return this.panelNodes[id];
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
flushTransition(prevPanel: string, isBack: boolean) {
|
|
346
|
-
const activePanel = this.props.activePanel;
|
|
347
|
-
if (isBack) {
|
|
348
|
-
this.scrolls[prevPanel] = 0;
|
|
349
|
-
}
|
|
350
|
-
this.setState(
|
|
351
|
-
{
|
|
352
|
-
prevPanel: null,
|
|
353
|
-
nextPanel: null,
|
|
354
|
-
visiblePanels: [activePanel],
|
|
355
|
-
activePanel,
|
|
356
|
-
animated: false,
|
|
357
|
-
isBack: undefined,
|
|
358
|
-
},
|
|
359
|
-
() => {
|
|
360
|
-
this.props.scroll?.scrollTo(0, isBack ? this.scrolls[activePanel] : 0);
|
|
361
|
-
this.props.onTransition &&
|
|
362
|
-
this.props.onTransition({ isBack, from: prevPanel, to: activePanel });
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
transitionEndHandler = (e?: React.AnimationEvent): void => {
|
|
368
|
-
if (
|
|
369
|
-
(!e ||
|
|
370
|
-
[
|
|
371
|
-
"vkui-animation-ios-next-forward",
|
|
372
|
-
"vkui-animation-ios-prev-back",
|
|
373
|
-
"vkui-animation-view-next-forward",
|
|
374
|
-
"vkui-animation-view-prev-back",
|
|
375
|
-
].includes(e.animationName)) &&
|
|
376
|
-
this.state.prevPanel !== null
|
|
377
|
-
) {
|
|
378
|
-
this.flushTransition(this.state.prevPanel, Boolean(this.state.isBack));
|
|
190
|
+
return null;
|
|
379
191
|
}
|
|
192
|
+
return panelNodes.current[id];
|
|
380
193
|
};
|
|
381
194
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
(e?.propertyName.includes("transform") &&
|
|
387
|
-
e?.target === this.pickPanel(this.state.swipeBackNextPanel))
|
|
388
|
-
) {
|
|
389
|
-
switch (this.state.swipeBackResult) {
|
|
390
|
-
case SwipeBackResults.fail:
|
|
391
|
-
this.onSwipeBackCancel();
|
|
392
|
-
break;
|
|
393
|
-
case SwipeBackResults.success:
|
|
394
|
-
this.onSwipeBackSuccess();
|
|
195
|
+
const flushTransition = React.useCallback(
|
|
196
|
+
(prevPanel: string, isBackTransition: boolean) => {
|
|
197
|
+
if (isBackTransition) {
|
|
198
|
+
scrolls.current[prevPanel] = 0;
|
|
395
199
|
}
|
|
396
|
-
|
|
397
|
-
|
|
200
|
+
setPrevPanel(null);
|
|
201
|
+
setNextPanel(null);
|
|
202
|
+
setVisiblePanels([activePanelProp]);
|
|
203
|
+
setActivePanel(activePanelProp);
|
|
204
|
+
setAnimated(false);
|
|
205
|
+
setIsBack(undefined);
|
|
206
|
+
|
|
207
|
+
afterTransition.current = () => {
|
|
208
|
+
scroll?.scrollTo(
|
|
209
|
+
0,
|
|
210
|
+
isBackTransition ? scrolls.current[activePanelProp] : 0
|
|
211
|
+
);
|
|
212
|
+
onTransition &&
|
|
213
|
+
onTransition({
|
|
214
|
+
isBack: isBackTransition,
|
|
215
|
+
from: prevPanel,
|
|
216
|
+
to: activePanelProp,
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
},
|
|
220
|
+
[activePanelProp, onTransition, scroll]
|
|
221
|
+
);
|
|
398
222
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
223
|
+
useIsomorphicLayoutEffect(() => {
|
|
224
|
+
afterTransition.current();
|
|
225
|
+
afterTransition.current = noop;
|
|
226
|
+
}, [afterTransition.current]);
|
|
402
227
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
228
|
+
const transitionEndHandler = React.useCallback(
|
|
229
|
+
(e?: React.AnimationEvent): void => {
|
|
230
|
+
if (
|
|
231
|
+
(!e ||
|
|
232
|
+
[
|
|
233
|
+
"vkui-animation-ios-next-forward",
|
|
234
|
+
"vkui-animation-ios-prev-back",
|
|
235
|
+
"vkui-animation-view-next-forward",
|
|
236
|
+
"vkui-animation-view-prev-back",
|
|
237
|
+
].includes(e.animationName)) &&
|
|
238
|
+
prevPanel !== null
|
|
239
|
+
) {
|
|
240
|
+
flushTransition(prevPanel, Boolean(isBack));
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
[flushTransition, isBack, prevPanel]
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
const { waitTransitionFinish } = useWaitTransitionFinish();
|
|
247
|
+
const animationFinishTimeout = useTimeout(
|
|
248
|
+
transitionEndHandler,
|
|
249
|
+
platform === IOS ? 600 : 300
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
const onSwipeBackSuccess = React.useCallback(() => {
|
|
253
|
+
onSwipeBack && onSwipeBack();
|
|
254
|
+
}, [onSwipeBack]);
|
|
255
|
+
|
|
256
|
+
const onSwipeBackCancel = React.useCallback(() => {
|
|
257
|
+
onSwipeBackCancelProp && onSwipeBackCancelProp();
|
|
258
|
+
setSwipeBackPrevPanel(null);
|
|
259
|
+
setSwipeBackNextPanel(null);
|
|
260
|
+
setSwipingBack(false);
|
|
261
|
+
setSwipeBackResult(null);
|
|
262
|
+
setSwipeBackStartX(0);
|
|
263
|
+
setSwipeBackShift(0);
|
|
264
|
+
}, [onSwipeBackCancelProp]);
|
|
265
|
+
|
|
266
|
+
const swipingBackTransitionEndHandler = React.useCallback(
|
|
267
|
+
(e?: TransitionEvent): void => {
|
|
268
|
+
// indexOf because of vendor prefixes in old browsers
|
|
269
|
+
if (
|
|
270
|
+
!e ||
|
|
271
|
+
(e?.propertyName.includes("transform") &&
|
|
272
|
+
e?.target === pickPanel(swipeBackNextPanel))
|
|
273
|
+
) {
|
|
274
|
+
switch (swipeBackResult) {
|
|
275
|
+
case SwipeBackResults.fail:
|
|
276
|
+
onSwipeBackCancel();
|
|
277
|
+
break;
|
|
278
|
+
case SwipeBackResults.success:
|
|
279
|
+
onSwipeBackSuccess();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
[onSwipeBackCancel, onSwipeBackSuccess, swipeBackNextPanel, swipeBackResult]
|
|
284
|
+
);
|
|
414
285
|
|
|
415
|
-
onMoveX = (e: TouchEvent): void => {
|
|
286
|
+
const onMoveX = (e: TouchEvent): void => {
|
|
416
287
|
if (swipeBackExcluded(e)) {
|
|
417
288
|
return;
|
|
418
289
|
}
|
|
419
290
|
|
|
420
|
-
const { platform, configProvider } = this.props;
|
|
421
|
-
|
|
422
291
|
if (
|
|
423
292
|
platform === IOS &&
|
|
424
293
|
!configProvider?.isWebView &&
|
|
425
|
-
(e.startX <= 70 || e.startX >=
|
|
426
|
-
!
|
|
294
|
+
(e.startX <= 70 || e.startX >= window!.innerWidth - 70) &&
|
|
295
|
+
!browserSwipe
|
|
427
296
|
) {
|
|
428
|
-
|
|
297
|
+
setBrowserSwipe(true);
|
|
429
298
|
}
|
|
430
299
|
|
|
431
|
-
if (
|
|
432
|
-
|
|
433
|
-
configProvider?.isWebView &&
|
|
434
|
-
this.props.onSwipeBack
|
|
435
|
-
) {
|
|
436
|
-
if ((this.state.animated && e.startX <= 70) || !this.window) {
|
|
300
|
+
if (platform === IOS && configProvider?.isWebView && onSwipeBack) {
|
|
301
|
+
if ((animated && e.startX <= 70) || !window) {
|
|
437
302
|
return;
|
|
438
303
|
}
|
|
439
304
|
|
|
440
|
-
if (
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
(this.props.history?.length ?? 0) > 1
|
|
444
|
-
) {
|
|
445
|
-
if (this.state.activePanel !== null) {
|
|
446
|
-
this.scrolls[this.state.activePanel] =
|
|
447
|
-
this.props.scroll?.getScroll().y;
|
|
305
|
+
if (e.startX <= 70 && !swipingBack && history && history.length > 1) {
|
|
306
|
+
if (activePanel !== null) {
|
|
307
|
+
scrolls.current[activePanel] = scroll?.getScroll().y;
|
|
448
308
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
});
|
|
309
|
+
|
|
310
|
+
setSwipingBack(true);
|
|
311
|
+
setSwipeBackStartX(e.startX);
|
|
312
|
+
setSwipeBackPrevPanel(activePanel);
|
|
313
|
+
setSwipeBackNextPanel(history.slice(-2)[0]);
|
|
455
314
|
}
|
|
456
|
-
if (
|
|
315
|
+
if (swipingBack) {
|
|
457
316
|
let swipeBackShift = 0;
|
|
458
317
|
if (e.shiftX < 0) {
|
|
459
318
|
swipeBackShift = 0;
|
|
460
|
-
} else if (
|
|
461
|
-
|
|
462
|
-
this.window.innerWidth - this.state.swipeBackStartX
|
|
463
|
-
) {
|
|
464
|
-
swipeBackShift = this.window?.innerWidth;
|
|
319
|
+
} else if (e.shiftX > window.innerWidth - swipeBackStartX) {
|
|
320
|
+
swipeBackShift = window?.innerWidth;
|
|
465
321
|
} else {
|
|
466
322
|
swipeBackShift = e.shiftX;
|
|
467
323
|
}
|
|
468
|
-
|
|
324
|
+
setSwipeBackShift(swipeBackShift);
|
|
469
325
|
}
|
|
470
326
|
}
|
|
471
327
|
};
|
|
472
328
|
|
|
473
|
-
onEnd = (
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
329
|
+
const onEnd = React.useCallback(
|
|
330
|
+
(e: TouchEvent): void => {
|
|
331
|
+
if (swipingBack && window) {
|
|
332
|
+
const speed = (swipeBackShift / e.duration) * 1000;
|
|
333
|
+
if (swipeBackShift === 0) {
|
|
334
|
+
onSwipeBackCancel();
|
|
335
|
+
} else if (swipeBackShift >= (window?.innerWidth ?? 0)) {
|
|
336
|
+
onSwipeBackSuccess();
|
|
337
|
+
} else if (
|
|
338
|
+
speed > 250 ||
|
|
339
|
+
swipeBackStartX + swipeBackShift > window.innerWidth / 2
|
|
340
|
+
) {
|
|
341
|
+
setSwipeBackResult(SwipeBackResults.success);
|
|
342
|
+
} else {
|
|
343
|
+
setSwipeBackResult(SwipeBackResults.fail);
|
|
344
|
+
}
|
|
488
345
|
}
|
|
489
|
-
}
|
|
490
|
-
|
|
346
|
+
},
|
|
347
|
+
[
|
|
348
|
+
onSwipeBackCancel,
|
|
349
|
+
onSwipeBackSuccess,
|
|
350
|
+
swipeBackShift,
|
|
351
|
+
swipeBackStartX,
|
|
352
|
+
swipingBack,
|
|
353
|
+
window,
|
|
354
|
+
]
|
|
355
|
+
);
|
|
491
356
|
|
|
492
|
-
calcPanelSwipeStyles
|
|
493
|
-
|
|
357
|
+
const calcPanelSwipeStyles = (
|
|
358
|
+
panelId: string | undefined
|
|
359
|
+
): React.CSSProperties => {
|
|
360
|
+
if (!canUseDOM || !window) {
|
|
494
361
|
return {};
|
|
495
362
|
}
|
|
496
363
|
|
|
497
|
-
const isPrev = panelId ===
|
|
498
|
-
const isNext = panelId ===
|
|
364
|
+
const isPrev = panelId === swipeBackPrevPanel;
|
|
365
|
+
const isNext = panelId === swipeBackNextPanel;
|
|
499
366
|
|
|
500
|
-
if ((!isPrev && !isNext) ||
|
|
367
|
+
if ((!isPrev && !isNext) || swipeBackResult) {
|
|
501
368
|
return {};
|
|
502
369
|
}
|
|
503
370
|
|
|
504
|
-
let prevPanelTranslate = `${
|
|
371
|
+
let prevPanelTranslate = `${swipeBackShift}px`;
|
|
505
372
|
let nextPanelTranslate = `${
|
|
506
|
-
-50 + (
|
|
373
|
+
-50 + (swipeBackShift * 100) / window.innerWidth / 2
|
|
507
374
|
}%`;
|
|
508
375
|
let prevPanelShadow =
|
|
509
|
-
(0.3 * (
|
|
510
|
-
this.window.innerWidth;
|
|
376
|
+
(0.3 * (window.innerWidth - swipeBackShift)) / window.innerWidth;
|
|
511
377
|
|
|
512
|
-
if (
|
|
378
|
+
if (swipeBackResult) {
|
|
513
379
|
return isPrev
|
|
514
380
|
? { boxShadow: `-2px 0 12px rgba(0, 0, 0, ${prevPanelShadow})` }
|
|
515
381
|
: {};
|
|
@@ -530,148 +396,219 @@ class ViewComponent extends React.Component<ViewProps & DOMProps, ViewState> {
|
|
|
530
396
|
}
|
|
531
397
|
|
|
532
398
|
return {};
|
|
533
|
-
}
|
|
399
|
+
};
|
|
534
400
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
401
|
+
React.useEffect(() => {
|
|
402
|
+
popout && blurActiveElement(document);
|
|
403
|
+
}, [document, popout]);
|
|
404
|
+
|
|
405
|
+
React.useEffect(() => {
|
|
406
|
+
modal && blurActiveElement(document);
|
|
407
|
+
}, [document, modal]);
|
|
408
|
+
|
|
409
|
+
React.useEffect(() => {
|
|
410
|
+
// Нужен переход
|
|
411
|
+
if (
|
|
412
|
+
prevActivePanel &&
|
|
413
|
+
prevActivePanel !== activePanelProp &&
|
|
414
|
+
!prevSwipingBack &&
|
|
415
|
+
!prevBrowserSwipe
|
|
416
|
+
) {
|
|
417
|
+
const firstLayerId = (
|
|
418
|
+
React.Children.toArray(children) as React.ReactElement[]
|
|
419
|
+
)
|
|
420
|
+
.map((panel) => getNavId(panel.props, warn))
|
|
421
|
+
.find((id) => id === prevActivePanel || id === activePanelProp);
|
|
422
|
+
|
|
423
|
+
const isBackTransition = firstLayerId === activePanelProp;
|
|
424
|
+
scrolls.current[prevActivePanel] = scroll?.getScroll().y;
|
|
425
|
+
|
|
426
|
+
if (disableAnimation) {
|
|
427
|
+
flushTransition(prevActivePanel, isBackTransition);
|
|
428
|
+
} else {
|
|
429
|
+
blurActiveElement(document);
|
|
430
|
+
|
|
431
|
+
setVisiblePanels([prevActivePanel, activePanelProp]);
|
|
432
|
+
setPrevPanel(prevActivePanel);
|
|
433
|
+
setNextPanel(activePanelProp);
|
|
434
|
+
setActivePanel(null);
|
|
435
|
+
setAnimated(true);
|
|
436
|
+
setIsBack(isBackTransition);
|
|
437
|
+
|
|
438
|
+
// Фолбек анимации перехода
|
|
439
|
+
if (!animationEvent.supported) {
|
|
440
|
+
animationFinishTimeout.set();
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// Закончилась анимация свайпа назад
|
|
446
|
+
if (
|
|
447
|
+
prevActivePanel &&
|
|
448
|
+
prevActivePanel !== activePanelProp &&
|
|
449
|
+
prevSwipingBack
|
|
450
|
+
) {
|
|
451
|
+
const nextPanel = activePanelProp;
|
|
452
|
+
const prevPanel = prevActivePanel;
|
|
453
|
+
if (prevSwipeBackPrevPanel) {
|
|
454
|
+
scrolls.current[prevSwipeBackPrevPanel] = 0;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
setSwipeBackPrevPanel(null);
|
|
458
|
+
setSwipeBackNextPanel(null);
|
|
459
|
+
setSwipingBack(false);
|
|
460
|
+
setSwipeBackResult(null);
|
|
461
|
+
setSwipeBackStartX(0);
|
|
462
|
+
setSwipeBackShift(0);
|
|
463
|
+
setActivePanel(nextPanel);
|
|
464
|
+
setVisiblePanels([nextPanel]);
|
|
465
|
+
|
|
466
|
+
afterTransition.current = () => {
|
|
467
|
+
if (nextPanel !== null) {
|
|
468
|
+
scroll?.scrollTo(0, scrolls.current[nextPanel]);
|
|
469
|
+
}
|
|
470
|
+
prevOnTransition &&
|
|
471
|
+
prevOnTransition({
|
|
472
|
+
isBack: true,
|
|
473
|
+
from: prevPanel,
|
|
474
|
+
to: nextPanel,
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// Начался свайп назад
|
|
480
|
+
if (!prevSwipingBack && swipingBack) {
|
|
481
|
+
onSwipeBackStart && onSwipeBackStart();
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// Началась анимация завершения свайпа назад.
|
|
485
|
+
if (!prevSwipeBackResult && swipeBackResult) {
|
|
486
|
+
waitTransitionFinish(
|
|
487
|
+
pickPanel(swipeBackNextPanel),
|
|
488
|
+
swipingBackTransitionEndHandler,
|
|
489
|
+
platform === IOS ? 600 : 300
|
|
575
490
|
);
|
|
576
|
-
}
|
|
491
|
+
}
|
|
577
492
|
|
|
578
|
-
|
|
493
|
+
// Если свайп назад отменился (когда пользователь недостаточно сильно свайпнул)
|
|
494
|
+
if (
|
|
495
|
+
prevSwipeBackResult === SwipeBackResults.fail &&
|
|
496
|
+
!swipeBackResult &&
|
|
497
|
+
activePanel !== null
|
|
498
|
+
) {
|
|
499
|
+
scroll?.scrollTo(0, scrolls.current[activePanel]);
|
|
500
|
+
}
|
|
579
501
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
502
|
+
// Закончился Safari свайп
|
|
503
|
+
if (prevActivePanel !== activePanelProp && browserSwipe) {
|
|
504
|
+
setBrowserSwipe(false);
|
|
505
|
+
setNextPanel(null);
|
|
506
|
+
setPrevPanel(null);
|
|
507
|
+
setAnimated(false);
|
|
508
|
+
setVisiblePanels([activePanelProp]);
|
|
509
|
+
setActivePanel(activePanelProp);
|
|
510
|
+
}
|
|
511
|
+
}, [
|
|
512
|
+
activePanelProp,
|
|
513
|
+
activePanel,
|
|
514
|
+
animationFinishTimeout,
|
|
515
|
+
browserSwipe,
|
|
516
|
+
children,
|
|
517
|
+
disableAnimation,
|
|
518
|
+
document,
|
|
519
|
+
flushTransition,
|
|
520
|
+
onSwipeBackStart,
|
|
521
|
+
panels,
|
|
522
|
+
platform,
|
|
523
|
+
prevActivePanel,
|
|
524
|
+
prevBrowserSwipe,
|
|
525
|
+
prevOnTransition,
|
|
526
|
+
prevSwipeBackPrevPanel,
|
|
527
|
+
prevSwipeBackResult,
|
|
528
|
+
prevSwipingBack,
|
|
529
|
+
scroll,
|
|
530
|
+
swipeBackNextPanel,
|
|
531
|
+
swipeBackResult,
|
|
532
|
+
swipingBack,
|
|
533
|
+
swipingBackTransitionEndHandler,
|
|
534
|
+
waitTransitionFinish,
|
|
535
|
+
]);
|
|
536
|
+
|
|
537
|
+
return (
|
|
538
|
+
<Touch
|
|
539
|
+
Component="section"
|
|
540
|
+
{...restProps}
|
|
541
|
+
vkuiClass={classNames(
|
|
542
|
+
"View",
|
|
543
|
+
platform === IOS && "View--ios",
|
|
544
|
+
!disableAnimation && animated && "View--animated",
|
|
545
|
+
!disableAnimation && swipingBack && "View--swiping-back",
|
|
546
|
+
disableAnimation && "View--no-motion"
|
|
547
|
+
)}
|
|
548
|
+
onMoveX={onMoveX}
|
|
549
|
+
onEnd={onEnd}
|
|
550
|
+
>
|
|
551
|
+
<div vkuiClass="View__panels">
|
|
552
|
+
{panels.map((panel: React.ReactElement) => {
|
|
553
|
+
const panelId = getNavId(panel.props, warn);
|
|
554
|
+
const isPrev =
|
|
555
|
+
panelId === prevPanel || panelId === swipeBackPrevPanel;
|
|
556
|
+
const isTransitionTarget =
|
|
557
|
+
animated && panelId === (isBack ? prevPanel : nextPanel);
|
|
558
|
+
const compensateScroll =
|
|
559
|
+
isPrev ||
|
|
560
|
+
panelId === swipeBackNextPanel ||
|
|
561
|
+
(panelId === nextPanel && isBack);
|
|
562
|
+
|
|
563
|
+
return (
|
|
564
|
+
<div
|
|
565
|
+
vkuiClass={classNames(
|
|
566
|
+
"View__panel",
|
|
567
|
+
panelId === activePanel && "View__panel--active",
|
|
568
|
+
panelId === prevPanel && "View__panel--prev",
|
|
569
|
+
panelId === nextPanel && "View__panel--next",
|
|
570
|
+
panelId === swipeBackPrevPanel &&
|
|
571
|
+
"View__panel--swipe-back-prev",
|
|
572
|
+
panelId === swipeBackNextPanel &&
|
|
573
|
+
"View__panel--swipe-back-next",
|
|
574
|
+
swipeBackResult === SwipeBackResults.success &&
|
|
575
|
+
"View__panel--swipe-back-success",
|
|
576
|
+
swipeBackResult === SwipeBackResults.fail &&
|
|
577
|
+
"View__panel--swipe-back-failed"
|
|
578
|
+
)}
|
|
579
|
+
onAnimationEnd={
|
|
580
|
+
isTransitionTarget ? transitionEndHandler : undefined
|
|
581
|
+
}
|
|
582
|
+
ref={(el) =>
|
|
583
|
+
panelId !== undefined && (panelNodes.current[panelId] = el)
|
|
584
|
+
}
|
|
585
|
+
style={calcPanelSwipeStyles(panelId)}
|
|
586
|
+
key={panelId}
|
|
587
|
+
>
|
|
607
588
|
<div
|
|
608
|
-
vkuiClass=
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
"View__panel--swipe-back-prev",
|
|
615
|
-
panelId === swipeBackNextPanel &&
|
|
616
|
-
"View__panel--swipe-back-next",
|
|
617
|
-
swipeBackResult === SwipeBackResults.success &&
|
|
618
|
-
"View__panel--swipe-back-success",
|
|
619
|
-
swipeBackResult === SwipeBackResults.fail &&
|
|
620
|
-
"View__panel--swipe-back-failed"
|
|
621
|
-
)}
|
|
622
|
-
onAnimationEnd={
|
|
623
|
-
isTransitionTarget ? this.transitionEndHandler : undefined
|
|
624
|
-
}
|
|
625
|
-
ref={(el) =>
|
|
626
|
-
panelId !== undefined && (this.panelNodes[panelId] = el)
|
|
627
|
-
}
|
|
628
|
-
style={this.calcPanelSwipeStyles(panelId)}
|
|
629
|
-
key={panelId}
|
|
589
|
+
vkuiClass="View__panel-in"
|
|
590
|
+
style={{
|
|
591
|
+
marginTop: compensateScroll
|
|
592
|
+
? -(scrolls.current[panelId as string] ?? 0)
|
|
593
|
+
: undefined,
|
|
594
|
+
}}
|
|
630
595
|
>
|
|
631
|
-
<
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
? -(this.scrolls[panelId as string] ?? 0)
|
|
636
|
-
: undefined,
|
|
637
|
-
}}
|
|
596
|
+
<NavTransitionProvider
|
|
597
|
+
entering={
|
|
598
|
+
panelId === nextPanel || panelId === swipeBackNextPanel
|
|
599
|
+
}
|
|
638
600
|
>
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
panelId === nextPanel || panelId === swipeBackNextPanel
|
|
642
|
-
}
|
|
643
|
-
>
|
|
644
|
-
{panel}
|
|
645
|
-
</NavTransitionProvider>
|
|
646
|
-
</div>
|
|
601
|
+
{panel}
|
|
602
|
+
</NavTransitionProvider>
|
|
647
603
|
</div>
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
</
|
|
655
|
-
</
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
/**
|
|
661
|
-
* @see https://vkcom.github.io/VKUI/#/View
|
|
662
|
-
*/
|
|
663
|
-
export const View = withContext(
|
|
664
|
-
withContext(
|
|
665
|
-
withContext(
|
|
666
|
-
withPlatform(withDOM<ViewProps>(ViewComponent)),
|
|
667
|
-
SplitColContext,
|
|
668
|
-
"splitCol"
|
|
669
|
-
),
|
|
670
|
-
ConfigProviderContext,
|
|
671
|
-
"configProvider"
|
|
672
|
-
),
|
|
673
|
-
ScrollContext,
|
|
674
|
-
"scroll"
|
|
675
|
-
);
|
|
676
|
-
|
|
677
|
-
View.displayName = "View";
|
|
604
|
+
</div>
|
|
605
|
+
);
|
|
606
|
+
})}
|
|
607
|
+
</div>
|
|
608
|
+
<AppRootPortal>
|
|
609
|
+
{hasPopout && <div vkuiClass="View__popout">{popout}</div>}
|
|
610
|
+
{hasModal && <div vkuiClass="View__modal">{modal}</div>}
|
|
611
|
+
</AppRootPortal>
|
|
612
|
+
</Touch>
|
|
613
|
+
);
|
|
614
|
+
};
|