boundless-dialog
Advanced tools
Comparing version 1.0.0-beta.5 to 1.0.0-beta.6
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var r={};return o.m=e,o.c=r,o.i=function(e){return e},o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},o.p="",o(o.s=7)}([function(e,o,r){"use strict";o.a=function(e){return"function"==typeof e}},function(e,o,r){"use strict";function t(){}o.a=t},function(e,o,r){"use strict";function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(r,t){return o.indexOf(t)===-1&&(r[t]=e[t]),r},{})}o.a=t},function(e,o,r){"use strict";function t(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}o.a=t},function(e,o){e.exports=require("boundless-portal")},function(e,o){e.exports=require("classnames")},function(e,o){e.exports=require("react")},function(e,o,r){"use strict";function t(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function n(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function s(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}Object.defineProperty(o,"__esModule",{value:!0});var i=r(6),a=r.n(i),l=r(5),p=r.n(l),u=r(4),c=r.n(u),d=r(0),f=r(1),h=r(2),y=r(3),O=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},P=function(){function e(e,o){for(var r=0;r<o.length;r++){var t=o[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(o,r,t){return r&&e(o.prototype,r),t&&e(o,t),o}}(),b=Array.prototype.slice,w=function(e){function o(){var e,s,i,a;t(this,o);for(var l=arguments.length,p=Array(l),u=0;u<l;u++)p[u]=arguments[u];return s=i=n(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(p))),i.mounted=!1,i.uuidHeader=r.i(y.a)(),i.uuidBody=r.i(y.a)(),i.handleFocus=function(e){if(i.props.captureFocus){var o=e.explicitOriginalTarget||e.relatedTarget;i.isPartOfDialog(o)&&!i.isPartOfDialog(e.target)&&(e.preventDefault(),o.focus())}else if(i.shouldDialogCloseOnEvent("closeOnOutsideFocus",e)&&!i.isPartOfDialog(e.target))return window.setTimeout(i.props.onClose,0)},i.handleKeyDown=function(e){"Escape"===e.key&&i.shouldDialogCloseOnEvent("closeOnEscKey",e)&&window.setTimeout(i.props.onClose,0),r.i(d.a)(i.props.onKeyDown)&&i.props.onKeyDown(e)},i.handleInsideClick=function(e){i.shouldDialogCloseOnEvent("closeOnInsideClick",e)&&window.setTimeout(i.props.onClose,0)},i.handleOutsideClick=function(e){i.shouldDialogCloseOnEvent("closeOnOutsideClick",e)&&!i.isPartOfDialog(e.target)&&window.setTimeout(i.props.onClose,0)},i.handleOutsideScrollWheel=function(e){i.shouldDialogCloseOnEvent("closeOnOutsideScroll",e)&&!i.isPartOfDialog(e.target)&&window.setTimeout(i.props.onClose,0)},a=s,n(i,a)}return s(o,e),P(o,[{key:"isPartOfDialog",value:function(e){if(!e||e===window)return!1;var o=[this.$wrapper].concat(b.call(this.$wrapper.querySelectorAll("["+c.a.PORTAL_DATA_ATTRIBUTE+"]")).map(function(e){return document.getElementById(e.getAttribute(c.a.PORTAL_DATA_ATTRIBUTE))})),r=e.nodeType!==Node.ELEMENT_NODE?e.parentNode:e;return o.some(function(e){return e.contains(r)})}},{key:"componentDidMount",value:function(){window.addEventListener("click",this.handleOutsideClick,!0),window.addEventListener("contextmenu",this.handleOutsideClick,!0),window.addEventListener("focus",this.handleFocus,!0),window.addEventListener("scroll",this.handleOutsideScrollWheel,!0),window.addEventListener("wheel",this.handleOutsideScrollWheel,!0),this.props.captureFocus&&!this.isPartOfDialog(document.activeElement)&&this.$dialog.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.handleOutsideClick,!0),window.removeEventListener("contextmenu",this.handleOutsideClick,!0),window.removeEventListener("focus",this.handleFocus,!0),window.removeEventListener("scroll",this.handleOutsideScrollWheel,!0),window.removeEventListener("wheel",this.handleOutsideScrollWheel,!0)}},{key:"shouldDialogCloseOnEvent",value:function(e,o){return r.i(d.a)(this.props[e])?this.props[e](o):this.props[e]}},{key:"renderBody",value:function(){return a.a.createElement("div",O({},this.props.bodyProps,{id:this.props.bodyProps.id||this.uuidBody,className:p()("b-dialog-body",this.props.bodyProps.className)}),this.props.children)}},{key:"renderFooter",value:function(){if(this.props.footer)return a.a.createElement("footer",O({},this.props.footerProps,{className:p()("b-dialog-footer",this.props.footerProps.className)}),this.props.footer)}},{key:"renderHeader",value:function(){if(this.props.header)return a.a.createElement("header",O({},this.props.headerProps,{id:this.props.headerProps.id||this.uuidHeader,className:p()("b-dialog-header",this.props.headerProps.className)}),this.props.header)}},{key:"renderFocusBoundary",value:function(){if(this.props.captureFocus)return a.a.createElement("div",{className:"b-offscreen",tabIndex:"0","aria-hidden":"true"}," ")}},{key:"render",value:function(){var e=this;return a.a.createElement("div",O({},this.props.wrapperProps,{ref:function(o){return e.$wrapper=o},className:p()("b-dialog-wrapper",this.props.wrapperProps.className),tabIndex:"0"}),this.renderFocusBoundary(),this.props.before,a.a.createElement("div",O({},r.i(h.a)(this.props,o.internalKeys),{ref:function(o){return e.$dialog=o},className:p()("b-dialog",this.props.className),onClick:this.handleInsideClick,onKeyDown:this.handleKeyDown,role:"dialog","aria-labelledby":this.uuidHeader,"aria-describedby":this.uuidBody,tabIndex:"0"}),this.renderHeader(),this.renderBody(),this.renderFooter()),this.props.after,this.renderFocusBoundary())}}]),o}(a.a.PureComponent);w.propTypes={after:i.PropTypes.node,before:i.PropTypes.node,bodyProps:i.PropTypes.object,captureFocus:i.PropTypes.bool,children:i.PropTypes.node,closeOnEscKey:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnInsideClick:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnOutsideClick:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnOutsideFocus:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnOutsideScroll:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),footer:i.PropTypes.node,footerProps:i.PropTypes.object,header:i.PropTypes.node,headerProps:i.PropTypes.object,onClose:i.PropTypes.func,wrapperProps:i.PropTypes.object},w.defaultProps={after:null,before:null,bodyProps:{},captureFocus:!0,children:null,closeOnEscKey:!1,closeOnInsideClick:!1,closeOnOutsideClick:!1,closeOnOutsideFocus:!1,closeOnOutsideScroll:!1,footer:null,footerProps:{},header:null,headerProps:{},onClose:f.a,wrapperProps:{}},w.internalKeys=Object.keys(w.defaultProps),o.default=w}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDQyM2NhMDAzMDFmNWFlODNkZDMwIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1pcy1mdW5jdGlvbi9pbmRleC5qcyIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtdXRpbHMtbm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pKSB7XG4gICAgICAgICAgICB3aW5kb3cuc2V0VGltZW91dCh0aGlzLnByb3BzLm9uQ2xvc2UsIDApO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyQm9keSgpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5ib2R5UHJvcHN9XG4gICAgICAgICAgICAgICAgaWQ9e3RoaXMucHJvcHMuYm9keVByb3BzLmlkIHx8IHRoaXMudXVpZEJvZHl9XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaWFsb2ctYm9keScsIHRoaXMucHJvcHMuYm9keVByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmNoaWxkcmVufVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcmVuZGVyRm9vdGVyKCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5mb290ZXIpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGZvb3RlclxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5mb290ZXJQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaWFsb2ctZm9vdGVyJywgdGhpcy5wcm9wcy5mb290ZXJQcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMuZm9vdGVyfVxuICAgICAgICAgICAgICAgIDwvZm9vdGVyPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckhlYWRlcigpIHtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMuaGVhZGVyKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxoZWFkZXJcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuaGVhZGVyUHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIGlkPXt0aGlzLnByb3BzLmhlYWRlclByb3BzLmlkIHx8IHRoaXMudXVpZEhlYWRlcn1cbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaWFsb2ctaGVhZGVyJywgdGhpcy5wcm9wcy5oZWFkZXJQcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMuaGVhZGVyfVxuICAgICAgICAgICAgICAgIDwvaGVhZGVyPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckZvY3VzQm91bmRhcnkoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmNhcHR1cmVGb2N1cykge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nYi1vZmZzY3JlZW4nIHRhYkluZGV4PScwJyBhcmlhLWhpZGRlbj0ndHJ1ZSc+Jm5ic3A7PC9kaXY+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfSAvLyB1c2VkIHRvIGxvY2sgZm9jdXMgaW50byBhIHBhcnRpY3VsYXIgc3Vic2V0IG9mIERPTVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLndyYXBwZXJQcm9wc31cbiAgICAgICAgICAgICAgICByZWY9eyhub2RlKSA9PiAodGhpcy4kd3JhcHBlciA9IG5vZGUpfVxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLXdyYXBwZXInLCB0aGlzLnByb3BzLndyYXBwZXJQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgIHRhYkluZGV4PScwJz5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJGb2N1c0JvdW5kYXJ5KCl9XG5cbiAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5iZWZvcmV9XG5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIHsuLi5vbWl0KHRoaXMucHJvcHMsIERpYWxvZy5pbnRlcm5hbEtleXMpfVxuICAgICAgICAgICAgICAgICAgICByZWY9eyhub2RlKSA9PiAodGhpcy4kZGlhbG9nID0gbm9kZSl9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXt0aGlzLmhhbmRsZUluc2lkZUNsaWNrfVxuICAgICAgICAgICAgICAgICAgICBvbktleURvd249e3RoaXMuaGFuZGxlS2V5RG93bn1cbiAgICAgICAgICAgICAgICAgICAgcm9sZT0nZGlhbG9nJ1xuICAgICAgICAgICAgICAgICAgICBhcmlhLWxhYmVsbGVkYnk9e3RoaXMudXVpZEhlYWRlcn1cbiAgICAgICAgICAgICAgICAgICAgYXJpYS1kZXNjcmliZWRieT17dGhpcy51dWlkQm9keX1cbiAgICAgICAgICAgICAgICAgICAgdGFiSW5kZXg9JzAnPlxuICAgICAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJIZWFkZXIoKX1cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucmVuZGVyQm9keSgpfVxuICAgICAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJGb290ZXIoKX1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cblxuICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmFmdGVyfVxuXG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyRm9jdXNCb3VuZGFyeSgpfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWRpYWxvZy9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= | ||
module.exports=function(e){function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var r={};return o.m=e,o.c=r,o.i=function(e){return e},o.d=function(e,r,t){o.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},o.p="",o(o.s=5)}([function(e,o,r){"use strict";function t(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(r,t){return o.indexOf(t)===-1&&(r[t]=e[t]),r},{})}o.a=t},function(e,o,r){"use strict";function t(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}o.a=t},function(e,o){e.exports=require("boundless-portal")},function(e,o){e.exports=require("classnames")},function(e,o){e.exports=require("react")},function(e,o,r){"use strict";function t(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}function n(e,o){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?e:o}function s(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);e.prototype=Object.create(o&&o.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(e,o):e.__proto__=o)}Object.defineProperty(o,"__esModule",{value:!0});var i=r(4),l=r.n(i),a=r(3),p=r.n(a),u=r(2),c=r.n(u),d=r(0),f=r(1),h=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},y=function(){function e(e,o){for(var r=0;r<o.length;r++){var t=o[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(o,r,t){return r&&e(o.prototype,r),t&&e(o,t),o}}(),O=function(e){return"function"==typeof e},P=function(){},b=Array.prototype.slice,w=function(e){function o(){var e,s,i,l;t(this,o);for(var a=arguments.length,p=Array(a),u=0;u<a;u++)p[u]=arguments[u];return s=i=n(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(p))),i.mounted=!1,i.uuidHeader=r.i(f.a)(),i.uuidBody=r.i(f.a)(),i.handleFocus=function(e){if(i.props.captureFocus){var o=e.explicitOriginalTarget||e.relatedTarget;i.isPartOfDialog(o)&&!i.isPartOfDialog(e.target)&&(e.preventDefault(),o.focus())}else if(i.shouldDialogCloseOnEvent("closeOnOutsideFocus",e)&&!i.isPartOfDialog(e.target))return window.setTimeout(i.props.onClose,0)},i.handleKeyDown=function(e){"Escape"===e.key&&i.shouldDialogCloseOnEvent("closeOnEscKey",e)&&window.setTimeout(i.props.onClose,0),i.props.onKeyDown&&i.props.onKeyDown(e)},i.handleInsideClick=function(e){i.shouldDialogCloseOnEvent("closeOnInsideClick",e)&&window.setTimeout(i.props.onClose,0)},i.handleOutsideClick=function(e){i.shouldDialogCloseOnEvent("closeOnOutsideClick",e)&&!i.isPartOfDialog(e.target)&&window.setTimeout(i.props.onClose,0)},i.handleOutsideScrollWheel=function(e){i.shouldDialogCloseOnEvent("closeOnOutsideScroll",e)&&!i.isPartOfDialog(e.target)&&window.setTimeout(i.props.onClose,0)},l=s,n(i,l)}return s(o,e),y(o,[{key:"isPartOfDialog",value:function(e){if(!e||e===window)return!1;var o=[this.$wrapper].concat(b.call(this.$wrapper.querySelectorAll("["+c.a.PORTAL_DATA_ATTRIBUTE+"]")).map(function(e){return document.getElementById(e.getAttribute(c.a.PORTAL_DATA_ATTRIBUTE))})),r=e.nodeType!==Node.ELEMENT_NODE?e.parentNode:e;return o.some(function(e){return e.contains(r)})}},{key:"componentDidMount",value:function(){window.addEventListener("click",this.handleOutsideClick,!0),window.addEventListener("contextmenu",this.handleOutsideClick,!0),window.addEventListener("focus",this.handleFocus,!0),window.addEventListener("scroll",this.handleOutsideScrollWheel,!0),window.addEventListener("wheel",this.handleOutsideScrollWheel,!0),this.props.captureFocus&&!this.isPartOfDialog(document.activeElement)&&this.$dialog.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("click",this.handleOutsideClick,!0),window.removeEventListener("contextmenu",this.handleOutsideClick,!0),window.removeEventListener("focus",this.handleFocus,!0),window.removeEventListener("scroll",this.handleOutsideScrollWheel,!0),window.removeEventListener("wheel",this.handleOutsideScrollWheel,!0)}},{key:"shouldDialogCloseOnEvent",value:function(e,o){return O(this.props[e])?this.props[e](o):this.props[e]}},{key:"renderBody",value:function(){return l.a.createElement("div",h({},this.props.bodyProps,{id:this.props.bodyProps.id||this.uuidBody,className:p()("b-dialog-body",this.props.bodyProps.className)}),this.props.children)}},{key:"renderFooter",value:function(){if(this.props.footer)return l.a.createElement("footer",h({},this.props.footerProps,{className:p()("b-dialog-footer",this.props.footerProps.className)}),this.props.footer)}},{key:"renderHeader",value:function(){if(this.props.header)return l.a.createElement("header",h({},this.props.headerProps,{id:this.props.headerProps.id||this.uuidHeader,className:p()("b-dialog-header",this.props.headerProps.className)}),this.props.header)}},{key:"renderFocusBoundary",value:function(){if(this.props.captureFocus)return l.a.createElement("div",{className:"b-offscreen",tabIndex:"0","aria-hidden":"true"}," ")}},{key:"render",value:function(){var e=this;return l.a.createElement("div",h({},this.props.wrapperProps,{ref:function(o){return e.$wrapper=o},className:p()("b-dialog-wrapper",this.props.wrapperProps.className),tabIndex:"0"}),this.renderFocusBoundary(),this.props.before,l.a.createElement("div",h({},r.i(d.a)(this.props,o.internalKeys),{ref:function(o){return e.$dialog=o},className:p()("b-dialog",this.props.className),onClick:this.handleInsideClick,onKeyDown:this.handleKeyDown,role:"dialog","aria-labelledby":this.uuidHeader,"aria-describedby":this.uuidBody,tabIndex:"0"}),this.renderHeader(),this.renderBody(),this.renderFooter()),this.props.after,this.renderFocusBoundary())}}]),o}(l.a.PureComponent);w.propTypes={after:i.PropTypes.node,before:i.PropTypes.node,bodyProps:i.PropTypes.object,captureFocus:i.PropTypes.bool,children:i.PropTypes.node,closeOnEscKey:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnInsideClick:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnOutsideClick:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnOutsideFocus:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),closeOnOutsideScroll:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.func]),footer:i.PropTypes.node,footerProps:i.PropTypes.object,header:i.PropTypes.node,headerProps:i.PropTypes.object,onClose:i.PropTypes.func,wrapperProps:i.PropTypes.object},w.defaultProps={after:null,before:null,bodyProps:{},captureFocus:!0,children:null,closeOnEscKey:!1,closeOnInsideClick:!1,closeOnOutsideClick:!1,closeOnOutsideFocus:!1,closeOnOutsideScroll:!1,footer:null,footerProps:{},header:null,headerProps:{},onClose:P,onKeyDown:P,wrapperProps:{}},w.internalKeys=Object.keys(w.defaultProps),o.default=w}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDhmZmEyNWM2MTYwMGU4YmJmOTQ0Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLXV0aWxzLXV1aWQvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVyb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GFyZ2V0KSkge1xuICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQodGhpcy5wcm9wcy5vbkNsb3NlLCAwKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckJvZHkoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuYm9keVByb3BzfVxuICAgICAgICAgICAgICAgIGlkPXt0aGlzLnByb3BzLmJvZHlQcm9wcy5pZCB8fCB0aGlzLnV1aWRCb2R5fVxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLWJvZHknLCB0aGlzLnByb3BzLmJvZHlQcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlckZvb3RlcigpIHtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMuZm9vdGVyKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxmb290ZXJcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuZm9vdGVyUHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLWZvb3RlcicsIHRoaXMucHJvcHMuZm9vdGVyUHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmZvb3Rlcn1cbiAgICAgICAgICAgICAgICA8L2Zvb3Rlcj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJIZWFkZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmhlYWRlcikge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8aGVhZGVyXG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLmhlYWRlclByb3BzfVxuICAgICAgICAgICAgICAgICAgICBpZD17dGhpcy5wcm9wcy5oZWFkZXJQcm9wcy5pZCB8fCB0aGlzLnV1aWRIZWFkZXJ9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLWhlYWRlcicsIHRoaXMucHJvcHMuaGVhZGVyUHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmhlYWRlcn1cbiAgICAgICAgICAgICAgICA8L2hlYWRlcj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJGb2N1c0JvdW5kYXJ5KCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5jYXB0dXJlRm9jdXMpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Itb2Zmc2NyZWVuJyB0YWJJbmRleD0nMCcgYXJpYS1oaWRkZW49J3RydWUnPiZuYnNwOzwvZGl2PlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH0gLy8gdXNlZCB0byBsb2NrIGZvY3VzIGludG8gYSBwYXJ0aWN1bGFyIHN1YnNldCBvZiBET01cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy53cmFwcGVyUHJvcHN9XG4gICAgICAgICAgICAgICAgcmVmPXsobm9kZSkgPT4gKHRoaXMuJHdyYXBwZXIgPSBub2RlKX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWRpYWxvZy13cmFwcGVyJywgdGhpcy5wcm9wcy53cmFwcGVyUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICB0YWJJbmRleD0nMCc+XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyRm9jdXNCb3VuZGFyeSgpfVxuXG4gICAgICAgICAgICAgICAge3RoaXMucHJvcHMuYmVmb3JlfVxuXG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBEaWFsb2cuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICAgICAgcmVmPXsobm9kZSkgPT4gKHRoaXMuJGRpYWxvZyA9IG5vZGUpfVxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWRpYWxvZycsIHRoaXMucHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17dGhpcy5oYW5kbGVJbnNpZGVDbGlja31cbiAgICAgICAgICAgICAgICAgICAgb25LZXlEb3duPXt0aGlzLmhhbmRsZUtleURvd259XG4gICAgICAgICAgICAgICAgICAgIHJvbGU9J2RpYWxvZydcbiAgICAgICAgICAgICAgICAgICAgYXJpYS1sYWJlbGxlZGJ5PXt0aGlzLnV1aWRIZWFkZXJ9XG4gICAgICAgICAgICAgICAgICAgIGFyaWEtZGVzY3JpYmVkYnk9e3RoaXMudXVpZEJvZHl9XG4gICAgICAgICAgICAgICAgICAgIHRhYkluZGV4PScwJz5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucmVuZGVySGVhZGVyKCl9XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckJvZHkoKX1cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucmVuZGVyRm9vdGVyKCl9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5hZnRlcn1cblxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckZvY3VzQm91bmRhcnkoKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1kaWFsb2cvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
11
index.js
@@ -5,7 +5,7 @@ import React, {PropTypes} from 'react'; | ||
import Portal from 'boundless-portal'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import uuid from '../boundless-utils-uuid/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
import uuid from 'boundless-utils-uuid'; | ||
const isFunction = (x) => typeof x === 'function'; | ||
const noop = () => {}; | ||
const toArray = Array.prototype.slice; | ||
@@ -140,2 +140,3 @@ | ||
onClose: noop, | ||
onKeyDown: noop, | ||
wrapperProps: {}, | ||
@@ -215,3 +216,3 @@ } | ||
if (isFunction(this.props.onKeyDown)) { | ||
if (this.props.onKeyDown) { | ||
this.props.onKeyDown(event); | ||
@@ -218,0 +219,0 @@ } |
@@ -5,2 +5,4 @@ /* eslint no-unused-expressions:0 */ | ||
import ReactDOM from 'react-dom'; | ||
import sinon from 'sinon'; | ||
import {noop} from 'lodash'; | ||
@@ -11,6 +13,3 @@ import Dialog from './index'; | ||
import conformanceChecker from '../boundless-utils-conformance/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import sinon from 'sinon'; | ||
describe('Dialog component', () => { | ||
@@ -17,0 +16,0 @@ const mountNode = document.body.appendChild(document.createElement('div')); |
{ | ||
"name": "boundless-dialog", | ||
"version": "1.0.0-beta.5", | ||
"version": "1.0.0-beta.6", | ||
"description": "A non-blocking, focus-stealing container.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,11 +27,7 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-portal": "^1.0.0-beta.5", | ||
"boundless-portal": "^1.0.0-beta.6", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.6", | ||
"boundless-utils-uuid": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-is-function": "^1.0.0", | ||
"boundless-utils-noop": "^1.0.0", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3", | ||
"boundless-utils-uuid": "^1.0.0" | ||
}, | ||
"peerDependencies": { | ||
@@ -37,0 +34,0 @@ "react": ">= 15.3", |
@@ -138,3 +138,3 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
<td><pre><code>function</code></pre></td> | ||
<td><pre><code class="language-js">noop</code></pre></td> | ||
<td><pre><code class="language-js">() => {}</code></pre></td> | ||
<td>a custom event handler that is called to indicate that the dialog should be unrendered by its parent; the event occurs if one or more of the `closeOn` props (`closeOnEscKey`, `closeOnOutsideClick`, etc.) are passed as `true` and the dismissal criteria are satisfied</td> | ||
@@ -152,1 +152,2 @@ </tr> | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
704
152
98549
6