@uploadcare/file-uploader 0.50.1 → 1.1.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 +16 -16
- package/abstract/Block.d.ts.map +1 -1
- package/abstract/Block.js +4 -2
- package/abstract/SolutionBlock.js +2 -2
- package/abstract/connectBlocksFrom.d.ts +1 -1
- package/abstract/connectBlocksFrom.js +4 -4
- package/abstract/registerBlocks.d.ts.map +1 -1
- package/abstract/registerBlocks.js +3 -2
- package/blocks/ActivityHeader/activity-header.css +2 -2
- package/blocks/CameraSource/CameraSource.js +8 -8
- package/blocks/CameraSource/camera-source.css +14 -14
- package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +1 -1
- package/blocks/CloudImageEditor/src/EditorButtonControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorFilterControl.js +1 -1
- package/blocks/CloudImageEditor/src/EditorImageCropper.js +1 -1
- package/blocks/CloudImageEditor/src/EditorSlider.js +2 -2
- package/blocks/CloudImageEditor/src/EditorToolbar.js +20 -20
- package/blocks/CloudImageEditor/src/css/common.css +142 -142
- package/blocks/CloudImageEditor/src/css/icons.css +2 -2
- package/blocks/CloudImageEditor/src/elements/button/{LrBtnUi.d.ts → BtnUi.d.ts} +3 -3
- package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -0
- package/blocks/CloudImageEditor/src/elements/button/{LrBtnUi.js → BtnUi.js} +4 -4
- package/blocks/CloudImageEditor/src/index.d.ts +1 -1
- package/blocks/CloudImageEditor/src/index.js +1 -1
- package/blocks/CloudImageEditor/src/template.js +8 -8
- package/blocks/CloudImageEditor/src/util.d.ts.map +1 -1
- package/blocks/CloudImageEditor/src/util.js +2 -0
- package/blocks/CloudImageEditorActivity/index.css +2 -2
- package/blocks/Config/Config.d.ts +1 -1
- package/blocks/Config/Config.js +7 -7
- package/blocks/Config/config.css +1 -1
- package/blocks/Copyright/copyright.css +4 -4
- package/blocks/DropArea/DropArea.d.ts +1 -1
- package/blocks/DropArea/DropArea.js +4 -4
- package/blocks/DropArea/drop-area.css +34 -34
- package/blocks/ExternalSource/ExternalSource.js +5 -5
- package/blocks/ExternalSource/external-source.css +9 -9
- package/blocks/FileItem/FileItem.js +5 -5
- package/blocks/FileItem/file-item.css +22 -22
- package/blocks/Icon/icon.css +2 -2
- package/blocks/Img/ImgConfig.js +1 -1
- package/blocks/Img/configurations.d.ts +1 -1
- package/blocks/Img/configurations.js +1 -1
- package/blocks/Img/test.css +5 -5
- package/blocks/Modal/Modal.js +1 -1
- package/blocks/Modal/modal.css +15 -15
- package/blocks/ProgressBar/progress-bar.css +3 -3
- package/blocks/ProgressBarCommon/ProgressBarCommon.js +1 -1
- package/blocks/ProgressBarCommon/progress-bar-common.css +2 -2
- package/blocks/Range/range.css +8 -8
- package/blocks/Select/select.css +2 -2
- package/blocks/SimpleBtn/SimpleBtn.js +4 -4
- package/blocks/SimpleBtn/simple-btn.css +11 -11
- package/blocks/SourceBtn/SourceBtn.js +1 -1
- package/blocks/SourceBtn/source-btn.css +5 -5
- package/blocks/SourceList/SourceList.js +1 -1
- package/blocks/StartFrom/start-from.css +5 -5
- package/blocks/UploadList/UploadList.js +6 -6
- package/blocks/UploadList/upload-list.css +10 -10
- package/blocks/UrlSource/UrlSource.js +5 -5
- package/blocks/UrlSource/url-source.css +4 -4
- package/blocks/themes/{lr-basic → uc-basic}/common.css +19 -19
- package/blocks/themes/{lr-basic → uc-basic}/config.css +1 -1
- package/blocks/themes/{lr-basic → uc-basic}/theme.css +7 -7
- package/env.d.ts +1 -1
- package/env.d.ts.map +1 -1
- package/env.js +1 -1
- package/index.ssr.d.ts +10 -10
- package/index.ssr.d.ts.map +1 -1
- package/index.ssr.js +108 -108
- package/package.json +1 -1
- package/solutions/adaptive-image/index.js +1 -1
- package/solutions/cloud-image-editor/CloudImageEditor.js +1 -1
- package/solutions/cloud-image-editor/index.css +1 -1
- package/solutions/file-uploader/inline/FileUploaderInline.js +12 -12
- package/solutions/file-uploader/inline/index.css +12 -12
- package/solutions/file-uploader/minimal/FileUploaderMinimal.js +6 -6
- package/solutions/file-uploader/minimal/index.css +25 -25
- package/solutions/file-uploader/regular/FileUploaderRegular.js +15 -15
- package/solutions/file-uploader/regular/index.css +1 -1
- package/types/global.d.ts +2 -2
- package/types/jsx.d.ts +37 -37
- package/utils/cdn-utils.d.ts.map +1 -1
- package/utils/cdn-utils.js +0 -2
- package/web/blocks.iife.min.js +4 -4
- package/web/blocks.min.js +4 -4
- package/web/{lr-file-uploader-regular.min.css → uc-basic.min.css} +1 -1
- package/web/{lr-cloud-image-editor.min.css → uc-cloud-image-editor.min.css} +1 -1
- package/web/uc-cloud-image-editor.min.js +29 -0
- package/web/{lr-file-uploader-inline.min.css → uc-file-uploader-inline.min.css} +1 -1
- package/web/uc-file-uploader-inline.min.js +29 -0
- package/web/{lr-file-uploader-minimal.min.css → uc-file-uploader-minimal.min.css} +1 -1
- package/web/uc-file-uploader-minimal.min.js +28 -0
- package/web/{lr-basic.min.css → uc-file-uploader-regular.min.css} +1 -1
- package/web/uc-file-uploader-regular.min.js +29 -0
- package/web/uc-img.min.js +28 -0
- package/blocks/CloudImageEditor/src/elements/button/LrBtnUi.d.ts.map +0 -1
- package/web/lr-cloud-image-editor.min.js +0 -29
- package/web/lr-file-uploader-inline.min.js +0 -29
- package/web/lr-file-uploader-minimal.min.js +0 -28
- package/web/lr-file-uploader-regular.min.js +0 -29
- package/web/lr-img.min.js +0 -28
- /package/blocks/themes/{lr-basic → uc-basic}/index.css +0 -0
- /package/blocks/themes/{lr-basic → uc-basic}/svg-sprite.d.ts +0 -0
- /package/blocks/themes/{lr-basic → uc-basic}/svg-sprite.d.ts.map +0 -0
- /package/blocks/themes/{lr-basic → uc-basic}/svg-sprite.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-file-item {
|
|
2
2
|
--uc-file-item-gap: 4px;
|
|
3
3
|
--uc-file-item-height: calc(var(--uc-preview-size) + var(--uc-padding) * 2 + var(--uc-file-item-gap));
|
|
4
4
|
|
|
@@ -7,11 +7,11 @@ lr-file-item {
|
|
|
7
7
|
min-height: var(--uc-file-item-height);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
uc-file-item:last-of-type {
|
|
11
11
|
--uc-file-item-gap: 0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
uc-file-item > .uc-inner {
|
|
15
15
|
position: relative;
|
|
16
16
|
display: grid;
|
|
17
17
|
grid-template-columns: var(--uc-preview-size) 1fr max-content;
|
|
@@ -26,19 +26,19 @@ lr-file-item > .uc-inner {
|
|
|
26
26
|
transition: background-color var(--uc-transition);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
uc-file-item > .uc-inner[focused] {
|
|
30
30
|
background-color: transparent;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
uc-file-item > .uc-inner[uploading] .uc-edit-btn {
|
|
34
34
|
display: none;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
uc-file-item > :where(.uc-inner[failed], .uc-inner[limit-overflow]) {
|
|
38
38
|
background-color: var(--uc-destructive);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
uc-file-item .uc-thumb {
|
|
42
42
|
position: relative;
|
|
43
43
|
display: inline-flex;
|
|
44
44
|
width: var(--uc-preview-size);
|
|
@@ -49,7 +49,7 @@ lr-file-item .uc-thumb {
|
|
|
49
49
|
border-radius: var(--uc-radius);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
uc-file-item .uc-file-name-wrapper {
|
|
53
53
|
text-align: left;
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: column;
|
|
@@ -62,33 +62,33 @@ lr-file-item .uc-file-name-wrapper {
|
|
|
62
62
|
color: var(--uc-muted-foreground);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
uc-file-item .uc-file-name {
|
|
66
66
|
max-width: 100%;
|
|
67
67
|
overflow: hidden;
|
|
68
68
|
white-space: nowrap;
|
|
69
69
|
text-overflow: ellipsis;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
uc-file-item .uc-file-error {
|
|
73
73
|
display: none;
|
|
74
74
|
color: var(--uc-destructive-foreground);
|
|
75
75
|
font-size: 0.85em;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
uc-file-item button.uc-remove-btn,
|
|
79
|
+
uc-file-item button.uc-edit-btn {
|
|
80
80
|
color: var(--uc-muted-foreground);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
uc-file-item button svg {
|
|
84
84
|
pointer-events: none;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
uc-file-item button.uc-upload-btn {
|
|
88
88
|
display: none;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
uc-file-item .uc-badge {
|
|
92
92
|
position: absolute;
|
|
93
93
|
bottom: 2px;
|
|
94
94
|
right: 2px;
|
|
@@ -107,32 +107,32 @@ lr-file-item .uc-badge {
|
|
|
107
107
|
align-items: center;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
uc-file-item > .uc-inner:where([failed], [limit-overflow], [finished]) .uc-badge {
|
|
111
111
|
transform: scale(1);
|
|
112
112
|
opacity: 1;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
uc-file-item > .uc-inner:where([failed], [limit-overflow]) .uc-badge {
|
|
116
116
|
background-color: var(--uc-destructive-foreground);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
uc-file-item > .uc-inner:where([failed], [limit-overflow]) .uc-file-error {
|
|
120
120
|
display: block;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
uc-file-item .uc-badge uc-icon,
|
|
124
|
+
uc-file-item .uc-badge uc-icon svg {
|
|
125
125
|
width: 100%;
|
|
126
126
|
height: 100%;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
uc-file-item .uc-progress-bar {
|
|
130
130
|
opacity: 0.5;
|
|
131
131
|
top: calc(100% - 2px);
|
|
132
132
|
height: 2px;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
uc-file-item .uc-file-actions {
|
|
136
136
|
display: flex;
|
|
137
137
|
gap: 2px;
|
|
138
138
|
align-items: center;
|
package/blocks/Icon/icon.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-icon {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -6,7 +6,7 @@ lr-icon {
|
|
|
6
6
|
height: var(--uc-button-size);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
uc-icon svg {
|
|
10
10
|
width: calc(var(--uc-button-size) / 2);
|
|
11
11
|
height: calc(var(--uc-button-size) / 2);
|
|
12
12
|
}
|
package/blocks/Img/ImgConfig.js
CHANGED
package/blocks/Img/test.css
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
--
|
|
3
|
-
--
|
|
1
|
+
uc-img {
|
|
2
|
+
--uc-img-pubkey: '364c0864158c27472ffe';
|
|
3
|
+
--uc-img-test: 'TEST';
|
|
4
4
|
|
|
5
5
|
display: contents;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
uc-img > img {
|
|
9
9
|
transition: 1s;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
uc-img > img[unresolved] {
|
|
13
13
|
transform: scale(0.8);
|
|
14
14
|
opacity: 0;
|
|
15
15
|
transition: 1s;
|
package/blocks/Modal/Modal.js
CHANGED
package/blocks/Modal/modal.css
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
:where([
|
|
1
|
+
:where([uc-modal]) {
|
|
2
2
|
--modal-max-content-height: calc(
|
|
3
3
|
var(--uploadcare-blocks-window-height, 100vh) - 4 * var(--uc-padding) - var(--uc-button-size)
|
|
4
4
|
);
|
|
5
5
|
--modal-content-height-fill: var(--uploadcare-blocks-window-height, 100vh);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
:where([
|
|
9
|
-
--
|
|
8
|
+
:where([uc-modal])[dialog-fallback] {
|
|
9
|
+
--uc-z-max: 2147483647;
|
|
10
10
|
|
|
11
11
|
position: fixed;
|
|
12
|
-
z-index: var(--
|
|
12
|
+
z-index: var(--uc-z-max);
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: center;
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
inset: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
:where([
|
|
23
|
-
z-index: var(--
|
|
22
|
+
:where([uc-modal])[dialog-fallback] dialog[open] {
|
|
23
|
+
z-index: var(--uc-z-max);
|
|
24
24
|
pointer-events: auto;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:where([
|
|
27
|
+
:where([uc-modal])[dialog-fallback] dialog[open] + .uc-backdrop {
|
|
28
28
|
position: fixed;
|
|
29
29
|
top: 0px;
|
|
30
30
|
left: 0px;
|
|
31
|
-
z-index: calc(var(--
|
|
31
|
+
z-index: calc(var(--uc-z-max) - 1);
|
|
32
32
|
align-items: center;
|
|
33
33
|
justify-content: center;
|
|
34
34
|
width: 100vw;
|
|
@@ -37,34 +37,34 @@
|
|
|
37
37
|
pointer-events: auto;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
:where([
|
|
40
|
+
:where([uc-modal])[strokes][dialog-fallback] dialog[open] + .uc-backdrop {
|
|
41
41
|
background-image: var(--modal-backdrop-background-image);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@supports selector(dialog::backdrop) {
|
|
45
|
-
:where([
|
|
45
|
+
:where([uc-modal]) > dialog::backdrop {
|
|
46
46
|
/* backdrop don't inherit theme properties */
|
|
47
47
|
background-color: oklch(0 0 0 / 0.1);
|
|
48
48
|
}
|
|
49
|
-
:where([
|
|
49
|
+
:where([uc-modal])[strokes] > dialog::backdrop {
|
|
50
50
|
/* TODO: it's not working, fix it */
|
|
51
51
|
background-image: var(--modal-backdrop-background-image);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
:where([
|
|
55
|
+
:where([uc-modal]) > dialog[open] {
|
|
56
56
|
transform: translateY(0px);
|
|
57
57
|
visibility: visible;
|
|
58
58
|
opacity: 1;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
:where([
|
|
61
|
+
:where([uc-modal]) > dialog:not([open]) {
|
|
62
62
|
transform: translateY(20px);
|
|
63
63
|
visibility: hidden;
|
|
64
64
|
opacity: 0;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
:where([
|
|
67
|
+
:where([uc-modal]) > dialog {
|
|
68
68
|
display: flex;
|
|
69
69
|
flex-direction: column;
|
|
70
70
|
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
@media only screen and (max-width: 430px), only screen and (max-height: 600px) {
|
|
89
|
-
:where([
|
|
89
|
+
:where([uc-modal]) > dialog > .uc-content {
|
|
90
90
|
height: var(--modal-max-content-height);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-progress-bar {
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 0;
|
|
4
4
|
bottom: 0;
|
|
@@ -9,7 +9,7 @@ lr-progress-bar {
|
|
|
9
9
|
pointer-events: none;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
uc-progress-bar .uc-progress {
|
|
13
13
|
width: calc(var(--l-width) * 1%);
|
|
14
14
|
height: 100%;
|
|
15
15
|
background-color: var(--uc-primary);
|
|
@@ -20,6 +20,6 @@ lr-progress-bar .uc-progress {
|
|
|
20
20
|
opacity 0.3s;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
uc-progress-bar .uc-progress--hidden {
|
|
24
24
|
opacity: 0;
|
|
25
25
|
}
|
|
@@ -41,4 +41,4 @@ export class ProgressBarCommon extends UploaderBlock {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
ProgressBarCommon.template = /* HTML */ ` <
|
|
44
|
+
ProgressBarCommon.template = /* HTML */ ` <uc-progress-bar set="visible: visible; value: value"></uc-progress-bar> `;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-progress-bar-common {
|
|
2
2
|
position: fixed;
|
|
3
3
|
right: 0;
|
|
4
4
|
bottom: 0;
|
|
@@ -10,7 +10,7 @@ lr-progress-bar-common {
|
|
|
10
10
|
transition: opacity 0.3s;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
uc-progress-bar-common:not([active]) {
|
|
14
14
|
opacity: 0;
|
|
15
15
|
pointer-events: none;
|
|
16
16
|
}
|
package/blocks/Range/range.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-range {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -6,17 +6,17 @@ lr-range {
|
|
|
6
6
|
height: var(--uc-button-size);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
uc-range datalist {
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
uc-range input {
|
|
14
14
|
width: 100%;
|
|
15
15
|
height: 100%;
|
|
16
16
|
opacity: 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
uc-range .uc-track-wrapper {
|
|
20
20
|
position: absolute;
|
|
21
21
|
right: 10px;
|
|
22
22
|
left: 10px;
|
|
@@ -28,7 +28,7 @@ lr-range .uc-track-wrapper {
|
|
|
28
28
|
pointer-events: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
uc-range .uc-track {
|
|
32
32
|
position: absolute;
|
|
33
33
|
right: 0;
|
|
34
34
|
left: 0;
|
|
@@ -41,7 +41,7 @@ lr-range .uc-track {
|
|
|
41
41
|
opacity: 0.5;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
uc-range .uc-slider {
|
|
45
45
|
position: absolute;
|
|
46
46
|
width: 16px;
|
|
47
47
|
height: 16px;
|
|
@@ -50,7 +50,7 @@ lr-range .uc-slider {
|
|
|
50
50
|
transform: translateX(-50%);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
uc-range .uc-bar {
|
|
54
54
|
position: absolute;
|
|
55
55
|
left: 0;
|
|
56
56
|
height: 100%;
|
|
@@ -58,7 +58,7 @@ lr-range .uc-bar {
|
|
|
58
58
|
border-radius: 2px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
uc-range .uc-caption {
|
|
62
62
|
position: absolute;
|
|
63
63
|
display: inline-flex;
|
|
64
64
|
justify-content: center;
|
package/blocks/Select/select.css
CHANGED
|
@@ -3,7 +3,7 @@ import { UploaderBlock } from '../../abstract/UploaderBlock.js';
|
|
|
3
3
|
import { asBoolean } from '../Config/normalizeConfigValue.js';
|
|
4
4
|
|
|
5
5
|
export class SimpleBtn extends UploaderBlock {
|
|
6
|
-
static styleAttrs = [...super.styleAttrs, '
|
|
6
|
+
static styleAttrs = [...super.styleAttrs, 'uc-simple-btn'];
|
|
7
7
|
couldBeCtxOwner = true;
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
@@ -38,14 +38,14 @@ export class SimpleBtn extends UploaderBlock {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
SimpleBtn.template = /* HTML */ `
|
|
41
|
-
<
|
|
41
|
+
<uc-drop-area set="@disabled: !withDropZone">
|
|
42
42
|
<button type="button" set="onclick: onClick">
|
|
43
|
-
<
|
|
43
|
+
<uc-icon name="upload"></uc-icon>
|
|
44
44
|
<span l10n="button-text"></span>
|
|
45
45
|
<slot></slot>
|
|
46
46
|
<div class="uc-visual-drop-area" l10n="drop-files-here"></div>
|
|
47
47
|
</button>
|
|
48
|
-
</
|
|
48
|
+
</uc-drop-area>
|
|
49
49
|
`;
|
|
50
50
|
|
|
51
51
|
SimpleBtn.bindAttributes({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
:where([
|
|
1
|
+
:where([uc-simple-btn]) {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
:where([
|
|
6
|
+
:where([uc-simple-btn]) button {
|
|
7
7
|
height: auto;
|
|
8
8
|
gap: 0.5em;
|
|
9
9
|
padding: var(--uc-simple-btn-padding);
|
|
@@ -13,25 +13,25 @@
|
|
|
13
13
|
font-family: var(--uc-simple-btn-font-family);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
:where([
|
|
16
|
+
:where([uc-simple-btn]) button uc-icon {
|
|
17
17
|
width: auto;
|
|
18
18
|
height: auto;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
:where([
|
|
21
|
+
:where([uc-simple-btn]) button uc-icon svg {
|
|
22
22
|
width: 0.9em;
|
|
23
23
|
height: 0.9em;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
:where([
|
|
26
|
+
:where([uc-simple-btn]) button:hover {
|
|
27
27
|
background-color: var(--uc-simple-btn-hover);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
:where([
|
|
30
|
+
:where([uc-simple-btn]) > uc-drop-area {
|
|
31
31
|
display: contents;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
:where([
|
|
34
|
+
:where([uc-simple-btn]) .uc-visual-drop-area {
|
|
35
35
|
position: absolute;
|
|
36
36
|
top: 0px;
|
|
37
37
|
left: 0px;
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
transition: opacity var(--uc-transition);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
:where([
|
|
53
|
+
:where([uc-simple-btn]) > uc-drop-area[drag-state='active'] .uc-visual-drop-area {
|
|
54
54
|
opacity: 1;
|
|
55
55
|
}
|
|
56
|
-
:where([
|
|
56
|
+
:where([uc-simple-btn]) > uc-drop-area[drag-state='inactive'] .uc-visual-drop-area {
|
|
57
57
|
opacity: 0;
|
|
58
58
|
}
|
|
59
|
-
:where([
|
|
59
|
+
:where([uc-simple-btn]) > uc-drop-area[drag-state='near'] .uc-visual-drop-area {
|
|
60
60
|
opacity: 1;
|
|
61
61
|
}
|
|
62
|
-
:where([
|
|
62
|
+
:where([uc-simple-btn]) > uc-drop-area[drag-state='over'] .uc-visual-drop-area {
|
|
63
63
|
opacity: 1;
|
|
64
64
|
}
|
|
@@ -135,7 +135,7 @@ export class SourceBtn extends UploaderBlock {
|
|
|
135
135
|
|
|
136
136
|
SourceBtn.template = /* HTML */ `
|
|
137
137
|
<button type="button">
|
|
138
|
-
<
|
|
138
|
+
<uc-icon set="@name: iconName"></uc-icon>
|
|
139
139
|
<div class="uc-txt" l10n="src-type"></div>
|
|
140
140
|
</button>
|
|
141
141
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-source-btn > button {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
margin-bottom: 2px;
|
|
@@ -15,16 +15,16 @@ lr-source-btn > button {
|
|
|
15
15
|
height: unset;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
uc-source-btn:last-child > button {
|
|
19
19
|
margin-bottom: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
uc-source-btn > button:hover {
|
|
23
23
|
color: var(--uc-primary);
|
|
24
24
|
background-color: var(--uc-primary-transparent);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
uc-source-btn uc-icon {
|
|
28
28
|
display: inline-flex;
|
|
29
29
|
flex-grow: 1;
|
|
30
30
|
justify-content: center;
|
|
@@ -33,7 +33,7 @@ lr-source-btn lr-icon {
|
|
|
33
33
|
opacity: 0.8;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
uc-source-btn .uc-txt {
|
|
37
37
|
display: flex;
|
|
38
38
|
align-items: center;
|
|
39
39
|
box-sizing: border-box;
|
|
@@ -8,7 +8,7 @@ export class SourceList extends Block {
|
|
|
8
8
|
let list = stringToArray(val);
|
|
9
9
|
let html = '';
|
|
10
10
|
list.forEach((srcName) => {
|
|
11
|
-
html += /* HTML */ `<
|
|
11
|
+
html += /* HTML */ `<uc-source-btn type="${srcName}"></uc-source-btn>`;
|
|
12
12
|
});
|
|
13
13
|
if (this.cfg.sourceListWrap) {
|
|
14
14
|
this.innerHTML = html;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
uc-start-from {
|
|
2
2
|
display: block;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
uc-start-from .uc-content {
|
|
7
7
|
display: grid;
|
|
8
8
|
grid-auto-flow: row;
|
|
9
9
|
gap: calc(var(--uc-padding) * 2);
|
|
@@ -13,7 +13,7 @@ lr-start-from .uc-content {
|
|
|
13
13
|
background-color: var(--uc-background);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
[
|
|
16
|
+
[uc-modal] uc-start-from {
|
|
17
17
|
width: min(
|
|
18
18
|
calc(var(--uc-dialog-width) - var(--uc-padding) * 2),
|
|
19
19
|
calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),
|
|
@@ -21,12 +21,12 @@ lr-start-from .uc-content {
|
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
[
|
|
24
|
+
[uc-modal] uc-start-from uc-drop-area {
|
|
25
25
|
border-radius: var(--uc-radius);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@media only screen and (max-width: 430px) {
|
|
29
|
-
[
|
|
29
|
+
[uc-modal] uc-start-from uc-drop-area {
|
|
30
30
|
display: none;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -194,18 +194,18 @@ export class UploadList extends UploaderBlock {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
UploadList.template = /* HTML */ `
|
|
197
|
-
<
|
|
197
|
+
<uc-activity-header>
|
|
198
198
|
<span class="uc-header-text">{{headerText}}</span>
|
|
199
199
|
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *closeModal">
|
|
200
|
-
<
|
|
200
|
+
<uc-icon name="close"></uc-icon>
|
|
201
201
|
</button>
|
|
202
|
-
</
|
|
202
|
+
</uc-activity-header>
|
|
203
203
|
|
|
204
204
|
<div class="uc-no-files" set="@hidden: hasFiles">
|
|
205
205
|
<slot name="empty"><span l10n="no-files"></span></slot>
|
|
206
206
|
</div>
|
|
207
207
|
|
|
208
|
-
<div class="uc-files" repeat="*uploadList" repeat-item-tag="
|
|
208
|
+
<div class="uc-files" repeat="*uploadList" repeat-item-tag="uc-file-item"></div>
|
|
209
209
|
|
|
210
210
|
<div class="uc-common-error" set="@hidden: !commonErrorMessage; textContent: commonErrorMessage;"></div>
|
|
211
211
|
|
|
@@ -217,7 +217,7 @@ UploadList.template = /* HTML */ `
|
|
|
217
217
|
class="uc-add-more-btn uc-secondary-btn"
|
|
218
218
|
set="onclick: onAdd; @disabled: !addMoreBtnEnabled; @hidden: !addMoreBtnVisible"
|
|
219
219
|
>
|
|
220
|
-
<
|
|
220
|
+
<uc-icon name="add"></uc-icon><span l10n="add-more"></span>
|
|
221
221
|
</button>
|
|
222
222
|
<button
|
|
223
223
|
type="button"
|
|
@@ -233,5 +233,5 @@ UploadList.template = /* HTML */ `
|
|
|
233
233
|
></button>
|
|
234
234
|
</div>
|
|
235
235
|
|
|
236
|
-
<
|
|
236
|
+
<uc-drop-area ghost></uc-drop-area>
|
|
237
237
|
`;
|