@hh.ru/magritte-ui-upload 4.0.0 → 4.0.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/FileName.js +1 -1
- package/FileView.js +1 -1
- package/FileViewWithPreview.js +1 -1
- package/MultiUpload.js +1 -1
- package/SingleUpload.js +1 -1
- package/Upload.js +1 -1
- package/index.css +33 -33
- package/index.js +1 -1
- package/package.json +2 -2
- package/upload-0O4yKnsN.js +5 -0
- package/upload-0O4yKnsN.js.map +1 -0
- package/upload-CvvnKTGS.js +0 -5
- package/upload-CvvnKTGS.js.map +0 -1
package/FileName.js
CHANGED
|
@@ -2,7 +2,7 @@ import './index.css';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
|
|
5
|
-
var styles = {"file-name-body":"magritte-file-name-body___PTTMc_4-0-
|
|
5
|
+
var styles = {"file-name-body":"magritte-file-name-body___PTTMc_4-0-1","fileNameBody":"magritte-file-name-body___PTTMc_4-0-1","file-name-body_medium":"magritte-file-name-body_medium___sfmmq_4-0-1","fileNameBodyMedium":"magritte-file-name-body_medium___sfmmq_4-0-1","file-name":"magritte-file-name___ZSL2g_4-0-1","fileName":"magritte-file-name___ZSL2g_4-0-1"};
|
|
6
6
|
|
|
7
7
|
const parse = (file) => {
|
|
8
8
|
const name = file.name;
|
package/FileView.js
CHANGED
|
@@ -9,7 +9,7 @@ import { FileName } from './FileName.js';
|
|
|
9
9
|
import { getUploadIcon, bytes2mb } from './utils.js';
|
|
10
10
|
import 'classnames';
|
|
11
11
|
|
|
12
|
-
var styles = {"file-info-body":"magritte-file-info-body___HmfXd_4-0-
|
|
12
|
+
var styles = {"file-info-body":"magritte-file-info-body___HmfXd_4-0-1","fileInfoBody":"magritte-file-info-body___HmfXd_4-0-1","file-info-and-controls":"magritte-file-info-and-controls___61iyY_4-0-1","fileInfoAndControls":"magritte-file-info-and-controls___61iyY_4-0-1","file-info-container":"magritte-file-info-container___WFab8_4-0-1","fileInfoContainer":"magritte-file-info-container___WFab8_4-0-1","file-info":"magritte-file-info___HrqiB_4-0-1","fileInfo":"magritte-file-info___HrqiB_4-0-1","controls":"magritte-controls___WdH7A_4-0-1"};
|
|
13
13
|
|
|
14
14
|
const FileView = ({ uploadType, loadedFile, preview, renderFileInfo, onFileDelete, 'aria-label': ariaLabel, isLast = false, }) => {
|
|
15
15
|
const isLoading = Boolean(loadedFile?.loading);
|
package/FileViewWithPreview.js
CHANGED
|
@@ -12,7 +12,7 @@ import './FileName.js';
|
|
|
12
12
|
import 'classnames';
|
|
13
13
|
import 'react';
|
|
14
14
|
|
|
15
|
-
var styles = {"item":"magritte-item___vVDG-_4-0-
|
|
15
|
+
var styles = {"item":"magritte-item___vVDG-_4-0-1"};
|
|
16
16
|
|
|
17
17
|
const FileViewWithPreview = ({ loadedFile, ...otherProps }) => {
|
|
18
18
|
const uploadType = getFileType(loadedFile.data.type);
|
package/MultiUpload.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Placeholder } from './Placeholder.js';
|
|
|
8
8
|
import { useDropActions } from './useDropActions.js';
|
|
9
9
|
import { useDropButtons } from './useDropButtons.js';
|
|
10
10
|
import { getAvaliableFileTypes, getUploadIcon, DEFAULT_ACCEPT, RenderFileInfoDefault } from './utils.js';
|
|
11
|
-
import { s as styles } from './upload-
|
|
11
|
+
import { s as styles } from './upload-0O4yKnsN.js';
|
|
12
12
|
import './FileView.js';
|
|
13
13
|
import '@hh.ru/magritte-ui-avatar';
|
|
14
14
|
import '@hh.ru/magritte-ui-divider';
|
package/SingleUpload.js
CHANGED
|
@@ -14,7 +14,7 @@ import { useDropActions } from './useDropActions.js';
|
|
|
14
14
|
import { useDropButtons } from './useDropButtons.js';
|
|
15
15
|
import { useFilePreview } from './useFilePreview.js';
|
|
16
16
|
import { getAvaliableFileTypes, getUploadIcon, bytes2mb, DEFAULT_ACCEPT, RenderFileInfoDefault } from './utils.js';
|
|
17
|
-
import { s as styles } from './upload-
|
|
17
|
+
import { s as styles } from './upload-0O4yKnsN.js';
|
|
18
18
|
import '@hh.ru/magritte-ui-divider';
|
|
19
19
|
import '@hh.ru/magritte-ui-breakpoint';
|
|
20
20
|
import 'react';
|
package/Upload.js
CHANGED
|
@@ -20,7 +20,7 @@ import '@hh.ru/magritte-ui-breakpoint';
|
|
|
20
20
|
import '@hh.ru/magritte-ui-typography';
|
|
21
21
|
import './useDropActions.js';
|
|
22
22
|
import './useDropButtons.js';
|
|
23
|
-
import './upload-
|
|
23
|
+
import './upload-0O4yKnsN.js';
|
|
24
24
|
|
|
25
25
|
const Upload = ({ multiple, noDragEventsBubbling = true, ...uploadProps }) => {
|
|
26
26
|
if (multiple) {
|
package/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--magritte-typography-label-2-regular-text-transform-v22-1-0:none;
|
|
9
9
|
--magritte-typography-label-2-regular-text-decoration-v22-1-0:none;
|
|
10
10
|
}
|
|
11
|
-
.magritte-file-name-body___PTTMc_4-0-
|
|
11
|
+
.magritte-file-name-body___PTTMc_4-0-1{
|
|
12
12
|
display:flex;
|
|
13
13
|
width:100%;
|
|
14
14
|
overflow:hidden;
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
text-transform:var(--magritte-typography-label-2-regular-text-transform-v22-1-0);
|
|
22
22
|
text-decoration:var(--magritte-typography-label-2-regular-text-decoration-v22-1-0);
|
|
23
23
|
}
|
|
24
|
-
.magritte-file-name-body_medium___sfmmq_4-0-
|
|
24
|
+
.magritte-file-name-body_medium___sfmmq_4-0-1{
|
|
25
25
|
justify-content:center;
|
|
26
26
|
}
|
|
27
|
-
.magritte-file-name___ZSL2g_4-0-
|
|
27
|
+
.magritte-file-name___ZSL2g_4-0-1{
|
|
28
28
|
overflow:hidden;
|
|
29
29
|
text-overflow:ellipsis;
|
|
30
30
|
}
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
--magritte-static-space-100-v22-1-0:4px;
|
|
42
42
|
--magritte-static-space-400-v22-1-0:16px;
|
|
43
43
|
}
|
|
44
|
-
.magritte-file-info-body___HmfXd_4-0-
|
|
44
|
+
.magritte-file-info-body___HmfXd_4-0-1{
|
|
45
45
|
flex-grow:1;
|
|
46
46
|
}
|
|
47
|
-
.magritte-file-info-and-controls___61iyY_4-0-
|
|
47
|
+
.magritte-file-info-and-controls___61iyY_4-0-1{
|
|
48
48
|
display:flex;
|
|
49
49
|
gap:var(--magritte-static-space-400-v22-1-0);
|
|
50
50
|
}
|
|
51
|
-
.magritte-file-info-container___WFab8_4-0-
|
|
51
|
+
.magritte-file-info-container___WFab8_4-0-1{
|
|
52
52
|
flex-grow:1;
|
|
53
53
|
width:50px;
|
|
54
54
|
}
|
|
55
|
-
.magritte-file-info___HrqiB_4-0-
|
|
55
|
+
.magritte-file-info___HrqiB_4-0-1{
|
|
56
56
|
display:flex;
|
|
57
57
|
gap:var(--magritte-static-space-100-v22-1-0);
|
|
58
58
|
font-family:var(--magritte-typography-label-4-regular-font-family-v22-1-0);
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
text-transform:var(--magritte-typography-label-4-regular-text-transform-v22-1-0);
|
|
65
65
|
text-decoration:var(--magritte-typography-label-4-regular-text-decoration-v22-1-0);
|
|
66
66
|
}
|
|
67
|
-
.magritte-controls___WdH7A_4-0-
|
|
67
|
+
.magritte-controls___WdH7A_4-0-1{
|
|
68
68
|
display:flex;
|
|
69
69
|
align-items:center;
|
|
70
70
|
margin-left:auto;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
:root{
|
|
75
75
|
--magritte-static-space-400-v22-1-0:16px;
|
|
76
76
|
}
|
|
77
|
-
.magritte-item___vVDG-_4-0-
|
|
77
|
+
.magritte-item___vVDG-_4-0-1{
|
|
78
78
|
display:flex;
|
|
79
79
|
width:100%;
|
|
80
80
|
gap:var(--magritte-static-space-400-v22-1-0);
|
|
@@ -108,57 +108,57 @@
|
|
|
108
108
|
--magritte-color-stroke-state-focused-accessible-v22-1-0:#0070ff7a;
|
|
109
109
|
--magritte-color-component-input-stroke-state-negative-focused-accessible-v22-1-0:#ff4d3a7a;
|
|
110
110
|
}
|
|
111
|
-
.magritte-root___FV1tC_4-0-
|
|
111
|
+
.magritte-root___FV1tC_4-0-1{
|
|
112
112
|
position:relative;
|
|
113
113
|
display:flex;
|
|
114
114
|
overflow:hidden;
|
|
115
115
|
border-radius:var(--magritte-static-border-radius-600-v22-1-0);
|
|
116
116
|
background-color:var(--magritte-color-background-primary-v22-1-0);
|
|
117
117
|
}
|
|
118
|
-
.magritte-root___FV1tC_4-0-
|
|
118
|
+
.magritte-root___FV1tC_4-0-1:hover{
|
|
119
119
|
cursor:pointer;
|
|
120
120
|
}
|
|
121
|
-
.magritte-root___FV1tC_4-0-
|
|
121
|
+
.magritte-root___FV1tC_4-0-1:hover .magritte-background___RfZ0U_4-0-1{
|
|
122
122
|
border-color:var(--magritte-color-stroke-accent-v22-1-0);
|
|
123
123
|
}
|
|
124
|
-
.magritte-root___FV1tC_4-0-
|
|
124
|
+
.magritte-root___FV1tC_4-0-1.magritte-drag-active___dihBL_4-0-1 .magritte-background___RfZ0U_4-0-1{
|
|
125
125
|
border-color:var(--magritte-color-stroke-accent-v22-1-0);
|
|
126
126
|
}
|
|
127
|
-
.magritte-root___FV1tC_4-0-
|
|
127
|
+
.magritte-root___FV1tC_4-0-1.focus-visible{
|
|
128
128
|
outline:var(--magritte-color-stroke-state-focused-accessible-v22-1-0) solid 4px;
|
|
129
129
|
}
|
|
130
|
-
.magritte-root___FV1tC_4-0-
|
|
130
|
+
.magritte-root___FV1tC_4-0-1.focus-visible .magritte-background___RfZ0U_4-0-1{
|
|
131
131
|
border-color:var(--magritte-color-stroke-accent-v22-1-0);
|
|
132
132
|
}
|
|
133
|
-
.magritte-root___FV1tC_4-0-
|
|
134
|
-
.magritte-root___FV1tC_4-0-
|
|
133
|
+
.magritte-root___FV1tC_4-0-1.magritte-load___MghDA_4-0-1 .magritte-background___RfZ0U_4-0-1,
|
|
134
|
+
.magritte-root___FV1tC_4-0-1.magritte-loading___9E3p-_4-0-1 .magritte-background___RfZ0U_4-0-1{
|
|
135
135
|
border-style:solid;
|
|
136
136
|
border-width:7px;
|
|
137
137
|
}
|
|
138
|
-
.magritte-root___FV1tC_4-0-
|
|
138
|
+
.magritte-root___FV1tC_4-0-1.magritte-invalid___Rt10-_4-0-1.focus-visible{
|
|
139
139
|
outline:var(--magritte-color-component-input-stroke-state-negative-focused-accessible-v22-1-0) solid 4px;
|
|
140
140
|
}
|
|
141
|
-
.magritte-root___FV1tC_4-0-
|
|
141
|
+
.magritte-root___FV1tC_4-0-1.magritte-invalid___Rt10-_4-0-1 .magritte-background___RfZ0U_4-0-1{
|
|
142
142
|
border-color:var(--magritte-color-stroke-neutral-v22-1-0);
|
|
143
143
|
}
|
|
144
|
-
.magritte-root_medium___67WJa_4-0-
|
|
144
|
+
.magritte-root_medium___67WJa_4-0-1{
|
|
145
145
|
justify-content:center;
|
|
146
146
|
padding:var(--magritte-static-space-600-v22-1-0);
|
|
147
147
|
}
|
|
148
|
-
.magritte-root_medium___67WJa_4-0-
|
|
148
|
+
.magritte-root_medium___67WJa_4-0-1 .magritte-body___O7ROl_4-0-1{
|
|
149
149
|
flex-direction:column;
|
|
150
150
|
align-items:center;
|
|
151
151
|
justify-content:center;
|
|
152
152
|
}
|
|
153
|
-
.magritte-root_small___dkUYq_4-0-
|
|
153
|
+
.magritte-root_small___dkUYq_4-0-1{
|
|
154
154
|
padding-top:var(--magritte-static-space-400-v22-1-0);
|
|
155
155
|
padding-bottom:var(--magritte-static-space-400-v22-1-0);
|
|
156
156
|
padding-left:var(--magritte-static-space-400-v22-1-0);
|
|
157
157
|
}
|
|
158
|
-
.magritte-root_small___dkUYq_4-0-
|
|
158
|
+
.magritte-root_small___dkUYq_4-0-1 .magritte-body___O7ROl_4-0-1{
|
|
159
159
|
gap:var(--magritte-static-space-400-v22-1-0);
|
|
160
160
|
}
|
|
161
|
-
.magritte-background___RfZ0U_4-0-
|
|
161
|
+
.magritte-background___RfZ0U_4-0-1{
|
|
162
162
|
position:absolute;
|
|
163
163
|
border-width:8px;
|
|
164
164
|
border-style:dashed;
|
|
@@ -171,15 +171,15 @@
|
|
|
171
171
|
background-position:center;
|
|
172
172
|
background-size:100%;
|
|
173
173
|
}
|
|
174
|
-
.magritte-body___O7ROl_4-0-
|
|
174
|
+
.magritte-body___O7ROl_4-0-1{
|
|
175
175
|
display:flex;
|
|
176
176
|
width:100%;
|
|
177
177
|
}
|
|
178
|
-
.magritte-loader___XYpWg_4-0-
|
|
178
|
+
.magritte-loader___XYpWg_4-0-1{
|
|
179
179
|
position:relative;
|
|
180
180
|
display:flex;
|
|
181
181
|
}
|
|
182
|
-
.magritte-cancel___tQ-yX_4-0-
|
|
182
|
+
.magritte-cancel___tQ-yX_4-0-1{
|
|
183
183
|
position:absolute;
|
|
184
184
|
top:0;
|
|
185
185
|
left:0;
|
|
@@ -189,20 +189,20 @@
|
|
|
189
189
|
align-items:center;
|
|
190
190
|
justify-content:center;
|
|
191
191
|
}
|
|
192
|
-
.magritte-image-controls___vLf94_4-0-
|
|
192
|
+
.magritte-image-controls___vLf94_4-0-1{
|
|
193
193
|
display:flex;
|
|
194
194
|
gap:var(--magritte-static-space-300-v22-1-0);
|
|
195
195
|
align-items:flex-end;
|
|
196
196
|
justify-content:flex-end;
|
|
197
197
|
width:100%;
|
|
198
198
|
}
|
|
199
|
-
.magritte-small-controls___Qn9TP_4-0-
|
|
199
|
+
.magritte-small-controls___Qn9TP_4-0-1{
|
|
200
200
|
display:flex;
|
|
201
201
|
align-items:center;
|
|
202
202
|
margin-left:auto;
|
|
203
203
|
margin-right:var(--magritte-static-space-500-v22-1-0);
|
|
204
204
|
}
|
|
205
|
-
.magritte-file-list___L9uHt_4-0-
|
|
205
|
+
.magritte-file-list___L9uHt_4-0-1{
|
|
206
206
|
margin-top:var(--magritte-static-space-300-v22-1-0);
|
|
207
207
|
box-shadow:inset 0 0 0 1px var(--magritte-color-stroke-neutral-v22-1-0);
|
|
208
208
|
border-radius:var(--magritte-static-border-radius-600-v22-1-0);
|
|
@@ -211,15 +211,15 @@
|
|
|
211
211
|
padding-bottom:var(--magritte-static-space-400-v22-1-0);
|
|
212
212
|
padding-left:var(--magritte-static-space-400-v22-1-0);
|
|
213
213
|
}
|
|
214
|
-
.magritte-file-icon___oetLK_4-0-
|
|
214
|
+
.magritte-file-icon___oetLK_4-0-1{
|
|
215
215
|
display:inline-flex;
|
|
216
216
|
}
|
|
217
|
-
.magritte-file-info___Y3vyi_4-0-
|
|
217
|
+
.magritte-file-info___Y3vyi_4-0-1{
|
|
218
218
|
display:inline-flex;
|
|
219
219
|
width:100%;
|
|
220
220
|
flex-direction:column;
|
|
221
221
|
align-items:center;
|
|
222
222
|
}
|
|
223
|
-
.magritte-hidden-file-info___92c69_4-0-
|
|
223
|
+
.magritte-hidden-file-info___92c69_4-0-1{
|
|
224
224
|
visibility:hidden;
|
|
225
225
|
}
|
package/index.js
CHANGED
|
@@ -20,6 +20,6 @@ import '@hh.ru/magritte-ui-breakpoint';
|
|
|
20
20
|
import '@hh.ru/magritte-ui-typography';
|
|
21
21
|
import './useDropActions.js';
|
|
22
22
|
import './useDropButtons.js';
|
|
23
|
-
import './upload-
|
|
23
|
+
import './upload-0O4yKnsN.js';
|
|
24
24
|
import './SingleUpload.js';
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-upload",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@hh.ru/magritte-ui-typography": "4.0.0",
|
|
40
40
|
"react-dropzone": "14.3.5"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "20ea31a1e91dc1ba508c31ceb25d61d984728210"
|
|
43
43
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"root":"magritte-root___FV1tC_4-0-1","background":"magritte-background___RfZ0U_4-0-1","drag-active":"magritte-drag-active___dihBL_4-0-1","dragActive":"magritte-drag-active___dihBL_4-0-1","load":"magritte-load___MghDA_4-0-1","loading":"magritte-loading___9E3p-_4-0-1","invalid":"magritte-invalid___Rt10-_4-0-1","root_medium":"magritte-root_medium___67WJa_4-0-1","rootMedium":"magritte-root_medium___67WJa_4-0-1","body":"magritte-body___O7ROl_4-0-1","root_small":"magritte-root_small___dkUYq_4-0-1","rootSmall":"magritte-root_small___dkUYq_4-0-1","loader":"magritte-loader___XYpWg_4-0-1","cancel":"magritte-cancel___tQ-yX_4-0-1","image-controls":"magritte-image-controls___vLf94_4-0-1","imageControls":"magritte-image-controls___vLf94_4-0-1","small-controls":"magritte-small-controls___Qn9TP_4-0-1","smallControls":"magritte-small-controls___Qn9TP_4-0-1","file-list":"magritte-file-list___L9uHt_4-0-1","fileList":"magritte-file-list___L9uHt_4-0-1","file-icon":"magritte-file-icon___oetLK_4-0-1","fileIcon":"magritte-file-icon___oetLK_4-0-1","file-info":"magritte-file-info___Y3vyi_4-0-1","fileInfo":"magritte-file-info___Y3vyi_4-0-1","hidden-file-info":"magritte-hidden-file-info___92c69_4-0-1","hiddenFileInfo":"magritte-hidden-file-info___92c69_4-0-1"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=upload-0O4yKnsN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-0O4yKnsN.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/upload-CvvnKTGS.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"root":"magritte-root___FV1tC_4-0-0","background":"magritte-background___RfZ0U_4-0-0","drag-active":"magritte-drag-active___dihBL_4-0-0","dragActive":"magritte-drag-active___dihBL_4-0-0","load":"magritte-load___MghDA_4-0-0","loading":"magritte-loading___9E3p-_4-0-0","invalid":"magritte-invalid___Rt10-_4-0-0","root_medium":"magritte-root_medium___67WJa_4-0-0","rootMedium":"magritte-root_medium___67WJa_4-0-0","body":"magritte-body___O7ROl_4-0-0","root_small":"magritte-root_small___dkUYq_4-0-0","rootSmall":"magritte-root_small___dkUYq_4-0-0","loader":"magritte-loader___XYpWg_4-0-0","cancel":"magritte-cancel___tQ-yX_4-0-0","image-controls":"magritte-image-controls___vLf94_4-0-0","imageControls":"magritte-image-controls___vLf94_4-0-0","small-controls":"magritte-small-controls___Qn9TP_4-0-0","smallControls":"magritte-small-controls___Qn9TP_4-0-0","file-list":"magritte-file-list___L9uHt_4-0-0","fileList":"magritte-file-list___L9uHt_4-0-0","file-icon":"magritte-file-icon___oetLK_4-0-0","fileIcon":"magritte-file-icon___oetLK_4-0-0","file-info":"magritte-file-info___Y3vyi_4-0-0","fileInfo":"magritte-file-info___Y3vyi_4-0-0","hidden-file-info":"magritte-hidden-file-info___92c69_4-0-0","hiddenFileInfo":"magritte-hidden-file-info___92c69_4-0-0"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=upload-CvvnKTGS.js.map
|
package/upload-CvvnKTGS.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-CvvnKTGS.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|