@hh.ru/magritte-ui-upload 3.1.1 → 3.1.2
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 +30 -30
- package/index.js +1 -1
- package/package.json +6 -6
- package/upload-BvMA0jDs.js +5 -0
- package/upload-BvMA0jDs.js.map +1 -0
- package/upload-CJaTPbi8.js +0 -5
- package/upload-CJaTPbi8.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_3-1-
|
|
5
|
+
var styles = {"file-name-body":"magritte-file-name-body___PTTMc_3-1-2","fileNameBody":"magritte-file-name-body___PTTMc_3-1-2","file-name-body_medium":"magritte-file-name-body_medium___sfmmq_3-1-2","fileNameBodyMedium":"magritte-file-name-body_medium___sfmmq_3-1-2","file-name":"magritte-file-name___ZSL2g_3-1-2","fileName":"magritte-file-name___ZSL2g_3-1-2"};
|
|
6
6
|
|
|
7
7
|
const parse = (file) => {
|
|
8
8
|
const name = file.name;
|
package/FileView.js
CHANGED
|
@@ -10,7 +10,7 @@ import { FileName } from './FileName.js';
|
|
|
10
10
|
import { getUploadIcon, bytes2mb } from './utils.js';
|
|
11
11
|
import 'classnames';
|
|
12
12
|
|
|
13
|
-
var styles = {"file-info-body":"magritte-file-info-body___HmfXd_3-1-
|
|
13
|
+
var styles = {"file-info-body":"magritte-file-info-body___HmfXd_3-1-2","fileInfoBody":"magritte-file-info-body___HmfXd_3-1-2","file-info-and-controls":"magritte-file-info-and-controls___61iyY_3-1-2","fileInfoAndControls":"magritte-file-info-and-controls___61iyY_3-1-2","file-info-container":"magritte-file-info-container___WFab8_3-1-2","fileInfoContainer":"magritte-file-info-container___WFab8_3-1-2","file-info":"magritte-file-info___HrqiB_3-1-2","fileInfo":"magritte-file-info___HrqiB_3-1-2","controls":"magritte-controls___WdH7A_3-1-2"};
|
|
14
14
|
|
|
15
15
|
const FileView = ({ uploadType, loadedFile, preview, renderFileInfo, onFileDelete, 'aria-label': ariaLabel, isLast = false, }) => {
|
|
16
16
|
const isLoading = Boolean(loadedFile?.loading);
|
package/FileViewWithPreview.js
CHANGED
|
@@ -13,7 +13,7 @@ import './FileName.js';
|
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import 'react';
|
|
15
15
|
|
|
16
|
-
var styles = {"item":"magritte-item___vVDG-_3-1-
|
|
16
|
+
var styles = {"item":"magritte-item___vVDG-_3-1-2"};
|
|
17
17
|
|
|
18
18
|
const FileViewWithPreview = ({ loadedFile, ...otherProps }) => {
|
|
19
19
|
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-BvMA0jDs.js';
|
|
12
12
|
import './FileView.js';
|
|
13
13
|
import '@hh.ru/magritte-ui-action';
|
|
14
14
|
import '@hh.ru/magritte-ui-avatar';
|
package/SingleUpload.js
CHANGED
|
@@ -15,7 +15,7 @@ import { useDropActions } from './useDropActions.js';
|
|
|
15
15
|
import { useDropButtons } from './useDropButtons.js';
|
|
16
16
|
import { useFilePreview } from './useFilePreview.js';
|
|
17
17
|
import { getAvaliableFileTypes, getUploadIcon, bytes2mb, DEFAULT_ACCEPT, RenderFileInfoDefault } from './utils.js';
|
|
18
|
-
import { s as styles } from './upload-
|
|
18
|
+
import { s as styles } from './upload-BvMA0jDs.js';
|
|
19
19
|
import '@hh.ru/magritte-ui-action';
|
|
20
20
|
import '@hh.ru/magritte-ui-divider';
|
|
21
21
|
import '@hh.ru/magritte-ui-breakpoint';
|
package/Upload.js
CHANGED
|
@@ -21,7 +21,7 @@ import '@hh.ru/magritte-ui-breakpoint';
|
|
|
21
21
|
import '@hh.ru/magritte-ui-typography';
|
|
22
22
|
import './useDropActions.js';
|
|
23
23
|
import './useDropButtons.js';
|
|
24
|
-
import './upload-
|
|
24
|
+
import './upload-BvMA0jDs.js';
|
|
25
25
|
|
|
26
26
|
const Upload = ({ multiple, ...uploadProps }) => {
|
|
27
27
|
if (multiple) {
|
package/index.css
CHANGED
|
@@ -530,7 +530,7 @@
|
|
|
530
530
|
--magritte-typography-_custom-5-italic-text-transform-v20-0-1:none;
|
|
531
531
|
--magritte-typography-_custom-5-italic-text-decoration-v20-0-1:none;
|
|
532
532
|
}
|
|
533
|
-
.magritte-file-name-body___PTTMc_3-1-
|
|
533
|
+
.magritte-file-name-body___PTTMc_3-1-2{
|
|
534
534
|
display:flex;
|
|
535
535
|
width:100%;
|
|
536
536
|
overflow:hidden;
|
|
@@ -543,10 +543,10 @@
|
|
|
543
543
|
text-transform:var(--magritte-typography-label-2-regular-text-transform-v20-0-1);
|
|
544
544
|
text-decoration:var(--magritte-typography-label-2-regular-text-decoration-v20-0-1);
|
|
545
545
|
}
|
|
546
|
-
.magritte-file-name-body_medium___sfmmq_3-1-
|
|
546
|
+
.magritte-file-name-body_medium___sfmmq_3-1-2{
|
|
547
547
|
justify-content:center;
|
|
548
548
|
}
|
|
549
|
-
.magritte-file-name___ZSL2g_3-1-
|
|
549
|
+
.magritte-file-name___ZSL2g_3-1-2{
|
|
550
550
|
overflow:hidden;
|
|
551
551
|
text-overflow:ellipsis;
|
|
552
552
|
}
|
|
@@ -1085,18 +1085,18 @@
|
|
|
1085
1085
|
--magritte-typography-_custom-5-italic-text-transform-v20-0-1:none;
|
|
1086
1086
|
--magritte-typography-_custom-5-italic-text-decoration-v20-0-1:none;
|
|
1087
1087
|
}
|
|
1088
|
-
.magritte-file-info-body___HmfXd_3-1-
|
|
1088
|
+
.magritte-file-info-body___HmfXd_3-1-2{
|
|
1089
1089
|
flex-grow:1;
|
|
1090
1090
|
}
|
|
1091
|
-
.magritte-file-info-and-controls___61iyY_3-1-
|
|
1091
|
+
.magritte-file-info-and-controls___61iyY_3-1-2{
|
|
1092
1092
|
display:flex;
|
|
1093
1093
|
gap:var(--magritte-static-space-400-v20-0-1);
|
|
1094
1094
|
}
|
|
1095
|
-
.magritte-file-info-container___WFab8_3-1-
|
|
1095
|
+
.magritte-file-info-container___WFab8_3-1-2{
|
|
1096
1096
|
flex-grow:1;
|
|
1097
1097
|
width:50px;
|
|
1098
1098
|
}
|
|
1099
|
-
.magritte-file-info___HrqiB_3-1-
|
|
1099
|
+
.magritte-file-info___HrqiB_3-1-2{
|
|
1100
1100
|
display:flex;
|
|
1101
1101
|
gap:var(--magritte-static-space-100-v20-0-1);
|
|
1102
1102
|
font-family:var(--magritte-typography-label-4-regular-font-family-v20-0-1);
|
|
@@ -1108,7 +1108,7 @@
|
|
|
1108
1108
|
text-transform:var(--magritte-typography-label-4-regular-text-transform-v20-0-1);
|
|
1109
1109
|
text-decoration:var(--magritte-typography-label-4-regular-text-decoration-v20-0-1);
|
|
1110
1110
|
}
|
|
1111
|
-
.magritte-controls___WdH7A_3-1-
|
|
1111
|
+
.magritte-controls___WdH7A_3-1-2{
|
|
1112
1112
|
display:flex;
|
|
1113
1113
|
align-items:center;
|
|
1114
1114
|
margin-left:auto;
|
|
@@ -1648,7 +1648,7 @@
|
|
|
1648
1648
|
--magritte-typography-_custom-5-italic-text-transform-v20-0-1:none;
|
|
1649
1649
|
--magritte-typography-_custom-5-italic-text-decoration-v20-0-1:none;
|
|
1650
1650
|
}
|
|
1651
|
-
.magritte-item___vVDG-_3-1-
|
|
1651
|
+
.magritte-item___vVDG-_3-1-2{
|
|
1652
1652
|
display:flex;
|
|
1653
1653
|
width:100%;
|
|
1654
1654
|
gap:var(--magritte-static-space-400-v20-0-1);
|
|
@@ -2205,57 +2205,57 @@
|
|
|
2205
2205
|
--magritte-typography-_custom-5-italic-text-transform-v20-0-1:none;
|
|
2206
2206
|
--magritte-typography-_custom-5-italic-text-decoration-v20-0-1:none;
|
|
2207
2207
|
}
|
|
2208
|
-
.magritte-root___FV1tC_3-1-
|
|
2208
|
+
.magritte-root___FV1tC_3-1-2{
|
|
2209
2209
|
position:relative;
|
|
2210
2210
|
display:flex;
|
|
2211
2211
|
overflow:hidden;
|
|
2212
2212
|
border-radius:var(--magritte-static-border-radius-600-v20-0-1);
|
|
2213
2213
|
background-color:var(--magritte-color-background-primary-v20-0-1);
|
|
2214
2214
|
}
|
|
2215
|
-
.magritte-root___FV1tC_3-1-
|
|
2215
|
+
.magritte-root___FV1tC_3-1-2:hover{
|
|
2216
2216
|
cursor:pointer;
|
|
2217
2217
|
}
|
|
2218
|
-
.magritte-root___FV1tC_3-1-
|
|
2218
|
+
.magritte-root___FV1tC_3-1-2:hover .magritte-background___RfZ0U_3-1-2{
|
|
2219
2219
|
border-color:var(--magritte-color-stroke-accent-v20-0-1);
|
|
2220
2220
|
}
|
|
2221
|
-
.magritte-root___FV1tC_3-1-
|
|
2221
|
+
.magritte-root___FV1tC_3-1-2.magritte-drag-active___dihBL_3-1-2 .magritte-background___RfZ0U_3-1-2{
|
|
2222
2222
|
border-color:var(--magritte-color-stroke-accent-v20-0-1);
|
|
2223
2223
|
}
|
|
2224
|
-
.magritte-root___FV1tC_3-1-
|
|
2224
|
+
.magritte-root___FV1tC_3-1-2.focus-visible{
|
|
2225
2225
|
outline:var(--magritte-color-stroke-state-focused-accessible-v20-0-1) solid 4px;
|
|
2226
2226
|
}
|
|
2227
|
-
.magritte-root___FV1tC_3-1-
|
|
2227
|
+
.magritte-root___FV1tC_3-1-2.focus-visible .magritte-background___RfZ0U_3-1-2{
|
|
2228
2228
|
border-color:var(--magritte-color-stroke-accent-v20-0-1);
|
|
2229
2229
|
}
|
|
2230
|
-
.magritte-root___FV1tC_3-1-
|
|
2231
|
-
.magritte-root___FV1tC_3-1-
|
|
2230
|
+
.magritte-root___FV1tC_3-1-2.magritte-load___MghDA_3-1-2 .magritte-background___RfZ0U_3-1-2,
|
|
2231
|
+
.magritte-root___FV1tC_3-1-2.magritte-loading___9E3p-_3-1-2 .magritte-background___RfZ0U_3-1-2{
|
|
2232
2232
|
border-style:solid;
|
|
2233
2233
|
border-width:7px;
|
|
2234
2234
|
}
|
|
2235
|
-
.magritte-root___FV1tC_3-1-
|
|
2235
|
+
.magritte-root___FV1tC_3-1-2.magritte-invalid___Rt10-_3-1-2.focus-visible{
|
|
2236
2236
|
outline:var(--magritte-color-component-input-stroke-state-negative-focused-accessible-v20-0-1) solid 4px;
|
|
2237
2237
|
}
|
|
2238
|
-
.magritte-root___FV1tC_3-1-
|
|
2238
|
+
.magritte-root___FV1tC_3-1-2.magritte-invalid___Rt10-_3-1-2 .magritte-background___RfZ0U_3-1-2{
|
|
2239
2239
|
border-color:var(--magritte-color-stroke-neutral-v20-0-1);
|
|
2240
2240
|
}
|
|
2241
|
-
.magritte-root_medium___67WJa_3-1-
|
|
2241
|
+
.magritte-root_medium___67WJa_3-1-2{
|
|
2242
2242
|
justify-content:center;
|
|
2243
2243
|
padding:var(--magritte-static-space-600-v20-0-1);
|
|
2244
2244
|
}
|
|
2245
|
-
.magritte-root_medium___67WJa_3-1-
|
|
2245
|
+
.magritte-root_medium___67WJa_3-1-2 .magritte-body___O7ROl_3-1-2{
|
|
2246
2246
|
flex-direction:column;
|
|
2247
2247
|
align-items:center;
|
|
2248
2248
|
justify-content:center;
|
|
2249
2249
|
}
|
|
2250
|
-
.magritte-root_small___dkUYq_3-1-
|
|
2250
|
+
.magritte-root_small___dkUYq_3-1-2{
|
|
2251
2251
|
padding-top:var(--magritte-static-space-400-v20-0-1);
|
|
2252
2252
|
padding-bottom:var(--magritte-static-space-400-v20-0-1);
|
|
2253
2253
|
padding-left:var(--magritte-static-space-400-v20-0-1);
|
|
2254
2254
|
}
|
|
2255
|
-
.magritte-root_small___dkUYq_3-1-
|
|
2255
|
+
.magritte-root_small___dkUYq_3-1-2 .magritte-body___O7ROl_3-1-2{
|
|
2256
2256
|
gap:var(--magritte-static-space-400-v20-0-1);
|
|
2257
2257
|
}
|
|
2258
|
-
.magritte-background___RfZ0U_3-1-
|
|
2258
|
+
.magritte-background___RfZ0U_3-1-2{
|
|
2259
2259
|
position:absolute;
|
|
2260
2260
|
border-width:8px;
|
|
2261
2261
|
border-style:dashed;
|
|
@@ -2268,15 +2268,15 @@
|
|
|
2268
2268
|
background-position:center;
|
|
2269
2269
|
background-size:100%;
|
|
2270
2270
|
}
|
|
2271
|
-
.magritte-body___O7ROl_3-1-
|
|
2271
|
+
.magritte-body___O7ROl_3-1-2{
|
|
2272
2272
|
display:flex;
|
|
2273
2273
|
width:100%;
|
|
2274
2274
|
}
|
|
2275
|
-
.magritte-loader___XYpWg_3-1-
|
|
2275
|
+
.magritte-loader___XYpWg_3-1-2{
|
|
2276
2276
|
position:relative;
|
|
2277
2277
|
display:flex;
|
|
2278
2278
|
}
|
|
2279
|
-
.magritte-cancel___tQ-yX_3-1-
|
|
2279
|
+
.magritte-cancel___tQ-yX_3-1-2{
|
|
2280
2280
|
position:absolute;
|
|
2281
2281
|
top:0;
|
|
2282
2282
|
left:0;
|
|
@@ -2286,20 +2286,20 @@
|
|
|
2286
2286
|
align-items:center;
|
|
2287
2287
|
justify-content:center;
|
|
2288
2288
|
}
|
|
2289
|
-
.magritte-image-controls___vLf94_3-1-
|
|
2289
|
+
.magritte-image-controls___vLf94_3-1-2{
|
|
2290
2290
|
display:flex;
|
|
2291
2291
|
position:absolute;
|
|
2292
2292
|
right:var(--magritte-static-space-300-v20-0-1);
|
|
2293
2293
|
bottom:var(--magritte-static-space-300-v20-0-1);
|
|
2294
2294
|
gap:var(--magritte-static-space-300-v20-0-1);
|
|
2295
2295
|
}
|
|
2296
|
-
.magritte-small-controls___Qn9TP_3-1-
|
|
2296
|
+
.magritte-small-controls___Qn9TP_3-1-2{
|
|
2297
2297
|
display:flex;
|
|
2298
2298
|
align-items:center;
|
|
2299
2299
|
margin-left:auto;
|
|
2300
2300
|
margin-right:var(--magritte-static-space-500-v20-0-1);
|
|
2301
2301
|
}
|
|
2302
|
-
.magritte-file-list___L9uHt_3-1-
|
|
2302
|
+
.magritte-file-list___L9uHt_3-1-2{
|
|
2303
2303
|
margin-top:var(--magritte-static-space-300-v20-0-1);
|
|
2304
2304
|
box-shadow:inset 0 0 0 1px var(--magritte-color-stroke-neutral-v20-0-1);
|
|
2305
2305
|
border-radius:var(--magritte-static-border-radius-600-v20-0-1);
|
package/index.js
CHANGED
|
@@ -21,6 +21,6 @@ import '@hh.ru/magritte-ui-breakpoint';
|
|
|
21
21
|
import '@hh.ru/magritte-ui-typography';
|
|
22
22
|
import './useDropActions.js';
|
|
23
23
|
import './useDropButtons.js';
|
|
24
|
-
import './upload-
|
|
24
|
+
import './upload-BvMA0jDs.js';
|
|
25
25
|
import './SingleUpload.js';
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-upload",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"react": ">=18.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hh.ru/magritte-ui-action": "4.4.
|
|
30
|
+
"@hh.ru/magritte-ui-action": "4.4.18",
|
|
31
31
|
"@hh.ru/magritte-ui-avatar": "5.0.16",
|
|
32
32
|
"@hh.ru/magritte-ui-breakpoint": "4.1.0",
|
|
33
|
-
"@hh.ru/magritte-ui-button": "5.2.
|
|
33
|
+
"@hh.ru/magritte-ui-button": "5.2.10",
|
|
34
34
|
"@hh.ru/magritte-ui-divider": "1.1.37",
|
|
35
|
-
"@hh.ru/magritte-ui-icon": "7.9.
|
|
36
|
-
"@hh.ru/magritte-ui-loader": "1.3.
|
|
35
|
+
"@hh.ru/magritte-ui-icon": "7.9.7",
|
|
36
|
+
"@hh.ru/magritte-ui-loader": "1.3.12",
|
|
37
37
|
"@hh.ru/magritte-ui-spacing": "2.0.34",
|
|
38
38
|
"@hh.ru/magritte-ui-typography": "3.0.22",
|
|
39
39
|
"react-dropzone": "14.3.5"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "0cba1a0b8d618df338719bc996e2f5535af80e79"
|
|
42
42
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"root":"magritte-root___FV1tC_3-1-2","background":"magritte-background___RfZ0U_3-1-2","drag-active":"magritte-drag-active___dihBL_3-1-2","dragActive":"magritte-drag-active___dihBL_3-1-2","load":"magritte-load___MghDA_3-1-2","loading":"magritte-loading___9E3p-_3-1-2","invalid":"magritte-invalid___Rt10-_3-1-2","root_medium":"magritte-root_medium___67WJa_3-1-2","rootMedium":"magritte-root_medium___67WJa_3-1-2","body":"magritte-body___O7ROl_3-1-2","root_small":"magritte-root_small___dkUYq_3-1-2","rootSmall":"magritte-root_small___dkUYq_3-1-2","loader":"magritte-loader___XYpWg_3-1-2","cancel":"magritte-cancel___tQ-yX_3-1-2","image-controls":"magritte-image-controls___vLf94_3-1-2","imageControls":"magritte-image-controls___vLf94_3-1-2","small-controls":"magritte-small-controls___Qn9TP_3-1-2","smallControls":"magritte-small-controls___Qn9TP_3-1-2","file-list":"magritte-file-list___L9uHt_3-1-2","fileList":"magritte-file-list___L9uHt_3-1-2"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=upload-BvMA0jDs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-BvMA0jDs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/upload-CJaTPbi8.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"root":"magritte-root___FV1tC_3-1-1","background":"magritte-background___RfZ0U_3-1-1","drag-active":"magritte-drag-active___dihBL_3-1-1","dragActive":"magritte-drag-active___dihBL_3-1-1","load":"magritte-load___MghDA_3-1-1","loading":"magritte-loading___9E3p-_3-1-1","invalid":"magritte-invalid___Rt10-_3-1-1","root_medium":"magritte-root_medium___67WJa_3-1-1","rootMedium":"magritte-root_medium___67WJa_3-1-1","body":"magritte-body___O7ROl_3-1-1","root_small":"magritte-root_small___dkUYq_3-1-1","rootSmall":"magritte-root_small___dkUYq_3-1-1","loader":"magritte-loader___XYpWg_3-1-1","cancel":"magritte-cancel___tQ-yX_3-1-1","image-controls":"magritte-image-controls___vLf94_3-1-1","imageControls":"magritte-image-controls___vLf94_3-1-1","small-controls":"magritte-small-controls___Qn9TP_3-1-1","smallControls":"magritte-small-controls___Qn9TP_3-1-1","file-list":"magritte-file-list___L9uHt_3-1-1","fileList":"magritte-file-list___L9uHt_3-1-1"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=upload-CJaTPbi8.js.map
|
package/upload-CJaTPbi8.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upload-CJaTPbi8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|