@hoddy-ui/next 2.5.75 → 2.5.77
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, FC } from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, StyleProp, ScrollView, View, TextInput } from 'react-native';
|
|
2
|
+
import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, StyleProp, ViewProps, ScrollView, View, TextInput } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type ThemeTypes = "dark" | "light";
|
|
5
5
|
type ThemeModes = "dark" | "light" | "default";
|
|
@@ -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;
|
|
@@ -241,9 +242,8 @@ interface TypographyProps extends TextProps {
|
|
|
241
242
|
fontSize?: number;
|
|
242
243
|
fontWeight?: 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
243
244
|
}
|
|
244
|
-
interface SafeAreaViewProps {
|
|
245
|
+
interface SafeAreaViewProps extends ViewProps {
|
|
245
246
|
children: ReactNode;
|
|
246
|
-
style?: StyleProp<ViewStyle>;
|
|
247
247
|
}
|
|
248
248
|
interface SelectMenuProps {
|
|
249
249
|
open: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, FC } from 'react';
|
|
2
|
-
import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, StyleProp, ScrollView, View, TextInput } from 'react-native';
|
|
2
|
+
import { ViewStyle, TextStyle, NativeSyntheticEvent, NativeScrollEvent, TextInputProps, TextProps, StyleProp, ViewProps, ScrollView, View, TextInput } from 'react-native';
|
|
3
3
|
|
|
4
4
|
type ThemeTypes = "dark" | "light";
|
|
5
5
|
type ThemeModes = "dark" | "light" | "default";
|
|
@@ -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;
|
|
@@ -241,9 +242,8 @@ interface TypographyProps extends TextProps {
|
|
|
241
242
|
fontSize?: number;
|
|
242
243
|
fontWeight?: 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
243
244
|
}
|
|
244
|
-
interface SafeAreaViewProps {
|
|
245
|
+
interface SafeAreaViewProps extends ViewProps {
|
|
245
246
|
children: ReactNode;
|
|
246
|
-
style?: StyleProp<ViewStyle>;
|
|
247
247
|
}
|
|
248
248
|
interface SelectMenuProps {
|
|
249
249
|
open: boolean;
|
package/dist/index.js
CHANGED
|
@@ -703,7 +703,8 @@ var Avatar = ({
|
|
|
703
703
|
variant = "contained",
|
|
704
704
|
source,
|
|
705
705
|
size = 48,
|
|
706
|
-
style = {}
|
|
706
|
+
style = {},
|
|
707
|
+
icon
|
|
707
708
|
}) => {
|
|
708
709
|
const colors2 = useColors();
|
|
709
710
|
const [imageError, setImageError] = (0, import_react7.useState)(false);
|
|
@@ -733,7 +734,7 @@ var Avatar = ({
|
|
|
733
734
|
source,
|
|
734
735
|
onError: () => setImageError(true)
|
|
735
736
|
}
|
|
736
|
-
) : label ? /* @__PURE__ */ import_react7.default.createElement(Typography_default, { style: { color: colors2[color].text } }, label[0]) : /* @__PURE__ */ import_react7.default.createElement(import_vector_icons2.
|
|
737
|
+
) : 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
738
|
};
|
|
738
739
|
var Avatar_default = Avatar;
|
|
739
740
|
|
|
@@ -2181,7 +2182,7 @@ var import_react18 = __toESM(require("react"));
|
|
|
2181
2182
|
var import_react_native_safe_area_context6 = require("react-native-safe-area-context");
|
|
2182
2183
|
var import_react_native18 = require("react-native");
|
|
2183
2184
|
var SafeAreaView = (0, import_react18.forwardRef)(
|
|
2184
|
-
({ children, style }, ref) => {
|
|
2185
|
+
({ children, style, ...rest }, ref) => {
|
|
2185
2186
|
const { top, bottom } = (0, import_react_native_safe_area_context6.useSafeAreaInsets)();
|
|
2186
2187
|
const styles = import_react_native18.StyleSheet.create({
|
|
2187
2188
|
root: {
|
|
@@ -2190,7 +2191,7 @@ var SafeAreaView = (0, import_react18.forwardRef)(
|
|
|
2190
2191
|
flex: 1
|
|
2191
2192
|
}
|
|
2192
2193
|
});
|
|
2193
|
-
return /* @__PURE__ */ import_react18.default.createElement(import_react_native18.View, { ref, style: [styles.root, style] }, children);
|
|
2194
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react_native18.View, { ref, style: [styles.root, style], ...rest }, children);
|
|
2194
2195
|
}
|
|
2195
2196
|
);
|
|
2196
2197
|
|