@hoddy-ui/next 2.0.22 → 2.0.24

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.js CHANGED
@@ -209,18 +209,19 @@ function colors(theme) {
209
209
  var config = {
210
210
  GOOGLE_MAP_API_KEY: ""
211
211
  };
212
- function setApiKey(key) {
212
+ function setConfig(key) {
213
213
  config = key;
214
214
  }
215
- function getApiKey() {
215
+ function getConfig() {
216
216
  return config;
217
217
  }
218
218
 
219
219
  // ../src/config/index.ts
220
220
  function initialize(config2) {
221
221
  try {
222
- setApiKey({
223
- GOOGLE_MAP_API_KEY: config2.googleMapApiKey
222
+ setConfig({
223
+ GOOGLE_MAP_API_KEY: config2.googleMapApiKey,
224
+ DEFAULT_FONT_FAMILY: config2.fontFamily
224
225
  });
225
226
  if (config2.colors)
226
227
  setExtraColors(config2.colors);
@@ -293,7 +294,7 @@ var Typography = (0, import_react.forwardRef)(
293
294
  alignItems: "center",
294
295
  textAlign: align,
295
296
  fontWeight: fontWeight.toString(),
296
- fontFamily: fontFamily || "System"
297
+ fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || "System"
297
298
  // Use custom font if provided, else default
298
299
  }
299
300
  });
@@ -639,6 +640,7 @@ var LinkButton = ({
639
640
  text: {
640
641
  fontSize: (0, import_react_native_size_matters6.moderateScale)(fontSize),
641
642
  fontWeight,
643
+ fontFamily: getConfig().DEFAULT_FONT_FAMILY || "System",
642
644
  color: disabled ? "#777" : colors2[color].main
643
645
  }
644
646
  });
@@ -745,7 +747,8 @@ var Button = (0, import_react8.forwardRef)(
745
747
  text: {
746
748
  color: disabled ? variant === "text" || variant === "outlined" ? colors2.black[1] : colors2[color].text : colors2[color][variant === "text" || variant === "outlined" ? "main" : "text"],
747
749
  fontWeight: variant === "outlined" ? "700" : "500",
748
- fontSize: size === "small" ? "12@ms" : "16@ms"
750
+ fontSize: size === "small" ? "12@ms" : "16@ms",
751
+ fontFamily: getConfig().DEFAULT_FONT_FAMILY || "System"
749
752
  }
750
753
  });
751
754
  return /* @__PURE__ */ import_react8.default.createElement(
@@ -1404,6 +1407,7 @@ var TextField = ({
1404
1407
  paddingLeft: variant === "text" ? 0 : (0, import_react_native_size_matters14.moderateScale)(15),
1405
1408
  paddingRight: (0, import_react_native_size_matters14.moderateScale)(10),
1406
1409
  paddingTop: "11@vs",
1410
+ fontFamily: getConfig().DEFAULT_FONT_FAMILY || "System",
1407
1411
  color: colors2.black[1],
1408
1412
  zIndex: 10
1409
1413
  // backgroundColor: "#284",
@@ -1415,6 +1419,7 @@ var TextField = ({
1415
1419
  paddingTop: "13@ms"
1416
1420
  },
1417
1421
  label: {
1422
+ fontFamily: getConfig().DEFAULT_FONT_FAMILY || "System",
1418
1423
  position: "absolute",
1419
1424
  left: variant === "text" ? 0 : (0, import_react_native_size_matters14.moderateScale)(15),
1420
1425
  fontSize: focused || value ? "10@s" : "13@s",
@@ -1726,12 +1731,12 @@ var TextField_default = TextField;
1726
1731
  var Location = __toESM(require("expo-location"));
1727
1732
  var import_react_native_size_matters15 = require("react-native-size-matters");
1728
1733
  setTimeout(() => {
1729
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1734
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1730
1735
  if (GOOGLE_MAP_API_KEY)
1731
1736
  Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
1732
1737
  }, 500);
1733
1738
  var getPredictionsFromCoords = async (coords) => {
1734
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1739
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1735
1740
  if (!GOOGLE_MAP_API_KEY)
1736
1741
  console.error(
1737
1742
  "Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
@@ -1766,7 +1771,7 @@ var Locator = ({
1766
1771
  float = true,
1767
1772
  country = "ng"
1768
1773
  }) => {
1769
- const { GOOGLE_MAP_API_KEY } = getApiKey();
1774
+ const { GOOGLE_MAP_API_KEY } = getConfig();
1770
1775
  const [changed, setChanged] = (0, import_react17.useState)(false);
1771
1776
  const [value, setValue] = (0, import_react17.useState)("");
1772
1777
  const [prediction, setPrediction] = (0, import_react17.useState)([]);