From 7c72dd5fd94d1342bf76319896b3efb029836b2c Mon Sep 17 00:00:00 2001 From: Kitty Giraudel Date: Sat, 6 Feb 2021 12:25:34 +0100 Subject: [PATCH] Build version 5.4.3 --- a11y-dialog.min.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/a11y-dialog.min.js b/a11y-dialog.min.js index 38f9f889..a4ff8283 100644 --- a/a11y-dialog.min.js +++ b/a11y-dialog.min.js @@ -1,2 +1,2 @@ -/*! a11y-dialog 5.4.2 — © Edenspiekermann */ +/*! a11y-dialog 5.4.3 — © Edenspiekermann */ !function(t){"use strict";var i,e=['a[href]:not([tabindex^="-"]):not([inert])','area[href]:not([tabindex^="-"]):not([inert])',"input:not([disabled]):not([inert])","select:not([disabled]):not([inert])","textarea:not([disabled]):not([inert])","button:not([disabled]):not([inert])",'iframe:not([tabindex^="-"]):not([inert])','audio:not([tabindex^="-"]):not([inert])','video:not([tabindex^="-"]):not([inert])','[contenteditable]:not([tabindex^="-"]):not([inert])','[tabindex]:not([tabindex^="-"]):not([inert])'];function n(t,i){this._show=this.show.bind(this),this._hide=this.hide.bind(this),this._maintainFocus=this._maintainFocus.bind(this),this._bindKeypress=this._bindKeypress.bind(this),this.container=t,this.dialog=t.querySelector('dialog, [role="dialog"], [role="alertdialog"]'),this.role=this.dialog.getAttribute("role")||"dialog",this.useDialog="show"in document.createElement("dialog")&&"DIALOG"===this.dialog.nodeName,this._listeners={},this.create(i)}function o(t){return Array.prototype.slice.call(t)}function s(t,i){return o((i||document).querySelectorAll(t))}function r(t){var i=a(t),i=t.querySelector("[autofocus]")||i[0];i&&i.focus()}function a(t){return s(e.join(","),t).filter(function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)})}n.prototype.create=function(t){var i;return this._targets=this._targets||function(t){if(NodeList.prototype.isPrototypeOf(t))return o(t);if(Element.prototype.isPrototypeOf(t))return[t];if("string"==typeof t)return s(t)}(t)||(i=this.container,(t=o(i.parentNode.childNodes).filter(function(t){return 1===t.nodeType})).splice(t.indexOf(i),1),t),this.shown=this.dialog.hasAttribute("open"),this.dialog.setAttribute("role",this.role),this.useDialog?(this.container.setAttribute("data-a11y-dialog-native",""),this.container.removeAttribute("aria-hidden")):this.shown?this.container.removeAttribute("aria-hidden"):this.container.setAttribute("aria-hidden",!0),this._openers=s('[data-a11y-dialog-show="'+this.container.id+'"]'),this._openers.forEach(function(t){t.addEventListener("click",this._show)}.bind(this)),this._closers=s("[data-a11y-dialog-hide]",this.container).concat(s('[data-a11y-dialog-hide="'+this.container.id+'"]')),this._closers.forEach(function(t){t.addEventListener("click",this._hide)}.bind(this)),this._fire("create"),this},n.prototype.show=function(t){return this.shown||(this.shown=!0,i=document.activeElement,this.useDialog?this.dialog.showModal(t instanceof Event?void 0:t):(this.dialog.setAttribute("open",""),this.container.removeAttribute("aria-hidden"),this._targets.forEach(function(t){t.hasAttribute("aria-hidden")&&t.setAttribute("data-a11y-dialog-original-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true")})),r(this.dialog),document.body.addEventListener("focus",this._maintainFocus,!0),document.addEventListener("keydown",this._bindKeypress),this._fire("show",t)),this},n.prototype.hide=function(t){return this.shown&&(this.shown=!1,this.useDialog?this.dialog.close(t instanceof Event?void 0:t):(this.dialog.removeAttribute("open"),this.container.setAttribute("aria-hidden","true"),this._targets.forEach(function(t){t.hasAttribute("data-a11y-dialog-original-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-a11y-dialog-original-aria-hidden")),t.removeAttribute("data-a11y-dialog-original-aria-hidden")):t.removeAttribute("aria-hidden")})),i&&i.focus&&i.focus(),document.body.removeEventListener("focus",this._maintainFocus,!0),document.removeEventListener("keydown",this._bindKeypress),this._fire("hide",t)),this},n.prototype.destroy=function(){return this.hide(),this._openers.forEach(function(t){t.removeEventListener("click",this._show)}.bind(this)),this._closers.forEach(function(t){t.removeEventListener("click",this._hide)}.bind(this)),this._fire("destroy"),this._listeners={},this},n.prototype.on=function(t,i){return void 0===this._listeners[t]&&(this._listeners[t]=[]),this._listeners[t].push(i),this},n.prototype.off=function(t,i){i=this._listeners[t].indexOf(i);return-1