@vaadin/context-menu 23.0.0-alpha2 → 23.0.0-beta1

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/context-menu",
3
- "version": "23.0.0-alpha2",
3
+ "version": "23.0.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "main": "vaadin-context-menu.js",
20
20
  "module": "vaadin-context-menu.js",
21
+ "type": "module",
21
22
  "files": [
22
23
  "src",
23
24
  "theme",
@@ -35,19 +36,19 @@
35
36
  "@open-wc/dedupe-mixin": "^1.3.0",
36
37
  "@polymer/iron-media-query": "^3.0.0",
37
38
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/component-base": "23.0.0-alpha2",
39
- "@vaadin/item": "23.0.0-alpha2",
40
- "@vaadin/list-box": "23.0.0-alpha2",
41
- "@vaadin/vaadin-lumo-styles": "23.0.0-alpha2",
42
- "@vaadin/vaadin-material-styles": "23.0.0-alpha2",
43
- "@vaadin/vaadin-overlay": "23.0.0-alpha2",
44
- "@vaadin/vaadin-themable-mixin": "23.0.0-alpha2"
39
+ "@vaadin/component-base": "23.0.0-beta1",
40
+ "@vaadin/item": "23.0.0-beta1",
41
+ "@vaadin/list-box": "23.0.0-beta1",
42
+ "@vaadin/vaadin-lumo-styles": "23.0.0-beta1",
43
+ "@vaadin/vaadin-material-styles": "23.0.0-beta1",
44
+ "@vaadin/vaadin-overlay": "23.0.0-beta1",
45
+ "@vaadin/vaadin-themable-mixin": "23.0.0-beta1"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@esm-bundle/chai": "^4.3.4",
48
- "@vaadin/polymer-legacy-adapter": "23.0.0-alpha2",
49
+ "@vaadin/polymer-legacy-adapter": "23.0.0-beta1",
49
50
  "@vaadin/testing-helpers": "^0.3.2",
50
51
  "sinon": "^9.2.1"
51
52
  },
52
- "gitHead": "070f586dead02ca41b66717820c647f48bf1665f"
53
+ "gitHead": "467244b76021176c109df675799b07029b293e58"
53
54
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { OverlayElement } from '@vaadin/vaadin-overlay/src/vaadin-overlay.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-contextmenu-event.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { flush } from '@polymer/polymer/lib/utils/flush.js';
7
+ import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
7
8
  import { Item } from '@vaadin/item/src/vaadin-item.js';
8
9
  import { ListBox } from '@vaadin/list-box/src/vaadin-list-box.js';
9
10
 
@@ -361,7 +362,10 @@ export const ItemsMixin = (superClass) =>
361
362
  }
362
363
  };
363
364
 
364
- menu.$.overlay.addEventListener('mouseover', openSubMenu);
365
+ // Open a submenu on click event when a touch device is used.
366
+ // On desktop, a submenu opens on hover.
367
+ menu.$.overlay.addEventListener(isTouch ? 'click' : 'mouseover', openSubMenu);
368
+
365
369
  menu.$.overlay.addEventListener('keydown', (e) => {
366
370
  const isRTL = this.__isRTL;
367
371
  const shouldOpenSubMenu =
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 Vaadin Ltd.
3
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@polymer/iron-media-query/iron-media-query.js';