@10up/component-tabs
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,2 +0,2 @@ | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=39)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(17)("wks"),o=n(7),i=n(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),o=n(14);t.exports=n(5)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(13),o=n(28),i=n(18),u=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(32),o=n(34);t.exports=function(t){return r(o(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(31),o=n(22);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=!1},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(0),o=n(3),i=n(2),u=n(7)("src"),c=Function.toString,a=(""+c).split("toString");n(11).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,u)||o(n,u,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(11),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(12)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(0),o=n(11),i=n(3),u=n(15),c=n(40),a=function(t,e,n){var s,f,l,p,y=t&a.F,v=t&a.G,b=t&a.S,h=t&a.P,d=t&a.B,g=v?r:b?r[e]||(r[e]={}):(r[e]||{}).prototype,m=v?o:o[e]||(o[e]={}),S=m.prototype||(m.prototype={});for(s in v&&(n=e),n)l=((f=!y&&g&&void 0!==g[s])?g:n)[s],p=d&&f?c(l,r):h&&"function"==typeof l?c(Function.call,l):l,g&&u(g,s,l,t&a.U),m[s]!=l&&i(m,s,p),h&&S[s]!=l&&(S[s]=l)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(4).f,o=n(2),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(17)("keys"),o=n(7);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports={}},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){var r=n(0),o=n(11),i=n(12),u=n(27),c=n(4).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:u.f(t)})}},function(t,e,n){e.f=n(1)},function(t,e,n){t.exports=!n(5)&&!n(9)(function(){return 7!=Object.defineProperty(n(29)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(8),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(5),u=n(19),c=n(15),a=n(42).KEY,s=n(9),f=n(17),l=n(20),p=n(7),y=n(1),v=n(27),b=n(26),h=n(43),d=n(47),g=n(13),m=n(8),S=n(6),O=n(18),x=n(14),w=n(36),j=n(50),T=n(51),P=n(4),_=n(10),L=T.f,A=P.f,E=j.f,k=r.Symbol,M=r.JSON,N=M&&M.stringify,C=y("_hidden"),F=y("toPrimitive"),q={}.propertyIsEnumerable,I=f("symbol-registry"),D=f("symbols"),G=f("op-symbols"),R=Object.prototype,V="function"==typeof k,U=r.QObject,W=!U||!U.prototype||!U.prototype.findChild,H=i&&s(function(){return 7!=w(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=L(R,e);r&&delete R[e],A(t,e,n),r&&t!==R&&A(R,e,r)}:A,J=function(t){var e=D[t]=w(k.prototype);return e._k=t,e},z=V&&"symbol"==typeof k.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof k},B=function(t,e,n){return t===R&&B(G,e,n),g(t),e=O(e,!0),g(n),o(D,e)?(n.enumerable?(o(t,C)&&t[C][e]&&(t[C][e]=!1),n=w(n,{enumerable:x(0,!1)})):(o(t,C)||A(t,C,x(1,{})),t[C][e]=!0),H(t,e,n)):A(t,e,n)},K=function(t,e){g(t);for(var n,r=h(e=S(e)),o=0,i=r.length;i>o;)B(t,n=r[o++],e[n]);return t},$=function(t){var e=q.call(this,t=O(t,!0));return!(this===R&&o(D,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,C)&&this[C][t])||e)},Y=function(t,e){if(t=S(t),e=O(e,!0),t!==R||!o(D,e)||o(G,e)){var n=L(t,e);return!n||!o(D,e)||o(t,C)&&t[C][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=E(S(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==C||e==a||r.push(e);return r},X=function(t){for(var e,n=t===R,r=E(n?G:S(t)),i=[],u=0;r.length>u;)!o(D,e=r[u++])||n&&!o(R,e)||i.push(D[e]);return i};V||(c((k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===R&&e.call(G,n),o(this,C)&&o(this[C],t)&&(this[C][t]=!1),H(this,t,x(1,n))};return i&&W&&H(R,t,{configurable:!0,set:e}),J(t)}).prototype,"toString",function(){return this._k}),T.f=Y,P.f=B,n(37).f=j.f=Q,n(16).f=$,n(23).f=X,i&&!n(12)&&c(R,"propertyIsEnumerable",$,!0),v.f=function(t){return J(y(t))}),u(u.G+u.W+u.F*!V,{Symbol:k});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)y(Z[tt++]);for(var et=_(y.store),nt=0;et.length>nt;)b(et[nt++]);u(u.S+u.F*!V,"Symbol",{for:function(t){return o(I,t+="")?I[t]:I[t]=k(t)},keyFor:function(t){if(!z(t))throw TypeError(t+" is not a symbol!");for(var e in I)if(I[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),u(u.S+u.F*!V,"Object",{create:function(t,e){return void 0===e?w(t):K(w(t),e)},defineProperty:B,defineProperties:K,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:X}),M&&u(u.S+u.F*(!V||s(function(){var t=k();return"[null]"!=N([t])||"{}"!=N({a:t})||"{}"!=N(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!z(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!z(e))return e}),r[1]=e,N.apply(M,r)}}),k.prototype[F]||n(3)(k.prototype,F,k.prototype.valueOf),l(k,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(2),o=n(6),i=n(44)(!1),u=n(21)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),a=0,s=[];for(n in c)n!=u&&r(c,n)&&s.push(n);for(;e.length>a;)r(c,n=e[a++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(33);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(13),o=n(48),i=n(22),u=n(21)("IE_PROTO"),c=function(){},a=function(){var t,e=n(29)("iframe"),r=i.length;for(e.style.display="none",n(49).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[i[r]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(c.prototype=r(t),n=new c,c.prototype=null,n[u]=t):n=a(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(31),o=n(22).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(34);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(63),t.exports=n(61)},function(t,e,n){var r=n(41);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(7)("meta"),o=n(8),i=n(2),u=n(4).f,c=0,a=Object.isExtensible||function(){return!0},s=!n(9)(function(){return a(Object.preventExtensions({}))}),f=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!a(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!a(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&a(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(10),o=n(23),i=n(16);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var u,c=n(t),a=i.f,s=0;c.length>s;)a.call(t,u=c[s++])&&e.push(u);return e}},function(t,e,n){var r=n(6),o=n(45),i=n(46);t.exports=function(t){return function(e,n,u){var c,a=r(e),s=o(a.length),f=i(u,s);if(t&&n!=n){for(;s>f;)if((c=a[f++])!=c)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(35),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(35),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(33);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(4),o=n(13),i=n(10);t.exports=n(5)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),c=u.length,a=0;c>a;)r.f(t,n=u[a++],e[n]);return t}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(6),o=n(37).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return u.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(16),o=n(14),i=n(6),u=n(18),c=n(2),a=n(28),s=Object.getOwnPropertyDescriptor;e.f=n(5)?s:function(t,e){if(t=i(t),e=u(e,!0),a)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){for(var r=n(53),o=n(10),i=n(15),u=n(0),c=n(3),a=n(24),s=n(1),f=s("iterator"),l=s("toStringTag"),p=a.Array,y={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(y),b=0;b<v.length;b++){var h,d=v[b],g=y[d],m=u[d],S=m&&m.prototype;if(S&&(S[f]||c(S,f,p),S[l]||c(S,l,d),a[d]=p,g))for(h in r)S[h]||i(S,h,r[h],!0)}},function(t,e,n){"use strict";var r=n(54),o=n(55),i=n(24),u=n(6);t.exports=n(56)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(1)("unscopables"),o=Array.prototype;void 0==o[r]&&n(3)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(12),o=n(19),i=n(15),u=n(3),c=n(24),a=n(57),s=n(20),f=n(58),l=n(1)("iterator"),p=!([].keys&&"next"in[].keys()),y=function(){return this};t.exports=function(t,e,n,v,b,h,d){a(n,e,v);var g,m,S,O=function(t){if(!p&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",w="values"==b,j=!1,T=t.prototype,P=T[l]||T["@@iterator"]||b&&T[b],_=P||O(b),L=b?w?O("entries"):_:void 0,A="Array"==e&&T.entries||P;if(A&&(S=f(A.call(new t)))!==Object.prototype&&S.next&&(s(S,x,!0),r||"function"==typeof S[l]||u(S,l,y)),w&&P&&"values"!==P.name&&(j=!0,_=function(){return P.call(this)}),r&&!d||!p&&!j&&T[l]||u(T,l,_),c[e]=_,c[x]=y,b)if(g={values:w?_:O("values"),keys:h?_:O("keys"),entries:L},d)for(m in g)m in T||i(T,m,g[m]);else o(o.P+o.F*(p||j),e,g);return g}},function(t,e,n){"use strict";var r=n(36),o=n(14),i=n(20),u={};n(3)(u,n(1)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(2),o=n(38),i=n(21)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(19);r(r.S+r.F,"Object",{assign:n(60)})},function(t,e,n){"use strict";var r=n(10),o=n(23),i=n(16),u=n(38),c=n(32),a=Object.assign;t.exports=!a||n(9)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=a({},t)[n]||Object.keys(a({},e)).join("")!=r})?function(t,e){for(var n=u(t),a=arguments.length,s=1,f=o.f,l=i.f;a>s;)for(var p,y=c(arguments[s++]),v=f?r(y).concat(f(y)):r(y),b=v.length,h=0;b>h;)l.call(y,p=v[h++])&&(n[p]=y[p]);return n}:a},function(t,e,n){},,function(t,e,n){"use strict";n.r(e);n(25),n(30),n(52),n(59);function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);if(e&&"string"==typeof e)if(this.$tabs=document.querySelectorAll(e),this.$tabs){this.settings=Object.assign({},{onCreate:null,onTabChange:null},n);var r=!0,o=!1,i=void 0;try{for(var u,c=this.$tabs[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var a=u.value;this.setupTabs(a)}}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}this.settings.onCreate&&"function"==typeof this.settings.onCreate&&this.settings.onCreate.call()}else console.error("10up Tabs: Target not found. A valid target (tab area) must be used.");else console.error("10up Tabs: No target supplied. A valid target (tab area) must be used.")}return function(t,e,n){e&&r(t.prototype,e),n&&r(t,n)}(t,[{key:"setupTabs",value:function(t){var e=this,n=t.querySelectorAll(".tab-list li > a"),r=!0,o=!1,i=void 0;try{for(var u,c=n[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var a=u.value,s=a.getAttribute("href"),f="tab-".concat(s.slice(1)),l=t.querySelector(s);a.setAttribute("id",f),a.setAttribute("aria-selected",!1),a.parentNode.setAttribute("role","presentation"),l.setAttribute("aria-labeledby",f),l.setAttribute("aria-hidden",!0),a.addEventListener("click",function(){event.preventDefault(),event.target.parentNode.classList.contains("is-active")||e.goToTab(event,t)})}}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}this.setFirstTab(t)}},{key:"setFirstTab",value:function(t){var e=t.querySelector(".tab-list li:first-child a"),n=e.getAttribute("href"),r=t.querySelector(n);e.setAttribute("aria-selected","true"),e.parentNode.classList.add("is-active"),r.setAttribute("aria-hidden","false"),r.classList.add("is-active")}},{key:"goToTab",value:function(t,e){var n=e.querySelector(".tab-list li.is-active a"),r=n.getAttribute("href"),o=e.querySelector(r);n.setAttribute("aria-selected","false"),n.parentNode.classList.remove("is-active"),o.setAttribute("aria-hidden","true"),o.classList.remove("is-active");var i=t.target,u=i.getAttribute("href"),c=e.querySelector(u);i.setAttribute("aria-selected","true"),i.parentNode.classList.add("is-active"),c.setAttribute("aria-hidden","false"),c.classList.add("is-active"),c.querySelector("h2")&&(c.querySelector("h2").setAttribute("tabindex",-1),c.querySelector("h2").focus()),this.settings.onTabChange&&"function"==typeof this.settings.onTabChange&&this.settings.onTabChange.call()}}]),t}();function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"object"!==i(window.TenUp)&&(window.TenUp={}),window.TenUp.tabs=o}]); | ||
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=39)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(13)("wks"),o=n(7),i=n(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),o=n(15);t.exports=n(5)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(14),o=n(28),i=n(18),u=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(9)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(32),o=n(34);t.exports=function(t){return r(o(t))}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(31),o=n(22);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=!1},function(t,e,n){var r=n(11),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(12)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(0),o=n(3),i=n(2),u=n(7)("src"),c=n(40),a=(""+c).split("toString");n(11).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(s&&(i(n,u)||o(n,u,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[u]||c.call(this)})},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(0),o=n(11),i=n(3),u=n(16),c=n(41),a=function(t,e,n){var s,f,l,p,y=t&a.F,v=t&a.G,b=t&a.S,h=t&a.P,d=t&a.B,g=v?r:b?r[e]||(r[e]={}):(r[e]||{}).prototype,m=v?o:o[e]||(o[e]={}),S=m.prototype||(m.prototype={});for(s in v&&(n=e),n)l=((f=!y&&g&&void 0!==g[s])?g:n)[s],p=d&&f?c(l,r):h&&"function"==typeof l?c(Function.call,l):l,g&&u(g,s,l,t&a.U),m[s]!=l&&i(m,s,p),h&&S[s]!=l&&(S[s]=l)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(4).f,o=n(2),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(13)("keys"),o=n(7);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){t.exports={}},function(t,e,n){n(26)("asyncIterator")},function(t,e,n){var r=n(0),o=n(11),i=n(12),u=n(27),c=n(4).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:u.f(t)})}},function(t,e,n){e.f=n(1)},function(t,e,n){t.exports=!n(5)&&!n(9)(function(){return 7!=Object.defineProperty(n(29)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(8),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(5),u=n(19),c=n(16),a=n(43).KEY,s=n(9),f=n(13),l=n(20),p=n(7),y=n(1),v=n(27),b=n(26),h=n(44),d=n(48),g=n(14),m=n(8),S=n(6),x=n(18),O=n(15),w=n(36),j=n(51),T=n(52),P=n(4),_=n(10),L=T.f,E=P.f,A=j.f,k=r.Symbol,M=r.JSON,N=M&&M.stringify,C=y("_hidden"),F=y("toPrimitive"),I={}.propertyIsEnumerable,D=f("symbol-registry"),q=f("symbols"),G=f("op-symbols"),R=Object.prototype,B="function"==typeof k,V=r.QObject,U=!V||!V.prototype||!V.prototype.findChild,W=i&&s(function(){return 7!=w(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=L(R,e);r&&delete R[e],E(t,e,n),r&&t!==R&&E(R,e,r)}:E,H=function(t){var e=q[t]=w(k.prototype);return e._k=t,e},J=B&&"symbol"==typeof k.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof k},z=function(t,e,n){return t===R&&z(G,e,n),g(t),e=x(e,!0),g(n),o(q,e)?(n.enumerable?(o(t,C)&&t[C][e]&&(t[C][e]=!1),n=w(n,{enumerable:O(0,!1)})):(o(t,C)||E(t,C,O(1,{})),t[C][e]=!0),W(t,e,n)):E(t,e,n)},K=function(t,e){g(t);for(var n,r=h(e=S(e)),o=0,i=r.length;i>o;)z(t,n=r[o++],e[n]);return t},$=function(t){var e=I.call(this,t=x(t,!0));return!(this===R&&o(q,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(q,t)||o(this,C)&&this[C][t])||e)},Y=function(t,e){if(t=S(t),e=x(e,!0),t!==R||!o(q,e)||o(G,e)){var n=L(t,e);return!n||!o(q,e)||o(t,C)&&t[C][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=A(S(t)),r=[],i=0;n.length>i;)o(q,e=n[i++])||e==C||e==a||r.push(e);return r},X=function(t){for(var e,n=t===R,r=A(n?G:S(t)),i=[],u=0;r.length>u;)!o(q,e=r[u++])||n&&!o(R,e)||i.push(q[e]);return i};B||(c((k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===R&&e.call(G,n),o(this,C)&&o(this[C],t)&&(this[C][t]=!1),W(this,t,O(1,n))};return i&&U&&W(R,t,{configurable:!0,set:e}),H(t)}).prototype,"toString",function(){return this._k}),T.f=Y,P.f=z,n(37).f=j.f=Q,n(17).f=$,n(23).f=X,i&&!n(12)&&c(R,"propertyIsEnumerable",$,!0),v.f=function(t){return H(y(t))}),u(u.G+u.W+u.F*!B,{Symbol:k});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)y(Z[tt++]);for(var et=_(y.store),nt=0;et.length>nt;)b(et[nt++]);u(u.S+u.F*!B,"Symbol",{for:function(t){return o(D,t+="")?D[t]:D[t]=k(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in D)if(D[e]===t)return e},useSetter:function(){U=!0},useSimple:function(){U=!1}}),u(u.S+u.F*!B,"Object",{create:function(t,e){return void 0===e?w(t):K(w(t),e)},defineProperty:z,defineProperties:K,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:X}),M&&u(u.S+u.F*(!B||s(function(){var t=k();return"[null]"!=N([t])||"{}"!=N({a:t})||"{}"!=N(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!J(t))return d(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!J(e))return e}),r[1]=e,N.apply(M,r)}}),k.prototype[F]||n(3)(k.prototype,F,k.prototype.valueOf),l(k,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){var r=n(2),o=n(6),i=n(45)(!1),u=n(21)("IE_PROTO");t.exports=function(t,e){var n,c=o(t),a=0,s=[];for(n in c)n!=u&&r(c,n)&&s.push(n);for(;e.length>a;)r(c,n=e[a++])&&(~i(s,n)||s.push(n));return s}},function(t,e,n){var r=n(33);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(14),o=n(49),i=n(22),u=n(21)("IE_PROTO"),c=function(){},a=function(){var t,e=n(29)("iframe"),r=i.length;for(e.style.display="none",n(50).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[i[r]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(c.prototype=r(t),n=new c,c.prototype=null,n[u]=t):n=a(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(31),o=n(22).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(34);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(63),t.exports=n(62)},function(t,e,n){t.exports=n(13)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(42);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(7)("meta"),o=n(8),i=n(2),u=n(4).f,c=0,a=Object.isExtensible||function(){return!0},s=!n(9)(function(){return a(Object.preventExtensions({}))}),f=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!a(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!a(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&a(t)&&!i(t,r)&&f(t),t}}},function(t,e,n){var r=n(10),o=n(23),i=n(17);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var u,c=n(t),a=i.f,s=0;c.length>s;)a.call(t,u=c[s++])&&e.push(u);return e}},function(t,e,n){var r=n(6),o=n(46),i=n(47);t.exports=function(t){return function(e,n,u){var c,a=r(e),s=o(a.length),f=i(u,s);if(t&&n!=n){for(;s>f;)if((c=a[f++])!=c)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(35),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(35),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(33);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(4),o=n(14),i=n(10);t.exports=n(5)?Object.defineProperties:function(t,e){o(t);for(var n,u=i(e),c=u.length,a=0;c>a;)r.f(t,n=u[a++],e[n]);return t}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(6),o=n(37).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return u.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(17),o=n(15),i=n(6),u=n(18),c=n(2),a=n(28),s=Object.getOwnPropertyDescriptor;e.f=n(5)?s:function(t,e){if(t=i(t),e=u(e,!0),a)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){for(var r=n(54),o=n(10),i=n(16),u=n(0),c=n(3),a=n(24),s=n(1),f=s("iterator"),l=s("toStringTag"),p=a.Array,y={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(y),b=0;b<v.length;b++){var h,d=v[b],g=y[d],m=u[d],S=m&&m.prototype;if(S&&(S[f]||c(S,f,p),S[l]||c(S,l,d),a[d]=p,g))for(h in r)S[h]||i(S,h,r[h],!0)}},function(t,e,n){"use strict";var r=n(55),o=n(56),i=n(24),u=n(6);t.exports=n(57)(Array,"Array",function(t,e){this._t=u(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(1)("unscopables"),o=Array.prototype;null==o[r]&&n(3)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(12),o=n(19),i=n(16),u=n(3),c=n(24),a=n(58),s=n(20),f=n(59),l=n(1)("iterator"),p=!([].keys&&"next"in[].keys()),y=function(){return this};t.exports=function(t,e,n,v,b,h,d){a(n,e,v);var g,m,S,x=function(t){if(!p&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",w="values"==b,j=!1,T=t.prototype,P=T[l]||T["@@iterator"]||b&&T[b],_=P||x(b),L=b?w?x("entries"):_:void 0,E="Array"==e&&T.entries||P;if(E&&(S=f(E.call(new t)))!==Object.prototype&&S.next&&(s(S,O,!0),r||"function"==typeof S[l]||u(S,l,y)),w&&P&&"values"!==P.name&&(j=!0,_=function(){return P.call(this)}),r&&!d||!p&&!j&&T[l]||u(T,l,_),c[e]=_,c[O]=y,b)if(g={values:w?_:x("values"),keys:h?_:x("keys"),entries:L},d)for(m in g)m in T||i(T,m,g[m]);else o(o.P+o.F*(p||j),e,g);return g}},function(t,e,n){"use strict";var r=n(36),o=n(15),i=n(20),u={};n(3)(u,n(1)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(2),o=n(38),i=n(21)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,e,n){var r=n(19);r(r.S+r.F,"Object",{assign:n(61)})},function(t,e,n){"use strict";var r=n(10),o=n(23),i=n(17),u=n(38),c=n(32),a=Object.assign;t.exports=!a||n(9)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=a({},t)[n]||Object.keys(a({},e)).join("")!=r})?function(t,e){for(var n=u(t),a=arguments.length,s=1,f=o.f,l=i.f;a>s;)for(var p,y=c(arguments[s++]),v=f?r(y).concat(f(y)):r(y),b=v.length,h=0;b>h;)l.call(y,p=v[h++])&&(n[p]=y[p]);return n}:a},function(t,e,n){},function(t,e,n){"use strict";n.r(e);n(25),n(30),n(53),n(60);function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);if(e&&"string"==typeof e)if(this.$tabs=document.querySelectorAll(e),this.$tabs){this.settings=Object.assign({},{onCreate:null,onTabChange:null},n);var r=!0,o=!1,i=void 0;try{for(var u,c=this.$tabs[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var a=u.value;this.setupTabs(a)}}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}this.settings.onCreate&&"function"==typeof this.settings.onCreate&&this.settings.onCreate.call()}else console.error("10up Tabs: Target not found. A valid target (tab area) must be used.");else console.error("10up Tabs: No target supplied. A valid target (tab area) must be used.")}var e,n,o;return e=t,(n=[{key:"setupTabs",value:function(t){var e=this,n=t.querySelectorAll('.tab-list [role="tab"]'),r=!0,o=!1,i=void 0;try{for(var u,c=n[Symbol.iterator]();!(r=(u=c.next()).done);r=!0){var a=u.value,s=a.getAttribute("aria-controls"),f="tab-".concat(s),l=document.getElementById(s);a.setAttribute("id",f),a.setAttribute("aria-selected",!1),a.parentNode.setAttribute("role","presentation"),l.setAttribute("aria-labeledby",f),l.setAttribute("aria-hidden",!0),a.addEventListener("click",function(n){n.preventDefault(),n.target.parentNode.classList.contains("is-active")||e.goToTab(n,t)}),a.addEventListener("keyup",function(n){32!==n.which||n.target.parentNode.classList.contains("is-active")||(n.preventDefault(),e.goToTab(n,t))})}}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}this.setFirstTab(t)}},{key:"setFirstTab",value:function(t){var e=t.querySelector('.tab-list li:first-child [role="tab"]'),n=e.getAttribute("aria-controls"),r=document.getElementById(n);e.setAttribute("aria-selected","true"),e.parentNode.classList.add("is-active"),r.setAttribute("aria-hidden","false"),r.classList.add("is-active")}},{key:"goToTab",value:function(t,e){var n=e.querySelector('.tab-list li.is-active [role="tab"]'),r=n.getAttribute("aria-controls"),o=document.getElementById(r);n.setAttribute("aria-selected","false"),n.parentNode.classList.remove("is-active"),o.setAttribute("aria-hidden","true"),o.classList.remove("is-active");var i=t.target,u=i.getAttribute("aria-controls"),c=document.getElementById(u);i.setAttribute("aria-selected","true"),i.parentNode.classList.add("is-active"),c.setAttribute("aria-hidden","false"),c.classList.add("is-active"),c.querySelector("h2")&&(c.querySelector("h2").setAttribute("tabindex",-1),c.querySelector("h2").focus()),this.settings.onTabChange&&"function"==typeof this.settings.onTabChange&&this.settings.onTabChange.call()}}])&&r(e.prototype,n),o&&r(e,o),t}();function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}"object"!==i(window.TenUp)&&(window.TenUp={}),window.TenUp.tabs=o}]); | ||
//# sourceMappingURL=tabs.js.map |
{ | ||
"name": "@10up/component-tabs", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "10up", | ||
@@ -23,24 +23,24 @@ "description": "Accessible tab component.", | ||
"devDependencies": { | ||
"@10up/eslint-config": "^1.0.6", | ||
"@babel/cli": "^7.0.0", | ||
"@babel/core": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"@10up/eslint-config": "^1.0.9", | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.4.0", | ||
"@babel/preset-env": "^7.4.2", | ||
"babel-eslint": "^9.0.0", | ||
"babel-loader": "^8.0.2", | ||
"browser-sync": "^2.24.7", | ||
"babel-loader": "^8.0.5", | ||
"browser-sync": "^2.26.3", | ||
"browser-sync-webpack-plugin": "^2.2.2", | ||
"css-loader": "^1.0.0", | ||
"eslint": "^5.5.0", | ||
"eslint-loader": "^2.1.0", | ||
"mini-css-extract-plugin": "^0.4.2", | ||
"postcss": "^7.0.2", | ||
"postcss-import": "^12.0.0", | ||
"css-loader": "^1.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-loader": "^2.1.2", | ||
"mini-css-extract-plugin": "^0.4.5", | ||
"postcss": "^7.0.14", | ||
"postcss-import": "^12.0.1", | ||
"postcss-loader": "^3.0.0", | ||
"postcss-preset-env": "^5.3.0", | ||
"webpack": "^4.17.2", | ||
"webpack-cli": "^3.1.0" | ||
"webpack": "^4.29.6", | ||
"webpack-cli": "^3.3.0" | ||
}, | ||
"dependencies": { | ||
"@babel/polyfill": "^7.0.0" | ||
"@babel/polyfill": "^7.4.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# 10up Tabs | ||
# 10up Tabs component | ||
@@ -31,13 +31,13 @@ The tabs component is based on and extended from work done by the folks over at [Simply Accessible](http://simplyaccessible.com/). It is a stripped down, but still accessible version of UI tabs. They are keyboard accessible and user friendly and are meant to be a starting point for you to use on a project. | ||
<div class="tab-control"> | ||
<ul class="tab-list"> | ||
<li class="tab-item"><a href="#js-tab1">View Tab 1</a></li> | ||
<li class="tab-item"><a href="#js-tab2">View Tab 2</a></li> | ||
<ul class="tab-list" role="tablist"> | ||
<li class="tab-item"><button role="tab" aria-controls="js-tab1">View Tab 1</button></li> | ||
<li class="tab-item"><button role="tab" aria-controls="js-tab2">View Tab 2</button></li> | ||
</ul> | ||
</div> | ||
<div class="tab-group"> | ||
<div class="tab-content" id="js-tab1"> | ||
<div class="tab-content" id="js-tab1" role="tabpanel"> | ||
<h2>Tab 1 Content</h2> | ||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> | ||
</div> | ||
<div class="tab-content" id="js-tab2"> | ||
<div class="tab-content" id="js-tab2" role="tabpanel"> | ||
<h2>Tab 2 Content</h2> | ||
@@ -55,3 +55,3 @@ <p>In tincidunt tempor risus gravida tincidunt.</p> | ||
#### PostCSS Imports | ||
`@import '@10up/component-accordion';` | ||
`@import '@10up/component-tabs';` | ||
@@ -97,2 +97,2 @@ #### Standalone | ||
An example implementation can be found in the `index.html` file in the root of this package. | ||
Example implementations can be found in the `demo` directory. |
'use strict'; | ||
/** | ||
* @module @10up/Tabs | ||
* | ||
* @description | ||
* | ||
* An accessible tabs UI component. | ||
* | ||
* [Demo]{@link https://10up.github.io/wp-component-library/component/tabs/index.html} | ||
* | ||
* @param {string} element Element selector for the tabs container. | ||
* @param {Object} options Object of optional callbacks. | ||
*/ | ||
export default class TenUpTabs { | ||
/** | ||
* Constructor function | ||
* @param Object element | ||
* @param Object options | ||
*/ | ||
constructor( element, options = {} ) { | ||
@@ -32,7 +49,10 @@ | ||
for ( let tabArea of this.$tabs ) { | ||
for ( const tabArea of this.$tabs ) { | ||
this.setupTabs( tabArea ); | ||
} | ||
// Do any callbacks, if assigned. | ||
/** | ||
* Called after the tabs are initialized on page load. | ||
* @callback onCreate | ||
*/ | ||
if ( this.settings.onCreate && 'function' === typeof this.settings.onCreate ) { | ||
@@ -45,3 +65,3 @@ this.settings.onCreate.call(); | ||
* Initialize a given tab area | ||
* Configure tab properties and set AIRA attributes. | ||
* Configure tab properties and set ARIA attributes. | ||
* | ||
@@ -53,8 +73,8 @@ * @param {element} $tabArea The tabArea to scope changes | ||
let tabLinks = tabArea.querySelectorAll( '.tab-list li > a' ); | ||
const tabLinks = tabArea.querySelectorAll( '.tab-list [role="tab"]' ); | ||
for ( let tabLink of tabLinks ) { | ||
let tabId = tabLink.getAttribute( 'href' ); | ||
let tabLinkId = `tab-${ tabId.slice( 1 ) }`; | ||
let tabContent = tabArea.querySelector( tabId ); | ||
for ( const tabLink of tabLinks ) { | ||
const tabId = tabLink.getAttribute( 'aria-controls' ); | ||
const tabLinkId = `tab-${ tabId }`; | ||
const tabContent = document.getElementById( tabId ); | ||
@@ -68,3 +88,4 @@ tabLink.setAttribute( 'id', tabLinkId ); | ||
tabLink.addEventListener( 'click', () => { | ||
// Activate the tab on [click] | ||
tabLink.addEventListener( 'click', ( event ) => { | ||
event.preventDefault(); | ||
@@ -76,2 +97,11 @@ | ||
} ); | ||
// Activate the tab on [space] | ||
tabLink.addEventListener( 'keyup', ( event ) => { | ||
if ( 32 === event.which && ! event.target.parentNode.classList.contains( 'is-active' ) ) { | ||
event.preventDefault(); | ||
this.goToTab( event, tabArea ); | ||
} | ||
} ); | ||
} | ||
@@ -83,13 +113,13 @@ | ||
/** | ||
* Sets the first tab as active | ||
* Sets the first tab as active. | ||
* Adds CSS classes and toggle AIRA attributes. | ||
* | ||
* @param {element} $tabArea The tabArea to scope changes | ||
* @param {element} $tabArea The tabArea to scope changes. | ||
* @returns {void} | ||
*/ | ||
setFirstTab( tabArea ) { | ||
// Change state of first tab | ||
let firstTab = tabArea.querySelector( '.tab-list li:first-child a' ); | ||
let firstTabId = firstTab.getAttribute( 'href' ); | ||
let firstTabContent = tabArea.querySelector( firstTabId ); | ||
// Change state of first tab. | ||
const firstTab = tabArea.querySelector( '.tab-list li:first-child [role="tab"]' ); | ||
const firstTabId = firstTab.getAttribute( 'aria-controls' ); | ||
const firstTabContent = document.getElementById( firstTabId ); | ||
@@ -99,3 +129,3 @@ firstTab.setAttribute( 'aria-selected', 'true' ); | ||
// Show first tab content | ||
// Show first tab content. | ||
firstTabContent.setAttribute( 'aria-hidden', 'false' ); | ||
@@ -106,7 +136,7 @@ firstTabContent.classList.add( 'is-active' ); | ||
/** | ||
* Changes the active tab when clicked | ||
* Changes the active tab when clicked. | ||
* Adds CSS classes and toggle AIRA attributes. | ||
* @param {object} $event The tab click event | ||
* @param {element} $tabArea The tabArea to scope changes | ||
* @param {Object} $event The tab click event object. | ||
* @param {element} $tabArea The tabArea to scope changes. | ||
* @returns {void} | ||
@@ -116,7 +146,7 @@ */ | ||
let oldTab = tabArea.querySelector( '.tab-list li.is-active a' ); | ||
const oldTab = tabArea.querySelector( '.tab-list li.is-active [role="tab"]' ); | ||
// Change state of previously selected tab | ||
let oldTabId = oldTab.getAttribute( 'href' ); | ||
let oldTabContent = tabArea.querySelector( oldTabId ); | ||
// Change state of previously selected tab. | ||
const oldTabId = oldTab.getAttribute( 'aria-controls' ); | ||
const oldTabContent = document.getElementById( oldTabId ); | ||
@@ -129,6 +159,6 @@ oldTab.setAttribute( 'aria-selected', 'false' ); | ||
// Change state of newly selected tab | ||
let newTab = event.target; | ||
let newTabId = newTab.getAttribute( 'href' ); | ||
let newTabContent = tabArea.querySelector( newTabId ); | ||
// Change state of newly selected tab. | ||
const newTab = event.target; | ||
const newTabId = newTab.getAttribute( 'aria-controls' ); | ||
const newTabContent = document.getElementById( newTabId ); | ||
@@ -138,3 +168,3 @@ newTab.setAttribute( 'aria-selected', 'true' ); | ||
// Show newly selected content | ||
// Show newly selected content. | ||
newTabContent.setAttribute( 'aria-hidden', 'false' ); | ||
@@ -148,3 +178,6 @@ newTabContent.classList.add( 'is-active' ); | ||
// Custom tab change event | ||
/** | ||
* Called after a tab has been changed. | ||
* @callback onTabChange | ||
*/ | ||
if ( this.settings.onTabChange && 'function' === typeof this.settings.onTabChange ) { | ||
@@ -151,0 +184,0 @@ this.settings.onTabChange.call(); |
@@ -25,4 +25,5 @@ 'use strict'; | ||
enforce: 'pre', | ||
use: { | ||
loader: 'eslint-loader' | ||
loader: 'eslint-loader', | ||
options: { | ||
fix: true | ||
} | ||
@@ -29,0 +30,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
113283
21
403
Updated@babel/polyfill@^7.4.0