@jobber/components-native 0.51.5 → 0.51.6-JOB-88274.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/dist/package.json +2 -2
- package/dist/src/InputDate/InputDate.js +1 -1
- package/dist/src/InputFieldWrapper/CommonInputStyles.style.js +3 -2
- package/dist/src/InputFieldWrapper/InputFieldWrapper.js +2 -5
- package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +2 -0
- package/dist/src/InputPressable/InputPressable.js +2 -2
- package/dist/src/InputSearch/InputSearch.style.js +0 -2
- package/dist/src/InputTime/InputTime.js +1 -1
- package/dist/src/Select/Select.js +1 -1
- package/dist/src/Select/Select.style.js +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/InputFieldWrapper/CommonInputStyles.style.d.ts +2 -1
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +4 -1
- package/dist/types/src/InputPressable/InputPressable.d.ts +5 -1
- package/dist/types/src/InputSearch/InputSearch.style.d.ts +0 -1
- package/dist/types/src/Select/Select.style.d.ts +5 -1
- package/package.json +2 -2
- package/src/InputDate/InputDate.tsx +1 -0
- package/src/InputFieldWrapper/CommonInputStyles.style.ts +3 -2
- package/src/InputFieldWrapper/InputFieldWrapper.style.ts +2 -0
- package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +1 -3
- package/src/InputFieldWrapper/InputFieldWrapper.tsx +1 -9
- package/src/InputPressable/InputPressable.tsx +7 -1
- package/src/InputSearch/InputSearch.style.ts +0 -2
- package/src/InputTime/InputTime.tsx +1 -0
- package/src/Select/Select.style.ts +3 -0
- package/src/Select/Select.tsx +1 -1
|
@@ -8,7 +8,8 @@ export declare const styles: {
|
|
|
8
8
|
width: string;
|
|
9
9
|
borderColor: string;
|
|
10
10
|
borderStyle: "solid";
|
|
11
|
-
|
|
11
|
+
borderWidth: number;
|
|
12
|
+
paddingLeft: number;
|
|
12
13
|
};
|
|
13
14
|
inputContainer: {
|
|
14
15
|
flexDirection: "row";
|
|
@@ -64,10 +65,12 @@ export declare const styles: {
|
|
|
64
65
|
};
|
|
65
66
|
suffixIcon: {
|
|
66
67
|
justifyContent: "center";
|
|
68
|
+
paddingRight: number;
|
|
67
69
|
};
|
|
68
70
|
suffixLabel: {
|
|
69
71
|
justifyContent: "center";
|
|
70
72
|
paddingTop: number;
|
|
73
|
+
paddingRight: number;
|
|
71
74
|
};
|
|
72
75
|
suffixIconMargin: {
|
|
73
76
|
marginLeft: number;
|
|
@@ -16,6 +16,10 @@ export interface InputPressableProps {
|
|
|
16
16
|
* Disables input selection
|
|
17
17
|
*/
|
|
18
18
|
readonly disabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Indicates if the input is focused
|
|
21
|
+
*/
|
|
22
|
+
readonly focused?: boolean;
|
|
19
23
|
/**
|
|
20
24
|
* Indicates if there is an validation error
|
|
21
25
|
*/
|
|
@@ -67,4 +71,4 @@ export interface InputPressableProps {
|
|
|
67
71
|
}
|
|
68
72
|
export type InputPressableRef = NativeText;
|
|
69
73
|
export declare const InputPressable: React.ForwardRefExoticComponent<InputPressableProps & React.RefAttributes<NativeText>>;
|
|
70
|
-
export declare function InputPressableInternal({ value, placeholder, disabled, invalid, error, onPress, accessibilityLabel, accessibilityHint, prefix, suffix, clearable, onClear, }: InputPressableProps, ref: Ref<InputPressableRef>): JSX.Element;
|
|
74
|
+
export declare function InputPressableInternal({ value, placeholder, disabled, invalid, error, onPress, accessibilityLabel, accessibilityHint, prefix, suffix, clearable, onClear, focused, }: InputPressableProps, ref: Ref<InputPressableRef>): JSX.Element;
|
|
@@ -8,11 +8,14 @@ export declare const styles: {
|
|
|
8
8
|
width: string;
|
|
9
9
|
borderColor: string;
|
|
10
10
|
borderStyle: "solid";
|
|
11
|
-
|
|
11
|
+
borderWidth: number;
|
|
12
|
+
paddingLeft: number;
|
|
12
13
|
} | {
|
|
13
14
|
flexDirection: "column";
|
|
14
15
|
justifyContent: "flex-end";
|
|
15
16
|
minHeight: number;
|
|
17
|
+
marginVertical: number;
|
|
18
|
+
borderWidth: number;
|
|
16
19
|
};
|
|
17
20
|
input: {
|
|
18
21
|
width: string;
|
|
@@ -30,6 +33,7 @@ export declare const styles: {
|
|
|
30
33
|
paddingBottom: number;
|
|
31
34
|
minHeight: number;
|
|
32
35
|
minWidth: string;
|
|
36
|
+
paddingRight: number;
|
|
33
37
|
};
|
|
34
38
|
value: {
|
|
35
39
|
flexGrow: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.6-JOB-88274.7+b7b85ba2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"react-native-reanimated": "^2.17.0",
|
|
85
85
|
"react-native-safe-area-context": "^4.5.2"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "b7b85ba202558ffdcb7ecad60cdd1104575e81d3"
|
|
88
88
|
}
|
|
@@ -30,8 +30,9 @@ export const commonInputStyles = StyleSheet.create({
|
|
|
30
30
|
flexDirection: "row",
|
|
31
31
|
justifyContent: "space-between",
|
|
32
32
|
width: "100%",
|
|
33
|
-
borderColor: tokens["color-
|
|
33
|
+
borderColor: tokens["color-border"],
|
|
34
34
|
borderStyle: "solid",
|
|
35
|
-
|
|
35
|
+
borderWidth: tokens["border-base"],
|
|
36
|
+
paddingLeft: tokens["space-base"],
|
|
36
37
|
},
|
|
37
38
|
});
|
|
@@ -74,11 +74,13 @@ export const styles = StyleSheet.create({
|
|
|
74
74
|
|
|
75
75
|
suffixIcon: {
|
|
76
76
|
justifyContent: "center",
|
|
77
|
+
paddingRight: tokens["space-small"],
|
|
77
78
|
},
|
|
78
79
|
|
|
79
80
|
suffixLabel: {
|
|
80
81
|
justifyContent: "center",
|
|
81
82
|
paddingTop: tokens["space-minuscule"],
|
|
83
|
+
paddingRight: tokens["space-small"],
|
|
82
84
|
},
|
|
83
85
|
suffixIconMargin: {
|
|
84
86
|
marginLeft: tokens["space-small"] + tokens["space-smaller"],
|
|
@@ -192,9 +192,7 @@ describe("InputFieldWrapper", () => {
|
|
|
192
192
|
includeHiddenElements: true,
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
-
expect(placeholder.props.style).toContainEqual(
|
|
196
|
-
typographyStyles.interactive,
|
|
197
|
-
);
|
|
195
|
+
expect(placeholder.props.style).toContainEqual(typographyStyles.subdued);
|
|
198
196
|
expect(placeholder.props.style).toContainEqual(
|
|
199
197
|
typographyStyles.defaultSize,
|
|
200
198
|
);
|
|
@@ -146,12 +146,7 @@ export function InputFieldWrapper({
|
|
|
146
146
|
>
|
|
147
147
|
<Placeholder
|
|
148
148
|
placeholder={placeholder}
|
|
149
|
-
labelVariation={getLabelVariation(
|
|
150
|
-
error,
|
|
151
|
-
invalid,
|
|
152
|
-
focused,
|
|
153
|
-
disabled,
|
|
154
|
-
)}
|
|
149
|
+
labelVariation={getLabelVariation(error, invalid, disabled)}
|
|
155
150
|
hasMiniLabel={hasMiniLabel}
|
|
156
151
|
styleOverride={styleOverride?.placeholderText}
|
|
157
152
|
/>
|
|
@@ -218,15 +213,12 @@ export function InputFieldWrapper({
|
|
|
218
213
|
function getLabelVariation(
|
|
219
214
|
error?: FieldError,
|
|
220
215
|
invalid?: boolean | string,
|
|
221
|
-
focused?: boolean,
|
|
222
216
|
disabled?: boolean,
|
|
223
217
|
): TextVariation {
|
|
224
218
|
if (invalid || error) {
|
|
225
219
|
return "error";
|
|
226
220
|
} else if (disabled) {
|
|
227
221
|
return "disabled";
|
|
228
|
-
} else if (focused) {
|
|
229
|
-
return "interactive";
|
|
230
222
|
}
|
|
231
223
|
|
|
232
224
|
return "subdued";
|
|
@@ -22,6 +22,11 @@ export interface InputPressableProps {
|
|
|
22
22
|
*/
|
|
23
23
|
readonly disabled?: boolean;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if the input is focused
|
|
27
|
+
*/
|
|
28
|
+
readonly focused?: boolean;
|
|
29
|
+
|
|
25
30
|
/**
|
|
26
31
|
* Indicates if there is an validation error
|
|
27
32
|
*/
|
|
@@ -95,6 +100,7 @@ export function InputPressableInternal(
|
|
|
95
100
|
suffix,
|
|
96
101
|
clearable = "never",
|
|
97
102
|
onClear,
|
|
103
|
+
focused,
|
|
98
104
|
}: InputPressableProps,
|
|
99
105
|
ref: Ref<InputPressableRef>,
|
|
100
106
|
): JSX.Element {
|
|
@@ -119,7 +125,7 @@ export function InputPressableInternal(
|
|
|
119
125
|
suffix={suffix}
|
|
120
126
|
hasValue={hasValue}
|
|
121
127
|
hasMiniLabel={hasMiniLabel}
|
|
122
|
-
focused={
|
|
128
|
+
focused={focused}
|
|
123
129
|
error={error}
|
|
124
130
|
invalid={invalid}
|
|
125
131
|
placeholder={placeholder}
|
|
@@ -9,6 +9,8 @@ export const styles = StyleSheet.create({
|
|
|
9
9
|
flexDirection: "column",
|
|
10
10
|
justifyContent: "flex-end",
|
|
11
11
|
minHeight: tokens["space-largest"] + tokens["border-base"],
|
|
12
|
+
marginVertical: 0,
|
|
13
|
+
borderWidth: 0,
|
|
12
14
|
},
|
|
13
15
|
]),
|
|
14
16
|
|
|
@@ -20,6 +22,7 @@ export const styles = StyleSheet.create({
|
|
|
20
22
|
paddingBottom: tokens["space-smaller"],
|
|
21
23
|
minHeight: 0,
|
|
22
24
|
minWidth: "100%",
|
|
25
|
+
paddingRight: tokens["space-small"],
|
|
23
26
|
},
|
|
24
27
|
]),
|
|
25
28
|
|
package/src/Select/Select.tsx
CHANGED