secullum-react-native-ui 4.3.3 → 4.3.6

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.
@@ -6,6 +6,7 @@ interface Props {
6
6
  onChange?: (value: boolean) => void;
7
7
  disabled?: boolean;
8
8
  style?: StyleProp<ViewStyle>;
9
+ renderLabel?: () => React.ReactNode;
9
10
  labelStyle?: StyleProp<TextStyle>;
10
11
  nativeID?: string;
11
12
  }
@@ -32,7 +32,7 @@ class CheckBox extends React.Component {
32
32
  };
33
33
  }
34
34
  render() {
35
- const { label, value, onChange, disabled, style, labelStyle, nativeID } = this.props;
35
+ const { label, value, onChange, disabled, style, labelStyle, renderLabel, nativeID } = this.props;
36
36
  const styles = this.getStyles();
37
37
  return (React.createElement(react_native_1.TouchableOpacity, { style: [styles.container, style], disabled: disabled, onPress: () => {
38
38
  if (onChange) {
@@ -40,7 +40,7 @@ class CheckBox extends React.Component {
40
40
  }
41
41
  } },
42
42
  React.createElement(FontAwesome_1.default, { nativeID: nativeID, name: value ? 'check-square-o' : 'square-o', style: styles.icon }),
43
- React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)));
43
+ React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, renderLabel ? renderLabel() : label)));
44
44
  }
45
45
  }
46
46
  exports.CheckBox = CheckBox;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ export interface DelayProperties {
3
+ wait: number;
4
+ }
5
+ export interface DelayState {
6
+ hidden: boolean;
7
+ }
8
+ export declare class Delay extends React.Component<DelayProperties, DelayState> {
9
+ state: DelayState;
10
+ componentDidMount(): void;
11
+ render(): {} | null | undefined;
12
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const React = require("react");
4
+ class Delay extends React.Component {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.state = {
8
+ hidden: true
9
+ };
10
+ }
11
+ componentDidMount() {
12
+ const { wait } = this.props;
13
+ setTimeout(() => {
14
+ this.setState({ hidden: false });
15
+ }, wait);
16
+ }
17
+ render() {
18
+ return this.state.hidden ? null : this.props.children;
19
+ }
20
+ }
21
+ exports.Delay = Delay;
@@ -24,7 +24,7 @@ class Message extends React.Component {
24
24
  alignItems: 'center'
25
25
  },
26
26
  text: {
27
- color: theme.messageTextColor,
27
+ color: theme.textColor3,
28
28
  fontFamily: theme.fontFamily1,
29
29
  fontSize: layout_1.isTablet() ? 25 : 16,
30
30
  textAlign: 'center',
@@ -7,6 +7,7 @@ const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
7
7
  const format_1 = require("../modules/format");
8
8
  const layout_1 = require("../modules/layout");
9
9
  const theme_1 = require("../modules/theme");
10
+ const Delay_1 = require("./Delay");
10
11
  const react_native_1 = require("react-native");
11
12
  class RangeDatePicker extends React.Component {
12
13
  constructor() {
@@ -116,9 +117,10 @@ class RangeDatePicker extends React.Component {
116
117
  react_native_1.Platform.OS !== 'web' &&
117
118
  (showStartDateModal ? (React.createElement(react_native_modal_datetime_picker_1.default, { date: startDate, isVisible: true, onConfirm: this.handleStartDateConfirm, onCancel: this.handleStartDateCancel, isDarkModeEnabled: isDarkModeEnabled,
118
119
  //@ts-ignore
119
- display: react_native_1.Platform.OS == 'ios' ? 'inline' : 'default' })) : showEndDateModal ? (React.createElement(react_native_modal_datetime_picker_1.default, { date: endDate, isVisible: true, onConfirm: this.handleEndDateConfirm, onCancel: this.handleEndDateCancel, isDarkModeEnabled: isDarkModeEnabled,
120
- //@ts-ignore
121
- display: react_native_1.Platform.OS == 'ios' ? 'inline' : 'default' })) : null))));
120
+ display: react_native_1.Platform.OS == 'ios' ? 'inline' : 'default' })) : showEndDateModal ? (React.createElement(Delay_1.Delay, { wait: 5 },
121
+ React.createElement(react_native_modal_datetime_picker_1.default, { date: endDate, isVisible: true, onConfirm: this.handleEndDateConfirm, onCancel: this.handleEndDateCancel, isDarkModeEnabled: isDarkModeEnabled,
122
+ //@ts-ignore
123
+ display: react_native_1.Platform.OS == 'ios' ? 'inline' : 'default' }))) : null))));
122
124
  }
123
125
  }
124
126
  exports.RangeDatePicker = RangeDatePicker;
@@ -1,6 +1,6 @@
1
1
  export declare const BLACK = "#282c37";
2
2
  export declare const WHITE = "#ffffff";
3
- export declare const GRAY = "#8c9aa8";
3
+ export declare const GRAY = "#555";
4
4
  export declare const GRAY_1 = "#eef1f6";
5
5
  export declare const GRAY_2 = "#dddddd";
6
6
  export declare const GRAY_3 = "#c2c2c2";
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const browser_1 = require("./browser");
4
4
  exports.BLACK = '#282c37';
5
5
  exports.WHITE = '#ffffff';
6
- exports.GRAY = '#8c9aa8';
6
+ exports.GRAY = '#555';
7
7
  exports.GRAY_1 = '#eef1f6';
8
8
  exports.GRAY_2 = '#dddddd';
9
9
  exports.GRAY_3 = '#c2c2c2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.3.3",
3
+ "version": "4.3.6",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [