@hoddy-ui/core 1.0.100 → 1.1.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/next/components/AdaptiveStatusBarNext.tsx +12 -18
- package/next/dist/index.d.mts +28 -1
- package/next/dist/index.d.ts +28 -1
- package/next/dist/index.js +123 -117
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +146 -140
- package/next/dist/index.mjs.map +1 -1
- package/next/package.json +1 -1
- package/package.json +1 -1
- package/src/Components/AdaptiveStatusBar.tsx +13 -19
- package/src/Components/Typography.tsx +1 -1
- package/src/types.ts +1 -1
|
@@ -7,30 +7,24 @@ const AdaptiveStatusBar = ({ translucent = false }) => {
|
|
|
7
7
|
const [focused, setFocused] = useState(false);
|
|
8
8
|
const colors = useColors();
|
|
9
9
|
const theme = useTheme();
|
|
10
|
+
const statusbarHandler = () => {
|
|
11
|
+
StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
|
|
12
|
+
if (Platform.OS === "android") {
|
|
13
|
+
StatusBar.setBackgroundColor(
|
|
14
|
+
translucent ? "transparent" : colors.white[1]
|
|
15
|
+
);
|
|
16
|
+
StatusBar.setTranslucent(true);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
10
20
|
useFocusEffect(
|
|
11
21
|
React.useCallback(() => {
|
|
12
|
-
|
|
13
|
-
StatusBar.setBarStyle(
|
|
14
|
-
theme === "dark" ? "light-content" : "dark-content"
|
|
15
|
-
);
|
|
16
|
-
if (Platform.OS === "android") {
|
|
17
|
-
StatusBar.setBackgroundColor(
|
|
18
|
-
colors.white[1] + (translucent ? "0" : "")
|
|
19
|
-
);
|
|
20
|
-
StatusBar.setTranslucent(true);
|
|
21
|
-
}
|
|
22
|
-
// return () => setFocused(false);
|
|
22
|
+
statusbarHandler();
|
|
23
23
|
}, [theme])
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
React.useEffect(() => {
|
|
27
|
-
|
|
28
|
-
StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
|
|
29
|
-
if (Platform.OS === "android") {
|
|
30
|
-
StatusBar.setBackgroundColor(colors.white[1] + (translucent ? "0" : ""));
|
|
31
|
-
StatusBar.setTranslucent(true);
|
|
32
|
-
}
|
|
33
|
-
// return () => setFocused(false);
|
|
27
|
+
statusbarHandler();
|
|
34
28
|
}, [theme]);
|
|
35
29
|
return <></>;
|
|
36
30
|
};
|
package/next/dist/index.d.mts
CHANGED
|
@@ -11,6 +11,7 @@ type extraColorTypes = {
|
|
|
11
11
|
light?: string;
|
|
12
12
|
dark?: string;
|
|
13
13
|
text?: string;
|
|
14
|
+
[key: number]: string;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
17
|
light?: {
|
|
@@ -19,6 +20,7 @@ type extraColorTypes = {
|
|
|
19
20
|
light?: string;
|
|
20
21
|
dark?: string;
|
|
21
22
|
text?: string;
|
|
23
|
+
[key: number]: string;
|
|
22
24
|
};
|
|
23
25
|
};
|
|
24
26
|
};
|
|
@@ -160,6 +162,7 @@ interface PopupProps {
|
|
|
160
162
|
children: ReactNode;
|
|
161
163
|
open: boolean;
|
|
162
164
|
onClose?: () => void;
|
|
165
|
+
style?: ViewStyle;
|
|
163
166
|
}
|
|
164
167
|
interface SpinnerProps {
|
|
165
168
|
label?: string;
|
|
@@ -197,7 +200,7 @@ interface TypographyProps extends TextProps {
|
|
|
197
200
|
children: ReactNode;
|
|
198
201
|
color?: colorTypes | (string & {});
|
|
199
202
|
style?: TextStyle | ViewStyle;
|
|
200
|
-
textCase?: "capitalize" | "uppercase" | "lowercase" |
|
|
203
|
+
textCase?: "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
201
204
|
variant?: "caption" | "body1" | "body2" | "h6" | "h5" | "h4" | "h3" | "h2" | "h1";
|
|
202
205
|
align?: "center" | "left" | "right";
|
|
203
206
|
gutterBottom?: number;
|
|
@@ -313,6 +316,10 @@ declare const OTPInput: FC<OTPInputProps>;
|
|
|
313
316
|
|
|
314
317
|
declare const useColors: () => {
|
|
315
318
|
white: {
|
|
319
|
+
main?: string | undefined;
|
|
320
|
+
light?: string | undefined;
|
|
321
|
+
dark?: string | undefined;
|
|
322
|
+
text?: string | undefined;
|
|
316
323
|
1: string;
|
|
317
324
|
2: string;
|
|
318
325
|
3: string;
|
|
@@ -320,6 +327,10 @@ declare const useColors: () => {
|
|
|
320
327
|
5: string;
|
|
321
328
|
};
|
|
322
329
|
black: {
|
|
330
|
+
main?: string | undefined;
|
|
331
|
+
light?: string | undefined;
|
|
332
|
+
dark?: string | undefined;
|
|
333
|
+
text?: string | undefined;
|
|
323
334
|
1: string;
|
|
324
335
|
2: string;
|
|
325
336
|
3: string;
|
|
@@ -388,6 +399,10 @@ declare const useColors: () => {
|
|
|
388
399
|
};
|
|
389
400
|
} | {
|
|
390
401
|
white: {
|
|
402
|
+
main?: string | undefined;
|
|
403
|
+
light?: string | undefined;
|
|
404
|
+
dark?: string | undefined;
|
|
405
|
+
text?: string | undefined;
|
|
391
406
|
1: string;
|
|
392
407
|
2: string;
|
|
393
408
|
3: string;
|
|
@@ -395,6 +410,10 @@ declare const useColors: () => {
|
|
|
395
410
|
5: string;
|
|
396
411
|
};
|
|
397
412
|
black: {
|
|
413
|
+
main?: string | undefined;
|
|
414
|
+
light?: string | undefined;
|
|
415
|
+
dark?: string | undefined;
|
|
416
|
+
text?: string | undefined;
|
|
398
417
|
1: string;
|
|
399
418
|
2: string;
|
|
400
419
|
3: string;
|
|
@@ -463,6 +482,10 @@ declare const useColors: () => {
|
|
|
463
482
|
};
|
|
464
483
|
} | {
|
|
465
484
|
white: {
|
|
485
|
+
main?: string | undefined;
|
|
486
|
+
light?: string | undefined;
|
|
487
|
+
dark?: string | undefined;
|
|
488
|
+
text?: string | undefined;
|
|
466
489
|
1: string;
|
|
467
490
|
2: string;
|
|
468
491
|
3: string;
|
|
@@ -470,6 +493,10 @@ declare const useColors: () => {
|
|
|
470
493
|
5: string;
|
|
471
494
|
};
|
|
472
495
|
black: {
|
|
496
|
+
main?: string | undefined;
|
|
497
|
+
light?: string | undefined;
|
|
498
|
+
dark?: string | undefined;
|
|
499
|
+
text?: string | undefined;
|
|
473
500
|
1: string;
|
|
474
501
|
2: string;
|
|
475
502
|
3: string;
|
package/next/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ type extraColorTypes = {
|
|
|
11
11
|
light?: string;
|
|
12
12
|
dark?: string;
|
|
13
13
|
text?: string;
|
|
14
|
+
[key: number]: string;
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
17
|
light?: {
|
|
@@ -19,6 +20,7 @@ type extraColorTypes = {
|
|
|
19
20
|
light?: string;
|
|
20
21
|
dark?: string;
|
|
21
22
|
text?: string;
|
|
23
|
+
[key: number]: string;
|
|
22
24
|
};
|
|
23
25
|
};
|
|
24
26
|
};
|
|
@@ -160,6 +162,7 @@ interface PopupProps {
|
|
|
160
162
|
children: ReactNode;
|
|
161
163
|
open: boolean;
|
|
162
164
|
onClose?: () => void;
|
|
165
|
+
style?: ViewStyle;
|
|
163
166
|
}
|
|
164
167
|
interface SpinnerProps {
|
|
165
168
|
label?: string;
|
|
@@ -197,7 +200,7 @@ interface TypographyProps extends TextProps {
|
|
|
197
200
|
children: ReactNode;
|
|
198
201
|
color?: colorTypes | (string & {});
|
|
199
202
|
style?: TextStyle | ViewStyle;
|
|
200
|
-
textCase?: "capitalize" | "uppercase" | "lowercase" |
|
|
203
|
+
textCase?: "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
201
204
|
variant?: "caption" | "body1" | "body2" | "h6" | "h5" | "h4" | "h3" | "h2" | "h1";
|
|
202
205
|
align?: "center" | "left" | "right";
|
|
203
206
|
gutterBottom?: number;
|
|
@@ -313,6 +316,10 @@ declare const OTPInput: FC<OTPInputProps>;
|
|
|
313
316
|
|
|
314
317
|
declare const useColors: () => {
|
|
315
318
|
white: {
|
|
319
|
+
main?: string | undefined;
|
|
320
|
+
light?: string | undefined;
|
|
321
|
+
dark?: string | undefined;
|
|
322
|
+
text?: string | undefined;
|
|
316
323
|
1: string;
|
|
317
324
|
2: string;
|
|
318
325
|
3: string;
|
|
@@ -320,6 +327,10 @@ declare const useColors: () => {
|
|
|
320
327
|
5: string;
|
|
321
328
|
};
|
|
322
329
|
black: {
|
|
330
|
+
main?: string | undefined;
|
|
331
|
+
light?: string | undefined;
|
|
332
|
+
dark?: string | undefined;
|
|
333
|
+
text?: string | undefined;
|
|
323
334
|
1: string;
|
|
324
335
|
2: string;
|
|
325
336
|
3: string;
|
|
@@ -388,6 +399,10 @@ declare const useColors: () => {
|
|
|
388
399
|
};
|
|
389
400
|
} | {
|
|
390
401
|
white: {
|
|
402
|
+
main?: string | undefined;
|
|
403
|
+
light?: string | undefined;
|
|
404
|
+
dark?: string | undefined;
|
|
405
|
+
text?: string | undefined;
|
|
391
406
|
1: string;
|
|
392
407
|
2: string;
|
|
393
408
|
3: string;
|
|
@@ -395,6 +410,10 @@ declare const useColors: () => {
|
|
|
395
410
|
5: string;
|
|
396
411
|
};
|
|
397
412
|
black: {
|
|
413
|
+
main?: string | undefined;
|
|
414
|
+
light?: string | undefined;
|
|
415
|
+
dark?: string | undefined;
|
|
416
|
+
text?: string | undefined;
|
|
398
417
|
1: string;
|
|
399
418
|
2: string;
|
|
400
419
|
3: string;
|
|
@@ -463,6 +482,10 @@ declare const useColors: () => {
|
|
|
463
482
|
};
|
|
464
483
|
} | {
|
|
465
484
|
white: {
|
|
485
|
+
main?: string | undefined;
|
|
486
|
+
light?: string | undefined;
|
|
487
|
+
dark?: string | undefined;
|
|
488
|
+
text?: string | undefined;
|
|
466
489
|
1: string;
|
|
467
490
|
2: string;
|
|
468
491
|
3: string;
|
|
@@ -470,6 +493,10 @@ declare const useColors: () => {
|
|
|
470
493
|
5: string;
|
|
471
494
|
};
|
|
472
495
|
black: {
|
|
496
|
+
main?: string | undefined;
|
|
497
|
+
light?: string | undefined;
|
|
498
|
+
dark?: string | undefined;
|
|
499
|
+
text?: string | undefined;
|
|
473
500
|
1: string;
|
|
474
501
|
2: string;
|
|
475
502
|
3: string;
|
package/next/dist/index.js
CHANGED
|
@@ -69,61 +69,65 @@ var setExtraColors = (c) => extraColors = c;
|
|
|
69
69
|
function colors(theme) {
|
|
70
70
|
const lightColors = {
|
|
71
71
|
white: {
|
|
72
|
-
1: "#
|
|
72
|
+
1: "#ffffff",
|
|
73
73
|
2: "#f7f7f7",
|
|
74
|
-
3: "#
|
|
75
|
-
4: "#
|
|
76
|
-
5: "#
|
|
74
|
+
3: "#eeeeee",
|
|
75
|
+
4: "#dddddd",
|
|
76
|
+
5: "#bbbbbb",
|
|
77
|
+
...extraColors?.light?.white
|
|
77
78
|
},
|
|
78
79
|
black: {
|
|
79
|
-
1: "#
|
|
80
|
-
2: "#
|
|
81
|
-
3: "#
|
|
82
|
-
4: "#
|
|
83
|
-
5: "#
|
|
80
|
+
1: "#888888",
|
|
81
|
+
2: "#777777",
|
|
82
|
+
3: "#555555",
|
|
83
|
+
4: "#333333",
|
|
84
|
+
5: "#000000",
|
|
85
|
+
...extraColors?.light?.black
|
|
84
86
|
}
|
|
85
87
|
};
|
|
86
88
|
const darkColors = {
|
|
87
89
|
black: {
|
|
88
|
-
1: "#
|
|
90
|
+
1: "#ffffff",
|
|
89
91
|
2: "#f7f7f7",
|
|
90
|
-
3: "#
|
|
91
|
-
4: "#
|
|
92
|
-
5: "#
|
|
92
|
+
3: "#eeeeee",
|
|
93
|
+
4: "#dddddd",
|
|
94
|
+
5: "#aaaaaa",
|
|
95
|
+
...extraColors?.dark?.black
|
|
93
96
|
},
|
|
94
97
|
white: {
|
|
95
|
-
1: "#
|
|
96
|
-
2: "#
|
|
97
|
-
3: "#
|
|
98
|
-
4: "#
|
|
99
|
-
5: "#
|
|
98
|
+
1: "#060606",
|
|
99
|
+
2: "#222222",
|
|
100
|
+
3: "#333333",
|
|
101
|
+
4: "#444444",
|
|
102
|
+
5: "#555555",
|
|
103
|
+
...extraColors?.dark?.white
|
|
100
104
|
},
|
|
101
105
|
dark: {
|
|
102
106
|
main: "#f2f3f4",
|
|
103
|
-
light: "#
|
|
104
|
-
dark: "#
|
|
105
|
-
text: "#
|
|
107
|
+
light: "#ffffff",
|
|
108
|
+
dark: "#dddddd",
|
|
109
|
+
text: "#000000",
|
|
106
110
|
...extraColors?.dark?.dark
|
|
107
111
|
},
|
|
108
112
|
light: {
|
|
109
|
-
main: "#
|
|
110
|
-
light: "#
|
|
111
|
-
dark: "#
|
|
112
|
-
text: "#
|
|
113
|
+
main: "#111111",
|
|
114
|
+
light: "#555555",
|
|
115
|
+
dark: "#333333",
|
|
116
|
+
text: "#ffffff",
|
|
113
117
|
...extraColors?.dark?.light
|
|
114
118
|
},
|
|
115
119
|
textSecondary: {
|
|
116
|
-
main: "#
|
|
117
|
-
light: "#
|
|
118
|
-
dark: "#
|
|
119
|
-
text: "#
|
|
120
|
+
main: "#666666",
|
|
121
|
+
light: "#777777",
|
|
122
|
+
dark: "#444444",
|
|
123
|
+
text: "#ffffff",
|
|
120
124
|
...extraColors?.dark?.textSecondary
|
|
121
125
|
},
|
|
122
126
|
primary: {
|
|
123
|
-
main: "#
|
|
124
|
-
light: "#
|
|
125
|
-
dark: "#
|
|
126
|
-
text: "#
|
|
127
|
+
main: "#ff8800",
|
|
128
|
+
light: "#feffd3",
|
|
129
|
+
dark: "#ffaa00",
|
|
130
|
+
text: "#ffffff",
|
|
127
131
|
...extraColors?.light?.primary,
|
|
128
132
|
...extraColors?.dark?.primary
|
|
129
133
|
}
|
|
@@ -132,73 +136,73 @@ function colors(theme) {
|
|
|
132
136
|
return {
|
|
133
137
|
...extraColors[theme],
|
|
134
138
|
primary: {
|
|
135
|
-
main: "#
|
|
136
|
-
light: "#
|
|
137
|
-
dark: "#
|
|
138
|
-
text: "#
|
|
139
|
+
main: "#ff8800",
|
|
140
|
+
light: "#feffd3",
|
|
141
|
+
dark: "#ffaa00",
|
|
142
|
+
text: "#ffffff",
|
|
139
143
|
...extraColors?.light?.primary
|
|
140
144
|
},
|
|
141
145
|
secondary: {
|
|
142
|
-
main: "#
|
|
143
|
-
light: "#
|
|
144
|
-
dark: "#
|
|
145
|
-
text: "#
|
|
146
|
+
main: "#ff1111",
|
|
147
|
+
light: "#ff4433",
|
|
148
|
+
dark: "#dd0000",
|
|
149
|
+
text: "#ffffff",
|
|
146
150
|
...extraColors?.light?.secondary
|
|
147
151
|
},
|
|
148
152
|
light: {
|
|
149
|
-
main: "#
|
|
150
|
-
light: "#
|
|
151
|
-
dark: "#
|
|
152
|
-
text: "#
|
|
153
|
+
main: "#ffffff",
|
|
154
|
+
light: "#ffffff",
|
|
155
|
+
dark: "#dddddd",
|
|
156
|
+
text: "#000000",
|
|
153
157
|
...extraColors?.light?.light
|
|
154
158
|
},
|
|
155
159
|
dark: {
|
|
156
|
-
main: "#
|
|
157
|
-
light: "#
|
|
158
|
-
dark: "#
|
|
159
|
-
text: "#
|
|
160
|
+
main: "#000000",
|
|
161
|
+
light: "#777777",
|
|
162
|
+
dark: "#111111",
|
|
163
|
+
text: "#ffffff",
|
|
160
164
|
...extraColors?.light?.dark
|
|
161
165
|
},
|
|
162
166
|
textSecondary: {
|
|
163
|
-
main: "#
|
|
164
|
-
light: "#
|
|
165
|
-
dark: "#
|
|
166
|
-
text: "#
|
|
167
|
+
main: "#aaaaaa",
|
|
168
|
+
light: "#bbbbbb",
|
|
169
|
+
dark: "#777777",
|
|
170
|
+
text: "#112233",
|
|
167
171
|
...extraColors?.light?.textSecondary
|
|
168
172
|
},
|
|
169
173
|
blue: {
|
|
170
|
-
main: "#
|
|
171
|
-
light: "#
|
|
172
|
-
dark: "#
|
|
173
|
-
text: "#
|
|
174
|
+
main: "#0099ff",
|
|
175
|
+
light: "#3399ff",
|
|
176
|
+
dark: "#002288",
|
|
177
|
+
text: "#ffffff",
|
|
174
178
|
...extraColors?.light?.blue
|
|
175
179
|
},
|
|
176
180
|
info: {
|
|
177
|
-
main: "#
|
|
178
|
-
light: "#
|
|
179
|
-
dark: "#
|
|
180
|
-
text: "#
|
|
181
|
+
main: "#0099ff",
|
|
182
|
+
light: "#33aaff",
|
|
183
|
+
dark: "#0088aa",
|
|
184
|
+
text: "#ffffff",
|
|
181
185
|
...extraColors?.light?.info
|
|
182
186
|
},
|
|
183
187
|
success: {
|
|
184
|
-
main: "#
|
|
185
|
-
text: "#
|
|
186
|
-
light: "#
|
|
187
|
-
dark: "#
|
|
188
|
+
main: "#00aa44",
|
|
189
|
+
text: "#ffffff",
|
|
190
|
+
light: "#55cc33",
|
|
191
|
+
dark: "#006622",
|
|
188
192
|
...extraColors?.light?.success
|
|
189
193
|
},
|
|
190
194
|
warning: {
|
|
191
|
-
main: "#
|
|
192
|
-
light: "#
|
|
193
|
-
dark: "#
|
|
194
|
-
text: "#
|
|
195
|
+
main: "#ffaa22",
|
|
196
|
+
light: "#ffcc77",
|
|
197
|
+
dark: "#ff9900",
|
|
198
|
+
text: "#ffffff",
|
|
195
199
|
...extraColors?.light?.warning
|
|
196
200
|
},
|
|
197
201
|
error: {
|
|
198
|
-
main: "#
|
|
199
|
-
text: "#
|
|
200
|
-
light: "#
|
|
201
|
-
dark: "#
|
|
202
|
+
main: "#dd2222",
|
|
203
|
+
text: "#ffffff",
|
|
204
|
+
light: "#ff4433",
|
|
205
|
+
dark: "#aa2200",
|
|
202
206
|
...extraColors?.light?.error
|
|
203
207
|
},
|
|
204
208
|
...dynamicColors
|
|
@@ -246,6 +250,7 @@ var NavigationBar = __toESM(require("expo-navigation-bar"));
|
|
|
246
250
|
var SystemUI = __toESM(require("expo-system-ui"));
|
|
247
251
|
var import_react3 = __toESM(require("react"));
|
|
248
252
|
var import_react_native3 = require("react-native");
|
|
253
|
+
var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
|
|
249
254
|
|
|
250
255
|
// ../src/Components/FlashMessage.tsx
|
|
251
256
|
var import_react2 = __toESM(require("react"));
|
|
@@ -293,8 +298,8 @@ var Typography = (0, import_react.forwardRef)(
|
|
|
293
298
|
textTransform: textCase,
|
|
294
299
|
alignItems: "center",
|
|
295
300
|
textAlign: align,
|
|
296
|
-
fontWeight
|
|
297
|
-
fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY ||
|
|
301
|
+
fontWeight,
|
|
302
|
+
fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || void 0
|
|
298
303
|
// Use custom font if provided, else default
|
|
299
304
|
}
|
|
300
305
|
});
|
|
@@ -375,24 +380,10 @@ var FlashMessage = () => {
|
|
|
375
380
|
var FlashMessage_default = FlashMessage;
|
|
376
381
|
|
|
377
382
|
// ../src/theme/index.tsx
|
|
378
|
-
var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
|
|
379
383
|
var UIThemeContext = (0, import_react3.createContext)({
|
|
380
384
|
themeState: { mode: "default", value: "light" }
|
|
381
385
|
});
|
|
382
386
|
function themeReducer(state, { type, payload }) {
|
|
383
|
-
if (payload === "dark" || type === "dark") {
|
|
384
|
-
SystemUI.setBackgroundColorAsync("#000000");
|
|
385
|
-
if (import_react_native3.Platform.OS === "android") {
|
|
386
|
-
NavigationBar.setButtonStyleAsync("light");
|
|
387
|
-
NavigationBar.setBackgroundColorAsync("#000000");
|
|
388
|
-
}
|
|
389
|
-
} else {
|
|
390
|
-
SystemUI.setBackgroundColorAsync("#ffffff");
|
|
391
|
-
if (import_react_native3.Platform.OS === "android") {
|
|
392
|
-
NavigationBar.setButtonStyleAsync("dark");
|
|
393
|
-
NavigationBar.setBackgroundColorAsync("#fff");
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
387
|
switch (type) {
|
|
397
388
|
case "dark":
|
|
398
389
|
return { mode: "dark", value: "dark" };
|
|
@@ -404,6 +395,24 @@ function themeReducer(state, { type, payload }) {
|
|
|
404
395
|
return state;
|
|
405
396
|
}
|
|
406
397
|
}
|
|
398
|
+
var ConfigureSystemUI = () => {
|
|
399
|
+
const theme = useTheme();
|
|
400
|
+
const colors2 = useColors();
|
|
401
|
+
(0, import_react3.useEffect)(() => {
|
|
402
|
+
if (colors2) {
|
|
403
|
+
SystemUI.setBackgroundColorAsync(colors2.white[1]);
|
|
404
|
+
if (import_react_native3.Platform.OS === "android") {
|
|
405
|
+
NavigationBar.setBackgroundColorAsync(colors2.white[1]);
|
|
406
|
+
if (theme === "dark") {
|
|
407
|
+
NavigationBar.setButtonStyleAsync("light");
|
|
408
|
+
} else {
|
|
409
|
+
NavigationBar.setButtonStyleAsync("dark");
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}, [colors2, theme]);
|
|
414
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null);
|
|
415
|
+
};
|
|
407
416
|
var UIThemeProvider = ({ children }) => {
|
|
408
417
|
const [themeState, themeDispatch] = (0, import_react3.useReducer)(themeReducer, {
|
|
409
418
|
mode: "default",
|
|
@@ -439,7 +448,8 @@ var UIThemeProvider = ({ children }) => {
|
|
|
439
448
|
}
|
|
440
449
|
},
|
|
441
450
|
children,
|
|
442
|
-
/* @__PURE__ */ import_react3.default.createElement(FlashMessage_default, null)
|
|
451
|
+
/* @__PURE__ */ import_react3.default.createElement(FlashMessage_default, null),
|
|
452
|
+
/* @__PURE__ */ import_react3.default.createElement(ConfigureSystemUI, null)
|
|
443
453
|
));
|
|
444
454
|
};
|
|
445
455
|
|
|
@@ -454,6 +464,7 @@ var useTheme = () => {
|
|
|
454
464
|
};
|
|
455
465
|
var useNavScreenOptions = (type) => {
|
|
456
466
|
const colors2 = useColors();
|
|
467
|
+
const theme = useTheme();
|
|
457
468
|
const options = {
|
|
458
469
|
stack: {
|
|
459
470
|
headerShown: false,
|
|
@@ -473,7 +484,7 @@ var useNavScreenOptions = (type) => {
|
|
|
473
484
|
headerShown: false,
|
|
474
485
|
headerTintColor: colors2.dark.main,
|
|
475
486
|
tabBarStyle: {
|
|
476
|
-
borderTopColor: colors2.white[
|
|
487
|
+
borderTopColor: theme === "dark" ? colors2.light.main : colors2.white[2],
|
|
477
488
|
borderTopWidth: 1,
|
|
478
489
|
// shadowColor: "#000",
|
|
479
490
|
// shadowOffset: { height: -3, width: 0 },
|
|
@@ -517,25 +528,22 @@ var AdaptiveStatusBar = ({ translucent = false }) => {
|
|
|
517
528
|
const [focused, setFocused] = (0, import_react5.useState)(false);
|
|
518
529
|
const colors2 = useColors();
|
|
519
530
|
const theme = useTheme();
|
|
531
|
+
const statusbarHandler = () => {
|
|
532
|
+
import_react_native5.StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
|
|
533
|
+
if (import_react_native5.Platform.OS === "android") {
|
|
534
|
+
import_react_native5.StatusBar.setBackgroundColor(
|
|
535
|
+
translucent ? "transparent" : colors2.white[1]
|
|
536
|
+
);
|
|
537
|
+
import_react_native5.StatusBar.setTranslucent(true);
|
|
538
|
+
}
|
|
539
|
+
};
|
|
520
540
|
(0, import_expo_router.useFocusEffect)(
|
|
521
541
|
import_react5.default.useCallback(() => {
|
|
522
|
-
|
|
523
|
-
theme === "dark" ? "light-content" : "dark-content"
|
|
524
|
-
);
|
|
525
|
-
if (import_react_native5.Platform.OS === "android") {
|
|
526
|
-
import_react_native5.StatusBar.setBackgroundColor(
|
|
527
|
-
colors2.white[1] + (translucent ? "0" : "")
|
|
528
|
-
);
|
|
529
|
-
import_react_native5.StatusBar.setTranslucent(true);
|
|
530
|
-
}
|
|
542
|
+
statusbarHandler();
|
|
531
543
|
}, [theme])
|
|
532
544
|
);
|
|
533
545
|
import_react5.default.useEffect(() => {
|
|
534
|
-
|
|
535
|
-
if (import_react_native5.Platform.OS === "android") {
|
|
536
|
-
import_react_native5.StatusBar.setBackgroundColor(colors2.white[1] + (translucent ? "0" : ""));
|
|
537
|
-
import_react_native5.StatusBar.setTranslucent(true);
|
|
538
|
-
}
|
|
546
|
+
statusbarHandler();
|
|
539
547
|
}, [theme]);
|
|
540
548
|
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null);
|
|
541
549
|
};
|
|
@@ -726,7 +734,7 @@ var Button = (0, import_react8.forwardRef)(
|
|
|
726
734
|
alignItems: "center",
|
|
727
735
|
alignSelf: "flex-start",
|
|
728
736
|
justifyContent: "center",
|
|
729
|
-
backgroundColor: variant === "text" || variant === "outlined" ? null : translucent ? translucent === "dark" ? colors2.white[3] + "
|
|
737
|
+
backgroundColor: variant === "text" || variant === "outlined" ? null : translucent ? translucent === "dark" ? colors2.white[3] + "22" : colors2.black[3] + "22" : loading ? colors2[color].light : disabled ? colors2.white[4] : colors2[color].main,
|
|
730
738
|
borderRadius: rounded ? 30 : 10,
|
|
731
739
|
elevation: variant === "text" ? 0 : elevation,
|
|
732
740
|
paddingVertical: size === "small" ? 8 : size === "large" ? "15@ms" : "13@ms",
|
|
@@ -877,8 +885,10 @@ var Popup = ({
|
|
|
877
885
|
children,
|
|
878
886
|
open,
|
|
879
887
|
onClose = () => {
|
|
880
|
-
}
|
|
888
|
+
},
|
|
889
|
+
style
|
|
881
890
|
}) => {
|
|
891
|
+
const theme = useTheme();
|
|
882
892
|
const colors2 = useColors();
|
|
883
893
|
const [show, setShow] = (0, import_react11.useState)(open);
|
|
884
894
|
const [showSecondary, setShowSecondary] = (0, import_react11.useState)(false);
|
|
@@ -898,12 +908,13 @@ var Popup = ({
|
|
|
898
908
|
},
|
|
899
909
|
container: {
|
|
900
910
|
paddingBottom: sheet ? "30@ms" : 0,
|
|
901
|
-
backgroundColor: colors2.white[2],
|
|
911
|
+
backgroundColor: theme === "dark" ? "#111" : colors2.white[2],
|
|
902
912
|
borderTopLeftRadius: 20,
|
|
903
913
|
borderTopRightRadius: 20,
|
|
904
914
|
borderBottomRightRadius: sheet ? 0 : 20,
|
|
905
915
|
borderBottomLeftRadius: sheet ? 0 : 20,
|
|
906
|
-
width: "100%"
|
|
916
|
+
width: "100%",
|
|
917
|
+
...style
|
|
907
918
|
},
|
|
908
919
|
content: {
|
|
909
920
|
paddingHorizontal: bare ? void 0 : "10@ms"
|
|
@@ -1182,7 +1193,7 @@ var ListItem = ({
|
|
|
1182
1193
|
flexDirection: "row",
|
|
1183
1194
|
alignItems: "center",
|
|
1184
1195
|
paddingHorizontal: "10@s",
|
|
1185
|
-
borderBottomColor: colors2.white[
|
|
1196
|
+
borderBottomColor: colors2.white[2],
|
|
1186
1197
|
borderBottomWidth: divider ? 1 : 0,
|
|
1187
1198
|
paddingVertical: "10@vs"
|
|
1188
1199
|
}
|
|
@@ -1261,7 +1272,7 @@ var SelectMenu = ({
|
|
|
1261
1272
|
{
|
|
1262
1273
|
style: {
|
|
1263
1274
|
...styles2.option,
|
|
1264
|
-
backgroundColor: item.value === value ? colors2.blue.light + "
|
|
1275
|
+
backgroundColor: item.value === value ? colors2.blue.light + "22" : colors2.white[2]
|
|
1265
1276
|
},
|
|
1266
1277
|
onPress: () => {
|
|
1267
1278
|
onChange(item.value);
|
|
@@ -1750,11 +1761,6 @@ var TextField_default = TextField;
|
|
|
1750
1761
|
// ../src/Components/Locator.tsx
|
|
1751
1762
|
var Location = __toESM(require("expo-location"));
|
|
1752
1763
|
var import_react_native_size_matters15 = require("react-native-size-matters");
|
|
1753
|
-
setTimeout(() => {
|
|
1754
|
-
const { GOOGLE_MAP_API_KEY } = getConfig();
|
|
1755
|
-
if (GOOGLE_MAP_API_KEY)
|
|
1756
|
-
Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
1757
|
-
}, 500);
|
|
1758
1764
|
var getPredictionsFromCoords = async (coords) => {
|
|
1759
1765
|
const { GOOGLE_MAP_API_KEY } = getConfig();
|
|
1760
1766
|
if (!GOOGLE_MAP_API_KEY)
|
|
@@ -2004,7 +2010,7 @@ var Spinner = ({
|
|
|
2004
2010
|
alignItems: "center",
|
|
2005
2011
|
justifyContent: "center",
|
|
2006
2012
|
position: fullscreen ? "absolute" : "relative",
|
|
2007
|
-
backgroundColor: fullscreen ? colors2.white[1] + "
|
|
2013
|
+
backgroundColor: fullscreen ? colors2.white[1] + "dd" : void 0,
|
|
2008
2014
|
...style
|
|
2009
2015
|
},
|
|
2010
2016
|
content: {
|