@vkontakte/vkui 8.1.3 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionSheet/ActionSheet.d.ts +5 -4
- package/dist/components/ActionSheet/ActionSheet.d.ts.map +1 -1
- package/dist/components/ActionSheet/ActionSheet.js +2 -1
- package/dist/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/components/AdaptivityProvider/AdaptivityContext.d.ts +3 -3
- package/dist/components/AdaptivityProvider/AdaptivityContext.js.map +1 -1
- package/dist/components/AdaptivityProvider/AdaptivityProvider.js +2 -2
- package/dist/components/AdaptivityProvider/AdaptivityProvider.js.map +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts.map +1 -1
- package/dist/components/AppRoot/AppRoot.js +0 -6
- package/dist/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/components/AppRoot/AppRootContext.d.ts +0 -1
- package/dist/components/AppRoot/AppRootContext.d.ts.map +1 -1
- package/dist/components/AppRoot/AppRootContext.js +0 -1
- package/dist/components/AppRoot/AppRootContext.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +1 -1
- package/dist/components/Calendar/Calendar.js +2 -1
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/CalendarDay/CalendarDay.d.ts.map +1 -1
- package/dist/components/CalendarDay/CalendarDay.js +4 -2
- package/dist/components/CalendarDay/CalendarDay.js.map +1 -1
- package/dist/components/CalendarDays/CalendarDays.d.ts.map +1 -1
- package/dist/components/CalendarDays/CalendarDays.js +2 -2
- package/dist/components/CalendarDays/CalendarDays.js.map +1 -1
- package/dist/components/CalendarHeader/CalendarHeader.d.ts.map +1 -1
- package/dist/components/CalendarHeader/CalendarHeader.js +4 -2
- package/dist/components/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/components/CalendarRange/CalendarRange.d.ts +2 -2
- package/dist/components/CalendarRange/CalendarRange.js.map +1 -1
- package/dist/components/CalendarTime/CalendarTime.d.ts +1 -1
- package/dist/components/CalendarTime/CalendarTime.d.ts.map +1 -1
- package/dist/components/CalendarTime/CalendarTime.js +61 -50
- package/dist/components/CalendarTime/CalendarTime.js.map +1 -1
- package/dist/components/CalendarTime/CalendarTimePicker.d.ts +11 -7
- package/dist/components/CalendarTime/CalendarTimePicker.d.ts.map +1 -1
- package/dist/components/CalendarTime/CalendarTimePicker.js +108 -48
- package/dist/components/CalendarTime/CalendarTimePicker.js.map +1 -1
- package/dist/components/CalendarTime/ComboBox.d.ts +25 -0
- package/dist/components/CalendarTime/ComboBox.d.ts.map +1 -0
- package/dist/components/CalendarTime/ComboBox.js +112 -0
- package/dist/components/CalendarTime/ComboBox.js.map +1 -0
- package/dist/components/CardScroll/CardScroll.d.ts.map +1 -1
- package/dist/components/CardScroll/CardScroll.js +2 -2
- package/dist/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/components/CarouselBase/CarouselBase.d.ts.map +1 -1
- package/dist/components/CarouselBase/CarouselBase.js +3 -1
- package/dist/components/CarouselBase/CarouselBase.js.map +1 -1
- package/dist/components/ChipsSelect/useChipsSelect.d.ts.map +1 -1
- package/dist/components/ChipsSelect/useChipsSelect.js +2 -1
- package/dist/components/ChipsSelect/useChipsSelect.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.d.ts.map +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.js +8 -4
- package/dist/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderOverride.d.ts.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderOverride.js +5 -1
- package/dist/components/ConfigProvider/ConfigProviderOverride.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderSubContexts.d.ts +15 -0
- package/dist/components/ConfigProvider/ConfigProviderSubContexts.d.ts.map +1 -0
- package/dist/components/ConfigProvider/ConfigProviderSubContexts.js +25 -0
- package/dist/components/ConfigProvider/ConfigProviderSubContexts.js.map +1 -0
- package/dist/components/ContentBadge/ContentBadge.d.ts +14 -1
- package/dist/components/ContentBadge/ContentBadge.d.ts.map +1 -1
- package/dist/components/ContentBadge/ContentBadge.js +39 -1
- package/dist/components/ContentBadge/ContentBadge.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.js +16 -10
- package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/components/DateInput/DateInput.d.ts.map +1 -1
- package/dist/components/DateInput/DateInput.js +4 -3
- package/dist/components/DateInput/DateInput.js.map +1 -1
- package/dist/components/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/components/DateRangeInput/DateRangeInput.js +2 -2
- package/dist/components/DateRangeInput/DateRangeInput.js.map +1 -1
- package/dist/components/Epic/ScrollSaver.d.ts.map +1 -1
- package/dist/components/Epic/ScrollSaver.js +1 -0
- package/dist/components/Epic/ScrollSaver.js.map +1 -1
- package/dist/components/FixedLayout/ParentWidthWrapper.d.ts +6 -0
- package/dist/components/FixedLayout/ParentWidthWrapper.d.ts.map +1 -0
- package/dist/components/FixedLayout/ParentWidthWrapper.js +43 -0
- package/dist/components/FixedLayout/ParentWidthWrapper.js.map +1 -0
- package/dist/components/Flex/Flex.d.ts +7 -4
- package/dist/components/Flex/Flex.d.ts.map +1 -1
- package/dist/components/Flex/Flex.js +5 -2
- package/dist/components/Flex/Flex.js.map +1 -1
- package/dist/components/ImageBase/ImageBaseFloatElement/ImageBaseFloatElement.js +3 -1
- package/dist/components/ImageBase/ImageBaseFloatElement/ImageBaseFloatElement.js.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.d.ts.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.js +6 -2
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/components/OnboardingTooltip/OnboardingTooltip.js +2 -1
- package/dist/components/OnboardingTooltip/OnboardingTooltip.js.map +1 -1
- package/dist/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/components/PanelHeader/PanelHeader.js.map +1 -1
- package/dist/components/Popper/Popper.js +1 -1
- package/dist/components/Popper/Popper.js.map +1 -1
- package/dist/components/PullToRefresh/PullToRefresh.d.ts.map +1 -1
- package/dist/components/PullToRefresh/PullToRefresh.js +8 -4
- package/dist/components/PullToRefresh/PullToRefresh.js.map +1 -1
- package/dist/components/Root/Root.d.ts +1 -1
- package/dist/components/Root/Root.d.ts.map +1 -1
- package/dist/components/Root/Root.js +14 -5
- package/dist/components/Root/Root.js.map +1 -1
- package/dist/components/SimpleGrid/SimpleGrid.d.ts +9 -8
- package/dist/components/SimpleGrid/SimpleGrid.d.ts.map +1 -1
- package/dist/components/SimpleGrid/SimpleGrid.js +9 -2
- package/dist/components/SimpleGrid/SimpleGrid.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +3 -4
- 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 +6 -3
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Spacing/Spacing.d.ts +1 -1
- package/dist/components/Spacing/Spacing.js.map +1 -1
- package/dist/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.d.ts +10 -0
- package/dist/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.d.ts.map +1 -0
- package/dist/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.js +54 -0
- package/dist/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.js.map +1 -0
- package/dist/components/Spinner/ExpressiveSpinner/icons.d.ts +18 -0
- package/dist/components/Spinner/ExpressiveSpinner/icons.d.ts.map +1 -0
- package/dist/components/Spinner/ExpressiveSpinner/icons.js +79 -0
- package/dist/components/Spinner/ExpressiveSpinner/icons.js.map +1 -0
- package/dist/components/Spinner/SvgIcon.d.ts +14 -0
- package/dist/components/Spinner/SvgIcon.d.ts.map +1 -0
- package/dist/components/Spinner/SvgIcon.js +20 -0
- package/dist/components/Spinner/SvgIcon.js.map +1 -0
- package/dist/components/Spinner/icons.d.ts +1 -1
- package/dist/components/Spinner/icons.d.ts.map +1 -1
- package/dist/components/Spinner/icons.js +10 -23
- package/dist/components/Spinner/icons.js.map +1 -1
- package/dist/components/SplitLayout/SplitLayout.d.ts +3 -3
- package/dist/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/components/TabsItem/TabsItem.d.ts.map +1 -1
- package/dist/components/TabsItem/TabsItem.js +2 -5
- package/dist/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/components/Tappable/Tappable.d.ts +2 -2
- package/dist/components/Tappable/Tappable.js.map +1 -1
- package/dist/components/WriteBar/WriteBar.d.ts +15 -1
- package/dist/components/WriteBar/WriteBar.d.ts.map +1 -1
- package/dist/components/WriteBar/WriteBar.js +35 -63
- package/dist/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.d.ts +5 -0
- package/dist/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.d.ts.map +1 -0
- package/dist/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.js +15 -0
- package/dist/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.js.map +1 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormField.d.ts +8 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormField.d.ts.map +1 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormField.js +16 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormField.js.map +1 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.d.ts +5 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.d.ts.map +1 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.js +15 -0
- package/dist/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.js.map +1 -0
- package/dist/components/WriteBar/WriteBarRoot/WriteBarRoot.d.ts +10 -0
- package/dist/components/WriteBar/WriteBarRoot/WriteBarRoot.d.ts.map +1 -0
- package/dist/components/WriteBar/WriteBarRoot/WriteBarRoot.js +16 -0
- package/dist/components/WriteBar/WriteBarRoot/WriteBarRoot.js.map +1 -0
- package/dist/components/WriteBar/WriteBarTextarea/WriteBarTextarea.d.ts +10 -0
- package/dist/components/WriteBar/WriteBarTextarea/WriteBarTextarea.d.ts.map +1 -0
- package/dist/components/WriteBar/WriteBarTextarea/WriteBarTextarea.js +39 -0
- package/dist/components/WriteBar/WriteBarTextarea/WriteBarTextarea.js.map +1 -0
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheet/ActionSheet.js +2 -1
- package/dist/cssm/components/ActionSheet/ActionSheet.js.map +1 -1
- package/dist/cssm/components/AdaptivityProvider/AdaptivityContext.js.map +1 -1
- package/dist/cssm/components/AdaptivityProvider/AdaptivityProvider.js +2 -2
- package/dist/cssm/components/AdaptivityProvider/AdaptivityProvider.js.map +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.js +0 -6
- package/dist/cssm/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cssm/components/AppRoot/AppRootContext.js +0 -1
- package/dist/cssm/components/AppRoot/AppRootContext.js.map +1 -1
- package/dist/cssm/components/Calendar/Calendar.js +2 -1
- package/dist/cssm/components/Calendar/Calendar.js.map +1 -1
- package/dist/cssm/components/CalendarDay/CalendarDay.js +4 -2
- package/dist/cssm/components/CalendarDay/CalendarDay.js.map +1 -1
- package/dist/cssm/components/CalendarDays/CalendarDays.js +2 -2
- package/dist/cssm/components/CalendarDays/CalendarDays.js.map +1 -1
- package/dist/cssm/components/CalendarHeader/CalendarHeader.js +4 -2
- package/dist/cssm/components/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/cssm/components/CalendarRange/CalendarRange.js.map +1 -1
- package/dist/cssm/components/CalendarTime/CalendarTime.js +61 -50
- package/dist/cssm/components/CalendarTime/CalendarTime.js.map +1 -1
- package/dist/cssm/components/CalendarTime/CalendarTime.module.css +38 -0
- package/dist/cssm/components/CalendarTime/CalendarTimePicker.js +108 -48
- package/dist/cssm/components/CalendarTime/CalendarTimePicker.js.map +1 -1
- package/dist/cssm/components/CalendarTime/ComboBox.js +113 -0
- package/dist/cssm/components/CalendarTime/ComboBox.js.map +1 -0
- package/dist/cssm/components/CardScroll/CardScroll.js +2 -2
- package/dist/cssm/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cssm/components/CarouselBase/CarouselBase.js +3 -1
- package/dist/cssm/components/CarouselBase/CarouselBase.js.map +1 -1
- package/dist/cssm/components/ChipsSelect/useChipsSelect.js +2 -1
- package/dist/cssm/components/ChipsSelect/useChipsSelect.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProvider.js +8 -4
- package/dist/cssm/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProviderOverride.js +5 -1
- package/dist/cssm/components/ConfigProvider/ConfigProviderOverride.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProviderSubContexts.js +25 -0
- package/dist/cssm/components/ConfigProvider/ConfigProviderSubContexts.js.map +1 -0
- package/dist/cssm/components/ContentBadge/ContentBadge.js +39 -1
- package/dist/cssm/components/ContentBadge/ContentBadge.js.map +1 -1
- package/dist/cssm/components/ContentBadge/ContentBadge.module.css +88 -90
- package/dist/cssm/components/CustomSelect/CustomSelect.js +16 -10
- package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cssm/components/DateInput/DateInput.js +4 -3
- package/dist/cssm/components/DateInput/DateInput.js.map +1 -1
- package/dist/cssm/components/DateRangeInput/DateRangeInput.js +2 -2
- package/dist/cssm/components/DateRangeInput/DateRangeInput.js.map +1 -1
- package/dist/cssm/components/Epic/ScrollSaver.js +1 -0
- package/dist/cssm/components/Epic/ScrollSaver.js.map +1 -1
- package/dist/cssm/components/FixedLayout/ParentWidthWrapper.js +43 -0
- package/dist/cssm/components/FixedLayout/ParentWidthWrapper.js.map +1 -0
- package/dist/cssm/components/Flex/Flex.js +5 -2
- package/dist/cssm/components/Flex/Flex.js.map +1 -1
- package/dist/cssm/components/GridAvatar/GridAvatar.module.css +1 -1
- package/dist/cssm/components/ImageBase/ImageBaseFloatElement/ImageBaseFloatElement.js +3 -1
- package/dist/cssm/components/ImageBase/ImageBaseFloatElement/ImageBaseFloatElement.js.map +1 -1
- package/dist/cssm/components/NativeSelect/NativeSelect.js +6 -2
- package/dist/cssm/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cssm/components/OnboardingTooltip/OnboardingTooltip.js +2 -1
- package/dist/cssm/components/OnboardingTooltip/OnboardingTooltip.js.map +1 -1
- package/dist/cssm/components/PanelHeader/PanelHeader.js.map +1 -1
- package/dist/cssm/components/Popper/Popper.js +1 -1
- package/dist/cssm/components/Popper/Popper.js.map +1 -1
- package/dist/cssm/components/PullToRefresh/PullToRefresh.js +8 -4
- package/dist/cssm/components/PullToRefresh/PullToRefresh.js.map +1 -1
- package/dist/cssm/components/PullToRefresh/PullToRefresh.module.css +1 -1
- package/dist/cssm/components/Root/Root.js +14 -5
- package/dist/cssm/components/Root/Root.js.map +1 -1
- package/dist/cssm/components/SimpleGrid/SimpleGrid.js +9 -2
- package/dist/cssm/components/SimpleGrid/SimpleGrid.js.map +1 -1
- package/dist/cssm/components/Skeleton/Skeleton.js +3 -4
- package/dist/cssm/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.js +6 -3
- package/dist/cssm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cssm/components/Spacing/Spacing.js.map +1 -1
- package/dist/cssm/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.js +56 -0
- package/dist/cssm/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.js.map +1 -0
- package/dist/cssm/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.module.css +13 -0
- package/dist/cssm/components/Spinner/ExpressiveSpinner/icons.js +79 -0
- package/dist/cssm/components/Spinner/ExpressiveSpinner/icons.js.map +1 -0
- package/dist/cssm/components/Spinner/SvgIcon.js +20 -0
- package/dist/cssm/components/Spinner/SvgIcon.js.map +1 -0
- package/dist/cssm/components/Spinner/icons.js +10 -23
- package/dist/cssm/components/Spinner/icons.js.map +1 -1
- package/dist/cssm/components/SplitLayout/SplitLayout.js.map +1 -1
- package/dist/cssm/components/TabsItem/TabsItem.js +2 -5
- package/dist/cssm/components/TabsItem/TabsItem.js.map +1 -1
- package/dist/cssm/components/Tappable/Tappable.js.map +1 -1
- package/dist/cssm/components/WriteBar/WriteBar.js +35 -64
- package/dist/cssm/components/WriteBar/WriteBar.js.map +1 -1
- package/dist/cssm/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.js +16 -0
- package/dist/cssm/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.js.map +1 -0
- package/dist/cssm/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.module.css +12 -0
- package/dist/cssm/components/WriteBar/WriteBarFormField/WriteBarFormField.js +17 -0
- package/dist/cssm/components/WriteBar/WriteBarFormField/WriteBarFormField.js.map +1 -0
- package/dist/cssm/components/WriteBar/WriteBarFormField/WriteBarFormField.module.css +18 -0
- package/dist/cssm/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.js +16 -0
- package/dist/cssm/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.js.map +1 -0
- package/dist/cssm/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.module.css +3 -0
- package/dist/cssm/components/WriteBar/WriteBarRoot/WriteBarRoot.js +17 -0
- package/dist/cssm/components/WriteBar/WriteBarRoot/WriteBarRoot.js.map +1 -0
- package/dist/cssm/components/WriteBar/WriteBarRoot/WriteBarRoot.module.css +15 -0
- package/dist/cssm/components/WriteBar/WriteBarTextarea/WriteBarTextarea.js +40 -0
- package/dist/cssm/components/WriteBar/WriteBarTextarea/WriteBarTextarea.js.map +1 -0
- package/dist/cssm/components/WriteBar/WriteBarTextarea/WriteBarTextarea.module.css +43 -0
- package/dist/cssm/helpers/math.js +6 -0
- package/dist/cssm/helpers/math.js.map +1 -1
- package/dist/cssm/hoc/withPlatform.js +3 -2
- package/dist/cssm/hoc/withPlatform.js.map +1 -1
- package/dist/cssm/hooks/useAdaptivityConditionalRender/types.js.map +1 -1
- package/dist/cssm/hooks/useAnimationFrame.js +40 -0
- package/dist/cssm/hooks/useAnimationFrame.js.map +1 -0
- package/dist/cssm/hooks/useAutoFocus.js +4 -1
- package/dist/cssm/hooks/useAutoFocus.js.map +1 -1
- package/dist/cssm/hooks/useColorScheme.js +3 -3
- package/dist/cssm/hooks/useColorScheme.js.map +1 -1
- package/dist/cssm/hooks/useConfigDirection.js +3 -3
- package/dist/cssm/hooks/useConfigDirection.js.map +1 -1
- package/dist/cssm/hooks/useDateInput.js +1 -2
- package/dist/cssm/hooks/useDateInput.js.map +1 -1
- package/dist/cssm/hooks/useFocusTrap/useAutoFocus.js +1 -0
- package/dist/cssm/hooks/useFocusTrap/useAutoFocus.js.map +1 -1
- package/dist/cssm/hooks/useFocusTrap/useFocusTrap.js +2 -0
- package/dist/cssm/hooks/useFocusTrap/useFocusTrap.js.map +1 -1
- package/dist/cssm/hooks/useFocusVisible.js +8 -13
- package/dist/cssm/hooks/useFocusVisible.js.map +1 -1
- package/dist/cssm/hooks/useFocusWithin.js +5 -4
- package/dist/cssm/hooks/useFocusWithin.js.map +1 -1
- package/dist/cssm/hooks/useGlobalEscKeyDown.js +17 -15
- package/dist/cssm/hooks/useGlobalEscKeyDown.js.map +1 -1
- package/dist/cssm/hooks/useGlobalOnClickOutside.js +6 -2
- package/dist/cssm/hooks/useGlobalOnClickOutside.js.map +1 -1
- package/dist/cssm/hooks/useKeyboardInputTracker.js +48 -41
- package/dist/cssm/hooks/useKeyboardInputTracker.js.map +1 -1
- package/dist/cssm/hooks/useLatestRef.js +13 -0
- package/dist/cssm/hooks/useLatestRef.js.map +1 -0
- package/dist/cssm/hooks/useLocale.js +3 -3
- package/dist/cssm/hooks/useLocale.js.map +1 -1
- package/dist/cssm/hooks/useMediaQueryMatch.js +1 -0
- package/dist/cssm/hooks/useMediaQueryMatch.js.map +1 -1
- package/dist/cssm/hooks/useMutationObserver.js +3 -3
- package/dist/cssm/hooks/useMutationObserver.js.map +1 -1
- package/dist/cssm/hooks/usePlatform.js +3 -3
- package/dist/cssm/hooks/usePlatform.js.map +1 -1
- package/dist/cssm/hooks/useResizeObserver.js +4 -6
- package/dist/cssm/hooks/useResizeObserver.js.map +1 -1
- package/dist/cssm/hooks/useSyncHTMLWithBaseVKUIClasses.js +2 -1
- package/dist/cssm/hooks/useSyncHTMLWithBaseVKUIClasses.js.map +1 -1
- package/dist/cssm/hooks/useSyncHTMLWithTokens.js +3 -1
- package/dist/cssm/hooks/useSyncHTMLWithTokens.js.map +1 -1
- package/dist/cssm/hooks/useWaitTransitionFinish.js +13 -15
- package/dist/cssm/hooks/useWaitTransitionFinish.js.map +1 -1
- package/dist/cssm/index.js +1 -0
- package/dist/cssm/index.js.map +1 -1
- package/dist/cssm/lib/array.js +18 -0
- package/dist/cssm/lib/array.js.map +1 -0
- package/dist/cssm/lib/curve.js +21 -0
- package/dist/cssm/lib/curve.js.map +1 -0
- package/dist/cssm/lib/dom.js +5 -2
- package/dist/cssm/lib/dom.js.map +1 -1
- package/dist/cssm/lib/fx.js +4 -55
- package/dist/cssm/lib/fx.js.map +1 -1
- package/dist/cssm/lib/layouts/index.js.map +1 -1
- package/dist/cssm/lib/layouts/layoutProps.js +11 -0
- package/dist/cssm/lib/layouts/layoutProps.js.map +1 -1
- package/dist/cssm/lib/layouts/resolveLayoutProps.js +13 -11
- package/dist/cssm/lib/layouts/resolveLayoutProps.js.map +1 -1
- package/dist/cssm/lib/layouts/types.js.map +1 -1
- package/dist/cssm/lib/material/shapes/Shape.js +18 -0
- package/dist/cssm/lib/material/shapes/Shape.js.map +1 -0
- package/dist/cssm/lib/material/shapes/shapes.js +2250 -0
- package/dist/cssm/lib/material/shapes/shapes.js.map +1 -0
- package/dist/cssm/lib/math.js +31 -0
- package/dist/cssm/lib/math.js.map +1 -0
- package/dist/cssm/lib/svg/path/approximate.js +57 -0
- package/dist/cssm/lib/svg/path/approximate.js.map +1 -0
- package/dist/cssm/lib/svg/path/interpolate.js +121 -0
- package/dist/cssm/lib/svg/path/interpolate.js.map +1 -0
- package/dist/cssm/lib/svg/path/path.js +50 -0
- package/dist/cssm/lib/svg/path/path.js.map +1 -0
- package/dist/cssm/lib/svg/path/point.js +3 -0
- package/dist/cssm/lib/svg/path/point.js.map +1 -0
- package/dist/cssm/lib/svg/path/transform.js +110 -0
- package/dist/cssm/lib/svg/path/transform.js.map +1 -0
- package/dist/cssm/lib/tokens/useTokenClassName.js +4 -1
- package/dist/cssm/lib/tokens/useTokenClassName.js.map +1 -1
- package/dist/cssm/lib/touch/UIPanGestureRecognizer.js +2 -2
- package/dist/cssm/lib/touch/UIPanGestureRecognizer.js.map +1 -1
- package/dist/cssm/styles/layout.css +273 -0
- package/dist/cssm/types.js +1 -4
- package/dist/cssm/types.js.map +1 -1
- package/dist/helpers/math.d.ts +4 -0
- package/dist/helpers/math.d.ts.map +1 -1
- package/dist/helpers/math.js +6 -0
- package/dist/helpers/math.js.map +1 -1
- package/dist/hoc/withPlatform.d.ts +1 -1
- package/dist/hoc/withPlatform.d.ts.map +1 -1
- package/dist/hoc/withPlatform.js +3 -2
- package/dist/hoc/withPlatform.js.map +1 -1
- package/dist/hooks/useAdaptivityConditionalRender/types.d.ts +2 -2
- package/dist/hooks/useAdaptivityConditionalRender/types.js.map +1 -1
- package/dist/hooks/useAnimationFrame.d.ts +16 -0
- package/dist/hooks/useAnimationFrame.d.ts.map +1 -0
- package/dist/hooks/useAnimationFrame.js +40 -0
- package/dist/hooks/useAnimationFrame.js.map +1 -0
- package/dist/hooks/useAutoFocus.js +4 -1
- package/dist/hooks/useAutoFocus.js.map +1 -1
- package/dist/hooks/useColorScheme.d.ts.map +1 -1
- package/dist/hooks/useColorScheme.js +3 -3
- package/dist/hooks/useColorScheme.js.map +1 -1
- package/dist/hooks/useConfigDirection.d.ts.map +1 -1
- package/dist/hooks/useConfigDirection.js +3 -3
- package/dist/hooks/useConfigDirection.js.map +1 -1
- package/dist/hooks/useDateInput.d.ts.map +1 -1
- package/dist/hooks/useDateInput.js +1 -2
- package/dist/hooks/useDateInput.js.map +1 -1
- package/dist/hooks/useFocusTrap/useAutoFocus.js +1 -0
- package/dist/hooks/useFocusTrap/useAutoFocus.js.map +1 -1
- package/dist/hooks/useFocusTrap/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap/useFocusTrap.js +2 -0
- package/dist/hooks/useFocusTrap/useFocusTrap.js.map +1 -1
- package/dist/hooks/useFocusVisible.d.ts.map +1 -1
- package/dist/hooks/useFocusVisible.js +8 -13
- package/dist/hooks/useFocusVisible.js.map +1 -1
- package/dist/hooks/useFocusWithin.d.ts.map +1 -1
- package/dist/hooks/useFocusWithin.js +5 -4
- package/dist/hooks/useFocusWithin.js.map +1 -1
- package/dist/hooks/useGlobalEscKeyDown.d.ts.map +1 -1
- package/dist/hooks/useGlobalEscKeyDown.js +17 -15
- package/dist/hooks/useGlobalEscKeyDown.js.map +1 -1
- package/dist/hooks/useGlobalOnClickOutside.d.ts.map +1 -1
- package/dist/hooks/useGlobalOnClickOutside.js +6 -2
- package/dist/hooks/useGlobalOnClickOutside.js.map +1 -1
- package/dist/hooks/useKeyboardInputTracker.d.ts +1 -19
- package/dist/hooks/useKeyboardInputTracker.d.ts.map +1 -1
- package/dist/hooks/useKeyboardInputTracker.js +48 -41
- package/dist/hooks/useKeyboardInputTracker.js.map +1 -1
- package/dist/hooks/useLatestRef.d.ts +3 -0
- package/dist/hooks/useLatestRef.d.ts.map +1 -0
- package/dist/hooks/useLatestRef.js +13 -0
- package/dist/hooks/useLatestRef.js.map +1 -0
- package/dist/hooks/useLocale.d.ts.map +1 -1
- package/dist/hooks/useLocale.js +3 -3
- package/dist/hooks/useLocale.js.map +1 -1
- package/dist/hooks/useMediaQueryMatch.js +1 -0
- package/dist/hooks/useMediaQueryMatch.js.map +1 -1
- package/dist/hooks/useMutationObserver.d.ts +1 -2
- package/dist/hooks/useMutationObserver.d.ts.map +1 -1
- package/dist/hooks/useMutationObserver.js +3 -3
- package/dist/hooks/useMutationObserver.js.map +1 -1
- package/dist/hooks/usePlatform.d.ts.map +1 -1
- package/dist/hooks/usePlatform.js +3 -3
- package/dist/hooks/usePlatform.js.map +1 -1
- package/dist/hooks/useResizeObserver.d.ts.map +1 -1
- package/dist/hooks/useResizeObserver.js +4 -6
- package/dist/hooks/useResizeObserver.js.map +1 -1
- package/dist/hooks/useSyncHTMLWithBaseVKUIClasses.js +2 -1
- package/dist/hooks/useSyncHTMLWithBaseVKUIClasses.js.map +1 -1
- package/dist/hooks/useSyncHTMLWithTokens.js +3 -1
- package/dist/hooks/useSyncHTMLWithTokens.js.map +1 -1
- package/dist/hooks/useWaitTransitionFinish.d.ts.map +1 -1
- package/dist/hooks/useWaitTransitionFinish.js +13 -15
- package/dist/hooks/useWaitTransitionFinish.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/array.d.ts +17 -0
- package/dist/lib/array.d.ts.map +1 -0
- package/dist/lib/array.js +18 -0
- package/dist/lib/array.js.map +1 -0
- package/dist/lib/curve.d.ts +9 -0
- package/dist/lib/curve.d.ts.map +1 -0
- package/dist/lib/curve.js +21 -0
- package/dist/lib/curve.js.map +1 -0
- package/dist/lib/dom.d.ts +2 -1
- package/dist/lib/dom.d.ts.map +1 -1
- package/dist/lib/dom.js +5 -2
- package/dist/lib/dom.js.map +1 -1
- package/dist/lib/fx.d.ts +1 -8
- package/dist/lib/fx.d.ts.map +1 -1
- package/dist/lib/fx.js +4 -55
- package/dist/lib/fx.js.map +1 -1
- package/dist/lib/layouts/index.d.ts +1 -1
- package/dist/lib/layouts/index.d.ts.map +1 -1
- package/dist/lib/layouts/index.js.map +1 -1
- package/dist/lib/layouts/layoutProps.d.ts +7 -0
- package/dist/lib/layouts/layoutProps.d.ts.map +1 -1
- package/dist/lib/layouts/layoutProps.js +11 -0
- package/dist/lib/layouts/layoutProps.js.map +1 -1
- package/dist/lib/layouts/resolveLayoutProps.d.ts.map +1 -1
- package/dist/lib/layouts/resolveLayoutProps.js +13 -11
- package/dist/lib/layouts/resolveLayoutProps.js.map +1 -1
- package/dist/lib/layouts/types.d.ts +29 -0
- package/dist/lib/layouts/types.d.ts.map +1 -1
- package/dist/lib/layouts/types.js.map +1 -1
- package/dist/lib/material/shapes/Shape.d.ts +8 -0
- package/dist/lib/material/shapes/Shape.d.ts.map +1 -0
- package/dist/lib/material/shapes/Shape.js +18 -0
- package/dist/lib/material/shapes/Shape.js.map +1 -0
- package/dist/lib/material/shapes/shapes.d.ts +43 -0
- package/dist/lib/material/shapes/shapes.d.ts.map +1 -0
- package/dist/lib/material/shapes/shapes.js +2250 -0
- package/dist/lib/material/shapes/shapes.js.map +1 -0
- package/dist/lib/math.d.ts +23 -0
- package/dist/lib/math.d.ts.map +1 -0
- package/dist/lib/math.js +31 -0
- package/dist/lib/math.js.map +1 -0
- package/dist/lib/svg/path/approximate.d.ts +21 -0
- package/dist/lib/svg/path/approximate.d.ts.map +1 -0
- package/dist/lib/svg/path/approximate.js +57 -0
- package/dist/lib/svg/path/approximate.js.map +1 -0
- package/dist/lib/svg/path/interpolate.d.ts +5 -0
- package/dist/lib/svg/path/interpolate.d.ts.map +1 -0
- package/dist/lib/svg/path/interpolate.js +121 -0
- package/dist/lib/svg/path/interpolate.js.map +1 -0
- package/dist/lib/svg/path/path.d.ts +48 -0
- package/dist/lib/svg/path/path.d.ts.map +1 -0
- package/dist/lib/svg/path/path.js +50 -0
- package/dist/lib/svg/path/path.js.map +1 -0
- package/dist/lib/svg/path/point.d.ts +3 -0
- package/dist/lib/svg/path/point.d.ts.map +1 -0
- package/dist/lib/svg/path/point.js +3 -0
- package/dist/lib/svg/path/point.js.map +1 -0
- package/dist/lib/svg/path/transform.d.ts +64 -0
- package/dist/lib/svg/path/transform.d.ts.map +1 -0
- package/dist/lib/svg/path/transform.js +110 -0
- package/dist/lib/svg/path/transform.js.map +1 -0
- package/dist/lib/tokens/useTokenClassName.d.ts.map +1 -1
- package/dist/lib/tokens/useTokenClassName.js +4 -1
- package/dist/lib/tokens/useTokenClassName.js.map +1 -1
- package/dist/lib/touch/UIPanGestureRecognizer.d.ts.map +1 -1
- package/dist/lib/touch/UIPanGestureRecognizer.js +2 -2
- package/dist/lib/touch/UIPanGestureRecognizer.js.map +1 -1
- package/dist/types.d.ts +9 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -4
- package/dist/types.js.map +1 -1
- package/dist/vkui.css +1 -1
- package/dist/vkui.css.map +1 -1
- package/package.json +7 -6
- package/src/components/ActionSheet/ActionSheet.tsx +6 -3
- package/src/components/AdaptivityProvider/AdaptivityContext.tsx +3 -3
- package/src/components/AdaptivityProvider/AdaptivityProvider.tsx +2 -2
- package/src/components/AppRoot/AppRoot.tsx +1 -14
- package/src/components/AppRoot/AppRootContext.ts +0 -2
- package/src/components/Calendar/Calendar.tsx +2 -2
- package/src/components/CalendarDay/CalendarDay.tsx +4 -2
- package/src/components/CalendarDays/CalendarDays.tsx +2 -2
- package/src/components/CalendarHeader/CalendarHeader.tsx +4 -2
- package/src/components/CalendarRange/CalendarRange.tsx +2 -2
- package/src/components/CalendarTime/CalendarTime.module.css +38 -0
- package/src/components/CalendarTime/CalendarTime.module.css.d.ts.map +1 -1
- package/src/components/CalendarTime/CalendarTime.tsx +68 -55
- package/src/components/CalendarTime/CalendarTimePicker.tsx +148 -62
- package/src/components/CalendarTime/ComboBox.tsx +189 -0
- package/src/components/CardScroll/CardScroll.tsx +6 -5
- package/src/components/CarouselBase/CarouselBase.tsx +2 -1
- package/src/components/ChipsSelect/useChipsSelect.ts +1 -0
- package/src/components/ConfigProvider/ConfigProvider.tsx +6 -3
- package/src/components/ConfigProvider/ConfigProviderOverride.tsx +2 -1
- package/src/components/ConfigProvider/ConfigProviderSubContexts.tsx +43 -0
- package/src/components/ContentBadge/ContentBadge.module.css +84 -91
- package/src/components/ContentBadge/ContentBadge.module.css.d.ts.map +1 -1
- package/src/components/ContentBadge/ContentBadge.tsx +73 -5
- package/src/components/CustomSelect/CustomSelect.tsx +19 -10
- package/src/components/DateInput/DateInput.tsx +3 -3
- package/src/components/DateRangeInput/DateRangeInput.tsx +2 -2
- package/src/components/Epic/ScrollSaver.tsx +1 -0
- package/src/components/FixedLayout/ParentWidthWrapper.tsx +48 -0
- package/src/components/Flex/Flex.tsx +11 -6
- package/src/components/GridAvatar/GridAvatar.module.css +1 -1
- package/src/components/GridAvatar/GridAvatar.module.css.d.ts.map +1 -1
- package/src/components/ImageBase/ImageBaseFloatElement/ImageBaseFloatElement.tsx +1 -1
- package/src/components/NativeSelect/NativeSelect.tsx +4 -2
- package/src/components/OnboardingTooltip/OnboardingTooltip.tsx +1 -1
- package/src/components/PanelHeader/PanelHeader.tsx +1 -1
- package/src/components/Popper/Popper.tsx +1 -1
- package/src/components/PullToRefresh/PullToRefresh.module.css +1 -1
- package/src/components/PullToRefresh/PullToRefresh.tsx +10 -3
- package/src/components/Root/Root.tsx +10 -7
- package/src/components/SimpleGrid/SimpleGrid.tsx +25 -11
- package/src/components/Skeleton/Skeleton.tsx +6 -4
- package/src/components/Snackbar/Snackbar.tsx +6 -3
- package/src/components/Spacing/Spacing.tsx +1 -1
- package/src/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.module.css +13 -0
- package/src/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.module.css.d.ts.map +1 -0
- package/src/components/Spinner/ExpressiveSpinner/ExpressiveSpinner.tsx +73 -0
- package/src/components/Spinner/ExpressiveSpinner/icons.tsx +104 -0
- package/src/components/Spinner/SvgIcon.tsx +31 -0
- package/src/components/Spinner/icons.tsx +10 -13
- package/src/components/SplitLayout/SplitLayout.tsx +3 -3
- package/src/components/TabsItem/TabsItem.tsx +4 -5
- package/src/components/Tappable/Tappable.tsx +2 -2
- package/src/components/WriteBar/WriteBar.tsx +25 -59
- package/src/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.module.css +12 -0
- package/src/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.module.css.d.ts.map +1 -0
- package/src/components/WriteBar/WriteBarBeforeOrAfter/WriteBarBeforeOrAfter.tsx +20 -0
- package/src/components/WriteBar/WriteBarFormField/WriteBarFormField.module.css +18 -0
- package/src/components/WriteBar/WriteBarFormField/WriteBarFormField.module.css.d.ts.map +1 -0
- package/src/components/WriteBar/WriteBarFormField/WriteBarFormField.tsx +22 -0
- package/src/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.module.css +3 -0
- package/src/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.module.css.d.ts.map +1 -0
- package/src/components/WriteBar/WriteBarFormField/WriteBarFormFieldInlineAfter/WriteBarFormFieldInlineAfter.tsx +23 -0
- package/src/components/WriteBar/WriteBarRoot/WriteBarRoot.module.css +14 -0
- package/src/components/WriteBar/WriteBarRoot/WriteBarRoot.module.css.d.ts.map +1 -0
- package/src/components/WriteBar/WriteBarRoot/WriteBarRoot.tsx +31 -0
- package/src/components/WriteBar/WriteBarTextarea/WriteBarTextarea.module.css +42 -0
- package/src/components/WriteBar/WriteBarTextarea/WriteBarTextarea.module.css.d.ts.map +1 -0
- package/src/components/WriteBar/WriteBarTextarea/WriteBarTextarea.tsx +48 -0
- package/src/helpers/math.ts +8 -0
- package/src/hoc/withPlatform.tsx +3 -3
- package/src/hooks/useAdaptivityConditionalRender/types.ts +2 -2
- package/src/hooks/useAnimationFrame.tsx +42 -0
- package/src/hooks/useAutoFocus.ts +1 -1
- package/src/hooks/useColorScheme.ts +3 -4
- package/src/hooks/useConfigDirection.ts +3 -4
- package/src/hooks/useDateInput.ts +1 -2
- package/src/hooks/useFocusTrap/useAutoFocus.ts +1 -1
- package/src/hooks/useFocusTrap/useFocusTrap.tsx +2 -0
- package/src/hooks/useFocusVisible.ts +10 -18
- package/src/hooks/useFocusWithin.ts +26 -23
- package/src/hooks/useGlobalEscKeyDown.ts +12 -15
- package/src/hooks/useGlobalOnClickOutside.ts +5 -2
- package/src/hooks/useKeyboardInputTracker.ts +68 -55
- package/src/hooks/useLatestRef.ts +12 -0
- package/src/hooks/useLocale.ts +3 -4
- package/src/hooks/useMediaQueryMatch.ts +1 -1
- package/src/hooks/useMutationObserver.ts +2 -3
- package/src/hooks/usePlatform.ts +3 -4
- package/src/hooks/useResizeObserver.ts +4 -5
- package/src/hooks/useSyncHTMLWithBaseVKUIClasses.ts +1 -1
- package/src/hooks/useSyncHTMLWithTokens.ts +1 -1
- package/src/hooks/useWaitTransitionFinish.ts +15 -15
- package/src/index.ts +1 -0
- package/src/lib/array.ts +19 -0
- package/src/lib/curve.ts +36 -0
- package/src/lib/dom.tsx +10 -4
- package/src/lib/fx.ts +5 -63
- package/src/lib/layouts/index.ts +1 -0
- package/src/lib/layouts/layoutProps.ts +8 -0
- package/src/lib/layouts/resolveLayoutProps.ts +19 -17
- package/src/lib/layouts/types.ts +29 -0
- package/src/lib/material/shapes/Shape.tsx +17 -0
- package/src/lib/material/shapes/shapes.ts +329 -0
- package/src/lib/math.ts +37 -0
- package/src/lib/svg/path/approximate.ts +81 -0
- package/src/lib/svg/path/interpolate.ts +151 -0
- package/src/lib/svg/path/path.ts +102 -0
- package/src/lib/svg/path/point.ts +2 -0
- package/src/lib/svg/path/transform.ts +147 -0
- package/src/lib/tokens/useTokenClassName.ts +7 -5
- package/src/lib/touch/UIPanGestureRecognizer.ts +2 -2
- package/src/types.ts +16 -0
- package/dist/cssm/components/WriteBar/WriteBar.module.css +0 -118
- package/src/components/WriteBar/WriteBar.module.css +0 -116
- package/src/components/WriteBar/WriteBar.module.css.d.ts.map +0 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { type DeepReadonly } from '../../../types';
|
|
2
|
+
import * as array from '../../array';
|
|
3
|
+
import { distancePoint } from '../../math';
|
|
4
|
+
import { approximateRing, type MaxSegmentLengthOptions } from './approximate';
|
|
5
|
+
import { copySVGPath, type DrawtoCommandSupport, type SVGPathSupport } from './path';
|
|
6
|
+
import { type Point, type Points } from './point';
|
|
7
|
+
|
|
8
|
+
function pointAlong([x1, y1]: Readonly<Point>, [x2, y2]: Readonly<Point>, progress: number): Point {
|
|
9
|
+
return [x1 + (x2 - x1) * progress, y1 + (y2 - y1) * progress];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function polygonLength(points: Points): number {
|
|
13
|
+
return points.reduce(
|
|
14
|
+
(acc, point, index) => acc + distancePoint(point, points[(index + 1) % points.length]),
|
|
15
|
+
0,
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function addPoints(path: Points, numPoints: number): Points {
|
|
20
|
+
if (numPoints === 0) {
|
|
21
|
+
return path;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const desiredLength = path.length + numPoints;
|
|
25
|
+
|
|
26
|
+
const step = polygonLength(path) / numPoints;
|
|
27
|
+
|
|
28
|
+
let index = 0;
|
|
29
|
+
let cursor = 0;
|
|
30
|
+
let insertAt = step / 2;
|
|
31
|
+
|
|
32
|
+
while (path.length < desiredLength) {
|
|
33
|
+
const element = path[index];
|
|
34
|
+
const nextElement = path[(index + 1) % path.length];
|
|
35
|
+
|
|
36
|
+
const segment = distancePoint(element, nextElement);
|
|
37
|
+
|
|
38
|
+
if (insertAt <= cursor + segment) {
|
|
39
|
+
path.splice(
|
|
40
|
+
index + 1,
|
|
41
|
+
0,
|
|
42
|
+
segment ? pointAlong(element, nextElement, insertAt - cursor) : array.copy(element), // TODO: test coverage
|
|
43
|
+
);
|
|
44
|
+
insertAt += step;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
cursor += segment;
|
|
49
|
+
index++;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return path;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function bisect(path: Points, { maxSegmentLength }: Required<MaxSegmentLengthOptions>): Points {
|
|
56
|
+
for (let index = 0; index < path.length; index++) {
|
|
57
|
+
const element = path[index];
|
|
58
|
+
let nextElement = path[(index + 1) % path.length];
|
|
59
|
+
|
|
60
|
+
while (distancePoint(element, nextElement) > maxSegmentLength) {
|
|
61
|
+
nextElement = pointAlong(element, nextElement, 0.5);
|
|
62
|
+
|
|
63
|
+
path.splice(index + 1, 0, nextElement);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return path;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function normalizeRing(
|
|
71
|
+
path: DeepReadonly<SVGPathSupport>,
|
|
72
|
+
{ maxSegmentLength }: Required<MaxSegmentLengthOptions>,
|
|
73
|
+
): Points {
|
|
74
|
+
return bisect(approximateRing(path, { maxSegmentLength }), { maxSegmentLength });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function rotate(from: Points, to: Points) {
|
|
78
|
+
let min = Infinity;
|
|
79
|
+
let bestOffset = 0;
|
|
80
|
+
|
|
81
|
+
for (let offset = 0; offset < from.length; offset++) {
|
|
82
|
+
let sumOfSquares = 0;
|
|
83
|
+
|
|
84
|
+
to.forEach((element, index) => {
|
|
85
|
+
const d = distancePoint(from[(offset + index) % from.length], element);
|
|
86
|
+
sumOfSquares += d * d;
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
if (sumOfSquares < min) {
|
|
90
|
+
min = sumOfSquares;
|
|
91
|
+
bestOffset = offset;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (bestOffset) {
|
|
96
|
+
const spliced = from.splice(0, bestOffset);
|
|
97
|
+
from.splice(from.length, 0, ...spliced);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function interpolatePoint(from: Readonly<Point>, to: Readonly<Point>): (progress: number) => Point {
|
|
102
|
+
return (progress: number) => {
|
|
103
|
+
return [from[0] + progress * (to[0] - from[0]), from[1] + progress * (to[1] - from[1])];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function interpolatePoints(from: Points, to: Points): (progress: number) => SVGPathSupport {
|
|
108
|
+
const interpolators = from.map((point, index) => interpolatePoint(point, to[index]));
|
|
109
|
+
|
|
110
|
+
return (progress: number) => {
|
|
111
|
+
const result = interpolators.map<DrawtoCommandSupport>((interpolator, index) => [
|
|
112
|
+
index === 0 ? 'M' : 'L',
|
|
113
|
+
interpolator(progress),
|
|
114
|
+
]);
|
|
115
|
+
result.push(['Z', []]);
|
|
116
|
+
|
|
117
|
+
return result;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function interpolateRing(from: Points, to: Points): (progress: number) => SVGPathSupport {
|
|
122
|
+
const diff = from.length - to.length;
|
|
123
|
+
|
|
124
|
+
const fromRing = addPoints(from, -Math.min(diff, 0));
|
|
125
|
+
const toRing = addPoints(to, Math.max(diff, 0));
|
|
126
|
+
|
|
127
|
+
rotate(fromRing, toRing);
|
|
128
|
+
|
|
129
|
+
return interpolatePoints(fromRing, toRing);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function interpolate(
|
|
133
|
+
from: DeepReadonly<SVGPathSupport>,
|
|
134
|
+
to: DeepReadonly<SVGPathSupport>,
|
|
135
|
+
{ maxSegmentLength = 1 }: MaxSegmentLengthOptions = {},
|
|
136
|
+
): (progress: number) => SVGPathSupport {
|
|
137
|
+
const fromRing = normalizeRing(from, { maxSegmentLength });
|
|
138
|
+
const toRing = normalizeRing(to, { maxSegmentLength });
|
|
139
|
+
|
|
140
|
+
const fn = interpolateRing(fromRing, toRing);
|
|
141
|
+
|
|
142
|
+
return (progress: number) => {
|
|
143
|
+
if (progress < 1e-4) {
|
|
144
|
+
return copySVGPath(from);
|
|
145
|
+
} else if (progress > 1 - 1e-4) {
|
|
146
|
+
return copySVGPath(to);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return fn(progress);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { DeepReadonly, DeepWriteable } from '../../../types';
|
|
2
|
+
import * as array from '../../array';
|
|
3
|
+
|
|
4
|
+
type Flag = 0 | 1;
|
|
5
|
+
|
|
6
|
+
export type CoordinatePair = [number, number];
|
|
7
|
+
export type Coordinate = [number];
|
|
8
|
+
export type CurvetoCoordinate = [number, number, number, number, number, number];
|
|
9
|
+
export type SmoothCurvetoCoordinate = [number, number, number, number];
|
|
10
|
+
export type QuadraticCurvetoCoordinate = [number, number, number, number];
|
|
11
|
+
export type EllipticalArcArgument = [number, number, number, Flag, Flag, number, number];
|
|
12
|
+
|
|
13
|
+
export type DrawtoCommandAbsolute =
|
|
14
|
+
| ['M', CoordinatePair]
|
|
15
|
+
| ['L', CoordinatePair]
|
|
16
|
+
| ['H', Coordinate]
|
|
17
|
+
| ['V', Coordinate]
|
|
18
|
+
| ['C', CurvetoCoordinate]
|
|
19
|
+
| ['S', SmoothCurvetoCoordinate]
|
|
20
|
+
| ['Q', QuadraticCurvetoCoordinate]
|
|
21
|
+
| ['T', CoordinatePair]
|
|
22
|
+
| ['A', EllipticalArcArgument]
|
|
23
|
+
| ['Z', []];
|
|
24
|
+
|
|
25
|
+
type DrawtoCommandRelative =
|
|
26
|
+
| ['m', CoordinatePair]
|
|
27
|
+
| ['l', CoordinatePair]
|
|
28
|
+
| ['h', Coordinate]
|
|
29
|
+
| ['v', Coordinate]
|
|
30
|
+
| ['c', CurvetoCoordinate]
|
|
31
|
+
| ['s', SmoothCurvetoCoordinate]
|
|
32
|
+
| ['q', QuadraticCurvetoCoordinate]
|
|
33
|
+
| ['t', CoordinatePair]
|
|
34
|
+
| ['a', EllipticalArcArgument]
|
|
35
|
+
| ['z', []];
|
|
36
|
+
|
|
37
|
+
export type DrawtoCommand = DrawtoCommandAbsolute | DrawtoCommandRelative;
|
|
38
|
+
|
|
39
|
+
export type SVGPath = DrawtoCommand[];
|
|
40
|
+
|
|
41
|
+
export type DrawtoCommandSupport =
|
|
42
|
+
| ['M', CoordinatePair]
|
|
43
|
+
| ['L', CoordinatePair]
|
|
44
|
+
| ['C', CurvetoCoordinate]
|
|
45
|
+
| ['Z', []];
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Поддерживаем только `M`, `L`, `C`, и `Z` команды для оптимизации размера кода
|
|
49
|
+
*/
|
|
50
|
+
export type SVGPathSupport = DrawtoCommandSupport[];
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Преобразует `SVGPath` в строку
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* import * as path from './path';
|
|
57
|
+
* import * as assert from 'node:assert/strict';
|
|
58
|
+
*
|
|
59
|
+
* assert.equal(
|
|
60
|
+
* path.svgPathToString([['M', [20, 40]], ['L', [40, 60]]]),
|
|
61
|
+
* 'M20,40L40,60',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export function svgPathToString(svgPath: DeepReadonly<SVGPath>): string {
|
|
66
|
+
// return svgPath.reduce((acc, value) => acc + value[0] + value[1].join(','), '');
|
|
67
|
+
|
|
68
|
+
let value = '';
|
|
69
|
+
|
|
70
|
+
// WARNING: При изменении кода рекомендуется проверить изменение
|
|
71
|
+
// времени исполнения на компоненте ExpressiveSpinner в профайлерах
|
|
72
|
+
for (let index = 0; index < svgPath.length; index++) {
|
|
73
|
+
value += svgPath[index][0];
|
|
74
|
+
for (let valueIndex = 0; valueIndex < svgPath[index][1].length - 1; valueIndex++) {
|
|
75
|
+
value += svgPath[index][1][valueIndex].toFixed(4) + ',';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (svgPath[index][1].length) {
|
|
79
|
+
value += svgPath[index][1][svgPath[index][1].length - 1].toFixed(4);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Копирует массив команд для пути
|
|
88
|
+
*
|
|
89
|
+
* ```ts
|
|
90
|
+
* import * as path from './path';
|
|
91
|
+
* import * as assert from 'node:assert/strict';
|
|
92
|
+
*
|
|
93
|
+
* const originalSVGPath = [['M', [20, 40]], ['L', [40, 60]]];
|
|
94
|
+
* const copiedSVGPath = path.copy(originalSVGPath);
|
|
95
|
+
*
|
|
96
|
+
* assert.deepEqual(copiedSVGPath, originalSVGPath);
|
|
97
|
+
* assert.notEqual(copiedSVGPath, originalSVGPath);
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export function copySVGPath<T extends DeepReadonly<SVGPath>>(svgPath: T): DeepWriteable<T> {
|
|
101
|
+
return svgPath.map((value) => [value[0], array.copy(value[1])]) as DeepWriteable<T>;
|
|
102
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { type DeepReadonly } from '../../../types';
|
|
2
|
+
import * as array from '../../array';
|
|
3
|
+
import {
|
|
4
|
+
type CoordinatePair,
|
|
5
|
+
copySVGPath,
|
|
6
|
+
type CurvetoCoordinate,
|
|
7
|
+
type DrawtoCommandSupport,
|
|
8
|
+
type SVGPathSupport,
|
|
9
|
+
} from './path';
|
|
10
|
+
|
|
11
|
+
type TransformFn = <T extends CoordinatePair | CurvetoCoordinate>(values: Readonly<T>) => T;
|
|
12
|
+
|
|
13
|
+
function transformDrawtoCommand(
|
|
14
|
+
drawtoCommand: DeepReadonly<DrawtoCommandSupport>,
|
|
15
|
+
fn: TransformFn,
|
|
16
|
+
): DrawtoCommandSupport {
|
|
17
|
+
if (drawtoCommand[0] === 'Z') {
|
|
18
|
+
return ['Z', []];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return [drawtoCommand[0], fn(drawtoCommand[1])] as DrawtoCommandSupport;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function transformSVGPath(path: DeepReadonly<SVGPathSupport>, fn: TransformFn): SVGPathSupport {
|
|
25
|
+
return path.map((item) => transformDrawtoCommand(item, fn));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Масштабирует путь.
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* import * as transform from './transform';
|
|
33
|
+
* import * as assert from 'node:assert/strict';
|
|
34
|
+
*
|
|
35
|
+
* const scalePath = transform.scale(
|
|
36
|
+
* [['M', [10, 20]], ['L', [30, 40]]],
|
|
37
|
+
* 2,
|
|
38
|
+
* 2,
|
|
39
|
+
* );
|
|
40
|
+
*
|
|
41
|
+
* assert.deepEqual(
|
|
42
|
+
* scalePath,
|
|
43
|
+
* [['M', [20, 40]], ['L', [60, 80]]],
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export function scale(
|
|
48
|
+
path: DeepReadonly<SVGPathSupport>,
|
|
49
|
+
scaleX: number,
|
|
50
|
+
scaleY: number,
|
|
51
|
+
): SVGPathSupport {
|
|
52
|
+
if (scaleX === 1 && scaleY === 1) {
|
|
53
|
+
return copySVGPath(path);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const scaleTransform = <T extends number[]>(values: Readonly<T>): T =>
|
|
57
|
+
values.map((value, index) => value * (index % 2 === 0 ? scaleX : scaleY)) as T;
|
|
58
|
+
|
|
59
|
+
return transformSVGPath(path, scaleTransform);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Перемещает путь по осям X и Y.
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* import * as transform from './transform';
|
|
67
|
+
* import * as assert from 'node:assert/strict';
|
|
68
|
+
*
|
|
69
|
+
* const translatePath = transform.translate(
|
|
70
|
+
* [['M', [10, 20]], ['L', [30, 40]]],
|
|
71
|
+
* 10,
|
|
72
|
+
* 20,
|
|
73
|
+
* );
|
|
74
|
+
*
|
|
75
|
+
* assert.deepEqual(
|
|
76
|
+
* translatePath,
|
|
77
|
+
* [['M', [20, 40]], ['L', [40, 60]]],
|
|
78
|
+
* );
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export function translate(
|
|
82
|
+
path: DeepReadonly<SVGPathSupport>,
|
|
83
|
+
translateX: number,
|
|
84
|
+
translateY: number,
|
|
85
|
+
): SVGPathSupport {
|
|
86
|
+
if (translateX === 0 && translateY === 0) {
|
|
87
|
+
return copySVGPath(path);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const translateTransform = <T extends number[]>(values: Readonly<T>): T =>
|
|
91
|
+
values.map((value, index) => value + (index % 2 === 0 ? translateX : translateY)) as T;
|
|
92
|
+
|
|
93
|
+
return transformSVGPath(path, translateTransform);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Вращает путь относительно заданной точки на заданный угол
|
|
98
|
+
*
|
|
99
|
+
* ```ts
|
|
100
|
+
* import * as transform from './transform';
|
|
101
|
+
* import * as assert from 'node:assert/strict';
|
|
102
|
+
*
|
|
103
|
+
* const rotatePath = transform.rotate(
|
|
104
|
+
* [['M', [10, 20]], ['L', [30, 40]]],
|
|
105
|
+
* 30,
|
|
106
|
+
* 30,
|
|
107
|
+
* 180
|
|
108
|
+
* );
|
|
109
|
+
*
|
|
110
|
+
* assert.deepEqual(
|
|
111
|
+
* rotatePath,
|
|
112
|
+
* [['M', [20, 40]], ['L', [60, 80]]],
|
|
113
|
+
* );
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
export function rotate(
|
|
117
|
+
path: DeepReadonly<SVGPathSupport>,
|
|
118
|
+
originX: number,
|
|
119
|
+
originY: number,
|
|
120
|
+
angle: number,
|
|
121
|
+
): SVGPathSupport {
|
|
122
|
+
angle %= 360;
|
|
123
|
+
if (angle === 0) {
|
|
124
|
+
return copySVGPath(path);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const rad = (angle * Math.PI) / 180;
|
|
128
|
+
const cos = Math.cos(rad);
|
|
129
|
+
const sin = Math.sin(rad);
|
|
130
|
+
|
|
131
|
+
const rotateTransformAbsolute = <T extends number[]>(originValues: Readonly<T>): T => {
|
|
132
|
+
const values = array.copy(originValues);
|
|
133
|
+
|
|
134
|
+
for (let i = 0; i < values.length; i += 2) {
|
|
135
|
+
const px = values[i];
|
|
136
|
+
const py = values[i + 1];
|
|
137
|
+
const qx = originX + (px - originX) * cos - (py - originY) * sin;
|
|
138
|
+
const qy = originY + (px - originX) * sin + (py - originY) * cos;
|
|
139
|
+
values[i] = qx;
|
|
140
|
+
values[i + 1] = qy;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return values;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
return transformSVGPath(path, rotateTransformAbsolute);
|
|
147
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ConfigProviderContext } from '../../components/ConfigProvider/ConfigProviderContext';
|
|
3
|
+
import {
|
|
4
|
+
ColorSchemeContext,
|
|
5
|
+
PlatformContext,
|
|
6
|
+
} from '../../components/ConfigProvider/ConfigProviderSubContexts';
|
|
3
7
|
import { type ColorSchemeType, DEFAULT_COLOR_SCHEME } from '../colorScheme';
|
|
4
8
|
import { Platform, type PlatformType } from '../platform';
|
|
5
9
|
import { DEFAULT_TOKENS_CLASS_NAMES } from './constants';
|
|
@@ -30,11 +34,9 @@ const getAppearanceTokenClassNameByPlatform = (
|
|
|
30
34
|
* @private
|
|
31
35
|
*/
|
|
32
36
|
export const useTokensClassName = (): string => {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
tokensClassNames,
|
|
37
|
-
} = React.useContext(ConfigProviderContext);
|
|
37
|
+
const platform = React.useContext(PlatformContext);
|
|
38
|
+
const colorScheme = React.useContext(ColorSchemeContext) ?? DEFAULT_COLOR_SCHEME;
|
|
39
|
+
const { tokensClassNames } = React.useContext(ConfigProviderContext);
|
|
38
40
|
|
|
39
41
|
const colorSchemeClassName = isTokensClassNamesForPlatforms(tokensClassNames)
|
|
40
42
|
? getAppearanceTokenClassNameByPlatform(platform, tokensClassNames)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { millisecondsInSecond } from '../date';
|
|
2
2
|
import { getFirstTouchEventData } from '../dom';
|
|
3
|
+
import { distance } from '../math';
|
|
3
4
|
|
|
4
5
|
export type Direction = { axis: 'x' | 'y'; direction: -1 | 1 | null };
|
|
5
6
|
|
|
@@ -45,8 +46,7 @@ export class UIPanGestureRecognizer {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
distance(): number {
|
|
48
|
-
|
|
49
|
-
return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
|
|
49
|
+
return distance(this.x1, this.y1, this.x2, this.y2);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
velocity(): Coords {
|
package/src/types.ts
CHANGED
|
@@ -148,3 +148,19 @@ export type Elevation = '1' | '2' | '3' | '4';
|
|
|
148
148
|
export type PartialWithUndefined<T> = {
|
|
149
149
|
[P in keyof T]?: T[P] | undefined;
|
|
150
150
|
};
|
|
151
|
+
|
|
152
|
+
export type DeepReadonly<T> = Readonly<{
|
|
153
|
+
[K in keyof T]: T[K] extends number | string | symbol // Is it a primitive? Then make it readonly
|
|
154
|
+
? Readonly<T[K]>
|
|
155
|
+
: // Is it an array of items? Then make the array readonly and the item as well
|
|
156
|
+
T[K] extends any[]
|
|
157
|
+
? Readonly<DeepReadonly<T[K]>>
|
|
158
|
+
: // It is some other object, make it readonly as well
|
|
159
|
+
DeepReadonly<T[K]>;
|
|
160
|
+
}>;
|
|
161
|
+
|
|
162
|
+
export type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
|
|
163
|
+
|
|
164
|
+
export interface ReadonlyWeakMap<K extends WeakKey, V> extends Pick<WeakMap<K, V>, 'get' | 'has'> {
|
|
165
|
+
readonly [Symbol.toStringTag]: string;
|
|
166
|
+
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
.host {
|
|
2
|
-
background: var(--vkui--color_background_contrast_themed);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.shadow {
|
|
6
|
-
box-shadow: var(--vkui--elevation3);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.before,
|
|
10
|
-
.form,
|
|
11
|
-
.after {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: flex-end;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.form {
|
|
17
|
-
min-block-size: 52px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.formIn {
|
|
21
|
-
position: relative;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex: 1;
|
|
24
|
-
min-inline-size: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.textarea {
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
flex: 1;
|
|
30
|
-
inline-size: 100%;
|
|
31
|
-
min-inline-size: 0;
|
|
32
|
-
max-block-size: 120px;
|
|
33
|
-
margin: 0;
|
|
34
|
-
color: var(--vkui--color_text_primary);
|
|
35
|
-
-webkit-appearance: none;
|
|
36
|
-
appearance: none;
|
|
37
|
-
resize: none;
|
|
38
|
-
background: transparent;
|
|
39
|
-
border: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.textarea:placeholder-shown {
|
|
43
|
-
text-overflow: ellipsis;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.textarea::placeholder {
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
text-overflow: ellipsis;
|
|
49
|
-
color: var(--vkui--color_text_subhead);
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
/* Для Firefox */
|
|
52
|
-
opacity: 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.textarea:focus {
|
|
56
|
-
outline: var(--vkui_internal--outline-reset);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.inlineAfter {
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: flex-end;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.before {
|
|
65
|
-
padding-inline-start: 4px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.after {
|
|
69
|
-
padding-inline-end: 4px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.textarea {
|
|
73
|
-
block-size: 52px;
|
|
74
|
-
padding-block: 16px;
|
|
75
|
-
padding-inline: 12px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* iOS
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
.ios {
|
|
83
|
-
background: var(--vkui--color_background_content);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.ios .before,
|
|
87
|
-
.ios .after {
|
|
88
|
-
padding-block: 0;
|
|
89
|
-
padding-inline: 4px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.ios .formIn {
|
|
93
|
-
box-sizing: border-box;
|
|
94
|
-
margin-block: 8px;
|
|
95
|
-
margin-inline: 0;
|
|
96
|
-
background-color: var(--vkui--color_write_bar_input_background);
|
|
97
|
-
border: var(--vkui--size_border--regular) solid var(--vkui--color_write_bar_input_border);
|
|
98
|
-
border-radius: 18px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.ios .formIn:first-child {
|
|
102
|
-
margin-inline-start: 12px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.ios .inlineAfter {
|
|
106
|
-
/* чтобы правильно выровнять иконку, нужно учитывать border */
|
|
107
|
-
--vkui_internal--writebar-right-gap: calc(-1 * var(--vkui--size_border--regular));
|
|
108
|
-
--vkui_internal--writebar-vertical-gap: calc(var(--vkui_internal--writebar-right-gap) - 8px);
|
|
109
|
-
|
|
110
|
-
margin-block: var(--vkui_internal--writebar-vertical-gap);
|
|
111
|
-
margin-inline-end: var(--vkui_internal--writebar-right-gap);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.ios .textarea {
|
|
115
|
-
block-size: 36px;
|
|
116
|
-
padding-block: 6px;
|
|
117
|
-
padding-inline: 12px 0;
|
|
118
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
.host {
|
|
2
|
-
background: var(--vkui--color_background_contrast_themed);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.shadow {
|
|
6
|
-
box-shadow: var(--vkui--elevation3);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.before,
|
|
10
|
-
.form,
|
|
11
|
-
.after {
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: flex-end;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.form {
|
|
17
|
-
min-block-size: 52px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.formIn {
|
|
21
|
-
position: relative;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex: 1;
|
|
24
|
-
min-inline-size: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.textarea {
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
flex: 1;
|
|
30
|
-
inline-size: 100%;
|
|
31
|
-
min-inline-size: 0;
|
|
32
|
-
max-block-size: 120px;
|
|
33
|
-
margin: 0;
|
|
34
|
-
color: var(--vkui--color_text_primary);
|
|
35
|
-
appearance: none;
|
|
36
|
-
resize: none;
|
|
37
|
-
background: transparent;
|
|
38
|
-
border: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.textarea:placeholder-shown {
|
|
42
|
-
text-overflow: ellipsis;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.textarea::placeholder {
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
text-overflow: ellipsis;
|
|
48
|
-
color: var(--vkui--color_text_subhead);
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
/* Для Firefox */
|
|
51
|
-
opacity: 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.textarea:focus {
|
|
55
|
-
outline: var(--vkui_internal--outline-reset);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.inlineAfter {
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: flex-end;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.before {
|
|
64
|
-
padding-inline-start: 4px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.after {
|
|
68
|
-
padding-inline-end: 4px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.textarea {
|
|
72
|
-
block-size: 52px;
|
|
73
|
-
padding-block: 16px;
|
|
74
|
-
padding-inline: 12px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* iOS
|
|
79
|
-
*/
|
|
80
|
-
.ios {
|
|
81
|
-
background: var(--vkui--color_background_content);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.ios .before,
|
|
85
|
-
.ios .after {
|
|
86
|
-
padding-block: 0;
|
|
87
|
-
padding-inline: 4px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.ios .formIn {
|
|
91
|
-
box-sizing: border-box;
|
|
92
|
-
margin-block: 8px;
|
|
93
|
-
margin-inline: 0;
|
|
94
|
-
background-color: var(--vkui--color_write_bar_input_background);
|
|
95
|
-
border: var(--vkui--size_border--regular) solid var(--vkui--color_write_bar_input_border);
|
|
96
|
-
border-radius: 18px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ios .formIn:first-child {
|
|
100
|
-
margin-inline-start: 12px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.ios .inlineAfter {
|
|
104
|
-
/* чтобы правильно выровнять иконку, нужно учитывать border */
|
|
105
|
-
--vkui_internal--writebar-right-gap: calc(-1 * var(--vkui--size_border--regular));
|
|
106
|
-
--vkui_internal--writebar-vertical-gap: calc(var(--vkui_internal--writebar-right-gap) - 8px);
|
|
107
|
-
|
|
108
|
-
margin-block: var(--vkui_internal--writebar-vertical-gap);
|
|
109
|
-
margin-inline-end: var(--vkui_internal--writebar-right-gap);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.ios .textarea {
|
|
113
|
-
block-size: 36px;
|
|
114
|
-
padding-block: 6px;
|
|
115
|
-
padding-inline: 12px 0;
|
|
116
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["./WriteBar.module.css"],"names":["host","shadow","before","form","after","formIn","textarea","inlineAfter","ios"],"mappings":"AAAA;AAAA,E,aAAAA,M,WAAA;AAAA,E,aAIAC,Q,WAJA;AAAA,E,aAQAC,Q,WARA;AAAA,E,aASAC,M,WATA;AAAA,E,aAUAC,O,WAVA;AAAA,E,aAeAD,M,WAfA;AAAA,E,aAmBAE,Q,WAnBA;AAAA,E,aA0BAC,U,WA1BA;AAAA,E,aAwCAA,U,WAxCA;AAAA,E,aA4CAA,U,WA5CA;AAAA,E,aAqDAA,U,WArDA;AAAA,E,aAyDAC,a,WAzDA;AAAA,E,aA8DAL,Q,WA9DA;AAAA,E,aAkEAE,O,WAlEA;AAAA,E,aAsEAE,U,WAtEA;AAAA,E,aA+EAE,K,WA/EA;AAAA,E,aAmFAA,K,WAnFA;AAAA,E,aAmFKN,Q,WAnFL;AAAA,E,aAoFAM,K,WApFA;AAAA,E,aAoFKJ,O,WApFL;AAAA,E,aAyFAI,K,WAzFA;AAAA,E,aAyFKH,Q,WAzFL;AAAA,E,aAkGAG,K,WAlGA;AAAA,E,aAkGKH,Q,WAlGL;AAAA,E,aAsGAG,K,WAtGA;AAAA,E,aAsGKD,a,WAtGL;AAAA,E,aA+GAC,K,WA/GA;AAAA,E,aA+GKF,U,WA/GL;AAAA;AAAA","file":"WriteBar.module.css.d.ts","sourceRoot":""}
|