@hero-design/rn 8.32.1 → 8.33.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.
- package/.turbo/turbo-build.log +1 -1
- package/es/index.js +163 -54
- package/lib/index.js +163 -54
- package/package.json +5 -5
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +2 -1
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +6 -6
- package/src/components/FAB/ActionGroup/ActionItem.tsx +44 -15
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +982 -819
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +4 -11
- package/src/components/FAB/ActionGroup/index.tsx +119 -93
- package/src/components/FAB/AnimatedFABIcon.tsx +3 -5
- package/src/components/FAB/FAB.tsx +108 -28
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +27 -9
- package/src/components/FAB/__tests__/index.spec.tsx +22 -2
- package/src/components/Typography/Text/index.tsx +19 -12
- package/src/components/Typography/index.tsx +3 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +1 -0
- package/src/theme/components/button.ts +1 -0
- package/src/types.ts +4 -0
- package/testUtils/setup.tsx +2 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +6 -2
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +1 -1
- package/types/components/FAB/ActionGroup/index.d.ts +7 -1
- package/types/components/FAB/FAB.d.ts +8 -2
- package/types/components/FAB/index.d.ts +3 -2
- package/types/components/Typography/index.d.ts +3 -0
- package/types/theme/components/button.d.ts +1 -0
- package/types/types.d.ts +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
3
|
import Icon from '../../Icon';
|
|
4
4
|
export interface ActionItemProps {
|
|
5
5
|
testID?: string;
|
|
@@ -9,5 +9,9 @@ export interface ActionItemProps {
|
|
|
9
9
|
style?: StyleProp<ViewStyle>;
|
|
10
10
|
key?: string;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
interface AnimatedActionItemProps extends ActionItemProps {
|
|
13
|
+
index: number;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const ActionItem: ({ icon, title, onPress, style, testID, index, active, }: AnimatedActionItemProps) => JSX.Element;
|
|
13
17
|
export default ActionItem;
|
|
@@ -14,7 +14,7 @@ declare const StyledActionGroupContainer: import("@emotion/native").StyledCompon
|
|
|
14
14
|
theme?: import("@emotion/react").Theme | undefined;
|
|
15
15
|
as?: import("react").ElementType<any> | undefined;
|
|
16
16
|
}, {}, {}>;
|
|
17
|
-
declare const StyledFAB: import("@emotion/native").StyledComponent<import("../FAB").FABProps & {
|
|
17
|
+
declare const StyledFAB: import("@emotion/native").StyledComponent<import("../FAB").FABProps & import("react").RefAttributes<import("../FAB").FABHandles> & {
|
|
18
18
|
theme?: import("@emotion/react").Theme | undefined;
|
|
19
19
|
as?: import("react").ElementType<any> | undefined;
|
|
20
20
|
}, {}, {}>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { IconName } from '../../Icon';
|
|
3
4
|
import type { ActionItemProps } from './ActionItem';
|
|
5
|
+
export type ActionGroupHandles = {
|
|
6
|
+
showFAB: () => void;
|
|
7
|
+
collapseFAB: () => void;
|
|
8
|
+
hideFAB: () => void;
|
|
9
|
+
};
|
|
4
10
|
export interface ActionGroupProps {
|
|
5
11
|
/**
|
|
6
12
|
* Title of the action group header.
|
|
@@ -35,5 +41,5 @@ export interface ActionGroupProps {
|
|
|
35
41
|
*/
|
|
36
42
|
testID?: string;
|
|
37
43
|
}
|
|
38
|
-
declare const ActionGroup:
|
|
44
|
+
declare const ActionGroup: React.ForwardRefExoticComponent<ActionGroupProps & React.RefAttributes<ActionGroupHandles>>;
|
|
39
45
|
export default ActionGroup;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { IconName } from '../Icon';
|
|
4
|
+
export type FABHandles = {
|
|
5
|
+
show: () => void;
|
|
6
|
+
collapse: () => void;
|
|
7
|
+
hide: () => void;
|
|
8
|
+
};
|
|
3
9
|
export interface FABProps {
|
|
4
10
|
/**
|
|
5
11
|
* Name of the Icon.
|
|
@@ -30,5 +36,5 @@ export interface FABProps {
|
|
|
30
36
|
*/
|
|
31
37
|
testID?: string;
|
|
32
38
|
}
|
|
33
|
-
declare const FAB:
|
|
39
|
+
declare const FAB: React.ForwardRefExoticComponent<FABProps & React.RefAttributes<FABHandles>>;
|
|
34
40
|
export default FAB;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: import("react").ForwardRefExoticComponent<import("./FAB").FABProps & import("react").RefAttributes<import("./FAB").FABHandles>> & {
|
|
3
|
+
ActionGroup: import("react").ForwardRefExoticComponent<import("./ActionGroup").ActionGroupProps & import("react").RefAttributes<import("./ActionGroup").ActionGroupHandles>>;
|
|
3
4
|
};
|
|
4
5
|
export default _default;
|
|
@@ -4,6 +4,9 @@ import Label from './Label';
|
|
|
4
4
|
import Title from './Title';
|
|
5
5
|
import Body from './Body';
|
|
6
6
|
interface TypographyProps {
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Typography.Text will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.
|
|
9
|
+
*/
|
|
7
10
|
Text: typeof Text;
|
|
8
11
|
Caption: typeof Caption;
|
|
9
12
|
Label: typeof Label;
|
package/types/types.d.ts
CHANGED
|
@@ -9,4 +9,6 @@ import type { ListRenderOptionInfo, SectionListRenderOptionInfo } from './compon
|
|
|
9
9
|
import { SwipeableProps } from './components/Swipeable';
|
|
10
10
|
import { TextProps } from './components/Typography/Text';
|
|
11
11
|
import { CardCarouselHandles } from './components/Carousel/CardCarousel';
|
|
12
|
-
|
|
12
|
+
import { FABHandles } from './components/FAB/FAB';
|
|
13
|
+
import { ActionGroupHandles } from './components/FAB/ActionGroup';
|
|
14
|
+
export type { BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, TextProps, TextInputHandles, Theme, CardCarouselHandles, FABHandles, ActionGroupHandles, };
|