@hero-design/rn 8.84.3 → 8.86.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 +12 -0
- package/es/index.js +112 -27
- package/lib/index.js +112 -27
- package/package.json +1 -1
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +8 -0
- package/src/components/Box/__tests__/index.spec.tsx +1 -0
- package/src/components/Box/config.ts +4 -0
- package/src/components/Button/Button.tsx +22 -6
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +8 -2
- package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +3 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +139 -1
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +408 -3
- package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +3 -0
- package/src/components/Button/LoadingIndicator/index.tsx +4 -1
- package/src/components/Button/StyledButton.tsx +95 -5
- package/src/components/Button/__tests__/Button.spec.tsx +12 -0
- package/src/components/Button/__tests__/StyledButton.spec.tsx +10 -0
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +1240 -90
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +630 -40
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +5 -0
- package/src/theme/components/button.ts +5 -0
- package/stats/8.85.0/rn-stats.html +4842 -0
- package/stats/8.86.0/rn-stats.html +4842 -0
- package/types/components/Box/config.d.ts +4 -0
- package/types/components/Button/Button.d.ts +1 -1
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +3 -3
- package/types/theme/components/button.d.ts +5 -0
|
@@ -127,6 +127,10 @@ declare const config: {
|
|
|
127
127
|
readonly property: "paddingVertical";
|
|
128
128
|
readonly scale: "space";
|
|
129
129
|
};
|
|
130
|
+
readonly gap: {
|
|
131
|
+
readonly property: "gap";
|
|
132
|
+
readonly scale: "space";
|
|
133
|
+
};
|
|
130
134
|
readonly backgroundColor: {
|
|
131
135
|
readonly property: "backgroundColor";
|
|
132
136
|
readonly scale: "colors";
|
|
@@ -22,7 +22,7 @@ export interface ButtonProps {
|
|
|
22
22
|
/**
|
|
23
23
|
* Visual intent color to apply to button. It is required for `filled`, `outlined` and `text` variants.
|
|
24
24
|
*/
|
|
25
|
-
intent?: 'primary' | 'secondary' | 'danger';
|
|
25
|
+
intent?: 'primary' | 'secondary' | 'danger' | 'white';
|
|
26
26
|
/**
|
|
27
27
|
* Loading state of button.
|
|
28
28
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Theme } from '@emotion/react';
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
|
-
type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
|
|
4
|
+
type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'filled-white' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'outlined-white' | 'text-primary' | 'text-secondary' | 'text-danger' | 'text-white';
|
|
5
5
|
declare const StyledLoadingIndicatorWrapper: import("@emotion/native").StyledComponent<ViewProps & {
|
|
6
6
|
theme?: Theme;
|
|
7
7
|
as?: React.ElementType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
3
|
-
type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
|
|
3
|
+
type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'filled-white' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'outlined-white' | 'text-primary' | 'text-secondary' | 'text-danger' | 'text-white';
|
|
4
4
|
interface LoadingIndicatorProps extends ViewProps {
|
|
5
5
|
/**
|
|
6
6
|
* Size of the loading dot.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TouchableHighlight, View } from 'react-native';
|
|
2
2
|
import type { Theme } from '@emotion/react';
|
|
3
|
-
type Intent = 'primary' | 'secondary' | 'danger';
|
|
4
|
-
type ThemeVariant = 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'text-primary' | 'text-secondary' | 'text-danger';
|
|
3
|
+
type Intent = 'primary' | 'secondary' | 'danger' | 'white';
|
|
4
|
+
type ThemeVariant = 'filled-primary' | 'filled-secondary' | 'filled-danger' | 'filled-white' | 'outlined-primary' | 'outlined-secondary' | 'outlined-danger' | 'outlined-white' | 'text-primary' | 'text-secondary' | 'text-danger' | 'text-white';
|
|
5
5
|
declare const StyledButtonContainer: import("@emotion/native").StyledComponent<import("react-native").TouchableHighlightProps & {
|
|
6
6
|
theme?: Theme;
|
|
7
7
|
as?: React.ElementType;
|
|
@@ -33,7 +33,7 @@ declare const StyledButtonTitleOfVariantText: import("@emotion/native").StyledCo
|
|
|
33
33
|
as?: React.ElementType;
|
|
34
34
|
} & {
|
|
35
35
|
disabled?: boolean;
|
|
36
|
-
themeButtonVariant: "text-primary" | "text-secondary" | "text-danger";
|
|
36
|
+
themeButtonVariant: "text-primary" | "text-secondary" | "text-danger" | "text-white";
|
|
37
37
|
themeIsPressed?: boolean;
|
|
38
38
|
}, {}, {}>;
|
|
39
39
|
declare const StyledButtonIconWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
@@ -30,6 +30,7 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
30
30
|
primary: string;
|
|
31
31
|
secondary: string;
|
|
32
32
|
danger: string;
|
|
33
|
+
white: string;
|
|
33
34
|
defaultText: string;
|
|
34
35
|
disabledText: string;
|
|
35
36
|
disabledBorder: string;
|
|
@@ -41,17 +42,21 @@ declare const getButtonTheme: (theme: GlobalTheme) => {
|
|
|
41
42
|
filledPrimary: string;
|
|
42
43
|
filledSecondary: string;
|
|
43
44
|
filledDanger: string;
|
|
45
|
+
filledWhite: string;
|
|
44
46
|
outlinedPrimary: string;
|
|
45
47
|
outlinedSecondary: string;
|
|
46
48
|
outlineDanger: string;
|
|
49
|
+
outlineWhite: string;
|
|
47
50
|
textPrimary: string;
|
|
48
51
|
textSecondary: string;
|
|
49
52
|
textDanger: string;
|
|
53
|
+
textWhite: string;
|
|
50
54
|
};
|
|
51
55
|
pressedText: {
|
|
52
56
|
primary: string;
|
|
53
57
|
secondary: string;
|
|
54
58
|
danger: string;
|
|
59
|
+
white: string;
|
|
55
60
|
};
|
|
56
61
|
};
|
|
57
62
|
space: {
|