UNPKG

@scalar/api-client

Version:

the open source API testing client

59 lines (58 loc) 1.92 kB
import { defineComponent as p, ref as i, createBlock as f, openBlock as v, withCtx as n, createElementVNode as m, createVNode as a, unref as s } from "vue"; import { ScalarButton as _, ScalarTextInput as x } from "@scalar/components"; import { LibraryIcon as V } from "@scalar/icons/library"; import b from "../../IconSelector.vue.js"; import C from "./SidebarListElementForm.vue.js"; const S = { class: "grid grid-cols-[auto_1fr] gap-2" }, $ = { class: "flex aspect-square" }, q = /* @__PURE__ */ p({ __name: "EditSidebarListCollection", props: { name: {}, icon: {} }, emits: ["close", "edit"], setup(d, { emit: c }) { const r = d, u = c, l = i(r.name), o = i(r.icon); return (g, e) => (v(), f(C, { onCancel: e[2] || (e[2] = (t) => u("close")), onSubmit: e[3] || (e[3] = (t) => u("edit", l.value, o.value)) }, { default: n(() => [ m("div", S, [ m("div", $, [ a(b, { modelValue: o.value, "onUpdate:modelValue": e[0] || (e[0] = (t) => o.value = t), placement: "bottom-start" }, { default: n(() => [ a(s(_), { class: "aspect-square h-auto px-0", variant: "outlined" }, { default: n(() => [ a(s(V), { class: "text-c-2 size-4", src: o.value }, null, 8, ["src"]) ]), _: 1 }) ]), _: 1 }, 8, ["modelValue"]) ]), a(s(x), { modelValue: l.value, "onUpdate:modelValue": e[1] || (e[1] = (t) => l.value = t), autofocus: "", class: "flex-1" }, null, 8, ["modelValue"]) ]) ]), _: 1 })); } }); export { q as default };