@hero-design/rn 8.83.0 → 8.84.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/CHANGELOG.md +6 -0
- package/es/index.js +107 -49
- package/lib/index.js +107 -49
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +73 -26
- package/src/components/Button/StyledButton.tsx +137 -48
- package/src/components/Button/UtilityButton/StyledUtilityButton.tsx +1 -1
- package/src/components/Button/__tests__/Button.spec.tsx +39 -31
- package/src/components/Button/__tests__/StyledButton.spec.tsx +52 -0
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +774 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +489 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +14 -4
- package/src/theme/components/button.ts +14 -4
- package/stats/8.84.0/rn-stats.html +4842 -0
- package/types/components/Button/Button.d.ts +2 -2
- package/types/components/Button/StyledButton.d.ts +11 -1
- package/types/theme/components/button.d.ts +14 -4
|
@@ -50,8 +50,8 @@ export interface ButtonProps {
|
|
|
50
50
|
/**
|
|
51
51
|
* Button type.
|
|
52
52
|
*/
|
|
53
|
-
variant?: 'filled' | 'outlined' | 'text' | 'inline-text';
|
|
53
|
+
variant?: 'filled' | 'outlined' | 'text' | 'inline-text' | 'filled-compact' | 'outlined-compact';
|
|
54
54
|
}
|
|
55
|
-
export declare const getThemeVariant: (variant: "filled" | "outlined" | "text", intent: Intent) => ThemeVariant;
|
|
55
|
+
export declare const getThemeVariant: (variant: "filled" | "outlined" | "text" | "filled-compact" | "outlined-compact", intent: Intent) => ThemeVariant;
|
|
56
56
|
declare const Button: ({ accessibilityHint, accessibilityLabel, disabled, icon, intent, loading, onPress, rightIcon, style, testID, text, variant, }: ButtonProps) => JSX.Element;
|
|
57
57
|
export default Button;
|
|
@@ -10,6 +10,7 @@ declare const StyledButtonContainer: import("@emotion/native").StyledComponent<i
|
|
|
10
10
|
themeButtonVariant: ThemeVariant;
|
|
11
11
|
loading?: boolean;
|
|
12
12
|
themeInlineText?: boolean;
|
|
13
|
+
themeIsCompact?: boolean;
|
|
13
14
|
}, {}, {
|
|
14
15
|
ref?: import("react").Ref<TouchableHighlight> | undefined;
|
|
15
16
|
}>;
|
|
@@ -20,6 +21,13 @@ declare const StyledButtonText: import("@emotion/native").StyledComponent<import
|
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
themeButtonVariant: ThemeVariant;
|
|
22
23
|
}, {}, {}>;
|
|
24
|
+
declare const StyledSmallButtonText: import("@emotion/native").StyledComponent<import("../Typography/Title").TitleProps & {
|
|
25
|
+
theme?: Theme;
|
|
26
|
+
as?: React.ElementType;
|
|
27
|
+
} & {
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
themeButtonVariant: ThemeVariant;
|
|
30
|
+
} & import("../Typography/Body").BodyProps, {}, {}>;
|
|
23
31
|
declare const StyledButtonTitleOfVariantText: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
|
|
24
32
|
theme?: Theme;
|
|
25
33
|
as?: React.ElementType;
|
|
@@ -33,6 +41,7 @@ declare const StyledButtonIconWrapper: import("@emotion/native").StyledComponent
|
|
|
33
41
|
as?: React.ElementType;
|
|
34
42
|
} & {
|
|
35
43
|
themePosition: "left" | "right";
|
|
44
|
+
themeIsCompact?: boolean;
|
|
36
45
|
}, {}, {
|
|
37
46
|
ref?: import("react").Ref<View> | undefined;
|
|
38
47
|
}>;
|
|
@@ -43,6 +52,7 @@ declare const StyledButtonIcon: import("@emotion/native").StyledComponent<import
|
|
|
43
52
|
disabled?: boolean;
|
|
44
53
|
themeButtonVariant: ThemeVariant;
|
|
45
54
|
themeIsPressed?: boolean;
|
|
55
|
+
themeIsCompact?: boolean;
|
|
46
56
|
}, {}, {}>;
|
|
47
|
-
export { StyledButtonContainer, StyledButtonText, StyledButtonIconWrapper, StyledButtonIcon, StyledButtonTitleOfVariantText, };
|
|
57
|
+
export { StyledButtonContainer, StyledButtonText, StyledSmallButtonText, StyledButtonIconWrapper, StyledButtonIcon, StyledButtonTitleOfVariantText, };
|
|
48
58
|
export type { Intent, ThemeVariant };
|
|
@@ -16,7 +16,10 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
16
16
|
textVariant: number;
|
|
17
17
|
};
|
|
18
18
|
sizes: {
|
|
19
|
-
iconSize:
|
|
19
|
+
iconSize: {
|
|
20
|
+
default: number;
|
|
21
|
+
compact: number;
|
|
22
|
+
};
|
|
20
23
|
};
|
|
21
24
|
radii: {
|
|
22
25
|
default: number;
|
|
@@ -52,9 +55,16 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
52
55
|
};
|
|
53
56
|
};
|
|
54
57
|
space: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
default: {
|
|
59
|
+
buttonPadding: number;
|
|
60
|
+
iconPadding: number;
|
|
61
|
+
textButtonPadding: number;
|
|
62
|
+
};
|
|
63
|
+
compact: {
|
|
64
|
+
buttonPaddingVertical: number;
|
|
65
|
+
buttonPaddingHorizontal: number;
|
|
66
|
+
iconPadding: number;
|
|
67
|
+
};
|
|
58
68
|
utilityPadding: number;
|
|
59
69
|
};
|
|
60
70
|
};
|