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