import { html, nothing } from 'lit' import { customElement, property, state } from 'lit/decorators.js' import { TailwindElement } from '@/shared/tailwind-element' import { customClassMap } from '@/shared/directives' @customElement('lukso-input') export class LuksoInput extends TailwindElement { @property({ type: String }) value = '' @property({ type: String }) name = '' @property({ type: String }) type = 'text' @property({ type: String }) placeholder = '' @property({ type: String }) label = '' @property({ type: String }) description = '' @property({ type: String }) error = '' @property({ type: String }) unit = '' @property({ type: Boolean, attribute: 'is-full-width' }) isFullWidth = false @property({ type: Boolean }) autofocus = false @property({ type: Number }) max: number | undefined = undefined @property({ type: Number }) min: number | undefined = undefined @state() private hasHocus = false @state() private hasHighlight = false private defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-16-regular px-4 py-3 border border-solid h-[48px] placeholder:text-neutral-70 outline-none transition transition-all duration-150 appearance-none` private defaultUnitStyles = `paragraph-12-regular text-neutral-60 flex px-3.5 items-center relative border border-solid h-[48px] transition transition-all duration-150 rounded-r-xl border-l-0 before:bg-neutral-90 before:absolute before:top-[calc(50%-12px)] before:left-0 before:w-[1px] before:h-[24px] whitespace-nowrap` inputTemplate() { return html` ` } labelTemplate() { return html` ` } descriptionTemplate() { return html`