@hoddy-ui/core 1.1.0 → 1.1.1

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.
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode, FC } from 'react';
2
- import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps } from 'react-native';
2
+ import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, TextInput } from 'react-native';
3
+ import * as index from 'index';
3
4
 
4
5
  type ThemeTypes = "dark" | "light";
5
6
  type ThemeModes = "dark" | "light" | "default";
@@ -24,6 +25,10 @@ type extraColorTypes = {
24
25
  };
25
26
  };
26
27
  };
28
+ interface ThemeActionTypes {
29
+ type: ThemeModes;
30
+ payload?: ThemeTypes;
31
+ }
27
32
  interface ThemeState {
28
33
  value: ThemeTypes;
29
34
  mode: ThemeModes;
@@ -51,6 +56,14 @@ interface AvatarProps {
51
56
  size?: number;
52
57
  style?: ViewStyle;
53
58
  }
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
+ }
54
67
  interface ButtonProps {
55
68
  color?: colorTypes;
56
69
  variant?: "text" | "outlined" | "contained";
@@ -110,6 +123,7 @@ interface IconButtonProps {
110
123
  }
111
124
  type locatorLocation = {
112
125
  description: string;
126
+ formatted_address?: string;
113
127
  longitude: number;
114
128
  latitude: number;
115
129
  };
@@ -133,6 +147,26 @@ interface LocatorProps {
133
147
  renderInput?: (props: LocatorInputProps) => ReactNode;
134
148
  country?: string;
135
149
  }
150
+ interface ListProps {
151
+ style?: ViewStyle;
152
+ children: ReactNode;
153
+ }
154
+ interface ListItemTextProps {
155
+ primary: string;
156
+ divider?: boolean;
157
+ primaryProps?: TypographyProps;
158
+ secondaryProps?: TypographyProps;
159
+ secondary?: string;
160
+ style?: ViewStyle;
161
+ }
162
+ interface ListItemProps {
163
+ link?: boolean;
164
+ divider?: boolean;
165
+ onPress?: () => void;
166
+ index?: number;
167
+ style?: ViewStyle;
168
+ children: ReactNode;
169
+ }
136
170
  interface FormWrapperProps {
137
171
  children: ReactNode;
138
172
  behavior?: "position" | "height" | "padding";
@@ -260,6 +294,7 @@ type configProps = {
260
294
  googleMapApiKey?: string;
261
295
  colors?: extraColorTypes;
262
296
  fontFamily?: string;
297
+ edgeToEdge?: boolean;
263
298
  };
264
299
  declare function initialize(config: configProps): void;
265
300
 
@@ -287,14 +322,34 @@ declare const RatingInput: FC<RatingInputProps>;
287
322
  declare const GridItem: React.FC<GridItemProps>;
288
323
  declare const Grid: React.FC<GridProps>;
289
324
 
290
- declare const getPredictionsFromCoords: (coords: any) => Promise<{
325
+ type predictionType = {
326
+ id: string;
327
+ description: string;
328
+ };
329
+ declare const getPredictionsFromCoords: (coords: {
330
+ latitude: number;
331
+ longitude: number;
332
+ }) => Promise<{
291
333
  description: any;
292
334
  id: any;
293
335
  latLng: {
294
- lst: any;
295
- lng: any;
336
+ lst: number;
337
+ lng: number;
296
338
  };
297
339
  }[]>;
340
+ declare const getPredictionsFromQuery: (query: string, country: string) => Promise<{
341
+ description: any;
342
+ id: any;
343
+ }[]>;
344
+ declare const getLocationFromPlaceId: (place_id: string) => Promise<{
345
+ formatted_address: string;
346
+ geometry: {
347
+ location: {
348
+ lat: number;
349
+ lng: number;
350
+ };
351
+ };
352
+ }>;
298
353
  declare const Locator: React.FC<LocatorProps>;
299
354
 
300
355
  declare const Popup: React.FC<PopupProps>;
@@ -308,7 +363,7 @@ declare const SelectMenu: React.FC<SelectMenuProps>;
308
363
  declare const Spinner: React.FC<SpinnerProps>;
309
364
 
310
365
  declare const TextField: React.FC<TextFieldProps>;
311
- declare const TextField2: React.FC<TextFieldProps>;
366
+ declare const TextField2: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<TextInput>>;
312
367
 
313
368
  declare const Typography: React.FC<TypographyProps>;
314
369
 
@@ -564,7 +619,7 @@ declare const useColors: () => {
564
619
  text: string;
565
620
  };
566
621
  };
567
- declare const useTheme: () => ThemeTypes;
622
+ declare const useTheme: () => index.ThemeTypes;
568
623
  declare const useNavScreenOptions: (type: "stack" | "tab" | "drawer") => any;
569
624
 
570
625
  declare const UIThemeContext: React.Context<ThemeContext>;
@@ -574,4 +629,4 @@ declare const HoddyUI: {
574
629
  initialize: typeof initialize;
575
630
  };
576
631
 
577
- export { AdaptiveStatusBar, AlertX, Avatar, Button, CheckBox, Divider, FormWrapper, Grid, GridItem, IconButton, LinkButton, Locator, OTPInput, Popup, RatingInput, RatingStars, SafeAreaView, SelectMenu, Spinner, TextField, TextField2, Typography, UIThemeContext, UIThemeProvider, HoddyUI as default, getPredictionsFromCoords, showFlashMessage, useColors, useNavScreenOptions, useTheme };
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 };
@@ -1,5 +1,6 @@
1
1
  import React, { ReactNode, FC } from 'react';
2
- import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps } from 'react-native';
2
+ import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, TextInput } from 'react-native';
3
+ import * as index from 'index';
3
4
 
