@visitscotland/component-library 3.2.1 → 3.2.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.
- package/dist/client/manifest.json +8 -8
- package/dist/client/scripts/2d2270d3450fc95b95a9.js +1 -0
- package/dist/client/scripts/fc757fcd5938bd893263.js +1 -0
- package/dist/components/components/mega-nav/components/MegaNavDropdown.vue.d.ts +5 -0
- package/dist/components/components/site-search/components/SiteSearchForm.vue.d.ts +5 -0
- package/dist/components/vs-component-library.js +18 -18
- package/dist/components/vs-component-library.mjs +323 -309
- package/dist/ssr/index.js +1 -1
- package/dist/ssr/manifest.json +1 -1
- package/package.json +1 -1
- package/dist/client/scripts/62bfabb50ca68abbe7bf.js +0 -1
- package/dist/client/scripts/cee1814ebbd9696bb0bc.js +0 -1
- /package/dist/client/styles/{62bfabb50ca68abbe7bf.css → 2d2270d3450fc95b95a9.css} +0 -0
- /package/dist/client/styles/{cee1814ebbd9696bb0bc.css → fc757fcd5938bd893263.css} +0 -0
- /package/dist/ssr/styles/{6268d2ea23132080eb42.css → 488c81542c1c49fa5029.css} +0 -0
|
@@ -3662,14 +3662,14 @@
|
|
|
3662
3662
|
"scripts/a4a067edc9342e4ea427.js",
|
|
3663
3663
|
"scripts/e8893c6cf105d247bb20.js",
|
|
3664
3664
|
"scripts/74b51e65681bf9c91a25.js",
|
|
3665
|
-
"scripts/
|
|
3665
|
+
"scripts/fc757fcd5938bd893263.js",
|
|
3666
3666
|
"scripts/d4eeb46194941881aa05.js"
|
|
3667
3667
|
],
|
|
3668
3668
|
"styles": [
|
|
3669
3669
|
"styles/cd7968f5815183867103.css",
|
|
3670
3670
|
"styles/cd49442f3979c5aa946f.css",
|
|
3671
3671
|
"styles/a4a067edc9342e4ea427.css",
|
|
3672
|
-
"styles/
|
|
3672
|
+
"styles/fc757fcd5938bd893263.css"
|
|
3673
3673
|
]
|
|
3674
3674
|
},
|
|
3675
3675
|
"VsMegaNavDropdownContainer": {
|
|
@@ -3710,7 +3710,7 @@
|
|
|
3710
3710
|
"scripts/74b51e65681bf9c91a25.js",
|
|
3711
3711
|
"scripts/8ab2278f49c60677801a.js",
|
|
3712
3712
|
"scripts/d25db68009fd56546a92.js",
|
|
3713
|
-
"scripts/
|
|
3713
|
+
"scripts/fc757fcd5938bd893263.js",
|
|
3714
3714
|
"scripts/770b310e1dcf218e43d4.js"
|
|
3715
3715
|
],
|
|
3716
3716
|
"styles": [
|
|
@@ -3718,7 +3718,7 @@
|
|
|
3718
3718
|
"styles/cd49442f3979c5aa946f.css",
|
|
3719
3719
|
"styles/a4a067edc9342e4ea427.css",
|
|
3720
3720
|
"styles/d25db68009fd56546a92.css",
|
|
3721
|
-
"styles/
|
|
3721
|
+
"styles/fc757fcd5938bd893263.css",
|
|
3722
3722
|
"styles/770b310e1dcf218e43d4.css"
|
|
3723
3723
|
]
|
|
3724
3724
|
},
|
|
@@ -4053,7 +4053,7 @@
|
|
|
4053
4053
|
"scripts/30915f258985633764de.js",
|
|
4054
4054
|
"scripts/21bad07c381b46b43956.js",
|
|
4055
4055
|
"scripts/c31b6bc76dcbb113e1c3.js",
|
|
4056
|
-
"scripts/
|
|
4056
|
+
"scripts/2d2270d3450fc95b95a9.js",
|
|
4057
4057
|
"scripts/a92bcf3f9625c73de815.js",
|
|
4058
4058
|
"scripts/e6c25227ffaf543978fc.js",
|
|
4059
4059
|
"scripts/adb997ae050ff11118c3.js",
|
|
@@ -4066,7 +4066,7 @@
|
|
|
4066
4066
|
"styles/d25db68009fd56546a92.css",
|
|
4067
4067
|
"styles/213d4a4283a3fa569b9e.css",
|
|
4068
4068
|
"styles/68b4fa981d1ccbcdb115.css",
|
|
4069
|
-
"styles/
|
|
4069
|
+
"styles/2d2270d3450fc95b95a9.css",
|
|
4070
4070
|
"styles/a92bcf3f9625c73de815.css",
|
|
4071
4071
|
"styles/e6c25227ffaf543978fc.css",
|
|
4072
4072
|
"styles/adb997ae050ff11118c3.css",
|
|
@@ -5076,7 +5076,7 @@
|
|
|
5076
5076
|
"scripts/74b51e65681bf9c91a25.js",
|
|
5077
5077
|
"scripts/7a46684731ebac236769.js",
|
|
5078
5078
|
"scripts/68b4fa981d1ccbcdb115.js",
|
|
5079
|
-
"scripts/
|
|
5079
|
+
"scripts/2d2270d3450fc95b95a9.js",
|
|
5080
5080
|
"scripts/03328a60362cb3651016.js"
|
|
5081
5081
|
],
|
|
5082
5082
|
"styles": [
|
|
@@ -5084,7 +5084,7 @@
|
|
|
5084
5084
|
"styles/cd49442f3979c5aa946f.css",
|
|
5085
5085
|
"styles/a4a067edc9342e4ea427.css",
|
|
5086
5086
|
"styles/68b4fa981d1ccbcdb115.css",
|
|
5087
|
-
"styles/
|
|
5087
|
+
"styles/2d2270d3450fc95b95a9.css"
|
|
5088
5088
|
]
|
|
5089
5089
|
},
|
|
5090
5090
|
"VsSiteSearch": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[2152],{44835:function(){},96967:function(t,e,n){"use strict";var s=n(46422),o=n(22142),r=n(48836),a=n(11438);e.A={name:"VsSiteSearchForm",status:"prototype",release:"0.0.1",components:{VsIcon:s.default,VsInput:o.default,VsButton:r.default,VsCol:a.Il,VsRow:a.AQ,VsContainer:a.T$},props:{isShowing:{type:Boolean,default:!1},labelText:{type:String,default:""},submitButtonText:{type:String,default:""},clearButtonText:{type:String,default:""},closeButtonText:{type:String,default:""}},data:function(){return{searchTerm:"",showSearchForm:!0}},watch:{isShowing:function(t){t&&this.focusOnInput()}},methods:{focusOnInput:function(){var t=this;this.$nextTick((function(){return t.$refs.searchInput.$refs.input.focus()}))},tabFromClose:function(t){t.shiftKey||this.closeSearchForm()},updateVal:function(t){this.searchTerm=t.value},onSubmit:function(t){""===this.searchTerm&&t.preventDefault()},closeSearchForm:function(){this.$emit("toggleAction",this.showSearchForm)}}}},95915:function(t,e,n){"use strict";n.d(e,{X:function(){return d}});var s=n(20641),o=n(90033),r=n(53751),a={key:0,class:"vs-site-search-form","data-test":"vs-site-search-form"},i={class:"cludo-input-form d-flex align-items-start",role:"search",id:"cludo-search-input"},c={class:"d-flex flex-column flex-grow-1 position-relative"},l={for:"site-search",class:"vs-site-search-form__label"},u={class:"visually-hidden"},f={class:"visually-hidden"};function d(t,e,n,d,h,p){var m=(0,s.g2)("VsIcon"),b=(0,s.g2)("VsInput"),v=(0,s.g2)("VsButton"),y=(0,s.g2)("VsCol"),g=(0,s.g2)("VsRow"),_=(0,s.g2)("VsContainer");return h.showSearchForm?((0,s.uX)(),(0,s.CE)("div",a,[(0,s.bF)(_,{fluid:"lg"},{default:(0,s.k6)((function(){return[(0,s.bF)(g,null,{default:(0,s.k6)((function(){return[(0,s.bF)(y,{cols:"12"},{default:(0,s.k6)((function(){return[(0,s.Lk)("div",i,[(0,s.Lk)("div",c,[(0,s.Lk)("label",l,[(0,s.Lk)("span",u,(0,o.toDisplayString)(n.labelText),1),(0,s.bF)(m,{name:"search",size:"xs"})]),(0,s.bF)(b,{class:"vs-site-search-form__input cludo-input-form__input",ref:"searchInput",name:"searchrequest",type:"search","field-name":"site-search",placeholder:n.labelText,"clear-button-text":n.clearButtonText,"auto-complete":!1,onUpdated:p.updateVal},null,8,["placeholder","clear-button-text","onUpdated"])]),(0,s.bF)(v,{type:"submit",class:"vs-site-search-form__search-button cludo-input-form__search-button",variant:"primary",size:"lg",onClick:p.closeSearchForm},{default:(0,s.k6)((function(){return[(0,s.eW)((0,o.toDisplayString)(n.submitButtonText),1)]})),_:1},8,["onClick"])])]})),_:1})]})),_:1})]})),_:1}),(0,s.bF)(v,{class:"vs-site-search-form__close-button d-none d-lg-block",variant:"transparent",icon:"close-circle",size:"md","icon-only":"",onClick:p.closeSearchForm,onKeydown:(0,r.withKeys)(p.tabFromClose,["tab"])},{default:(0,s.k6)((function(){return[(0,s.Lk)("span",f,(0,o.toDisplayString)(n.closeButtonText),1)]})),_:1},8,["onClick","onKeydown"])])):(0,s.Q3)("",!0)}},88325:function(t,e,n){"use strict";var s=n(85072),o=n.n(s),r=n(97825),a=n.n(r),i=n(77659),c=n.n(i),l=n(55056),u=n.n(l),f=n(10540),d=n.n(f),h=n(41113),p=n.n(h),m=n(44835),b=n.n(m),v={};v.styleTagTransform=p(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),o()(b(),v),b()&&b().locals&&b().locals},12152:function(t,e,n){"use strict";n.r(e);var s=n(13339),o=n(71496);n(95625);const r=(0,n(66262).A)(o.A,[["render",s.X]]);e.default=r},71496:function(t,e,n){"use strict";n.d(e,{A:function(){return s.A}});var s=n(96967)},13339:function(t,e,n){"use strict";n.d(e,{X:function(){return s.X}});var s=n(95915)},95625:function(t,e,n){"use strict";n(88325)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[2329],{61070:function(){},8049:function(n,t,e){"use strict";var o=e(11438),s=e(34352),i=e(48836),r=e(98745);t.A={name:"VsMegaNavDropdown",status:"prototype",release:"0.1.0",components:{BDropdown:s.UV,VsCol:o.Il,VsContainer:o.T$,VsRow:o.AQ,VsButton:i.default},mixins:[r.default],props:{menuToggleAltText:{type:String,required:!0}},mounted:function(){var n=this;this.emitter&&(this.emitter.on("bv::dropdown::show",(function(){n.$emit("menuToggled")})),this.emitter.on("bv::dropdown::hide",(function(){n.$emit("menuToggled")}))),window.addEventListener("resize",this.closeMenu)},beforeUnmount:function(){window.removeEventListener("resize",this.closeMenu)},methods:{closeMenu:function(){this.$refs.dropdown.hide()},tabFromClose:function(n){n.shiftKey||this.closeMenu()},dataLayerSubmit:function(){if(this.$slots["button-content"]()[1]&&this.$slots["button-content"]()[1].children[0]){var n={target:{text:this.$slots["button-content"]()[1].children[0].children}};this.createDataLayerObject("menuNavigationDataEvent",n,null)}}}}},15316:function(n,t,e){"use strict";e.d(t,{X:function(){return f}});var o=e(20641),s=e(53751),i=e(90033),r={class:"vs-mega-nav-dropdown","data-test":"vs-mega-nav-dropdown"},l={role:"menuitem"},u={class:"visually-hidden"},a={class:"dropdown-menu dropdown-menu--fallback overflow-auto",role:"menu"},c={role:"menuitem"},d={class:"visually-hidden"};function f(n,t,e,f,p,m){var b=(0,o.g2)("VsButton"),v=(0,o.g2)("VsCol"),g=(0,o.g2)("VsRow"),w=(0,o.g2)("VsContainer"),h=(0,o.g2)("BDropdown");return(0,o.uX)(),(0,o.CE)("div",r,[(0,o.bF)(h,{variant:"transparent",ref:"dropdown",onShow:t[0]||(t[0]=function(n){return m.dataLayerSubmit(n)})},{"button-content":(0,o.k6)((function(){return[(0,o.RG)(n.$slots,"button-content")]})),default:(0,o.k6)((function(){return[(0,o.Lk)("li",l,[(0,o.bF)(w,{fluid:"lg",class:"px-0 px-lg-3"},{default:(0,o.k6)((function(){return[(0,o.bF)(g,{class:"g-0"},{default:(0,o.k6)((function(){return[(0,o.bF)(v,{cols:"12",class:"position-relative"},{default:(0,o.k6)((function(){return[(0,o.RG)(n.$slots,"cta-link"),(0,o.RG)(n.$slots,"dropdown-content"),(0,o.bF)(b,{class:"vs-mega-nav-dropdown__close-btn d-none d-lg-block position-absolute",icon:"close","icon-only":"",size:"sm",variant:"transparent",onClick:m.closeMenu,onKeydown:(0,s.withKeys)(m.tabFromClose,["tab"])},{default:(0,o.k6)((function(){return[(0,o.Lk)("span",u,(0,i.toDisplayString)(e.menuToggleAltText),1)]})),_:1},8,["onClick","onKeydown"])]})),_:3})]})),_:3})]})),_:3})])]})),_:3},512),(0,o.Lk)("ul",a,[(0,o.Lk)("li",c,[(0,o.bF)(w,{fluid:"lg",class:"px-0 px-lg-3"},{default:(0,o.k6)((function(){return[(0,o.bF)(g,{class:"g-0"},{default:(0,o.k6)((function(){return[(0,o.bF)(v,{cols:"12",class:"position-relative"},{default:(0,o.k6)((function(){return[(0,o.RG)(n.$slots,"cta-link"),(0,o.RG)(n.$slots,"dropdown-content"),(0,o.bF)(b,{class:"vs-mega-nav-dropdown__close-btn d-none d-lg-block position-absolute",icon:"close","icon-only":"",size:"sm",variant:"transparent",onClick:m.closeMenu},{default:(0,o.k6)((function(){return[(0,o.Lk)("span",d,(0,i.toDisplayString)(e.menuToggleAltText),1)]})),_:1},8,["onClick"])]})),_:3})]})),_:3})]})),_:3})])])])}},99564:function(n,t,e){"use strict";var o=e(85072),s=e.n(o),i=e(97825),r=e.n(i),l=e(77659),u=e.n(l),a=e(55056),c=e.n(a),d=e(10540),f=e.n(d),p=e(41113),m=e.n(p),b=e(61070),v=e.n(b),g={};g.styleTagTransform=m(),g.setAttributes=c(),g.insert=u().bind(null,"head"),g.domAPI=r(),g.insertStyleElement=f(),s()(v(),g),v()&&v().locals&&v().locals},62329:function(n,t,e){"use strict";e.r(t);var o=e(21508),s=e(6381);e(34e3);const i=(0,e(66262).A)(s.A,[["render",o.X]]);t.default=i},6381:function(n,t,e){"use strict";e.d(t,{A:function(){return o.A}});var o=e(8049)},21508:function(n,t,e){"use strict";e.d(t,{X:function(){return o.X}});var o=e(15316)},34e3:function(n,t,e){"use strict";e(99564)}}]);
|
|
@@ -11,6 +11,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
11
11
|
* Close the menu
|
|
12
12
|
*/
|
|
13
13
|
closeMenu(): void;
|
|
14
|
+
/**
|
|
15
|
+
* If tab pressed on close, check if user moving forwards
|
|
16
|
+
* before closing menu
|
|
17
|
+
*/
|
|
18
|
+
tabFromClose($event: any): void;
|
|
14
19
|
/**
|
|
15
20
|
* Submit event to dataLayer for tracking
|
|
16
21
|
*/
|
|
@@ -42,6 +42,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
42
42
|
* Puts focus on input when form is opened
|
|
43
43
|
*/
|
|
44
44
|
focusOnInput(): void;
|
|
45
|
+
/**
|
|
46
|
+
* If tab pressed on close, check if user moving forwards
|
|
47
|
+
* before closing form
|
|
48
|
+
*/
|
|
49
|
+
tabFromClose($event: any): void;
|
|
45
50
|
/**
|
|
46
51
|
* Update searchTerm value with returned data
|
|
47
52
|
*/
|