@vkontakte/vkui 4.25.0 → 4.27.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/.cache/.eslintcache +1 -1
- package/.cache/.stylelintcache +1 -1
- package/.cache/.tsbuildinfo +539 -382
- package/.cache/ts/src/components/ActionSheetItem/ActionSheetItem.d.ts +1 -2
- package/.cache/ts/src/components/AdaptivityProvider/AdaptivityProvider.d.ts +1 -1
- package/.cache/ts/src/components/Alert/Alert.d.ts +4 -4
- package/.cache/ts/src/components/AppRoot/AppRoot.d.ts +1 -2
- package/.cache/ts/src/components/AppearanceProvider/AppearanceProvider.d.ts +1 -0
- package/.cache/ts/src/components/Button/Button.d.ts +1 -1
- package/.cache/ts/src/components/Card/Card.d.ts +1 -2
- package/.cache/ts/src/components/CardGrid/CardGrid.d.ts +1 -1
- package/.cache/ts/src/components/CardScroll/CardScroll.d.ts +9 -5
- package/.cache/ts/src/components/Checkbox/Checkbox.d.ts +1 -1
- package/.cache/ts/src/components/Chip/Chip.d.ts +2 -2
- package/.cache/ts/src/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/.cache/ts/src/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/.cache/ts/src/components/ConfigProvider/ConfigProviderContext.d.ts +6 -6
- package/.cache/ts/src/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/.cache/ts/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/.cache/ts/src/components/Epic/Epic.d.ts +4 -4
- package/.cache/ts/src/components/Gallery/Gallery.d.ts +1 -1
- package/.cache/ts/src/components/Gradient/Gradient.d.ts +1 -2
- package/.cache/ts/src/components/Group/Group.d.ts +1 -1
- package/.cache/ts/src/components/HorizontalScroll/HorizontalScroll.d.ts +2 -2
- package/.cache/ts/src/components/IconButton/IconButton.d.ts +1 -1
- package/.cache/ts/src/components/Input/Input.d.ts +1 -1
- package/.cache/ts/src/components/ModalCard/ModalCard.d.ts +3 -3
- package/.cache/ts/src/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/.cache/ts/src/components/ModalPage/ModalPage.d.ts +3 -3
- package/.cache/ts/src/components/ModalRoot/ModalRootAdaptive.d.ts +3 -3
- package/.cache/ts/src/components/ModalRoot/withModalRootContext.d.ts +1 -1
- package/.cache/ts/src/components/NativeSelect/NativeSelect.d.ts +3 -3
- package/.cache/ts/src/components/Panel/Panel.d.ts +3 -3
- package/.cache/ts/src/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/.cache/ts/src/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/.cache/ts/src/components/PopoutRoot/PopoutRoot.d.ts +4 -4
- package/.cache/ts/src/components/PullToRefresh/PullToRefresh.d.ts +1 -1
- package/.cache/ts/src/components/Radio/Radio.d.ts +1 -1
- package/.cache/ts/src/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/.cache/ts/src/components/RichCell/RichCell.d.ts +1 -1
- package/.cache/ts/src/components/Search/Search.d.ts +1 -1
- package/.cache/ts/src/components/SegmentedControl/SegmentedControl.d.ts +17 -0
- package/.cache/ts/src/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.d.ts +4 -0
- package/.cache/ts/src/components/Select/Select.d.ts +3 -3
- package/.cache/ts/src/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/.cache/ts/src/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/.cache/ts/src/components/SliderSwitch/SliderSwitch.d.ts +6 -2
- package/.cache/ts/src/components/SliderSwitch/SliderSwitchButton.d.ts +4 -2
- package/.cache/ts/src/components/Snackbar/Snackbar.d.ts +3 -3
- package/.cache/ts/src/components/Switch/Switch.d.ts +3 -2
- package/.cache/ts/src/components/Tabs/Tabs.d.ts +1 -1
- package/.cache/ts/src/components/Tappable/Tappable.d.ts +1 -1
- package/.cache/ts/src/components/Textarea/Textarea.d.ts +1 -1
- package/.cache/ts/src/components/Typography/Title/Title.d.ts +4 -1
- package/.cache/ts/src/components/View/View.d.ts +1 -1
- package/.cache/ts/src/components/View/ViewInfinite.d.ts +1 -1
- package/.cache/ts/src/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +12 -0
- package/.cache/ts/src/hooks/usePlatform.d.ts +1 -1
- package/.cache/ts/src/index.d.ts +10 -8
- package/.cache/ts/src/lib/platform.d.ts +1 -1
- package/.cache/ts/src/lib/utils.d.ts +1 -0
- package/.cache/ts/src/tokenized/index.d.ts +8 -0
- package/VKUI_TOKENS_MIGRATION_GUIDE.md +77 -0
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.d.ts +1 -2
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.js +19 -17
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/cjs/components/AdaptivityProvider/AdaptivityProvider.d.ts +1 -1
- package/dist/cjs/components/AdaptivityProvider/AdaptivityProvider.js +4 -6
- package/dist/cjs/components/AdaptivityProvider/AdaptivityProvider.js.map +1 -1
- package/dist/cjs/components/Alert/Alert.d.ts +4 -4
- package/dist/cjs/components/Alert/Alert.js +14 -17
- package/dist/cjs/components/Alert/Alert.js.map +1 -1
- package/dist/cjs/components/AppRoot/AppRoot.d.ts +1 -2
- package/dist/cjs/components/AppRoot/AppRoot.js +2 -5
- package/dist/cjs/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cjs/components/AppearanceProvider/AppearanceProvider.d.ts +1 -0
- package/dist/cjs/components/AppearanceProvider/AppearanceProvider.js +29 -2
- package/dist/cjs/components/AppearanceProvider/AppearanceProvider.js.map +1 -1
- package/dist/cjs/components/Banner/Banner.js +1 -1
- package/dist/cjs/components/Banner/Banner.js.map +1 -1
- package/dist/cjs/components/Button/Button.d.ts +1 -1
- package/dist/cjs/components/Button/Button.js +10 -4
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Card/Card.d.ts +1 -2
- package/dist/cjs/components/Card/Card.js +4 -8
- package/dist/cjs/components/Card/Card.js.map +1 -1
- package/dist/cjs/components/CardGrid/CardGrid.d.ts +1 -1
- package/dist/cjs/components/CardScroll/CardScroll.d.ts +9 -5
- package/dist/cjs/components/CardScroll/CardScroll.js +20 -18
- package/dist/cjs/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/cjs/components/Chip/Chip.d.ts +2 -2
- package/dist/cjs/components/Chip/Chip.js +3 -5
- package/dist/cjs/components/Chip/Chip.js.map +1 -1
- package/dist/cjs/components/ChipsInput/ChipsInput.js +2 -2
- package/dist/cjs/components/ChipsInput/ChipsInput.js.map +1 -1
- package/dist/cjs/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/cjs/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/dist/cjs/components/ConfigProvider/ConfigProvider.js +15 -6
- package/dist/cjs/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.d.ts +6 -6
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/cjs/components/ContentCard/ContentCard.js +12 -4
- package/dist/cjs/components/ContentCard/ContentCard.js.map +1 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/dist/cjs/components/CustomSelectOption/CustomSelectOption.js +1 -1
- package/dist/cjs/components/CustomSelectOption/CustomSelectOption.js.map +1 -1
- package/dist/cjs/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/cjs/components/Epic/Epic.d.ts +4 -4
- package/dist/cjs/components/Epic/Epic.js.map +1 -1
- package/dist/cjs/components/Gallery/Gallery.d.ts +1 -1
- package/dist/cjs/components/Gradient/Gradient.d.ts +1 -2
- package/dist/cjs/components/Gradient/Gradient.js +6 -10
- package/dist/cjs/components/Gradient/Gradient.js.map +1 -1
- package/dist/cjs/components/Group/Group.d.ts +1 -1
- package/dist/cjs/components/Header/Header.js +1 -1
- package/dist/cjs/components/Header/Header.js.map +1 -1
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.d.ts +2 -2
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js +7 -3
- package/dist/cjs/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/cjs/components/IconButton/IconButton.d.ts +1 -1
- package/dist/cjs/components/IconButton/IconButton.js +8 -0
- package/dist/cjs/components/IconButton/IconButton.js.map +1 -1
- package/dist/cjs/components/Input/Input.d.ts +1 -1
- package/dist/cjs/components/ModalCard/ModalCard.d.ts +3 -3
- package/dist/cjs/components/ModalCard/ModalCard.js.map +1 -1
- package/dist/cjs/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/cjs/components/ModalCardBase/ModalCardBase.js +1 -1
- package/dist/cjs/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cjs/components/ModalPage/ModalPage.d.ts +3 -3
- package/dist/cjs/components/ModalPage/ModalPage.js.map +1 -1
- package/dist/cjs/components/ModalRoot/ModalRootAdaptive.d.ts +3 -3
- package/dist/cjs/components/ModalRoot/ModalRootAdaptive.js.map +1 -1
- package/dist/cjs/components/ModalRoot/withModalRootContext.d.ts +1 -1
- package/dist/cjs/components/ModalRoot/withModalRootContext.js.map +1 -1
- package/dist/cjs/components/NativeSelect/NativeSelect.d.ts +3 -3
- package/dist/cjs/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cjs/components/Panel/Panel.d.ts +3 -3
- package/dist/cjs/components/Panel/Panel.js.map +1 -1
- package/dist/cjs/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/cjs/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/dist/cjs/components/PanelHeaderButton/PanelHeaderButton.js +15 -6
- package/dist/cjs/components/PanelHeaderButton/PanelHeaderButton.js.map +1 -1
- package/dist/cjs/components/Placeholder/Placeholder.js +1 -1
- package/dist/cjs/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/cjs/components/PopoutRoot/PopoutRoot.d.ts +4 -4
- package/dist/cjs/components/PopoutRoot/PopoutRoot.js.map +1 -1
- package/dist/cjs/components/PromoBanner/PromoBanner.js +7 -0
- package/dist/cjs/components/PromoBanner/PromoBanner.js.map +1 -1
- package/dist/cjs/components/PullToRefresh/PullToRefresh.d.ts +1 -1
- package/dist/cjs/components/Radio/Radio.d.ts +1 -1
- package/dist/cjs/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/dist/cjs/components/RichCell/RichCell.d.ts +1 -1
- package/dist/cjs/components/Root/Root.js +5 -0
- package/dist/cjs/components/Root/Root.js.map +1 -1
- package/dist/cjs/components/Search/Search.d.ts +1 -1
- package/dist/cjs/components/Search/Search.js +47 -23
- package/dist/cjs/components/Search/Search.js.map +1 -1
- package/dist/cjs/components/SegmentedControl/SegmentedControl.d.ts +17 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControl.js +116 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.d.ts +4 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.js +61 -0
- package/dist/cjs/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.js.map +1 -0
- package/dist/cjs/components/Select/Select.d.ts +3 -3
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/cjs/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/dist/cjs/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/cjs/components/SimpleCell/SimpleCell.js +21 -8
- package/dist/cjs/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cjs/components/SliderSwitch/SliderSwitch.d.ts +6 -2
- package/dist/cjs/components/SliderSwitch/SliderSwitch.js +18 -6
- package/dist/cjs/components/SliderSwitch/SliderSwitch.js.map +1 -1
- package/dist/cjs/components/SliderSwitch/SliderSwitchButton.d.ts +4 -2
- package/dist/cjs/components/SliderSwitch/SliderSwitchButton.js +6 -5
- package/dist/cjs/components/SliderSwitch/SliderSwitchButton.js.map +1 -1
- package/dist/cjs/components/Snackbar/Snackbar.d.ts +3 -3
- package/dist/cjs/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.d.ts +3 -2
- package/dist/cjs/components/Switch/Switch.js +3 -6
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/TabbarItem/TabbarItem.js +8 -1
- package/dist/cjs/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.d.ts +1 -1
- package/dist/cjs/components/Tappable/Tappable.d.ts +1 -1
- package/dist/cjs/components/Textarea/Textarea.d.ts +1 -1
- package/dist/cjs/components/Typography/Title/Title.d.ts +4 -1
- package/dist/cjs/components/Typography/Title/Title.js +9 -19
- package/dist/cjs/components/Typography/Title/Title.js.map +1 -1
- package/dist/cjs/components/View/View.d.ts +1 -1
- package/dist/cjs/components/View/View.js +29 -18
- package/dist/cjs/components/View/View.js.map +1 -1
- package/dist/cjs/components/View/ViewInfinite.d.ts +1 -1
- package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +12 -0
- package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.js +37 -0
- package/dist/cjs/components/VisuallyHiddenInput/VisuallyHiddenInput.js.map +1 -0
- package/dist/cjs/hooks/usePlatform.d.ts +1 -1
- package/dist/cjs/hooks/usePlatform.js.map +1 -1
- package/dist/cjs/index.d.ts +10 -8
- package/dist/cjs/index.js +24 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/platform.d.ts +1 -1
- package/dist/cjs/lib/platform.js.map +1 -1
- package/dist/cjs/lib/utils.d.ts +1 -0
- package/dist/cjs/lib/utils.js +7 -0
- package/dist/cjs/lib/utils.js.map +1 -1
- package/dist/cjs/tokenized/index.d.ts +8 -0
- package/dist/cjs/tokenized/index.js +40 -0
- package/dist/cjs/tokenized/index.js.map +1 -0
- package/dist/components/ActionSheetItem/ActionSheetItem.d.ts +1 -2
- package/dist/components/ActionSheetItem/ActionSheetItem.js +16 -14
- package/dist/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/components/AdaptivityProvider/AdaptivityProvider.d.ts +1 -1
- package/dist/components/AdaptivityProvider/AdaptivityProvider.js +2 -3
- package/dist/components/AdaptivityProvider/AdaptivityProvider.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +4 -4
- package/dist/components/Alert/Alert.js +12 -13
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts +1 -2
- package/dist/components/AppRoot/AppRoot.js +1 -3
- package/dist/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/components/AppearanceProvider/AppearanceProvider.d.ts +1 -0
- package/dist/components/AppearanceProvider/AppearanceProvider.js +25 -2
- package/dist/components/AppearanceProvider/AppearanceProvider.js.map +1 -1
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +10 -4
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -2
- package/dist/components/Card/Card.js +3 -9
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/CardGrid/CardGrid.d.ts +1 -1
- package/dist/components/CardScroll/CardScroll.d.ts +9 -5
- package/dist/components/CardScroll/CardScroll.js +16 -16
- package/dist/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts +2 -2
- package/dist/components/Chip/Chip.js +2 -6
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/ChipsInput/ChipsInput.js +1 -1
- package/dist/components/ChipsInput/ChipsInput.js.map +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.js +16 -7
- package/dist/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderContext.d.ts +6 -6
- package/dist/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/components/ContentCard/ContentCard.js +10 -3
- package/dist/components/ContentCard/ContentCard.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/dist/components/CustomSelectOption/CustomSelectOption.js +1 -1
- package/dist/components/CustomSelectOption/CustomSelectOption.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Epic/Epic.d.ts +4 -4
- package/dist/components/Epic/Epic.js.map +1 -1
- package/dist/components/Gallery/Gallery.d.ts +1 -1
- package/dist/components/Gradient/Gradient.d.ts +1 -2
- package/dist/components/Gradient/Gradient.js +5 -11
- package/dist/components/Gradient/Gradient.js.map +1 -1
- package/dist/components/Group/Group.d.ts +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/HorizontalScroll/HorizontalScroll.d.ts +2 -2
- package/dist/components/HorizontalScroll/HorizontalScroll.js +5 -3
- package/dist/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/IconButton/IconButton.js +7 -0
- package/dist/components/IconButton/IconButton.js.map +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/ModalCard/ModalCard.d.ts +3 -3
- package/dist/components/ModalCard/ModalCard.js.map +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.js +2 -2
- package/dist/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/components/ModalPage/ModalPage.d.ts +3 -3
- package/dist/components/ModalPage/ModalPage.js.map +1 -1
- package/dist/components/ModalRoot/ModalRootAdaptive.d.ts +3 -3
- package/dist/components/ModalRoot/ModalRootAdaptive.js.map +1 -1
- package/dist/components/ModalRoot/withModalRootContext.d.ts +1 -1
- package/dist/components/ModalRoot/withModalRootContext.js.map +1 -1
- package/dist/components/NativeSelect/NativeSelect.d.ts +3 -3
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/components/Panel/Panel.d.ts +3 -3
- package/dist/components/Panel/Panel.js.map +1 -1
- package/dist/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/dist/components/PanelHeaderButton/PanelHeaderButton.js +14 -7
- package/dist/components/PanelHeaderButton/PanelHeaderButton.js.map +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/PopoutRoot/PopoutRoot.d.ts +4 -4
- package/dist/components/PopoutRoot/PopoutRoot.js.map +1 -1
- package/dist/components/PromoBanner/PromoBanner.js +6 -0
- package/dist/components/PromoBanner/PromoBanner.js.map +1 -1
- package/dist/components/PullToRefresh/PullToRefresh.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/dist/components/RichCell/RichCell.d.ts +1 -1
- package/dist/components/Root/Root.js +5 -0
- package/dist/components/Root/Root.js.map +1 -1
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.js +45 -22
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +17 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +94 -0
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.d.ts +4 -0
- package/dist/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.js +40 -0
- package/dist/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.js.map +1 -0
- package/dist/components/Select/Select.d.ts +3 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/dist/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/components/SimpleCell/SimpleCell.js +21 -9
- package/dist/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/components/SliderSwitch/SliderSwitch.d.ts +6 -2
- package/dist/components/SliderSwitch/SliderSwitch.js +14 -3
- package/dist/components/SliderSwitch/SliderSwitch.js.map +1 -1
- package/dist/components/SliderSwitch/SliderSwitchButton.d.ts +4 -2
- package/dist/components/SliderSwitch/SliderSwitchButton.js +5 -5
- package/dist/components/SliderSwitch/SliderSwitchButton.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +3 -3
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +3 -2
- package/dist/components/Switch/Switch.js +3 -6
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/TabbarItem/TabbarItem.js +7 -1
- package/dist/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tappable/Tappable.d.ts +1 -1
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Typography/Title/Title.d.ts +4 -1
- package/dist/components/Typography/Title/Title.js +7 -16
- package/dist/components/Typography/Title/Title.js.map +1 -1
- package/dist/components/View/View.d.ts +1 -1
- package/dist/components/View/View.js +29 -18
- package/dist/components/View/View.js.map +1 -1
- package/dist/components/View/ViewInfinite.d.ts +1 -1
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +12 -0
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.js +23 -0
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.js.map +1 -0
- package/dist/components.css +15 -12
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.js +16 -14
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/cssm/components/AdaptivityProvider/AdaptivityProvider.js +2 -3
- package/dist/cssm/components/AdaptivityProvider/AdaptivityProvider.js.map +1 -1
- package/dist/cssm/components/Alert/Alert.js +12 -13
- package/dist/cssm/components/Alert/Alert.js.map +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.js +1 -3
- package/dist/cssm/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cssm/components/AppearanceProvider/AppearanceProvider.js +25 -2
- package/dist/cssm/components/AppearanceProvider/AppearanceProvider.js.map +1 -1
- package/dist/cssm/components/Banner/Banner.js +1 -1
- package/dist/cssm/components/Banner/Banner.js.map +1 -1
- package/dist/cssm/components/Button/Button.css +9 -11
- package/dist/cssm/components/Button/Button.js +10 -4
- package/dist/cssm/components/Button/Button.js.map +1 -1
- package/dist/cssm/components/Card/Card.css +6 -1
- package/dist/cssm/components/Card/Card.js +3 -9
- package/dist/cssm/components/Card/Card.js.map +1 -1
- package/dist/cssm/components/CardScroll/CardScroll.css +1 -1
- package/dist/cssm/components/CardScroll/CardScroll.js +16 -16
- package/dist/cssm/components/CardScroll/CardScroll.js.map +1 -1
- package/dist/cssm/components/Chip/Chip.js +2 -6
- package/dist/cssm/components/Chip/Chip.js.map +1 -1
- package/dist/cssm/components/ChipsInput/ChipsInput.js +1 -1
- package/dist/cssm/components/ChipsInput/ChipsInput.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProvider.js +16 -7
- package/dist/cssm/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/cssm/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/cssm/components/ContentCard/ContentCard.js +10 -3
- package/dist/cssm/components/ContentCard/ContentCard.js.map +1 -1
- package/dist/cssm/components/CustomSelectOption/CustomSelectOption.js +1 -1
- package/dist/cssm/components/CustomSelectOption/CustomSelectOption.js.map +1 -1
- package/dist/cssm/components/Epic/Epic.js.map +1 -1
- package/dist/cssm/components/FocusVisible/FocusVisible.css +1 -1
- package/dist/cssm/components/Gradient/Gradient.js +5 -11
- package/dist/cssm/components/Gradient/Gradient.js.map +1 -1
- package/dist/cssm/components/Header/Header.js +1 -1
- package/dist/cssm/components/Header/Header.js.map +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js +5 -3
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.js.map +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScrollArrow.css +1 -1
- package/dist/cssm/components/IconButton/IconButton.js +7 -0
- package/dist/cssm/components/IconButton/IconButton.js.map +1 -1
- package/dist/cssm/components/ModalCard/ModalCard.js.map +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js +2 -2
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cssm/components/ModalPage/ModalPage.js.map +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootAdaptive.js.map +1 -1
- package/dist/cssm/components/ModalRoot/withModalRootContext.js.map +1 -1
- package/dist/cssm/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/cssm/components/Panel/Panel.js.map +1 -1
- package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.js +14 -7
- package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.js.map +1 -1
- package/dist/cssm/components/Placeholder/Placeholder.js +1 -1
- package/dist/cssm/components/Placeholder/Placeholder.js.map +1 -1
- package/dist/cssm/components/PopoutRoot/PopoutRoot.js.map +1 -1
- package/dist/cssm/components/PromoBanner/PromoBanner.js +6 -0
- package/dist/cssm/components/PromoBanner/PromoBanner.js.map +1 -1
- package/dist/cssm/components/Root/Root.js +5 -0
- package/dist/cssm/components/Root/Root.js.map +1 -1
- package/dist/cssm/components/Search/Search.js +45 -22
- package/dist/cssm/components/Search/Search.js.map +1 -1
- package/dist/cssm/components/SegmentedControl/SegmentedControl.css +1 -0
- package/dist/cssm/components/SegmentedControl/SegmentedControl.js +95 -0
- package/dist/cssm/components/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/cssm/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.css +1 -0
- package/dist/cssm/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.js +41 -0
- package/dist/cssm/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.js.map +1 -0
- package/dist/cssm/components/Select/Select.js.map +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.js +21 -9
- package/dist/cssm/components/SimpleCell/SimpleCell.js.map +1 -1
- package/dist/cssm/components/SliderSwitch/SliderSwitch.js +14 -3
- package/dist/cssm/components/SliderSwitch/SliderSwitch.js.map +1 -1
- package/dist/cssm/components/SliderSwitch/SliderSwitchButton.js +5 -5
- package/dist/cssm/components/SliderSwitch/SliderSwitchButton.js.map +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/cssm/components/Switch/Switch.css +1 -1
- package/dist/cssm/components/Switch/Switch.js +3 -6
- package/dist/cssm/components/Switch/Switch.js.map +1 -1
- package/dist/cssm/components/TabbarItem/TabbarItem.js +7 -1
- package/dist/cssm/components/TabbarItem/TabbarItem.js.map +1 -1
- package/dist/cssm/components/Typography/Title/Title.css +1 -1
- package/dist/cssm/components/Typography/Title/Title.js +7 -16
- package/dist/cssm/components/Typography/Title/Title.js.map +1 -1
- package/dist/cssm/components/View/View.js +29 -18
- package/dist/cssm/components/View/View.js.map +1 -1
- package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.css +1 -0
- package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.js +24 -0
- package/dist/cssm/components/VisuallyHiddenInput/VisuallyHiddenInput.js.map +1 -0
- package/dist/cssm/hooks/usePlatform.js.map +1 -1
- package/dist/cssm/index.js +9 -8
- package/dist/cssm/index.js.map +1 -1
- package/dist/cssm/lib/platform.js.map +1 -1
- package/dist/cssm/lib/utils.js +3 -0
- package/dist/cssm/lib/utils.js.map +1 -1
- package/dist/cssm/styles/components.css +15 -12
- package/dist/cssm/styles/themes.css +1 -1
- package/dist/cssm/tokenized/index.js +5 -0
- package/dist/cssm/tokenized/index.js.map +1 -0
- package/dist/hooks/usePlatform.d.ts +1 -1
- package/dist/hooks/usePlatform.js.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/platform.d.ts +1 -1
- package/dist/lib/platform.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +3 -0
- package/dist/lib/utils.js.map +1 -1
- package/dist/tokenized/index.d.ts +8 -0
- package/dist/tokenized/index.js +5 -0
- package/dist/tokenized/index.js.map +1 -0
- package/dist/vkui.css +16 -13
- package/dist/vkui.css.map +1 -1
- package/package.json +3 -3
- package/postcss.config.js +10 -1
- package/src/components/ActionSheetItem/ActionSheetItem.tsx +29 -28
- package/src/components/AdaptivityProvider/AdaptivityProvider.tsx +1 -2
- package/src/components/Alert/Alert.tsx +15 -11
- package/src/components/AppRoot/AppRoot.tsx +0 -3
- package/src/components/AppearanceProvider/AppearanceProvider.tsx +27 -3
- package/src/components/Banner/Banner.tsx +1 -1
- package/src/components/Button/Button.css +9 -39
- package/src/components/Button/Button.tsx +8 -6
- package/src/components/Card/Card.css +45 -12
- package/src/components/Card/Card.tsx +2 -9
- package/src/components/CardScroll/CardScroll.css +11 -61
- package/src/components/CardScroll/CardScroll.tsx +19 -18
- package/src/components/CardScroll/Readme.md +3 -2
- package/src/components/Chip/Chip.tsx +1 -4
- package/src/components/ChipsInput/ChipsInput.tsx +1 -1
- package/src/components/ConfigProvider/ConfigProvider.tsx +26 -9
- package/src/components/ConfigProvider/ConfigProviderContext.tsx +5 -5
- package/src/components/ContentCard/ContentCard.tsx +8 -2
- package/src/components/CustomSelectOption/CustomSelectOption.tsx +1 -1
- package/src/components/Epic/Epic.tsx +8 -3
- package/src/components/FocusVisible/FocusVisible.css +4 -8
- package/src/components/FormItem/Readme.md +14 -2
- package/src/components/Gradient/Gradient.tsx +4 -12
- package/src/components/Gradient/Readme.md +1 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/HorizontalScroll/HorizontalScroll.tsx +10 -4
- package/src/components/HorizontalScroll/HorizontalScrollArrow.css +3 -1
- package/src/components/IconButton/IconButton.tsx +8 -0
- package/src/components/ModalCard/ModalCard.tsx +8 -3
- package/src/components/ModalCardBase/ModalCardBase.tsx +2 -2
- package/src/components/ModalPage/ModalPage.tsx +8 -3
- package/src/components/ModalRoot/ModalRootAdaptive.tsx +8 -3
- package/src/components/ModalRoot/Readme.md +1 -1
- package/src/components/ModalRoot/withModalRootContext.tsx +1 -1
- package/src/components/NativeSelect/NativeSelect.tsx +8 -3
- package/src/components/Panel/Panel.tsx +6 -3
- package/src/components/PanelHeaderButton/PanelHeaderButton.tsx +20 -12
- package/src/components/Placeholder/Placeholder.tsx +1 -1
- package/src/components/PopoutRoot/PopoutRoot.tsx +8 -5
- package/src/components/PromoBanner/PromoBanner.tsx +8 -0
- package/src/components/Root/Root.tsx +12 -2
- package/src/components/Search/Search.tsx +38 -14
- package/src/components/SegmentedControl/Readme.md +94 -0
- package/src/components/SegmentedControl/SegmentedControl.css +42 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +105 -0
- package/src/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.css +30 -0
- package/src/components/SegmentedControl/SegmentedControlOption/SegmentedControlOption.tsx +42 -0
- package/src/components/Select/Select.tsx +6 -5
- package/src/components/SimpleCell/SimpleCell.tsx +10 -6
- package/src/components/SliderSwitch/Readme.md +4 -0
- package/src/components/SliderSwitch/SliderSwitch.tsx +17 -3
- package/src/components/SliderSwitch/SliderSwitchButton.tsx +4 -4
- package/src/components/Snackbar/Snackbar.tsx +8 -3
- package/src/components/Switch/Switch.css +0 -12
- package/src/components/Switch/Switch.tsx +8 -10
- package/src/components/TabbarItem/TabbarItem.tsx +8 -1
- package/src/components/Typography/Title/Readme.md +28 -41
- package/src/components/Typography/Title/Title.css +22 -13
- package/src/components/Typography/Title/Title.tsx +27 -22
- package/src/components/View/View.tsx +15 -2
- package/src/components/VisuallyHiddenInput/VisuallyHiddenInput.css +9 -0
- package/src/components/VisuallyHiddenInput/VisuallyHiddenInput.tsx +25 -0
- package/src/hooks/usePlatform.ts +1 -1
- package/src/index.ts +14 -8
- package/src/lib/platform.ts +5 -1
- package/src/lib/utils.ts +6 -0
- package/src/styles/components.css +3 -0
- package/src/styles/themes.css +6 -0
- package/src/testing/utils.tsx +1 -1
- package/src/tokenized/index.ts +15 -0
- package/types/global.d.ts +0 -5
- package/.cache/ts/src/tokenized/tokenized.d.ts +0 -2
- package/dist/cjs/tokenized/tokenized.d.ts +0 -2
- package/dist/cjs/tokenized/tokenized.js +0 -16
- package/dist/cjs/tokenized/tokenized.js.map +0 -1
- package/dist/cssm/tokenized/tokenized.js +0 -2
- package/dist/cssm/tokenized/tokenized.js.map +0 -1
- package/dist/tokenized/tokenized.d.ts +0 -2
- package/dist/tokenized/tokenized.js +0 -2
- package/dist/tokenized/tokenized.js.map +0 -1
- package/src/tokenized/tokenized.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/vkui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.27.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@vkontakte/eslint-config": "2.5.0",
|
|
48
48
|
"@vkontakte/icons": "^1.136.0",
|
|
49
49
|
"@vkontakte/vk-bridge": "^2.1.3",
|
|
50
|
-
"@vkontakte/vkui-tokens": "4.
|
|
50
|
+
"@vkontakte/vkui-tokens": "4.3.0",
|
|
51
51
|
"autoprefixer": "^10.4.2",
|
|
52
52
|
"babel-jest": "^26.6.3",
|
|
53
53
|
"babel-loader": "^8.2.3",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"size": "yarn clear && concurrently 'yarn:babel' 'yarn:postcss' && size-limit",
|
|
148
148
|
"size:ci": "yarn install --frozen-lockfile --ignore-scripts && yarn build:no-types",
|
|
149
149
|
"styleguide": "cross-env NODE_ENV=development styleguidist server --config=styleguide/config.js",
|
|
150
|
-
"styleguide:props": "
|
|
150
|
+
"styleguide:props": "VKUI_STYLEGUIDE_PROPSPARSER=1 yarn styleguide",
|
|
151
151
|
"styleguide:build": "cross-env NODE_ENV=production styleguidist build --config=styleguide/config.js",
|
|
152
152
|
"dev": "yarn clear && concurrently \"yarn:tsc-dev\" \"yarn:babel-dev\" \"yarn:postcss-dev\"",
|
|
153
153
|
"dev-cjs": "yarn clear && concurrently \"yarn:tsc-cjs-dev\" \"yarn:babel-cjs-dev\" \"yarn:postcss-dev\"",
|
package/postcss.config.js
CHANGED
|
@@ -10,6 +10,10 @@ const { defaultSchemeId } = require("./package.json");
|
|
|
10
10
|
|
|
11
11
|
const animationsSource = path.join(__dirname, "src/styles/animations.css");
|
|
12
12
|
const cssPropSources = [
|
|
13
|
+
path.join(
|
|
14
|
+
__dirname,
|
|
15
|
+
"node_modules/@vkontakte/vkui-tokens/themes/vkBase/cssVars/declarations/onlyVariables.css"
|
|
16
|
+
),
|
|
13
17
|
path.join(__dirname, "src/styles/bright_light.css"),
|
|
14
18
|
path.join(__dirname, "src/styles/constants.css"),
|
|
15
19
|
animationsSource,
|
|
@@ -27,7 +31,12 @@ let plugins = [
|
|
|
27
31
|
// postcss-custom-properties only works with :root
|
|
28
32
|
scopeRoot({
|
|
29
33
|
customPropRoot: ".vkui__root, .vkui__portal-root",
|
|
30
|
-
except:
|
|
34
|
+
except: [
|
|
35
|
+
path.resolve(`./src/styles/${defaultSchemeId}.css`),
|
|
36
|
+
path.resolve(
|
|
37
|
+
"./node_modules/@vkontakte/vkui-tokens/themes/vkBase/cssVars/declarations/onlyVariables.css"
|
|
38
|
+
),
|
|
39
|
+
],
|
|
31
40
|
}),
|
|
32
41
|
autoprefixer(),
|
|
33
42
|
cssModules({
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
ActionSheetContextType,
|
|
15
15
|
} from "../ActionSheet/ActionSheetContext";
|
|
16
16
|
import Caption from "../Typography/Caption/Caption";
|
|
17
|
+
import Headline from "../Typography/Headline/Headline";
|
|
17
18
|
import {
|
|
18
19
|
withAdaptivity,
|
|
19
20
|
AdaptivityProps,
|
|
@@ -45,10 +46,10 @@ export interface ActionSheetItemProps
|
|
|
45
46
|
onImmediateClick?: React.MouseEventHandler<HTMLElement>;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
|
-
const
|
|
49
|
+
const ActionSheetItemComponent: React.FC<ActionSheetItemProps> = ({
|
|
49
50
|
children,
|
|
50
51
|
autoclose,
|
|
51
|
-
mode,
|
|
52
|
+
mode = "default",
|
|
52
53
|
meta,
|
|
53
54
|
subtitle,
|
|
54
55
|
before,
|
|
@@ -117,30 +118,33 @@ const ActionSheetItem: React.FC<ActionSheetItemProps> = ({
|
|
|
117
118
|
</React.Fragment>
|
|
118
119
|
) : (
|
|
119
120
|
<React.Fragment>
|
|
120
|
-
|
|
121
|
-
weight={mode === "cancel" ? "medium" : "regular"}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
: "2"
|
|
126
|
-
}
|
|
127
|
-
vkuiClass="ActionSheetItem__children"
|
|
128
|
-
>
|
|
129
|
-
{children}
|
|
130
|
-
</Title>
|
|
131
|
-
{hasReactNode(meta) && (
|
|
121
|
+
{platform === ANDROID ? (
|
|
122
|
+
<Headline weight={mode === "cancel" ? "medium" : "regular"}>
|
|
123
|
+
{children}
|
|
124
|
+
</Headline>
|
|
125
|
+
) : (
|
|
132
126
|
<Title
|
|
133
|
-
weight="
|
|
134
|
-
level={
|
|
135
|
-
|
|
136
|
-
? "3"
|
|
137
|
-
: "2"
|
|
138
|
-
}
|
|
139
|
-
vkuiClass="ActionSheetItem__meta"
|
|
127
|
+
weight={mode === "cancel" ? "2" : "3"}
|
|
128
|
+
level={isCompact || hasReactNode(before) ? "3" : "2"}
|
|
129
|
+
vkuiClass="ActionSheetItem__children"
|
|
140
130
|
>
|
|
141
|
-
{
|
|
131
|
+
{children}
|
|
142
132
|
</Title>
|
|
143
133
|
)}
|
|
134
|
+
{hasReactNode(meta) &&
|
|
135
|
+
(platform === ANDROID ? (
|
|
136
|
+
<Headline weight={mode === "cancel" ? "medium" : "regular"}>
|
|
137
|
+
{children}
|
|
138
|
+
</Headline>
|
|
139
|
+
) : (
|
|
140
|
+
<Title
|
|
141
|
+
weight="3"
|
|
142
|
+
level={isCompact || hasReactNode(before) ? "3" : "2"}
|
|
143
|
+
vkuiClass="ActionSheetItem__meta"
|
|
144
|
+
>
|
|
145
|
+
{meta}
|
|
146
|
+
</Title>
|
|
147
|
+
))}
|
|
144
148
|
</React.Fragment>
|
|
145
149
|
)}
|
|
146
150
|
</div>
|
|
@@ -181,9 +185,6 @@ const ActionSheetItem: React.FC<ActionSheetItemProps> = ({
|
|
|
181
185
|
);
|
|
182
186
|
};
|
|
183
187
|
|
|
184
|
-
ActionSheetItem
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
// eslint-disable-next-line import/no-default-export
|
|
189
|
-
export default withAdaptivity(ActionSheetItem, { sizeY: true });
|
|
188
|
+
export const ActionSheetItem = withAdaptivity(ActionSheetItemComponent, {
|
|
189
|
+
sizeY: true,
|
|
190
|
+
});
|
|
@@ -15,7 +15,10 @@ import Title from "../Typography/Title/Title";
|
|
|
15
15
|
import Caption from "../Typography/Caption/Caption";
|
|
16
16
|
import ModalDismissButton from "../ModalDismissButton/ModalDismissButton";
|
|
17
17
|
import { FocusTrap } from "../FocusTrap/FocusTrap";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
AdaptivityContextInterface,
|
|
20
|
+
AdaptivityProps,
|
|
21
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
19
22
|
import "./Alert.css";
|
|
20
23
|
|
|
21
24
|
export type AlertActionInterface = AlertAction &
|
|
@@ -31,7 +34,7 @@ export interface AlertAction extends Pick<ButtonProps, "Component" | "href"> {
|
|
|
31
34
|
export interface AlertProps
|
|
32
35
|
extends React.HTMLAttributes<HTMLElement>,
|
|
33
36
|
HasPlatform,
|
|
34
|
-
|
|
37
|
+
AdaptivityProps {
|
|
35
38
|
actionsLayout?: "vertical" | "horizontal";
|
|
36
39
|
actions?: AlertAction[];
|
|
37
40
|
header?: React.ReactNode;
|
|
@@ -39,6 +42,8 @@ export interface AlertProps
|
|
|
39
42
|
onClose?: VoidFunction;
|
|
40
43
|
}
|
|
41
44
|
|
|
45
|
+
export type TAlertProps = AlertProps & AdaptivityContextInterface;
|
|
46
|
+
|
|
42
47
|
export interface AlertState {
|
|
43
48
|
closing: boolean;
|
|
44
49
|
}
|
|
@@ -47,8 +52,8 @@ type TransitionEndHandler = (e?: TransitionEvent) => void;
|
|
|
47
52
|
|
|
48
53
|
type ItemClickHander = (item: AlertActionInterface) => () => void;
|
|
49
54
|
|
|
50
|
-
class
|
|
51
|
-
constructor(props:
|
|
55
|
+
class AlertComponent extends React.Component<TAlertProps, AlertState> {
|
|
56
|
+
constructor(props: TAlertProps) {
|
|
52
57
|
super(props);
|
|
53
58
|
this.element = React.createRef();
|
|
54
59
|
this.state = {
|
|
@@ -60,7 +65,7 @@ class Alert extends React.Component<AlertProps, AlertState> {
|
|
|
60
65
|
|
|
61
66
|
private transitionFinishTimeout: number | undefined = undefined;
|
|
62
67
|
|
|
63
|
-
static defaultProps: Partial<
|
|
68
|
+
static defaultProps: Partial<TAlertProps> = {
|
|
64
69
|
actionsLayout: "horizontal",
|
|
65
70
|
actions: [],
|
|
66
71
|
};
|
|
@@ -131,13 +136,13 @@ class Alert extends React.Component<AlertProps, AlertState> {
|
|
|
131
136
|
);
|
|
132
137
|
case IOS:
|
|
133
138
|
return (
|
|
134
|
-
<Title vkuiClass="Alert__header" weight="
|
|
139
|
+
<Title vkuiClass="Alert__header" weight="1" level="3">
|
|
135
140
|
{header}
|
|
136
141
|
</Title>
|
|
137
142
|
);
|
|
138
143
|
case ANDROID:
|
|
139
144
|
return (
|
|
140
|
-
<Title vkuiClass="Alert__header" weight="
|
|
145
|
+
<Title vkuiClass="Alert__header" weight="2" level="2">
|
|
141
146
|
{header}
|
|
142
147
|
</Title>
|
|
143
148
|
);
|
|
@@ -238,7 +243,7 @@ class Alert extends React.Component<AlertProps, AlertState> {
|
|
|
238
243
|
} = this.props;
|
|
239
244
|
const { closing } = this.state;
|
|
240
245
|
|
|
241
|
-
const resolvedActionsLayout:
|
|
246
|
+
const resolvedActionsLayout: TAlertProps["actionsLayout"] =
|
|
242
247
|
platform === VKCOM ? "horizontal" : actionsLayout;
|
|
243
248
|
const canShowCloseButton =
|
|
244
249
|
platform === VKCOM ||
|
|
@@ -280,9 +285,8 @@ class Alert extends React.Component<AlertProps, AlertState> {
|
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
287
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
withAdaptivity(Alert, {
|
|
288
|
+
export const Alert = withPlatform(
|
|
289
|
+
withAdaptivity(AlertComponent, {
|
|
286
290
|
viewWidth: true,
|
|
287
291
|
})
|
|
288
292
|
);
|
|
@@ -2,13 +2,36 @@ import * as React from "react";
|
|
|
2
2
|
import { AppearanceType } from "@vkontakte/vk-bridge";
|
|
3
3
|
import { AppearanceProviderContext } from "./AppearanceProviderContext";
|
|
4
4
|
import { getScheme } from "../../helpers/getScheme";
|
|
5
|
-
import {
|
|
5
|
+
import { classNamesString } from "../../lib/classNames";
|
|
6
6
|
import { usePlatform } from "../../hooks/usePlatform";
|
|
7
|
+
import { Platform } from "../../lib/platform";
|
|
7
8
|
|
|
8
9
|
export interface AppearanceProviderProps {
|
|
9
10
|
appearance?: AppearanceType;
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
export const generateVKUITokensClassName = (
|
|
14
|
+
platform: string,
|
|
15
|
+
appearance: string
|
|
16
|
+
): string => {
|
|
17
|
+
let tokensPlatform;
|
|
18
|
+
switch (platform) {
|
|
19
|
+
case Platform.ANDROID:
|
|
20
|
+
tokensPlatform = "vkBase";
|
|
21
|
+
break;
|
|
22
|
+
case Platform.IOS:
|
|
23
|
+
tokensPlatform = "vkIOS";
|
|
24
|
+
break;
|
|
25
|
+
case Platform.VKCOM:
|
|
26
|
+
tokensPlatform = "vkCom";
|
|
27
|
+
break;
|
|
28
|
+
default:
|
|
29
|
+
tokensPlatform = platform;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return `vkui--${tokensPlatform}--${appearance}`;
|
|
33
|
+
};
|
|
34
|
+
|
|
12
35
|
export const AppearanceProvider: React.FC<AppearanceProviderProps> = ({
|
|
13
36
|
children,
|
|
14
37
|
appearance = "light",
|
|
@@ -31,9 +54,10 @@ export const AppearanceProvider: React.FC<AppearanceProviderProps> = ({
|
|
|
31
54
|
{React.Children.map(children, (child) => {
|
|
32
55
|
if (React.isValidElement(child)) {
|
|
33
56
|
return React.cloneElement(child, {
|
|
34
|
-
className:
|
|
57
|
+
className: classNamesString(
|
|
35
58
|
child.props.className,
|
|
36
|
-
`vkui${appearanceContext.scheme}
|
|
59
|
+
`vkui${appearanceContext.scheme}`,
|
|
60
|
+
generateVKUITokensClassName(platform, appearance)
|
|
37
61
|
),
|
|
38
62
|
});
|
|
39
63
|
}
|
|
@@ -88,7 +88,7 @@ const BannerHeader: React.FC<BannerTypographyProps> = ({
|
|
|
88
88
|
...restProps
|
|
89
89
|
}) => {
|
|
90
90
|
return size === "m" ? (
|
|
91
|
-
<Title level="2" weight="
|
|
91
|
+
<Title level="2" weight="2" {...restProps} />
|
|
92
92
|
) : (
|
|
93
93
|
<Headline weight="medium" {...restProps} />
|
|
94
94
|
);
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
text-decoration: none;
|
|
6
6
|
border: none;
|
|
7
|
-
min-height: var(--vkui--size_button_small_height--
|
|
7
|
+
min-height: var(--vkui--size_button_small_height--compact);
|
|
8
8
|
margin: 0;
|
|
9
9
|
padding: 0;
|
|
10
10
|
user-select: none;
|
|
11
|
-
border-radius: var(--vkui--size_border_radius--regular
|
|
11
|
+
border-radius: var(--vkui--size_border_radius--regular);
|
|
12
12
|
max-width: 100%;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.Button[disabled] {
|
|
44
|
-
opacity: var(--vkui--opacity_disable
|
|
44
|
+
opacity: var(--vkui--opacity_disable);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.Button--lvl-primary[disabled]:not(.Button--clr-overlay):not(.Button--clr-negative):not(.Button--clr-positive),
|
|
@@ -163,15 +163,7 @@
|
|
|
163
163
|
/* Mode = Secondary */
|
|
164
164
|
.Button--lvl-secondary {
|
|
165
165
|
background-color: var(
|
|
166
|
-
--
|
|
167
|
-
var(--vkui--color_background_secondary)
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* Only for VKCOM */
|
|
172
|
-
.Button--vkcom.Button--lvl-secondary {
|
|
173
|
-
background-color: var(
|
|
174
|
-
--control_background,
|
|
166
|
+
--button_secondary_background,
|
|
175
167
|
var(--vkui--color_background_secondary)
|
|
176
168
|
);
|
|
177
169
|
}
|
|
@@ -490,52 +482,30 @@
|
|
|
490
482
|
transform: translateY(-1px);
|
|
491
483
|
}
|
|
492
484
|
|
|
493
|
-
/**
|
|
494
|
-
* iOS
|
|
495
|
-
*/
|
|
496
|
-
.Button--ios {
|
|
497
|
-
min-height: 26px;
|
|
498
|
-
border-radius: 10px;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* VKCOM
|
|
503
|
-
*/
|
|
504
|
-
.Button--vkcom {
|
|
505
|
-
min-height: 26px;
|
|
506
|
-
border-radius: 4px;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
.Button--vkcom.Button--lvl-secondary .Icon,
|
|
510
|
-
.Button--vkcom.Button--lvl-tertiary .Icon,
|
|
511
|
-
.Button--vkcom.Button--lvl-outline .Icon {
|
|
512
|
-
opacity: 0.72;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
485
|
/**
|
|
516
486
|
* sizeY COMPACT
|
|
517
487
|
*/
|
|
518
488
|
.Button--sz-m {
|
|
519
|
-
min-height: var(--vkui--size_button_medium_height--compact
|
|
489
|
+
min-height: var(--vkui--size_button_medium_height--compact);
|
|
520
490
|
}
|
|
521
491
|
|
|
522
492
|
.Button--sz-l {
|
|
523
|
-
min-height: var(--vkui--size_button_large_height--compact
|
|
493
|
+
min-height: var(--vkui--size_button_large_height--compact);
|
|
524
494
|
}
|
|
525
495
|
|
|
526
496
|
/**
|
|
527
497
|
* sizeY REGULAR
|
|
528
498
|
*/
|
|
529
499
|
.Button--sizeY-regular {
|
|
530
|
-
min-height: var(--vkui--size_button_small_height--regular
|
|
500
|
+
min-height: var(--vkui--size_button_small_height--regular);
|
|
531
501
|
}
|
|
532
502
|
|
|
533
503
|
.Button--sizeY-regular.Button--sz-m {
|
|
534
|
-
min-height: var(--vkui--size_button_medium_height--regular
|
|
504
|
+
min-height: var(--vkui--size_button_medium_height--regular);
|
|
535
505
|
}
|
|
536
506
|
|
|
537
507
|
.Button--sizeY-regular.Button--sz-l {
|
|
538
|
-
min-height: var(--vkui--size_button_large_height--regular
|
|
508
|
+
min-height: var(--vkui--size_button_large_height--regular);
|
|
539
509
|
}
|
|
540
510
|
|
|
541
511
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { getClassName } from "../../helpers/getClassName";
|
|
3
2
|
import { classNames } from "../../lib/classNames";
|
|
4
3
|
import { ConfigProviderContext } from "../ConfigProvider/ConfigProviderContext";
|
|
5
4
|
import Tappable, { TappableProps } from "../Tappable/Tappable";
|
|
@@ -14,8 +13,9 @@ import {
|
|
|
14
13
|
SizeType,
|
|
15
14
|
withAdaptivity,
|
|
16
15
|
} from "../../hoc/withAdaptivity";
|
|
17
|
-
import {
|
|
16
|
+
import { PlatformType, IOS, VKCOM, ANDROID } from "../../lib/platform";
|
|
18
17
|
import Spinner from "../Spinner/Spinner";
|
|
18
|
+
import Headline from "../Typography/Headline/Headline";
|
|
19
19
|
import "./Button.css";
|
|
20
20
|
|
|
21
21
|
export interface VKUIButtonProps extends HasAlign {
|
|
@@ -46,7 +46,7 @@ export interface ButtonProps
|
|
|
46
46
|
|
|
47
47
|
interface ButtonTypographyProps extends HasComponent {
|
|
48
48
|
size: ButtonProps["size"];
|
|
49
|
-
platform:
|
|
49
|
+
platform: PlatformType | undefined;
|
|
50
50
|
sizeY: AdaptivityProps["sizeY"];
|
|
51
51
|
children?: ButtonProps["children"];
|
|
52
52
|
}
|
|
@@ -62,8 +62,10 @@ const ButtonTypography: React.FC<ButtonTypographyProps> = (
|
|
|
62
62
|
if (isCompact) {
|
|
63
63
|
return <Text weight="medium" {...restProps} />;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
if (platform === ANDROID) {
|
|
66
|
+
return <Headline weight="medium" {...restProps} />;
|
|
67
|
+
}
|
|
68
|
+
return <Title level="3" weight="2" {...restProps} />;
|
|
67
69
|
case "m":
|
|
68
70
|
if (isCompact) {
|
|
69
71
|
return (
|
|
@@ -174,7 +176,7 @@ const Button: React.FC<ButtonProps> = (props: ButtonProps) => {
|
|
|
174
176
|
onClick={loading ? undefined : onClick}
|
|
175
177
|
focusVisibleMode="outside"
|
|
176
178
|
vkuiClass={classNames(
|
|
177
|
-
|
|
179
|
+
"Button",
|
|
178
180
|
`Button--sz-${size}`,
|
|
179
181
|
`Button--lvl-${resolvedMode}`,
|
|
180
182
|
`Button--clr-${resolvedAppearance}`,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
.Card {
|
|
2
2
|
position: relative;
|
|
3
|
-
background: var(
|
|
3
|
+
background: var(
|
|
4
|
+
--content_tint_background,
|
|
5
|
+
var(--vkui--color_background_secondary)
|
|
6
|
+
);
|
|
7
|
+
border-radius: var(--vkui--size_card_border_radius--regular);
|
|
4
8
|
}
|
|
5
9
|
|
|
6
10
|
.Card__in {
|
|
@@ -10,12 +14,16 @@
|
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
.Card--md-shadow {
|
|
13
|
-
box-shadow:
|
|
14
|
-
|
|
17
|
+
box-shadow: var(
|
|
18
|
+
--vkui--elevation3,
|
|
19
|
+
0 2px 24px 0 rgba(0, 0, 0, 0.08),
|
|
20
|
+
0 0 2px 0 rgba(0, 0, 0, 0.08)
|
|
21
|
+
);
|
|
22
|
+
background: var(--modal_card_background, var(--vkui--color_background_modal));
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
.Card--md-outline {
|
|
18
|
-
background: var(--modal_card_background);
|
|
26
|
+
background: var(--modal_card_background, var(--vkui--color_background_modal));
|
|
19
27
|
}
|
|
20
28
|
|
|
21
29
|
.Card--md-outline::before {
|
|
@@ -26,25 +34,50 @@
|
|
|
26
34
|
height: 100%;
|
|
27
35
|
content: "";
|
|
28
36
|
display: block;
|
|
29
|
-
border: var(--thin-border) solid
|
|
37
|
+
border: var(--thin-border) solid
|
|
38
|
+
var(--input_border, var(--vkui--color_image_border_alpha));
|
|
30
39
|
z-index: 1;
|
|
31
40
|
box-sizing: border-box;
|
|
32
41
|
border-radius: inherit;
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
/**
|
|
36
|
-
|
|
45
|
+
* CMP:
|
|
46
|
+
* CardScroll
|
|
37
47
|
*/
|
|
48
|
+
.CardScroll .Card {
|
|
49
|
+
margin-right: var(--vkui--size_cardgrid_padding--regular);
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.CardScroll .Card:last-of-type {
|
|
54
|
+
margin-right: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.CardScroll--s .Card {
|
|
58
|
+
width: 40%;
|
|
59
|
+
}
|
|
38
60
|
|
|
39
|
-
.
|
|
40
|
-
|
|
61
|
+
.CardScroll--m .Card {
|
|
62
|
+
width: 62%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.CardScroll--l .Card {
|
|
66
|
+
width: 100%;
|
|
41
67
|
}
|
|
42
68
|
|
|
43
69
|
/**
|
|
44
|
-
*
|
|
70
|
+
* CMP:
|
|
71
|
+
* Group
|
|
72
|
+
* SplitCol
|
|
45
73
|
*/
|
|
74
|
+
.Group--card .CardScroll--l .Card,
|
|
75
|
+
.SplitCol--spaced .CardScroll--l .Card {
|
|
76
|
+
width: calc(100% - 32px);
|
|
77
|
+
margin-right: 16px;
|
|
78
|
+
}
|
|
46
79
|
|
|
47
|
-
.Card
|
|
48
|
-
.
|
|
49
|
-
|
|
80
|
+
.Group--card .CardScroll--l .Card:last-of-type,
|
|
81
|
+
.SplitCol--spaced .CardScroll--l .Card:last-of-type {
|
|
82
|
+
margin-right: 0;
|
|
50
83
|
}
|
|
@@ -11,8 +11,8 @@ export interface CardProps
|
|
|
11
11
|
mode?: "tint" | "shadow" | "outline";
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const Card: React.
|
|
15
|
-
mode,
|
|
14
|
+
export const Card: React.FC<CardProps> = ({
|
|
15
|
+
mode = "tint",
|
|
16
16
|
children,
|
|
17
17
|
getRootRef,
|
|
18
18
|
...restProps
|
|
@@ -29,10 +29,3 @@ const Card: React.FunctionComponent<CardProps> = ({
|
|
|
29
29
|
</div>
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
Card.defaultProps = {
|
|
34
|
-
mode: "tint",
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// eslint-disable-next-line import/no-default-export
|
|
38
|
-
export default Card;
|
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
align-items: stretch;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.CardScroll .Card {
|
|
7
|
-
margin-right: 8px;
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
.CardScroll__gap {
|
|
12
7
|
display: block;
|
|
13
8
|
flex-shrink: 0;
|
|
@@ -17,81 +12,36 @@
|
|
|
17
12
|
margin-top: 16px;
|
|
18
13
|
}
|
|
19
14
|
|
|
20
|
-
.CardScroll .
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.CardScroll--s .Card {
|
|
25
|
-
width: 40%;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.CardScroll--m .Card {
|
|
29
|
-
width: 62%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.CardScroll--l .Card {
|
|
33
|
-
width: 100%;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* iOS
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
.CardScroll--ios .CardScroll__gap {
|
|
41
|
-
width: 12px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Android & VKCOM
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
.CardScroll--android .CardScroll__gap,
|
|
49
|
-
.CardScroll--vkcom .CardScroll__gap {
|
|
50
|
-
width: 16px;
|
|
15
|
+
.CardScroll--withSpaces .CardScroll__gap {
|
|
16
|
+
width: var(--vkui--size_base_padding_horizontal--regular);
|
|
51
17
|
}
|
|
52
18
|
|
|
53
19
|
/**
|
|
20
|
+
* CMP:
|
|
54
21
|
* SplitCol
|
|
55
22
|
*/
|
|
56
|
-
|
|
57
|
-
.SplitCol--spaced .CardScroll {
|
|
23
|
+
.SplitCol--spaced .CardScroll--withSpaces .CardScroll {
|
|
58
24
|
margin-left: -16px;
|
|
59
25
|
margin-right: -16px;
|
|
60
26
|
}
|
|
61
27
|
|
|
62
|
-
.SplitCol--spaced .CardScroll__gap {
|
|
28
|
+
.SplitCol--spaced .CardScroll--withSpaces .CardScroll__gap {
|
|
63
29
|
width: 16px;
|
|
64
30
|
}
|
|
65
31
|
|
|
66
|
-
.SplitCol--spaced .CardScroll--l .Card {
|
|
67
|
-
width: calc(100% - 32px);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.SplitCol--spaced .CardScroll--l .Card:not(:last-of-type) {
|
|
71
|
-
margin-right: 16px;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
32
|
/**
|
|
33
|
+
* CMP:
|
|
75
34
|
* Group
|
|
76
35
|
*/
|
|
77
|
-
|
|
78
|
-
.Group--card .CardScroll {
|
|
36
|
+
.Group--card .CardScroll--withSpaces {
|
|
79
37
|
margin-left: -8px;
|
|
80
38
|
margin-right: -8px;
|
|
81
39
|
}
|
|
82
40
|
|
|
83
|
-
.Group--card .CardScroll--
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.Group--card .CardScroll--l .Card:not(:last-of-type) {
|
|
88
|
-
margin-right: 16px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.Group--card .CardScroll:first-child {
|
|
92
|
-
padding-top: 8px;
|
|
41
|
+
.Group--card .CardScroll--withSpaces:first-child {
|
|
42
|
+
padding-top: var(--vkui--size_cardgrid_padding_vertical--regular);
|
|
93
43
|
}
|
|
94
44
|
|
|
95
|
-
.Group--card .CardScroll:last-child {
|
|
96
|
-
padding-bottom:
|
|
45
|
+
.Group--card .CardScroll--withSpaces:last-child {
|
|
46
|
+
padding-bottom: var(--vkui--size_cardgrid_padding_vertical--regular);
|
|
97
47
|
}
|