@hero-design/rn 8.45.0-test.0 → 8.45.1

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 (37) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +23 -2
  3. package/es/index.js +764 -578
  4. package/lib/index.js +764 -578
  5. package/package.json +6 -6
  6. package/src/components/Accordion/index.tsx +1 -1
  7. package/src/components/Avatar/AvatarStack/StyledAvatarStack.tsx +63 -9
  8. package/src/components/Avatar/AvatarStack/__tests__/StyledAvatarStack.spec.tsx +71 -9
  9. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +271 -2
  10. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +2156 -7
  11. package/src/components/Avatar/AvatarStack/__tests__/index.spec.tsx +140 -6
  12. package/src/components/Avatar/AvatarStack/index.tsx +94 -9
  13. package/src/components/Carousel/index.tsx +18 -11
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +108 -57
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +36 -19
  16. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +36 -19
  17. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +36 -19
  18. package/src/components/RichTextEditor/RichTextEditor.tsx +89 -38
  19. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +130 -102
  20. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +247 -146
  21. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +211 -127
  22. package/src/components/TextInput/StyledTextInput.tsx +9 -31
  23. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +0 -44
  24. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +21 -638
  25. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +1159 -833
  26. package/src/components/TextInput/__tests__/index.spec.tsx +2 -2
  27. package/src/components/TextInput/index.tsx +128 -57
  28. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +72 -38
  29. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +72 -38
  30. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -2
  31. package/src/theme/components/textInput.ts +2 -2
  32. package/types/components/Accordion/index.d.ts +1 -1
  33. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +13 -0
  34. package/types/components/Avatar/AvatarStack/index.d.ts +14 -2
  35. package/types/components/Avatar/index.d.ts +1 -1
  36. package/types/components/TextInput/StyledTextInput.d.ts +4 -24
  37. package/types/components/TextInput/index.d.ts +1 -0
@@ -1,12 +1,15 @@
1
1
  /// <reference types="react" />
2
2
  import { View } from 'react-native';
3
3
  import { AvatarProps } from '../Avatar';
4
+ type ThemeVariant = 'horizontal' | 'vertical';
4
5
  export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
5
6
  theme?: import("@emotion/react").Theme | undefined;
6
7
  as?: import("react").ElementType<any> | undefined;
7
8
  } & {
8
9
  themeSize: Required<AvatarProps>['size'];
9
10
  themeAvatarCount: number;
11
+ themeVariant: ThemeVariant;
12
+ themeHasSurplus: boolean;
10
13
  }, {}, {
11
14
  ref?: import("react").Ref<View> | undefined;
12
15
  }>;
@@ -15,4 +18,14 @@ export declare const StyledAvatar: import("@emotion/native").StyledComponent<Ava
15
18
  as?: import("react").ElementType<any> | undefined;
16
19
  } & {
17
20
  themeIndex: number;
21
+ themeVariant: ThemeVariant;
18
22
  }, {}, {}>;
23
+ export declare const StyledSurplusContainer: import("@emotion/native").StyledComponent<import("../../Box").BoxProps & {
24
+ theme?: import("@emotion/react").Theme | undefined;
25
+ as?: import("react").ElementType<any> | undefined;
26
+ } & {
27
+ themeIndex: number;
28
+ themeSize: AvatarProps['size'];
29
+ themeVariant: ThemeVariant;
30
+ }, {}, {}>;
31
+ export {};
@@ -1,4 +1,4 @@
1
- import React, { ReactElement } from 'react';
1
+ import React, { ReactElement, ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { AvatarProps } from '../Avatar';
4
4
  export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
@@ -10,6 +10,14 @@ export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
10
10
  * Max avatars to show.
11
11
  */
12
12
  max?: number;
13
+ /**
14
+ * The total number of avatars. Used for calculating the number of extra avatars.
15
+ */
16
+ total?: number;
17
+ /**
18
+ * Custom renderer of extraAvatars.
19
+ */
20
+ renderSurplus?: (value: number) => ReactNode;
13
21
  /**
14
22
  * Additional style.
15
23
  */
@@ -18,6 +26,10 @@ export interface AvatarStackProps extends Pick<AvatarProps, 'size'> {
18
26
  * Testing id of the component.
19
27
  */
20
28
  testID?: string;
29
+ /**
30
+ * Variant of the avatar stack.
31
+ */
32
+ variant?: 'horizontal' | 'vertical';
21
33
  }
22
- declare const AvatarStack: ({ children, max, size, style, testID, }: AvatarStackProps) => React.JSX.Element;
34
+ declare const AvatarStack: ({ children, max, size, style, testID, variant, total, renderSurplus, }: AvatarStackProps) => React.JSX.Element;
23
35
  export default AvatarStack;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { useAvatarColors } from './AvatarStack/utils';
3
3
  declare const _default: (({ onPress, source, testID, style, title, size, intent, }: import("./Avatar").AvatarProps) => import("react").JSX.Element | null) & {
4
- Stack: ({ children, max, size, style, testID, }: import("./AvatarStack").AvatarStackProps) => import("react").JSX.Element;
4
+ Stack: ({ children, max, size, style, testID, variant, total, renderSurplus, }: import("./AvatarStack").AvatarStackProps) => import("react").JSX.Element;
5
5
  };
6
6
  export default _default;
7
7
  export { useAvatarColors };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TextInput, View } from 'react-native';
