secullum-react-native-ui 4.7.2-beta.0 → 4.7.2
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/Button.d.ts +0 -1
- package/lib/components/Button.js +2 -2
- package/lib/components/CheckBox.js +1 -1
- package/lib/components/DatePicker.js +1 -1
- package/lib/components/Details.js +1 -1
- package/lib/components/DropDown.js +3 -3
- package/lib/components/ErrorMessage.d.ts +0 -1
- package/lib/components/ErrorMessage.js +2 -2
- package/lib/components/FilePicker.js +1 -1
- package/lib/components/Header.js +1 -1
- package/lib/components/ImageButton.js +1 -1
- package/lib/components/Menu.js +1 -1
- package/lib/components/Message.js +1 -1
- package/lib/components/Question.d.ts +1 -0
- package/lib/components/Question.js +2 -2
- package/lib/components/RangeDatePicker.js +1 -1
- package/lib/components/Table.js +1 -1
- package/lib/components/Text.js +1 -1
- package/lib/components/TextBox.d.ts +0 -1
- package/lib/components/TextBox.js +1 -1
- package/package.json +1 -1
package/lib/components/Button.js
CHANGED
|
@@ -47,14 +47,14 @@ class Button extends React.Component {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
const { text, primary, style, textStyle, onPress, disabled, nativeID
|
|
50
|
+
const { text, primary, style, textStyle, onPress, disabled, nativeID } = this.props;
|
|
51
51
|
const styles = this.getStyles();
|
|
52
52
|
return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.7, style: [
|
|
53
53
|
styles.touchable,
|
|
54
54
|
primary && styles.touchablePrimary,
|
|
55
55
|
style,
|
|
56
56
|
disabled && styles.disabled
|
|
57
|
-
], onPress: onPress, disabled: disabled,
|
|
57
|
+
], onPress: onPress, disabled: disabled, accessibilityLabel: nativeID },
|
|
58
58
|
React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
|
|
59
59
|
styles.text,
|
|
60
60
|
primary && styles.textPrimary,
|
|
@@ -42,7 +42,7 @@ class CheckBox extends React.Component {
|
|
|
42
42
|
onChange(!value);
|
|
43
43
|
}
|
|
44
44
|
} },
|
|
45
|
-
React.createElement(FontAwesome_1.default, { nativeID: nativeID, name: value ? 'check-square-o' : 'square-o', style: styles.icon }),
|
|
45
|
+
React.createElement(FontAwesome_1.default, { nativeID: nativeID, accessibilityLabel: nativeID, name: value ? 'check-square-o' : 'square-o', style: styles.icon }),
|
|
46
46
|
React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, renderLabel ? renderLabel() : label)));
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -89,7 +89,7 @@ class DatePicker extends React.Component {
|
|
|
89
89
|
const styles = this.getStyles();
|
|
90
90
|
const theme = (0, theme_1.getTheme)();
|
|
91
91
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { disabled: disabled, onPress: this.handlePress },
|
|
92
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
92
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, accessibilityLabel: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
93
93
|
React.createElement(react_native_1.View, null,
|
|
94
94
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
95
95
|
React.createElement(react_native_1.Text, { style: styles.value }, value ? (0, format_1.formatDate)(value, 'cccc, dd/MM/yyyy') : '')),
|
|
@@ -58,7 +58,7 @@ class Details extends React.Component {
|
|
|
58
58
|
};
|
|
59
59
|
this.renderIcon = (icon, index) => {
|
|
60
60
|
const styles = this.getStyles();
|
|
61
|
-
const fa = (React.createElement(FontAwesome_1.default, { key: index,
|
|
61
|
+
const fa = (React.createElement(FontAwesome_1.default, { key: index, accessibilityLabel: icon.name, name: icon.name, color: icon.color, size: icon.size, style: styles.lineValueIcon }));
|
|
62
62
|
if (icon.onPress) {
|
|
63
63
|
return (React.createElement(react_native_1.TouchableOpacity, { key: index, onPress: icon.onPress }, fa));
|
|
64
64
|
}
|
|
@@ -73,9 +73,9 @@ class DropDownItem extends React.PureComponent {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
const { first, last, value, onPress } = this.props;
|
|
76
|
+
const { first, last, value, onPress, nativeID } = this.props;
|
|
77
77
|
const theme = (0, theme_1.getTheme)();
|
|
78
|
-
return (React.createElement(react_native_1.TouchableHighlight, { onPress: () => onPress(value), underlayColor: theme.backgroundColor2, style: {
|
|
78
|
+
return (React.createElement(react_native_1.TouchableHighlight, { onPress: () => onPress(value), accessibilityLabel: nativeID, underlayColor: theme.backgroundColor2, style: {
|
|
79
79
|
borderTopLeftRadius: first ? 5 : 0,
|
|
80
80
|
borderTopRightRadius: first ? 5 : 0,
|
|
81
81
|
borderBottomLeftRadius: last ? 5 : 0,
|
|
@@ -236,7 +236,7 @@ class DropDown extends React.Component {
|
|
|
236
236
|
const styles = this.getStyles();
|
|
237
237
|
const theme = (0, theme_1.getTheme)();
|
|
238
238
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: () => this.setState({ modalOpen: true }), disabled: disabled },
|
|
239
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
239
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, accessibilityLabel: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
240
240
|
icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.iconOnLine })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
|
|
241
241
|
this.renderClosedDropDown(selectedItem, inputStyle),
|
|
242
242
|
React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay },
|
|
@@ -19,12 +19,12 @@ class ErrorMessage extends React.Component {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
const { message, style, nativeID
|
|
22
|
+
const { message, style, nativeID } = this.props;
|
|
23
23
|
const styles = this.getStyles();
|
|
24
24
|
if (!message) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
return (React.createElement(react_native_1.Text, { nativeID: nativeID,
|
|
27
|
+
return (React.createElement(react_native_1.Text, { nativeID: nativeID, accessibilityLabel: nativeID, style: [styles.errorMessage, style] }, message));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ErrorMessage = ErrorMessage;
|
|
@@ -36,7 +36,7 @@ class FilePicker extends React.Component {
|
|
|
36
36
|
const styles = this.getStyles();
|
|
37
37
|
return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.5, style: styles.container, onPress: onPress },
|
|
38
38
|
React.createElement(FontAwesome_1.default, { name: icon, color: theme.textColor3, size: 30 }),
|
|
39
|
-
React.createElement(react_native_1.Text, { nativeID: nativeID, style: styles.text }, label)));
|
|
39
|
+
React.createElement(react_native_1.Text, { nativeID: nativeID, accessibilityLabel: nativeID, style: styles.text }, label)));
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
exports.FilePicker = FilePicker;
|
package/lib/components/Header.js
CHANGED
|
@@ -49,7 +49,7 @@ class Header extends React.Component {
|
|
|
49
49
|
const styles = this.getStyles();
|
|
50
50
|
const theme = (0, theme_1.getTheme)();
|
|
51
51
|
const icon = (React.createElement(React.Fragment, null,
|
|
52
|
-
React.createElement(FontAwesome_1.default, { nativeID: button.nativeID, name: button.icon, size: (0, layout_1.isTablet)() ? 30 : 20, color: button.disabled ? theme.textColor1 : theme.textColor4,
|
|
52
|
+
React.createElement(FontAwesome_1.default, { nativeID: button.nativeID, accessibilityLabel: button.nativeID, name: button.icon, size: (0, layout_1.isTablet)() ? 30 : 20, color: button.disabled ? theme.textColor1 : theme.textColor4,
|
|
53
53
|
// @ts-ignore : The component uses a different version of typing
|
|
54
54
|
style: button.buttonStyle }),
|
|
55
55
|
button.counter ? (React.createElement(react_native_1.View, { style: styles.counterContainer },
|
|
@@ -16,7 +16,7 @@ class ImageButton extends React.Component {
|
|
|
16
16
|
right: hitBoxSize
|
|
17
17
|
}
|
|
18
18
|
: undefined },
|
|
19
|
-
React.createElement(FontAwesome_1.default, { nativeID: nativeID, name: icon, size: iconSize || 20, color: iconColor || theme.textColor1 })));
|
|
19
|
+
React.createElement(FontAwesome_1.default, { nativeID: nativeID, accessibilityLabel: nativeID, name: icon, size: iconSize || 20, color: iconColor || theme.textColor1 })));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.ImageButton = ImageButton;
|
package/lib/components/Menu.js
CHANGED
|
@@ -42,7 +42,7 @@ function MenuItem(props) {
|
|
|
42
42
|
menuItem.path != undefined &&
|
|
43
43
|
isCurrentMenuPath(menuItem.path);
|
|
44
44
|
return (React.createElement(react_native_1.TouchableOpacity, { disabled: menuItem.disabled, style: styles.container, onPress: onPress },
|
|
45
|
-
React.createElement(react_native_1.Text, { nativeID: menuItem.nativeID, style: [
|
|
45
|
+
React.createElement(react_native_1.Text, { nativeID: menuItem.nativeID, accessibilityLabel: menuItem.nativeID, style: [
|
|
46
46
|
styles.text,
|
|
47
47
|
menuItem.disabled && styles.textDisabled,
|
|
48
48
|
selected && styles.textSelected,
|
|
@@ -42,7 +42,7 @@ class Message extends React.Component {
|
|
|
42
42
|
return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay },
|
|
43
43
|
React.createElement(react_native_1.View, { nativeID: nativeID, style: styles.container },
|
|
44
44
|
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 }),
|
|
45
|
-
React.createElement(react_native_1.Text, { style: [styles.text, textStyle] }, message))));
|
|
45
|
+
React.createElement(react_native_1.Text, { style: [styles.text, textStyle], accessibilityLabel: nativeID }, message))));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
exports.Message = Message;
|
|
@@ -50,13 +50,13 @@ class Question extends React.Component {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
const { message, visible, nativeID, okButton, cancelButton } = this.props;
|
|
53
|
+
const { message, textStyle, visible, nativeID, okButton, cancelButton } = this.props;
|
|
54
54
|
const styles = this.getStyles();
|
|
55
55
|
return (React.createElement(react_native_1.Modal, { animationType: "fade", transparent: true, visible: visible },
|
|
56
56
|
React.createElement(react_native_1.View, { style: [styles.overlay], nativeID: nativeID },
|
|
57
57
|
React.createElement(react_native_1.View, { style: styles.container },
|
|
58
58
|
React.createElement(FontAwesome_1.default, { name: 'question-circle', style: styles.icon }),
|
|
59
|
-
React.createElement(react_native_1.Text, { style: styles.text }, message),
|
|
59
|
+
React.createElement(react_native_1.Text, { style: [styles.text, textStyle] }, message),
|
|
60
60
|
React.createElement(Space_1.Space, null),
|
|
61
61
|
React.createElement(react_native_1.View, { style: styles.botoesAcao },
|
|
62
62
|
React.createElement(Button_1.Button, { text: cancelButton.text, onPress: cancelButton.onPress, style: [
|
|
@@ -109,7 +109,7 @@ class RangeDatePicker extends React.Component {
|
|
|
109
109
|
(0, format_1.formatDate)(endDate, displayFormat);
|
|
110
110
|
const styles = this.getStyles();
|
|
111
111
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
|
|
112
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
|
|
112
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, accessibilityLabel: nativeID, style: [styles.container, style] },
|
|
113
113
|
React.createElement(react_native_1.View, null,
|
|
114
114
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
115
115
|
React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
|
package/lib/components/Table.js
CHANGED
|
@@ -43,7 +43,7 @@ class Table extends React.Component {
|
|
|
43
43
|
render() {
|
|
44
44
|
const { columns, data, style, nativeID, subHeaderData } = this.props;
|
|
45
45
|
return (React.createElement(react_native_1.ScrollView, { horizontal: true },
|
|
46
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: style },
|
|
46
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, style: style, accessibilityLabel: nativeID },
|
|
47
47
|
React.createElement(react_native_1.View, { style: styles.row }, columns.map(column => this.renderHeaderColumn(column))),
|
|
48
48
|
subHeaderData && (React.createElement(react_native_1.View, { style: styles.row }, subHeaderData.map(column => this.renderHeaderColumn(column)))),
|
|
49
49
|
data.map((row, rowIndex) => this.renderDataTable(row, rowIndex)))));
|
package/lib/components/Text.js
CHANGED
|
@@ -26,7 +26,7 @@ class Text extends React.Component {
|
|
|
26
26
|
render() {
|
|
27
27
|
const { style, children, nativeID } = this.props;
|
|
28
28
|
const textStyle = this.getStyles();
|
|
29
|
-
return (React.createElement(react_native_1.Text, { nativeID: nativeID, style: [textStyle.text, style] }, children));
|
|
29
|
+
return (React.createElement(react_native_1.Text, { nativeID: nativeID, accessibilityLabel: nativeID, style: [textStyle.text, style] }, children));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.Text = Text;
|
|
@@ -47,7 +47,7 @@ class TextBox extends React.Component {
|
|
|
47
47
|
const styles = this.getStyles();
|
|
48
48
|
const incomingProps = {
|
|
49
49
|
nativeID: this.props.nativeID,
|
|
50
|
-
|
|
50
|
+
accessibilityLabel: this.props.nativeID,
|
|
51
51
|
autoFocus: this.props.autoFocus,
|
|
52
52
|
value: this.props.value,
|
|
53
53
|
onChangeText: this.props.onChange,
|