@vaadin/upload 24.6.0-alpha7 → 24.6.0-alpha9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/upload",
3
- "version": "24.6.0-alpha7",
3
+ "version": "24.6.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,17 +37,17 @@
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/a11y-base": "24.6.0-alpha7",
41
- "@vaadin/button": "24.6.0-alpha7",
42
- "@vaadin/component-base": "24.6.0-alpha7",
43
- "@vaadin/progress-bar": "24.6.0-alpha7",
44
- "@vaadin/vaadin-lumo-styles": "24.6.0-alpha7",
45
- "@vaadin/vaadin-material-styles": "24.6.0-alpha7",
46
- "@vaadin/vaadin-themable-mixin": "24.6.0-alpha7",
40
+ "@vaadin/a11y-base": "24.6.0-alpha9",
41
+ "@vaadin/button": "24.6.0-alpha9",
42
+ "@vaadin/component-base": "24.6.0-alpha9",
43
+ "@vaadin/progress-bar": "24.6.0-alpha9",
44
+ "@vaadin/vaadin-lumo-styles": "24.6.0-alpha9",
45
+ "@vaadin/vaadin-material-styles": "24.6.0-alpha9",
46
+ "@vaadin/vaadin-themable-mixin": "24.6.0-alpha9",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@vaadin/chai-plugins": "24.6.0-alpha7",
50
+ "@vaadin/chai-plugins": "24.6.0-alpha9",
51
51
  "@vaadin/testing-helpers": "^1.0.0",
52
52
  "sinon": "^18.0.0"
53
53
  },
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "675d6fe0a08b8cc63ac00140c63f28fc3f52e4ea"
58
+ "gitHead": "e303d77ba20c3089c9998be9a318733d9ec5b53c"
59
59
  }
