@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
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 },
@@ -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: "#fff",
10
+ 1: "#ffffff",
11
11
  2: "#f7f7f7",
12
- 3: "#eee",
13
- 4: "#ddd",
14
- 5: "#bbb",
12
+ 3: "#eeeeee",
13
+ 4: "#dddddd",
14
+ 5: "#bbbbbb",
15
+ ...extraColors?.light?.white,
15
16
  },
16
17
  black: {
17
- 1: "#888",
18
- 2: "#777",
19
- 3: "#555",
20
- 4: "#333",
21
- 5: "#000",
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: "#fff",
29
+ 1: "#ffffff",
28
30
  2: "#f7f7f7",
29
- 3: "#eee",
30
- 4: "#ddd",
31
- 5: "#aaa",
31
+ 3: "#eeeeee",
32
+ 4: "#dddddd",
33
+ 5: "#aaaaaa",
34
+ ...extraColors?.dark?.black,
32
35
  },
33
36
  white: {
34
- 1: "#000",
35
- 2: "#222",
36
- 3: "#333",
37
- 4: "#444",
38
- 5: "#555",
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: "#fff",
43
- dark: "#ddd",
44
- text: "#000",
46
+ light: "#ffffff",
47
+ dark: "#dddddd",
48
+ text: "#000000",
45
49
  ...extraColors?.dark?.dark,
46
50
  },
47
51
  light: {
48
- main: "#111",
49
- light: "#555",
50
- dark: "#333",
51
- text: "#fff",
52
+ main: "#111111",
53
+ light: "#555555",
54
+ dark: "#333333",
55
+ text: "#ffffff",
52
56
  ...extraColors?.dark?.light,
53
57
  },
54
58
  textSecondary: {
55
- main: "#666",
56
- light: "#777",
57
- dark: "#444",
58
- text: "#fff",
59
+ main: "#666666",
60
+ light: "#777777",
61
+ dark: "#444444",
62
+ text: "#ffffff",
59
63
  ...extraColors?.dark?.textSecondary,
60
64
  },
61
65
  primary: {
62
- main: "#f80",
63
- light: "#FEFFD3",
64
- dark: "#fa0",
65
- text: "#fff",
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: "#f80",
76
- light: "#FEFFD3",
77
- dark: "#fa0",
78
- text: "#fff",
79
+ main: "#ff8800",
80
+ light: "#feffd3",
81
+ dark: "#ffaa00",
82
+ text: "#ffffff",
79
83
  ...extraColors?.light?.primary,
80
84
  },
81
85
  secondary: {
82
- main: "#f11",
83
- light: "#f43",
84
- dark: "#d00",
85
- text: "#fff",
86
+ main: "#ff1111",
87
+ light: "#ff4433",
88
+ dark: "#dd0000",
89
+ text: "#ffffff",
86
90
  ...extraColors?.light?.secondary,
87
91
  },
88
92
  light: {
89
- main: "#fff",
90
- light: "#fff",
91
- dark: "#ddd",
92
- text: "#000",
93
+ main: "#ffffff",
94
+ light: "#ffffff",
95
+ dark: "#dddddd",
96
+ text: "#000000",
93
97
  ...extraColors?.light?.light,
94
98
  },
95
99
  dark: {
96
- main: "#000",
97
- light: "#777",
98
- dark: "#111",
99
- text: "#fff",
100
+ main: "#000000",
101
+ light: "#777777",
102
+ dark: "#111111",
103
+ text: "#ffffff",
100
104
  ...extraColors?.light?.dark,
101
105
  },
102
106
  textSecondary: {
103
- main: "#aaa",
104
- light: "#bbb",
105
- dark: "#777",
106
- text: "#123",
107
+ main: "#aaaaaa",
108
+ light: "#bbbbbb",
109
+ dark: "#777777",
110
+ text: "#112233",
107
111
  ...extraColors?.light?.textSecondary,
108
112
  },
109
113
  blue: {
110
- main: "#09F",
111
- light: "#39f",
112
- dark: "#028",
113
- text: "#fff",
114
+ main: "#0099ff",
115
+ light: "#3399ff",
116
+ dark: "#002288",
117
+ text: "#ffffff",
114
118
  ...extraColors?.light?.blue,
115
119
  },
116
120
  info: {
117
- main: "#09f",
118
- light: "#3af",
119
- dark: "#08a",
120
- text: "#fff",
121
+ main: "#0099ff",
122
+ light: "#33aaff",
123
+ dark: "#0088aa",
124
+ text: "#ffffff",
121
125
  ...extraColors?.light?.info,
122
126
  },
123
127
  success: {
124
- main: "#0a4",
125
- text: "#fff",
126
- light: "#5c3",
127
- dark: "#062",
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: "#fa2",
133
- light: "#fc7",
134
- dark: "#f90",
135
- text: "#fff",
135
+ main: "#ffaa22",
136
+ light: "#ffcc77",
137
+ dark: "#ff9900",
138
+ text: "#ffffff",
136
139
  ...extraColors?.light?.warning,
137
140
  },
138
141
  error: {
139
- main: "#D22",
140
- text: "#fff",
141
- light: "#f43",
142
- dark: "#a20",
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
  };