@jobber/components-native 0.61.1 → 0.61.2
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/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 +2 -2
- 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.61.
|
|
3
|
+
"version": "0.61.2",
|
|
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.0.0 || ^3.0.0",
|
|
85
85
|
"react-native-safe-area-context": "^4.5.2"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "74dc3bfee1d5b3d9838565dd29cd4056d04e5377"
|
|
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
|
}
|