1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Convert default state icons (#10223)

* Convert default state icons

* update

* Update cast/src/launcher/layout/hc-cast.ts

Co-authored-by: Philip Allgaier <mail@spacegaier.de>

* Update ha-config-core.js

* Update

* Finish

* Add siren icon

* FIx

* Add curtain icons

Co-authored-by: Philip Allgaier <mail@spacegaier.de>
This commit is contained in:
Bram Kragten
2021-10-20 11:10:16 +02:00
committed by GitHub
parent b760e543b0
commit 667fd39147
75 changed files with 829 additions and 573 deletions

View File

@@ -46,14 +46,14 @@ export class HaIconPicker extends LitElement {
@property() public placeholder?: string;
@property() public fallbackPath?: string;
@property({ attribute: "error-message" }) public errorMessage?: string;
@property({ type: Boolean }) public disabled = false;
@query("vaadin-combo-box-light", true) private comboBox!: HTMLElement;
@property({ type: Boolean }) private _opened = false;
protected render(): TemplateResult {
return html`
<vaadin-combo-box-light
@@ -63,7 +63,6 @@ export class HaIconPicker extends LitElement {
.allowCustomValue=${true}
.filteredItems=${[]}
${comboBoxRenderer(rowRenderer)}
@opened-changed=${this._openedChanged}
@value-changed=${this._valueChanged}
@filter-changed=${this._filterChanged}
>
@@ -77,21 +76,22 @@ export class HaIconPicker extends LitElement {
autocorrect="off"
spellcheck="false"
>
${!this._opened && (this._value || this.placeholder)
${this._value || this.placeholder
? html`
<ha-icon .icon=${this._value || this.placeholder} slot="suffix">
</ha-icon>
`
: this.fallbackPath
? html`<ha-svg-icon
.path=${this.fallbackPath}
slot="suffix"
></ha-svg-icon>`
: ""}
</paper-input>
</vaadin-combo-box-light>
`;
}
private _openedChanged(ev: PolymerChangedEvent<boolean>) {
this._opened = ev.detail.value;
}
private _valueChanged(ev: PolymerChangedEvent<string>) {
this._setValue(ev.detail.value);
}
@@ -132,10 +132,10 @@ export class HaIconPicker extends LitElement {
static get styles() {
return css`
ha-icon {
position: absolute;
ha-icon,
ha-svg-icon {
position: relative;
bottom: 2px;
right: 0;
}
`;
}