@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
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { classNames } from "../../lib/classNames";
|
|
3
3
|
import { getClassName } from "../../helpers/getClassName";
|
|
4
|
+
import { useAdaptivity } from "../../hooks/useAdaptivity";
|
|
4
5
|
import { usePlatform } from "../../hooks/usePlatform";
|
|
5
|
-
import HorizontalScroll
|
|
6
|
-
|
|
6
|
+
import HorizontalScroll, {
|
|
7
|
+
HorizontalScrollProps,
|
|
8
|
+
} from "../HorizontalScroll/HorizontalScroll";
|
|
7
9
|
import { useDOM } from "../../lib/dom";
|
|
8
10
|
import "./CardScroll.css";
|
|
9
11
|
|
|
10
|
-
export interface CardScrollProps
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
export interface CardScrollProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
/**
|
|
14
|
+
* При `size=false` ширина `Card` будет регулироваться контентом внутри. В остальных случаях — будет явно задана в процентах.
|
|
15
|
+
*/
|
|
16
|
+
size?: "s" | "m" | "l" | false;
|
|
17
|
+
showArrows?: HorizontalScrollProps["showArrows"];
|
|
18
|
+
withSpaces?: boolean;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
const CardScroll: React.FC<CardScrollProps> = ({
|
|
21
|
+
export const CardScroll: React.FC<CardScrollProps> = ({
|
|
17
22
|
children,
|
|
18
|
-
size,
|
|
19
|
-
|
|
23
|
+
size = "s",
|
|
24
|
+
showArrows = true,
|
|
25
|
+
withSpaces = true,
|
|
20
26
|
...restProps
|
|
21
27
|
}: CardScrollProps) => {
|
|
22
28
|
const platform = usePlatform();
|
|
29
|
+
const { sizeX } = useAdaptivity();
|
|
23
30
|
|
|
24
31
|
const refContainer = React.useRef<HTMLDivElement>(null);
|
|
25
32
|
const gapRef = React.useRef<HTMLDivElement>(null);
|
|
@@ -88,14 +95,15 @@ const CardScroll: React.FC<CardScrollProps> = ({
|
|
|
88
95
|
{...restProps}
|
|
89
96
|
vkuiClass={classNames(
|
|
90
97
|
getClassName("CardScroll", platform),
|
|
98
|
+
`CardScroll--sizeX-${sizeX}`,
|
|
91
99
|
`CardScroll--${size}`,
|
|
92
|
-
|
|
100
|
+
{ ["CardScroll--withSpaces"]: withSpaces }
|
|
93
101
|
)}
|
|
94
102
|
>
|
|
95
103
|
<HorizontalScroll
|
|
96
104
|
getScrollToLeft={getScrollToLeft}
|
|
97
105
|
getScrollToRight={getScrollToRight}
|
|
98
|
-
showArrows={
|
|
106
|
+
showArrows={showArrows}
|
|
99
107
|
>
|
|
100
108
|
<div vkuiClass="CardScroll__in" ref={refContainer}>
|
|
101
109
|
<span vkuiClass="CardScroll__gap" ref={gapRef} />
|
|
@@ -106,10 +114,3 @@ const CardScroll: React.FC<CardScrollProps> = ({
|
|
|
106
114
|
</div>
|
|
107
115
|
);
|
|
108
116
|
};
|
|
109
|
-
|
|
110
|
-
CardScroll.defaultProps = {
|
|
111
|
-
size: "s",
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
// eslint-disable-next-line import/no-default-export
|
|
115
|
-
export default withAdaptivity(CardScroll, { sizeX: true });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
Горизонтальный скролл для [Card](#!/Card).
|
|
2
|
-
|
|
1
|
+
Горизонтальный скролл для [Card](#!/Card).
|
|
2
|
+
|
|
3
|
+
Согласно дизайну, высота `Card` должна масштабироваться относительно её ширины. В примерах это достигается с помощью процентного `padding-bottom`. Пропорции следующие:
|
|
3
4
|
|
|
4
5
|
- `size="s"`: высота равна 66% ширины;
|
|
5
6
|
- `size="m"`: высота равна 42% ширины;
|
|
@@ -18,7 +18,7 @@ export interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
after?: React.ReactNode;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const Chip: React.FC<ChipProps> = ({
|
|
21
|
+
export const Chip: React.FC<ChipProps> = ({
|
|
22
22
|
value = "",
|
|
23
23
|
option,
|
|
24
24
|
removable = true,
|
|
@@ -73,6 +73,3 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
73
73
|
</div>
|
|
74
74
|
);
|
|
75
75
|
};
|
|
76
|
-
|
|
77
|
-
// eslint-disable-next-line import/no-default-export
|
|
78
|
-
export default Chip;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { HasAlign, HasRef, HasRootRef } from "../../types";
|
|
3
3
|
import { FormField, FormFieldProps } from "../FormField/FormField";
|
|
4
4
|
import { classNames } from "../../lib/classNames";
|
|
5
|
-
import Chip,
|
|
5
|
+
import { Chip, ChipProps } from "../Chip/Chip";
|
|
6
6
|
import { noop } from "../../lib/utils";
|
|
7
7
|
import { useChipsInput } from "./useChipsInput";
|
|
8
8
|
import { useAdaptivity } from "../../hooks/useAdaptivity";
|
|
@@ -15,9 +15,13 @@ import {
|
|
|
15
15
|
AppearanceScheme,
|
|
16
16
|
Scheme,
|
|
17
17
|
} from "../../helpers/scheme";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
AppearanceProvider,
|
|
20
|
+
generateVKUITokensClassName,
|
|
21
|
+
} from "../AppearanceProvider/AppearanceProvider";
|
|
19
22
|
|
|
20
|
-
export interface ConfigProviderProps
|
|
23
|
+
export interface ConfigProviderProps
|
|
24
|
+
extends Partial<ConfigProviderContextInterface> {
|
|
21
25
|
/**
|
|
22
26
|
* @deprecated будет удалено в 5.0.0, устанавливать тему следует через appearance
|
|
23
27
|
* Цветовая схема приложения
|
|
@@ -60,19 +64,17 @@ const deriveAppearance = (scheme: Scheme | undefined): AppearanceType =>
|
|
|
60
64
|
|
|
61
65
|
const ConfigProvider: React.FC<ConfigProviderProps> = ({
|
|
62
66
|
children,
|
|
63
|
-
schemeTarget,
|
|
64
67
|
...props
|
|
65
|
-
}: React.PropsWithChildren<ConfigProviderProps> & {
|
|
66
|
-
schemeTarget?: HTMLElement;
|
|
67
68
|
}) => {
|
|
68
69
|
const config = { ...defaultConfigProviderProps, ...props };
|
|
70
|
+
const { platform, appearance } = config;
|
|
69
71
|
const scheme = normalizeScheme({
|
|
70
72
|
scheme: config.scheme,
|
|
71
|
-
platform:
|
|
72
|
-
appearance:
|
|
73
|
+
platform: platform,
|
|
74
|
+
appearance: appearance,
|
|
73
75
|
});
|
|
74
76
|
const { document } = useDOM();
|
|
75
|
-
const target =
|
|
77
|
+
const target = document?.body;
|
|
76
78
|
|
|
77
79
|
useIsomorphicLayoutEffect(() => {
|
|
78
80
|
if (scheme === "inherit") {
|
|
@@ -91,8 +93,23 @@ const ConfigProvider: React.FC<ConfigProviderProps> = ({
|
|
|
91
93
|
}, [scheme]);
|
|
92
94
|
|
|
93
95
|
const realScheme = useSchemeDetector(target, scheme);
|
|
96
|
+
const derivedAppearance = deriveAppearance(realScheme);
|
|
97
|
+
|
|
98
|
+
useIsomorphicLayoutEffect(() => {
|
|
99
|
+
const VKUITokensClassName = generateVKUITokensClassName(
|
|
100
|
+
platform,
|
|
101
|
+
derivedAppearance
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
target?.classList.add(VKUITokensClassName);
|
|
105
|
+
|
|
106
|
+
return () => {
|
|
107
|
+
target?.classList.remove(VKUITokensClassName);
|
|
108
|
+
};
|
|
109
|
+
}, [platform, derivedAppearance]);
|
|
110
|
+
|
|
94
111
|
const configContext = useObjectMemo({
|
|
95
|
-
appearance:
|
|
112
|
+
appearance: derivedAppearance,
|
|
96
113
|
...config,
|
|
97
114
|
});
|
|
98
115
|
|
|
@@ -11,12 +11,12 @@ export interface ConfigProviderContextInterface {
|
|
|
11
11
|
/**
|
|
12
12
|
* Подсказывает приложению, обёрнутому в `ConfigProvider`, где открыто приложение: внутри webview или в мобильном браузере
|
|
13
13
|
*/
|
|
14
|
-
isWebView
|
|
14
|
+
isWebView: boolean;
|
|
15
15
|
/**
|
|
16
16
|
* Тип вебвью.<br>
|
|
17
17
|
* В случае `WebviewType.VKAPPS` интерфейс будет адаптирован для отображения в вебвью Mini Apps (системные контролы в правой части шапки)
|
|
18
18
|
*/
|
|
19
|
-
webviewType
|
|
19
|
+
webviewType: WebviewType.INTERNAL | WebviewType.VKAPPS;
|
|
20
20
|
/**
|
|
21
21
|
* Тип приложения
|
|
22
22
|
*/
|
|
@@ -28,12 +28,12 @@ export interface ConfigProviderContextInterface {
|
|
|
28
28
|
/**
|
|
29
29
|
* Включена ли анимация переходов между экранами в `Root` и `View`
|
|
30
30
|
*/
|
|
31
|
-
transitionMotionEnabled
|
|
31
|
+
transitionMotionEnabled: boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Платформа
|
|
34
34
|
*/
|
|
35
|
-
platform
|
|
36
|
-
hasNewTokens
|
|
35
|
+
platform: PlatformType;
|
|
36
|
+
hasNewTokens: boolean;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export const defaultConfigProviderProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import Card,
|
|
2
|
+
import { Card, CardProps } from "../Card/Card";
|
|
3
3
|
import Caption from "../Typography/Caption/Caption";
|
|
4
4
|
import Title from "../Typography/Title/Title";
|
|
5
5
|
import Text from "../Typography/Text/Text";
|
|
@@ -7,6 +7,7 @@ import Tappable, { TappableProps } from "../Tappable/Tappable";
|
|
|
7
7
|
import { getClassName } from "../../helpers/getClassName";
|
|
8
8
|
import { usePlatform } from "../../hooks/usePlatform";
|
|
9
9
|
import { hasReactNode } from "../../lib/utils";
|
|
10
|
+
import { warnOnce } from "../../lib/warnOnce";
|
|
10
11
|
import { HasRef, HasRootRef } from "../../types";
|
|
11
12
|
import { classNames } from "../../lib/classNames";
|
|
12
13
|
import "./ContentCard.css";
|
|
@@ -46,6 +47,7 @@ export interface ContentCardProps
|
|
|
46
47
|
mode?: CardProps["mode"];
|
|
47
48
|
}
|
|
48
49
|
|
|
50
|
+
const warn = warnOnce("ContentCard");
|
|
49
51
|
const ContentCard: React.FC<ContentCardProps> = (props: ContentCardProps) => {
|
|
50
52
|
const {
|
|
51
53
|
subtitle,
|
|
@@ -78,6 +80,10 @@ const ContentCard: React.FC<ContentCardProps> = (props: ContentCardProps) => {
|
|
|
78
80
|
|
|
79
81
|
const source = image || src;
|
|
80
82
|
|
|
83
|
+
if (image && process.env.NODE_ENV === "development") {
|
|
84
|
+
warn("Свойство image устарело и будет удалено в 5.0.0. Используйте src");
|
|
85
|
+
}
|
|
86
|
+
|
|
81
87
|
return (
|
|
82
88
|
<Card
|
|
83
89
|
mode={mode}
|
|
@@ -125,7 +131,7 @@ const ContentCard: React.FC<ContentCardProps> = (props: ContentCardProps) => {
|
|
|
125
131
|
</Caption>
|
|
126
132
|
)}
|
|
127
133
|
{hasReactNode(header) && (
|
|
128
|
-
<Title vkuiClass="ContentCard__text" weight="
|
|
134
|
+
<Title vkuiClass="ContentCard__text" weight="3" level="1">
|
|
129
135
|
{header}
|
|
130
136
|
</Title>
|
|
131
137
|
)}
|
|
@@ -39,7 +39,7 @@ const CustomSelectOption: React.FC<CustomSelectOptionProps> = ({
|
|
|
39
39
|
const { sizeY } = useAdaptivity();
|
|
40
40
|
|
|
41
41
|
if (!!option && process.env.NODE_ENV === "development") {
|
|
42
|
-
warn("Свойство option было добавлено по ошибке будет
|
|
42
|
+
warn("Свойство option было добавлено по ошибке и будет удалено в 5.0.0.");
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
return (
|
|
@@ -5,19 +5,24 @@ import { withAdaptivity, ViewWidth } from "../../hoc/withAdaptivity";
|
|
|
5
5
|
import { ScrollSaver } from "./ScrollSaver";
|
|
6
6
|
import { getNavId } from "../../lib/getNavId";
|
|
7
7
|
import { warnOnce } from "../../lib/warnOnce";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
AdaptivityContextInterface,
|
|
10
|
+
AdaptivityProps,
|
|
11
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
9
12
|
import "./Epic.css";
|
|
10
13
|
|
|
11
14
|
export interface EpicProps
|
|
12
15
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
13
|
-
|
|
16
|
+
AdaptivityProps {
|
|
14
17
|
tabbar?: React.ReactNode;
|
|
15
18
|
activeStory: string;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
const warn = warnOnce("Epic");
|
|
19
22
|
|
|
20
|
-
export const Epic: React.FC<EpicProps> = (
|
|
23
|
+
export const Epic: React.FC<EpicProps & AdaptivityContextInterface> = (
|
|
24
|
+
props
|
|
25
|
+
) => {
|
|
21
26
|
const platform = usePlatform();
|
|
22
27
|
const scroll = React.useRef<{ [key: string]: number }>({}).current;
|
|
23
28
|
const { activeStory, tabbar, children, viewWidth, ...restProps } = props;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
.Tappable--focus-visible > .FocusVisible {
|
|
1
|
+
[class$="--focus-visible"] > .FocusVisible {
|
|
3
2
|
position: absolute;
|
|
4
3
|
top: 2px;
|
|
5
4
|
left: 2px;
|
|
@@ -13,8 +12,7 @@
|
|
|
13
12
|
z-index: 0;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
.Tappable--focus-visible > .FocusVisible--outside {
|
|
15
|
+
[class$="--focus-visible"] > .FocusVisible--outside {
|
|
18
16
|
top: -2px;
|
|
19
17
|
left: -2px;
|
|
20
18
|
right: -2px;
|
|
@@ -28,8 +26,7 @@
|
|
|
28
26
|
* navigating accessible vkui apps via keyboard
|
|
29
27
|
*/
|
|
30
28
|
@media (prefers-reduced-motion: no-preference) {
|
|
31
|
-
|
|
32
|
-
.Switch--focus-visible > .FocusVisible {
|
|
29
|
+
[class$="--focus-visible"] > .FocusVisible {
|
|
33
30
|
top: 4px;
|
|
34
31
|
left: 4px;
|
|
35
32
|
right: 4px;
|
|
@@ -39,8 +36,7 @@
|
|
|
39
36
|
will-change: top, left, bottom, right;
|
|
40
37
|
}
|
|
41
38
|
|
|
42
|
-
|
|
43
|
-
.Switch--focus-visible > .FocusVisible--outside {
|
|
39
|
+
[class$="--focus-visible"] > .FocusVisible--outside {
|
|
44
40
|
top: 0;
|
|
45
41
|
left: 0;
|
|
46
42
|
bottom: 0;
|
|
@@ -113,8 +113,20 @@ class Example extends React.Component {
|
|
|
113
113
|
</FormItem>
|
|
114
114
|
|
|
115
115
|
<FormItem top="Тип документа">
|
|
116
|
-
<
|
|
117
|
-
|
|
116
|
+
<SegmentedControl
|
|
117
|
+
size="m"
|
|
118
|
+
name="type"
|
|
119
|
+
options={[
|
|
120
|
+
{
|
|
121
|
+
label: "Паспорт РФ",
|
|
122
|
+
value: "russian",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: "Заграничный",
|
|
126
|
+
value: "international",
|
|
127
|
+
},
|
|
128
|
+
]}
|
|
129
|
+
/>
|
|
118
130
|
</FormItem>
|
|
119
131
|
|
|
120
132
|
{this.addressItems.map(({ label, name }) => (
|
|
@@ -7,12 +7,12 @@ export interface GradientProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
to?: "top" | "bottom";
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
const Gradient: React.
|
|
11
|
-
mode,
|
|
10
|
+
export const Gradient: React.FC<GradientProps> = ({
|
|
11
|
+
mode = "tint",
|
|
12
12
|
children,
|
|
13
|
-
to,
|
|
13
|
+
to = "top",
|
|
14
14
|
...restProps
|
|
15
|
-
}
|
|
15
|
+
}) => {
|
|
16
16
|
return (
|
|
17
17
|
<div
|
|
18
18
|
role="presentation"
|
|
@@ -27,11 +27,3 @@ const Gradient: React.FunctionComponent<GradientProps> = ({
|
|
|
27
27
|
</div>
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
Gradient.defaultProps = {
|
|
32
|
-
mode: "tint",
|
|
33
|
-
to: "top",
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// eslint-disable-next-line import/no-default-export
|
|
37
|
-
export default Gradient;
|
|
@@ -41,7 +41,7 @@ const HeaderContent: React.FC<HeaderContentProps> = ({
|
|
|
41
41
|
switch (mode) {
|
|
42
42
|
case "primary":
|
|
43
43
|
case "tertiary":
|
|
44
|
-
return <Title weight="
|
|
44
|
+
return <Title weight="1" level="3" {...restProps} />;
|
|
45
45
|
case "secondary":
|
|
46
46
|
return <Caption level="1" weight="semibold" caps {...restProps} />;
|
|
47
47
|
}
|
|
@@ -7,6 +7,7 @@ import { easeInOutSine } from "../../lib/fx";
|
|
|
7
7
|
import { useEventListener } from "../../hooks/useEventListener";
|
|
8
8
|
import { useExternRef } from "../../hooks/useExternRef";
|
|
9
9
|
import { HasRef } from "../../types";
|
|
10
|
+
import { classNames } from "../../lib/classNames";
|
|
10
11
|
import "./HorizontalScroll.css";
|
|
11
12
|
|
|
12
13
|
interface ScrollContext {
|
|
@@ -38,7 +39,7 @@ export interface HorizontalScrollProps
|
|
|
38
39
|
* Функция для расчета величины прокрутки при клике на правую стрелку.
|
|
39
40
|
*/
|
|
40
41
|
getScrollToRight?: ScrollPositionHandler;
|
|
41
|
-
showArrows?: boolean;
|
|
42
|
+
showArrows?: boolean | "always";
|
|
42
43
|
scrollAnimationDuration?: number;
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -181,7 +182,12 @@ const HorizontalScroll: React.FC<HorizontalScrollProps> = ({
|
|
|
181
182
|
React.useEffect(onscroll, [scrollerRef, children, onscroll]);
|
|
182
183
|
|
|
183
184
|
return (
|
|
184
|
-
<div
|
|
185
|
+
<div
|
|
186
|
+
{...restProps}
|
|
187
|
+
vkuiClass={classNames(getClassName("HorizontalScroll", platform), {
|
|
188
|
+
["HorizontalScroll--withConstArrows"]: showArrows === "always",
|
|
189
|
+
})}
|
|
190
|
+
>
|
|
185
191
|
{showArrows && hasMouse && canScrollLeft && (
|
|
186
192
|
<HorizontalScrollArrow
|
|
187
193
|
direction="left"
|
|
@@ -196,8 +202,8 @@ const HorizontalScroll: React.FC<HorizontalScrollProps> = ({
|
|
|
196
202
|
<HorizontalScrollArrow
|
|
197
203
|
direction="right"
|
|
198
204
|
onClick={() => {
|
|
199
|
-
if (
|
|
200
|
-
scrollTo(
|
|
205
|
+
if (getScrollToRight) {
|
|
206
|
+
scrollTo(getScrollToRight);
|
|
201
207
|
}
|
|
202
208
|
}}
|
|
203
209
|
/>
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.HorizontalScroll:hover .HorizontalScrollArrow:hover,
|
|
25
|
-
.Gallery:hover .HorizontalScrollArrow:hover
|
|
25
|
+
.Gallery:hover .HorizontalScrollArrow:hover,
|
|
26
|
+
.HorizontalScroll--withConstArrows .HorizontalScrollArrow,
|
|
27
|
+
.HorizontalScroll--withConstArrows:hover .HorizontalScrollArrow {
|
|
26
28
|
opacity: 1;
|
|
27
29
|
}
|
|
28
30
|
|
|
@@ -5,6 +5,7 @@ import { classNames } from "../../lib/classNames";
|
|
|
5
5
|
import { usePlatform } from "../../hooks/usePlatform";
|
|
6
6
|
import { withAdaptivity } from "../../hoc/withAdaptivity";
|
|
7
7
|
import { IOS } from "../../lib/platform";
|
|
8
|
+
import { warnOnce } from "../../lib/warnOnce";
|
|
8
9
|
import "./IconButton.css";
|
|
9
10
|
|
|
10
11
|
export interface IconButtonProps extends TappableProps {
|
|
@@ -14,6 +15,7 @@ export interface IconButtonProps extends TappableProps {
|
|
|
14
15
|
icon?: React.ReactNode;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
const warn = warnOnce("IconButton");
|
|
17
19
|
const IconButton: React.FC<IconButtonProps> = ({
|
|
18
20
|
icon,
|
|
19
21
|
sizeY,
|
|
@@ -23,6 +25,12 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|
|
23
25
|
}: IconButtonProps) => {
|
|
24
26
|
const platform = usePlatform();
|
|
25
27
|
|
|
28
|
+
if (icon && process.env.NODE_ENV === "development") {
|
|
29
|
+
warn(
|
|
30
|
+
"Свойство icon устарело и будет удалено в 5.0.0. Используйте children"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
26
34
|
return (
|
|
27
35
|
<Tappable
|
|
28
36
|
{...restProps}
|
|
@@ -18,18 +18,23 @@ import {
|
|
|
18
18
|
ModalCardBase,
|
|
19
19
|
ModalCardBaseProps,
|
|
20
20
|
} from "../ModalCardBase/ModalCardBase";
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
AdaptivityContextInterface,
|
|
23
|
+
AdaptivityProps,
|
|
24
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
22
25
|
import "./ModalCard.css";
|
|
23
26
|
|
|
24
27
|
export interface ModalCardProps
|
|
25
28
|
extends HasPlatform,
|
|
26
|
-
|
|
29
|
+
AdaptivityProps,
|
|
27
30
|
NavIdProps,
|
|
28
31
|
ModalCardBaseProps {}
|
|
29
32
|
|
|
30
33
|
const warn = warnOnce("ModalCard");
|
|
31
34
|
|
|
32
|
-
const ModalCard: React.FC<ModalCardProps> = (
|
|
35
|
+
const ModalCard: React.FC<ModalCardProps & AdaptivityContextInterface> = (
|
|
36
|
+
props
|
|
37
|
+
) => {
|
|
33
38
|
const {
|
|
34
39
|
icon,
|
|
35
40
|
header,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "../../hoc/withAdaptivity";
|
|
13
13
|
import { HasRootRef } from "../../types";
|
|
14
14
|
import { PanelHeaderButton } from "../PanelHeaderButton/PanelHeaderButton";
|
|
15
|
-
import { IOS } from "../../lib/platform";
|
|
15
|
+
import { ANDROID, IOS } from "../../lib/platform";
|
|
16
16
|
import ModalDismissButton from "../ModalDismissButton/ModalDismissButton";
|
|
17
17
|
import { Icon24Dismiss } from "@vkontakte/icons";
|
|
18
18
|
import { useKeyboard } from "../../hooks/useKeyboard";
|
|
@@ -99,7 +99,7 @@ export const ModalCardBase = withAdaptivity<
|
|
|
99
99
|
{hasReactNode(header) && (
|
|
100
100
|
<Title
|
|
101
101
|
level="2"
|
|
102
|
-
weight="
|
|
102
|
+
weight={platform === ANDROID ? "2" : "1"}
|
|
103
103
|
vkuiClass="ModalCardBase__header"
|
|
104
104
|
>
|
|
105
105
|
{header}
|
|
@@ -11,7 +11,10 @@ import {
|
|
|
11
11
|
ViewHeight,
|
|
12
12
|
ViewWidth,
|
|
13
13
|
} from "../../hoc/withAdaptivity";
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
AdaptivityContextInterface,
|
|
16
|
+
AdaptivityProps,
|
|
17
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
15
18
|
import ModalDismissButton from "../ModalDismissButton/ModalDismissButton";
|
|
16
19
|
import { multiRef } from "../../lib/utils";
|
|
17
20
|
import { ModalType } from "../ModalRoot/types";
|
|
@@ -21,7 +24,7 @@ import "./ModalPage.css";
|
|
|
21
24
|
|
|
22
25
|
export interface ModalPageProps
|
|
23
26
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
24
|
-
|
|
27
|
+
AdaptivityProps,
|
|
25
28
|
NavIdProps {
|
|
26
29
|
/**
|
|
27
30
|
* Шапка модальной страницы, `<ModalPageHeader />`
|
|
@@ -40,7 +43,9 @@ export interface ModalPageProps
|
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
const warn = warnOnce("ModalPage");
|
|
43
|
-
const ModalPage: React.FC<ModalPageProps> = (
|
|
46
|
+
const ModalPage: React.FC<ModalPageProps & AdaptivityContextInterface> = (
|
|
47
|
+
props
|
|
48
|
+
) => {
|
|
44
49
|
const platform = usePlatform();
|
|
45
50
|
const { updateModalHeight } = React.useContext(ModalRootContext);
|
|
46
51
|
const {
|
|
@@ -6,9 +6,12 @@ import {
|
|
|
6
6
|
} from "../../hoc/withAdaptivity";
|
|
7
7
|
import { ModalRootTouch } from "./ModalRoot";
|
|
8
8
|
import { ModalRootDesktop } from "./ModalRootDesktop";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
AdaptivityContextInterface,
|
|
11
|
+
AdaptivityProps,
|
|
12
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
10
13
|
|
|
11
|
-
export interface ModalRootProps extends
|
|
14
|
+
export interface ModalRootProps extends AdaptivityProps {
|
|
12
15
|
activeModal?: string | null;
|
|
13
16
|
|
|
14
17
|
/**
|
|
@@ -17,7 +20,9 @@ export interface ModalRootProps extends AdaptivityContextInterface {
|
|
|
17
20
|
onClose?: (modalId: string) => void;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
|
-
const ModalRootComponent: React.FC<
|
|
23
|
+
const ModalRootComponent: React.FC<
|
|
24
|
+
ModalRootProps & AdaptivityContextInterface
|
|
25
|
+
> = (props) => {
|
|
21
26
|
const { viewWidth, viewHeight, hasMouse } = props;
|
|
22
27
|
const isDesktop =
|
|
23
28
|
viewWidth >= ViewWidth.SMALL_TABLET &&
|
|
@@ -7,7 +7,7 @@ type PickedProps = Pick<ModalRootContextInterface, "updateModalHeight">;
|
|
|
7
7
|
|
|
8
8
|
export function withModalRootContext<P extends PickedProps>(
|
|
9
9
|
Component: React.ComponentType<P>
|
|
10
|
-
): React.ComponentType<P
|
|
10
|
+
): React.ComponentType<Omit<P, keyof PickedProps>> {
|
|
11
11
|
function WithModalRootContext(props: Omit<P, keyof PickedProps>) {
|
|
12
12
|
const { updateModalHeight } = React.useContext(ModalRootContext);
|
|
13
13
|
|
|
@@ -12,7 +12,10 @@ import { useIsomorphicLayoutEffect } from "../../lib/useIsomorphicLayoutEffect";
|
|
|
12
12
|
import { useEnsuredControl } from "../../hooks/useEnsuredControl";
|
|
13
13
|
import { useExternRef } from "../../hooks/useExternRef";
|
|
14
14
|
import { usePlatform } from "../../hooks/usePlatform";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
AdaptivityContextInterface,
|
|
17
|
+
AdaptivityProps,
|
|
18
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
16
19
|
import "../Select/Select.css";
|
|
17
20
|
|
|
18
21
|
export interface NativeSelectProps
|
|
@@ -20,7 +23,7 @@ export interface NativeSelectProps
|
|
|
20
23
|
HasRef<HTMLSelectElement>,
|
|
21
24
|
HasRootRef<HTMLLabelElement>,
|
|
22
25
|
HasAlign,
|
|
23
|
-
|
|
26
|
+
AdaptivityProps {
|
|
24
27
|
placeholder?: string;
|
|
25
28
|
multiline?: boolean;
|
|
26
29
|
}
|
|
@@ -31,7 +34,9 @@ export interface SelectState {
|
|
|
31
34
|
notSelected?: boolean;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
|
-
const NativeSelect: React.FC<
|
|
37
|
+
const NativeSelect: React.FC<
|
|
38
|
+
NativeSelectProps & AdaptivityContextInterface
|
|
39
|
+
> = ({
|
|
35
40
|
style,
|
|
36
41
|
defaultValue = "",
|
|
37
42
|
align,
|
|
@@ -8,18 +8,21 @@ import { withAdaptivity } from "../../hoc/withAdaptivity";
|
|
|
8
8
|
import { IOS } from "../../lib/platform";
|
|
9
9
|
import { usePlatform } from "../../hooks/usePlatform";
|
|
10
10
|
import { NavIdProps } from "../../lib/getNavId";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
AdaptivityContextInterface,
|
|
13
|
+
AdaptivityProps,
|
|
14
|
+
} from "../AdaptivityProvider/AdaptivityContext";
|
|
12
15
|
import "./Panel.css";
|
|
13
16
|
|
|
14
17
|
export interface PanelProps
|
|
15
18
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
16
19
|
HasRootRef<HTMLDivElement>,
|
|
17
|
-
|
|
20
|
+
AdaptivityProps,
|
|
18
21
|
NavIdProps {
|
|
19
22
|
centered?: boolean;
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
export const Panel = withAdaptivity<PanelProps>(
|
|
25
|
+
export const Panel = withAdaptivity<PanelProps & AdaptivityContextInterface>(
|
|
23
26
|
({ centered = false, children, getRootRef, sizeX, nav, ...restProps }) => {
|
|
24
27
|
const platform = usePlatform();
|
|
25
28
|
|