@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.
Files changed (119) hide show
  1. package/.turbo/turbo-build.log +7 -2
  2. package/CHANGELOG.md +18 -0
  3. package/es/index.js +2128 -1023
  4. package/lib/index.js +2127 -1021
  5. package/locales/en_AU.js +10 -0
  6. package/locales/en_AU.mjs +8 -0
  7. package/locales/en_CA.js +10 -0
  8. package/locales/en_CA.mjs +8 -0
  9. package/locales/index.js +11 -0
  10. package/locales/index.mjs +9 -0
  11. package/locales/types.js +2 -0
  12. package/locales/types.mjs +1 -0
  13. package/package.json +4 -3
  14. package/rollup.config.mjs +97 -58
  15. package/src/components/DatePicker/DatePickerAndroid.tsx +27 -7
  16. package/src/components/DatePicker/DatePickerCalendar.tsx +23 -4
  17. package/src/components/DatePicker/DatePickerIOS.tsx +27 -8
  18. package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +30 -1
  19. package/src/components/DatePicker/__tests__/DatePickerAndroid.spec.tsx +27 -0
  20. package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +27 -0
  21. package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +28 -1
  22. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
  23. package/src/components/DatePicker/hooks/__tests__/useFormatDate.spec.ts +61 -0
  24. package/src/components/DatePicker/{useCalculateDate.tsx → hooks/useCalculateDate.tsx} +1 -1
  25. package/src/components/DatePicker/hooks/useFormatDate.ts +25 -0
  26. package/src/components/DatePicker/hooks/utils.ts +30 -0
  27. package/src/components/DatePicker/types.ts +15 -1
  28. package/src/components/HeroDesignProvider/index.tsx +19 -6
  29. package/src/components/LocaleProvider/__tests__/utils.specs.ts +12 -0
  30. package/src/components/LocaleProvider/context.ts +7 -0
  31. package/src/components/LocaleProvider/hooks.ts +19 -0
  32. package/src/components/LocaleProvider/index.tsx +27 -0
  33. package/src/components/LocaleProvider/utils.ts +14 -0
  34. package/src/components/{Empty → StatusScreens/Empty}/StyledEmpty.tsx +11 -2
  35. package/src/components/StatusScreens/Empty/__tests__/__snapshots__/index.spec.tsx.snap +468 -0
  36. package/src/components/{Empty → StatusScreens/Empty}/__tests__/index.spec.tsx +16 -2
  37. package/src/components/StatusScreens/Empty/index.tsx +97 -0
  38. package/src/components/{Error → StatusScreens/Error}/StyledError.tsx +4 -4
  39. package/src/components/{Error → StatusScreens/Error}/__tests__/__snapshots__/index.spec.tsx.snap +300 -0
  40. package/src/components/{Error → StatusScreens/Error}/__tests__/index.spec.tsx +13 -3
  41. package/src/components/{Error → StatusScreens/Error}/index.tsx +39 -7
  42. package/src/components/StatusScreens/StatusIcon/__tests__/index.spec.tsx +31 -0
  43. package/src/components/StatusScreens/StatusIcon/assets/Add.tsx +49 -0
  44. package/src/components/StatusScreens/StatusIcon/assets/Boom.tsx +61 -0
  45. package/src/components/StatusScreens/StatusIcon/assets/Build.tsx +45 -0
  46. package/src/components/StatusScreens/StatusIcon/assets/Clock.tsx +38 -0
  47. package/src/components/StatusScreens/StatusIcon/assets/Confetti.tsx +78 -0
  48. package/src/components/StatusScreens/StatusIcon/assets/Connections.tsx +57 -0
  49. package/src/components/StatusScreens/StatusIcon/assets/Error.tsx +55 -0
  50. package/src/components/StatusScreens/StatusIcon/assets/Info.tsx +35 -0
  51. package/src/components/StatusScreens/StatusIcon/assets/List.tsx +37 -0
  52. package/src/components/StatusScreens/StatusIcon/assets/Location.tsx +37 -0
  53. package/src/components/StatusScreens/StatusIcon/assets/Merge.tsx +59 -0
  54. package/src/components/StatusScreens/StatusIcon/assets/Notifications.tsx +26 -0
  55. package/src/components/StatusScreens/StatusIcon/assets/Search.tsx +36 -0
  56. package/src/components/StatusScreens/StatusIcon/assets/Star.tsx +37 -0
  57. package/src/components/StatusScreens/StatusIcon/assets/Success.tsx +41 -0
  58. package/src/components/StatusScreens/StatusIcon/assets/User.tsx +43 -0
  59. package/src/components/StatusScreens/StatusIcon/index.tsx +63 -0
  60. package/src/components/StatusScreens/StatusIcon/types.ts +5 -0
  61. package/src/components/{Success → StatusScreens/Success}/StyledSuccess.tsx +4 -4
  62. package/src/components/{Success → StatusScreens/Success}/__tests__/__snapshots__/index.spec.tsx.snap +263 -0
  63. package/src/components/{Success → StatusScreens/Success}/__tests__/index.spec.tsx +13 -4
  64. package/src/components/{Success → StatusScreens/Success}/index.tsx +38 -7
  65. package/src/index.ts +5 -3
  66. package/src/locales/en_AU.ts +10 -0
  67. package/src/locales/en_CA.ts +10 -0
  68. package/src/locales/index.ts +7 -0
  69. package/src/locales/types.ts +12 -0
  70. package/src/testHelpers/renderWithTheme.tsx +7 -1
  71. package/src/types.ts +4 -0
  72. package/stats/8.94.0/rn-stats.html +4842 -0
  73. package/stats/8.95.0/rn-stats.html +4842 -0
  74. package/stats/8.96.0/rn-stats.html +4842 -0
  75. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  76. package/types/components/DatePicker/DatePickerCalendar.d.ts +1 -1
  77. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  78. package/types/components/DatePicker/{useCalculateDate.d.ts → hooks/useCalculateDate.d.ts} +1 -1
  79. package/types/components/DatePicker/hooks/useFormatDate.d.ts +10 -0
  80. package/types/components/DatePicker/hooks/utils.d.ts +6 -0
  81. package/types/components/DatePicker/types.d.ts +8 -1
  82. package/types/components/HeroDesignProvider/index.d.ts +5 -1
  83. package/types/components/LocaleProvider/__tests__/utils.specs.d.ts +1 -0
  84. package/types/components/LocaleProvider/context.d.ts +3 -0
  85. package/types/components/LocaleProvider/hooks.d.ts +5 -0
  86. package/types/components/LocaleProvider/index.d.ts +7 -0
  87. package/types/components/LocaleProvider/utils.d.ts +3 -0
  88. package/types/components/{Empty → StatusScreens/Empty}/StyledEmpty.d.ts +9 -3
  89. package/types/components/{Empty → StatusScreens/Empty}/index.d.ts +8 -3
  90. package/types/components/{Error → StatusScreens/Error}/StyledError.d.ts +6 -6
  91. package/types/components/{Error → StatusScreens/Error}/index.d.ts +6 -1
  92. package/types/components/StatusScreens/StatusIcon/assets/Add.d.ts +4 -0
  93. package/types/components/StatusScreens/StatusIcon/assets/Boom.d.ts +4 -0
  94. package/types/components/StatusScreens/StatusIcon/assets/Build.d.ts +4 -0
  95. package/types/components/StatusScreens/StatusIcon/assets/Clock.d.ts +4 -0
  96. package/types/components/StatusScreens/StatusIcon/assets/Confetti.d.ts +4 -0
  97. package/types/components/StatusScreens/StatusIcon/assets/Connections.d.ts +4 -0
  98. package/types/components/StatusScreens/StatusIcon/assets/Error.d.ts +4 -0
  99. package/types/components/StatusScreens/StatusIcon/assets/Info.d.ts +4 -0
  100. package/types/components/StatusScreens/StatusIcon/assets/List.d.ts +4 -0
  101. package/types/components/StatusScreens/StatusIcon/assets/Location.d.ts +4 -0
  102. package/types/components/StatusScreens/StatusIcon/assets/Merge.d.ts +4 -0
  103. package/types/components/StatusScreens/StatusIcon/assets/Notifications.d.ts +4 -0
  104. package/types/components/StatusScreens/StatusIcon/assets/Search.d.ts +4 -0
  105. package/types/components/StatusScreens/StatusIcon/assets/Star.d.ts +4 -0
  106. package/types/components/StatusScreens/StatusIcon/assets/Success.d.ts +4 -0
  107. package/types/components/StatusScreens/StatusIcon/assets/User.d.ts +4 -0
  108. package/types/components/StatusScreens/StatusIcon/index.d.ts +26 -0
  109. package/types/components/StatusScreens/StatusIcon/types.d.ts +5 -0
  110. package/types/components/{Success → StatusScreens/Success}/StyledSuccess.d.ts +5 -5
  111. package/types/components/{Success → StatusScreens/Success}/index.d.ts +6 -1
  112. package/types/index.d.ts +5 -4
  113. package/types/locales/en_AU.d.ts +3 -0
  114. package/types/locales/en_CA.d.ts +3 -0
  115. package/types/locales/index.d.ts +5 -0
  116. package/types/locales/types.d.ts +10 -0
  117. package/types/types.d.ts +2 -1
  118. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +0 -218
  119. 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 './types';
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;
@@ -0,0 +1,6 @@
1
+ import { DateTimeFormats } from '../../../types';
2
+ export declare const getDateFormat: ({ displayFormat, locale, localizeDateTime, }: {
3
+ displayFormat?: string;
4
+ locale?: string;
5
+ localizeDateTime: (key: keyof DateTimeFormats) => string;
6
+ }) => string;
@@ -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
- declare const HeroDesignProvider: ({ theme, children }: ThemeProviderProps) => React.JSX.Element;
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,3 @@
1
+ import { LocaleValues } from '../../locales/types';
2
+ declare const LocaleContext: import("react").Context<LocaleValues>;
3
+ export { LocaleContext };
@@ -0,0 +1,5 @@
1
+ import type { DateTimeFormats } from '../../locales/types';
2
+ export declare const useLocale: () => import("../../locales/types").LocaleValues;
3
+ export declare const useDateTimeFormat: () => {
4
+ localizeDateTime: (key: keyof DateTimeFormats) => string;
5
+ };
@@ -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;
@@ -0,0 +1,3 @@
1
+ import type { Locale } from 'date-fns';
2
+ import { LocaleCode } from '../../locales/types';
3
+ export declare function getDateFnsLocale(locale: LocaleCode): Locale;
@@ -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("../Typography/Title").TitleProps & {
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("../Typography/Body").BodyProps & {
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
- export { StyledWrapper, StyledTitle, StyledDescription };
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 { StyleProp, ViewStyle, ImageProps as RNImageProps } from 'react-native';
3
- import { ImageProps } from '../Image';
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) => JSX.Element;
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("../Modal").ModalProps & {
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("../Button/Button").ButtonProps & {
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("../Button/Button").ButtonProps & {
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("../Image").ImageProps & {
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("../Typography/Title").TitleProps & {
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("../Typography/Body").BodyProps & {
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 '../Image/index';
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,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Add: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Add;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Boom: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Boom;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Build: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Build;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Clock: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Clock;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Confetti: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Confetti;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Connections: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Connections;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const ErrorIcon: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default ErrorIcon;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Info: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Info;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const List: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default List;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Location: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Location;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Merge: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Merge;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Notifications: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Notifications;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Search: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Search;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Star: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Star;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const Success: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default Success;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StatusSvgProps } from '../types';
3
+ declare const User: ({ stroke, fill, testID }: StatusSvgProps) => React.JSX.Element;
4
+ export default User;
@@ -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;
@@ -0,0 +1,5 @@
1
+ export type StatusSvgProps = {
2
+ fill?: string;
3
+ stroke?: string;
4
+ testID?: string;
5
+ };
@@ -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("../Image").ImageProps & {
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("../Typography/Title").TitleProps & {
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("../Typography/Body").BodyProps & {
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("../Button/Button").ButtonProps & {
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("../Modal").ModalProps & {
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 '../Image';
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
- 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, };
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,3 @@
1
+ import { LocaleValues } from './types';
2
+ declare const locale: LocaleValues;
3
+ export default locale;
@@ -0,0 +1,3 @@
1
+ import { LocaleValues } from './types';
2
+ declare const locale: LocaleValues;
3
+ export default locale;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ 'en-AU': import("./types").LocaleValues;
3
+ 'en-CA': import("./types").LocaleValues;
4
+ };
5
+ export default _default;
@@ -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
- export type { BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, TextProps, TextInputHandles, Theme, CardCarouselHandles, FABHandles, ActionGroupHandles, SliderRangeValue, CalendarDateRange, };
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, };