@hoddy-ui/next 2.5.76 → 2.5.78

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
@@ -54,6 +54,7 @@ interface AvatarProps {
54
54
  source?: any;
55
55
  size?: number;
56
56
  style?: ViewStyle;
57
+ icon?: ReactNode;
57
58
  }
58
59
  interface ButtonProps {
59
60
  color?: colorTypes;
@@ -88,7 +89,7 @@ interface FlashMessageProps {
88
89
  onPress?: () => void;
89
90
  }>;
90
91
  duration?: number;
91
- type?: "success" | "warning" | "error";
92
+ type?: "success" | "warning" | "error" | "info" | "default";
92
93
  }
93
94
  interface LinkButtonProps {
94
95
  title: string;
package/dist/index.d.ts CHANGED
@@ -54,6 +54,7 @@ interface AvatarProps {
54
54
  source?: any;
55
55
  size?: number;
56
56
  style?: ViewStyle;
57
+ icon?: ReactNode;
57
58
  }
58
59
  interface ButtonProps {
59
60
  color?: colorTypes;
@@ -88,7 +89,7 @@ interface FlashMessageProps {
88
89
  onPress?: () => void;
89
90
  }>;
90
91
  duration?: number;
91
- type?: "success" | "warning" | "error";
92
+ type?: "success" | "warning" | "error" | "info" | "default";
92
93
  }
93
94
  interface LinkButtonProps {
94
95
  title: string;
package/dist/index.js CHANGED
@@ -315,7 +315,7 @@ var Typography = (0, import_react.forwardRef)(
315
315
  const config2 = getConfig();
316
316
  const customFontSizes = config2.TYPOGRAPHY?.fontSizes;
317
317
  const baseFontSize = customFontSizes?.[variant] ?? DEFAULT_FONT_SIZES[variant];
318
- const f = fontSize || baseFontSize;
318
+ const f = fontSize || style?.fontSize || baseFontSize;
319
319
  const lh = lineHeight || f * 1.2;
320
320
  const styles = import_react_native.StyleSheet.create({
321
321
  text: {
@@ -411,6 +411,7 @@ var FlashMessage = () => {
411
411
  opacity: opacity.value
412
412
  };
413
413
  });
414
+ const textColor = type === "default" ? "#fff" : colors2[type].text;
414
415
  const styles = import_react_native_size_matters2.ScaledSheet.create({
415
416
  root: {
416
417
  position: "absolute",
@@ -419,7 +420,7 @@ var FlashMessage = () => {
419
420
  left: 0,
420
421
  paddingTop: top + 10,
421
422
  paddingHorizontal: "15@ms",
422
- backgroundColor: colors2[type].main,
423
+ backgroundColor: type === "default" ? "#444" : colors2[type].main,
423
424
  width: "100%",
424
425
  borderBottomLeftRadius: 10,
425
426
  borderBottomRightRadius: 10,
@@ -443,10 +444,10 @@ var FlashMessage = () => {
443
444
  variant: "h6",
444
445
  fontWeight: 600,
445
446
  gutterBottom: 3,
446
- style: { color: "#fff" }
447
+ color: textColor
447
448
  },
448
449
  message?.title
449
- ), /* @__PURE__ */ import_react2.default.createElement(Typography_default, { style: { color: "#fff" } }, message?.message)))), message?.actions?.map((cur, i) => /* @__PURE__ */ import_react2.default.createElement(
450
+ ), /* @__PURE__ */ import_react2.default.createElement(Typography_default, { color: textColor }, message?.message)))), message?.actions?.map((cur, i) => /* @__PURE__ */ import_react2.default.createElement(
450
451
  import_react_native2.TouchableOpacity,
451
452
  {
452
453
  key: i,
@@ -703,7 +704,8 @@ var Avatar = ({
703
704
  variant = "contained",
704
705
  source,
705
706
  size = 48,
706
- style = {}
707
+ style = {},
708
+ icon
707
709
  }) => {
708
710
  const colors2 = useColors();
709
711
  const [imageError, setImageError] = (0, import_react7.useState)(false);
@@ -733,7 +735,7 @@ var Avatar = ({
733
735
  source,
734
736
  onError: () => setImageError(true)
735
737
  }
736
- ) : label ? /* @__PURE__ */ import_react7.default.createElement(Typography_default, { style: { color: colors2[color].text } }, label[0]) : /* @__PURE__ */ import_react7.default.createElement(import_vector_icons2.AntDesign, { name: "user", color: "#fff", size: Math.round(size / 1.5) }));
738
+ ) : label ? /* @__PURE__ */ import_react7.default.createElement(Typography_default, { style: { color: colors2[color].text } }, label[0]) : icon ? icon : /* @__PURE__ */ import_react7.default.createElement(import_vector_icons2.Ionicons, { name: "person", color: "#fff", size: Math.round(size / 1.5) }));
737
739
  };
738
740
  var Avatar_default = Avatar;
739
741