@visitscotland/component-library
Version:
VisitScotland Component Library
1 lines • 2.95 kB
JavaScript
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4433],{14785:function(r,e,s){"use strict";s.d(e,{X:function(){return t.X}});var t=s(69073)},36311:function(r,e,s){"use strict";s(73067)},54843:function(r,e,s){"use strict";var t=s(34352),n=s(20641),a=s(50953);e.A={name:"VsProgressBar",status:"prototype",release:"0.1.0",components:{BProgress:t.i3,BProgressBar:t.XY},props:{max:{type:Number,required:!0},currentStep:{type:Number,required:!0},isStepped:{type:Boolean,required:!1},isFull:{type:Boolean,required:!1},progressLabel:{type:String,default:""}},data:function(){return{compId:null}},computed:{computedClasses:function(){var r="";return this.isFull&&(r+="vs-progress-bar--full "),this.isStepped&&(r+="vs-progress-bar--stepped "),r},interpolProgressLabel:function(){if(this.progressLabel){var r=this.progressLabel.replace("xxx",this.currentStep);return r.replace("yyy",this.max)}return""}},mounted:function(){var r=(0,n.nI)();this.compId=(0,a.KR)(r.uid)}}},57935:function(r,e,s){"use strict";s.d(e,{A:function(){return t.A}});var t=s(54843)},69073:function(r,e,s){"use strict";s.d(e,{X:function(){return l}});var t=s(20641),n=s(90033),a={key:1,class:"vs-progress-bar__stepper"},o=["id"],u=["id"];function l(r,e,s,l,i,p){var c=(0,t.g2)("BProgressBar"),d=(0,t.g2)("BProgress");return(0,t.uX)(),(0,t.CE)("div",{class:(0,n.normalizeClass)(["vs-progress-bar",p.computedClasses]),"data-test":"vs-progress-bar"},[!s.isStepped||s.max>5?((0,t.uX)(),(0,t.Wv)(d,{key:0,max:s.max},{default:(0,t.k6)((function(){return[(0,t.bF)(c,{value:s.currentStep,"aria-labelledBy":"progress-bar-".concat(i.compId)},null,8,["value","aria-labelledBy"])]})),_:1},8,["max"])):(0,t.Q3)("",!0),s.isStepped&&s.max<=5?((0,t.uX)(),(0,t.CE)("div",a,[((0,t.uX)(!0),(0,t.CE)(t.FK,null,(0,t.pI)(s.max,(function(r){return(0,t.uX)(),(0,t.Wv)(d,{key:r,max:1},{default:(0,t.k6)((function(){return[(0,t.bF)(c,{value:r<=s.currentStep?1:0,"aria-labelledBy":"progress-bar-".concat(i.compId)},null,8,["value","aria-labelledBy"])]})),_:2},1024)})),128))])):(0,t.Q3)("",!0),p.interpolProgressLabel?((0,t.uX)(),(0,t.CE)("p",{key:2,class:"vs-progress-bar__label",id:"progress-bar-".concat(i.compId)},(0,n.toDisplayString)(p.interpolProgressLabel),9,o)):((0,t.uX)(),(0,t.CE)("p",{key:3,class:"vs-progress-bar__label",id:"progress-bar-".concat(i.compId)},(0,n.toDisplayString)(s.currentStep)+" / "+(0,n.toDisplayString)(s.max),9,u))],2)}},73067:function(r,e,s){"use strict";var t=s(85072),n=s.n(t),a=s(97825),o=s.n(a),u=s(77659),l=s.n(u),i=s(55056),p=s.n(i),c=s(10540),d=s.n(c),b=s(41113),m=s.n(b),g=s(99401),f=s.n(g),v={};v.styleTagTransform=m(),v.setAttributes=p(),v.insert=l().bind(null,"head"),v.domAPI=o(),v.insertStyleElement=d(),n()(f(),v),f()&&f().locals&&f().locals},74433:function(r,e,s){"use strict";s.r(e);var t=s(14785),n=s(57935);s(36311);const a=(0,s(66262).A)(n.A,[["render",t.X]]);e.default=a},99401:function(){}}]);