@hero-design/rn 7.4.0 → 7.5.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 +2 -2
- package/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +4117 -3926
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +4111 -3919
- package/package.json +2 -2
- package/playground/package.json +3 -3
- package/playground/src/Alert.tsx +80 -0
- package/playground/src/App.tsx +6 -0
- package/playground/src/MultipleThemes.tsx +34 -0
- package/src/components/Alert/StyledAlert.tsx +48 -0
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +686 -0
- package/src/components/Alert/__tests__/index.spec.tsx +83 -0
- package/src/components/Alert/index.tsx +109 -0
- package/src/components/Icon/HeroIcon/selection.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +22 -0
- package/src/theme/components/alert.ts +32 -0
- package/src/theme/global/colors.ts +1 -0
- package/src/theme/index.ts +3 -0
- package/types/{src/components/Progress/StyledProgressCircle.d.ts → components/Alert/StyledAlert.d.ts} +13 -14
- package/types/{src/components/Avatar → components/Alert}/__tests__/index.spec.d.ts +0 -0
- package/types/components/Alert/index.d.ts +42 -0
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/theme/components/alert.d.ts +23 -0
- package/types/theme/global/colors.d.ts +1 -0
- package/types/theme/global/index.d.ts +1 -0
- package/types/theme/index.d.ts +2 -0
- package/.turbo/turbo-build:types.log +0 -2
- package/.turbo/turbo-test.log +0 -131
- package/.turbo/turbo-type-check.log +0 -7
- package/playground/src/Button.tsx~origin_master +0 -170
- package/types/playground/components/Avatar.d.ts +0 -2
- package/types/playground/components/Badge.d.ts +0 -2
- package/types/playground/components/BottomNavigation.d.ts +0 -2
- package/types/playground/components/Button.d.ts +0 -2
- package/types/playground/components/Card.d.ts +0 -2
- package/types/playground/components/Collapse.d.ts +0 -2
- package/types/playground/components/Divider.d.ts +0 -2
- package/types/playground/components/Drawer.d.ts +0 -2
- package/types/playground/components/FAB.d.ts +0 -2
- package/types/playground/components/Icon.d.ts +0 -2
- package/types/playground/components/IconButton.d.ts +0 -2
- package/types/playground/components/Progress.d.ts +0 -2
- package/types/playground/components/Tabs.d.ts +0 -2
- package/types/playground/components/Tag.d.ts +0 -2
- package/types/playground/components/Typography.d.ts +0 -2
- package/types/playground/index.d.ts +0 -2
- package/types/src/components/Avatar/StyledAvatar.d.ts +0 -46
- package/types/src/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
- package/types/src/components/Avatar/index.d.ts +0 -25
- package/types/src/components/Badge/Status.d.ts +0 -24
- package/types/src/components/Badge/StyledBadge.d.ts +0 -28
- package/types/src/components/Badge/__tests__/Badge.spec.d.ts +0 -1
- package/types/src/components/Badge/__tests__/Status.spec.d.ts +0 -1
- package/types/src/components/Badge/index.d.ts +0 -32
- package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -52
- package/types/src/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/BottomNavigation/index.d.ts +0 -45
- package/types/src/components/Button/Button.d.ts +0 -57
- package/types/src/components/Button/IconButton.d.ts +0 -34
- package/types/src/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -20
- package/types/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
- package/types/src/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Button/LoadingIndicator/index.d.ts +0 -26
- package/types/src/components/Button/StyledButton.d.ts +0 -40
- package/types/src/components/Button/__tests__/Button.spec.d.ts +0 -1
- package/types/src/components/Button/__tests__/IconButton.spec.d.ts +0 -1
- package/types/src/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
- package/types/src/components/Button/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Button/index.d.ts +0 -8
- package/types/src/components/Card/StyledCard.d.ts +0 -17
- package/types/src/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
- package/types/src/components/Card/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Card/index.d.ts +0 -22
- package/types/src/components/Collapse/StyledCollapse.d.ts +0 -15
- package/types/src/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
- package/types/src/components/Collapse/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Collapse/index.d.ts +0 -23
- package/types/src/components/Divider/StyledDivider.d.ts +0 -13
- package/types/src/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
- package/types/src/components/Divider/index.d.ts +0 -21
- package/types/src/components/Drawer/StyledDrawer.d.ts +0 -25
- package/types/src/components/Drawer/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Drawer/index.d.ts +0 -25
- package/types/src/components/FAB/ActionGroup/ActionItem.d.ts +0 -12
- package/types/src/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -30
- package/types/src/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -13
- package/types/src/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/FAB/ActionGroup/index.d.ts +0 -34
- package/types/src/components/FAB/AnimatedFABIcon.d.ts +0 -6
- package/types/src/components/FAB/FAB.d.ts +0 -34
- package/types/src/components/FAB/StyledFAB.d.ts +0 -20
- package/types/src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
- package/types/src/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
- package/types/src/components/FAB/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/FAB/index.d.ts +0 -4
- package/types/src/components/Icon/HeroIcon/index.d.ts +0 -13
- package/types/src/components/Icon/IconList.d.ts +0 -2
- package/types/src/components/Icon/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Icon/index.d.ts +0 -27
- package/types/src/components/Icon/utils.d.ts +0 -2
- package/types/src/components/Progress/ProgressBar.d.ts +0 -18
- package/types/src/components/Progress/ProgressCircle.d.ts +0 -18
- package/types/src/components/Progress/StyledProgressBar.d.ts +0 -18
- package/types/src/components/Progress/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Progress/index.d.ts +0 -5
- package/types/src/components/Progress/types.d.ts +0 -1
- package/types/src/components/Tabs/ActiveTabIndicator.d.ts +0 -8
- package/types/src/components/Tabs/ScrollableTabs.d.ts +0 -3
- package/types/src/components/Tabs/StyledScrollableTabs.d.ts +0 -61
- package/types/src/components/Tabs/StyledTabs.d.ts +0 -55
- package/types/src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
- package/types/src/components/Tabs/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Tabs/index.d.ts +0 -54
- package/types/src/components/Tabs/utils.d.ts +0 -2
- package/types/src/components/Tag/StyledTag.d.ts +0 -20
- package/types/src/components/Tag/__tests__/Tag.spec.d.ts +0 -1
- package/types/src/components/Tag/index.d.ts +0 -21
- package/types/src/components/Typography/Text/StyledText.d.ts +0 -13
- package/types/src/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
- package/types/src/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
- package/types/src/components/Typography/Text/index.d.ts +0 -30
- package/types/src/components/Typography/index.d.ts +0 -6
- package/types/src/index.d.ts +0 -19
- package/types/src/testHelpers/renderWithTheme.d.ts +0 -3
- package/types/src/theme/__tests__/index.spec.d.ts +0 -1
- package/types/src/theme/components/avatar.d.ts +0 -32
- package/types/src/theme/components/badge.d.ts +0 -29
- package/types/src/theme/components/bottomNavigation.d.ts +0 -23
- package/types/src/theme/components/button.d.ts +0 -37
- package/types/src/theme/components/card.d.ts +0 -10
- package/types/src/theme/components/divider.d.ts +0 -17
- package/types/src/theme/components/drawer.d.ts +0 -21
- package/types/src/theme/components/fab.d.ts +0 -51
- package/types/src/theme/components/icon.d.ts +0 -19
- package/types/src/theme/components/progress.d.ts +0 -21
- package/types/src/theme/components/tabs.d.ts +0 -27
- package/types/src/theme/components/tag.d.ts +0 -30
- package/types/src/theme/components/typography.d.ts +0 -26
- package/types/src/theme/global/borders.d.ts +0 -11
- package/types/src/theme/global/colors.d.ts +0 -31
- package/types/src/theme/global/index.d.ts +0 -41
- package/types/src/theme/global/scale.d.ts +0 -9
- package/types/src/theme/global/space.d.ts +0 -13
- package/types/src/theme/global/typography.d.ts +0 -21
- package/types/src/theme/index.d.ts +0 -35
- package/types/src/types.d.ts +0 -5
- package/types/src/utils/__tests__/scale.spec.d.ts +0 -1
- package/types/src/utils/helpers.d.ts +0 -2
- package/types/src/utils/hooks.d.ts +0 -1
- package/types/src/utils/scale.d.ts +0 -3
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ScrollView, View } from 'react-native';
|
|
3
|
-
|
|
4
|
-
import { Button, Typography, useTheme } from '../../src/index';
|
|
5
|
-
|
|
6
|
-
const ButtonPlayground = (): JSX.Element => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
return (
|
|
9
|
-
<ScrollView style={{ padding: theme.space.small }}>
|
|
10
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
11
|
-
Variants
|
|
12
|
-
</Typography.Text>
|
|
13
|
-
<View
|
|
14
|
-
style={{
|
|
15
|
-
flexDirection: 'column',
|
|
16
|
-
marginBottom: theme.space.large,
|
|
17
|
-
}}
|
|
18
|
-
>
|
|
19
|
-
<View
|
|
20
|
-
style={{
|
|
21
|
-
backgroundColor: theme.colors.primary,
|
|
22
|
-
paddingVertical: theme.space.large,
|
|
23
|
-
marginBottom: theme.space.medium,
|
|
24
|
-
}}
|
|
25
|
-
>
|
|
26
|
-
<Button
|
|
27
|
-
text="Basic Transparent"
|
|
28
|
-
variant="basic-transparent"
|
|
29
|
-
onPress={() => {}}
|
|
30
|
-
/>
|
|
31
|
-
</View>
|
|
32
|
-
<Button
|
|
33
|
-
text="Primary (Filled)"
|
|
34
|
-
variant="filled"
|
|
35
|
-
intent="primary"
|
|
36
|
-
onPress={() => {}}
|
|
37
|
-
style={{ marginBottom: theme.space.medium }}
|
|
38
|
-
/>
|
|
39
|
-
<Button
|
|
40
|
-
text="Secondary (Filled)"
|
|
41
|
-
variant="filled"
|
|
42
|
-
intent="secondary"
|
|
43
|
-
onPress={() => {}}
|
|
44
|
-
style={{ marginBottom: theme.space.medium }}
|
|
45
|
-
/>
|
|
46
|
-
<Button
|
|
47
|
-
text="Primary (Outlined)"
|
|
48
|
-
variant="outlined"
|
|
49
|
-
intent="primary"
|
|
50
|
-
onPress={() => {}}
|
|
51
|
-
style={{ marginBottom: theme.space.medium }}
|
|
52
|
-
/>
|
|
53
|
-
<Button
|
|
54
|
-
text="Secondary (Outlined)"
|
|
55
|
-
variant="outlined"
|
|
56
|
-
intent="secondary"
|
|
57
|
-
onPress={() => {}}
|
|
58
|
-
style={{ marginBottom: theme.space.medium }}
|
|
59
|
-
/>
|
|
60
|
-
</View>
|
|
61
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
62
|
-
With Icon
|
|
63
|
-
</Typography.Text>
|
|
64
|
-
<View
|
|
65
|
-
style={{
|
|
66
|
-
flexDirection: 'column',
|
|
67
|
-
marginBottom: theme.space.large,
|
|
68
|
-
}}
|
|
69
|
-
>
|
|
70
|
-
<Button
|
|
71
|
-
text="Add Item"
|
|
72
|
-
variant="filled"
|
|
73
|
-
intent="primary"
|
|
74
|
-
icon="add"
|
|
75
|
-
onPress={() => {}}
|
|
76
|
-
style={{ marginBottom: theme.space.medium }}
|
|
77
|
-
/>
|
|
78
|
-
<Button
|
|
79
|
-
text="Delete"
|
|
80
|
-
variant="filled"
|
|
81
|
-
intent="primary"
|
|
82
|
-
icon="trash-bin-outlined"
|
|
83
|
-
onPress={() => {}}
|
|
84
|
-
style={{ marginBottom: theme.space.medium }}
|
|
85
|
-
/>
|
|
86
|
-
<Button
|
|
87
|
-
text="More"
|
|
88
|
-
variant="outlined"
|
|
89
|
-
intent="secondary"
|
|
90
|
-
rightIcon="arrow-down"
|
|
91
|
-
onPress={() => {}}
|
|
92
|
-
style={{ marginBottom: theme.space.medium }}
|
|
93
|
-
/>
|
|
94
|
-
</View>
|
|
95
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
96
|
-
Loading
|
|
97
|
-
</Typography.Text>
|
|
98
|
-
<View
|
|
99
|
-
style={{
|
|
100
|
-
flexDirection: 'column',
|
|
101
|
-
marginBottom: theme.space.large,
|
|
102
|
-
}}
|
|
103
|
-
>
|
|
104
|
-
<View
|
|
105
|
-
style={{
|
|
106
|
-
backgroundColor: theme.colors.primary,
|
|
107
|
-
paddingVertical: theme.space.large,
|
|
108
|
-
marginBottom: theme.space.medium,
|
|
109
|
-
}}
|
|
110
|
-
>
|
|
111
|
-
<Button
|
|
112
|
-
text="Basic Transparent (Loading)"
|
|
113
|
-
variant="basic-transparent"
|
|
114
|
-
onPress={() => {}}
|
|
115
|
-
loading
|
|
116
|
-
/>
|
|
117
|
-
</View>
|
|
118
|
-
<Button
|
|
119
|
-
text="Filled (Loading)"
|
|
120
|
-
variant="filled"
|
|
121
|
-
intent="primary"
|
|
122
|
-
onPress={() => {}}
|
|
123
|
-
style={{ marginBottom: theme.space.medium }}
|
|
124
|
-
loading
|
|
125
|
-
/>
|
|
126
|
-
<Button
|
|
127
|
-
text="Outlined (Loading)"
|
|
128
|
-
variant="outlined"
|
|
129
|
-
intent="primary"
|
|
130
|
-
onPress={() => {}}
|
|
131
|
-
style={{ marginBottom: theme.space.medium }}
|
|
132
|
-
loading
|
|
133
|
-
/>
|
|
134
|
-
</View>
|
|
135
|
-
<Typography.Text style={{ marginBottom: theme.space.xsmall }}>
|
|
136
|
-
Disabled
|
|
137
|
-
</Typography.Text>
|
|
138
|
-
<View
|
|
139
|
-
style={{
|
|
140
|
-
flexDirection: 'column',
|
|
141
|
-
marginBottom: theme.space.large,
|
|
142
|
-
}}
|
|
143
|
-
>
|
|
144
|
-
<Button
|
|
145
|
-
text="Basic Transparent (Disabled)"
|
|
146
|
-
variant="basic-transparent"
|
|
147
|
-
onPress={() => {}}
|
|
148
|
-
style={{ marginBottom: theme.space.medium }}
|
|
149
|
-
disabled
|
|
150
|
-
/>
|
|
151
|
-
<Button
|
|
152
|
-
text="Filled (Disabled)"
|
|
153
|
-
variant="filled"
|
|
154
|
-
onPress={() => {}}
|
|
155
|
-
style={{ marginBottom: theme.space.medium }}
|
|
156
|
-
disabled
|
|
157
|
-
/>
|
|
158
|
-
<Button
|
|
159
|
-
text="Outlined (Disabled)"
|
|
160
|
-
variant="outlined"
|
|
161
|
-
onPress={() => {}}
|
|
162
|
-
style={{ marginBottom: theme.space.medium }}
|
|
163
|
-
disabled
|
|
164
|
-
/>
|
|
165
|
-
</View>
|
|
166
|
-
</ScrollView>
|
|
167
|
-
);
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
export default ButtonPlayground;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { View, Image, TouchableOpacity, Text } from 'react-native';
|
|
3
|
-
declare type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge';
|
|
4
|
-
declare type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
|
|
5
|
-
declare const StyledPressable: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
6
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
themeSize: ThemeSize;
|
|
10
|
-
themeIntent: ThemeIntent;
|
|
11
|
-
}, {}, {
|
|
12
|
-
ref?: import("react").Ref<TouchableOpacity> | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
themeSize: ThemeSize;
|
|
19
|
-
themeIntent: ThemeIntent;
|
|
20
|
-
}, {}, {
|
|
21
|
-
ref?: import("react").Ref<View> | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
declare const StyledTextWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
24
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
25
|
-
as?: import("react").ElementType<any> | undefined;
|
|
26
|
-
}, {}, {
|
|
27
|
-
ref?: import("react").Ref<View> | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
30
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
31
|
-
as?: import("react").ElementType<any> | undefined;
|
|
32
|
-
} & {
|
|
33
|
-
themeSize: ThemeSize;
|
|
34
|
-
themeIntent: ThemeIntent;
|
|
35
|
-
}, {}, {
|
|
36
|
-
ref?: import("react").Ref<Text> | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
declare const StyledImage: import("@emotion/native").StyledComponent<import("react-native").ImageProps & {
|
|
39
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
40
|
-
as?: import("react").ElementType<any> | undefined;
|
|
41
|
-
} & {
|
|
42
|
-
themeSize: ThemeSize;
|
|
43
|
-
}, {}, {
|
|
44
|
-
ref?: import("react").Ref<Image> | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
export { StyledPressable, StyledView, StyledImage, StyledTextWrapper, StyledText, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ImageSourcePropType, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
2
|
-
interface AvatarProps extends ViewProps {
|
|
3
|
-
/** Callback function when pressing component. */
|
|
4
|
-
onPress?: () => void;
|
|
5
|
-
/** Image source to be displayed on avatar. */
|
|
6
|
-
source?: ImageSourcePropType;
|
|
7
|
-
/** Renders title in the placeholder. */
|
|
8
|
-
title?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Intent of the Icon.
|
|
11
|
-
*/
|
|
12
|
-
intent?: 'primary' | 'info' | 'danger' | 'success' | 'warning';
|
|
13
|
-
/** Size of the avatar. */
|
|
14
|
-
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
15
|
-
/**
|
|
16
|
-
* Addditional style.
|
|
17
|
-
*/
|
|
18
|
-
style?: StyleProp<ViewStyle>;
|
|
19
|
-
/**
|
|
20
|
-
* Testing id of the component.
|
|
21
|
-
*/
|
|
22
|
-
testID?: string;
|
|
23
|
-
}
|
|
24
|
-
declare const Avatar: ({ onPress, source, testID, style, title, size, intent, }: AvatarProps) => JSX.Element | null;
|
|
25
|
-
export default Avatar;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
export interface StatusProps extends ViewProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* Whether the Status Badge is visible.
|
|
7
|
-
*/
|
|
8
|
-
visible?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
/**
|
|
11
|
-
* Visual intent color to apply to Status Badge.
|
|
12
|
-
*/
|
|
13
|
-
intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
14
|
-
/**
|
|
15
|
-
* Additional style.
|
|
16
|
-
*/
|
|
17
|
-
style?: StyleProp<ViewStyle>;
|
|
18
|
-
/**
|
|
19
|
-
* Testing id of the component.
|
|
20
|
-
*/
|
|
21
|
-
testID?: string;
|
|
22
|
-
}
|
|
23
|
-
declare const Status: ({ children, visible, intent, style, testID, ...nativeProps }: StatusProps) => JSX.Element;
|
|
24
|
-
export default Status;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Animated, Text } from 'react-native';
|
|
3
|
-
declare type ThemeIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
4
|
-
declare type ThemePadding = 'narrowContent' | 'wideContent';
|
|
5
|
-
declare const StyledView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
6
|
-
children?: import("react").ReactNode;
|
|
7
|
-
} & {
|
|
8
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
-
as?: import("react").ElementType<any> | undefined;
|
|
10
|
-
} & {
|
|
11
|
-
themeIntent: ThemeIntent;
|
|
12
|
-
themePadding: ThemePadding;
|
|
13
|
-
}, {}, {}>;
|
|
14
|
-
declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, {}, {
|
|
18
|
-
ref?: import("react").Ref<Text> | undefined;
|
|
19
|
-
}>;
|
|
20
|
-
declare const StyledStatus: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
21
|
-
children?: import("react").ReactNode;
|
|
22
|
-
} & {
|
|
23
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any> | undefined;
|
|
25
|
-
} & {
|
|
26
|
-
themeIntent: ThemeIntent;
|
|
27
|
-
}, {}, {}>;
|
|
28
|
-
export { StyledView, StyledText, StyledStatus };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Animated, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface BadgeProps extends React.ComponentProps<typeof Animated.View> {
|
|
4
|
-
/**
|
|
5
|
-
* Content of the Badge.
|
|
6
|
-
*/
|
|
7
|
-
content: string | number;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the Badge is visible.
|
|
10
|
-
*/
|
|
11
|
-
visible?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The maximum number displayed on the badge. If number exceeds this value, `${max}+` are displayed instead. (Only applied when content is number.)
|
|
14
|
-
*/
|
|
15
|
-
max?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Visual intent color to apply to Badge.
|
|
18
|
-
*/
|
|
19
|
-
intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived';
|
|
20
|
-
/**
|
|
21
|
-
* Additional style.
|
|
22
|
-
*/
|
|
23
|
-
style?: StyleProp<ViewStyle>;
|
|
24
|
-
/**
|
|
25
|
-
* Testing id of the component.
|
|
26
|
-
*/
|
|
27
|
-
testID?: string;
|
|
28
|
-
}
|
|
29
|
-
declare const _default: (({ content: originalContent, visible, max, intent, style, testID, ...nativeProps }: BadgeProps) => JSX.Element) & {
|
|
30
|
-
Status: ({ children, visible, intent, style, testID, ...nativeProps }: import("./Status").StatusProps) => JSX.Element;
|
|
31
|
-
};
|
|
32
|
-
export default _default;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
declare const BottomNavigationTab: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
as?: import("react").ElementType<any> | undefined;
|
|
6
|
-
} & {
|
|
7
|
-
themeVisibility?: boolean | undefined;
|
|
8
|
-
}, {}, {
|
|
9
|
-
ref?: import("react").Ref<View> | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
declare const BottomNavigationContainer: 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 ContentWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
18
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
-
as?: import("react").ElementType<any> | undefined;
|
|
20
|
-
}, {}, {
|
|
21
|
-
ref?: import("react").Ref<View> | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
declare const BottomBarWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
24
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
25
|
-
as?: import("react").ElementType<any> | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
themeInsets: {
|
|
28
|
-
top: number;
|
|
29
|
-
right: number;
|
|
30
|
-
bottom: number;
|
|
31
|
-
left: number;
|
|
32
|
-
};
|
|
33
|
-
}, {}, {
|
|
34
|
-
ref?: import("react").Ref<View> | undefined;
|
|
35
|
-
}>;
|
|
36
|
-
declare const BottomBar: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
37
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
38
|
-
as?: import("react").ElementType<any> | undefined;
|
|
39
|
-
}, {}, {
|
|
40
|
-
ref?: import("react").Ref<View> | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
declare const BottomBarItem: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
43
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
-
as?: import("react").ElementType<any> | undefined;
|
|
45
|
-
}, {}, {
|
|
46
|
-
ref?: import("react").Ref<View> | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
declare const StyledBottomBarText: import("@emotion/native").StyledComponent<import("../Typography/Text").TextProps & {
|
|
49
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
50
|
-
as?: import("react").ElementType<any> | undefined;
|
|
51
|
-
}, {}, {}>;
|
|
52
|
-
export { BottomBar, BottomBarItem, BottomNavigationTab, BottomNavigationContainer, BottomBarWrapper, ContentWrapper, StyledBottomBarText, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
3
|
-
import { IconName } from '../Icon';
|
|
4
|
-
export declare type BottomNavigationTabType = {
|
|
5
|
-
key: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
icon: IconName;
|
|
8
|
-
component: ReactNode;
|
|
9
|
-
testID?: string;
|
|
10
|
-
};
|
|
11
|
-
interface BottomNavigationProps extends ViewProps {
|
|
12
|
-
/**
|
|
13
|
-
* Callback which is called on tab press, receiving key of upcoming active Tab.
|
|
14
|
-
*/
|
|
15
|
-
onTabPress: (key: string) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Whether inactive tabs should be removed and unmounted in React.
|
|
18
|
-
* Defaults to `false`.
|
|
19
|
-
*/
|
|
20
|
-
renderActiveTabOnly?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Current selected tab key.
|
|
23
|
-
*/
|
|
24
|
-
selectedTabKey: string;
|
|
25
|
-
/**
|
|
26
|
-
* List of Tabs to be rendered. Each Tab must have an unique key.
|
|
27
|
-
*/
|
|
28
|
-
tabs: {
|
|
29
|
-
key: string;
|
|
30
|
-
title?: string;
|
|
31
|
-
icon: IconName;
|
|
32
|
-
component: ReactNode;
|
|
33
|
-
testID?: string;
|
|
34
|
-
}[];
|
|
35
|
-
/**
|
|
36
|
-
* Additional style.
|
|
37
|
-
*/
|
|
38
|
-
style?: StyleProp<ViewStyle>;
|
|
39
|
-
/**
|
|
40
|
-
* Testing id of the component.
|
|
41
|
-
*/
|
|
42
|
-
testID?: string;
|
|
43
|
-
}
|
|
44
|
-
declare const BottomNavigation: ({ onTabPress, renderActiveTabOnly, selectedTabKey, tabs, ...nativeProps }: BottomNavigationProps) => JSX.Element;
|
|
45
|
-
export default BottomNavigation;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ReactChild } from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { IconName } from '../Icon';
|
|
4
|
-
import { Intent, ThemeVariant } from './StyledButton';
|
|
5
|
-
export interface ButtonProps {
|
|
6
|
-
/**
|
|
7
|
-
* Helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.
|
|
8
|
-
*/
|
|
9
|
-
accessibilityHint?: string;
|
|
10
|
-
/**
|
|
11
|
-
* A succinct label in a localized string that identifies the accessibility element
|
|
12
|
-
*/
|
|
13
|
-
accessibilityLabel?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Disable state of button.
|
|
16
|
-
*/
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Places an icon within the button, before the button's text
|
|
20
|
-
*/
|
|
21
|
-
icon?: IconName;
|
|
22
|
-
/**
|
|
23
|
-
* Visual intent color to apply to button. It is required for `filled`, `outlined` and `text` variants.
|
|
24
|
-
*/
|
|
25
|
-
intent?: 'primary' | 'secondary';
|
|
26
|
-
/**
|
|
27
|
-
* Loading state of button.
|
|
28
|
-
*/
|
|
29
|
-
loading?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Set the handler to handle press event.
|
|
32
|
-
*/
|
|
33
|
-
onPress: () => void;
|
|
34
|
-
/**
|
|
35
|
-
* Places an icon within the button, after the button's text
|
|
36
|
-
*/
|
|
37
|
-
rightIcon?: IconName;
|
|
38
|
-
/**
|
|
39
|
-
* Addditional style.
|
|
40
|
-
*/
|
|
41
|
-
style?: StyleProp<ViewStyle>;
|
|
42
|
-
/**
|
|
43
|
-
* Testing id of the component.
|
|
44
|
-
*/
|
|
45
|
-
testID?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Button label.
|
|
48
|
-
*/
|
|
49
|
-
text: ReactChild;
|
|
50
|
-
/**
|
|
51
|
-
* Button type.
|
|
52
|
-
*/
|
|
53
|
-
variant?: 'basic-transparent' | 'filled' | 'outlined';
|
|
54
|
-
}
|
|
55
|
-
export declare const getThemeVariant: (variant: 'basic-transparent' | 'filled' | 'outlined', intent: Intent) => ThemeVariant;
|
|
56
|
-
declare const Button: ({ accessibilityHint, accessibilityLabel, disabled, icon, intent, loading, onPress, rightIcon, style, testID, text, variant, }: ButtonProps) => JSX.Element;
|
|
57
|
-
export default Button;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle, TouchableOpacityProps } from 'react-native';
|
|
2
|
-
import { IconProps, IconName } from '../Icon';
|
|
3
|
-
export interface IconButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Set how far you can touch from the button.
|
|
6
|
-
*/
|
|
7
|
-
hitSlop?: TouchableOpacityProps['hitSlop'];
|
|
8
|
-
/**
|
|
9
|
-
* Name of the Icon.
|
|
10
|
-
*/
|
|
11
|
-
icon: IconName;
|
|
12
|
-
/**
|
|
13
|
-
* Intent of the Icon.
|
|
14
|
-
*/
|
|
15
|
-
intent?: IconProps['intent'];
|
|
16
|
-
/**
|
|
17
|
-
* Set the handler to handle press event.
|
|
18
|
-
*/
|
|
19
|
-
onPress: () => void;
|
|
20
|
-
/**
|
|
21
|
-
* Size of the Icon.
|
|
22
|
-
*/
|
|
23
|
-
size?: IconProps['size'];
|
|
24
|
-
/**
|
|
25
|
-
* Additional style.
|
|
26
|
-
*/
|
|
27
|
-
style?: StyleProp<ViewStyle>;
|
|
28
|
-
/**
|
|
29
|
-
* Testing id of component.
|
|
30
|
-
*/
|
|
31
|
-
testID?: string;
|
|
32
|
-
}
|
|
33
|
-
declare const IconButton: ({ hitSlop, onPress, icon, testID, style, size, intent, }: IconButtonProps) => JSX.Element;
|
|
34
|
-
export default IconButton;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { View, ViewProps } from 'react-native';
|
|
3
|
-
import { Theme } from '@emotion/react';
|
|
4
|
-
declare type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'outlined-primary' | 'outlined-secondary';
|
|
5
|
-
declare const StyledLoadingIndicatorWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
6
|
-
theme?: Theme | undefined;
|
|
7
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
-
}, {}, {
|
|
9
|
-
ref?: import("react").Ref<View> | undefined;
|
|
10
|
-
}>;
|
|
11
|
-
declare const StyledLoadingDot: import("@emotion/native").StyledComponent<ViewProps & {
|
|
12
|
-
theme?: Theme | undefined;
|
|
13
|
-
as?: import("react").ElementType<any> | undefined;
|
|
14
|
-
} & {
|
|
15
|
-
size?: number | undefined;
|
|
16
|
-
themeVariant: ThemeVariant;
|
|
17
|
-
}, {}, {
|
|
18
|
-
ref?: import("react").Ref<View> | undefined;
|
|
19
|
-
}>;
|
|
20
|
-
export { StyledLoadingIndicatorWrapper, StyledLoadingDot };
|
package/types/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
2
|
-
declare type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'outlined-primary' | 'outlined-secondary';
|
|
3
|
-
interface LoadingIndicatorProps extends ViewProps {
|
|
4
|
-
/**
|
|
5
|
-
* Size of the loading dot.
|
|
6
|
-
*/
|
|
7
|
-
count?: number;
|
|
8
|
-
/**
|
|
9
|
-
* Size of the loading dot.
|
|
10
|
-
*/
|
|
11
|
-
size?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Additional style.
|
|
14
|
-
*/
|
|
15
|
-
style?: StyleProp<ViewStyle>;
|
|
16
|
-
/**
|
|
17
|
-
* Testing id of the component.
|
|
18
|
-
*/
|
|
19
|
-
testID?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Testing id of the component.
|
|
22
|
-
*/
|
|
23
|
-
themeVariant: ThemeVariant;
|
|
24
|
-
}
|
|
25
|
-
declare const LoadingIndicator: ({ count, size, testID, themeVariant, ...nativeProps }: LoadingIndicatorProps) => JSX.Element;
|
|
26
|
-
export default LoadingIndicator;
|