@vaadin/component-base 22.0.3 → 22.0.6

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/component-base",
3
- "version": "22.0.3",
3
+ "version": "22.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -41,5 +41,5 @@
41
41
  "@vaadin/testing-helpers": "^0.3.2",
42
42
  "sinon": "^9.2.4"
43
43
  },
44
- "gitHead": "935ad1ea65a79b0f9ecb10d767689479b36c4e07"
44
+ "gitHead": "18c55872d764e338e0f98e65826cbe895156251a"
45
45
  }
@@ -3,11 +3,18 @@
3
3
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { setCancelSyntheticClickEvents } from '@polymer/polymer/lib/utils/settings.js';
6
7
  import { usageStatistics } from '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js';
7
8
  import { idlePeriod } from './async.js';
8
9
  import { Debouncer, enqueueDebouncer } from './debounce.js';
9
10
  import { DirMixin } from './dir-mixin.js';
10
11
 
12
+ // This setting affects the legacy Polymer gestures which get activated
13
+ // once you import any iron component e.g iron-icon.
14
+ // It has to be explicitly disabled to prevent click issues in iOS + VoiceOver
15
+ // for buttons that are based on `[role=button]` e.g vaadin-button.
16
+ setCancelSyntheticClickEvents(false);
17
+
11
18
  window.Vaadin = window.Vaadin || {};
12
19
 
13
20
  /**
@@ -32,7 +39,7 @@ const registered = new Set();
32
39
  export const ElementMixin = (superClass) =>
33
40
  class VaadinElementMixin extends DirMixin(superClass) {
34
41
  static get version() {
35
- return '22.0.3';
42
+ return '22.0.6';
36
43
  }
37
44
 
38
45
  /** @protected */
@@ -3,6 +3,7 @@
3
3
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
+ import { dashToCamelCase } from '@polymer/polymer/lib/utils/case-map.js';
6
7
  import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
7
8
 
8
9
  /**
@@ -30,10 +31,13 @@ export class SlotController extends EventTarget {
30
31
  static generateId(slotName, host) {
31
32
  const prefix = slotName || 'default';
32
33
 
34
+ // Support dash-case slot names e.g. "error-message"
35
+ const field = `${dashToCamelCase(prefix)}Id`;
36
+
33
37
  // Maintain the unique ID counter for a given prefix.
34
- this[`${prefix}Id`] = 1 + this[`${prefix}Id`] || 0;
38
+ this[field] = 1 + this[field] || 0;
35
39
 
36
- return `${prefix}-${host.localName}-${this[`${prefix}Id`]}`;
40
+ return `${prefix}-${host.localName}-${this[field]}`;
37
41
  }
38
42
 
39
43
  hostConnected() {
@@ -56,7 +56,9 @@ export const TabindexMixin = (superclass) =>
56
56
  super._disabledChanged(disabled, oldDisabled);
57
57
 
58
58
  if (disabled) {
59
- this.__lastTabIndex = this.tabindex;
59
+ if (this.tabindex !== undefined) {
60
+ this.__lastTabIndex = this.tabindex;
61
+ }
60
62
  this.tabindex = -1;
61
63
  } else if (oldDisabled) {
62
64
  this.tabindex = this.__lastTabIndex;