@widergy/mobile-ui 1.13.0 → 1.13.1
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/CHANGELOG.md +7 -0
- package/lib/components/UTLoading/index.js +1 -1
- package/lib/components/UTWorkflowContainer/versions/V1/components/BottomActions/components/ActionButton/index.js +10 -11
- package/lib/components/UTWorkflowContainer/versions/V1/components/BottomActions/components/ActionButton/styles.js +1 -1
- package/lib/components/UTWorkflowContainer/versions/V1/components/BottomActions/index.js +20 -26
- package/lib/components/UTWorkflowContainer/versions/V1/components/BottomActions/styles.js +1 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.13.1](https://github.com/widergy/mobile-ui/compare/v1.13.0...v1.13.1) (2024-07-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* utbutton for workflow summary and bottom actions ([#313](https://github.com/widergy/mobile-ui/issues/313)) ([54cf399](https://github.com/widergy/mobile-ui/commit/54cf399163784402c6545f15921ac7d30cbda89d))
|
|
7
|
+
|
|
1
8
|
# [1.13.0](https://github.com/widergy/mobile-ui/compare/v1.12.7...v1.13.0) (2024-07-11)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -3,27 +3,26 @@ import { string, func, bool } from 'prop-types';
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import merge from 'lodash/merge';
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import UTButton from '../../../../../../../UTButton';
|
|
7
7
|
import { useTheme } from '../../../../../../../../theming';
|
|
8
8
|
|
|
9
9
|
import ownStyles from './styles';
|
|
10
10
|
|
|
11
|
-
const ActionButton = ({ hidden, disabled, onPress, label,
|
|
11
|
+
const ActionButton = ({ hidden, disabled, onPress, label, variant, style }) => {
|
|
12
12
|
const theme = useTheme();
|
|
13
13
|
const themedStyles = merge({}, ownStyles, theme?.UTWorkflowContainer?.actionButton, style);
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<View style={themedStyles.actionButton}>
|
|
17
|
-
<
|
|
18
|
-
containerStyle={themedStyles.buttonContainer}
|
|
19
|
-
contentStyle={themedStyles.buttonContent}
|
|
17
|
+
<UTButton
|
|
20
18
|
disabled={disabled || hidden}
|
|
21
|
-
elevation={themedStyles.elevation}
|
|
22
|
-
lowerCase
|
|
23
|
-
mode={mode}
|
|
24
19
|
onPress={onPress}
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
size="large"
|
|
21
|
+
style={{ root: themedStyles.buttonContainer, childrenContainer: themedStyles.buttonContent }}
|
|
22
|
+
variant={variant}
|
|
23
|
+
>
|
|
24
|
+
{label}
|
|
25
|
+
</UTButton>
|
|
27
26
|
</View>
|
|
28
27
|
);
|
|
29
28
|
};
|
|
@@ -32,7 +31,7 @@ ActionButton.propTypes = {
|
|
|
32
31
|
disabled: bool,
|
|
33
32
|
hidden: bool,
|
|
34
33
|
label: string,
|
|
35
|
-
|
|
34
|
+
variant: string,
|
|
36
35
|
onPress: func
|
|
37
36
|
};
|
|
38
37
|
|
|
@@ -4,14 +4,14 @@ import merge from 'lodash/merge';
|
|
|
4
4
|
|
|
5
5
|
import Label from '../../../../../Label';
|
|
6
6
|
import Surface from '../../../../../Surface';
|
|
7
|
-
import Button from '../../../../../Button';
|
|
8
7
|
import Icon from '../../../../../Icon';
|
|
9
8
|
import Checkbox from '../../../../../Checkbox';
|
|
10
9
|
import { MessagePropTypes, SummaryPropTypes } from '../../types';
|
|
10
|
+
import UTButton from '../../../../../UTButton';
|
|
11
11
|
|
|
12
12
|
import ActionButton from './components/ActionButton';
|
|
13
13
|
import ActionButtonPropTypes from './components/ActionButton/types';
|
|
14
|
-
import ownStyles
|
|
14
|
+
import ownStyles from './styles';
|
|
15
15
|
import { NEXT, RETURN } from './constants';
|
|
16
16
|
|
|
17
17
|
const BottomActions = ({ nextButton, returnButton, summary, message, style }) => {
|
|
@@ -39,29 +39,23 @@ const BottomActions = ({ nextButton, returnButton, summary, message, style }) =>
|
|
|
39
39
|
)}
|
|
40
40
|
{summary.actions && !checkboxProps && (
|
|
41
41
|
<View style={themedStyles.summaryActions}>
|
|
42
|
-
{summary.actions.map((
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
outerContainerStyles={
|
|
60
|
-
index !== summary.actions.length - 1 && themedStyles.summaryActionsChild
|
|
61
|
-
}
|
|
62
|
-
secondary
|
|
63
|
-
title={action.title}
|
|
64
|
-
/>
|
|
42
|
+
{summary.actions.map(({ Icon: actionIcon, title, onPress }, index) => (
|
|
43
|
+
<UTButton
|
|
44
|
+
Icon={actionIcon}
|
|
45
|
+
key={actionIcon}
|
|
46
|
+
onPress={onPress}
|
|
47
|
+
size="small"
|
|
48
|
+
style={{
|
|
49
|
+
root: {
|
|
50
|
+
...themedStyles.summaryActionContainer,
|
|
51
|
+
...(index !== summary.actions.length - 1 && themedStyles.summaryActionsChild)
|
|
52
|
+
},
|
|
53
|
+
childrenContainer: themedStyles.summaryActionButton
|
|
54
|
+
}}
|
|
55
|
+
variant="semitransparent"
|
|
56
|
+
>
|
|
57
|
+
{title}
|
|
58
|
+
</UTButton>
|
|
65
59
|
))}
|
|
66
60
|
</View>
|
|
67
61
|
)}
|
|
@@ -93,7 +87,7 @@ const BottomActions = ({ nextButton, returnButton, summary, message, style }) =>
|
|
|
93
87
|
{returnButtonEnabled && (
|
|
94
88
|
<ActionButton
|
|
95
89
|
label={returnButton.label || RETURN}
|
|
96
|
-
|
|
90
|
+
variant="text"
|
|
97
91
|
style={{
|
|
98
92
|
actionButton: {
|
|
99
93
|
...themedStyles.returnActionButton,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
|
-
export const ICON_SIZE = 24;
|
|
4
|
-
|
|
5
3
|
export default StyleSheet.create({
|
|
6
4
|
actionsChild: {
|
|
7
5
|
marginRight: 16
|
|
@@ -47,11 +45,8 @@ export default StyleSheet.create({
|
|
|
47
45
|
justifyContent: 'space-between',
|
|
48
46
|
padding: 16
|
|
49
47
|
},
|
|
50
|
-
summaryActionButton: {
|
|
51
|
-
marginHorizontal: 8
|
|
52
|
-
},
|
|
53
48
|
summaryActionContainer: {
|
|
54
|
-
|
|
49
|
+
paddingVertical: 8
|
|
55
50
|
},
|
|
56
51
|
summaryActions: {
|
|
57
52
|
alignItems: 'center',
|
package/package.json
CHANGED