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.
@@ -504,7 +504,7 @@ var MobileUtils = /*#__PURE__*/function () {
504
504
  }();
505
505
 
506
506
  function UISelect(props) {
507
- var _theme$colors;
507
+ var _theme$styles, _theme$colors;
508
508
  var _useState = React.useState(false),
509
509
  modalVisible = _useState[0],
510
510
  setModalVisible = _useState[1];
@@ -515,6 +515,7 @@ function UISelect(props) {
515
515
  var value = scope.getDisplayValue();
516
516
  var main = reactCrudUtils.ViewUtils.getCrud('view');
517
517
  var theme = scope.getTheme();
518
+ var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
518
519
  var handlePress = function handlePress() {
519
520
  var _modalVisible = !modalVisible;
520
521
  main.data.selectIsOpen = _modalVisible;
@@ -558,17 +559,19 @@ function UISelect(props) {
558
559
  color: scope.getPart('iconColor', null, iconColor),
559
560
  style: style('iconStyle', {})
560
561
  })]
561
- }), /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
562
+ }), /*#__PURE__*/jsxRuntime.jsxs(reactNative.Modal, {
562
563
  animationType: "slide",
563
564
  transparent: true,
564
565
  visible: isModalVisible(),
565
566
  onRequestClose: function onRequestClose() {
566
567
  return setModalVisible(false);
567
568
  },
568
- children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.SafeAreaView, {
569
+ children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.SafeAreaView, {
570
+ style: style('modalTop')
571
+ }), /*#__PURE__*/jsxRuntime.jsxs(reactNative.SafeAreaView, {
569
572
  style: style('modalSafe'),
570
573
  children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
571
- style: style('modalHeader'),
574
+ style: scope.getStyle('header', headerStyle),
572
575
  children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
573
576
  onPress: function onPress() {
574
577
  return setModalVisible(false);
@@ -593,7 +596,7 @@ function UISelect(props) {
593
596
  })
594
597
  })
595
598
  })]
596
- })
599
+ })]
597
600
  })]
598
601
  });
599
602
  }
@@ -613,16 +616,14 @@ var styles$3 = /*#__PURE__*/reactNative.StyleSheet.create({
613
616
  selectLabel: {
614
617
  flex: 1
615
618
  },
619
+ modalTop: {
620
+ backgroundColor: 'primary',
621
+ width: '100%'
622
+ },
616
623
  modalSafe: {
617
624
  flex: 1,
618
- backgroundColor: 'background',
619
- paddingTop: reactNative.StatusBar.currentHeight || 0
620
- },
621
- modalHeader: {
622
- flexDirection: 'row',
623
- alignItems: 'center',
624
- padding: 15,
625
- backgroundColor: 'theme'
625
+ width: '100%',
626
+ backgroundColor: 'background'
626
627
  },
627
628
  modalCloseButton: {
628
629
  padding: 10
@@ -633,17 +634,16 @@ var styles$3 = /*#__PURE__*/reactNative.StyleSheet.create({
633
634
  },
634
635
  modalTitle: {
635
636
  fontSize: 18,
636
- color: 'white',
637
637
  fontWeight: 'bold',
638
638
  marginLeft: 10
639
639
  },
640
640
  modalContent: {
641
641
  flex: 1,
642
- width: '100%',
643
- alignSelf: 'flex-start',
644
- flexDirection: 'row',
645
- flexWrap: 'wrap',
646
- padding: 20
642
+ backgroundColor: 'background',
643
+ paddingTop: 10,
644
+ paddingBottom: 10,
645
+ paddingLeft: 15,
646
+ paddingRight: 15
647
647
  }
648
648
  });
649
649