@hoddy-ui/next 2.0.3 → 2.0.4
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 +71 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -58
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -551,7 +551,7 @@ var Avatar_default = Avatar;
|
|
|
551
551
|
|
|
552
552
|
// ../src/Components/Button.tsx
|
|
553
553
|
import { Ionicons, MaterialIcons as MaterialIcons2 } from "@expo/vector-icons";
|
|
554
|
-
import React8 from "react";
|
|
554
|
+
import React8, { forwardRef } from "react";
|
|
555
555
|
import { ActivityIndicator, Text as Text2, TouchableOpacity as TouchableOpacity2 } from "react-native";
|
|
556
556
|
import { ScaledSheet as ScaledSheet4, moderateScale as moderateScale2 } from "react-native-size-matters";
|
|
557
557
|
var LinkButton = ({
|
|
@@ -628,64 +628,78 @@ var IconButton = ({
|
|
|
628
628
|
/* @__PURE__ */ React8.createElement(IconComp, { style: { ...styles2.text, ...style }, name: icon, size })
|
|
629
629
|
);
|
|
630
630
|
};
|
|
631
|
-
var Button = (
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
631
|
+
var Button = forwardRef(
|
|
632
|
+
({
|
|
633
|
+
elevation = 0,
|
|
634
|
+
onPress = () => {
|
|
635
|
+
},
|
|
636
|
+
disabled = false,
|
|
637
|
+
title,
|
|
638
|
+
loading,
|
|
639
|
+
size = "normal",
|
|
640
|
+
rounded = false,
|
|
641
|
+
gutterBottom,
|
|
642
|
+
style = {},
|
|
643
|
+
fullWidth = false,
|
|
644
|
+
translucent = false,
|
|
645
|
+
color = "primary",
|
|
646
|
+
variant = "contained",
|
|
647
|
+
start,
|
|
648
|
+
end
|
|
649
|
+
}, ref) => {
|
|
650
|
+
const colors2 = useColors();
|
|
651
|
+
const styles2 = ScaledSheet4.create({
|
|
652
|
+
con: {
|
|
653
|
+
flexDirection: "row",
|
|
654
|
+
alignItems: "center",
|
|
655
|
+
alignSelf: "flex-start",
|
|
656
|
+
justifyContent: "center",
|
|
657
|
+
backgroundColor: variant === "text" || variant === "outlined" ? null : translucent ? translucent === "dark" ? colors2.white[3] + "2" : colors2.black[3] + "2" : loading ? colors2[color].light : disabled ? colors2.white[4] : colors2[color].main,
|
|
658
|
+
borderRadius: rounded ? 30 : 10,
|
|
659
|
+
elevation: variant === "text" ? 0 : elevation,
|
|
660
|
+
paddingVertical: size === "small" ? 8 : size === "large" ? "15@ms" : "13@ms",
|
|
661
|
+
paddingHorizontal: size === "small" ? "10@ms" : "18@ms",
|
|
662
|
+
borderColor: colors2[color].main,
|
|
663
|
+
borderWidth: variant === "outlined" ? 1 : 0,
|
|
664
|
+
shadowColor: "#000",
|
|
665
|
+
shadowRadius: elevation,
|
|
666
|
+
marginBottom: gutterBottom,
|
|
667
|
+
shadowOffset: {
|
|
668
|
+
height: elevation / 2,
|
|
669
|
+
width: 0
|
|
670
|
+
},
|
|
671
|
+
shadowOpacity: variant === "text" ? 0 : 0.3,
|
|
672
|
+
width: fullWidth ? "100%" : null,
|
|
673
|
+
...style
|
|
669
674
|
},
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
675
|
+
text: {
|
|
676
|
+
color: disabled ? variant === "text" || variant === "outlined" ? colors2.black[1] : colors2[color].text : colors2[color][variant === "text" || variant === "outlined" ? "main" : "text"],
|
|
677
|
+
fontWeight: variant === "outlined" ? "700" : "500",
|
|
678
|
+
fontSize: size === "small" ? "12@ms" : "16@ms"
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
return /* @__PURE__ */ React8.createElement(
|
|
682
|
+
TouchableOpacity2,
|
|
683
|
+
{
|
|
684
|
+
ref,
|
|
685
|
+
onPress,
|
|
686
|
+
disabled,
|
|
687
|
+
style: styles2.con
|
|
688
|
+
},
|
|
689
|
+
start,
|
|
690
|
+
loading && /* @__PURE__ */ React8.createElement(
|
|
691
|
+
ActivityIndicator,
|
|
692
|
+
{
|
|
693
|
+
size: "small",
|
|
694
|
+
color: colors2[color].text,
|
|
695
|
+
style: { marginRight: 10 }
|
|
696
|
+
}
|
|
697
|
+
),
|
|
698
|
+
/* @__PURE__ */ React8.createElement(Text2, { style: styles2.text }, title),
|
|
699
|
+
end
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
);
|
|
689
703
|
var Button_default = Button;
|
|
690
704
|
|
|
691
705
|
// ../src/Components/Checkbox.tsx
|