@zywave/zui-icons
Advanced tools
Comparing version 4.5.1-pre.2 to 4.5.1-pre.3
@@ -94,2 +94,8 @@ { | ||
], | ||
"cssStates": [ | ||
{ | ||
"description": "Applied when icon is loaded", | ||
"name": "loaded" | ||
} | ||
], | ||
"superclass": { | ||
@@ -96,0 +102,0 @@ "name": "ZuiBaseElement", |
@@ -13,2 +13,4 @@ import { ZuiBaseElement } from '@zywave/zui-base'; | ||
* @event load - Event fires upon `zui-icon` completing its load and render | ||
* | ||
* @cssState loaded - Applied when icon is loaded | ||
*/ | ||
@@ -15,0 +17,0 @@ export declare class ZuiIcon extends ZuiBaseElement { |
@@ -8,2 +8,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { ZuiBaseElement } from '@zywave/zui-base'; | ||
import { updateCustomState } from '@zywave/zui-base/dist/utils/update-custom-state.js'; | ||
import { html } from 'lit'; | ||
@@ -24,2 +25,4 @@ import { property } from 'lit/decorators.js'; | ||
* @event load - Event fires upon `zui-icon` completing its load and render | ||
* | ||
* @cssState loaded - Applied when icon is loaded | ||
*/ | ||
@@ -44,5 +47,3 @@ export class ZuiIcon extends ZuiBaseElement { | ||
this.#iconLoaded = false; | ||
if (this.attachInternals) { | ||
this.#internals = this.attachInternals(); | ||
} | ||
this.#internals = this.attachInternals?.(); | ||
} | ||
@@ -63,5 +64,3 @@ async updated(changedProps) { | ||
})); | ||
if (this.#internals?.states) { | ||
this.#internals.states.add('--loaded'); | ||
} | ||
updateCustomState(this.#internals, 'add', 'loaded'); | ||
} | ||
@@ -68,0 +67,0 @@ } |
{ | ||
"name": "@zywave/zui-icons", | ||
"version": "4.5.1-pre.2", | ||
"version": "4.5.1-pre.3", | ||
"main": "dist/index.js", | ||
@@ -29,3 +29,3 @@ "module": "dist/index.js", | ||
"customElements": "dist/custom-elements.json", | ||
"gitHead": "c128357bb3b035f108264ddb4de354696a137edd" | ||
"gitHead": "f57669636326083a05c003d2a1821207ec806910" | ||
} |
import { ZuiBaseElement } from '@zywave/zui-base'; | ||
import { updateCustomState } from '@zywave/zui-base/dist/utils/update-custom-state.js'; | ||
import { html } from 'lit'; | ||
@@ -19,2 +20,4 @@ import { property } from 'lit/decorators.js'; | ||
* @event load - Event fires upon `zui-icon` completing its load and render | ||
* | ||
* @cssState loaded - Applied when icon is loaded | ||
*/ | ||
@@ -44,5 +47,3 @@ export class ZuiIcon extends ZuiBaseElement { | ||
if ((this as HTMLElement).attachInternals) { | ||
this.#internals = (this as HTMLElement).attachInternals(); | ||
} | ||
this.#internals = this.attachInternals?.(); | ||
} | ||
@@ -66,5 +67,4 @@ | ||
); | ||
if (this.#internals?.states) { | ||
this.#internals.states.add('--loaded'); | ||
} | ||
updateCustomState(this.#internals, 'add', 'loaded'); | ||
} | ||
@@ -71,0 +71,0 @@ } |
Sorry, the diff of this file is not supported yet
653548
1542