@hero-design/rn 8.103.5 → 8.103.7
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 +16 -0
- package/es/index.js +174 -73
- package/lib/index.js +174 -73
- package/package.json +1 -1
- package/src/components/DatePicker/DatePickerAndroid.tsx +18 -4
- package/src/components/DatePicker/DatePickerCalendar.tsx +18 -4
- package/src/components/DatePicker/DatePickerIOS.tsx +18 -4
- package/src/components/DatePicker/StyledDatePicker.tsx +19 -2
- package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +102 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +6 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +2 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +2 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +4 -0
- package/src/components/DatePicker/types.ts +11 -0
- 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 +6 -1
- package/src/components/TimePicker/StyledTimePicker.tsx +19 -2
- package/src/components/TimePicker/TimePickerAndroid.tsx +18 -4
- package/src/components/TimePicker/TimePickerIOS.tsx +21 -5
- package/src/components/TimePicker/__tests__/TimePicker.spec.tsx +72 -1
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +4 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +4 -0
- package/src/components/TimePicker/types.ts +11 -0
- package/stats/8.103.5/rn-stats.html +0 -2
- package/stats/8.103.6/rn-stats.html +4842 -0
- package/stats/8.103.7/rn-stats.html +4844 -0
- package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
- package/types/components/DatePicker/DatePickerCalendar.d.ts +1 -1
- package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
- package/types/components/DatePicker/StyledDatePicker.d.ts +8 -1
- package/types/components/DatePicker/types.d.ts +11 -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/TimePicker/StyledTimePicker.d.ts +8 -1
- package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
- package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
- package/types/components/TimePicker/types.d.ts +11 -0
|
@@ -3,5 +3,5 @@ import type { InternalDatePickerProps } from './types';
|
|
|
3
3
|
type DatePickerAndroidProps = Omit<InternalDatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'> & {
|
|
4
4
|
variant?: 'default' | 'month-year';
|
|
5
5
|
};
|
|
6
|
-
declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, variant, renderSelectedValue, locale, TextInputComponent, }: DatePickerAndroidProps) => React.JSX.Element;
|
|
6
|
+
declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, variant, renderSelectedValue, locale, TextInputComponent, inputProps, groupStyleEnabled, }: DatePickerAndroidProps) => React.JSX.Element;
|
|
7
7
|
export default DatePickerAndroid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InternalDatePickerProps } from './types';
|
|
3
|
-
declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, supportedOrientations, renderSelectedValue, locale, TextInputComponent, }: Omit<InternalDatePickerProps, "variant">) => React.JSX.Element;
|
|
3
|
+
declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, supportedOrientations, renderSelectedValue, locale, TextInputComponent, inputProps, groupStyleEnabled, }: Omit<InternalDatePickerProps, "variant">) => React.JSX.Element;
|
|
4
4
|
export default DatePickerCalendar;
|
|
@@ -3,5 +3,5 @@ import type { InternalDatePickerProps } from './types';
|
|
|
3
3
|
type DatePickerIOSProps = Omit<InternalDatePickerProps, 'variant' | 'monthPickerConfirmLabel' | 'monthPickerCancelLabel'> & {
|
|
4
4
|
variant?: 'default' | 'month-year';
|
|
5
5
|
};
|
|
6
|
-
declare const DatePickerIOS: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, supportedOrientations, variant, locale, renderSelectedValue, TextInputComponent, }: DatePickerIOSProps) => React.JSX.Element;
|
|
6
|
+
declare const DatePickerIOS: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, supportedOrientations, variant, locale, renderSelectedValue, TextInputComponent, inputProps, groupStyleEnabled, }: DatePickerIOSProps) => React.JSX.Element;
|
|
7
7
|
export default DatePickerIOS;
|
|
@@ -6,4 +6,11 @@ declare const StyledPickerWrapper: import("@emotion/native").StyledComponent<Vie
|
|
|
6
6
|
}, {}, {
|
|
7
7
|
ref?: import("react").Ref<View> | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
|
|
9
|
+
declare const StyledTouchableOpacity: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & import("react").RefAttributes<View> & {
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
} & {
|
|
13
|
+
themeGroupStyleEnabled: boolean;
|
|
14
|
+
themeHasError: boolean;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export { StyledPickerWrapper, StyledTouchableOpacity };
|
|
@@ -94,5 +94,16 @@ export interface DatePickerProps {
|
|
|
94
94
|
}, props?: NativeTextInputProps) => React.ReactNode;
|
|
95
95
|
}
|
|
96
96
|
export interface InternalDatePickerProps extends DatePickerProps {
|
|
97
|
+
/**
|
|
98
|
+
* Props that are passed to TextInput.
|
|
99
|
+
*/
|
|
100
|
+
inputProps?: Pick<TextInputProps, 'loading' | 'numberOfLines'>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the component is used within a FormGroup for styling purposes.
|
|
103
|
+
*/
|
|
104
|
+
groupStyleEnabled?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Input component to use instead of the default TextInput.
|
|
107
|
+
*/
|
|
97
108
|
TextInputComponent?: React.ComponentType<TextInputProps>;
|
|
98
109
|
}
|
|
@@ -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;
|
|
@@ -6,4 +6,11 @@ declare const StyledPickerWrapper: import("@emotion/native").StyledComponent<Vie
|
|
|
6
6
|
}, {}, {
|
|
7
7
|
ref?: import("react").Ref<View> | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
|
|
9
|
+
declare const StyledTouchableOpacity: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & import("react").RefAttributes<View> & {
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: React.ElementType;
|
|
12
|
+
} & {
|
|
13
|
+
themeGroupStyleEnabled: boolean;
|
|
14
|
+
themeHasError: boolean;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export { StyledPickerWrapper, StyledTouchableOpacity };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InternalTimePickerProps } from './types';
|
|
3
|
-
declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, TextInputComponent, }: InternalTimePickerProps) => React.JSX.Element;
|
|
3
|
+
declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, TextInputComponent, inputProps, groupStyleEnabled, }: InternalTimePickerProps) => React.JSX.Element;
|
|
4
4
|
export default TimePickerAndroid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { InternalTimePickerProps } from './types';
|
|
3
|
-
declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, supportedOrientations, TextInputComponent, }: InternalTimePickerProps) => React.JSX.Element;
|
|
3
|
+
declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, supportedOrientations, TextInputComponent, inputProps, groupStyleEnabled, }: InternalTimePickerProps) => React.JSX.Element;
|
|
4
4
|
export default TimePickerIOS;
|
|
@@ -61,5 +61,16 @@ export interface TimePickerProps {
|
|
|
61
61
|
supportedOrientations?: ('portrait' | 'landscape')[];
|
|
62
62
|
}
|
|
63
63
|
export interface InternalTimePickerProps extends TimePickerProps {
|
|
64
|
+
/**
|
|
65
|
+
* Props that are passed to TextInput.
|
|
66
|
+
*/
|
|
67
|
+
inputProps?: Pick<TextInputProps, 'loading' | 'numberOfLines'>;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the component is used within a FormGroup for styling purposes.
|
|
70
|
+
*/
|
|
71
|
+
groupStyleEnabled?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Input component to use instead of the default TextInput.
|
|
74
|
+
*/
|
|
64
75
|
TextInputComponent?: React.ComponentType<TextInputProps>;
|
|
65
76
|
}
|