@hoddy-ui/core 1.0.93 → 1.0.95
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/package.json +1 -1
- package/src/hooks.ts +2 -1
- package/src/theme/colors.ts +77 -74
- package/src/types.ts +2 -0
package/package.json
CHANGED
package/src/hooks.ts
CHANGED
|
@@ -15,6 +15,7 @@ export const useTheme = () => {
|
|
|
15
15
|
};
|
|
16
16
|
export const useNavScreenOptions = (type: "stack" | "tab" | "drawer") => {
|
|
17
17
|
const colors = useColors();
|
|
18
|
+
const theme = useTheme();
|
|
18
19
|
const options: any = {
|
|
19
20
|
stack: {
|
|
20
21
|
headerShown: false,
|
|
@@ -36,7 +37,7 @@ export const useNavScreenOptions = (type: "stack" | "tab" | "drawer") => {
|
|
|
36
37
|
headerShown: false,
|
|
37
38
|
headerTintColor: colors.dark.main,
|
|
38
39
|
tabBarStyle: {
|
|
39
|
-
borderTopColor: colors.white[2],
|
|
40
|
+
borderTopColor: theme === "dark" ? colors.light.main : colors.white[2],
|
|
40
41
|
borderTopWidth: 1,
|
|
41
42
|
// shadowColor: "#000",
|
|
42
43
|
// shadowOffset: { height: -3, width: 0 },
|
package/src/theme/colors.ts
CHANGED
|
@@ -7,62 +7,66 @@ export const setExtraColors = (c: extraColorTypes) => (extraColors = c);
|
|
|
7
7
|
export default function colors(theme: ThemeTypes) {
|
|
8
8
|
const lightColors = {
|
|
9
9
|
white: {
|
|
10
|
-
1: "#
|
|
10
|
+
1: "#ffffff",
|
|
11
11
|
2: "#f7f7f7",
|
|
12
|
-
3: "#
|
|
13
|
-
4: "#
|
|
14
|
-
5: "#
|
|
12
|
+
3: "#eeeeee",
|
|
13
|
+
4: "#dddddd",
|
|
14
|
+
5: "#bbbbbb",
|
|
15
|
+
...extraColors?.light?.white,
|
|
15
16
|
},
|
|
16
17
|
black: {
|
|
17
|
-
1: "#
|
|
18
|
-
2: "#
|
|
19
|
-
3: "#
|
|
20
|
-
4: "#
|
|
21
|
-
5: "#
|
|
18
|
+
1: "#888888",
|
|
19
|
+
2: "#777777",
|
|
20
|
+
3: "#555555",
|
|
21
|
+
4: "#333333",
|
|
22
|
+
5: "#000000",
|
|
23
|
+
...extraColors?.light?.black,
|
|
22
24
|
},
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
const darkColors = {
|
|
26
28
|
black: {
|
|
27
|
-
1: "#
|
|
29
|
+
1: "#ffffff",
|
|
28
30
|
2: "#f7f7f7",
|
|
29
|
-
3: "#
|
|
30
|
-
4: "#
|
|
31
|
-
5: "#
|
|
31
|
+
3: "#eeeeee",
|
|
32
|
+
4: "#dddddd",
|
|
33
|
+
5: "#aaaaaa",
|
|
34
|
+
...extraColors?.dark?.black,
|
|
32
35
|
},
|
|
33
36
|
white: {
|
|
34
|
-
1: "#
|
|
35
|
-
2: "#
|
|
36
|
-
3: "#
|
|
37
|
-
4: "#
|
|
38
|
-
5: "#
|
|
37
|
+
1: "#060606",
|
|
38
|
+
2: "#222222",
|
|
39
|
+
3: "#333333",
|
|
40
|
+
4: "#444444",
|
|
41
|
+
5: "#555555",
|
|
42
|
+
...extraColors?.dark?.white,
|
|
39
43
|
},
|
|
40
44
|
dark: {
|
|
41
45
|
main: "#f2f3f4",
|
|
42
|
-
light: "#
|
|
43
|
-
dark: "#
|
|
44
|
-
text: "#
|
|
46
|
+
light: "#ffffff",
|
|
47
|
+
dark: "#dddddd",
|
|
48
|
+
text: "#000000",
|
|
45
49
|
...extraColors?.dark?.dark,
|
|
46
50
|
},
|
|
47
51
|
light: {
|
|
48
|
-
main: "#
|
|
49
|
-
light: "#
|
|
50
|
-
dark: "#
|
|
51
|
-
text: "#
|
|
52
|
+
main: "#111111",
|
|
53
|
+
light: "#555555",
|
|
54
|
+
dark: "#333333",
|
|
55
|
+
text: "#ffffff",
|
|
52
56
|
...extraColors?.dark?.light,
|
|
53
57
|
},
|
|
54
58
|
textSecondary: {
|
|
55
|
-
main: "#
|
|
56
|
-
light: "#
|
|
57
|
-
dark: "#
|
|
58
|
-
text: "#
|
|
59
|
+
main: "#666666",
|
|
60
|
+
light: "#777777",
|
|
61
|
+
dark: "#444444",
|
|
62
|
+
text: "#ffffff",
|
|
59
63
|
...extraColors?.dark?.textSecondary,
|
|
60
64
|
},
|
|
61
65
|
primary: {
|
|
62
|
-
main: "#
|
|
63
|
-
light: "#
|
|
64
|
-
dark: "#
|
|
65
|
-
text: "#
|
|
66
|
+
main: "#ff8800",
|
|
67
|
+
light: "#feffd3",
|
|
68
|
+
dark: "#ffaa00",
|
|
69
|
+
text: "#ffffff",
|
|
66
70
|
...extraColors?.light?.primary,
|
|
67
71
|
...extraColors?.dark?.primary,
|
|
68
72
|
},
|
|
@@ -72,74 +76,73 @@ export default function colors(theme: ThemeTypes) {
|
|
|
72
76
|
return {
|
|
73
77
|
...extraColors[theme],
|
|
74
78
|
primary: {
|
|
75
|
-
main: "#
|
|
76
|
-
light: "#
|
|
77
|
-
dark: "#
|
|
78
|
-
text: "#
|
|
79
|
+
main: "#ff8800",
|
|
80
|
+
light: "#feffd3",
|
|
81
|
+
dark: "#ffaa00",
|
|
82
|
+
text: "#ffffff",
|
|
79
83
|
...extraColors?.light?.primary,
|
|
80
84
|
},
|
|
81
85
|
secondary: {
|
|
82
|
-
main: "#
|
|
83
|
-
light: "#
|
|
84
|
-
dark: "#
|
|
85
|
-
text: "#
|
|
86
|
+
main: "#ff1111",
|
|
87
|
+
light: "#ff4433",
|
|
88
|
+
dark: "#dd0000",
|
|
89
|
+
text: "#ffffff",
|
|
86
90
|
...extraColors?.light?.secondary,
|
|
87
91
|
},
|
|
88
92
|
light: {
|
|
89
|
-
main: "#
|
|
90
|
-
light: "#
|
|
91
|
-
dark: "#
|
|
92
|
-
text: "#
|
|
93
|
+
main: "#ffffff",
|
|
94
|
+
light: "#ffffff",
|
|
95
|
+
dark: "#dddddd",
|
|
96
|
+
text: "#000000",
|
|
93
97
|
...extraColors?.light?.light,
|
|
94
98
|
},
|
|
95
99
|
dark: {
|
|
96
|
-
main: "#
|
|
97
|
-
light: "#
|
|
98
|
-
dark: "#
|
|
99
|
-
text: "#
|
|
100
|
+
main: "#000000",
|
|
101
|
+
light: "#777777",
|
|
102
|
+
dark: "#111111",
|
|
103
|
+
text: "#ffffff",
|
|
100
104
|
...extraColors?.light?.dark,
|
|
101
105
|
},
|
|
102
106
|
textSecondary: {
|
|
103
|
-
main: "#
|
|
104
|
-
light: "#
|
|
105
|
-
dark: "#
|
|
106
|
-
text: "#
|
|
107
|
+
main: "#aaaaaa",
|
|
108
|
+
light: "#bbbbbb",
|
|
109
|
+
dark: "#777777",
|
|
110
|
+
text: "#112233",
|
|
107
111
|
...extraColors?.light?.textSecondary,
|
|
108
112
|
},
|
|
109
113
|
blue: {
|
|
110
|
-
main: "#
|
|
111
|
-
light: "#
|
|
112
|
-
dark: "#
|
|
113
|
-
text: "#
|
|
114
|
+
main: "#0099ff",
|
|
115
|
+
light: "#3399ff",
|
|
116
|
+
dark: "#002288",
|
|
117
|
+
text: "#ffffff",
|
|
114
118
|
...extraColors?.light?.blue,
|
|
115
119
|
},
|
|
116
120
|
info: {
|
|
117
|
-
main: "#
|
|
118
|
-
light: "#
|
|
119
|
-
dark: "#
|
|
120
|
-
text: "#
|
|
121
|
+
main: "#0099ff",
|
|
122
|
+
light: "#33aaff",
|
|
123
|
+
dark: "#0088aa",
|
|
124
|
+
text: "#ffffff",
|
|
121
125
|
...extraColors?.light?.info,
|
|
122
126
|
},
|
|
123
127
|
success: {
|
|
124
|
-
main: "#
|
|
125
|
-
text: "#
|
|
126
|
-
light: "#
|
|
127
|
-
dark: "#
|
|
128
|
+
main: "#00aa44",
|
|
129
|
+
text: "#ffffff",
|
|
130
|
+
light: "#55cc33",
|
|
131
|
+
dark: "#006622",
|
|
128
132
|
...extraColors?.light?.success,
|
|
129
133
|
},
|
|
130
|
-
|
|
131
134
|
warning: {
|
|
132
|
-
main: "#
|
|
133
|
-
light: "#
|
|
134
|
-
dark: "#
|
|
135
|
-
text: "#
|
|
135
|
+
main: "#ffaa22",
|
|
136
|
+
light: "#ffcc77",
|
|
137
|
+
dark: "#ff9900",
|
|
138
|
+
text: "#ffffff",
|
|
136
139
|
...extraColors?.light?.warning,
|
|
137
140
|
},
|
|
138
141
|
error: {
|
|
139
|
-
main: "#
|
|
140
|
-
text: "#
|
|
141
|
-
light: "#
|
|
142
|
-
dark: "#
|
|
142
|
+
main: "#dd2222",
|
|
143
|
+
text: "#ffffff",
|
|
144
|
+
light: "#ff4433",
|
|
145
|
+
dark: "#aa2200",
|
|
143
146
|
...extraColors?.light?.error,
|
|
144
147
|
},
|
|
145
148
|
...dynamicColors,
|
package/src/types.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type extraColorTypes = {
|
|
|
30
30
|
light?: string;
|
|
31
31
|
dark?: string;
|
|
32
32
|
text?: string;
|
|
33
|
+
[key: number]: string;
|
|
33
34
|
};
|
|
34
35
|
};
|
|
35
36
|
light?: {
|
|
@@ -38,6 +39,7 @@ export type extraColorTypes = {
|
|
|
38
39
|
light?: string;
|
|
39
40
|
dark?: string;
|
|
40
41
|
text?: string;
|
|
42
|
+
[key: number]: string;
|
|
41
43
|
};
|
|
42
44
|
};
|
|
43
45
|
};
|