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.
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useEffect, useContext, useRef, useLayoutEffect, createContext } from 'react';
2
2
  import { Utils, ScopeUtils, CrudUtils, useTheme, HtmlUtils, ComponentUtils } from 'react-crud-utils';
3
- import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, StatusBar, SafeAreaView, Switch, TextInput, ScrollView, KeyboardAvoidingView, Platform, Image } from 'react-native';
3
+ import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, StatusBar, SafeAreaView, Switch, TextInput, ScrollView, Image, KeyboardAvoidingView, Platform } from 'react-native';
4
4
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
5
  import Ionicons from '@expo/vector-icons/Ionicons';
6
6
  import { Ionicons as Ionicons$1 } from '@expo/vector-icons';
@@ -343,7 +343,7 @@ function UIButton(props) {
343
343
  var color = element.color;
344
344
  var label = element.label;
345
345
  var icon = element.icon;
346
- if (!color) color = 'primary';
346
+ if (!color) color = 'primaryLight';
347
347
  var styles = {
348
348
  buttonLabel: {
349
349
  color: '#ffffff',
@@ -1126,33 +1126,19 @@ function UIView(_ref) {
1126
1126
  StatusBar.setBarStyle('light-content');
1127
1127
  StatusBar.setBackgroundColor == null || StatusBar.setBackgroundColor(theme.colors.primary);
1128
1128
  }, []);
1129
- return /*#__PURE__*/jsx(SafeAreaProvider, {
1130
- style: scope.getStyle('safe', {}),
1131
- children: /*#__PURE__*/jsxs(SafeAreaView$1, {
1132
- style: scope.getStyle('view', styles$9.view),
1133
- children: [/*#__PURE__*/jsx(StatusBar, {
1134
- barStyle: "light-content"
1135
- }), /*#__PURE__*/jsxs(KeyboardAvoidingView, {
1136
- behavior: Platform.OS === 'ios' ? 'padding' : 'height',
1137
- style: {
1138
- flex: 1,
1139
- width: '100%',
1140
- justifyContent: 'center'
1141
- },
1142
- children: [header, /*#__PURE__*/jsx(View, {
1143
- style: scope.getStyle('container', styles$9.container),
1144
- children: /*#__PURE__*/jsx(ScrollView, {
1145
- keyboardShouldPersistTaps: "handled",
1146
- contentContainerStyle: scope.getStyle('contentContainer', {}),
1147
- style: scope.getStyle('scroll', styles$9.scroll),
1148
- children: /*#__PURE__*/jsx(UIChildren, {
1149
- scope: scope,
1150
- children: children
1151
- })
1152
- })
1153
- })]
1154
- })]
1155
- })
1129
+ return /*#__PURE__*/jsxs(Fragment, {
1130
+ children: [header, /*#__PURE__*/jsx(View, {
1131
+ style: scope.getStyle('container', styles$9.container),
1132
+ children: /*#__PURE__*/jsx(ScrollView, {
1133
+ keyboardShouldPersistTaps: "handled",
1134
+ contentContainerStyle: scope.getStyle('contentContainer', {}),
1135
+ style: scope.getStyle('scroll', styles$9.scroll),
1136
+ children: /*#__PURE__*/jsx(UIChildren, {
1137
+ scope: scope,
1138
+ children: children
1139
+ })
1140
+ })
1141
+ })]
1156
1142
  });
1157
1143
  }
1158
1144
  var styles$9 = /*#__PURE__*/StyleSheet.create({
@@ -1607,6 +1593,30 @@ function UIInclude(props) {
1607
1593
  });
1608
1594
  }
1609
1595
 
1596
+ function SafeView(props) {
1597
+ var _theme$colors;
1598
+ var theme = useTheme();
1599
+ return /*#__PURE__*/jsx(SafeAreaProvider, {
1600
+ style: props.safeStyle,
1601
+ children: /*#__PURE__*/jsxs(SafeAreaView$1, {
1602
+ style: _extends({
1603
+ backgroundColor: (_theme$colors = theme.colors) == null ? void 0 : _theme$colors.primary
1604
+ }, props.viewStyle),
1605
+ children: [/*#__PURE__*/jsx(StatusBar, {
1606
+ barStyle: "light-content"
1607
+ }), /*#__PURE__*/jsx(KeyboardAvoidingView, {
1608
+ behavior: Platform.OS === 'ios' ? 'padding' : 'height',
1609
+ style: {
1610
+ flex: 1,
1611
+ width: '100%',
1612
+ justifyContent: 'center'
1613
+ },
1614
+ children: props.children
1615
+ })]
1616
+ })
1617
+ });
1618
+ }
1619
+
1610
1620
  var _excluded = ["type"];
1611
1621
  var UI = {
1612
1622
  List: function List(props) {
@@ -1806,7 +1816,8 @@ var UI = {
1806
1816
  return /*#__PURE__*/jsx(UIElement, _extends({}, props, {
1807
1817
  type: "quantity"
1808
1818
  }));
1809
- }
1819
+ },
1820
+ SafeView: SafeView
1810
1821
  };
1811
1822
 
1812
1823
  export { UI };