Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zendeskgarden/container-focusjail

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zendeskgarden/container-focusjail - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.2.1](https://github.com/zendeskgarden/react-containers/compare/@zendeskgarden/container-focusjail@1.2.0...@zendeskgarden/container-focusjail@1.2.1) (2019-10-16)
**Note:** Version bump only for package @zendeskgarden/container-focusjail
# [1.2.0](https://github.com/zendeskgarden/react-containers/compare/@zendeskgarden/container-focusjail@1.1.5...@zendeskgarden/container-focusjail@1.2.0) (2019-10-15)

@@ -8,0 +16,0 @@

2

dist/index.js

@@ -6,3 +6,3 @@ /*!

*/
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@zendeskgarden/container-utilities")},function(e,t){e.exports=require("tabbable")},function(e,t){e.exports=require("dom-helpers/activeElement")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r(2),u=r(3),i=r.n(u),c=r(4),f=r.n(c);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(r,!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw u}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{containerRef:Object(n.createRef)()},t=e.focusOnMount,r=void 0===t||t,u=e.environment,c=e.focusElem,a=e.containerRef,s=Object(n.useState)(a.current),y=b(s,2),d=y[0],O=y[1];Object(n.useEffect)(function(){a.current!==d&&O(a.current)});var v=Object(n.useCallback)(function(e){c?c(e):e&&e.focus()},[c]),j=function(){if(!d)throw new Error("Accessibility Error: You must apply the ref prop to your containing element.")},m=function(){var e=u||document,t=f()(e),r=d;return r.contains(t)?t:r},g=function(){var e=i()(d);return{firstItem:e[0]||m(),lastItem:e[e.length-1]||m()}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onKeyDown,r=p(e,["onKeyDown"]);return l({onKeyDown:Object(o.composeEventHandlers)(t,function(e){if(e.keyCode===o.KEY_CODES.TAB){j();var t=g();!e.shiftKey||e.target!==t.firstItem&&e.target!==d||(v(t.lastItem),e.preventDefault()),e.shiftKey||e.target!==t.lastItem||(v(t.firstItem),e.preventDefault())}}),"data-garden-container-id":"focusjail","data-garden-container-version":"1.2.0"},r)};return Object(n.useEffect)(function(){r&&v(d)},[r,v,d]),{getContainerProps:h,focusElement:v}},d=r(0),O=r.n(d);function v(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var j=function(e){var t=e.children,r=e.render,n=void 0===r?t:r,o=v(e,["children","render"]);return n(y(o))};j.propTypes={children:O.a.func,render:O.a.func,focusOnMount:O.a.bool,environment:O.a.object,containerRef:O.a.object.isRequired,focusElem:O.a.func},r.d(t,"useFocusJail",function(){return y}),r.d(t,"FocusJailContainer",function(){return j})}]));
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){e.exports=require("prop-types")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("@zendeskgarden/container-utilities")},function(e,t){e.exports=require("tabbable")},function(e,t){e.exports=require("dom-helpers/activeElement")},function(e,t,r){"use strict";r.r(t);var n=r(1),o=r(2),u=r(3),i=r.n(u),c=r(4),f=r.n(c);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(r,!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,u=void 0;try{for(var i,c=e[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,u=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw u}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{containerRef:Object(n.createRef)()},t=e.focusOnMount,r=void 0===t||t,u=e.environment,c=e.focusElem,a=e.containerRef,s=Object(n.useState)(a.current),y=b(s,2),d=y[0],O=y[1];Object(n.useEffect)((function(){a.current!==d&&O(a.current)}));var v=Object(n.useCallback)((function(e){c?c(e):e&&e.focus()}),[c]),m=function(){if(!d)throw new Error("Accessibility Error: You must apply the ref prop to your containing element.")},g=function(){var e=u||document,t=f()(e),r=d;return r.contains(t)?t:r},j=function(){var e=i()(d);return{firstItem:e[0]||g(),lastItem:e[e.length-1]||g()}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onKeyDown,r=p(e,["onKeyDown"]);return l({onKeyDown:Object(o.composeEventHandlers)(t,(function(e){if(e.keyCode===o.KEY_CODES.TAB){m();var t=j();!e.shiftKey||e.target!==t.firstItem&&e.target!==d||(v(t.lastItem),e.preventDefault()),e.shiftKey||e.target!==t.lastItem||(v(t.firstItem),e.preventDefault())}})),"data-garden-container-id":"focusjail","data-garden-container-version":"1.2.1"},r)};return Object(n.useEffect)((function(){r&&v(d)}),[r,v,d]),{getContainerProps:h,focusElement:v}},d=r(0),O=r.n(d);function v(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(n=0;n<u.length;n++)r=u[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var m=function(e){var t=e.children,r=e.render,n=void 0===r?t:r,o=v(e,["children","render"]);return n(y(o))};m.propTypes={children:O.a.func,render:O.a.func,focusOnMount:O.a.bool,environment:O.a.any,containerRef:O.a.any.isRequired,focusElem:O.a.func},r.d(t,"useFocusJail",(function(){return y})),r.d(t,"FocusJailContainer",(function(){return m}))}]));
//# sourceMappingURL=index.js.map

@@ -11,3 +11,3 @@ {

},
"version": "1.2.0",
"version": "1.2.1",
"main": "./dist/index.js",

@@ -47,3 +47,3 @@ "files": [

"zendeskgarden:src": "src/index.ts",
"gitHead": "d9bdf81fc2eca9a598fffeefef3f8d63e389df52"
"gitHead": "bbfc02e89874adeae906696192421f6582565902"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc