secullum-react-native-ui 4.6.10 → 4.6.12

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.
@@ -7,6 +7,8 @@ export interface ButtonProperties {
7
7
  textStyle?: StyleProp<TextStyle>;
8
8
  onPress: () => void;
9
9
  disabled?: boolean;
10
+ disabledBackgroundColor?: string;
11
+ disabledLabelColor?: string;
10
12
  nativeID?: string;
11
13
  }
12
14
  export declare class Button extends React.Component<ButtonProperties> {
@@ -9,6 +9,7 @@ class Button extends React.Component {
9
9
  constructor() {
10
10
  super(...arguments);
11
11
  this.getStyles = () => {
12
+ const { disabledBackgroundColor, disabledLabelColor } = this.props;
12
13
  const theme = (0, theme_1.getTheme)();
13
14
  const styles = react_native_1.StyleSheet.create({
14
15
  touchable: {
@@ -34,10 +35,10 @@ class Button extends React.Component {
34
35
  color: theme.textColor4
35
36
  },
36
37
  disabled: {
37
- backgroundColor: theme.backgroundColor2
38
+ backgroundColor: disabledBackgroundColor !== null && disabledBackgroundColor !== void 0 ? disabledBackgroundColor : theme.backgroundColor2
38
39
  },
39
40
  textDisabled: {
40
- color: 'silver'
41
+ color: disabledLabelColor !== null && disabledLabelColor !== void 0 ? disabledLabelColor : 'silver'
41
42
  }
42
43
  });
43
44
  return styles;
@@ -84,7 +84,9 @@ class DatePicker extends React.Component {
84
84
  const theme = (0, theme_1.getTheme)();
85
85
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handlePress },
86
86
  React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
87
- React.createElement(react_native_1.View, { ref: ref => ref && ref.setNativeProps({ id: 'date-picker' }) },
87
+ React.createElement(react_native_1.View, { ref: ref => ref &&
88
+ ref.setNativeProps &&
89
+ ref.setNativeProps({ id: 'date-picker' }) },
88
90
  React.createElement(react_native_1.Text, { style: styles.label }, label),
89
91
  React.createElement(react_native_1.Text, { style: styles.value }, value != undefined ? (0, format_1.formatDate)(value, dateFormat) : '')),
90
92
  React.createElement(ImageButton_1.ImageButton, { icon: value && clearable ? 'times' : 'calendar', style: styles.clearIcon, iconColor: value && clearable ? theme.textColor1 : theme.textColor2, onPress: value && clearable ? this.handleClear : this.handlePress, hitBoxSize: 30 }),
@@ -96,7 +96,9 @@ class RangeDatePicker extends React.Component {
96
96
  const styles = this.getStyles();
97
97
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
98
98
  React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
99
- React.createElement(react_native_1.View, { ref: ref => ref && ref.setNativeProps({ id: 'range-date-picker' }) },
99
+ React.createElement(react_native_1.View, { ref: ref => ref &&
100
+ ref.setNativeProps &&
101
+ ref.setNativeProps({ id: 'range-date-picker' }) },
100
102
  React.createElement(react_native_1.Text, { style: styles.label }, label),
101
103
  React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
102
104
  React.createElement(FontAwesome_1.default, { name: "calendar", style: styles.icon }),
@@ -87,9 +87,11 @@ class TextBox extends React.Component {
87
87
  }
88
88
  };
89
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
90
+ ? ref => ref &&
91
91
  //@ts-ignore
92
- ref => ref && ref.setNativeProps({ tabIndex: -1 })
92
+ ref.setNativeProps &&
93
+ //@ts-ignore
94
+ ref.setNativeProps({ tabIndex: -1 })
93
95
  : undefined },
94
96
  React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
95
97
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
@@ -45,9 +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, ref: ref =>
49
49
  //@ts-ignore
50
- ref: ref => ref && ref.setNativeProps({ tabIndex: -1 }) },
50
+ ref && ref.setNativeProps && ref.setNativeProps({ tabIndex: -1 }) },
51
51
  React.createElement(react_native_1.View, { style: [styles.container, style, !disabled ? null : styles.readonly] },
52
52
  React.createElement(react_native_1.Text, { style: styles.label }, label),
53
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.10",
3
+ "version": "4.6.12",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [