@vaadin/icon 22.0.0-beta1 → 22.0.1
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/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vaadin/icon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A web component for displaying SVG icons.
|
|
4
|
+
|
|
5
|
+
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/foundation/icons)
|
|
4
6
|
|
|
5
7
|
[](https://www.npmjs.com/package/@vaadin/icon)
|
|
6
8
|
[](https://discord.gg/PHmkCKC)
|
|
@@ -11,37 +13,40 @@
|
|
|
11
13
|
|
|
12
14
|
## Installation
|
|
13
15
|
|
|
14
|
-
Install
|
|
16
|
+
Install the component:
|
|
15
17
|
|
|
16
18
|
```sh
|
|
17
|
-
npm i @vaadin/icon
|
|
19
|
+
npm i @vaadin/icon
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
Once installed, import
|
|
22
|
+
Once installed, import the component in your application:
|
|
21
23
|
|
|
22
24
|
```js
|
|
23
|
-
import '@vaadin/icon
|
|
25
|
+
import '@vaadin/icon';
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
Vaadin components use the Lumo theme by default.
|
|
29
|
-
|
|
30
|
-
To use the Material theme, import the corresponding file from the `theme/material` folder.
|
|
28
|
+
## Themes
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material.
|
|
31
|
+
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/icon/vaadin-icon.js) of the package uses the Lumo theme.
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
To use the Material theme, import the component from the `theme/material` folder:
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
```js
|
|
36
|
+
import '@vaadin/icon/theme/material/vaadin-icon.js';
|
|
37
|
+
```
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
You can also import the Lumo version of the component explicitly:
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
```js
|
|
42
|
+
import '@vaadin/icon/theme/lumo/vaadin-icon.js';
|
|
43
|
+
```
|
|
41
44
|
|
|
42
|
-
-
|
|
45
|
+
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
```js
|
|
48
|
+
import '@vaadin/icon/src/vaadin-icon.js';
|
|
49
|
+
```
|
|
45
50
|
|
|
46
51
|
## Contributing
|
|
47
52
|
|
|
@@ -51,4 +56,5 @@ Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/
|
|
|
51
56
|
|
|
52
57
|
Apache License 2.0
|
|
53
58
|
|
|
54
|
-
Vaadin collects development time
|
|
59
|
+
Vaadin collects usage statistics at development time to improve this product.
|
|
60
|
+
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/icon",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@polymer/polymer": "^3.0.0",
|
|
35
|
-
"@vaadin/component-base": "22.0.
|
|
36
|
-
"@vaadin/vaadin-lumo-styles": "22.0.
|
|
37
|
-
"@vaadin/vaadin-themable-mixin": "22.0.
|
|
35
|
+
"@vaadin/component-base": "^22.0.1",
|
|
36
|
+
"@vaadin/vaadin-lumo-styles": "^22.0.1",
|
|
37
|
+
"@vaadin/vaadin-themable-mixin": "^22.0.1",
|
|
38
38
|
"lit": "^2.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vaadin/testing-helpers": "^0.3.
|
|
41
|
+
"@vaadin/testing-helpers": "^0.3.2"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2b0a2bff0369d6020f7cc33ad35506aa2d1f6f68"
|
|
44
44
|
}
|
package/src/vaadin-icon.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
8
8
|
import { IconSvgLiteral } from './vaadin-icon-svg.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* `<vaadin-icon>` is a Web Component for
|
|
11
|
+
* `<vaadin-icon>` is a Web Component for displaying SVG icons.
|
|
12
12
|
*
|
|
13
13
|
* ### Icon property
|
|
14
14
|
*
|
package/src/vaadin-icon.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Copyright (c) 2021 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
7
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
8
8
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
|
-
import { Iconset } from './vaadin-iconset.js';
|
|
10
9
|
import { ensureSvgLiteral, renderSvg } from './vaadin-icon-svg.js';
|
|
10
|
+
import { Iconset } from './vaadin-iconset.js';
|
|
11
11
|
|
|
12
12
|
const DEFAULT_ICONSET = 'vaadin';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* `<vaadin-icon>` is a Web Component for
|
|
15
|
+
* `<vaadin-icon>` is a Web Component for displaying SVG icons.
|
|
16
16
|
*
|
|
17
17
|
* ### Icon property
|
|
18
18
|
*
|