UNPKG

@aotearoan/neon

Version:

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

74 lines (73 loc) 2.81 kB
import p from "./NeonNumber.es.js"; import { resolveComponent as l, openBlock as i, createBlock as a, normalizeClass as b, withCtx as v, createCommentVNode as s, createVNode as f, mergeProps as z, withKeys as u, withModifiers as d } from "vue"; import $ from "../../../_virtual/_plugin-vue_export-helper.es.js"; function w(e, n, y, V, B, C) { const r = l("neon-button"), m = l("neon-input"), t = l("neon-field-group"); return i(), a(t, { class: b([[ `neon-number--${e.size}`, `neon-number--${e.color}`, { "neon-number--disabled": e.disabled, "neon-number--editable": e.editable, "neon-number--with-buttons": e.spinButtons } ], "neon-number"]) }, { default: v(() => [ e.spinButtons ? (i(), a(r, { key: 0, "aria-label": e.decrementLabel, color: e.color, disabled: e.disabled || e.min !== void 0 && e.min === e.modelValue, size: e.size, "button-style": "outline", class: "neon-number__decrement", icon: "minus", onClick: n[0] || (n[0] = (o) => e.decrement()) }, null, 8, ["aria-label", "color", "disabled", "size"])) : s("", !0), f(m, z({ "aria-valuemax": e.max, "aria-valuemin": e.min, "aria-valuenow": e.modelValue, color: e.color, disabled: e.disabled || !e.editable, inputmode: e.inputmode, max: e.max, min: e.min, "model-value": e.displayValue, placeholder: e.placeholder, size: e.size, step: e.computedStep, class: "neon-number__input", role: "spinbutton", type: "text" }, e.sanitizedAttributes, { onBlur: n[1] || (n[1] = (o) => e.onBlur()), onFocus: n[2] || (n[2] = (o) => e.onFocus()), "onUpdate:modelValue": e.valueChanged, onKeydown: [ n[3] || (n[3] = u(d((o) => e.increment(), ["prevent"]), ["up"])), n[4] || (n[4] = u(d((o) => e.decrement(), ["prevent"]), ["down"])) ] }), null, 16, ["aria-valuemax", "aria-valuemin", "aria-valuenow", "color", "disabled", "inputmode", "max", "min", "model-value", "placeholder", "size", "step", "onUpdate:modelValue"]), e.spinButtons ? (i(), a(r, { key: 1, "aria-label": e.incrementLabel, color: e.color, disabled: e.disabled || e.max !== void 0 && e.max === e.modelValue, size: e.size, "button-style": "outline", class: "neon-number__increment", icon: "plus", onClick: n[5] || (n[5] = (o) => e.increment()) }, null, 8, ["aria-label", "color", "disabled", "size"])) : s("", !0) ]), _: 1 }, 8, ["class"]); } const F = /* @__PURE__ */ $(p, [["render", w]]); export { F as default }; //# sourceMappingURL=NeonNumber.vue.es.js.map