@widergy/mobile-ui 1.24.1 → 1.25.0
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/ActionButton/index.js +6 -1
- package/lib/components/ActionButton/propTypes.js +2 -2
- package/lib/components/Capture/index.js +4 -4
- package/lib/components/CheckList/index.js +2 -2
- package/lib/components/Icon/propTypes.js +1 -1
- package/lib/components/IconBadge/index.js +3 -3
- package/lib/components/ImagePicker/ModalSelectionOption/index.js +20 -27
- package/lib/components/ImagePicker/ModalSelectionOption/styles.js +2 -11
- package/lib/components/ImagePicker/layout.js +7 -5
- package/lib/components/ImageRadio/index.js +10 -10
- package/lib/components/Input/components/ShowPassword/index.js +3 -11
- package/lib/components/Input/components/ShowPassword/styles.js +0 -4
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/MultipleFilePicker/components/Input/components/ShowPassword/index.js +3 -11
- package/lib/components/MultipleFilePicker/components/Input/components/ShowPassword/styles.js +0 -4
- package/lib/components/PhotoAlbum/index.js +6 -6
- package/lib/components/Portal/README.md +10 -13
- package/lib/components/RadioGroup/components/RadioButton/index.js +17 -9
- package/lib/components/RateChart/components/CategoryButton/index.js +8 -11
- package/lib/components/RateChart/components/RateStagesGraph/components/Bars/components/Stage/index.js +3 -3
- package/lib/components/RateChart/components/RateStagesGraph/components/Indicator/index.js +4 -7
- package/lib/components/Snackbar/index.js +21 -12
- package/lib/components/Snackbar/styles.js +10 -0
- package/lib/components/Touchable/README.md +11 -10
- package/lib/components/TransformView/README.md +12 -12
- package/lib/components/TransitionView/README.md +14 -12
- package/lib/components/UTButton/constants.js +17 -1
- package/lib/components/UTButton/theme.js +18 -3
- package/lib/components/UTDetailDrawer/README.md +2 -2
- package/lib/components/UTDetailDrawer/index.js +15 -5
- package/lib/components/UTDetailDrawer/styles.js +12 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconArrowBack.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconCamera.svg +5 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconCheckCircle.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconDelete.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconDeleteOutline.svg +4 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconDeleteVariant.svg +7 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconEdit.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconEditVariant.svg +4 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconMoreVertical.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconMyLocation.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconSettings.svg +1 -0
- package/lib/components/UTIcon/components/EnergyIcons/EnergyIconShare.svg +1 -0
- package/lib/components/UTIcon/constants.js +24 -0
- package/lib/components/UTIcon/index.js +2 -2
- package/lib/components/UTLabel/README.md +13 -11
- package/lib/components/UTLabel/constants.js +0 -11
- package/lib/components/UTLabel/index.js +12 -5
- package/lib/components/UTLabel/proptypes.js +14 -5
- package/lib/components/UTLabel/theme.js +2 -1
- package/lib/components/UTLoading/README.md +1 -1
- package/lib/components/UTModal/index.js +28 -47
- package/lib/components/UTModal/proptypes.js +1 -1
- package/lib/components/UTModal/styles.js +11 -37
- package/lib/components/UTOnBoarding/components/CardContent/index.js +12 -13
- package/lib/components/UTProgressBar/index.js +2 -2
- package/lib/components/UTStepFeedback/index.js +6 -8
- package/lib/components/UTStepFeedback/proptypes.js +0 -1
- package/lib/components/UTStepFeedback/styles.js +8 -2
- package/lib/components/UTTextInput/versions/V0/flavors/OutlinedInput/index.js +2 -2
- package/lib/theming/README.md +1 -1
- package/lib/utils/styleUtils/index.js +2 -2
- package/package.json +1 -1
- package/lib/components/RateChart/components/CategoryButton/styles.js +0 -16
|
@@ -6,14 +6,16 @@ import { useTheme } from '../../theming';
|
|
|
6
6
|
|
|
7
7
|
import { markdownFormat } from './utils';
|
|
8
8
|
import { retrieveStyle } from './theme';
|
|
9
|
-
import {
|
|
9
|
+
import { DEFAULT_PROPS, propTypes } from './proptypes';
|
|
10
10
|
|
|
11
11
|
const UTLabel = ({
|
|
12
12
|
children,
|
|
13
13
|
colorTheme,
|
|
14
14
|
field,
|
|
15
|
-
|
|
15
|
+
markdownStyles,
|
|
16
16
|
numberOfLines,
|
|
17
|
+
onLinkPress,
|
|
18
|
+
onTextLayout,
|
|
17
19
|
shade,
|
|
18
20
|
style,
|
|
19
21
|
variant,
|
|
@@ -34,15 +36,20 @@ const UTLabel = ({
|
|
|
34
36
|
return (
|
|
35
37
|
<LabelRenderer
|
|
36
38
|
{...additionalProps}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
onLinkPress={onLinkPress}
|
|
40
|
+
onTextLayout={onTextLayout}
|
|
41
|
+
style={
|
|
42
|
+
withMarkdown
|
|
43
|
+
? { ...markdownStyles, body: labelStyles, paragraph: { marginTop: 0, marginBottom: 0 } }
|
|
44
|
+
: labelStyles
|
|
45
|
+
}
|
|
39
46
|
>
|
|
40
47
|
{withMarkdown ? markdownFormat(children) : children}
|
|
41
48
|
</LabelRenderer>
|
|
42
49
|
);
|
|
43
50
|
};
|
|
44
51
|
|
|
45
|
-
UTLabel.defaultProps =
|
|
52
|
+
UTLabel.defaultProps = DEFAULT_PROPS;
|
|
46
53
|
UTLabel.propTypes = propTypes;
|
|
47
54
|
|
|
48
55
|
export default UTLabel;
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import { any, bool, func, number,
|
|
1
|
+
import { any, bool, func, number, object, string } from 'prop-types';
|
|
2
2
|
import { TextPropTypes } from 'deprecated-react-native-prop-types';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { COLOR_THEMES } from '../../constants/Palette';
|
|
5
|
+
|
|
6
|
+
export const DEFAULT_PROPS = {
|
|
7
|
+
colorTheme: COLOR_THEMES.dark,
|
|
8
|
+
field: {},
|
|
9
|
+
style: {},
|
|
10
|
+
variant: 'body',
|
|
11
|
+
weight: 'regular',
|
|
12
|
+
withMarkdown: false
|
|
13
|
+
};
|
|
5
14
|
|
|
6
15
|
export const propTypes = {
|
|
7
16
|
colorTheme: string,
|
|
8
17
|
// eslint-disable-next-line react/forbid-prop-types
|
|
9
18
|
field: any,
|
|
10
|
-
|
|
19
|
+
markdownStyles: object,
|
|
11
20
|
numberOfLines: number,
|
|
21
|
+
onLinkPress: func,
|
|
22
|
+
onTextLayout: func,
|
|
12
23
|
shade: string,
|
|
13
24
|
style: TextPropTypes.style,
|
|
14
25
|
variant: string,
|
|
15
26
|
weight: string,
|
|
16
27
|
withMarkdown: bool
|
|
17
28
|
};
|
|
18
|
-
|
|
19
|
-
export const defaultProps = DEFAULT_PROPS;
|
|
@@ -2,7 +2,8 @@ import { COLOR_SHADES } from '../../constants/Palette';
|
|
|
2
2
|
import { getDefaultColorShade } from '../../utils/styleUtils';
|
|
3
3
|
import { IS_IOS } from '../../utils/platformUtils/constants';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { LINE_HEIGHTS, VARIANTS_SIZES, WEIGHTS } from './constants';
|
|
6
|
+
import { DEFAULT_PROPS } from './proptypes';
|
|
6
7
|
|
|
7
8
|
const variantsColorTheme = (colorTheme, shade, theme) => {
|
|
8
9
|
const colorThemeDefinition = theme.Palette[colorTheme] || theme.Palette[DEFAULT_PROPS.colorTheme];
|
|
@@ -23,7 +23,7 @@ Wraps a component within a screen and displays a loading indicator until it's do
|
|
|
23
23
|
import { Loading } from "@widergy/mobile-ui";
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<
|
|
26
|
+
<UTLabel>This component does not depend on the loader</UTLabel>
|
|
27
27
|
<UTLoading
|
|
28
28
|
loading={this.props.loading}
|
|
29
29
|
color="blue"
|
|
@@ -3,16 +3,13 @@ import { View, TouchableWithoutFeedback, Keyboard, Modal, ImageBackground } from
|
|
|
3
3
|
import _ from 'lodash';
|
|
4
4
|
|
|
5
5
|
import UTLabel from '../UTLabel';
|
|
6
|
-
import Button from '../Button';
|
|
7
|
-
import Touchable from '../Touchable';
|
|
8
|
-
import Icon from '../Icon';
|
|
9
6
|
import { useTheme } from '../../theming';
|
|
10
7
|
import UTLoading from '../UTLoading';
|
|
11
8
|
import SeparatorBar from '../SeparatorBar';
|
|
9
|
+
import UTButton from '../UTButton';
|
|
12
10
|
|
|
13
11
|
import ModalTypes from './proptypes';
|
|
14
12
|
import ownStyles from './styles';
|
|
15
|
-
import { CLOSE_ICON } from './constants';
|
|
16
13
|
|
|
17
14
|
const UTModal = ({
|
|
18
15
|
acceptButton,
|
|
@@ -20,13 +17,12 @@ const UTModal = ({
|
|
|
20
17
|
backgroundStyles,
|
|
21
18
|
cancelButton,
|
|
22
19
|
children,
|
|
23
|
-
|
|
20
|
+
closeButtonColorTheme,
|
|
24
21
|
disableTouchable,
|
|
25
22
|
hideCloseButton,
|
|
26
23
|
hideSeparatorBar,
|
|
27
24
|
imageComponent,
|
|
28
25
|
imageStyles,
|
|
29
|
-
labelProps,
|
|
30
26
|
loading,
|
|
31
27
|
loadingText,
|
|
32
28
|
modalBackgroundColor,
|
|
@@ -70,22 +66,26 @@ const UTModal = ({
|
|
|
70
66
|
{!!imageComponent && (
|
|
71
67
|
<View style={[styles.content, imageStyles]}>
|
|
72
68
|
{!hideCloseButton && (
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
<UTButton
|
|
70
|
+
colorTheme={closeButtonColorTheme}
|
|
71
|
+
Icon="IconX"
|
|
76
72
|
onPress={onRequestClose || cancelButton.onPress}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
style={{ root: styles.closeButton }}
|
|
74
|
+
variant="text"
|
|
75
|
+
/>
|
|
80
76
|
)}
|
|
81
77
|
<View style={styles.imageContainer}>{imageComponent}</View>
|
|
82
78
|
</View>
|
|
83
79
|
)}
|
|
84
80
|
<View style={styles.content}>
|
|
85
81
|
{!backgroundImg && !imageComponent && !hideCloseButton && (
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
<UTButton
|
|
83
|
+
colorTheme={closeButtonColorTheme}
|
|
84
|
+
Icon="IconX"
|
|
85
|
+
onPress={onRequestClose}
|
|
86
|
+
style={{ root: styles.closeButton }}
|
|
87
|
+
variant="text"
|
|
88
|
+
/>
|
|
89
89
|
)}
|
|
90
90
|
|
|
91
91
|
{!!title && (
|
|
@@ -104,42 +104,23 @@ const UTModal = ({
|
|
|
104
104
|
{!hideSeparatorBar && <SeparatorBar />}
|
|
105
105
|
<View style={styles.buttonsContainer}>
|
|
106
106
|
{!!cancelButton && (
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
lowerCase
|
|
110
|
-
mode="text"
|
|
111
|
-
elevation={0}
|
|
112
|
-
containerStyle={[
|
|
113
|
-
styles.containerStyle,
|
|
114
|
-
{ backgroundColor: cancelButton.backgroundColor }
|
|
115
|
-
]}
|
|
116
|
-
title={cancelButton.text || 'Cancelar'}
|
|
117
|
-
onPress={cancelButton.onPress}
|
|
107
|
+
<UTButton
|
|
108
|
+
colorTheme={cancelButton.colorTheme || 'secondary'}
|
|
118
109
|
disabled={cancelButton.disabled || loading}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
110
|
+
onPress={cancelButton.onPress}
|
|
111
|
+
variant="text"
|
|
112
|
+
>
|
|
113
|
+
{cancelButton.text || 'Cancelar'}
|
|
114
|
+
</UTButton>
|
|
122
115
|
)}
|
|
123
116
|
{!!acceptButton && (
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
lowerCase
|
|
127
|
-
mode="text"
|
|
128
|
-
elevation={0}
|
|
129
|
-
outerContainerStyles={styles.outerContainerStyles}
|
|
130
|
-
containerStyle={[
|
|
131
|
-
styles.containerStyle,
|
|
132
|
-
{ backgroundColor: acceptButton.backgroundColor ?? theme.button.defaultButtonColor },
|
|
133
|
-
// eslint-disable-next-line react-native/no-inline-styles
|
|
134
|
-
acceptButton.disabled && { opacity: 0.5 }
|
|
135
|
-
]}
|
|
136
|
-
title={acceptButton.text || 'Aceptar'}
|
|
137
|
-
onPress={acceptButton.onPress}
|
|
117
|
+
<UTButton
|
|
118
|
+
colorTheme={acceptButton.colorTheme || 'primary'}
|
|
138
119
|
disabled={acceptButton.disabled || loading}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
120
|
+
onPress={acceptButton.onPress}
|
|
121
|
+
>
|
|
122
|
+
{acceptButton.text || 'Aceptar'}
|
|
123
|
+
</UTButton>
|
|
143
124
|
)}
|
|
144
125
|
</View>
|
|
145
126
|
</View>
|
|
@@ -18,12 +18,12 @@ export default {
|
|
|
18
18
|
backgroundImg: number,
|
|
19
19
|
backgroundStyles: ViewPropTypes.style,
|
|
20
20
|
cancelButton: buttonPropType,
|
|
21
|
+
closeButtonColorTheme: string,
|
|
21
22
|
disableTouchable: bool,
|
|
22
23
|
fill: string,
|
|
23
24
|
hideCloseButton: bool,
|
|
24
25
|
image: element,
|
|
25
26
|
imageStyles: ViewPropTypes.style,
|
|
26
|
-
labelProps: shape(bool),
|
|
27
27
|
loading: bool,
|
|
28
28
|
loadingText: string,
|
|
29
29
|
modalBackgroundColor: string,
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import { verticalScale,
|
|
4
|
-
import { DEFAULT_ICON_SIZE } from '../Icon/constants';
|
|
5
|
-
import { ICON_MARGIN } from '../IconButton/styles';
|
|
3
|
+
import { verticalScale, WINDOW_HEIGHT } from '../../utils/scaleUtils';
|
|
6
4
|
|
|
7
5
|
export default StyleSheet.create({
|
|
8
|
-
container: {
|
|
9
|
-
flexDirection: 'row',
|
|
10
|
-
alignItems: 'center',
|
|
11
|
-
marginVertical: verticalScale(4),
|
|
12
|
-
width: '100%'
|
|
13
|
-
},
|
|
14
6
|
modalBackground: {
|
|
15
7
|
backgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
16
8
|
flex: 1,
|
|
@@ -21,25 +13,26 @@ export default StyleSheet.create({
|
|
|
21
13
|
flex: 1
|
|
22
14
|
},
|
|
23
15
|
innerContainer: {
|
|
24
|
-
backgroundColor: 'white',
|
|
25
|
-
borderRadius: 15,
|
|
26
16
|
alignItems: 'stretch',
|
|
27
17
|
alignSelf: 'center',
|
|
18
|
+
backgroundColor: 'white',
|
|
19
|
+
borderRadius: 15,
|
|
28
20
|
width: '100%'
|
|
29
21
|
},
|
|
30
22
|
buttonsContainer: {
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
columnGap: 12,
|
|
31
25
|
flexDirection: 'row',
|
|
32
26
|
justifyContent: 'flex-end',
|
|
33
|
-
alignItems: 'center',
|
|
34
27
|
padding: 16
|
|
35
28
|
},
|
|
36
29
|
viewContainer: {
|
|
37
30
|
flex: 1
|
|
38
31
|
},
|
|
39
32
|
loading: {
|
|
33
|
+
alignItems: 'center',
|
|
40
34
|
height: WINDOW_HEIGHT * 0.3,
|
|
41
|
-
justifyContent: 'center'
|
|
42
|
-
alignItems: 'center'
|
|
35
|
+
justifyContent: 'center'
|
|
43
36
|
},
|
|
44
37
|
title: {
|
|
45
38
|
marginBottom: 12
|
|
@@ -47,36 +40,17 @@ export default StyleSheet.create({
|
|
|
47
40
|
subtitle: {
|
|
48
41
|
marginBottom: 12
|
|
49
42
|
},
|
|
50
|
-
buttonText: {
|
|
51
|
-
fontWeight: 'normal',
|
|
52
|
-
padding: 0,
|
|
53
|
-
margin: 0
|
|
54
|
-
},
|
|
55
43
|
content: {
|
|
56
44
|
padding: 16,
|
|
57
45
|
paddingBottom: 5
|
|
58
46
|
},
|
|
59
|
-
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
justifyContent: 'center',
|
|
62
|
-
borderRadius: (DEFAULT_ICON_SIZE + ICON_MARGIN) / 2,
|
|
63
|
-
height: DEFAULT_ICON_SIZE + ICON_MARGIN,
|
|
64
|
-
width: DEFAULT_ICON_SIZE + ICON_MARGIN,
|
|
47
|
+
closeButton: {
|
|
65
48
|
alignSelf: 'flex-end'
|
|
66
49
|
},
|
|
67
50
|
imageContainer: {
|
|
68
51
|
alignItems: 'center',
|
|
52
|
+
height: verticalScale(35),
|
|
69
53
|
justifyContent: 'center',
|
|
70
|
-
marginBottom: verticalScale(25)
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
iconSpacing: {
|
|
74
|
-
marginRight: moderateHorizontalScale(10)
|
|
75
|
-
},
|
|
76
|
-
containerStyle: {
|
|
77
|
-
borderRadius: 25,
|
|
78
|
-
justifyContent: 'center',
|
|
79
|
-
marginHorizontal: moderateHorizontalScale(5)
|
|
80
|
-
},
|
|
81
|
-
disabledContainer: { opacity: 0.5 }
|
|
54
|
+
marginBottom: verticalScale(25)
|
|
55
|
+
}
|
|
82
56
|
});
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
import { Animated } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import UTLabel from '../../../UTLabel';
|
|
6
|
+
import UTButton from '../../../UTButton';
|
|
7
7
|
|
|
8
8
|
import propTypes from './propTypes';
|
|
9
9
|
import ownStyles from './styles';
|
|
@@ -11,21 +11,20 @@ import ownStyles from './styles';
|
|
|
11
11
|
const CardContent = ({ onPress, currentPage, opacity, styles, buttonTitle = '', disabled }) => (
|
|
12
12
|
<Fragment>
|
|
13
13
|
<Animated.View style={[styles?.textContainer, { opacity }]}>
|
|
14
|
-
<
|
|
14
|
+
<UTLabel variant="subtitle1" weight="bold" style={styles?.title}>
|
|
15
15
|
{currentPage?.title || ''}
|
|
16
|
-
</
|
|
17
|
-
<
|
|
18
|
-
{currentPage?.description || ''}
|
|
19
|
-
</Label>
|
|
16
|
+
</UTLabel>
|
|
17
|
+
<UTLabel style={styles?.description}>{currentPage?.description || ''}</UTLabel>
|
|
20
18
|
</Animated.View>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
mode="text"
|
|
24
|
-
title={buttonTitle || ''}
|
|
19
|
+
<UTButton
|
|
20
|
+
variant="text"
|
|
25
21
|
onPress={onPress}
|
|
26
|
-
{...styles?.buttonProps}
|
|
27
22
|
disabled={disabled}
|
|
28
|
-
|
|
23
|
+
size="large"
|
|
24
|
+
style={{ root: ownStyles.buttonContainer }}
|
|
25
|
+
>
|
|
26
|
+
{buttonTitle || ''}
|
|
27
|
+
</UTButton>
|
|
29
28
|
</Fragment>
|
|
30
29
|
);
|
|
31
30
|
|
|
@@ -7,7 +7,7 @@ import _ from 'lodash';
|
|
|
7
7
|
import { Svg, Defs, Pattern, Path, Rect } from 'react-native-svg';
|
|
8
8
|
|
|
9
9
|
import { useTheme } from '../../theming';
|
|
10
|
-
import
|
|
10
|
+
import UTLabel from '../UTLabel';
|
|
11
11
|
|
|
12
12
|
import createStyles, { BorderStyles } from './styles';
|
|
13
13
|
import { formatPercentage } from './utils';
|
|
@@ -86,7 +86,7 @@ const UTProgressBar = ({ value = 0, styles, showPercentage }) => {
|
|
|
86
86
|
<View />
|
|
87
87
|
</View>
|
|
88
88
|
{showPercentage && (
|
|
89
|
-
<
|
|
89
|
+
<UTLabel style={[ownStyles.label, themedStyles?.label]}>{formatPercentage(value)}</UTLabel>
|
|
90
90
|
)}
|
|
91
91
|
</View>
|
|
92
92
|
);
|
|
@@ -3,13 +3,12 @@ import React, { Fragment, useEffect, useRef, useState } from 'react';
|
|
|
3
3
|
import { Animated, TouchableOpacity, View } from 'react-native';
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
|
|
6
|
-
import IconButton from '../IconButton';
|
|
7
6
|
import Label from '../Label';
|
|
8
7
|
import { useTheme } from '../../theming';
|
|
8
|
+
import UTButton from '../UTButton';
|
|
9
9
|
|
|
10
10
|
import CircleNumber from './components/CircleNumber';
|
|
11
11
|
import ownStyles, {
|
|
12
|
-
DEFAULT_ICON_SIZE,
|
|
13
12
|
getStepVariantStyle,
|
|
14
13
|
COMMON_CONTAINER_PADDING,
|
|
15
14
|
DEFAULT_VARIANTS_STEP_SIZE
|
|
@@ -33,7 +32,6 @@ const StepFeedback = ({
|
|
|
33
32
|
currentStep,
|
|
34
33
|
disableTriangle,
|
|
35
34
|
hideStepNumber,
|
|
36
|
-
iconSize,
|
|
37
35
|
labelsCentered,
|
|
38
36
|
onClose,
|
|
39
37
|
onStepPress,
|
|
@@ -140,12 +138,12 @@ const StepFeedback = ({
|
|
|
140
138
|
return (
|
|
141
139
|
<View onLayout={handleContainerLayout} style={styles.bigContainer}>
|
|
142
140
|
{!!onClose && (
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
name="close"
|
|
146
|
-
size={iconSize || DEFAULT_ICON_SIZE}
|
|
147
|
-
color="black"
|
|
141
|
+
<UTButton
|
|
142
|
+
Icon="IconX"
|
|
148
143
|
onPress={onClose}
|
|
144
|
+
size="small"
|
|
145
|
+
style={{ root: styles.closeButton, icon: styles.icon }}
|
|
146
|
+
variant="text"
|
|
149
147
|
/>
|
|
150
148
|
)}
|
|
151
149
|
<View style={titleBottom && styles.containerReverse}>
|
|
@@ -8,7 +8,6 @@ const STEP_SIZE_BIG = verticalScale(40);
|
|
|
8
8
|
const STEP_BORDER = verticalScale(2 - StyleSheet.hairlineWidth);
|
|
9
9
|
|
|
10
10
|
export const CHECK_ICON_SIZE = verticalScale(19);
|
|
11
|
-
export const DEFAULT_ICON_SIZE = verticalScale(20);
|
|
12
11
|
export const COMMON_CONTAINER_PADDING = verticalScale(20);
|
|
13
12
|
|
|
14
13
|
export const DEFAULT_VARIANTS_STEP_SIZE = {
|
|
@@ -129,9 +128,16 @@ export default StyleSheet.create({
|
|
|
129
128
|
justifyContent: 'flex-end'
|
|
130
129
|
},
|
|
131
130
|
closeButton: {
|
|
131
|
+
alignItems: 'center',
|
|
132
132
|
alignSelf: 'flex-end',
|
|
133
|
+
borderRadius: 40,
|
|
134
|
+
marginBottom: 10,
|
|
133
135
|
marginRight: 20,
|
|
134
|
-
|
|
136
|
+
paddingHorizontal: 4
|
|
137
|
+
},
|
|
138
|
+
icon: {
|
|
139
|
+
minHeight: 30,
|
|
140
|
+
minWidth: 30
|
|
135
141
|
},
|
|
136
142
|
title: {
|
|
137
143
|
alignSelf: 'flex-start',
|
|
@@ -4,7 +4,7 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { withTheme } from '../../../../../../theming';
|
|
5
5
|
import CaptionLabel from '../../../../../CaptionLabel';
|
|
6
6
|
import InputTypes from '../../proptypes';
|
|
7
|
-
import
|
|
7
|
+
import UTLabel from '../../../../../UTLabel';
|
|
8
8
|
import UTTooltip from '../../../../../UTTooltip';
|
|
9
9
|
import BaseInput from '../../components/BaseInput';
|
|
10
10
|
import InputLabel from '../../components/InputLabel';
|
|
@@ -150,7 +150,7 @@ const OutlinedInput = ({
|
|
|
150
150
|
</View>
|
|
151
151
|
{!!tooltip && (
|
|
152
152
|
<View style={[ownStyles.tooltipContainer, multiline && { height: initialHeight }]}>
|
|
153
|
-
<UTTooltip content={<
|
|
153
|
+
<UTTooltip content={<UTLabel>{tooltip}</UTLabel>} position="left" {...tooltipProps}>
|
|
154
154
|
<Icon
|
|
155
155
|
name="questioncircleo"
|
|
156
156
|
type="antdesign"
|
package/lib/theming/README.md
CHANGED
|
@@ -31,7 +31,7 @@ This HOC lets you access to the `theme` object as a prop.
|
|
|
31
31
|
#### Example
|
|
32
32
|
|
|
33
33
|
```js
|
|
34
|
-
const MyComponent = ({ size, theme }) => <
|
|
34
|
+
const MyComponent = ({ size, theme }) => <UTLabel colorTheme="accent">Hello World!</UTLabel>;
|
|
35
35
|
|
|
36
36
|
export default withTheme(MyComponent);
|
|
37
37
|
```
|
|
@@ -30,7 +30,7 @@ const shadowLevels = {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export const getShadow = ({ level, theme, position }) => {
|
|
33
|
+
export const getShadow = ({ color, level, theme, position }) => {
|
|
34
34
|
if (!level) {
|
|
35
35
|
return {};
|
|
36
36
|
}
|
|
@@ -52,7 +52,7 @@ export const getShadow = ({ level, theme, position }) => {
|
|
|
52
52
|
|
|
53
53
|
return {
|
|
54
54
|
elevation,
|
|
55
|
-
shadowColor: theme.Palette.dark['05'],
|
|
55
|
+
shadowColor: color || theme.Palette.dark['05'],
|
|
56
56
|
shadowOffset: {
|
|
57
57
|
height: adjustedHeight,
|
|
58
58
|
width: 0
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native';
|
|
2
|
-
|
|
3
|
-
export const retrieveStyles = theme => ({ ...theme?.RateAndCategory });
|
|
4
|
-
|
|
5
|
-
export default StyleSheet.create({
|
|
6
|
-
category: {
|
|
7
|
-
justifyContent: 'center',
|
|
8
|
-
alignContent: 'center',
|
|
9
|
-
alignSelf: 'flex-end',
|
|
10
|
-
borderRadius: 5,
|
|
11
|
-
paddingVertical: 8,
|
|
12
|
-
paddingHorizontal: 12,
|
|
13
|
-
marginTop: 6,
|
|
14
|
-
backgroundColor: '#EDF4FE'
|
|
15
|
-
}
|
|
16
|
-
});
|