@jobber/components-native 0.75.3-TAYLORtes-c9be7a8.250 → 0.75.3
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.
|
@@ -3,6 +3,16 @@ import { IconNames } from "@jobber/design";
|
|
|
3
3
|
import { FieldError } from "react-hook-form";
|
|
4
4
|
import { Text as NativeText } from "react-native";
|
|
5
5
|
import { Clearable } from "@jobber/hooks";
|
|
6
|
+
import { XOR } from "ts-xor";
|
|
7
|
+
interface BasicSuffix {
|
|
8
|
+
icon?: IconNames;
|
|
9
|
+
label?: string;
|
|
10
|
+
}
|
|
11
|
+
interface InteractiveSuffix {
|
|
12
|
+
icon: IconNames;
|
|
13
|
+
label?: string;
|
|
14
|
+
onPress: () => void;
|
|
15
|
+
}
|
|
6
16
|
export interface InputPressableProps {
|
|
7
17
|
/**
|
|
8
18
|
* Current value of the component
|
|
@@ -51,10 +61,7 @@ export interface InputPressableProps {
|
|
|
51
61
|
/**
|
|
52
62
|
* Symbol to display after the text input
|
|
53
63
|
*/
|
|
54
|
-
readonly suffix?:
|
|
55
|
-
icon?: IconNames;
|
|
56
|
-
label?: string;
|
|
57
|
-
};
|
|
64
|
+
readonly suffix?: XOR<BasicSuffix, InteractiveSuffix>;
|
|
58
65
|
/**
|
|
59
66
|
* Add a clear action on the input that clears the value.
|
|
60
67
|
*
|
|
@@ -72,3 +79,4 @@ export interface InputPressableProps {
|
|
|
72
79
|
export type InputPressableRef = NativeText;
|
|
73
80
|
export declare const InputPressable: React.ForwardRefExoticComponent<InputPressableProps & React.RefAttributes<NativeText>>;
|
|
74
81
|
export declare function InputPressableInternal({ value, placeholder, disabled, invalid, error, onPress, accessibilityLabel, accessibilityHint, prefix, suffix, clearable, onClear, focused, }: InputPressableProps, ref: Ref<InputPressableRef>): JSX.Element;
|
|
82
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.75.3
|
|
3
|
+
"version": "0.75.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"react-native-safe-area-context": "^4.5.2",
|
|
80
80
|
"react-native-svg": ">=12.0.0"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "261d4df02a5c154653dc95cde174d2da08defffb"
|
|
83
83
|
}
|
|
@@ -3,9 +3,21 @@ import { IconNames } from "@jobber/design";
|
|
|
3
3
|
import { FieldError } from "react-hook-form";
|
|
4
4
|
import { Text as NativeText, Pressable } from "react-native";
|
|
5
5
|
import { Clearable, useShowClear } from "@jobber/hooks";
|
|
6
|
+
import { XOR } from "ts-xor";
|
|
6
7
|
import { styles } from "./InputPressable.style";
|
|
7
8
|
import { InputFieldWrapper, commonInputStyles } from "../InputFieldWrapper";
|
|
8
9
|
|
|
10
|
+
interface BasicSuffix {
|
|
11
|
+
icon?: IconNames;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface InteractiveSuffix {
|
|
16
|
+
icon: IconNames;
|
|
17
|
+
label?: string;
|
|
18
|
+
onPress: () => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
9
21
|
export interface InputPressableProps {
|
|
10
22
|
/**
|
|
11
23
|
* Current value of the component
|
|
@@ -64,10 +76,8 @@ export interface InputPressableProps {
|
|
|
64
76
|
/**
|
|
65
77
|
* Symbol to display after the text input
|
|
66
78
|
*/
|
|
67
|
-
readonly suffix?:
|
|
68
|
-
|
|
69
|
-
label?: string;
|
|
70
|
-
};
|
|
79
|
+
readonly suffix?: XOR<BasicSuffix, InteractiveSuffix>;
|
|
80
|
+
|
|
71
81
|
/**
|
|
72
82
|
* Add a clear action on the input that clears the value.
|
|
73
83
|
*
|