@@ -51,6 +51,7 @@ class UploadFile extends UploadFileMixin(ThemableMixin(PolylitMixin(LitElement))
51
51
  file-event="file-start"
52
52
  @click="${this._fireFileEvent}"
53
53
  ?hidden="${!this.held}"
54
+ ?disabled="${this.disabled}"
54
55
  aria-label="${this.i18n.file.start}"
55
56
  aria-describedby="name"
56
57
  ></button>
@@ -60,6 +61,7 @@ class UploadFile extends UploadFileMixin(ThemableMixin(PolylitMixin(LitElement))
60
61
  file-event="file-retry"
61
62
  @click="${this._fireFileEvent}"
62
63
  ?hidden="${!this.errorMessage}"
64
+ ?disabled="${this.disabled}"
63
65
  aria-label="${this.i18n.file.retry}"
64
66
  aria-describedby="name"
65
67
  ></button>
@@ -68,6 +70,7 @@ class UploadFile extends UploadFileMixin(ThemableMixin(PolylitMixin(LitElement))
68
70
  part="remove-button"
69
71
  file-event="file-abort"
70
72
  @click="${this._fireFileEvent}"
73
+ ?disabled="${this.disabled}"
71
74
  aria-label="${this.i18n.file.remove}"
72
75
  aria-describedby="name"
73
76
  ></button>
@@ -25,11 +25,20 @@ export const UploadFileListMixin = (superClass) =>
25
25
  i18n: {
26
26
  type: Object,
27
27
  },
28
+
29
+ /**
30
+ * If true, the user cannot interact with this element.
31
+ */
32
+ disabled: {
33
+ type: Boolean,
34
+ value: false,
35
+ reflectToAttribute: true,
36
+ },
28
37
  };
29
38
  }
30
39
 
31
40
  static get observers() {
32
- return ['__updateItems(items, i18n)'];
41
+ return ['__updateItems(items, i18n, disabled)'];
33
42
  }
34
43
 
35
44
  /** @private */
@@ -45,7 +54,7 @@ export const UploadFileListMixin = (superClass) =>
45
54
  * It is not guaranteed that the update happens immediately (synchronously) after it is requested.
46
55
  */
47
56
  requestContentUpdate() {
48
- const { items, i18n } = this;
57
+ const { items, i18n, disabled } = this;
49
58
 
50
59
  render(
51
60
  html`
@@ -53,6 +62,7 @@ export const UploadFileListMixin = (superClass) =>
53
62
  (file) => html`
54
63
  <li>
55
64
  <vaadin-upload-file
65
+ .disabled="${disabled}"
56
66
  .file="${file}"
57
67
  .complete="${file.complete}"
58
68
  .errorMessage="${file.error}"
@@ -19,6 +19,11 @@ export declare function UploadFileMixin<T extends Constructor<HTMLElement>>(
19
19
  ): Constructor<FocusMixinClass> & Constructor<UploadFileMixinClass> & T;
20
20
 
21
21
  export declare class UploadFileMixinClass {
22
+ /**
23
+ * If true, the user cannot interact with this element.
24
+ */
25
+ disabled: boolean;
26
+
22
27
  /**
23
28
  * True if uploading is completed, false otherwise.
24
29
  */
@@ -14,6 +14,15 @@ export const UploadFileMixin = (superClass) =>
14
14
  class UploadFileMixin extends FocusMixin(superClass) {
15
15
  static get properties() {
16
16
  return {
17
+ /**
18
+ * If true, the user cannot interact with this element.
19
+ */
20
+ disabled: {
21
+ type: Boolean,
22
+ value: false,
23
+ reflectToAttribute: true,
24
+ },
25
+
17
26
  /**
18
27
  * True if uploading is completed, false otherwise.
19
28
  */
@@ -91,7 +100,6 @@ export const UploadFileMixin = (superClass) =>
91
100
  tabindex: {
92
101
  type: Number,
93
102
  value: 0,
94
- reflectToAttribute: true,
95
103
  },
96
104
 
97
105
  /**
@@ -111,7 +119,7 @@ export const UploadFileMixin = (superClass) =>
111
119
  }
112
120
 
113
121
  static get observers() {
114
- return ['__updateProgress(_progress, progress, indeterminate)'];
122
+ return ['__updateTabindex(tabindex, disabled)', '__updateProgress(_progress, progress, indeterminate)'];
115
123
  }
116
124
 
117
125
  /** @protected */
@@ -154,11 +162,29 @@ export const UploadFileMixin = (superClass) =>
154
162
  return event.composedPath()[0] === this;
155
163
  }
156
164
 
165
+ /** @private */
166
+ __disabledChanged(disabled) {
167
+ if (disabled) {
168
+ this.removeAttribute('tabindex');
169
+ } else {
170
+ this.setAttribute('tabindex', this.tabindex);
171
+ }
172
+ }
173
+
157
174
  /** @private */
158
175
  _errorMessageChanged(errorMessage) {
159
176
  this.toggleAttribute('error', Boolean(errorMessage));
160
177
  }
161
178
 
179
+ /** @private */
180
+ __updateTabindex(tabindex, disabled) {
181
+ if (disabled) {
182
+ this.removeAttribute('tabindex');
183
+ } else {
184
+ this.setAttribute('tabindex', tabindex);
185
+ }
186
+ }
187
+
162
188
  /** @private */
163
189
  __updateProgress(progress, value, indeterminate) {
164
190
  if (progress) {
@@ -60,6 +60,7 @@ export interface UploadFileEventMap extends HTMLElementEventMap, UploadFileCusto
60
60
  *
61
61
  * Attribute | Description
62
62
  * -----------------|-------------
63
+ * `disabled` | Set when the element is disabled
63
64
  * `focus-ring` | Set when the element is focused using the keyboard.
64
65
  * `focused` | Set when the element is focused.
65
66
  * `error` | An error has happened during uploading.
@@ -40,6 +40,7 @@ registerStyles('vaadin-upload-file', uploadFileStyles, { moduleId: 'vaadin-uploa
40
40
  *
41
41
  * Attribute | Description
42
42
  * -----------------|-------------
43
+ * `disabled` | Set when the element is disabled
43
44
  * `focus-ring` | Set when the element is focused using the keyboard.
44
45
  * `focused` | Set when the element is focused.
45
46
  * `error` | An error has happened during uploading.
@@ -76,6 +77,7 @@ class UploadFile extends UploadFileMixin(ThemableMixin(ControllerMixin(PolymerEl
76
77
  file-event="file-start"
77
78
  on-click="_fireFileEvent"
78
79
  hidden$="[[!held]]"
80
+ disabled$="[[disabled]]"
79
81
  aria-label$="[[i18n.file.start]]"
80
82
  aria-describedby="name"
81
83
  ></button>
@@ -85,6 +87,7 @@ class UploadFile extends UploadFileMixin(ThemableMixin(ControllerMixin(PolymerEl
85
87
  file-event="file-retry"
86
88
  on-click="_fireFileEvent"
87
89
  hidden$="[[!errorMessage]]"
90
+ disabled$="[[disabled]]"
88
91
  aria-label$="[[i18n.file.retry]]"
89
92
  aria-describedby="name"
90
93
  ></button>
@@ -93,6 +96,7 @@ class UploadFile extends UploadFileMixin(ThemableMixin(ControllerMixin(PolymerEl
93
96
  part="remove-button"
94
97
  file-event="file-abort"
95
98
  on-click="_fireFileEvent"
99
+ disabled$="[[disabled]]"
96
100
  aria-label$="[[i18n.file.remove]]"
97
101
  aria-describedby="name"
98
102
  ></button>
@@ -68,6 +68,11 @@ export type UploadMethod = 'POST' | 'PUT';
68
68
  export declare function UploadMixin<T extends Constructor<HTMLElement>>(base: T): Constructor<UploadMixinClass> & T;
69
69
 
70
70
  export declare class UploadMixinClass {
71
+ /**
72
+ * If true, the user cannot interact with this element.
73
+ */
74
+ disabled: boolean;
75
+
71
76
  /**
72
77
  * Define whether the element supports dropping files on it for uploading.
73
78
  * By default it's enabled in desktop and disabled in touch devices
@@ -67,6 +67,16 @@ export const UploadMixin = (superClass) =>
67
67
  class UploadMixin extends superClass {
68
68
  static get properties() {
69
69
  return {
70
+ /**
71
+ * If true, the user cannot interact with this element.
72
+ * @type {boolean}
73
+ */
74
+ disabled: {
75
+ type: Boolean,
76
+ value: false,
77
+ reflectToAttribute: true,
78
+ },
79
+
70
80
  /**
71
81
  * Define whether the element supports dropping files on it for uploading.
72
82
  * By default it's enabled in desktop and disabled in touch devices
@@ -392,9 +402,9 @@ export const UploadMixin = (superClass) =>
392
402
 
393
403
  static get observers() {
394
404
  return [
395
- '__updateAddButton(_addButton, maxFiles, i18n, maxFilesReached)',
405
+ '__updateAddButton(_addButton, maxFiles, i18n, maxFilesReached, disabled)',
396
406
  '__updateDropLabel(_dropLabel, maxFiles, i18n)',
397
- '__updateFileList(_fileList, files, i18n)',
407
+ '__updateFileList(_fileList, files, i18n, disabled)',
398
408
  '__updateMaxFilesReached(maxFiles, files)',
399
409
  ];
400
410
  }
@@ -512,9 +522,9 @@ export const UploadMixin = (superClass) =>
512
522
  }
513
523
 
514
524
  /** @private */
515
- __updateAddButton(addButton, maxFiles, i18n, maxFilesReached) {
525
+ __updateAddButton(addButton, maxFiles, i18n, maxFilesReached, disabled) {
516
526
  if (addButton) {
517
- addButton.disabled = maxFilesReached;
527
+ addButton.disabled = disabled || maxFilesReached;
518
528
 
519
529
  // Only update text content for the default button element
520
530
  if (addButton === this._addButtonController.defaultNode) {
@@ -532,10 +542,11 @@ export const UploadMixin = (superClass) =>
532
542
  }
533
543
 
534
544
  /** @private */
535
- __updateFileList(list, files, i18n) {
545
+ __updateFileList(list, files, i18n, disabled) {
536
546
  if (list) {
537
547
  list.items = [...files];
538
548
  list.i18n = i18n;
549
+ list.disabled = disabled;
539
550
  }
540
551
  }
541
552
 
@@ -543,7 +554,7 @@ export const UploadMixin = (superClass) =>
543
554
  _onDragover(event) {
544
555
  event.preventDefault();
545
556
  if (!this.nodrop && !this._dragover) {
546
- this._dragoverValid = !this.maxFilesReached;
557
+ this._dragoverValid = !this.maxFilesReached && !this.disabled;
547
558
  this._dragover = true;
548
559
  }
549
560
  event.dataTransfer.dropEffect = !this._dragoverValid || this.nodrop ? 'none' : 'copy';
@@ -559,7 +570,7 @@ export const UploadMixin = (superClass) =>
559
570
 
560
571
  /** @private */
561
572
  async _onDrop(event) {
562
- if (!this.nodrop) {
573
+ if (!this.nodrop && !this.disabled) {
563
574
  event.preventDefault();
564
575
  this._dragover = this._dragoverValid = false;
565
576
 
@@ -134,6 +134,7 @@ export interface UploadEventMap extends HTMLElementEventMap, UploadCustomEventMa
134
134
  *
135
135
  * Attribute | Description | Part name
136
136
  * ---|---|---
137
+ * `disabled` | Set when the element is disabled | `:host`
137
138
  * `nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`
138
139
  * `dragover` | A file is being dragged over the element | `:host`
139
140
  * `dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`
@@ -36,6 +36,7 @@ import { UploadMixin } from './vaadin-upload-mixin.js';
36
36
  *
37
37
  * Attribute | Description | Part name
38
38
  * ---|---|---
39
+ * `disabled` | Set when the element is disabled | `:host`
39
40
  * `nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`
40
41
  * `dragover` | A file is being dragged over the element | `:host`
41
42
  * `dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`
@@ -46,6 +46,7 @@ registerStyles(
46
46
  color: var(--lumo-primary-text-color);
47
47
  }
48
48
 
49
+ :host([disabled]) [part='drop-label'],
49
50
  :host([max-files-reached]) [part='drop-label'] {
50
51
  color: var(--lumo-disabled-text-color);
51
52
  }
@@ -45,6 +45,7 @@ registerStyles(
45
45
  color: var(--material-primary-text-color);
46
46
  }
47
47
 
48
+ :host([disabled]) [part='drop-label'],
48
49
  :host([max-files-reached]) [part='drop-label'] {
49
50
  color: var(--material-disabled-text-color);
50
51
  }
@@ -179,6 +180,10 @@ registerStyles(
179
180
  color: inherit;
180
181
  }
181
182
 
183
+ [part$='button'][disabled] {
184
+ color: var(--material-disabled-text-color);
185
+ }
186
+
182
187
  [part='done-icon']::before {
183
188
  content: var(--material-icons-check);
184
189
  color: var(--material-primary-text-color);
@@ -201,7 +206,7 @@ registerStyles(
201
206
  content: var(--material-icons-clear);
202
207
  }
203
208
 
204
- [part$='button']::after {
209
+ [part$='button']:not([disabled])::after {
205
210
  position: absolute;
206
211
  content: '';
207
212
  top: 0;
package/web-types.json CHANGED
@@ -1,15 +1,26 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.6.0-alpha7",
4
+ "version": "24.6.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-upload-file",
11
- "description": "`<vaadin-upload-file>` element represents a file in the file list of `<vaadin-upload>`.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------|-------------\n`row` | File container\n`info` | Container for file status icon, file name, status and error messages\n`done-icon` | File done status icon\n`warning-icon` | File warning status icon\n`meta` | Container for file name, status and error messages\n`name` | File name\n`error` | Error message, shown when error happens\n`status` | Status message\n`commands` | Container for file command buttons\n`start-button` | Start file upload button\n`retry-button` | Retry file upload button\n`remove-button` | Remove file button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|-------------\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.\n`error` | An error has happened during uploading.\n`indeterminate` | Uploading is in progress, but the progress value is unknown.\n`uploading` | Uploading is in progress.\n`complete` | Uploading has finished successfully.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-upload-file>` element represents a file in the file list of `<vaadin-upload>`.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------|-------------\n`row` | File container\n`info` | Container for file status icon, file name, status and error messages\n`done-icon` | File done status icon\n`warning-icon` | File warning status icon\n`meta` | Container for file name, status and error messages\n`name` | File name\n`error` | Error message, shown when error happens\n`status` | Status message\n`commands` | Container for file command buttons\n`start-button` | Start file upload button\n`retry-button` | Retry file upload button\n`remove-button` | Remove file button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|-------------\n`disabled` | Set when the element is disabled\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.\n`error` | An error has happened during uploading.\n`indeterminate` | Uploading is in progress, but the progress value is unknown.\n`uploading` | Uploading is in progress.\n`complete` | Uploading has finished successfully.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
+ {
14
+ "name": "disabled",
15
+ "description": "If true, the user cannot interact with this element.",
16
+ "value": {
17
+ "type": [
18
+ "boolean",
19
+ "null",
20
+ "undefined"
21
+ ]
22
+ }
23
+ },
13
24
  {
14
25
  "name": "complete",
15
26
  "description": "True if uploading is completed, false otherwise.",
@@ -112,6 +123,17 @@
112
123
  ],
113
124
  "js": {
114
125
  "properties": [
126
+ {
127
+ "name": "disabled",
128
+ "description": "If true, the user cannot interact with this element.",
129
+ "value": {
130
+ "type": [
131
+ "boolean",
132
+ "null",
133
+ "undefined"
134
+ ]
135
+ }
136
+ },
115
137
  {
116
138
  "name": "complete",
117
139
  "description": "True if uploading is completed, false otherwise.",
@@ -241,8 +263,17 @@
241
263
  },
242
264
  {
243
265
  "name": "vaadin-upload",
244
- "description": "`<vaadin-upload>` is a Web Component for uploading multiple files with drag and drop support.\n\nExample:\n\n```\n<vaadin-upload></vaadin-upload>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------|-------------------------------------\n`primary-buttons` | Upload container\n`drop-label` | Element wrapping drop label and icon\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`\n`dragover` | A file is being dragged over the element | `:host`\n`dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`\n`max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
266
+ "description": "`<vaadin-upload>` is a Web Component for uploading multiple files with drag and drop support.\n\nExample:\n\n```\n<vaadin-upload></vaadin-upload>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------|-------------------------------------\n`primary-buttons` | Upload container\n`drop-label` | Element wrapping drop label and icon\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`disabled` | Set when the element is disabled | `:host`\n`nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`\n`dragover` | A file is being dragged over the element | `:host`\n`dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`\n`max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
245
267
  "attributes": [
268
+ {
269
+ "name": "disabled",
270
+ "description": "If true, the user cannot interact with this element.",
271
+ "value": {
272
+ "type": [
273
+ "boolean"
274
+ ]
275
+ }
276
+ },
246
277
  {
247
278
  "name": "nodrop",
248
279
  "description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",
@@ -358,6 +389,15 @@
358
389
  ],
359
390
  "js": {
360
391
  "properties": [
392
+ {
393
+ "name": "disabled",
394
+ "description": "If true, the user cannot interact with this element.",
395
+ "value": {
396
+ "type": [
397
+ "boolean"
398
+ ]
399
+ }
400
+ },
361
401
  {
362
402
  "name": "nodrop",
363
403
  "description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.6.0-alpha7",
4
+ "version": "24.6.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,9 +16,16 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-upload-file",
19
- "description": "`<vaadin-upload-file>` element represents a file in the file list of `<vaadin-upload>`.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------|-------------\n`row` | File container\n`info` | Container for file status icon, file name, status and error messages\n`done-icon` | File done status icon\n`warning-icon` | File warning status icon\n`meta` | Container for file name, status and error messages\n`name` | File name\n`error` | Error message, shown when error happens\n`status` | Status message\n`commands` | Container for file command buttons\n`start-button` | Start file upload button\n`retry-button` | Retry file upload button\n`remove-button` | Remove file button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|-------------\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.\n`error` | An error has happened during uploading.\n`indeterminate` | Uploading is in progress, but the progress value is unknown.\n`uploading` | Uploading is in progress.\n`complete` | Uploading has finished successfully.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-upload-file>` element represents a file in the file list of `<vaadin-upload>`.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------|-------------\n`row` | File container\n`info` | Container for file status icon, file name, status and error messages\n`done-icon` | File done status icon\n`warning-icon` | File warning status icon\n`meta` | Container for file name, status and error messages\n`name` | File name\n`error` | Error message, shown when error happens\n`status` | Status message\n`commands` | Container for file command buttons\n`start-button` | Start file upload button\n`retry-button` | Retry file upload button\n`remove-button` | Remove file button\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|-------------\n`disabled` | Set when the element is disabled\n`focus-ring` | Set when the element is focused using the keyboard.\n`focused` | Set when the element is focused.\n`error` | An error has happened during uploading.\n`indeterminate` | Uploading is in progress, but the progress value is unknown.\n`uploading` | Uploading is in progress.\n`complete` | Uploading has finished successfully.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
+ {
23
+ "name": "?disabled",
24
+ "description": "If true, the user cannot interact with this element.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
22
29
  {
23
30
  "name": "?complete",
24
31
  "description": "True if uploading is completed, false otherwise.",
@@ -114,9 +121,16 @@
114
121
  },
115
122
  {
116
123
  "name": "vaadin-upload",
117
- "description": "`<vaadin-upload>` is a Web Component for uploading multiple files with drag and drop support.\n\nExample:\n\n```\n<vaadin-upload></vaadin-upload>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------|-------------------------------------\n`primary-buttons` | Upload container\n`drop-label` | Element wrapping drop label and icon\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`\n`dragover` | A file is being dragged over the element | `:host`\n`dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`\n`max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
124
+ "description": "`<vaadin-upload>` is a Web Component for uploading multiple files with drag and drop support.\n\nExample:\n\n```\n<vaadin-upload></vaadin-upload>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------|-------------------------------------\n`primary-buttons` | Upload container\n`drop-label` | Element wrapping drop label and icon\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n---|---|---\n`disabled` | Set when the element is disabled | `:host`\n`nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`\n`dragover` | A file is being dragged over the element | `:host`\n`dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`\n`max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
118
125
  "extension": true,
119
126
  "attributes": [
127
+ {
128
+ "name": "?disabled",
129
+ "description": "If true, the user cannot interact with this element.",
130
+ "value": {
131
+ "kind": "expression"
132
+ }
133
+ },
120
134
  {
121
135
  "name": "?nodrop",
122
136
  "description": "Define whether the element supports dropping files on it for uploading.\nBy default it's enabled in desktop and disabled in touch devices\nbecause mobile devices do not support drag events in general. Setting\nit false means that drop is enabled even in touch-devices, and true\ndisables drop in all devices.",