@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
|
-
:where([
|
|
1
|
+
:where([uc-cloud-image-editor]) uc-icon {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
height: 100%;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
:where([
|
|
9
|
+
:where([uc-cloud-image-editor]) uc-icon svg {
|
|
10
10
|
width: calc(var(--uc-button-size) / 2);
|
|
11
11
|
height: calc(var(--uc-button-size) / 2);
|
|
12
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class BtnUi extends Block {
|
|
2
2
|
_iconReversed: boolean;
|
|
3
3
|
_iconSingle: boolean;
|
|
4
4
|
_iconHidden: boolean;
|
|
@@ -13,8 +13,8 @@ export class LrBtnUi extends Block {
|
|
|
13
13
|
_iconCss(): string;
|
|
14
14
|
set reverse(val: any);
|
|
15
15
|
}
|
|
16
|
-
export namespace
|
|
16
|
+
export namespace BtnUi {
|
|
17
17
|
let template: string;
|
|
18
18
|
}
|
|
19
19
|
import { Block } from '../../../../../abstract/Block.js';
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=BtnUi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BtnUi.d.ts","sourceRoot":"","sources":["BtnUi.js"],"names":[],"mappings":"AAGA;IAII,uBAA0B;IAC1B,qBAAwB;IACxB,qBAAwB;IAExB;;;;;;;MAQC;IAWH,mBAOC;IAkCD,sBAQC;CACF;;;;sBAhFqB,kCAAkC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Block } from '../../../../../abstract/Block.js';
|
|
2
2
|
import { classNames } from '../../lib/classNames.js';
|
|
3
3
|
|
|
4
|
-
export class
|
|
4
|
+
export class BtnUi extends Block {
|
|
5
5
|
constructor() {
|
|
6
6
|
super();
|
|
7
7
|
|
|
@@ -80,11 +80,11 @@ export class LrBtnUi extends Block {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
BtnUi.bindAttributes({ text: 'text', icon: 'icon', reverse: 'reverse', theme: 'theme' });
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
BtnUi.template = /* HTML */ `
|
|
86
86
|
<button type="button" set="@role:aria-role; @aria-controls: aria-controls">
|
|
87
|
-
<
|
|
87
|
+
<uc-icon set="className: iconCss; @name: icon; @hidden: !icon"></uc-icon>
|
|
88
88
|
<div class="uc-text">{{text}}</div>
|
|
89
89
|
</button>
|
|
90
90
|
`;
|
|
@@ -8,7 +8,7 @@ export { EditorImageFader } from "./EditorImageFader.js";
|
|
|
8
8
|
export { EditorScroller } from "./EditorScroller.js";
|
|
9
9
|
export { EditorSlider } from "./EditorSlider.js";
|
|
10
10
|
export { EditorToolbar } from "./EditorToolbar.js";
|
|
11
|
-
export {
|
|
11
|
+
export { BtnUi } from "./elements/button/BtnUi.js";
|
|
12
12
|
export { LineLoaderUi } from "./elements/line-loader/LineLoaderUi.js";
|
|
13
13
|
export { PresenceToggle } from "./elements/presence-toggle/PresenceToggle.js";
|
|
14
14
|
export { SliderUi } from "./elements/slider/SliderUi.js";
|
|
@@ -8,7 +8,7 @@ export { EditorImageFader } from './EditorImageFader.js';
|
|
|
8
8
|
export { EditorScroller } from './EditorScroller.js';
|
|
9
9
|
export { EditorSlider } from './EditorSlider.js';
|
|
10
10
|
export { EditorToolbar } from './EditorToolbar.js';
|
|
11
|
-
export {
|
|
11
|
+
export { BtnUi } from './elements/button/BtnUi.js';
|
|
12
12
|
export { LineLoaderUi } from './elements/line-loader/LineLoaderUi.js';
|
|
13
13
|
export { PresenceToggle } from './elements/presence-toggle/PresenceToggle.js';
|
|
14
14
|
export { SliderUi } from './elements/slider/SliderUi.js';
|
|
@@ -4,32 +4,32 @@ import svgIconsSprite from './svg-sprite.js';
|
|
|
4
4
|
export const TEMPLATE = /* HTML */ `
|
|
5
5
|
${svgIconsSprite}
|
|
6
6
|
<div class="uc-wrapper uc-wrapper_desktop">
|
|
7
|
-
<
|
|
7
|
+
<uc-presence-toggle class="uc-network_problems_splash" set="visible: presence.networkProblems;">
|
|
8
8
|
<div class="uc-network_problems_content">
|
|
9
9
|
<div class="uc-network_problems_icon">
|
|
10
|
-
<
|
|
10
|
+
<uc-icon name="sad"></uc-icon>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="uc-network_problems_text">Network error</div>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="uc-network_problems_footer">
|
|
15
|
-
<
|
|
15
|
+
<uc-btn-ui theme="primary" text="Retry" set="onclick: *on.retryNetwork"></uc-btn-ui>
|
|
16
16
|
</div>
|
|
17
|
-
</
|
|
17
|
+
</uc-presence-toggle>
|
|
18
18
|
<div class="uc-viewport">
|
|
19
19
|
<div class="uc-file_type_outer">
|
|
20
20
|
<div class="uc-file_type">{{fileType}}</div>
|
|
21
21
|
</div>
|
|
22
22
|
<div class="uc-image_container" ref="img-container-el">
|
|
23
23
|
<img src="${TRANSPARENT_PIXEL_SRC}" class="uc-image uc-image_visible_from_editor" ref="img-el" />
|
|
24
|
-
<
|
|
25
|
-
<
|
|
24
|
+
<uc-editor-image-cropper ref="cropper-el"></uc-editor-image-cropper>
|
|
25
|
+
<uc-editor-image-fader ref="fader-el"></uc-editor-image-fader>
|
|
26
26
|
</div>
|
|
27
27
|
<div class="uc-info_pan">{{msg}}</div>
|
|
28
28
|
</div>
|
|
29
29
|
<div class="uc-toolbar">
|
|
30
|
-
<
|
|
30
|
+
<uc-line-loader-ui set="active: showLoader"></uc-line-loader-ui>
|
|
31
31
|
<div class="uc-toolbar_content uc-toolbar_content__editor">
|
|
32
|
-
<
|
|
32
|
+
<uc-editor-toolbar></uc-editor-toolbar>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AAIA,2FAgBC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PACKAGE_NAME, PACKAGE_VERSION } from '../../../env.js';
|
|
1
2
|
import { createCdnUrl, createCdnUrlModifiers } from '../../../utils/cdn-utils.js';
|
|
2
3
|
import { COMMON_OPERATIONS, transformationsToOperations } from './lib/transformationUtils.js';
|
|
3
4
|
|
|
@@ -14,6 +15,7 @@ export function viewerImageSrc(originalUrl, width, transformations) {
|
|
|
14
15
|
transformationsToOperations(transformations),
|
|
15
16
|
`quality/${quality}`,
|
|
16
17
|
`stretch/off/-/resize/${size}x`,
|
|
18
|
+
`@clib/${PACKAGE_NAME}/${PACKAGE_VERSION}/uc-cloud-image-editor/`,
|
|
17
19
|
),
|
|
18
20
|
);
|
|
19
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-cloud-image-editor-activity {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
width: 100%;
|
|
@@ -7,7 +7,7 @@ lr-cloud-image-editor-activity {
|
|
|
7
7
|
background-color: var(--uc-background);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
[
|
|
10
|
+
[uc-modal] uc-cloud-image-editor-activity {
|
|
11
11
|
width: min(calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2), calc(100vw - var(--uc-padding) * 2));
|
|
12
12
|
height: var(--modal-content-height-fill, 100%);
|
|
13
13
|
}
|
package/blocks/Config/Config.js
CHANGED
|
@@ -20,7 +20,7 @@ const allConfigKeys = /** @type {(keyof import('../../types').ConfigType)[]} */
|
|
|
20
20
|
* 'secureDeliveryProxyUrlResolver',
|
|
21
21
|
* 'iconHrefResolver',
|
|
22
22
|
* 'fileValidators',
|
|
23
|
-
* 'collectionValidators'
|
|
23
|
+
* 'collectionValidators',
|
|
24
24
|
* ]}
|
|
25
25
|
*/
|
|
26
26
|
export const complexConfigKeys = [
|
|
@@ -30,7 +30,7 @@ export const complexConfigKeys = [
|
|
|
30
30
|
'secureDeliveryProxyUrlResolver',
|
|
31
31
|
'iconHrefResolver',
|
|
32
32
|
'fileValidators',
|
|
33
|
-
'collectionValidators'
|
|
33
|
+
'collectionValidators',
|
|
34
34
|
];
|
|
35
35
|
|
|
36
36
|
/** @type {(key: keyof import('../../types').ConfigType) => key is keyof import('../../types').ConfigComplexType} */
|
|
@@ -133,7 +133,7 @@ class ConfigClass extends Block {
|
|
|
133
133
|
this._flushValueToAttribute(key, normalizedValue);
|
|
134
134
|
this._flushValueToState(key, normalizedValue);
|
|
135
135
|
|
|
136
|
-
this.debugPrint(`[
|
|
136
|
+
this.debugPrint(`[uc-config] "${key}"`, normalizedValue);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
/**
|
|
@@ -160,13 +160,13 @@ class ConfigClass extends Block {
|
|
|
160
160
|
JSON.stringify(nextValue) === JSON.stringify(previousValue)
|
|
161
161
|
) {
|
|
162
162
|
console.warn(
|
|
163
|
-
`[
|
|
163
|
+
`[uc-config] Option "${key}" value is the same as the previous one but the reference is different`,
|
|
164
164
|
);
|
|
165
165
|
console.warn(
|
|
166
|
-
`[
|
|
166
|
+
`[uc-config] You should avoid changing the reference of the object to prevent unnecessary calculations`,
|
|
167
167
|
);
|
|
168
|
-
console.warn(`[
|
|
169
|
-
console.warn(`[
|
|
168
|
+
console.warn(`[uc-config] "${key}" previous value:`, previousValue);
|
|
169
|
+
console.warn(`[uc-config] "${key}" new value:`, nextValue);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
}
|
package/blocks/Config/config.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
uc-copyright {
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
uc-copyright .uc-credits {
|
|
8
8
|
all: unset;
|
|
9
9
|
position: absolute;
|
|
10
10
|
bottom: 12px;
|
|
@@ -21,11 +21,11 @@ lr-copyright .uc-credits {
|
|
|
21
21
|
background-color var(--uc-transition);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
uc-copyright .uc-credits:focus-visible {
|
|
25
25
|
outline: 1px auto -webkit-focus-ring-color;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
uc-copyright .uc-credits:hover {
|
|
29
29
|
opacity: 1;
|
|
30
30
|
background-color: var(--uc-muted);
|
|
31
31
|
}
|
|
@@ -8,11 +8,11 @@ import { asBoolean } from '../Config/normalizeConfigValue.js';
|
|
|
8
8
|
import { UploadSource } from '../utils/UploadSource.js';
|
|
9
9
|
import { DropzoneState, addDropzone } from './addDropzone.js';
|
|
10
10
|
|
|
11
|
-
const GLOBAL_CTX_NAME = '
|
|
11
|
+
const GLOBAL_CTX_NAME = 'uc-drop-area';
|
|
12
12
|
const REGISTRY_KEY = `${GLOBAL_CTX_NAME}/registry`;
|
|
13
13
|
|
|
14
14
|
export class DropArea extends UploaderBlock {
|
|
15
|
-
static styleAttrs = [...super.styleAttrs, '
|
|
15
|
+
static styleAttrs = [...super.styleAttrs, 'uc-drop-area'];
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
|
|
@@ -251,8 +251,8 @@ DropArea.template = /* HTML */ `
|
|
|
251
251
|
<div data-default-slot hidden></div>
|
|
252
252
|
<div ref="content-wrapper" class="uc-content-wrapper" set="@hidden: !isVisible">
|
|
253
253
|
<div class="uc-icon-container" set="@hidden: !withIcon">
|
|
254
|
-
<
|
|
255
|
-
<
|
|
254
|
+
<uc-icon name="default"></uc-icon>
|
|
255
|
+
<uc-icon name="arrow-down"></uc-icon>
|
|
256
256
|
</div>
|
|
257
257
|
<span class="uc-text">{{text}}</span>
|
|
258
258
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:where([
|
|
1
|
+
:where([uc-drop-area]) {
|
|
2
2
|
padding: 2px;
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
border: 1px dashed var(--uc-border);
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
border-radius var(--uc-transition);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
:where([
|
|
12
|
-
:where([
|
|
11
|
+
:where([uc-drop-area]),
|
|
12
|
+
:where([uc-drop-area]) .uc-content-wrapper {
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: center;
|
|
@@ -17,58 +17,58 @@
|
|
|
17
17
|
height: 100%;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:where([
|
|
20
|
+
:where([uc-drop-area]) .uc-text {
|
|
21
21
|
position: relative;
|
|
22
22
|
margin: var(--uc-padding);
|
|
23
23
|
color: var(--uc-muted-foreground);
|
|
24
24
|
transition: color var(--uc-transition);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
:where([
|
|
27
|
+
:where([uc-drop-area])[ghost][drag-state='inactive'] {
|
|
28
28
|
display: none;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:where([
|
|
31
|
+
:where([uc-drop-area])[ghost]:not([fullscreen]):is([drag-state='active'], [drag-state='near'], [drag-state='over']) {
|
|
32
32
|
background: var(--uc-background);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
:where([
|
|
35
|
+
:where([uc-drop-area])[with-icon]
|
|
36
36
|
> .uc-content-wrapper:is([drag-state='active'], [drag-state='near'], [drag-state='over'])
|
|
37
37
|
:is(.uc-text, .uc-icon-container) {
|
|
38
38
|
color: var(--uc-primary);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
:where([
|
|
41
|
+
:where([uc-drop-area]):is([drag-state='active'], [drag-state='near'], [drag-state='over'], :hover) {
|
|
42
42
|
color: var(--uc-primary);
|
|
43
43
|
background: var(--uc-primary-transparent);
|
|
44
44
|
border-color: var(--uc-primary-transparent);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
:where([
|
|
47
|
+
:where([uc-drop-area]):is([drag-state='active'], [drag-state='near']) {
|
|
48
48
|
opacity: 1;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
:where([
|
|
51
|
+
:where([uc-drop-area])[drag-state='over'] {
|
|
52
52
|
border-color: var(--uc-primary);
|
|
53
53
|
opacity: 1;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
:where([
|
|
56
|
+
:where([uc-drop-area])[with-icon] {
|
|
57
57
|
min-height: 180px;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
:where([
|
|
60
|
+
:where([uc-drop-area])[with-icon] .uc-content-wrapper {
|
|
61
61
|
display: flex;
|
|
62
62
|
flex-direction: column;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
:where([
|
|
65
|
+
:where([uc-drop-area])[with-icon] .uc-text {
|
|
66
66
|
color: var(--uc-foreground);
|
|
67
67
|
font-weight: 500;
|
|
68
68
|
font-size: 1.1em;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
:where([
|
|
71
|
+
:where([uc-drop-area])[with-icon] .uc-icon-container {
|
|
72
72
|
position: relative;
|
|
73
73
|
width: 64px;
|
|
74
74
|
height: 64px;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
background-color var(--uc-transition);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
:where([
|
|
85
|
+
:where([uc-drop-area])[with-icon] uc-icon {
|
|
86
86
|
position: absolute;
|
|
87
87
|
width: 32px;
|
|
88
88
|
height: 32px;
|
|
@@ -91,53 +91,53 @@
|
|
|
91
91
|
transition: transform var(--uc-transition);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
:where([
|
|
94
|
+
:where([uc-drop-area])[with-icon] uc-icon:last-child {
|
|
95
95
|
transform: translateY(48px);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
:where([
|
|
99
|
-
:where([
|
|
98
|
+
:where([uc-drop-area])[with-icon]:hover .uc-icon-container,
|
|
99
|
+
:where([uc-drop-area])[with-icon]:hover .uc-text {
|
|
100
100
|
color: var(--uc-primary);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
:where([
|
|
103
|
+
:where([uc-drop-area])[with-icon]:hover .uc-icon-container {
|
|
104
104
|
background-color: var(--uc-primary-transparent);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
:where([
|
|
107
|
+
:where([uc-drop-area])[with-icon]
|
|
108
108
|
> .uc-content-wrapper:is([drag-state='active'], [drag-state='near'], [drag-state='over'])
|
|
109
109
|
.uc-icon-container {
|
|
110
110
|
color: var(--uc-primary-foreground);
|
|
111
111
|
background-color: var(--uc-primary);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
:where([
|
|
114
|
+
:where([uc-drop-area])[with-icon]
|
|
115
115
|
> .uc-content-wrapper:is([drag-state='active'], [drag-state='near'], [drag-state='over'])
|
|
116
116
|
.uc-text {
|
|
117
117
|
color: var(--uc-primary);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
:where([
|
|
120
|
+
:where([uc-drop-area])[with-icon]
|
|
121
121
|
> .uc-content-wrapper:is([drag-state='active'], [drag-state='near'], [drag-state='over'])
|
|
122
|
-
|
|
122
|
+
uc-icon:first-child {
|
|
123
123
|
transform: translateY(-48px);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
:where([
|
|
126
|
+
:where([uc-drop-area])[with-icon]
|
|
127
127
|
> .uc-content-wrapper:is([drag-state='active'], [drag-state='near'], [drag-state='over'])
|
|
128
|
-
|
|
128
|
+
uc-icon:last-child {
|
|
129
129
|
transform: translateY(0);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
:where([
|
|
132
|
+
:where([uc-drop-area])[with-icon] > .uc-content-wrapper[drag-state='near'] uc-icon:last-child {
|
|
133
133
|
transform: scale(1.3);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
:where([
|
|
136
|
+
:where([uc-drop-area])[with-icon] > .uc-content-wrapper[drag-state='over'] uc-icon:last-child {
|
|
137
137
|
transform: scale(1.5);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
:where([
|
|
140
|
+
:where([uc-drop-area])[fullscreen] {
|
|
141
141
|
position: fixed;
|
|
142
142
|
top: 0;
|
|
143
143
|
right: 0;
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
margin: var(--uc-padding);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
:where([
|
|
155
|
+
:where([uc-drop-area])[fullscreen] .uc-content-wrapper {
|
|
156
156
|
width: 100%;
|
|
157
157
|
max-width: calc(var(--uc-dialog-width) * 0.8);
|
|
158
158
|
height: 180px;
|
|
@@ -168,21 +168,21 @@
|
|
|
168
168
|
transform var(--uc-transition);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
:where([
|
|
172
|
-
:where([
|
|
171
|
+
:where([uc-drop-area])[with-icon][fullscreen][drag-state='active'] > .uc-content-wrapper,
|
|
172
|
+
:where([uc-drop-area])[with-icon][fullscreen][drag-state='near'] > .uc-content-wrapper {
|
|
173
173
|
transform: translateY(10px);
|
|
174
174
|
opacity: 0;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
:where([
|
|
177
|
+
:where([uc-drop-area])[with-icon][fullscreen][drag-state='over'] > .uc-content-wrapper {
|
|
178
178
|
transform: translateY(0px);
|
|
179
179
|
opacity: 1;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
:is(:where([
|
|
182
|
+
:is(:where([uc-drop-area])[with-icon][fullscreen]) > .uc-content-wrapper uc-icon:first-child {
|
|
183
183
|
transform: translateY(-48px);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
:where([
|
|
186
|
+
:where([uc-drop-area])[clickable] {
|
|
187
187
|
cursor: pointer;
|
|
188
188
|
}
|
|
@@ -239,18 +239,18 @@ export class ExternalSource extends UploaderBlock {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
ExternalSource.template = /* HTML */ `
|
|
242
|
-
<
|
|
242
|
+
<uc-activity-header>
|
|
243
243
|
<button type="button" class="uc-mini-btn" set="onclick: *historyBack">
|
|
244
|
-
<
|
|
244
|
+
<uc-icon name="back"></uc-icon>
|
|
245
245
|
</button>
|
|
246
246
|
<div>
|
|
247
|
-
<
|
|
247
|
+
<uc-icon set="@name: activityIcon"></uc-icon>
|
|
248
248
|
<span>{{activityCaption}}</span>
|
|
249
249
|
</div>
|
|
250
250
|
<button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *historyBack">
|
|
251
|
-
<
|
|
251
|
+
<uc-icon name="close"></uc-icon>
|
|
252
252
|
</button>
|
|
253
|
-
</
|
|
253
|
+
</uc-activity-header>
|
|
254
254
|
<div class="uc-content">
|
|
255
255
|
<div ref="iframeWrapper" class="uc-iframe-wrapper"></div>
|
|
256
256
|
<div class="uc-toolbar">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
uc-external-source {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -7,7 +7,7 @@ lr-external-source {
|
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
[
|
|
10
|
+
[uc-modal] uc-external-source {
|
|
11
11
|
width: min(
|
|
12
12
|
calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2),
|
|
13
13
|
calc(var(--uc-dialog-max-width) - var(--uc-padding) * 2)
|
|
@@ -16,7 +16,7 @@ lr-external-source {
|
|
|
16
16
|
max-height: var(--modal-max-content-height);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
uc-external-source > .uc-content {
|
|
20
20
|
position: relative;
|
|
21
21
|
display: grid;
|
|
22
22
|
flex: 1;
|
|
@@ -24,24 +24,24 @@ lr-external-source > .uc-content {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
@media only screen and (max-width: 430px) {
|
|
27
|
-
|
|
27
|
+
uc-external-source {
|
|
28
28
|
width: calc(100vw - var(--uc-padding) * 2);
|
|
29
29
|
height: var(--modal-content-height-fill, 100%);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
uc-external-source iframe {
|
|
34
34
|
display: block;
|
|
35
35
|
width: 100%;
|
|
36
36
|
height: 100%;
|
|
37
37
|
border: none;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
uc-external-source .uc-iframe-wrapper {
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
uc-external-source .uc-toolbar {
|
|
45
45
|
display: grid;
|
|
46
46
|
grid-gap: var(--uc-padding);
|
|
47
47
|
grid-template-columns: max-content 1fr max-content max-content;
|
|
@@ -51,11 +51,11 @@ lr-external-source .uc-toolbar {
|
|
|
51
51
|
border-top: 1px solid var(--uc-border);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
uc-external-source .uc-back-btn {
|
|
55
55
|
padding-left: 0;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
uc-external-source .uc-selected-counter {
|
|
59
59
|
display: flex;
|
|
60
60
|
grid-gap: var(--uc-padding);
|
|
61
61
|
align-items: center;
|
|
@@ -426,7 +426,7 @@ FileItem.template = /* HTML */ `
|
|
|
426
426
|
<div class="uc-inner" set="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">
|
|
427
427
|
<div class="uc-thumb" set="style.backgroundImage: thumbUrl">
|
|
428
428
|
<div class="uc-badge">
|
|
429
|
-
<
|
|
429
|
+
<uc-icon set="@name: badgeIcon"></uc-icon>
|
|
430
430
|
</div>
|
|
431
431
|
</div>
|
|
432
432
|
<div class="uc-file-name-wrapper">
|
|
@@ -440,7 +440,7 @@ FileItem.template = /* HTML */ `
|
|
|
440
440
|
class="uc-edit-btn uc-mini-btn"
|
|
441
441
|
set="onclick: onEdit; @hidden: !isEditable"
|
|
442
442
|
>
|
|
443
|
-
<
|
|
443
|
+
<uc-icon name="edit-file"></uc-icon>
|
|
444
444
|
</button>
|
|
445
445
|
<button
|
|
446
446
|
type="button"
|
|
@@ -448,13 +448,13 @@ FileItem.template = /* HTML */ `
|
|
|
448
448
|
class="uc-remove-btn uc-mini-btn"
|
|
449
449
|
set="onclick: onRemove;"
|
|
450
450
|
>
|
|
451
|
-
<
|
|
451
|
+
<uc-icon name="remove-file"></uc-icon>
|
|
452
452
|
</button>
|
|
453
453
|
<button type="button" class="uc-upload-btn uc-mini-btn" set="onclick: onUpload;">
|
|
454
|
-
<
|
|
454
|
+
<uc-icon name="upload"></uc-icon>
|
|
455
455
|
</button>
|
|
456
456
|
</div>
|
|
457
|
-
<
|
|
457
|
+
<uc-progress-bar class="uc-progress-bar" set="value: progressValue; visible: progressVisible;"> </uc-progress-bar>
|
|
458
458
|
</div>
|
|
459
459
|
`;
|
|
460
460
|
FileItem.activeInstances = new Set();
|