@vaadin/icon 24.6.5 → 24.7.0-alpha10
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/LICENSE +1 -1
- package/package.json +7 -9
- package/src/vaadin-icon-font-size-mixin.d.ts +1 -1
- package/src/vaadin-icon-font-size-mixin.js +1 -1
- package/src/vaadin-icon-helpers.js +1 -1
- package/src/vaadin-icon-mixin.d.ts +1 -1
- package/src/vaadin-icon-mixin.js +1 -1
- package/src/vaadin-icon-styles.js +1 -1
- package/src/vaadin-icon-svg.d.ts +1 -1
- package/src/vaadin-icon-svg.js +1 -1
- package/src/vaadin-icon.d.ts +1 -1
- package/src/vaadin-icon.js +1 -1
- package/src/vaadin-iconset-mixin.d.ts +1 -1
- package/src/vaadin-iconset-mixin.js +67 -37
- package/src/vaadin-iconset.d.ts +2 -3
- package/src/vaadin-iconset.js +2 -9
- package/src/vaadin-lit-icon.d.ts +6 -0
- package/src/vaadin-lit-icon.js +62 -0
- package/theme/lumo/vaadin-lit-icon.d.ts +2 -0
- package/theme/lumo/vaadin-lit-icon.js +2 -0
- package/theme/material/vaadin-lit-icon.d.ts +2 -0
- package/theme/material/vaadin-lit-icon.js +2 -0
- package/vaadin-lit-icon.d.ts +1 -0
- package/vaadin-lit-icon.js +3 -0
- package/web-types.json +7 -33
- package/web-types.lit.json +4 -4
package/LICENSE
CHANGED
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
|
|
176
176
|
END OF TERMS AND CONDITIONS
|
|
177
177
|
|
|
178
|
-
Copyright 2021-
|
|
178
|
+
Copyright 2021-2025 Vaadin Ltd.
|
|
179
179
|
|
|
180
180
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
181
|
you may not use this file except in compliance with the License.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/icon",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.7.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"theme",
|
|
25
25
|
"vaadin-*.d.ts",
|
|
26
26
|
"vaadin-*.js",
|
|
27
|
-
"!vaadin-lit-*.d.ts",
|
|
28
|
-
"!vaadin-lit-*.js",
|
|
29
27
|
"web-types.json",
|
|
30
28
|
"web-types.lit.json"
|
|
31
29
|
],
|
|
@@ -38,14 +36,14 @@
|
|
|
38
36
|
"dependencies": {
|
|
39
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
38
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/component-base": "
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
39
|
+
"@vaadin/component-base": "24.7.0-alpha10",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "24.7.0-alpha10",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "24.7.0-alpha10",
|
|
44
42
|
"lit": "^3.0.0"
|
|
45
43
|
},
|
|
46
44
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "
|
|
48
|
-
"@vaadin/test-runner-commands": "
|
|
45
|
+
"@vaadin/chai-plugins": "24.7.0-alpha10",
|
|
46
|
+
"@vaadin/test-runner-commands": "24.7.0-alpha10",
|
|
49
47
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
50
48
|
"sinon": "^18.0.0"
|
|
51
49
|
},
|
|
@@ -53,5 +51,5 @@
|
|
|
53
51
|
"web-types.json",
|
|
54
52
|
"web-types.lit.json"
|
|
55
53
|
],
|
|
56
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c0f8933df2a6a40648d3fb9cfbae6bbf86a8aa90"
|
|
57
55
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 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 type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 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 { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2025 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 type { Constructor } from '@open-wc/dedupe-mixin';
|
package/src/vaadin-icon-mixin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 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 { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2025 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 { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
package/src/vaadin-icon-svg.d.ts
CHANGED
package/src/vaadin-icon-svg.js
CHANGED
package/src/vaadin-icon.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 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 { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
package/src/vaadin-icon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2017 -
|
|
3
|
+
* Copyright (c) 2017 - 2025 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 type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 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 { cloneSvgNode } from './vaadin-icon-svg.js';
|
|
@@ -36,31 +36,8 @@ function initIconsMap(iconset, name) {
|
|
|
36
36
|
*/
|
|
37
37
|
export const IconsetMixin = (superClass) =>
|
|
38
38
|
class extends superClass {
|
|
39
|
-
static get
|
|
40
|
-
return
|
|
41
|
-
/**
|
|
42
|
-
* The name of the iconset. Every iconset is required to have its own unique name.
|
|
43
|
-
* All the SVG icons in the iconset must have IDs conforming to its name.
|
|
44
|
-
*
|
|
45
|
-
* See also [`name`](#/elements/vaadin-icon#property-name) property of `vaadin-icon`.
|
|
46
|
-
*/
|
|
47
|
-
name: {
|
|
48
|
-
type: String,
|
|
49
|
-
observer: '__nameChanged',
|
|
50
|
-
sync: true,
|
|
51
|
-
},
|
|
52
|
-
/**
|
|
53
|
-
* The size of an individual icon. Note that icons must be square.
|
|
54
|
-
*
|
|
55
|
-
* When using `vaadin-icon`, the size of the iconset will take precedence
|
|
56
|
-
* over the size defined by the user to ensure correct appearance.
|
|
57
|
-
*/
|
|
58
|
-
size: {
|
|
59
|
-
type: Number,
|
|
60
|
-
value: 24,
|
|
61
|
-
sync: true,
|
|
62
|
-
},
|
|
63
|
-
};
|
|
39
|
+
static get observedAttributes() {
|
|
40
|
+
return ['name', 'size'];
|
|
64
41
|
}
|
|
65
42
|
|
|
66
43
|
/**
|
|
@@ -123,23 +100,75 @@ export const IconsetMixin = (superClass) =>
|
|
|
123
100
|
initIconsMap(iconset, name);
|
|
124
101
|
iconset.size = size;
|
|
125
102
|
iconset.name = name;
|
|
126
|
-
|
|
127
|
-
// Call this function manually instead of using observer
|
|
128
|
-
// to make it work without appending element to the DOM.
|
|
129
|
-
iconset.__nameChanged(name);
|
|
130
103
|
}
|
|
131
104
|
}
|
|
132
105
|
|
|
106
|
+
/**
|
|
107
|
+
* The name of the iconset. Every iconset is required to have its own unique name.
|
|
108
|
+
* All the SVG icons in the iconset must have IDs conforming to its name.
|
|
109
|
+
*
|
|
110
|
+
* See also [`name`](#/elements/vaadin-icon#property-name) property of `vaadin-icon`.
|
|
111
|
+
*
|
|
112
|
+
* @return {string}
|
|
113
|
+
*/
|
|
114
|
+
get name() {
|
|
115
|
+
return this.__name;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @type {string}
|
|
120
|
+
*/
|
|
121
|
+
set name(name) {
|
|
122
|
+
const oldName = this.__name;
|
|
123
|
+
this.__name = name;
|
|
124
|
+
this.__nameChanged(name, oldName);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The size of an individual icon. Note that icons must be square.
|
|
129
|
+
*
|
|
130
|
+
* When using `vaadin-icon`, the size of the iconset will take precedence
|
|
131
|
+
* over the size defined by the user to ensure correct appearance.
|
|
132
|
+
*
|
|
133
|
+
* @return {number}
|
|
134
|
+
*/
|
|
135
|
+
get size() {
|
|
136
|
+
// Use default property value as a fallback here instead of the constructor
|
|
137
|
+
// to not override an instance property in the lazy upgrade scenario below.
|
|
138
|
+
return this.__size !== undefined ? this.__size : 24;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @type {number}
|
|
143
|
+
*/
|
|
144
|
+
set size(size) {
|
|
145
|
+
this.__size = size;
|
|
146
|
+
}
|
|
147
|
+
|
|
133
148
|
/** @protected */
|
|
134
149
|
connectedCallback() {
|
|
135
|
-
|
|
150
|
+
// A user may set a property on an _instance_ of an element
|
|
151
|
+
// before the custom element is lazily imported and upgraded.
|
|
152
|
+
// If so, we need to run it through the proper class setter.
|
|
153
|
+
['name', 'size'].forEach((prop) => {
|
|
154
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
155
|
+
if (this.hasOwnProperty(prop)) {
|
|
156
|
+
const value = this[prop];
|
|
157
|
+
delete this[prop];
|
|
158
|
+
this[prop] = value;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
|
|
136
162
|
this.style.display = 'none';
|
|
163
|
+
}
|
|
137
164
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
165
|
+
/** @protected */
|
|
166
|
+
attributeChangedCallback(attr, _oldValue, newValue) {
|
|
167
|
+
if (attr === 'name') {
|
|
168
|
+
this.name = newValue;
|
|
169
|
+
} else if (attr === 'size') {
|
|
170
|
+
this.size = newValue == null ? null : Number(newValue);
|
|
171
|
+
}
|
|
143
172
|
}
|
|
144
173
|
|
|
145
174
|
/**
|
|
@@ -159,10 +188,11 @@ export const IconsetMixin = (superClass) =>
|
|
|
159
188
|
/** @private */
|
|
160
189
|
__nameChanged(name, oldName) {
|
|
161
190
|
if (oldName) {
|
|
162
|
-
iconsetRegistry[name] = iconsetRegistry[oldName];
|
|
163
191
|
delete iconsetRegistry[oldName];
|
|
164
192
|
}
|
|
165
193
|
if (name) {
|
|
194
|
+
iconsetRegistry[name] = this;
|
|
195
|
+
initIconsMap(this, name);
|
|
166
196
|
this.__updateIcons(name);
|
|
167
197
|
}
|
|
168
198
|
}
|
package/src/vaadin-iconset.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
7
6
|
import type { Icon } from './vaadin-icon.js';
|
|
8
7
|
import type { IconSvgLiteral } from './vaadin-icon-svg.js';
|
|
9
8
|
import { IconsetMixin } from './vaadin-iconset-mixin.js';
|
|
@@ -11,7 +10,7 @@ import { IconsetMixin } from './vaadin-iconset-mixin.js';
|
|
|
11
10
|
/**
|
|
12
11
|
* `<vaadin-iconset>` is a Web Component for creating SVG icon collections.
|
|
13
12
|
*/
|
|
14
|
-
declare class Iconset extends
|
|
13
|
+
declare class Iconset extends IconsetMixin(HTMLElement) {
|
|
15
14
|
/**
|
|
16
15
|
* Set of the `vaadin-icon` instances in the DOM.
|
|
17
16
|
*/
|
package/src/vaadin-iconset.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
6
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
7
|
import { IconsetMixin } from './vaadin-iconset-mixin.js';
|
|
10
8
|
|
|
11
9
|
/**
|
|
@@ -14,13 +12,8 @@ import { IconsetMixin } from './vaadin-iconset-mixin.js';
|
|
|
14
12
|
* @customElement
|
|
15
13
|
* @extends HTMLElement
|
|
16
14
|
* @mixes IconsetMixin
|
|
17
|
-
* @mixes ElementMixin
|
|
18
15
|
*/
|
|
19
|
-
class Iconset extends IconsetMixin(
|
|
20
|
-
static get template() {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
16
|
+
class Iconset extends IconsetMixin(HTMLElement) {
|
|
24
17
|
static get is() {
|
|
25
18
|
return 'vaadin-iconset';
|
|
26
19
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import './vaadin-iconset.js';
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
9
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
10
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
11
|
+
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
12
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
13
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
|
+
import { IconMixin } from './vaadin-icon-mixin.js';
|
|
15
|
+
import { iconStyles } from './vaadin-icon-styles.js';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* LitElement based version of `<vaadin-icon>` web component.
|
|
19
|
+
*
|
|
20
|
+
* ## Disclaimer
|
|
21
|
+
*
|
|
22
|
+
* This component is an experiment not intended for publishing to npm.
|
|
23
|
+
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
24
|
+
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
25
|
+
*/
|
|
26
|
+
class Icon extends IconMixin(ControllerMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement))))) {
|
|
27
|
+
static styles = iconStyles;
|
|
28
|
+
|
|
29
|
+
/** @protected */
|
|
30
|
+
render() {
|
|
31
|
+
return html`
|
|
32
|
+
<svg
|
|
33
|
+
version="1.1"
|
|
34
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
36
|
+
viewBox="${this.__computeViewBox(this.size, this.__viewBox)}"
|
|
37
|
+
preserveAspectRatio="${this.__computePAR(this.__defaultPAR, this.__preserveAspectRatio)}"
|
|
38
|
+
fill="${ifDefined(this.__fill)}"
|
|
39
|
+
stroke="${ifDefined(this.__stroke)}"
|
|
40
|
+
stroke-width="${ifDefined(this.__strokeWidth)}"
|
|
41
|
+
stroke-linecap="${ifDefined(this.__strokeLinecap)}"
|
|
42
|
+
stroke-linejoin="${ifDefined(this.__strokeLinejoin)}"
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
>
|
|
45
|
+
<g id="svg-group"></g>
|
|
46
|
+
<g id="use-group" visibility="${this.__computeVisibility(this.__useRef, this.svg)}">
|
|
47
|
+
<use href="${this.__useRef}" />
|
|
48
|
+
</g>
|
|
49
|
+
</svg>
|
|
50
|
+
|
|
51
|
+
<slot name="tooltip"></slot>
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static get is() {
|
|
56
|
+
return 'vaadin-icon';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
defineCustomElement(Icon);
|
|
61
|
+
|
|
62
|
+
export { Icon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vaadin-icon.js';
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/icon",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.7.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -10,28 +10,6 @@
|
|
|
10
10
|
"name": "vaadin-iconset",
|
|
11
11
|
"description": "`<vaadin-iconset>` is a Web Component for creating SVG icon collections.",
|
|
12
12
|
"attributes": [
|
|
13
|
-
{
|
|
14
|
-
"name": "name",
|
|
15
|
-
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.6.5/#/elements/vaadin-icon#property-name) property of `vaadin-icon`.",
|
|
16
|
-
"value": {
|
|
17
|
-
"type": [
|
|
18
|
-
"string",
|
|
19
|
-
"null",
|
|
20
|
-
"undefined"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "size",
|
|
26
|
-
"description": "The size of an individual icon. Note that icons must be square.\n\nWhen using `vaadin-icon`, the size of the iconset will take precedence\nover the size defined by the user to ensure correct appearance.",
|
|
27
|
-
"value": {
|
|
28
|
-
"type": [
|
|
29
|
-
"number",
|
|
30
|
-
"null",
|
|
31
|
-
"undefined"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
13
|
{
|
|
36
14
|
"name": "theme",
|
|
37
15
|
"description": "The theme variants to apply to the component.",
|
|
@@ -48,12 +26,10 @@
|
|
|
48
26
|
"properties": [
|
|
49
27
|
{
|
|
50
28
|
"name": "name",
|
|
51
|
-
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
29
|
+
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-icon#property-name) property of `vaadin-icon`.",
|
|
52
30
|
"value": {
|
|
53
31
|
"type": [
|
|
54
|
-
"string"
|
|
55
|
-
"null",
|
|
56
|
-
"undefined"
|
|
32
|
+
"string"
|
|
57
33
|
]
|
|
58
34
|
}
|
|
59
35
|
},
|
|
@@ -62,9 +38,7 @@
|
|
|
62
38
|
"description": "The size of an individual icon. Note that icons must be square.\n\nWhen using `vaadin-icon`, the size of the iconset will take precedence\nover the size defined by the user to ensure correct appearance.",
|
|
63
39
|
"value": {
|
|
64
40
|
"type": [
|
|
65
|
-
"number"
|
|
66
|
-
"null",
|
|
67
|
-
"undefined"
|
|
41
|
+
"number"
|
|
68
42
|
]
|
|
69
43
|
}
|
|
70
44
|
}
|
|
@@ -74,11 +48,11 @@
|
|
|
74
48
|
},
|
|
75
49
|
{
|
|
76
50
|
"name": "vaadin-icon",
|
|
77
|
-
"description": "`<vaadin-icon>` is a Web Component for displaying SVG icons.\n\n### Icon property\n\nThe `<vaadin-icon>` component is designed to be used as a drop-in replacement for `<iron-icon>`.\nFor example, you can use it with `vaadin-icons` like this:\n\n```html\n<vaadin-icon icon=\"vaadin:angle-down\"></vaadin-icon>\n```\n\nAlternatively, you can also pick one of the Lumo icons:\n\n```html\n<vaadin-icon icon=\"lumo:user\"></vaadin-icon>\n```\n\n### Custom SVG icon\n\nAlternatively, instead of selecting an icon from an iconset by name, you can pass any custom `svg`\nliteral using the [`svg`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
51
|
+
"description": "`<vaadin-icon>` is a Web Component for displaying SVG icons.\n\n### Icon property\n\nThe `<vaadin-icon>` component is designed to be used as a drop-in replacement for `<iron-icon>`.\nFor example, you can use it with `vaadin-icons` like this:\n\n```html\n<vaadin-icon icon=\"vaadin:angle-down\"></vaadin-icon>\n```\n\nAlternatively, you can also pick one of the Lumo icons:\n\n```html\n<vaadin-icon icon=\"lumo:user\"></vaadin-icon>\n```\n\n### Custom SVG icon\n\nAlternatively, instead of selecting an icon from an iconset by name, you can pass any custom `svg`\nliteral using the [`svg`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-icon#property-svg) property. In this case you can also\ndefine the size of the SVG `viewBox` using the [`size`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-icon#property-size) property:\n\n```js\nimport { html, svg } from 'lit';\n\n// in your component\nrender() {\n const svgIcon = svg`<path d=\"M13 4v2l-5 5-5-5v-2l5 5z\"></path>`;\n return html`\n <vaadin-icon\n .svg=\"${svgIcon}\"\n size=\"16\"\n ></vaadin-icon>\n `;\n}\n```",
|
|
78
52
|
"attributes": [
|
|
79
53
|
{
|
|
80
54
|
"name": "icon",
|
|
81
|
-
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
55
|
+
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-iconset#property-name) property of `vaadin-iconset`.",
|
|
82
56
|
"value": {
|
|
83
57
|
"type": [
|
|
84
58
|
"string"
|
|
@@ -166,7 +140,7 @@
|
|
|
166
140
|
"properties": [
|
|
167
141
|
{
|
|
168
142
|
"name": "icon",
|
|
169
|
-
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
143
|
+
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-iconset#property-name) property of `vaadin-iconset`.",
|
|
170
144
|
"value": {
|
|
171
145
|
"type": [
|
|
172
146
|
"string"
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/icon",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.7.0-alpha10",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
23
23
|
"name": ".name",
|
|
24
|
-
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
24
|
+
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-icon#property-name) property of `vaadin-icon`.",
|
|
25
25
|
"value": {
|
|
26
26
|
"kind": "expression"
|
|
27
27
|
}
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"name": "vaadin-icon",
|
|
40
|
-
"description": "`<vaadin-icon>` is a Web Component for displaying SVG icons.\n\n### Icon property\n\nThe `<vaadin-icon>` component is designed to be used as a drop-in replacement for `<iron-icon>`.\nFor example, you can use it with `vaadin-icons` like this:\n\n```html\n<vaadin-icon icon=\"vaadin:angle-down\"></vaadin-icon>\n```\n\nAlternatively, you can also pick one of the Lumo icons:\n\n```html\n<vaadin-icon icon=\"lumo:user\"></vaadin-icon>\n```\n\n### Custom SVG icon\n\nAlternatively, instead of selecting an icon from an iconset by name, you can pass any custom `svg`\nliteral using the [`svg`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
40
|
+
"description": "`<vaadin-icon>` is a Web Component for displaying SVG icons.\n\n### Icon property\n\nThe `<vaadin-icon>` component is designed to be used as a drop-in replacement for `<iron-icon>`.\nFor example, you can use it with `vaadin-icons` like this:\n\n```html\n<vaadin-icon icon=\"vaadin:angle-down\"></vaadin-icon>\n```\n\nAlternatively, you can also pick one of the Lumo icons:\n\n```html\n<vaadin-icon icon=\"lumo:user\"></vaadin-icon>\n```\n\n### Custom SVG icon\n\nAlternatively, instead of selecting an icon from an iconset by name, you can pass any custom `svg`\nliteral using the [`svg`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-icon#property-svg) property. In this case you can also\ndefine the size of the SVG `viewBox` using the [`size`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-icon#property-size) property:\n\n```js\nimport { html, svg } from 'lit';\n\n// in your component\nrender() {\n const svgIcon = svg`<path d=\"M13 4v2l-5 5-5-5v-2l5 5z\"></path>`;\n return html`\n <vaadin-icon\n .svg=\"${svgIcon}\"\n size=\"16\"\n ></vaadin-icon>\n `;\n}\n```",
|
|
41
41
|
"extension": true,
|
|
42
42
|
"attributes": [
|
|
43
43
|
{
|
|
44
44
|
"name": ".icon",
|
|
45
|
-
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.
|
|
45
|
+
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-alpha10/#/elements/vaadin-iconset#property-name) property of `vaadin-iconset`.",
|
|
46
46
|
"value": {
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|