react-simple-toolbar
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -130,4 +130,2 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
this.regions = this.regions || [] | ||
var state = this.state | ||
@@ -218,2 +216,5 @@ var props = this.prepareProps(this.props, state) | ||
prepareRegion: function(region, index, regions) { | ||
index = index || 0 | ||
regions = regions || [] | ||
var props = this.props | ||
@@ -644,4 +645,4 @@ var regionStyle = assign({}, props.defaultRegionStyle, props.regionStyle) | ||
var getPrefix = __webpack_require__(14) | ||
var forcePrefixed = __webpack_require__(16) | ||
var getPrefix = __webpack_require__(13) | ||
var forcePrefixed = __webpack_require__(14) | ||
var el = __webpack_require__(15) | ||
@@ -699,4 +700,4 @@ | ||
var toUpperFirst = __webpack_require__(13) | ||
var getPrefix = __webpack_require__(14) | ||
var toUpperFirst = __webpack_require__(16) | ||
var getPrefix = __webpack_require__(13) | ||
var el = __webpack_require__(15) | ||
@@ -797,15 +798,3 @@ | ||
module.exports = function(str){ | ||
return str? | ||
str.charAt(0).toUpperCase() + str.slice(1): | ||
'' | ||
} | ||
/***/ }, | ||
/* 14 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var toUpperFirst = __webpack_require__(13) | ||
var toUpperFirst = __webpack_require__(16) | ||
var prefixes = ["ms", "Moz", "Webkit", "O"] | ||
@@ -844,2 +833,31 @@ | ||
/***/ }, | ||
/* 14 */ | ||
/***/ function(module, exports, __webpack_require__) { | ||
'use strict'; | ||
var toUpperFirst = __webpack_require__(16) | ||
var getPrefix = __webpack_require__(13) | ||
var properties = __webpack_require__(12) | ||
/** | ||
* Returns the given key prefixed, if the property is found in the prefixProps map. | ||
* | ||
* Does not test if the property supports the given value unprefixed. | ||
* If you need this, use './getPrefixed' instead | ||
*/ | ||
module.exports = function(key, value){ | ||
if (!properties[key]){ | ||
return key | ||
} | ||
var prefix = getPrefix(key) | ||
return prefix? | ||
prefix + toUpperFirst(key): | ||
key | ||
} | ||
/***/ }, | ||
/* 15 */ | ||
@@ -872,23 +890,6 @@ /***/ function(module, exports, __webpack_require__) { | ||
var toUpperFirst = __webpack_require__(13) | ||
var getPrefix = __webpack_require__(14) | ||
var properties = __webpack_require__(12) | ||
/** | ||
* Returns the given key prefixed, if the property is found in the prefixProps map. | ||
* | ||
* Does not test if the property supports the given value unprefixed. | ||
* If you need this, use './getPrefixed' instead | ||
*/ | ||
module.exports = function(key, value){ | ||
if (!properties[key]){ | ||
return key | ||
} | ||
var prefix = getPrefix(key) | ||
return prefix? | ||
prefix + toUpperFirst(key): | ||
key | ||
module.exports = function(str){ | ||
return str? | ||
str.charAt(0).toUpperCase() + str.slice(1): | ||
'' | ||
} | ||
@@ -895,0 +896,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.ReactToolbar=t(require("React")):e.ReactToolbar=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.props&&e.props.isToolbarRegion}function i(e,t){return 0==e?"left":e==t.length-1?"right":"center"}var o=n(4),a=n(7),l=n(5),u=o.cloneElement||n(6),s="ReactToolbar",c=o.createClass({displayName:s,getDefaultProps:function(){return{"data-display-name":s,isReactToolbar:!0,padding:2,defaultStyle:{display:"inline-flex",boxSizing:"border-box",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"rgb(120, 120, 120)",border:"1px solid rgb(218, 218, 218)",padding:2},defaultHorizontalStyle:{width:"100%",flexFlow:"row",alignItems:"center",alignContent:"stretch"},defaultVerticalStyle:{height:"100%",flexFlow:"column",alignItems:"stretch",alignContent:"center"}}},getInitialState:function(){return{}},render:function(){this.regions=this.regions||[];var e=this.state,t=this.prepareProps(this.props,e);return o.createElement("div",o.__spread({},t))},prepareContent:function(e){},prepareProps:function(e,t){var n=l({},e);return n.vertical="vertical"==n.orientation,n.style=this.prepareStyle(n,t),n.children=this.prepareChildren(n,t),n},prepareStyle:function(e,t){var n=e.defaultHorizontalStyle,r=e.horizontalStyle;e.vertical&&(n=e.defaultVerticalStyle,r=e.verticalStyle);var i=l({},e.defaultStyle,n,e.style,r);return i.position="absolute"==i.position?i.position:"relative",a(i)},prepareChildren:function(e){var t=0,n=[],i=[];o.Children.forEach(e.children,function(e){r(e)&&(i.push(e),t++)},this);var a=-1;return o.Children.forEach(e.children,function(e){r(e)&&(a++,e=this.prepareRegion(e,a,i)),n.push(e)},this),t?n:this.prepareRegion(o.createElement(c.Region,null,n))},prepareRegion:function(e,t,n){var r=this.props,o=l({},r.defaultRegionStyle,r.regionStyle);r.padding&&(o.padding=r.padding);var a=l({},o,e.props.style),s=e.props.align||i(t,n);return u(e,{style:a,align:s})}});c.Region=n(16),e.exports=c},function(e,t,n){(function(t){"use strict";var n;e.exports=function(){return!n&&t.document&&(n=t.document.createElement("div")),n||(n={style:{}}),n}}).call(t,function(){return this}())},function(e,t,n){"use strict";var r,i,o=n(3),a=["ms","Moz","Webkit","O"],l=n(1);e.exports=function(e){if(void 0!==i)return i;r=r||l();for(var t,n,u=0,s=a.length;s>u;u++)if(n=a[u],t=n+o(e),"undefined"!=typeof r.style[t])return i=n;return i}},function(e,t,n){"use strict";e.exports=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}},function(t,n,r){t.exports=e},function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var n,i,o=r(e),a=1;a<arguments.length;a++){n=arguments[a],i=Object.keys(Object(n));for(var l=0;l<i.length;l++)o[i[l]]=n[i[l]]}return o}},function(e,t,n){"use strict";function r(e,t){var n,r=a(e);for(n in t)u.call(c,n)?c[n](r,t[n],n):u.call(r,n)||(r[n]=t[n]);return r}function i(e){return function(t,n,r){u.call(t,r)?t[r]=e(t[r],n):t[r]=n}}function o(e,t){return e?e+(t?" "+t:""):t||""}function a(){for(var e={},t=0;t<arguments.length;t++)for(var n in arguments[t])u.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var l=n(4),u=Object.prototype.hasOwnProperty,s=l.version.split(".").map(parseFloat),c={className:i(o),children:function(){},key:function(){},ref:function(){},style:i(a)};e.exports=function(e,t){function n(){}var i=r(t,e.props);return!u.call(i,"children")&&u.call(e.props,"children")&&(i.children=e.props.children),0===s[0]&&s[1]<11?e.constructor.ConvenienceConstructor(i):0===s[0]&&11===s[1]?e.constructor(i):0===s[0]&&12===s[1]?(n.isReactLegacyFactory=!0,n.type=e.type,l.createElement(n,i)):l.createElement(e.type,i)}},function(e,t,n){"use strict";function r(e,t){var n={key:e,value:t};return(s.plugins||[]).forEach(function(r){var i=l(function(n){return r(e,t,n)},n);i&&(n=i)}),n}function i(e,t){var n=r(e,t);return l(function(e){return{key:a(e.key,e.value),value:e.value}},n)}var o=n(13),a=n(11),l=n(14),u=n(15),s=function(e){var t,n,r={};for(t in e)if(o(e,t)){if(n=i(t,e[t]),!n)continue;l(function(e){r[e.key]=e.value},n)}return r};e.exports=u(s)},function(e,t,n){"use strict";e.exports={alignItems:1,justifyContent:1,flex:1,flexFlow:1,flexGrow:1,userSelect:1,transform:1,transition:1,transformOrigin:1,transformStyle:1,transitionProperty:1,transitionDuration:1,transitionTimingFunction:1,transitionDelay:1,borderImage:1,borderImageSlice:1,boxShadow:1,backgroundClip:1,backfaceVisibility:1,perspective:1,perspectiveOrigin:1,animation:1,animationDuration:1,animationName:1,animationDelay:1,animationDirection:1,animationIterationCount:1,animationTimingFunction:1,animationPlayState:1,animationFillMode:1,appearance:1}},function(e,t,n){"use strict";var r=n(3),i=n(2),o=n(8);e.exports=function(e,t){if(!o[e])return e;var n=i(e);return n?n+r(e):e}},function(e,t,n){"use strict";var r,i,o=n(2),a=n(9),l=n(1),u={};e.exports=function(e,t,n){i=i||l(),r=r||i.style;var s=e+": "+t;if(u[s])return u[s];var c,f,p;return!n&&e in r||(c=o("appearance"),c&&(f=a(e,t),p="-"+c.toLowerCase()+"-"+t,f in r&&(i.style[f]="",i.style[f]=p,""!==i.style[f]&&(t=p)))),u[s]=t,t}},function(e,t,n){"use strict";var r=n(12),i=n(8);e.exports=function(e,t){return i[e]?r(e,t):e}},function(e,t,n){"use strict";var r,i,o=n(3),a=n(2),l=n(1),u={};e.exports=function(e,t){i=i||l(),r=r||i.style;var n=e;if(u[n])return u[n];var s,c;return e in r||(s=a("appearance"),s&&(c=s+o(e),c in r&&(e=c))),u[n]=e,e}},function(e,t,n){"use strict";e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?Array.isArray(t)?t.map(e).filter(function(e){return!!e}):e(t):void 0}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e){return e.plugins=e.plugins||[function(){var e={flex:1,"inline-flex":1};return function(t,n){return"display"===t&&n in e?{key:t,value:r(t,n,!0)}:void 0}}()],e.plugin=function(t){e.plugins=e.plugins||[],e.plugins.push(t)},e}},function(e,t,n){"use strict";var r=n(4),i=n(7),o=n(5),a=(r.cloneElement||n(6),"ReactToolbarRegion"),l={start:"flex-start",left:"flex-start",end:"flex-end",right:"flex-end"},u={start:"left",left:"left",right:"right",end:"right"};e.exports=r.createClass({displayName:a,getDefaultProps:function(){return{"data-display-name":a,isToolbarRegion:!0,flex:1,flexShrink:null,flexBasis:null,defaultStyle:{boxSizing:"border-box",alignItems:"stretch",flexShrink:1,flexBasis:0,position:"relative",display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},defaultHorizontalStyle:{flexFlow:"row"},defaultVerticalStyle:{flexFlow:"column"}}},render:function(){var e=this.prepareProps(this.props);return r.createElement("div",r.__spread({},e))},prepareProps:function(e){var t=o({},e);return t.vertical="vertical"==t.orientation,t.style=this.prepareStyle(t),t},prepareStyle:function(e){var t={justifyContent:l[e.align]||"center",textAlign:u[e.align]||"center"},n=e.defaultHorizontalStyle,r=e.horizontalStyle;e.vertical&&(n=e.defaultVerticalStyle,r=e.verticalStyle);var a=o({},e.defaultStyle,n,e.style,r,t);if(e.flex!==!1&&null!=e.flex){var s,c=0,f=0;s="number"==typeof e.flex?e.flex+" "+(e.flexShrink||a.flexShrink||c)+" "+(e.flexBasis||a.flexBasis||f):e.flex,a.flex=s}return i(a)}})}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.ReactToolbar=t(require("React")):e.ReactToolbar=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.props&&e.props.isToolbarRegion}function i(e,t){return 0==e?"left":e==t.length-1?"right":"center"}var o=n(4),a=n(7),l=n(5),u=o.cloneElement||n(6),s="ReactToolbar",c=o.createClass({displayName:s,getDefaultProps:function(){return{"data-display-name":s,isReactToolbar:!0,padding:2,defaultStyle:{display:"inline-flex",boxSizing:"border-box",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",color:"rgb(120, 120, 120)",border:"1px solid rgb(218, 218, 218)",padding:2},defaultHorizontalStyle:{width:"100%",flexFlow:"row",alignItems:"center",alignContent:"stretch"},defaultVerticalStyle:{height:"100%",flexFlow:"column",alignItems:"stretch",alignContent:"center"}}},getInitialState:function(){return{}},render:function(){var e=this.state,t=this.prepareProps(this.props,e);return o.createElement("div",o.__spread({},t))},prepareContent:function(e){},prepareProps:function(e,t){var n=l({},e);return n.vertical="vertical"==n.orientation,n.style=this.prepareStyle(n,t),n.children=this.prepareChildren(n,t),n},prepareStyle:function(e,t){var n=e.defaultHorizontalStyle,r=e.horizontalStyle;e.vertical&&(n=e.defaultVerticalStyle,r=e.verticalStyle);var i=l({},e.defaultStyle,n,e.style,r);return i.position="absolute"==i.position?i.position:"relative",a(i)},prepareChildren:function(e){var t=0,n=[],i=[];o.Children.forEach(e.children,function(e){r(e)&&(i.push(e),t++)},this);var a=-1;return o.Children.forEach(e.children,function(e){r(e)&&(a++,e=this.prepareRegion(e,a,i)),n.push(e)},this),t?n:this.prepareRegion(o.createElement(c.Region,null,n))},prepareRegion:function(e,t,n){t=t||0,n=n||[];var r=this.props,o=l({},r.defaultRegionStyle,r.regionStyle);r.padding&&(o.padding=r.padding);var a=l({},o,e.props.style),s=e.props.align||i(t,n);return u(e,{style:a,align:s})}});c.Region=n(16),e.exports=c},function(e,t,n){(function(t){"use strict";var n;e.exports=function(){return!n&&t.document&&(n=t.document.createElement("div")),n||(n={style:{}}),n}}).call(t,function(){return this}())},function(e,t,n){"use strict";var r,i,o=n(3),a=["ms","Moz","Webkit","O"],l=n(1);e.exports=function(e){if(void 0!==i)return i;r=r||l();for(var t,n,u=0,s=a.length;s>u;u++)if(n=a[u],t=n+o(e),"undefined"!=typeof r.style[t])return i=n;return i}},function(e,t,n){"use strict";e.exports=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}},function(t,n,r){t.exports=e},function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var n,i,o=r(e),a=1;a<arguments.length;a++){n=arguments[a],i=Object.keys(Object(n));for(var l=0;l<i.length;l++)o[i[l]]=n[i[l]]}return o}},function(e,t,n){"use strict";function r(e,t){var n,r=a(e);for(n in t)u.call(c,n)?c[n](r,t[n],n):u.call(r,n)||(r[n]=t[n]);return r}function i(e){return function(t,n,r){u.call(t,r)?t[r]=e(t[r],n):t[r]=n}}function o(e,t){return e?e+(t?" "+t:""):t||""}function a(){for(var e={},t=0;t<arguments.length;t++)for(var n in arguments[t])u.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var l=n(4),u=Object.prototype.hasOwnProperty,s=l.version.split(".").map(parseFloat),c={className:i(o),children:function(){},key:function(){},ref:function(){},style:i(a)};e.exports=function(e,t){function n(){}var i=r(t,e.props);return!u.call(i,"children")&&u.call(e.props,"children")&&(i.children=e.props.children),0===s[0]&&s[1]<11?e.constructor.ConvenienceConstructor(i):0===s[0]&&11===s[1]?e.constructor(i):0===s[0]&&12===s[1]?(n.isReactLegacyFactory=!0,n.type=e.type,l.createElement(n,i)):l.createElement(e.type,i)}},function(e,t,n){"use strict";function r(e,t){var n={key:e,value:t};return(s.plugins||[]).forEach(function(r){var i=l(function(n){return r(e,t,n)},n);i&&(n=i)}),n}function i(e,t){var n=r(e,t);return l(function(e){return{key:a(e.key,e.value),value:e.value}},n)}var o=n(13),a=n(11),l=n(14),u=n(15),s=function(e){var t,n,r={};for(t in e)if(o(e,t)){if(n=i(t,e[t]),!n)continue;l(function(e){r[e.key]=e.value},n)}return r};e.exports=u(s)},function(e,t,n){"use strict";e.exports={alignItems:1,justifyContent:1,flex:1,flexFlow:1,flexGrow:1,userSelect:1,transform:1,transition:1,transformOrigin:1,transformStyle:1,transitionProperty:1,transitionDuration:1,transitionTimingFunction:1,transitionDelay:1,borderImage:1,borderImageSlice:1,boxShadow:1,backgroundClip:1,backfaceVisibility:1,perspective:1,perspectiveOrigin:1,animation:1,animationDuration:1,animationName:1,animationDelay:1,animationDirection:1,animationIterationCount:1,animationTimingFunction:1,animationPlayState:1,animationFillMode:1,appearance:1}},function(e,t,n){"use strict";var r=n(3),i=n(2),o=n(8);e.exports=function(e,t){if(!o[e])return e;var n=i(e);return n?n+r(e):e}},function(e,t,n){"use strict";var r,i,o=n(2),a=n(9),l=n(1),u={};e.exports=function(e,t,n){i=i||l(),r=r||i.style;var s=e+": "+t;if(u[s])return u[s];var c,f,p;return!n&&e in r||(c=o("appearance"),c&&(f=a(e,t),p="-"+c.toLowerCase()+"-"+t,f in r&&(i.style[f]="",i.style[f]=p,""!==i.style[f]&&(t=p)))),u[s]=t,t}},function(e,t,n){"use strict";var r=n(12),i=n(8);e.exports=function(e,t){return i[e]?r(e,t):e}},function(e,t,n){"use strict";var r,i,o=n(3),a=n(2),l=n(1),u={};e.exports=function(e,t){i=i||l(),r=r||i.style;var n=e;if(u[n])return u[n];var s,c;return e in r||(s=a("appearance"),s&&(c=s+o(e),c in r&&(e=c))),u[n]=e,e}},function(e,t,n){"use strict";e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?Array.isArray(t)?t.map(e).filter(function(e){return!!e}):e(t):void 0}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e){return e.plugins=e.plugins||[function(){var e={flex:1,"inline-flex":1};return function(t,n){return"display"===t&&n in e?{key:t,value:r(t,n,!0)}:void 0}}()],e.plugin=function(t){e.plugins=e.plugins||[],e.plugins.push(t)},e}},function(e,t,n){"use strict";var r=n(4),i=n(7),o=n(5),a=(r.cloneElement||n(6),"ReactToolbarRegion"),l={start:"flex-start",left:"flex-start",end:"flex-end",right:"flex-end"},u={start:"left",left:"left",right:"right",end:"right"};e.exports=r.createClass({displayName:a,getDefaultProps:function(){return{"data-display-name":a,isToolbarRegion:!0,flex:1,flexShrink:null,flexBasis:null,defaultStyle:{boxSizing:"border-box",alignItems:"stretch",flexShrink:1,flexBasis:0,position:"relative",display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},defaultHorizontalStyle:{flexFlow:"row"},defaultVerticalStyle:{flexFlow:"column"}}},render:function(){var e=this.prepareProps(this.props);return r.createElement("div",r.__spread({},e))},prepareProps:function(e){var t=o({},e);return t.vertical="vertical"==t.orientation,t.style=this.prepareStyle(t),t},prepareStyle:function(e){var t={justifyContent:l[e.align]||"center",textAlign:u[e.align]||"center"},n=e.defaultHorizontalStyle,r=e.horizontalStyle;e.vertical&&(n=e.defaultVerticalStyle,r=e.verticalStyle);var a=o({},e.defaultStyle,n,e.style,r,t);if(e.flex!==!1&&null!=e.flex){var s,c=0,f=0;s="number"==typeof e.flex?e.flex+" "+(e.flexShrink||a.flexShrink||c)+" "+(e.flexBasis||a.flexBasis||f):e.flex,a.flex=s}return i(a)}})}])}); |
@@ -74,4 +74,2 @@ 'use strict'; | ||
this.regions = this.regions || [] | ||
var state = this.state | ||
@@ -162,2 +160,5 @@ var props = this.prepareProps(this.props, state) | ||
prepareRegion: function(region, index, regions) { | ||
index = index || 0 | ||
regions = regions || [] | ||
var props = this.props | ||
@@ -164,0 +165,0 @@ var regionStyle = assign({}, props.defaultRegionStyle, props.regionStyle) |
{ | ||
"name": "react-simple-toolbar", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A carefully crafted simple toolbar for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.jsx", |
@@ -10,3 +10,3 @@ # react-simple-toolbar | ||
```sh | ||
$ npm install react-simple-toolbar | ||
$ npm install react-simple-toolbar --save | ||
``` | ||
@@ -13,0 +13,0 @@ |
@@ -74,4 +74,2 @@ 'use strict'; | ||
this.regions = this.regions || [] | ||
var state = this.state | ||
@@ -162,2 +160,5 @@ var props = this.prepareProps(this.props, state) | ||
prepareRegion: function(region, index, regions) { | ||
index = index || 0 | ||
regions = regions || [] | ||
var props = this.props | ||
@@ -164,0 +165,0 @@ var regionStyle = assign({}, props.defaultRegionStyle, props.regionStyle) |
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
47607
1224