@vkontakte/vkui 4.26.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 +210 -85
- package/.cache/ts/src/components/ActionSheetItem/ActionSheetItem.d.ts +1 -2
- package/.cache/ts/src/components/Alert/Alert.d.ts +1 -2
- package/.cache/ts/src/components/AppearanceProvider/AppearanceProvider.d.ts +1 -0
- package/.cache/ts/src/components/Card/Card.d.ts +1 -2
- package/.cache/ts/src/components/CardScroll/CardScroll.d.ts +4 -7
- package/.cache/ts/src/components/Chip/Chip.d.ts +2 -2
- package/.cache/ts/src/components/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/.cache/ts/src/components/ConfigProvider/ConfigProviderContext.d.ts +5 -5
- package/.cache/ts/src/components/Gradient/Gradient.d.ts +1 -2
- 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/SliderSwitch/SliderSwitch.d.ts +6 -2
- package/.cache/ts/src/components/SliderSwitch/SliderSwitchButton.d.ts +4 -2
- package/.cache/ts/src/components/Switch/Switch.d.ts +3 -2
- package/.cache/ts/src/components/Typography/Title/Title.d.ts +4 -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 +7 -5
- package/.cache/ts/src/lib/utils.d.ts +1 -0
- package/.cache/ts/src/tokenized/index.d.ts +6 -0
- package/VKUI_TOKENS_MIGRATION_GUIDE.md +2 -1
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.d.ts +1 -2
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.js +16 -10
- package/dist/cjs/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/cjs/components/Alert/Alert.d.ts +1 -2
- package/dist/cjs/components/Alert/Alert.js +12 -12
- package/dist/cjs/components/Alert/Alert.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.js +9 -1
- 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/CardScroll/CardScroll.d.ts +4 -7
- package/dist/cjs/components/CardScroll/CardScroll.js +11 -15
- package/dist/cjs/components/CardScroll/CardScroll.js.map +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/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/dist/cjs/components/ConfigProvider/ConfigProvider.js +1 -26
- package/dist/cjs/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.d.ts +5 -5
- package/dist/cjs/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/cjs/components/ContentCard/ContentCard.js +4 -4
- package/dist/cjs/components/ContentCard/ContentCard.js.map +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/Header/Header.js +1 -1
- package/dist/cjs/components/Header/Header.js.map +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/PanelHeaderButton/PanelHeaderButton.js +1 -1
- 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/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/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/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/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/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 +7 -5
- package/dist/cjs/index.js +18 -10
- package/dist/cjs/index.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 +6 -0
- package/dist/cjs/tokenized/index.js +24 -0
- package/dist/cjs/tokenized/index.js.map +1 -1
- package/dist/components/ActionSheetItem/ActionSheetItem.d.ts +1 -2
- package/dist/components/ActionSheetItem/ActionSheetItem.js +14 -10
- package/dist/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts +1 -2
- package/dist/components/Alert/Alert.js +11 -12
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/AppearanceProvider/AppearanceProvider.d.ts +1 -0
- package/dist/components/AppearanceProvider/AppearanceProvider.js +24 -1
- 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.js +9 -2
- 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/CardScroll/CardScroll.d.ts +4 -7
- package/dist/components/CardScroll/CardScroll.js +9 -14
- package/dist/components/CardScroll/CardScroll.js.map +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/ConfigProvider/ConfigProvider.d.ts +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.js +1 -25
- package/dist/components/ConfigProvider/ConfigProvider.js.map +1 -1
- package/dist/components/ConfigProvider/ConfigProviderContext.d.ts +5 -5
- package/dist/components/ConfigProvider/ConfigProviderContext.js.map +1 -1
- package/dist/components/ContentCard/ContentCard.js +3 -3
- package/dist/components/ContentCard/ContentCard.js.map +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/Header/Header.js +1 -1
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.js +2 -2
- package/dist/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/components/PanelHeaderButton/PanelHeaderButton.js +1 -1
- 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/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/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/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/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/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 +5 -5
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.js +14 -10
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.js.map +1 -1
- package/dist/cssm/components/Alert/Alert.js +11 -12
- package/dist/cssm/components/Alert/Alert.js.map +1 -1
- package/dist/cssm/components/AppearanceProvider/AppearanceProvider.js +24 -1
- 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.js +9 -2
- package/dist/cssm/components/Button/Button.js.map +1 -1
- package/dist/cssm/components/Card/Card.css +2 -2
- 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 +9 -14
- 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 +1 -25
- 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 +3 -3
- package/dist/cssm/components/ContentCard/ContentCard.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/ModalCardBase/ModalCardBase.js +2 -2
- package/dist/cssm/components/ModalCardBase/ModalCardBase.js.map +1 -1
- package/dist/cssm/components/PanelHeaderButton/PanelHeaderButton.js +1 -1
- 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/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/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/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/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/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 +6 -5
- package/dist/cssm/index.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 +5 -5
- package/dist/cssm/styles/themes.css +1 -1
- package/dist/cssm/tokenized/index.js +3 -0
- package/dist/cssm/tokenized/index.js.map +1 -1
- package/dist/hooks/usePlatform.d.ts +1 -1
- package/dist/hooks/usePlatform.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +6 -5
- package/dist/index.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 +6 -0
- package/dist/tokenized/index.js +3 -0
- package/dist/tokenized/index.js.map +1 -1
- package/dist/vkui.css +6 -6
- package/dist/vkui.css.map +1 -1
- package/package.json +2 -2
- package/src/components/ActionSheetItem/ActionSheetItem.tsx +26 -24
- package/src/components/Alert/Alert.tsx +5 -7
- package/src/components/AppearanceProvider/AppearanceProvider.tsx +25 -1
- package/src/components/Banner/Banner.tsx +1 -1
- package/src/components/Button/Button.tsx +6 -3
- package/src/components/Card/Card.css +41 -0
- package/src/components/Card/Card.tsx +2 -9
- package/src/components/CardScroll/CardScroll.css +2 -39
- package/src/components/CardScroll/CardScroll.tsx +7 -17
- 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 +6 -25
- package/src/components/ConfigProvider/ConfigProviderContext.tsx +5 -5
- package/src/components/ContentCard/ContentCard.tsx +2 -2
- 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/ModalCardBase/ModalCardBase.tsx +2 -2
- package/src/components/ModalRoot/Readme.md +1 -1
- package/src/components/PanelHeaderButton/PanelHeaderButton.tsx +1 -5
- package/src/components/Placeholder/Placeholder.tsx +1 -1
- 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/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/Switch/Switch.css +0 -12
- package/src/components/Switch/Switch.tsx +8 -10
- 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/VisuallyHiddenInput/VisuallyHiddenInput.css +9 -0
- package/src/components/VisuallyHiddenInput/VisuallyHiddenInput.tsx +25 -0
- package/src/hooks/usePlatform.ts +1 -1
- package/src/index.ts +11 -5
- package/src/lib/utils.ts +6 -0
- package/src/styles/components.css +3 -0
- package/src/tokenized/index.ts +13 -0
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",
|
|
@@ -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,7 +46,7 @@ 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
52
|
mode = "default",
|
|
@@ -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,8 +185,6 @@ const ActionSheetItem: React.FC<ActionSheetItemProps> = ({
|
|
|
181
185
|
);
|
|
182
186
|
};
|
|
183
187
|
|
|
184
|
-
const
|
|
188
|
+
export const ActionSheetItem = withAdaptivity(ActionSheetItemComponent, {
|
|
185
189
|
sizeY: true,
|
|
186
190
|
});
|
|
187
|
-
|
|
188
|
-
export { ActionSheetItemWithAdaptivity as ActionSheetItem };
|
|
@@ -52,7 +52,7 @@ type TransitionEndHandler = (e?: TransitionEvent) => void;
|
|
|
52
52
|
|
|
53
53
|
type ItemClickHander = (item: AlertActionInterface) => () => void;
|
|
54
54
|
|
|
55
|
-
class
|
|
55
|
+
class AlertComponent extends React.Component<TAlertProps, AlertState> {
|
|
56
56
|
constructor(props: TAlertProps) {
|
|
57
57
|
super(props);
|
|
58
58
|
this.element = React.createRef();
|
|
@@ -136,13 +136,13 @@ class Alert extends React.Component<TAlertProps, AlertState> {
|
|
|
136
136
|
);
|
|
137
137
|
case IOS:
|
|
138
138
|
return (
|
|
139
|
-
<Title vkuiClass="Alert__header" weight="
|
|
139
|
+
<Title vkuiClass="Alert__header" weight="1" level="3">
|
|
140
140
|
{header}
|
|
141
141
|
</Title>
|
|
142
142
|
);
|
|
143
143
|
case ANDROID:
|
|
144
144
|
return (
|
|
145
|
-
<Title vkuiClass="Alert__header" weight="
|
|
145
|
+
<Title vkuiClass="Alert__header" weight="2" level="2">
|
|
146
146
|
{header}
|
|
147
147
|
</Title>
|
|
148
148
|
);
|
|
@@ -285,10 +285,8 @@ class Alert extends React.Component<TAlertProps, AlertState> {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
const
|
|
289
|
-
withAdaptivity(
|
|
288
|
+
export const Alert = withPlatform(
|
|
289
|
+
withAdaptivity(AlertComponent, {
|
|
290
290
|
viewWidth: true,
|
|
291
291
|
})
|
|
292
292
|
);
|
|
293
|
-
|
|
294
|
-
export { AlertWithPlatformAndAdaptivity as Alert };
|
|
@@ -4,11 +4,34 @@ import { AppearanceProviderContext } from "./AppearanceProviderContext";
|
|
|
4
4
|
import { getScheme } from "../../helpers/getScheme";
|
|
5
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",
|
|
@@ -33,7 +56,8 @@ export const AppearanceProvider: React.FC<AppearanceProviderProps> = ({
|
|
|
33
56
|
return React.cloneElement(child, {
|
|
34
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
|
);
|
|
@@ -13,8 +13,9 @@ import {
|
|
|
13
13
|
SizeType,
|
|
14
14
|
withAdaptivity,
|
|
15
15
|
} from "../../hoc/withAdaptivity";
|
|
16
|
-
import { IOS, VKCOM,
|
|
16
|
+
import { PlatformType, IOS, VKCOM, ANDROID } from "../../lib/platform";
|
|
17
17
|
import Spinner from "../Spinner/Spinner";
|
|
18
|
+
import Headline from "../Typography/Headline/Headline";
|
|
18
19
|
import "./Button.css";
|
|
19
20
|
|
|
20
21
|
export interface VKUIButtonProps extends HasAlign {
|
|
@@ -61,8 +62,10 @@ const ButtonTypography: React.FC<ButtonTypographyProps> = (
|
|
|
61
62
|
if (isCompact) {
|
|
62
63
|
return <Text weight="medium" {...restProps} />;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
if (platform === ANDROID) {
|
|
66
|
+
return <Headline weight="medium" {...restProps} />;
|
|
67
|
+
}
|
|
68
|
+
return <Title level="3" weight="2" {...restProps} />;
|
|
66
69
|
case "m":
|
|
67
70
|
if (isCompact) {
|
|
68
71
|
return (
|
|
@@ -40,3 +40,44 @@
|
|
|
40
40
|
box-sizing: border-box;
|
|
41
41
|
border-radius: inherit;
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* CMP:
|
|
46
|
+
* CardScroll
|
|
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
|
+
}
|
|
60
|
+
|
|
61
|
+
.CardScroll--m .Card {
|
|
62
|
+
width: 62%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.CardScroll--l .Card {
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* CMP:
|
|
71
|
+
* Group
|
|
72
|
+
* SplitCol
|
|
73
|
+
*/
|
|
74
|
+
.Group--card .CardScroll--l .Card,
|
|
75
|
+
.SplitCol--spaced .CardScroll--l .Card {
|
|
76
|
+
width: calc(100% - 32px);
|
|
77
|
+
margin-right: 16px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.Group--card .CardScroll--l .Card:last-of-type,
|
|
81
|
+
.SplitCol--spaced .CardScroll--l .Card:last-of-type {
|
|
82
|
+
margin-right: 0;
|
|
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: var(--vkui--size_cardgrid_padding--regular);
|
|
8
|
-
flex-shrink: 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
.CardScroll__gap {
|
|
12
7
|
display: block;
|
|
13
8
|
flex-shrink: 0;
|
|
@@ -17,30 +12,14 @@
|
|
|
17
12
|
margin-top: 16px;
|
|
18
13
|
}
|
|
19
14
|
|
|
20
|
-
.CardScroll .Card:last-of-type {
|
|
21
|
-
margin-right: 0;
|
|
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
15
|
.CardScroll--withSpaces .CardScroll__gap {
|
|
37
16
|
width: var(--vkui--size_base_padding_horizontal--regular);
|
|
38
17
|
}
|
|
39
18
|
|
|
40
19
|
/**
|
|
20
|
+
* CMP:
|
|
41
21
|
* SplitCol
|
|
42
22
|
*/
|
|
43
|
-
|
|
44
23
|
.SplitCol--spaced .CardScroll--withSpaces .CardScroll {
|
|
45
24
|
margin-left: -16px;
|
|
46
25
|
margin-right: -16px;
|
|
@@ -50,31 +29,15 @@
|
|
|
50
29
|
width: 16px;
|
|
51
30
|
}
|
|
52
31
|
|
|
53
|
-
.SplitCol--spaced .CardScroll--l .Card {
|
|
54
|
-
width: calc(100% - 32px);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.SplitCol--spaced .CardScroll--l .Card:not(:last-of-type) {
|
|
58
|
-
margin-right: 16px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
32
|
/**
|
|
33
|
+
* CMP:
|
|
62
34
|
* Group
|
|
63
35
|
*/
|
|
64
|
-
|
|
65
36
|
.Group--card .CardScroll--withSpaces {
|
|
66
37
|
margin-left: -8px;
|
|
67
38
|
margin-right: -8px;
|
|
68
39
|
}
|
|
69
40
|
|
|
70
|
-
.Group--card .CardScroll--l .Card {
|
|
71
|
-
width: calc(100% - 32px);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.Group--card .CardScroll--l .Card:not(:last-of-type) {
|
|
75
|
-
margin-right: 16px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
41
|
.Group--card .CardScroll--withSpaces:first-child {
|
|
79
42
|
padding-top: var(--vkui--size_cardgrid_padding_vertical--regular);
|
|
80
43
|
}
|
|
@@ -1,35 +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
6
|
import HorizontalScroll, {
|
|
6
7
|
HorizontalScrollProps,
|
|
7
8
|
} from "../HorizontalScroll/HorizontalScroll";
|
|
8
|
-
import { withAdaptivity, AdaptivityProps } from "../../hoc/withAdaptivity";
|
|
9
9
|
import { useDOM } from "../../lib/dom";
|
|
10
10
|
import "./CardScroll.css";
|
|
11
11
|
|
|
12
|
-
export interface CardScrollProps
|
|
13
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
14
|
-
AdaptivityProps {
|
|
12
|
+
export interface CardScrollProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
13
|
/**
|
|
16
|
-
* При size
|
|
17
|
-
* При size = false ширина Card будет регулироваться контентом внутри
|
|
14
|
+
* При `size=false` ширина `Card` будет регулироваться контентом внутри. В остальных случаях — будет явно задана в процентах.
|
|
18
15
|
*/
|
|
19
16
|
size?: "s" | "m" | "l" | false;
|
|
20
17
|
showArrows?: HorizontalScrollProps["showArrows"];
|
|
21
|
-
withSpaces
|
|
18
|
+
withSpaces?: boolean;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
const CardScroll: React.FC<CardScrollProps> = ({
|
|
21
|
+
export const CardScroll: React.FC<CardScrollProps> = ({
|
|
25
22
|
children,
|
|
26
|
-
size,
|
|
23
|
+
size = "s",
|
|
27
24
|
showArrows = true,
|
|
28
|
-
sizeX,
|
|
29
25
|
withSpaces = true,
|
|
30
26
|
...restProps
|
|
31
27
|
}: CardScrollProps) => {
|
|
32
28
|
const platform = usePlatform();
|
|
29
|
+
const { sizeX } = useAdaptivity();
|
|
33
30
|
|
|
34
31
|
const refContainer = React.useRef<HTMLDivElement>(null);
|
|
35
32
|
const gapRef = React.useRef<HTMLDivElement>(null);
|
|
@@ -117,10 +114,3 @@ const CardScroll: React.FC<CardScrollProps> = ({
|
|
|
117
114
|
</div>
|
|
118
115
|
);
|
|
119
116
|
};
|
|
120
|
-
|
|
121
|
-
CardScroll.defaultProps = {
|
|
122
|
-
size: "s",
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// eslint-disable-next-line import/no-default-export
|
|
126
|
-
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,10 +15,13 @@ import {
|
|
|
15
15
|
AppearanceScheme,
|
|
16
16
|
Scheme,
|
|
17
17
|
} from "../../helpers/scheme";
|
|
18
|
-
import {
|
|
19
|
-
|
|
18
|
+
import {
|
|
19
|
+
AppearanceProvider,
|
|
20
|
+
generateVKUITokensClassName,
|
|
21
|
+
} from "../AppearanceProvider/AppearanceProvider";
|
|
20
22
|
|
|
21
|
-
export interface ConfigProviderProps
|
|
23
|
+
export interface ConfigProviderProps
|
|
24
|
+
extends Partial<ConfigProviderContextInterface> {
|
|
22
25
|
/**
|
|
23
26
|
* @deprecated будет удалено в 5.0.0, устанавливать тему следует через appearance
|
|
24
27
|
* Цветовая схема приложения
|
|
@@ -59,28 +62,6 @@ const deriveAppearance = (scheme: Scheme | undefined): AppearanceType =>
|
|
|
59
62
|
? "dark"
|
|
60
63
|
: "light";
|
|
61
64
|
|
|
62
|
-
const generateVKUITokensClassName = (
|
|
63
|
-
platform: string,
|
|
64
|
-
appearance: string
|
|
65
|
-
): string => {
|
|
66
|
-
let tokensPlatform;
|
|
67
|
-
switch (platform) {
|
|
68
|
-
case Platform.ANDROID:
|
|
69
|
-
tokensPlatform = "vkBase";
|
|
70
|
-
break;
|
|
71
|
-
case Platform.IOS:
|
|
72
|
-
tokensPlatform = "vkIOS";
|
|
73
|
-
break;
|
|
74
|
-
case Platform.VKCOM:
|
|
75
|
-
tokensPlatform = "vkCom";
|
|
76
|
-
break;
|
|
77
|
-
default:
|
|
78
|
-
tokensPlatform = platform;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return `vkui--${tokensPlatform}--${appearance}`;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
65
|
const ConfigProvider: React.FC<ConfigProviderProps> = ({
|
|
85
66
|
children,
|
|
86
67
|
...props
|
|
@@ -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";
|
|
@@ -131,7 +131,7 @@ const ContentCard: React.FC<ContentCardProps> = (props: ContentCardProps) => {
|
|
|
131
131
|
</Caption>
|
|
132
132
|
)}
|
|
133
133
|
{hasReactNode(header) && (
|
|
134
|
-
<Title vkuiClass="ContentCard__text" weight="
|
|
134
|
+
<Title vkuiClass="ContentCard__text" weight="3" level="1">
|
|
135
135
|
{header}
|
|
136
136
|
</Title>
|
|
137
137
|
)}
|
|
@@ -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
|
}
|
|
@@ -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}
|