4
5
  type ThemeTypes = "dark" | "light";
5
6
  type ThemeModes = "dark" | "light" | "default";
@@ -24,6 +25,10 @@ type extraColorTypes = {
24
25
  };
25
26
  };
26
27
  };
28
+ interface ThemeActionTypes {
29
+ type: ThemeModes;
30
+ payload?: ThemeTypes;
31
+ }
27
32
  interface ThemeState {
28
33
  value: ThemeTypes;
29
34
  mode: ThemeModes;
@@ -51,6 +56,14 @@ interface AvatarProps {
51
56
  size?: number;
52
57
  style?: ViewStyle;
53
58
  }
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
+ }
54
67
  interface ButtonProps {
55
68
  color?: colorTypes;
56
69
  variant?: "text" | "outlined" | "contained";
@@ -110,6 +123,7 @@ interface IconButtonProps {
110
123
  }
111
124
  type locatorLocation = {
112
125
  description: string;
126
+ formatted_address?: string;
113
127
  longitude: number;
114
128
  latitude: number;
115
129
  };
@@ -133,6 +147,26 @@ interface LocatorProps {
133
147
  renderInput?: (props: LocatorInputProps) => ReactNode;
134
148
  country?: string;
135
149
  }
150
+ interface ListProps {
151
+ style?: ViewStyle;
152
+ children: ReactNode;
153
+ }
154
+ interface ListItemTextProps {
155
+ primary: string;
156
+ divider?: boolean;
157
+ primaryProps?: TypographyProps;
158
+ secondaryProps?: TypographyProps;
159
+ secondary?: string;
160
+ style?: ViewStyle;
161
+ }
162
+ interface ListItemProps {
163
+ link?: boolean;
164
+ divider?: boolean;
165
+ onPress?: () => void;
166
+ index?: number;
167
+ style?: ViewStyle;
168
+ children: ReactNode;
169
+ }
136
170
  interface FormWrapperProps {
137
171
  children: ReactNode;
138
172
  behavior?: "position" | "height" | "padding";
@@ -260,6 +294,7 @@ type configProps = {
260
294
  googleMapApiKey?: string;
261
295
  colors?: extraColorTypes;
262
296
  fontFamily?: string;
297
+ edgeToEdge?: boolean;
263
298
  };
264
299
  declare function initialize(config: configProps): void;
265
300
 
@@ -287,14 +322,34 @@ declare const RatingInput: FC<RatingInputProps>;
287
322
  declare const GridItem: React.FC<GridItemProps>;
288
323
  declare const Grid: React.FC<GridProps>;
289
324
 
290
- declare const getPredictionsFromCoords: (coords: any) => Promise<{
325
+ type predictionType = {
326
+ id: string;
327
+ description: string;
328
+ };
329
+ declare const getPredictionsFromCoords: (coords: {
330
+ latitude: number;
331
+ longitude: number;
332
+ }) => Promise<{
291
333
  description: any;
292
334
  id: any;
293
335
  latLng: {
294
- lst: any;
295
- lng: any;
336
+ lst: number;
337
+ lng: number;
296
338
  };
297
339
  }[]>;
340
+ declare const getPredictionsFromQuery: (query: string, country: string) => Promise<{
341
+ description: any;
342
+ id: any;
343
+ }[]>;
344
+ declare const getLocationFromPlaceId: (place_id: string) => Promise<{
345
+ formatted_address: string;
346
+ geometry: {
347
+ location: {
348
+ lat: number;
349
+ lng: number;
350
+ };
351
+ };
352
+ }>;
298
353
  declare const Locator: React.FC<LocatorProps>;
299
354
 
300
355
  declare const Popup: React.FC<PopupProps>;
@@ -308,7 +363,7 @@ declare const SelectMenu: React.FC<SelectMenuProps>;
308
363
  declare const Spinner: React.FC<SpinnerProps>;
309
364
 
310
365
  declare const TextField: React.FC<TextFieldProps>;
311
- declare const TextField2: React.FC<TextFieldProps>;
366
+ declare const TextField2: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<TextInput>>;
312
367
 
313
368
  declare const Typography: React.FC<TypographyProps>;
314
369
 
@@ -564,7 +619,7 @@ declare const useColors: () => {
564
619
  text: string;
565
620
  };
566
621
  };
567
- declare const useTheme: () => ThemeTypes;
622
+ declare const useTheme: () => index.ThemeTypes;
568
623
  declare const useNavScreenOptions: (type: "stack" | "tab" | "drawer") => any;
569
624
 
570
625
  declare const UIThemeContext: React.Context<ThemeContext>;
@@ -574,4 +629,4 @@ declare const HoddyUI: {
574
629
  initialize: typeof initialize;
575
630
  };
576
631
 
577
- export { AdaptiveStatusBar, AlertX, Avatar, Button, CheckBox, Divider, FormWrapper, Grid, GridItem, IconButton, LinkButton, Locator, OTPInput, Popup, RatingInput, RatingStars, SafeAreaView, SelectMenu, Spinner, TextField, TextField2, Typography, UIThemeContext, UIThemeProvider, HoddyUI as default, getPredictionsFromCoords, showFlashMessage, useColors, useNavScreenOptions, useTheme };
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 };