@hero-design/rn 8.93.0 → 8.96.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.
- package/.turbo/turbo-build.log +7 -2
- package/CHANGELOG.md +18 -0
- package/es/index.js +2128 -1023
- package/lib/index.js +2127 -1021
- package/locales/en_AU.js +10 -0
- package/locales/en_AU.mjs +8 -0
- package/locales/en_CA.js +10 -0
- package/locales/en_CA.mjs +8 -0
- package/locales/index.js +11 -0
- package/locales/index.mjs +9 -0
- package/locales/types.js +2 -0
- package/locales/types.mjs +1 -0
- package/package.json +4 -3
- package/rollup.config.mjs +97 -58
- package/src/components/DatePicker/DatePickerAndroid.tsx +27 -7
- package/src/components/DatePicker/DatePickerCalendar.tsx +23 -4
- package/src/components/DatePicker/DatePickerIOS.tsx +27 -8
- package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +30 -1
- package/src/components/DatePicker/__tests__/DatePickerAndroid.spec.tsx +27 -0
- package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +27 -0
- package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +28 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
- package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +61 -0
- package/src/components/DatePicker/{useCalculateDate.tsx → hooks/useCalculateDate.tsx} +1 -1
- package/src/components/DatePicker/hooks/useFormatDate.ts +25 -0
- package/src/components/DatePicker/hooks/utils.ts +30 -0
- package/src/components/DatePicker/types.ts +15 -1
- package/src/components/HeroDesignProvider/index.tsx +19 -6
- package/src/components/LocaleProvider/__tests__/utils.specs.ts +12 -0
- package/src/components/LocaleProvider/context.ts +7 -0
- package/src/components/LocaleProvider/hooks.ts +19 -0
- package/src/components/LocaleProvider/index.tsx +27 -0
- package/src/components/LocaleProvider/utils.ts +14 -0
- package/src/components/{Empty → StatusScreens/Empty}/StyledEmpty.tsx +11 -2
- package/src/components/StatusScreens/Empty/__tests__/__snapshots__/index.spec.tsx.snap +468 -0
- package/src/components/{Empty → StatusScreens/Empty}/__tests__/index.spec.tsx +16 -2
- package/src/components/StatusScreens/Empty/index.tsx +97 -0
- package/src/components/{Error → StatusScreens/Error}/StyledError.tsx +4 -4
- package/src/components/{Error → StatusScreens/Error}/__tests__/__snapshots__/index.spec.tsx.snap +300 -0
- package/src/components/{Error → StatusScreens/Error}/__tests__/index.spec.tsx +13 -3
- package/src/components/{Error → StatusScreens/Error}/index.tsx +39 -7
- package/src/components/StatusScreens/StatusIcon/__tests__/index.spec.tsx +31 -0
- package/src/components/StatusScreens/StatusIcon/assets/Add.tsx +49 -0
- package/src/components/StatusScreens/StatusIcon/assets/Boom.tsx +61 -0
- package/src/components/StatusScreens/StatusIcon/assets/Build.tsx +45 -0
- package/src/components/StatusScreens/StatusIcon/assets/Clock.tsx +38 -0
- package/src/components/StatusScreens/StatusIcon/assets/Confetti.tsx +78 -0
- package/src/components/StatusScreens/StatusIcon/assets/Connections.tsx +57 -0
- package/src/components/StatusScreens/StatusIcon/assets/Error.tsx +55 -0
- package/src/components/StatusScreens/StatusIcon/assets/Info.tsx +35 -0
- package/src/components/StatusScreens/StatusIcon/assets/List.tsx +37 -0
- package/src/components/StatusScreens/StatusIcon/assets/Location.tsx +37 -0
- package/src/components/StatusScreens/StatusIcon/assets/Merge.tsx +59 -0
- package/src/components/StatusScreens/StatusIcon/assets/Notifications.tsx +26 -0
- package/src/components/StatusScreens/StatusIcon/assets/Search.tsx +36 -0
- package/src/components/StatusScreens/StatusIcon/assets/Star.tsx +37 -0
- package/src/components/StatusScreens/StatusIcon/assets/Success.tsx +41 -0
- package/src/components/StatusScreens/StatusIcon/assets/User.tsx +43 -0
- package/src/components/StatusScreens/StatusIcon/index.tsx +63 -0
- package/src/components/StatusScreens/StatusIcon/types.ts +5 -0
- package/src/components/{Success → StatusScreens/Success}/StyledSuccess.tsx +4 -4
- package/src/components/{Success → StatusScreens/Success}/__tests__/__snapshots__/index.spec.tsx.snap +263 -0
- package/src/components/{Success → StatusScreens/Success}/__tests__/index.spec.tsx +13 -4
- package/src/components/{Success → StatusScreens/Success}/index.tsx +38 -7
- package/src/index.ts +5 -3
- package/src/locales/en_AU.ts +10 -0
- package/src/locales/en_CA.ts +10 -0
- package/src/locales/index.ts +7 -0
- package/src/locales/types.ts +12 -0
- package/src/testHelpers/renderWithTheme.tsx +7 -1
- package/src/types.ts +4 -0
- package/stats/8.94.0/rn-stats.html +4842 -0
- package/stats/8.95.0/rn-stats.html +4842 -0
- package/stats/8.96.0/rn-stats.html +4842 -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/{useCalculateDate.d.ts → hooks/useCalculateDate.d.ts} +1 -1
- package/types/components/DatePicker/hooks/useFormatDate.d.ts +10 -0
- package/types/components/DatePicker/hooks/utils.d.ts +6 -0
- package/types/components/DatePicker/types.d.ts +8 -1
- package/types/components/HeroDesignProvider/index.d.ts +5 -1
- package/types/components/LocaleProvider/__tests__/utils.specs.d.ts +1 -0
- package/types/components/LocaleProvider/context.d.ts +3 -0
- package/types/components/LocaleProvider/hooks.d.ts +5 -0
- package/types/components/LocaleProvider/index.d.ts +7 -0
- package/types/components/LocaleProvider/utils.d.ts +3 -0
- package/types/components/{Empty → StatusScreens/Empty}/StyledEmpty.d.ts +9 -3
- package/types/components/{Empty → StatusScreens/Empty}/index.d.ts +8 -3
- package/types/components/{Error → StatusScreens/Error}/StyledError.d.ts +6 -6
- package/types/components/{Error → StatusScreens/Error}/index.d.ts +6 -1
- package/types/components/StatusScreens/StatusIcon/assets/Add.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Boom.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Build.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Clock.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Confetti.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Connections.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Error.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Info.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/List.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Location.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Merge.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Notifications.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Search.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Star.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/Success.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/assets/User.d.ts +4 -0
- package/types/components/StatusScreens/StatusIcon/index.d.ts +26 -0
- package/types/components/StatusScreens/StatusIcon/types.d.ts +5 -0
- package/types/components/{Success → StatusScreens/Success}/StyledSuccess.d.ts +5 -5
- package/types/components/{Success → StatusScreens/Success}/index.d.ts +6 -1
- package/types/index.d.ts +5 -4
- package/types/locales/en_AU.d.ts +3 -0
- package/types/locales/en_CA.d.ts +3 -0
- package/types/locales/index.d.ts +5 -0
- package/types/locales/types.d.ts +10 -0
- package/types/types.d.ts +2 -1
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +0 -218
- package/src/components/Empty/index.tsx +0 -73
|
@@ -3,5 +3,5 @@ import type { DatePickerProps } from './types';
|
|
|
3
3
|
type DatePickerAndroidProps = Omit<DatePickerProps, '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, }: DatePickerAndroidProps) => React.JSX.Element;
|
|
6
|
+
declare const DatePickerAndroid: ({ value, minDate, maxDate, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, variant, renderSelectedValue, locale, }: DatePickerAndroidProps) => React.JSX.Element;
|
|
7
7
|
export default DatePickerAndroid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DatePickerProps } from './types';
|
|
3
|
-
declare const DatePickerCalendar: ({ value, minDate, maxDate, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, monthPickerConfirmLabel, monthPickerCancelLabel, supportedOrientations, }: Omit<DatePickerProps, "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, }: Omit<DatePickerProps, "variant">) => React.JSX.Element;
|
|
4
4
|
export default DatePickerCalendar;
|
|
@@ -3,5 +3,5 @@ import type { DatePickerProps } from './types';
|
|
|
3
3
|
type DatePickerIOSProps = Omit<DatePickerProps, '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, }: 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, }: DatePickerIOSProps) => React.JSX.Element;
|
|
7
7
|
export default DatePickerIOS;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DatePickerProps } from '
|
|
1
|
+
import { DatePickerProps } from '../types';
|
|
2
2
|
export declare const getDateValue: (value: Date, minDate?: Date | undefined, maxDate?: Date | undefined) => Date;
|
|
3
3
|
declare const useCalculateDate: ({ maxDate, minDate, onChange, value, }: Pick<DatePickerProps, "maxDate" | "minDate" | "onChange" | "value">) => void;
|
|
4
4
|
export default useCalculateDate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type UseFormatDateProps = {
|
|
2
|
+
displayFormat?: string;
|
|
3
|
+
locale?: string;
|
|
4
|
+
value?: Date;
|
|
5
|
+
};
|
|
6
|
+
declare const useFormatDate: ({ displayFormat, locale, value, }: UseFormatDateProps) => {
|
|
7
|
+
displayValue: string;
|
|
8
|
+
format: string;
|
|
9
|
+
};
|
|
10
|
+
export default useFormatDate;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
1
|
+
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle } from 'react-native';
|
|
2
2
|
export interface DatePickerProps {
|
|
3
3
|
/**
|
|
4
4
|
* Date picker input label.
|
|
@@ -84,4 +84,11 @@ export interface DatePickerProps {
|
|
|
84
84
|
* [Android only] autoTheme will automatically set the theme based on the device's light mode or dark mode.
|
|
85
85
|
* */
|
|
86
86
|
autoTheme?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Custom renderer for the selected value. The function provides the current date object and the formatted date string for the current display format.
|
|
89
|
+
*/
|
|
90
|
+
renderSelectedValue?: (value: {
|
|
91
|
+
date: Date;
|
|
92
|
+
formattedDateString: string;
|
|
93
|
+
}, props?: NativeTextInputProps) => React.ReactNode;
|
|
87
94
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ThemeProviderProps } from '../../theme/ThemeProvider';
|
|
3
|
-
|
|
3
|
+
import { LocaleValues } from '../../locales/types';
|
|
4
|
+
interface HeroDesignProviderProps extends ThemeProviderProps {
|
|
5
|
+
locale?: LocaleValues;
|
|
6
|
+
}
|
|
7
|
+
declare const HeroDesignProvider: ({ theme, locale, children, }: HeroDesignProviderProps) => React.JSX.Element;
|
|
4
8
|
export default HeroDesignProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LocaleValues } from '../../locales/types';
|
|
3
|
+
interface LocaleProviderProps {
|
|
4
|
+
locale: LocaleValues;
|
|
5
|
+
}
|
|
6
|
+
declare const LocaleProvider: (props: React.PropsWithChildren<LocaleProviderProps>) => React.JSX.Element;
|
|
7
|
+
export default LocaleProvider;
|
|
@@ -6,16 +6,22 @@ declare const StyledWrapper: import("@emotion/native").StyledComponent<import("r
|
|
|
6
6
|
}, {}, {
|
|
7
7
|
ref?: import("react").Ref<View> | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
declare const StyledTitle: import("@emotion/native").StyledComponent<import("
|
|
9
|
+
declare const StyledTitle: import("@emotion/native").StyledComponent<import("../../Typography/Title").TitleProps & {
|
|
10
10
|
theme?: import("@emotion/react").Theme;
|
|
11
11
|
as?: React.ElementType;
|
|
12
12
|
} & {
|
|
13
13
|
themeVariant: ThemeVariant;
|
|
14
14
|
}, {}, {}>;
|
|
15
|
-
declare const StyledDescription: import("@emotion/native").StyledComponent<import("
|
|
15
|
+
declare const StyledDescription: import("@emotion/native").StyledComponent<import("../../Typography/Body").BodyProps & {
|
|
16
16
|
theme?: import("@emotion/react").Theme;
|
|
17
17
|
as?: React.ElementType;
|
|
18
18
|
} & {
|
|
19
19
|
themeVariant: ThemeVariant;
|
|
20
20
|
}, {}, {}>;
|
|
21
|
-
|
|
21
|
+
declare const StyledEmptyImageContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
22
|
+
theme?: import("@emotion/react").Theme;
|
|
23
|
+
as?: React.ElementType;
|
|
24
|
+
}, {}, {
|
|
25
|
+
ref?: import("react").Ref<View> | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export { StyledWrapper, StyledTitle, StyledDescription, StyledEmptyImageContainer, };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
import { ImageProps } from '
|
|
2
|
+
import type { ImageProps as RNImageProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { ImageProps } from '../../Image';
|
|
4
|
+
import { StatusIconName } from '../StatusIcon';
|
|
4
5
|
interface EmptyProps {
|
|
5
6
|
/**
|
|
6
7
|
* Image to be displayed.
|
|
@@ -26,6 +27,10 @@ interface EmptyProps {
|
|
|
26
27
|
* Testing id of the component.
|
|
27
28
|
*/
|
|
28
29
|
testID?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Status icon to be displayed, this will replace the image prop.
|
|
32
|
+
*/
|
|
33
|
+
icon?: StatusIconName;
|
|
29
34
|
}
|
|
30
|
-
declare const Empty: ({ image, title, description, style, testID, variant, }: EmptyProps) =>
|
|
35
|
+
declare const Empty: ({ image, title, description, style, testID, variant, icon, }: EmptyProps) => ReactElement;
|
|
31
36
|
export default Empty;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { View } from 'react-native';
|
|
2
2
|
type ErrorVariant = 'full-screen' | 'in-page';
|
|
3
|
-
declare const StyledErrorModal: import("@emotion/native").StyledComponent<import("
|
|
3
|
+
declare const StyledErrorModal: import("@emotion/native").StyledComponent<import("../../Modal").ModalProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: React.ElementType;
|
|
6
6
|
}, {}, {}>;
|
|
@@ -24,11 +24,11 @@ declare const StyledErrorButtonContainer: import("@emotion/native").StyledCompon
|
|
|
24
24
|
}, {}, {
|
|
25
25
|
ref?: import("react").Ref<View> | undefined;
|
|
26
26
|
}>;
|
|
27
|
-
declare const StyledErrorButtonPrimary: import("@emotion/native").StyledComponent<import("
|
|
27
|
+
declare const StyledErrorButtonPrimary: import("@emotion/native").StyledComponent<import("../../Button/Button").ButtonProps & {
|
|
28
28
|
theme?: import("@emotion/react").Theme;
|
|
29
29
|
as?: React.ElementType;
|
|
30
30
|
}, {}, {}>;
|
|
31
|
-
declare const StyledErrorButtonSecondary: import("@emotion/native").StyledComponent<import("
|
|
31
|
+
declare const StyledErrorButtonSecondary: import("@emotion/native").StyledComponent<import("../../Button/Button").ButtonProps & {
|
|
32
32
|
theme?: import("@emotion/react").Theme;
|
|
33
33
|
as?: React.ElementType;
|
|
34
34
|
}, {}, {}>;
|
|
@@ -38,15 +38,15 @@ declare const StyledErrorImageContainer: import("@emotion/native").StyledCompone
|
|
|
38
38
|
}, {}, {
|
|
39
39
|
ref?: import("react").Ref<View> | undefined;
|
|
40
40
|
}>;
|
|
41
|
-
declare const StyledErrorImage: import("@emotion/native").StyledComponent<import("
|
|
41
|
+
declare const StyledErrorImage: import("@emotion/native").StyledComponent<import("../../Image").ImageProps & {
|
|
42
42
|
theme?: import("@emotion/react").Theme;
|
|
43
43
|
as?: React.ElementType;
|
|
44
44
|
}, {}, {}>;
|
|
45
|
-
declare const StyledErrorTitle: import("@emotion/native").StyledComponent<import("
|
|
45
|
+
declare const StyledErrorTitle: import("@emotion/native").StyledComponent<import("../../Typography/Title").TitleProps & {
|
|
46
46
|
theme?: import("@emotion/react").Theme;
|
|
47
47
|
as?: React.ElementType;
|
|
48
48
|
}, {}, {}>;
|
|
49
|
-
declare const StyledErrorDescription: import("@emotion/native").StyledComponent<import("
|
|
49
|
+
declare const StyledErrorDescription: import("@emotion/native").StyledComponent<import("../../Typography/Body").BodyProps & {
|
|
50
50
|
theme?: import("@emotion/react").Theme;
|
|
51
51
|
as?: React.ElementType;
|
|
52
52
|
}, {}, {}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import type { ImageSourcePropType, ViewProps, ImageProps as RNImageProps } from 'react-native';
|
|
3
3
|
import { ErrorVariant } from './StyledError';
|
|
4
|
-
import { ImageProps } from '
|
|
4
|
+
import { ImageProps } from '../../Image/index';
|
|
5
|
+
import type { StatusIconName } from '../StatusIcon';
|
|
5
6
|
interface ErrorProps extends ViewProps {
|
|
6
7
|
/**
|
|
7
8
|
* @deprecated use conditional rendering instead
|
|
@@ -45,6 +46,10 @@ interface ErrorProps extends ViewProps {
|
|
|
45
46
|
* Callback when the secondary button is pressed.
|
|
46
47
|
*/
|
|
47
48
|
onSecondaryCtaPress?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Status icon to be displayed, this will replace the image prop.
|
|
51
|
+
*/
|
|
52
|
+
icon?: StatusIconName;
|
|
48
53
|
}
|
|
49
54
|
/**
|
|
50
55
|
* Renders error page
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const StatusIcons: {
|
|
3
|
+
readonly add: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
4
|
+
readonly boom: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
5
|
+
readonly build: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
6
|
+
readonly clock: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
7
|
+
readonly connections: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
8
|
+
readonly list: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
9
|
+
readonly location: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
10
|
+
readonly merge: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
11
|
+
readonly notifications: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
12
|
+
readonly search: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
13
|
+
readonly star: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
14
|
+
readonly user: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
15
|
+
readonly confetti: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
16
|
+
readonly error: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
17
|
+
readonly info: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
18
|
+
readonly success: ({ stroke, fill, testID }: import("./types").StatusSvgProps) => React.JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export type StatusIconName = keyof typeof StatusIcons;
|
|
21
|
+
interface StatusIconProps {
|
|
22
|
+
icon: StatusIconName;
|
|
23
|
+
testID?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const StatusIcon: ({ icon, testID }: StatusIconProps) => React.JSX.Element;
|
|
26
|
+
export default StatusIcon;
|
|
@@ -8,7 +8,7 @@ declare const StyledSuccessContainer: import("@emotion/native").StyledComponent<
|
|
|
8
8
|
}, {}, {
|
|
9
9
|
ref?: import("react").Ref<View> | undefined;
|
|
10
10
|
}>;
|
|
11
|
-
declare const StyledSuccessImage: import("@emotion/native").StyledComponent<import("
|
|
11
|
+
declare const StyledSuccessImage: import("@emotion/native").StyledComponent<import("../../Image").ImageProps & {
|
|
12
12
|
theme?: import("@emotion/react").Theme;
|
|
13
13
|
as?: React.ElementType;
|
|
14
14
|
}, {}, {}>;
|
|
@@ -24,11 +24,11 @@ declare const StyledSuccessImageContainer: import("@emotion/native").StyledCompo
|
|
|
24
24
|
}, {}, {
|
|
25
25
|
ref?: import("react").Ref<View> | undefined;
|
|
26
26
|
}>;
|
|
27
|
-
declare const StyledSuccessTitle: import("@emotion/native").StyledComponent<import("
|
|
27
|
+
declare const StyledSuccessTitle: import("@emotion/native").StyledComponent<import("../../Typography/Title").TitleProps & {
|
|
28
28
|
theme?: import("@emotion/react").Theme;
|
|
29
29
|
as?: React.ElementType;
|
|
30
30
|
}, {}, {}>;
|
|
31
|
-
declare const StyledSuccessDescription: import("@emotion/native").StyledComponent<import("
|
|
31
|
+
declare const StyledSuccessDescription: import("@emotion/native").StyledComponent<import("../../Typography/Body").BodyProps & {
|
|
32
32
|
theme?: import("@emotion/react").Theme;
|
|
33
33
|
as?: React.ElementType;
|
|
34
34
|
}, {}, {}>;
|
|
@@ -38,11 +38,11 @@ declare const StyledSuccessButtonContainer: import("@emotion/native").StyledComp
|
|
|
38
38
|
}, {}, {
|
|
39
39
|
ref?: import("react").Ref<View> | undefined;
|
|
40
40
|
}>;
|
|
41
|
-
declare const StyledSuccessButtonPrimary: import("@emotion/native").StyledComponent<import("
|
|
41
|
+
declare const StyledSuccessButtonPrimary: import("@emotion/native").StyledComponent<import("../../Button/Button").ButtonProps & {
|
|
42
42
|
theme?: import("@emotion/react").Theme;
|
|
43
43
|
as?: React.ElementType;
|
|
44
44
|
}, {}, {}>;
|
|
45
|
-
declare const StyledSuccessModal: import("@emotion/native").StyledComponent<import("
|
|
45
|
+
declare const StyledSuccessModal: import("@emotion/native").StyledComponent<import("../../Modal").ModalProps & {
|
|
46
46
|
theme?: import("@emotion/react").Theme;
|
|
47
47
|
as?: React.ElementType;
|
|
48
48
|
}, {}, {}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import type { ViewProps, ImageSourcePropType, ImageProps as RNImageProps } from 'react-native';
|
|
3
3
|
import { SuccessVariant } from './StyledSuccess';
|
|
4
|
-
import { ImageProps } from '
|
|
4
|
+
import { ImageProps } from '../../Image';
|
|
5
|
+
import { StatusIconName } from '../StatusIcon';
|
|
5
6
|
export interface SuccessProps extends ViewProps {
|
|
6
7
|
/**
|
|
7
8
|
* Image to be displayed.
|
|
@@ -39,6 +40,10 @@ export interface SuccessProps extends ViewProps {
|
|
|
39
40
|
* Testing id of the component.
|
|
40
41
|
*/
|
|
41
42
|
testID?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Status icon to be displayed, this will replace the image prop.
|
|
45
|
+
*/
|
|
46
|
+
icon?: StatusIconName;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* Renders success page
|
package/types/index.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ import ContentNavigator from './components/ContentNavigator';
|
|
|
20
20
|
import DatePicker from './components/DatePicker';
|
|
21
21
|
import Divider from './components/Divider';
|
|
22
22
|
import Drawer from './components/Drawer';
|
|
23
|
-
import Empty from './components/Empty';
|
|
24
|
-
import Error from './components/Error';
|
|
23
|
+
import Empty from './components/StatusScreens/Empty';
|
|
24
|
+
import Error from './components/StatusScreens/Error';
|
|
25
25
|
import FAB from './components/FAB';
|
|
26
26
|
import HeroDesignProvider from './components/HeroDesignProvider';
|
|
27
27
|
import MapPin from './components/MapPin';
|
|
@@ -37,7 +37,7 @@ import Radio from './components/Radio';
|
|
|
37
37
|
import SectionHeading from './components/SectionHeading';
|
|
38
38
|
import Select from './components/Select';
|
|
39
39
|
import Skeleton from './components/Skeleton';
|
|
40
|
-
import Success from './components/Success';
|
|
40
|
+
import Success from './components/StatusScreens/Success';
|
|
41
41
|
import Switch from './components/Switch';
|
|
42
42
|
import Tabs from './components/Tabs';
|
|
43
43
|
import Tag from './components/Tag';
|
|
@@ -54,5 +54,6 @@ import Portal from './components/Portal';
|
|
|
54
54
|
import { ScrollViewWithFAB, SectionListWithFAB, FlatListWithFAB } from './components/AnimatedScroller';
|
|
55
55
|
import Search from './components/Search';
|
|
56
56
|
import FloatingIsland from './components/FloatingIsland';
|
|
57
|
-
|
|
57
|
+
import LocaleProvider from './components/LocaleProvider';
|
|
58
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, withTheme, swagSystemPalette, swagLightSystemPalette, swagLightJobsSystemPalette, swagDarkSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, ehWorkDarkSystemPalette, ehWorkSystemPalette, ehJobsSystemPalette, Accordion, Alert, AppCue, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Chip, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, Error, FAB, FlatListWithFAB, Icon, Image, HeroDesignProvider, MapPin, List, PinInput, Progress, Portal, PageControl, Skeleton, Slider, Spinner, Swipeable, Radio, Search, ScrollViewWithFAB, SectionHeading, SectionListWithFAB, Select, Success, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, Rate, RefreshControl, RichTextEditor, FloatingIsland, LocaleProvider, };
|
|
58
59
|
export * from './types';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const LOCALES: readonly ["en-AU", "en-CA"];
|
|
2
|
+
export type LocaleCode = typeof LOCALES[number];
|
|
3
|
+
export type DateTimeFormats = {
|
|
4
|
+
fullDate: string;
|
|
5
|
+
};
|
|
6
|
+
export type LocaleValues = {
|
|
7
|
+
lang: LocaleCode;
|
|
8
|
+
dateTimeFormats: DateTimeFormats;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
package/types/types.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ import { FABHandles } from './components/FAB/FAB';
|
|
|
13
13
|
import { ActionGroupHandles } from './components/FAB/ActionGroup';
|
|
14
14
|
import type { SliderRangeValue } from './components/Slider/RangeSlider';
|
|
15
15
|
import type { CalendarDateRange } from './components/Calendar/CalendarRange';
|
|
16
|
-
|
|
16
|
+
import { LocaleCode, LocaleValues, DateTimeFormats } from './locales/types';
|
|
17
|
+
export type { BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, TextProps, TextInputHandles, Theme, CardCarouselHandles, FABHandles, ActionGroupHandles, SliderRangeValue, CalendarDateRange, LocaleCode, LocaleValues, DateTimeFormats, };
|