@vkontakte/vkui 4.34.0 → 4.34.1
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 +54 -58
- package/.cache/ts/src/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/.cache/ts/src/components/AppRoot/AppRoot.d.ts +1 -1
- package/.cache/ts/src/components/Button/Button.d.ts +1 -1
- package/.cache/ts/src/components/CardGrid/CardGrid.d.ts +1 -1
- package/.cache/ts/src/components/Checkbox/Checkbox.d.ts +1 -1
- package/.cache/ts/src/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/.cache/ts/src/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/.cache/ts/src/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +2 -1
- package/.cache/ts/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/.cache/ts/src/components/Epic/Epic.d.ts +1 -1
- package/.cache/ts/src/components/Group/Group.d.ts +1 -1
- package/.cache/ts/src/components/HorizontalScroll/HorizontalScroll.d.ts +1 -1
- 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 +1 -1
- package/.cache/ts/src/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/.cache/ts/src/components/ModalPage/ModalPage.d.ts +1 -1
- package/.cache/ts/src/components/ModalRoot/ModalRoot.d.ts +1 -1
- package/.cache/ts/src/components/ModalRoot/ModalRootAdaptive.d.ts +1 -1
- package/.cache/ts/src/components/ModalRoot/ModalRootDesktop.d.ts +1 -1
- package/.cache/ts/src/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/.cache/ts/src/components/Panel/Panel.d.ts +1 -1
- 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 +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/Select/Select.d.ts +1 -1
- 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/Snackbar/Snackbar.d.ts +1 -1
- 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/View/View.d.ts +1 -1
- package/.cache/ts/src/components/View/ViewInfinite.d.ts +1 -1
- package/.cache/ts/src/hoc/withAdaptivity.d.ts +1 -1
- package/.cache/ts/src/hoc/withContext.d.ts +1 -1
- package/.cache/ts/src/hoc/withPlatform.d.ts +1 -1
- package/dist/cjs/components/AppRoot/AppRoot.js +12 -15
- package/dist/cjs/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js +4 -0
- package/dist/cjs/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.js +2 -1
- package/dist/cjs/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cjs/components/CustomSelectDropdown/CustomSelectDropdown.js +73 -35
- package/dist/cjs/components/CustomSelectDropdown/CustomSelectDropdown.js.map +1 -1
- package/dist/cjs/components/FormField/FormField.js +4 -10
- package/dist/cjs/components/FormField/FormField.js.map +1 -1
- package/dist/cjs/components/Input/Input.js +2 -6
- package/dist/cjs/components/Input/Input.js.map +1 -1
- package/dist/cjs/components/SelectMimicry/SelectMimicry.js +3 -1
- package/dist/cjs/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/cjs/hoc/withAdaptivity.js.map +1 -1
- package/dist/cjs/hoc/withContext.js.map +1 -1
- package/dist/cjs/hoc/withPlatform.js.map +1 -1
- package/dist/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/dist/components/AppRoot/AppRoot.d.ts +1 -1
- package/dist/components/AppRoot/AppRoot.js +12 -15
- package/dist/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/CardGrid/CardGrid.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/components/ChipsSelect/ChipsSelect.js +4 -0
- package/dist/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/dist/components/CustomSelect/CustomSelect.js +2 -1
- package/dist/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +2 -1
- package/dist/components/CustomSelectDropdown/CustomSelectDropdown.js +71 -35
- package/dist/components/CustomSelectDropdown/CustomSelectDropdown.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Epic/Epic.d.ts +1 -1
- package/dist/components/FormField/FormField.js +4 -8
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/Group/Group.d.ts +1 -1
- package/dist/components/HorizontalScroll/HorizontalScroll.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +2 -4
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/ModalCard/ModalCard.d.ts +1 -1
- package/dist/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/components/ModalPage/ModalPage.d.ts +1 -1
- package/dist/components/ModalRoot/ModalRoot.d.ts +1 -1
- package/dist/components/ModalRoot/ModalRootAdaptive.d.ts +1 -1
- package/dist/components/ModalRoot/ModalRootDesktop.d.ts +1 -1
- package/dist/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/dist/components/Panel/Panel.d.ts +1 -1
- package/dist/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/dist/components/PopoutRoot/PopoutRoot.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/Search/Search.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/dist/components/SelectMimicry/SelectMimicry.js +3 -1
- package/dist/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +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/View/View.d.ts +1 -1
- package/dist/components/View/ViewInfinite.d.ts +1 -1
- package/dist/components.css +5 -5
- package/dist/components.css.map +1 -1
- package/dist/cssm/components/ActionSheetItem/ActionSheetItem.d.ts +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.d.ts +1 -1
- package/dist/cssm/components/AppRoot/AppRoot.js +12 -15
- package/dist/cssm/components/AppRoot/AppRoot.js.map +1 -1
- package/dist/cssm/components/Button/Button.d.ts +1 -1
- package/dist/cssm/components/CardGrid/CardGrid.d.ts +1 -1
- package/dist/cssm/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/cssm/components/ChipsSelect/ChipsSelect.d.ts +1 -1
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js +4 -0
- package/dist/cssm/components/ChipsSelect/ChipsSelect.js.map +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.d.ts +1 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.js +2 -1
- package/dist/cssm/components/CustomSelect/CustomSelect.js.map +1 -1
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.d.ts +2 -1
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.js +71 -35
- package/dist/cssm/components/CustomSelectDropdown/CustomSelectDropdown.js.map +1 -1
- package/dist/cssm/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/cssm/components/Epic/Epic.d.ts +1 -1
- package/dist/cssm/components/FormField/FormField.css +2 -2
- package/dist/cssm/components/FormField/FormField.js +4 -8
- package/dist/cssm/components/FormField/FormField.js.map +1 -1
- package/dist/cssm/components/Group/Group.d.ts +1 -1
- package/dist/cssm/components/HorizontalScroll/HorizontalScroll.d.ts +1 -1
- package/dist/cssm/components/IconButton/IconButton.css +1 -1
- package/dist/cssm/components/IconButton/IconButton.d.ts +1 -1
- package/dist/cssm/components/Input/Input.css +1 -1
- package/dist/cssm/components/Input/Input.d.ts +1 -1
- package/dist/cssm/components/Input/Input.js +2 -4
- package/dist/cssm/components/Input/Input.js.map +1 -1
- package/dist/cssm/components/ModalCard/ModalCard.d.ts +1 -1
- package/dist/cssm/components/ModalCardBase/ModalCardBase.d.ts +1 -1
- package/dist/cssm/components/ModalPage/ModalPage.d.ts +1 -1
- package/dist/cssm/components/ModalRoot/ModalRoot.d.ts +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootAdaptive.d.ts +1 -1
- package/dist/cssm/components/ModalRoot/ModalRootDesktop.d.ts +1 -1
- package/dist/cssm/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/dist/cssm/components/Panel/Panel.d.ts +1 -1
- package/dist/cssm/components/PanelHeader/PanelHeader.d.ts +1 -1
- package/dist/cssm/components/PanelHeaderBack/PanelHeaderBack.d.ts +1 -1
- package/dist/cssm/components/PopoutRoot/PopoutRoot.d.ts +1 -1
- package/dist/cssm/components/Radio/Radio.d.ts +1 -1
- package/dist/cssm/components/RangeSlider/UniversalSlider.d.ts +1 -1
- package/dist/cssm/components/RichCell/RichCell.d.ts +1 -1
- package/dist/cssm/components/ScreenSpinner/ScreenSpinner.css +1 -1
- package/dist/cssm/components/Search/Search.d.ts +1 -1
- package/dist/cssm/components/Select/Select.css +1 -1
- package/dist/cssm/components/Select/Select.d.ts +1 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.d.ts +1 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.js +3 -1
- package/dist/cssm/components/SelectMimicry/SelectMimicry.js.map +1 -1
- package/dist/cssm/components/SimpleCell/SimpleCell.d.ts +1 -1
- package/dist/cssm/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/cssm/components/SplitCol/SplitCol.css +1 -1
- package/dist/cssm/components/Tabs/Tabs.d.ts +1 -1
- package/dist/cssm/components/Tappable/Tappable.d.ts +1 -1
- package/dist/cssm/components/Textarea/Textarea.css +1 -1
- package/dist/cssm/components/Textarea/Textarea.d.ts +1 -1
- package/dist/cssm/components/View/View.d.ts +1 -1
- package/dist/cssm/components/View/ViewInfinite.d.ts +1 -1
- package/dist/cssm/hoc/withAdaptivity.d.ts +1 -1
- package/dist/cssm/hoc/withAdaptivity.js.map +1 -1
- package/dist/cssm/hoc/withContext.d.ts +1 -1
- package/dist/cssm/hoc/withContext.js.map +1 -1
- package/dist/cssm/hoc/withPlatform.d.ts +1 -1
- package/dist/cssm/hoc/withPlatform.js.map +1 -1
- package/dist/cssm/styles/components.css +5 -5
- package/dist/hoc/withAdaptivity.d.ts +1 -1
- package/dist/hoc/withAdaptivity.js.map +1 -1
- package/dist/hoc/withContext.d.ts +1 -1
- package/dist/hoc/withContext.js.map +1 -1
- package/dist/hoc/withPlatform.d.ts +1 -1
- package/dist/hoc/withPlatform.js.map +1 -1
- package/dist/vkui.css +5 -5
- package/dist/vkui.css.map +1 -1
- package/package.json +1 -1
- package/src/components/AppRoot/AppRoot.tsx +13 -11
- package/src/components/ChipsSelect/ChipsSelect.tsx +6 -0
- package/src/components/CustomSelect/CustomSelect.tsx +1 -0
- package/src/components/CustomSelectDropdown/CustomSelectDropdown.tsx +45 -22
- package/src/components/FormField/FormField.css +31 -22
- package/src/components/FormField/FormField.tsx +4 -8
- package/src/components/FormField/Readme.md +9 -82
- package/src/components/IconButton/IconButton.css +46 -25
- package/src/components/Input/Input.css +18 -9
- package/src/components/Input/Input.tsx +4 -5
- package/src/components/Input/Readme.md +128 -24
- package/src/components/ScreenSpinner/ScreenSpinner.css +1 -1
- package/src/components/Select/Select.css +23 -9
- package/src/components/SelectMimicry/SelectMimicry.tsx +4 -2
- package/src/components/SplitCol/SplitCol.css +1 -1
- package/src/components/Textarea/Textarea.css +5 -3
- package/src/hoc/withAdaptivity.tsx +4 -4
- package/src/hoc/withContext.tsx +1 -1
- package/src/hoc/withPlatform.tsx +1 -1
|
@@ -1,34 +1,77 @@
|
|
|
1
1
|
Надстройка над `<input type="text" />`. Компонент принимает все валидные для этого элемента свойства.
|
|
2
2
|
|
|
3
|
-
```jsx
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
```jsx { "props": { "layout": false, "iframe": false } }
|
|
4
|
+
const ExampleBase = ({ formItemStatus }) => {
|
|
5
|
+
const [before, setBefore] = useState(undefined);
|
|
6
|
+
const [after, setAfter] = useState(undefined);
|
|
7
|
+
const [align, setAlign] = useState("left");
|
|
8
|
+
const [disabled, setDisabled] = useState(false);
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<FormLayout>
|
|
12
|
+
<FormItem top="align">
|
|
13
|
+
<Select
|
|
14
|
+
value={align}
|
|
15
|
+
onChange={(e) => setAlign(e.target.value)}
|
|
16
|
+
options={[
|
|
17
|
+
{ label: "left", value: "left" },
|
|
18
|
+
{ label: "center", value: "center" },
|
|
19
|
+
{ label: "right", value: "right" },
|
|
20
|
+
]}
|
|
21
|
+
/>
|
|
19
22
|
</FormItem>
|
|
20
|
-
<
|
|
23
|
+
<Checkbox
|
|
24
|
+
description="Icon24WalletOutline for example"
|
|
25
|
+
checked={!!before}
|
|
26
|
+
onChange={(e) =>
|
|
27
|
+
e.target.checked
|
|
28
|
+
? setBefore(<Icon24WalletOutline />)
|
|
29
|
+
: setBefore(undefined)
|
|
30
|
+
}
|
|
31
|
+
>
|
|
32
|
+
before
|
|
33
|
+
</Checkbox>
|
|
34
|
+
<Checkbox
|
|
35
|
+
description="Icon20User for example"
|
|
36
|
+
checked={!!after}
|
|
37
|
+
onChange={(e) =>
|
|
38
|
+
e.target.checked ? setAfter(<Icon20User />) : setAfter(undefined)
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
after
|
|
42
|
+
</Checkbox>
|
|
43
|
+
<Checkbox
|
|
44
|
+
checked={disabled}
|
|
45
|
+
onChange={(e) => setDisabled(e.target.checked)}
|
|
46
|
+
>
|
|
47
|
+
disabled
|
|
48
|
+
</Checkbox>
|
|
49
|
+
<FormItem top="📝 Пример" status={formItemStatus}>
|
|
21
50
|
<Input
|
|
51
|
+
before={before}
|
|
52
|
+
after={after}
|
|
22
53
|
type="text"
|
|
23
|
-
|
|
24
|
-
|
|
54
|
+
align={align}
|
|
55
|
+
defaultValue="Lorem ipsum dolor sit amet"
|
|
56
|
+
disabled={disabled}
|
|
25
57
|
/>
|
|
26
58
|
</FormItem>
|
|
27
|
-
|
|
59
|
+
</FormLayout>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const ExampleWithIcon = ({ formItemStatus }) => {
|
|
64
|
+
const textInput = React.createRef();
|
|
65
|
+
const clear = () => (textInput.current.value = "");
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<FormLayout>
|
|
69
|
+
<FormItem top="📝 Пример с кликабельной иконкой" status={formItemStatus}>
|
|
28
70
|
<Input
|
|
29
71
|
getRef={textInput}
|
|
30
72
|
type="text"
|
|
31
|
-
|
|
73
|
+
placeholder="Ну ведь брокколи это вкусно и полезно 😢"
|
|
74
|
+
defaultValue="Брокколи 🥦"
|
|
32
75
|
after={
|
|
33
76
|
<IconButton
|
|
34
77
|
hoverMode="opacity"
|
|
@@ -40,7 +83,68 @@ const clear = () => (textInput.current.value = "");
|
|
|
40
83
|
}
|
|
41
84
|
/>
|
|
42
85
|
</FormItem>
|
|
43
|
-
</
|
|
44
|
-
|
|
45
|
-
|
|
86
|
+
</FormLayout>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const Example = () => {
|
|
91
|
+
const [sizeY, setSizeY] = useState("regular");
|
|
92
|
+
const [formItemStatus, setFormItemStatus] = useState("default");
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<AdaptivityProvider sizeY={sizeY}>
|
|
96
|
+
<div style={rootContainerStyles}>
|
|
97
|
+
<div style={demoContainerStyles}>
|
|
98
|
+
<ExampleBase formItemStatus={formItemStatus} />
|
|
99
|
+
<Spacing size={16} />
|
|
100
|
+
<Separator />
|
|
101
|
+
<Spacing size={16} />
|
|
102
|
+
<ExampleWithIcon formItemStatus={formItemStatus} />
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<div style={propsContainerStyles}>
|
|
106
|
+
<FormItem top="AdaptivityProvider[sizeY]">
|
|
107
|
+
<Select
|
|
108
|
+
value={sizeY}
|
|
109
|
+
onChange={(e) => setSizeY(e.target.value)}
|
|
110
|
+
options={[
|
|
111
|
+
{ label: "compact", value: "compact" },
|
|
112
|
+
{ label: "regular", value: "regular" },
|
|
113
|
+
]}
|
|
114
|
+
/>
|
|
115
|
+
</FormItem>
|
|
116
|
+
<FormItem top="FormItem[status]">
|
|
117
|
+
<Select
|
|
118
|
+
value={formItemStatus}
|
|
119
|
+
onChange={(e) => setFormItemStatus(e.target.value)}
|
|
120
|
+
options={[
|
|
121
|
+
{ label: "default", value: "default" },
|
|
122
|
+
{ label: "error", value: "error" },
|
|
123
|
+
{ label: "valid", value: "valid" },
|
|
124
|
+
]}
|
|
125
|
+
/>
|
|
126
|
+
</FormItem>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</AdaptivityProvider>
|
|
130
|
+
);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const rootContainerStyles = {
|
|
134
|
+
display: "flex",
|
|
135
|
+
flexDirection: "row-reverse",
|
|
136
|
+
flexWrap: "wrap",
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const demoContainerStyles = {
|
|
140
|
+
flexGrow: 2,
|
|
141
|
+
minWidth: 320,
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const propsContainerStyles = {
|
|
145
|
+
minWidth: 200,
|
|
146
|
+
marginRight: "auto",
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
<Example />;
|
|
46
150
|
```
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
background: var(--tabbar_background, var(--vkui--color_background_modal));
|
|
23
23
|
box-shadow: var(--vkui--elevation4);
|
|
24
24
|
border-radius: var(--vkui--size_border_radius--regular);
|
|
25
|
-
color: var(--overlay_status_icon, --vkui--color_icon_medium);
|
|
25
|
+
color: var(--overlay_status_icon, var(--vkui--color_icon_medium));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.ScreenSpinner__icon {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
.Select__container {
|
|
22
22
|
flex-grow: 1;
|
|
23
23
|
flex-shrink: 1;
|
|
24
|
-
padding:
|
|
24
|
+
padding-right: 12px;
|
|
25
|
+
padding-left: 12px;
|
|
25
26
|
color: var(--text_primary, var(--vkui--color_text_primary));
|
|
26
27
|
box-sizing: border-box;
|
|
27
28
|
position: relative;
|
|
@@ -29,6 +30,27 @@
|
|
|
29
30
|
overflow: hidden;
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
.Select--hasBefore .Select__container {
|
|
34
|
+
padding-left: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.Select--hasAfter .Select__container {
|
|
38
|
+
padding-right: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.Select--multiline .Select__container {
|
|
42
|
+
padding-top: 12px;
|
|
43
|
+
padding-bottom: 12px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* TODO v5.0.0 поправить под новую адаптивность
|
|
48
|
+
*/
|
|
49
|
+
.Select--sizeY-compact.Select--multiline .Select__container {
|
|
50
|
+
padding-top: 8px;
|
|
51
|
+
padding-bottom: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
32
54
|
.Select__title {
|
|
33
55
|
display: block;
|
|
34
56
|
}
|
|
@@ -51,14 +73,6 @@
|
|
|
51
73
|
text-align: center;
|
|
52
74
|
}
|
|
53
75
|
|
|
54
|
-
/**
|
|
55
|
-
* sizeY REGULAR
|
|
56
|
-
* TODO v5.0.0 поправить под новую адаптивность
|
|
57
|
-
*/
|
|
58
|
-
.Select--sizeY-regular .Select__container {
|
|
59
|
-
padding: 11px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
76
|
/**
|
|
63
77
|
* CMP:
|
|
64
78
|
* CalendarHeader
|
|
@@ -50,8 +50,10 @@ const SelectMimicryComponent = ({
|
|
|
50
50
|
!children && "Select--empty",
|
|
51
51
|
multiline && "Select--multiline",
|
|
52
52
|
align && `Select--align-${align}`,
|
|
53
|
-
`Select--sizeX-${sizeX}`,
|
|
54
|
-
`Select--sizeY-${sizeY}
|
|
53
|
+
`Select--sizeX-${sizeX}`, // TODO v5.0.0 поправить под новую адаптивность
|
|
54
|
+
`Select--sizeY-${sizeY}`, // TODO v5.0.0 поправить под новую адаптивность
|
|
55
|
+
before && "Select--hasBefore",
|
|
56
|
+
after && "Select--hasAfter"
|
|
55
57
|
)}
|
|
56
58
|
getRootRef={getRootRef}
|
|
57
59
|
onClick={disabled ? undefined : onClick}
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
resize: none;
|
|
11
11
|
appearance: none;
|
|
12
|
-
|
|
13
|
-
font-size:
|
|
12
|
+
font-weight: var(--vkui--font_text--font_weight--regular);
|
|
13
|
+
font-size: var(--vkui--font_text--font_size--regular);
|
|
14
|
+
line-height: var(--vkui--font_text--line_height--regular);
|
|
14
15
|
color: var(--text_primary, var(--vkui--color_text_primary));
|
|
15
16
|
padding: 12px;
|
|
16
17
|
max-height: 204px;
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
|
|
27
28
|
/* TODO. v5.0.0 Новая адаптивность */
|
|
28
29
|
.Textarea--sizeY-compact .Textarea__el {
|
|
29
|
-
font-size:
|
|
30
|
+
font-size: var(--vkui--font_text--font_size--compact);
|
|
31
|
+
line-height: var(--vkui--font_text--line_height--compact);
|
|
30
32
|
max-height: 196px;
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -24,10 +24,10 @@ interface Config {
|
|
|
24
24
|
export function withAdaptivity<T extends AdaptivityProps>(
|
|
25
25
|
TargetComponent: React.ComponentType<T>,
|
|
26
26
|
config: Config
|
|
27
|
-
): React.
|
|
28
|
-
const AdaptivityConsumer
|
|
29
|
-
Omit<T, keyof AdaptivityContextInterface> & SizeProps
|
|
30
|
-
|
|
27
|
+
): React.FC<Omit<T, keyof AdaptivityContextInterface> & SizeProps> {
|
|
28
|
+
const AdaptivityConsumer = (
|
|
29
|
+
props: Omit<T, keyof AdaptivityContextInterface> & SizeProps
|
|
30
|
+
) => {
|
|
31
31
|
const context = React.useContext(AdaptivityContext);
|
|
32
32
|
let update = false;
|
|
33
33
|
|
package/src/hoc/withContext.tsx
CHANGED
package/src/hoc/withPlatform.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { ConfigProviderContext } from "../components/ConfigProvider/ConfigProvid
|
|
|
5
5
|
|
|
6
6
|
export function withPlatform<T extends HasPlatform>(
|
|
7
7
|
Component: React.ComponentType<T>
|
|
8
|
-
): React.
|
|
8
|
+
): React.FC<Omit<T, keyof HasPlatform>> {
|
|
9
9
|
function WithPlatform(props: Omit<T, keyof HasPlatform>) {
|
|
10
10
|
const ssrContext = React.useContext(SSRContext);
|
|
11
11
|
const { platform } = React.useContext(ConfigProviderContext);
|