@alfalab/core-components-file-upload-item 3.8.0 → 3.9.0
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 +39 -0
- package/{dist/Component.d.ts → Component.d.ts} +0 -0
- package/{dist/Component.js → Component.js} +1 -1
- package/{dist/cssm → cssm}/Component.d.ts +0 -0
- package/{dist/cssm → cssm}/Component.js +3 -3
- package/{dist/cssm → cssm}/index.d.ts +0 -0
- package/{dist/cssm → cssm}/index.js +3 -3
- package/{dist/cssm → cssm}/index.module.css +4 -0
- package/{dist/cssm → cssm}/utils.d.ts +0 -0
- package/{dist/cssm → cssm}/utils.js +0 -0
- package/{dist/esm → esm}/Component.d.ts +0 -0
- package/{dist/esm → esm}/Component.js +4 -4
- package/{dist/modern → esm}/index.css +26 -22
- package/{dist/esm → esm}/index.d.ts +0 -0
- package/{dist/esm → esm}/index.js +3 -3
- package/{dist/esm → esm}/utils.d.ts +0 -0
- package/{dist/esm → esm}/utils.js +0 -0
- package/{dist/index.css → index.css} +26 -22
- package/{dist/index.d.ts → index.d.ts} +0 -0
- package/{dist/index.js → index.js} +0 -0
- package/{dist/modern → modern}/Component.d.ts +0 -0
- package/{dist/modern → modern}/Component.js +4 -4
- package/{dist/esm → modern}/index.css +26 -22
- package/{dist/modern → modern}/index.d.ts +0 -0
- package/{dist/modern → modern}/index.js +3 -3
- package/{dist/modern → modern}/utils.d.ts +0 -0
- package/{dist/modern → modern}/utils.js +0 -0
- package/package.json +10 -13
- /package/{dist/send-stats.js → send-stats.js} +0 -0
- /package/{dist/utils.d.ts → utils.d.ts} +0 -0
- /package/{dist/utils.js → utils.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.9.0](https://github.com/core-ds/core-components/compare/@alfalab/core-components-file-upload-item@3.8.3...@alfalab/core-components-file-upload-item@3.9.0) (2022-08-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* react 18 support ([#159](https://github.com/core-ds/core-components/issues/159)) ([2e6693c](https://github.com/core-ds/core-components/commit/2e6693c62f534e333aadb7d3fff4ffd78ac84c63))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.8.3](https://github.com/core-ds/core-components/compare/@alfalab/core-components-file-upload-item@3.8.2...@alfalab/core-components-file-upload-item@3.8.3) (2022-07-18)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @alfalab/core-components-file-upload-item
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [3.8.2](https://github.com/core-ds/core-components/compare/@alfalab/core-components-file-upload-item@3.8.1...@alfalab/core-components-file-upload-item@3.8.2) (2022-07-15)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* bump packages version ([#153](https://github.com/core-ds/core-components/issues/153)) ([fd3e082](https://github.com/core-ds/core-components/commit/fd3e08205672129cdce04e1000c673f2cd9c10da))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [3.8.1](https://github.com/core-ds/core-components/compare/@alfalab/core-components-file-upload-item@3.8.0...@alfalab/core-components-file-upload-item@3.8.1) (2022-07-14)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @alfalab/core-components-file-upload-item
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
# [3.8.0](https://github.com/core-ds/core-components/compare/@alfalab/core-components-file-upload-item@3.7.3...@alfalab/core-components-file-upload-item@3.8.0) (2022-07-11)
|
|
7
45
|
|
|
8
46
|
|
|
@@ -371,4 +409,5 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
371
409
|
|
|
372
410
|
### Features
|
|
373
411
|
|
|
412
|
+
|
|
374
413
|
* **file-upload-item:** add component ([#571](https://github.com/core-ds/core-components/issues/571)) ([e627350](https://github.com/core-ds/core-components/commit/e627350b3eabfb36aaa67c17411a9b98b551867d))
|
|
File without changes
|
|
@@ -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_2ctun","infoSection":"file-upload-item__infoSection_2ctun","info":"file-upload-item__info_2ctun","icon":"file-upload-item__icon_2ctun","errorIcon":"file-upload-item__errorIcon_2ctun","successIcon":"file-upload-item__successIcon_2ctun","name":"file-upload-item__name_2ctun","meta":"file-upload-item__meta_2ctun","size":"file-upload-item__size_2ctun","delete":"file-upload-item__delete_2ctun","download":"file-upload-item__download_2ctun","errorWrapper":"file-upload-item__errorWrapper_2ctun","restore":"file-upload-item__restore_2ctun","spinnerWrapper":"file-upload-item__spinnerWrapper_2ctun","spinner":"file-upload-item__spinner_2ctun","uploadPercent":"file-upload-item__uploadPercent_2ctun"};
|
|
28
28
|
require('./index.css')
|
|
29
29
|
|
|
30
30
|
var FileUploadItem = function (_a) {
|
|
File without changes
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var cn = require('classnames');
|
|
7
|
-
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/
|
|
8
|
-
var coreComponentsLink = require('@alfalab/core-components-link/
|
|
9
|
-
var coreComponentsSpinner = require('@alfalab/core-components-spinner/
|
|
7
|
+
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/cssm');
|
|
8
|
+
var coreComponentsLink = require('@alfalab/core-components-link/cssm');
|
|
9
|
+
var coreComponentsSpinner = require('@alfalab/core-components-spinner/cssm');
|
|
10
10
|
var CrossMIcon = require('@alfalab/icons-glyph/CrossMIcon');
|
|
11
11
|
var CheckmarkCircleMIcon = require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
12
12
|
var AlertCircleMIcon = require('@alfalab/icons-glyph/AlertCircleMIcon');
|
|
File without changes
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('react');
|
|
6
6
|
require('classnames');
|
|
7
|
-
require('@alfalab/core-components-icon-button/
|
|
8
|
-
require('@alfalab/core-components-link/
|
|
9
|
-
require('@alfalab/core-components-spinner/
|
|
7
|
+
require('@alfalab/core-components-icon-button/cssm');
|
|
8
|
+
require('@alfalab/core-components-link/cssm');
|
|
9
|
+
require('@alfalab/core-components-spinner/cssm');
|
|
10
10
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
11
11
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
12
12
|
require('@alfalab/icons-glyph/AlertCircleMIcon');
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { IconButton } from '@alfalab/core-components-icon-button/
|
|
4
|
-
import { Link } from '@alfalab/core-components-link/
|
|
5
|
-
import { Spinner } from '@alfalab/core-components-spinner/
|
|
3
|
+
import { IconButton } from '@alfalab/core-components-icon-button/esm';
|
|
4
|
+
import { Link } from '@alfalab/core-components-link/esm';
|
|
5
|
+
import { Spinner } from '@alfalab/core-components-spinner/esm';
|
|
6
6
|
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
7
7
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import { AlertCircleMIcon } from '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
@@ -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_2ctun","infoSection":"file-upload-item__infoSection_2ctun","info":"file-upload-item__info_2ctun","icon":"file-upload-item__icon_2ctun","errorIcon":"file-upload-item__errorIcon_2ctun","successIcon":"file-upload-item__successIcon_2ctun","name":"file-upload-item__name_2ctun","meta":"file-upload-item__meta_2ctun","size":"file-upload-item__size_2ctun","delete":"file-upload-item__delete_2ctun","download":"file-upload-item__download_2ctun","errorWrapper":"file-upload-item__errorWrapper_2ctun","restore":"file-upload-item__restore_2ctun","spinnerWrapper":"file-upload-item__spinnerWrapper_2ctun","spinner":"file-upload-item__spinner_2ctun","uploadPercent":"file-upload-item__uploadPercent_2ctun"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var FileUploadItem = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vy0x */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-graphic-negative: #f15045;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--gap-s: 12px;
|
|
23
23
|
--gap-xl: 24px;
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__component_2ctun {
|
|
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_2ctun svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__infoSection_2ctun {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
flex: 1;
|
|
@@ -45,86 +45,90 @@
|
|
|
45
45
|
margin-left: var(--gap-s);
|
|
46
46
|
min-width: 40%;
|
|
47
47
|
}
|
|
48
|
-
.file-upload-
|
|
48
|
+
.file-upload-item__info_2ctun {
|
|
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_2ctun {
|
|
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_2ctun {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
color: var(--color-light-graphic-negative);
|
|
62
62
|
}
|
|
63
|
-
.file-upload-
|
|
63
|
+
.file-upload-item__successIcon_2ctun {
|
|
64
64
|
flex-shrink: 0;
|
|
65
65
|
color: var(--color-light-graphic-positive);
|
|
66
66
|
}
|
|
67
|
-
.file-upload-
|
|
67
|
+
.file-upload-item__name_2ctun {
|
|
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_2ctun a {
|
|
74
|
+
display: block;
|
|
75
|
+
margin-bottom: 1px;
|
|
76
|
+
}
|
|
77
|
+
.file-upload-item__meta_2ctun {
|
|
74
78
|
display: flex;
|
|
75
79
|
white-space: nowrap;
|
|
76
80
|
margin-right: var(--gap-2xs);
|
|
77
81
|
margin-left: var(--gap-xl);
|
|
78
82
|
padding: var(--gap-2xs) 0
|
|
79
83
|
}
|
|
80
|
-
.file-upload-
|
|
84
|
+
.file-upload-item__meta_2ctun > * {
|
|
81
85
|
margin-right: var(--gap-s)
|
|
82
86
|
}
|
|
83
|
-
.file-upload-
|
|
87
|
+
.file-upload-item__meta_2ctun > *:last-child {
|
|
84
88
|
margin-right: 0;
|
|
85
89
|
}
|
|
86
|
-
.file-upload-
|
|
90
|
+
.file-upload-item__size_2ctun {
|
|
87
91
|
text-align: right;
|
|
88
92
|
}
|
|
89
|
-
.file-upload-
|
|
90
|
-
.file-upload-
|
|
93
|
+
.file-upload-item__delete_2ctun,
|
|
94
|
+
.file-upload-item__download_2ctun {
|
|
91
95
|
height: 24px;
|
|
92
96
|
width: 24px;
|
|
93
97
|
margin-left: var(--gap-xs)
|
|
94
98
|
}
|
|
95
|
-
.file-upload-
|
|
99
|
+
.file-upload-item__delete_2ctun svg, .file-upload-item__download_2ctun svg {
|
|
96
100
|
width: 18px;
|
|
97
101
|
height: 18px;
|
|
98
102
|
}
|
|
99
|
-
.file-upload-
|
|
103
|
+
.file-upload-item__errorWrapper_2ctun {
|
|
100
104
|
margin-top: var(--gap-s);
|
|
101
105
|
color: var(--color-light-text-accent)
|
|
102
106
|
}
|
|
103
107
|
@media (--small-only) {
|
|
104
|
-
.file-upload-
|
|
108
|
+
.file-upload-item__errorWrapper_2ctun {
|
|
105
109
|
flex: 1 0 100%;
|
|
106
110
|
margin-top: var(--gap-3xs)
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
|
-
.file-upload-
|
|
113
|
+
.file-upload-item__restore_2ctun {
|
|
110
114
|
font-size: 14px;
|
|
111
115
|
line-height: 20px;
|
|
112
116
|
font-weight: 400;
|
|
113
117
|
|
|
114
118
|
margin-left: var(--gap-s);
|
|
115
119
|
}
|
|
116
|
-
.file-upload-
|
|
120
|
+
.file-upload-item__spinnerWrapper_2ctun {
|
|
117
121
|
display: flex;
|
|
118
122
|
justify-content: center;
|
|
119
123
|
align-items: center;
|
|
120
124
|
width: 24px;
|
|
121
125
|
height: 24px;
|
|
122
126
|
}
|
|
123
|
-
.file-upload-
|
|
127
|
+
.file-upload-item__spinner_2ctun {
|
|
124
128
|
width: 20px;
|
|
125
129
|
height: 20px;
|
|
126
130
|
}
|
|
127
|
-
.file-upload-
|
|
131
|
+
.file-upload-item__uploadPercent_2ctun {
|
|
128
132
|
margin-top: var(--gap-2xs);
|
|
129
133
|
margin-left: var(--gap-xl);
|
|
130
134
|
}
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/core-components-icon-button/
|
|
4
|
-
import '@alfalab/core-components-link/
|
|
5
|
-
import '@alfalab/core-components-spinner/
|
|
3
|
+
import '@alfalab/core-components-icon-button/esm';
|
|
4
|
+
import '@alfalab/core-components-link/esm';
|
|
5
|
+
import '@alfalab/core-components-spinner/esm';
|
|
6
6
|
import '@alfalab/icons-glyph/CrossMIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vy0x */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-graphic-negative: #f15045;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--gap-s: 12px;
|
|
23
23
|
--gap-xl: 24px;
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__component_2ctun {
|
|
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_2ctun svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__infoSection_2ctun {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
flex: 1;
|
|
@@ -45,86 +45,90 @@
|
|
|
45
45
|
margin-left: var(--gap-s);
|
|
46
46
|
min-width: 40%;
|
|
47
47
|
}
|
|
48
|
-
.file-upload-
|
|
48
|
+
.file-upload-item__info_2ctun {
|
|
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_2ctun {
|
|
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_2ctun {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
color: var(--color-light-graphic-negative);
|
|
62
62
|
}
|
|
63
|
-
.file-upload-
|
|
63
|
+
.file-upload-item__successIcon_2ctun {
|
|
64
64
|
flex-shrink: 0;
|
|
65
65
|
color: var(--color-light-graphic-positive);
|
|
66
66
|
}
|
|
67
|
-
.file-upload-
|
|
67
|
+
.file-upload-item__name_2ctun {
|
|
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_2ctun a {
|
|
74
|
+
display: block;
|
|
75
|
+
margin-bottom: 1px;
|
|
76
|
+
}
|
|
77
|
+
.file-upload-item__meta_2ctun {
|
|
74
78
|
display: flex;
|
|
75
79
|
white-space: nowrap;
|
|
76
80
|
margin-right: var(--gap-2xs);
|
|
77
81
|
margin-left: var(--gap-xl);
|
|
78
82
|
padding: var(--gap-2xs) 0
|
|
79
83
|
}
|
|
80
|
-
.file-upload-
|
|
84
|
+
.file-upload-item__meta_2ctun > * {
|
|
81
85
|
margin-right: var(--gap-s)
|
|
82
86
|
}
|
|
83
|
-
.file-upload-
|
|
87
|
+
.file-upload-item__meta_2ctun > *:last-child {
|
|
84
88
|
margin-right: 0;
|
|
85
89
|
}
|
|
86
|
-
.file-upload-
|
|
90
|
+
.file-upload-item__size_2ctun {
|
|
87
91
|
text-align: right;
|
|
88
92
|
}
|
|
89
|
-
.file-upload-
|
|
90
|
-
.file-upload-
|
|
93
|
+
.file-upload-item__delete_2ctun,
|
|
94
|
+
.file-upload-item__download_2ctun {
|
|
91
95
|
height: 24px;
|
|
92
96
|
width: 24px;
|
|
93
97
|
margin-left: var(--gap-xs)
|
|
94
98
|
}
|
|
95
|
-
.file-upload-
|
|
99
|
+
.file-upload-item__delete_2ctun svg, .file-upload-item__download_2ctun svg {
|
|
96
100
|
width: 18px;
|
|
97
101
|
height: 18px;
|
|
98
102
|
}
|
|
99
|
-
.file-upload-
|
|
103
|
+
.file-upload-item__errorWrapper_2ctun {
|
|
100
104
|
margin-top: var(--gap-s);
|
|
101
105
|
color: var(--color-light-text-accent)
|
|
102
106
|
}
|
|
103
107
|
@media (--small-only) {
|
|
104
|
-
.file-upload-
|
|
108
|
+
.file-upload-item__errorWrapper_2ctun {
|
|
105
109
|
flex: 1 0 100%;
|
|
106
110
|
margin-top: var(--gap-3xs)
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
|
-
.file-upload-
|
|
113
|
+
.file-upload-item__restore_2ctun {
|
|
110
114
|
font-size: 14px;
|
|
111
115
|
line-height: 20px;
|
|
112
116
|
font-weight: 400;
|
|
113
117
|
|
|
114
118
|
margin-left: var(--gap-s);
|
|
115
119
|
}
|
|
116
|
-
.file-upload-
|
|
120
|
+
.file-upload-item__spinnerWrapper_2ctun {
|
|
117
121
|
display: flex;
|
|
118
122
|
justify-content: center;
|
|
119
123
|
align-items: center;
|
|
120
124
|
width: 24px;
|
|
121
125
|
height: 24px;
|
|
122
126
|
}
|
|
123
|
-
.file-upload-
|
|
127
|
+
.file-upload-item__spinner_2ctun {
|
|
124
128
|
width: 20px;
|
|
125
129
|
height: 20px;
|
|
126
130
|
}
|
|
127
|
-
.file-upload-
|
|
131
|
+
.file-upload-item__uploadPercent_2ctun {
|
|
128
132
|
margin-top: var(--gap-2xs);
|
|
129
133
|
margin-left: var(--gap-xl);
|
|
130
134
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
-
import { IconButton } from '@alfalab/core-components-icon-button/
|
|
4
|
-
import { Link } from '@alfalab/core-components-link/
|
|
5
|
-
import { Spinner } from '@alfalab/core-components-spinner/
|
|
3
|
+
import { IconButton } from '@alfalab/core-components-icon-button/modern';
|
|
4
|
+
import { Link } from '@alfalab/core-components-link/modern';
|
|
5
|
+
import { Spinner } from '@alfalab/core-components-spinner/modern';
|
|
6
6
|
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
7
7
|
import { CheckmarkCircleMIcon } from '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import { AlertCircleMIcon } from '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
@@ -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_2ctun","infoSection":"file-upload-item__infoSection_2ctun","info":"file-upload-item__info_2ctun","icon":"file-upload-item__icon_2ctun","errorIcon":"file-upload-item__errorIcon_2ctun","successIcon":"file-upload-item__successIcon_2ctun","name":"file-upload-item__name_2ctun","meta":"file-upload-item__meta_2ctun","size":"file-upload-item__size_2ctun","delete":"file-upload-item__delete_2ctun","download":"file-upload-item__download_2ctun","errorWrapper":"file-upload-item__errorWrapper_2ctun","restore":"file-upload-item__restore_2ctun","spinnerWrapper":"file-upload-item__spinnerWrapper_2ctun","spinner":"file-upload-item__spinner_2ctun","uploadPercent":"file-upload-item__uploadPercent_2ctun"};
|
|
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, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1vy0x */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-graphic-negative: #f15045;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
--gap-s: 12px;
|
|
23
23
|
--gap-xl: 24px;
|
|
24
24
|
}
|
|
25
|
-
.file-upload-
|
|
25
|
+
.file-upload-item__component_2ctun {
|
|
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_2ctun svg {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
.file-upload-
|
|
40
|
+
.file-upload-item__infoSection_2ctun {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
flex: 1;
|
|
@@ -45,86 +45,90 @@
|
|
|
45
45
|
margin-left: var(--gap-s);
|
|
46
46
|
min-width: 40%;
|
|
47
47
|
}
|
|
48
|
-
.file-upload-
|
|
48
|
+
.file-upload-item__info_2ctun {
|
|
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_2ctun {
|
|
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_2ctun {
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
color: var(--color-light-graphic-negative);
|
|
62
62
|
}
|
|
63
|
-
.file-upload-
|
|
63
|
+
.file-upload-item__successIcon_2ctun {
|
|
64
64
|
flex-shrink: 0;
|
|
65
65
|
color: var(--color-light-graphic-positive);
|
|
66
66
|
}
|
|
67
|
-
.file-upload-
|
|
67
|
+
.file-upload-item__name_2ctun {
|
|
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_2ctun a {
|
|
74
|
+
display: block;
|
|
75
|
+
margin-bottom: 1px;
|
|
76
|
+
}
|
|
77
|
+
.file-upload-item__meta_2ctun {
|
|
74
78
|
display: flex;
|
|
75
79
|
white-space: nowrap;
|
|
76
80
|
margin-right: var(--gap-2xs);
|
|
77
81
|
margin-left: var(--gap-xl);
|
|
78
82
|
padding: var(--gap-2xs) 0
|
|
79
83
|
}
|
|
80
|
-
.file-upload-
|
|
84
|
+
.file-upload-item__meta_2ctun > * {
|
|
81
85
|
margin-right: var(--gap-s)
|
|
82
86
|
}
|
|
83
|
-
.file-upload-
|
|
87
|
+
.file-upload-item__meta_2ctun > *:last-child {
|
|
84
88
|
margin-right: 0;
|
|
85
89
|
}
|
|
86
|
-
.file-upload-
|
|
90
|
+
.file-upload-item__size_2ctun {
|
|
87
91
|
text-align: right;
|
|
88
92
|
}
|
|
89
|
-
.file-upload-
|
|
90
|
-
.file-upload-
|
|
93
|
+
.file-upload-item__delete_2ctun,
|
|
94
|
+
.file-upload-item__download_2ctun {
|
|
91
95
|
height: 24px;
|
|
92
96
|
width: 24px;
|
|
93
97
|
margin-left: var(--gap-xs)
|
|
94
98
|
}
|
|
95
|
-
.file-upload-
|
|
99
|
+
.file-upload-item__delete_2ctun svg, .file-upload-item__download_2ctun svg {
|
|
96
100
|
width: 18px;
|
|
97
101
|
height: 18px;
|
|
98
102
|
}
|
|
99
|
-
.file-upload-
|
|
103
|
+
.file-upload-item__errorWrapper_2ctun {
|
|
100
104
|
margin-top: var(--gap-s);
|
|
101
105
|
color: var(--color-light-text-accent)
|
|
102
106
|
}
|
|
103
107
|
@media (--small-only) {
|
|
104
|
-
.file-upload-
|
|
108
|
+
.file-upload-item__errorWrapper_2ctun {
|
|
105
109
|
flex: 1 0 100%;
|
|
106
110
|
margin-top: var(--gap-3xs)
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
|
-
.file-upload-
|
|
113
|
+
.file-upload-item__restore_2ctun {
|
|
110
114
|
font-size: 14px;
|
|
111
115
|
line-height: 20px;
|
|
112
116
|
font-weight: 400;
|
|
113
117
|
|
|
114
118
|
margin-left: var(--gap-s);
|
|
115
119
|
}
|
|
116
|
-
.file-upload-
|
|
120
|
+
.file-upload-item__spinnerWrapper_2ctun {
|
|
117
121
|
display: flex;
|
|
118
122
|
justify-content: center;
|
|
119
123
|
align-items: center;
|
|
120
124
|
width: 24px;
|
|
121
125
|
height: 24px;
|
|
122
126
|
}
|
|
123
|
-
.file-upload-
|
|
127
|
+
.file-upload-item__spinner_2ctun {
|
|
124
128
|
width: 20px;
|
|
125
129
|
height: 20px;
|
|
126
130
|
}
|
|
127
|
-
.file-upload-
|
|
131
|
+
.file-upload-item__uploadPercent_2ctun {
|
|
128
132
|
margin-top: var(--gap-2xs);
|
|
129
133
|
margin-left: var(--gap-xl);
|
|
130
134
|
}
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
-
import '@alfalab/core-components-icon-button/
|
|
4
|
-
import '@alfalab/core-components-link/
|
|
5
|
-
import '@alfalab/core-components-spinner/
|
|
3
|
+
import '@alfalab/core-components-icon-button/modern';
|
|
4
|
+
import '@alfalab/core-components-link/modern';
|
|
5
|
+
import '@alfalab/core-components-spinner/modern';
|
|
6
6
|
import '@alfalab/icons-glyph/CrossMIcon';
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/AlertCircleMIcon';
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-file-upload-item",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "
|
|
8
|
-
"module": "./
|
|
9
|
-
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
],
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"module": "./esm/index.js",
|
|
12
9
|
"publishConfig": {
|
|
13
|
-
"access": "public"
|
|
10
|
+
"access": "public",
|
|
11
|
+
"directory": "dist"
|
|
14
12
|
},
|
|
15
13
|
"peerDependencies": {
|
|
16
|
-
"react": "^16.9.0 || ^17.0.1"
|
|
14
|
+
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
17
15
|
},
|
|
18
16
|
"dependencies": {
|
|
19
|
-
"@alfalab/core-components-icon-button": "^4.
|
|
20
|
-
"@alfalab/core-components-link": "^3.
|
|
21
|
-
"@alfalab/core-components-spinner": "^2.
|
|
17
|
+
"@alfalab/core-components-icon-button": "^4.3.0",
|
|
18
|
+
"@alfalab/core-components-link": "^3.4.0",
|
|
19
|
+
"@alfalab/core-components-spinner": "^2.3.0",
|
|
22
20
|
"@alfalab/icons-glyph": "^2.16.0"
|
|
23
|
-
}
|
|
24
|
-
"gitHead": "62c863f937c2b78ab35b8ca55863b11a0ebdd631"
|
|
21
|
+
}
|
|
25
22
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|