2
+ import { TextInput, View, Animated } from 'react-native';
3
3
  export type State = 'default' | 'filled' | 'disabled' | 'readonly' | 'error';
4
4
  type Variant = 'text' | 'textarea';
5
5
  declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
@@ -8,32 +8,12 @@ declare const StyledContainer: import("@emotion/native").StyledComponent<import(
8
8
  }, {}, {
9
9
  ref?: import("react").Ref<View> | undefined;
10
10
  }>;
11
- declare const StyledLabelContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
12
- theme?: import("@emotion/react").Theme | undefined;
13
- as?: import("react").ElementType<any> | undefined;
14
- }, {}, {
15
- ref?: import("react").Ref<View> | undefined;
16
- }>;
17
- declare const StyledLabel: import("@emotion/native").StyledComponent<import("../Typography/Caption").CaptionProps & {
18
- theme?: import("@emotion/react").Theme | undefined;
19
- as?: import("react").ElementType<any> | undefined;
20
- } & {
21
- themeState: State;
22
- }, {}, {}>;
23
- declare const StyledAsteriskLabel: import("@emotion/native").StyledComponent<import("../Typography/Caption").CaptionProps & {
24
- theme?: import("@emotion/react").Theme | undefined;
25
- as?: import("react").ElementType<any> | undefined;
26
- } & {
27
- themeState: State;
28
- }, {}, {}>;
29
- declare const StyledLabelContainerInsideTextInput: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
+ declare const StyledLabelContainerInsideTextInput: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<View>> & {
30
12
  theme?: import("@emotion/react").Theme | undefined;
31
13
  as?: import("react").ElementType<any> | undefined;
32
14
  } & {
33
15
  themeVariant: Variant;
34
- }, {}, {
35
- ref?: import("react").Ref<View> | undefined;
36
- }>;
16
+ }, {}, {}>;
37
17
  declare const StyledLabelInsideTextInput: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
38
18
  theme?: import("@emotion/react").Theme | undefined;
39
19
  as?: import("react").ElementType<any> | undefined;
@@ -104,4 +84,4 @@ declare const StyledErrorAndMaxLengthContainer: import("@emotion/native").Styled
104
84
  }, {}, {
105
85
  ref?: import("react").Ref<View> | undefined;
106
86
  }>;
107
- export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledBorderBackDrop, StyledErrorAndMaxLengthContainer, };
87
+ export { StyledTextInputContainer, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledBorderBackDrop, StyledErrorAndMaxLengthContainer, };
@@ -91,5 +91,6 @@ export declare const getState: ({ disabled, error, editable, loading, isEmptyVal
91
91
  isFocused?: boolean | undefined;
92
92
  isEmptyValue?: boolean | undefined;
93
93
  }) => State;
94
+ export declare const LABEL_ANIMATION_DURATION = 150;
94
95
  declare const TextInput: React.ForwardRefExoticComponent<Omit<TextInputProps, "ref"> & React.RefAttributes<TextInputHandles>>;
95
96
  export default TextInput;