CoreFiles by mySites.guru
joomla-tab-es5.min.js1 lines, 8,350 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
7f813434ad660706272eaf4da79c254b
sha1
911c3bca17ccacb0f1f2e91d801b4a2300f0ed99
sha256
25e914e47eefb6a89cda2cbe30d709c00703a3586e9fde5d694947e4eecb1ffc
!function t(e,r,o){function i(n,c){if(!r[n]){if(!e[n]){var l="function"==typeof require&&require;if(!c&&l)return l(n,!0);if(a)return a(n,!0);var s=new Error("Cannot find module '"+n+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r||t)},u,u.exports,t,e,r,o)}return r[n].exports}for(var a="function"==typeof require&&require,n=0;n<o.length;n++)i(o[n]);return i}({1:[function(t,e,r){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=(void 0===e?"undefined":n(e))&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":n(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var n="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},c=function(){function t(t,e){for(var r,o=0;o<e.length;o++)(r=e[o]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}return function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),e}}();!function(){if(!document.getElementById("joomla-tab-stylesheet")){var t=document.createElement("style");t.id="joomla-tab-stylesheet",t.innerText='joomla-tab{display:flex;flex-direction:column}joomla-tab>ul{display:flex;background-color:#f5f5f5;border-color:#ccc #ccc currentcolor;border-image:none;border-radius:.25rem .25rem 0 0;border-style:solid solid none;border-width:1px 1px 0;box-shadow:0 1px #fff inset,0 2px 3px -3px rgba(0,0,0,.15),0 -4px 0 rgba(0,0,0,.05) inset,0 0 3px rgba(0,0,0,.04);margin:0;padding:0;list-style:outside none none;overflow-x:auto;overflow-y:hidden;white-space:nowrap}joomla-tab>ul a{display:block;color:#0d1321;padding:.75em 1em;position:relative;box-shadow:1px 0 0 rgba(0,0,0,.05);text-decoration:none}joomla-tab>ul a[active]{background-color:rgba(0,0,0,.03);background-image:linear-gradient(to bottom,transparent,rgba(0,0,0,.05) 100%);border-left:0 none;border-right:0 none;border-top-left-radius:0;border-top-right-radius:0;box-shadow:2px 0 1px -1px rgba(0,0,0,.08) inset,-2px 0 1px -1px rgba(0,0,0,.08) inset,0 1px 0 rgba(0,0,0,.02) inset}joomla-tab>ul a[active]:after{background-color:#006898;bottom:-1px;content:"";height:5px;left:0;opacity:.8;position:absolute;right:0}joomla-tab>section{display:none;background-color:#fefefe;border:1px solid #ccc;border-radius:0 0 .25rem .25rem;box-shadow:0 0 3px rgba(0,0,0,.04);padding:15px}joomla-tab>section[active]{display:block}joomla-tab[orientation=vertical]{flex-direction:row;align-items:flex-start}joomla-tab[orientation=vertical]>ul{flex-direction:column;min-width:30%;height:auto;border:1px solid #ccc;border-radius:.25rem;box-shadow:none;overflow:hidden}joomla-tab[orientation=vertical] li:last-of-type a{border-bottom:0}joomla-tab[orientation=vertical] a{display:block;color:#0d1321;padding:.75em 1em;position:relative;border-bottom:1px solid #ddd;box-shadow:none;text-decoration:none}joomla-tab[orientation=vertical] a[active]{border-left:0 none;border-right:0 none;background-color:#fff;background-image:none;box-shadow:none}joomla-tab[orientation=vertical] a[active]:after{left:-1px;width:5px;height:auto;top:0;bottom:0}joomla-tab[orientation=vertical]>section{border:0 none;box-shadow:none;padding:0 15px}',document.head.appendChild(t)}}();var l=function(t){function e(){o(this,e);var t=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.hasActive=!1,t.currentActive="",t}return a(e,HTMLElement),c(e,[{key:"recall",get:function(){return this.getAttribute("recall")}},{key:"orientation",get:function(){return this.getAttribute("orientation")},set:function(t){this.setAttribute("orientation",t)}}],[{key:"observedAttributes",get:function(){return["recall","orientation"]}}]),c(e,[{key:"connectedCallback",value:function(){var t=this;(!this.orientation||this.orientation&&-1===["horizontal","vertical"].indexOf(this.orientation))&&(this.orientation="horizontal");var e=[].slice.call(this.querySelectorAll("section"));if(e){for(var r,o=[],i=0,a=e.length;i<a;++i)(r=e[i]).parentNode===this&&o.push(r);this.createNavigation(tabsEl),tabsEl.forEach(function(e){if(e.setAttribute("role","tabpanel"),e.hasAttribute("active"))return t.hasActive=!0,t.currentActive=e.id,t.querySelector("#tab-"+e.id).setAttribute("aria-selected","true"),t.querySelector("#tab-"+e.id).setAttribute("active",""),void t.querySelector("#tab-"+e.id).setAttribute("tabindex","0")}),this.hasActive||(tabsEl[0].setAttribute("active",""),this.hasActive=!0,this.currentActive=tabsEl[0].id,this.querySelector("#tab-"+tabsEl[0].id).setAttribute("aria-selected","true"),this.querySelector("#tab-"+tabsEl[0].id).setAttribute("tabindex","0"),this.querySelector("#tab-"+tabsEl[0].id).setAttribute("active","")),this.keyListeners(tabsEl),this.hasAttribute("recall")&&this.restoreState()}}},{key:"disconnectedCallback",value:function(){var t=this.querySelector("ul");[].slice.call(t.querySelectorAll("a")).forEach(function(t){t.removeEventListener("click",this)}),t.removeEventListener("keydown",this)}},{key:"createNavigation",value:function(t){var e=this,r=document.createElement("ul");r.setAttribute("role","tablist");var o=function(t){t.preventDefault(),e.hasActive&&e.hideCurrent();var r=e.currentActive;e.dispatchCustomEvent("joomla.tab.show",t.target,e.querySelector("#tab-"+r)),t.target.setAttribute("active",""),t.target.setAttribute("aria-selected","true"),t.target.setAttribute("tabindex","0"),e.querySelector(t.target.hash).setAttribute("active",""),e.querySelector(t.target.hash).removeAttribute("aria-hidden"),e.currentActive=t.target.hash.substring(1),e.dispatchCustomEvent("joomla.tab.shown",t.target,e.querySelector("#tab-"+r))};t.forEach(function(t){if(t.id){var e=t.hasAttribute("active"),i=document.createElement("li"),a=document.createElement("a");i.setAttribute("role","presentation"),a.setAttribute("role","tab"),a.setAttribute("aria-controls",t.id),a.setAttribute("aria-selected",e?"true":"false"),a.setAttribute("tabindex",e?"0":"-1"),a.setAttribute("href","#"+t.id),a.setAttribute("id","tab-"+t.id),a.innerHTML=t.getAttribute("name"),e&&a.setAttribute("active",""),a.addEventListener("click",o),i.append(a),r.append(i),t.setAttribute("aria-labelledby","tab-"+t.id),e||t.setAttribute("aria-hidden","true")}}),this.insertAdjacentElement("afterbegin",r)}},{key:"hideCurrent",value:function(){if(this.currentActive){var t=this.querySelector('a[aria-controls="'+this.currentActive+'"]');this.dispatchCustomEvent("joomla.tab.hide",t,this.querySelector("#tab-"+this.currentActive)),t.removeAttribute("active"),t.setAttribute("tabindex","-1"),this.querySelector("#"+this.currentActive).removeAttribute("active"),this.querySelector("#"+this.currentActive).setAttribute("aria-hidden","true"),t.removeAttribute("aria-selected"),this.dispatchCustomEvent("joomla.tab.hidden",t,this.querySelector("#tab-"+this.currentActive))}}},{key:"showTab",value:function(t){querySelector("#tab-"+t.id).click()}},{key:"show",value:function(t){t.click()}},{key:"keyListeners",value:function(){var t=this;this.querySelector("ul").addEventListener("keydown",function(e){var r=t.querySelector("#tab-"+t.currentActive),o=[].slice.call(t.querySelector("ul").querySelectorAll("a")),i=r.parentNode.previousElementSibling||o[o.length-1],a=r.parentNode.nextElementSibling||o[0];if(!e.metaKey&&!e.altKey)switch(e.keyCode){case 37:case 38:"li"===i.tagName.toLowerCase()?(i.querySelector("a").click(),i.querySelector("a").focus()):(i.click(),i.focus()),e.preventDefault();break;case 39:case 40:"a"===a.tagName.toLowerCase()?(a.click(),a.focus()):(a.querySelector("a").click(),a.querySelector("a").focus()),e.preventDefault()}})}},{key:"restoreState",value:function(){}},{key:"dispatchCustomEvent",value:function(t,e,r){var o=new CustomEvent(t);o.relatedTarget=r,e.dispatchEvent(o),e.removeEventListener(t,e)}}]),e}();customElements.define("joomla-tab",l)},{}]},{},[1]);

No other release has this exact content. See every version of this file.