UNPKG

vue-form-kit

Version:

![NPM License](https://img.shields.io/npm/l/vue-form-kit) ![NPM Downloads](https://img.shields.io/npm/dt/vue-form-kit) ![NPM Version](https://img.shields.io/npm/v/vue-form-kit)

128 lines (127 loc) 2.97 kB
import { openBlock as r, createBlock as d, resolveDynamicComponent as m, createSlots as o, withCtx as u, createElementVNode as f, normalizeClass as g, renderList as s, renderSlot as y, normalizeProps as p, guardReactiveProps as c } from "vue"; import { _ as S } from "./_plugin-vue_export-helper.9d74fd37.js"; const x = { name: "FormTextInput", props: { modelValue: { type: [String, Number], default: "" }, inputClass: { type: [String, Array, Object], default: null }, tabindex: { type: String, default: null }, label: { type: String, default: null }, placeholder: { type: String, default: null }, error: { type: String, default: null }, id: { type: String, default: null }, name: { type: String, default: null }, autocomplete: { type: String, default: null }, type: { type: String, default: null }, maxlength: { type: String, default: null }, minlength: { type: String, default: null }, max: { type: String, default: null }, min: { type: String, default: null }, step: { type: String, default: null }, required: { type: [String, Boolean], default: !1 }, disabled: { type: [String, Boolean], default: !1 }, dusk: { type: String, default: null }, inputWrapClass: { type: [String, Object, Array], default: null } }, emits: ["update:modelValue"] }, b = ["id", "value", "dusk", "tabindex", "name", "type", "autocomplete", "required", "disabled", "placeholder", "maxlength", "minlength", "max", "min", "step"]; function h(t, l, e, C, q, _) { return r(), d(m(`${t.$formKitConfigs.componentPrefix}FormInputWrapper`), { id: e.id, label: e.label, error: e.error, required: e.required, "input-wrap-class": e.inputWrapClass }, o({ default: u(() => [ f("input", { id: e.id, value: e.modelValue, dusk: e.dusk || `form--${e.name || e.id || "input"}`, tabindex: e.tabindex, name: e.name, type: e.type, autocomplete: e.autocomplete, required: e.required, disabled: e.disabled, class: g(["form-input-text w-full", e.inputClass]), placeholder: e.placeholder, maxlength: e.maxlength, minlength: e.minlength, max: e.max, min: e.min, step: e.step, onInput: l[0] || (l[0] = (n) => t.$emit("update:modelValue", n.target.value)) }, null, 42, b) ]), _: 2 }, [ s(t.$slots, (n, a) => ({ name: a, fn: u((i) => [ y(t.$slots, a, p(c(i))) ]) })) ]), 1032, ["id", "label", "error", "required", "input-wrap-class"]); } const V = /* @__PURE__ */ S(x, [["render", h]]); export { V as default };