@hoddy-ui/next 2.0.3 → 2.0.5
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.js
CHANGED
|
@@ -689,64 +689,78 @@ var IconButton = ({
|
|
|
689
689
|
/* @__PURE__ */ import_react8.default.createElement(IconComp, { style: { ...styles2.text, ...style }, name: icon, size })
|
|
690
690
|
);
|
|
691
691
|
};
|
|
692
|
-
var Button = (
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
692
|
+
var Button = (0, import_react8.forwardRef)(
|
|
693
|
+
({
|
|
694
|
+
elevation = 0,
|
|
695
|
+
onPress = () => {
|
|
696
|
+
},
|
|
697
|
+
disabled = false,
|
|
698
|
+
title,
|
|
699
|
+
loading,
|
|
700
|
+
size = "normal",
|
|
701
|
+
rounded = false,
|
|
702
|
+
gutterBottom,
|
|
703
|
+
style = {},
|
|
704
|
+
fullWidth = false,
|
|
705
|
+
translucent = false,
|
|
706
|
+
color = "primary",
|
|
707
|
+
variant = "contained",
|
|
708
|
+
start,
|
|
709
|
+
end
|
|
710
|
+
}, ref) => {
|
|
711
|
+
const colors2 = useColors();
|
|
712
|
+
const styles2 = import_react_native_size_matters6.ScaledSheet.create({
|
|
713
|
+
con: {
|
|
714
|
+
flexDirection: "row",
|
|
715
|
+
alignItems: "center",
|
|
716
|
+
alignSelf: "flex-start",
|
|
717
|
+
justifyContent: "center",
|
|
718
|
+
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,
|
|
719
|
+
borderRadius: rounded ? 30 : 10,
|
|
720
|
+
elevation: variant === "text" ? 0 : elevation,
|
|
721
|
+
paddingVertical: size === "small" ? 8 : size === "large" ? "15@ms" : "13@ms",
|
|
722
|
+
paddingHorizontal: size === "small" ? "10@ms" : "18@ms",
|
|
723
|
+
borderColor: colors2[color].main,
|
|
724
|
+
borderWidth: variant === "outlined" ? 1 : 0,
|
|
725
|
+
shadowColor: "#000",
|
|
726
|
+
shadowRadius: elevation,
|
|
727
|
+
marginBottom: gutterBottom,
|
|
728
|
+
shadowOffset: {
|
|
729
|
+
height: elevation / 2,
|
|
730
|
+
width: 0
|
|
731
|
+
},
|
|
732
|
+
shadowOpacity: variant === "text" ? 0 : 0.3,
|
|
733
|
+
width: fullWidth ? "100%" : null,
|
|
734
|
+
...style
|
|
730
735
|
},
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
736
|
+
text: {
|
|
737
|
+
color: disabled ? variant === "text" || variant === "outlined" ? colors2.black[1] : colors2[color].text : colors2[color][variant === "text" || variant === "outlined" ? "main" : "text"],
|
|
738
|
+
fontWeight: variant === "outlined" ? "700" : "500",
|
|
739
|
+
fontSize: size === "small" ? "12@ms" : "16@ms"
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
return /* @__PURE__ */ import_react8.default.createElement(
|
|
743
|
+
import_react_native8.TouchableOpacity,
|
|
744
|
+
{
|
|
745
|
+
ref,
|
|
746
|
+
onPress,
|
|
747
|
+
disabled,
|
|
748
|
+
style: styles2.con
|
|
749
|
+
},
|
|
750
|
+
start,
|
|
751
|
+
loading && /* @__PURE__ */ import_react8.default.createElement(
|
|
752
|
+
import_react_native8.ActivityIndicator,
|
|
753
|
+
{
|
|
754
|
+
size: "small",
|
|
755
|
+
color: colors2[color].text,
|
|
756
|
+
style: { marginRight: 10 }
|
|
757
|
+
}
|
|
758
|
+
),
|
|
759
|
+
/* @__PURE__ */ import_react8.default.createElement(import_react_native8.Text, { style: styles2.text }, title),
|
|
760
|
+
end
|
|
761
|
+
);
|
|
762
|
+
}
|
|
763
|
+
);
|
|
750
764
|
var Button_default = Button;
|
|
751
765
|
|
|
752
766
|
// ../src/Components/Checkbox.tsx
|