secullum-react-native-ui 4.6.6 → 4.6.8

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.
@@ -2,12 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Modal = void 0;
4
4
  const React = require("react");
5
- const react_native_web_modal_1 = require("react-native-web-modal");
6
5
  const react_native_1 = require("react-native");
7
6
  class Modal extends React.Component {
8
7
  render() {
9
8
  const { children, visible, overlayStyle, onRequestClose } = this.props;
10
- return (React.createElement(react_native_web_modal_1.default, { animationType: "fade", transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose },
9
+ return (React.createElement(react_native_1.Modal, { animationType: "fade", transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose },
11
10
  React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: onRequestClose },
12
11
  React.createElement(react_native_1.View, { style: [styles.overlay, overlayStyle] }, children))));
13
12
  }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Question = void 0;
4
4
  const React = require("react");
5
- const react_native_web_modal_1 = require("react-native-web-modal");
6
5
  const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
7
6
  const theme_1 = require("../modules/theme");
8
7
  const layout_1 = require("../modules/layout");
@@ -53,7 +52,7 @@ class Question extends React.Component {
53
52
  render() {
54
53
  const { message, visible, nativeID, okButton, cancelButton } = this.props;
55
54
  const styles = this.getStyles();
56
- return (React.createElement(react_native_web_modal_1.default, { animationType: "fade", transparent: true, visible: visible },
55
+ return (React.createElement(react_native_1.Modal, { animationType: "fade", transparent: true, visible: visible },
57
56
  React.createElement(react_native_1.View, { style: [styles.overlay], nativeID: nativeID },
58
57
  React.createElement(react_native_1.View, { style: styles.container },
59
58
  React.createElement(FontAwesome_1.default, { name: 'question-circle', style: styles.icon }),
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
- export declare class StatusBar extends React.Component {
2
+ interface Props {
3
+ extraHeight: number;
4
+ }
5
+ export declare class StatusBar extends React.Component<Props> {
3
6
  static height: number;
4
7
  getStyles: () => {
5
8
  statusBar: {
@@ -7,5 +10,9 @@ export declare class StatusBar extends React.Component {
7
10
  height: number;
8
11
  };
9
12
  };
13
+ static defaultProps: {
14
+ extraHeight: number;
15
+ };
10
16
  render(): JSX.Element;
11
17
  }
18
+ export {};
@@ -10,10 +10,11 @@ class StatusBar extends React.Component {
10
10
  super(...arguments);
11
11
  this.getStyles = () => {
12
12
  const theme = (0, theme_1.getTheme)();
13
+ const { extraHeight } = this.props;
13
14
  const styles = react_native_1.StyleSheet.create({
14
15
  statusBar: {
15
16
  backgroundColor: theme.statusBarColor,
16
- height: (0, react_native_status_bar_height_1.getStatusBarHeight)()
17
+ height: (0, react_native_status_bar_height_1.getStatusBarHeight)() + extraHeight
17
18
  }
18
19
  });
19
20
  return styles;
@@ -27,3 +28,6 @@ class StatusBar extends React.Component {
27
28
  }
28
29
  exports.StatusBar = StatusBar;
29
30
  StatusBar.height = (0, react_native_status_bar_height_1.getStatusBarHeight)();
31
+ StatusBar.defaultProps = {
32
+ extraHeight: 0
33
+ };
@@ -86,15 +86,16 @@ class TextBox extends React.Component {
86
86
  this.props.onKeyPress(react_native_1.Platform.OS === 'web' ? event : event.nativeEvent);
87
87
  }
88
88
  };
89
- const content = (React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
90
- icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
91
- renderInput
92
- ? renderInput(incomingProps)
93
- : this.renderInput(incomingProps)));
94
- if (react_native_1.Platform.OS === 'web') {
95
- return (React.createElement("div", { onClick: () => (onPress ? onPress() : this.focus()) }, content));
96
- }
97
- return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()) }, content));
89
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()), ref: react_native_1.Platform.OS === 'web'
90
+ ? //@ts-ignore
91
+ //@ts-ignore
92
+ ref => ref && ref.setNativeProps({ tabIndex: -1 })
93
+ : undefined },
94
+ React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
95
+ icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
96
+ renderInput
97
+ ? renderInput(incomingProps)
98
+ : this.renderInput(incomingProps))));
98
99
  }
99
100
  }
100
101
  exports.TextBox = TextBox;
@@ -45,7 +45,9 @@ class TimePicker extends React.Component {
45
45
  render() {
46
46
  const { label, style, disabled, value, nativeID } = this.props;
47
47
  const styles = this.getStyles();
48
- return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled },
48
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled,
49
+ //@ts-ignore
50
+ ref: ref => ref && ref.setNativeProps({ tabIndex: -1 }) },
49
51
  React.createElement(react_native_1.View, { style: [styles.container, style, !disabled ? null : styles.readonly] },
50
52
  React.createElement(react_native_1.Text, { style: styles.label }, label),
51
53
  React.createElement(react_native_1.TextInput, { nativeID: nativeID, value: value, style: styles.input, maxLength: 5, onKeyPress: (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.6.6",
3
+ "version": "4.6.8",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -27,8 +27,7 @@
27
27
  "react-native-masked-text": "^1.7.2",
28
28
  "react-native-modal-datetime-picker": "^14.0.1",
29
29
  "react-native-status-bar-height": "^2.6.0",
30
- "react-native-vector-icons": "^8.0.0",
31
- "react-native-web-modal": "^1.0.1"
30
+ "react-native-vector-icons": "^8.0.0"
32
31
  },
33
32
  "devDependencies": {
34
33
  "@types/react": "^16.4.11",