@vaadin/upload 24.8.5 → 24.9.0-alpha1
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/package.json +11 -11
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/vaadin-lit-upload-file-list.js +0 -56
- package/src/vaadin-lit-upload-file.js +0 -87
- package/src/vaadin-lit-upload-icon.js +0 -41
- package/src/vaadin-lit-upload.js +0 -77
- package/theme/lumo/vaadin-lit-upload.d.ts +0 -2
- package/theme/lumo/vaadin-lit-upload.js +0 -2
- package/theme/material/vaadin-lit-upload.d.ts +0 -2
- package/theme/material/vaadin-lit-upload.js +0 -2
- package/vaadin-lit-upload.d.ts +0 -1
- package/vaadin-lit-upload.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/upload",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.9.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/a11y-base": "
|
|
41
|
-
"@vaadin/button": "
|
|
42
|
-
"@vaadin/component-base": "
|
|
43
|
-
"@vaadin/progress-bar": "
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
45
|
-
"@vaadin/vaadin-material-styles": "
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
40
|
+
"@vaadin/a11y-base": "24.9.0-alpha1",
|
|
41
|
+
"@vaadin/button": "24.9.0-alpha1",
|
|
42
|
+
"@vaadin/component-base": "24.9.0-alpha1",
|
|
43
|
+
"@vaadin/progress-bar": "24.9.0-alpha1",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.9.0-alpha1",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.9.0-alpha1",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.9.0-alpha1",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "
|
|
51
|
-
"@vaadin/test-runner-commands": "
|
|
50
|
+
"@vaadin/chai-plugins": "24.9.0-alpha1",
|
|
51
|
+
"@vaadin/test-runner-commands": "24.9.0-alpha1",
|
|
52
52
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
53
53
|
"sinon": "^18.0.0"
|
|
54
54
|
},
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "cc13d59f0e3cd1a3b0c19c1a900a5308446fe7ac"
|
|
60
60
|
}
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-lit-upload-file.js';
|
|
7
|
-
import { css, html, LitElement } from 'lit';
|
|
8
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
10
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { UploadFileListMixin } from './vaadin-upload-file-list-mixin.js';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* An element used internally by `<vaadin-upload>`. Not intended to be used separately.
|
|
15
|
-
*
|
|
16
|
-
* @extends HTMLElement
|
|
17
|
-
* @mixes ThemableMixin
|
|
18
|
-
* @mixes UploadFileListMixin
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
class UploadFileList extends UploadFileListMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
22
|
-
static get is() {
|
|
23
|
-
return 'vaadin-upload-file-list';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static get styles() {
|
|
27
|
-
return css`
|
|
28
|
-
:host {
|
|
29
|
-
display: block;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
:host([hidden]) {
|
|
33
|
-
display: none !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[part='list'] {
|
|
37
|
-
padding: 0;
|
|
38
|
-
margin: 0;
|
|
39
|
-
list-style-type: none;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** @protected */
|
|
45
|
-
render() {
|
|
46
|
-
return html`
|
|
47
|
-
<ul part="list">
|
|
48
|
-
<slot></slot>
|
|
49
|
-
</ul>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
defineCustomElement(UploadFileList);
|
|
55
|
-
|
|
56
|
-
export { UploadFileList };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/progress-bar/src/vaadin-lit-progress-bar.js';
|
|
7
|
-
import './vaadin-upload-icons.js';
|
|
8
|
-
import { html, LitElement, nothing } from 'lit';
|
|
9
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
|
-
import { UploadFileMixin } from './vaadin-upload-file-mixin.js';
|
|
13
|
-
import { uploadFileStyles } from './vaadin-upload-file-styles.js';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* LitElement based version of `<vaadin-upload-file>` web component.
|
|
17
|
-
*
|
|
18
|
-
* ## Disclaimer
|
|
19
|
-
*
|
|
20
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
21
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
22
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
23
|
-
*/
|
|
24
|
-
class UploadFile extends UploadFileMixin(ThemableMixin(PolylitMixin(LitElement))) {
|
|
25
|
-
static get is() {
|
|
26
|
-
return 'vaadin-upload-file';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static get styles() {
|
|
30
|
-
return uploadFileStyles;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** @protected */
|
|
34
|
-
render() {
|
|
35
|
-
return html`
|
|
36
|
-
<div part="row">
|
|
37
|
-
<div part="info">
|
|
38
|
-
<div part="done-icon" ?hidden="${!this.complete}" aria-hidden="true"></div>
|
|
39
|
-
<div part="warning-icon" ?hidden="${!this.errorMessage}" aria-hidden="true"></div>
|
|
40
|
-
|
|
41
|
-
<div part="meta">
|
|
42
|
-
<div part="name" id="name">${this.fileName}</div>
|
|
43
|
-
<div part="status" ?hidden="${!this.status}" id="status">${this.status}</div>
|
|
44
|
-
<div part="error" id="error" ?hidden="${!this.errorMessage}">${this.errorMessage}</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<div part="commands">
|
|
48
|
-
<button
|
|
49
|
-
type="button"
|
|
50
|
-
part="start-button"
|
|
51
|
-
file-event="file-start"
|
|
52
|
-
@click="${this._fireFileEvent}"
|
|
53
|
-
?hidden="${!this.held}"
|
|
54
|
-
?disabled="${this.disabled}"
|
|
55
|
-
aria-label="${this.i18n ? this.i18n.file.start : nothing}"
|
|
56
|
-
aria-describedby="name"
|
|
57
|
-
></button>
|
|
58
|
-
<button
|
|
59
|
-
type="button"
|
|
60
|
-
part="retry-button"
|
|
61
|
-
file-event="file-retry"
|
|
62
|
-
@click="${this._fireFileEvent}"
|
|
63
|
-
?hidden="${!this.errorMessage}"
|
|
64
|
-
?disabled="${this.disabled}"
|
|
65
|
-
aria-label="${this.i18n ? this.i18n.file.retry : nothing}"
|
|
66
|
-
aria-describedby="name"
|
|
67
|
-
></button>
|
|
68
|
-
<button
|
|
69
|
-
type="button"
|
|
70
|
-
part="remove-button"
|
|
71
|
-
file-event="file-abort"
|
|
72
|
-
@click="${this._fireFileEvent}"
|
|
73
|
-
?disabled="${this.disabled}"
|
|
74
|
-
aria-label="${this.i18n ? this.i18n.file.remove : nothing}"
|
|
75
|
-
aria-describedby="name"
|
|
76
|
-
></button>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<slot name="progress"></slot>
|
|
81
|
-
`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
defineCustomElement(UploadFile);
|
|
86
|
-
|
|
87
|
-
export { UploadFile };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css, html, LitElement } from 'lit';
|
|
7
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* An element used internally by `<vaadin-upload>`. Not intended to be used separately.
|
|
12
|
-
*
|
|
13
|
-
* @extends HTMLElement
|
|
14
|
-
* @private
|
|
15
|
-
*/
|
|
16
|
-
class UploadIcon extends ThemableMixin(LitElement) {
|
|
17
|
-
static get is() {
|
|
18
|
-
return 'vaadin-upload-icon';
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static get styles() {
|
|
22
|
-
return css`
|
|
23
|
-
:host {
|
|
24
|
-
display: inline-block;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host([hidden]) {
|
|
28
|
-
display: none !important;
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** @protected */
|
|
34
|
-
render() {
|
|
35
|
-
return html``;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
defineCustomElement(UploadIcon);
|
|
40
|
-
|
|
41
|
-
export { UploadIcon };
|
package/src/vaadin-lit-upload.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2016 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/button/src/vaadin-lit-button.js';
|
|
7
|
-
import './vaadin-lit-upload-icon.js';
|
|
8
|
-
import './vaadin-upload-icons.js';
|
|
9
|
-
import './vaadin-lit-upload-file-list.js';
|
|
10
|
-
import { css, html, LitElement } from 'lit';
|
|
11
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
13
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
14
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
16
|
-
import { UploadMixin } from './vaadin-upload-mixin.js';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* LitElement based version of `<vaadin-upload>` web component.
|
|
20
|
-
*
|
|
21
|
-
* ## Disclaimer
|
|
22
|
-
*
|
|
23
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
24
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
25
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
26
|
-
*/
|
|
27
|
-
class Upload extends UploadMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
28
|
-
static get is() {
|
|
29
|
-
return 'vaadin-upload';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
static get styles() {
|
|
33
|
-
return css`
|
|
34
|
-
:host {
|
|
35
|
-
display: block;
|
|
36
|
-
position: relative;
|
|
37
|
-
box-sizing: border-box;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:host([hidden]) {
|
|
41
|
-
display: none !important;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[hidden] {
|
|
45
|
-
display: none !important;
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/** @protected */
|
|
51
|
-
render() {
|
|
52
|
-
return html`
|
|
53
|
-
<div part="primary-buttons">
|
|
54
|
-
<slot name="add-button"></slot>
|
|
55
|
-
<div part="drop-label" ?hidden="${this.nodrop}" id="dropLabelContainer" aria-hidden="true">
|
|
56
|
-
<slot name="drop-label-icon"></slot>
|
|
57
|
-
<slot name="drop-label"></slot>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
<slot name="file-list"></slot>
|
|
61
|
-
<slot></slot>
|
|
62
|
-
<input
|
|
63
|
-
type="file"
|
|
64
|
-
id="fileInput"
|
|
65
|
-
hidden
|
|
66
|
-
@change="${this._onFileInputChange}"
|
|
67
|
-
accept="${this.accept}"
|
|
68
|
-
?multiple="${this._isMultiple(this.maxFiles)}"
|
|
69
|
-
capture="${ifDefined(this.capture)}"
|
|
70
|
-
/>
|
|
71
|
-
`;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
defineCustomElement(Upload);
|
|
76
|
-
|
|
77
|
-
export { Upload };
|
package/vaadin-lit-upload.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-upload.js';
|
package/vaadin-lit-upload.js
DELETED