@widergy/mobile-ui 1.14.6 → 1.15.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/Button/index.js +1 -1
- package/lib/components/UTBadge/index.js +2 -2
- package/lib/components/UTBadge/theme.js +9 -6
- package/lib/components/UTBaseInputField/README.md +45 -31
- package/lib/components/UTBaseInputField/components/ActionAdornment/index.js +5 -16
- package/lib/components/UTBaseInputField/components/BadgeAdornment/index.js +13 -0
- package/lib/components/UTBaseInputField/components/IconAdornment/constants.js +2 -0
- package/lib/components/UTBaseInputField/components/IconAdornment/index.js +20 -15
- package/lib/components/UTBaseInputField/components/IconAdornment/proptypes.js +20 -0
- package/lib/components/UTBaseInputField/components/IconAdornment/utils.js +7 -2
- package/lib/components/UTBaseInputField/constants.js +18 -3
- package/lib/components/UTBaseInputField/index.js +89 -88
- package/lib/components/UTBaseInputField/proptypes.js +60 -0
- package/lib/components/UTBaseInputField/theme.js +72 -32
- package/lib/components/UTBottomSheet/README.md +53 -0
- package/lib/components/UTBottomSheet/index.js +139 -0
- package/lib/components/UTBottomSheet/styles.js +46 -0
- package/lib/components/UTButton/constants.js +5 -14
- package/lib/components/UTButton/index.js +6 -22
- package/lib/components/UTButton/proptypes.js +29 -0
- package/lib/components/UTButton/theme.js +6 -5
- package/lib/components/UTCheckBox/README.md +4 -30
- package/lib/components/UTCheckBox/constants.js +4 -1
- package/lib/components/UTCheckBox/index.js +33 -22
- package/lib/components/UTCheckBox/proptypes.js +12 -3
- package/lib/components/UTCheckBox/styles.js +7 -0
- package/lib/components/UTCheckBox/theme.js +98 -54
- package/lib/components/UTCheckList/README.MD +14 -10
- package/lib/components/UTCheckList/constants.js +6 -1
- package/lib/components/UTCheckList/index.js +44 -66
- package/lib/components/UTCheckList/proptypes.js +48 -0
- package/lib/components/UTCheckList/styles.js +10 -5
- package/lib/components/UTCheckList/utils.js +5 -0
- package/lib/components/UTFieldLabel/index.js +4 -3
- package/lib/components/UTLabel/constants.js +11 -11
- package/lib/components/UTLabel/index.js +3 -17
- package/lib/components/UTLabel/proptypes.js +19 -0
- package/lib/components/UTLabel/theme.js +2 -2
- package/lib/components/UTMenu/index.js +1 -1
- package/lib/components/UTPasswordField/versions/V0/components/PasswordValidations/styles.js +1 -0
- package/lib/components/UTPasswordField/versions/V1/index.js +3 -2
- package/lib/components/UTPhoneInput/constants.js +303 -0
- package/lib/components/UTPhoneInput/index.js +296 -0
- package/lib/components/UTPhoneInput/styles.js +18 -0
- package/lib/components/UTSearchField/README.md +42 -0
- package/lib/components/UTSearchField/index.js +59 -0
- package/lib/components/UTSearchField/proptypes.js +28 -0
- package/lib/components/UTSelect/index.js +10 -97
- package/lib/components/UTSelect/{componentes → versions/V0/componentes}/MultipleItem/index.js +1 -1
- package/lib/components/UTSelect/versions/V0/index.js +103 -0
- package/lib/components/UTSelect/versions/V1/README.md +82 -0
- package/lib/components/UTSelect/versions/V1/index.js +171 -0
- package/lib/components/UTSelect/versions/V1/proptypes.js +45 -0
- package/lib/components/UTSelect/versions/V1/styles.js +18 -0
- package/lib/components/UTTextArea/index.js +4 -2
- package/lib/components/UTTextInput/versions/V0/components/BaseInput/index.js +3 -3
- package/lib/components/UTTextInput/versions/V1/README.md +36 -35
- package/lib/components/UTTextInput/versions/V1/components/TextInputField/index.js +24 -15
- package/lib/components/UTTextInput/versions/V1/constants.js +3 -5
- package/lib/components/UTTextInput/versions/V1/index.js +25 -20
- package/lib/components/UTTextInput/versions/V1/proptypes.js +25 -7
- package/lib/constants/inputs.js +4 -0
- package/lib/index.js +47 -51
- package/package.json +2 -2
- /package/lib/components/UTSelect/{componentes → versions/V0/componentes}/MultipleItem/styles.js +0 -0
- /package/lib/components/UTSelect/{proptypes.js → versions/V0/proptypes.js} +0 -0
- /package/lib/components/UTSelect/{styles.js → versions/V0/styles.js} +0 -0
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { formatErrorToValidation } from '../../../UTValidation/utils';
|
|
5
|
-
import UTLabel from '../../../UTLabel';
|
|
6
5
|
import UTFieldLabel from '../../../UTFieldLabel';
|
|
6
|
+
import UTLabel from '../../../UTLabel';
|
|
7
7
|
import UTValidation from '../../../UTValidation';
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
9
|
+
import { defaultProps, propTypes } from './proptypes';
|
|
10
|
+
import { SIZES } from './constants';
|
|
11
11
|
import styles from './styles';
|
|
12
12
|
import TextInputField from './components/TextInputField';
|
|
13
13
|
|
|
14
14
|
const UTTextInput = ({
|
|
15
15
|
action,
|
|
16
16
|
alwaysShowPlaceholder,
|
|
17
|
+
blurOnSubmit,
|
|
17
18
|
disabled,
|
|
18
19
|
error,
|
|
19
20
|
helpText,
|
|
20
|
-
|
|
21
|
+
id,
|
|
22
|
+
input,
|
|
23
|
+
inputRef,
|
|
21
24
|
inputSize,
|
|
22
25
|
label,
|
|
23
26
|
labelVariant,
|
|
24
27
|
LeftIcon,
|
|
25
|
-
|
|
28
|
+
maxLength,
|
|
26
29
|
maxRows,
|
|
27
30
|
onBlur,
|
|
28
|
-
onChange,
|
|
29
31
|
onFocus,
|
|
30
32
|
onSubmitEditing,
|
|
31
33
|
placeholder,
|
|
@@ -34,16 +36,20 @@ const UTTextInput = ({
|
|
|
34
36
|
required,
|
|
35
37
|
returnKeyType,
|
|
36
38
|
RightIcon,
|
|
39
|
+
showCharacterCount,
|
|
37
40
|
style,
|
|
38
41
|
suffix,
|
|
39
42
|
tooltip,
|
|
40
43
|
type,
|
|
41
|
-
validations
|
|
42
|
-
value
|
|
44
|
+
validations
|
|
43
45
|
}) => {
|
|
44
46
|
const labelColorTheme = readOnly ? 'gray' : 'dark';
|
|
45
|
-
const labelComponentVariant = labelVariant === SMALL ? 'small' : 'body';
|
|
46
|
-
|
|
47
|
+
const labelComponentVariant = labelVariant === SIZES.SMALL ? 'small' : 'body';
|
|
48
|
+
|
|
49
|
+
const validationData = useMemo(
|
|
50
|
+
() => validations || (error && formatErrorToValidation(error)),
|
|
51
|
+
[error, validations]
|
|
52
|
+
);
|
|
47
53
|
|
|
48
54
|
return (
|
|
49
55
|
<View style={[styles.container, style.root]}>
|
|
@@ -55,15 +61,17 @@ const UTTextInput = ({
|
|
|
55
61
|
<TextInputField
|
|
56
62
|
action={action}
|
|
57
63
|
alwaysShowPlaceholder={alwaysShowPlaceholder}
|
|
64
|
+
blurOnSubmit={blurOnSubmit}
|
|
58
65
|
disabled={disabled}
|
|
59
66
|
error={error}
|
|
60
|
-
|
|
67
|
+
id={id}
|
|
68
|
+
input={input}
|
|
69
|
+
inputRef={inputRef}
|
|
61
70
|
inputSize={inputSize}
|
|
62
71
|
LeftIcon={LeftIcon}
|
|
63
|
-
|
|
72
|
+
maxLength={maxLength}
|
|
64
73
|
maxRows={maxRows}
|
|
65
74
|
onBlur={onBlur}
|
|
66
|
-
onChange={onChange}
|
|
67
75
|
onFocus={onFocus}
|
|
68
76
|
onSubmitEditing={onSubmitEditing}
|
|
69
77
|
placeholder={placeholder}
|
|
@@ -71,11 +79,11 @@ const UTTextInput = ({
|
|
|
71
79
|
readOnly={readOnly}
|
|
72
80
|
returnKeyType={returnKeyType}
|
|
73
81
|
RightIcon={RightIcon}
|
|
82
|
+
showCharacterCount={showCharacterCount}
|
|
74
83
|
style={style}
|
|
75
84
|
suffix={suffix}
|
|
76
85
|
tooltip={tooltip}
|
|
77
86
|
type={type}
|
|
78
|
-
value={value}
|
|
79
87
|
/>
|
|
80
88
|
{helpText && (
|
|
81
89
|
<UTLabel colorTheme="gray" variant="small">
|
|
@@ -87,10 +95,7 @@ const UTTextInput = ({
|
|
|
87
95
|
);
|
|
88
96
|
};
|
|
89
97
|
|
|
90
|
-
UTTextInput.defaultProps =
|
|
91
|
-
|
|
92
|
-
UTTextInput.propTypes = {
|
|
93
|
-
...propTypes
|
|
94
|
-
};
|
|
98
|
+
UTTextInput.defaultProps = defaultProps;
|
|
99
|
+
UTTextInput.propTypes = propTypes;
|
|
95
100
|
|
|
96
101
|
export default UTTextInput;
|
|
@@ -1,23 +1,41 @@
|
|
|
1
|
-
import { bool, elementType, func, number, shape, string } from 'prop-types';
|
|
1
|
+
import { bool, elementType, func, instanceOf, number, oneOfType, shape, string } from 'prop-types';
|
|
2
2
|
import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
3
3
|
|
|
4
4
|
import { validationDataProptypes } from '../../../UTValidation/constants';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { SIZES } from './constants';
|
|
7
|
+
|
|
8
|
+
export const defaultProps = {
|
|
9
|
+
input: {
|
|
10
|
+
value: [],
|
|
11
|
+
onChange: () => {}
|
|
12
|
+
},
|
|
13
|
+
inputSize: SIZES.LARGE,
|
|
14
|
+
labelVariant: SIZES.LARGE,
|
|
15
|
+
maxRows: 1,
|
|
16
|
+
style: {}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const propTypes = {
|
|
7
20
|
action: shape({ icon: elementType, action: func, colorTheme: string, text: string }),
|
|
8
21
|
alwaysShowPlaceholder: bool,
|
|
22
|
+
blurOnSubmit: bool,
|
|
9
23
|
disabled: bool,
|
|
10
24
|
error: string,
|
|
11
25
|
helpText: string,
|
|
12
|
-
|
|
26
|
+
id: oneOfType([number, string]),
|
|
27
|
+
input: shape({
|
|
28
|
+
value: string,
|
|
29
|
+
onChange: func
|
|
30
|
+
}),
|
|
31
|
+
inputRef: oneOfType([func, instanceOf(Object)]),
|
|
13
32
|
inputSize: string,
|
|
14
33
|
label: string,
|
|
15
34
|
labelVariant: string,
|
|
16
35
|
LeftIcon: elementType,
|
|
17
|
-
|
|
36
|
+
maxLength: number,
|
|
18
37
|
maxRows: number,
|
|
19
38
|
onBlur: func,
|
|
20
|
-
onChange: func,
|
|
21
39
|
onFocus: func,
|
|
22
40
|
onSubmitEditing: func,
|
|
23
41
|
placeholder: string,
|
|
@@ -26,6 +44,7 @@ export default {
|
|
|
26
44
|
required: bool,
|
|
27
45
|
returnKeyType: string,
|
|
28
46
|
RightIcon: elementType,
|
|
47
|
+
showCharacterCount: bool,
|
|
29
48
|
style: shape({
|
|
30
49
|
container: ViewPropTypes.style,
|
|
31
50
|
input: ViewPropTypes.style,
|
|
@@ -34,6 +53,5 @@ export default {
|
|
|
34
53
|
suffix: string,
|
|
35
54
|
tooltip: string,
|
|
36
55
|
type: string,
|
|
37
|
-
validations: validationDataProptypes
|
|
38
|
-
value: string
|
|
56
|
+
validations: validationDataProptypes
|
|
39
57
|
};
|
package/lib/index.js
CHANGED
|
@@ -2,78 +2,74 @@ import ReactotronConfig from './reactotronConfig'; // Importa la configuración
|
|
|
2
2
|
|
|
3
3
|
ReactotronConfig();
|
|
4
4
|
|
|
5
|
-
// Buttons
|
|
6
|
-
export { default as Button } from './components/Button';
|
|
7
|
-
export { default as UTButton } from './components/UTButton';
|
|
8
|
-
export { default as IconButton } from './components/IconButton';
|
|
9
|
-
export { default as ImageButton } from './components/ImageButton';
|
|
10
|
-
export { default as Touchable } from './components/Touchable';
|
|
11
5
|
export { default as ActionButton } from './components/ActionButton';
|
|
12
|
-
export { default as
|
|
13
|
-
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as UTModal } from './components/UTModal';
|
|
16
|
-
export { default as Snackbar } from './components/Snackbar';
|
|
17
|
-
// Forms
|
|
6
|
+
export { default as AvatarImage } from './components/AvatarImage';
|
|
7
|
+
export { default as Button } from './components/Button';
|
|
8
|
+
export { default as Carousel } from './components/Carousel';
|
|
18
9
|
export { default as Checkbox } from './components/Checkbox';
|
|
19
|
-
export { default as RadioButton } from './components/RadioGroup/components/RadioButton';
|
|
20
|
-
export { default as RadioGroup } from './components/RadioGroup';
|
|
21
|
-
export { default as Input } from './components/Input';
|
|
22
|
-
export { default as ImagePicker } from './components/ImagePicker';
|
|
23
|
-
export { default as FilePicker } from './components/FilePicker';
|
|
24
|
-
export { default as MultipleFilePicker } from './components/MultipleFilePicker';
|
|
25
|
-
export { default as Picker } from './components/Picker';
|
|
26
|
-
export { default as ImageLabel } from './components/ImageLabel';
|
|
27
10
|
export { default as CheckList } from './components/CheckList';
|
|
28
|
-
export { default as
|
|
29
|
-
export { default as
|
|
30
|
-
export { default as UTCheckList } from './components/UTCheckList';
|
|
31
|
-
export { default as UTCheckBox } from './components/UTCheckBox';
|
|
32
|
-
|
|
33
|
-
// Icons
|
|
11
|
+
export { default as Dropdown } from './components/Dropdown';
|
|
12
|
+
export { default as FilePicker } from './components/FilePicker';
|
|
34
13
|
export { default as Icon } from './components/Icon';
|
|
14
|
+
export { default as IconBadge } from './components/IconBadge';
|
|
15
|
+
export { default as IconButton } from './components/IconButton';
|
|
16
|
+
export { default as ImageButton } from './components/ImageButton';
|
|
35
17
|
export { default as ImageIcon } from './components/ImageIcon';
|
|
36
|
-
export { default as
|
|
37
|
-
export { default as
|
|
38
|
-
|
|
39
|
-
export { default as
|
|
40
|
-
export { default as
|
|
41
|
-
export { default as
|
|
42
|
-
export { default as
|
|
18
|
+
export { default as ImageLabel } from './components/ImageLabel';
|
|
19
|
+
export { default as ImagePicker } from './components/ImagePicker';
|
|
20
|
+
export { default as ImageRadio } from './components/ImageRadio';
|
|
21
|
+
export { default as Input } from './components/Input';
|
|
22
|
+
export { default as Label } from './components/Label';
|
|
23
|
+
export { default as Loading } from './components/Loading';
|
|
24
|
+
export { default as Modal } from './components/Modal';
|
|
25
|
+
export { default as MultipleFilePicker } from './components/MultipleFilePicker';
|
|
43
26
|
export { default as Overlay } from './components/Overlay';
|
|
27
|
+
export { default as Picker } from './components/Picker';
|
|
44
28
|
export { default as Portal } from './components/Portal';
|
|
29
|
+
export { default as RadioButton } from './components/RadioGroup/components/RadioButton';
|
|
30
|
+
export { default as RadioGroup } from './components/RadioGroup';
|
|
31
|
+
export { default as SeparatorBar } from './components/SeparatorBar';
|
|
32
|
+
export { default as Snackbar } from './components/Snackbar';
|
|
45
33
|
export { default as Surface } from './components/Surface';
|
|
34
|
+
export { default as Touchable } from './components/Touchable';
|
|
35
|
+
export { default as TransformView } from './components/TransformView';
|
|
36
|
+
export { default as TransitionText } from './components/TransitionText';
|
|
46
37
|
export { default as TransitionView } from './components/TransitionView';
|
|
47
|
-
export { default as
|
|
38
|
+
export { default as UTAutocomplete } from './components/UTAutocomplete';
|
|
39
|
+
export { default as UTBadge } from './components/UTBadge';
|
|
40
|
+
export { default as UTBottomSheet } from './components/UTBottomSheet';
|
|
41
|
+
export { default as UTButton } from './components/UTButton';
|
|
42
|
+
export { default as UTCBUInput } from './components/UTCBUInput';
|
|
43
|
+
export { default as UTCheckBox } from './components/UTCheckBox';
|
|
44
|
+
export { default as UTCheckList } from './components/UTCheckList';
|
|
48
45
|
export { default as UTDetailDrawer } from './components/UTDetailDrawer';
|
|
46
|
+
export { default as UTIcon } from './components/UTIcon';
|
|
49
47
|
export { default as UTImage } from './components/UTImage';
|
|
50
|
-
export { default as
|
|
51
|
-
export { default as
|
|
48
|
+
export { default as UTLabel } from './components/UTLabel';
|
|
49
|
+
export { default as UTLoading } from './components/UTLoading';
|
|
50
|
+
export { default as UTMenu } from './components/UTMenu';
|
|
51
|
+
export { default as UTModal } from './components/UTModal';
|
|
52
|
+
export { default as UTOnBoarding } from './components/UTOnBoarding';
|
|
53
|
+
export { default as UTPasswordField } from './components/UTPasswordField';
|
|
54
|
+
export { default as UTPhoneInput } from './components/UTPhoneInput';
|
|
52
55
|
export { default as UTProductItem } from './components/UTProductItem';
|
|
53
56
|
export { default as UTProgressBar } from './components/UTProgressBar';
|
|
54
|
-
export { default as UTOnBoarding } from './components/UTOnBoarding';
|
|
55
57
|
export { default as UTRoundView } from './components/UTRoundView';
|
|
56
|
-
export { default as
|
|
57
|
-
export { default as UTTooltip } from './components/UTTooltip';
|
|
58
|
-
export { default as UTTextArea } from './components/UTTextArea';
|
|
59
|
-
export { default as UTTextInput } from './components/UTTextInput';
|
|
58
|
+
export { default as UTSearchField } from './components/UTSearchField';
|
|
60
59
|
export { default as UTSelect } from './components/UTSelect';
|
|
60
|
+
export { default as UTSelectableCard } from './components/UTSelectableCard';
|
|
61
61
|
export { default as UTStepFeedback } from './components/UTStepFeedback';
|
|
62
|
-
export { default as
|
|
62
|
+
export { default as UTSwitch } from './components/UTSwitch';
|
|
63
|
+
export { default as UTTextArea } from './components/UTTextArea';
|
|
64
|
+
export { default as UTTextInput } from './components/UTTextInput';
|
|
65
|
+
export { default as UTTooltip } from './components/UTTooltip';
|
|
63
66
|
export { default as UTTracker } from './components/UTTracker';
|
|
64
|
-
export { default as ImageRadio } from './components/ImageRadio';
|
|
65
|
-
// Loading
|
|
66
|
-
export { default as Loading } from './components/Loading';
|
|
67
|
-
export { default as UTLoading } from './components/UTLoading';
|
|
68
|
-
// Text
|
|
69
|
-
export { default as Label } from './components/Label';
|
|
70
|
-
export { default as TransitionText } from './components/TransitionText';
|
|
71
|
-
export { default as UTBadge } from './components/UTBadge';
|
|
72
|
-
export { default as UTLabel } from './components/UTLabel';
|
|
73
67
|
export { default as UTValidation } from './components/UTValidation';
|
|
68
|
+
export { default as UTWorkflowContainer } from './components/UTWorkflowContainer';
|
|
74
69
|
|
|
75
70
|
// Theming
|
|
76
71
|
export * from './theming';
|
|
72
|
+
|
|
77
73
|
// Utils
|
|
78
74
|
export { default as analyticsUtils } from './utils/analyticsUtils';
|
|
79
75
|
export { default as portraitScaleUtils } from './utils/portraitScalingUtils';
|
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.
|
|
5
|
+
"version": "1.15.1",
|
|
6
6
|
"repository": "https://github.com/widergy/mobile-ui.git",
|
|
7
7
|
"main": "lib/index.js",
|
|
8
8
|
"files": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"react-native-modal": "^13.0.1",
|
|
48
48
|
"react-native-pager-view": "^6.2.1",
|
|
49
49
|
"react-native-svg": "^13.13.0",
|
|
50
|
-
"react-native-safe-area-context": "
|
|
50
|
+
"react-native-safe-area-context": "4.10.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@babel/cli": "^7.22.10",
|
/package/lib/components/UTSelect/{componentes → versions/V0/componentes}/MultipleItem/styles.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|