@exmg/exm-upload 1.0.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/README.md +20 -0
- package/index.d.ts +18 -0
- package/index.js +17 -0
- package/package.json +53 -0
- package/src/exm-dialog-upload-base.d.ts +90 -0
- package/src/exm-dialog-upload-base.js +226 -0
- package/src/exm-dialog-upload.d.ts +11 -0
- package/src/exm-dialog-upload.js +15 -0
- package/src/exm-upload-base.d.ts +148 -0
- package/src/exm-upload-base.js +373 -0
- package/src/exm-upload-crop-base.d.ts +16 -0
- package/src/exm-upload-crop-base.js +76 -0
- package/src/exm-upload-crop.d.ts +9 -0
- package/src/exm-upload-crop.js +12 -0
- package/src/exm-upload-drop-area-base.d.ts +8 -0
- package/src/exm-upload-drop-area-base.js +34 -0
- package/src/exm-upload-drop-area.d.ts +9 -0
- package/src/exm-upload-drop-area.js +12 -0
- package/src/exm-upload-input.d.ts +15 -0
- package/src/exm-upload-input.js +84 -0
- package/src/exm-upload-item-base.d.ts +45 -0
- package/src/exm-upload-item-base.js +177 -0
- package/src/exm-upload-item.d.ts +9 -0
- package/src/exm-upload-item.js +12 -0
- package/src/exm-upload.d.ts +19 -0
- package/src/exm-upload.js +22 -0
- package/src/mixins/exm-upload-drag-drop-mixin.d.ts +10 -0
- package/src/mixins/exm-upload-drag-drop-mixin.js +28 -0
- package/src/styles/exm-dialog-upload-css.d.ts +2 -0
- package/src/styles/exm-dialog-upload-css.js +4 -0
- package/src/styles/exm-dialog-upload.scss +22 -0
- package/src/styles/exm-upload-crop-styles-css.d.ts +2 -0
- package/src/styles/exm-upload-crop-styles-css.js +12 -0
- package/src/styles/exm-upload-crop-styles.scss +323 -0
- package/src/styles/exm-upload-drop-area-styles-css.d.ts +2 -0
- package/src/styles/exm-upload-drop-area-styles-css.js +4 -0
- package/src/styles/exm-upload-drop-area-styles.scss +45 -0
- package/src/styles/exm-upload-input-css.d.ts +2 -0
- package/src/styles/exm-upload-input-css.js +4 -0
- package/src/styles/exm-upload-input.scss +18 -0
- package/src/styles/exm-upload-item-styles-css.d.ts +2 -0
- package/src/styles/exm-upload-item-styles-css.js +4 -0
- package/src/styles/exm-upload-item-styles.scss +119 -0
- package/src/styles/exm-upload-styles-css.d.ts +2 -0
- package/src/styles/exm-upload-styles-css.js +4 -0
- package/src/styles/exm-upload-styles.scss +147 -0
- package/src/types.d.ts +33 -0
- package/src/types.js +10 -0
- package/src/upload/adapters/local-adapter.d.ts +6 -0
- package/src/upload/adapters/local-adapter.js +23 -0
- package/src/upload/adapters/xhr-adapter.d.ts +9 -0
- package/src/upload/adapters/xhr-adapter.js +49 -0
- package/src/upload/index.d.ts +1 -0
- package/src/upload/index.js +2 -0
- package/src/upload/service.d.ts +9 -0
- package/src/upload/service.js +42 -0
- package/src/upload/types.d.ts +12 -0
- package/src/upload/types.js +2 -0
- package/src/utils.d.ts +33 -0
- package/src/utils.js +89 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
#image {
|
|
2
|
+
z-index: 99999;
|
|
3
|
+
display: flex;
|
|
4
|
+
|
|
5
|
+
/* This rule is very important, please don't ignore this */
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
}
|
|
8
|
+
.image-container {
|
|
9
|
+
max-width: 300px;
|
|
10
|
+
max-height: 300px;
|
|
11
|
+
}
|
|
12
|
+
.actions {
|
|
13
|
+
margin-top: 8px;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*!
|
|
19
|
+
* Cropper.js v1.5.13
|
|
20
|
+
* https://fengyuanchen.github.io/cropperjs
|
|
21
|
+
*
|
|
22
|
+
* Copyright 2015-present Chen Fengyuan
|
|
23
|
+
* Released under the MIT license
|
|
24
|
+
*
|
|
25
|
+
* Date: 2022-11-20T05:30:43.444Z
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
.cropper-container {
|
|
29
|
+
direction: ltr;
|
|
30
|
+
font-size: 0;
|
|
31
|
+
line-height: 0;
|
|
32
|
+
position: relative;
|
|
33
|
+
-ms-touch-action: none;
|
|
34
|
+
touch-action: none;
|
|
35
|
+
-webkit-user-select: none;
|
|
36
|
+
-moz-user-select: none;
|
|
37
|
+
-ms-user-select: none;
|
|
38
|
+
user-select: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.cropper-container img {
|
|
42
|
+
-webkit-backface-visibility: hidden;
|
|
43
|
+
backface-visibility: hidden;
|
|
44
|
+
display: block;
|
|
45
|
+
height: 100%;
|
|
46
|
+
image-orientation: 0deg;
|
|
47
|
+
max-height: none !important;
|
|
48
|
+
max-width: none !important;
|
|
49
|
+
min-height: 0 !important;
|
|
50
|
+
min-width: 0 !important;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cropper-wrap-box,
|
|
55
|
+
.cropper-canvas,
|
|
56
|
+
.cropper-drag-box,
|
|
57
|
+
.cropper-crop-box,
|
|
58
|
+
.cropper-modal {
|
|
59
|
+
bottom: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
position: absolute;
|
|
62
|
+
right: 0;
|
|
63
|
+
top: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.cropper-wrap-box,
|
|
67
|
+
.cropper-canvas {
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.cropper-drag-box {
|
|
72
|
+
background-color: #fff;
|
|
73
|
+
opacity: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.cropper-modal {
|
|
77
|
+
background-color: #000;
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.cropper-view-box {
|
|
82
|
+
display: block;
|
|
83
|
+
height: 100%;
|
|
84
|
+
outline: 1px solid #39f;
|
|
85
|
+
outline-color: rgba(51, 153, 255, 75%);
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
width: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cropper-dashed {
|
|
91
|
+
border: 0 dashed #eee;
|
|
92
|
+
display: block;
|
|
93
|
+
opacity: 0.5;
|
|
94
|
+
position: absolute;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cropper-dashed.dashed-h {
|
|
98
|
+
border-bottom-width: 1px;
|
|
99
|
+
border-top-width: 1px;
|
|
100
|
+
height: calc(100% / 3);
|
|
101
|
+
left: 0;
|
|
102
|
+
top: calc(100% / 3);
|
|
103
|
+
width: 100%;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.cropper-dashed.dashed-v {
|
|
107
|
+
border-left-width: 1px;
|
|
108
|
+
border-right-width: 1px;
|
|
109
|
+
height: 100%;
|
|
110
|
+
left: calc(100% / 3);
|
|
111
|
+
top: 0;
|
|
112
|
+
width: calc(100% / 3);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.cropper-center {
|
|
116
|
+
display: block;
|
|
117
|
+
height: 0;
|
|
118
|
+
left: 50%;
|
|
119
|
+
opacity: 0.75;
|
|
120
|
+
position: absolute;
|
|
121
|
+
top: 50%;
|
|
122
|
+
width: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.cropper-center::before,
|
|
126
|
+
.cropper-center::after {
|
|
127
|
+
background-color: #eee;
|
|
128
|
+
content: " ";
|
|
129
|
+
display: block;
|
|
130
|
+
position: absolute;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.cropper-center::before {
|
|
134
|
+
height: 1px;
|
|
135
|
+
left: -3px;
|
|
136
|
+
top: 0;
|
|
137
|
+
width: 7px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.cropper-center::after {
|
|
141
|
+
height: 7px;
|
|
142
|
+
left: 0;
|
|
143
|
+
top: -3px;
|
|
144
|
+
width: 1px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.cropper-face,
|
|
148
|
+
.cropper-line,
|
|
149
|
+
.cropper-point {
|
|
150
|
+
display: block;
|
|
151
|
+
height: 100%;
|
|
152
|
+
opacity: 0.1;
|
|
153
|
+
position: absolute;
|
|
154
|
+
width: 100%;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.cropper-face {
|
|
158
|
+
background-color: #fff;
|
|
159
|
+
left: 0;
|
|
160
|
+
top: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.cropper-line {
|
|
164
|
+
background-color: #39f;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cropper-line.line-e {
|
|
168
|
+
cursor: ew-resize;
|
|
169
|
+
right: -3px;
|
|
170
|
+
top: 0;
|
|
171
|
+
width: 5px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.cropper-line.line-n {
|
|
175
|
+
cursor: ns-resize;
|
|
176
|
+
height: 5px;
|
|
177
|
+
left: 0;
|
|
178
|
+
top: -3px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.cropper-line.line-w {
|
|
182
|
+
cursor: ew-resize;
|
|
183
|
+
left: -3px;
|
|
184
|
+
top: 0;
|
|
185
|
+
width: 5px;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.cropper-line.line-s {
|
|
189
|
+
bottom: -3px;
|
|
190
|
+
cursor: ns-resize;
|
|
191
|
+
height: 5px;
|
|
192
|
+
left: 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.cropper-point {
|
|
196
|
+
background-color: #39f;
|
|
197
|
+
height: 5px;
|
|
198
|
+
opacity: 0.75;
|
|
199
|
+
width: 5px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.cropper-point.point-e {
|
|
203
|
+
cursor: ew-resize;
|
|
204
|
+
margin-top: -3px;
|
|
205
|
+
right: -3px;
|
|
206
|
+
top: 50%;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.cropper-point.point-n {
|
|
210
|
+
cursor: ns-resize;
|
|
211
|
+
left: 50%;
|
|
212
|
+
margin-left: -3px;
|
|
213
|
+
top: -3px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.cropper-point.point-w {
|
|
217
|
+
cursor: ew-resize;
|
|
218
|
+
left: -3px;
|
|
219
|
+
margin-top: -3px;
|
|
220
|
+
top: 50%;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.cropper-point.point-s {
|
|
224
|
+
bottom: -3px;
|
|
225
|
+
cursor: s-resize;
|
|
226
|
+
left: 50%;
|
|
227
|
+
margin-left: -3px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.cropper-point.point-ne {
|
|
231
|
+
cursor: nesw-resize;
|
|
232
|
+
right: -3px;
|
|
233
|
+
top: -3px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.cropper-point.point-nw {
|
|
237
|
+
cursor: nwse-resize;
|
|
238
|
+
left: -3px;
|
|
239
|
+
top: -3px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.cropper-point.point-sw {
|
|
243
|
+
bottom: -3px;
|
|
244
|
+
cursor: nesw-resize;
|
|
245
|
+
left: -3px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.cropper-point.point-se {
|
|
249
|
+
bottom: -3px;
|
|
250
|
+
cursor: nwse-resize;
|
|
251
|
+
height: 20px;
|
|
252
|
+
opacity: 1;
|
|
253
|
+
right: -3px;
|
|
254
|
+
width: 20px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
@media (min-width: 768px) {
|
|
258
|
+
.cropper-point.point-se {
|
|
259
|
+
height: 15px;
|
|
260
|
+
width: 15px;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@media (min-width: 992px) {
|
|
265
|
+
.cropper-point.point-se {
|
|
266
|
+
height: 10px;
|
|
267
|
+
width: 10px;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@media (min-width: 1200px) {
|
|
272
|
+
.cropper-point.point-se {
|
|
273
|
+
height: 5px;
|
|
274
|
+
opacity: 0.75;
|
|
275
|
+
width: 5px;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.cropper-point.point-se::before {
|
|
280
|
+
background-color: #39f;
|
|
281
|
+
bottom: -50%;
|
|
282
|
+
content: " ";
|
|
283
|
+
display: block;
|
|
284
|
+
height: 200%;
|
|
285
|
+
opacity: 0;
|
|
286
|
+
position: absolute;
|
|
287
|
+
right: -50%;
|
|
288
|
+
width: 200%;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.cropper-invisible {
|
|
292
|
+
opacity: 0;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.cropper-bg {
|
|
296
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.cropper-hide {
|
|
300
|
+
display: block;
|
|
301
|
+
height: 0;
|
|
302
|
+
position: absolute;
|
|
303
|
+
width: 0;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.cropper-hidden {
|
|
307
|
+
display: none !important;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.cropper-move {
|
|
311
|
+
cursor: move;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.cropper-crop {
|
|
315
|
+
cursor: crosshair;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.cropper-disabled .cropper-drag-box,
|
|
319
|
+
.cropper-disabled .cropper-face,
|
|
320
|
+
.cropper-disabled .cropper-line,
|
|
321
|
+
.cropper-disabled .cropper-point {
|
|
322
|
+
cursor: not-allowed;
|
|
323
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const style = css `:host{display:flex;width:100%}.description{font-size:.675rem;text-transform:uppercase;opacity:.3;margin-top:8px}.drop{display:flex;width:100%;position:relative;min-height:160px;background-color:var(--md-sys-color-surface-variant);color:var(--md-sys-color-on-surface);border:1px dashed var(--md-sys-color-outline);border-radius:10px;box-sizing:border-box}.drop-container{flex:1;display:flex;padding:1rem;justify-content:center;align-items:center;flex-direction:column}.drop-text{font-size:1rem;margin-top:8px;width:85%;overflow:hidden;text-overflow:ellipsis;text-align:center}.drop.dropHover{background-image:url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='10' ry='10' stroke='%230071dc' stroke-width='4' stroke-dasharray='6%2c 10' stroke-dashoffset='6' stroke-linecap='square'/%3e%3c/svg%3e")}`;
|
|
3
|
+
export default style;
|
|
4
|
+
//# sourceMappingURL=exm-upload-drop-area-styles-css.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.description {
|
|
7
|
+
font-size: 0.675rem;
|
|
8
|
+
text-transform: uppercase;
|
|
9
|
+
opacity: 0.3;
|
|
10
|
+
margin-top: 8px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.drop {
|
|
14
|
+
display: flex;
|
|
15
|
+
width: 100%;
|
|
16
|
+
position: relative;
|
|
17
|
+
min-height: 160px;
|
|
18
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
19
|
+
color: var(--md-sys-color-on-surface);
|
|
20
|
+
border: 1px dashed var(--md-sys-color-outline);
|
|
21
|
+
border-radius: 10px;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.drop-container {
|
|
26
|
+
flex: 1;
|
|
27
|
+
display: flex;
|
|
28
|
+
padding: 1rem;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.drop-text {
|
|
35
|
+
font-size: 1rem;
|
|
36
|
+
margin-top: 8px;
|
|
37
|
+
width: 85%;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.drop.dropHover {
|
|
44
|
+
background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='10' ry='10' stroke='%230071dc' stroke-width='4' stroke-dasharray='6%2c 10' stroke-dashoffset='6' stroke-linecap='square'/%3e%3c/svg%3e");
|
|
45
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const style = css `:host{display:inline-flex}.input-wrapper{display:flex;flex-direction:column}.icon{margin-left:var(--exm-upload-input-icon-margin-left, 8px)}.icon svg{width:var(--exm-upload-input-icon-size, 24px);height:var(--exm-upload-input-icon-size, 24px);fill:var(--exm-upload-input-icon-fill, #0071dc)}`;
|
|
3
|
+
export default style;
|
|
4
|
+
//# sourceMappingURL=exm-upload-input-css.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.input-wrapper {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.icon {
|
|
11
|
+
margin-left: var(--exm-upload-input-icon-margin-left, 8px);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.icon svg {
|
|
15
|
+
width: var(--exm-upload-input-icon-size, 24px);
|
|
16
|
+
height: var(--exm-upload-input-icon-size, 24px);
|
|
17
|
+
fill: var(--exm-upload-input-icon-fill, #0071dc);
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const style = css `:host{display:flex;align-items:center;height:65px;border-bottom:1px solid var(--md-sys-color-outline-variant);padding-bottom:6px;margin-bottom:6px}.item{display:grid;height:65px;width:100%;grid-template-columns:2rem 1fr 6rem;grid-auto-flow:column;align-items:center}.vertical-center{display:flex;align-items:center}.loader{width:18px;height:18px;border:3px solid var(--md-sys-color-primary);border-bottom-color:rgba(0,0,0,0);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}.name-container{margin-left:16px;display:flex;flex-direction:column;gap:4px;width:100%}.file-name{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-error{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-details{display:flex;flex-direction:row;justify-content:space-between}.file-error{font-size:.7rem;background-color:var(--md-sys-color-error-container, #b00020);color:var(--md-sys-color-on-error-container, white);padding:2px 4px;border-radius:6px}.actions{display:flex;justify-content:flex-end;justify-self:flex-end;width:60px}.error-icon,.error-icon svg{fill:#b00020;font-weight:bold;width:32px;height:32px}.success-icon{--md-icon-color: green;--md-icon-size: 32px;--md-icon-weight: 400}.badge{display:flex;align-items:center;background-color:var(--md-ref-palette-primary-primary50);margin-right:4px;border-radius:4px;color:var(--md-ref-palette-primary-primary80);padding:6px;font-size:.6rem;height:.4rem;font-weight:bold;line-height:1.75;letter-spacing:.5px}.status{display:flex;justify-content:center}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}`;
|
|
3
|
+
export default style;
|
|
4
|
+
//# sourceMappingURL=exm-upload-item-styles-css.js.map
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 65px;
|
|
5
|
+
border-bottom: 1px solid var(--md-sys-color-outline-variant);
|
|
6
|
+
padding-bottom: 6px;
|
|
7
|
+
margin-bottom: 6px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.item {
|
|
11
|
+
display: grid;
|
|
12
|
+
height: 65px;
|
|
13
|
+
width: 100%;
|
|
14
|
+
grid-template-columns: 2rem 1fr 6rem;
|
|
15
|
+
grid-auto-flow: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.vertical-center {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.loader {
|
|
25
|
+
width: 18px;
|
|
26
|
+
height: 18px;
|
|
27
|
+
border: 3px solid var(--md-sys-color-primary);
|
|
28
|
+
border-bottom-color: transparent;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
animation: rotation 1s linear infinite;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.name-container {
|
|
36
|
+
margin-left: 16px;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
gap: 4px;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.file-name {
|
|
44
|
+
width: 100%;
|
|
45
|
+
white-space: nowrap;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.file-error {
|
|
51
|
+
width: 100%;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.file-details {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.file-error {
|
|
64
|
+
font-size: 0.7rem;
|
|
65
|
+
background-color: var(--md-sys-color-error-container, #b00020);
|
|
66
|
+
color: var(--md-sys-color-on-error-container, white);
|
|
67
|
+
padding: 2px 4px;
|
|
68
|
+
border-radius: 6px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.actions {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: flex-end;
|
|
74
|
+
justify-self: flex-end;
|
|
75
|
+
width: 60px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.error-icon,
|
|
79
|
+
.error-icon svg {
|
|
80
|
+
fill: #b00020;
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
width: 32px;
|
|
83
|
+
height: 32px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.success-icon {
|
|
87
|
+
--md-icon-color: green;
|
|
88
|
+
--md-icon-size: 32px;
|
|
89
|
+
--md-icon-weight: 400;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.badge {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
background-color: var(--md-ref-palette-primary-primary50);
|
|
96
|
+
margin-right: 4px;
|
|
97
|
+
border-radius: 4px;
|
|
98
|
+
color: var(--md-ref-palette-primary-primary80);
|
|
99
|
+
padding: 6px;
|
|
100
|
+
font-size: 0.6rem;
|
|
101
|
+
height: 0.4rem;
|
|
102
|
+
font-weight: bold;
|
|
103
|
+
line-height: 1.75;
|
|
104
|
+
letter-spacing: 0.5px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.status {
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@keyframes rotation {
|
|
113
|
+
0% {
|
|
114
|
+
transform: rotate(0deg);
|
|
115
|
+
}
|
|
116
|
+
100% {
|
|
117
|
+
transform: rotate(360deg);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const style = css `:host{display:flex;color:var(--exm-upload-text-color, #000);color:var(--_supporting-text-color);font:var(--_supporting-text-type);flex-direction:column;justify-content:center;align-items:center;gap:.5rem;padding:8px 0 8px 0;--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-type: var( --md-dialog-supporting-text-type, 400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto) )}.image-upload-wrapper{display:flex;width:100%;flex-direction:row}#preview{max-width:80px;max-height:80px}.preview-wrapper{margin:1rem}.info-wrapper{display:flex;margin-left:1.5rem;flex-direction:column;padding:1rem;gap:12px}.info{display:flex;flex-direction:column;gap:8px}.description{color:var(--exm-upload-description-text-color, #a7a7a7);font-size:.9rem;margin-bottom:1rem}.browse{width:50%}exm-button{display:flex;align-items:center}.click-label{position:absolute;width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;cursor:pointer}img{z-index:99999;display:block;max-width:100%}.image-container{width:200px;height:200px}.error-message{display:flex;align-items:center;gap:1rem;background-color:#dedede;width:450px;padding:8px;color:#f02d2d;border-radius:4px;margin-bottom:1rem;box-sizing:border-box}.item{width:100%}.item-container{width:100%}.item:first-child{margin-top:1rem}.item:last-child{border-bottom:none}.actions{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:2rem;align-items:center}.actions .icon-buttons{display:flex;flex-direction:row;gap:8px}.disabled{opacity:.5;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none}exm-upload-drop-area a{color:var(--md-sys-color-primary);text-decoration:none}exm-upload-drop-area md-icon{fill:#0071dc;--md-icon-color: var(--md-sys-color-primary);--md-icon-size: 48px;--md-icon-weight: 600}`;
|
|
3
|
+
export default style;
|
|
4
|
+
//# sourceMappingURL=exm-upload-styles-css.js.map
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
color: var(--exm-upload-text-color, #000);
|
|
4
|
+
color: var(--_supporting-text-color);
|
|
5
|
+
font: var(--_supporting-text-type);
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 0.5rem;
|
|
10
|
+
padding: 8px 0 8px 0;
|
|
11
|
+
--_supporting-text-color: var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));
|
|
12
|
+
--_supporting-text-type: var(
|
|
13
|
+
--md-dialog-supporting-text-type,
|
|
14
|
+
400 0.875rem / 1.25rem var(--md-ref-typeface-plain, Roboto)
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.image-upload-wrapper {
|
|
19
|
+
display: flex;
|
|
20
|
+
width: 100%;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
#preview {
|
|
25
|
+
max-width: 80px;
|
|
26
|
+
max-height: 80px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.preview-wrapper {
|
|
30
|
+
margin: 1rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.info-wrapper {
|
|
34
|
+
display: flex;
|
|
35
|
+
margin-left: 1.5rem;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
padding: 1rem;
|
|
38
|
+
gap: 12px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.info {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.description {
|
|
48
|
+
color: var(--exm-upload-description-text-color, #a7a7a7);
|
|
49
|
+
font-size: 0.9rem;
|
|
50
|
+
margin-bottom: 1rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.browse {
|
|
54
|
+
width: 50%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exm-button {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.click-label {
|
|
63
|
+
position: absolute;
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
img {
|
|
74
|
+
z-index: 99999;
|
|
75
|
+
display: block;
|
|
76
|
+
|
|
77
|
+
/* This rule is very important, please don't ignore this */
|
|
78
|
+
max-width: 100%;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.image-container {
|
|
82
|
+
width: 200px;
|
|
83
|
+
height: 200px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.error-message {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: 1rem;
|
|
90
|
+
background-color: #dedede;
|
|
91
|
+
width: 450px;
|
|
92
|
+
padding: 8px;
|
|
93
|
+
color: hsl(0, 87%, 56%);
|
|
94
|
+
border-radius: 4px;
|
|
95
|
+
margin-bottom: 1rem;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.item {
|
|
100
|
+
width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.item-container {
|
|
104
|
+
width: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.item:first-child {
|
|
108
|
+
margin-top: 1rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.item:last-child {
|
|
112
|
+
border-bottom: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.actions {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: row;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
margin-bottom: 2rem;
|
|
120
|
+
align-items: center;
|
|
121
|
+
.icon-buttons {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: row;
|
|
124
|
+
gap: 8px;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.disabled {
|
|
129
|
+
opacity: 0.5;
|
|
130
|
+
-webkit-user-select: none;
|
|
131
|
+
-khtml-user-select: none;
|
|
132
|
+
-moz-user-select: none;
|
|
133
|
+
-o-user-select: none;
|
|
134
|
+
user-select: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
exm-upload-drop-area a {
|
|
138
|
+
color: var(--md-sys-color-primary);
|
|
139
|
+
text-decoration: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
exm-upload-drop-area md-icon {
|
|
143
|
+
fill: #0071dc;
|
|
144
|
+
--md-icon-color: var(--md-sys-color-primary);
|
|
145
|
+
--md-icon-size: 48px;
|
|
146
|
+
--md-icon-weight: 600;
|
|
147
|
+
}
|