CoreFiles by mySites.guru
button.min.js1 lines, 1,074 bytes, from Joomla_4.4.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.4.0-beta2
md5
bb6f87916639ef667acf5ea763a2f8e4
sha1
0b0f8cbed607206fcc5442d7cba300e317c16f79
sha256
2cb651d7a2cad7903213d14962c9db5c3d8782eb0bcef9d3e850ca94617bb5a6
import{E as EventHandler,d as defineJQueryPlugin,B as BaseComponent}from"./dom.min.js?5.3.0";const NAME="button",DATA_KEY="bs.button",EVENT_KEY=`.${DATA_KEY}`,DATA_API_KEY=".data-api",CLASS_NAME_ACTIVE="active",SELECTOR_DATA_TOGGLE='[data-bs-toggle="button"]',EVENT_CLICK_DATA_API=`click${EVENT_KEY}.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 11 releases, Joomla 4.4.0-alpha3 to 5.0.0-beta2. See them all, or every version of this file.