Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions hassio/src/system/hassio-core-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,6 @@ class HassioCoreInfo extends LitElement {
color: var(--secondary-text-color);
--mdc-menu-min-width: 200px;
}
@media (min-width: 563px) {
paper-listbox {
max-height: 150px;
overflow: auto;
}
}
paper-item {
cursor: pointer;
min-height: 35px;
}
mwc-list-item ha-svg-icon {
color: var(--secondary-text-color);
}
Expand Down
10 changes: 0 additions & 10 deletions hassio/src/system/hassio-host-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,6 @@ class HassioHostInfo extends LitElement {
color: var(--secondary-text-color);
--mdc-menu-min-width: 200px;
}
@media (min-width: 563px) {
paper-listbox {
max-height: 150px;
overflow: auto;
}
}
paper-item {
cursor: pointer;
min-height: 35px;
}
mwc-list-item ha-svg-icon {
color: var(--secondary-text-color);
}
Expand Down
8 changes: 7 additions & 1 deletion src/components/entity/ha-entities-picker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { HassEntity } from "home-assistant-js-websocket";
import { html, LitElement, TemplateResult } from "lit";
import { css, html, LitElement, TemplateResult } from "lit";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../../common/dom/fire_event";
import { isValidEntityId } from "../../common/entity/valid_entity_id";
Expand Down Expand Up @@ -145,6 +145,12 @@ class HaEntitiesPickerLight extends LitElement {

this._updateEntities([...currentEntities, toAdd]);
}

static override styles = css`
ha-entity-picker {
margin-top: 8px;
}
`;
}

