@aotearoan/neon
Version:
Neon is a lightweight design library of Vue 3 components with minimal dependencies.
3 lines (2 loc) • 1.71 kB
JavaScript
"use strict";const s=require("./NeonStepper.cjs.js"),e=require("vue"),r=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),a=["aria-label","onClick"],c=["tabindex","onKeydown"],d=["onClick"];function m(o,u,_,k,V,v){const l=e.resolveComponent("neon-icon");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([`neon-stepper--${o.color}`,"neon-stepper"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.steps,(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:e.normalizeClass([{"neon-stepper__step--has-value":n<=o.modelValue||n<=o.completedIndex,"neon-stepper__step--active":n===o.modelValue,"neon-stepper__step--display-stepper":n<=o.completedIndex},"neon-stepper__step"])},[e.createElementVNode("div",{"aria-label":t,class:"neon-stepper__step-indicator-wrapper",role:"button",tabindex:"-1",onClick:p=>n!==o.modelValue&&n<=o.completedIndex&&o.emit("update:modelValue",n)},[e.createElementVNode("div",{tabindex:n<=o.completedIndex?0:-1,class:"neon-stepper__step-indicator",onKeydown:e.withKeys(p=>n!==o.modelValue&&n<=o.completedIndex&&o.emit("update:modelValue",n),["enter"])},[n<o.completedIndex?(e.openBlock(),e.createBlock(l,{key:0,class:"neon-stepper__step-completed-icon",name:"check"})):n===o.completedIndex?(e.openBlock(),e.createBlock(l,{key:1,class:"neon-stepper__step-completing-icon",name:"dot"})):e.createCommentVNode("",!0)],40,c)],8,a),e.createElementVNode("span",{class:"neon-stepper__step-title",tabindex:"-1",onClick:p=>n!==o.modelValue&&n<=o.completedIndex&&o.emit("update:modelValue",n)},e.toDisplayString(t),9,d)],2))),128))],2)}const i=r(s,[["render",m]]);module.exports=i;
//# sourceMappingURL=NeonStepper.vue.cjs.js.map