Comparing version 1.0.0-beta.5 to 1.0.0-beta.6
# Changelog | ||
### 1.0.0-beta.5 (2017-01-25) | ||
7927596 Fix all the things | ||
8ad904a All builds now via webpack | ||
9cdc2b0 Subpackages (except utils) now import each other properly | ||
69584fd Move unpublished packages to devDependencies | ||
### 1.0.0-beta.4 (2017-01-25) | ||
c6a82e7 Refactor package builder to use webpack, drop module entry points | ||
a31dac6 Refine the starfield a bit for smaller + larger viewport sizes | ||
90a7608 Fix h1 in iOS Safari | ||
37e2a72 Remove some references to the old repo / project name | ||
64f94a4 Adjust package README script to flatten the generated HTML | ||
e960458 keep the utils private for now | ||
### 1.0.0-beta.3 (2017-01-25) | ||
@@ -4,0 +20,0 @@ |
{ | ||
"name": "boundless", | ||
"description": "Intuitive, accessible solutions for common UI needs in React.", | ||
"version": "1.0.0-beta.5", | ||
"author": "Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com) (http://yaycmyk.com)", | ||
"version": "1.0.0-beta.6", | ||
"author": "Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com)", | ||
"contributors": [ | ||
@@ -20,3 +20,2 @@ "Abe Rubenstein <abe.rubenstein@enigma.io>", | ||
"babel-loader": "^6.2.10", | ||
"babel-plugin-external-helpers": "^6.8.0", | ||
"babel-plugin-react-docgen": "^1.4.1", | ||
@@ -31,3 +30,2 @@ "babel-plugin-transform-class-properties": "^6.6.0", | ||
"codecov": "^1.0.1", | ||
"coveralls": "^2.11.9", | ||
"css-loader": "^0.26.1", | ||
@@ -54,4 +52,2 @@ "eslint": "^3.7.0", | ||
"stylus-loader": "^2.4.0", | ||
"uglify-js": "^2.6.2", | ||
"verbal-expressions": "^0.3.0", | ||
"webpack": "^2.2.0", | ||
@@ -79,4 +75,4 @@ "webpack-dev-server": "^2.2.0" | ||
"site": "BABEL_ENV=site-production NODE_ENV=production webpack --config scripts/webpack.release.config.js", | ||
"build:js:master": "node scripts/build-master.js", | ||
"build:js:packages": "node scripts/build-packages.js", | ||
"build:js:master": "NODE_ENV=production node scripts/build-master.js", | ||
"build:js:packages": "NODE_ENV=production node scripts/build-packages.js", | ||
"build:css": "stylus -m -u autoprefixer-stylus style.styl -o public/skin.css --sourcemap-inline", | ||
@@ -83,0 +79,0 @@ "build:css:release": "stylus -c -u autoprefixer-stylus style.styl -o public/skin.min.css", |
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";t.a=function(e){return"function"==typeof e}},function(e,t,n){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,o){return t.indexOf(o)===-1&&(n[o]=e[o]),n},{})}t.a=o},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),s=n.n(a),c=n(3),u=(n.n(c),n(0)),p=n(1),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=function(e){function t(){var e,i,a,c;o(this,t);for(var p=arguments.length,d=Array(p),l=0;l<p;l++)d[l]=arguments[l];return i=a=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(d))),a.state={activeChildIndex:a.props.defaultActiveChildIndex},a.handleKeyDown=function(e){switch(e.key){case"ArrowUp":a.props.mode!==t.mode.VERTICAL&&a.props.mode!==t.mode.BOTH||(e.preventDefault(),a.moveFocus(-1));break;case"ArrowLeft":a.props.mode!==t.mode.HORIZONTAL&&a.props.mode!==t.mode.BOTH||(e.preventDefault(),a.moveFocus(-1));break;case"ArrowDown":a.props.mode!==t.mode.VERTICAL&&a.props.mode!==t.mode.BOTH||(e.preventDefault(),a.moveFocus(1));break;case"ArrowRight":a.props.mode!==t.mode.HORIZONTAL&&a.props.mode!==t.mode.BOTH||(e.preventDefault(),a.moveFocus(1))}n.i(u.a)(a.props.onKeyDown)&&a.props.onKeyDown(e)},a.handleFocus=function(e){if(e.target.hasAttribute("data-focus-index")){var t=parseInt(e.target.getAttribute("data-focus-index"),10),n=s.a.Children.toArray(a.props.children)[t];a.setState({activeChildIndex:t}),n.props.onFocus&&n.props.onFocus(e)}},c=i,r(a,c)}return i(t,e),l(t,[{key:"componentDidUpdate",value:function(e,t){this.state.activeChildIndex!==t.activeChildIndex&&this.setFocus(this.state.activeChildIndex)}},{key:"componentWillReceiveProps",value:function(e){if(0!==this.state.activeChildIndex){var t=e.children?s.a.Children.count(e.children):0;0===t?this.setState({activeChildIndex:0}):this.state.activeChildIndex>=t&&this.setState({activeChildIndex:t-1})}}},{key:"setFocus",value:function(e){var t=(this.refs.wrapper instanceof HTMLElement?this.refs.wrapper:n.i(c.findDOMNode)(this.refs.wrapper)).children[e];t&&t.hasAttribute("data-skip")?this.moveFocus(t.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1):t&&document.activeElement!==t&&t.focus()}},{key:"moveFocus",value:function(e){var t=this.props.children?s.a.Children.count(this.props.children):0,n=this.state.activeChildIndex+e;n>=t?n=0:n<0&&(n=t-1),this.setState({activeChildIndex:n})}},{key:"children",value:function(){var e=this;return s.a.Children.map(this.props.children,function(t,n){return s.a.cloneElement(t,{"data-focus-index":n,"data-skip":parseInt(t.props.tabIndex,10)===-1||void 0,key:t.key||n,tabIndex:e.state.activeChildIndex===n?0:-1})})}},{key:"render",value:function(){return s.a.createElement(this.props.component,d({},n.i(p.a)(this.props,t.internalKeys),{ref:"wrapper",onFocus:this.handleFocus,onKeyDown:this.handleKeyDown}),this.children())}}]),t}(s.a.PureComponent);f.mode={HORIZONTAL:"HORIZONTAL",VERTICAL:"VERTICAL",BOTH:"BOTH"},f.propTypes={component:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.func]),defaultActiveChildIndex:a.PropTypes.number,mode:a.PropTypes.oneOf([f.mode.BOTH,f.mode.HORIZONTAL,f.mode.VERTICAL])},f.defaultProps={component:"div",defaultActiveChildIndex:0,mode:f.mode.BOTH},f.internalKeys=Object.keys(f.defaultProps),t.default=f}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDhkNGI1YmU1YTMzNGY4Y2U0Mzk3Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1pcy1mdW5jdGlvbi9pbmRleC5qcyIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtdXRpbHMtb21pdC1rZXlzL2luZGV4LmpzIiwid2VicGFjazovLy9leHRlcm5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mVudCB7XG4gICAgc3RhdGljIG1vZGUgPSB7XG4gICAgICAgIEhPUklaT05UQUw6ICdIT1JJWk9OVEFMJyxcbiAgICAgICAgVkVSVElDQUw6ICdWRVJUSUNBTCcsXG4gICAgICAgIEJPVEg6ICdCT1RIJyxcbiAgICB9XG5cbiAgICBzdGF0aWMgcHJvcFR5cGVzID0ge1xuICAgICAgICAvKipcbiAgICAgICAgICAgIEFueSB2YWxpZCBIVE1MIHRhZyBuYW1lIG9yIGEgUmVhY3QgY29tcG9uZW50IGZhY3RvcnksIGFueXRoaW5nIHRoYXQgY2FuIGJlIHBhc3NlZCBhcyB0aGUgZmlyc3QgYXJndW1lbnQgdG8gYFJlYWN0LmNyZWF0ZUVsZW1lbnRgXG4gICAgICAgICovXG4gICAgICAgIGNvbXBvbmVudDogUHJvcFR5cGVzLm9uZU9mVHlwZShbXG4gICAgICAgICAgICBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgICAgICAgUHJvcFR5cGVzLmZ1bmMsXG4gICAgICAgIF0pLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgICAgQWxsb3dzIGZvciBhIHBhcnRpY3VsYXIgY2hpbGQgdG8gYmUgaW5pdGlhbGx5IHJlYWNoYWJsZSB2aWEgdGFiYmluZ1xuICAgICAgICAqL1xuICAgICAgICBkZWZhdWx0QWN0aXZlQ2hpbGRJbmRleDogUHJvcFR5cGVzLm51bWJlcixcblxuICAgICAgICAvKipcbiAgICAgICAgICogY29udHJvbHMgd2hpY2ggYXJyb3cga2V5IGV2ZW50cyBhcmUgY2FwdHVyZWQgdG8gbW92ZSBhY3RpdmUgZm9jdXMgd2l0aGluIHRoZSBsaXN0OlxuICAgICAgICAgKlxuICAgICAgICAgKiBNb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBLZXlzXG4gICAgICAgICAqIC0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IC0tLS1cbiAgICAgICAgICogYEFycm93S2V5TmF2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IC0gMTsgLy8gcmV2ZXJzZSBsb29wXG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnNldFN0YXRlKHthY3RpdmVDaGlsZEluZGV4OiBuZXh0SW5kZXh9KTtcbiAgICB9XG5cbiAgICBoYW5kbGVLZXlEb3duID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIHN3aXRjaCAoZXZlbnQua2V5KSB7XG4gICAgICAgIGNhc2UgJ0Fycm93VXAnOlxuICAgICAgICAgICAgaWYgKHRoaXMucHJvcHMubW9kZSA9PT0gQXJyb3dLZXlOYXZpZ2F0aW9uLm1vZGUuVkVSVElDQUxcbiAgICAgICAgICAgICAgICB8fCB0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkJPVEgpIHtcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUZvY3VzKC0xKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnQXJyb3dMZWZ0JzpcbiAgICAgICAgICAgIGlmICh0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkhPUklaT05UQUxcbiAgICAgICAgICAgICAgICB8fCB0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkJPVEgpIHtcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUZvY3VzKC0xKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnQXJyb3dEb3duJzpcbiAgICAgICAgICAgIGlmICh0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLlZFUlRJQ0FMXG4gICAgICAgICAgICAgICAgfHwgdGhpcy5wcm9wcy5tb2RlID09PSBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5CT1RIKSB7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdmVGb2N1cygxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6XG4gICAgICAgICAgICBpZiAodGhpcy5wcm9wcy5tb2RlID09PSBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5IT1JJWk9OVEFMXG4gICAgICAgICAgICAgICAgfHwgdGhpcy5wcm9wcy5tb2RlID09PSBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5CT1RIKSB7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdmVGb2N1cygxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNGdW5jdGlvbih0aGlzLnByb3BzLm9uS2V5RG93bikpIHtcbiAgICAgICAgICAgIHRoaXMucHJvcHMub25LZXlEb3duKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGhhbmRsZUZvY3VzID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGlmIChldmVudC50YXJnZXQuaGFzQXR0cmlidXRlKCdkYXRhLWZvY3VzLWluZGV4JykpIHtcbiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gcGFyc2VJbnQoZXZlbnQudGFyZ2V0LmdldEF0dHJpYnV0ZSgnZGF0YS1mb2N1cy1pbmRleCcpLCAxMCk7XG4gICAgICAgICAgICBjb25zdCBjaGlsZCA9IFJlYWN0LkNoaWxkcmVuLnRvQXJyYXkodGhpcy5wcm9wcy5jaGlsZHJlbilbaW5kZXhdO1xuXG4gICAgICAgICAgICB0aGlzLnNldFN0YXRlKHthY3RpdmVDaGlsZEluZGV4OiBpbmRleH0pO1xuXG4gICAgICAgICAgICBpZiAoY2hpbGQucHJvcHMub25Gb2N1cykge1xuICAgICAgICAgICAgICAgIGNoaWxkLnByb3BzLm9uRm9jdXMoZXZlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY2hpbGRyZW4oKSB7XG4gICAgICAgIHJldHVybiBSZWFjdC5DaGlsZHJlbi5tYXAodGhpcy5wcm9wcy5jaGlsZHJlbiwgKGNoaWxkLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIFJlYWN0LmNsb25lRWxlbWVudChjaGlsZCwge1xuICAgICAgICAgICAgICAgICdkYXRhLWZvY3VzLWluZGV4JzogaW5kZXgsXG4gICAgICAgICAgICAgICAgJ2RhdGEtc2tpcCc6IHBhcnNlSW50KGNoaWxkLnByb3BzLnRhYkluZGV4LCAxMCkgPT09IC0xIHx8IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICBrZXk6IGNoaWxkLmtleSB8fCBpbmRleCxcbiAgICAgICAgICAgICAgICB0YWJJbmRleDogdGhpcy5zdGF0ZS5hY3RpdmVDaGlsZEluZGV4ID09PSBpbmRleCA/IDAgOiAtMSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBBcnJvd0tleU5hdmlnYXRpb24uaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgb25Gb2N1cz17dGhpcy5oYW5kbGVGb2N1c31cbiAgICAgICAgICAgICAgICBvbktleURvd249e3RoaXMuaGFuZGxlS2V5RG93bn0+XG4gICAgICAgICAgICAgICAge3RoaXMuY2hpbGRyZW4oKX1cbiAgICAgICAgICAgIDwvdGhpcy5wcm9wcy5jb21wb25lbnQ+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWFycm93LWtleS1uYXZpZ2F0aW9uL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,o){return t.indexOf(o)===-1&&(n[o]=e[o]),n},{})}t.a=o},function(e,t,n){"use strict";function o(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=o},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),c=n.n(a),s=n(3),u=(n.n(s),n(0)),p=n(1),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=function(e){function t(){var e,n,i,a;o(this,t);for(var s=arguments.length,u=Array(s),p=0;p<s;p++)u[p]=arguments[p];return n=i=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),i.state={activeChildIndex:i.props.defaultActiveChildIndex},i.handleKeyDown=function(e){switch(e.key){case"ArrowUp":i.props.mode!==t.mode.VERTICAL&&i.props.mode!==t.mode.BOTH||(e.preventDefault(),i.moveFocus(-1));break;case"ArrowLeft":i.props.mode!==t.mode.HORIZONTAL&&i.props.mode!==t.mode.BOTH||(e.preventDefault(),i.moveFocus(-1));break;case"ArrowDown":i.props.mode!==t.mode.VERTICAL&&i.props.mode!==t.mode.BOTH||(e.preventDefault(),i.moveFocus(1));break;case"ArrowRight":i.props.mode!==t.mode.HORIZONTAL&&i.props.mode!==t.mode.BOTH||(e.preventDefault(),i.moveFocus(1))}i.props.onKeyDown&&i.props.onKeyDown(e)},i.handleFocus=function(e){if(e.target.hasAttribute("data-focus-index")){var t=parseInt(e.target.getAttribute("data-focus-index"),10),n=c.a.Children.toArray(i.props.children)[t];i.setState({activeChildIndex:t}),n.props.onFocus&&n.props.onFocus(e)}},a=n,r(i,a)}return i(t,e),l(t,[{key:"componentDidUpdate",value:function(e,t){this.state.activeChildIndex!==t.activeChildIndex&&this.setFocus(this.state.activeChildIndex)}},{key:"componentWillReceiveProps",value:function(e){if(0!==this.state.activeChildIndex){var t=e.children?c.a.Children.count(e.children):0;0===t?this.setState({activeChildIndex:0}):this.state.activeChildIndex>=t&&this.setState({activeChildIndex:t-1})}}},{key:"setFocus",value:function(e){var t=(this.refs.wrapper instanceof HTMLElement?this.refs.wrapper:n.i(s.findDOMNode)(this.refs.wrapper)).children[e];t&&t.hasAttribute("data-skip")?this.moveFocus(t.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1):t&&document.activeElement!==t&&t.focus()}},{key:"moveFocus",value:function(e){var t=this.props.children?c.a.Children.count(this.props.children):0,n=this.state.activeChildIndex+e;n>=t?n=0:n<0&&(n=t-1),this.setState({activeChildIndex:n})}},{key:"children",value:function(){var e=this;return c.a.Children.map(this.props.children,function(t,n){return c.a.cloneElement(t,{"data-focus-index":n,"data-skip":parseInt(t.props.tabIndex,10)===-1||void 0,key:t.key||n,tabIndex:e.state.activeChildIndex===n?0:-1})})}},{key:"render",value:function(){return c.a.createElement(this.props.component,d({},n.i(u.a)(this.props,t.internalKeys),{ref:"wrapper",onFocus:this.handleFocus,onKeyDown:this.handleKeyDown}),this.children())}}]),t}(c.a.PureComponent);f.mode={HORIZONTAL:n.i(p.a)(),VERTICAL:n.i(p.a)(),BOTH:n.i(p.a)()},f.propTypes={component:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.func]),defaultActiveChildIndex:a.PropTypes.number,mode:a.PropTypes.oneOf([f.mode.BOTH,f.mode.HORIZONTAL,f.mode.VERTICAL])},f.defaultProps={component:"div",defaultActiveChildIndex:0,mode:f.mode.BOTH,onKeyDown:function(){}},f.internalKeys=Object.keys(f.defaultProps),t.default=f}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDIyMTQwMjVlZmNjNGNiZWI2ZDQxIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtle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AgICAgICAgfCBLZXlzXG4gICAgICAgICAqIC0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IC0tLS1cbiAgICAgICAgICogYEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkJPVEhgICAgICAgIHwg4qyF77iPIOKeoe+4jyDirIbvuI8g4qyH77iPXG4gICAgICAgICAqIGBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5IT1JJWk9OVEFMYCB8IOKshe+4jyDinqHvuI9cbiAgICAgICAgICogYEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLlZFUlRJQ0FMYCAgIHwg4qyG77iPIOKsh++4j1xuICAgICAgICAgKlxuICAgICAgICAgKiBfTm90ZTogZm9jdXMgbG9vcHMgd2hlbiBhcnJvd2luZyBwYXN0IG9uZSBvZiB0aGUgYm91bmRhcmllczsgdGFiYmluZyBtb3ZlcyB0aGUgdXNlciBhd2F5IGZyb20gdGhlIGxpc3QuX1xuICAgICAgICAqL1xuICAgICAgICBtb2RlOiBQcm9wVHlwZXMub25lT2YoW1xuICAgICAgICAgICAgQXJyb3dLZXlOYXZpZ2F0aW9uLm1vZGUuQk9USCxcbiAgICAgICAgICAgIEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkhPUklaT05UQUwsXG4gICAgICAgICAgICBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5WRVJUSUNBTCxcbiAgICAgICAgXSksXG4gICAgfVxuXG4gICAgc3RhdGljIGRlZmF1bHRQcm9wcyA9IHtcbiAgICAgICAgY29tcG9uZW50OiAnZGl2JyxcbiAgICAgICAgZGVmYXVsdEFjdGl2ZUNoaWxkSW5kZXg6IDAsXG4gICAgICAgIG1vZGU6IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkJPVEgsXG4gICAgICAgIG9uS2V5RG93bjogKCkgPT4ge30sXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVybmFsS2V5cyA9IE9iamVjdC5rZXlzKEFycm93S2V5TmF2aWdhdGlvbi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lsZHJlbikge1xuICAgICAgICAgICAgbmV4dEluZGV4ID0gMDsgLy8gbG9vcFxuICAgICAgICB9IGVsc2UgaWYgKG5leHRJbmRleCA8IDApIHtcbiAgICAgICAgICAgIG5leHRJbmRleCA9IG51bUNoaWxkcmVuIC0gMTsgLy8gcmV2ZXJzZSBsb29wXG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnNldFN0YXRlKHthY3RpdmVDaGlsZEluZGV4OiBuZXh0SW5kZXh9KTtcbiAgICB9XG5cbiAgICBoYW5kbGVLZXlEb3duID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIHN3aXRjaCAoZXZlbnQua2V5KSB7XG4gICAgICAgIGNhc2UgJ0Fycm93VXAnOlxuICAgICAgICAgICAgaWYgKHRoaXMucHJvcHMubW9kZSA9PT0gQXJyb3dLZXlOYXZpZ2F0aW9uLm1vZGUuVkVSVElDQUxcbiAgICAgICAgICAgICAgICB8fCB0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkJPVEgpIHtcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUZvY3VzKC0xKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnQXJyb3dMZWZ0JzpcbiAgICAgICAgICAgIGlmICh0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkhPUklaT05UQUxcbiAgICAgICAgICAgICAgICB8fCB0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLkJPVEgpIHtcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUZvY3VzKC0xKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnQXJyb3dEb3duJzpcbiAgICAgICAgICAgIGlmICh0aGlzLnByb3BzLm1vZGUgPT09IEFycm93S2V5TmF2aWdhdGlvbi5tb2RlLlZFUlRJQ0FMXG4gICAgICAgICAgICAgICAgfHwgdGhpcy5wcm9wcy5tb2RlID09PSBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5CT1RIKSB7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdmVGb2N1cygxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6XG4gICAgICAgICAgICBpZiAodGhpcy5wcm9wcy5tb2RlID09PSBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5IT1JJWk9OVEFMXG4gICAgICAgICAgICAgICAgfHwgdGhpcy5wcm9wcy5tb2RlID09PSBBcnJvd0tleU5hdmlnYXRpb24ubW9kZS5CT1RIKSB7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0aGlzLm1vdmVGb2N1cygxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5wcm9wcy5vbktleURvd24pIHtcbiAgICAgICAgICAgIHRoaXMucHJvcHMub25LZXlEb3duKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGhhbmRsZUZvY3VzID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGlmIChldmVudC50YXJnZXQuaGFzQXR0cmlidXRlKCdkYXRhLWZvY3VzLWluZGV4JykpIHtcbiAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gcGFyc2VJbnQoZXZlbnQudGFyZ2V0LmdldEF0dHJpYnV0ZSgnZGF0YS1mb2N1cy1pbmRleCcpLCAxMCk7XG4gICAgICAgICAgICBjb25zdCBjaGlsZCA9IFJlYWN0LkNoaWxkcmVuLnRvQXJyYXkodGhpcy5wcm9wcy5jaGlsZHJlbilbaW5kZXhdO1xuXG4gICAgICAgICAgICB0aGlzLnNldFN0YXRlKHthY3RpdmVDaGlsZEluZGV4OiBpbmRleH0pO1xuXG4gICAgICAgICAgICBpZiAoY2hpbGQucHJvcHMub25Gb2N1cykge1xuICAgICAgICAgICAgICAgIGNoaWxkLnByb3BzLm9uRm9jdXMoZXZlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY2hpbGRyZW4oKSB7XG4gICAgICAgIHJldHVybiBSZWFjdC5DaGlsZHJlbi5tYXAodGhpcy5wcm9wcy5jaGlsZHJlbiwgKGNoaWxkLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIFJlYWN0LmNsb25lRWxlbWVudChjaGlsZCwge1xuICAgICAgICAgICAgICAgICdkYXRhLWZvY3VzLWluZGV4JzogaW5kZXgsXG4gICAgICAgICAgICAgICAgJ2RhdGEtc2tpcCc6IHBhcnNlSW50KGNoaWxkLnByb3BzLnRhYkluZGV4LCAxMCkgPT09IC0xIHx8IHVuZGVmaW5lZCxcbiAgICAgICAgICAgICAgICBrZXk6IGNoaWxkLmtleSB8fCBpbmRleCxcbiAgICAgICAgICAgICAgICB0YWJJbmRleDogdGhpcy5zdGF0ZS5hY3RpdmVDaGlsZEluZGV4ID09PSBpbmRleCA/IDAgOiAtMSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBBcnJvd0tleU5hdmlnYXRpb24uaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgb25Gb2N1cz17dGhpcy5oYW5kbGVGb2N1c31cbiAgICAgICAgICAgICAgICBvbktleURvd249e3RoaXMuaGFuZGxlS2V5RG93bn0+XG4gICAgICAgICAgICAgICAge3RoaXMuY2hpbGRyZW4oKX1cbiAgICAgICAgICAgIDwvdGhpcy5wcm9wcy5jb21wb25lbnQ+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWFycm93LWtleS1uYXZpZ2F0aW9uL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
import React, {PropTypes} from 'react'; | ||
import {findDOMNode} from 'react-dom'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
import uuid from 'boundless-utils-uuid'; | ||
@@ -19,5 +19,5 @@ /** | ||
static mode = { | ||
HORIZONTAL: 'HORIZONTAL', | ||
VERTICAL: 'VERTICAL', | ||
BOTH: 'BOTH', | ||
HORIZONTAL: uuid(), | ||
VERTICAL: uuid(), | ||
BOTH: uuid(), | ||
} | ||
@@ -61,2 +61,3 @@ | ||
mode: ArrowKeyNavigation.mode.BOTH, | ||
onKeyDown: () => {}, | ||
} | ||
@@ -161,3 +162,3 @@ | ||
if (isFunction(this.props.onKeyDown)) { | ||
if (this.props.onKeyDown) { | ||
this.props.onKeyDown(event); | ||
@@ -164,0 +165,0 @@ } |
{ | ||
"name": "boundless-arrow-key-navigation", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A higher-order component for arrow key navigation on a grouping of children.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,5 +27,5 @@ "type": "git", | ||
"homepage": "https://github.com/enigma-io/boundless#readme", | ||
"devDependencies": { | ||
"boundless-utils-is-function": "^1.0.0", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-uuid": "^1.0.0-beta.5" | ||
}, | ||
@@ -31,0 +32,0 @@ "peerDependencies": { |
@@ -64,1 +64,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
module.exports=function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){"use strict";function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(t).reduce(function(n,o){return e.indexOf(o)===-1&&(n[o]=t[o]),n},{})}e.a=o},function(t,e){t.exports=require("classnames")},function(t,e){t.exports=require("react")},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var c=n(2),i=n.n(c),s=n(1),u=n.n(s),l=n(0),p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),d=function(t){function e(){var t,n,a,c;o(this,e);for(var i=arguments.length,s=Array(i),u=0;u<i;u++)s[u]=arguments[u];return n=a=r(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),a.mounted=!1,a.state={},c=n,r(a,c)}return a(e,t),f(e,[{key:"convertDataToJSXOrWait",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=e.data;return n instanceof Promise?(this.setState({component:null}),n.then(function(e){t.mounted&&t.setState(function(t,o){return{component:o.data===n?o.convertToJSXFunc(e):t.component}})},function(){return t.setState({component:!1})})):void this.setState({component:e.convertToJSXFunc(n)})}},{key:"fireCallbackIfDataRendered",value:function(){this.state.component&&this.props.contentRenderedFunc()}},{key:"componentWillMount",value:function(){this.convertDataToJSXOrWait()}},{key:"componentDidMount",value:function(){this.mounted=!0,this.fireCallbackIfDataRendered()}},{key:"componentDidUpdate",value:function(){this.fireCallbackIfDataRendered()}},{key:"componentWillReceiveProps",value:function(t){this.convertDataToJSXOrWait(t)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"getClasses",value:function(t){return u()("b-async",this.props.className,t,{"b-async-error":this.state.component===!1,"b-async-loading":null===this.state.component})}},{key:"render",value:function(){return null===this.state.component||this.state.component===!1?i.a.createElement("div",p({},n.i(l.a)(this.props,e.internalKeys),{className:this.getClasses()}),null===this.state.component?this.props.loadingContent:this.props.errorContent):i.a.cloneElement(this.state.component,p({},n.i(l.a)(this.props,e.internalKeys),{className:this.getClasses(this.state.component.props&&this.state.component.props.className)}))}}]),e}(i.a.PureComponent);d.propTypes={contentRenderedFunc:c.PropTypes.func,convertToJSXFunc:c.PropTypes.func,data:c.PropTypes.any,errorContent:c.PropTypes.node,loadingContent:c.PropTypes.node},d.defaultProps={contentRenderedFunc:function(){},convertToJSXFunc:function(t){return t},data:null,errorContent:"⚠️",loadingContent:null},d.internalKeys=Object.keys(d.defaultProps),e.default=d}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDczMmM4NDE5M2FjY2E2ZDhlMGViIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtYXN5bmMvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZmlndXJhYmxlIiwiZW51bWVyYWJsZSIsImdldCIsIm4iLCJfX2VzTW9kdWxlIiwib2JqZWN0IiwicHJvcGVydHkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsInAiLCJzIiwiX193ZWJwYWNrX2V4cG9ydHNfXyIsIm9taXRLZXlzRnJvbVNvdXJjZU9iamVjdCIsInNvdXJjZSIsIm9taXR0ZWRLZXlzIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwidW5kZWZpbmV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ICAgbG9hZGluZ0NvbnRlbnQ6IG51bGwsXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVybmFsS2V5cyA9IE9iamVjdC5rZXlzKEFzeW5jLmRlZmF1bHRQcm9wcylcblxuICAgIG1vdW50ZWQgPSBmYWxzZVxuICAgIHN0YXRlID0ge31cblxuICAgIGNvbnZlcnREYXRhVG9KU1hPcldhaXQocHJvcHMgPSB0aGlzLnByb3BzKSB7XG4gICAgICAgIGNvbnN0IHtkYXRhfSA9IHByb3BzO1xuXG4gICAgICAgIGlmIChkYXRhIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7Y29tcG9uZW50OiBudWxsfSk7XG5cbiAgICAgICAgICAgIHJldHVybiBkYXRhLnRoZW4oKHBheWxvYWQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5tb3VudGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG9ubHkgcmVwbGFjZSBpZiB3ZSdyZSBsb29raW5nIGF0IHRoZSBzYW1lIHByb21pc2UsIG90aGVyd2lzZSBkbyBub3RoaW5nXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoKHN0YXRlLCBjdXJyZW50UHJvcHMpID0+ICh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IGN1cnJlbnRQcm9wcy5kYXRhID09PSBkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gY3VycmVudFByb3BzLmNvbnZlcnRUb0pTWEZ1bmMocGF5bG9hZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBzdGF0ZS5jb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCAoKSA9PiB0aGlzLnNldFN0YXRlKHtjb21wb25lbnQ6IGZhbHNlfSkpO1xuICAgICAgICB9XG5cbiAgIC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ZW50ID09PSBudWxsLFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlLmNvbXBvbmVudCA9PT0gbnVsbCB8fCB0aGlzLnN0YXRlLmNvbXBvbmVudCA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdiB7Li4ub21pdCh0aGlzLnByb3BzLCBBc3luYy5pbnRlcm5hbEtleXMpfSBjbGFzc05hbWU9e3RoaXMuZ2V0Q2xhc3NlcygpfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMuc3RhdGUuY29tcG9uZW50ID09PSBudWxsXG4gICAgICAgICAgICAgICAgICAgICA/IHRoaXMucHJvcHMubG9hZGluZ0NvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgIDogdGhpcy5wcm9wcy5lcnJvckNvbnRlbnR9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFJlYWN0LmNsb25lRWxlbWVudCh0aGlzLnN0YXRlLmNvbXBvbmVudCwge1xuICAgICAgICAgICAgLi4ub21pdCh0aGlzLnByb3BzLCBBc3luYy5pbnRlcm5hbEtleXMpLFxuICAgICAgICAgICAgY2xhc3NOYW1lOiB0aGlzLmdldENsYXNzZXModGhpcy5zdGF0ZS5jb21wb25lbnQucHJvcHMgJiYgdGhpcy5zdGF0ZS5jb21wb25lbnQucHJvcHMuY2xhc3NOYW1lKSxcbiAgICAgICAgfSk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWFzeW5jL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW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MgPSB0aGlzLnByb3BzKSB7XG4gICAgICAgIGNvbnN0IHtkYXRhfSA9IHByb3BzO1xuXG4gICAgICAgIGlmIChkYXRhIGluc3RhbmNlb2YgUHJvbWlzZSkge1xuICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7Y29tcG9uZW50OiBudWxsfSk7XG5cbiAgICAgICAgICAgIHJldHVybiBkYXRhLnRoZW4oKHBheWxvYWQpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5tb3VudGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG9ubHkgcmVwbGFjZSBpZiB3ZSdyZSBsb29raW5nIGF0IHRoZSBzYW1lIHByb21pc2UsIG90aGVyd2lzZSBkbyBub3RoaW5nXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoKHN0YXRlLCBjdXJyZW50UHJvcHMpID0+ICh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IGN1cnJlbnRQcm9wcy5kYXRhID09PSBkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gY3VycmVudFByb3BzLmNvbnZlcnRUb0pTWEZ1bmMocGF5bG9hZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBzdGF0ZS5jb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LCAoKSA9PiB0aGlzLnNldFN0YXRlKHtjb21wb25lbnQ6IGZhbHNlfSkpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5zZXRTdGF0ZSh7Y29tcG9uZW50OiBwcm9wcy5jb252ZXJ0VG9KU1hGdW5jKGRhdGEpfSk7XG4gICAgfVxuXG4gICAgZmlyZUNhbGxiYWNrSWZEYXRhUmVuZGVyZWQoKSB7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlLmNvbXBvbmVudCkge1xuICAgICAgICAgICAgdGhpcy5wcm9wcy5jb250ZW50UmVuZGVyZWRGdW5jKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb21wb25lbnRXaWxsTW91bnQoKSAgICAgICAgICAgICAgICAgeyB0aGlzLmNvbnZlcnREYXRhVG9KU1hPcldhaXQoKTsgfVxuICAgIGNvbXBvbmVudERpZE1vdW50KCkgICAgICAgICAgICAgICAgICB7IHRoaXMubW91bnRlZCA9IHRydWU7IHRoaXMuZmlyZUNhbGxiYWNrSWZEYXRhUmVuZGVyZWQoKTsgfVxuICAgIGNvbXBvbmVudERpZFVwZGF0ZSgpICAgICAgICAgICAgICAgICB7IHRoaXMuZmlyZUNhbGxiYWNrSWZEYXRhUmVuZGVyZWQoKTsgfVxuICAgIGNvbXBvbmVudFdpbGxSZWNlaXZlUHJvcHMobmV4dFByb3BzKSB7IHRoaXMuY29udmVydERhdGFUb0pTWE9yV2FpdChuZXh0UHJvcHMpOyB9XG4gICAgY29tcG9uZW50V2lsbFVubW91bnQoKSAgICAgICAgICAgICAgIHsgdGhpcy5tb3VudGVkID0gZmFsc2U7IH1cblxuICAgIGdldENsYXNzZXMoZXh0cmFDbGFzc2VzKSB7XG4gICAgICAgIHJldHVybiBjeCgnYi1hc3luYycsIHRoaXMucHJvcHMuY2xhc3NOYW1lLCBleHRyYUNsYXNzZXMsIHtcbiAgICAgICAgICAgICdiLWFzeW5jLWVycm9yJzogdGhpcy5zdGF0ZS5jb21wb25lbnQgPT09IGZhbHNlLFxuICAgICAgICAgICAgJ2ItYXN5bmMtbG9hZGluZyc6IHRoaXMuc3RhdGUuY29tcG9uZW50ID09PSBudWxsLFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlLmNvbXBvbmVudCA9PT0gbnVsbCB8fCB0aGlzLnN0YXRlLmNvbXBvbmVudCA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdiB7Li4ub21pdCh0aGlzLnByb3BzLCBBc3luYy5pbnRlcm5hbEtleXMpfSBjbGFzc05hbWU9e3RoaXMuZ2V0Q2xhc3NlcygpfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMuc3RhdGUuY29tcG9uZW50ID09PSBudWxsXG4gICAgICAgICAgICAgICAgICAgICA/IHRoaXMucHJvcHMubG9hZGluZ0NvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgIDogdGhpcy5wcm9wcy5lcnJvckNvbnRlbnR9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIFJlYWN0LmNsb25lRWxlbWVudCh0aGlzLnN0YXRlLmNvbXBvbmVudCwge1xuICAgICAgICAgICAgLi4ub21pdCh0aGlzLnByb3BzLCBBc3luYy5pbnRlcm5hbEtleXMpLFxuICAgICAgICAgICAgY2xhc3NOYW1lOiB0aGlzLmdldENsYXNzZXModGhpcy5zdGF0ZS5jb21wb25lbnQucHJvcHMgJiYgdGhpcy5zdGF0ZS5jb21wb25lbnQucHJvcHMuY2xhc3NOYW1lKSxcbiAgICAgICAgfSk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWFzeW5jL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "boundless-async", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A higher-order component for rendering data that isn't ready yet.", | ||
"author": "Evan Scott <glitterbyte@gmail.com> (http://yaycmyk.com) (http://yaycmyk.com)", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -23,7 +24,5 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -30,0 +29,0 @@ "react": ">= 15.3", |
@@ -67,1 +67,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=5)}([function(e,n,t){"use strict";n.a=function(e){return"function"==typeof e}},function(e,n,t){"use strict";function r(){}n.a=r},function(e,n,t){"use strict";function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(t,r){return n.indexOf(r)===-1&&(t[r]=e[r]),t},{})}n.a=r},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function s(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var p=t(4),i=t.n(p),u=t(3),c=t.n(u),a=t(0),l=t(1),f=t(2),d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),b=function(e){function n(){var e,s,p,i;r(this,n);for(var u=arguments.length,c=Array(u),l=0;l<u;l++)c[l]=arguments[l];return s=p=o(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(c))),p.handleClick=function(e){p.props.disabled||(p.toggleState(e),t.i(a.a)(p.props.onClick)&&p.props.onClick(e))},p.handleKeyDown=function(e){if(!p.props.disabled){switch(e.key){case"Enter":case"Space":e.preventDefault(),p.toggleState(e)}t.i(a.a)(p.props.onKeyDown)&&p.props.onKeyDown(e)}},i=s,o(p,i)}return s(n,e),y(n,[{key:"toggleState",value:function(e){this.props[this.props.pressed?"onUnpressed":"onPressed"](e)}},{key:"render",value:function(){return i.a.createElement(this.props.component,d({},t.i(f.a)(this.props,n.internalKeys),{ref:"button",className:c()("b-button",this.props.className,{"b-button-pressable":"undefined"!=typeof this.props.pressed,"b-button-pressed":this.props.pressed}),"aria-pressed":this.props.pressed,onKeyDown:this.handleKeyDown,onClick:this.handleClick}),this.props.children)}}]),n}(i.a.PureComponent);b.propTypes={children:p.PropTypes.node,component:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.func]),onClick:p.PropTypes.func,onPressed:p.PropTypes.func,onUnpressed:p.PropTypes.func,pressed:p.PropTypes.bool},b.defaultProps={children:null,component:"button",onClick:l.a,onPressed:l.a,onUnpressed:l.a,pressed:void 0},b.internalKeys=Object.keys(b.defaultProps),n.default=b}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,e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gYWJvdmUpXG4gICAgICAgICAqL1xuICAgICAgICBwcmVzc2VkOiBQcm9wVHlwZXMuYm9vbCxcbiAgICB9XG5cbiAgICBzdGF0aWMgZGVmYXVsdFByb3BzID0ge1xuICAgICAgICBjaGlsZHJlbjogbnVsbCxcbiAgICAgICAgY29tcG9uZW50OiAnYnV0dG9uJyxcbiAgICAgICAgb25DbGljazogbm9vcCxcbiAgICAgICAgb25QcmVzc2VkOiBub29wLFxuICAgICAgICBvblVucHJlc3NlZDogbm9vcCxcbiAgICAgICAgcHJlc3NlZDogdW5kZWZpbmVkLFxuICAgIH1cblxuICAgIHN0YXRpYyBpbnRlcm5hbEtleXMgPSBPYmplY3Qua2V5cyhCdXR0b24uZGVmYXVsdFByb3BzKVxuXG4gICAgdG9nZ2xlU3RhdGUoZXZlbnQpIHtcbiAgICAgICAgdGhpcy5wcm9wc1t0aGlzLnByb3BzLnByZXNzZWQgPyAnb25VbnByZXNzZWQnIDogJ29uUHJlc3NlZCddKGV2ZW50KTtcbiAgICB9XG5cbiAgICBoYW5kbGVDbGljayA9IChldmVudCkgPT4ge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5kaXNhYmxlZCkgeyByZXR1cm47IH1cblxuICAgICAgICB0aGlzLnRvZ2dsZVN0YXRlKGV2ZW50KTtcblxuICAgICAgICBpZiAoaXNGdW5jdGlvbih0aGlzLnByb3BzLm9uQ2xpY2spKSB7XG4gICAgICAgICAgICB0aGlzLnByb3BzLm9uQ2xpY2soZXZlbnQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgaGFuZGxlS2V5RG93biA9IChldmVudCkgPT4ge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5kaXNhYmxlZCkgeyByZXR1cm47IH1cblxuICAgICAgICBzd2l0Y2ggKGV2ZW50LmtleSkge1xuICAgICAgICBjYXNlICdFbnRlcic6XG4gICAgICAgIGNhc2UgJ1NwYWNlJzpcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB0aGlzLnRvZ2dsZVN0YXRlKGV2ZW50KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0Z1bmN0aW9uKHRoaXMucHJvcHMub25LZXlEb3duKSkge1xuICAgICAgICAgICAgdGhpcy5wcm9wcy5vbktleURvd24oZXZlbnQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRoaXMucHJvcHMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgQnV0dG9uLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgcmVmPSdidXR0b24nXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1idXR0b24nLCB0aGlzLnByb3BzLmNsYXNzTmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAnYi1idXR0b24tcHJlc3NhYmxlJzogdHlwZW9mIHRoaXMucHJvcHMucHJlc3NlZCAhPT0gJ3VuZGVmaW5lZCcsXG4gICAgICAgICAgICAgICAgICAgICdiLWJ1dHRvbi1wcmVzc2VkJzogdGhpcy5wcm9wcy5wcmVzc2VkLFxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIGFyaWEtcHJlc3NlZD17dGhpcy5wcm9wcy5wcmVzc2VkfVxuICAgICAgICAgICAgICAgIG9uS2V5RG93bj17dGhpcy5oYW5kbGVLZXlEb3dufVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e3RoaXMuaGFuZGxlQ2xpY2t9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmNoaWxkcmVufVxuICAgICAgICAgICAgPC90aGlzLnByb3BzLmNvbXBvbmVudD5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtYnV0dG9uL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
module.exports=function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([function(e,n,t){"use strict";function r(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(t,r){return n.indexOf(r)===-1&&(t[r]=e[r]),t},{})}n.a=r},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n,t){"use strict";function r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function s(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var p=t(2),i=t.n(p),u=t(1),c=t.n(u),a=t(0),l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),d=function(e){return"function"==typeof e},y=function(){},b=function(e){function n(){var e,t,s,p;r(this,n);for(var i=arguments.length,u=Array(i),c=0;c<i;c++)u[c]=arguments[c];return t=s=o(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),s.handleClick=function(e){s.props.disabled||(s.toggleState(e),d(s.props.onClick)&&s.props.onClick(e))},s.handleKeyDown=function(e){if(!s.props.disabled){switch(e.key){case"Enter":case"Space":e.preventDefault(),s.toggleState(e)}d(s.props.onKeyDown)&&s.props.onKeyDown(e)}},p=t,o(s,p)}return s(n,e),f(n,[{key:"toggleState",value:function(e){this.props[this.props.pressed?"onUnpressed":"onPressed"](e)}},{key:"render",value:function(){return i.a.createElement(this.props.component,l({},t.i(a.a)(this.props,n.internalKeys),{ref:"button",className:c()("b-button",this.props.className,{"b-button-pressable":"undefined"!=typeof this.props.pressed,"b-button-pressed":this.props.pressed}),"aria-pressed":this.props.pressed,onKeyDown:this.handleKeyDown,onClick:this.handleClick}),this.props.children)}}]),n}(i.a.PureComponent);b.propTypes={children:p.PropTypes.node,component:p.PropTypes.oneOfType([p.PropTypes.string,p.PropTypes.func]),onClick:p.PropTypes.func,onPressed:p.PropTypes.func,onUnpressed:p.PropTypes.func,pressed:p.PropTypes.bool},b.defaultProps={children:null,component:"button",onClick:y,onPressed:y,onUnpressed:y,pressed:void 0},b.internalKeys=Object.keys(b.defaultProps),n.default=b}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGI2YWUwMzAwZjdkODNiZTc5YzcwIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJu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10oZXZlbnQpO1xuICAgIH1cblxuICAgIGhhbmRsZUNsaWNrID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmRpc2FibGVkKSB7IHJldHVybjsgfVxuXG4gICAgICAgIHRoaXMudG9nZ2xlU3RhdGUoZXZlbnQpO1xuXG4gICAgICAgIGlmIChpc0Z1bmN0aW9uKHRoaXMucHJvcHMub25DbGljaykpIHtcbiAgICAgICAgICAgIHRoaXMucHJvcHMub25DbGljayhldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBoYW5kbGVLZXlEb3duID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmRpc2FibGVkKSB7IHJldHVybjsgfVxuXG4gICAgICAgIHN3aXRjaCAoZXZlbnQua2V5KSB7XG4gICAgICAgIGNhc2UgJ0VudGVyJzpcbiAgICAgICAgY2FzZSAnU3BhY2UnOlxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMudG9nZ2xlU3RhdGUoZXZlbnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzRnVuY3Rpb24odGhpcy5wcm9wcy5vbktleURvd24pKSB7XG4gICAgICAgICAgICB0aGlzLnByb3BzLm9uS2V5RG93bihldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBCdXR0b24uaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J2J1dHRvbidcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWJ1dHRvbicsIHRoaXMucHJvcHMuY2xhc3NOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICdiLWJ1dHRvbi1wcmVzc2FibGUnOiB0eXBlb2YgdGhpcy5wcm9wcy5wcmVzc2VkICE9PSAndW5kZWZpbmVkJyxcbiAgICAgICAgICAgICAgICAgICAgJ2ItYnV0dG9uLXByZXNzZWQnOiB0aGlzLnByb3BzLnByZXNzZWQsXG4gICAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgICAgYXJpYS1wcmVzc2VkPXt0aGlzLnByb3BzLnByZXNzZWR9XG4gICAgICAgICAgICAgICAgb25LZXlEb3duPXt0aGlzLmhhbmRsZUtleURvd259XG4gICAgICAgICAgICAgICAgb25DbGljaz17dGhpcy5oYW5kbGVDbGlja30+XG4gICAgICAgICAgICAgICAge3RoaXMucHJvcHMuY2hpbGRyZW59XG4gICAgICAgICAgICA8L3RoaXMucHJvcHMuY29tcG9uZW50PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1idXR0b24vaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const isFunction = (x) => typeof x === 'function'; | ||
const noop = () => {}; | ||
/** | ||
@@ -9,0 +10,0 @@ # Button |
{ | ||
"name": "boundless-button", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A control with \"pressed\" state support.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -28,7 +29,3 @@ "type": "git", | ||
"dependencies": { | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-is-function": "^1.0.0", | ||
"boundless-utils-noop": "^1.0.0", | ||
"classnames": "^2.1.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
@@ -35,0 +32,0 @@ }, |
@@ -64,3 +64,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></td> | ||
@@ -72,3 +72,3 @@ </tr> | ||
<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>called when the element becomes "pressed" or triggered by the user (mouse or keyboard); backing data must be updated to persist the state change; this function will still be called if `props.pressed` is not passed</td> | ||
@@ -80,3 +80,3 @@ </tr> | ||
<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>called when the element becomes "unpressed"; backing data must be updated to persist the state change</td> | ||
@@ -94,1 +94,2 @@ </tr> | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";function r(){}t.a=r},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t,n){"use strict";function r(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=r},function(e,t){e.exports=require("boundless-checkbox")},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(5),c=n.n(l),i=n(4),p=n.n(i),u=n(3),a=n.n(u),f=n(1),h=n(0),d=n(2),y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),b=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),P(t,[{key:"allItemsChecked",value:function(){return this.props.items.every(function(e){return e.inputProps.checked===!0})}},{key:"anyItemsChecked",value:function(){return this.props.items.some(function(e){return e.inputProps.checked===!0})}},{key:"renderSelectAll",value:function(){if(this.props.selectAll){var e=this.allItemsChecked(),t=this.props.selectAllProps.inputProps;return c.a.createElement(a.a,y({},this.props.selectAllProps,{ref:"select_all",key:"cb_select_all",className:p()("b-checkbox-group-selectall",this.props.selectAllProps.className),inputProps:y({},t,{checked:e,indeterminate:!e&&this.anyItemsChecked(),name:t&&t.name?t.name:"cb_select_all"}),label:this.props.selectAllProps.label||"Select All",onChecked:this.props.onAllChecked,onUnchecked:this.props.onAllUnchecked}))}}},{key:"renderCheckboxes",value:function(){var e=this;return this.props.items.map(function(t){return c.a.createElement(a.a,y({},t,{key:t.inputProps.name,onChecked:e.props.onChildChecked,onUnchecked:e.props.onChildUnchecked}))})}},{key:"renderChildren",value:function(){var e=[this.renderCheckboxes()];if(this.props.selectAll&&this.props.selectAllPosition)switch(this.props.selectAllPosition){case t.selectAllPosition.BEFORE:e.unshift(this.renderSelectAll());break;case t.selectAllPosition.AFTER:e.push(this.renderSelectAll())}return e}},{key:"render",value:function(){return c.a.createElement("div",y({},n.i(f.a)(this.props,t.internalKeys),{ref:"group",className:p()("b-checkbox-group",this.props.className)}),this.renderChildren())}}]),t}(c.a.PureComponent);b.selectAllPosition={BEFORE:n.i(d.a)(),AFTER:n.i(d.a)()},b.propTypes={items:l.PropTypes.arrayOf(a.a.propTypes.inputProps).isRequired,onAllChecked:l.PropTypes.func,onAllUnchecked:l.PropTypes.func,onChildChecked:l.PropTypes.func,onChildUnchecked:l.PropTypes.func,selectAll:l.PropTypes.bool,selectAllProps:l.PropTypes.shape({label:l.PropTypes.string,inputProps:l.PropTypes.object}),selectAllPosition:l.PropTypes.oneOf([b.selectAllPosition.BEFORE,b.selectAllPosition.AFTER])},b.defaultProps={items:[],onAllChecked:h.a,onAllUnchecked:h.a,onChildChecked:h.a,onChildUnchecked:h.a,selectAll:!1,selectAllProps:{},selectAllPosition:b.selectAllPosition.BEFORE},b.internalKeys=Object.keys(b.defaultProps),t.default=b}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDQ4YzkyOGExYzU3ZWU5MTZkMjAwIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1ub29wL2luZGV4LmpzIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2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l0ZW1zQ2hlY2tlZCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucHJvcHMuaXRlbXMuZXZlcnkoKGl0ZW0pID0+IGl0ZW0uaW5wdXRQcm9wcy5jaGVja2VkID09PSB0cnVlKTtcbiAgICB9XG5cbiAgICBhbnlJdGVtc0NoZWNrZWQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLml0ZW1zLnNvbWUoKGl0ZW0pID0+IGl0ZW0uaW5wdXRQcm9wcy5jaGVja2VkID09PSB0cnVlKTtcbiAgICB9XG5cbiAgICByZW5kZXJTZWxlY3RBbGwoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLnNlbGVjdEFsbCkge1xuICAgICAgICAgICAgY29uc3QgYWxsQ2hlY2tlZCA9IHRoaXMuYWxsSXRlbXNDaGVja2VkKCk7XG4gICAgICAgICAgICBjb25zdCB7aW5wdXRQcm9wc30gPSB0aGlzLnByb3BzLnNlbGVjdEFsbFByb3BzO1xuXG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxDaGVja2JveFxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5zZWxlY3RBbGxQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcmVmPSdzZWxlY3RfYWxsJ1xuICAgICAgICAgICAgICAgICAgICBrZXk9J2NiX3NlbGVjdF9hbGwnXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItY2hlY2tib3gtZ3JvdXAtc2VsZWN0YWxsJywgdGhpcy5wcm9wcy5zZWxlY3RBbGxQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBpbnB1dFByb3BzPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5pbnB1dFByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogYWxsQ2hlY2tlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV0ZXJtaW5hdGU6ICFhbGxDaGVja2VkICYmIHRoaXMuYW55SXRlbXNDaGVja2VkKCksXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dFByb3BzICYmIGlucHV0UHJvcHMubmFtZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dFByb3BzLm5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJ2NiX3NlbGVjdF9hbGwnLFxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICBsYWJlbD17dGhpcy5wcm9wcy5zZWxlY3RBbGxQcm9wcy5sYWJlbCB8fCAnU2VsZWN0IEFsbCd9XG4gICAgICAgICAgICAgICAgICAgIG9uQ2hlY2tlZD17dGhpcy5wcm9wcy5vbkFsbENoZWNrZWR9XG4gICAgICAgICAgICAgICAgICAgIG9uVW5jaGVja2VkPXt0aGlzLnByb3BzLm9uQWxsVW5jaGVja2VkfSAvPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckNoZWNrYm94ZXMoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLml0ZW1zLm1hcCgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICAgICAgICAgICAgey4uLml0ZW19XG4gICAgICAgICAgICAgICAgICAgIGtleT17aXRlbS5pbnB1dFByb3BzLm5hbWV9XG4gICAgICAgICAgICAgICAgICAgIG9uQ2hlY2tlZD17dGhpcy5wcm9wcy5vbkNoaWxkQ2hlY2tlZH1cbiAgICAgICAgICAgICAgICAgICAgb25VbmNoZWNrZWQ9e3RoaXMucHJvcHMub25DaGlsZFVuY2hlY2tlZH0gLz5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHJlbmRlckNoaWxkcmVuKCkge1xuICAgICAgICBjb25zdCB0b0JlUmV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1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtY2hlY2tib3gtZ3JvdXAvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t,n){"use strict";function r(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=r},function(e,t){e.exports=require("boundless-checkbox")},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(4),c=n.n(l),i=n(3),p=n.n(i),u=n(2),a=n.n(u),f=n(0),h=n(1),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),P=function(){},b=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),y(t,[{key:"allItemsChecked",value:function(){return this.props.items.every(function(e){return e.inputProps.checked===!0})}},{key:"anyItemsChecked",value:function(){return this.props.items.some(function(e){return e.inputProps.checked===!0})}},{key:"renderSelectAll",value:function(){if(this.props.selectAll){var e=this.allItemsChecked(),t=this.props.selectAllProps.inputProps;return c.a.createElement(a.a,d({},this.props.selectAllProps,{ref:"select_all",key:"cb_select_all",className:p()("b-checkbox-group-selectall",this.props.selectAllProps.className),inputProps:d({},t,{checked:e,indeterminate:!e&&this.anyItemsChecked(),name:t&&t.name?t.name:"cb_select_all"}),label:this.props.selectAllProps.label||"Select All",onChecked:this.props.onAllChecked,onUnchecked:this.props.onAllUnchecked}))}}},{key:"renderCheckboxes",value:function(){var e=this;return this.props.items.map(function(t){return c.a.createElement(a.a,d({},t,{key:t.inputProps.name,onChecked:e.props.onChildChecked,onUnchecked:e.props.onChildUnchecked}))})}},{key:"renderChildren",value:function(){var e=[this.renderCheckboxes()];if(this.props.selectAll&&this.props.selectAllPosition)switch(this.props.selectAllPosition){case t.selectAllPosition.BEFORE:e.unshift(this.renderSelectAll());break;case t.selectAllPosition.AFTER:e.push(this.renderSelectAll())}return e}},{key:"render",value:function(){return c.a.createElement("div",d({},n.i(f.a)(this.props,t.internalKeys),{ref:"group",className:p()("b-checkbox-group",this.props.className)}),this.renderChildren())}}]),t}(c.a.PureComponent);b.selectAllPosition={BEFORE:n.i(h.a)(),AFTER:n.i(h.a)()},b.propTypes={items:l.PropTypes.arrayOf(a.a.propTypes.inputProps).isRequired,onAllChecked:l.PropTypes.func,onAllUnchecked:l.PropTypes.func,onChildChecked:l.PropTypes.func,onChildUnchecked:l.PropTypes.func,selectAll:l.PropTypes.bool,selectAllProps:l.PropTypes.shape({label:l.PropTypes.string,inputProps:l.PropTypes.object}),selectAllPosition:l.PropTypes.oneOf([b.selectAllPosition.BEFORE,b.selectAllPosition.AFTER])},b.defaultProps={items:[],onAllChecked:P,onAllUnchecked:P,onChildChecked:P,onChildUnchecked:P,selectAll:!1,selectAllProps:{},selectAllPosition:b.selectAllPosition.BEFORE},b.internalKeys=Object.keys(b.defaultProps),t.default=b}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGE0MDdiMWQ3M2Y2NWYwMGI1MGYxIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLXV0aWxzLXV1aWQvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLWNoZWNrYm94XCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImNsYXNzbmFtZXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwicmVhY3RcIn0iLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLWNoZWNrYm94LWdyb3VwL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiaW5zdGFsbGVkTW9kdWxlcyIsImkiLCJsIiwiY2FsbCIs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ywgdGhpcy5wcm9wcy5zZWxlY3RBbGxQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBpbnB1dFByb3BzPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5pbnB1dFByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tlZDogYWxsQ2hlY2tlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV0ZXJtaW5hdGU6ICFhbGxDaGVja2VkICYmIHRoaXMuYW55SXRlbXNDaGVja2VkKCksXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpbnB1dFByb3BzICYmIGlucHV0UHJvcHMubmFtZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBpbnB1dFByb3BzLm5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogJ2NiX3NlbGVjdF9hbGwnLFxuICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICBsYWJlbD17dGhpcy5wcm9wcy5zZWxlY3RBbGxQcm9wcy5sYWJlbCB8fCAnU2VsZWN0IEFsbCd9XG4gICAgICAgICAgICAgICAgICAgIG9uQ2hlY2tlZD17dGhpcy5wcm9wcy5vbkFsbENoZWNrZWR9XG4gICAgICAgICAgICAgICAgICAgIG9uVW5jaGVja2VkPXt0aGlzLnByb3BzLm9uQWxsVW5jaGVja2VkfSAvPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckNoZWNrYm94ZXMoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLml0ZW1zLm1hcCgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8Q2hlY2tib3hcbiAgICAgICAgICAgICAgICAgICAgey4uLml0ZW19XG4gICAgICAgICAgICAgICAgICAgIGtleT17aXRlbS5pbnB1dFByb3BzLm5hbWV9XG4gICAgICAgICAgICAgICAgICA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2dyb3VwJ1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItY2hlY2tib3gtZ3JvdXAnLCB0aGlzLnByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckNoaWxkcmVuKCl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtY2hlY2tib3gtZ3JvdXAvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
@@ -5,6 +5,7 @@ import React, {PropTypes} from 'react'; | ||
import Checkbox from 'boundless-checkbox'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import uuid from '../boundless-utils-uuid/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
import uuid from 'boundless-utils-uuid'; | ||
const noop = () => {}; | ||
/** | ||
@@ -11,0 +12,0 @@ # CheckboxGroup |
{ | ||
"name": "boundless-checkbox-group", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A controller view for managing the aggregate state of multiple, related checkboxes.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -29,10 +30,7 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-checkbox": "^1.0.0-beta.4", | ||
"boundless-checkbox": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-uuid": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-noop": "^1.0.0", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3", | ||
"boundless-utils-uuid": "^1.0.0" | ||
}, | ||
"peerDependencies": { | ||
@@ -39,0 +37,0 @@ "react": ">= 15.3", |
@@ -46,3 +46,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>called when all children become checked (not fired on first render), no return</td> | ||
@@ -54,3 +54,3 @@ </tr> | ||
<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>called when all children become unchecked (not fired on first render), no return</td> | ||
@@ -62,3 +62,3 @@ </tr> | ||
<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>called when a specific child has become checked, returns the child definition</td> | ||
@@ -70,3 +70,3 @@ </tr> | ||
<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>called when a specific child has become checked, returns the child definition</td> | ||
@@ -99,1 +99,2 @@ </tr> | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){"use strict";t.a=function(e){return"function"==typeof e}},function(e,t,n){"use strict";function r(){}t.a=r},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t,n){"use strict";function r(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=r},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=n(5),s=n.n(p),a=n(4),c=n.n(a),u=n(0),l=n(1),f=n(2),h=n(3),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),P=function(e){function t(){var e,i,p,s;r(this,t);for(var a=arguments.length,c=Array(a),l=0;l<a;l++)c[l]=arguments[l];return i=p=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),p.id=n.i(h.a)(),p.handleChange=function(e){p.props.inputProps.disabled||(p.props[p.props.inputProps.checked?"onUnchecked":"onChecked"](p.props.inputProps.name),n.i(u.a)(p.props.inputProps.onChange)&&p.props.inputProps.onChange(e))},p.handleClick=function(e){p.props.inputProps.disabled||(p.refs.input.focus(),n.i(u.a)(p.props.inputProps.onClick)&&p.props.inputProps.onClick(e))},s=i,o(p,s)}return i(t,e),b(t,[{key:"componentDidMount",value:function(){this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"componentDidUpdate",value:function(e){e.inputProps.indeterminate!==this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"setIndeterminate",value:function(){this.refs.input.indeterminate=!!this.props.inputProps.indeterminate}},{key:"getAriaState",value:function(){return this.props.inputProps.indeterminate?"mixed":String(this.props.inputProps.checked)}},{key:"renderInput",value:function(){return s.a.createElement("input",d({},n.i(f.a)(this.props.inputProps,"indeterminate"),{ref:"input",type:"checkbox",className:c()("b-checkbox",this.props.inputProps.className,{"b-checkbox-mixed":this.props.inputProps.indeterminate,"b-checkbox-checked":this.props.inputProps.checked,"b-checkbox-unchecked":!this.props.inputProps.indeterminate&&!this.props.inputProps.checked}),id:this.props.inputProps.id||this.id,"aria-checked":this.getAriaState(),onChange:this.handleChange,onClick:this.handleClick}))}},{key:"renderLabel",value:function(){if(this.props.label)return s.a.createElement("label",d({},this.props.labelProps,{ref:"label",className:c()("b-checkbox-label",this.props.labelProps.className),htmlFor:this.props.inputProps.id||this.id}),this.props.label)}},{key:"render",value:function(){return s.a.createElement("div",d({},n.i(f.a)(this.props,t.internalKeys),{ref:"wrapper",className:c()("b-checkbox-wrapper",this.props.className)}),this.renderInput(),this.renderLabel())}}]),t}(s.a.PureComponent);P.propTypes={inputProps:p.PropTypes.shape({checked:p.PropTypes.bool,className:p.PropTypes.string,disabled:p.PropTypes.bool,id:p.PropTypes.string,indeterminate:p.PropTypes.bool,onChange:p.PropTypes.func,onClick:p.PropTypes.func,name:p.PropTypes.string,value:p.PropTypes.string}),label:p.PropTypes.node,labelProps:p.PropTypes.object,onChecked:p.PropTypes.func,onUnchecked:p.PropTypes.func},P.defaultProps={inputProps:{checked:!1,indeterminate:!1},label:null,labelProps:{},onChecked:l.a,onUnchecked:l.a},P.internalKeys=Object.keys(P.defaultProps),t.default=P}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY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ICAgICByZXR1cm4gdGhpcy5wcm9wcy5pbnB1dFByb3BzLmluZGV0ZXJtaW5hdGUgPyAnbWl4ZWQnIDogU3RyaW5nKHRoaXMucHJvcHMuaW5wdXRQcm9wcy5jaGVja2VkKTtcbiAgICB9XG5cbiAgICByZW5kZXJJbnB1dCgpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICAgIHsuLi5vbWl0KHRoaXMucHJvcHMuaW5wdXRQcm9wcywgJ2luZGV0ZXJtaW5hdGUnKX1cbiAgICAgICAgICAgICAgICByZWY9J2lucHV0J1xuICAgICAgICAgICAgICAgIHR5cGU9J2NoZWNrYm94J1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItY2hlY2tib3gnLCB0aGlzLnByb3BzLmlucHV0UHJvcHMuY2xhc3NOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICdiLWNoZWNrYm94LW1peGVkJzogdGhpcy5wcm9wcy5pbnB1dFByb3BzLmluZGV0ZXJtaW5hdGUsXG4gICAgICAgICAgICAgICAgICAgICdiLWNoZWNrYm94LWNoZWNrZWQnOiB0aGlzLnByb3BzLmlucHV0UHJvcHMuY2hlY2tlZCxcbiAgICAgICAgICAgICAgICAgICAgJ2ItY2hlY2tib3gtdW5jaGVja2VkJzogIXRoaXMucHJvcHMuaW5wdXRQcm9wcy5pbmRldGVybWluYXRlICYmICF0aGlzLnByb3BzLmlucHV0UHJvcHMuY2hlY2tlZCxcbiAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICBpZD17dGhpcy5wcm9wcy5pbnB1dFByb3BzLmlkIHx8IHRoaXMuaWR9XG4gICAgICAgICAgICAgICAgYXJpYS1jaGVja2VkPXt0aGlzLmdldEFyaWFTdGF0ZSgpfVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXt0aGlzLmhhbmRsZUNoYW5nZX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXt0aGlzLmhhbmRsZUNsaWNrfSAvPlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlckxhYmVsKCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5sYWJlbCkge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8bGFiZWxcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMubGFiZWxQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcmVmPSdsYWJlbCdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1jaGVja2JveC1sYWJlbCcsIHRoaXMucHJvcHMubGFiZWxQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBodG1sRm9yPXt0aGlzLnByb3BzLmlucHV0UHJvcHMuaWQgfHwgdGhpcy5pZH0+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmxhYmVsfVxuICAgICAgICAgICAgICAgIDwvbGFiZWw+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHsuLi5vbWl0KHRoaXMucHJvcHMsIENoZWNrYm94LmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgcmVmPSd3cmFwcGVyJ1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItY2hlY2tib3gtd3JhcHBlcicsIHRoaXMucHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVySW5wdXQoKX1cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJMYWJlbCgpfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWNoZWNrYm94L2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t,n){"use strict";function r(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=r},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=n.n(i),a=n(2),c=n.n(a),u=n(0),l=n(1),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=function(e){return"function"==typeof e},b=function(){},P=function(e){function t(){var e,p,i,s;r(this,t);for(var a=arguments.length,c=Array(a),u=0;u<a;u++)c[u]=arguments[u];return p=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),i.id=n.i(l.a)(),i.handleChange=function(e){i.props.inputProps.disabled||(i.props[i.props.inputProps.checked?"onUnchecked":"onChecked"](i.props.inputProps.name),d(i.props.inputProps.onChange)&&i.props.inputProps.onChange(e))},i.handleClick=function(e){i.props.inputProps.disabled||(i.refs.input.focus(),d(i.props.inputProps.onClick)&&i.props.inputProps.onClick(e))},s=p,o(i,s)}return p(t,e),h(t,[{key:"componentDidMount",value:function(){this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"componentDidUpdate",value:function(e){e.inputProps.indeterminate!==this.props.inputProps.indeterminate&&this.setIndeterminate()}},{key:"setIndeterminate",value:function(){this.refs.input.indeterminate=!!this.props.inputProps.indeterminate}},{key:"getAriaState",value:function(){return this.props.inputProps.indeterminate?"mixed":String(this.props.inputProps.checked)}},{key:"renderInput",value:function(){return s.a.createElement("input",f({},n.i(u.a)(this.props.inputProps,"indeterminate"),{ref:"input",type:"checkbox",className:c()("b-checkbox",this.props.inputProps.className,{"b-checkbox-mixed":this.props.inputProps.indeterminate,"b-checkbox-checked":this.props.inputProps.checked,"b-checkbox-unchecked":!this.props.inputProps.indeterminate&&!this.props.inputProps.checked}),id:this.props.inputProps.id||this.id,"aria-checked":this.getAriaState(),onChange:this.handleChange,onClick:this.handleClick}))}},{key:"renderLabel",value:function(){if(this.props.label)return s.a.createElement("label",f({},this.props.labelProps,{ref:"label",className:c()("b-checkbox-label",this.props.labelProps.className),htmlFor:this.props.inputProps.id||this.id}),this.props.label)}},{key:"render",value:function(){return s.a.createElement("div",f({},n.i(u.a)(this.props,t.internalKeys),{ref:"wrapper",className:c()("b-checkbox-wrapper",this.props.className)}),this.renderInput(),this.renderLabel())}}]),t}(s.a.PureComponent);P.propTypes={inputProps:i.PropTypes.shape({checked:i.PropTypes.bool,className:i.PropTypes.string,disabled:i.PropTypes.bool,id:i.PropTypes.string,indeterminate:i.PropTypes.bool,onChange:i.PropTypes.func,onClick:i.PropTypes.func,name:i.PropTypes.string,value:i.PropTypes.string}),label:i.PropTypes.node,labelProps:i.PropTypes.object,onChecked:i.PropTypes.func,onUnchecked:i.PropTypes.func},P.defaultProps={inputProps:{checked:!1,indeterminate:!1},label:null,labelProps:{},onChecked:b,onUnchecked:b},P.internalKeys=Object.keys(P.defaultProps),t.default=P}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDM2MmUyOThiZTVkMGUxZDI5MDJjIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLXV0aWxzLXV1aWQvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtY2hlY2tib3gvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuY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mRsZUNsaWNrID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmlucHV0UHJvcHMuZGlzYWJsZWQpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgdGhpcy5yZWZzLmlucHV0LmZvY3VzKCk7XG5cbiAgICAgICAgaWYgKGlzRnVuY3Rpb24odGhpcy5wcm9wcy5pbnB1dFByb3BzLm9uQ2xpY2spKSB7XG4gICAgICAgICAgICB0aGlzLnByb3BzLmlucHV0UHJvcHMub25DbGljayhldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRBcmlhU3RhdGUoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLmlucHV0UHJvcHMuaW5kZXRlcm1pbmF0ZSA/ICdtaXhlZCcgOiBTdHJpbmcodGhpcy5wcm9wcy5pbnB1dFByb3BzLmNoZWNrZWQpO1xuICAgIH1cblxuICAgIHJlbmRlcklucHV0KCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGlucHV0XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcy5pbnB1dFByb3BzLCAnaW5kZXRlcm1pbmF0ZScpfVxuICAgICAgICAgICAgICAgIHJlZj0naW5wdXQnXG4gICAgICAgICAgICAgICAgdHlwZT0nY2hlY2tib3gnXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1jaGVja2JveCcsIHRoaXMucHJvcHMuaW5wdXRQcm9wcy5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAgJ2ItY2hlY2tib3gtbWl4ZWQnOiB0aGlzLnByb3BzLmlucHV0UHJvcHMuaW5kZXRlcm1pbmF0ZSxcbiAgICAgICAgICAgICAgICAgICAgJ2ItY2hlY2tib3gtY2hlY2tlZCc6IHRoaXMucHJvcHMuaW5wdXRQcm9wcy5jaGVja2VkLFxuICAgICAgICAgICAgICAgICAgICAnYi1jaGVja2JveC11bmNoZWNrZWQnOiAhdGhpcy5wcm9wcy5pbnB1dFByb3BzLmluZGV0ZXJtaW5hdGUgJiYgIXRoaXMucHJvcHMuaW5wdXRQcm9wcy5jaGVja2VkLFxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIGlkPXt0aGlzLnByb3BzLmlucHV0UHJvcHMuaWQgfHwgdGhpcy5pZH1cbiAgICAgICAgICAgICAgICBhcmlhLWNoZWNrZWQ9e3RoaXMuZ2V0QXJpYVN0YXRlKCl9XG4gICAgICAgICAgICAgICAgb25DaGFuZ2U9e3RoaXMuaGFuZGxlQ2hhbmdlfVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9e3RoaXMuaGFuZGxlQ2xpY2t9IC8+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcmVuZGVyTGFiZWwoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmxhYmVsKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxsYWJlbFxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5sYWJlbFByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2xhYmVsJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWNoZWNrYm94LWxhYmVsJywgdGhpcy5wcm9wcy5sYWJlbFByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgICAgIGh0bWxGb3I9e3RoaXMucHJvcHMuaW5wdXRQcm9wcy5pZCB8fCB0aGlzLmlkfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMubGFiZWx9XG4gICAgICAgICAgICAgICAgPC9sYWJlbD5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgQ2hlY2tib3guaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1jaGVja2JveC13cmFwcGVyJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJJbnB1dCgpfVxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckxhYmVsKCl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtY2hlY2tib3gvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
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 = () => {}; | ||
/** | ||
@@ -10,0 +11,0 @@ # Checkbox |
{ | ||
"name": "boundless-checkbox", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "An accessible checkbox with indeterminate support.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,10 +27,6 @@ "type": "git", | ||
"dependencies": { | ||
"classnames": "^2.1.5" | ||
"classnames": "^2.1.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-uuid": "^1.0.0-beta.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": { | ||
@@ -36,0 +33,0 @@ "react": ">= 15.3", |
@@ -57,3 +57,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>called when the element becomes checked; backing data must be updated to persist the state change</td> | ||
@@ -65,3 +65,3 @@ </tr> | ||
<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>called when the element becomes unchecked; backing data must be updated to persist the state change</td> | ||
@@ -72,1 +72,2 @@ </tr> | ||
@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDQyM2NhMDAzMDFmNWFlODNkZDMwIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1pcy1mdW5jdGlvbi9pbmRleC5qcyIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtdXRpbHMtbm9vcC9pbmRleC5qcyIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtdXRpbHMtb21pdC1rZXlzL2luZGV4LmpzIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy11dWlkL2luZGV4LmpzIiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImJvdW5kbGVzcy1wb3J0YWxcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtZGlhbG9nL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiaW5zdGFsbGVkTW9kdWxlcyIsImkiLCJsIiwiY2FsbCIsIm0iLCJjIiwidmFsdWUiLCJkIiwibmFtZSIsImdldHRlciIsIm8iLCJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImNvbmZpZ3VyYWJsZSIsImVudW1lcmFibGUiL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Gl2ZUV2ZW50LnRhcmdldCkpIHtcbiAgICAgICAgICAgIHdpbmRvdy5zZXRUaW1lb3V0KHRoaXMucHJvcHMub25DbG9zZSwgMCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBoYW5kbGVPdXRzaWRlU2Nyb2xsV2hlZWwgPSAobmF0aXZlRXZlbnQpID0+IHtcbiAgICAgICAgaWYgKHRoaXMuc2hvdWxkRGlhbG9nQ2xvc2VPbkV2ZW50KCdjbG9zZU9uT3V0c2lkZVNjcm9sbCcsIG5hdGl2ZUV2ZW50KSAmJiAhdGhpcy5pc1BhcnRPZkRpYWxvZyhuYXRpdmVFdmVudC50YXJnZXQpKSB7XG4gICAgICAgICAgICB3aW5kb3cuc2V0VGltZW91dCh0aGlzLnByb3BzLm9uQ2xvc2UsIDApO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyQm9keSgpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5ib2R5UHJvcHN9XG4gICAgICAgICAgICAgICAgaWQ9e3RoaXMucHJvcHMuYm9keVByb3BzLmlkIHx8IHRoaXMudXVpZEJvZHl9XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaWFsb2ctYm9keScsIHRoaXMucHJvcHMuYm9keVByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmNoaWxkcmVufVxuICAgICAgICAgICAgPC9kaXY+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(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PZkRpYWxvZyhuYXRpdmVFdmVudC50YXJnZXQpKSB7XG4gICAgICAgICAgICB3aW5kb3cuc2V0VGltZW91dCh0aGlzLnByb3BzLm9uQ2xvc2UsIDApO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgaGFuZGxlT3V0c2lkZVNjcm9sbFdoZWVsID0gKG5hdGl2ZUV2ZW50KSA9PiB7XG4gICAgICAgIGlmICh0aGlzLnNob3VsZERpYWxvZ0Nsb3NlT25FdmVudCgnY2xvc2VPbk91dHNpZGVTY3JvbGwnLCBuYXRpdmVFdmVudCkgJiYgIXRoaXMuaXNQYXJ0T2ZEaWFsb2cobmF0aXZlRXZlbnQudGFyZ2V0KSkge1xuICAgICAgICAgICAgd2luZG93LnNldFRpbWVvdXQodGhpcy5wcm9wcy5vbkNsb3NlLCAwKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckJvZHkoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuYm9keVByb3BzfVxuICAgICAgICAgICAgICAgIGlkPXt0aGlzLnByb3BzLmJvZHlQcm9wcy5pZCB8fCB0aGlzLnV1aWRCb2R5fVxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLWJvZHknLCB0aGlzLnByb3BzLmJvZHlQcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlckZvb3RlcigpIHtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMuZm9vdGVyKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxmb290ZXJcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuZm9vdGVyUHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLWZvb3RlcicsIHRoaXMucHJvcHMuZm9vdGVyUHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmZvb3Rlcn1cbiAgICAgICAgICAgICAgICA8L2Zvb3Rlcj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJIZWFkZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmhlYWRlcikge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8aGVhZGVyXG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLmhlYWRlclByb3BzfVxuICAgICAgICAgICAgICAgICAgICBpZD17dGhpcy5wcm9wcy5oZWFkZXJQcm9wcy5pZCB8fCB0aGlzLnV1aWRIZWFkZXJ9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItZGlhbG9nLWhlYWRlcicsIHRoaXMucHJvcHMuaGVhZGVyUHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnByb3BzLmhlYWRlcn1cbiAgICAgICAgICAgICAgICA8L2hlYWRlcj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJGb2N1c0JvdW5kYXJ5KCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5jYXB0dXJlRm9jdXMpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Itb2Zmc2NyZWVuJyB0YWJJbmRleD0nMCcgYXJpYS1oaWRkZW49J3RydWUnPiZuYnNwOzwvZGl2PlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH0gLy8gdXNlZCB0byBsb2NrIGZvY3VzIGludG8gYSBwYXJ0aWN1bGFyIHN1YnNldCBvZiBET01cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy53cmFwcGVyUHJvcHN9XG4gICAgICAgICAgICAgICAgcmVmPXsobm9kZSkgPT4gKHRoaXMuJHdyYXBwZXIgPSBub2RlKX1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWRpYWxvZy13cmFwcGVyJywgdGhpcy5wcm9wcy53cmFwcGVyUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICB0YWJJbmRleD0nMCc+XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyRm9jdXNCb3VuZGFyeSgpfVxuXG4gICAgICAgICAgICAgICAge3RoaXMucHJvcHMuYmVmb3JlfVxuXG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBEaWFsb2cuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICAgICAgcmVmPXsobm9kZSkgPT4gKHRoaXMuJGRpYWxvZyA9IG5vZGUpfVxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWRpYWxvZycsIHRoaXMucHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17dGhpcy5oYW5kbGVJbnNpZGVDbGlja31cbiAgICAgICAgICAgICAgICAgICAgb25LZXlEb3duPXt0aGlzLmhhbmRsZUtleURvd259XG4gICAgICAgICAgICAgICAgICAgIHJvbGU9J2RpYWxvZydcbiAgICAgICAgICAgICAgICAgICAgYXJpYS1sYWJlbGxlZGJ5PXt0aGlzLnV1aWRIZWFkZXJ9XG4gICAgICAgICAgICAgICAgICAgIGFyaWEtZGVzY3JpYmVkYnk9e3RoaXMudXVpZEJvZHl9XG4gICAgICAgICAgICAgICAgICAgIHRhYkluZGV4PScwJz5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucmVuZGVySGVhZGVyKCl9XG4gICAgICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckJvZHkoKX1cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucmVuZGVyRm9vdGVyKCl9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5hZnRlcn1cblxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckZvY3VzQm91bmRhcnkoKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1kaWFsb2cvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
@@ -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 @@ } |
{ | ||
"name": "boundless-dialog", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"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.4", | ||
"boundless-portal": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"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> | ||
module.exports=function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,o){return t.indexOf(o)===-1&&(n[o]=e[o]),n},{})}t.a=o},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return parseInt(e,10)}function p(e){var t=n.i(d.findDOMNode)(e),o=window.getComputedStyle(t.parentNode),r=u(window.getComputedStyle(t).fontSize),i=u(o.height),p=u(o.width);"border-box"!==o.boxSizing&&"padding-box"!==o.boxSizing||(i-=u(o.paddingTop)+u(o.paddingBottom),p-=u(o.paddingLeft)+u(o.paddingRight));var a=Math.floor(r/t.offsetHeight*i),c=Math.floor(r/t.offsetWidth*p);t.style.fontSize=(Math.min(e.props.maxFontSize,a,c)||1)+"px"}function a(){v.forEach(function(e){return p(e)})}function c(e){0===v.length&&window.addEventListener("resize",a,!0),v.push(e)}function s(e){v.splice(v.indexOf(e),1),0===v.length&&window.removeEventListener("resize",a,!0)}Object.defineProperty(t,"__esModule",{value:!0});var f=n(2),l=n.n(f),d=n(3),y=(n.n(d),n(1)),h=n.n(y),b=n(0),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},g=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),v=[],x=function(e){function t(){return o(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),g(t,[{key:"componentDidMount",value:function(){p(this),c(this)}},{key:"componentDidUpdate",value:function(){p(this)}},{key:"componentWillUnmount",value:function(){s(this)}},{key:"render",value:function(){return l.a.createElement(this.props.component,m({},n.i(b.a)(this.props,t.internalKeys),{className:h()("b-text",this.props.className)}),this.props.children)}}]),t}(l.a.PureComponent);x.propTypes={component:f.PropTypes.oneOfType([f.PropTypes.string,f.PropTypes.func]),maxFontSize:f.PropTypes.number},x.defaultProps={component:"span",maxFontSize:Number.MAX_VALUE},x.internalKeys=Object.keys(x.defaultProps),t.default=x}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGNhM2ExZmU3NjVlZjc4Njk5ZTJlIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdC1kb21cIn0iLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLWZpdHRlZC10ZXh0L2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiaW5zdGFsbGVkTW9kdWxlcyIsImkiLCJsIiwiY2FsbCIsIm0iLCJjIiwidmFsdWUiLCJkIiwibmFtZSIsImdldHRlciIsIm8iLCJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImNvbmZpZ3VyYWJsZSIsImVudW1lcmFibGUiLCJnZXQiLCJuIiwiX19lc01vZHVsZSIsIm9iamVjdC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bGVzcy1maXR0ZWQtdGV4dC9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= |
import React, {PropTypes} from 'react'; | ||
import {findDOMNode} from 'react-dom'; | ||
import cx from 'classnames'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const instances = []; | ||
@@ -7,0 +8,0 @@ |
{ | ||
"name": "boundless-fitted-text", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "Fit given text inside a parent container, obeying implict and explicit constraints.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -29,7 +30,5 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -36,0 +35,0 @@ "react": ">= 15.3", |
@@ -43,1 +43,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(s){if(r[s])return r[s].exports;var o=r[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,s){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function s(){}t.a=s},function(e,t,r){"use strict";function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(r,s){return t.indexOf(s)===-1&&(r[s]=e[s]),r},{})}t.a=s},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,r){"use strict";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),i=r.n(a),u=r(2),p=r.n(u),l=r(0),c=r(1),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},d=function(){function e(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,r,s){return r&&e(t.prototype,r),s&&e(t,s),t}}(),m=function(e){function t(){var e,r,n,a;s(this,t);for(var i=arguments.length,u=Array(i),p=0;p<i;p++)u[p]=arguments[p];return r=n=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={status:t.status.LOADING},a=r,o(n,a)}return n(t,e),d(t,[{key:"componentWillReceiveProps",value:function(e){e.src!==this.props.src&&(this.resetPreloader(),this.setState({status:t.status.LOADING}))}},{key:"componentDidMount",value:function(){this.preload()}},{key:"componentDidUpdate",value:function(){this.preload()}},{key:"componentWillUnmount",value:function(){this.resetPreloader()}},{key:"resetPreloader",value:function(){this.loader.onload=null,this.loader.onerror=null,this.loader=null}},{key:"preload",value:function(){var e=this;this.loader||(this.loader=document.createElement("img"),this.loader.onload=function(){return e.setState({status:t.status.LOADED})},this.loader.onerror=function(){return e.setState({status:t.status.ERROR})},this.loader.src=this.props.src)}},{key:"renderImage",value:function(){return this.props.displayAsBackgroundImage?i.a.createElement("div",f({},this.props.imageProps,{ref:"image",className:p()("b-image",this.props.imageProps.className),title:this.props.alt,style:f({},this.props.imageProps.style,{backgroundImage:"url("+this.props.src+")"})})):i.a.createElement("img",f({},this.props.imageProps,{ref:"image",className:p()("b-image",this.props.imageProps.className),src:this.props.src,alt:this.props.alt,onLoad:l.a,onError:l.a}))}},{key:"renderStatus",value:function(){return i.a.createElement("div",f({},this.props.statusProps,{ref:"status",className:p()("b-image-status",this.props.statusProps.className,{"b-image-loading":this.state.status===t.status.LOADING,"b-image-loaded":this.state.status===t.status.LOADED,"b-image-error":this.state.status===t.status.ERROR}),role:"presentation"}))}},{key:"render",value:function(){return i.a.createElement("div",f({},r.i(c.a)(this.props,t.internalKeys),{ref:"wrapper",className:p()("b-image-wrapper",this.props.className)}),this.renderImage(),this.renderStatus())}}]),t}(i.a.PureComponent);m.status={LOADING:"LOADING",LOADED:"LOADED",ERROR:"ERROR"},m.propTypes={alt:a.PropTypes.string,displayAsBackgroundImage:a.PropTypes.bool,imageProps:a.PropTypes.object,src:a.PropTypes.string.isRequired,statusProps:a.PropTypes.object},m.defaultProps={alt:null,displayAsBackgroundImage:!1,imageProps:{},src:"about:blank",statusProps:{}},m.internalKeys=Object.keys(m.defaultProps),t.default=m}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGFmNWFiMDc2MGI4MDIxYjBiYTE2Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1ub29wL2luZGV4LmpzIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1l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KSB7XG4gICAgICAgIHRoaXMucHJlbG9hZCgpO1xuICAgIH1cblxuICAgIGNvbXBvbmVudERpZFVwZGF0ZSgpIHtcbiAgICAgICAgdGhpcy5wcmVsb2FkKCk7XG4gICAgfVxuXG4gICAgY29tcG9uZW50V2lsbFVubW91bnQoKSB7XG4gICAgICAgIHRoaXMucmVzZXRQcmVsb2FkZXIoKTtcbiAgICB9XG5cbiAgICByZXNldFByZWxvYWRlcigpIHtcbiAgICAgICAgdGhpcy5sb2FkZXIub25sb2FkID0gbnVsbDtcbiAgICAgICAgdGhpcy5sb2FkZXIub25lcnJvciA9IG51bGw7XG4gICAgICAgIHRoaXMubG9hZGVyID0gbnVsbDtcbiAgICB9XG5cbiAgICBwcmVsb2FkKCkge1xuICAgICAgICBpZiAodGhpcy5sb2FkZXIpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgdGhpcy5sb2FkZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdpbWcnKTtcblxuICAgICAgICB0aGlzLmxvYWRlci5vbmxvYWQgPSAoKSA9PiB0aGlzLnNldFN0YXRlKHtzdGF0dXM6IEltYWdlLnN0YXR1cy5MT0FERUR9KTtcbiAgICAgICAgdGhpcy5sb2FkZXIub25lcnJvciA9ICgpID0+IHRoaXMuc2V0U3RhdGUoe3N0YXR1czogSW1hZ2Uuc3RhdHVzLkVSUk9SfSk7XG5cbiAgICAgICAgdGhpcy5sb2FkZXIuc3JjID0gdGhpcy5wcm9wcy5zcmM7XG4gICAgfVxuXG4gICAgcmVuZGVySW1hZ2UoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmRpc3BsYXlBc0JhY2tncm91bmRJbWFnZSkge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLmltYWdlUHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIHJlZj0naW1hZ2UnXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItaW1hZ2UnLCB0aGlzLnByb3BzLmltYWdlUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgdGl0bGU9e3RoaXMucHJvcHMuYWx0fVxuICAgICAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4udGhpcy5wcm9wcy5pbWFnZVByb3BzLnN0eWxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZEltYWdlOiBgdXJsKCR7dGhpcy5wcm9wcy5zcmN9KWAsXG4gICAgICAgICAgICAgICAgICAgIH19IC8+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxpbWdcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5pbWFnZVByb3BzfVxuICAgICAgICAgICAgICAgIHJlZj0naW1hZ2UnXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1pbWFnZScsIHRoaXMucHJvcHMuaW1hZ2VQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgIHNyYz17dGhpcy5wcm9wcy5zcmN9XG4gICAgICAgICAgICAgICAgYWx0PXt0aGlzLnByb3BzLmFsdH1cbiAgICAgICAgICAgICAgICBvbkxvYWQ9e25vb3B9XG4gICAgICAgICAgICAgICAgb25FcnJvcj17bm9vcH0gLz5cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICByZW5kZXJTdGF0dXMoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2IHsuLi50aGlzLnByb3BzLnN0YXR1c1Byb3BzfVxuICAgICAgICAgICAgICAgICByZWY9J3N0YXR1cydcbiAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1pbWFnZS1zdGF0dXMnLCB0aGlzLnByb3BzLnN0YXR1c1Byb3BzLmNsYXNzTmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAnYi1pbWFnZS1sb2FkaW5nJzogdGhpcy5zdGF0ZS5zdGF0dXMgPT09IEltYWdlLnN0YXR1cy5MT0FESU5HLFxuICAgICAgICAgICAgICAgICAgICAnYi1pbWFnZS1sb2FkZWQnOiB0aGlzLnN0YXRlLnN0YXR1cyA9PT0gSW1hZ2Uuc3RhdHVzLkxPQURFRCxcbiAgICAgICAgICAgICAgICAgICAgJ2ItaW1hZ2UtZXJyb3InOiB0aGlzLnN0YXRlLnN0YXR1cyA9PT0gSW1hZ2Uuc3RhdHVzLkVSUk9SLFxuICAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICAgcm9sZT0ncHJlc2VudGF0aW9uJyAvPlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBJbWFnZS5pbnRlcm5hbEtleXMpfVxuICAgICAgICAgICAgICAgIHJlZj0nd3JhcHBlcidcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWltYWdlLXdyYXBwZXInLCB0aGlzLnByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckltYWdlKCl9XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyU3RhdHVzKCl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtaW1hZ2UvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 | ||
module.exports=function(e){function t(s){if(r[s])return r[s].exports;var o=r[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,s){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,r){"use strict";function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(r,s){return t.indexOf(s)===-1&&(r[s]=e[s]),r},{})}t.a=s},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,r){"use strict";function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(2),i=r.n(a),u=r(1),p=r.n(u),l=r(0),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},f=function(){function e(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,r,s){return r&&e(t.prototype,r),s&&e(t,s),t}}(),d=function(){},m=function(e){function t(){var e,r,n,a;s(this,t);for(var i=arguments.length,u=Array(i),p=0;p<i;p++)u[p]=arguments[p];return r=n=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={status:t.status.LOADING},a=r,o(n,a)}return n(t,e),f(t,[{key:"componentWillReceiveProps",value:function(e){e.src!==this.props.src&&(this.resetPreloader(),this.setState({status:t.status.LOADING}))}},{key:"componentDidMount",value:function(){this.preload()}},{key:"componentDidUpdate",value:function(){this.preload()}},{key:"componentWillUnmount",value:function(){this.resetPreloader()}},{key:"resetPreloader",value:function(){this.loader.onload=null,this.loader.onerror=null,this.loader=null}},{key:"preload",value:function(){var e=this;this.loader||(this.loader=document.createElement("img"),this.loader.onload=function(){return e.setState({status:t.status.LOADED})},this.loader.onerror=function(){return e.setState({status:t.status.ERROR})},this.loader.src=this.props.src)}},{key:"renderImage",value:function(){return this.props.displayAsBackgroundImage?i.a.createElement("div",c({},this.props.imageProps,{ref:"image",className:p()("b-image",this.props.imageProps.className),title:this.props.alt,style:c({},this.props.imageProps.style,{backgroundImage:"url("+this.props.src+")"})})):i.a.createElement("img",c({},this.props.imageProps,{ref:"image",className:p()("b-image",this.props.imageProps.className),src:this.props.src,alt:this.props.alt,onLoad:d,onError:d}))}},{key:"renderStatus",value:function(){return i.a.createElement("div",c({},this.props.statusProps,{ref:"status",className:p()("b-image-status",this.props.statusProps.className,{"b-image-loading":this.state.status===t.status.LOADING,"b-image-loaded":this.state.status===t.status.LOADED,"b-image-error":this.state.status===t.status.ERROR}),role:"presentation"}))}},{key:"render",value:function(){return i.a.createElement("div",c({},r.i(l.a)(this.props,t.internalKeys),{ref:"wrapper",className:p()("b-image-wrapper",this.props.className)}),this.renderImage(),this.renderStatus())}}]),t}(i.a.PureComponent);m.status={LOADING:"LOADING",LOADED:"LOADED",ERROR:"ERROR"},m.propTypes={alt:a.PropTypes.string,displayAsBackgroundImage:a.PropTypes.bool,imageProps:a.PropTypes.object,src:a.PropTypes.string.isRequired,statusProps:a.PropTypes.object},m.defaultProps={alt:null,displayAsBackgroundImage:!1,imageProps:{},src:"about:blank",statusProps:{}},m.internalKeys=Object.keys(m.defaultProps),t.default=m}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj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GVyLnNyYyA9IHRoaXMucHJvcHMuc3JjO1xuICAgIH1cblxuICAgIHJlbmRlckltYWdlKCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5kaXNwbGF5QXNCYWNrZ3JvdW5kSW1hZ2UpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5pbWFnZVByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2ltYWdlJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWltYWdlJywgdGhpcy5wcm9wcy5pbWFnZVByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlPXt0aGlzLnByb3BzLmFsdH1cbiAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLnRoaXMucHJvcHMuaW1hZ2VQcm9wcy5zdHlsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmRJbWFnZTogYHVybCgke3RoaXMucHJvcHMuc3JjfSlgLFxuICAgICAgICAgICAgICAgICAgICB9fSAvPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuaW1hZ2VQcm9wc31cbiAgICAgICAgICAgICAgICByZWY9J2ltYWdlJ1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItaW1hZ2UnLCB0aGlzLnByb3BzLmltYWdlUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICBzcmM9e3RoaXMucHJvcHMuc3JjfVxuICAgICAgICAgICAgICAgIGFsdD17dGhpcy5wcm9wcy5hbHR9XG4gICAgICAgICAgICAgICAgb25Mb2FkPXtub29wfVxuICAgICAgICAgICAgICAgIG9uRXJyb3I9e25vb3B9IC8+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcmVuZGVyU3RhdHVzKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdiB7Li4udGhpcy5wcm9wcy5zdGF0dXNQcm9wc31cbiAgICAgICAgICAgICAgICAgcmVmPSdzdGF0dXMnXG4gICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItaW1hZ2Utc3RhdHVzJywgdGhpcy5wcm9wcy5zdGF0dXNQcm9wcy5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAgJ2ItaW1hZ2UtbG9hZGluZyc6IHRoaXMuc3RhdGUuc3RhdHVzID09PSBJbWFnZS5zdGF0dXMuTE9BRElORyxcbiAgICAgICAgICAgICAgICAgICAgJ2ItaW1hZ2UtbG9hZGVkJzogdGhpcy5zdGF0ZS5zdGF0dXMgPT09IEltYWdlLnN0YXR1cy5MT0FERUQsXG4gICAgICAgICAgICAgICAgICAgICdiLWltYWdlLWVycm9yJzogdGhpcy5zdGF0ZS5zdGF0dXMgPT09IEltYWdlLnN0YXR1cy5FUlJPUixcbiAgICAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgICAgIHJvbGU9J3ByZXNlbnRhdGlvbicgLz5cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgSW1hZ2UuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1pbWFnZS13cmFwcGVyJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJJbWFnZSgpfVxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlclN0YXR1cygpfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLWltYWdlL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const noop = () => {}; | ||
/** | ||
@@ -8,0 +9,0 @@ # Image |
{ | ||
"name": "boundless-image", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "An image block with placeholder support for loading and fallback scenarios.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,8 +27,5 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-noop": "^1.0.0", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -34,0 +32,0 @@ "react": ">= 15.3", |
@@ -70,1 +70,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";t.a=function(e){return"function"==typeof e}},function(e,t,n){"use strict";t.a=function(e){return"string"==typeof e}},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),i=n.n(s),p=n(3),a=n.n(p),l=n(0),c=n(1),f=n(2),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){var e,u,s,i;r(this,t);for(var p=arguments.length,a=Array(p),f=0;f<p;f++)a[f]=arguments[f];return u=s=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),s.state={input:"",isControlled:n.i(c.a)(s.props.inputProps.value),isFocused:!1},s.setInputValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return s.setState({input:e})},s.getValue=function(){return s.refs.field.value},s.handleBlur=function(e){s.setState({isFocused:!1}),n.i(l.a)(s.props.inputProps.onBlur)===!0&&s.props.inputProps.onBlur(e)},s.handleFocus=function(e){s.setState({isFocused:!0}),n.i(l.a)(s.props.inputProps.onFocus)===!0&&s.props.inputProps.onFocus(e)},s.handleChange=function(e){s.state.isControlled===!1&&s.setInputValue(e.target.value),n.i(l.a)(s.props.inputProps.onChange)===!0&&s.props.inputProps.onChange(e)},i=u,o(s,i)}return u(t,e),d(t,[{key:"componentWillMount",value:function(){return this.state.isControlled===!0?this.setInputValue(this.props.inputProps.value):void this.setInputValue(this.props.inputProps.defaultValue)}},{key:"componentWillReceiveProps",value:function(e){e.inputProps.value!==this.props.inputProps.value&&this.setInputValue(e.inputProps.value)}},{key:"setValue",value:function(e){this.setInputValue(e),this.refs.field.value=e,this.state.isControlled===!0&&(this.refs.field.dispatchEvent(new Event("input",{bubbles:!0})),this.refs.field.dispatchEvent(new Event("change",{bubbles:!0})))}},{key:"getPlaceholderText",value:function(){var e=""!==this.state.input,t=this.props.hidePlaceholderOnFocus===!0?this.state.isFocused===!1&&e===!1:e===!1;return t?this.props.inputProps.placeholder:""}},{key:"renderPlaceholder",value:function(){return i.a.createElement("div",{ref:"placeholder",className:"b-input-placeholder b-input"},this.getPlaceholderText())}},{key:"render",value:function(){var e=this.props;return i.a.createElement("div",h({},n.i(f.a)(e,t.internalKeys),{ref:"wrapper",className:a()("b-input-wrapper",e.className),title:this.getPlaceholderText()}),this.renderPlaceholder(),i.a.createElement("input",h({},e.inputProps,{ref:"field",className:a()("b-input",e.inputProps.className),placeholder:null,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange})))}}]),t}(i.a.PureComponent);y.propTypes={hidePlaceholderOnFocus:s.PropTypes.bool,inputProps:s.PropTypes.shape({defaultValue:s.PropTypes.string,onBlur:s.PropTypes.func,onFocus:s.PropTypes.func,onChange:s.PropTypes.func,placeholder:s.PropTypes.string,type:s.PropTypes.string,value:s.PropTypes.string})},y.defaultProps={hidePlaceholderOnFocus:!0,inputProps:{type:"text"}},y.internalKeys=Object.keys(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dwbGFjZWhvbGRlcicgY2xhc3NOYW1lPSdiLWlucHV0LXBsYWNlaG9sZGVyIGItaW5wdXQnPlxuICAgICAgICAgICAgICAgIHt0aGlzLmdldFBsYWNlaG9sZGVyVGV4dCgpfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICBjb25zdCB7cHJvcHN9ID0gdGhpcztcblxuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHsuLi5vbWl0KHByb3BzLCBJbnB1dC5pbnRlcm5hbEtleXMpfVxuICAgICAgICAgICAgICAgIHJlZj0nd3JhcHBlcidcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWlucHV0LXdyYXBwZXInLCBwcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgIHRpdGxlPXt0aGlzLmdldFBsYWNlaG9sZGVyVGV4dCgpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJQbGFjZWhvbGRlcigpfVxuXG4gICAgICAgICAgICAgICAgPGlucHV0XG4gICAgICAgICAgICAgICAgICAgIHsuLi5wcm9wcy5pbnB1dFByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2ZpZWxkJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLWlucHV0JywgcHJvcHMuaW5wdXRQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj17bnVsbH1cbiAgICAgICAgICAgICAgICAgICAgb25CbHVyPXt0aGlzLmhhbmRsZUJsdXJ9XG4gICAgICAgICAgICAgICAgICAgIG9uRm9jdXM9e3RoaXMuaGFuZGxlRm9jdXN9XG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXt0aGlzLmhhbmRsZUNoYW5nZX0gLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1pbnB1dC9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),p=n.n(s),i=n(1),a=n.n(i),l=n(0),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){return"function"==typeof e},d=function(e){function t(){var e,n,u,s;r(this,t);for(var p=arguments.length,i=Array(p),a=0;a<p;a++)i[a]=arguments[a];return n=u=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),u.state={input:"",isControlled:"string"==typeof u.props.inputProps.value,isFocused:!1},u.setInputValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return u.setState({input:e})},u.getValue=function(){return u.refs.field.value},u.handleBlur=function(e){u.setState({isFocused:!1}),h(u.props.inputProps.onBlur)===!0&&u.props.inputProps.onBlur(e)},u.handleFocus=function(e){u.setState({isFocused:!0}),h(u.props.inputProps.onFocus)===!0&&u.props.inputProps.onFocus(e)},u.handleChange=function(e){u.state.isControlled===!1&&u.setInputValue(e.target.value),h(u.props.inputProps.onChange)===!0&&u.props.inputProps.onChange(e)},s=n,o(u,s)}return u(t,e),f(t,[{key:"componentWillMount",value:function(){return this.state.isControlled===!0?this.setInputValue(this.props.inputProps.value):void this.setInputValue(this.props.inputProps.defaultValue)}},{key:"componentWillReceiveProps",value:function(e){e.inputProps.value!==this.props.inputProps.value&&this.setInputValue(e.inputProps.value)}},{key:"setValue",value:function(e){this.setInputValue(e),this.refs.field.value=e,this.state.isControlled===!0&&(this.refs.field.dispatchEvent(new Event("input",{bubbles:!0})),this.refs.field.dispatchEvent(new Event("change",{bubbles:!0})))}},{key:"getPlaceholderText",value:function(){var e=""!==this.state.input,t=this.props.hidePlaceholderOnFocus===!0?this.state.isFocused===!1&&e===!1:e===!1;return t?this.props.inputProps.placeholder:""}},{key:"renderPlaceholder",value:function(){return p.a.createElement("div",{ref:"placeholder",className:"b-input-placeholder b-input"},this.getPlaceholderText())}},{key:"render",value:function(){var e=this.props;return p.a.createElement("div",c({},n.i(l.a)(e,t.internalKeys),{ref:"wrapper",className:a()("b-input-wrapper",e.className),title:this.getPlaceholderText()}),this.renderPlaceholder(),p.a.createElement("input",c({},e.inputProps,{ref:"field",className:a()("b-input",e.inputProps.className),placeholder:null,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange})))}}]),t}(p.a.PureComponent);d.propTypes={hidePlaceholderOnFocus:s.PropTypes.bool,inputProps:s.PropTypes.shape({defaultValue:s.PropTypes.string,onBlur:s.PropTypes.func,onFocus:s.PropTypes.func,onChange:s.PropTypes.func,placeholder:s.PropTypes.string,type:s.PropTypes.string,value:s.PropTypes.string})},d.defaultProps={hidePlaceholderOnFocus:!0,inputProps:{type:"text"}},d.internalKeys=Object.keys(d.defaultProps),t.default=d}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDJkM2Y3YjA0OWFkZWMzNWZlZDM0Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtaW5wdXQvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZmlndXJhYmxlIiwiZW51bWV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yIDogJyc7XG4gICAgfVxuXG4gICAgcmVuZGVyUGxhY2Vob2xkZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2IHJlZj0ncGxhY2Vob2xkZXInIGNsYXNzTmFtZT0nYi1pbnB1dC1wbGFjZWhvbGRlciBiLWlucHV0Jz5cbiAgICAgICAgICAgICAgICB7dGhpcy5nZXRQbGFjZWhvbGRlclRleHQoKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge3Byb3BzfSA9IHRoaXM7XG5cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4ub21pdChwcm9wcywgSW5wdXQuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1pbnB1dC13cmFwcGVyJywgcHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICB0aXRsZT17dGhpcy5nZXRQbGFjZWhvbGRlclRleHQoKX0+XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyUGxhY2Vob2xkZXIoKX1cblxuICAgICAgICAgICAgICAgIDxpbnB1dFxuICAgICAgICAgICAgICAgICAgICB7Li4ucHJvcHMuaW5wdXRQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcmVmPSdmaWVsZCdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1pbnB1dCcsIHByb3BzLmlucHV0UHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9e251bGx9XG4gICAgICAgICAgICAgICAgICAgIG9uQmx1cj17dGhpcy5oYW5kbGVCbHVyfVxuICAgICAgICAgICAgICAgICAgICBvbkZvY3VzPXt0aGlzLmhhbmRsZUZvY3VzfVxuICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZT17dGhpcy5oYW5kbGVDaGFuZ2V9IC8+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtaW5wdXQvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import isString from '../boundless-utils-is-string/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const isFunction = (x) => typeof x === 'function'; | ||
/** | ||
@@ -57,3 +57,3 @@ # Input | ||
input: '', | ||
isControlled: isString(this.props.inputProps.value), | ||
isControlled: typeof this.props.inputProps.value === 'string', | ||
isFocused: false, | ||
@@ -60,0 +60,0 @@ } |
{ | ||
"name": "boundless-input", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "An input control with placeholder emulation for non-supporting platforms.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -27,9 +28,5 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-is-function": "^1.0.0", | ||
"boundless-utils-is-string": "^1.0.0", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -36,0 +33,0 @@ "react": ">= 15.3", |
@@ -55,1 +55,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
module.exports=function(e){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}var t={};return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=6)}([function(e,r,t){"use strict";function n(e,r){return Object.keys(r).reduce(function(r,t){return t in e&&(r[t]=e[t]),r},{})}r.a=n},function(e,r,t){"use strict";function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(t,n){return r.indexOf(n)===-1&&(t[n]=e[n]),t},{})}r.a=n},function(e,r){e.exports=require("boundless-dialog")},function(e,r){e.exports=require("boundless-portal")},function(e,r){e.exports=require("classnames")},function(e,r){e.exports=require("react")},function(e,r,t){"use strict";function n(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function o(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function a(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var s=t(5),u=t.n(s),c=t(4),p=t.n(c),i=t(2),l=t.n(i),f=t(3),d=t.n(f),b=t(0),y=t(1),m=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},P=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),h=function(e){function r(){return n(this,r),o(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return a(r,e),P(r,[{key:"render",value:function(){var e=this,n=this.props;return u.a.createElement(d.a,n.portalProps,u.a.createElement("div",m({},t.i(y.a)(n,r.internalKeys),{ref:function(r){return e.$modal=r},className:p()("b-modal-wrapper",n.className)}),u.a.createElement("div",m({},n.maskProps,{className:p()("b-modal-mask",n.maskProps.className)})),u.a.createElement(l.a,m({},t.i(b.a)(n,l.a.defaultProps),n.modalProps,{className:p()("b-modal",n.modalProps.className)}),n.children)))}}]),r}(u.a.PureComponent);h.propTypes=m({},l.a.propTypes,{maskProps:s.PropTypes.object,modalProps:s.PropTypes.object,portalProps:s.PropTypes.shape(d.a.propTypes)}),h.defaultProps=m({},l.a.defaultProps,{captureFocus:!0,maskProps:{},modalProps:{},portalProps:{}}),h.internalKeys=Object.keys(h.defaultProps),r.default=h}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDUyYzk5MzFkMWYyNDQ5MzRjZDc1Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vYmplY3QtaW50ZXJzZWN0aW9uL2luZGV4LmpzIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLWRpYWxvZ1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJib3VuZGxlc3MtcG9ydGFsXCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImNsYXNzbmFtZXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNv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AgLi4uRGlhbG9nLmRlZmF1bHRQcm9wcyxcbiAgICAgICAgY2FwdHVyZUZvY3VzOiB0cnVlLFxuICAgICAgICBtYXNrUHJvcHM6IHt9LFxuICAgICAgICBtb2RhbFByb3BzOiB7fSxcbiAgICAgICAgcG9ydGFsUHJvcHM6IHt9LFxuICAgIH1cblxuICAgIHN0YXRpYyBpbnRlcm5hbEtleXMgPSBPYmplY3Qua2V5cyhNb2RhbC5kZWZhdWx0UHJvcHMpXG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGNvbnN0IHtwcm9wc30gPSB0aGlzO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8UG9ydGFsIHsuLi5wcm9wcy5wb3J0YWxQcm9wc30+XG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICB7Li4ub21pdChwcm9wcywgTW9kYWwuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICAgICAgcmVmPXsobm9kZSkgPT4gKHRoaXMuJG1vZGFsID0gbm9kZSl9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItbW9kYWwtd3JhcHBlcicsIHByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgICAgICB7Li4ucHJvcHMubWFza1Byb3BzfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1tb2RhbC1tYXNrJywgcHJvcHMubWFza1Byb3BzLmNsYXNzTmFtZSl9IC8+XG5cbiAgICAgICAgICAgICAgICAgICAgPERpYWxvZ1xuICAgICAgICAgICAgICAgICAgICAgICAgey4uLmV4dHJhY3RDaGlsZFByb3BzKHByb3BzLCBEaWFsb2cuZGVmYXVsdFByb3BzKX1cbiAgICAgICAgICAgICAgICAgICAgICAgIHsuLi5wcm9wcy5tb2RhbFByb3BzfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1tb2RhbCcsIHByb3BzLm1vZGFsUHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAgICAgICAgICB7cHJvcHMuY2hpbGRyZW59XG4gICAgICAgICAgICAgICAgICAgIDwvRGlhbG9nPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9Qb3J0YWw+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLW1vZGFsL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGQyZTU0NTVmYjRhYzFjOTA1OTYyIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vYmplY3QtaW50ZXJzZWN0aW9uL2luZGV4LmpzIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLWRpYWxvZ1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJib3VuZGxlc3MtcG9ydGFsXCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcImNsYXNzbmFtZXNcIn0iLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwicmVhY3RcIn0iLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLW1vZGFsL2luZGV4LmpzIl0sIm5hbWVzIjpbIm1vZHV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lzID0gT2JqZWN0LmtleXMoTW9kYWwuZGVmYXVsdFByb3BzKVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICBjb25zdCB7cHJvcHN9ID0gdGhpcztcblxuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPFBvcnRhbCB7Li4ucHJvcHMucG9ydGFsUHJvcHN9PlxuICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgey4uLm9taXQocHJvcHMsIE1vZGFsLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgICAgIHJlZj17KG5vZGUpID0+ICh0aGlzLiRtb2RhbCA9IG5vZGUpfVxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLW1vZGFsLXdyYXBwZXInLCBwcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICAgICAgey4uLnByb3BzLm1hc2tQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItbW9kYWwtbWFzaycsIHByb3BzLm1hc2tQcm9wcy5jbGFzc05hbWUpfSAvPlxuXG4gICAgICAgICAgICAgICAgICAgIDxEaWFsb2dcbiAgICAgICAgICAgICAgICAgICAgICAgIHsuLi5leHRyYWN0Q2hpbGRQcm9wcyhwcm9wcywgRGlhbG9nLmRlZmF1bHRQcm9wcyl9XG4gICAgICAgICAgICAgICAgICAgICAgICB7Li4ucHJvcHMubW9kYWxQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItbW9kYWwnLCBwcm9wcy5tb2RhbFByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgICAgICAgICAge3Byb3BzLmNoaWxkcmVufVxuICAgICAgICAgICAgICAgICAgICA8L0RpYWxvZz5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvUG9ydGFsPlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1tb2RhbC9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= |
@@ -6,4 +6,4 @@ import React, {PropTypes} from 'react'; | ||
import Portal from 'boundless-portal'; | ||
import extractChildProps from '../boundless-utils-object-intersection/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import extractChildProps from 'boundless-utils-object-intersection'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
@@ -10,0 +10,0 @@ /** |
{ | ||
"name": "boundless-modal", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A blocking, focus-stealing container.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,10 +27,8 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-dialog": "^1.0.0-beta.4", | ||
"boundless-portal": "^1.0.0-beta.4", | ||
"boundless-dialog": "^1.0.0-beta.5", | ||
"boundless-portal": "^1.0.0-beta.5", | ||
"boundless-utils-object-intersection": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-object-intersection": "^1.0.0-beta.3", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -36,0 +35,0 @@ "react": ">= 15.3", |
@@ -147,3 +147,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> | ||
@@ -168,1 +168,2 @@ </tr> | ||
@@ -9,8 +9,8 @@ import React, {PropTypes} from 'react'; | ||
import ArrowKeyNavigation from 'boundless-arrow-key-navigation'; | ||
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 identity = (x) => x; | ||
const isFunction = (x) => typeof x === 'function'; | ||
const noop = () => {}; | ||
@@ -17,0 +17,0 @@ /** |
{ | ||
"name": "boundless-pagination", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "View and navigate heterogenious content one page at a time.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,14 +27,10 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-arrow-key-navigation": "^1.0.0-beta.4", | ||
"boundless-async": "^1.0.0-beta.4", | ||
"boundless-segmented-control": "^1.0.0-beta.4", | ||
"boundless-arrow-key-navigation": "^1.0.0-beta.5", | ||
"boundless-async": "^1.0.0-beta.5", | ||
"boundless-segmented-control": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-uuid": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5", | ||
"lodash.isinteger": "^4.0.4" | ||
}, | ||
"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": { | ||
@@ -40,0 +37,0 @@ "react": ">= 15.3", |
@@ -83,3 +83,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>called with a desired item index when that item comes into view; accepts a `Promise` if you need to fetch the row asynchronously</td> | ||
@@ -212,1 +212,2 @@ </tr> | ||
@@ -7,4 +7,4 @@ import React, {PropTypes} from 'react'; | ||
import Portal from 'boundless-portal'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import transformProp from '../boundless-utils-transform-property/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
import transformProp from 'boundless-utils-transform-property'; | ||
@@ -11,0 +11,0 @@ function getOppositeCardinal(direction) { |
{ | ||
"name": "boundless-popover", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A non-blocking container positioned to a specific anchor element.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -27,10 +28,8 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-dialog": "^1.0.0-beta.4", | ||
"boundless-portal": "^1.0.0-beta.4", | ||
"boundless-dialog": "^1.0.0-beta.5", | ||
"boundless-portal": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-transform-property": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3", | ||
"boundless-utils-transform-property": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -37,0 +36,0 @@ "react": ">= 15.3", |
@@ -198,3 +198,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> | ||
@@ -243,1 +243,2 @@ </tr> | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t,n){"use strict";function r(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=r},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("react-dom")},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),l=n.n(u),p=n(3),c=n.n(p),s=n(0),f=n(1),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){var e,r,a,u;o(this,t);for(var l=arguments.length,p=Array(l),c=0;c<l;c++)p[c]=arguments[c];return r=a=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(p))),a.id=n.i(f.a)(),a.$portal=null,a.$passenger=null,u=r,i(a,u)}return a(t,e),h(t,[{key:"componentWillMount",value:function(){this.$portal=document.createElement("div"),this.props.destination.appendChild(this.$portal),this.renderPortalledContent()}},{key:"renderPortalledContent",value:function(){var e=l.a.isValidElement(this.props.children)?this.props.children:l.a.createElement("div",null,this.props.children);this.$portal.id=this.props.portalId||this.id,c.a.unstable_renderSubtreeIntoContainer(this,e,this.$portal),this.$passenger=this.$portal.children[0]}},{key:"componentDidUpdate",value:function(){this.renderPortalledContent()}},{key:"componentWillUnmount",value:function(){c.a.unmountComponentAtNode(this.$portal),this.props.destination.removeChild(this.$portal)}},{key:"render",value:function(){return l.a.createElement("span",d({},n.i(s.a)(this.props,t.internalKeys),r({},t.PORTAL_DATA_ATTRIBUTE,this.props.portalId||this.id)))}}]),t}(l.a.Component);y.propTypes={children:l.a.PropTypes.node,destination:u.PropTypes.instanceOf(HTMLElement),portalId:u.PropTypes.string},y.defaultProps={children:null,destination:document.body,portalId:null},y.internalKeys=Object.keys(y.defaultProps),y.PORTAL_DATA_ATTRIBUTE="data-portal-id",t.default=y}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDU3NmJmZWZjYTJiNTgyMzk4ZjRjIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11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AgICAgUmVhY3RET00udW5zdGFibGVfcmVuZGVyU3VidHJlZUludG9Db250YWluZXIodGhpcywgY2hpbGQsIHRoaXMuJHBvcnRhbCk7XG4gICAgICAgIHRoaXMuJHBhc3NlbmdlciA9IHRoaXMuJHBvcnRhbC5jaGlsZHJlblswXTtcbiAgICB9XG5cbiAgICBjb21wb25lbnREaWRVcGRhdGUoKSB7IHRoaXMucmVuZGVyUG9ydGFsbGVkQ29udGVudCgpOyB9XG5cbiAgICBjb21wb25lbnRXaWxsVW5tb3VudCgpIHtcbiAgICAgICAgUmVhY3RET00udW5tb3VudENvbXBvbmVudEF0Tm9kZSh0aGlzLiRwb3J0YWwpO1xuICAgICAgICB0aGlzLnByb3BzLmRlc3RpbmF0aW9uLnJlbW92ZUNoaWxkKHRoaXMuJHBvcnRhbCk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBQb3J0YWwuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICB7Li4ue1tQb3J0YWwuUE9SVEFMX0RBVEFfQVRUUklCVVRFXTogdGhpcy5wcm9wcy5wb3J0YWxJZCB8fCB0aGlzLmlkfX0gLz5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtcG9ydGFsL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIGFiMWQ1ZDRlYjdjMzc5Njk4OWM4Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzc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AgKiA8UG9ydGFsPlxuICAgICAgICAgKiAgIDxkaXY+XG4gICAgICAgICAqICAgICAgIDxkaXY+Zm9vPC9kaXY+XG4gICAgICAgICAqICAgICAgIDxkaXY+YmFyPC9kaXY+XG4gICAgICAgICAqICAgPC9kaXY+XG4gICAgICAgICAqIDwvUG9ydGFsPlxuICAgICAgICAgKiBgYGBcblxuICAgICAgICAgKiDim5TvuI8gTm90IE9LOlxuXG4gICAgICAgICAqIGBgYGpzeFxuICAgICAgICAgKiA8UG9ydGFsPlxuICAgICAgICAgKiAgIDxkaXY+Zm9vPC9kaXY+XG4gICAgICAgICAqICAgPGRpdj5iYXI8L2Rpdj5cbiAgICAgICAgICogPC9Qb3J0YWw+XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKi9cbiAgICAgICAgY2hpbGRyZW46IFJlYWN0LlByb3BUeXBlcy5ub2RlLFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiB0aGUgbG9jYXRpb24gdG8gYXBwZW5kIHRoZSBnZW5lcmF0ZWQgcG9ydGFsIGFuZCBjaGlsZCBlbGVtZW50c1xuICAgICAgICAgKi9cbiAgICAgICAgZGVzdGluYXRpb246IFByb3BUeXBlcy5pbnN0YW5jZU9mKEhUTUxFbGVtZW50KSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogdGhlIElEIHVzZWQgdG8gbGluayB0aGUgcG9ydGFsIG9yaWdpbiB0byB0aGUgZGVzdGluYXRpb247IGFkZGVkIHRvIGdlbmVyYXRlZCBgPGRpdj5gIGFwcGVuZGVkIHRvIHRoZSBkZXN0aW5hdGlvbiBIVE1MIG5vZGVcbiAgICAgICAgICovXG4gICAgICAgIHBvcnRhbElkOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgIH1cblxuICAgIHN0YXRpYyBkZWZhdWx0UHJvcHMgPSB7XG4gICAgICAgIGNoaWxkcmVuOiBudWxsLFxuICAgICAgICBkZXN0aW5hdGlvbjogZG9jdW1lbnQuYm9keSxcbiAgICAgIC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YnRyZWVJbnRvQ29udGFpbmVyKHRoaXMsIGNoaWxkLCB0aGlzLiRwb3J0YWwpO1xuICAgICAgICB0aGlzLiRwYXNzZW5nZXIgPSB0aGlzLiRwb3J0YWwuY2hpbGRyZW5bMF07XG4gICAgfVxuXG4gICAgY29tcG9uZW50RGlkVXBkYXRlKCkgeyB0aGlzLnJlbmRlclBvcnRhbGxlZENvbnRlbnQoKTsgfVxuXG4gICAgY29tcG9uZW50V2lsbFVubW91bnQoKSB7XG4gICAgICAgIFJlYWN0RE9NLnVubW91bnRDb21wb25lbnRBdE5vZGUodGhpcy4kcG9ydGFsKTtcbiAgICAgICAgdGhpcy5wcm9wcy5kZXN0aW5hdGlvbi5yZW1vdmVDaGlsZCh0aGlzLiRwb3J0YWwpO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgUG9ydGFsLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgey4uLntbUG9ydGFsLlBPUlRBTF9EQVRBX0FUVFJJQlVURV06IHRoaXMucHJvcHMucG9ydGFsSWQgfHwgdGhpcy5pZH19IC8+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLXBvcnRhbC9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= |
import React, {PropTypes} from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
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'; | ||
@@ -7,0 +7,0 @@ /** |
{ | ||
"name": "boundless-portal", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A higher-order component for the rendering of components outside the normal React tree.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,5 +27,5 @@ "type": "git", | ||
"homepage": "https://github.com/enigma-io/boundless#readme", | ||
"devDependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3", | ||
"boundless-utils-uuid": "^1.0.0" | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-uuid": "^1.0.0-beta.5" | ||
}, | ||
@@ -31,0 +32,0 @@ "peerDependencies": { |
@@ -78,1 +78,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
module.exports=function(e){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}var t={};return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get: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,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=4)}([function(e,r,t){"use strict";function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(t,n){return r.indexOf(n)===-1&&(t[n]=e[n]),t},{})}r.a=n},function(e,r){e.exports=require("boundless-button")},function(e,r){e.exports=require("classnames")},function(e,r){e.exports=require("react")},function(e,r,t){"use strict";function n(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function s(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}function p(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}Object.defineProperty(r,"__esModule",{value:!0});var a=t(3),i=t.n(a),c=t(2),l=t.n(c),u=t(1),f=t.n(u),b=t(0),y=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},P=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),d=function(e){function r(){return o(this,r),s(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return p(r,e),P(r,[{key:"renderLabel",value:function(){if(this.props.label)return i.a.createElement("div",y({},this.props.labelProps,{ref:"label",className:l()("b-progress-label",this.props.labelProps.className)}),this.props.label)}},{key:"renderCancel",value:function(){if(this.props.onCancel)return i.a.createElement(f.a,y({},this.props.cancelProps,{ref:"cancel",className:l()("b-progress-cancel",this.props.cancelProps.className),onPressed:this.props.onCancel}))}},{key:"renderProgress",value:function(){return i.a.createElement("div",y({},this.props.progressProps,{ref:"progress",className:l()("b-progress",this.props.progressProps.className,{"b-progress-indeterminate":"undefined"==typeof this.props.progress}),role:"presentation",style:y({},this.props.progressProps.style,n({},this.props.tweenProperty,this.props.progress))}))}},{key:"render",value:function(){return i.a.createElement(this.props.component,y({},t.i(b.a)(this.props,r.internalKeys),{ref:"wrapper",className:l()("b-progress-wrapper",this.props.className)}),this.renderProgress(),this.renderLabel(),this.renderCancel())}}]),r}(i.a.PureComponent);d.propTypes={cancelProps:a.PropTypes.object,component:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.func]),label:a.PropTypes.node,labelProps:a.PropTypes.object,onCancel:a.PropTypes.func,progress:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number]),progressProps:a.PropTypes.object,tweenProperty:a.PropTypes.string},d.defaultProps={cancelProps:{},component:"div",label:null,labelProps:{},onCancel:null,progress:void 0,progressProps:{},tweenProperty:"width"},d.internalKeys=Object.keys(d.defaultProps),r.default=d}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDliNGVkYTA4ODU0MTdiNmM0YTgxIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLWJ1dHRvblwifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJjbGFzc25hbWVzXCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcInJlYWN0XCJ9Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy1wcm9ncmVzcy9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibW9kdWxlcyIsIl9fd2VicGFja19yZXF1aXJlX18iLCJtb2R1bGVJZCIsImluc3RhbGxlZE1vZHVsZXMiLCJpIiwibCIsImNhbGwiLCJtIiwiYyIsInZhbHVlIiwiZCIsIm5hbWUiLCJnZXR0ZXIiLCJvIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJjb25maWd1cmFibGUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwibiIsIl9fZXNNb2R1bGUiLCJvYmplY3QiLCJwcm9wZXJ0eSIsInByb3RvdHlwZSIsImhhc093blByb3BlcnR5IiwicCIsInMiLCJfX3dlYnBhY2tfZXhwb3J0c19fIiwib21pdEtleXNGcm9t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gICAgIHByb2dyZXNzUHJvcHM6IHt9LFxuICAgICAgICB0d2VlblByb3BlcnR5OiAnd2lkdGgnLFxuICAgIH1cblxuICAgIHN0YXRpYyBpbnRlcm5hbEtleXMgPSBPYmplY3Qua2V5cyhQcm9ncmVzcy5kZWZhdWx0UHJvcHMpXG5cbiAgICByZW5kZXJMYWJlbCgpIHtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMubGFiZWwpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5sYWJlbFByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2xhYmVsJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXByb2dyZXNzLWxhYmVsJywgdGhpcy5wcm9wcy5sYWJlbFByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5sYWJlbH1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJDYW5jZWwoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLm9uQ2FuY2VsKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxCdXR0b25cbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuY2FuY2VsUHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIHJlZj0nY2FuY2VsJ1xuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXByb2dyZXNzLWNhbmNlbCcsIHRoaXMucHJvcHMuY2FuY2VsUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgb25QcmVzc2VkPXt0aGlzLnByb3BzLm9uQ2FuY2VsfSAvPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlclByb2dyZXNzKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLnByb2dyZXNzUHJvcHN9XG4gICAgICAgICAgICAgICAgcmVmPSdwcm9ncmVzcydcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXByb2dyZXNzJywgdGhpcy5wcm9wcy5wcm9ncmVzc1Byb3BzLmNsYXNzTmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAnYi1wcm9ncmVzcy1pbmRldGVybWluYXRlJzogdHlwZW9mIHRoaXMucHJvcHMucHJvZ3Jlc3MgPT09ICd1bmRlZmluZWQnLFxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIHJvbGU9J3ByZXNlbnRhdGlvbidcbiAgICAgICAgICAgICAgICBzdHlsZT17e1xuICAgICAgICAgICAgICAgICAgICAuLi50aGlzLnByb3BzLnByb2dyZXNzUHJvcHMuc3R5bGUsXG4gICAgICAgICAgICAgICAgICAgIFt0aGlzLnByb3BzLnR3ZWVuUHJvcGVydHldOiB0aGlzLnByb3BzLnByb2dyZXNzLFxuICAgICAgICAgICAgICAgIH19IC8+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPHRoaXMucHJvcHMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgUHJvZ3Jlc3MuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1wcm9ncmVzcy13cmFwcGVyJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJQcm9ncmVzcygpfVxuICAgICAgICAgICAgICAgIHt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sbCxcbiAgICAgICAgbGFiZWxQcm9wczoge30sXG4gICAgICAgIG9uQ2FuY2VsOiBudWxsLFxuICAgICAgICBwcm9ncmVzczogdW5kZWZpbmVkLFxuICAgICAgICBwcm9ncmVzc1Byb3BzOiB7fSxcbiAgICAgICAgdHdlZW5Qcm9wZXJ0eTogJ3dpZHRoJyxcbiAgICB9XG5cbiAgICBzdGF0aWMgaW50ZXJuYWxLZXlzID0gT2JqZWN0LmtleXMoUHJvZ3Jlc3MuZGVmYXVsdFByb3BzKVxuXG4gICAgcmVuZGVyTGFiZWwoKSB7XG4gICAgICAgIGlmICh0aGlzLnByb3BzLmxhYmVsKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMubGFiZWxQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcmVmPSdsYWJlbCdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1wcm9ncmVzcy1sYWJlbCcsIHRoaXMucHJvcHMubGFiZWxQcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMubGFiZWx9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVyQ2FuY2VsKCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5vbkNhbmNlbCkge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLmNhbmNlbFByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J2NhbmNlbCdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1wcm9ncmVzcy1jYW5jZWwnLCB0aGlzLnByb3BzLmNhbmNlbFByb3BzLmNsYXNzTmFtZSl9XG4gICAgICAgICAgICAgICAgICAgIG9uUHJlc3NlZD17dGhpcy5wcm9wcy5vbkNhbmNlbH0gLz5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJQcm9ncmVzcygpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5wcm9ncmVzc1Byb3BzfVxuICAgICAgICAgICAgICAgIHJlZj0ncHJvZ3Jlc3MnXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1wcm9ncmVzcycsIHRoaXMucHJvcHMucHJvZ3Jlc3NQcm9wcy5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAgJ2ItcHJvZ3Jlc3MtaW5kZXRlcm1pbmF0ZSc6IHR5cGVvZiB0aGlzLnByb3BzLnByb2dyZXNzID09PSAndW5kZWZpbmVkJyxcbiAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICByb2xlPSdwcmVzZW50YXRpb24nXG4gICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgLi4udGhpcy5wcm9wcy5wcm9ncmVzc1Byb3BzLnN0eWxlLFxuICAgICAgICAgICAgICAgICAgICBbdGhpcy5wcm9wcy50d2VlblByb3BlcnR5XTogdGhpcy5wcm9wcy5wcm9ncmVzcyxcbiAgICAgICAgICAgICAgICB9fSAvPlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDx0aGlzLnByb3BzLmNvbXBvbmVudFxuICAgICAgICAgICAgICAgIHsuLi5vbWl0KHRoaXMucHJvcHMsIFByb2dyZXNzLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgcmVmPSd3cmFwcGVyJ1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItcHJvZ3Jlc3Mtd3JhcHBlcicsIHRoaXMucHJvcHMuY2xhc3NOYW1lKX0+XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyUHJvZ3Jlc3MoKX1cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJMYWJlbCgpfVxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckNhbmNlbCgpfVxuICAgICAgICAgICAgPC90aGlzLnByb3BzLmNvbXBvbmVudD5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtcHJvZ3Jlc3MvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 |
@@ -5,3 +5,3 @@ import React, {PropTypes} from 'react'; | ||
import Button from 'boundless-button'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
@@ -8,0 +8,0 @@ /** |
{ | ||
"name": "boundless-progress", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "An unopinionated progress implementation, allowing for a variety of shapes and effects.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -26,8 +27,6 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-button": "^1.0.0-beta.4", | ||
"boundless-button": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -34,0 +33,0 @@ "react": ">= 15.3", |
@@ -83,1 +83,2 @@ THIS IS AN AUTOGENERATED FILE. EDIT INDEX.JS INSTEAD. | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=5)}([function(e,t,n){"use strict";t.a=function(e){return"function"==typeof e}},function(e,t,n){"use strict";function r(){}t.a=r},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),p=n.n(a),i=n(3),c=n.n(i),l=n(0),u=n(1),d=n(2),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),y=function(e){function t(){var e,s,a,p;r(this,t);for(var i=arguments.length,c=Array(i),u=0;u<i;u++)c[u]=arguments[u];return s=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),a.state={expanded:a.props.expanded},a.dispatchCallback=function(){a.props[a.state.expanded?"onExpand":"onHide"]()},a.handleClick=function(e){a.setState({expanded:!a.state.expanded},a.dispatchCallback),n.i(l.a)(a.props.toggleProps.onClick)&&a.props.toggleProps.onClick(e)},a.handleKeyDown=function(e){switch(e.key){case"Enter":e.preventDefault(),a.setState({expanded:!a.state.expanded},a.dispatchCallback)}n.i(l.a)(a.props.toggleProps.onKeyDown)&&a.props.toggleProps.onKeyDown(e)},p=s,o(a,p)}return s(t,e),h(t,[{key:"componentWillReceiveProps",value:function(e){e.expanded!==this.props.expanded&&this.setState({expanded:e.expanded},this.dispatchCallback)}},{key:"renderContent",value:function(){if(this.state.expanded)return p.a.createElement("div",{ref:"content",className:"b-disclosure-content"},n.i(l.a)(this.props.children)?this.props.children():this.props.children)}},{key:"render",value:function(){return p.a.createElement(this.props.component,f({},n.i(d.a)(this.props,t.internalKeys),{ref:"wrapper",className:c()("b-disclosure",this.props.className,{"b-disclosure-expanded":this.state.expanded})}),p.a.createElement("div",f({},this.props.toggleProps,{ref:"toggle",className:c()("b-disclosure-toggle",this.props.toggleProps.className),onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:"0"}),this.state.expanded?this.props.teaserExpanded||this.props.teaser:this.props.teaser),this.renderContent())}}]),t}(p.a.PureComponent);y.propTypes={children:a.PropTypes.any,component:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.func]),expanded:a.PropTypes.bool,onExpand:a.PropTypes.func,onHide:a.PropTypes.func,teaser:a.PropTypes.node,teaserExpanded:a.PropTypes.node,toggleProps:a.PropTypes.object},y.defaultProps={children:null,component:"div",expanded:!1,onExpand:u.a,onHide:u.a,teaser:null,teaserExpanded:null,toggleProps:{}},y.internalKeys=Object.keys(y.defaultProps),t.default=y}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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9wcy50b2dnbGVQcm9wcy5vbkNsaWNrKSkge1xuICAgICAgICAgICAgdGhpcy5wcm9wcy50b2dnbGVQcm9wcy5vbkNsaWNrKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGhhbmRsZUtleURvd24gPSAoZXZlbnQpID0+IHtcbiAgICAgICAgc3dpdGNoIChldmVudC5rZXkpIHtcbiAgICAgICAgY2FzZSAnRW50ZXInOlxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoe2V4cGFuZGVkOiAhdGhpcy5zdGF0ZS5leHBhbmRlZH0sIHRoaXMuZGlzcGF0Y2hDYWxsYmFjayk7XG4gICAgICAgIH1cblxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgICBpZiAoaXNGdW5jdGlvbih0aGlzLnByb3BzLnRvZ2dsZVByb3BzLm9uS2V5RG93bikpIHtcbiAgICAgICAgICAgIHRoaXMucHJvcHMudG9nZ2xlUHJvcHMub25LZXlEb3duKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckNvbnRlbnQoKSB7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlLmV4cGFuZGVkKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxkaXYgcmVmPSdjb250ZW50J1xuICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdiLWRpc2Nsb3N1cmUtY29udGVudCc+XG4gICAgICAgICAgICAgICAgICAgIHtpc0Z1bmN0aW9uKHRoaXMucHJvcHMuY2hpbGRyZW4pID8gdGhpcy5wcm9wcy5jaGlsZHJlbigpIDogdGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBQcm9ncmVzc2l2ZURpc2Nsb3N1cmUuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaXNjbG9zdXJlJywgdGhpcy5wcm9wcy5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAnYi1kaXNjbG9zdXJlLWV4cGFuZGVkJzogdGhpcy5zdGF0ZS5leHBhbmRlZCxcbiAgICAgICAgICAgICAgICB9KX0+XG5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLnRvZ2dsZVByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J3RvZ2dsZSdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaXNjbG9zdXJlLXRvZ2dsZScsIHRoaXMucHJvcHMudG9nZ2xlUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17dGhpcy5oYW5kbGVDbGlja31cbiAgICAgICAgICAgICAgICAgICAgb25LZXlEb3duPXt0aGlzLmhhbmRsZUtleURvd259XG4gICAgICAgICAgICAgICAgICAgIHRhYkluZGV4PScwJz5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMuc3RhdGUuZXhwYW5kZWQgPyB0aGlzLnByb3BzLnRlYXNlckV4cGFuZGVkIHx8IHRoaXMucHJvcHMudGVhc2VyIDogdGhpcy5wcm9wcy50ZWFzZXJ9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJDb250ZW50KCl9XG4gICAgICAgICAgICA8L3RoaXMucHJvcHMuY29tcG9uZW50PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1wcm9ncmVzc2l2ZS1kaXNjbG9zdXJlL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(n,r){return t.indexOf(r)===-1&&(n[r]=e[r]),n},{})}t.a=r},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),a=n.n(s),i=n(1),c=n.n(i),l=n(0),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=function(e){return"function"==typeof e},h=function(){},y=function(e){function t(){var e,n,p,s;r(this,t);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return n=p=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),p.state={expanded:p.props.expanded},p.dispatchCallback=function(){p.props[p.state.expanded?"onExpand":"onHide"]()},p.handleClick=function(e){p.setState({expanded:!p.state.expanded},p.dispatchCallback),f(p.props.toggleProps.onClick)&&p.props.toggleProps.onClick(e)},p.handleKeyDown=function(e){switch(e.key){case"Enter":e.preventDefault(),p.setState({expanded:!p.state.expanded},p.dispatchCallback)}f(p.props.toggleProps.onKeyDown)&&p.props.toggleProps.onKeyDown(e)},s=n,o(p,s)}return p(t,e),d(t,[{key:"componentWillReceiveProps",value:function(e){e.expanded!==this.props.expanded&&this.setState({expanded:e.expanded},this.dispatchCallback)}},{key:"renderContent",value:function(){if(this.state.expanded)return a.a.createElement("div",{ref:"content",className:"b-disclosure-content"},f(this.props.children)?this.props.children():this.props.children)}},{key:"render",value:function(){return a.a.createElement(this.props.component,u({},n.i(l.a)(this.props,t.internalKeys),{ref:"wrapper",className:c()("b-disclosure",this.props.className,{"b-disclosure-expanded":this.state.expanded})}),a.a.createElement("div",u({},this.props.toggleProps,{ref:"toggle",className:c()("b-disclosure-toggle",this.props.toggleProps.className),onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:"0"}),this.state.expanded?this.props.teaserExpanded||this.props.teaser:this.props.teaser),this.renderContent())}}]),t}(a.a.PureComponent);y.propTypes={children:s.PropTypes.any,component:s.PropTypes.oneOfType([s.PropTypes.string,s.PropTypes.func]),expanded:s.PropTypes.bool,onExpand:s.PropTypes.func,onHide:s.PropTypes.func,teaser:s.PropTypes.node,teaserExpanded:s.PropTypes.node,toggleProps:s.PropTypes.object},y.defaultProps={children:null,component:"div",expanded:!1,onExpand:h,onHide:h,teaser:null,teaserExpanded:null,toggleProps:{}},y.internalKeys=Object.keys(y.defaultProps),t.default=y}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDYwMzAzZjMyMDE3ZGYxMzE3YjVjIiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtcHJvZ3Jlc3NpdmUtZGlzY2xvc3VyZS9pbmRleC5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibW9kdWxlcyIsIl9fd2VicGFja19yZXF1aXJlX18iLCJtb2R1bGVJZCIsImluc3RhbGxlZE1vZHVsZXMiLCJpIiwibCIsImNhbGwiLCJtIiwiYyIsInZhbHVlIiwiZCIsIm5hbWUiLCJnZXR0ZXIiLCJvIiwiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJjb25maWd1cmFibGUiLCJlbnVtZXJhYmxlIiwiZ2V0IiwibiIsIl9fZXNNb2R1bGUiLCJvYmplY3QiLCJwcm9wZXJ0eSIsInByb3RvdHlwZSIsImhhc093blByb3BlcnR5IiwicCIsInMiLCJfX3dlYnBhY2tfZXhwb3J0c19fIiwib21pdEtleXNGcm9tU291cmNlT2JqZWN0Iiwic291cmNlIiwib21pdHRlZEtleXMiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJ1bm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ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGhhbmRsZUtleURvd24gPSAoZXZlbnQpID0+IHtcbiAgICAgICAgc3dpdGNoIChldmVudC5rZXkpIHtcbiAgICAgICAgY2FzZSAnRW50ZXInOlxuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoe2V4cGFuZGVkOiAhdGhpcy5zdGF0ZS5leHBhbmRlZH0sIHRoaXMuZGlzcGF0Y2hDYWxsYmFjayk7XG4gICAgICAgIH1cblxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgICBpZiAoaXNGdW5jdGlvbih0aGlzLnByb3BzLnRvZ2dsZVByb3BzLm9uS2V5RG93bikpIHtcbiAgICAgICAgICAgIHRoaXMucHJvcHMudG9nZ2xlUHJvcHMub25LZXlEb3duKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlckNvbnRlbnQoKSB7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlLmV4cGFuZGVkKSB7XG4gICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgIDxkaXYgcmVmPSdjb250ZW50J1xuICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdiLWRpc2Nsb3N1cmUtY29udGVudCc+XG4gICAgICAgICAgICAgICAgICAgIHtpc0Z1bmN0aW9uKHRoaXMucHJvcHMuY2hpbGRyZW4pID8gdGhpcy5wcm9wcy5jaGlsZHJlbigpIDogdGhpcy5wcm9wcy5jaGlsZHJlbn1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8dGhpcy5wcm9wcy5jb21wb25lbnRcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBQcm9ncmVzc2l2ZURpc2Nsb3N1cmUuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaXNjbG9zdXJlJywgdGhpcy5wcm9wcy5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAnYi1kaXNjbG9zdXJlLWV4cGFuZGVkJzogdGhpcy5zdGF0ZS5leHBhbmRlZCxcbiAgICAgICAgICAgICAgICB9KX0+XG5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLnRvZ2dsZVByb3BzfVxuICAgICAgICAgICAgICAgICAgICByZWY9J3RvZ2dsZSdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1kaXNjbG9zdXJlLXRvZ2dsZScsIHRoaXMucHJvcHMudG9nZ2xlUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17dGhpcy5oYW5kbGVDbGlja31cbiAgICAgICAgICAgICAgICAgICAgb25LZXlEb3duPXt0aGlzLmhhbmRsZUtleURvd259XG4gICAgICAgICAgICAgICAgICAgIHRhYkluZGV4PScwJz5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMuc3RhdGUuZXhwYW5kZWQgPyB0aGlzLnByb3BzLnRlYXNlckV4cGFuZGVkIHx8IHRoaXMucHJvcHMudGVhc2VyIDogdGhpcy5wcm9wcy50ZWFzZXJ9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJDb250ZW50KCl9XG4gICAgICAgICAgICA8L3RoaXMucHJvcHMuY29tcG9uZW50PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1wcm9ncmVzc2l2ZS1kaXNjbG9zdXJlL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const isFunction = (x) => typeof x === 'function'; | ||
const noop = () => {}; | ||
/** | ||
@@ -9,0 +10,0 @@ # ProgressiveDisclosure |
{ | ||
"name": "boundless-progressive-disclosure", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "Hide content until it's needed, with configurable teasers.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -27,9 +28,5 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^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" | ||
}, | ||
"peerDependencies": { | ||
@@ -36,0 +33,0 @@ "react": ">= 15.3", |
@@ -51,3 +51,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>called when the content is shown; not called on initial render</td> | ||
@@ -59,3 +59,3 @@ </tr> | ||
<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>called when the content is hidden; not called on initial render</td> | ||
@@ -87,1 +87,2 @@ </tr> | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,r){"use strict";t.a=function(e){return"function"==typeof e}},function(e,t,r){"use strict";function n(){}t.a=n},function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(r,n){return t.indexOf(n)===-1&&(r[n]=e[n]),r},{})}t.a=n},function(e,t,r){"use strict";function n(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=n},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(5),p=r.n(s),a=r(4),u=r.n(a),c=r(0),l=r(1),f=r(2),d=r(3),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},b=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),y=function(e){function t(){var e,i,s,p;n(this,t);for(var a=arguments.length,u=Array(a),l=0;l<a;l++)u[l]=arguments[l];return i=s=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),s.uuid=r.i(d.a)(),s.handleChange=function(e){e.target.checked&&s.props.onSelected(e.target.value),r.i(c.a)(s.props.inputProps.onChange)&&s.props.inputProps.onChange(e)},p=i,o(s,p)}return i(t,e),b(t,[{key:"renderInput",value:function(){return p.a.createElement("input",h({},this.props.inputProps,{ref:"input",type:"radio",id:this.props.id||this.props.inputProps.id||this.uuid,className:u()("b-radio",this.props.inputProps.className,{"b-radio-selected":this.props.selected}),name:this.props.name,value:this.props.value,checked:this.props.selected,"aria-checked":String(this.props.selected),onChange:this.handleChange}))}},{key:"renderLabel",value:function(){if(this.props.label)return p.a.createElement("label",h({},this.props.labelProps,{ref:"label",className:u()("b-radio-label",this.props.labelProps.className),htmlFor:this.props.id||this.props.inputProps.id||this.uuid}),this.props.label)}},{key:"render",value:function(){return p.a.createElement("div",h({},r.i(f.a)(this.props,t.internalKeys),{ref:"wrapper",className:u()("b-radio-wrapper",this.props.className)}),this.renderInput(),this.renderLabel())}}]),t}(p.a.PureComponent);y.propTypes={inputProps:s.PropTypes.object,label:s.PropTypes.node,labelProps:s.PropTypes.object,name:s.PropTypes.string.isRequired,onSelected:s.PropTypes.func,selected:s.PropTypes.bool,value:s.PropTypes.string.isRequired},y.defaultProps={inputProps:{},label:null,labelProps:{},name:"",onSelected:l.a,selected:!1,value:""},y.internalKeys=Object.keys(y.defaultProps),t.default=y}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDVhYWRkNzExMjNlZDdiZGRkNGE1Iiw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FxuICAgICAgICB2YWx1ZTogJycsXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVybmFsS2V5cyA9IE9iamVjdC5rZXlzKFJhZGlvLmRlZmF1bHRQcm9wcylcblxuICAgIHV1aWQgPSB1dWlkKClcblxuICAgIGhhbmRsZUNoYW5nZSA9IChldmVudCkgPT4ge1xuICAgICAgICBpZiAoZXZlbnQudGFyZ2V0LmNoZWNrZWQpIHtcbiAgICAgICAgICAgIHRoaXMucHJvcHMub25TZWxlY3RlZChldmVudC50YXJnZXQudmFsdWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKGlzRnVuY3Rpb24odGhpcy5wcm9wcy5pbnB1dFByb3BzLm9uQ2hhbmdlKSkge1xuICAgICAgICAgICAgdGhpcy5wcm9wcy5pbnB1dFByb3BzLm9uQ2hhbmdlKGV2ZW50KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlcklucHV0KCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGlucHV0XG4gICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMuaW5wdXRQcm9wc31cbiAgICAgICAgICAgICAgICByZWY9J2lucHV0J1xuICAgICAgICAgICAgICAgIHR5cGU9J3JhZGlvJ1xuICAgICAgICAgICAgICAgIGlkPXt0aGlzLnByb3BzLmlkIHx8IHRoaXMucHJvcHMuaW5wdXRQcm9wcy5pZCB8fCB0aGlzLnV1aWR9XG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1yYWRpbycsIHRoaXMucHJvcHMuaW5wdXRQcm9wcy5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAgJ2ItcmFkaW8tc2VsZWN0ZWQnOiB0aGlzLnByb3BzLnNlbGVjdGVkLFxuICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgIG5hbWU9e3RoaXMucHJvcHMubmFtZX1cbiAgICAgICAgICAgICAgICB2YWx1ZT17dGhpcy5wcm9wcy52YWx1ZX1cbiAgICAgICAgICAgICAgICBjaGVja2VkPXt0aGlzLnByb3BzLnNlbGVjdGVkfVxuICAgICAgICAgICAgICAgIGFyaWEtY2hlY2tlZD17U3RyaW5nKHRoaXMucHJvcHMuc2VsZWN0ZWQpfVxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXt0aGlzLmhhbmRsZUNoYW5nZX0gLz5cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICByZW5kZXJMYWJlbCgpIHtcbiAgICAgICAgaWYgKHRoaXMucHJvcHMubGFiZWwpIHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPGxhYmVsXG4gICAgICAgICAgICAgICAgICAgIHsuLi50aGlzLnByb3BzLmxhYmVsUHJvcHN9XG4gICAgICAgICAgICAgICAgICAgIHJlZj0nbGFiZWwnXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2ItcmFkaW8tbGFiZWwnLCB0aGlzLnByb3BzLmxhYmVsUHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICAgICAgaHRtbEZvcj17dGhpcy5wcm9wcy5pZCB8fCB0aGlzLnByb3BzLmlucHV0UHJvcHMuaWQgfHwgdGhpcy51dWlkfT5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMubGFiZWx9XG4gICAgICAgICAgICAgICAgPC9sYWJlbD5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgey4uLm9taXQodGhpcy5wcm9wcywgUmFkaW8uaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1yYWRpby13cmFwcGVyJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJJbnB1dCgpfVxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlckxhYmVsKCl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3MtcmFkaW8vaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 | ||
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(r,n){return t.indexOf(n)===-1&&(r[n]=e[n]),r},{})}t.a=n},function(e,t,r){"use strict";function n(){return"b-"+([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(e){return(e^16*Math.random()>>e/4).toString(16)})}t.a=n},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),p=r.n(s),a=r(2),u=r.n(a),l=r(0),c=r(1),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),h=function(e){return"function"==typeof e},b=function(e){function t(){var e,i,s,p;n(this,t);for(var a=arguments.length,u=Array(a),l=0;l<a;l++)u[l]=arguments[l];return i=s=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),s.uuid=r.i(c.a)(),s.handleChange=function(e){e.target.checked&&s.props.onSelected(e.target.value),h(s.props.inputProps.onChange)&&s.props.inputProps.onChange(e)},p=i,o(s,p)}return i(t,e),d(t,[{key:"renderInput",value:function(){return p.a.createElement("input",f({},this.props.inputProps,{ref:"input",type:"radio",id:this.props.id||this.props.inputProps.id||this.uuid,className:u()("b-radio",this.props.inputProps.className,{"b-radio-selected":this.props.selected}),name:this.props.name,value:this.props.value,checked:this.props.selected,"aria-checked":String(this.props.selected),onChange:this.handleChange}))}},{key:"renderLabel",value:function(){if(this.props.label)return p.a.createElement("label",f({},this.props.labelProps,{ref:"label",className:u()("b-radio-label",this.props.labelProps.className),htmlFor:this.props.id||this.props.inputProps.id||this.uuid}),this.props.label)}},{key:"render",value:function(){return p.a.createElement("div",f({},r.i(l.a)(this.props,t.internalKeys),{ref:"wrapper",className:u()("b-radio-wrapper",this.props.className)}),this.renderInput(),this.renderLabel())}}]),t}(p.a.PureComponent);b.propTypes={inputProps:s.PropTypes.object,label:s.PropTypes.node,labelProps:s.PropTypes.object,name:s.PropTypes.string.isRequired,onSelected:s.PropTypes.func,selected:s.PropTypes.bool,value:s.PropTypes.string.isRequired},b.defaultProps={inputProps:{},label:null,labelProps:{},name:"",onSelected:function(){},selected:!1,value:""},b.internalKeys=Object.keys(b.defaultProps),t.default=b}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDA3YTRkZjlkY2QwYWUzZmRkZGY4Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vcGFja2FnZXMvYm91bmRsZXNzLXV0aWxzLXV1aWQvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiY2xhc3NuYW1lc1wifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJyZWFjdFwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3MtcmFkaW8vaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZmlndXJhYmxlIiwiZW51bWVyYWJsZSIsImdldCIsIm4iLCJfX2VzTW9kdWxlIiwib2JqZWN0IiwicHJvcGVydHkiLCJwcm90b3R5cGUiLCJoYXNPd25Qcm9wZXJ0eSIsInAiLCJzIiwiX193ZWJwYWNrX2V4cG9ydHNfXyIsIm9taXRLZXlzRnJvbVNvdXJjZU9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gYXR0cmlidXRlIG9uIHRoZSBgLmItcmFkaW9gIG5vZGVcbiAgICAgICAgICovXG4gICAgICAgIHZhbHVlOiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gICAgfVxuXG4gICAgc3RhdGljIGRlZmF1bHRQcm9wcyA9IHtcbiAgICAgICAgaW5wdXRQcm9wczoge30sXG4gICAgICAgIGxhYmVsOiBudWxsLFxuICAgICAgICBsYWJlbFByb3BzOiB7fSxcbiAgICAgICAgbmFtZTogJycsXG4gICAgICAgIG9uU2VsZWN0ZWQ6ICgpID0+IHt9LFxuICAgICAgICBzZWxlY3RlZDogZmFsc2UsXG4gICAgICAgIHZhbHVlOiAnJyxcbiAgICB9XG5cbiAgICBzdGF0aWMgaW50ZXJuYWxLZXlzID0gT2JqZWN0LmtleXMoUmFkaW8uZGVmYXVsdFByb3BzKVxuXG4gICAgdXVpZCA9IHV1aWQoKVxuXG4gICAgaGFuZGxlQ2hhbmdlID0gKGV2ZW50KSA9PiB7XG4gICAgICAgIGlmIChldmVudC50YXJnZXQuY2hlY2tlZCkge1xuICAgICAgICAgICAgdGhpcy5wcm9wcy5vblNlbGVjdGVkKGV2ZW50LnRhcmdldC52YWx1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgICBpZiAoaXNGdW5jdGlvbih0aGlzLnByb3BzLmlucHV0UHJvcHMub25DaGFuZ2UpKSB7XG4gICAgICAgICAgICB0aGlzLnByb3BzLmlucHV0UHJvcHMub25DaGFuZ2UoZXZlbnQpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmVuZGVySW5wdXQoKSB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8aW5wdXRcbiAgICAgICAgICAgICAgICB7Li4udGhpcy5wcm9wcy5pbnB1dFByb3BzfVxuICAgICAgICAgICAgICAgIHJlZj0naW5wdXQnXG4gICAgICAgICAgICAgICAgdHlwZT0ncmFkaW8nXG4gICAgICAgICAgICAgICAgaWQ9e3RoaXMucHJvcHMuaWQgfHwgdGhpcy5wcm9wcy5pbnB1dFByb3BzLmlkIHx8IHRoaXMudXVpZH1cbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXJhZGlvJywgdGhpcy5wcm9wcy5pbnB1dFByb3BzLmNsYXNzTmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAnYi1yYWRpby1zZWxlY3RlZCc6IHRoaXMucHJvcHMuc2VsZWN0ZWQsXG4gICAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICAgICAgbmFtZT17dGhpcy5wcm9wcy5uYW1lfVxuICAgICAgICAgICAgICAgIHZhbHVlPXt0aGlzLnByb3BzLnZhbHVlfVxuICAgICAgICAgICAgICAgIGNoZWNrZWQ9e3RoaXMucHJvcHMuc2VsZWN0ZWR9XG4gICAgICAgICAgICAgICAgYXJpYS1jaGVja2VkPXtTdHJpbmcodGhpcy5wcm9wcy5zZWxlY3RlZCl9XG4gICAgICAgICAgICAgICAgb25DaGFuZ2U9e3RoaXMuaGFuZGxlQ2hhbmdlfSAvPlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlckxhYmVsKCkge1xuICAgICAgICBpZiAodGhpcy5wcm9wcy5sYWJlbCkge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8bGFiZWxcbiAgICAgICAgICAgICAgICAgICAgey4uLnRoaXMucHJvcHMubGFiZWxQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgcmVmPSdsYWJlbCdcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1yYWRpby1sYWJlbCcsIHRoaXMucHJvcHMubGFiZWxQcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgICAgICBodG1sRm9yPXt0aGlzLnByb3BzLmlkIHx8IHRoaXMucHJvcHMuaW5wdXRQcm9wcy5pZCB8fCB0aGlzLnV1aWR9PlxuICAgICAgICAgICAgICAgICAgICB7dGhpcy5wcm9wcy5sYWJlbH1cbiAgICAgICAgICAgICAgICA8L2xhYmVsPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBSYWRpby5pbnRlcm5hbEtleXMpfVxuICAgICAgICAgICAgICAgIHJlZj0nd3JhcHBlcidcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXJhZGlvLXdyYXBwZXInLCB0aGlzLnByb3BzLmNsYXNzTmFtZSl9PlxuICAgICAgICAgICAgICAgIHt0aGlzLnJlbmRlcklucHV0KCl9XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyTGFiZWwoKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3BhY2thZ2VzL2JvdW5kbGVzcy1yYWRpby9pbmRleC5qcyJdLCJzb3VyY2VSb290IjoiIn0= |
import React, {PropTypes} from 'react'; | ||
import cx from 'classnames'; | ||
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'; | ||
/** | ||
@@ -58,3 +58,3 @@ # Radio | ||
name: '', | ||
onSelected: noop, | ||
onSelected: () => {}, | ||
selected: false, | ||
@@ -61,0 +61,0 @@ value: '', |
{ | ||
"name": "boundless-radio", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "An accessible radio form control.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -27,10 +28,6 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"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", |
@@ -73,3 +73,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>called when the element becomes selected; backing data must be updated to persist the state change</td> | ||
@@ -87,1 +87,2 @@ </tr> | ||
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=7)}([function(e,n,t){"use strict";n.a=function(e){return"function"==typeof e}},function(e,n,t){"use strict";function o(){}n.a=o},function(e,n,t){"use strict";function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(t,o){return n.indexOf(o)===-1&&(t[o]=e[o]),t},{})}n.a=o},function(e,n){e.exports=require("boundless-button")},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n){e.exports=require("react-dom")},function(e,n,t){"use strict";function o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function i(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var u=t(5),s=t.n(u),c=t(6),a=(t.n(c),t(4)),p=t.n(a),l=t(3),f=t.n(l),d=t(0),h=t(1),y=t(2),v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},O=function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}}(),b=function(e){function n(){var e,i,u,s;o(this,n);for(var c=arguments.length,a=Array(c),p=0;p<c;p++)a[p]=arguments[p];return i=u=r(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(a))),u.state={indexOfOptionInFocus:null},u.handleKeyDown=function(e){var n=e.key,o=u.state.indexOfOptionInFocus;"ArrowLeft"===n?(u.setFocus(u.getPreviousOptionIndex(o)),e.preventDefault()):"ArrowRight"===n?(u.setFocus(u.getNextOptionIndex(o)),e.preventDefault()):"Enter"===n&&(u.handleOptionClick(u.props.options[o]),e.preventDefault()),t.i(d.a)(u.props.onKeyDown)&&u.props.onKeyDown(e)},s=i,r(u,s)}return i(n,e),O(n,[{key:"currentValue",value:function(){var e=void 0;return this.props.options.some(function(n){if(n.selected)return e=n.value,!0}),e}},{key:"setFocus",value:function(e){t.i(c.findDOMNode)(this.refs["option_$"+e]).focus()}},{key:"getNextOptionIndex",value:function(e){var n=e+1;return n<this.props.options.length?n:0}},{key:"getPreviousOptionIndex",value:function(e){var n=e-1;return n<0?this.props.options.length-1:n}},{key:"handleOptionBlur",value:function(e,n){this.state.indexOfOptionInFocus===this.props.options.indexOf(e)&&this.setState({indexOfOptionInFocus:null}),t.i(d.a)(e.onBlur)&&e.onBlur(n)}},{key:"handleOptionClick",value:function(e,n){this.props.onOptionSelected(e.value),t.i(d.a)(e.onClick)&&e.onClick(n)}},{key:"handleOptionFocus",value:function(e,n){this.setState({indexOfOptionInFocus:this.props.options.indexOf(e)}),t.i(d.a)(e.onFocus)&&e.onFocus(n)}},{key:"renderOptions",value:function(){var e=this;return this.props.options.map(function(o,r){return s.a.createElement(f.a,v({},t.i(y.a)(o,n.internalChildKeys),{role:"radio","aria-checked":String(o.selected),ref:"option_$"+r,key:o.value,className:p()("b-segmented-control-option",o.className,{"b-segmented-control-option-selected":o.selected}),tabIndex:o.selected?"0":"-1",onBlur:e.handleOptionBlur.bind(e,o),onPressed:e.handleOptionClick.bind(e,o),onFocus:e.handleOptionFocus.bind(e,o)}),o.content)})}},{key:"render",value:function(){return s.a.createElement("div",v({},t.i(y.a)(this.props,n.internalKeys),{ref:"wrapper",role:"radiogroup",className:p()("b-segmented-control",this.props.className),onKeyDown:this.handleKeyDown}),this.renderOptions())}}]),n}(s.a.PureComponent);b.propTypes={onOptionSelected:u.PropTypes.func,options:function(e){if(e.options.length<2)throw new Error("Must provide at least two options.");var n=e.options.some(function(e){if(!("selected"in e))return!0});if(n)throw new Error("Must provide a `selected` prop for each option.");var t=!1,o=e.options.some(function(e){if(e.selected){if(t)return!0;t=!0}});if(o)throw new Error("Encountered multiple options with `selected: true`. There can be only one.");if(e.options.some(function(e){return"undefined"==typeof e.value}))throw new Error("Must provide a `value` prop for each option.")}},b.defaultProps={onOptionSelected:h.a,options:[]},b.internalKeys=Object.keys(b.defaultProps),b.internalChildKeys=["content","value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AgICAgIGlmICghKCdzZWxlY3RlZCcgaW4gb3B0aW9uKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKG1pc3NpbmdTZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTXVzdCBwcm92aWRlIGEgYHNlbGVjdGVkYCBwcm9wIGZvciBlYWNoIG9wdGlvbi4nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IHNlZW5TZWxlY3RlZCA9IGZhbHNlO1xuICAgICAgICAgICAgY29uc3QgbXVsdGlwbGVTZWxlY3RlZCA9IHByb3BzLm9wdGlvbnMuc29tZSgob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbi5zZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc2VlblNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHNlZW5TZWxlY3RlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmIChtdWx0aXBsZVNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdFbmNvdW50ZXJlZCBtdWx0aXBsZSBvcHRpb25zIHdpdGggYHNlbGVjdGVkOiB0cnVlYC4gVGhlcmUgY2FuIGJlIG9ubHkgb25lLicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocHJvcHMub3B0aW9ucy5zb21lKChvcHRpb24pID0+IHR5cGVvZiBvcHRpb24udmFsdWUgPT09ICd1bmRlZmluZWQnKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTXVzdCBwcm92aWRlIGEgYHZhbHVlYCBwcm9wIGZvciBlYWNoIG9wdGlvbi4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICB9XG5cbiAgICBzdGF0aWMgZGVmYXVsdFByb3BzID0ge1xuICAgICAgICBvbk9wdGlvblNlbGVjdGVkOiBub29wLFxuICAgICAgICBvcHRpb25zOiBbXSxcbiAgICB9XG5cbiAgICBzdGF0aWMgaW50ZXJuYWxLZXlzID0gT2JqZWN0LmtleXMoU2VnbWVudGVkQ29udHJvbC5kZWZhdWx0UHJvcHMpXG4gICAgc3RhdGljIGludGVybmFsQ2hpbGRLZXlzID0gW1xuICAgICAgICAnY29udGVudCcsXG4gICAgICAgICd2YWx1ZScsXG4gICAgICAgICdzZWxlY3RlZCcsXG4gICAgXVxuXG4gICAgc3RhdGUgPSB7XG4gICAgICAgIGluZGV4T2ZPcHRpb25JbkZvY3VzOiBudWxsLFxuICAgIH1cblxuICAgIGN1cnJlbnRWYWx1ZSgpIHtcbiAgICAgICAgbGV0IHZhbHVlO1xuXG4gICAgICAgIHRoaXMucHJvcHMub3B0aW9ucy5zb21lKChvcHRpb24pID0+IHtcbiAgICAgICAgICAgIGlmIChvcHRpb24uc2VsZWN0ZWQpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IG9wdGlvbi52YWx1ZTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG4gICAgc2V0Rm9jdXMoaW5kZXgpIHtcbiAgICAgICAgZmluZERPTU5vZGUodGhpcy5yZWZzWydvcHRpb25fJCcgKyBpbmRleF0pLmZvY3VzKCk7XG4gICAgfVxuXG4gICAgZ2V0TmV4dE9wdGlvbkluZGV4KGN1cnJlbnRPcHRpb25JbmRleCkge1xuICAgICAgICBsZXQgbmV4dCA9IGN1cnJlbnRPcHRpb25JbmRleCArIDE7X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lvbnMoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnByb3BzLm9wdGlvbnMubWFwKChkZWZpbml0aW9uLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICA8QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIHsuLi5vbWl0KGRlZmluaXRpb24sIFNlZ21lbnRlZENvbnRyb2wuaW50ZXJuYWxDaGlsZEtleXMpfVxuICAgICAgICAgICAgICAgICAgICByb2xlPSdyYWRpbydcbiAgICAgICAgICAgICAgICAgICAgYXJpYS1jaGVja2VkPXtTdHJpbmcoZGVmaW5pdGlvbi5zZWxlY3RlZCl9XG4gICAgICAgICAgICAgICAgICAgIHJlZj17J29wdGlvbl8kJyArIGluZGV4fVxuICAgICAgICAgICAgICAgICAgICBrZXk9e2RlZmluaXRpb24udmFsdWV9XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goJ2Itc2VnbWVudGVkLWNvbnRyb2wtb3B0aW9uJywgZGVmaW5pdGlvbi5jbGFzc05hbWUsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICdiLXNlZ21lbnRlZC1jb250cm9sLW9wdGlvbi1zZWxlY3RlZCc6IGRlZmluaXRpb24uc2VsZWN0ZWQsXG4gICAgICAgICAgICAgICAgICAgIH0pfVxuICAgICAgICAgICAgICAgICAgICB0YWJJbmRleD17ZGVmaW5pdGlvbi5zZWxlY3RlZCA/ICcwJyA6ICctMSd9XG4gICAgICAgICAgICAgICAgICAgIG9uQmx1cj17dGhpcy5oYW5kbGVPcHRpb25CbHVyLmJpbmQodGhpcywgZGVmaW5pdGlvbil9XG4gICAgICAgICAgICAgICAgICAgIG9uUHJlc3NlZD17dGhpcy5oYW5kbGVPcHRpb25DbGljay5iaW5kKHRoaXMsIGRlZmluaXRpb24pfVxuICAgICAgICAgICAgICAgICAgICBvbkZvY3VzPXt0aGlzLmhhbmRsZU9wdGlvbkZvY3VzLmJpbmQodGhpcywgZGVmaW5pdGlvbil9PlxuICAgICAgICAgICAgICAgICAgICB7ZGVmaW5pdGlvbi5jb250ZW50fVxuICAgICAgICAgICAgICAgIDwvQnV0dG9uPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIHsuLi5vbWl0KHRoaXMucHJvcHMsIFNlZ21lbnRlZENvbnRyb2wuaW50ZXJuYWxLZXlzKX1cbiAgICAgICAgICAgICAgICByZWY9J3dyYXBwZXInXG4gICAgICAgICAgICAgICAgcm9sZT0ncmFkaW9ncm91cCdcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXNlZ21lbnRlZC1jb250cm9sJywgdGhpcy5wcm9wcy5jbGFzc05hbWUpfVxuICAgICAgICAgICAgICAgIG9uS2V5RG93bj17dGhpcy5oYW5kbGVLZXlEb3dufT5cbiAgICAgICAgICAgICAgICB7dGhpcy5yZW5kZXJPcHRpb25zKCl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9wYWNrYWdlcy9ib3VuZGxlc3Mtc2VnbWVudGVkLWNvbnRyb2wvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9 | ||
module.exports=function(e){function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=5)}([function(e,n,t){"use strict";function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object.keys(e).reduce(function(t,o){return n.indexOf(o)===-1&&(t[o]=e[o]),t},{})}n.a=o},function(e,n){e.exports=require("boundless-button")},function(e,n){e.exports=require("classnames")},function(e,n){e.exports=require("react")},function(e,n){e.exports=require("react-dom")},function(e,n,t){"use strict";function o(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function r(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function i(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}Object.defineProperty(n,"__esModule",{value:!0});var u=t(3),s=t.n(u),c=t(4),p=(t.n(c),t(2)),a=t.n(p),l=t(1),f=t.n(l),d=t(0),h=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},y=function(){function e(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(n,t,o){return t&&e(n.prototype,t),o&&e(n,o),n}}(),v=function(e){return"function"==typeof e},O=function(e){function n(){var e,t,i,u;o(this,n);for(var s=arguments.length,c=Array(s),p=0;p<s;p++)c[p]=arguments[p];return t=i=r(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(c))),i.state={indexOfOptionInFocus:null},i.handleKeyDown=function(e){var n=e.key,t=i.state.indexOfOptionInFocus;"ArrowLeft"===n?(i.setFocus(i.getPreviousOptionIndex(t)),e.preventDefault()):"ArrowRight"===n?(i.setFocus(i.getNextOptionIndex(t)),e.preventDefault()):"Enter"===n&&(i.handleOptionClick(i.props.options[t]),e.preventDefault()),v(i.props.onKeyDown)&&i.props.onKeyDown(e)},u=t,r(i,u)}return i(n,e),y(n,[{key:"currentValue",value:function(){var e=void 0;return this.props.options.some(function(n){if(n.selected)return e=n.value,!0}),e}},{key:"setFocus",value:function(e){t.i(c.findDOMNode)(this.refs["option_$"+e]).focus()}},{key:"getNextOptionIndex",value:function(e){var n=e+1;return n<this.props.options.length?n:0}},{key:"getPreviousOptionIndex",value:function(e){var n=e-1;return n<0?this.props.options.length-1:n}},{key:"handleOptionBlur",value:function(e,n){this.state.indexOfOptionInFocus===this.props.options.indexOf(e)&&this.setState({indexOfOptionInFocus:null}),v(e.onBlur)&&e.onBlur(n)}},{key:"handleOptionClick",value:function(e,n){this.props.onOptionSelected(e.value),v(e.onClick)&&e.onClick(n)}},{key:"handleOptionFocus",value:function(e,n){this.setState({indexOfOptionInFocus:this.props.options.indexOf(e)}),v(e.onFocus)&&e.onFocus(n)}},{key:"renderOptions",value:function(){var e=this;return this.props.options.map(function(o,r){return s.a.createElement(f.a,h({},t.i(d.a)(o,n.internalChildKeys),{role:"radio","aria-checked":String(o.selected),ref:"option_$"+r,key:o.value,className:a()("b-segmented-control-option",o.className,{"b-segmented-control-option-selected":o.selected}),tabIndex:o.selected?"0":"-1",onBlur:e.handleOptionBlur.bind(e,o),onPressed:e.handleOptionClick.bind(e,o),onFocus:e.handleOptionFocus.bind(e,o)}),o.content)})}},{key:"render",value:function(){return s.a.createElement("div",h({},t.i(d.a)(this.props,n.internalKeys),{ref:"wrapper",role:"radiogroup",className:a()("b-segmented-control",this.props.className),onKeyDown:this.handleKeyDown}),this.renderOptions())}}]),n}(s.a.PureComponent);O.propTypes={onOptionSelected:u.PropTypes.func,options:function(e){if(e.options.length<2)throw new Error("Must provide at least two options.");var n=e.options.some(function(e){if(!("selected"in e))return!0});if(n)throw new Error("Must provide a `selected` prop for each option.");var t=!1,o=e.options.some(function(e){if(e.selected){if(t)return!0;t=!0}});if(o)throw new Error("Encountered multiple options with `selected: true`. There can be only one.");if(e.options.some(function(e){return"undefined"==typeof e.value}))throw new Error("Must provide a `value` prop for each option.")}},O.defaultProps={onOptionSelected:function(){},options:[]},O.internalKeys=Object.keys(O.defaultProps),O.internalChildKeys=["content","value","selected"],n.default=O}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguanMiLCJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDUwMDMxYzEwZWJkMWYxZDZhN2U1Iiwid2VicGFjazovLy8uL3BhY2thZ2VzL2JvdW5kbGVzcy11dGlscy1vbWl0LWtleXMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vL2V4dGVybmFsIHtcImNvbW1vbmpzMlwiOlwiYm91bmRsZXNzLWJ1dHRvblwifSIsIndlYnBhY2s6Ly8vZXh0ZXJuYWwge1wiY29tbW9uanMyXCI6XCJjbGFzc25hbWVzXCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcInJlYWN0XCJ9Iiwid2VicGFjazovLy9leHRlcm5hbCB7XCJjb21tb25qczJcIjpcInJlYWN0LWRvbVwifSIsIndlYnBhY2s6Ly8vLi9wYWNrYWdlcy9ib3VuZGxlc3Mtc2VnbWVudGVkLWNvbnRyb2wvaW5kZXguanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1vZHVsZXMiLCJfX3dlYnBhY2tfcmVxdWlyZV9fIiwibW9kdWxlSWQiLCJpbnN0YWxsZWRNb2R1bGVzIiwiaSIsImwiLCJjYWxsIiwibSIsImMiLCJ2YWx1ZSIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiY29uZmlndXJhYmxlIiwiZW51bWVyYWJsZSIsImdldCIsIm4iLCJfX2VzTW9kdWxlIiwib2JqZWN0IiwicHJvcGVyd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G9wdGlvbi4nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IHNlZW5TZWxlY3RlZCA9IGZhbHNlO1xuICAgICAgICAgICAgY29uc3QgbXVsdGlwbGVTZWxlY3RlZCA9IHByb3BzLm9wdGlvbnMuc29tZSgob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbi5zZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc2VlblNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHNlZW5TZWxlY3RlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmIChtdWx0aXBsZVNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdFbmNvdW50ZXJlZCBtdWx0aXBsZSBvcHRpb25zIHdpdGggYHNlbGVjdGVkOiB0cnVlYC4gVGhlcmUgY2FuIGJlIG9ubHkgb25lLicpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocHJvcHMub3B0aW9ucy5zb21lKChvcHRpb24pID0+IHR5cGVvZiBvcHRpb24udmFsdWUgPT09ICd1bmRlZmluZWQnKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTXVzdCBwcm92aWRlIGEgYHZhbHVlYCBwcm9wIGZvciBlYWNoIG9wdGlvbi4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICB9XG5cbiAgICBzdGF0aWMgZGVmYXVsdFByb3BzID0ge1xuICAgICAgICBvbk9wdGlvblNlbGVjdGVkOiAoKSA9PiB7fSxcbiAgICAgICAgb3B0aW9uczogW10sXG4gICAgfVxuXG4gICAgc3RhdGljIGludGVybmFsS2V5cyA9IE9iamVjdC5rZXlzKFNlZ21lbnRlZENvbnRyb2wuZGVmYXVsdFByb3BzKVxuICAgIHN0YXRpYyBpbnRlcm5hbENoaWxkS2V5cyA9IFtcbiAgICAgICAgJ2NvbnRlbnQnLFxuICAgICAgICAndmFsdWUnLFxuICAgICAgICAnc2VsZWN0ZWQnLFxuICAgIF1cblxuICAgIHN0YXRlID0ge1xuICAgICAgICBpbmRleE9mT3B0aW9uSW5Gb2N1czogbnVsbCxcbiAgICB9XG5cbiAgICBjdXJyZW50VmFsdWUoKSB7XG4gICAgICAgIGxldCB2YWx1ZTtcblxuICAgICAgICB0aGlzLnByb3BzLm9wdGlvbnMuc29tZSgob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICBpZiAob3B0aW9uLnNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBvcHRpb24udmFsdWU7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgIH1cblxuICAgIHNldEZvY3VzKGluZGV4KSB7XG4gICAgICAgIGZpbmRET01Ob2RlKHRoaXMucmVmc1snb3B0aW9uXyQnICsgaW5kZXhdKS5mb2N1cygpO1xuICAgIH1cblxuICAgIGdldE5leHRPcHRpb25JbmRleChjdXJyZW50T3B0aW9uSW5kZXgpIHtcbiAgICAgICAgbGV0IG5leHQgPSBjdXJyZW50T3B0aW9uSW5kZXggKyAxO1xuXG4gICAgICAgIHJldHVybiBuZXh0IDwgdGhpcy5wcm9wcy5vcHRpb25zLmxlbmd0aCA/IG5leHQgOiAwO1xuICAgIH1cblxuICAgIGdldFByZXZpb3VzT3B0aW9uSW5kZXgoY3VycmVudE9wdGlvbkluZGV4KSB7XG4gICAgICAgIGxldCBwcmV2aW91cyA9IGN1cnJlbnRPcHRpb25JbmRleCAtIDE7XG5cbiAgICAgICAgcmV0dXJuIHByZXZpb3VzIDwgMCA/I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b25zdCBhY3RpdmVJdGVtSW5kZXggPSB0aGlzLnN0YXRlLmluZGV4T2ZPcHRpb25JbkZvY3VzO1xuXG4gICAgICAgIGlmIChrZXkgPT09ICdBcnJvd0xlZnQnKSB7XG4gICAgICAgICAgICB0aGlzLnNldEZvY3VzKHRoaXMuZ2V0UHJldmlvdXNPcHRpb25JbmRleChhY3RpdmVJdGVtSW5kZXgpKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH0gZWxzZSBpZiAoa2V5ID09PSAnQXJyb3dSaWdodCcpIHtcbiAgICAgICAgICAgIHRoaXMuc2V0Rm9jdXModGhpcy5nZXROZXh0T3B0aW9uSW5kZXgoYWN0aXZlSXRlbUluZGV4KSk7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9IGVsc2UgaWYgKGtleSA9PT0gJ0VudGVyJykge1xuICAgICAgICAgICAgdGhpcy5oYW5kbGVPcHRpb25DbGljayh0aGlzLnByb3BzLm9wdGlvbnNbYWN0aXZlSXRlbUluZGV4XSk7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzRnVuY3Rpb24odGhpcy5wcm9wcy5vbktleURvd24pKSB7XG4gICAgICAgICAgICB0aGlzLnByb3BzLm9uS2V5RG93bihldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZW5kZXJPcHRpb25zKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5wcm9wcy5vcHRpb25zLm1hcCgoZGVmaW5pdGlvbiwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgPEJ1dHRvblxuICAgICAgICAgICAgICAgICAgICB7Li4ub21pdChkZWZpbml0aW9uLCBTZWdtZW50ZWRDb250cm9sLmludGVybmFsQ2hpbGRLZXlzKX1cbiAgICAgICAgICAgICAgICAgICAgcm9sZT0ncmFkaW8nXG4gICAgICAgICAgICAgICAgICAgIGFyaWEtY2hlY2tlZD17U3RyaW5nKGRlZmluaXRpb24uc2VsZWN0ZWQpfVxuICAgICAgICAgICAgICAgICAgICByZWY9eydvcHRpb25fJCcgKyBpbmRleH1cbiAgICAgICAgICAgICAgICAgICAga2V5PXtkZWZpbml0aW9uLnZhbHVlfVxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2N4KCdiLXNlZ21lbnRlZC1jb250cm9sLW9wdGlvbicsIGRlZmluaXRpb24uY2xhc3NOYW1lLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAnYi1zZWdtZW50ZWQtY29udHJvbC1vcHRpb24tc2VsZWN0ZWQnOiBkZWZpbml0aW9uLnNlbGVjdGVkLFxuICAgICAgICAgICAgICAgICAgICB9KX1cbiAgICAgICAgICAgICAgICAgICAgdGFiSW5kZXg9e2RlZmluaXRpb24uc2VsZWN0ZWQgPyAnMCcgOiAnLTEnfVxuICAgICAgICAgICAgICAgICAgICBvbkJsdXI9e3RoaXMuaGFuZGxlT3B0aW9uQmx1ci5iaW5kKHRoaXMsIGRlZmluaXRpb24pfVxuICAgICAgICAgICAgICAgICAgICBvblByZXNzZWQ9e3RoaXMuaGFuZGxlT3B0aW9uQ2xpY2suYmluZCh0aGlzLCBkZWZpbml0aW9uKX1cbiAgICAgICAgICAgICAgICAgICAgb25Gb2N1cz17dGhpcy5oYW5kbGVPcHRpb25Gb2N1cy5iaW5kKHRoaXMsIGRlZmluaXRpb24pfT5cbiAgICAgICAgICAgICAgICAgICAge2RlZmluaXRpb24uY29udGVudH1cbiAgICAgICAgICAgICAgICA8L0J1dHRvbj5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICB7Li4ub21pdCh0aGlzLnByb3BzLCBTZWdtZW50ZWRDb250cm9sLmludGVybmFsS2V5cyl9XG4gICAgICAgICAgICAgICAgcmVmPSd3cmFwcGVyJ1xuICAgICAgICAgICAgICAgIHJvbGU9J3JhZGlvZ3JvdXAnXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjeCgnYi1zZWdtZW50ZWQtY29udHJvbCcsIHRoaXMucHJvcHMuY2xhc3NOYW1lKX1cbiAgICAgICAgICAgICAgICBvbktleURvd249e3RoaXMuaGFuZGxlS2V5RG93bn0+XG4gICAgICAgICAgICAgICAge3RoaXMucmVuZGVyT3B0aW9ucygpfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcGFja2FnZXMvYm91bmRsZXNzLXNlZ21lbnRlZC1jb250cm9sL2luZGV4LmpzIl0sInNvdXJjZVJvb3QiOiIifQ== |
@@ -6,6 +6,6 @@ import React, {PropTypes} from 'react'; | ||
import Button from 'boundless-button'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const isFunction = (x) => typeof x === 'function'; | ||
/** | ||
@@ -75,3 +75,3 @@ # SegmentedControl | ||
static defaultProps = { | ||
onOptionSelected: noop, | ||
onOptionSelected: () => {}, | ||
options: [], | ||
@@ -78,0 +78,0 @@ } |
{ | ||
"name": "boundless-segmented-control", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "A control containing multiple buttons, only one of which can be active at a time.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -28,10 +29,6 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-button": "^1.0.0-beta.4", | ||
"boundless-button": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^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" | ||
}, | ||
"peerDependencies": { | ||
@@ -38,0 +35,0 @@ "react": ">= 15.3", |
@@ -30,3 +30,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>called when a child element becomes selected; backing data must be updated to persist the state change</td> | ||
@@ -55,1 +55,2 @@ </tr> | ||
@@ -5,9 +5,9 @@ import React, {PropTypes} from 'react'; | ||
import Typeahead from 'boundless-typeahead'; | ||
import extractChildProps from '../boundless-utils-object-intersection/index'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import extractChildProps from 'boundless-utils-object-intersection'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
const first = (array) => array[0]; | ||
const last = (array) => array[array.length - 1]; | ||
const isFunction = (x) => typeof x === 'function'; | ||
const noop = () => {}; | ||
@@ -14,0 +14,0 @@ /** |
{ | ||
"name": "boundless-tokenized-input", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "Distill rich entity data matched via typeahead input into simple visual abstractions.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -29,11 +30,7 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-typeahead": "^1.0.0-beta.4", | ||
"boundless-typeahead": "^1.0.0-beta.5", | ||
"boundless-utils-object-intersection": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^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-object-intersection": "^1.0.0-beta.3", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3" | ||
}, | ||
"peerDependencies": { | ||
@@ -40,0 +37,0 @@ "react": ">= 15.3", |
@@ -80,3 +80,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>function handler that is called when an entity is selected by the user and a token should be created</td> | ||
@@ -88,3 +88,3 @@ </tr> | ||
<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>function handler that is called when one or more tokens are selected by the user via click or keyboard actions; called with what the new selection should be</td> | ||
@@ -96,3 +96,3 @@ </tr> | ||
<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>function handler that is called when one or more tokens are removed by the user via clicking the "close" button or pressing the `Backspace` key while tokens are selected</td> | ||
@@ -148,3 +148,3 @@ </tr> | ||
<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>called when the user presses `Enter` with no autosuggest hint available, indicating that input is complete</td> | ||
@@ -156,3 +156,3 @@ </tr> | ||
<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>called with the index of the highlighted entity due to keyboard selection</td> | ||
@@ -164,3 +164,3 @@ </tr> | ||
<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>called with the index of the entity selected by the user</td> | ||
@@ -199,1 +199,2 @@ </tr> | ||
@@ -6,9 +6,10 @@ import React, {PropTypes} from 'react'; | ||
import Input from 'boundless-input'; | ||
import extractChildProps from '../boundless-utils-object-intersection/index'; | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import isString from '../boundless-utils-is-string/index'; | ||
import noop from '../boundless-utils-noop/index'; | ||
import omit from '../boundless-utils-omit-keys/index'; | ||
import uuid from '../boundless-utils-uuid/index'; | ||
import extractChildProps from 'boundless-utils-object-intersection'; | ||
import omit from 'boundless-utils-omit-keys'; | ||
import uuid from 'boundless-utils-uuid'; | ||
const isFunction = (x) => typeof x === 'function'; | ||
const isString = (x) => typeof x === 'string'; | ||
const noop = () => {}; | ||
/** | ||
@@ -15,0 +16,0 @@ # Typeahead |
{ | ||
"name": "boundless-typeahead", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "Intelligently recommend entities via customizable, fuzzy recognition.", | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -27,14 +28,9 @@ "type": "git", | ||
"dependencies": { | ||
"boundless-input": "^1.0.0-beta.4", | ||
"boundless-input": "^1.0.0-beta.5", | ||
"boundless-utils-object-intersection": "^1.0.0-beta.5", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.5", | ||
"boundless-utils-uuid": "^1.0.0-beta.5", | ||
"classnames": "^2.1.5", | ||
"escape-string-regexp": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"boundless-utils-is-function": "^1.0.0", | ||
"boundless-utils-is-string": "^1.0.0", | ||
"boundless-utils-noop": "^1.0.0", | ||
"boundless-utils-object-intersection": "^1.0.0-beta.3", | ||
"boundless-utils-omit-keys": "^1.0.0-beta.3", | ||
"boundless-utils-uuid": "^1.0.0" | ||
}, | ||
"peerDependencies": { | ||
@@ -41,0 +37,0 @@ "react": ">= 15.3", |
@@ -162,3 +162,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>called when the user presses `Enter` with no autosuggest hint available, indicating that input is complete</td> | ||
@@ -170,3 +170,3 @@ </tr> | ||
<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>called with the index of the highlighted entity due to keyboard selection</td> | ||
@@ -178,3 +178,3 @@ </tr> | ||
<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>called with the index of the entity selected by the user</td> | ||
@@ -185,1 +185,2 @@ </tr> | ||
@@ -46,4 +46,7 @@ import React from 'react'; | ||
we can generate "internal keys" off defaultProps instead and entirely drop propTypes in production */ | ||
expect(Object.keys(Constructor.defaultProps || {})).toEqual(Object.keys(Constructor.propTypes || {})); | ||
const ownProps = Object.keys(Constructor.propTypes || {}); | ||
const defaults = Constructor.defaultProps || {}; | ||
ownProps.forEach((key) => expect(key in defaults).toBe(true)); | ||
/* verify props.className */ | ||
@@ -50,0 +53,0 @@ node = renderWithPropsAndGetNode({className: 'foo'}); |
@@ -6,3 +6,3 @@ { | ||
"description": "Used in testing boundless components for prop passing, etc.", | ||
"browser": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
{ | ||
"name": "boundless-utils-object-intersection", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.5", | ||
"description": "Returns an intersection of the first argument against the second argument's keys.", | ||
"private": true, | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -11,4 +11,3 @@ /** | ||
return hash; | ||
}, {}); | ||
} |
{ | ||
"name": "boundless-utils-omit-keys", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.5", | ||
"description": "Returns a modified version of the supplied object without the given keys.", | ||
"private": true, | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
{ | ||
"name": "boundless-utils-transform-property", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.5", | ||
"description": "Returns the appropriate vendor-prefixed property for use in programmatic transform style manipulation.", | ||
"private": true, | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
{ | ||
"name": "boundless-utils-uuid", | ||
"private": true, | ||
"version": "1.0.0", | ||
"version": "1.0.0-beta.5", | ||
"description": "Generates a unique ID. Adds a prefix so it is suitable for use as an HTML ID.", | ||
"private": true, | ||
"browser": "build/index.js", | ||
"main": "build/index.js", | ||
"module": "index.js", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -1,4 +0,1 @@ | ||
import isFunction from '../boundless-utils-is-function/index'; | ||
import isString from '../boundless-utils-is-string/index'; | ||
export const errors = { | ||
@@ -17,2 +14,5 @@ DISABLED: 'UIUtils/notify: web notifications are currently disabled by user settings.', | ||
const isFunction = (x) => typeof x === 'function'; | ||
const isString = (x) => typeof x === 'string'; | ||
const NotificationAPI = (function detectSupport() { | ||
@@ -19,0 +19,0 @@ if (window.Notification) { |
{ | ||
"name": "boundless-utils-web-notification", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.5", | ||
"description": "Trigger native toasts in supporting browsers.", | ||
"private": true, | ||
"browser": "build/index.js", | ||
"repository": { | ||
@@ -27,7 +26,3 @@ "type": "git", | ||
}, | ||
"homepage": "https://github.com/enigma-io/boundless#readme", | ||
"dependencies": { | ||
"boundless-utils-is-function": "^1.0.0", | ||
"boundless-utils-is-string": "^1.0.0" | ||
} | ||
"homepage": "https://github.com/enigma-io/boundless#readme" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2069047
36
5478
0