CoreFiles by mySites.guru
button.min.js1 lines, 1,070 bytes, from Joomla_4.0.6-Stable-Full_Package.zip
Raw History Compare with 4.0.5
md5
35065b4980aaabc7448047528b40f2ba
sha1
51f2ac0b42c0fd2b6c7608dab5e8893a964726c2
sha256
bc92c2365bb2795b5a8832aaf4aded1cb540a06c8e29d3c0116568ba0becadb3
import{E as EventHandler,d as defineJQueryPlugin,B as BaseComponent}from"./dom.min.js?5.1.2";const NAME="button",DATA_KEY="bs.button",EVENT_KEY=".bs.button",DATA_API_KEY=".data-api",CLASS_NAME_ACTIVE="active",SELECTOR_DATA_TOGGLE='[data-bs-toggle="button"]',EVENT_CLICK_DATA_API="click.bs.button.data-api";class Button extends BaseComponent{static get NAME(){return NAME}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Button.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}if(EventHandler.on(document,EVENT_CLICK_DATA_API,SELECTOR_DATA_TOGGLE,(t=>{t.preventDefault();const e=t.target.closest(SELECTOR_DATA_TOGGLE);Button.getOrCreateInstance(e).toggle()})),defineJQueryPlugin(Button),window.bootstrap=window.bootstrap||{},window.bootstrap.Button=Button,Joomla&&Joomla.getOptions){const t=Joomla.getOptions("bootstrap.button");t&&t.length&&t.forEach((t=>{Array.from(document.querySelectorAll(t)).map((t=>new window.bootstrap.Button(t)))}))}export{Button as B};

The same content is in 6 releases, Joomla 4.0.6-rc1 to 4.1.0-rc1. See them all, or every version of this file.