@vaadin/upload 24.9.0-alpha2 → 24.9.0-beta2

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.9.0-alpha2",
3
+ "version": "24.9.0-beta2",
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": "24.9.0-alpha2",
41
- "@vaadin/button": "24.9.0-alpha2",
42
- "@vaadin/component-base": "24.9.0-alpha2",
43
- "@vaadin/progress-bar": "24.9.0-alpha2",
44
- "@vaadin/vaadin-lumo-styles": "24.9.0-alpha2",
45
- "@vaadin/vaadin-material-styles": "24.9.0-alpha2",
46
- "@vaadin/vaadin-themable-mixin": "24.9.0-alpha2",
40
+ "@vaadin/a11y-base": "24.9.0-beta2",
41
+ "@vaadin/button": "24.9.0-beta2",
42
+ "@vaadin/component-base": "24.9.0-beta2",
43
+ "@vaadin/progress-bar": "24.9.0-beta2",
44
+ "@vaadin/vaadin-lumo-styles": "24.9.0-beta2",
45
+ "@vaadin/vaadin-material-styles": "24.9.0-beta2",
46
+ "@vaadin/vaadin-themable-mixin": "24.9.0-beta2",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@vaadin/chai-plugins": "24.9.0-alpha2",
51
- "@vaadin/test-runner-commands": "24.9.0-alpha2",
50
+ "@vaadin/chai-plugins": "24.9.0-beta2",
51
+ "@vaadin/test-runner-commands": "24.9.0-beta2",
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": "dd99dece1b54942ab0e421892b089e506822c5f5"
59
+ "gitHead": "cf8def153fcf724b305f9ad823dc9af27e31ad07"
60
60
  }
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { announce } from '@vaadin/a11y-base/src/announce.js';
7
+ import { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
7
8
  import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
8
9
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
9
10
  import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
@@ -894,14 +895,14 @@ export const UploadMixin = (superClass) =>
894
895
  /** @private */
895
896
  _updateFocus(fileIndex) {
896
897
  if (this.files.length === 0) {
897
- this._addButton.focus();
898
+ this._addButton.focus({ focusVisible: isKeyboardActive() });
898
899
  return;
899
900
  }
900
901
  const lastFileRemoved = fileIndex === this.files.length;
901
902
  if (lastFileRemoved) {
902
903
  fileIndex -= 1;
903
904
  }
904
- this._fileList.children[fileIndex].firstElementChild.focus();
905
+ this._fileList.children[fileIndex].firstElementChild.focus({ focusVisible: isKeyboardActive() });
905
906
  }
906
907
 
907
908
  /**
@@ -134,13 +134,13 @@ export interface UploadEventMap extends HTMLElementEventMap, UploadCustomEventMa
134
134
  *
135
135
  * The following state attributes are available for styling:
136
136
  *
137
- * Attribute | Description | Part name
138
- * ---|---|---
139
- * `disabled` | Set when the element is disabled | `:host`
140
- * `nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`
141
- * `dragover` | A file is being dragged over the element | `:host`
142
- * `dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`
143
- * `max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`
137
+ * Attribute | Description
138
+ * ---------------------|---------------------------------
139
+ * `disabled` | Set when the element is disabled
140
+ * `nodrop` | Set when drag and drop is disabled (e.g., on touch devices)
141
+ * `dragover` | Set when the file is being dragged over the element
142
+ * `dragover-valid` | Set when the dragged file is valid with `maxFiles` and `accept` criteria
143
+ * `max-files-reached` | Set when maximum number of files that the user is allowed to add has been reached
144
144
  *
145
145
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
146
146
  *
@@ -34,13 +34,13 @@ import { UploadMixin } from './vaadin-upload-mixin.js';
34
34
  *
35
35
  * The following state attributes are available for styling:
36
36
  *
37
- * Attribute | Description | Part name
38
- * ---|---|---
39
- * `disabled` | Set when the element is disabled | `:host`
40
- * `nodrop` | Set when drag and drop is disabled (e. g., on touch devices) | `:host`
41
- * `dragover` | A file is being dragged over the element | `:host`
42
- * `dragover-valid` | A dragged file is valid with `maxFiles` and `accept` criteria | `:host`
43
- * `max-files-reached` | The maximum number of files that the user is allowed to add to the upload has been reached | `:host`
37
+ * Attribute | Description
38
+ * ---------------------|---------------------------------
39
+ * `disabled` | Set when the element is disabled
40
+ * `nodrop` | Set when drag and drop is disabled (e.g., on touch devices)
41
+ * `dragover` | Set when the file is being dragged over the element
42
+ * `dragover-valid` | Set when the dragged file is valid with `maxFiles` and `accept` criteria
43
+ * `max-files-reached` | Set when maximum number of files that the user is allowed to add has been reached
44
44
  *
45
45
  * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
46
46
  *
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.9.0-alpha2",
4
+ "version": "24.9.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -263,7 +263,7 @@
263
263
  },
264
264
  {
265
265
  "name": "vaadin-upload",
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.",
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\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`nodrop` | Set when drag and drop is disabled (e.g., on touch devices)\n`dragover` | Set when the file is being dragged over the element\n`dragover-valid` | Set when the dragged file is valid with `maxFiles` and `accept` criteria\n`max-files-reached` | Set when maximum number of files that the user is allowed to add has been reached\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
267
267
  "attributes": [
268
268
  {
269
269
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/upload",
4
- "version": "24.9.0-alpha2",
4
+ "version": "24.9.0-beta2",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -121,7 +121,7 @@
121
121
  },
122
122
  {
123
123
  "name": "vaadin-upload",
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.",
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\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`nodrop` | Set when drag and drop is disabled (e.g., on touch devices)\n`dragover` | Set when the file is being dragged over the element\n`dragover-valid` | Set when the dragged file is valid with `maxFiles` and `accept` criteria\n`max-files-reached` | Set when maximum number of files that the user is allowed to add has been reached\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
125
125
  "extension": true,
126
126
  "attributes": [
127
127
  {