@hero-design/rn 8.103.4 → 8.103.6
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 +4 -4
- package/CHANGELOG.md +19 -0
- package/es/index.js +53 -19
- package/lib/index.js +53 -19
- package/package.json +1 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -0
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/PinInput/index.tsx +1 -1
- package/src/components/RichTextEditor/RichTextEditor.tsx +6 -2
- package/src/components/RichTextEditor/StyledRichTextEditor.ts +1 -4
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +4 -2
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +8 -5
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +7 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +53 -0
- package/src/components/Select/MultiSelect/index.tsx +18 -8
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +50 -0
- package/src/components/Select/SingleSelect/index.tsx +19 -8
- package/src/components/Select/StyledSelect.tsx +25 -2
- package/src/components/Select/index.tsx +8 -2
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +14 -0
- package/src/components/TextInput/index.tsx +35 -5
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +2 -0
- 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 +4842 -0
- package/stats/8.103.6/rn-stats.html +4844 -0
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -2
- package/types/components/Select/MultiSelect/index.d.ts +2 -1
- package/types/components/Select/SingleSelect/index.d.ts +2 -1
- package/types/components/Select/StyledSelect.d.ts +8 -1
- package/types/components/Select/index.d.ts +2 -2
- package/types/components/Select/index.internal.d.ts +1 -1
- 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
|
@@ -9,8 +9,6 @@ export declare const StyledWrapper: import("@emotion/native").StyledComponent<im
|
|
|
9
9
|
export declare const StyledWebView: import("@emotion/native").StyledComponent<import("react-native-webview/lib/WebViewTypes").IOSWebViewProps & import("react-native-webview/lib/WebViewTypes").AndroidWebViewProps & import("react-native-webview/lib/WebViewTypes").WindowsWebViewProps & {
|
|
10
10
|
theme?: import("@emotion/react").Theme;
|
|
11
11
|
as?: React.ElementType;
|
|
12
|
-
} & {
|
|
13
|
-
height: number | undefined;
|
|
14
12
|
}, {}, {
|
|
15
13
|
ref?: import("react").Ref<WebView<unknown>> | undefined;
|
|
16
14
|
}>;
|
|
@@ -29,6 +29,7 @@ export interface MultiSelectProps<V, T extends SelectOptionType<V> = SelectOptio
|
|
|
29
29
|
}
|
|
30
30
|
export interface InternalMultiSelectProps<V, T extends SelectOptionType<V> = SelectOptionType<V>> extends MultiSelectProps<V, T> {
|
|
31
31
|
TextInputComponent?: React.ComponentType<TextInputProps>;
|
|
32
|
+
groupStyleEnabled?: boolean;
|
|
32
33
|
}
|
|
33
|
-
declare function MultiSelect<V, T extends SelectOptionType<V>>({ footerLabel, label, loading, inputProps, onConfirm, onDismiss, onEndReached, onQueryChange, options, renderOption, renderSelectedValue, query, error, editable, disabled, required, style, testID, value, supportedOrientations, bottomSheetConfig, ...rest }: InternalMultiSelectProps<V, T>): React.JSX.Element;
|
|
34
|
+
declare function MultiSelect<V, T extends SelectOptionType<V>>({ footerLabel, label, loading, inputProps, onConfirm, onDismiss, onEndReached, onQueryChange, options, renderOption, renderSelectedValue, query, error, editable, disabled, required, style, testID, value, supportedOrientations, bottomSheetConfig, groupStyleEnabled, ...rest }: InternalMultiSelectProps<V, T>): React.JSX.Element;
|
|
34
35
|
export default MultiSelect;
|
|
@@ -22,6 +22,7 @@ export interface SingleSelectProps<V, T extends SelectOptionType<V> = SelectOpti
|
|
|
22
22
|
}
|
|
23
23
|
export interface InternalSingleSelectProps<V, T extends SelectOptionType<V> = SelectOptionType<V>> extends SingleSelectProps<V, T> {
|
|
24
24
|
TextInputComponent?: React.ComponentType<TextInputProps>;
|
|
25
|
+
groupStyleEnabled?: boolean;
|
|
25
26
|
}
|
|
26
|
-
declare const SingleSelect: <V, T extends SelectOptionType<V>>({ label, loading, inputProps, onConfirm, onDismiss, onEndReached, onQueryChange, options, renderOption, renderSelectedValue, query, error, editable, disabled, required, style, testID, value, supportedOrientations, bottomSheetConfig, ...rest }: InternalSingleSelectProps<V, T>) => React.JSX.Element;
|
|
27
|
+
declare const SingleSelect: <V, T extends SelectOptionType<V>>({ label, loading, inputProps, onConfirm, onDismiss, onEndReached, onQueryChange, options, renderOption, renderSelectedValue, query, error, editable, disabled, required, style, testID, value, supportedOrientations, bottomSheetConfig, groupStyleEnabled, ...rest }: InternalSingleSelectProps<V, T>) => React.JSX.Element;
|
|
27
28
|
export default SingleSelect;
|
|
@@ -18,4 +18,11 @@ declare const StyledSearchBar: import("@emotion/native").StyledComponent<import(
|
|
|
18
18
|
ref?: import("react").Ref<View> | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
declare const StyledSectionList: typeof SectionList;
|
|
21
|
-
|
|
21
|
+
declare const StyledTouchableOpacity: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & import("react").RefAttributes<View> & {
|
|
22
|
+
theme?: import("@emotion/react").Theme;
|
|
23
|
+
as?: React.ElementType;
|
|
24
|
+
} & {
|
|
25
|
+
themeGroupStyleEnabled: boolean;
|
|
26
|
+
themeHasError: boolean;
|
|
27
|
+
}, {}, {}>;
|
|
28
|
+
export { SectionSpacer, OptionSpacer, StyledSearchBar, StyledSectionList, StyledTouchableOpacity, };
|
|
@@ -2,8 +2,8 @@ import type { MultiSelectProps } from './MultiSelect';
|
|
|
2
2
|
import type { SingleSelectProps } from './SingleSelect';
|
|
3
3
|
import { SelectOptionType } from './types';
|
|
4
4
|
export type { MultiSelectProps, SingleSelectProps };
|
|
5
|
-
type SingleSelectType = <V, T extends SelectOptionType<V> = SelectOptionType<V>>(props: Omit<SingleSelectProps<V, T>, 'TextInputComponent'>) => React.ReactElement;
|
|
6
|
-
type MultiSelectType = <V, T extends SelectOptionType<V> = SelectOptionType<V>>(props: Omit<MultiSelectProps<V, T>, 'TextInputComponent'>) => React.ReactElement;
|
|
5
|
+
type SingleSelectType = <V, T extends SelectOptionType<V> = SelectOptionType<V>>(props: Omit<SingleSelectProps<V, T>, 'TextInputComponent' | 'groupStyleEnabled'>) => React.ReactElement;
|
|
6
|
+
type MultiSelectType = <V, T extends SelectOptionType<V> = SelectOptionType<V>>(props: Omit<MultiSelectProps<V, T>, 'TextInputComponent' | 'groupStyleEnabled'>) => React.ReactElement;
|
|
7
7
|
declare const _default: SingleSelectType & {
|
|
8
8
|
Multi: MultiSelectType;
|
|
9
9
|
};
|
|
@@ -2,7 +2,7 @@ import MultiSelect from './MultiSelect';
|
|
|
2
2
|
import type { InternalMultiSelectProps } from './MultiSelect';
|
|
3
3
|
import type { InternalSingleSelectProps } from './SingleSelect';
|
|
4
4
|
export type { InternalMultiSelectProps as MultiSelectProps, InternalSingleSelectProps as SingleSelectProps, };
|
|
5
|
-
declare const _default: (<V, T extends import("./types").SelectOptionType<V>>({ label, loading, inputProps, onConfirm, onDismiss, onEndReached, onQueryChange, options, renderOption, renderSelectedValue, query, error, editable, disabled, required, style, testID, value, supportedOrientations, bottomSheetConfig, ...rest }: InternalSingleSelectProps<V, T>) => import("react").JSX.Element) & {
|
|
5
|
+
declare const _default: (<V, T extends import("./types").SelectOptionType<V>>({ label, loading, inputProps, onConfirm, onDismiss, onEndReached, onQueryChange, options, renderOption, renderSelectedValue, query, error, editable, disabled, required, style, testID, value, supportedOrientations, bottomSheetConfig, groupStyleEnabled, ...rest }: InternalSingleSelectProps<V, T>) => import("react").JSX.Element) & {
|
|
6
6
|
Multi: typeof MultiSelect;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
@@ -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, };
|