@hoddy-ui/core 1.1.4 → 2.0.35

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.
Files changed (38) hide show
  1. package/README.md +155 -28
  2. package/next/dist/index.d.mts +113 -41
  3. package/next/dist/index.d.ts +113 -41
  4. package/next/dist/index.js +444 -297
  5. package/next/dist/index.js.map +1 -1
  6. package/next/dist/index.mjs +460 -307
  7. package/next/dist/index.mjs.map +1 -1
  8. package/next/package.json +7 -6
  9. package/package.json +7 -5
  10. package/src/Components/AlertX.tsx +4 -4
  11. package/src/Components/Animators/Animator.tsx +1 -1
  12. package/src/Components/Animators/hooks/useAppState.ts +4 -11
  13. package/src/Components/Animators/hooks/useBlinkAnimation.ts +31 -24
  14. package/src/Components/Animators/hooks/useFadeAnimation.ts +28 -26
  15. package/src/Components/Animators/hooks/useFloatAnimation.ts +67 -57
  16. package/src/Components/Animators/hooks/useGrowAnimation.ts +41 -28
  17. package/src/Components/Animators/hooks/useRollAnimation.ts +77 -57
  18. package/src/Components/Animators/hooks/useSlideAnimation.ts +44 -35
  19. package/src/Components/Animators/hooks/useThrownUpAnimation.ts +43 -50
  20. package/src/Components/Avatar.tsx +13 -7
  21. package/src/Components/Button.tsx +13 -12
  22. package/src/Components/FlashMessage.tsx +119 -42
  23. package/src/Components/FormWrapper.tsx +7 -2
  24. package/src/Components/Grid.tsx +5 -5
  25. package/src/Components/Locator.tsx +10 -2
  26. package/src/Components/OTPInput.tsx +0 -4
  27. package/src/Components/Popup.tsx +161 -83
  28. package/src/Components/SafeAreaView.tsx +11 -11
  29. package/src/Components/SelectMenu.tsx +34 -52
  30. package/src/Components/TextField.tsx +16 -6
  31. package/src/Components/Typography.tsx +19 -16
  32. package/src/config/KeyManager.ts +6 -1
  33. package/src/config/index.ts +37 -2
  34. package/src/hooks.ts +21 -14
  35. package/src/theme/index.tsx +14 -6
  36. package/src/types.ts +12 -3
  37. package/src/utility.ts +11 -0
  38. package/src/Components/Animators/README.md +0 -137
package/README.md CHANGED
@@ -27,15 +27,17 @@ yarn add @hoddy-ui/core
27
27
  Install the required peer dependencies:
28
28
 
29
29
  ```bash
30
- npm install @expo/vector-icons @react-native-async-storage/async-storage @react-navigation/native expo-navigation-bar expo-system-ui react-native-safe-area-context react-native-size-matters
30
+ npm install @expo/vector-icons @react-native-async-storage/async-storage @react-navigation/native expo-navigation-bar expo-system-ui react-native-safe-area-context react-native-size-matters react-native-reanimated
31
31
  ```
32
32
 
33
33
  Or with yarn:
34
34
 
35
35
  ```bash
36
- yarn add @expo/vector-icons @react-native-async-storage/async-storage @react-navigation/native expo-navigation-bar expo-system-ui react-native-safe-area-context react-native-size-matters
36
+ yarn add @expo/vector-icons @react-native-async-storage/async-storage @react-navigation/native expo-navigation-bar expo-system-ui react-native-safe-area-context react-native-size-matters react-native-reanimated
37
37
  ```
38
38
 
