@vaadin/icon
Advanced tools
Comparing version
{ | ||
"name": "@vaadin/icon", | ||
"version": "22.0.0-beta1", | ||
"version": "22.0.0-beta2", | ||
"publishConfig": { | ||
@@ -35,5 +35,5 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "22.0.0-beta1", | ||
"@vaadin/vaadin-lumo-styles": "22.0.0-beta1", | ||
"@vaadin/vaadin-themable-mixin": "22.0.0-beta1", | ||
"@vaadin/component-base": "22.0.0-beta2", | ||
"@vaadin/vaadin-lumo-styles": "22.0.0-beta2", | ||
"@vaadin/vaadin-themable-mixin": "22.0.0-beta2", | ||
"lit": "^2.0.0" | ||
@@ -44,3 +44,3 @@ }, | ||
}, | ||
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e" | ||
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4" | ||
} |
@@ -1,5 +0,7 @@ | ||
# <vaadin-icon> | ||
# @vaadin/icon | ||
[<vaadin-icon>](https://vaadin.com/docs/latest/ds/components/icon) is a Web Component for creating SVG icons, part of the [Vaadin components](https://vaadin.com/docs/latest/ds/components). | ||
A web component for displaying SVG icons. | ||
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/foundation/icons) | ||
[](https://www.npmjs.com/package/@vaadin/icon) | ||
@@ -14,34 +16,37 @@ [](https://discord.gg/PHmkCKC) | ||
Install `vaadin-icon`: | ||
Install the component: | ||
```sh | ||
npm i @vaadin/icon --save | ||
npm i @vaadin/icon | ||
``` | ||
Once installed, import it in your application: | ||
Once installed, import the component in your application: | ||
```js | ||
import '@vaadin/icon/vaadin-icon.js'; | ||
import '@vaadin/icon'; | ||
``` | ||
## Getting started | ||
## Themes | ||
Vaadin components use the Lumo theme by default. | ||
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material. | ||
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/icon/vaadin-icon.js) of the package uses the Lumo theme. | ||
To use the Material theme, import the corresponding file from the `theme/material` folder. | ||
To use the Material theme, import the component from the `theme/material` folder: | ||
## Entry points | ||
```js | ||
import '@vaadin/icon/theme/material/vaadin-icon.js'; | ||
``` | ||
- The component with the Lumo theme: | ||
You can also import the Lumo version of the component explicitly: | ||
`theme/lumo/vaadin-icon.js` | ||
```js | ||
import '@vaadin/icon/theme/lumo/vaadin-icon.js'; | ||
``` | ||
- The component with the Material theme: | ||
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point: | ||
`theme/material/vaadin-icon.js` | ||
```js | ||
import '@vaadin/icon/src/vaadin-icon.js'; | ||
``` | ||
- Alias for `theme/lumo/vaadin-icon.js`: | ||
`vaadin-icon.js` | ||
## Contributing | ||
@@ -55,2 +60,3 @@ | ||
Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. | ||
Vaadin collects usage statistics at development time to improve this product. | ||
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. |
@@ -11,3 +11,3 @@ /** | ||
/** | ||
* `<vaadin-icon>` is a Web Component for creating SVG icons. | ||
* `<vaadin-icon>` is a Web Component for displaying SVG icons. | ||
* | ||
@@ -14,0 +14,0 @@ * ### Icon property |
@@ -6,7 +6,7 @@ /** | ||
*/ | ||
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
import { ensureSvgLiteral, renderSvg } from './vaadin-icon-svg.js'; | ||
import { Iconset } from './vaadin-iconset.js'; | ||
import { ensureSvgLiteral, renderSvg } from './vaadin-icon-svg.js'; | ||
@@ -16,3 +16,3 @@ const DEFAULT_ICONSET = 'vaadin'; | ||
/** | ||
* `<vaadin-icon>` is a Web Component for creating SVG icons. | ||
* `<vaadin-icon>` is a Web Component for displaying SVG icons. | ||
* | ||
@@ -19,0 +19,0 @@ * ### Icon property |
@@ -1,3 +0,3 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import '@vaadin/vaadin-lumo-styles/sizing.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -4,0 +4,0 @@ registerStyles( |
@@ -1,2 +0,2 @@ | ||
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js'; | ||
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
@@ -3,0 +3,0 @@ registerStyles( |
18829
1.41%61
10.91%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed