@widergy/mobile-ui 1.24.1 → 1.25.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 +14 -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/UTButtonGroup/README.md +1 -1
- package/lib/components/UTButtonGroup/index.js +7 -2
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.25.1](https://github.com/widergy/mobile-ui/compare/v1.25.0...v1.25.1) (2024-09-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* type prop name changed ([#359](https://github.com/widergy/mobile-ui/issues/359)) ([f1644bd](https://github.com/widergy/mobile-ui/commit/f1644bdf762dafc5e5e6831693f7e6fdb8c83ab1))
|
|
7
|
+
|
|
8
|
+
# [1.25.0](https://github.com/widergy/mobile-ui/compare/v1.24.1...v1.25.0) (2024-09-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* utbutton implementation ([#349](https://github.com/widergy/mobile-ui/issues/349)) ([e34fe42](https://github.com/widergy/mobile-ui/commit/e34fe428360eb36fde8654d44b9e6640e7c70895))
|
|
14
|
+
|
|
1
15
|
## [1.24.1](https://github.com/widergy/mobile-ui/compare/v1.24.0...v1.24.1) (2024-09-17)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -63,11 +63,16 @@ ActionButton.defaultProps = {
|
|
|
63
63
|
icon: propTypes.string,
|
|
64
64
|
color: 'white',
|
|
65
65
|
size: ACTION_BUTTON_DEFAULT_SIZE,
|
|
66
|
-
moreIconProps:
|
|
66
|
+
moreIconProps: propTypes.object,
|
|
67
67
|
iconMargin: ACTION_BUTTON_DEFAULT_MARGIN
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
ActionButton.propTypes = propTypes;
|
|
71
71
|
ActionButton.displayName = 'ActionButton';
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated The ActionButton component is deprecated and will be removed in a future release.
|
|
75
|
+
* Please use the UTButton component instead.
|
|
76
|
+
*/
|
|
77
|
+
|
|
73
78
|
export default withTheme(ActionButton);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { string, number, func, bool } from 'prop-types';
|
|
1
|
+
import { string, number, func, bool, shape } from 'prop-types';
|
|
2
2
|
|
|
3
3
|
import { themeType } from '../../theming';
|
|
4
4
|
import IconPropTypes from '../Icon/propTypes';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
color: string,
|
|
8
|
-
moreIconProps: IconPropTypes,
|
|
8
|
+
moreIconProps: shape(IconPropTypes),
|
|
9
9
|
effectColor: string,
|
|
10
10
|
title: string,
|
|
11
11
|
size: number,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Fragment } from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import UTLabel from '../UTLabel';
|
|
4
4
|
import PhotoAlbum from '../PhotoAlbum';
|
|
5
5
|
|
|
6
6
|
import styles from './styles';
|
|
@@ -29,9 +29,9 @@ const Capture = ({
|
|
|
29
29
|
return (
|
|
30
30
|
<Fragment>
|
|
31
31
|
{!!label && (
|
|
32
|
-
<
|
|
32
|
+
<UTLabel weight="semibold" variant="subtitle1" style={styles.paddingText}>
|
|
33
33
|
{label}
|
|
34
|
-
</
|
|
34
|
+
</UTLabel>
|
|
35
35
|
)}
|
|
36
36
|
<PhotoAlbum
|
|
37
37
|
images={images}
|
|
@@ -50,7 +50,7 @@ const Capture = ({
|
|
|
50
50
|
selectionMessage={selectionMessage}
|
|
51
51
|
onError={onError}
|
|
52
52
|
/>
|
|
53
|
-
{!!helpText && <
|
|
53
|
+
{!!helpText && <UTLabel style={styles.paddingText}>{helpText}</UTLabel>}
|
|
54
54
|
</Fragment>
|
|
55
55
|
);
|
|
56
56
|
};
|
|
@@ -6,7 +6,7 @@ import { isEmpty } from '@widergy/web-utils/lib/array';
|
|
|
6
6
|
import { isString } from 'lodash';
|
|
7
7
|
|
|
8
8
|
import Checkbox from '../Checkbox/index';
|
|
9
|
-
import
|
|
9
|
+
import UTLabel from '../UTLabel';
|
|
10
10
|
import CaptionLabel from '../CaptionLabel';
|
|
11
11
|
import SeparatorBar from '../SeparatorBar/index';
|
|
12
12
|
|
|
@@ -102,7 +102,7 @@ class CheckList extends PureComponent {
|
|
|
102
102
|
disabledStyleEnabled && disabledSelectAll ? disabledStyle || styles.disabled : {};
|
|
103
103
|
return (
|
|
104
104
|
<View style={[styles.container, style]}>
|
|
105
|
-
{!!title && <
|
|
105
|
+
{!!title && <UTLabel style={styles.title}>{title}</UTLabel>}
|
|
106
106
|
{!hideSelectAll && (
|
|
107
107
|
<Checkbox
|
|
108
108
|
label={selectAllLabel}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import UTLabel from '../UTLabel';
|
|
5
5
|
import { withTheme } from '../../theming';
|
|
6
6
|
|
|
7
7
|
import propTypes from './propTypes';
|
|
@@ -23,9 +23,9 @@ const IconBadge = ({
|
|
|
23
23
|
pointerEvents="none"
|
|
24
24
|
style={[styles.iconBadge, { backgroundColor: theme.badge.backgroundColor }, iconBadgeStyle]}
|
|
25
25
|
>
|
|
26
|
-
<
|
|
26
|
+
<UTLabel colorTheme="light" variant="xsmall" style={[styles.badgeLabel, badgeLabelStyle]}>
|
|
27
27
|
{badgeLabel}
|
|
28
|
-
</
|
|
28
|
+
</UTLabel>
|
|
29
29
|
</View>
|
|
30
30
|
)}
|
|
31
31
|
</View>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View
|
|
3
|
-
import { Colors } from 'react-native/Libraries/NewAppScreen';
|
|
2
|
+
import { View } from 'react-native';
|
|
4
3
|
|
|
5
4
|
import Modal from '../../Modal';
|
|
6
|
-
import
|
|
5
|
+
import UTLabel from '../../UTLabel';
|
|
6
|
+
import UTButton from '../../UTButton';
|
|
7
7
|
import imagePickerPropTypes from '../propTypes';
|
|
8
8
|
|
|
9
9
|
import styles from './styles';
|
|
@@ -24,34 +24,27 @@ const ModalSelectionOption = ({
|
|
|
24
24
|
const { title, takePhotoButtonTitle, chooseFromLibraryButtonTitle, cancelButtonTitle } =
|
|
25
25
|
optionsModal ?? optionsModalDefault;
|
|
26
26
|
return (
|
|
27
|
-
<Modal
|
|
28
|
-
|
|
29
|
-
dismissable
|
|
30
|
-
onDismiss={closeModalSelection}
|
|
31
|
-
style={styles.displayImageModal}
|
|
32
|
-
elevation={0}
|
|
33
|
-
>
|
|
34
|
-
<Label bold style={styles.title}>
|
|
27
|
+
<Modal visible={openModalSelection} dismissable onDismiss={closeModalSelection} elevation={0}>
|
|
28
|
+
<UTLabel weight="bold" style={styles.title}>
|
|
35
29
|
{title}
|
|
36
|
-
</
|
|
30
|
+
</UTLabel>
|
|
37
31
|
<View style={styles.container}>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<Label medium bold>
|
|
45
|
-
{chooseFromLibraryButtonTitle}
|
|
46
|
-
</Label>
|
|
47
|
-
</TouchableOpacity>
|
|
32
|
+
<UTButton onPress={() => openOptionSelected(true)} style={{ root: styles.button }} variant="text">
|
|
33
|
+
{takePhotoButtonTitle}
|
|
34
|
+
</UTButton>
|
|
35
|
+
<UTButton onPress={() => openOptionSelected(false)} style={{ root: styles.button }} variant="text">
|
|
36
|
+
{chooseFromLibraryButtonTitle}
|
|
37
|
+
</UTButton>
|
|
48
38
|
</View>
|
|
49
39
|
<View style={styles.cancelButtonContent}>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
<UTButton
|
|
41
|
+
colorTheme="primary"
|
|
42
|
+
onPress={closeModalSelection}
|
|
43
|
+
style={{ root: { ...styles.button, ...styles.cancelButton } }}
|
|
44
|
+
variant="text"
|
|
45
|
+
>
|
|
46
|
+
{cancelButtonTitle}
|
|
47
|
+
</UTButton>
|
|
55
48
|
</View>
|
|
56
49
|
</Modal>
|
|
57
50
|
);
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
horizontalScale,
|
|
5
|
-
moderateHorizontalScale,
|
|
6
|
-
moderateVerticalScale,
|
|
7
|
-
WINDOW_HEIGHT
|
|
8
|
-
} from '../../../utils/scaleUtils';
|
|
3
|
+
import { horizontalScale, moderateVerticalScale } from '../../../utils/scaleUtils';
|
|
9
4
|
|
|
10
5
|
const styles = StyleSheet.create({
|
|
11
6
|
title: {
|
|
@@ -14,16 +9,12 @@ const styles = StyleSheet.create({
|
|
|
14
9
|
container: {
|
|
15
10
|
marginLeft: horizontalScale(5)
|
|
16
11
|
},
|
|
17
|
-
displayImageModal: {
|
|
18
|
-
height: WINDOW_HEIGHT * 0.275
|
|
19
|
-
},
|
|
20
12
|
button: {
|
|
21
13
|
marginTop: moderateVerticalScale(2),
|
|
22
|
-
paddingTop: moderateVerticalScale(20),
|
|
23
14
|
borderRadius: 5
|
|
24
15
|
},
|
|
25
16
|
cancelButton: {
|
|
26
|
-
|
|
17
|
+
alignSelf: 'flex-end'
|
|
27
18
|
},
|
|
28
19
|
cancelButtonContent: {
|
|
29
20
|
width: '100%',
|
|
@@ -7,7 +7,7 @@ import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
|
|
|
7
7
|
import { IS_IOS } from '../../utils/platformUtils/constants';
|
|
8
8
|
import Picker from '../Picker';
|
|
9
9
|
import Modal from '../Modal';
|
|
10
|
-
import
|
|
10
|
+
import UTLabel from '../UTLabel';
|
|
11
11
|
|
|
12
12
|
import styles from './styles';
|
|
13
13
|
import { ADD_ICON } from './constants';
|
|
@@ -91,7 +91,7 @@ const ImagePicker = ({
|
|
|
91
91
|
acceptButton={acceptButton}
|
|
92
92
|
cancelButton={cancelButton}
|
|
93
93
|
>
|
|
94
|
-
<
|
|
94
|
+
<UTLabel>{deleteImageModalText}</UTLabel>
|
|
95
95
|
</Modal>
|
|
96
96
|
<Modal
|
|
97
97
|
visible={imageModalOpen}
|
|
@@ -100,9 +100,11 @@ const ImagePicker = ({
|
|
|
100
100
|
style={styles.displayImageModal}
|
|
101
101
|
elevation={0}
|
|
102
102
|
>
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
|
|
103
|
+
{image && (
|
|
104
|
+
<TouchableWithoutFeedback onPress={onCloseImageModal}>
|
|
105
|
+
<Image source={image && { uri: image.source }} style={styles.displayImage} resizeMode="contain" />
|
|
106
|
+
</TouchableWithoutFeedback>
|
|
107
|
+
)}
|
|
106
108
|
</Modal>
|
|
107
109
|
<ModalSelectionOption
|
|
108
110
|
openModalSelection={openModalSelection}
|
|
@@ -4,7 +4,7 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { string, arrayOf, shape, func, number, any } from 'prop-types';
|
|
5
5
|
import _ from 'lodash';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import UTLabel from '../UTLabel';
|
|
8
8
|
import ImageIcon from '../ImageIcon';
|
|
9
9
|
import Touchable from '../Touchable';
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ const ImageRadio = ({ options, title, onChange, value, style, variant = {} }) =>
|
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
22
|
<View style={styles.container}>
|
|
23
|
-
<
|
|
23
|
+
<UTLabel>{title}</UTLabel>
|
|
24
24
|
<View style={[styles.innerContainer, vertical && styles.verticalInnerContainer]}>
|
|
25
25
|
{options.map(option => (
|
|
26
26
|
<Touchable
|
|
@@ -55,20 +55,20 @@ const ImageRadio = ({ options, title, onChange, value, style, variant = {} }) =>
|
|
|
55
55
|
/>
|
|
56
56
|
)}
|
|
57
57
|
<View style={!vertical ? styles.labels : styles.verticalLabels}>
|
|
58
|
-
<
|
|
59
|
-
|
|
58
|
+
<UTLabel
|
|
59
|
+
colorTheme={!transparentBackground && isSelected(option) ? 'light' : 'dark'}
|
|
60
60
|
style={!vertical ? styles.label : styles.verticalLabel}
|
|
61
|
-
|
|
61
|
+
variant="subtitle1"
|
|
62
62
|
>
|
|
63
63
|
{option.name}
|
|
64
|
-
</
|
|
65
|
-
<
|
|
64
|
+
</UTLabel>
|
|
65
|
+
<UTLabel
|
|
66
66
|
style={!vertical ? styles.label : styles.verticalLabel}
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
colorTheme={!transparentBackground && isSelected(option) ? 'light' : 'dark'}
|
|
68
|
+
variant="subtitle2"
|
|
69
69
|
>
|
|
70
70
|
{option.description}
|
|
71
|
-
</
|
|
71
|
+
</UTLabel>
|
|
72
72
|
</View>
|
|
73
73
|
</View>
|
|
74
74
|
</Touchable>
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import UTButton from '../../../UTButton';
|
|
5
5
|
|
|
6
6
|
import propTypes from './propTypes';
|
|
7
7
|
import styles from './styles';
|
|
8
|
-
import { VISIBILITY, VISIBILITY_OFF } from './constants';
|
|
9
8
|
|
|
10
|
-
const ShowPassword = ({
|
|
9
|
+
const ShowPassword = ({ onShowPassword, passwordVisible }) => (
|
|
11
10
|
<View style={styles.container}>
|
|
12
|
-
<
|
|
13
|
-
color={color}
|
|
14
|
-
name={passwordVisible ? VISIBILITY : VISIBILITY_OFF}
|
|
15
|
-
onPress={onShowPassword}
|
|
16
|
-
size={size}
|
|
17
|
-
style={styles.icon}
|
|
18
|
-
type="feather"
|
|
19
|
-
/>
|
|
11
|
+
<UTButton Icon={passwordVisible ? 'IconEye' : 'IconEyeOff'} onPress={onShowPassword} variant="text" />
|
|
20
12
|
</View>
|
|
21
13
|
);
|
|
22
14
|
|
|
@@ -3,7 +3,7 @@ import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
|
3
3
|
import { Animated, Easing, View } from 'react-native';
|
|
4
4
|
import { string, number } from 'prop-types';
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import UTLabel from '../UTLabel';
|
|
7
7
|
import { withTheme, themeType } from '../../theming';
|
|
8
8
|
|
|
9
9
|
import styles, { getAnimatedContainerStyle, getMessageStyle } from './styles';
|
|
@@ -94,7 +94,7 @@ class Loading extends Component {
|
|
|
94
94
|
<Animated.View style={getAnimatedContainerStyle(size, fade)}>
|
|
95
95
|
{layers.map(this.renderLayers)}
|
|
96
96
|
</Animated.View>
|
|
97
|
-
{!!message && <
|
|
97
|
+
{!!message && <UTLabel style={[getMessageStyle(size), messageStyle]}>{message}</UTLabel>}
|
|
98
98
|
</View>
|
|
99
99
|
);
|
|
100
100
|
}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import UTButton from '../../../../../UTButton';
|
|
5
5
|
|
|
6
6
|
import propTypes from './propTypes';
|
|
7
7
|
import styles from './styles';
|
|
8
|
-
import { VISIBILITY, VISIBILITY_OFF } from './constants';
|
|
9
8
|
|
|
10
|
-
const ShowPassword = ({
|
|
9
|
+
const ShowPassword = ({ onShowPassword, passwordVisible }) => (
|
|
11
10
|
<View style={styles.container}>
|
|
12
|
-
<
|
|
13
|
-
color={color}
|
|
14
|
-
name={passwordVisible ? VISIBILITY : VISIBILITY_OFF}
|
|
15
|
-
onPress={onShowPassword}
|
|
16
|
-
size={size}
|
|
17
|
-
style={styles.icon}
|
|
18
|
-
type="feather"
|
|
19
|
-
/>
|
|
11
|
+
<UTButton Icon={passwordVisible ? 'IconEye' : 'IconEyeOff'} onPress={onShowPassword} variant="text" />
|
|
20
12
|
</View>
|
|
21
13
|
);
|
|
22
14
|
|
|
@@ -4,7 +4,7 @@ import { View, TouchableOpacity, PermissionsAndroid } from 'react-native';
|
|
|
4
4
|
// eslint-disable-next-line import/no-unresolved
|
|
5
5
|
import { launchCamera } from 'react-native-image-picker';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import UTLabel from '../UTLabel';
|
|
8
8
|
import Portal from '../Portal';
|
|
9
9
|
import { IS_ANDROID } from '../../utils/platformUtils/constants';
|
|
10
10
|
|
|
@@ -110,14 +110,14 @@ const PhotoAlbum = ({
|
|
|
110
110
|
return (
|
|
111
111
|
<Fragment>
|
|
112
112
|
{title && (
|
|
113
|
-
<
|
|
113
|
+
<UTLabel variant="subtitle1" weight="semibold" colorTheme="gray" style={styles.title}>
|
|
114
114
|
{title}
|
|
115
|
-
</
|
|
115
|
+
</UTLabel>
|
|
116
116
|
)}
|
|
117
117
|
{subTitle && (
|
|
118
|
-
<
|
|
118
|
+
<UTLabel colorTheme="gray" style={styles.subTitle}>
|
|
119
119
|
{subTitle}
|
|
120
|
-
</
|
|
120
|
+
</UTLabel>
|
|
121
121
|
)}
|
|
122
122
|
<View style={styles.container}>
|
|
123
123
|
{images.length !== 0 &&
|
|
@@ -144,7 +144,7 @@ const PhotoAlbum = ({
|
|
|
144
144
|
<Portal>
|
|
145
145
|
<View style={styles.selectedModeContainer}>
|
|
146
146
|
<View style={styles.selectionLabelContainer}>
|
|
147
|
-
<
|
|
147
|
+
<UTLabel colorTheme="light">{selectionMessage}</UTLabel>
|
|
148
148
|
</View>
|
|
149
149
|
<View style={styles.buttonsContainer}>
|
|
150
150
|
{isOnlyOnePicture && (
|
|
@@ -8,31 +8,29 @@ They can either be `global` portals (they always attach themselves to the node t
|
|
|
8
8
|
### Props
|
|
9
9
|
|
|
10
10
|
| NAME | TYPE | REQUIRED | DESCRIPTION |
|
|
11
|
-
|
|
|
11
|
+
| ------ | ---- | -------- | ------------------------------------------------------------------------------------------------------ |
|
|
12
12
|
| global | bool | No | Should this portal render content in the same level as the `ThemeProvider` component from `mobile-ui`? |
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
#### Example
|
|
16
15
|
|
|
17
16
|
```js
|
|
18
|
-
import {
|
|
17
|
+
import { UTLabel, Portal } from '@widergy/mobile-ui';
|
|
19
18
|
import { View } from 'react-native';
|
|
20
19
|
|
|
21
20
|
const Example = () => (
|
|
22
21
|
<View>
|
|
23
|
-
<
|
|
24
|
-
<
|
|
22
|
+
<UTLabel>Text test</UTLabel>
|
|
23
|
+
<UTLabel>This will be rendered behind the portal</UTLabel>
|
|
25
24
|
<Portal>
|
|
26
25
|
<View>
|
|
27
|
-
<
|
|
26
|
+
<UTLabel>This will be rendered on top of the other content!</UTLabel>
|
|
28
27
|
</View>
|
|
29
28
|
</Portal>
|
|
30
29
|
<Portal global>
|
|
31
30
|
<View>
|
|
32
|
-
<
|
|
31
|
+
<UTLabel>This will be rendered on top of everything!</UTLabel>
|
|
33
32
|
</View>
|
|
34
33
|
</Portal>
|
|
35
|
-
|
|
36
34
|
</View>
|
|
37
35
|
);
|
|
38
36
|
```
|
|
@@ -45,7 +43,7 @@ The component `ThemeProvider` already has a Portal.Host.
|
|
|
45
43
|
#### Example
|
|
46
44
|
|
|
47
45
|
```js
|
|
48
|
-
import {
|
|
46
|
+
import { UTLabel, Portal } from '@widergy/mobile-ui';
|
|
49
47
|
import { View } from 'react-native';
|
|
50
48
|
|
|
51
49
|
const { Host } = Portal;
|
|
@@ -54,12 +52,12 @@ const Example1 = () => (
|
|
|
54
52
|
<View>
|
|
55
53
|
<Portal>
|
|
56
54
|
<View>
|
|
57
|
-
<
|
|
55
|
+
<UTLabel>This will be rendered on Example2 in the same level as the UTLabel</UTLabel>
|
|
58
56
|
</View>
|
|
59
57
|
</Portal>
|
|
60
58
|
<Portal global>
|
|
61
59
|
<View>
|
|
62
|
-
<
|
|
60
|
+
<UTLabel>This will be rendered on top of everything!</UTLabel>
|
|
63
61
|
</View>
|
|
64
62
|
</Portal>
|
|
65
63
|
</View>
|
|
@@ -68,10 +66,9 @@ const Example1 = () => (
|
|
|
68
66
|
const Example2 = () => (
|
|
69
67
|
<View>
|
|
70
68
|
<Host>
|
|
71
|
-
<
|
|
69
|
+
<UTLabel>This will Host any local portals!</UTLabel>
|
|
72
70
|
</Host>
|
|
73
71
|
<Example2 />
|
|
74
72
|
</View>
|
|
75
73
|
);
|
|
76
|
-
|
|
77
74
|
```
|
|
@@ -3,11 +3,11 @@ import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
|
|
6
|
+
import { withTheme, themeType } from '../../../../theming';
|
|
7
|
+
import Icon from '../../../Icon';
|
|
6
8
|
import SeparatorBar from '../../../SeparatorBar';
|
|
7
9
|
import Touchable from '../../../Touchable';
|
|
8
|
-
import
|
|
9
|
-
import Label from '../../../Label';
|
|
10
|
-
import { withTheme, themeType } from '../../../../theming';
|
|
10
|
+
import UTLabel from '../../../UTLabel';
|
|
11
11
|
|
|
12
12
|
import styles from './styles';
|
|
13
13
|
import { RADIO_CHECKED_ICON, RADIO_UNCHECKED_ICON } from './constants';
|
|
@@ -56,22 +56,30 @@ class RadioButton extends Component {
|
|
|
56
56
|
<View style={styles.labelsContainer}>
|
|
57
57
|
<View>
|
|
58
58
|
<View style={[styles.label, labelComponent && styles.labelComponent]}>
|
|
59
|
-
<
|
|
59
|
+
<UTLabel
|
|
60
|
+
colorTheme={status ? 'accent' : 'dark'}
|
|
61
|
+
variant="small"
|
|
62
|
+
weight={status ? 'bold' : 'regular'}
|
|
63
|
+
>
|
|
60
64
|
{label}
|
|
61
|
-
</
|
|
65
|
+
</UTLabel>
|
|
62
66
|
{labelComponent}
|
|
63
67
|
</View>
|
|
64
68
|
{(sublabel || sublabel === 0) && (
|
|
65
|
-
<
|
|
69
|
+
<UTLabel colorTheme="gray" variant="xsmall" weight={status ? 'bold' : 'regular'}>
|
|
66
70
|
{sublabel}
|
|
67
|
-
</
|
|
71
|
+
</UTLabel>
|
|
68
72
|
)}
|
|
69
73
|
</View>
|
|
70
74
|
</View>
|
|
71
75
|
{labelValue && (
|
|
72
|
-
<
|
|
76
|
+
<UTLabel
|
|
77
|
+
colorTheme={status ? 'accent' : 'dark'}
|
|
78
|
+
variant="small"
|
|
79
|
+
weight={status ? 'bold' : 'regular'}
|
|
80
|
+
>
|
|
73
81
|
{labelValue}
|
|
74
|
-
</
|
|
82
|
+
</UTLabel>
|
|
75
83
|
)}
|
|
76
84
|
</Fragment>
|
|
77
85
|
)}
|
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Linking } from 'react-native';
|
|
2
|
+
import { arrayOf, bool, object, string } from 'prop-types';
|
|
3
|
+
import { Linking, View } from 'react-native';
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import Touchable from '../../../Touchable';
|
|
7
|
-
|
|
8
|
-
import styles from './styles';
|
|
5
|
+
import UTButton from '../../../UTButton';
|
|
9
6
|
|
|
10
7
|
const CategoryButton = ({ category, texts, showCategory, categoryButtonUrl = '' }) => {
|
|
11
8
|
const handleOpenUrl = () => Linking.openURL(categoryButtonUrl);
|
|
12
9
|
|
|
13
10
|
return (
|
|
14
|
-
<
|
|
15
|
-
<
|
|
11
|
+
<View>
|
|
12
|
+
<UTButton onPress={() => handleOpenUrl(categoryButtonUrl)} size="large" variant="semitransparent">
|
|
16
13
|
{texts?.category}
|
|
17
14
|
{showCategory && ` ${category}`}
|
|
18
|
-
</
|
|
19
|
-
</
|
|
15
|
+
</UTButton>
|
|
16
|
+
</View>
|
|
20
17
|
);
|
|
21
18
|
};
|
|
22
19
|
CategoryButton.propTypes = {
|
|
23
20
|
category: string,
|
|
24
|
-
texts: arrayOf(
|
|
21
|
+
texts: arrayOf(object),
|
|
25
22
|
showCategory: bool,
|
|
26
23
|
categoryButtonUrl: string
|
|
27
24
|
};
|
|
@@ -4,7 +4,7 @@ import { View } from 'react-native';
|
|
|
4
4
|
import _ from 'lodash';
|
|
5
5
|
|
|
6
6
|
import { stageType } from '../../../../../../propTypes';
|
|
7
|
-
import
|
|
7
|
+
import UTLabel from '../../../../../../../UTLabel';
|
|
8
8
|
|
|
9
9
|
import SubStage from './components/SubStage';
|
|
10
10
|
import styles, { MIN_STAGE_WIDTH } from './styles';
|
|
@@ -54,9 +54,9 @@ const Stage = ({ stage, rateStages, totalSubStages, withoutStages, getStageColor
|
|
|
54
54
|
{totalStages !== 1 && !withoutStages && (
|
|
55
55
|
<View style={styles.label}>
|
|
56
56
|
<View style={styles.rateLabelContainer}>
|
|
57
|
-
<
|
|
57
|
+
<UTLabel variant="small" colorTheme="light">
|
|
58
58
|
{stage.group}
|
|
59
|
-
</
|
|
59
|
+
</UTLabel>
|
|
60
60
|
</View>
|
|
61
61
|
</View>
|
|
62
62
|
)}
|