@hoddy-ui/next 2.5.67 → 2.5.69

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