secullum-react-native-ui 4.6.5 → 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.
- package/lib/components/Loading.d.ts +8 -3
- package/lib/components/Loading.js +3 -2
- package/lib/components/StatusBar.d.ts +1 -8
- package/lib/components/StatusBar.js +1 -5
- package/lib/components/TextBox.js +9 -10
- package/lib/components/TimePicker.web.js +1 -3
- package/lib/modules/format.js +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
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
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
extraHeight: number;
|
|
4
|
-
}
|
|
5
|
-
export declare class StatusBar extends React.Component<Props> {
|
|
2
|
+
export declare class StatusBar extends React.Component {
|
|
6
3
|
static height: number;
|
|
7
4
|
getStyles: () => {
|
|
8
5
|
statusBar: {
|
|
@@ -10,9 +7,5 @@ export declare class StatusBar extends React.Component<Props> {
|
|
|
10
7
|
height: number;
|
|
11
8
|
};
|
|
12
9
|
};
|
|
13
|
-
static defaultProps: {
|
|
14
|
-
extraHeight: number;
|
|
15
|
-
};
|
|
16
10
|
render(): JSX.Element;
|
|
17
11
|
}
|
|
18
|
-
export {};
|
|
@@ -10,11 +10,10 @@ 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;
|
|
14
13
|
const styles = react_native_1.StyleSheet.create({
|
|
15
14
|
statusBar: {
|
|
16
15
|
backgroundColor: theme.statusBarColor,
|
|
17
|
-
height: (0, react_native_status_bar_height_1.getStatusBarHeight)()
|
|
16
|
+
height: (0, react_native_status_bar_height_1.getStatusBarHeight)()
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
return styles;
|
|
@@ -28,6 +27,3 @@ class StatusBar extends React.Component {
|
|
|
28
27
|
}
|
|
29
28
|
exports.StatusBar = StatusBar;
|
|
30
29
|
StatusBar.height = (0, react_native_status_bar_height_1.getStatusBarHeight)();
|
|
31
|
-
StatusBar.defaultProps = {
|
|
32
|
-
extraHeight: 0
|
|
33
|
-
};
|
|
@@ -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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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) => {
|
package/lib/modules/format.js
CHANGED
|
@@ -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');
|