@widergy/mobile-ui 1.12.5 → 1.12.7
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/UTAutocomplete/index.js +6 -2
- package/lib/components/UTBadge/README.md +17 -26
- package/lib/components/UTBadge/index.js +6 -5
- package/lib/components/UTButton/README.md +78 -26
- package/lib/components/UTButton/index.js +4 -4
- package/lib/components/UTIcon/README.md +53 -51
- package/lib/components/UTIcon/index.js +5 -3
- package/lib/components/UTLabel/README.md +62 -39
- package/lib/components/UTLabel/index.js +14 -6
- package/lib/components/UTLabel/theme.js +24 -9
- package/lib/components/UTMenu/components/ListView/index.js +1 -1
- package/lib/components/UTMenu/index.js +8 -7
- package/lib/components/UTMenu/styles.js +0 -1
- package/lib/components/UTPasswordField/index.js +9 -42
- package/lib/components/UTPasswordField/{components → versions/V0/components}/PasswordValidations/components/ErrorMessage/index.js +3 -3
- package/lib/components/UTPasswordField/{components → versions/V0/components}/PasswordValidations/components/Validation/index.js +3 -3
- package/lib/components/UTPasswordField/{components → versions/V0/components}/PasswordValidations/index.js +1 -1
- package/lib/components/UTPasswordField/{components → versions/V0/components}/PasswordValidations/styles.js +1 -2
- package/lib/components/UTPasswordField/versions/V0/index.js +49 -0
- package/lib/components/UTPasswordField/versions/V1/README.md +23 -0
- package/lib/components/UTPasswordField/versions/V1/constants.js +7 -0
- package/lib/components/UTPasswordField/versions/V1/index.js +32 -0
- package/lib/components/UTTextArea/README.md +32 -0
- package/lib/components/UTTextInput/versions/V0/components/BaseInput/index.js +1 -1
- package/lib/components/UTTextInput/versions/V1/README.md +236 -0
- package/lib/components/UTTextInput/versions/V1/components/TextInputField/index.js +179 -148
- package/lib/components/UTTextInput/versions/V1/components/TextInputField/theme.js +30 -27
- package/lib/components/UTTextInput/versions/V1/components/TextInputField/utils.js +7 -5
- package/lib/components/UTTextInput/versions/V1/index.js +13 -5
- package/lib/components/UTTextInput/versions/V1/proptypes.js +3 -0
- package/lib/components/UTValidation/README.md +33 -18
- package/lib/components/UTValidation/index.js +8 -6
- package/package.json +1 -1
- /package/lib/components/UTPasswordField/{components → versions/V0/components}/PasswordValidations/components/ErrorMessage/styles.js +0 -0
- /package/lib/components/UTPasswordField/{components → versions/V0/components}/PasswordValidations/components/Validation/styles.js +0 -0
- /package/lib/components/UTPasswordField/{proptypes.js → versions/V0/proptypes.js} +0 -0
|
@@ -3,7 +3,7 @@ import { isEmpty } from 'lodash';
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { useTheme } from '../../theming';
|
|
7
7
|
import UTIcon from '../UTIcon';
|
|
8
8
|
import UTLabel from '../UTLabel';
|
|
9
9
|
|
|
@@ -13,13 +13,16 @@ import {
|
|
|
13
13
|
ICON_SIZE,
|
|
14
14
|
STATUS_COLOR_MAPPER,
|
|
15
15
|
STATUSES_WITH_ICON,
|
|
16
|
+
STATUSES,
|
|
16
17
|
validationDataProptypes
|
|
17
18
|
} from './constants';
|
|
18
19
|
import { retrieveStyle } from './theme';
|
|
19
20
|
import styles from './styles';
|
|
20
21
|
import { generateItemKey, generateKey } from './utils';
|
|
21
22
|
|
|
22
|
-
const UTValidation = ({
|
|
23
|
+
const UTValidation = ({ style, validationData }) => {
|
|
24
|
+
const theme = useTheme();
|
|
25
|
+
|
|
23
26
|
if (isEmpty(validationData)) return null;
|
|
24
27
|
|
|
25
28
|
const themeStyles = retrieveStyle({ theme });
|
|
@@ -28,7 +31,7 @@ const UTValidation = ({ theme, validationData, style }) => {
|
|
|
28
31
|
|
|
29
32
|
return (
|
|
30
33
|
<View style={[style, styles.container]}>
|
|
31
|
-
{validationData.map(({ items, status, title }, index) => (
|
|
34
|
+
{validationData.map(({ items, status = STATUSES.default, title }, index) => (
|
|
32
35
|
<View key={generateKey({ items, status, title }, index)} style={styles.validationContainer}>
|
|
33
36
|
{title && (
|
|
34
37
|
<UTLabel colorTheme={STATUS_COLOR_MAPPER[status]} variant="small">
|
|
@@ -36,7 +39,7 @@ const UTValidation = ({ theme, validationData, style }) => {
|
|
|
36
39
|
</UTLabel>
|
|
37
40
|
)}
|
|
38
41
|
<View style={styles.itemsContainer}>
|
|
39
|
-
{items.map(({ text, status: itemStatus }, itemIndex) => (
|
|
42
|
+
{items.map(({ text, status: itemStatus = STATUSES.default }, itemIndex) => (
|
|
40
43
|
<View
|
|
41
44
|
key={generateItemKey({ text, status: itemStatus }, itemIndex)}
|
|
42
45
|
style={styles.itemContainer}
|
|
@@ -62,8 +65,7 @@ UTValidation.defaultProps = DEFAULT_PROPS;
|
|
|
62
65
|
|
|
63
66
|
UTValidation.propTypes = {
|
|
64
67
|
style: ViewPropTypes.style,
|
|
65
|
-
theme: themeType,
|
|
66
68
|
validationData: validationDataProptypes
|
|
67
69
|
};
|
|
68
70
|
|
|
69
|
-
export default
|
|
71
|
+
export default UTValidation;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|