@vaadin/vaadin-context-menu 22.0.0-alpha9 → 22.0.0

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.
Files changed (2) hide show
  1. package/README.md +7 -73
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,78 +1,11 @@
1
- # <vaadin-context-menu>
1
+ # @vaadin/vaadin-context-menu
2
2
 
3
- [Live Demo ↗](https://vaadin.com/components/vaadin-context-menu/html-examples)
4
- |
5
- [API documentation ↗](https://vaadin.com/components/vaadin-context-menu/html-api)
3
+ > ⚠️  Starting from Vaadin 22, this package is deprecated.
4
+ > Please use [`@vaadin/context-menu`](https://www.npmjs.com/package/@vaadin/context-menu) instead.
6
5
 
7
- [<vaadin-context-menu>](https://vaadin.com/components/vaadin-context-menu) is a Web Component providing a contextual menu, part of the [Vaadin components](https://vaadin.com/components).
6
+ A web component that can be attached to any component to display a context menu.
8
7
 
9
- [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-context-menu)](https://www.npmjs.com/package/@vaadin/vaadin-context-menu)
10
- [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-context-menu)
11
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
12
-
13
- ```html
14
- <vaadin-context-menu>
15
- <span>Open a context menu with <b>right click</b> or with <b>long touch.</b></span>
16
- </vaadin-context-menu>
17
-
18
- <script>
19
- const contextMenu = document.querySelector('vaadin-context-menu');
20
- contextMenu.renderer = function (root) {
21
- let listBox = root.firstElementChild;
22
- // Check if there is a list-box generated with the previous renderer call to update its content instead of recreation
23
- if (listBox) {
24
- listBox.innerHTML = '';
25
- } else {
26
- listBox = document.createElement('vaadin-list-box');
27
- root.appendChild(listBox);
28
- }
29
-
30
- ['First', 'Second', 'Third'].forEach(function (name) {
31
- const item = document.createElement('vaadin-item');
32
- item.textContent = name + ' menu item';
33
- listBox.appendChild(item);
34
- });
35
- };
36
- </script>
37
- ```
38
-
39
- [<img src="https://raw.githubusercontent.com/vaadin/vaadin-context-menu/master/screenshot.png" width="493" alt="Screenshot of vaadin-context-menu">](https://vaadin.com/components/vaadin-context-menu)
40
-
41
- **Note:** [`<vaadin-list-box>`](https://github.com/vaadin/vaadin-list-box) component used in the above example should be installed and imported separately.
42
-
43
- ## Installation
44
-
45
- Install `vaadin-context-menu`:
46
-
47
- ```sh
48
- npm i @vaadin/vaadin-context-menu --save
49
- ```
50
-
51
- Once installed, import it in your application:
52
-
53
- ```js
54
- import '@vaadin/vaadin-context-menu/vaadin-context-menu.js';
55
- ```
56
-
57
- ## Getting started
58
-
59
- Vaadin components use the Lumo theme by default.
60
-
61
- To use the Material theme, import the correspondent file from the `theme/material` folder.
62
-
63
- ## Entry points
64
-
65
- - The component with the Lumo theme:
66
-
67
- `theme/lumo/vaadin-context-menu.js`
68
-
69
- - The component with the Material theme:
70
-
71
- `theme/material/vaadin-context-menu.js`
72
-
73
- - Alias for `theme/lumo/vaadin-context-menu.js`:
74
-
75
- `vaadin-context-menu.js`
8
+ [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/context-menu)
76
9
 
77
10
  ## Contributing
78
11
 
@@ -82,4 +15,5 @@ Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/
82
15
 
83
16
  Apache License 2.0
84
17
 
85
- Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
18
+ Vaadin collects usage statistics at development time to improve this product..
19
+ For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/vaadin-context-menu",
3
- "version": "22.0.0-alpha9",
3
+ "version": "22.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,7 +32,7 @@
32
32
  "polymer"
33
33
  ],
34
34
  "dependencies": {
35
- "@vaadin/context-menu": "22.0.0-alpha9"
35
+ "@vaadin/context-menu": "^22.0.0"
36
36
  },
37
- "gitHead": "6e8c899dc65918f97e3c0acb2076122c4b2ef274"
37
+ "gitHead": "b668e9b1a975227fbe34beb70d1cd5b03dce2348"
38
38
  }