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