@hoddy-ui/core 2.5.40 → 2.5.43

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.
@@ -211,6 +211,17 @@ var getFontFamily = (fontWeight) => {
211
211
  };
212
212
 
213
213
  // ../src/Components/Typography.tsx
214
+ var DEFAULT_FONT_SIZES = {
215
+ h1: ms(42),
216
+ h2: ms(37),
217
+ h3: ms(32),
218
+ h4: ms(27),
219
+ h5: ms(22),
220
+ h6: ms(17),
221
+ body1: ms(15),
222
+ body2: ms(12),
223
+ caption: ms(10)
224
+ };
214
225
  var Typography = forwardRef(
215
226
  ({
216
227
  children,
@@ -228,18 +239,10 @@ var Typography = forwardRef(
228
239
  ...props
229
240
  }, ref) => {
230
241
  const colors2 = useColors();
231
- const _fontSize = {
232
- h1: ms(42),
233
- h2: ms(37),
234
- h3: ms(32),
235
- h4: ms(27),
236
- h5: ms(22),
237
- h6: ms(17),
238
- body1: ms(15),
239
- body2: ms(12),
240
- caption: ms(10)
241
- };
242
- const f = fontSize || _fontSize[variant];
242
+ const config2 = getConfig();
243
+ const customFontSizes = config2.TYPOGRAPHY?.fontSizes;
244
+ const baseFontSize = customFontSizes?.[variant] ?? DEFAULT_FONT_SIZES[variant];
245
+ const f = fontSize || baseFontSize;
243
246
  const styles = StyleSheet.create({
244
247
  text: {
245
248
  lineHeight: f * 1.2,
@@ -664,7 +667,7 @@ var Avatar_default = Avatar;
664
667
  import { Ionicons, MaterialIcons as MaterialIcons2 } from "@expo/vector-icons";
665
668
  import React7, { forwardRef as forwardRef2 } from "react";
666
669
  import { ActivityIndicator, Text as Text2, TouchableOpacity as TouchableOpacity2 } from "react-native";
667
- import { ScaledSheet as ScaledSheet4, moderateScale as moderateScale2, ms as ms4 } from "react-native-size-matters";
670
+ import { ScaledSheet as ScaledSheet4, moderateScale, ms as ms4 } from "react-native-size-matters";
668
671
  var LinkButton = ({
669
672
  title,
670
673
  style = {},
@@ -678,7 +681,7 @@ var LinkButton = ({
678
681
  const colors2 = useColors();
679
682
  const styles = ScaledSheet4.create({
680
683
  text: {
681
- fontSize: moderateScale2(fontSize),
684
+ fontSize: moderateScale(fontSize),
682
685
  fontWeight: fontWeight.toString(),
683
686
  fontFamily: getFontFamily(fontWeight),
684
687
  color: disabled ? "#777" : colors2[color].main
@@ -848,7 +851,7 @@ var CheckBox = ({
848
851
  };
849
852
 
850
853
  // ../src/Components/FormWrapper.tsx
851
- import React9 from "react";
854
+ import React9, { forwardRef as forwardRef3 } from "react";
852
855
  import {
853
856
  Keyboard,
854
857
  KeyboardAvoidingView,
@@ -856,56 +859,59 @@ import {
856
859
  ScrollView,
857
860
  TouchableWithoutFeedback
858
861
  } from "react-native";
859
- import { ScaledSheet as ScaledSheet6 } from "react-native-size-matters";
860
862
  import { useSafeAreaInsets as useSafeAreaInsets2 } from "react-native-safe-area-context";
861
- var FormWrapper = ({
862
- children,
863
- behavior = Platform4.OS === "ios" ? "padding" : "height",
864
- contentContainerStyle,
865
- mode = "scroll",
866
- keyboardVerticalOffset = 10,
867
- style = {},
868
- onScroll
869
- }) => {
870
- const { bottom } = useSafeAreaInsets2();
871
- const defaultOffset = Platform4.OS === "ios" ? -bottom : -bottom * 2;
872
- const styles = ScaledSheet6.create({
873
- root: {
874
- width: "100%",
875
- flex: 1,
876
- ...style
877
- }
878
- });
879
- return mode === "static" ? /* @__PURE__ */ React9.createElement(TouchableWithoutFeedback, { onPress: Keyboard.dismiss, accessible: false }, /* @__PURE__ */ React9.createElement(
880
- KeyboardAvoidingView,
881
- {
882
- style: styles.root,
883
- behavior,
884
- contentContainerStyle: styles.root,
885
- keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
886
- },
887
- children
888
- )) : /* @__PURE__ */ React9.createElement(
889
- KeyboardAvoidingView,
890
- {
891
- behavior,
892
- style: styles.root,
893
- keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
894
- },
895
- /* @__PURE__ */ React9.createElement(
896
- ScrollView,
863
+ import { ScaledSheet as ScaledSheet6 } from "react-native-size-matters";
864
+ var FormWrapper = forwardRef3(
865
+ ({
866
+ children,
867
+ behavior = Platform4.OS === "ios" ? "padding" : "height",
868
+ contentContainerStyle,
869
+ mode = "scroll",
870
+ keyboardVerticalOffset = 10,
871
+ style = {},
872
+ onScroll
873
+ }, ref) => {
874
+ const { bottom } = useSafeAreaInsets2();
875
+ const defaultOffset = Platform4.OS === "ios" ? -bottom : -bottom * 2;
876
+ const styles = ScaledSheet6.create({
877
+ root: {
878
+ width: "100%",
879
+ flex: 1,
880
+ ...style
881
+ }
882
+ });
883
+ return mode === "static" ? /* @__PURE__ */ React9.createElement(TouchableWithoutFeedback, { onPress: Keyboard.dismiss, accessible: false }, /* @__PURE__ */ React9.createElement(
884
+ KeyboardAvoidingView,
897
885
  {
898
- onScroll,
899
- showsVerticalScrollIndicator: false,
900
- scrollEventThrottle: 40,
901
- keyboardDismissMode: "interactive",
902
- contentContainerStyle,
903
- keyboardShouldPersistTaps: "handled"
886
+ style: styles.root,
887
+ behavior,
888
+ contentContainerStyle: styles.root,
889
+ keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
904
890
  },
905
891
  children
906
- )
907
- );
908
- };
892
+ )) : /* @__PURE__ */ React9.createElement(
893
+ KeyboardAvoidingView,
894
+ {
895
+ behavior,
896
+ style: styles.root,
897
+ keyboardVerticalOffset: keyboardVerticalOffset || defaultOffset
898
+ },
899
+ /* @__PURE__ */ React9.createElement(
900
+ ScrollView,
901
+ {
902
+ ref,
903
+ onScroll,
904
+ showsVerticalScrollIndicator: false,
905
+ scrollEventThrottle: 40,
906
+ keyboardDismissMode: "interactive",
907
+ contentContainerStyle,
908
+ keyboardShouldPersistTaps: "handled"
909
+ },
910
+ children
911
+ )
912
+ );
913
+ }
914
+ );
909
915
 
910
916
  // ../src/Components/StarRating.tsx
911
917
  import { Ionicons as Ionicons2 } from "@expo/vector-icons";
@@ -1355,9 +1361,9 @@ import {
1355
1361
  } from "react-native";
1356
1362
  import {
1357
1363
  ScaledSheet as ScaledSheet12,
1358
- moderateScale as moderateScale3,
1364
+ moderateScale as moderateScale2,
1359
1365
  ms as ms7,
1360
- verticalScale as verticalScale2
1366
+ verticalScale
1361
1367
  } from "react-native-size-matters";
1362
1368
 
1363
1369
  // ../src/Components/SelectMenu.tsx
@@ -1516,20 +1522,20 @@ var TextField = ({
1516
1522
  }) => {
1517
1523
  const colors2 = useColors();
1518
1524
  const [focused, setFocused] = useState7(false);
1519
- const height = moderateScale3(variant === "text" ? 50 : 45) * (size === "large" ? 1.2 : size === "small" ? 0.8 : 1);
1525
+ const height = moderateScale2(variant === "text" ? 50 : 45) * (size === "large" ? 1.2 : size === "small" ? 0.8 : 1);
1520
1526
  const labelAnim = useRef2(
1521
- new Animated3.Value(height / moderateScale3(variant === "text" ? 2.5 : 3.2))
1527
+ new Animated3.Value(height / moderateScale2(variant === "text" ? 2.5 : 3.2))
1522
1528
  ).current;
1523
1529
  React15.useEffect(() => {
1524
1530
  if (focused || value) {
1525
1531
  Animated3.timing(labelAnim, {
1526
- toValue: verticalScale2(variant === "text" ? 2 : 4),
1532
+ toValue: verticalScale(variant === "text" ? 2 : 4),
1527
1533
  duration: 300,
1528
1534
  useNativeDriver: false
1529
1535
  }).start();
1530
1536
  } else {
1531
1537
  Animated3.timing(labelAnim, {
1532
- toValue: height / moderateScale3(variant === "text" ? 2.5 : 3.2),
1538
+ toValue: height / moderateScale2(variant === "text" ? 2.5 : 3.2),
1533
1539
  duration: 300,
1534
1540
  useNativeDriver: false
1535
1541
  }).start();
@@ -1558,8 +1564,8 @@ var TextField = ({
1558
1564
  fontSize: "14@s",
1559
1565
  flex: 1,
1560
1566
  alignSelf: "stretch",
1561
- paddingLeft: variant === "text" ? 0 : moderateScale3(15),
1562
- paddingRight: moderateScale3(10),
1567
+ paddingLeft: variant === "text" ? 0 : moderateScale2(15),
1568
+ paddingRight: moderateScale2(10),
1563
1569
  paddingTop: "11@vs",
1564
1570
  fontFamily: getFontFamily(400),
1565
1571
  color: colors2.black[1],
@@ -1569,13 +1575,13 @@ var TextField = ({
1569
1575
  inputText: {
1570
1576
  fontSize: "14@ms",
1571
1577
  flex: 1,
1572
- paddingLeft: variant === "text" ? 0 : moderateScale3(15),
1578
+ paddingLeft: variant === "text" ? 0 : moderateScale2(15),
1573
1579
  paddingTop: "13@ms"
1574
1580
  },
1575
1581
  label: {
1576
1582
  fontFamily: getFontFamily(400),
1577
1583
  position: "absolute",
1578
- left: variant === "text" ? 0 : moderateScale3(15),
1584
+ left: variant === "text" ? 0 : moderateScale2(15),
1579
1585
  fontSize: focused || value ? "10@s" : "13@s",
1580
1586
  color: focused ? colors2[color].main : colors2.textSecondary.main
1581
1587
  },
@@ -1746,7 +1752,7 @@ var TextField2 = React15.forwardRef(
1746
1752
  const colors2 = useColors();
1747
1753
  const [focused, _setFocused] = useState7(false);
1748
1754
  const [showPassword, setShowPassword] = useState7(false);
1749
- const height = moderateScale3(
1755
+ const height = moderateScale2(
1750
1756
  multiline ? 50 + (props.numberOfLines || 1) * 18 : 50
1751
1757
  );
1752
1758
  const setFocused = (value2) => {
@@ -1780,8 +1786,8 @@ var TextField2 = React15.forwardRef(
1780
1786
  fontSize: "14@s",
1781
1787
  flex: 1,
1782
1788
  alignSelf: "stretch",
1783
- paddingLeft: moderateScale3(10),
1784
- paddingRight: moderateScale3(10),
1789
+ paddingLeft: moderateScale2(10),
1790
+ paddingRight: moderateScale2(10),
1785
1791
  color: colors2.dark.main,
1786
1792
  zIndex: 10
1787
1793
  // backgroundColor: "#284",
@@ -1789,12 +1795,12 @@ var TextField2 = React15.forwardRef(
1789
1795
  inputText: {
1790
1796
  fontSize: "14@ms",
1791
1797
  color: colors2.dark.main,
1792
- paddingLeft: moderateScale3(10)
1798
+ paddingLeft: moderateScale2(10)
1793
1799
  },
1794
1800
  placeholder: {
1795
1801
  fontSize: "14@ms",
1796
1802
  color: colors2.textSecondary.light,
1797
- paddingLeft: moderateScale3(10)
1803
+ paddingLeft: moderateScale2(10)
1798
1804
  },
1799
1805
  label: {},
1800
1806
  helperText: {