@cdek-it/react-native-ui-kit 0.2.5 → 0.2.7
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/README.md
CHANGED
|
@@ -4,9 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
+
**Yarn**
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
yarn add \
|
|
11
|
+
react \
|
|
12
|
+
react-native \
|
|
13
|
+
@tabler/icons-react-native \
|
|
14
|
+
react-native-svg \
|
|
15
|
+
react-native-reanimated
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
yarn add @cdek-it/react-native-ui-kit
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**npm**
|
|
23
|
+
|
|
7
24
|
```shell
|
|
8
|
-
|
|
9
|
-
|
|
25
|
+
npm i \
|
|
26
|
+
react \
|
|
27
|
+
react-native \
|
|
28
|
+
@tabler/icons-react-native \
|
|
29
|
+
react-native-svg \
|
|
30
|
+
react-native-reanimated
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```shell
|
|
34
|
+
npm i @cdek-it/react-native-ui-kit
|
|
10
35
|
```
|
|
11
36
|
|
|
12
37
|
## Шрифты
|
|
@@ -137,15 +162,3 @@ UI kit использует следующие виды шрифтов.
|
|
|
137
162
|
- @tabler/icons-react-native - начиная с 3 major версии(от 3.0.0)
|
|
138
163
|
- react-native-svg - начиная с 15 major версии(от 15.0.0)
|
|
139
164
|
- react-native-reanimated - начиная с 3 major версии(от 3.0.0)
|
|
140
|
-
|
|
141
|
-
## Development
|
|
142
|
-
|
|
143
|
-
`yarn install` - установка зависимостей `yarn start` - запуск Metro Bundler для
|
|
144
|
-
Storybook `yarn ios` - запуск Storybook на iOS `yarn android` - запуск Storybook
|
|
145
|
-
на Android
|
|
146
|
-
|
|
147
|
-
Storybook проект создан с помощью Expo
|
|
148
|
-
|
|
149
|
-
### Макеты
|
|
150
|
-
|
|
151
|
-
[https://developer.cdek.ru/design-system](https://developer.cdek.ru/design-system)
|
|
@@ -109,10 +109,9 @@ export const InputTextBase = memo(
|
|
|
109
109
|
|
|
110
110
|
{input}
|
|
111
111
|
</>) : (<View style={styles.inputContainer}>
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
<Text style={[
|
|
112
|
+
<Text pointerEvents='none' style={[
|
|
115
113
|
styles.inputFont,
|
|
114
|
+
styles.placeholder,
|
|
116
115
|
styles.placeholderTextColor,
|
|
117
116
|
otherProps.placeholderTextColor && {
|
|
118
117
|
color: otherProps.placeholderTextColor,
|
|
@@ -121,6 +120,8 @@ export const InputTextBase = memo(
|
|
|
121
120
|
]} testID={makeTestId(InputTextBaseTestId.placeholder)}>
|
|
122
121
|
{placeholder}
|
|
123
122
|
</Text>
|
|
123
|
+
|
|
124
|
+
{input}
|
|
124
125
|
</View>)}
|
|
125
126
|
|
|
126
127
|
<View style={styles.rightContainer}>
|
|
@@ -6,7 +6,6 @@ export declare const useStyles: () => {
|
|
|
6
6
|
borderRadius: number;
|
|
7
7
|
borderColor: string;
|
|
8
8
|
backgroundColor: string;
|
|
9
|
-
alignItems: "center";
|
|
10
9
|
};
|
|
11
10
|
containerFocused: {
|
|
12
11
|
outlineColor: string;
|
|
@@ -16,7 +15,6 @@ export declare const useStyles: () => {
|
|
|
16
15
|
minHeight: number;
|
|
17
16
|
maxHeight: number;
|
|
18
17
|
height: number;
|
|
19
|
-
alignItems: "stretch";
|
|
20
18
|
};
|
|
21
19
|
danger: {
|
|
22
20
|
borderColor: string;
|
|
@@ -31,15 +29,17 @@ export declare const useStyles: () => {
|
|
|
31
29
|
};
|
|
32
30
|
inputContainer: {
|
|
33
31
|
flex: number;
|
|
34
|
-
marginHorizontal: number;
|
|
35
32
|
paddingLeft: number;
|
|
36
33
|
justifyContent: "center";
|
|
37
34
|
};
|
|
38
35
|
input: {
|
|
39
36
|
padding: number;
|
|
37
|
+
paddingHorizontal: number;
|
|
40
38
|
position: "absolute";
|
|
41
39
|
left: number;
|
|
42
40
|
right: number;
|
|
41
|
+
top: number;
|
|
42
|
+
bottom: number;
|
|
43
43
|
};
|
|
44
44
|
floatLabelInput: {
|
|
45
45
|
flex: number;
|
|
@@ -56,6 +56,9 @@ export declare const useStyles: () => {
|
|
|
56
56
|
fontFamily: string;
|
|
57
57
|
verticalAlign: "middle";
|
|
58
58
|
};
|
|
59
|
+
placeholder: {
|
|
60
|
+
paddingHorizontal: number;
|
|
61
|
+
};
|
|
59
62
|
placeholderTextColor: {
|
|
60
63
|
color: string;
|
|
61
64
|
};
|
|
@@ -7,7 +7,6 @@ export const useStyles = makeStyles(({ theme, border, typography, spacing, fonts
|
|
|
7
7
|
borderRadius: border.Radius['rounded-xl'],
|
|
8
8
|
borderColor: theme.Form.InputText.inputBorderColor,
|
|
9
9
|
backgroundColor: theme.Form.InputText.inputBg,
|
|
10
|
-
alignItems: 'center',
|
|
11
10
|
},
|
|
12
11
|
containerFocused: {
|
|
13
12
|
outlineColor: theme.General.focusOutlineColor,
|
|
@@ -17,7 +16,6 @@ export const useStyles = makeStyles(({ theme, border, typography, spacing, fonts
|
|
|
17
16
|
minHeight: theme.Button.Common.buttonHeightXL,
|
|
18
17
|
maxHeight: theme.Button.Common.buttonHeightXL,
|
|
19
18
|
height: theme.Button.Common.buttonHeightXL,
|
|
20
|
-
alignItems: 'stretch',
|
|
21
19
|
},
|
|
22
20
|
danger: { borderColor: theme.Form.InputText.inputErrorBorderColor },
|
|
23
21
|
dangerFocused: { outlineColor: theme.General.focusOutlineErrorColor },
|
|
@@ -28,11 +26,18 @@ export const useStyles = makeStyles(({ theme, border, typography, spacing, fonts
|
|
|
28
26
|
},
|
|
29
27
|
inputContainer: {
|
|
30
28
|
flex: 1,
|
|
31
|
-
marginHorizontal: theme.Form.InputText.inputPaddingLeftRight,
|
|
32
29
|
paddingLeft: 2, // отступ для курсора
|
|
33
30
|
justifyContent: 'center',
|
|
34
31
|
},
|
|
35
|
-
input: {
|
|
32
|
+
input: {
|
|
33
|
+
padding: 0,
|
|
34
|
+
paddingHorizontal: theme.Form.InputText.inputPaddingLeftRight,
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
left: 0,
|
|
37
|
+
right: 0,
|
|
38
|
+
top: 0,
|
|
39
|
+
bottom: 0,
|
|
40
|
+
},
|
|
36
41
|
floatLabelInput: {
|
|
37
42
|
flex: 1,
|
|
38
43
|
paddingHorizontal: theme.Form.InputText.inputPaddingLeftRight,
|
|
@@ -48,6 +53,9 @@ export const useStyles = makeStyles(({ theme, border, typography, spacing, fonts
|
|
|
48
53
|
fontFamily: fonts.secondary,
|
|
49
54
|
verticalAlign: 'middle',
|
|
50
55
|
},
|
|
56
|
+
placeholder: {
|
|
57
|
+
paddingHorizontal: theme.Form.InputText.inputPaddingLeftRight,
|
|
58
|
+
},
|
|
51
59
|
placeholderTextColor: {
|
|
52
60
|
color: theme.Form.InputText.inputPlaceholderTextColor,
|
|
53
61
|
},
|
package/package.json
CHANGED