@widergy/mobile-ui 1.27.1 → 1.28.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/MultipleFilePicker/components/Picker/index.js +66 -74
- package/lib/components/MultipleFilePicker/components/Picker/styles.js +26 -34
- package/lib/components/MultipleFilePicker/components/UploadedFiles/index.js +27 -129
- package/lib/components/MultipleFilePicker/components/UploadedFiles/styles.js +8 -57
- package/lib/components/MultipleFilePicker/constants.js +0 -14
- package/lib/components/MultipleFilePicker/index.js +196 -147
- package/lib/components/MultipleFilePicker/propTypes.js +15 -11
- package/lib/components/MultipleFilePicker/styles.js +9 -0
- package/lib/components/MultipleFilePicker/utils.js +22 -51
- package/lib/components/UTBaseInputField/index.js +4 -2
- package/lib/components/UTBaseInputField/theme.js +7 -4
- package/package.json +1 -1
- package/lib/components/MultipleFilePicker/components/Input/README.md +0 -77
- package/lib/components/MultipleFilePicker/components/Input/components/ShowPassword/constants.js +0 -2
- package/lib/components/MultipleFilePicker/components/Input/components/ShowPassword/index.js +0 -19
- package/lib/components/MultipleFilePicker/components/Input/components/ShowPassword/propTypes.js +0 -8
- package/lib/components/MultipleFilePicker/components/Input/components/ShowPassword/styles.js +0 -11
- package/lib/components/MultipleFilePicker/components/Input/components/Title/index.js +0 -78
- package/lib/components/MultipleFilePicker/components/Input/components/Title/propTypes.js +0 -14
- package/lib/components/MultipleFilePicker/components/Input/components/Title/styles.js +0 -42
- package/lib/components/MultipleFilePicker/components/Input/components/Underline/index.js +0 -80
- package/lib/components/MultipleFilePicker/components/Input/components/Underline/styles.js +0 -39
- package/lib/components/MultipleFilePicker/components/Input/constants.js +0 -2
- package/lib/components/MultipleFilePicker/components/Input/index.js +0 -299
- package/lib/components/MultipleFilePicker/components/Input/propTypes.js +0 -43
- package/lib/components/MultipleFilePicker/components/Input/styles.js +0 -47
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.28.1](https://github.com/widergy/mobile-ui/compare/v1.28.0...v1.28.1) (2024-10-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* [UGC-934] text area fix ([#368](https://github.com/widergy/mobile-ui/issues/368)) ([32bcffc](https://github.com/widergy/mobile-ui/commit/32bcffc0e4b91e5c049fc548f3596bc7599a90ce))
|
|
7
|
+
|
|
8
|
+
# [1.28.0](https://github.com/widergy/mobile-ui/compare/v1.27.1...v1.28.0) (2024-10-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* [EVE-4280] attachment list drawer ([#369](https://github.com/widergy/mobile-ui/issues/369)) ([c4570a7](https://github.com/widergy/mobile-ui/commit/c4570a79a683a758e581f537135137046f747064))
|
|
14
|
+
|
|
1
15
|
## [1.27.1](https://github.com/widergy/mobile-ui/compare/v1.27.0...v1.27.1) (2024-10-07)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,95 +1,87 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { string, bool, func, number, object, array } from 'prop-types';
|
|
2
|
+
import { isEmpty } from 'lodash';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import React from 'react';
|
|
5
5
|
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import UTLabel from '../../../UTLabel';
|
|
7
|
+
import { withTheme } from '../../../../theming';
|
|
8
|
+
import UploadedFile from '../UploadedFiles';
|
|
9
|
+
import UTIcon from '../../../UTIcon';
|
|
10
|
+
import UTButton from '../../../UTButton';
|
|
10
11
|
|
|
11
12
|
import styles from './styles';
|
|
12
13
|
|
|
13
14
|
const Picker = ({
|
|
14
|
-
|
|
15
|
+
maxFiles,
|
|
16
|
+
disabled = false,
|
|
15
17
|
error,
|
|
16
|
-
onAdd,
|
|
17
18
|
filePlaceholder,
|
|
18
|
-
uploadedFiles,
|
|
19
19
|
helpText,
|
|
20
|
+
onAdd,
|
|
21
|
+
onDelete,
|
|
20
22
|
pickerText,
|
|
21
|
-
showButton,
|
|
22
|
-
title,
|
|
23
23
|
theme,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
disabled = false,
|
|
27
|
-
UploadIcon
|
|
24
|
+
title,
|
|
25
|
+
uploadedFiles
|
|
28
26
|
}) => (
|
|
29
|
-
<
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
error={error}
|
|
61
|
-
containerStyle={styles.containerStyle}
|
|
62
|
-
containerPadding={18}
|
|
63
|
-
textStyles={styles.textStyles}
|
|
64
|
-
underlineHeight={0}
|
|
65
|
-
/>
|
|
66
|
-
</Touchable>
|
|
67
|
-
<Text style={styles.pickerText}>{pickerText}</Text>
|
|
27
|
+
<View style={styles.container}>
|
|
28
|
+
<UTLabel>{title}</UTLabel>
|
|
29
|
+
<View style={styles.pickerContainer(error, theme)}>
|
|
30
|
+
{isEmpty(uploadedFiles) ? (
|
|
31
|
+
<UTIcon colorTheme="accent" name="IconCloudUpload" shade="03" size={64} />
|
|
32
|
+
) : (
|
|
33
|
+
uploadedFiles.map((file, index) => (
|
|
34
|
+
<UploadedFile
|
|
35
|
+
disabled={disabled}
|
|
36
|
+
file={file}
|
|
37
|
+
filePlaceholder={filePlaceholder}
|
|
38
|
+
key={file.name}
|
|
39
|
+
onDelete={() => onDelete(index)}
|
|
40
|
+
/>
|
|
41
|
+
))
|
|
42
|
+
)}
|
|
43
|
+
|
|
44
|
+
{uploadedFiles.length < maxFiles && (
|
|
45
|
+
<UTButton
|
|
46
|
+
colorTheme="primary"
|
|
47
|
+
disabled={disabled}
|
|
48
|
+
Icon="IconUpload"
|
|
49
|
+
onPress={onAdd}
|
|
50
|
+
variant="semitransparent"
|
|
51
|
+
>
|
|
52
|
+
Subir archivo
|
|
53
|
+
</UTButton>
|
|
54
|
+
)}
|
|
55
|
+
<UTLabel colorTheme="gray" style={styles.pickerText} weight="medium">
|
|
56
|
+
{pickerText}
|
|
57
|
+
</UTLabel>
|
|
68
58
|
</View>
|
|
69
|
-
<
|
|
70
|
-
|
|
59
|
+
<UTLabel colorTheme="gray">{helpText}</UTLabel>
|
|
60
|
+
{error && (
|
|
61
|
+
<View style={styles.error}>
|
|
62
|
+
<View style={[styles.errorIcon(theme)]}>
|
|
63
|
+
<UTIcon colorTheme="error" name="IconX" size={16} />
|
|
64
|
+
</View>
|
|
65
|
+
<UTLabel colorTheme="error" style={styles.errorMessage} variant="small">
|
|
66
|
+
{error}
|
|
67
|
+
</UTLabel>
|
|
68
|
+
</View>
|
|
69
|
+
)}
|
|
70
|
+
</View>
|
|
71
71
|
);
|
|
72
72
|
|
|
73
73
|
Picker.propTypes = {
|
|
74
|
-
|
|
75
|
-
error: oneOfType([string, bool]),
|
|
76
|
-
onAdd: func.isRequired,
|
|
77
|
-
onDelete: func.isRequired,
|
|
78
|
-
filePlaceholder: string,
|
|
79
|
-
uploadedFiles: arrayOf(string),
|
|
80
|
-
title: string,
|
|
81
|
-
showButton: bool,
|
|
82
|
-
theme: themeType,
|
|
83
|
-
withMarkdownTitle: bool,
|
|
84
|
-
markdownStyles: shape({ ViewPropTypes }),
|
|
74
|
+
maxFiles: number,
|
|
85
75
|
disabled: bool,
|
|
76
|
+
error: string,
|
|
77
|
+
filePlaceholder: string,
|
|
86
78
|
helpText: string,
|
|
79
|
+
onAdd: func,
|
|
80
|
+
onDelete: func,
|
|
87
81
|
pickerText: string,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Picker.defaultProps = {
|
|
92
|
-
showButton: true
|
|
82
|
+
theme: object,
|
|
83
|
+
title: string,
|
|
84
|
+
uploadedFiles: array
|
|
93
85
|
};
|
|
94
86
|
|
|
95
87
|
export default withTheme(Picker);
|
|
@@ -1,47 +1,39 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import { portraitVerticalScale } from '../../../../utils/portraitScalingUtils';
|
|
4
|
-
|
|
5
3
|
export default StyleSheet.create({
|
|
6
4
|
container: {
|
|
7
|
-
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
gap: 8
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
pickerContainer: (error, theme) => ({
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
borderColor: error ? theme.Palette?.error?.['04'] : theme.Palette?.light?.['05'],
|
|
12
|
+
borderRadius: 4,
|
|
13
|
+
borderStyle: error ? 'solid' : 'dashed',
|
|
14
|
+
borderWidth: error ? 2 : 1,
|
|
15
|
+
gap: 16,
|
|
16
|
+
padding: 16,
|
|
11
17
|
width: '100%'
|
|
18
|
+
}),
|
|
19
|
+
error: {
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
flexDirection: 'row',
|
|
22
|
+
marginTop: 4
|
|
12
23
|
},
|
|
13
|
-
|
|
14
|
-
flex: 1
|
|
15
|
-
},
|
|
16
|
-
fieldInput: {
|
|
17
|
-
flex: 1,
|
|
24
|
+
errorIcon: theme => ({
|
|
18
25
|
alignItems: 'center',
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
backgroundColor: theme.Palette?.error?.['01'],
|
|
27
|
+
borderRadius: 100,
|
|
28
|
+
height: 20,
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
marginRight: 8,
|
|
31
|
+
width: 20
|
|
32
|
+
}),
|
|
33
|
+
errorMessage: {
|
|
34
|
+
flex: 1
|
|
27
35
|
},
|
|
28
36
|
pickerText: {
|
|
29
37
|
textAlign: 'center'
|
|
30
|
-
},
|
|
31
|
-
helpText: {
|
|
32
|
-
textAlign: 'center',
|
|
33
|
-
marginBottom: 10
|
|
34
|
-
},
|
|
35
|
-
textStyles: {
|
|
36
|
-
flex: 1,
|
|
37
|
-
padding: 0,
|
|
38
|
-
textAlignVertical: 'center',
|
|
39
|
-
margin: 5
|
|
40
|
-
},
|
|
41
|
-
touchable: {
|
|
42
|
-
borderRadius: 4,
|
|
43
|
-
margin: 7,
|
|
44
|
-
height: 38,
|
|
45
|
-
width: '50%'
|
|
46
38
|
}
|
|
47
39
|
});
|
|
@@ -1,140 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { string, bool, oneOfType, shape, func, arrayOf } from 'prop-types';
|
|
1
|
+
import { string, bool, func, object } from 'prop-types';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import React from 'react';
|
|
5
4
|
|
|
6
|
-
import { withTheme
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
5
|
+
import { withTheme } from '../../../../theming';
|
|
6
|
+
import Surface from '../../../Surface';
|
|
7
|
+
import UTButton from '../../../UTButton';
|
|
8
|
+
import UTIcon from '../../../UTIcon';
|
|
9
|
+
import UTLabel from '../../../UTLabel';
|
|
10
10
|
|
|
11
11
|
import { bytesFormater } from './utils';
|
|
12
12
|
import styles from './styles';
|
|
13
13
|
|
|
14
|
-
const UploadedFiles = ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
<Fragment>
|
|
31
|
-
{!!title && (
|
|
32
|
-
<Label
|
|
33
|
-
useMarkdown={withMarkdownTitle}
|
|
34
|
-
{...theme.forms.fieldsTitleProps}
|
|
35
|
-
markdownStyles={markdownStyles}
|
|
36
|
-
>
|
|
37
|
-
{title}
|
|
38
|
-
</Label>
|
|
39
|
-
)}
|
|
40
|
-
<View style={[styles.fieldInput, { borderColor: theme.picker.accentColor }]}>
|
|
41
|
-
{uploadedFiles.map((file, index) => {
|
|
42
|
-
return (
|
|
43
|
-
<Touchable
|
|
44
|
-
key={`${file.name}-${Math.random()}`}
|
|
45
|
-
borderless
|
|
46
|
-
style={styles.touchable}
|
|
47
|
-
disabled={disabled}
|
|
48
|
-
>
|
|
49
|
-
<Input
|
|
50
|
-
backgroundColor="transparent"
|
|
51
|
-
maxWidth={styles.containerInput.width}
|
|
52
|
-
minHeight={styles.containerInput.height}
|
|
53
|
-
value={file.name}
|
|
54
|
-
editable={false}
|
|
55
|
-
fileSize={bytesFormater(file.size)}
|
|
56
|
-
placeholder={filePlaceholder}
|
|
57
|
-
disabledTextStyles={{ color: theme.colors.disabled }}
|
|
58
|
-
trailingIcon={
|
|
59
|
-
showButton && {
|
|
60
|
-
name: 'check',
|
|
61
|
-
color: theme.picker.accentColor,
|
|
62
|
-
type: 'feather',
|
|
63
|
-
disabled
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
leadingIcon={
|
|
67
|
-
showButton && {
|
|
68
|
-
name: 'trash-2',
|
|
69
|
-
color: theme.picker.trashIconColor,
|
|
70
|
-
type: 'feather',
|
|
71
|
-
onPress: () => onDelete(index),
|
|
72
|
-
disabled
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
error={error}
|
|
76
|
-
containerStyle={styles.containerStyle}
|
|
77
|
-
textStyles={styles.textStyles}
|
|
78
|
-
containerPadding={styles.containerPadding.padding}
|
|
79
|
-
underlineHeight={0}
|
|
80
|
-
iconSize={32}
|
|
81
|
-
textColor={theme.picker.dark05}
|
|
82
|
-
/>
|
|
83
|
-
</Touchable>
|
|
84
|
-
);
|
|
85
|
-
})}
|
|
86
|
-
<Touchable borderless style={styles.uploadTouchable} disabled={disabled} onPress={onAdd}>
|
|
87
|
-
<Input
|
|
88
|
-
backgroundColor={theme.picker.inputBackgroundColor}
|
|
89
|
-
maxWidth={styles.containerInput.width}
|
|
90
|
-
minHeight={38}
|
|
91
|
-
value={uploadedFiles}
|
|
92
|
-
editable={false}
|
|
93
|
-
placeholder={filePlaceholder}
|
|
94
|
-
placeholderTextColor={theme.picker.buttonTextColor}
|
|
95
|
-
disabledTextStyles={{ color: theme.colors.disabled }}
|
|
96
|
-
trailingIcon={
|
|
97
|
-
showButton && {
|
|
98
|
-
name: icon,
|
|
99
|
-
type: 'feather',
|
|
100
|
-
color: theme.picker.buttonTextColor,
|
|
101
|
-
onPress: onAdd,
|
|
102
|
-
disabled
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
error={error}
|
|
106
|
-
textStyles={styles.textButtonStyles}
|
|
107
|
-
containerButtonPadding={styles.containerButtonPadding.padding}
|
|
108
|
-
containerPadding={styles.containerPadding.padding}
|
|
109
|
-
underlineHeight={0}
|
|
110
|
-
iconSize={20}
|
|
111
|
-
/>
|
|
112
|
-
</Touchable>
|
|
113
|
-
<Text style={styles.pickerText}>{pickerText}</Text>
|
|
114
|
-
</View>
|
|
115
|
-
<Text style={styles.helpText}>{helpText}</Text>
|
|
116
|
-
</Fragment>
|
|
117
|
-
);
|
|
14
|
+
const UploadedFiles = ({ disabled = false, file, filePlaceholder, onDelete }) => {
|
|
15
|
+
return (
|
|
16
|
+
<Surface style={styles.container}>
|
|
17
|
+
<UTIcon name="IconCheck" size={32} colorTheme="accent" shade="04" />
|
|
18
|
+
<View style={styles.texts}>
|
|
19
|
+
<UTLabel numberOfLines={1} weight="medium">
|
|
20
|
+
{file.name || filePlaceholder}
|
|
21
|
+
</UTLabel>
|
|
22
|
+
<UTLabel colorTheme="gray" weight="medium">
|
|
23
|
+
{bytesFormater(file.size)}
|
|
24
|
+
</UTLabel>
|
|
25
|
+
</View>
|
|
26
|
+
{!disabled && <UTButton Icon="IconTrash" colorTheme="primary" variant="text" onPress={onDelete} />}
|
|
27
|
+
</Surface>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
118
30
|
|
|
119
31
|
UploadedFiles.propTypes = {
|
|
120
|
-
icon: string.isRequired,
|
|
121
|
-
error: oneOfType([string, bool]),
|
|
122
|
-
onAdd: func.isRequired,
|
|
123
|
-
onDelete: func.isRequired,
|
|
124
|
-
filePlaceholder: string,
|
|
125
|
-
uploadedFiles: arrayOf(string),
|
|
126
|
-
title: string,
|
|
127
|
-
showButton: bool,
|
|
128
|
-
theme: themeType,
|
|
129
|
-
withMarkdownTitle: bool,
|
|
130
|
-
markdownStyles: shape({ ViewPropTypes }),
|
|
131
32
|
disabled: bool,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
UploadedFiles.defaultProps = {
|
|
137
|
-
showButton: true
|
|
33
|
+
file: object,
|
|
34
|
+
filePlaceholder: string,
|
|
35
|
+
onDelete: func
|
|
138
36
|
};
|
|
139
37
|
|
|
140
38
|
export default withTheme(UploadedFiles);
|
|
@@ -1,65 +1,16 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import { portraitHorizontalScale, portraitVerticalScale } from '../../../../utils/portraitScalingUtils';
|
|
4
|
-
|
|
5
3
|
export default StyleSheet.create({
|
|
6
4
|
container: {
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
containerInput: {
|
|
10
|
-
height: '100%',
|
|
11
|
-
width: '100%'
|
|
12
|
-
},
|
|
13
|
-
containerStyle: {
|
|
14
|
-
flex: 1,
|
|
15
|
-
shadowColor: '#E4E6EA',
|
|
16
|
-
elevation: 4
|
|
17
|
-
},
|
|
18
|
-
containerButtonPadding: {
|
|
19
|
-
padding: portraitHorizontalScale(65)
|
|
20
|
-
},
|
|
21
|
-
containerPadding: {
|
|
22
|
-
padding: portraitHorizontalScale(18)
|
|
23
|
-
},
|
|
24
|
-
fieldInput: {
|
|
25
|
-
borderRadius: 5,
|
|
26
|
-
borderStyle: 'dashed',
|
|
27
|
-
borderWidth: 1,
|
|
28
|
-
flex: 1,
|
|
29
|
-
height: 'auto',
|
|
30
|
-
paddingBottom: portraitVerticalScale(24),
|
|
31
|
-
paddingTop: portraitVerticalScale(16),
|
|
32
|
-
width: '100%',
|
|
33
|
-
marginVertical: 10
|
|
34
|
-
},
|
|
35
|
-
helpText: {
|
|
36
|
-
textAlign: 'center',
|
|
37
|
-
marginBottom: 10
|
|
38
|
-
},
|
|
39
|
-
pickerText: {
|
|
40
|
-
textAlign: 'center'
|
|
41
|
-
},
|
|
42
|
-
textStyles: {
|
|
43
|
-
marginLeft: 5,
|
|
44
|
-
marginTop: 16
|
|
45
|
-
},
|
|
46
|
-
textButtonStyles: {
|
|
47
|
-
flex: 1,
|
|
48
|
-
padding: 0,
|
|
49
|
-
textAlignVertical: 'center',
|
|
50
|
-
margin: 15
|
|
51
|
-
},
|
|
52
|
-
touchable: {
|
|
5
|
+
alignItems: 'center',
|
|
53
6
|
borderRadius: 4,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
gap: 16,
|
|
9
|
+
padding: 16,
|
|
10
|
+
flexShrink: 1
|
|
57
11
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
marginVertical: 10,
|
|
62
|
-
height: 38,
|
|
63
|
-
width: '90%'
|
|
12
|
+
texts: {
|
|
13
|
+
flex: 1,
|
|
14
|
+
flexGrow: 1
|
|
64
15
|
}
|
|
65
16
|
});
|
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
// eslint-disable-next-line import/no-unresolved
|
|
2
|
-
import DocumentPicker from 'react-native-document-picker';
|
|
3
|
-
|
|
4
2
|
import { MEGABYTE } from '../../utils/fileUtils.js';
|
|
5
3
|
|
|
6
|
-
export const FILE_UPLOAD_ICON = 'file-upload';
|
|
7
|
-
|
|
8
|
-
export const UPLOAD_ICON = 'upload';
|
|
9
|
-
|
|
10
|
-
export const CHECK_ICON = 'check';
|
|
11
|
-
|
|
12
|
-
export const TRASH_ICON = 'trash-2';
|
|
13
|
-
|
|
14
|
-
export const TYPE_ICON = 'feather';
|
|
15
|
-
|
|
16
|
-
export const DEFAULT_ALLOWED_TYPES = [DocumentPicker.types.allFiles];
|
|
17
|
-
|
|
18
4
|
export const DEFAULT_MAX_SIZE = 10 * MEGABYTE;
|