declare global {
Expand Down
2 changes: 2 additions & 0 deletions src/components/entity/ha-statistics-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ class HaStatisticsPicker extends LitElement {
display: block;
}
ha-statistic-picker {
display: block;
width: 100%;
margin-top: 8px;
}
`;
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/ha-check-list-item.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { css } from "lit";
import { CheckListItemBase } from "@material/mwc-list/mwc-check-list-item-base";
import { styles } from "@material/mwc-list/mwc-control-list-item.css";
import { styles as controlStyles } from "@material/mwc-list/mwc-control-list-item.css";
import { styles } from "@material/mwc-list/mwc-list-item.css";
import { customElement } from "lit/decorators";

@customElement("ha-check-list-item")
export class HaCheckListItem extends CheckListItemBase {
static override styles = [
styles,
controlStyles,
css`
:host {
--mdc-theme-secondary: var(--primary-color);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-selector/ha-selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class HaSelector extends LitElement {
@property({ type: Boolean }) public disabled = false;

public focus() {
this.shadowRoot!.getElementById("selector")?.focus();
this.shadowRoot?.getElementById("selector")?.focus();
}

private get _type() {
Expand Down
5 changes: 1 addition & 4 deletions src/components/ha-service-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class HaServiceControl extends LitElement {

@query("ha-yaml-editor") private _yamlEditor?: HaYamlEditor;

protected updated(changedProperties: PropertyValues<this>) {
protected willUpdate(changedProperties: PropertyValues<this>) {
if (!changedProperties.has("value")) {
return;
}
Expand Down Expand Up @@ -482,9 +482,6 @@ export class HaServiceControl extends LitElement {
display: block;
margin: var(--service-control-padding, 0 16px);
}
ha-service-picker {
padding-top: 16px;
}
ha-yaml-editor {
padding: 16px 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-service-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import "./ha-combo-box";

const rowRenderer: ComboBoxLitRenderer<{ service: string; name: string }> = (
item
) => html` <mwc-list-item twoline>
) => html`<mwc-list-item twoline>
<span>${item.name}</span>
<span slot="secondary"
>${item.name === item.service ? "" : item.service}</span
Expand Down
1 change: 0 additions & 1 deletion src/components/media-player/ha-media-player-browse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import "@material/mwc-list/mwc-list";
import "@material/mwc-list/mwc-list-item";
import { mdiPlay, mdiPlus } from "@mdi/js";
import "@polymer/paper-item/paper-item";
import "@polymer/paper-listbox/paper-listbox";
import "@polymer/paper-tooltip/paper-tooltip";
import {
css,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,14 @@ export default class HaAutomationActionRow extends LitElement {
haStyle,
css`
.card-menu {
float: right;
position: absolute;
right: 16px;
z-index: 3;
--mdc-theme-text-primary-on-background: var(--primary-text-color);
}
.rtl .card-menu {
float: left;
right: initial;
left: 16px;
}
mwc-list-item[disabled] {
--mdc-theme-text-primary-on-background: var(--disabled-text-color);
Expand All @@ -358,6 +360,9 @@ export default class HaAutomationActionRow extends LitElement {
.warning ul {
margin: 4px 0;
}
mwc-select {
margin-bottom: 16px;
}
`,
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { mdiDelete } from "@mdi/js";
import "@polymer/paper-input/paper-input";
import "@polymer/paper-listbox/paper-listbox";
import { css, CSSResultGroup, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../../../../../common/dom/fire_event";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { html, LitElement } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { fireEvent } from "../../../../../common/dom/fire_event";
Expand Down Expand Up @@ -140,6 +140,13 @@ export class HaDeviceAction extends LitElement {
`ui.panel.config.automation.editor.actions.type.device_id.extra_fields.${schema.name}`
) || schema.name;
}

static styles = css`
ha-device-action-picker {
display: block;
margin-top: 8px;
}
`;
}

declare global {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CSSResultGroup, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "@material/mwc-select";
import type { Select } from "@material/mwc-select";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
import { dynamicElement } from "../../../../common/dom/dynamic-element-directive";
import { fireEvent } from "../../../../common/dom/fire_event";
Expand Down Expand Up @@ -143,9 +143,14 @@ export default class HaAutomationConditionEditor extends LitElement {
fireEvent(this, "value-changed", { value: ev.detail.value, yaml: true });
}

static get styles(): CSSResultGroup {
return haStyle;
}
static styles = [
haStyle,
css`
mwc-select {
margin-bottom: 16px;
}
`,
];
}

declare global {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ export default class HaAutomationTriggerRow extends LitElement {
mwc-list-item[disabled] {
--mdc-theme-text-primary-on-background: var(--disabled-text-color);
}
mwc-select {
margin-bottom: 16px;
}
`,
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "@polymer/paper-input/paper-input";
import "@polymer/paper-listbox/paper-listbox";
import { UnsubscribeFunc } from "home-assistant-js-websocket";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import memoizeOne from "memoize-one";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "@polymer/paper-input/paper-input";
import "@polymer/paper-listbox/paper-listbox";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { mdiPlus } from "@mdi/js";
import "@polymer/paper-dropdown-menu/paper-dropdown-menu";
import "@polymer/paper-item/paper-icon-item";
import "@polymer/paper-listbox/paper-listbox";
import { html, LitElement, PropertyValues, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators";
import memoize from "memoize-one";
Expand Down
6 changes: 6 additions & 0 deletions src/panels/config/scene/ha-scene-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,12 @@ export class HaSceneEditor extends SubscribeMixin(
ha-fab.saving {
opacity: var(--light-disabled-opacity);
}
ha-icon-picker,
ha-area-picker,
ha-entity-picker {
display: block;
margin-top: 8px;
}
`,
];
}
Expand Down
1 change: 1 addition & 0 deletions src/panels/config/users/dialog-user-detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class DialogUserDetail extends LitElement {
`}
<div class="form">
<paper-input
dialogInitialFocus
.value=${this._name}
.disabled=${user.system_generated}
@value-changed=${this._nameChanged}
Expand Down
35 changes: 19 additions & 16 deletions src/panels/developer-tools/service/developer-tools-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,31 @@ class HaPanelDevService extends LitElement {
"ui.panel.developer-tools.tabs.services.description"
)}
</p>

${this._yamlMode
? html`<ha-service-picker
.hass=${this.hass}
.value=${this._serviceData?.service}
@value-changed=${this._serviceChanged}
></ha-service-picker>
<ha-yaml-editor
.hass=${this.hass}
.defaultValue=${this._serviceData}
@value-changed=${this._yamlChanged}
></ha-yaml-editor>`
: html`<ha-card
><div>
<ha-card>
${this._yamlMode
? html`<div class="card-content">
<ha-service-picker
.hass=${this.hass}
.value=${this._serviceData?.service}
@value-changed=${this._serviceChanged}
></ha-service-picker>
<ha-yaml-editor
.hass=${this.hass}
.defaultValue=${this._serviceData}
@value-changed=${this._yamlChanged}
></ha-yaml-editor>
</div>`
: html`
<ha-service-control
.hass=${this.hass}
.value=${this._serviceData}
.narrow=${this.narrow}
showAdvanced
@value-changed=${this._serviceDataChanged}
></ha-service-control></div
></ha-card>`}
class="card-content"
></ha-service-control>
`}
</ha-card>
</div>
<div class="button-row">
<div class="buttons">
Expand Down
Loading