@visitscotland/component-library 4.26.0 → 4.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@
20
20
  "index.js"
21
21
  ],
22
22
  "styles": [
23
- "styles/5044587d1df2c48e4d9b.css"
23
+ "styles/f041247d73a83e80784a.css"
24
24
  ]
25
25
  }
26
26
  }
@@ -46,7 +46,7 @@ label,legend{font-weight:600;margin-bottom:0}legend{font-size:1.125rem}.error{fo
46
46
  .vs-carbon-calculator-question{margin-bottom:2rem}.vs-carbon-calculator-question__label{width:100%}
47
47
  .vs-carbon-calculator{display:block}.vs-carbon-calculator .vs-progress-bar{margin-bottom:2rem}.vs-carbon-calculator .vs-carbon-calculator__category-heading{margin-top:0;margin-bottom:1.5rem}.vs-carbon-calculator__wrapper .vs-warning{display:none}.no-js .vs-carbon-calculator{display:none}.no-js .vs-carbon-calculator__wrapper .vs-warning{display:block}
48
48
  .vs-card-group.is-grid{display:grid;gap:1.25rem;grid-template-columns:1fr}@media(min-width: 768px){.vs-card-group.is-grid{gap:1.75rem}}@media(min-width: 992px){.vs-card-group.is-grid{grid-template-columns:repeat(var(--cards-in-row), 1fr)}}@media(max-width: 1199.98px){.vs-card-group.is-grid.is-scroll-snap{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}.vs-card-group.is-grid.is-scroll-snap::-webkit-scrollbar{height:6px}.vs-card-group.is-grid.is-scroll-snap::-webkit-scrollbar-track{background:#dedbe6;border-radius:.25rem}.vs-card-group.is-grid.is-scroll-snap::-webkit-scrollbar-thumb{background:#535396;border-radius:.25rem}.vs-card-group.is-grid.is-scroll-snap .vs-card{flex:0 0 266px;scroll-snap-align:start;margin-bottom:1.5rem}}@media(max-width: 1199.98px)and (min-width: 576px){.vs-card-group.is-grid.is-scroll-snap .vs-card{flex:0 0 235px}}@media(max-width: 1199.98px)and (min-width: 768px){.vs-card-group.is-grid.is-scroll-snap .vs-card{flex:0 0 312px}}@media(max-width: 1199.98px)and (min-width: 992px){.vs-card-group.is-grid.is-scroll-snap .vs-card{flex:0 0 420px}}
49
- .vs-card{position:relative;display:flex;flex-direction:column;border-radius:.25rem;height:100%}.vs-card:hover{cursor:pointer}.vs-card:hover .img-zoom-on-hover{transform:scale(1.05)}.vs-card__header{overflow:hidden;border-radius:.25rem}.vs-card__body{display:flex;flex-direction:column;flex-grow:1}.vs-card--elevated{box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 1px 3px 1px rgba(0,0,0,.15)}.vs-card--outlined{border:1px solid #e9e9e9;transition:all .2s}.vs-card--outlined:hover{border-color:#200f2e}.vs-card--filled{background-color:#fff}.vs-card--accent-bar{border-left:8px solid #e9e9e9}.vs-card--horizontal{flex-direction:row}.vs-card--horizontal .vs-card__header{flex:1 1 35%}.vs-card--horizontal .vs-card__body{flex:1 1 75%}@media(min-width: 576px){.vs-card--horizontal .vs-card__header{flex-basis:40%}.vs-card--horizontal .vs-card__body{flex-basis:60%}}
49
+ .vs-card{position:relative;display:flex;flex-direction:column;border-radius:.25rem}.vs-card:hover{cursor:pointer}.vs-card:hover .img-zoom-on-hover{transform:scale(1.05)}.vs-card__header{overflow:hidden;border-radius:.25rem}.vs-card__body{display:flex;flex-direction:column;flex-grow:1}.vs-card--elevated{box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 1px 3px 1px rgba(0,0,0,.15)}.vs-card--outlined{border:1px solid #e9e9e9;transition:all .2s}.vs-card--outlined:hover{border-color:#200f2e}.vs-card--filled{background-color:#fff}.vs-card--accent-bar{border-left:8px solid #e9e9e9}.vs-card--horizontal{flex-direction:row}.vs-card--horizontal .vs-card__header{flex:1 1 35%}.vs-card--horizontal .vs-card__body{flex:1 1 75%}@media(min-width: 576px){.vs-card--horizontal .vs-card__header{flex-basis:40%}.vs-card--horizontal .vs-card__body{flex-basis:60%}}
50
50
  .card.vs-stretched-link-card .vs-stretched-link-card__title .stretched-link:focus{outline:2px solid #3369ff}.card.vs-stretched-link-card{border:none;position:relative;line-height:1}.card.vs-stretched-link-card:hover .vs-stretched-link-card__video-button{background-color:#17359c;border-color:#17359c}.card.vs-stretched-link-card:active .vs-stretched-link-card__video-button{background-color:#112876;border-color:#112876}.card.vs-stretched-link-card--video{cursor:pointer}.card.vs-stretched-link-card .vs-stretched-link-card__img-container{width:100%;max-width:100%;position:relative;aspect-ratio:3/2}@supports not (aspect-ratio: 3/2){.card.vs-stretched-link-card .vs-stretched-link-card__img-container{padding-bottom:66.6%}}.card.vs-stretched-link-card .vs-stretched-link-card__img-container .vs-stretched-link-card__img{width:100%;height:100%;object-fit:cover;align-self:flex-start;flex-shrink:0}.card.vs-stretched-link-card .vs-stretched-link-card__img-container .vs-stretched-link-card__img--svg{object-fit:contain}.card.vs-stretched-link-card .card-body{padding:1rem 0 .5rem;width:100%}.card.vs-stretched-link-card .vs-stretched-link-card__title{color:#200f2e;display:flex}.card.vs-stretched-link-card .vs-stretched-link-card__title .stretched-link{color:#200f2e;text-decoration:none;letter-spacing:inherit;display:block}.card.vs-stretched-link-card .vs-stretched-link-card__title .stretched-link:hover{text-decoration:underline}.card.vs-stretched-link-card .vs-stretched-link-card__title .stretched-link--disabled{cursor:default}.card.vs-stretched-link-card .vs-stretched-link-card__title .stretched-link--disabled::after{display:none}.card.vs-stretched-link-card .vs-stretched-link-card__title .stretched-link .vs-icon{color:#a8308c}.card.vs-stretched-link-card .vs-stretched-link-card__category{font-size:.875rem;line-height:1;color:#535396;letter-spacing:normal;margin-bottom:1rem}.card.vs-stretched-link-card .vs-stretched-link-card__content{margin-top:.5rem;line-height:1.3;font-size:1rem;text-align:left}.card.vs-stretched-link-card .vs-stretched-link-card__content p:last-of-type{margin-bottom:0}.card.vs-stretched-link-card .vs-stretched-link-card__panels{position:absolute;top:.25rem;right:.25rem;display:flex;flex-direction:row}@media(min-width: 576px){.card.vs-stretched-link-card .vs-stretched-link-card__panels{top:.5rem;right:.5rem}}.card.vs-stretched-link-card .vs-stretched-link-card__link{margin:1rem 0 0;color:#1f49d6;text-decoration:underline}.card.vs-stretched-link-card .vs-stretched-link-card__video-button{position:absolute;bottom:100%;left:0}.card.vs-stretched-link-card .vs-stretched-link-card__video-btn-text{padding-right:.25rem}.card.vs-stretched-link-card .vs-stretched-link-card__full-warning{position:absolute;height:127px;width:calc(100% - 1rem);z-index:1}.card.vs-stretched-link-card .vs-stretched-link-card__image-warning{position:absolute;width:100%;height:100%;z-index:1;top:0}.card.vs-stretched-link-card .vs-stretched-link-card__full-warning--no-js,.card.vs-stretched-link-card .vs-stretched-link-card__image-warning--no-js{display:none}.card.vs-stretched-link-card .vs-stretched-link-card__badges{margin-top:.5rem}.no-js .card.vs-stretched-link-card .vs-stretched-link-card__image-warning,.no-js .card.vs-stretched-link-card .vs-stretched-link-card__full-warning,.no-js .card.vs-stretched-link-card .vs-stretched-link-card__video-button{display:none}.no-js .card.vs-stretched-link-card .vs-stretched-link-card__full-warning--no-js,.no-js .card.vs-stretched-link-card .vs-stretched-link-card__image-warning--no-js{display:flex}
51
51
  .vs-stretched-link-panels{position:absolute;right:1rem;top:1rem;display:flex;flex-direction:row}.vs-stretched-link-panels__panel{width:55px;height:55px;background:#33225d;margin-left:.5rem;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.vs-stretched-link-panels__panel--days{background:#a8308c}.vs-stretched-link-panels__panel p{margin-bottom:0;text-align:center;line-height:1;font-size:.625rem}.vs-stretched-link-panels__days{font-size:1.25rem;font-family:"Source Sans Pro";font-weight:700;display:block;margin-bottom:.25rem}.vs-stretched-link-panels__icon{height:20px;width:auto;margin-bottom:.25rem}
52
52
  .vs-carousel-slide{max-width:100%;flex-shrink:0;display:flex}.vs-carousel-slide .vs-carousel-slide__card{flex-shrink:0;opacity:.5;transition:.5s;padding:.5rem;max-width:100%}.vs-carousel-slide .vs-carousel-slide__card--active{opacity:1}.vs-carousel-slide .vs-carousel-slide__card--disabled *{pointer-events:none}.vs-carousel-slide .card-title{margin-bottom:0}.vs-carousel-slide .card-body{text-align:left}.vs-carousel-slide .card-body .vs-heading__sub-heading{display:none}.no-js .vs-carousel-slide{margin-bottom:.5rem}.no-js .vs-carousel-slide::after{content:"";position:absolute;left:.75rem;bottom:.25rem;height:1px;width:calc(100% - 24px);background:#e9e9e9}@media(min-width: 576px){.no-js .vs-carousel-slide::after{width:calc(100% - 40px);left:1.25rem}}.no-js .vs-carousel-slide .vs-stretched-link-card{opacity:1;display:flex;flex-direction:row;padding:.5rem;border:none;height:100%;cursor:pointer}.no-js .vs-carousel-slide .vs-stretched-link-card:hover .vs-stretched-link-card__title{text-decoration:underline}.no-js .vs-carousel-slide .vs-stretched-link-card .stretched-link{text-decoration:none;letter-spacing:0}.no-js .vs-carousel-slide .vs-stretched-link-card .card-body{background:none;padding:0;align-self:flex-start;width:66%;text-align:left}.no-js .vs-carousel-slide .vs-stretched-link-card__img-container{width:33%;align-self:flex-start;margin-right:1rem}.no-js .vs-carousel-slide .vs-stretched-link-card__title{font-size:.75rem;letter-spacing:1px;line-height:1.6;color:#200f2e;text-decoration:none}.no-js .vs-carousel-slide .vs-stretched-link-card__category{margin-bottom:.5rem}.no-js .vs-carousel-slide .vs-stretched-link-card .card-title{display:flex;margin-bottom:0}.no-js .vs-carousel-slide .vs-stretched-link-card__content{display:none}.no-js .vs-carousel-slide .vs-stretched-link-card__content p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.no-js .vs-carousel-slide .vs-stretched-link-card .vs-stretched-link-panels{right:auto;left:calc(33% - 4px);top:1rem;transform:translateX(-100%)}.no-js .vs-carousel-slide .vs-stretched-link-card .vs-stretched-link-panels__panel{display:none;width:36px;height:36px}.no-js .vs-carousel-slide .vs-stretched-link-card .vs-stretched-link-panels__panel--days{display:flex}.no-js .vs-carousel-slide .vs-stretched-link-card .vs-stretched-link-panels__days{font-size:1rem;margin-bottom:0}@media(min-width: 576px){.no-js .vs-stretched-link-card__content{display:block}}@media(min-width: 992px){.no-js .vs-carousel-slide .vs-stretched-link-card__title{font-size:.875rem}.no-js .vs-carousel-slide .vs-stretched-link-card__content{margin:.5rem 0 0;line-height:1.3}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visitscotland/component-library",
3
- "version": "4.26.0",
3
+ "version": "4.26.2",
4
4
  "description": "VisitScotland Component Library",
5
5
  "author": "VisitScotland",
6
6
  "homepage": "https://github.com/visitscotland/vs-component-library#readme",
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1688],{25656:function(){},53780:function(t,e,i){"use strict";var n=i(59639),r=i(34352),a=i(57536),s=i(85510),l=i(68269);e.A={name:"VsSelect",status:"prototype",release:"0.0.1",components:{BFormSelect:r.JR},mixins:[s.A,l.A],props:{options:{type:Array,required:!0},fieldName:{type:String,required:!0},value:{type:String,default:""},validationRules:{type:Object,default:function(){return{}}},triggerValidate:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},validationMessages:{type:Object,default:function(){return{}}},countryListUrl:{type:String,default:""},hintText:{type:String,default:""},countries:{type:Boolean,default:!1},genericValidation:{type:Object,default:function(){return{}}},reAlertErrors:{type:Boolean,default:!1}},emits:["toggleAction","updated"],setup:function(){return{v$:(0,n.Ay)()}},data:function(){return{inputVal:this.value,touched:!1,countryList:[]}},computed:{errorClass:function(){return this.errorsList.length>0&&this.v$.inputVal&&this.v$.inputVal.$anyDirty||this.invalid?"vs-select__element--error":""},fieldOptions:function(){return this.countries?this.countryList:this.options}},watch:{inputVal:function(t){this.emitStatus(),this.$emit("updated",{field:this.fieldName,value:t})},value:function(t){this.inputVal=t},triggerValidate:function(){this.manualValidate()}},beforeMount:function(){var t=this;this.countries&&a.A.get(this.countryListUrl).then((function(e){t.countryList=e.data.countries}))},methods:{autocompleteValue:function(t){return"Country"===t?"country-name":"on"}},validations:function(){return this.rules}}},31028:function(t,e,i){"use strict";i.d(e,{X:function(){return d}});var n=i(20641),r=i(90033),a=i(53751),s={class:"vs-select"},l=["id"],u=["id"],o={class:"visually-hidden"},c={class:"vs-select__container mt-050"};function d(t,e,i,d,f,p){var v=(0,n.g2)("BFormSelect");return(0,n.uX)(),(0,n.CE)("div",s,[(0,n.Lk)("p",{class:"hint-text",id:"hint-".concat(i.fieldName)},(0,r.toDisplayString)(i.hintText),9,l),t.errorsList.length||i.invalid?((0,n.uX)(),(0,n.CE)("div",{key:0,role:"alert","aria-live":"assertive",id:"error-".concat(i.fieldName)},[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(t.errorsList,(function(t){return(0,n.bo)(((0,n.uX)(),(0,n.CE)("p",{key:t,class:"error mb-0"},[(0,n.Lk)("span",o,(0,r.toDisplayString)(i.fieldName),1),(0,n.eW)(" "+(0,r.toDisplayString)(i.validationMessages[t]||i.genericValidation[t]),1)])),[[a.vShow,!i.reAlertErrors]])})),128))],8,u)):(0,n.Q3)("",!0),(0,n.Lk)("div",c,[(0,n.bF)(v,(0,n.v6)({modelValue:f.inputVal,"onUpdate:modelValue":e[0]||(e[0]=function(t){return f.inputVal=t})},t.$attrs,{options:p.fieldOptions,name:i.fieldName,id:i.fieldName,onChange:t.emitStatus,onBlur:t.emitStatus,"data-test":"vs-select","data-testid":"vs-select",class:["vs-select__element",p.errorClass],required:t.isRequired,"aria-invalid":t.v$.inputVal&&t.v$.inputVal.$anyError||i.invalid,"aria-describedby":t.ariaDescription,autocomplete:p.autocompleteValue(i.fieldName)}),null,16,["modelValue","options","name","id","onChange","onBlur","required","aria-invalid","aria-describedby","class","autocomplete"]),e[1]||(e[1]=(0,n.Lk)("span",{class:"vs-select__focus"},null,-1))])])}},30642:function(t,e,i){"use strict";var n=i(85072),r=i.n(n),a=i(97825),s=i.n(a),l=i(77659),u=i.n(l),o=i(55056),c=i.n(o),d=i(10540),f=i.n(d),p=i(41113),v=i.n(p),m=i(25656),y=i.n(m),h={};h.styleTagTransform=v(),h.setAttributes=c(),h.insert=u().bind(null,"head"),h.domAPI=s(),h.insertStyleElement=f(),r()(y(),h),y()&&y().locals&&y().locals},51688:function(t,e,i){"use strict";i.r(e);var n=i(32100),r=i(97144);i(85302);const a=(0,i(66262).A)(r.A,[["render",n.X]]);e.default=a},97144:function(t,e,i){"use strict";i.d(e,{A:function(){return n.A}});var n=i(53780)},32100:function(t,e,i){"use strict";i.d(e,{X:function(){return n.X}});var n=i(31028)},85302:function(t,e,i){"use strict";i(30642)}}]);
@@ -1 +0,0 @@
1
- !function(t,s){"object"==typeof exports&&"object"==typeof module?module.exports=s():"function"==typeof define&&define.amd?define([],s):"object"==typeof exports?exports.VsCard=s():t.VsCard=s()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4420],{34319:function(){},32796:function(t,s,e){"use strict";var r=e(34982);s.A={name:"VsCard",status:"prototype",release:"0.1.0",props:{cardStyle:{type:String,default:null,validator:function(t){return t.match(/(elevated|outlined)/)}},fillColor:{type:String,default:"vs-color-background-cta-subtle"},accentBar:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1}},data:function(){return{tokens:r}},computed:{cardClasses:function(){return[{"vs-card--horizontal":this.horizontal,"vs-card--accent-bar":this.accentBar},this.cardStyle?"vs-card--".concat(this.cardStyle):null]},cardStyles:function(){return this.fillColor?{"background-color":this.tokens[this.fillColor]||this.fillColor}:null}}}},91259:function(t,s,e){"use strict";e.d(s,{X:function(){return l}});var r=e(20641),n=e(90033),o={key:0,class:"vs-card__header"},a={key:1,class:"vs-card__body"},c={key:2,class:"vs-card__footer"};function l(t,s,e,l,d,i){return(0,r.uX)(),(0,r.CE)("div",{class:(0,n.normalizeClass)(["vs-card",i.cardClasses]),"data-test":"vs-card",style:(0,n.normalizeStyle)(i.cardStyles)},[t.$slots["vs-card-header"]&&t.$slots["vs-card-header"]()?((0,r.uX)(),(0,r.CE)("div",o,[(0,r.RG)(t.$slots,"vs-card-header")])):(0,r.Q3)("",!0),t.$slots["vs-card-body"]&&t.$slots["vs-card-body"]()?((0,r.uX)(),(0,r.CE)("div",a,[(0,r.RG)(t.$slots,"vs-card-body")])):(0,r.Q3)("",!0),t.$slots["vs-card-footer"]&&t.$slots["vs-card-footer"]()?((0,r.uX)(),(0,r.CE)("div",c,[(0,r.RG)(t.$slots,"vs-card-footer")])):(0,r.Q3)("",!0)],6)}},1989:function(t,s,e){"use strict";var r=e(85072),n=e.n(r),o=e(97825),a=e.n(o),c=e(77659),l=e.n(c),d=e(55056),i=e.n(d),u=e(10540),f=e.n(u),v=e(41113),y=e.n(v),p=e(34319),h=e.n(p),b={};b.styleTagTransform=y(),b.setAttributes=i(),b.insert=l().bind(null,"head"),b.domAPI=a(),b.insertStyleElement=f(),n()(h(),b),h()&&h().locals&&h().locals},14232:function(t,s,e){"use strict";e.r(s);var r=e(41579),n=e(39664);e(5721);const o=(0,e(66262).A)(n.A,[["render",r.X]]);s.default=o},39664:function(t,s,e){"use strict";e.d(s,{A:function(){return r.A}});var r=e(32796)},41579:function(t,s,e){"use strict";e.d(s,{X:function(){return r.X}});var r=e(91259)},5721:function(t,s,e){"use strict";e(1989)}},function(t){return t.O(0,[641,6262,7510,4982],(function(){return t(t.s=14232)})),t.O()}])}));
@@ -1 +0,0 @@
1
- .vs-card{position:relative;display:flex;flex-direction:column;border-radius:.25rem;height:100%}.vs-card:hover{cursor:pointer}.vs-card:hover .img-zoom-on-hover{transform:scale(1.05)}.vs-card__header{overflow:hidden;border-radius:.25rem}.vs-card__body{display:flex;flex-direction:column;flex-grow:1}.vs-card--elevated{box-shadow:0px 1px 2px 0px rgba(0,0,0,.3),0px 1px 3px 1px rgba(0,0,0,.15)}.vs-card--outlined{border:1px solid #e9e9e9;transition:all .2s}.vs-card--outlined:hover{border-color:#200f2e}.vs-card--filled{background-color:#fff}.vs-card--accent-bar{border-left:8px solid #e9e9e9}.vs-card--horizontal{flex-direction:row}.vs-card--horizontal .vs-card__header{flex:1 1 35%}.vs-card--horizontal .vs-card__body{flex:1 1 75%}@media(min-width: 576px){.vs-card--horizontal .vs-card__header{flex-basis:40%}.vs-card--horizontal .vs-card__body{flex-basis:60%}}