@hoddy-ui/next 2.0.26 → 2.0.28
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/dist/index.d.mts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +143 -124
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +170 -148
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/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/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/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 },
|
|
@@ -726,7 +737,7 @@ var Button = (0, import_react8.forwardRef)(
|
|
|
726
737
|
alignItems: "center",
|
|
727
738
|
alignSelf: "flex-start",
|
|
728
739
|
justifyContent: "center",
|
|
729
|
-
backgroundColor: variant === "text" || variant === "outlined" ? null : translucent ? translucent === "dark" ? colors2.white[3] + "
|
|
740
|
+
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
741
|
borderRadius: rounded ? 30 : 10,
|
|
731
742
|
elevation: variant === "text" ? 0 : elevation,
|
|
732
743
|
paddingVertical: size === "small" ? 8 : size === "large" ? "15@ms" : "13@ms",
|
|
@@ -877,8 +888,10 @@ var Popup = ({
|
|
|
877
888
|
children,
|
|
878
889
|
open,
|
|
879
890
|
onClose = () => {
|
|
880
|
-
}
|
|
891
|
+
},
|
|
892
|
+
style
|
|
881
893
|
}) => {
|
|
894
|
+
const theme = useTheme();
|
|
882
895
|
const colors2 = useColors();
|
|
883
896
|
const [show, setShow] = (0, import_react11.useState)(open);
|
|
884
897
|
const [showSecondary, setShowSecondary] = (0, import_react11.useState)(false);
|
|
@@ -898,12 +911,13 @@ var Popup = ({
|
|
|
898
911
|
},
|
|
899
912
|
container: {
|
|
900
913
|
paddingBottom: sheet ? "30@ms" : 0,
|
|
901
|
-
backgroundColor: colors2.white[2],
|
|
914
|
+
backgroundColor: theme === "dark" ? "#111" : colors2.white[2],
|
|
902
915
|
borderTopLeftRadius: 20,
|
|
903
916
|
borderTopRightRadius: 20,
|
|
904
917
|
borderBottomRightRadius: sheet ? 0 : 20,
|
|
905
918
|
borderBottomLeftRadius: sheet ? 0 : 20,
|
|
906
|
-
width: "100%"
|
|
919
|
+
width: "100%",
|
|
920
|
+
...style
|
|
907
921
|
},
|
|
908
922
|
content: {
|
|
909
923
|
paddingHorizontal: bare ? void 0 : "10@ms"
|
|
@@ -1182,7 +1196,7 @@ var ListItem = ({
|
|
|
1182
1196
|
flexDirection: "row",
|
|
1183
1197
|
alignItems: "center",
|
|
1184
1198
|
paddingHorizontal: "10@s",
|
|
1185
|
-
borderBottomColor: colors2.white[
|
|
1199
|
+
borderBottomColor: colors2.white[2],
|
|
1186
1200
|
borderBottomWidth: divider ? 1 : 0,
|
|
1187
1201
|
paddingVertical: "10@vs"
|
|
1188
1202
|
}
|
|
@@ -1261,7 +1275,7 @@ var SelectMenu = ({
|
|
|
1261
1275
|
{
|
|
1262
1276
|
style: {
|
|
1263
1277
|
...styles2.option,
|
|
1264
|
-
backgroundColor: item.value === value ? colors2.blue.light + "
|
|
1278
|
+
backgroundColor: item.value === value ? colors2.blue.light + "22" : colors2.white[2]
|
|
1265
1279
|
},
|
|
1266
1280
|
onPress: () => {
|
|
1267
1281
|
onChange(item.value);
|
|
@@ -1750,11 +1764,6 @@ var TextField_default = TextField;
|
|
|
1750
1764
|
// ../src/Components/Locator.tsx
|
|
1751
1765
|
var Location = __toESM(require("expo-location"));
|
|
1752
1766
|
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
1767
|
var getPredictionsFromCoords = async (coords) => {
|
|
1759
1768
|
const { GOOGLE_MAP_API_KEY } = getConfig();
|
|
1760
1769
|
if (!GOOGLE_MAP_API_KEY)
|
|
@@ -2004,7 +2013,7 @@ var Spinner = ({
|
|
|
2004
2013
|
alignItems: "center",
|
|
2005
2014
|
justifyContent: "center",
|
|
2006
2015
|
position: fullscreen ? "absolute" : "relative",
|
|
2007
|
-
backgroundColor: fullscreen ? colors2.white[1] + "
|
|
2016
|
+
backgroundColor: fullscreen ? colors2.white[1] + "dd" : void 0,
|
|
2008
2017
|
...style
|
|
2009
2018
|
},
|
|
2010
2019
|
content: {
|
|
@@ -2041,6 +2050,36 @@ var OTPInput = ({
|
|
|
2041
2050
|
() => Array(length).fill(0).map((_) => import_react20.default.createRef()),
|
|
2042
2051
|
[length]
|
|
2043
2052
|
);
|
|
2053
|
+
console.log("v", value);
|
|
2054
|
+
const onChangeHandler = (val, index) => {
|
|
2055
|
+
if (value.length >= length && val.length > 0)
|
|
2056
|
+
return;
|
|
2057
|
+
if (val.length > 1) {
|
|
2058
|
+
console.log("reached", val);
|
|
2059
|
+
const digits = val.replace(/\D/g, "").slice(0, length);
|
|
2060
|
+
onChange(digits);
|
|
2061
|
+
if (digits.length === length) {
|
|
2062
|
+
inputRefs[length - 1].current?.focus();
|
|
2063
|
+
}
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
if (val.length === 0) {
|
|
2067
|
+
const newValue2 = value.slice(0, index) + value.slice(index + 1);
|
|
2068
|
+
onChange(newValue2);
|
|
2069
|
+
if (index > 0) {
|
|
2070
|
+
inputRefs[index - 1].current?.focus();
|
|
2071
|
+
}
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
const digit = val.replace(/\D/g, "").slice(0, 1);
|
|
2075
|
+
if (!digit)
|
|
2076
|
+
return;
|
|
2077
|
+
const newValue = value.slice(0, index) + digit + value.slice(index + 1);
|
|
2078
|
+
onChange(newValue);
|
|
2079
|
+
if (index < length - 1) {
|
|
2080
|
+
inputRefs[index + 1].current?.focus();
|
|
2081
|
+
}
|
|
2082
|
+
};
|
|
2044
2083
|
const colors2 = useColors();
|
|
2045
2084
|
const styles2 = import_react_native_size_matters19.ScaledSheet.create({
|
|
2046
2085
|
root: {},
|
|
@@ -2063,27 +2102,7 @@ var OTPInput = ({
|
|
|
2063
2102
|
import_react_native22.TextInput,
|
|
2064
2103
|
{
|
|
2065
2104
|
ref: inputRefs[index],
|
|
2066
|
-
onChangeText: (val) =>
|
|
2067
|
-
if (val.length === 1) {
|
|
2068
|
-
if (index !== length - 1)
|
|
2069
|
-
inputRefs[index + 1].current?.focus();
|
|
2070
|
-
let text = value;
|
|
2071
|
-
text = text.slice(0, index) + val + text.slice(index + 1);
|
|
2072
|
-
onChange(text);
|
|
2073
|
-
} else if (val.length === 0) {
|
|
2074
|
-
if (index !== 0) {
|
|
2075
|
-
inputRefs[index - 1].current?.focus();
|
|
2076
|
-
let text = value;
|
|
2077
|
-
text = text.slice(0, index);
|
|
2078
|
-
onChange(text);
|
|
2079
|
-
} else
|
|
2080
|
-
onChange("");
|
|
2081
|
-
} else {
|
|
2082
|
-
let text = val.replace(/\D/g, "").slice(0, length);
|
|
2083
|
-
onChange(text);
|
|
2084
|
-
inputRefs[text.length < length - 1 ? text.length : length - 1]?.current?.focus();
|
|
2085
|
-
}
|
|
2086
|
-
},
|
|
2105
|
+
onChangeText: (val) => onChangeHandler(val, index),
|
|
2087
2106
|
value: value[index] || "",
|
|
2088
2107
|
blurOnSubmit: false,
|
|
2089
2108
|
keyboardType: "number-pad",
|