@vkontakte/vkui 7.0.0-dev-efd91c.2 → 7.0.0-dev-efd91c.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionSheet/ActionSheet.js +2 -2
- package/dist/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/dist/components/ActionSheetItem/ActionSheetItem.d.ts.map +1 -1
- package/dist/components/ActionSheetItem/ActionSheetItem.js +2 -3
- package/dist/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/components/AdaptivityProvider/AdaptivityContext.d.ts.map +1 -1
- package/dist/components/AdaptivityProvider/AdaptivityContext.js +1 -0
- package/dist/components/AdaptivityProvider/AdaptivityContext.js.map +1 -1
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Alert/AlertAction.js +1 -1
- package/dist/components/Alert/AlertAction.js.map +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts.map +1 -1
- package/dist/components/AppRoot/AppRoot.js +6 -43
- package/dist/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/components/AppRoot/AppRootContext.d.ts +1 -3
- package/dist/components/AppRoot/AppRootContext.d.ts.map +1 -1
- package/dist/components/AppRoot/AppRootContext.js +0 -3
- package/dist/components/AppRoot/AppRootContext.js.map +1 -1
- package/dist/components/AppRoot/AppRootPortal.d.ts +5 -5
- package/dist/components/AppRoot/AppRootPortal.d.ts.map +1 -1
- package/dist/components/AppRoot/AppRootPortal.js +12 -29
- package/dist/components/AppRoot/AppRootPortal.js.map +1 -1
- package/dist/components/AppRoot/helpers.d.ts +0 -1
- package/dist/components/AppRoot/helpers.d.ts.map +1 -1
- package/dist/components/AppRoot/helpers.js +0 -1
- package/dist/components/AppRoot/helpers.js.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/components/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.js +3 -4
- package/dist/components/AspectRatio/AspectRatio.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +2 -1
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts.map +1 -1
- package/dist/components/Banner/Banner.js +2 -3
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +2 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/CalendarDay/CalendarDay.d.ts.map +1 -1
- package/dist/components/CalendarDay/CalendarDay.js +2 -3
- package/dist/components/CalendarDay/CalendarDay.js.map +1 -1
- package/dist/components/CalendarHeader/CalendarHeader.js +2 -2
- package/dist/components/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/components/ColorSchemeProvider/ColorSchemeProvider.d.ts.map +1 -1
- package/dist/components/ColorSchemeProvider/ColorSchemeProvider.js +2 -0
- package/dist/components/ColorSchemeProvider/ColorSchemeProvider.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderContext.d.ts.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderContext.js +1 -0
- package/dist/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/components/ContentBadge/ContentBadgeContext.d.ts.map +1 -1
- package/dist/components/ContentBadge/ContentBadgeContext.js +1 -0
- package/dist/components/ContentBadge/ContentBadgeContext.js.map +1 -1
- package/dist/components/Counter/Counter.d.ts.map +1 -1
- package/dist/components/Counter/Counter.js +8 -9
- package/dist/components/Counter/Counter.js.map +1 -1
- package/dist/components/CustomSelectOption/CustomSelectOption.d.ts.map +1 -1
- package/dist/components/CustomSelectOption/CustomSelectOption.js +5 -5
- package/dist/components/CustomSelectOption/CustomSelectOption.js.map +1 -1
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +2 -3
- package/dist/components/Flex/Flex.js.map +1 -1
- package/dist/components/Flex/FlexItem/FlexItem.d.ts +1 -1
- package/dist/components/Flex/FlexItem/FlexItem.d.ts.map +1 -1
- package/dist/components/Flex/FlexItem/FlexItem.js +4 -5
- package/dist/components/Flex/FlexItem/FlexItem.js.map +1 -1
- package/dist/components/FloatingArrow/DefaultIcon.d.ts +7 -3
- package/dist/components/FloatingArrow/DefaultIcon.d.ts.map +1 -1
- package/dist/components/FloatingArrow/DefaultIcon.js +10 -6
- package/dist/components/FloatingArrow/DefaultIcon.js.map +1 -1
- package/dist/components/FloatingArrow/FloatingArrow.d.ts +9 -2
- package/dist/components/FloatingArrow/FloatingArrow.d.ts.map +1 -1
- package/dist/components/FloatingArrow/FloatingArrow.js +9 -8
- package/dist/components/FloatingArrow/FloatingArrow.js.map +1 -1
- package/dist/components/HorizontalCell/HorizontalCell.d.ts +11 -1
- package/dist/components/HorizontalCell/HorizontalCell.d.ts.map +1 -1
- package/dist/components/HorizontalCell/HorizontalCell.js +15 -7
- package/dist/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.js +3 -4
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Image/Image.d.ts.map +1 -1
- package/dist/components/Image/Image.js +2 -1
- package/dist/components/Image/Image.js.map +1 -1
- package/dist/components/ImageBase/ImageBase.d.ts.map +1 -1
- package/dist/components/ImageBase/ImageBase.js +3 -4
- package/dist/components/ImageBase/ImageBase.js.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.d.ts.map +1 -1
- package/dist/components/Link/Link.js +3 -4
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.d.ts.map +1 -1
- package/dist/components/List/List.js +5 -8
- package/dist/components/List/List.js.map +1 -1
- package/dist/components/MiniInfoCell/MiniInfoCell.d.ts +1 -1
- package/dist/components/MiniInfoCell/MiniInfoCell.d.ts.map +1 -1
- package/dist/components/MiniInfoCell/MiniInfoCell.js +4 -5
- package/dist/components/MiniInfoCell/MiniInfoCell.js.map +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.d.ts.map +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.js +3 -4
- package/dist/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/components/ModalDismissButton/ModalDismissButton.d.ts +1 -1
- package/dist/components/ModalDismissButton/ModalDismissButton.d.ts.map +1 -1
- package/dist/components/ModalDismissButton/ModalDismissButton.js +3 -5
- package/dist/components/ModalDismissButton/ModalDismissButton.js.map +1 -1
- package/dist/components/ModalRoot/ModalRoot.d.ts.map +1 -1
- package/dist/components/ModalRoot/ModalRoot.js +3 -2
- package/dist/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/components/ModalRoot/ModalRootContext.d.ts.map +1 -1
- package/dist/components/ModalRoot/ModalRootContext.js +1 -0
- package/dist/components/ModalRoot/ModalRootContext.js.map +1 -1
- package/dist/components/ModalRoot/types.d.ts.map +1 -1
- package/dist/components/ModalRoot/types.js.map +1 -1
- package/dist/components/NavIdContext/NavIdContext.d.ts.map +1 -1
- package/dist/components/NavIdContext/NavIdContext.js +1 -0
- package/dist/components/NavIdContext/NavIdContext.js.map +1 -1
- package/dist/components/OnboardingTooltip/OnboardingTooltip.d.ts.map +1 -1
- package/dist/components/OnboardingTooltip/OnboardingTooltip.js +2 -4
- package/dist/components/OnboardingTooltip/OnboardingTooltip.js.map +1 -1
- package/dist/components/PanelHeaderButton/PanelHeaderButton.d.ts +1 -1
- package/dist/components/PanelHeaderButton/PanelHeaderButton.d.ts.map +1 -1
- package/dist/components/PanelHeaderButton/PanelHeaderButton.js +3 -4
- package/dist/components/PanelHeaderButton/PanelHeaderButton.js.map +1 -1
- package/dist/components/Popper/Popper.d.ts +1 -1
- package/dist/components/Popper/Popper.d.ts.map +1 -1
- package/dist/components/Popper/Popper.js +2 -3
- package/dist/components/Popper/Popper.js.map +1 -1
- package/dist/components/Progress/Progress.d.ts +1 -1
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Progress/Progress.js +4 -5
- package/dist/components/Progress/Progress.js.map +1 -1
- package/dist/components/RichCell/RichCell.d.ts.map +1 -1
- package/dist/components/RichCell/RichCell.js +2 -3
- package/dist/components/RichCell/RichCell.js.map +1 -1
- package/dist/components/RootComponent/RootComponent.d.ts +2 -1
- package/dist/components/RootComponent/RootComponent.d.ts.map +1 -1
- package/dist/components/RootComponent/RootComponent.js +6 -2
- package/dist/components/RootComponent/RootComponent.js.map +1 -1
- package/dist/components/ScreenSpinner/ScreenSpinner.js +2 -2
- package/dist/components/ScreenSpinner/ScreenSpinner.js.map +1 -1
- package/dist/components/ScreenSpinner/context.d.ts.map +1 -1
- package/dist/components/ScreenSpinner/context.js +1 -0
- package/dist/components/ScreenSpinner/context.js.map +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -1
- package/dist/components/Separator/Separator.d.ts.map +1 -1
- package/dist/components/Separator/Separator.js +2 -3
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/components/SimpleCell/SimpleCell.d.ts.map +1 -1
- package/dist/components/SimpleCell/SimpleCell.js +2 -3
- package/dist/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/components/SimpleGrid/SimpleGrid.d.ts +1 -1
- package/dist/components/SimpleGrid/SimpleGrid.d.ts.map +1 -1
- package/dist/components/SimpleGrid/SimpleGrid.js +2 -3
- package/dist/components/SimpleGrid/SimpleGrid.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +2 -3
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/dist/components/Snackbar/Snackbar.js +2 -3
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Snackbar/utils.d.ts +1 -1
- package/dist/components/Snackbar/utils.d.ts.map +1 -1
- package/dist/components/Snackbar/utils.js +6 -8
- package/dist/components/Snackbar/utils.js.map +1 -1
- package/dist/components/Spacing/Spacing.d.ts +1 -1
- package/dist/components/Spacing/Spacing.d.ts.map +1 -1
- package/dist/components/Spacing/Spacing.js +3 -4
- package/dist/components/Spacing/Spacing.js.map +1 -1
- package/dist/components/SplitCol/SplitCol.d.ts.map +1 -1
- package/dist/components/SplitCol/SplitCol.js +3 -4
- package/dist/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/components/SplitLayout/SplitLayout.d.ts.map +1 -1
- package/dist/components/SplitLayout/SplitLayout.js +1 -5
- package/dist/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/components/SubnavigationButton/SubnavigationButton.d.ts +1 -1
- package/dist/components/SubnavigationButton/SubnavigationButton.d.ts.map +1 -1
- package/dist/components/SubnavigationButton/SubnavigationButton.js +3 -4
- package/dist/components/SubnavigationButton/SubnavigationButton.js.map +1 -1
- package/dist/components/TabsItem/TabsItem.d.ts +1 -1
- package/dist/components/TabsItem/TabsItem.d.ts.map +1 -1
- package/dist/components/TabsItem/TabsItem.js +2 -3
- package/dist/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/components/ToolButton/ToolButton.d.ts +1 -1
- package/dist/components/ToolButton/ToolButton.d.ts.map +1 -1
- package/dist/components/ToolButton/ToolButton.js +2 -3
- package/dist/components/ToolButton/ToolButton.js.map +1 -1
- package/dist/components/WriteBarIcon/WriteBarIcon.d.ts +1 -1
- package/dist/components/WriteBarIcon/WriteBarIcon.d.ts.map +1 -1
- package/dist/components/WriteBarIcon/WriteBarIcon.js +2 -3
- package/dist/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheet/ActionSheet.js +2 -2
- package/dist/cssm/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.js +2 -2
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/cssm/components/AdaptivityProvider/AdaptivityContext.js +1 -0
- package/dist/cssm/components/AdaptivityProvider/AdaptivityContext.js.map +1 -1
- package/dist/cssm/components/Alert/Alert.js +2 -2
- package/dist/cssm/components/Alert/Alert.js.map +1 -1
- package/dist/cssm/components/Alert/AlertAction.js +1 -1
- package/dist/cssm/components/Alert/AlertAction.js.map +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.js +6 -43
- package/dist/cssm/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cssm/components/AppRoot/AppRootContext.js +0 -3
- package/dist/cssm/components/AppRoot/AppRootContext.js.map +1 -1
- package/dist/cssm/components/AppRoot/AppRootPortal.js +12 -29
- package/dist/cssm/components/AppRoot/AppRootPortal.js.map +1 -1
- package/dist/cssm/components/AppRoot/helpers.js +0 -1
- package/dist/cssm/components/AppRoot/helpers.js.map +1 -1
- package/dist/cssm/components/AspectRatio/AspectRatio.js +2 -5
- package/dist/cssm/components/AspectRatio/AspectRatio.js.map +1 -1
- package/dist/cssm/components/Avatar/Avatar.js +2 -1
- package/dist/cssm/components/Avatar/Avatar.js.map +1 -1
- package/dist/cssm/components/Banner/Banner.js +2 -2
- package/dist/cssm/components/Banner/Banner.js.map +1 -1
- package/dist/cssm/components/Button/Button.js +2 -2
- package/dist/cssm/components/Button/Button.js.map +1 -1
- package/dist/cssm/components/CalendarDay/CalendarDay.js +2 -2
- package/dist/cssm/components/CalendarDay/CalendarDay.js.map +1 -1
- package/dist/cssm/components/CalendarHeader/CalendarHeader.js +2 -2
- package/dist/cssm/components/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/cssm/components/ColorSchemeProvider/ColorSchemeProvider.js +2 -0
- package/dist/cssm/components/ColorSchemeProvider/ColorSchemeProvider.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProviderContext.js +1 -0
- package/dist/cssm/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/cssm/components/ContentBadge/ContentBadgeContext.js +1 -0
- package/dist/cssm/components/ContentBadge/ContentBadgeContext.js.map +1 -1
- package/dist/cssm/components/Counter/Counter.js +4 -7
- package/dist/cssm/components/Counter/Counter.js.map +1 -1
- package/dist/cssm/components/CustomSelectOption/CustomSelectOption.js +5 -6
- package/dist/cssm/components/CustomSelectOption/CustomSelectOption.js.map +1 -1
- package/dist/cssm/components/Flex/Flex.js +2 -5
- package/dist/cssm/components/Flex/Flex.js.map +1 -1
- package/dist/cssm/components/Flex/FlexItem/FlexItem.js +3 -4
- package/dist/cssm/components/Flex/FlexItem/FlexItem.js.map +1 -1
- package/dist/cssm/components/FloatingArrow/DefaultIcon.js +10 -6
- package/dist/cssm/components/FloatingArrow/DefaultIcon.js.map +1 -1
- package/dist/cssm/components/FloatingArrow/FloatingArrow.js +9 -7
- package/dist/cssm/components/FloatingArrow/FloatingArrow.js.map +1 -1
- package/dist/cssm/components/FloatingArrow/FloatingArrow.module.css +1 -1
- package/dist/cssm/components/HorizontalCell/HorizontalCell.js +12 -9
- package/dist/cssm/components/HorizontalCell/HorizontalCell.js.map +1 -1
- package/dist/cssm/components/HorizontalCell/HorizontalCell.module.css +23 -6
- package/dist/cssm/components/IconButton/IconButton.js +2 -2
- package/dist/cssm/components/IconButton/IconButton.js.map +1 -1
- package/dist/cssm/components/Image/Image.js +2 -4
- package/dist/cssm/components/Image/Image.js.map +1 -1
- package/dist/cssm/components/ImageBase/ImageBase.js +3 -4
- package/dist/cssm/components/ImageBase/ImageBase.js.map +1 -1
- package/dist/cssm/components/Link/Link.js +2 -2
- package/dist/cssm/components/Link/Link.js.map +1 -1
- package/dist/cssm/components/List/List.js +4 -6
- package/dist/cssm/components/List/List.js.map +1 -1
- package/dist/cssm/components/MiniInfoCell/MiniInfoCell.js +3 -3
- package/dist/cssm/components/MiniInfoCell/MiniInfoCell.js.map +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js +3 -4
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cssm/components/ModalDismissButton/ModalDismissButton.js +2 -3
- package/dist/cssm/components/ModalDismissButton/ModalDismissButton.js.map +1 -1
- package/dist/cssm/components/ModalOverlay/ModalOverlay.module.css +1 -0
- package/dist/cssm/components/ModalRoot/ModalRoot.js +3 -2
- package/dist/cssm/components/ModalRoot/ModalRoot.js.map +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootContext.js +1 -0
- package/dist/cssm/components/ModalRoot/ModalRootContext.js.map +1 -1
- package/dist/cssm/components/ModalRoot/types.js.map +1 -1
- package/dist/cssm/components/NavIdContext/NavIdContext.js +1 -0
- package/dist/cssm/components/NavIdContext/NavIdContext.js.map +1 -1
- package/dist/cssm/components/OnboardingTooltip/OnboardingTooltip.js +2 -4
- package/dist/cssm/components/OnboardingTooltip/OnboardingTooltip.js.map +1 -1
- package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.js +2 -2
- package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.js.map +1 -1
- package/dist/cssm/components/Popper/Popper.js +2 -5
- package/dist/cssm/components/Popper/Popper.js.map +1 -1
- package/dist/cssm/components/Progress/Progress.js +2 -5
- package/dist/cssm/components/Progress/Progress.js.map +1 -1
- package/dist/cssm/components/RichCell/RichCell.js +2 -2
- package/dist/cssm/components/RichCell/RichCell.js.map +1 -1
- package/dist/cssm/components/RootComponent/RootComponent.js +3 -1
- package/dist/cssm/components/RootComponent/RootComponent.js.map +1 -1
- package/dist/cssm/components/ScreenSpinner/ScreenSpinner.js +2 -2
- package/dist/cssm/components/ScreenSpinner/ScreenSpinner.js.map +1 -1
- package/dist/cssm/components/ScreenSpinner/context.js +1 -0
- package/dist/cssm/components/ScreenSpinner/context.js.map +1 -1
- package/dist/cssm/components/Separator/Separator.js +2 -5
- package/dist/cssm/components/Separator/Separator.js.map +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.js +2 -2
- package/dist/cssm/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cssm/components/SimpleGrid/SimpleGrid.js +2 -5
- package/dist/cssm/components/SimpleGrid/SimpleGrid.js.map +1 -1
- package/dist/cssm/components/Skeleton/Skeleton.js +2 -5
- package/dist/cssm/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.js +2 -2
- package/dist/cssm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cssm/components/Snackbar/utils.js +2 -4
- package/dist/cssm/components/Snackbar/utils.js.map +1 -1
- package/dist/cssm/components/Spacing/Spacing.js +2 -5
- package/dist/cssm/components/Spacing/Spacing.js.map +1 -1
- package/dist/cssm/components/SplitCol/SplitCol.js +3 -4
- package/dist/cssm/components/SplitCol/SplitCol.js.map +1 -1
- package/dist/cssm/components/SplitLayout/SplitLayout.js +1 -5
- package/dist/cssm/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/cssm/components/SubnavigationButton/SubnavigationButton.js +2 -2
- package/dist/cssm/components/SubnavigationButton/SubnavigationButton.js.map +1 -1
- package/dist/cssm/components/TabsItem/TabsItem.js +2 -2
- package/dist/cssm/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/cssm/components/ToolButton/ToolButton.js +2 -2
- package/dist/cssm/components/ToolButton/ToolButton.js.map +1 -1
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.js +2 -2
- package/dist/cssm/components/WriteBarIcon/WriteBarIcon.js.map +1 -1
- package/dist/cssm/helpers/mergeStyle.js +16 -0
- package/dist/cssm/helpers/mergeStyle.js.map +1 -0
- package/dist/cssm/hooks/useBooleanState.js +2 -4
- package/dist/cssm/hooks/useBooleanState.js.map +1 -1
- package/dist/cssm/hooks/useSyncHTMLWithBaseVKUIClasses.js +13 -5
- package/dist/cssm/hooks/useSyncHTMLWithBaseVKUIClasses.js.map +1 -1
- package/dist/cssm/index.js +1 -1
- package/dist/cssm/index.js.map +1 -1
- package/dist/cssm/styles/common.css +5 -0
- package/dist/cssm/styles/themes.css +7 -9
- package/dist/cssm/types.js.map +1 -1
- package/dist/helpers/getMergedSameEventsByProps.d.ts.map +1 -1
- package/dist/helpers/mergeStyle.d.ts +11 -0
- package/dist/helpers/mergeStyle.d.ts.map +1 -0
- package/dist/helpers/mergeStyle.js +14 -0
- package/dist/helpers/mergeStyle.js.map +1 -0
- package/dist/hooks/useBooleanState.js +2 -4
- package/dist/hooks/useBooleanState.js.map +1 -1
- package/dist/hooks/useSyncHTMLWithBaseVKUIClasses.d.ts.map +1 -1
- package/dist/hooks/useSyncHTMLWithBaseVKUIClasses.js +15 -6
- package/dist/hooks/useSyncHTMLWithBaseVKUIClasses.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/vkui.css +1 -1
- package/dist/vkui.css.map +1 -1
- package/package.json +8 -6
- package/src/components/ActionSheet/ActionSheet.tsx +3 -3
- package/src/components/ActionSheetItem/ActionSheetItem.tsx +1 -3
- package/src/components/AdaptivityProvider/AdaptivityContext.tsx +2 -0
- package/src/components/Alert/Alert.tsx +3 -3
- package/src/components/Alert/AlertAction.tsx +1 -1
- package/src/components/AppRoot/AppRoot.tsx +4 -49
- package/src/components/AppRoot/AppRootContext.ts +1 -6
- package/src/components/AppRoot/AppRootPortal.tsx +22 -40
- package/src/components/AppRoot/helpers.ts +0 -3
- package/src/components/AspectRatio/AspectRatio.tsx +2 -7
- package/src/components/Avatar/Avatar.tsx +6 -2
- package/src/components/Banner/Banner.tsx +0 -2
- package/src/components/Button/Button.tsx +1 -3
- package/src/components/CalendarDay/CalendarDay.tsx +1 -2
- package/src/components/CalendarHeader/CalendarHeader.tsx +2 -2
- package/src/components/ColorSchemeProvider/ColorSchemeProvider.tsx +4 -0
- package/src/components/ConfigProvider/ConfigProviderContext.tsx +2 -0
- package/src/components/ContentBadge/ContentBadgeContext.tsx +2 -0
- package/src/components/Counter/Counter.tsx +20 -21
- package/src/components/CustomSelectOption/CustomSelectOption.tsx +6 -6
- package/src/components/Flex/Flex.tsx +1 -2
- package/src/components/Flex/FlexItem/FlexItem.tsx +1 -2
- package/src/components/FloatingArrow/DefaultIcon.tsx +11 -8
- package/src/components/FloatingArrow/FloatingArrow.module.css +1 -1
- package/src/components/FloatingArrow/FloatingArrow.tsx +9 -8
- package/src/components/HorizontalCell/HorizontalCell.module.css +23 -6
- package/src/components/HorizontalCell/HorizontalCell.tsx +38 -6
- package/src/components/IconButton/IconButton.tsx +2 -8
- package/src/components/Image/Image.tsx +4 -2
- package/src/components/ImageBase/ImageBase.tsx +1 -2
- package/src/components/Link/Link.tsx +1 -3
- package/src/components/List/List.tsx +3 -11
- package/src/components/MiniInfoCell/MiniInfoCell.tsx +1 -3
- package/src/components/ModalCardBase/ModalCardBase.tsx +1 -3
- package/src/components/ModalDismissButton/ModalDismissButton.tsx +1 -3
- package/src/components/ModalOverlay/ModalOverlay.module.css +1 -0
- package/src/components/ModalRoot/ModalRoot.tsx +8 -4
- package/src/components/ModalRoot/ModalRootContext.tsx +2 -0
- package/src/components/ModalRoot/types.ts +1 -0
- package/src/components/NavIdContext/NavIdContext.tsx +2 -0
- package/src/components/OnboardingTooltip/OnboardingTooltip.tsx +2 -5
- package/src/components/PanelHeaderButton/PanelHeaderButton.tsx +1 -3
- package/src/components/Popper/Popper.tsx +7 -11
- package/src/components/Progress/Progress.tsx +1 -2
- package/src/components/RichCell/RichCell.tsx +1 -3
- package/src/components/RootComponent/RootComponent.tsx +5 -0
- package/src/components/ScreenSpinner/ScreenSpinner.tsx +3 -3
- package/src/components/ScreenSpinner/context.ts +2 -0
- package/src/components/Separator/Separator.tsx +1 -9
- package/src/components/SimpleCell/SimpleCell.tsx +1 -3
- package/src/components/SimpleGrid/SimpleGrid.tsx +1 -2
- package/src/components/Skeleton/Skeleton.tsx +1 -2
- package/src/components/Snackbar/Snackbar.tsx +1 -2
- package/src/components/Snackbar/utils.ts +3 -4
- package/src/components/Spacing/Spacing.tsx +2 -9
- package/src/components/SplitCol/SplitCol.tsx +1 -3
- package/src/components/SplitLayout/SplitLayout.tsx +1 -7
- package/src/components/SubnavigationButton/SubnavigationButton.tsx +1 -3
- package/src/components/TabsItem/TabsItem.tsx +1 -3
- package/src/components/ToolButton/ToolButton.tsx +1 -3
- package/src/components/WriteBarIcon/WriteBarIcon.tsx +1 -3
- package/src/helpers/mergeStyle.ts +15 -0
- package/src/hooks/useBooleanState.ts +2 -2
- package/src/hooks/useSyncHTMLWithBaseVKUIClasses.ts +10 -5
- package/src/index.ts +3 -3
- package/src/styles/common.css +7 -0
- package/src/types.ts +4 -1
- package/dist/components/AppRoot/ModalPopoutPortal.d.ts +0 -11
- package/dist/components/AppRoot/ModalPopoutPortal.d.ts.map +0 -1
- package/dist/components/AppRoot/ModalPopoutPortal.js +0 -28
- package/dist/components/AppRoot/ModalPopoutPortal.js.map +0 -1
- package/dist/cssm/components/AppRoot/ModalPopoutPortal.js +0 -27
- package/dist/cssm/components/AppRoot/ModalPopoutPortal.js.map +0 -1
- package/src/components/AppRoot/ModalPopoutPortal.tsx +0 -27
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
|
-
"version": "7.0.0-dev-efd91c.
|
|
3
|
+
"version": "7.0.0-dev-efd91c.3",
|
|
4
4
|
"name": "@vkontakte/vkui",
|
|
5
5
|
"description": "VKUI library",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -8,13 +8,15 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
12
13
|
},
|
|
13
14
|
"./dist/vkui.css": "./dist/vkui.css",
|
|
14
15
|
"./dist/components.css": "./dist/components.css",
|
|
15
16
|
"./dist/cssm": {
|
|
16
17
|
"types": "./dist/index.d.ts",
|
|
17
|
-
"import": "./dist/cssm/index.js"
|
|
18
|
+
"import": "./dist/cssm/index.js",
|
|
19
|
+
"default": "./dist/cssm/index.js"
|
|
18
20
|
},
|
|
19
21
|
"./dist/cssm/styles/themes.css": "./dist/cssm/styles/themes.css",
|
|
20
22
|
"./package.json": "./package.json"
|
|
@@ -86,12 +88,12 @@
|
|
|
86
88
|
"date-fns": "^4.1.0"
|
|
87
89
|
},
|
|
88
90
|
"devDependencies": {
|
|
89
|
-
"@storybook/react": "8.4.
|
|
90
|
-
"@storybook/react-webpack5": "8.4.
|
|
91
|
+
"@storybook/react": "8.4.5",
|
|
92
|
+
"@storybook/react-webpack5": "8.4.5",
|
|
91
93
|
"@types/node": "*",
|
|
92
94
|
"react": "^18.3.1",
|
|
93
95
|
"react-dom": "^18.3.1",
|
|
94
|
-
"storybook": "8.4.
|
|
96
|
+
"storybook": "8.4.5",
|
|
95
97
|
"ts-node": "*"
|
|
96
98
|
},
|
|
97
99
|
"size-limit": [
|
|
@@ -5,7 +5,7 @@ import { noop } from '@vkontakte/vkjs';
|
|
|
5
5
|
import { useAdaptivityWithJSMediaQueries } from '../../hooks/useAdaptivityWithJSMediaQueries';
|
|
6
6
|
import { usePlatform } from '../../hooks/usePlatform';
|
|
7
7
|
import { useCSSKeyframesAnimationController } from '../../lib/animation';
|
|
8
|
-
import {
|
|
8
|
+
import { AppRootPortal } from '../AppRoot/AppRootPortal';
|
|
9
9
|
import { useScrollLock } from '../AppRoot/ScrollContext';
|
|
10
10
|
import { PopoutWrapper } from '../PopoutWrapper/PopoutWrapper';
|
|
11
11
|
import { Footnote } from '../Typography/Footnote/Footnote';
|
|
@@ -143,7 +143,7 @@ export const ActionSheet = ({
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
return (
|
|
146
|
-
<
|
|
146
|
+
<AppRootPortal>
|
|
147
147
|
<PopoutWrapper
|
|
148
148
|
closing={Boolean(closingBy)}
|
|
149
149
|
alignY="bottom"
|
|
@@ -154,6 +154,6 @@ export const ActionSheet = ({
|
|
|
154
154
|
>
|
|
155
155
|
{actionSheet}
|
|
156
156
|
</PopoutWrapper>
|
|
157
|
-
</
|
|
157
|
+
</AppRootPortal>
|
|
158
158
|
);
|
|
159
159
|
};
|
|
@@ -73,7 +73,6 @@ export const ActionSheetItem = ({
|
|
|
73
73
|
onImmediateClick,
|
|
74
74
|
multiline = false,
|
|
75
75
|
iconChecked,
|
|
76
|
-
className,
|
|
77
76
|
isCancelItem,
|
|
78
77
|
...restProps
|
|
79
78
|
}: ActionSheetItemProps): React.ReactNode => {
|
|
@@ -130,7 +129,7 @@ export const ActionSheetItem = ({
|
|
|
130
129
|
{...restProps}
|
|
131
130
|
onClick={onItemClickImpl}
|
|
132
131
|
activeMode={platform === 'ios' ? styles.active : undefined}
|
|
133
|
-
|
|
132
|
+
baseClassName={classNames(
|
|
134
133
|
styles.host,
|
|
135
134
|
platform === 'ios' && styles.ios,
|
|
136
135
|
mode === 'cancel' && styles.modeCancel,
|
|
@@ -138,7 +137,6 @@ export const ActionSheetItem = ({
|
|
|
138
137
|
sizeY === 'compact' && styles.sizeYCompact,
|
|
139
138
|
isRich && styles.rich,
|
|
140
139
|
actionSheetMode === 'menu' && styles.menu,
|
|
141
|
-
className,
|
|
142
140
|
)}
|
|
143
141
|
onKeyDown={onKeyDown}
|
|
144
142
|
>
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
HasRootRef,
|
|
15
15
|
} from '../../types';
|
|
16
16
|
import type { AppRootPortalProps } from '../AppRoot/AppRootPortal';
|
|
17
|
-
import {
|
|
17
|
+
import { AppRootPortal } from '../AppRoot/AppRootPortal';
|
|
18
18
|
import { useScrollLock } from '../AppRoot/ScrollContext';
|
|
19
19
|
import type { ButtonProps } from '../Button/Button';
|
|
20
20
|
import { FocusTrap } from '../FocusTrap/FocusTrap';
|
|
@@ -140,7 +140,7 @@ export const Alert = ({
|
|
|
140
140
|
useScrollLock();
|
|
141
141
|
|
|
142
142
|
return (
|
|
143
|
-
<
|
|
143
|
+
<AppRootPortal usePortal={usePortal}>
|
|
144
144
|
<PopoutWrapper
|
|
145
145
|
className={className}
|
|
146
146
|
closing={closing}
|
|
@@ -205,6 +205,6 @@ export const Alert = ({
|
|
|
205
205
|
)}
|
|
206
206
|
</FocusTrap>
|
|
207
207
|
</PopoutWrapper>
|
|
208
|
-
</
|
|
208
|
+
</AppRootPortal>
|
|
209
209
|
);
|
|
210
210
|
};
|
|
@@ -20,7 +20,7 @@ const AlertActionIos = ({ mode, ...restProps }: AlertActionProps) => {
|
|
|
20
20
|
return (
|
|
21
21
|
<Tappable
|
|
22
22
|
Component={restProps.href ? 'a' : 'button'}
|
|
23
|
-
|
|
23
|
+
baseClassName={classNames(
|
|
24
24
|
styles.action,
|
|
25
25
|
mode === 'destructive' && styles.actionModeDestructive,
|
|
26
26
|
mode === 'cancel' && styles.actionModeCancel,
|
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useKeyboardInputTracker } from '../../hooks/useKeyboardInputTracker';
|
|
5
|
-
import { useObjectMemo } from '../../hooks/useObjectMemo';
|
|
6
5
|
import { useSyncHTMLWithBaseVKUIClasses } from '../../hooks/useSyncHTMLWithBaseVKUIClasses';
|
|
7
6
|
import { useSyncHTMLWithTokens } from '../../hooks/useSyncHTMLWithTokens';
|
|
8
|
-
import { getDocumentBody } from '../../lib/dom';
|
|
9
|
-
import { useIsomorphicLayoutEffect } from '../../lib/useIsomorphicLayoutEffect';
|
|
10
7
|
import { AppRootContext } from './AppRootContext';
|
|
11
8
|
import { AppRootStyleContainer } from './AppRootStyleContainer';
|
|
12
9
|
import { ElementScrollController, GlobalScrollController } from './ScrollContext';
|
|
13
|
-
import { extractPortalRootByProp } from './helpers';
|
|
14
10
|
import type {
|
|
15
11
|
AppRootLayout,
|
|
16
12
|
AppRootMode,
|
|
@@ -85,7 +81,7 @@ export const AppRoot = ({
|
|
|
85
81
|
children,
|
|
86
82
|
mode = 'full',
|
|
87
83
|
scroll = 'global',
|
|
88
|
-
portalRoot
|
|
84
|
+
portalRoot,
|
|
89
85
|
disablePortal = false,
|
|
90
86
|
disableParentTransformForPositionFixedElements,
|
|
91
87
|
safeAreaInsets: safeAreaInsetsProp,
|
|
@@ -95,46 +91,6 @@ export const AppRoot = ({
|
|
|
95
91
|
...props
|
|
96
92
|
}: AppRootProps): React.ReactNode => {
|
|
97
93
|
const appRootRef = React.useRef<HTMLDivElement | null>(null);
|
|
98
|
-
const popoutModalContainerRef = React.useRef<HTMLDivElement | null>(null);
|
|
99
|
-
const [portalRoot, setPortalRoot] = React.useState<HTMLElement | null>(
|
|
100
|
-
portalRootProp ? extractPortalRootByProp(portalRootProp) : null,
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
useIsomorphicLayoutEffect(
|
|
104
|
-
function syncPortalRootWithPortalRootProp() {
|
|
105
|
-
const portalByProp = portalRootProp ? extractPortalRootByProp(portalRootProp) : null;
|
|
106
|
-
if (portalRootProp !== undefined) {
|
|
107
|
-
setPortalRoot(portalByProp);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
[portalRootProp],
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
useIsomorphicLayoutEffect(
|
|
114
|
-
function removePortalRootOnUnmount() {
|
|
115
|
-
// Контейнер PortalRoot создаётся при первом вызове модалки или
|
|
116
|
-
// поповера использующего AppRootPortal.
|
|
117
|
-
// Потом он переиспользуется и не удаляется пока
|
|
118
|
-
// приложение не размонтируется.
|
|
119
|
-
// И создаётся только если в приложение не был передан
|
|
120
|
-
// пользовательский контейнер через свойство portalRootProp
|
|
121
|
-
// Сделано для поддержки SSR, чтобы при старте приложения
|
|
122
|
-
// никаких новых нод в DOM не создавалось.
|
|
123
|
-
const documentBody = getDocumentBody(appRootRef.current);
|
|
124
|
-
return function cleanup() {
|
|
125
|
-
if (portalRoot) {
|
|
126
|
-
const isPortalRootPassedByProps = Boolean(portalRootProp);
|
|
127
|
-
if (!isPortalRootPassedByProps) {
|
|
128
|
-
// удаляем portalRoot из дома только если он
|
|
129
|
-
// был создан в AppRootPortal.
|
|
130
|
-
// Если он был передан через пропы - удалять нельзя
|
|
131
|
-
documentBody.removeChild(portalRoot);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
},
|
|
136
|
-
[portalRootProp],
|
|
137
|
-
);
|
|
138
94
|
|
|
139
95
|
const ScrollController = React.useMemo(
|
|
140
96
|
() => (scroll === 'contain' ? ElementScrollController : GlobalScrollController),
|
|
@@ -142,13 +98,11 @@ export const AppRoot = ({
|
|
|
142
98
|
);
|
|
143
99
|
|
|
144
100
|
const isKeyboardInputActiveRef = useKeyboardInputTracker();
|
|
145
|
-
const safeAreaInsets =
|
|
101
|
+
const safeAreaInsets = React.useMemo(() => safeAreaInsetsProp, [safeAreaInsetsProp]);
|
|
146
102
|
const contextValue = React.useMemo(
|
|
147
103
|
() => ({
|
|
148
104
|
appRoot: appRootRef,
|
|
149
105
|
portalRoot,
|
|
150
|
-
popoutModalRoot: popoutModalContainerRef,
|
|
151
|
-
setPortalRoot,
|
|
152
106
|
safeAreaInsets,
|
|
153
107
|
embedded: mode === 'embedded',
|
|
154
108
|
mode,
|
|
@@ -180,7 +134,8 @@ export const AppRoot = ({
|
|
|
180
134
|
useSyncHTMLWithTokens({ appRootRef, enable: mode === 'full' });
|
|
181
135
|
/*
|
|
182
136
|
* По умолчанию VKUI будет выставлять .vkui на html и .vkui__root на контейнере в режиме full.
|
|
183
|
-
* В режиме embedded будет выставлять только .vkui__root на контейнере.
|
|
137
|
+
* В режиме embedded будет выставлять только .vkui__root и .vkui__root--embedded на контейнере.
|
|
138
|
+
* В режиме partial мы классы не выставляем.
|
|
184
139
|
*/
|
|
185
140
|
useSyncHTMLWithBaseVKUIClasses({
|
|
186
141
|
appRootRef,
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { noop } from '@vkontakte/vkjs';
|
|
3
2
|
import { type AppRootUserSelectMode, type SafeAreaInsets } from './types';
|
|
4
3
|
|
|
5
4
|
export interface AppRootContextInterface {
|
|
6
5
|
appRoot: React.RefObject<HTMLElement>;
|
|
7
|
-
portalRoot
|
|
8
|
-
popoutModalRoot: React.MutableRefObject<HTMLDivElement | null>;
|
|
9
|
-
setPortalRoot: (element: HTMLElement) => void;
|
|
6
|
+
portalRoot?: HTMLElement | React.RefObject<HTMLElement> | null;
|
|
10
7
|
safeAreaInsets?: SafeAreaInsets;
|
|
11
8
|
embedded: boolean;
|
|
12
9
|
mode: 'partial' | 'embedded' | 'full';
|
|
@@ -25,8 +22,6 @@ export const DEFAULT_APP_ROOT_CONTEXT_VALUE: AppRootContextInterface = {
|
|
|
25
22
|
appRoot: React.createRef(),
|
|
26
23
|
mode: 'full',
|
|
27
24
|
portalRoot: null,
|
|
28
|
-
popoutModalRoot: React.createRef(),
|
|
29
|
-
setPortalRoot: noop,
|
|
30
25
|
safeAreaInsets: undefined,
|
|
31
26
|
embedded: false,
|
|
32
27
|
keyboardInput: false,
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useColorScheme } from '../../hooks/useColorScheme';
|
|
5
5
|
import { createPortal } from '../../lib/createPortal';
|
|
6
|
-
import {
|
|
6
|
+
import { useDOM } from '../../lib/dom';
|
|
7
7
|
import { isRefObject } from '../../lib/isRefObject';
|
|
8
|
-
import { useIsomorphicLayoutEffect } from '../../lib/useIsomorphicLayoutEffect';
|
|
9
8
|
import type { HasChildren } from '../../types';
|
|
10
9
|
import { ColorSchemeProvider } from '../ColorSchemeProvider/ColorSchemeProvider';
|
|
11
10
|
import { AppRootContext, type AppRootContextInterface } from './AppRootContext';
|
|
@@ -13,13 +12,13 @@ import { AppRootStyleContainer } from './AppRootStyleContainer';
|
|
|
13
12
|
|
|
14
13
|
export interface AppRootPortalProps extends HasChildren {
|
|
15
14
|
/**
|
|
16
|
-
* - При передаче `true` будет
|
|
15
|
+
* - При передаче `true` в качестве портала будет использован `portalRoot`
|
|
16
|
+
* из контекста `AppRoot` если он передан в `AppRoot`, иначе `document.body`.
|
|
17
17
|
* - При передаче элемента будут игнорироваться `portalRoot` и `disablePortal` из контекста `AppRoot`.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* это последний дочерний элемент `body`.
|
|
18
|
+
*
|
|
19
|
+
* По умолчанию в качестве портала будет использован `document.body`
|
|
21
20
|
*/
|
|
22
|
-
usePortal?: boolean | HTMLElement | React.RefObject<HTMLElement> | null
|
|
21
|
+
usePortal?: boolean | HTMLElement | React.RefObject<HTMLElement> | null;
|
|
23
22
|
className?: string;
|
|
24
23
|
}
|
|
25
24
|
|
|
@@ -28,12 +27,8 @@ export const AppRootPortal = ({
|
|
|
28
27
|
usePortal,
|
|
29
28
|
className,
|
|
30
29
|
}: AppRootPortalProps): React.ReactNode => {
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
appRoot,
|
|
34
|
-
mode,
|
|
35
|
-
disablePortal: disableCreatePortalInGlobalPortalRoot,
|
|
36
|
-
} = React.useContext(AppRootContext);
|
|
30
|
+
const { mode, disablePortal: disableCreatePortalInGlobalPortalRoot } =
|
|
31
|
+
React.useContext(AppRootContext);
|
|
37
32
|
const colorScheme = useColorScheme();
|
|
38
33
|
|
|
39
34
|
const canUsePortal = shouldUsePortal(
|
|
@@ -41,27 +36,8 @@ export const AppRootPortal = ({
|
|
|
41
36
|
mode,
|
|
42
37
|
Boolean(disableCreatePortalInGlobalPortalRoot),
|
|
43
38
|
);
|
|
44
|
-
const portalContainer = usePortalContainer(usePortal);
|
|
45
|
-
|
|
46
|
-
useIsomorphicLayoutEffect(
|
|
47
|
-
// Создаём контейнер для портала по запросу один раз
|
|
48
|
-
// и пока приложение не размонтируется.
|
|
49
|
-
// Удаление созданной ноды происходит в AppRoot
|
|
50
|
-
function initializePortalRootIfNeeded() {
|
|
51
|
-
const shouldCreatePortalRoot = canUsePortal && portalContainer === null;
|
|
52
|
-
if (shouldCreatePortalRoot) {
|
|
53
|
-
const documentBody = getDocumentBody(appRoot.current);
|
|
54
|
-
const portal = documentBody.ownerDocument.createElement('div');
|
|
55
|
-
documentBody.appendChild(portal);
|
|
56
|
-
|
|
57
|
-
setPortalRoot(portal);
|
|
58
|
-
}
|
|
59
39
|
|
|
60
|
-
|
|
61
|
-
// Очистка и удаление `portalRoot` делегируется `AppRoot`, т.к. экземпляров `AppRootPortal` может быть несколько и размонтирование одного из них удалит `portalRoot`, что сломает работу других экземпляров.
|
|
62
|
-
},
|
|
63
|
-
[canUsePortal, appRoot, portalContainer, setPortalRoot],
|
|
64
|
-
);
|
|
40
|
+
const portalContainer = usePortalContainer(usePortal);
|
|
65
41
|
|
|
66
42
|
if (canUsePortal && portalContainer) {
|
|
67
43
|
return createPortal(
|
|
@@ -92,14 +68,20 @@ function shouldUsePortal(
|
|
|
92
68
|
}
|
|
93
69
|
|
|
94
70
|
function usePortalContainer(usePortal: AppRootPortalProps['usePortal']): HTMLElement | null {
|
|
95
|
-
const { portalRoot
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
71
|
+
const { portalRoot: portalRootFromContext } = React.useContext(AppRootContext);
|
|
72
|
+
|
|
73
|
+
const { document } = useDOM();
|
|
99
74
|
|
|
100
|
-
if (usePortal
|
|
101
|
-
return
|
|
75
|
+
if (usePortal && typeof usePortal !== 'boolean') {
|
|
76
|
+
return isRefObject(usePortal) ? usePortal.current : usePortal;
|
|
102
77
|
}
|
|
103
78
|
|
|
104
|
-
|
|
79
|
+
const resolvedPortalFromContext = isRefObject(portalRootFromContext)
|
|
80
|
+
? portalRootFromContext.current
|
|
81
|
+
: portalRootFromContext;
|
|
82
|
+
// если portalRoot не передали через AppRoot, то мы используем body
|
|
83
|
+
// мы можем использовать body как портал,
|
|
84
|
+
// так как все стили передаются вместе с AppRootStyleContainer
|
|
85
|
+
const portalRoot = resolvedPortalFromContext || document?.body || null;
|
|
86
|
+
return portalRoot;
|
|
105
87
|
}
|
|
@@ -2,9 +2,6 @@ import { isRefObject } from '../../lib/isRefObject';
|
|
|
2
2
|
import type { AppRootUserSelectMode, SafeAreaInsets } from './types';
|
|
3
3
|
import styles from './AppRoot.module.css';
|
|
4
4
|
|
|
5
|
-
export const getParentElement = (el: HTMLElement | null): HTMLElement | null =>
|
|
6
|
-
el ? el.parentElement : null;
|
|
7
|
-
|
|
8
5
|
export const extractPortalRootByProp = (
|
|
9
6
|
portalRootProp: HTMLElement | React.RefObject<HTMLElement>,
|
|
10
7
|
): HTMLElement | null => (isRefObject(portalRootProp) ? portalRootProp.current : portalRootProp);
|
|
@@ -23,12 +23,7 @@ export interface AspectRatioProps extends Omit<RootComponentProps<HTMLElement>,
|
|
|
23
23
|
* @since 5.5.0
|
|
24
24
|
* @see https://vkcom.github.io/VKUI/#/AspectRatio
|
|
25
25
|
*/
|
|
26
|
-
export function AspectRatio({
|
|
27
|
-
ratio,
|
|
28
|
-
mode = 'stretch',
|
|
29
|
-
style: styleProp,
|
|
30
|
-
...props
|
|
31
|
-
}: AspectRatioProps): JSX.Element {
|
|
26
|
+
export function AspectRatio({ ratio, mode = 'stretch', ...props }: AspectRatioProps): JSX.Element {
|
|
32
27
|
const style: React.CSSProperties & CSSCustomProperties = {
|
|
33
28
|
'--vkui_internal--aspect_ratio': String(ratio),
|
|
34
29
|
};
|
|
@@ -36,7 +31,7 @@ export function AspectRatio({
|
|
|
36
31
|
return (
|
|
37
32
|
<RootComponent
|
|
38
33
|
baseClassName={classNames(styles.host, mode === 'stretch' && styles.modeStretch)}
|
|
39
|
-
|
|
34
|
+
baseStyle={style}
|
|
40
35
|
{...props}
|
|
41
36
|
/>
|
|
42
37
|
);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { classNames } from '@vkontakte/vkjs';
|
|
2
|
-
import { ImageBase, type
|
|
2
|
+
import { ImageBase, type ImageBaseProps } from '../ImageBase/ImageBase';
|
|
3
|
+
import {
|
|
4
|
+
ImageBaseOverlay,
|
|
5
|
+
type ImageBaseOverlayProps,
|
|
6
|
+
} from '../ImageBase/ImageBaseOverlay/ImageBaseOverlay';
|
|
3
7
|
import { AvatarBadge, type AvatarBadgeProps } from './AvatarBadge/AvatarBadge';
|
|
4
8
|
import {
|
|
5
9
|
AvatarBadgeWithPreset,
|
|
@@ -131,7 +135,7 @@ Avatar.Badge.displayName = 'Avatar.Badge';
|
|
|
131
135
|
Avatar.BadgeWithPreset = AvatarBadgeWithPreset;
|
|
132
136
|
Avatar.BadgeWithPreset.displayName = 'Avatar.BadgeWithPreset';
|
|
133
137
|
|
|
134
|
-
Avatar.Overlay =
|
|
138
|
+
Avatar.Overlay = ImageBaseOverlay;
|
|
135
139
|
Avatar.Overlay.displayName = 'Avatar.Overlay';
|
|
136
140
|
|
|
137
141
|
Avatar.getInitialsFontSize = getInitialsFontSize;
|
|
@@ -96,7 +96,6 @@ export const Banner = ({
|
|
|
96
96
|
actions,
|
|
97
97
|
onDismiss,
|
|
98
98
|
dismissLabel = 'Скрыть',
|
|
99
|
-
className,
|
|
100
99
|
Component,
|
|
101
100
|
...restProps
|
|
102
101
|
}: BannerProps): React.ReactNode => {
|
|
@@ -173,7 +172,6 @@ export const Banner = ({
|
|
|
173
172
|
mode === 'image' && styles.modeImage,
|
|
174
173
|
size === 'm' && styles.sizeM,
|
|
175
174
|
mode === 'image' && imageTheme === 'dark' && styles.inverted,
|
|
176
|
-
className,
|
|
177
175
|
)}
|
|
178
176
|
{...restProps}
|
|
179
177
|
>
|
|
@@ -73,7 +73,6 @@ export const Button = ({
|
|
|
73
73
|
getRootRef,
|
|
74
74
|
loading,
|
|
75
75
|
onClick,
|
|
76
|
-
className,
|
|
77
76
|
disableSpinnerAnimation,
|
|
78
77
|
rounded,
|
|
79
78
|
disabled,
|
|
@@ -92,8 +91,7 @@ export const Button = ({
|
|
|
92
91
|
disabled={loading || disabled}
|
|
93
92
|
{...restProps}
|
|
94
93
|
onClick={loading ? undefined : onClick}
|
|
95
|
-
|
|
96
|
-
className,
|
|
94
|
+
baseClassName={classNames(
|
|
97
95
|
styles.host,
|
|
98
96
|
stylesSize[size],
|
|
99
97
|
stylesMode[mode],
|
|
@@ -58,7 +58,6 @@ export const CalendarDay: React.FC<CalendarDayProps> = React.memo(
|
|
|
58
58
|
hintedSelectionEnd,
|
|
59
59
|
sameMonth,
|
|
60
60
|
size,
|
|
61
|
-
className,
|
|
62
61
|
children,
|
|
63
62
|
renderDayContent,
|
|
64
63
|
testId,
|
|
@@ -102,7 +101,7 @@ export const CalendarDay: React.FC<CalendarDayProps> = React.memo(
|
|
|
102
101
|
|
|
103
102
|
return (
|
|
104
103
|
<Tappable
|
|
105
|
-
|
|
104
|
+
baseClassName={classNames(styles.host, size === 's' && styles.sizeS)}
|
|
106
105
|
hoverMode={styles.hostHovered}
|
|
107
106
|
activeMode={styles.hostActivated}
|
|
108
107
|
hasActive={false}
|
|
@@ -156,7 +156,7 @@ export const CalendarHeader = ({
|
|
|
156
156
|
{!prevMonthHidden && (
|
|
157
157
|
<AdaptivityProvider sizeX="regular">
|
|
158
158
|
<Tappable
|
|
159
|
-
|
|
159
|
+
baseClassName={classNames(styles.navIcon, styles.navIconPrev, prevMonthClassName)}
|
|
160
160
|
onClick={onPrevMonth}
|
|
161
161
|
data-testid={prevMonthButtonTestId}
|
|
162
162
|
{...restPrevMonthProps}
|
|
@@ -222,7 +222,7 @@ export const CalendarHeader = ({
|
|
|
222
222
|
{!nextMonthHidden && (
|
|
223
223
|
<AdaptivityProvider sizeX="regular">
|
|
224
224
|
<Tappable
|
|
225
|
-
|
|
225
|
+
baseClassName={classNames(styles.navIcon, styles.navIconNext, nextMonthClassName)}
|
|
226
226
|
onClick={onNextMonth}
|
|
227
227
|
data-testid={nextMonthButtonTestId}
|
|
228
228
|
{...restNextMonthProps}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
// TODO [@vkontakte/icons-sprite>=2.3.1]: Удалить use client, если он появился в IconAppearanceProvider
|
|
4
|
+
|
|
1
5
|
import * as React from 'react';
|
|
2
6
|
import { IconAppearanceProvider } from '@vkontakte/icons';
|
|
3
7
|
import type { ColorSchemeType } from '../../lib/colorScheme';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { classNames } from '@vkontakte/vkjs';
|
|
5
|
-
import {
|
|
5
|
+
import { mergeStyle } from '../../helpers/mergeStyle';
|
|
6
|
+
import { type CSSCustomProperties, type HTMLAttributesWithRootRef } from '../../types';
|
|
6
7
|
import { Caption } from '../Typography/Caption/Caption';
|
|
7
8
|
import { Headline } from '../Typography/Headline/Headline';
|
|
8
9
|
import styles from './Counter.module.css';
|
|
@@ -73,25 +74,23 @@ export const Counter = ({
|
|
|
73
74
|
return 'accent';
|
|
74
75
|
}, [appearanceProp, mode]);
|
|
75
76
|
|
|
76
|
-
const style
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
return styleProp;
|
|
94
|
-
}, [appearance, color, mode, styleProp]);
|
|
77
|
+
const style: (React.CSSProperties & CSSCustomProperties<string | undefined>) | undefined =
|
|
78
|
+
React.useMemo(() => {
|
|
79
|
+
if (mode === 'inherit' || appearance !== 'custom' || !color) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
switch (mode) {
|
|
83
|
+
case 'primary':
|
|
84
|
+
return {
|
|
85
|
+
'--vkui_internal--counter_background': color,
|
|
86
|
+
};
|
|
87
|
+
case 'contrast':
|
|
88
|
+
case 'tertiary':
|
|
89
|
+
return {
|
|
90
|
+
'--vkui_internal--counter_foreground': color,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}, [appearance, color, mode]);
|
|
95
94
|
|
|
96
95
|
if (React.Children.count(children) === 0) {
|
|
97
96
|
return null;
|
|
@@ -103,7 +102,7 @@ export const Counter = ({
|
|
|
103
102
|
return (
|
|
104
103
|
<CounterTypography
|
|
105
104
|
{...restProps}
|
|
106
|
-
style={style}
|
|
105
|
+
style={mergeStyle(style, styleProp)}
|
|
107
106
|
Component="span"
|
|
108
107
|
className={classNames(
|
|
109
108
|
'vkuiInternalCounter',
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Icon16Done } from '@vkontakte/icons';
|
|
5
5
|
import { classNames, hasReactNode } from '@vkontakte/vkjs';
|
|
6
|
+
import { mergeStyle } from '../../helpers/mergeStyle';
|
|
6
7
|
import { useAdaptivity } from '../../hooks/useAdaptivity';
|
|
7
|
-
import type { HTMLAttributesWithRootRef } from '../../types';
|
|
8
|
+
import type { CSSCustomProperties, HTMLAttributesWithRootRef } from '../../types';
|
|
8
9
|
import { Footnote } from '../Typography/Footnote/Footnote';
|
|
9
10
|
import { Paragraph } from '../Typography/Paragraph/Paragraph';
|
|
10
11
|
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';
|
|
@@ -74,15 +75,14 @@ export const CustomSelectOption = ({
|
|
|
74
75
|
...restProps
|
|
75
76
|
}: CustomSelectOptionProps): React.ReactNode => {
|
|
76
77
|
const { sizeY = 'none' } = useAdaptivity();
|
|
77
|
-
const style = React.useMemo(
|
|
78
|
+
const style: (React.CSSProperties & CSSCustomProperties<number>) | undefined = React.useMemo(
|
|
78
79
|
() =>
|
|
79
80
|
hierarchy > 0
|
|
80
81
|
? {
|
|
81
82
|
'--vkui_internal--custom_select_option_hierarchy_level': hierarchy,
|
|
82
|
-
...styleProp,
|
|
83
83
|
}
|
|
84
|
-
:
|
|
85
|
-
[hierarchy
|
|
84
|
+
: undefined,
|
|
85
|
+
[hierarchy],
|
|
86
86
|
);
|
|
87
87
|
const hovered = hoveredProp && !disabled ? true : false;
|
|
88
88
|
|
|
@@ -103,7 +103,7 @@ export const CustomSelectOption = ({
|
|
|
103
103
|
hierarchy > 0 && styles.hierarchy,
|
|
104
104
|
className,
|
|
105
105
|
)}
|
|
106
|
-
style={style}
|
|
106
|
+
style={mergeStyle(style, styleProp)}
|
|
107
107
|
>
|
|
108
108
|
{hasReactNode(before) && <div className={styles.before}>{before}</div>}
|
|
109
109
|
<div className={styles.main}>
|
|
@@ -82,7 +82,6 @@ export const Flex: React.FC<FlexProps> & {
|
|
|
82
82
|
margin = 'none',
|
|
83
83
|
noWrap = false,
|
|
84
84
|
direction = 'row',
|
|
85
|
-
style: styleProp,
|
|
86
85
|
reverse = false,
|
|
87
86
|
children,
|
|
88
87
|
...props
|
|
@@ -104,7 +103,7 @@ export const Flex: React.FC<FlexProps> & {
|
|
|
104
103
|
withGaps && styles.withGaps,
|
|
105
104
|
withGaps && getGapsPresets(rowGap, columnGap),
|
|
106
105
|
)}
|
|
107
|
-
|
|
106
|
+
baseStyle={getGapsByUser(rowGap, columnGap)}
|
|
108
107
|
>
|
|
109
108
|
{children}
|
|
110
109
|
</RootComponent>
|
|
@@ -46,13 +46,12 @@ export const FlexItem = ({
|
|
|
46
46
|
alignSelf,
|
|
47
47
|
flex,
|
|
48
48
|
flexBasis,
|
|
49
|
-
style,
|
|
50
49
|
...rest
|
|
51
50
|
}: FlexItemProps): React.ReactNode => {
|
|
52
51
|
return (
|
|
53
52
|
<RootComponent
|
|
54
53
|
{...rest}
|
|
55
|
-
|
|
54
|
+
baseStyle={{ flexBasis }}
|
|
56
55
|
baseClassName={classNames(
|
|
57
56
|
alignSelf && alignSelfClassNames[alignSelf],
|
|
58
57
|
flex && flexClassNames[flex],
|