@hero-design/rn 7.28.0 → 7.29.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 (80) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.turbo/turbo-build.log +9 -9
  3. package/es/index.js +119 -95
  4. package/lib/index.js +119 -95
  5. package/package.json +5 -4
  6. package/src/components/Alert/index.tsx +1 -0
  7. package/src/components/BottomSheet/Header.tsx +1 -1
  8. package/src/components/BottomSheet/StyledBottomSheet.tsx +1 -2
  9. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +12 -14
  10. package/src/components/DatePicker/DatePickerIOS.tsx +5 -11
  11. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
  12. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +35 -16
  13. package/src/components/Empty/StyledEmpty.tsx +1 -1
  14. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
  15. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  16. package/src/components/FAB/ActionGroup/index.tsx +1 -1
  17. package/src/components/List/ListItem.tsx +2 -2
  18. package/src/components/Progress/ProgressCircle.tsx +1 -1
  19. package/src/components/Select/{StyledOptionList.tsx → BaseOptionList.tsx} +6 -6
  20. package/src/components/Select/Footer.tsx +2 -7
  21. package/src/components/Select/MultiSelect/Option.tsx +24 -11
  22. package/src/components/Select/MultiSelect/OptionList.tsx +3 -2
  23. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +3 -2
  24. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +47 -21
  25. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +204 -107
  26. package/src/components/Select/MultiSelect/index.tsx +16 -0
  27. package/src/components/Select/SingleSelect/Option.tsx +12 -12
  28. package/src/components/Select/SingleSelect/OptionList.tsx +3 -2
  29. package/src/components/Select/SingleSelect/StyledSingleSelect.tsx +6 -0
  30. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
  31. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +32 -16
  32. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +70 -54
  33. package/src/components/Select/SingleSelect/index.tsx +16 -0
  34. package/src/components/Select/StyledSelect.tsx +6 -7
  35. package/src/components/Select/types.ts +1 -0
  36. package/src/components/Tabs/ScrollableTabs.tsx +1 -1
  37. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +9 -3
  38. package/src/components/Tag/index.tsx +2 -2
  39. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
  40. package/src/components/TextInput/__tests__/index.spec.tsx +4 -2
  41. package/src/components/TextInput/index.tsx +7 -1
  42. package/src/components/TimePicker/TimePickerIOS.tsx +5 -11
  43. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
  44. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +35 -16
  45. package/src/components/Toast/ToastContainer.tsx +1 -1
  46. package/src/components/Toast/ToastProvider.tsx +10 -1
  47. package/src/components/Toast/__tests__/ToastContainer.spec.tsx +5 -5
  48. package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +4 -4
  49. package/src/components/Typography/Text/StyledText.tsx +2 -1
  50. package/src/components/Typography/Text/index.tsx +2 -1
  51. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +19 -15
  52. package/src/theme/components/bottomSheet.ts +4 -5
  53. package/src/theme/components/empty.ts +6 -5
  54. package/src/theme/components/fab.ts +1 -1
  55. package/src/theme/components/select.ts +4 -6
  56. package/src/theme/components/typography.ts +2 -0
  57. package/src/theme/global/colors/global.ts +1 -0
  58. package/src/theme/global/colors/types.ts +1 -0
  59. package/src/theme/global/typography.ts +4 -1
  60. package/types/components/Alert/index.d.ts +1 -0
  61. package/types/components/List/ListItem.d.ts +2 -2
  62. package/types/components/Select/{StyledOptionList.d.ts → BaseOptionList.d.ts} +3 -3
  63. package/types/components/Select/MultiSelect/Option.d.ts +2 -1
  64. package/types/components/Select/SingleSelect/Option.d.ts +2 -1
  65. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +1 -0
  66. package/types/components/Select/StyledSelect.d.ts +3 -6
  67. package/types/components/Select/types.d.ts +1 -0
  68. package/types/components/Toast/ToastProvider.d.ts +1 -1
  69. package/types/components/Toast/index.d.ts +1 -1
  70. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  71. package/types/components/Typography/Text/index.d.ts +1 -1
  72. package/types/theme/components/bottomSheet.d.ts +0 -1
  73. package/types/theme/components/empty.d.ts +1 -0
  74. package/types/theme/components/select.d.ts +3 -4
  75. package/types/theme/components/typography.d.ts +2 -0
  76. package/types/theme/global/colors/types.d.ts +1 -0
  77. package/types/theme/global/index.d.ts +1 -0
  78. package/types/theme/global/typography.d.ts +1 -0
  79. package/src/components/Select/__tests__/StyledSelect.spec.tsx +0 -14
  80. package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +0 -29
