@hoddy-ui/next 2.0.19 → 2.0.21

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode, FC } from 'react';
2
- import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps } from 'react-native';
2
+ import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps } from 'react-native';
3
3
 
4
4
  type ThemeTypes = "dark" | "light";
5
5
  type ThemeModes = "dark" | "light" | "default";
@@ -193,7 +193,7 @@ interface TextFieldProps extends TextInputProps {
193
193
  onFocus?: () => void;
194
194
  onBlur?: () => void;
195
195
  }
196
- interface TypographyProps {
196
+ interface TypographyProps extends TextProps {
197
197
  children: ReactNode;
198
198
  color?: colorTypes | (string & {});
199
199
  style?: TextStyle | ViewStyle;
@@ -203,6 +203,7 @@ interface TypographyProps {
203
203
  gutterBottom?: number;
204
204
  numberOfLines?: number;
205
205
  adjustsFontSizeToFit?: boolean;
206
+ fontFamily?: string;
206
207
  fontWeight?: 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
207
208
  }
208
209
  interface SafeAreaViewProps {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { ReactNode, FC } from 'react';
2
- import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps } from 'react-native';
2
+ import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps } from 'react-native';
3
3
 
4
4
  type ThemeTypes = "dark" | "light";
5
5
  type ThemeModes = "dark" | "light" | "default";
@@ -193,7 +193,7 @@ interface TextFieldProps extends TextInputProps {
193
193
  onFocus?: () => void;
194
194
  onBlur?: () => void;
195
195
  }
196
- interface TypographyProps {
196
+ interface TypographyProps extends TextProps {
197
197
  children: ReactNode;
198
198
  color?: colorTypes | (string & {});
199
199
  style?: TextStyle | ViewStyle;
@@ -203,6 +203,7 @@ interface TypographyProps {
203
203
  gutterBottom?: number;
204
204
  numberOfLines?: number;
205
205
  adjustsFontSizeToFit?: boolean;
206
+ fontFamily?: string;
206
207
  fontWeight?: 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
207
208
  }
208
209
  interface SafeAreaViewProps {
package/dist/index.js CHANGED
@@ -268,6 +268,8 @@ var Typography = (0, import_react.forwardRef)(
268
268
  numberOfLines,
269
269
  adjustsFontSizeToFit,
270
270
  fontWeight = 400,
271
+ fontFamily,
272
+ // NEW PROP ADDED
271
273
  ...props
272
274
  }, ref) => {
273
275
  const colors2 = useColors();
@@ -290,7 +292,9 @@ var Typography = (0, import_react.forwardRef)(
290
292
  textTransform: textCase,
291
293
  alignItems: "center",
292
294
  textAlign: align,
293
- fontWeight: fontWeight.toString()
295
+ fontWeight: fontWeight.toString(),
296
+ fontFamily: fontFamily || "System"
297
+ // Use custom font if provided, else default
294
298
  }
295
299
  });
296
300
  return /* @__PURE__ */ import_react.default.createElement(
@@ -299,7 +303,7 @@ var Typography = (0, import_react.forwardRef)(
299
303
  ref,
300
304
  numberOfLines,
301
305
  adjustsFontSizeToFit,
302
- style: { ...styles2.text, ...style },
306
+ style: [styles2.text, style],
303
307
  ...props
304
308
  },
305
309
  children
@@ -918,10 +922,14 @@ var Popup = ({
918
922
  }
919
923
  });
920
924
  import_react11.default.useEffect(() => {
921
- setShow(open);
922
- setTimeout(() => {
923
- setShowSecondary(open);
924
- }, 500);
925
+ if (open) {
926
+ setShow(open);
927
+ setTimeout(() => {
928
+ setShowSecondary(open);
929
+ }, 500);
930
+ } else {
931
+ closeAction();
932
+ }
925
933
  }, [open]);
926
934
  const closeAction = () => {
927
935
  setShowSecondary(false);