react-crud-mobile 1.0.511 → 1.0.513
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/elements/UI.d.ts +2 -0
- package/dist/elements/core/SafeView.d.ts +9 -0
- package/dist/react-crud-mobile.cjs.development.js +40 -29
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +41 -30
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UI.tsx +2 -0
- package/src/elements/core/SafeView.tsx +45 -0
- package/src/elements/core/UIButton.tsx +1 -1
- package/src/elements/core/UIView.tsx +12 -42
package/dist/elements/UI.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { TabsType } from 'react-crud-utils';
|
|
|
9
9
|
import { DefineType } from 'react-crud-utils';
|
|
10
10
|
import { ButtonType } from 'react-crud-utils';
|
|
11
11
|
import { LinkType } from 'react-crud-utils';
|
|
12
|
+
import SafeView from './core/SafeView';
|
|
12
13
|
declare const UI: {
|
|
13
14
|
List: (props: ListType) => import("react").JSX.Element;
|
|
14
15
|
Row: (props: UserType) => import("react").JSX.Element;
|
|
@@ -49,5 +50,6 @@ declare const UI: {
|
|
|
49
50
|
Entity: (props: ListInputType) => import("react").JSX.Element;
|
|
50
51
|
Element: (props: ListInputType) => import("react").JSX.Element;
|
|
51
52
|
Quantity: (props: ListInputType) => import("react").JSX.Element;
|
|
53
|
+
SafeView: typeof SafeView;
|
|
52
54
|
};
|
|
53
55
|
export default UI;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
interface SafeViewType {
|
|
4
|
+
safeStyle?: StyleProp<ViewStyle> | any;
|
|
5
|
+
viewStyle?: StyleProp<ViewStyle> | any;
|
|
6
|
+
children?: any;
|
|
7
|
+
}
|
|
8
|
+
export default function SafeView(props: SafeViewType): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -350,7 +350,7 @@ function UIButton(props) {
|
|
|
350
350
|
var color = element.color;
|
|
351
351
|
var label = element.label;
|
|
352
352
|
var icon = element.icon;
|
|
353
|
-
if (!color) color = '
|
|
353
|
+
if (!color) color = 'primaryLight';
|
|
354
354
|
var styles = {
|
|
355
355
|
buttonLabel: {
|
|
356
356
|
color: '#ffffff',
|
|
@@ -1133,33 +1133,19 @@ function UIView(_ref) {
|
|
|
1133
1133
|
reactNative.StatusBar.setBarStyle('light-content');
|
|
1134
1134
|
reactNative.StatusBar.setBackgroundColor == null || reactNative.StatusBar.setBackgroundColor(theme.colors.primary);
|
|
1135
1135
|
}, []);
|
|
1136
|
-
return /*#__PURE__*/jsxRuntime.
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
children: [header, /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1150
|
-
style: scope.getStyle('container', styles$9.container),
|
|
1151
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
1152
|
-
keyboardShouldPersistTaps: "handled",
|
|
1153
|
-
contentContainerStyle: scope.getStyle('contentContainer', {}),
|
|
1154
|
-
style: scope.getStyle('scroll', styles$9.scroll),
|
|
1155
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
1156
|
-
scope: scope,
|
|
1157
|
-
children: children
|
|
1158
|
-
})
|
|
1159
|
-
})
|
|
1160
|
-
})]
|
|
1161
|
-
})]
|
|
1162
|
-
})
|
|
1136
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1137
|
+
children: [header, /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1138
|
+
style: scope.getStyle('container', styles$9.container),
|
|
1139
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
1140
|
+
keyboardShouldPersistTaps: "handled",
|
|
1141
|
+
contentContainerStyle: scope.getStyle('contentContainer', {}),
|
|
1142
|
+
style: scope.getStyle('scroll', styles$9.scroll),
|
|
1143
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
1144
|
+
scope: scope,
|
|
1145
|
+
children: children
|
|
1146
|
+
})
|
|
1147
|
+
})
|
|
1148
|
+
})]
|
|
1163
1149
|
});
|
|
1164
1150
|
}
|
|
1165
1151
|
var styles$9 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
@@ -1614,6 +1600,30 @@ function UIInclude(props) {
|
|
|
1614
1600
|
});
|
|
1615
1601
|
}
|
|
1616
1602
|
|
|
1603
|
+
function SafeView(props) {
|
|
1604
|
+
var _theme$colors;
|
|
1605
|
+
var theme = reactCrudUtils.useTheme();
|
|
1606
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNativeSafeAreaContext.SafeAreaProvider, {
|
|
1607
|
+
style: props.safeStyle,
|
|
1608
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaView, {
|
|
1609
|
+
style: _extends({
|
|
1610
|
+
backgroundColor: (_theme$colors = theme.colors) == null ? void 0 : _theme$colors.primary
|
|
1611
|
+
}, props.viewStyle),
|
|
1612
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.StatusBar, {
|
|
1613
|
+
barStyle: "light-content"
|
|
1614
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactNative.KeyboardAvoidingView, {
|
|
1615
|
+
behavior: reactNative.Platform.OS === 'ios' ? 'padding' : 'height',
|
|
1616
|
+
style: {
|
|
1617
|
+
flex: 1,
|
|
1618
|
+
width: '100%',
|
|
1619
|
+
justifyContent: 'center'
|
|
1620
|
+
},
|
|
1621
|
+
children: props.children
|
|
1622
|
+
})]
|
|
1623
|
+
})
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1617
1627
|
var _excluded = ["type"];
|
|
1618
1628
|
var UI = {
|
|
1619
1629
|
List: function List(props) {
|
|
@@ -1813,7 +1823,8 @@ var UI = {
|
|
|
1813
1823
|
return /*#__PURE__*/jsxRuntime.jsx(UIElement, _extends({}, props, {
|
|
1814
1824
|
type: "quantity"
|
|
1815
1825
|
}));
|
|
1816
|
-
}
|
|
1826
|
+
},
|
|
1827
|
+
SafeView: SafeView
|
|
1817
1828
|
};
|
|
1818
1829
|
|
|
1819
1830
|
exports.UI = UI;
|