@artsy/palette-mobile 17.14.0 → 17.16.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.
@@ -11,11 +11,6 @@ export interface InputProps extends Omit<TextInputProps, "placeholder" | "onChan
11
11
  * These lead to some issues when the parent component wants further control of the value
12
12
  */
13
13
  disabled?: boolean;
14
- /**
15
- * Enables the clear button
16
- * @warning This prop only works if `value` is specified
17
- */
18
- enableClearButton?: boolean;
19
14
  error?: string;
20
15
  fixedRightPlaceholder?: string;
21
16
  hintText?: string;
@@ -72,6 +67,19 @@ export interface InputProps extends Omit<TextInputProps, "placeholder" | "onChan
72
67
  */
73
68
  value?: string | undefined;
74
69
  }
70
+ type InputPropsWithSecureText = InputProps & {
71
+ secureTextEntry: true;
72
+ enableClearButton?: never;
73
+ };
74
+ type InputPropsWithClearButton = InputProps & {
75
+ enableClearButton: true;
76
+ secureTextEntry?: never;
77
+ };
78
+ type InputPropsWithNeither = InputProps & {
79
+ enableClearButton?: boolean;
80
+ secureTextEntry?: boolean;
81
+ };
82
+ export type InputComponentProps = InputPropsWithSecureText | InputPropsWithClearButton | InputPropsWithNeither;
75
83
  export declare const HORIZONTAL_PADDING = 15;
76
84
  export declare const INPUT_BORDER_RADIUS = 4;
77
85
  export declare const INPUT_MIN_HEIGHT = 56;
@@ -85,5 +93,6 @@ export interface InputRef {
85
93
  blur: () => void;
86
94
  clear: () => void;
87
95
  }
88
- export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<InputRef>>;
96
+ export declare const Input: import("react").ForwardRefExoticComponent<InputComponentProps & import("react").RefAttributes<InputRef>>;
89
97
  export type Input = TextInput;
98
+ export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { InputProps } from "../Input";
2
+ import { type InputProps } from "../Input";
3
3
  export interface SearchInputProps extends InputProps {
4
4
  enableCancelButton?: boolean;
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "17.14.0",
3
+ "version": "17.16.0",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "RCT_METRO_PORT=8082 react-native run-android --port 8082 --terminal terminal",
@@ -130,7 +130,7 @@
130
130
  "react-native-haptic-feedback": "1.14.0",
131
131
  "react-native-linear-gradient": "2.6.2",
132
132
  "react-native-reanimated": "^3.16.7",
133
- "react-native-safe-area-context": "4.11.1",
133
+ "react-native-safe-area-context": "5.4.1",
134
134
  "react-native-svg": "15.10.1",
135
135
  "react-test-renderer": "18.3.1",
136
136
  "rimraf": "4.1.2",