@alfalab/core-components-file-upload-item 5.1.4 → 5.1.6
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/Component.js +5 -5
- package/cssm/Component.js +4 -4
- package/cssm/index.js +2 -2
- package/cssm/index.module.css +2 -6
- package/esm/Component.js +5 -5
- package/esm/index.css +24 -28
- package/esm/index.js +2 -2
- package/index.css +24 -28
- package/index.js +2 -2
- package/modern/Component.js +5 -5
- package/modern/index.css +24 -28
- package/modern/index.js +2 -2
- package/package.json +2 -2
package/Component.js
CHANGED
|
@@ -7,10 +7,10 @@ var cn = require('classnames');
|
|
|
7
7
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
8
8
|
var coreComponentsLink = require('@alfalab/core-components-link');
|
|
9
9
|
var coreComponentsSpinner = require('@alfalab/core-components-spinner');
|
|
10
|
-
var
|
|
10
|
+
var CrossSIcon = require('@alfalab/icons-glyph/CrossSIcon');
|
|
11
11
|
var CheckmarkCircleMIcon = require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
12
12
|
var AlertCircleMIcon = require('@alfalab/icons-glyph/AlertCircleMIcon');
|
|
13
|
-
var
|
|
13
|
+
var PointerDownSIcon = require('@alfalab/icons-glyph/PointerDownSIcon');
|
|
14
14
|
var ClockMIcon = require('@alfalab/icons-glyph/ClockMIcon');
|
|
15
15
|
require('@alfalab/icons-glyph/DocumentDocMIcon');
|
|
16
16
|
require('@alfalab/icons-glyph/DocumentPdfMIcon');
|
|
@@ -24,7 +24,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
24
24
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
25
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
26
26
|
|
|
27
|
-
var styles = {"component":"file-upload-
|
|
27
|
+
var styles = {"component":"file-upload-item__component_honos","infoSection":"file-upload-item__infoSection_honos","info":"file-upload-item__info_honos","icon":"file-upload-item__icon_honos","errorIcon":"file-upload-item__errorIcon_honos","successIcon":"file-upload-item__successIcon_honos","name":"file-upload-item__name_honos","meta":"file-upload-item__meta_honos","size":"file-upload-item__size_honos","delete":"file-upload-item__delete_honos","download":"file-upload-item__download_honos","errorWrapper":"file-upload-item__errorWrapper_honos","restore":"file-upload-item__restore_honos","spinnerWrapper":"file-upload-item__spinnerWrapper_honos","spinner":"file-upload-item__spinner_honos","uploadPercent":"file-upload-item__uploadPercent_honos"};
|
|
28
28
|
require('./index.css')
|
|
29
29
|
|
|
30
30
|
var FileUploadItem = function (_a) {
|
|
@@ -80,8 +80,8 @@ var FileUploadItem = function (_a) {
|
|
|
80
80
|
uploadDate && React__default['default'].createElement("span", { key: uploadDate }, uploadDate),
|
|
81
81
|
size && (React__default['default'].createElement("span", { key: size, className: styles.size }, utils.humanFileSize(size)))))),
|
|
82
82
|
showRestore && (React__default['default'].createElement(coreComponentsLink.Link, { pseudo: true, className: styles.restore, onClick: handleRestore }, "\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C")),
|
|
83
|
-
showDownload && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon:
|
|
84
|
-
showDelete && !showRestore && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon:
|
|
83
|
+
showDownload && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon: PointerDownSIcon.PointerDownSIcon, className: styles.download, "aria-label": '\u0441\u043A\u0430\u0447\u0430\u0442\u044C', href: downloadLink, onClick: handleDownload, disabled: disableButtons, download: download })),
|
|
84
|
+
showDelete && !showRestore && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon: CrossSIcon.CrossSIcon, onClick: handleDelete, disabled: disableButtons, className: styles.delete, "aria-label": '\u0443\u0434\u0430\u043B\u0438\u0442\u044C' }))));
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
exports.FileUploadItem = FileUploadItem;
|
package/cssm/Component.js
CHANGED
|
@@ -7,10 +7,10 @@ var cn = require('classnames');
|
|
|
7
7
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/cssm');
|
|
8
8
|
var coreComponentsLink = require('@alfalab/core-components-link/cssm');
|
|
9
9
|
var coreComponentsSpinner = require('@alfalab/core-components-spinner/cssm');
|
|
10
|
-
var
|
|
10
|
+
var CrossSIcon = require('@alfalab/icons-glyph/CrossSIcon');
|
|
11
11
|
var CheckmarkCircleMIcon = require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
12
12
|
var AlertCircleMIcon = require('@alfalab/icons-glyph/AlertCircleMIcon');
|
|
13
|
-
var
|
|
13
|
+
var PointerDownSIcon = require('@alfalab/icons-glyph/PointerDownSIcon');
|
|
14
14
|
var ClockMIcon = require('@alfalab/icons-glyph/ClockMIcon');
|
|
15
15
|
require('@alfalab/icons-glyph/DocumentDocMIcon');
|
|
16
16
|
require('@alfalab/icons-glyph/DocumentPdfMIcon');
|
|
@@ -79,8 +79,8 @@ var FileUploadItem = function (_a) {
|
|
|
79
79
|
uploadDate && React__default['default'].createElement("span", { key: uploadDate }, uploadDate),
|
|
80
80
|
size && (React__default['default'].createElement("span", { key: size, className: styles__default['default'].size }, utils.humanFileSize(size)))))),
|
|
81
81
|
showRestore && (React__default['default'].createElement(coreComponentsLink.Link, { pseudo: true, className: styles__default['default'].restore, onClick: handleRestore }, "\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C")),
|
|
82
|
-
showDownload && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon:
|
|
83
|
-
showDelete && !showRestore && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon:
|
|
82
|
+
showDownload && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon: PointerDownSIcon.PointerDownSIcon, className: styles__default['default'].download, "aria-label": '\u0441\u043A\u0430\u0447\u0430\u0442\u044C', href: downloadLink, onClick: handleDownload, disabled: disableButtons, download: download })),
|
|
83
|
+
showDelete && !showRestore && (React__default['default'].createElement(coreComponentsIconButton.IconButton, { size: 'xxs', icon: CrossSIcon.CrossSIcon, onClick: handleDelete, disabled: disableButtons, className: styles__default['default'].delete, "aria-label": '\u0443\u0434\u0430\u043B\u0438\u0442\u044C' }))));
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
exports.FileUploadItem = FileUploadItem;
|
package/cssm/index.js
CHANGED
|
@@ -7,10 +7,10 @@ require('classnames');
|
|
|
7
7
|
require('@alfalab/core-components-icon-button/cssm');
|
|
8
8
|
require('@alfalab/core-components-link/cssm');
|
|
9
9
|
require('@alfalab/core-components-spinner/cssm');
|
|
10
|
-
require('@alfalab/icons-glyph/
|
|
10
|
+
require('@alfalab/icons-glyph/CrossSIcon');
|
|
11
11
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
12
12
|
require('@alfalab/icons-glyph/AlertCircleMIcon');
|
|
13
|
-
require('@alfalab/icons-glyph/
|
|
13
|
+
require('@alfalab/icons-glyph/PointerDownSIcon');
|
|
14
14
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
15
15
|
require('@alfalab/icons-glyph/DocumentDocMIcon');
|
|
16
16
|
require('@alfalab/icons-glyph/DocumentPdfMIcon');
|
package/cssm/index.module.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
--color-light-graphic-positive: #2fc26e;
|
|
5
5
|
--color-light-text-accent: #ef3124;
|
|
6
6
|
--color-light-text-primary: #0b1f35;
|
|
7
|
-
--color-light-text-secondary:
|
|
7
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
8
8
|
}
|
|
9
9
|
:root {
|
|
10
10
|
|
|
@@ -93,12 +93,8 @@
|
|
|
93
93
|
.download {
|
|
94
94
|
height: 24px;
|
|
95
95
|
width: 24px;
|
|
96
|
-
margin-left: var(--gap-xs)
|
|
96
|
+
margin-left: var(--gap-xs);
|
|
97
97
|
}
|
|
98
|
-
.delete svg, .download svg {
|
|
99
|
-
width: 18px;
|
|
100
|
-
height: 18px;
|
|
101
|
-
}
|
|
102
98
|
.errorWrapper {
|
|
103
99
|
margin-top: var(--gap-s);
|
|
104
100
|
color: var(--color-light-text-accent)
|
package/esm/Component.js
CHANGED
|
@@ -3,10 +3,10 @@ import cn from 'classnames';
|
|
|
3
3
|
import { IconButton } from '@alfalab/core-components-icon-button/esm';
|
|
4
4
|
import { Link } from '@alfalab/core-components-link/esm';
|
|
5
5
|
import { Spinner } from '@alfalab/core-components-spinner/esm';
|
|
6
|
-
import {
|
|
6
|
+
import { CrossSIcon } from '@alfalab/icons-glyph/CrossSIcon';
|
|
7
7
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import { AlertCircleMIcon } from '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
9
|
-
import {
|
|
9
|
+
import { PointerDownSIcon } from '@alfalab/icons-glyph/PointerDownSIcon';
|
|
10
10
|
import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/DocumentDocMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/DocumentPdfMIcon';
|
|
@@ -15,7 +15,7 @@ import '@alfalab/icons-glyph/DocumentUnknownMIcon';
|
|
|
15
15
|
import '@alfalab/icons-glyph/DocumentImageMIcon';
|
|
16
16
|
import { fileIcon, humanFileSize } from './utils.js';
|
|
17
17
|
|
|
18
|
-
var styles = {"component":"file-upload-
|
|
18
|
+
var styles = {"component":"file-upload-item__component_honos","infoSection":"file-upload-item__infoSection_honos","info":"file-upload-item__info_honos","icon":"file-upload-item__icon_honos","errorIcon":"file-upload-item__errorIcon_honos","successIcon":"file-upload-item__successIcon_honos","name":"file-upload-item__name_honos","meta":"file-upload-item__meta_honos","size":"file-upload-item__size_honos","delete":"file-upload-item__delete_honos","download":"file-upload-item__download_honos","errorWrapper":"file-upload-item__errorWrapper_honos","restore":"file-upload-item__restore_honos","spinnerWrapper":"file-upload-item__spinnerWrapper_honos","spinner":"file-upload-item__spinner_honos","uploadPercent":"file-upload-item__uploadPercent_honos"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var FileUploadItem = function (_a) {
|
|
@@ -71,8 +71,8 @@ var FileUploadItem = function (_a) {
|
|
|
71
71
|
uploadDate && React.createElement("span", { key: uploadDate }, uploadDate),
|
|
72
72
|
size && (React.createElement("span", { key: size, className: styles.size }, humanFileSize(size)))))),
|
|
73
73
|
showRestore && (React.createElement(Link, { pseudo: true, className: styles.restore, onClick: handleRestore }, "\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C")),
|
|
74
|
-
showDownload && (React.createElement(IconButton, { size: 'xxs', icon:
|
|
75
|
-
showDelete && !showRestore && (React.createElement(IconButton, { size: 'xxs', icon:
|
|
74
|
+
showDownload && (React.createElement(IconButton, { size: 'xxs', icon: PointerDownSIcon, className: styles.download, "aria-label": '\u0441\u043A\u0430\u0447\u0430\u0442\u044C', href: downloadLink, onClick: handleDownload, disabled: disableButtons, download: download })),
|
|
75
|
+
showDelete && !showRestore && (React.createElement(IconButton, { size: 'xxs', icon: CrossSIcon, onClick: handleDelete, disabled: disableButtons, className: styles.delete, "aria-label": '\u0443\u0434\u0430\u043B\u0438\u0442\u044C' }))));
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
export { FileUploadItem };
|
package/esm/index.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: baex7 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-graphic-negative: #f15045;
|
|
5
5
|
--color-light-graphic-positive: #2fc26e;
|
|
6
6
|
--color-light-text-accent: #ef3124;
|
|
7
7
|
--color-light-text-primary: #0b1f35;
|
|
8
|
-
--color-light-text-secondary:
|
|
8
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
9
9
|
}
|
|
10
10
|
:root {
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--gap-s: 12px;
|
|
23
23
|
--gap-xl: 24px;
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__component_honos {
|
|
26
26
|
font-size: 13px;
|
|
27
27
|
line-height: 16px;
|
|
28
28
|
font-weight: 400;
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
box-shadow: 0 -1px 0 0 var(--color-light-border-primary) inset;
|
|
35
35
|
box-sizing: border-box
|
|
36
36
|
}
|
|
37
|
-
.file-upload-
|
|
37
|
+
.file-upload-item__component_honos svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__infoSection_honos {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
flex: 1;
|
|
@@ -45,90 +45,86 @@
|
|
|
45
45
|
margin-left: var(--gap-s);
|
|
46
46
|
min-width: 40%;
|
|
47
47
|
}
|
|
48
|
-
.file-upload-
|
|
48
|
+
.file-upload-item__info_honos {
|
|
49
49
|
display: flex;
|
|
50
50
|
flex-wrap: wrap;
|
|
51
51
|
flex: 1;
|
|
52
52
|
overflow: hidden;
|
|
53
53
|
}
|
|
54
|
-
.file-upload-
|
|
54
|
+
.file-upload-item__icon_honos {
|
|
55
55
|
display: block;
|
|
56
56
|
flex-shrink: 0;
|
|
57
57
|
color: var(--color-light-text-primary);
|
|
58
58
|
}
|
|
59
|
-
.file-upload-
|
|
59
|
+
.file-upload-item__errorIcon_honos {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
color: var(--color-light-graphic-negative);
|
|
62
62
|
}
|
|
63
|
-
.file-upload-
|
|
63
|
+
.file-upload-item__successIcon_honos {
|
|
64
64
|
flex-shrink: 0;
|
|
65
65
|
color: var(--color-light-graphic-positive);
|
|
66
66
|
}
|
|
67
|
-
.file-upload-
|
|
67
|
+
.file-upload-item__name_honos {
|
|
68
68
|
white-space: nowrap;
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
text-overflow: ellipsis;
|
|
71
71
|
color: var(--color-light-text-primary)
|
|
72
72
|
}
|
|
73
|
-
.file-upload-
|
|
73
|
+
.file-upload-item__name_honos a {
|
|
74
74
|
display: block;
|
|
75
75
|
margin-bottom: 1px;
|
|
76
76
|
}
|
|
77
|
-
.file-upload-
|
|
77
|
+
.file-upload-item__meta_honos {
|
|
78
78
|
display: flex;
|
|
79
79
|
white-space: nowrap;
|
|
80
80
|
margin-right: var(--gap-2xs);
|
|
81
81
|
margin-left: var(--gap-xl);
|
|
82
82
|
padding: var(--gap-2xs) 0
|
|
83
83
|
}
|
|
84
|
-
.file-upload-
|
|
84
|
+
.file-upload-item__meta_honos > * {
|
|
85
85
|
margin-right: var(--gap-s)
|
|
86
86
|
}
|
|
87
|
-
.file-upload-
|
|
87
|
+
.file-upload-item__meta_honos > *:last-child {
|
|
88
88
|
margin-right: 0;
|
|
89
89
|
}
|
|
90
|
-
.file-upload-
|
|
90
|
+
.file-upload-item__size_honos {
|
|
91
91
|
text-align: right;
|
|
92
92
|
}
|
|
93
|
-
.file-upload-
|
|
94
|
-
.file-upload-
|
|
93
|
+
.file-upload-item__delete_honos,
|
|
94
|
+
.file-upload-item__download_honos {
|
|
95
95
|
height: 24px;
|
|
96
96
|
width: 24px;
|
|
97
|
-
margin-left: var(--gap-xs)
|
|
97
|
+
margin-left: var(--gap-xs);
|
|
98
98
|
}
|
|
99
|
-
.file-upload-
|
|
100
|
-
width: 18px;
|
|
101
|
-
height: 18px;
|
|
102
|
-
}
|
|
103
|
-
.file-upload-item__errorWrapper_nxedx {
|
|
99
|
+
.file-upload-item__errorWrapper_honos {
|
|
104
100
|
margin-top: var(--gap-s);
|
|
105
101
|
color: var(--color-light-text-accent)
|
|
106
102
|
}
|
|
107
103
|
@media (--small-only) {
|
|
108
|
-
.file-upload-
|
|
104
|
+
.file-upload-item__errorWrapper_honos {
|
|
109
105
|
flex: 1 0 100%;
|
|
110
106
|
margin-top: var(--gap-3xs)
|
|
111
107
|
}
|
|
112
108
|
}
|
|
113
|
-
.file-upload-
|
|
109
|
+
.file-upload-item__restore_honos {
|
|
114
110
|
font-size: 14px;
|
|
115
111
|
line-height: 20px;
|
|
116
112
|
font-weight: 400;
|
|
117
113
|
|
|
118
114
|
margin-left: var(--gap-s);
|
|
119
115
|
}
|
|
120
|
-
.file-upload-
|
|
116
|
+
.file-upload-item__spinnerWrapper_honos {
|
|
121
117
|
display: flex;
|
|
122
118
|
justify-content: center;
|
|
123
119
|
align-items: center;
|
|
124
120
|
width: 24px;
|
|
125
121
|
height: 24px;
|
|
126
122
|
}
|
|
127
|
-
.file-upload-
|
|
123
|
+
.file-upload-item__spinner_honos {
|
|
128
124
|
width: 20px;
|
|
129
125
|
height: 20px;
|
|
130
126
|
}
|
|
131
|
-
.file-upload-
|
|
127
|
+
.file-upload-item__uploadPercent_honos {
|
|
132
128
|
margin-top: var(--gap-2xs);
|
|
133
129
|
margin-left: var(--gap-xl);
|
|
134
130
|
}
|
package/esm/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import 'classnames';
|
|
|
3
3
|
import '@alfalab/core-components-icon-button/esm';
|
|
4
4
|
import '@alfalab/core-components-link/esm';
|
|
5
5
|
import '@alfalab/core-components-spinner/esm';
|
|
6
|
-
import '@alfalab/icons-glyph/
|
|
6
|
+
import '@alfalab/icons-glyph/CrossSIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
9
|
-
import '@alfalab/icons-glyph/
|
|
9
|
+
import '@alfalab/icons-glyph/PointerDownSIcon';
|
|
10
10
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/DocumentDocMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/DocumentPdfMIcon';
|
package/index.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: baex7 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-graphic-negative: #f15045;
|
|
5
5
|
--color-light-graphic-positive: #2fc26e;
|
|
6
6
|
--color-light-text-accent: #ef3124;
|
|
7
7
|
--color-light-text-primary: #0b1f35;
|
|
8
|
-
--color-light-text-secondary:
|
|
8
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
9
9
|
}
|
|
10
10
|
:root {
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--gap-s: 12px;
|
|
23
23
|
--gap-xl: 24px;
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__component_honos {
|
|
26
26
|
font-size: 13px;
|
|
27
27
|
line-height: 16px;
|
|
28
28
|
font-weight: 400;
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
box-shadow: 0 -1px 0 0 var(--color-light-border-primary) inset;
|
|
35
35
|
box-sizing: border-box
|
|
36
36
|
}
|
|
37
|
-
.file-upload-
|
|
37
|
+
.file-upload-item__component_honos svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__infoSection_honos {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
flex: 1;
|
|
@@ -45,90 +45,86 @@
|
|
|
45
45
|
margin-left: var(--gap-s);
|
|
46
46
|
min-width: 40%;
|
|
47
47
|
}
|
|
48
|
-
.file-upload-
|
|
48
|
+
.file-upload-item__info_honos {
|
|
49
49
|
display: flex;
|
|
50
50
|
flex-wrap: wrap;
|
|
51
51
|
flex: 1;
|
|
52
52
|
overflow: hidden;
|
|
53
53
|
}
|
|
54
|
-
.file-upload-
|
|
54
|
+
.file-upload-item__icon_honos {
|
|
55
55
|
display: block;
|
|
56
56
|
flex-shrink: 0;
|
|
57
57
|
color: var(--color-light-text-primary);
|
|
58
58
|
}
|
|
59
|
-
.file-upload-
|
|
59
|
+
.file-upload-item__errorIcon_honos {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
color: var(--color-light-graphic-negative);
|
|
62
62
|
}
|
|
63
|
-
.file-upload-
|
|
63
|
+
.file-upload-item__successIcon_honos {
|
|
64
64
|
flex-shrink: 0;
|
|
65
65
|
color: var(--color-light-graphic-positive);
|
|
66
66
|
}
|
|
67
|
-
.file-upload-
|
|
67
|
+
.file-upload-item__name_honos {
|
|
68
68
|
white-space: nowrap;
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
text-overflow: ellipsis;
|
|
71
71
|
color: var(--color-light-text-primary)
|
|
72
72
|
}
|
|
73
|
-
.file-upload-
|
|
73
|
+
.file-upload-item__name_honos a {
|
|
74
74
|
display: block;
|
|
75
75
|
margin-bottom: 1px;
|
|
76
76
|
}
|
|
77
|
-
.file-upload-
|
|
77
|
+
.file-upload-item__meta_honos {
|
|
78
78
|
display: flex;
|
|
79
79
|
white-space: nowrap;
|
|
80
80
|
margin-right: var(--gap-2xs);
|
|
81
81
|
margin-left: var(--gap-xl);
|
|
82
82
|
padding: var(--gap-2xs) 0
|
|
83
83
|
}
|
|
84
|
-
.file-upload-
|
|
84
|
+
.file-upload-item__meta_honos > * {
|
|
85
85
|
margin-right: var(--gap-s)
|
|
86
86
|
}
|
|
87
|
-
.file-upload-
|
|
87
|
+
.file-upload-item__meta_honos > *:last-child {
|
|
88
88
|
margin-right: 0;
|
|
89
89
|
}
|
|
90
|
-
.file-upload-
|
|
90
|
+
.file-upload-item__size_honos {
|
|
91
91
|
text-align: right;
|
|
92
92
|
}
|
|
93
|
-
.file-upload-
|
|
94
|
-
.file-upload-
|
|
93
|
+
.file-upload-item__delete_honos,
|
|
94
|
+
.file-upload-item__download_honos {
|
|
95
95
|
height: 24px;
|
|
96
96
|
width: 24px;
|
|
97
|
-
margin-left: var(--gap-xs)
|
|
97
|
+
margin-left: var(--gap-xs);
|
|
98
98
|
}
|
|
99
|
-
.file-upload-
|
|
100
|
-
width: 18px;
|
|
101
|
-
height: 18px;
|
|
102
|
-
}
|
|
103
|
-
.file-upload-item__errorWrapper_nxedx {
|
|
99
|
+
.file-upload-item__errorWrapper_honos {
|
|
104
100
|
margin-top: var(--gap-s);
|
|
105
101
|
color: var(--color-light-text-accent)
|
|
106
102
|
}
|
|
107
103
|
@media (--small-only) {
|
|
108
|
-
.file-upload-
|
|
104
|
+
.file-upload-item__errorWrapper_honos {
|
|
109
105
|
flex: 1 0 100%;
|
|
110
106
|
margin-top: var(--gap-3xs)
|
|
111
107
|
}
|
|
112
108
|
}
|
|
113
|
-
.file-upload-
|
|
109
|
+
.file-upload-item__restore_honos {
|
|
114
110
|
font-size: 14px;
|
|
115
111
|
line-height: 20px;
|
|
116
112
|
font-weight: 400;
|
|
117
113
|
|
|
118
114
|
margin-left: var(--gap-s);
|
|
119
115
|
}
|
|
120
|
-
.file-upload-
|
|
116
|
+
.file-upload-item__spinnerWrapper_honos {
|
|
121
117
|
display: flex;
|
|
122
118
|
justify-content: center;
|
|
123
119
|
align-items: center;
|
|
124
120
|
width: 24px;
|
|
125
121
|
height: 24px;
|
|
126
122
|
}
|
|
127
|
-
.file-upload-
|
|
123
|
+
.file-upload-item__spinner_honos {
|
|
128
124
|
width: 20px;
|
|
129
125
|
height: 20px;
|
|
130
126
|
}
|
|
131
|
-
.file-upload-
|
|
127
|
+
.file-upload-item__uploadPercent_honos {
|
|
132
128
|
margin-top: var(--gap-2xs);
|
|
133
129
|
margin-left: var(--gap-xl);
|
|
134
130
|
}
|
package/index.js
CHANGED
|
@@ -7,10 +7,10 @@ require('classnames');
|
|
|
7
7
|
require('@alfalab/core-components-icon-button');
|
|
8
8
|
require('@alfalab/core-components-link');
|
|
9
9
|
require('@alfalab/core-components-spinner');
|
|
10
|
-
require('@alfalab/icons-glyph/
|
|
10
|
+
require('@alfalab/icons-glyph/CrossSIcon');
|
|
11
11
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
12
12
|
require('@alfalab/icons-glyph/AlertCircleMIcon');
|
|
13
|
-
require('@alfalab/icons-glyph/
|
|
13
|
+
require('@alfalab/icons-glyph/PointerDownSIcon');
|
|
14
14
|
require('@alfalab/icons-glyph/ClockMIcon');
|
|
15
15
|
require('@alfalab/icons-glyph/DocumentDocMIcon');
|
|
16
16
|
require('@alfalab/icons-glyph/DocumentPdfMIcon');
|
package/modern/Component.js
CHANGED
|
@@ -3,10 +3,10 @@ import cn from 'classnames';
|
|
|
3
3
|
import { IconButton } from '@alfalab/core-components-icon-button/modern';
|
|
4
4
|
import { Link } from '@alfalab/core-components-link/modern';
|
|
5
5
|
import { Spinner } from '@alfalab/core-components-spinner/modern';
|
|
6
|
-
import {
|
|
6
|
+
import { CrossSIcon } from '@alfalab/icons-glyph/CrossSIcon';
|
|
7
7
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import { AlertCircleMIcon } from '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
9
|
-
import {
|
|
9
|
+
import { PointerDownSIcon } from '@alfalab/icons-glyph/PointerDownSIcon';
|
|
10
10
|
import { ClockMIcon } from '@alfalab/icons-glyph/ClockMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/DocumentDocMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/DocumentPdfMIcon';
|
|
@@ -15,7 +15,7 @@ import '@alfalab/icons-glyph/DocumentUnknownMIcon';
|
|
|
15
15
|
import '@alfalab/icons-glyph/DocumentImageMIcon';
|
|
16
16
|
import { fileIcon, humanFileSize } from './utils.js';
|
|
17
17
|
|
|
18
|
-
var styles = {"component":"file-upload-
|
|
18
|
+
var styles = {"component":"file-upload-item__component_honos","infoSection":"file-upload-item__infoSection_honos","info":"file-upload-item__info_honos","icon":"file-upload-item__icon_honos","errorIcon":"file-upload-item__errorIcon_honos","successIcon":"file-upload-item__successIcon_honos","name":"file-upload-item__name_honos","meta":"file-upload-item__meta_honos","size":"file-upload-item__size_honos","delete":"file-upload-item__delete_honos","download":"file-upload-item__download_honos","errorWrapper":"file-upload-item__errorWrapper_honos","restore":"file-upload-item__restore_honos","spinnerWrapper":"file-upload-item__spinnerWrapper_honos","spinner":"file-upload-item__spinner_honos","uploadPercent":"file-upload-item__uploadPercent_honos"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
const FileUploadItem = ({ className, children, id = '0', name = '', size, icon: Icon = fileIcon(name), uploadDate, downloadLink, download, uploadStatus, uploadPercent = 0, error, showDelete, showRestore, onDelete, onDownload, onRestore, disableButtons, dataTestId, }) => {
|
|
@@ -70,8 +70,8 @@ const FileUploadItem = ({ className, children, id = '0', name = '', size, icon:
|
|
|
70
70
|
uploadDate && React.createElement("span", { key: uploadDate }, uploadDate),
|
|
71
71
|
size && (React.createElement("span", { key: size, className: styles.size }, humanFileSize(size)))))),
|
|
72
72
|
showRestore && (React.createElement(Link, { pseudo: true, className: styles.restore, onClick: handleRestore }, "\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C")),
|
|
73
|
-
showDownload && (React.createElement(IconButton, { size: 'xxs', icon:
|
|
74
|
-
showDelete && !showRestore && (React.createElement(IconButton, { size: 'xxs', icon:
|
|
73
|
+
showDownload && (React.createElement(IconButton, { size: 'xxs', icon: PointerDownSIcon, className: styles.download, "aria-label": '\u0441\u043A\u0430\u0447\u0430\u0442\u044C', href: downloadLink, onClick: handleDownload, disabled: disableButtons, download: download })),
|
|
74
|
+
showDelete && !showRestore && (React.createElement(IconButton, { size: 'xxs', icon: CrossSIcon, onClick: handleDelete, disabled: disableButtons, className: styles.delete, "aria-label": '\u0443\u0434\u0430\u043B\u0438\u0442\u044C' }))));
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export { FileUploadItem };
|
package/modern/index.css
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: baex7 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-graphic-negative: #f15045;
|
|
5
5
|
--color-light-graphic-positive: #2fc26e;
|
|
6
6
|
--color-light-text-accent: #ef3124;
|
|
7
7
|
--color-light-text-primary: #0b1f35;
|
|
8
|
-
--color-light-text-secondary:
|
|
8
|
+
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
9
9
|
}
|
|
10
10
|
:root {
|
|
11
11
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--gap-s: 12px;
|
|
23
23
|
--gap-xl: 24px;
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__component_honos {
|
|
26
26
|
font-size: 13px;
|
|
27
27
|
line-height: 16px;
|
|
28
28
|
font-weight: 400;
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
box-shadow: 0 -1px 0 0 var(--color-light-border-primary) inset;
|
|
35
35
|
box-sizing: border-box
|
|
36
36
|
}
|
|
37
|
-
.file-upload-
|
|
37
|
+
.file-upload-item__component_honos svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__infoSection_honos {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
flex: 1;
|
|
@@ -45,90 +45,86 @@
|
|
|
45
45
|
margin-left: var(--gap-s);
|
|
46
46
|
min-width: 40%;
|
|
47
47
|
}
|
|
48
|
-
.file-upload-
|
|
48
|
+
.file-upload-item__info_honos {
|
|
49
49
|
display: flex;
|
|
50
50
|
flex-wrap: wrap;
|
|
51
51
|
flex: 1;
|
|
52
52
|
overflow: hidden;
|
|
53
53
|
}
|
|
54
|
-
.file-upload-
|
|
54
|
+
.file-upload-item__icon_honos {
|
|
55
55
|
display: block;
|
|
56
56
|
flex-shrink: 0;
|
|
57
57
|
color: var(--color-light-text-primary);
|
|
58
58
|
}
|
|
59
|
-
.file-upload-
|
|
59
|
+
.file-upload-item__errorIcon_honos {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
color: var(--color-light-graphic-negative);
|
|
62
62
|
}
|
|
63
|
-
.file-upload-
|
|
63
|
+
.file-upload-item__successIcon_honos {
|
|
64
64
|
flex-shrink: 0;
|
|
65
65
|
color: var(--color-light-graphic-positive);
|
|
66
66
|
}
|
|
67
|
-
.file-upload-
|
|
67
|
+
.file-upload-item__name_honos {
|
|
68
68
|
white-space: nowrap;
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
text-overflow: ellipsis;
|
|
71
71
|
color: var(--color-light-text-primary)
|
|
72
72
|
}
|
|
73
|
-
.file-upload-
|
|
73
|
+
.file-upload-item__name_honos a {
|
|
74
74
|
display: block;
|
|
75
75
|
margin-bottom: 1px;
|
|
76
76
|
}
|
|
77
|
-
.file-upload-
|
|
77
|
+
.file-upload-item__meta_honos {
|
|
78
78
|
display: flex;
|
|
79
79
|
white-space: nowrap;
|
|
80
80
|
margin-right: var(--gap-2xs);
|
|
81
81
|
margin-left: var(--gap-xl);
|
|
82
82
|
padding: var(--gap-2xs) 0
|
|
83
83
|
}
|
|
84
|
-
.file-upload-
|
|
84
|
+
.file-upload-item__meta_honos > * {
|
|
85
85
|
margin-right: var(--gap-s)
|
|
86
86
|
}
|
|
87
|
-
.file-upload-
|
|
87
|
+
.file-upload-item__meta_honos > *:last-child {
|
|
88
88
|
margin-right: 0;
|
|
89
89
|
}
|
|
90
|
-
.file-upload-
|
|
90
|
+
.file-upload-item__size_honos {
|
|
91
91
|
text-align: right;
|
|
92
92
|
}
|
|
93
|
-
.file-upload-
|
|
94
|
-
.file-upload-
|
|
93
|
+
.file-upload-item__delete_honos,
|
|
94
|
+
.file-upload-item__download_honos {
|
|
95
95
|
height: 24px;
|
|
96
96
|
width: 24px;
|
|
97
|
-
margin-left: var(--gap-xs)
|
|
97
|
+
margin-left: var(--gap-xs);
|
|
98
98
|
}
|
|
99
|
-
.file-upload-
|
|
100
|
-
width: 18px;
|
|
101
|
-
height: 18px;
|
|
102
|
-
}
|
|
103
|
-
.file-upload-item__errorWrapper_nxedx {
|
|
99
|
+
.file-upload-item__errorWrapper_honos {
|
|
104
100
|
margin-top: var(--gap-s);
|
|
105
101
|
color: var(--color-light-text-accent)
|
|
106
102
|
}
|
|
107
103
|
@media (--small-only) {
|
|
108
|
-
.file-upload-
|
|
104
|
+
.file-upload-item__errorWrapper_honos {
|
|
109
105
|
flex: 1 0 100%;
|
|
110
106
|
margin-top: var(--gap-3xs)
|
|
111
107
|
}
|
|
112
108
|
}
|
|
113
|
-
.file-upload-
|
|
109
|
+
.file-upload-item__restore_honos {
|
|
114
110
|
font-size: 14px;
|
|
115
111
|
line-height: 20px;
|
|
116
112
|
font-weight: 400;
|
|
117
113
|
|
|
118
114
|
margin-left: var(--gap-s);
|
|
119
115
|
}
|
|
120
|
-
.file-upload-
|
|
116
|
+
.file-upload-item__spinnerWrapper_honos {
|
|
121
117
|
display: flex;
|
|
122
118
|
justify-content: center;
|
|
123
119
|
align-items: center;
|
|
124
120
|
width: 24px;
|
|
125
121
|
height: 24px;
|
|
126
122
|
}
|
|
127
|
-
.file-upload-
|
|
123
|
+
.file-upload-item__spinner_honos {
|
|
128
124
|
width: 20px;
|
|
129
125
|
height: 20px;
|
|
130
126
|
}
|
|
131
|
-
.file-upload-
|
|
127
|
+
.file-upload-item__uploadPercent_honos {
|
|
132
128
|
margin-top: var(--gap-2xs);
|
|
133
129
|
margin-left: var(--gap-xl);
|
|
134
130
|
}
|
package/modern/index.js
CHANGED
|
@@ -3,10 +3,10 @@ import 'classnames';
|
|
|
3
3
|
import '@alfalab/core-components-icon-button/modern';
|
|
4
4
|
import '@alfalab/core-components-link/modern';
|
|
5
5
|
import '@alfalab/core-components-spinner/modern';
|
|
6
|
-
import '@alfalab/icons-glyph/
|
|
6
|
+
import '@alfalab/icons-glyph/CrossSIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
9
|
-
import '@alfalab/icons-glyph/
|
|
9
|
+
import '@alfalab/icons-glyph/PointerDownSIcon';
|
|
10
10
|
import '@alfalab/icons-glyph/ClockMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/DocumentDocMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/DocumentPdfMIcon';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-file-upload-item",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-icon-button": "^5.0.
|
|
17
|
+
"@alfalab/core-components-icon-button": "^5.0.5",
|
|
18
18
|
"@alfalab/core-components-link": "^5.0.1",
|
|
19
19
|
"@alfalab/core-components-spinner": "^3.0.2",
|
|
20
20
|
"@alfalab/icons-glyph": "^2.71.0"
|