react-crud-mobile 1.3.20 → 1.3.22

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, useRef, useContext, useLayoutEffect, createContext } from 'react';
2
2
  import { Utils, ScopeUtils, CrudUtils, ViewUtils, ComponentUtils, HtmlUtils, ThemeUtils, useTheme } from 'react-crud-utils';
3
- import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, SafeAreaView, StatusBar, Switch, TextInput, Platform, Dimensions, ScrollView, Alert, Image, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } from 'react-native';
3
+ import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, SafeAreaView, Switch, TextInput, Platform, Dimensions, ScrollView, Alert, Image, StatusBar, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } 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, AntDesign, Entypo, EvilIcons, MaterialCommunityIcons } from '@expo/vector-icons';
@@ -496,7 +496,7 @@ var MobileUtils = /*#__PURE__*/function () {
496
496
  }();
497
497
 
498
498
  function UISelect(props) {
499
- var _theme$colors;
499
+ var _theme$styles, _theme$colors;
500
500
  var _useState = useState(false),
501
501
  modalVisible = _useState[0],
502
502
  setModalVisible = _useState[1];
@@ -507,6 +507,7 @@ function UISelect(props) {
507
507
  var value = scope.getDisplayValue();
508
508
  var main = ViewUtils.getCrud('view');
509
509
  var theme = scope.getTheme();
510
+ var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
510
511
  var handlePress = function handlePress() {
511
512
  var _modalVisible = !modalVisible;
512
513
  main.data.selectIsOpen = _modalVisible;
@@ -550,17 +551,19 @@ function UISelect(props) {
550
551
  color: scope.getPart('iconColor', null, iconColor),
551
552
  style: style('iconStyle', {})
552
553
  })]
553
- }), /*#__PURE__*/jsx(Modal, {
554
+ }), /*#__PURE__*/jsxs(Modal, {
554
555
  animationType: "slide",
555
556
  transparent: true,
556
557
  visible: isModalVisible(),
557
558
  onRequestClose: function onRequestClose() {
558
559
  return setModalVisible(false);
559
560
  },
560
- children: /*#__PURE__*/jsxs(SafeAreaView, {
561
+ children: [/*#__PURE__*/jsx(SafeAreaView, {
562
+ style: style('modalTop')
563
+ }), /*#__PURE__*/jsxs(SafeAreaView, {
561
564
  style: style('modalSafe'),
562
565
  children: [/*#__PURE__*/jsxs(View, {
563
- style: style('modalHeader'),
566
+ style: scope.getStyle('header', headerStyle),
564
567
  children: [/*#__PURE__*/jsx(TouchableOpacity, {
565
568
  onPress: function onPress() {
566
569
  return setModalVisible(false);
@@ -585,7 +588,7 @@ function UISelect(props) {
585
588
  })
586
589
  })
587
590
  })]
588
- })
591
+ })]
589
592
  })]
590
593
  });
591
594
  }
@@ -605,16 +608,14 @@ var styles$3 = /*#__PURE__*/StyleSheet.create({
605
608
  selectLabel: {
606
609
  flex: 1
607
610
  },
611
+ modalTop: {
612
+ backgroundColor: 'primary',
613
+ width: '100%'
614
+ },
608
615
  modalSafe: {
609
616
  flex: 1,
610
- backgroundColor: 'background',
611
- paddingTop: StatusBar.currentHeight || 0
612
- },
613
- modalHeader: {
614
- flexDirection: 'row',
615
- alignItems: 'center',
616
- padding: 15,
617
- backgroundColor: 'theme'
617
+ width: '100%',
618
+ backgroundColor: 'background'
618
619
  },
619
620
  modalCloseButton: {
620
621
  padding: 10
@@ -625,17 +626,16 @@ var styles$3 = /*#__PURE__*/StyleSheet.create({
625
626
  },
626
627
  modalTitle: {
627
628
  fontSize: 18,
628
- color: 'white',
629
629
  fontWeight: 'bold',
630
630
  marginLeft: 10
631
631
  },
632
632
  modalContent: {
633
633
  flex: 1,
634
- width: '100%',
635
- alignSelf: 'flex-start',
636
- flexDirection: 'row',
637
- flexWrap: 'wrap',
638
- padding: 20
634
+ backgroundColor: 'background',
635
+ paddingTop: 10,
636
+ paddingBottom: 10,
637
+ paddingLeft: 15,
638
+ paddingRight: 15
639
639
  }
640
640
  });
641
641