focus-trap 6.6.0 → 6.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 24063d7: Update tabbable to v5.2.1 to get bug fix for disabled fieldsets.
8
+
3
9
  ## 6.6.0
4
10
 
5
11
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.0
2
+ * focus-trap 6.6.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
  import { tabbable, isFocusable } from 'tabbable';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.0
2
+ * focus-trap 6.6.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
  import{tabbable as e,isFocusable as t}from"tabbable";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r,o=(r=[],{activateTrap:function(e){if(r.length>0){var t=r[r.length-1];t!==e&&t.pause()}var n=r.indexOf(e);-1===n||r.splice(n,1),r.push(e)},deactivateTrap:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),r.length>0&&r[r.length-1].unpause()}}),i=function(e){return setTimeout(e,0)},c=function(e,t){var n=-1;return e.every((function(e,a){return!t(e)||(n=a,!1)})),n},u=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,n):e},s=function(r,s){var l,f=document,b=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},s),v={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},p=function(e,t,n){return e&&void 0!==e[t]?e[t]:b[n||t]},d=function(e){return v.containers.some((function(t){return t.contains(e)}))},m=function(e){var t=b[e];if(!t)return null;var n=t;if("string"==typeof t&&!(n=f.querySelector(t)))throw new Error("`".concat(e,"` refers to no known node"));if("function"==typeof t&&!(n=t()))throw new Error("`".concat(e,"` did not return a node"));return n},h=function(){var e;if(!1===p({},"initialFocus"))return!1;if(null!==m("initialFocus"))e=m("initialFocus");else if(d(f.activeElement))e=f.activeElement;else{var t=v.tabbableGroups[0];e=t&&t.firstTabbableNode||m("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},y=function(){if(v.tabbableGroups=v.containers.map((function(t){var n=e(t);if(n.length>0)return{container:t,firstTabbableNode:n[0],lastTabbableNode:n[n.length-1]}})).filter((function(e){return!!e})),v.tabbableGroups.length<=0&&!m("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},g=function e(t){!1!==t&&t!==f.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!b.preventScroll}),v.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(h()))},F=function(e){var t=m("setReturnFocus");return t||e},O=function(e){d(e.target)||(u(b.clickOutsideDeactivates,e)?l.deactivate({returnFocus:b.returnFocusOnDeactivate&&!t(e.target)}):u(b.allowOutsideClick,e)||e.preventDefault())},w=function(e){var t=d(e.target);t||e.target instanceof Document?t&&(v.mostRecentlyFocusedNode=e.target):(e.stopImmediatePropagation(),g(v.mostRecentlyFocusedNode||h()))},E=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==u(b.escapeDeactivates))return e.preventDefault(),void l.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){y();var t=null;if(v.tabbableGroups.length>0){var n=c(v.tabbableGroups,(function(t){return t.container.contains(e.target)}));if(n<0)t=e.shiftKey?v.tabbableGroups[v.tabbableGroups.length-1].lastTabbableNode:v.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var a=c(v.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e.target===n}));if(a<0&&v.tabbableGroups[n].container===e.target&&(a=n),a>=0){var r=0===a?v.tabbableGroups.length-1:a-1;t=v.tabbableGroups[r].lastTabbableNode}}else{var o=c(v.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e.target===n}));if(o<0&&v.tabbableGroups[n].container===e.target&&(o=n),o>=0){var i=o===v.tabbableGroups.length-1?0:o+1;t=v.tabbableGroups[i].firstTabbableNode}}}else t=m("fallbackFocus");t&&(e.preventDefault(),g(t))}(e)},T=function(e){u(b.clickOutsideDeactivates,e)||d(e.target)||u(b.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},k=function(){if(v.active)return o.activateTrap(l),v.delayInitialFocusTimer=b.delayInitialFocus?i((function(){g(h())})):g(h()),f.addEventListener("focusin",w,!0),f.addEventListener("mousedown",O,{capture:!0,passive:!1}),f.addEventListener("touchstart",O,{capture:!0,passive:!1}),f.addEventListener("click",T,{capture:!0,passive:!1}),f.addEventListener("keydown",E,{capture:!0,passive:!1}),l},D=function(){if(v.active)return f.removeEventListener("focusin",w,!0),f.removeEventListener("mousedown",O,!0),f.removeEventListener("touchstart",O,!0),f.removeEventListener("click",T,!0),f.removeEventListener("keydown",E,!0),l};return(l={activate:function(e){if(v.active)return this;var t=p(e,"onActivate"),n=p(e,"onPostActivate"),a=p(e,"checkCanFocusTrap");a||y(),v.active=!0,v.paused=!1,v.nodeFocusedBeforeActivation=f.activeElement,t&&t();var r=function(){a&&y(),k(),n&&n()};return a?(a(v.containers.concat()).then(r,r),this):(r(),this)},deactivate:function(e){if(!v.active)return this;clearTimeout(v.delayInitialFocusTimer),v.delayInitialFocusTimer=void 0,D(),v.active=!1,v.paused=!1,o.deactivateTrap(l);var t=p(e,"onDeactivate"),n=p(e,"onPostDeactivate"),a=p(e,"checkCanReturnFocus");t&&t();var r=p(e,"returnFocus","returnFocusOnDeactivate"),c=function(){i((function(){r&&g(F(v.nodeFocusedBeforeActivation)),n&&n()}))};return r&&a?(a(F(v.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return v.paused||!v.active||(v.paused=!0,D()),this},unpause:function(){return v.paused&&v.active?(v.paused=!1,y(),k(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return v.containers=t.map((function(e){return"string"==typeof e?f.querySelector(e):e})),v.active&&y(),this}}).updateContainerElements(r),l};export{s as createFocusTrap};
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.0
2
+ * focus-trap 6.6.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.0
2
+ * focus-trap 6.6.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tabbable");function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a,r=(a=[],{activateTrap:function(e){if(a.length>0){var t=a[a.length-1];t!==e&&t.pause()}var n=a.indexOf(e);-1===n||a.splice(n,1),a.push(e)},deactivateTrap:function(e){var t=a.indexOf(e);-1!==t&&a.splice(t,1),a.length>0&&a[a.length-1].unpause()}}),o=function(e){return setTimeout(e,0)},i=function(e,t){var n=-1;return e.every((function(e,a){return!t(e)||(n=a,!1)})),n},c=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,n):e};exports.createFocusTrap=function(a,u){var s,l=document,f=function(e){for(var a=1;a<arguments.length;a++){var r=null!=arguments[a]?arguments[a]:{};a%2?t(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},u),b={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},v=function(e,t,n){return e&&void 0!==e[t]?e[t]:f[n||t]},p=function(e){return b.containers.some((function(t){return t.contains(e)}))},d=function(e){var t=f[e];if(!t)return null;var n=t;if("string"==typeof t&&!(n=l.querySelector(t)))throw new Error("`".concat(e,"` refers to no known node"));if("function"==typeof t&&!(n=t()))throw new Error("`".concat(e,"` did not return a node"));return n},h=function(){var e;if(!1===v({},"initialFocus"))return!1;if(null!==d("initialFocus"))e=d("initialFocus");else if(p(l.activeElement))e=l.activeElement;else{var t=b.tabbableGroups[0];e=t&&t.firstTabbableNode||d("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},y=function(){if(b.tabbableGroups=b.containers.map((function(t){var n=e.tabbable(t);if(n.length>0)return{container:t,firstTabbableNode:n[0],lastTabbableNode:n[n.length-1]}})).filter((function(e){return!!e})),b.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},m=function e(t){!1!==t&&t!==l.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),b.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(h()))},g=function(e){var t=d("setReturnFocus");return t||e},F=function(t){p(t.target)||(c(f.clickOutsideDeactivates,t)?s.deactivate({returnFocus:f.returnFocusOnDeactivate&&!e.isFocusable(t.target)}):c(f.allowOutsideClick,t)||t.preventDefault())},O=function(e){var t=p(e.target);t||e.target instanceof Document?t&&(b.mostRecentlyFocusedNode=e.target):(e.stopImmediatePropagation(),m(b.mostRecentlyFocusedNode||h()))},w=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==c(f.escapeDeactivates))return e.preventDefault(),void s.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){y();var t=null;if(b.tabbableGroups.length>0){var n=i(b.tabbableGroups,(function(t){return t.container.contains(e.target)}));if(n<0)t=e.shiftKey?b.tabbableGroups[b.tabbableGroups.length-1].lastTabbableNode:b.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var a=i(b.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e.target===n}));if(a<0&&b.tabbableGroups[n].container===e.target&&(a=n),a>=0){var r=0===a?b.tabbableGroups.length-1:a-1;t=b.tabbableGroups[r].lastTabbableNode}}else{var o=i(b.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e.target===n}));if(o<0&&b.tabbableGroups[n].container===e.target&&(o=n),o>=0){var c=o===b.tabbableGroups.length-1?0:o+1;t=b.tabbableGroups[c].firstTabbableNode}}}else t=d("fallbackFocus");t&&(e.preventDefault(),m(t))}(e)},E=function(e){c(f.clickOutsideDeactivates,e)||p(e.target)||c(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},T=function(){if(b.active)return r.activateTrap(s),b.delayInitialFocusTimer=f.delayInitialFocus?o((function(){m(h())})):m(h()),l.addEventListener("focusin",O,!0),l.addEventListener("mousedown",F,{capture:!0,passive:!1}),l.addEventListener("touchstart",F,{capture:!0,passive:!1}),l.addEventListener("click",E,{capture:!0,passive:!1}),l.addEventListener("keydown",w,{capture:!0,passive:!1}),s},k=function(){if(b.active)return l.removeEventListener("focusin",O,!0),l.removeEventListener("mousedown",F,!0),l.removeEventListener("touchstart",F,!0),l.removeEventListener("click",E,!0),l.removeEventListener("keydown",w,!0),s};return(s={activate:function(e){if(b.active)return this;var t=v(e,"onActivate"),n=v(e,"onPostActivate"),a=v(e,"checkCanFocusTrap");a||y(),b.active=!0,b.paused=!1,b.nodeFocusedBeforeActivation=l.activeElement,t&&t();var r=function(){a&&y(),T(),n&&n()};return a?(a(b.containers.concat()).then(r,r),this):(r(),this)},deactivate:function(e){if(!b.active)return this;clearTimeout(b.delayInitialFocusTimer),b.delayInitialFocusTimer=void 0,k(),b.active=!1,b.paused=!1,r.deactivateTrap(s);var t=v(e,"onDeactivate"),n=v(e,"onPostDeactivate"),a=v(e,"checkCanReturnFocus");t&&t();var i=v(e,"returnFocus","returnFocusOnDeactivate"),c=function(){o((function(){i&&m(g(b.nodeFocusedBeforeActivation)),n&&n()}))};return i&&a?(a(g(b.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return b.paused||!b.active||(b.paused=!0,k()),this},unpause:function(){return b.paused&&b.active?(b.paused=!1,y(),T(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return b.containers=t.map((function(e){return"string"==typeof e?l.querySelector(e):e})),b.active&&y(),this}}).updateContainerElements(a),s};
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.0
2
+ * focus-trap 6.6.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
  (function (global, factory) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * focus-trap 6.6.0
2
+ * focus-trap 6.6.1
3
3
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
4
  */
5
5
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define(["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.focusTrap,a=e.focusTrap={};t(a,e.tabbable),a.noConflict=function(){return e.focusTrap=n,a}}())}(this,(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r,o=(r=[],{activateTrap:function(e){if(r.length>0){var t=r[r.length-1];t!==e&&t.pause()}var n=r.indexOf(e);-1===n||r.splice(n,1),r.push(e)},deactivateTrap:function(e){var t=r.indexOf(e);-1!==t&&r.splice(t,1),r.length>0&&r[r.length-1].unpause()}}),i=function(e){return setTimeout(e,0)},c=function(e,t){var n=-1;return e.every((function(e,a){return!t(e)||(n=a,!1)})),n},u=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,n):e};e.createFocusTrap=function(e,r){var s,l=document,f=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},r),b={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},v=function(e,t,n){return e&&void 0!==e[t]?e[t]:f[n||t]},p=function(e){return b.containers.some((function(t){return t.contains(e)}))},d=function(e){var t=f[e];if(!t)return null;var n=t;if("string"==typeof t&&!(n=l.querySelector(t)))throw new Error("`".concat(e,"` refers to no known node"));if("function"==typeof t&&!(n=t()))throw new Error("`".concat(e,"` did not return a node"));return n},y=function(){var e;if(!1===v({},"initialFocus"))return!1;if(null!==d("initialFocus"))e=d("initialFocus");else if(p(l.activeElement))e=l.activeElement;else{var t=b.tabbableGroups[0];e=t&&t.firstTabbableNode||d("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},h=function(){if(b.tabbableGroups=b.containers.map((function(e){var n=t.tabbable(e);if(n.length>0)return{container:e,firstTabbableNode:n[0],lastTabbableNode:n[n.length-1]}})).filter((function(e){return!!e})),b.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},m=function e(t){!1!==t&&t!==l.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),b.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(y()))},g=function(e){var t=d("setReturnFocus");return t||e},F=function(e){p(e.target)||(u(f.clickOutsideDeactivates,e)?s.deactivate({returnFocus:f.returnFocusOnDeactivate&&!t.isFocusable(e.target)}):u(f.allowOutsideClick,e)||e.preventDefault())},O=function(e){var t=p(e.target);t||e.target instanceof Document?t&&(b.mostRecentlyFocusedNode=e.target):(e.stopImmediatePropagation(),m(b.mostRecentlyFocusedNode||y()))},T=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==u(f.escapeDeactivates))return e.preventDefault(),void s.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){h();var t=null;if(b.tabbableGroups.length>0){var n=c(b.tabbableGroups,(function(t){return t.container.contains(e.target)}));if(n<0)t=e.shiftKey?b.tabbableGroups[b.tabbableGroups.length-1].lastTabbableNode:b.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var a=c(b.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e.target===n}));if(a<0&&b.tabbableGroups[n].container===e.target&&(a=n),a>=0){var r=0===a?b.tabbableGroups.length-1:a-1;t=b.tabbableGroups[r].lastTabbableNode}}else{var o=c(b.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e.target===n}));if(o<0&&b.tabbableGroups[n].container===e.target&&(o=n),o>=0){var i=o===b.tabbableGroups.length-1?0:o+1;t=b.tabbableGroups[i].firstTabbableNode}}}else t=d("fallbackFocus");t&&(e.preventDefault(),m(t))}(e)},w=function(e){u(f.clickOutsideDeactivates,e)||p(e.target)||u(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},E=function(){if(b.active)return o.activateTrap(s),b.delayInitialFocusTimer=f.delayInitialFocus?i((function(){m(y())})):m(y()),l.addEventListener("focusin",O,!0),l.addEventListener("mousedown",F,{capture:!0,passive:!1}),l.addEventListener("touchstart",F,{capture:!0,passive:!1}),l.addEventListener("click",w,{capture:!0,passive:!1}),l.addEventListener("keydown",T,{capture:!0,passive:!1}),s},k=function(){if(b.active)return l.removeEventListener("focusin",O,!0),l.removeEventListener("mousedown",F,!0),l.removeEventListener("touchstart",F,!0),l.removeEventListener("click",w,!0),l.removeEventListener("keydown",T,!0),s};return(s={activate:function(e){if(b.active)return this;var t=v(e,"onActivate"),n=v(e,"onPostActivate"),a=v(e,"checkCanFocusTrap");a||h(),b.active=!0,b.paused=!1,b.nodeFocusedBeforeActivation=l.activeElement,t&&t();var r=function(){a&&h(),E(),n&&n()};return a?(a(b.containers.concat()).then(r,r),this):(r(),this)},deactivate:function(e){if(!b.active)return this;clearTimeout(b.delayInitialFocusTimer),b.delayInitialFocusTimer=void 0,k(),b.active=!1,b.paused=!1,o.deactivateTrap(s);var t=v(e,"onDeactivate"),n=v(e,"onPostDeactivate"),a=v(e,"checkCanReturnFocus");t&&t();var r=v(e,"returnFocus","returnFocusOnDeactivate"),c=function(){i((function(){r&&m(g(b.nodeFocusedBeforeActivation)),n&&n()}))};return r&&a?(a(g(b.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return b.paused||!b.active||(b.paused=!0,k()),this},unpause:function(){return b.paused&&b.active?(b.paused=!1,h(),E(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return b.containers=t.map((function(e){return"string"==typeof e?l.querySelector(e):e})),b.active&&h(),this}}).updateContainerElements(e),s},Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "focus-trap",
3
- "version": "6.6.0",
3
+ "version": "6.6.1",
4
4
  "description": "Trap focus within a DOM node.",
5
5
  "main": "dist/focus-trap.js",
6
6
  "module": "dist/focus-trap.esm.js",
@@ -60,18 +60,18 @@
60
60
  },
61
61
  "homepage": "https://github.com/focus-trap/focus-trap#readme",
62
62
  "dependencies": {
63
- "tabbable": "^5.2.0"
63
+ "tabbable": "^5.2.1"
64
64
  },
65
65
  "devDependencies": {
66
- "@babel/cli": "^7.14.5",
67
- "@babel/core": "^7.14.6",
68
- "@babel/preset-env": "^7.14.7",
66
+ "@babel/cli": "^7.14.8",
67
+ "@babel/core": "^7.15.0",
68
+ "@babel/preset-env": "^7.15.0",
69
69
  "@changesets/cli": "^2.16.0",
70
70
  "@rollup/plugin-babel": "^5.3.0",
71
- "@rollup/plugin-commonjs": "^19.0.0",
72
- "@rollup/plugin-node-resolve": "^13.0.0",
73
- "@testing-library/cypress": "^7.0.6",
74
- "@types/jquery": "^3.5.5",
71
+ "@rollup/plugin-commonjs": "^20.0.0",
72
+ "@rollup/plugin-node-resolve": "^13.0.4",
73
+ "@testing-library/cypress": "^8.0.0",
74
+ "@types/jquery": "^3.5.6",
75
75
  "all-contributors-cli": "^6.20.0",
76
76
  "babel-eslint": "^10.1.0",
77
77
  "babel-loader": "^8.2.2",
@@ -79,17 +79,17 @@
79
79
  "browserify": "^17.0.0",
80
80
  "budo": "^11.6.4",
81
81
  "cross-env": "^7.0.3",
82
- "cypress": "^7.6.0",
82
+ "cypress": "^8.2.0",
83
83
  "cypress-plugin-tab": "^1.0.5",
84
- "eslint": "^7.29.0",
84
+ "eslint": "^7.32.0",
85
85
  "eslint-config-prettier": "^8.3.0",
86
86
  "eslint-plugin-cypress": "^2.11.3",
87
87
  "onchange": "^7.1.0",
88
88
  "prettier": "^2.3.2",
89
- "rollup": "^2.52.4",
89
+ "rollup": "^2.56.2",
90
90
  "rollup-plugin-sourcemaps": "^0.6.3",
91
91
  "rollup-plugin-terser": "^7.0.1",
92
- "start-server-and-test": "^1.12.5",
93
- "typescript": "^4.3.4"
92
+ "start-server-and-test": "^1.13.1",
93
+ "typescript": "^4.3.5"
94
94
  }
95
95
  }