component Input { props { @event input = function @event change = function @event focus = function @event blur = function @event invalid = function @event keydown = function @event keyup = function size = "default" color = "primary" id = "" name = "" label = "Input" hiddenLabel = false placeholder = "" value = "" type = "text" variant = "normal" icon = "" iconPosition = "start" helperText = "" cornerHint = "" error = "" inline = false readonly = false disabled = false required = false autocomplete = "" inputmode = "" minlength = "" maxlength = "" pattern = "" min = "" max = "" step = "" class = "" } functions { function detail(sourceEvent) { return { value: sourceEvent.currentTarget.value, name: name, sourceEvent: sourceEvent } } function handleInput(sourceEvent) { sourceEvent.stopPropagation(); $emit("input", detail(sourceEvent)) } function handleChange(sourceEvent) { sourceEvent.stopPropagation(); $emit("change", detail(sourceEvent)) } function handleFocus(sourceEvent) { sourceEvent.stopPropagation(); $emit("focus", detail(sourceEvent)) } function handleBlur(sourceEvent) { sourceEvent.stopPropagation(); $emit("blur", detail(sourceEvent)) } function handleInvalid(sourceEvent) { sourceEvent.stopPropagation(); $emit("invalid", { value: sourceEvent.currentTarget.value, name: name, message: sourceEvent.currentTarget.validationMessage, sourceEvent: sourceEvent }) } function handleKeydown(sourceEvent) { sourceEvent.stopPropagation(); $emit("keydown", { key: sourceEvent.key, value: sourceEvent.currentTarget.value, name: name, sourceEvent: sourceEvent }) } function handleKeyup(sourceEvent) { sourceEvent.stopPropagation(); $emit("keyup", { key: sourceEvent.key, value: sourceEvent.currentTarget.value, name: name, sourceEvent: sourceEvent }) } } view {
{#if cornerHint}{cornerHint}{/if}
{#if icon}{/if} {#if variant === "floating"}{label}{/if}
{#if helperText}{helperText}{/if} {error}
} }