@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
59 lines (58 loc) • 2.08 kB
JavaScript
import t from "./NeonSlider.es.js";
import { openBlock as n, createElementBlock as a, normalizeClass as r, normalizeStyle as m, toDisplayString as l, createCommentVNode as s, createElementVNode as o, mergeProps as u } from "vue";
import p from "../../../_virtual/_plugin-vue_export-helper.es.js";
const f = ["for"], v = ["id", "value", "step", "min", "max", "aria-valuemin", "aria-valuemax", "aria-valuenow", "disabled"], g = {
key: 1,
class: "neon-slider__legend"
}, _ = { class: "neon-slider__legend-item" }, h = { class: "neon-slider__legend-item" }, V = ["for"], c = { class: "neon-slider__tooltip-content" }, y = { class: "neon-slider__tooltip-value" };
function b(e, i, k, M, $, S) {
return n(), a("div", {
class: r(["neon-slider", [
{
"neon-slider--disabled": e.disabled,
"neon-slider--no-legend": !e.legend
},
`neon-slider--${e.color}`
]]),
style: m("--min: " + e.min + ";--max: " + e.computedMax + ";--val: " + e.modelValue)
}, [
e.output ? (n(), a("output", {
key: 0,
for: e.id,
class: "neon-slider__output"
}, l(e.formattedValue), 9, f)) : s("", !0),
o("input", u({
id: e.id,
type: "range",
value: e.modelValue,
step: e.computedStep,
min: e.min,
max: e.computedMax,
"aria-valuemin": e.min,
"aria-valuemax": e.computedMax,
"aria-valuenow": e.modelValue,
disabled: e.disabled,
class: "neon-slider__input"
}, e.sanitizedAttributes, {
onInput: i[0] || (i[0] = (...d) => e.changeValue && e.changeValue(...d))
}), null, 16, v),
e.legend ? (n(), a("div", g, [
o("span", _, l(e.formattedMin), 1),
o("span", h, l(e.formattedMax), 1)
])) : s("", !0),
e.tooltip ? (n(), a("output", {
key: 2,
for: e.id,
class: "neon-slider__tooltip"
}, [
o("div", c, [
o("span", y, l(e.formattedValue), 1)
])
], 8, V)) : s("", !0)
], 6);
}
const B = /* @__PURE__ */ p(t, [["render", b]]);
export {
B as default
};
//# sourceMappingURL=NeonSlider.vue.es.js.map