@hero-design/rn 6.7.0 → 6.7.3
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/.eslintrc.json +10 -2
- package/es/index.js +112 -76
- package/lib/index.js +112 -75
- package/package.json +10 -4
- package/playground/components/ExampleComponent.tsx +8 -0
- package/playground/index.tsx +77 -17
- package/src/components/ExampleComponent/StyledView.tsx +16 -22
- package/src/components/ExampleComponent/__tests__/StyledView.spec.tsx +6 -3
- package/src/components/ExampleComponent/__tests__/__snapshots__/StyledView.spec.tsx.snap +4 -4
- package/src/components/ExampleComponent/index.tsx +5 -5
- package/src/index.ts +3 -3
- package/src/styled-components.ts +14 -0
- package/src/styled.d.ts +3 -4
- package/src/theme/components/exampleComponent.ts +19 -0
- package/src/theme/global/colors.ts +24 -1
- package/src/theme/global/index.ts +19 -0
- package/src/theme/global/typography.ts +26 -0
- package/src/theme/index.ts +15 -15
- package/tsconfig.json +2 -1
- package/types/components/ExampleComponent/StyledView.d.ts +4 -9
- package/types/components/ExampleComponent/index.d.ts +3 -3
- package/types/index.d.ts +3 -3
- package/types/styled-components.d.ts +6 -0
- package/types/theme/colors.d.ts +24 -0
- package/types/theme/components/exampleComponent.d.ts +14 -0
- package/types/theme/global/colors.d.ts +23 -1
- package/types/theme/global/index.d.ts +58 -0
- package/types/theme/global/typography.d.ts +21 -0
- package/types/theme/index.d.ts +8 -134
- package/types/theme/space.d.ts +12 -0
- package/types/theme/typography.d.ts +21 -0
- package/src/theme/components/demoStyle.ts +0 -16
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const globalTheme: {
|
|
2
|
+
colors: {
|
|
3
|
+
primary: string;
|
|
4
|
+
primaryLight: string;
|
|
5
|
+
info: string;
|
|
6
|
+
infoLight: string;
|
|
7
|
+
infoBackground: string;
|
|
8
|
+
success: string;
|
|
9
|
+
successDark: string;
|
|
10
|
+
successLight: string;
|
|
11
|
+
successBackground: string;
|
|
12
|
+
danger: string;
|
|
13
|
+
dangerLight: string;
|
|
14
|
+
dangerBackground: string;
|
|
15
|
+
warning: string;
|
|
16
|
+
warningDark: string;
|
|
17
|
+
warningBackground: string;
|
|
18
|
+
platformBackground: string;
|
|
19
|
+
backgroundDark: string;
|
|
20
|
+
text: string;
|
|
21
|
+
disabledText: string;
|
|
22
|
+
invertedText: string;
|
|
23
|
+
};
|
|
24
|
+
space: {
|
|
25
|
+
xxsmall: number;
|
|
26
|
+
xsmall: number;
|
|
27
|
+
small: number;
|
|
28
|
+
medium: number;
|
|
29
|
+
large: number;
|
|
30
|
+
xlarge: number;
|
|
31
|
+
xxlarge: number;
|
|
32
|
+
xxxlarge: number;
|
|
33
|
+
xxxxlarge: number;
|
|
34
|
+
};
|
|
35
|
+
fontSizes: {
|
|
36
|
+
xlarge: number;
|
|
37
|
+
large: number;
|
|
38
|
+
medium: number;
|
|
39
|
+
small: number;
|
|
40
|
+
xsmall: number;
|
|
41
|
+
};
|
|
42
|
+
fontWeights: {
|
|
43
|
+
light: number;
|
|
44
|
+
regular: number;
|
|
45
|
+
semiBold: number;
|
|
46
|
+
bold: number;
|
|
47
|
+
};
|
|
48
|
+
lineHeights: {
|
|
49
|
+
xlarge: number;
|
|
50
|
+
large: number;
|
|
51
|
+
medium: number;
|
|
52
|
+
small: number;
|
|
53
|
+
xsmall: number;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
declare type GlobalTheme = typeof globalTheme;
|
|
57
|
+
export { GlobalTheme };
|
|
58
|
+
export default globalTheme;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const fontSizes: {
|
|
2
|
+
xlarge: number;
|
|
3
|
+
large: number;
|
|
4
|
+
medium: number;
|
|
5
|
+
small: number;
|
|
6
|
+
xsmall: number;
|
|
7
|
+
};
|
|
8
|
+
declare const fontWeights: {
|
|
9
|
+
light: number;
|
|
10
|
+
regular: number;
|
|
11
|
+
semiBold: number;
|
|
12
|
+
bold: number;
|
|
13
|
+
};
|
|
14
|
+
declare const lineHeights: {
|
|
15
|
+
xlarge: number;
|
|
16
|
+
large: number;
|
|
17
|
+
medium: number;
|
|
18
|
+
small: number;
|
|
19
|
+
xsmall: number;
|
|
20
|
+
};
|
|
21
|
+
export { fontSizes, fontWeights, lineHeights };
|
package/types/theme/index.d.ts
CHANGED
|
@@ -1,137 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
warningBg: string;
|
|
7
|
-
};
|
|
8
|
-
primary: string;
|
|
9
|
-
primaryDark: string;
|
|
10
|
-
primaryLight: string;
|
|
11
|
-
primaryBackground: string;
|
|
12
|
-
platformBackground: string;
|
|
13
|
-
backgroundDark: string;
|
|
14
|
-
backgroundLight: string;
|
|
15
|
-
info: string;
|
|
16
|
-
infoDark: string;
|
|
17
|
-
infoLight: string;
|
|
18
|
-
infoBackground: string;
|
|
19
|
-
success: string;
|
|
20
|
-
successDark: string;
|
|
21
|
-
successLight: string;
|
|
22
|
-
successBackground: string;
|
|
23
|
-
danger: string;
|
|
24
|
-
dangerDark: string;
|
|
25
|
-
dangerLight: string;
|
|
26
|
-
dangerBackground: string;
|
|
27
|
-
warning: string;
|
|
28
|
-
warningDark: string;
|
|
29
|
-
warningLight: string;
|
|
30
|
-
warningBackground: string;
|
|
31
|
-
error: string;
|
|
32
|
-
errorDark: string;
|
|
33
|
-
errorLight: string;
|
|
34
|
-
errorBackground: string;
|
|
35
|
-
headingText: string;
|
|
36
|
-
text: string;
|
|
37
|
-
subduedText: string;
|
|
38
|
-
disabledText: string;
|
|
39
|
-
outline: string;
|
|
40
|
-
disabledBackground: string;
|
|
41
|
-
black: string;
|
|
42
|
-
blue: string;
|
|
43
|
-
blueDark30: string;
|
|
44
|
-
blueDark75: string;
|
|
45
|
-
blueLight30: string;
|
|
46
|
-
blueLight75: string;
|
|
47
|
-
blueLight90: string;
|
|
48
|
-
dodgerBlue: string;
|
|
49
|
-
dodgerBlueDark30: string;
|
|
50
|
-
dodgerBlueLight30: string;
|
|
51
|
-
dodgerBlueLight90: string;
|
|
52
|
-
green: string;
|
|
53
|
-
greenDark15: string;
|
|
54
|
-
greenDark30: string;
|
|
55
|
-
greenDark75: string;
|
|
56
|
-
greenLight30: string;
|
|
57
|
-
greenLight90: string;
|
|
58
|
-
grey: string;
|
|
59
|
-
greyDark30: string;
|
|
60
|
-
greyDark45: string;
|
|
61
|
-
greyDark60: string;
|
|
62
|
-
greyDark75: string;
|
|
63
|
-
greyLight45: string;
|
|
64
|
-
greyLight60: string;
|
|
65
|
-
greyLight75: string;
|
|
66
|
-
greyLight85: string;
|
|
67
|
-
greyLight90: string;
|
|
68
|
-
grotesqueGreen: string;
|
|
69
|
-
grotesqueGreenDark45: string;
|
|
70
|
-
grotesqueGreenLight60: string;
|
|
71
|
-
grotesqueGreenLight75: string;
|
|
72
|
-
grotesqueGreenLight90: string;
|
|
73
|
-
orange: string;
|
|
74
|
-
orangeDark15: string;
|
|
75
|
-
orangeDark30: string;
|
|
76
|
-
orangeDark75: string;
|
|
77
|
-
orangeLight30: string;
|
|
78
|
-
orangeLight75: string;
|
|
79
|
-
orangeLight90: string;
|
|
80
|
-
pink: string;
|
|
81
|
-
pinkDark15: string;
|
|
82
|
-
pinkDark30: string;
|
|
83
|
-
pinkDark45: string;
|
|
84
|
-
pinkDark75: string;
|
|
85
|
-
pinkLight30: string;
|
|
86
|
-
pinkLight45: string;
|
|
87
|
-
pinkLight75: string;
|
|
88
|
-
pinkLight90: string;
|
|
89
|
-
purple: string;
|
|
90
|
-
red: string;
|
|
91
|
-
redDark15: string;
|
|
92
|
-
redDark30: string;
|
|
93
|
-
redDark75: string;
|
|
94
|
-
redLight30: string;
|
|
95
|
-
redLight75: string;
|
|
96
|
-
redLight90: string;
|
|
97
|
-
smalt: string;
|
|
98
|
-
smaltDark75: string;
|
|
99
|
-
smaltLight30: string;
|
|
100
|
-
smaltLight45: string;
|
|
101
|
-
smaltLight90: string;
|
|
102
|
-
violet: string;
|
|
103
|
-
violetDark15: string;
|
|
104
|
-
violetDark30: string;
|
|
105
|
-
violetDark45: string;
|
|
106
|
-
violetDark75: string;
|
|
107
|
-
violetLight30: string;
|
|
108
|
-
violetLight60: string;
|
|
109
|
-
violetLight75: string;
|
|
110
|
-
violetLight90: string;
|
|
111
|
-
white: string;
|
|
112
|
-
yellow: string;
|
|
113
|
-
yellowDark15: string;
|
|
114
|
-
yellowDark75: string;
|
|
115
|
-
yellowLight60: string;
|
|
116
|
-
yellowLight90: string;
|
|
117
|
-
};
|
|
118
|
-
space: {
|
|
119
|
-
demoStyle: {
|
|
120
|
-
smallMargin: number;
|
|
121
|
-
mediumMargin: number;
|
|
122
|
-
largeMargin: number;
|
|
123
|
-
};
|
|
124
|
-
xxsmall: number;
|
|
125
|
-
xsmall: number;
|
|
126
|
-
small: number;
|
|
127
|
-
medium: number;
|
|
128
|
-
large: number;
|
|
129
|
-
xlarge: number;
|
|
130
|
-
xxlarge: number;
|
|
131
|
-
xxxlarge: number;
|
|
132
|
-
xxxxlarge: number;
|
|
1
|
+
import { GlobalTheme } from './global';
|
|
2
|
+
import getExampleComponentTheme from './components/exampleComponent';
|
|
3
|
+
declare type Theme = GlobalTheme & {
|
|
4
|
+
__hd__: {
|
|
5
|
+
exampleComponent: ReturnType<typeof getExampleComponentTheme>;
|
|
133
6
|
};
|
|
134
7
|
};
|
|
135
|
-
declare
|
|
136
|
-
|
|
8
|
+
declare const getTheme: (theme?: GlobalTheme) => Theme;
|
|
9
|
+
declare const theme: Theme;
|
|
10
|
+
export { Theme, getTheme };
|
|
137
11
|
export default theme;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const fontSizes: {
|
|
2
|
+
xlarge: number;
|
|
3
|
+
large: number;
|
|
4
|
+
medium: number;
|
|
5
|
+
small: number;
|
|
6
|
+
xsmall: number;
|
|
7
|
+
};
|
|
8
|
+
declare const fontWeights: {
|
|
9
|
+
light: number;
|
|
10
|
+
regular: number;
|
|
11
|
+
semiBold: number;
|
|
12
|
+
bold: number;
|
|
13
|
+
};
|
|
14
|
+
declare const lineHeights: {
|
|
15
|
+
xlarge: number;
|
|
16
|
+
large: number;
|
|
17
|
+
medium: number;
|
|
18
|
+
small: number;
|
|
19
|
+
xsmall: number;
|
|
20
|
+
};
|
|
21
|
+
export { fontSizes, fontWeights, lineHeights };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { systemPalette } from '../global/colors';
|
|
2
|
-
import { space } from '../global/space';
|
|
3
|
-
|
|
4
|
-
const demoStyleColors = {
|
|
5
|
-
primaryBg: systemPalette.primaryBackground,
|
|
6
|
-
dangerBg: systemPalette.dangerBackground,
|
|
7
|
-
warningBg: systemPalette.warningBackground,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const demoStyleSpace = {
|
|
11
|
-
smallMargin: space.xxsmall,
|
|
12
|
-
mediumMargin: space.medium,
|
|
13
|
-
largeMargin: space.xxxxlarge,
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { demoStyleColors, demoStyleSpace };
|