@hoddy-ui/next 2.0.20 → 2.0.22

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 {
@@ -255,6 +256,7 @@ interface DividerProps {
255
256
  type configProps = {
256
257
  googleMapApiKey?: string;
257
258
  colors?: extraColorTypes;
259
+ fontFamily?: string;
258
260
  };
259
261
  declare function initialize(config: configProps): void;
260
262
 
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 {
@@ -255,6 +256,7 @@ interface DividerProps {
255
256
  type configProps = {
256
257
  googleMapApiKey?: string;
257
258
  colors?: extraColorTypes;
259
+ fontFamily?: string;
258
260
  };
259
261
  declare function initialize(config: configProps): void;
260
262
 
package/dist/index.js CHANGED
@@ -206,24 +206,24 @@ function colors(theme) {
206
206
  }
207
207
 
208
208
  // ../src/config/KeyManager.ts
209
- var apiKey = {
209
+ var config = {
210
210
  GOOGLE_MAP_API_KEY: ""
211
211
  };
212
212
  function setApiKey(key) {
213
- apiKey = key;
213
+ config = key;
214
214
  }
215
215
  function getApiKey() {
216
- return apiKey;
216
+ return config;
217
217
  }
218
218
 
219
219
  // ../src/config/index.ts
220
- function initialize(config) {
220
+ function initialize(config2) {
221
221
  try {
222
222
  setApiKey({
223
- GOOGLE_MAP_API_KEY: config.googleMapApiKey
223
+ GOOGLE_MAP_API_KEY: config2.googleMapApiKey
224
224
  });
225
- if (config.colors)
226
- setExtraColors(config.colors);
225
+ if (config2.colors)
226
+ setExtraColors(config2.colors);
227
227
  } catch (error) {
228
228
  console.error("Error reading the config file:", error);
229
229
  }
@@ -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