secullum-react-native-ui 4.6.3 → 4.6.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.
@@ -1,8 +1,13 @@
1
1
  import * as React from 'react';
2
- export declare class Loading extends React.Component {
2
+ declare type Props = {
3
+ width?: number | string;
4
+ height?: number | string;
5
+ };
6
+ export declare class Loading extends React.Component<Props> {
3
7
  getWidthAndHeight: () => {
4
- width: number;
5
- height: number;
8
+ width: string | number;
9
+ height: string | number;
6
10
  };
7
11
  render(): JSX.Element;
8
12
  }
13
+ export {};
@@ -8,9 +8,10 @@ class Loading extends React.Component {
8
8
  super(...arguments);
9
9
  this.getWidthAndHeight = () => {
10
10
  const dim = react_native_1.Platform.OS === 'web' ? 'window' : 'screen';
11
+ const { width, height } = this.props;
11
12
  return {
12
- width: react_native_1.Dimensions.get(dim).width,
13
- height: react_native_1.Dimensions.get(dim).height
13
+ width: width ? width : react_native_1.Dimensions.get(dim).width,
14
+ height: height ? height : react_native_1.Dimensions.get(dim).height
14
15
  };
15
16
  };
16
17
  }
@@ -86,16 +86,15 @@ class TextBox extends React.Component {
86
86
  this.props.onKeyPress(react_native_1.Platform.OS === 'web' ? event : event.nativeEvent);
87
87
  }
88
88
  };
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))));
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));
99
98
  }
100
99
  }
101
100
  exports.TextBox = TextBox;
@@ -45,9 +45,7 @@ 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,
49
- //@ts-ignore
50
- ref: ref => ref && ref.setNativeProps({ tabIndex: -1 }) },
48
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled },
51
49
  React.createElement(react_native_1.View, { style: [styles.container, style, !disabled ? null : styles.readonly] },
52
50
  React.createElement(react_native_1.Text, { style: styles.label }, label),
53
51
  React.createElement(react_native_1.TextInput, { nativeID: nativeID, value: value, style: styles.input, maxLength: 5, onKeyPress: (e) => {
@@ -49,6 +49,7 @@ const fixPortugueseLowercase = (formattedDate) => {
49
49
  formattedDate = formattedDate.replace('qua', 'Qua');
50
50
  formattedDate = formattedDate.replace('qui', 'Qui');
51
51
  formattedDate = formattedDate.replace('sex', 'Sex');
52
+ formattedDate = formattedDate.replace('sab', 'Sáb');
52
53
  formattedDate = formattedDate.replace('sáb', 'Sáb');
53
54
  formattedDate = formattedDate.replace('dom', 'Dom');
54
55
  formattedDate = formattedDate.replace('janeiro', 'Janeiro');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.6.3",
3
+ "version": "4.6.6",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [