@hero-design/rn 8.103.4 → 8.103.5
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/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +9 -0
- package/es/index.js +2 -2
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/PinInput/index.tsx +1 -1
- package/src/components/TextInput/index.tsx +29 -4
- package/src/index.internal.ts +6 -1
- package/src/types.internal.ts +2 -3
- package/stats/8.103.4/rn-stats.html +0 -2
- package/stats/8.103.5/rn-stats.html +4844 -0
- package/types/components/TextInput/index.d.ts +14 -3
- package/types/index.internal.d.ts +1 -1
- package/types/types.internal.d.ts +2 -2
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextInput as RNTextInput } from 'react-native';
|
|
3
|
-
import type { TextInputProps as
|
|
3
|
+
import type { TextInputProps as RNTextInputProps, StyleProp, ViewStyle, TextStyle, NativeSyntheticEvent, TextInputFocusEventData } from 'react-native';
|
|
4
4
|
import { Theme } from '../../theme';
|
|
5
5
|
import type { State } from './StyledTextInput';
|
|
6
6
|
import type { IconName } from '../Icon';
|
|
7
7
|
export type TextInputHandles = Pick<RNTextInput, 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'>;
|
|
8
8
|
export type TextInputVariant = 'text' | 'textarea';
|
|
9
|
+
type NativeTextInputProps = Omit<RNTextInputProps, 'onFocus' | 'onBlur'> & {
|
|
10
|
+
onFocus?: (event?: NativeSyntheticEvent<TextInputFocusEventData>) => void | undefined;
|
|
11
|
+
onBlur?: (event?: NativeSyntheticEvent<TextInputFocusEventData>) => void | undefined;
|
|
12
|
+
};
|
|
13
|
+
export interface TextInputRef {
|
|
14
|
+
focus: () => void;
|
|
15
|
+
blur: () => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
isFocused: () => boolean;
|
|
18
|
+
setNativeProps?: (props: RNTextInputProps) => void;
|
|
19
|
+
}
|
|
9
20
|
export interface TextInputProps extends NativeTextInputProps {
|
|
10
21
|
/**
|
|
11
22
|
* Field label.
|
|
@@ -75,7 +86,7 @@ export interface TextInputProps extends NativeTextInputProps {
|
|
|
75
86
|
/**
|
|
76
87
|
* Customise input value renderer
|
|
77
88
|
*/
|
|
78
|
-
renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
|
|
89
|
+
renderInputValue?: (inputProps: NativeTextInputProps, ref?: React.ForwardedRef<TextInputRef>) => React.ReactNode;
|
|
79
90
|
/**
|
|
80
91
|
* Component ref.
|
|
81
92
|
*/
|
|
@@ -102,7 +113,7 @@ export declare const renderInput: ({ variant, nativeInputProps, renderInputValue
|
|
|
102
113
|
variant: TextInputVariant;
|
|
103
114
|
nativeInputProps: NativeTextInputProps;
|
|
104
115
|
multiline?: boolean;
|
|
105
|
-
renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
|
|
116
|
+
renderInputValue?: (inputProps: NativeTextInputProps, ref?: React.Ref<TextInputRef>) => React.ReactNode;
|
|
106
117
|
ref?: React.Ref<RNTextInput>;
|
|
107
118
|
theme: Theme;
|
|
108
119
|
}) => string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
@@ -2,5 +2,5 @@ import Select from './components/Select/index.internal';
|
|
|
2
2
|
import DatePicker from './components/DatePicker/index.internal';
|
|
3
3
|
import TimePicker from './components/TimePicker/index.internal';
|
|
4
4
|
export * from '.';
|
|
5
|
+
export type { MultiSelectProps, SingleSelectProps, DatePickerProps, TimePickerProps, } from './types.internal';
|
|
5
6
|
export { Select, DatePicker, TimePicker };
|
|
6
|
-
export type { MultiSelectProps, SingleSelectProps } from './types.internal';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { DatePickerProps } from './components/DatePicker/index.internal';
|
|
1
2
|
import type { SingleSelectProps, MultiSelectProps } from './components/Select/index.internal';
|
|
2
|
-
import
|
|
3
|
-
import type { TimePickerProps } from './components/TimePicker/index.internal';
|
|
3
|
+
import { TimePickerProps } from './components/TimePicker/index.internal';
|
|
4
4
|
export * from './types';
|
|
5
5
|
export { SingleSelectProps, MultiSelectProps, DatePickerProps, TimePickerProps, };
|