@jobber/components-native 0.61.1 → 0.62.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/dist/package.json +4 -4
- package/dist/src/InputFieldWrapper/InputFieldWrapper.js +18 -17
- package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +4 -0
- package/package.json +4 -4
- package/src/Icon/__snapshots__/Icon.test.tsx.snap +89 -24
- package/src/InputFieldWrapper/InputFieldWrapper.style.ts +5 -0
- package/src/InputFieldWrapper/InputFieldWrapper.tsx +66 -64
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"react-native-modalize": "^2.0.13",
|
|
50
50
|
"react-native-portalize": "^1.0.7",
|
|
51
51
|
"react-native-safe-area-context": "^4.5.2",
|
|
52
|
-
"react-native-svg": "^13.9.0",
|
|
53
52
|
"react-native-toast-message": "^2.1.6",
|
|
54
53
|
"react-native-uuid": "^1.4.9",
|
|
55
54
|
"ts-xor": "^1.1.0"
|
|
@@ -82,7 +81,8 @@
|
|
|
82
81
|
"react-native-modalize": "^2.0.13",
|
|
83
82
|
"react-native-portalize": "^1.0.7",
|
|
84
83
|
"react-native-reanimated": "^2.0.0 || ^3.0.0",
|
|
85
|
-
"react-native-safe-area-context": "^4.5.2"
|
|
84
|
+
"react-native-safe-area-context": "^4.5.2",
|
|
85
|
+
"react-native-svg": ">=12.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "5e72890d4aa748b0dfbb3710fa99bfbda6695db7"
|
|
88
88
|
}
|
|
@@ -23,23 +23,24 @@ export function InputFieldWrapper({ invalid, disabled, placeholder, assistiveTex
|
|
|
23
23
|
disabled && styles.disabled,
|
|
24
24
|
styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.container,
|
|
25
25
|
] },
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
React.createElement(View, { style: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
showClearAction
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
React.createElement(View, { style: styles.field },
|
|
27
|
+
(prefix === null || prefix === void 0 ? void 0 : prefix.icon) && (React.createElement(PrefixIcon, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, icon: prefix.icon })),
|
|
28
|
+
React.createElement(View, { style: [styles.inputContainer] },
|
|
29
|
+
React.createElement(View, { style: [
|
|
30
|
+
!!placeholder && styles.label,
|
|
31
|
+
hasMiniLabel && styles.miniLabel,
|
|
32
|
+
disabled && styles.disabled,
|
|
33
|
+
hasMiniLabel &&
|
|
34
|
+
showClearAction &&
|
|
35
|
+
styles.miniLabelShowClearAction,
|
|
36
|
+
], pointerEvents: "none" },
|
|
37
|
+
React.createElement(Placeholder, { placeholder: placeholder, labelVariation: getLabelVariation(error, invalid, disabled), hasMiniLabel: hasMiniLabel, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.placeholderText })),
|
|
38
|
+
(prefix === null || prefix === void 0 ? void 0 : prefix.label) && hasValue && (React.createElement(PrefixLabel, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, label: prefix.label, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.prefixLabel })),
|
|
39
|
+
children,
|
|
40
|
+
(showClearAction || (suffix === null || suffix === void 0 ? void 0 : suffix.label) || (suffix === null || suffix === void 0 ? void 0 : suffix.icon)) && (React.createElement(View, { style: styles.inputEndContainer },
|
|
41
|
+
showClearAction && (React.createElement(ClearAction, { hasMarginRight: !!(suffix === null || suffix === void 0 ? void 0 : suffix.icon) || !!(suffix === null || suffix === void 0 ? void 0 : suffix.label), onPress: handleClear })),
|
|
42
|
+
(suffix === null || suffix === void 0 ? void 0 : suffix.label) && hasValue && (React.createElement(SuffixLabel, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, label: suffix.label, hasLeftMargin: !showClearAction, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.suffixLabel })),
|
|
43
|
+
(suffix === null || suffix === void 0 ? void 0 : suffix.icon) && (React.createElement(SuffixIcon, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, hasLeftMargin: !!(!showClearAction || (suffix === null || suffix === void 0 ? void 0 : suffix.label)), inputInvalid: inputInvalid, icon: suffix.icon, onPress: suffix.onPress })))))),
|
|
43
44
|
isToolbarVisible && React.createElement(View, { style: styles.toolbar }, toolbar)),
|
|
44
45
|
assistiveText && !error && !invalid && (React.createElement(Text, { level: "textSupporting", variation: disabled ? "disabled" : focused ? "interactive" : "subdued" }, assistiveText))));
|
|
45
46
|
}
|