39
+ **Important**: Make sure to follow the [react-native-reanimated installation guide](https://docs.swmansion.com/react-native-reanimated/docs/3.x/fundamentals/getting-started) for platform-specific setup as it requires additional configuration for iOS and Android.
40
+
39
41
  ## 🚀 Quick Start
40
42
 
41
43
  ### Basic Setup
@@ -46,9 +48,6 @@ yarn add @expo/vector-icons @react-native-async-storage/async-storage @react-nav
46
48
  import { initialize } from "@hoddy-ui/core";
47
49
 
48
50
  initialize({
49
- // Custom font family
50
- fontFamily: "Inter-Regular",
51
-
52
51
  // Google Maps API key for Locator component
53
52
  googleMapApiKey: "your-google-maps-api-key",
54
53
 
@@ -63,6 +62,17 @@ initialize({
63
62
  dark: "#4f46e5",
64
63
  },
65
64
  },
65
+
66
+ // Typography settings
67
+ typography: {
68
+ fontFamily: "Inter-Regular",
69
+ fontWeights: {
70
+ 400: "Inter-Regular",
71
+ 500: "Inter-Medium",
72
+ 600: "Inter-SemiBold",
73
+ 700: "Inter-Bold",
74
+ },
75
+ },
66
76
  });
67
77
  ```
68
78
 
@@ -139,24 +149,64 @@ Use the `initialize` function to configure the library globally:
139
149
  import { initialize } from "@hoddy-ui/core";
140
150
 
141
151
  initialize({
142
- // Font family for all typography components
143
- fontFamily?: string;
144
-
145
- // Google Maps API key for Locator component
152
+ // Google Maps API key for map components
146
153
  googleMapApiKey?: string;
147
154
 
148
- // Edge-to-edge display (skips Android navigation bar styling)
149
- edgeToEdge?: boolean;
150
-
151
- // Custom color overrides
155
+ // Custom color palette overrides
152
156
  colors?: {
153
157
  primary?: { main: string; light?: string; dark?: string };
154
158
  secondary?: { main: string; light?: string; dark?: string };
155
- // ... and more
159
+ // ... and more color options
160
+ };
161
+
162
+ // Enable edge-to-edge display mode
163
+ edgeToEdge?: boolean;
164
+
165
+ // Typography settings
166
+ typography?: {
167
+ // Primary font family
168
+ fontFamily?: string;
169
+
170
+ // Font family mappings for each weight (Android support)
171
+ fontWeights?: {
172
+ 100?: string;
173
+ 200?: string;
174
+ 300?: string;
175
+ 400?: string;
176
+ 500?: string;
177
+ 600?: string;
178
+ 700?: string;
179
+ 800?: string;
180
+ 900?: string;
181
+ };
156
182
  };
157
183
  });
158
184
  ```
159
185
 
186
+ ### Configuration Example
187
+
188
+ ```tsx
189
+ initialize({
190
+ googleMapApiKey: "AIzaSyBxxxxxxxxxxxxxxxxxxxxxx",
191
+ edgeToEdge: true,
192
+ colors: {
193
+ primary: "#007AFF",
194
+ secondary: "#34C759",
195
+ },
196
+ typography: {
197
+ fontFamily: "Inter",
198
+ fontWeights: {
199
+ 400: "Inter-Regular",
200
+ 500: "Inter-Medium",
201
+ 600: "Inter-SemiBold",
202
+ 700: "Inter-Bold",
203
+ },
204
+ },
205
+ });
206
+ ```
207
+
208
+ **Note:** The `fontWeights` property is particularly useful for Android devices where different font weights require separate font family files. This allows you to map each weight (100-900) to its corresponding font family name.
209
+
160
210
  ### Theme Configuration
161
211
 
162
212
  The theme system automatically detects system preferences and can be controlled programmatically:
@@ -257,6 +307,7 @@ const colors = {
257
307
 
258
308
  - **`TextField`** - Material Design text input with variants
259
309
  - **`TextField2`** - Alternative text field design
310
+ - **`OTPInput`** - One-Time Password input with auto-advance and paste support
260
311
  - **`Locator`** - Location picker with Google Maps integration
261
312
 
262
313
  ### Interactive Elements
@@ -433,6 +484,57 @@ A Material Design text input component with comprehensive features.
433
484
  />
434
485
  ```
435
486
 
487
+ ### OTPInput
488
+
489
+ A specialized input component for One-Time Password entry with auto-advance, paste support, and backspace handling.
490
+
491
+ **Props:**
492
+
493
+ | Prop | Type | Default | Description |
494
+ | ---------- | ------------------------------------- | ------------ | -------------------------------- |
495
+ | `length` | `number` | `6` | Number of OTP digits |
496
+ | `onChange` | `(value: string) => void` | - | Change handler for OTP value |
497
+ | `value` | `string` | `""` | Current OTP value |
498
+ | `variant` | `"outlined" \| "text" \| "contained"` | `"outlined"` | Input variant style |
499
+ | `spacing` | `number` | `1` | Spacing between input boxes |
500
+ | `size` | `number` | `45` | Size of each input box in pixels |
501
+
502
+ **Features:**
503
+
504
+ - **Auto-advance**: Automatically moves to next input after digit entry
505
+ - **Paste support**: Handles pasting of complete OTP codes
506
+ - **Backspace handling**: Moves to previous input on backspace
507
+ - **Number-only input**: Automatically filters non-numeric characters
508
+ - **Customizable styling**: Supports different variants and sizes
509
+
510
+ **Example:**
511
+
512
+ ```tsx
513
+ const [otp, setOtp] = useState('');
514
+
515
+ <OTPInput
516
+ length={6}
517
+ value={otp}
518
+ onChange={setOtp}
519
+ variant="outlined"
520
+ size={50}
521
+ spacing={2}
522
+ />
523
+
524
+ // Usage with form validation
525
+ <OTPInput
526
+ length={4}
527
+ value={otp}
528
+ onChange={(value) => {
529
+ setOtp(value);
530
+ if (value.length === 4) {
531
+ verifyOTP(value);
532
+ }
533
+ }}
534
+ variant="contained"
535
+ />
536
+ ```
537
+
436
538
  ### Locator
437
539
 
438
540
  A location picker component with Google Maps integration.
@@ -674,6 +776,8 @@ A modal component for overlays, dialogs, and bottom sheets.
674
776
  | `sheet` | `boolean \| number` | `false` | Bottom sheet mode/height |
675
777
  | `bare` | `boolean` | `false` | Hide header and padding |
676
778
  | `keyboardVerticalOffset` | `number` | - | Keyboard avoidance offset |
779
+ | `onModalShow` | `() => void` | - | Callback when modal shows |
780
+ | `onModalHide` | `() => void` | - | Callback when modal hides |
677
781
  | `style` | `ViewStyle` | `{}` | Container style overrides |
678
782
 
679
783
  **Example:**
@@ -684,6 +788,8 @@ A modal component for overlays, dialogs, and bottom sheets.
684
788
  onClose={() => setIsOpen(false)}
685
789
  title="Confirm Action"
686
790
  sheet={400}
791
+ onModalShow={() => console.log("Modal is now visible")}
792
+ onModalHide={() => console.log("Modal is now hidden")}
687
793
  >
688
794
  <Typography>Are you sure you want to delete this item?</Typography>
689
795
  <Button title="Delete" color="error" />
@@ -713,7 +819,7 @@ A loading indicator component with customizable appearance.
713
819
 
714
820
  ### Animator
715
821
 
716
- A unified component that provides a single interface for all animation types with generic props.
822
+ A unified component that provides a single interface for all animation types with generic props. Built with **react-native-reanimated** for optimal performance and smooth animations.
717
823
 
718
824
  **Features:**
719
825
 
@@ -721,7 +827,12 @@ A unified component that provides a single interface for all animation types wit
721
827
  - **Generic Props**: Consistent prop naming across all animations (e.g., `closeAfter` instead of animation-specific names)
722
828
  - **Modular Hooks**: Animation logic is separated into individual custom hooks
723
829
  - **Type Safety**: Full TypeScript support with proper typing
724
- - **Performance**: Only the specified animation runs, others are not loaded
830
+ - **Performance**: Built with react-native-reanimated for native performance
831
+ - **Smooth Animations**: Runs on the UI thread for 60fps animations
832
+
833
+ **Requirements:**
834
+
835
+ Requires `react-native-reanimated` as peer dependencies. Make sure to follow the [react-native-reanimated installation guide](https://docs.swmansion.com/react-native-reanimated/docs/3.x/fundamentals/getting-started) for platform-specific setup.
725
836
 
726
837
  **Generic Props:**
727
838
 
@@ -804,20 +915,23 @@ All animation types support these generic props:
804
915
 
805
916
  **Available Animation Types:**
806
917
 
807
- 1. **fade**: Simple fade in/out
808
- 2. **grow**: Scale-based growth animation
809
- 3. **slide**: Directional slide animations
810
- 4. **blink**: Continuous opacity blinking
811
- 5. **float**: Floating up/down motion with fade
812
- 6. **roll**: Combined rotation and translation
813
- 7. **thrownup**: Spring-based upward animation
918
+ 1. **fade**: Simple fade in/out using opacity (native performance)
919
+ 2. **grow**: Scale-based growth animation with easing
920
+ 3. **slide**: Directional slide animations from screen edges
921
+ 4. **blink**: Continuous opacity blinking with repeat
922
+ 5. **float**: Floating up/down motion with fade effects
923
+ 6. **roll**: Combined rotation and translation effects
924
+ 7. **thrownup**: Spring-based upward animation with physics
925
+
926
+ All animations run on the UI thread for optimal performance and smooth 60fps animations.
814
927
 
815
928
  **Using Animation Hooks Directly:**
816
929
 
817
- You can also use the animation hooks directly for custom implementations:
930
+ You can also use the animation hooks directly for custom implementations with react-native-reanimated:
818
931
 
819
932
  ```tsx
820
933
  import { useFadeAnimation, useSlideAnimation } from "@hoddy-ui/core";
934
+ import Animated from "react-native-reanimated";
821
935
 
822
936
  const MyComponent = () => {
823
937
  const { animatedStyle } = useFadeAnimation({
@@ -833,7 +947,17 @@ const MyComponent = () => {
833
947
  };
834
948
  ```
835
949
 
836
- **Migration from Old Components:**
950
+ **Performance Benefits:**
951
+
952
+ With react-native-reanimated, all animations:
953
+
954
+ - **Run on the UI thread** for better performance
955
+ - **Maintain 60fps** even during JavaScript thread blocking
956
+ - **Use native drivers** automatically
957
+ - **Support worklets** for complex animation logic
958
+ - **Provide smooth gestures** and interactions
959
+
960
+ **Migration from Legacy API:**
837
961
 
838
962
  Replace old individual animation components:
839
963
 
@@ -933,12 +1057,13 @@ function MyScreen() {
933
1057
 
934
1058
  ### Animation Hooks
935
1059
 
936
- Access animation logic directly for custom implementations:
1060
+ Access animation logic directly for custom implementations using react-native-reanimated:
937
1061
 
938
1062
  #### useFadeAnimation
939
1063
 
940
1064
  ```tsx
941
1065
  import { useFadeAnimation } from "@hoddy-ui/core";
1066
+ import Animated from "react-native-reanimated";
942
1067
 
943
1068
  function FadeComponent() {
944
1069
  const { animatedStyle } = useFadeAnimation({
@@ -958,6 +1083,7 @@ function FadeComponent() {
958
1083
 
959
1084
  ```tsx
960
1085
  import { useSlideAnimation } from "@hoddy-ui/core";
1086
+ import Animated from "react-native-reanimated";
961
1087
 
962
1088
  function SlideComponent() {
963
1089
  const { animatedStyle } = useSlideAnimation({
@@ -978,6 +1104,7 @@ function SlideComponent() {
978
1104
 
979
1105
  ```tsx
980
1106
  import { useGrowAnimation } from "@hoddy-ui/core";
1107
+ import Animated from "react-native-reanimated";
981
1108
 
982
1109
  function GrowComponent() {
983
1110
  const { animatedStyle } = useGrowAnimation({
@@ -1000,7 +1127,7 @@ function GrowComponent() {
1000
1127
  - `useRollAnimation` - For rotation and translation effects
1001
1128
  - `useThrownUpAnimation` - For spring-based upward animations
1002
1129
 
1003
- All animation hooks accept similar configuration objects with properties like `duration`, `delay`, and animation-specific options.
1130
+ All animation hooks accept similar configuration objects with properties like `duration`, `delay`, and animation-specific options. They return `animatedStyle` objects that work with `Animated.View` from react-native-reanimated for optimal performance.
1004
1131
 
1005
1132
  ## 🎯 Advanced Usage
1006
1133
 
@@ -1110,4 +1237,4 @@ MIT © [Hoddy Inc](https://github.com/kinghoddy)
1110
1237
 
1111
1238
  ---
1112
1239
 
1113
- **Need help?** [Open an issue](https://github.com/kinghoddy/hoddy-ui/issues) or check out our [examples](../../test/hoddyui).
1240
+ **Need help?** [Open an issue](https://github.com/kinghoddy/hoddy-ui/issues) or check out our [examples](../../test/my-app).
@@ -1,6 +1,5 @@
1
1
  import React, { ReactNode, FC } from 'react';
2
- import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, TextInput } from 'react-native';
3
- import * as index from 'index';
2
+ import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, StyleProp, TextInput } from 'react-native';
4
3
 
5
4
  type ThemeTypes = "dark" | "light";
6
5
  type ThemeModes = "dark" | "light" | "default";
@@ -35,7 +34,7 @@ interface ThemeState {
35
34
  }
36
35
  interface ThemeContext {
37
36
  themeState: ThemeState;
38
- themeDispatch?: any;
37
+ themeDispatch?: (action: ThemeActionTypes) => void;
39
38
  }
40
39
  interface ThemeProviderProps {
41
40
  children: ReactNode;
@@ -56,14 +55,6 @@ interface AvatarProps {
56
55
  size?: number;
57
56
  style?: ViewStyle;
58
57
  }
59
- interface AnimatorProps {
60
- style?: ViewStyle;
61
- duration?: number;
62
- children: ReactNode;
63
- delay?: number;
64
- animationType?: "easeInEaseOut" | "linear" | "spring";
65
- type?: "fade" | "slideInLeft" | "slideInRight" | "slideInUp" | "slideInDown";
66
- }
67
58
  interface ButtonProps {
68
59
  color?: colorTypes;
69
60
  variant?: "text" | "outlined" | "contained";
@@ -104,7 +95,7 @@ interface LinkButtonProps {
104
95
  style?: TextStyle & ViewStyle;
105
96
  color?: colorTypes;
106
97
  fontSize?: number;
107
- fontWeight?: string;
98
+ fontWeight?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
108
99
  disabled?: boolean;
109
100
  onPress?: () => void;
110
101
  }
@@ -197,6 +188,9 @@ interface PopupProps {
197
188
  open: boolean;
198
189
  onClose?: () => void;
199
190
  style?: ViewStyle;
191
+ disableAutoKeyboardManagement?: boolean;
192
+ onModalShow?: () => void;
193
+ onModalHide?: () => void;
200
194
  }
201
195
  interface SpinnerProps {
202
196
  label?: string;
@@ -207,6 +201,7 @@ interface SpinnerProps {
207
201
  }
208
202
  interface TextFieldProps extends TextInputProps {
209
203
  label?: string;
204
+ labelProps?: TypographyProps;
210
205
  variant?: "outlined" | "text" | "contained";
211
206
  color?: colorTypes;
212
207
  size?: "small" | "normal" | "large";
@@ -229,11 +224,12 @@ interface TextFieldProps extends TextInputProps {
229
224
  }[];
230
225
  onFocus?: () => void;
231
226
  onBlur?: () => void;
227
+ selectMenuProps?: Partial<SelectMenuProps>;
232
228
  }
233
229
  interface TypographyProps extends TextProps {
234
230
  children: ReactNode;
235
231
  color?: colorTypes | (string & {});
236
- style?: TextStyle | ViewStyle;
232
+ style?: StyleProp<TextStyle | ViewStyle>;
237
233
  textCase?: "capitalize" | "uppercase" | "lowercase" | undefined;
238
234
  variant?: "caption" | "body1" | "body2" | "h6" | "h5" | "h4" | "h3" | "h2" | "h1";
239
235
  align?: "center" | "left" | "right";
@@ -241,6 +237,7 @@ interface TypographyProps extends TextProps {
241
237
  numberOfLines?: number;
242
238
  adjustsFontSizeToFit?: boolean;
243
239
  fontFamily?: string;
240
+ fontSize?: number;
244
241
  fontWeight?: 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
245
242
  }
246
243
  interface SafeAreaViewProps {
@@ -261,6 +258,8 @@ interface SelectMenuProps {
261
258
  label?: string;
262
259
  secondary?: string;
263
260
  helperText?: string;
261
+ searchEnabled?: boolean;
262
+ searchPlaceholder?: string;
264
263
  }
265
264
  interface OTPInputProps {
266
265
  length?: number;
@@ -289,12 +288,81 @@ interface DividerProps {
289
288
  style?: ViewStyle;
290
289
  height?: number;
291
290
  }
291
+ type AnimationType = "fade" | "grow" | "slide" | "blink" | "float" | "roll" | "thrownup";
292
+ interface BaseAnimatorProps {
293
+ children: ReactNode;
294
+ duration?: number;
295
+ delay?: number;
296
+ closeAfter?: number | null;
297
+ style?: ViewStyle;
298
+ }
299
+ type AnimatorProps = (BaseAnimatorProps & {
300
+ type: "fade";
301
+ }) | (BaseAnimatorProps & {
302
+ type: "grow";
303
+ initialScale?: number;
304
+ }) | (BaseAnimatorProps & {
305
+ type: "slide";
306
+ direction?: "up" | "down" | "left" | "right";
307
+ initialValue?: number;
308
+ }) | (BaseAnimatorProps & {
309
+ type: "blink";
310
+ blinkDuration?: number;
311
+ minOpacity?: number;
312
+ maxOpacity?: number;
313
+ }) | (BaseAnimatorProps & {
314
+ type: "float";
315
+ closeDuration?: number;
316
+ floatDistance?: number;
317
+ floatDuration?: number;
318
+ }) | (BaseAnimatorProps & {
319
+ type: "roll";
320
+ initialTranslateY?: number;
321
+ initialRotate?: string;
322
+ }) | (BaseAnimatorProps & {
323
+ type: "thrownup";
324
+ });
292
325
 
326
+ /**
327
+ * Configuration options for the Hoddy UI library
328
+ *
329
+ * @example
330
+ * ```typescript
331
+ * initialize({
332
+ * googleMapApiKey: "AIzaSyBxxxxxxxxxxxxxxxxxxxxxx",
333
+ * edgeToEdge: true,
334
+ * colors: {
335
+ * primary: "#007AFF",
336
+ * secondary: "#34C759"
337
+ * },
338
+ * typography: {
339
+ * fontFamily: "Inter",
340
+ * fontWeights: {
341
+ * 400: "Inter-Regular",
342
+ * 500: "Inter-Medium",
343
+ * 600: "Inter-SemiBold",
344
+ * 700: "Inter-Bold"
345
+ * }
346
+ * }
347
+ * });
348
+ * ```
349
+ */
293
350
  type configProps = {
351
+ /** Google Maps API key for map components */
294
352
  googleMapApiKey?: string;
353
+ /** Custom color palette overrides */
295
354
  colors?: extraColorTypes;
296
- fontFamily?: string;
355
+ /** Enable edge-to-edge display mode */
297
356
  edgeToEdge?: boolean;
357
+ /** Typography settings */
358
+ typography?: {
359
+ /** Primary font family */
360
+ fontFamily?: string;
361
+ /** Font family mappings for each weight (Android support) */
362
+ fontWeights?: {
363
+ [K in 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900]?: string;
364
+ };
365
+ };
298
366
  };
299
367
  declare function initialize(config: configProps): void;
300
368
 
@@ -312,7 +380,7 @@ declare const Button: React.FC<ButtonProps>;
312
380
 
313
381
  declare const CheckBox: FC<CheckboxProps>;
314
382
 
315
- declare let showFlashMessage: (msg: FlashMessageProps) => void;
383
+ declare const showFlashMessage: (msg: FlashMessageProps) => void;
316
384
 
317
385
  declare const FormWrapper: React.FC<FormWrapperProps>;
318
386
 
@@ -371,10 +439,10 @@ declare const OTPInput: FC<OTPInputProps>;
371
439
 
372
440
  declare const useColors: () => {
373
441
  white: {
374
- main?: string | undefined;
375
- light?: string | undefined;
376
- dark?: string | undefined;
377
- text?: string | undefined;
442
+ main?: string;
443
+ light?: string;
444
+ dark?: string;
445
+ text?: string;
378
446
  1: string;
379
447
  2: string;
380
448
  3: string;
@@ -382,10 +450,10 @@ declare const useColors: () => {
382
450
  5: string;
383
451
  };
384
452
  black: {
385
- main?: string | undefined;
386
- light?: string | undefined;
387
- dark?: string | undefined;
388
- text?: string | undefined;
453
+ main?: string;
454
+ light?: string;
455
+ dark?: string;
456
+ text?: string;
389
457
  1: string;
390
458
  2: string;
391
459
  3: string;
@@ -454,10 +522,10 @@ declare const useColors: () => {
454
522
  };
455
523
  } | {
456
524
  white: {
457
- main?: string | undefined;
458
- light?: string | undefined;
459
- dark?: string | undefined;
460
- text?: string | undefined;
525
+ main?: string;
526
+ light?: string;
527
+ dark?: string;
528
+ text?: string;
461
529
  1: string;
462
530
  2: string;
463
531
  3: string;
@@ -465,10 +533,10 @@ declare const useColors: () => {
465
533
  5: string;
466
534
  };
467
535
  black: {
468
- main?: string | undefined;
469
- light?: string | undefined;
470
- dark?: string | undefined;
471
- text?: string | undefined;
536
+ main?: string;
537
+ light?: string;
538
+ dark?: string;
539
+ text?: string;
472
540
  1: string;
473
541
  2: string;
474
542
  3: string;
@@ -537,10 +605,10 @@ declare const useColors: () => {
537
605
  };
538
606
  } | {
539
607
  white: {
540
- main?: string | undefined;
541
- light?: string | undefined;
542
- dark?: string | undefined;
543
- text?: string | undefined;
608
+ main?: string;
609
+ light?: string;
610
+ dark?: string;
611
+ text?: string;
544
612
  1: string;
545
613
  2: string;
546
614
  3: string;
@@ -548,10 +616,10 @@ declare const useColors: () => {
548
616
  5: string;
549
617
  };
550
618
  black: {
551
- main?: string | undefined;
552
- light?: string | undefined;
553
- dark?: string | undefined;
554
- text?: string | undefined;
619
+ main?: string;
620
+ light?: string;
621
+ dark?: string;
622
+ text?: string;
555
623
  1: string;
556
624
  2: string;
557
625
  3: string;
@@ -619,7 +687,11 @@ declare const useColors: () => {
619
687
  text: string;
620
688
  };
621
689
  };
622
- declare const useTheme: () => index.ThemeTypes;
690
+ declare const useTheme: () => ThemeTypes;
691
+ declare const useThemeContext: () => {
692
+ theme: ThemeState;
693
+ setTheme: (theme: ThemeModes) => void;
694
+ };
623
695
  declare const useNavScreenOptions: (type: "stack" | "tab" | "drawer") => any;
624
696
 
625
697
  declare const UIThemeContext: React.Context<ThemeContext>;
@@ -629,4 +701,4 @@ declare const HoddyUI: {
629
701
  initialize: typeof initialize;
630
702
  };
631
703
 
632
- export { AdaptiveStatusBar, AlertX, type AlertXProps, type AnimatorProps, Avatar, type AvatarProps, Button, type ButtonProps, CheckBox, type CheckboxProps, Divider, type DividerProps, type FlashMessageProps, FormWrapper, type FormWrapperProps, Grid, GridItem, type GridItemProps, type GridProps, IconButton, type IconButtonProps, LinkButton, type LinkButtonProps, type ListItemProps, type ListItemTextProps, type ListProps, Locator, type LocatorInputProps, type LocatorProps, OTPInput, type OTPInputProps, Popup, type PopupProps, RatingInput, type RatingInputProps, RatingStars, type RatingStarsProps, SafeAreaView, type SafeAreaViewProps, SelectMenu, type SelectMenuProps, Spinner, type SpinnerProps, TextField, TextField2, type TextFieldProps, type ThemeActionTypes, type ThemeContext, type ThemeModes, type ThemeProviderProps, type ThemeState, type ThemeTypes, Typography, type TypographyProps, UIThemeContext, UIThemeProvider, type colorTypes, HoddyUI as default, type extraColorTypes, getLocationFromPlaceId, getPredictionsFromCoords, getPredictionsFromQuery, type locatorLocation, type predictionType, showFlashMessage, useColors, useNavScreenOptions, useTheme };
704
+ export { AdaptiveStatusBar, AlertX, type AlertXProps, type AnimationType, type AnimatorProps, Avatar, type AvatarProps, Button, type ButtonProps, CheckBox, type CheckboxProps, Divider, type DividerProps, type FlashMessageProps, FormWrapper, type FormWrapperProps, Grid, GridItem, type GridItemProps, type GridProps, IconButton, type IconButtonProps, LinkButton, type LinkButtonProps, type ListItemProps, type ListItemTextProps, type ListProps, Locator, type LocatorInputProps, type LocatorProps, OTPInput, type OTPInputProps, Popup, type PopupProps, RatingInput, type RatingInputProps, RatingStars, type RatingStarsProps, SafeAreaView, type SafeAreaViewProps, SelectMenu, type SelectMenuProps, Spinner, type SpinnerProps, TextField, TextField2, type TextFieldProps, type ThemeActionTypes, type ThemeContext, type ThemeModes, type ThemeProviderProps, type ThemeState, type ThemeTypes, Typography, type TypographyProps, UIThemeContext, UIThemeProvider, type colorTypes, HoddyUI as default, type extraColorTypes, getLocationFromPlaceId, getPredictionsFromCoords, getPredictionsFromQuery, type locatorLocation, type predictionType, showFlashMessage, useColors, useNavScreenOptions, useTheme, useThemeContext };