@@ -1,8 +1,9 @@
1
1
  import type { ReactElement } from 'react';
2
- declare const Option: ({ text, disabled, selected, onPress, }: {
2
+ declare const Option: ({ text, disabled, selected, onPress, highlighted, }: {
3
3
  text: string | ReactElement;
4
4
  disabled?: boolean | undefined;
5
5
  selected: boolean;
6
6
  onPress: () => void;
7
+ highlighted?: boolean | undefined;
7
8
  }) => JSX.Element;
8
9
  export default Option;
@@ -0,0 +1 @@
1
+ export declare const StyledOptionList: <V, T extends import("../types").OptionType<V>>({ keyExtractor, loading, onEndReached, onQueryChange, sections, renderItem, sectionListRef, }: import("../BaseOptionList").BaseOptionListProps<V, T>) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import { View } from 'react-native';
1
+ import { SectionList, View } from 'react-native';
2
2
  declare const SectionSpacer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any> | undefined;
@@ -11,14 +11,11 @@ declare const OptionSpacer: import("@emotion/native").StyledComponent<import("re
11
11
  }, {}, {
12
12
  ref?: import("react").Ref<View> | undefined;
13
13
  }>;
14
- declare const FooterText: import("@emotion/native").StyledComponent<import("../Typography/Text").TextProps & {
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any> | undefined;
17
- }, {}, {}>;
18
14
  declare const StyledSearchBar: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
19
15
  theme?: import("@emotion/react").Theme | undefined;
20
16
  as?: import("react").ElementType<any> | undefined;
21
17
  }, {}, {
22
18
  ref?: import("react").Ref<View> | undefined;
23
19
  }>;
24
- export { SectionSpacer, OptionSpacer, FooterText, StyledSearchBar };
20
+ declare const StyledSectionList: typeof SectionList;
21
+ export { SectionSpacer, OptionSpacer, StyledSearchBar, StyledSectionList };
@@ -6,6 +6,7 @@ export declare type OptionType<V> = {
6
6
  text: string;
7
7
  key?: string;
8
8
  disabled?: boolean;
9
+ highlighted?: boolean;
9
10
  };
10
11
  export declare type SectionType = {
11
12
  category: string;
@@ -6,5 +6,5 @@ declare type ToastProviderProps = {
6
6
  */
7
7
  children?: ReactNode;
8
8
  } & ToastContainerProps;
9
- declare const ToastProvider: ({ children, displayType, position, }: ToastProviderProps) => JSX.Element;
9
+ declare const ToastProvider: ({ children, displayType, position: _position, }: ToastProviderProps) => JSX.Element;
10
10
  export default ToastProvider;
@@ -1,5 +1,5 @@
1
1
  declare const Toast: {
2
- Provider: ({ children, displayType, position, }: {
2
+ Provider: ({ children, displayType, position: _position, }: {
3
3
  children?: import("react").ReactNode;
4
4
  } & import("./types").ToastContainerProps) => JSX.Element;
5
5
  Container: import("react").ForwardRefExoticComponent<import("./types").ToastContainerProps & import("react").RefAttributes<import("./ToastContext").ToastControllerContextType>>;
@@ -3,7 +3,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any> | undefined;
5
5
  } & {
6
- themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
6
+ themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '7xlarge';
7
7
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
8
8
  themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
9
9
  themeTypeface: 'neutral' | 'playful';
@@ -8,7 +8,7 @@ export interface TextProps extends NativeTextProps {
8
8
  /**
9
9
  * Size of the text.
10
10
  */
11
- fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
11
+ fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '7xlarge';
12
12
  /**
13
13
  * Font weight of the text.
14
14
  */
@@ -18,7 +18,6 @@ declare const getBottomSheetTheme: (theme: GlobalTheme) => {
18
18
  default: number;
19
19
  };
20
20
  sizes: {
21
- sectionHeight: number;
22
21
  closeIcon: number;
23
22
  };
24
23
  space: {
@@ -8,6 +8,7 @@ declare const getEmptyTheme: (theme: GlobalTheme) => {
8
8
  text: string;
9
9
  invertedText: string;
10
10
  subduedText: string;
11
+ invertedSubduedText: string;
11
12
  };
12
13
  sizes: {
13
14
  image: number;
@@ -4,13 +4,12 @@ declare const getSelectTheme: (theme: GlobalTheme) => {
4
4
  minimumOptionListHeight: number;
5
5
  sectionSpacing: number;
6
6
  optionSpacing: number;
7
- optionHorizontalMargin: number;
7
+ optionListHorizontalPadding: number;
8
8
  searchBarMarginTopSpacing: number;
9
9
  searchBarHorizontalSpacing: number;
10
10
  searchBarBottomSpacing: number;
11
- };
12
- colors: {
13
- footerText: string;
11
+ singleSelectContentPaddingBottom: number;
12
+ suffixMarginRight: number;
14
13
  };
15
14
  radii: {
16
15
  option: number;
@@ -19,6 +19,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
19
19
  xlarge: number;
20
20
  xxxlarge: number;
21
21
  xxxxxlarge: number;
22
+ '7xlarge': number;
22
23
  };
23
24
  lineHeights: {
24
25
  small: number;
@@ -27,6 +28,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
27
28
  xlarge: number;
28
29
  xxxlarge: number;
29
30
  xxxxxlarge: number;
31
+ '7xlarge': number;
30
32
  };
31
33
  };
32
34
  export default getTypographyTheme;
@@ -7,6 +7,7 @@ export declare type GlobalSystemPalette = {
7
7
  disabledOnDefaultGlobalSurface: string;
8
8
  darkGlobalSurface: string;
9
9
  onDarkGlobalSurface: string;
10
+ overlayGlobalSurface: string;
10
11
  primaryOutline: string;
11
12
  secondaryOutline: string;
12
13
  inactiveOutline: string;
@@ -63,6 +63,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
63
63
  disabledOnDefaultGlobalSurface: string;
64
64
  darkGlobalSurface: string;
65
65
  onDarkGlobalSurface: string;
66
+ overlayGlobalSurface: string;
66
67
  primaryOutline: string;
67
68
  secondaryOutline: string;
68
69
  inactiveOutline: string;
@@ -8,6 +8,7 @@ interface Fonts {
8
8
  playful: FontWeights;
9
9
  }
10
10
  interface FontSizes {
11
+ '7xlarge': number;
11
12
  xxxxxlarge: number;
12
13
  xxxxlarge: number;
13
14
  xxxlarge: number;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
- import { FooterText } from '../StyledSelect';
4
-
5
- describe('FooterText', () => {
6
- it('has correct style', () => {
7
- const { toJSON, getByText } = renderWithTheme(
8
- <FooterText>Confirm</FooterText>
9
- );
10
-
11
- expect(getByText('Confirm')).toBeDefined();
12
- expect(toJSON()).toMatchSnapshot();
13
- });
14
- });
@@ -1,29 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`FooterText has correct style 1`] = `
4
- <Text
5
- style={
6
- Array [
7
- Object {
8
- "color": "#001f23",
9
- "fontFamily": "BeVietnamPro-Regular",
10
- "fontSize": 14,
11
- "letterSpacing": 0.42,
12
- "lineHeight": 22,
13
- },
14
- Array [
15
- Object {
16
- "color": "#795e90",
17
- },
18
- undefined,
19
- ],
20
- ]
21
- }
22
- themeFontSize="medium"
23
- themeFontWeight="regular"
24
- themeIntent="body"
25
- themeTypeface="neutral"
26
- >
27
- Confirm
28
- </Text>
29
- `;