uiv
Version:
Bootstrap 3 components implemented by Vue.
53 lines (52 loc) • 1.52 kB
JavaScript
import { openBlock as a, createElementBlock as l, normalizeClass as t, normalizeStyle as n, toDisplayString as p, renderSlot as i, createBlock as d, normalizeProps as u, mergeProps as m } from "vue";
const s = {
modelValue: {
type: Number,
required: !0,
validator(r) {
return r >= 0 && r <= 100;
}
},
labelText: { type: String, default: void 0 },
type: { type: String, default: void 0 },
label: { type: Boolean, default: !1 },
minWidth: { type: Boolean, default: !1 },
striped: { type: Boolean, default: !1 },
active: { type: Boolean, default: !1 }
}, f = ["aria-valuenow"], y = {
__name: "ProgressBarStack",
props: {
...s
},
setup(r) {
return (e, o) => (a(), l("div", {
class: t({
"progress-bar": !0,
"progress-bar-striped": e.striped,
active: e.striped && e.active,
[`progress-bar-${e.type}`]: !!e.type
}),
style: n({
minWidth: e.minWidth ? "2em" : null,
width: `${e.modelValue}%`
}),
role: "progressbar",
"aria-valuemin": "0",
"aria-valuenow": e.modelValue,
"aria-valuemax": "100"
}, p(e.label ? e.labelText ? e.labelText : `${e.modelValue}%` : null), 15, f));
}
}, g = { class: "progress" }, B = {
__name: "ProgressBar",
props: {
...s
},
setup(r) {
return (e, o) => (a(), l("div", g, [
e.$slots.default ? i(e.$slots, "default", { key: 0 }) : (a(), d(y, u(m({ key: 1 }, e.$props)), null, 16))
]));
}
};
export {
B as default
};