secullum-react-native-ui 4.17.2 → 4.17.4

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.
@@ -10,6 +10,7 @@ export interface ButtonProperties {
10
10
  disabledBackgroundColor?: string;
11
11
  disabledLabelColor?: string;
12
12
  nativeID?: string;
13
+ loading?: boolean;
13
14
  }
14
15
  export declare class Button extends React.Component<ButtonProperties> {
15
16
  static defaultProps: {
@@ -17,6 +18,7 @@ export declare class Button extends React.Component<ButtonProperties> {
17
18
  };
18
19
  getStyles: () => {
19
20
  touchable: {
21
+ flexDirection: "row";
20
22
  backgroundColor: string;
21
23
  borderColor: string;
22
24
  borderWidth: number;
@@ -14,6 +14,7 @@ class Button extends React.Component {
14
14
  const theme = (0, theme_1.getTheme)();
15
15
  const styles = react_native_1.StyleSheet.create({
16
16
  touchable: {
17
+ flexDirection: 'row',
17
18
  backgroundColor: theme.backgroundColor1,
18
19
  borderColor: theme.borderColor1,
19
20
  borderWidth: 1,
@@ -48,14 +49,16 @@ class Button extends React.Component {
48
49
  };
49
50
  }
50
51
  render() {
51
- const { text, primary, style, textStyle, onPress, disabled, nativeID } = this.props;
52
+ const { text, primary, style, textStyle, onPress, disabled, nativeID, loading } = this.props;
52
53
  const styles = this.getStyles();
54
+ const theme = (0, theme_1.getTheme)();
53
55
  return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.7, style: [
54
56
  styles.touchable,
55
57
  primary && styles.touchablePrimary,
56
58
  style,
57
59
  disabled && styles.disabled
58
60
  ], onPress: onPress, disabled: disabled, testID: (0, test_1.getTestID)(nativeID) },
61
+ loading && React.createElement(react_native_1.ActivityIndicator, { color: theme.borderColor1 }),
59
62
  React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
60
63
  styles.text,
61
64
  primary && styles.textPrimary,
@@ -345,7 +345,7 @@ class DropDown extends React.Component {
345
345
  ] },
346
346
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.iconOnLine })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
347
347
  this.renderClosedDropDown(selectedItem, inputStyle),
348
- React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay, animation: animation !== null && animation !== void 0 ? animation : 'fade' }, useKeyboardAvoidingView ? (React.createElement(react_native_1.KeyboardAvoidingView, { behavior: react_native_1.Platform.OS === 'ios' ? 'padding' : 'height' }, conteudoModal)) : (conteudoModal)))));
348
+ React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay, animation: animation || 'fade' }, useKeyboardAvoidingView ? (React.createElement(react_native_1.KeyboardAvoidingView, { behavior: react_native_1.Platform.OS === 'ios' ? 'padding' : 'height' }, conteudoModal)) : (conteudoModal)))));
349
349
  }
350
350
  }
351
351
  exports.DropDown = DropDown;
@@ -40,7 +40,7 @@ class Message extends React.Component {
40
40
  const { message, visible, type, onRequestClose, nativeID, textStyle, animation } = this.props;
41
41
  const styles = this.getStyles();
42
42
  const theme = (0, theme_1.getTheme)();
43
- return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay, animation: animation !== null && animation !== void 0 ? animation : 'fade' },
43
+ return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay, animation: animation || 'fade' },
44
44
  React.createElement(react_native_1.View, { nativeID: nativeID, style: styles.container },
45
45
  React.createElement(FontAwesome_1.default, { name: type === 'warning' ? 'warning' : 'check-circle', color: type === 'warning' ? theme.warningColor : theme.successColor, size: (0, layout_1.isTablet)() ? 52 : 42 }),
46
46
  React.createElement(react_native_1.Text, { style: [styles.text, textStyle], testID: (0, test_1.getTestID)(nativeID) }, message))));
@@ -21,7 +21,7 @@ class Modal extends React.Component {
21
21
  render() {
22
22
  const { children, visible, overlayStyle, onRequestClose, animation } = this.props;
23
23
  const { isMounted } = this.state;
24
- return (React.createElement(react_native_1.Modal, { animationType: animation !== null && animation !== void 0 ? animation : 'fade', transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose, onShow: this.handleShow },
24
+ return (React.createElement(react_native_1.Modal, { animationType: animation || 'fade', transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose, onShow: this.handleShow },
25
25
  React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: onRequestClose },
26
26
  React.createElement(react_native_1.View, { style: [styles.overlay, overlayStyle] }, react_native_1.Platform.OS !== 'android' || isMounted ? children : React.createElement(react_native_1.View, null)))));
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.17.2",
3
+ "version": "4.17.4",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [