UNPKG

@scalar/api-client

Version:

the open source API testing client

30 lines (29 loc) 1.11 kB
import { defineComponent as r, useModel as i, useId as d, createElementBlock as a, openBlock as p, createElementVNode as o, withDirectives as c, unref as n, vModelText as m } from "vue"; const f = { class: "group pointer-events-none flex flex-1 items-center gap-1" }, v = ["for"], _ = ["id"], V = /* @__PURE__ */ r({ __name: "LabelInput", props: { modelValue: { required: !0 }, modelModifiers: {} }, emits: ["update:modelValue"], setup(u) { const e = i(u, "modelValue"), t = d(); return (h, l) => (p(), a("div", f, [ o("label", { class: "pointer-events-auto absolute top-0 left-0 h-full w-full cursor-text opacity-0", for: n(t) }, null, 8, v), c(o("input", { id: n(t), "onUpdate:modelValue": l[0] || (l[0] = (s) => e.value = s), class: "text-c-1 group-hover-input pointer-events-auto relative z-10 -ml-0.5 h-8 w-full flex-1 rounded pl-1.25 has-[:focus-visible]:outline md:-ml-1.25", placeholder: "Untitled Document" }, null, 8, _), [ [m, e.value] ]) ])); } }); export { V as default };