UNPKG

@aotearoan/neon

Version:

Neon is a lightweight design library of Vue 3 components with minimal dependencies.

63 lines (62 loc) 2.26 kB
import u from "./NeonFile.es.js"; import { resolveComponent as o, openBlock as n, createElementBlock as m, normalizeClass as b, createBlock as s, createCommentVNode as a, createVNode as t, createElementVNode as f } from "vue"; import c from "../../../_virtual/_plugin-vue_export-helper.es.js"; const z = ["aria-disabled"], C = { class: "neon-button-group neon-file__actions" }; function k(e, l, V, $, I, v) { const r = o("neon-list"), p = o("neon-input"), i = o("neon-button"); return n(), m("div", { "aria-disabled": e.disabled, class: b([[ `neon-file--${e.color}`, `neon-file--${e.size}`, { "neon-file--disabled": e.disabled, "neon-file--single": !e.multiple, "neon-file--direct-upload": e.directUpload } ], "neon-file"]) }, [ e.directUpload ? a("", !0) : (n(), s(r, { key: 0, color: e.color, disabled: e.disabled, modelValue: e.fileList, size: e.size, onClose: e.remove }, null, 8, ["color", "disabled", "modelValue", "size", "onClose"])), t(p, { id: e.id, ref: "fileInput", modelValue: e.fileInputModel, "onUpdate:modelValue": l[0] || (l[0] = (d) => e.fileInputModel = d), accept: e.accept, disabled: e.disabled, multiple: e.multiple, tabindex: -1, class: "neon-file__input", type: "file", onInput: e.onInput }, null, 8, ["id", "modelValue", "accept", "disabled", "multiple", "onInput"]), f("div", C, [ e.multiple && !e.directUpload ? (n(), s(i, { key: 0, disabled: e.disabled || e.files.length === 0, size: e.size, "button-style": "text", label: "Clear all", onClick: l[1] || (l[1] = (d) => e.clearAll()) }, null, 8, ["disabled", "size"])) : a("", !0), t(i, { "aria-controls": e.id ? e.id : void 0, color: e.color, disabled: e.disabled, icon: e.icon, label: e.label, size: e.size, state: e.state, onClick: e.openFileDialog }, null, 8, ["aria-controls", "color", "disabled", "icon", "label", "size", "state", "onClick"]) ]) ], 10, z); } const U = /* @__PURE__ */ c(u, [["render", k]]); export { U as default }; //# sourceMappingURL=NeonFile.vue.es.js.map