import { html, LitElement, nothing } from "lit"; import { customElement, property } from "lit/decorators.js"; import { translateText } from "../Utils"; import { CARD_LABEL_CLASS, cardClass, INPUT_CLASS } from "./InputCardStyles"; @customElement("input-card") export class InputCard extends LitElement { @property({ attribute: false }) labelKey = ""; @property({ attribute: false }) inputId?: string; @property({ attribute: false }) inputType = "number"; @property({ attribute: false }) inputMin?: number | string; @property({ attribute: false }) inputMax?: number | string; @property({ attribute: false }) inputStep?: number | string; @property({ attribute: false }) inputValue?: number | string; @property({ attribute: false }) inputAriaLabel?: string; @property({ attribute: false }) inputPlaceholder?: string; @property({ attribute: false }) onInput?: (e: Event) => void; @property({ attribute: false }) onChange?: (e: Event) => void; @property({ attribute: false }) onKeyDown?: (e: KeyboardEvent) => void; createRenderRoot() { return this; } render() { return html`
${translateText(this.labelKey)}
`; } }