@visitscotland/component-library 4.28.1 → 4.29.0

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/a144cf279b00bc59dccc.css"
23
+ "styles/15525b2173ce836b1dc8.css"
24
24
  ]
25
25
  }
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visitscotland/component-library",
3
- "version": "4.28.1",
3
+ "version": "4.29.0",
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
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VsHeroSection=t():e.VsHeroSection=t()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1763],{26423:function(e,t,i){"use strict";var s=i(85072),n=i.n(s),o=i(97825),r=i.n(o),a=i(77659),d=i.n(a),l=i(55056),u=i.n(l),c=i(10540),v=i.n(c),p=i(41113),g=i.n(p),f=i(94573),h=i.n(f),y={};y.styleTagTransform=g(),y.setAttributes=u(),y.insert=d().bind(null,"head"),y.domAPI=r(),y.insertStyleElement=v(),n()(h(),y),h()&&h().locals&&h().locals},38399:function(e,t,i){"use strict";i.r(t);var s=i(59977),n=i(66565);i(74579);const o=(0,i(66262).A)(n.A,[["render",s.X]]);t.default=o},59977:function(e,t,i){"use strict";i.d(t,{X:function(){return s.X}});var s=i(63513)},63513:function(e,t,i){"use strict";i.d(t,{X:function(){return p}});var s=i(20641),n=i(90033),o={class:"vs-hero-section__grid"},r={key:1,class:"vs-hero-section__video-wrapper"},a=["poster"],d=["src"],l={key:2,class:"vs-hero-section__divider"},u={class:"vs-hero-section__text"},c=["innerHTML"],v={class:"mb-0"};function p(e,t,i,p,g,f){var h=(0,s.g2)("VsHeroSectionImage"),y=(0,s.g2)("VsHeading"),m=(0,s.g2)("VsRichTextWrapper"),_=(0,s.g2)("VsHeroSectionVideoControl");return(0,s.uX)(),(0,s.CE)("div",{class:(0,n.normalizeClass)(["vs-hero-section",{"vs-hero-section--split":i.split}]),"data-test":"vs-hero-section"},[(0,s.Lk)("div",o,[i.src&&!i.videoSrc?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,n.normalizeClass)(["vs-hero-section__image",f.imageClasses])},[(0,s.bF)(h,{"img-alt":i.imgAlt,src:i.src,"img-caption":i.imgCaption,"img-credit":i.imgCredit,split:i.split},null,8,["img-alt","src","img-caption","img-credit","split"])],2)):i.videoSrc?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("video",{loop:"",muted:"",autoplay:"",playsinline:"",preload:"auto",poster:i.src,class:"vs-hero-section__video",ref:"heroVideo","aria-hidden":"true"},[(0,s.Lk)("source",{src:i.videoSrc,type:"video/mp4"},null,8,d)],8,a),t[0]||(t[0]=(0,s.Lk)("div",{class:"vs-hero-section__video-overlay"},null,-1))])):((0,s.uX)(),(0,s.CE)("hr",l)),(0,s.Lk)("div",{class:(0,n.normalizeClass)(f.textContainerClasses)},[(0,s.Lk)("div",u,[(0,s.bF)(y,{class:"vs-hero-section__heading","data-test":"vs-hero-section__heading",level:"1","heading-style":"display-xs",id:"main-heading"},{default:(0,s.k6)((function(){return[(0,s.Lk)("span",{innerHTML:i.heading},null,8,c)]})),_:1}),i.lede?((0,s.uX)(),(0,s.Wv)(m,{key:0,class:"vs-hero-section__lede","data-test":"vs-hero-section__lede",variant:"lead"},{default:(0,s.k6)((function(){return[(0,s.Lk)("p",v,(0,n.toDisplayString)(i.lede),1)]})),_:1})):(0,s.Q3)("",!0)]),i.videoSrc?((0,s.uX)(),(0,s.Wv)(_,{key:0,"video-btn-text":"Toggle video",onVideoToggled:f.onToggleVideo,"video-playing-status":i.videoPlayingStatus,"video-paused-status":i.videoPausedStatus},{default:(0,s.k6)((function(){return[(0,s.eW)((0,n.toDisplayString)(i.videoBtnText),1)]})),_:1},8,["onVideoToggled","video-playing-status","video-paused-status"])):(0,s.Q3)("",!0)],2)])],2)}},66565:function(e,t,i){"use strict";i.d(t,{A:function(){return s.A}});var s=i(86833)},74579:function(e,t,i){"use strict";i(26423)},86833:function(e,t,i){"use strict";var s=i(13838),n=i(72958),o=i(28533),r=i(78773);t.A={name:"VsHeroSection",status:"prototype",release:"0.0.1",components:{VsHeading:s.default,VsRichTextWrapper:n.default,VsHeroSectionImage:o.default,VsHeroSectionVideoControl:r.default},provide:function(){return{videoPlayingStatus:this.videoPlayingStatus,videoPausedStatus:this.videoPausedStatus}},props:{heading:{type:String,default:"",required:!0},lede:{type:String,default:"",required:!0},src:{type:String,default:""},imgAlt:{type:String,default:""},imgCaption:{type:String,default:""},imgCredit:{type:String,default:""},inset:{type:Boolean,default:!1},split:{type:Boolean,default:!1},videoSrc:{type:String,default:""},videoBtnText:{type:String,default:""},videoPlayingStatus:{type:String,default:""},videoPausedStatus:{type:String,default:""}},computed:{imageClasses:function(){return{"vs-hero-section__image--inset":this.inset}},textContainerClasses:function(){return[{"vs-hero-section__text-container--video":this.videoSrc},"vs-hero-section__text-container"]}},methods:{onToggleVideo:function(e){e?this.$refs.heroVideo.pause():this.$refs.heroVideo.play()}}}},94573:function(){}},function(e){return e.O(0,[641,6262,7510,3751,4352,4467,7527,8086,810,2543,6422,8745,8836,8638,2368,3838,7521,1438,1574,2958,4982,1244,630,1154,8533],(function(){return e(e.s=38399)})),e.O()}])}));