@widergy/mobile-ui 1.13.1 → 1.13.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/CHANGELOG.md +7 -0
- package/lib/components/UTRoundView/index.js +7 -2
- package/lib/components/UTTopbar/index.js +8 -8
- package/lib/components/UTTopbar/styles.js +5 -0
- package/lib/components/UTWorkflowContainer/versions/V1/components/BottomActions/index.js +4 -2
- package/lib/components/UTWorkflowContainer/versions/V1/components/BottomActions/styles.js +3 -0
- package/lib/components/UTWorkflowContainer/versions/V1/index.js +7 -3
- package/lib/components/UTWorkflowContainer/versions/V1/styles.js +4 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.13.2](https://github.com/widergy/mobile-ui/compare/v1.13.1...v1.13.2) (2024-07-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* utworkflow spacing and utroundview shadows ([#310](https://github.com/widergy/mobile-ui/issues/310)) ([73fdfc2](https://github.com/widergy/mobile-ui/commit/73fdfc25f02f8caeb7ea04c5fe80d6b073d22a66))
|
|
7
|
+
|
|
1
8
|
## [1.13.1](https://github.com/widergy/mobile-ui/compare/v1.13.0...v1.13.1) (2024-07-12)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -3,17 +3,22 @@ import { View, Animated } from 'react-native';
|
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
|
|
5
5
|
import { useTheme } from '../../theming';
|
|
6
|
+
import Surface from '../Surface';
|
|
6
7
|
|
|
7
8
|
import propTypes from './propTypes';
|
|
8
9
|
import ownStyles from './styles';
|
|
9
10
|
|
|
10
|
-
const UTRoundView = ({ children, styles }) => {
|
|
11
|
+
const UTRoundView = ({ children, styles, withShadow = false }) => {
|
|
11
12
|
const theme = useTheme();
|
|
12
13
|
const themedStyles = _.merge({}, theme?.roundView, styles);
|
|
13
14
|
|
|
15
|
+
const ChildrenContainer = withShadow ? Surface : View;
|
|
16
|
+
|
|
14
17
|
return (
|
|
15
18
|
<Animated.View style={[ownStyles.container, themedStyles?.outerContainer]}>
|
|
16
|
-
<
|
|
19
|
+
<ChildrenContainer position="top" style={[ownStyles.innerContainer, themedStyles?.innerContainer]}>
|
|
20
|
+
{children}
|
|
21
|
+
</ChildrenContainer>
|
|
17
22
|
</Animated.View>
|
|
18
23
|
);
|
|
19
24
|
};
|
|
@@ -3,7 +3,7 @@ import { BackHandler, View } from 'react-native';
|
|
|
3
3
|
import { number } from 'prop-types';
|
|
4
4
|
import { useFocusEffect } from '@react-navigation/native';
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import UTButton from '../UTButton';
|
|
7
7
|
import Label from '../Label';
|
|
8
8
|
import UTStepper from '../UTStepper';
|
|
9
9
|
import UTProgressBar from '../UTProgressBar';
|
|
@@ -18,7 +18,7 @@ const UTTopbar = ({
|
|
|
18
18
|
stages,
|
|
19
19
|
stepsCount,
|
|
20
20
|
theme,
|
|
21
|
-
topbar: { colorTheme = 'light', goBack, title, variant = 'secondary',
|
|
21
|
+
topbar: { colorTheme = 'light', goBack, title, variant = 'secondary', Icon } = {}
|
|
22
22
|
}) => {
|
|
23
23
|
const size = { big: variant === 'primary' };
|
|
24
24
|
|
|
@@ -42,12 +42,12 @@ const UTTopbar = ({
|
|
|
42
42
|
return (
|
|
43
43
|
<View>
|
|
44
44
|
<View style={[ownStyles.container, ownTheme?.container]}>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
<UTButton
|
|
46
|
+
Icon={Icon || 'IconArrowLeft'}
|
|
47
|
+
variant="text"
|
|
48
|
+
style={{
|
|
49
|
+
root: ownStyles.goBack
|
|
50
|
+
}}
|
|
51
51
|
onPress={goBack}
|
|
52
52
|
/>
|
|
53
53
|
<Label color={ownTheme?.text || 'black'} {...size} bold style={ownStyles.child}>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import merge from 'lodash/merge';
|
|
4
|
+
import { number } from 'prop-types';
|
|
4
5
|
|
|
5
6
|
import Label from '../../../../../Label';
|
|
6
7
|
import Surface from '../../../../../Surface';
|
|
@@ -14,7 +15,7 @@ import ActionButtonPropTypes from './components/ActionButton/types';
|
|
|
14
15
|
import ownStyles from './styles';
|
|
15
16
|
import { NEXT, RETURN } from './constants';
|
|
16
17
|
|
|
17
|
-
const BottomActions = ({ nextButton, returnButton, summary,
|
|
18
|
+
const BottomActions = ({ bottomSafeArea, message, nextButton, returnButton, summary, style }) => {
|
|
18
19
|
const messageIcon = message?.icon;
|
|
19
20
|
const MESSAGE_ICON_SIZE = 16;
|
|
20
21
|
const checkboxProps = summary?.checkbox;
|
|
@@ -24,7 +25,7 @@ const BottomActions = ({ nextButton, returnButton, summary, message, style }) =>
|
|
|
24
25
|
const returnButtonEnabled = returnButton && !returnButton.hidden;
|
|
25
26
|
|
|
26
27
|
return (
|
|
27
|
-
<Surface position="top" style={themedStyles.bottomNav}>
|
|
28
|
+
<Surface position="top" style={[themedStyles.bottomNav, themedStyles.bottomSafeArea(bottomSafeArea)]}>
|
|
28
29
|
{summary && (
|
|
29
30
|
<View style={[themedStyles.summary, checkboxProps && themedStyles.summaryCheckbox]}>
|
|
30
31
|
{checkboxProps ? (
|
|
@@ -114,6 +115,7 @@ const BottomActions = ({ nextButton, returnButton, summary, message, style }) =>
|
|
|
114
115
|
};
|
|
115
116
|
|
|
116
117
|
BottomActions.propTypes = {
|
|
118
|
+
bottomSafeArea: number,
|
|
117
119
|
message: MessagePropTypes,
|
|
118
120
|
nextButton: ActionButtonPropTypes,
|
|
119
121
|
returnButton: ActionButtonPropTypes,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ScrollView, View } from 'react-native';
|
|
3
3
|
import { number, func, shape, bool, string, element } from 'prop-types';
|
|
4
4
|
import { merge } from 'lodash';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
6
|
|
|
6
7
|
import { useTheme } from '../../../../theming';
|
|
7
8
|
import UTHeader from '../../../UTHeader';
|
|
@@ -36,12 +37,14 @@ const UTWorkflowContainer = ({
|
|
|
36
37
|
topbar,
|
|
37
38
|
useMarkdown
|
|
38
39
|
}) => {
|
|
40
|
+
const { bottom: bottomSafeArea, top: topSafeArea } = useSafeAreaInsets();
|
|
41
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
42
|
useEffect(() => () => onExit?.(), []);
|
|
40
43
|
const theme = useTheme();
|
|
41
44
|
const themedStyles = merge({}, ownStyles, theme?.UTWorkflowContainer, style);
|
|
42
45
|
|
|
43
46
|
return (
|
|
44
|
-
<
|
|
47
|
+
<View style={[themedStyles.container, themedStyles.topSafeArea(topSafeArea)]}>
|
|
45
48
|
{topbar && <UTTopbar {...{ currentStage, currentStep, stages, stepsCount, theme, topbar }} />}
|
|
46
49
|
<ScrollView
|
|
47
50
|
contentContainerStyle={themedStyles.content}
|
|
@@ -71,11 +74,12 @@ const UTWorkflowContainer = ({
|
|
|
71
74
|
nextButton,
|
|
72
75
|
returnButton,
|
|
73
76
|
style: themedStyles,
|
|
77
|
+
bottomSafeArea,
|
|
74
78
|
summary
|
|
75
79
|
}}
|
|
76
80
|
/>
|
|
77
81
|
)}
|
|
78
|
-
</
|
|
82
|
+
</View>
|
|
79
83
|
);
|
|
80
84
|
};
|
|
81
85
|
UTWorkflowContainer.propTypes = {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@widergy/mobile-ui",
|
|
3
3
|
"description": "Widergy Mobile Components",
|
|
4
4
|
"author": "widergy",
|
|
5
|
-
"version": "1.13.
|
|
5
|
+
"version": "1.13.2",
|
|
6
6
|
"repository": "https://github.com/widergy/mobile-ui.git",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"files": [
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"react-native-collapsible": "^1.6.1",
|
|
46
46
|
"react-native-markdown-display": "^7.0.0-alpha.2",
|
|
47
47
|
"react-native-modal": "^13.0.1",
|
|
48
|
+
"react-native-safe-area-context": "^4.5.0",
|
|
48
49
|
"react-native-pager-view": "^6.2.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|