react-layout-views
Advanced tools
Comparing version 0.4.0-beta.1 to 0.4.0-beta.2
{ | ||
"name": "react-layout-views", | ||
"version": "0.4.0-beta.1", | ||
"version": "0.4.0-beta.2", | ||
"main": "./web/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./web/index.d.ts", |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("css-length"),require("styled-components")):"function"==typeof define&&define.amd?define("react-layout-views",["react","css-length","styled-components"],t):"object"==typeof exports?exports["react-layout-views"]=t(require("react"),require("css-length"),require("styled-components")):n["react-layout-views"]=t(n.react,n["css-length"],n["styled-components"])}(this,function(n,t,e){return function(n){function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};return t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=22)}([function(t,e){t.exports=n},function(n,t){"use exports";n.exports={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1}},function(n,t,e){"use strict";var r=Object.prototype.hasOwnProperty;n.exports=function(n,t){return r.call(n,t)}},function(n,t,e){"use strict";var r=e(7),i=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,o="undefined"==typeof document?{}:document.documentElement.style,s=function(){var n=function(){for(var n in o)if(i.test(n))return n.match(i)[0];return"WebkitOpacity"in o?"Webkit":"KhtmlOpacity"in o?"Khtml":""}();return{style:n,css:"-"+n.toLowerCase()+"-",dom:{Webkit:"WebKit",ms:"MS",o:"WebKit"}[n]||r(n)}}();n.exports=s},function(n,t){n.exports={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(n,t){return[t+"box-flex"]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1}},function(n,t,e){"use strict";var r=function(n,t){return t?t.toUpperCase():""},i=e(17);n.exports=function(n){return n?n.replace(i,r):""}},function(n,t,e){"use strict";var r=e(18);n.exports=function(n){return r(n).toLowerCase()}},function(n,t,e){"use strict";n.exports=function(n){return n.length?n.charAt(0).toUpperCase()+n.substring(1):n}},function(n,t,e){"use strict";var r=(e(3),e(13)),i=e(6),o=e(5),s=e(2),c=e(15),a=e(14),l=function(n,t,e,i){r(t).forEach(function(t){n[i?i(t):t]=e})},u=function(n){n=(n||"").split(";");var t={};return n.forEach(function(n){var e=n.split(":");2==e.length&&(t[e[0].trim()]=e[1].trim())}),t},f={cssUnitless:e(1)},p=function(n,t,e,r){"string"==typeof n&&(n=u(n)),t=t||f,t.cssUnitless=t.cssUnitless||f.cssUnitless,r=r||{};var d,x,g,y,b,m,h,v,w=t.scope||{},j=null!=t.addUnits?t.addUnits:!w||null==w.addUnits||w.addUnits,O=(null!=t.cssUnitless?t.cssUnitless:w?w.cssUnitless:null)||{},_=(t.cssUnit||w?w.cssUnit:null)||"px",P=t.prefixProperties||(w?w.prefixProperties:null)||{},z=t.camelize,S=z?o:i;for(g in n)if(s(n,g)){if(y=n[g],x=i(e?e+g:g),d=!1,v=!1,a(y)&&(h=y.call(w||n,y,g,x,n),c(h)&&null!=h.value?(y=h.value,v=h.prefix,x=h.name?i(h.name):x):y=h),b=typeof y,m="number"==b||"string"==b&&""!=y&&1*y==y,null==y||null==x||""===x)continue;if((m||"string"==b)&&(d=!0),!d&&null!=y.value&&y.prefix&&(d=!0,v=y.prefix,y=y.value),d){if(v=v||!!P[x],m&&(y=!j||x in O?y+"":y+_),"border"!=x&&(x.indexOf("border")||~x.indexOf("radius")||~x.indexOf("width"))||!m||(x+="-width"),!x.indexOf("border-radius-")&&(x.replace(/border(-radius)(-(.*))/,function(n,t,e){var r={"-top":["-top-left","-top-right"],"-left":["-top-left","-bottom-left"],"-right":["-top-right","-bottom-right"],"-bottom":["-bottom-left","-bottom-right"]};e in r?(x=[],r[e].forEach(function(n){x.push("border"+n+t)})):x="border"+e+t}),Array.isArray(x))){x.forEach(function(n){v?l(r,n,y,S):r[S(n)]=y});continue}v?l(r,x,y,S):r[S(x)]=y}else p(y,t,x+"-",r)}return r};n.exports=p},function(n,t,e){"use strict";n.exports={prefixProperties:e(4),cssUnitless:e(1),object:e(8),string:e(20)}},function(n,e){n.exports=t},,function(n,t){n.exports=e},function(n,t,e){n.exports=e(16)()},function(n,t,e){"use strict";var r=Object.prototype.toString;n.exports=function(n){return"[object Function]"===r.apply(n)}},function(n,t,e){"use strict";var r=Object.prototype.toString;n.exports=function(n){return!!n&&"[object Object]"===r.call(n)}},function(n,t,e){"use strict";var r=e(5),i=e(6),o=e(19),s=e(7),c=e(3),a=e(4),l="undefined"==typeof document?{}:document.documentElement.style;n.exports=function(n){return function(t,e){e=e||{};var u=o(r(t)),f=i(t),p=n?u:f,d=c.style?n?c.style:c.css:"";if(u in l)return e.asString?p:[p];var x=p,g=a[f],y=[];if(n&&(x=s(p)),"function"==typeof g){var b=g(p,d)||[];b&&!Array.isArray(b)&&(b=[b]),b.length&&(b=b.map(function(t){return n?o(r(t)):i(t)})),y=y.concat(b)}return d&&y.push(d+x),y.push(p),e.asString||1==y.length?y[0]:y}}},function(n,t){n.exports=/[-\s]+(.)?/g},function(n,t,e){"use strict";var r=/::/g,i=/([A-Z]+)([A-Z][a-z])/g,o=/([a-z\d])([A-Z])/g,s=/_/g;n.exports=function(n,t){return n?n.replace(r,"/").replace(i,"$1_$2").replace(o,"$1_$2").replace(s,t||"-"):""}},function(n,t,e){"use strict";n.exports=function(n){return n.length?n.charAt(0).toLowerCase()+n.substring(1):n}},function(n,t,e){"use strict";var r=e(8),i=e(2);n.exports=function(n,t){n=r(n,t);var e,o=[];for(e in n)i(n,e)&&o.push(e+": "+n[e]);return o.join("; ")}},,function(n,t,e){"use strict";function r(){return function(n){return n}}Object.defineProperty(t,"__esModule",{value:!0}),e.d(t,"Layout",function(){return _}),e.d(t,"Section",function(){return S});var i,o,s,c,a,l,u,f,p,d,x=e(0),g=(e.n(x),e(12)),y=e.n(g),b=e(10),m=(e.n(b),e(9)),h=(e.n(m),this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])};return function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}()),v=this&&this.__makeTemplateObject||function(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n},w=this&&this.__assign||Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},j=this&&this.__rest||function(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&(e[r[i]]=n[r[i]]);return e},O=function(n,t){return n?t||"":""},_=function(n){function t(){var t=n.call(this)||this;return t.handleBasis=t.handleBasis.bind(t),t}return h(t,n),t.prototype.render=function(){var n=this.props,t=n.basis,r=n.bottom,i=n.center,o=n.centerHorizontal,s=n.centerVertical,c=n.grow,a=n.horizontal,l=n.left,u=n.noWrap,f=n.right,p=(n.spacing,n.style,n.top),d=n.wrapEven,g=j(n,["basis","bottom","center","centerHorizontal","centerVertical","grow","horizontal","left","noWrap","right","spacing","style","top","wrapEven"]),y=e.i(m.string)(this.props.style),h=new b(this.props.spacing),v=h.value,O=h.unit,_={basis:t,bottom:r,center:i,centerHorizontal:o,centerVertical:s,grow:c,horizontal:a,left:l,noWrap:u,right:f,spacingUnit:O,spacingValue:v,styleString:y,top:p,wrapEven:d};return x.createElement(P,w({},_,g),x.createElement(z,w({},_),x.Children.map(g.children,function(n){return n?e.i(x.cloneElement)(n,{parentProps:_}):null}),t&&d&&this.handleBasis(_)))},t.prototype.handleBasis=function(n){var t=this.props,e=t.children,r=t.basis;if(e instanceof Array){e&&e.length;return e.map(function(t,e){return x.createElement(S,{key:e,basis:r,parentProps:n,wrapperStyle:{paddingTop:0,paddingBottom:0}})})}return null},t.displayName="Layout",t.defaultProps={spacing:"0px",spacingValue:0,spacingUnit:"px"},t}(x.PureComponent),P=r()(y.a.div)(o||(o=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.grow,r=(n.horizontal,n.styleString);return e.i(g.css)(i||(i=v(["\n overflow: hidden;\n display: flex;\n ","\n ","\n ","\n "],["\n overflow: hidden;\n display: flex;\n ","\n ","\n ","\n "])),O(t,"flex: "+("number"==typeof t?t:1)+";"),O(t,"align-self: stretch;"),O(r,r))}),z=r()(y.a.div)(l||(l=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.noWrap,r=n.horizontal,i=n.grow,o=n.spacingValue,l=n.spacingUnit,u=n.center,f=n.centerVertical,p=n.centerHorizontal,d=n.top,x=n.right,y=n.bottom,b=n.left;return e.i(g.css)(a||(a=v(["\n display: flex;\n flex: 1;\n ","\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "],["\n display: flex;\n flex: 1;\n ","\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "])),O(r,"flex-wrap: wrap;"),O(t,"flex-wrap: nowrap;"),O(i||r,"align-self: stretch;"),r?"row":"column",O(o&&l,"margin: "+((-(o||0)/2).toString()+l)+";"),r?e.i(g.css)(s||(s=v(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),O(u,"align-items: center; justify-content: center;"),O(f,"align-items: center;"),O(p,"justify-content: center;"),O(d,"align-items: flex-start;"),O(x,"justify-content: flex-end;"),O(y,"align-items: flex-end;"),O(b,"justify-content: flex-start;")):e.i(g.css)(c||(c=v(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),O(u,"align-items: center; justify-content: center;"),O(f,"justify-content: center;"),O(p,"align-items: center;"),O(d,"justify-content: flex-start;"),O(x,"align-items: flex-end;"),O(y,"justify-content: flex-end;"),O(b,"align-items: flex-start;")))}),S=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return h(t,n),t.prototype.render=function(){var n=this.props,t=n.style,r=n.wrapperStyle,i=n.children,o=j(n,["style","wrapperStyle","children"]),s=e.i(m.string)(r),c=e.i(m.string)(t);return x.createElement(U,w({},o,{styleString:s}),x.createElement(E,w({},o,{styleString:c}),i))},t.displayName="Section",t}(x.PureComponent),U=r()(y.a.div)(f||(f=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.basis,r=n.grow,i=n.parentProps,o=n.styleString,s=t||i&&i.basis;return e.i(g.css)(u||(u=v(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: ",";\n ","\n ","\n ","\n "],["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: ",";\n ","\n ","\n ","\n "])),((i&&i.spacingValue||0)/2).toString()+(i&&i.spacingUnit),O(s,"flex-basis: "+s+"; flex-grow: 1;"),O(r,"flex: "+("number"==typeof r?r:1)+";"),O(o,o))}),E=r()(y.a.div)(d||(d=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.center,r=n.centerVertical,i=n.centerHorizontal,o=n.top,s=n.right,c=n.bottom,a=n.left,l=(n.parentProps,n.styleString);return e.i(g.css)(p||(p=v(["\n display: flex;\n flex: 1;\n flex-direction: column;\n box-sizing: border-box;\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "],["\n display: flex;\n flex: 1;\n flex-direction: column;\n box-sizing: border-box;\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "])),O(r,"justify-content: center;"),O(i,"align-items: center;"),O(t,"align-items: center; justify-content: center;"),O(o,"justify-content: flex-start;"),O(s,"align-items: flex-end;"),O(c,"justify-content: flex-end;"),O(a,"align-items: flex-start;"),O(l,l))})}])}); | ||
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("css-length"),require("styled-components")):"function"==typeof define&&define.amd?define("react-layout-views",["react","css-length","styled-components"],t):"object"==typeof exports?exports["react-layout-views"]=t(require("react"),require("css-length"),require("styled-components")):n["react-layout-views"]=t(n.react,n["css-length"],n["styled-components"])}(this,function(n,t,e){return function(n){function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};return t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=22)}([function(t,e){t.exports=n},function(n,t){"use exports";n.exports={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1}},function(n,t,e){"use strict";var r=Object.prototype.hasOwnProperty;n.exports=function(n,t){return r.call(n,t)}},function(n,t,e){"use strict";var r=e(7),i=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,o="undefined"==typeof document?{}:document.documentElement.style,s=function(){var n=function(){for(var n in o)if(i.test(n))return n.match(i)[0];return"WebkitOpacity"in o?"Webkit":"KhtmlOpacity"in o?"Khtml":""}();return{style:n,css:"-"+n.toLowerCase()+"-",dom:{Webkit:"WebKit",ms:"MS",o:"WebKit"}[n]||r(n)}}();n.exports=s},function(n,t){n.exports={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(n,t){return[t+"box-flex"]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1}},function(n,t,e){"use strict";var r=function(n,t){return t?t.toUpperCase():""},i=e(17);n.exports=function(n){return n?n.replace(i,r):""}},function(n,t,e){"use strict";var r=e(18);n.exports=function(n){return r(n).toLowerCase()}},function(n,t,e){"use strict";n.exports=function(n){return n.length?n.charAt(0).toUpperCase()+n.substring(1):n}},function(n,t,e){"use strict";var r=(e(3),e(13)),i=e(6),o=e(5),s=e(2),c=e(15),a=e(14),l=function(n,t,e,i){r(t).forEach(function(t){n[i?i(t):t]=e})},u=function(n){n=(n||"").split(";");var t={};return n.forEach(function(n){var e=n.split(":");2==e.length&&(t[e[0].trim()]=e[1].trim())}),t},f={cssUnitless:e(1)},p=function(n,t,e,r){"string"==typeof n&&(n=u(n)),t=t||f,t.cssUnitless=t.cssUnitless||f.cssUnitless,r=r||{};var d,x,g,y,b,m,h,v,w=t.scope||{},j=null!=t.addUnits?t.addUnits:!w||null==w.addUnits||w.addUnits,O=(null!=t.cssUnitless?t.cssUnitless:w?w.cssUnitless:null)||{},_=(t.cssUnit||w?w.cssUnit:null)||"px",P=t.prefixProperties||(w?w.prefixProperties:null)||{},z=t.camelize,S=z?o:i;for(g in n)if(s(n,g)){if(y=n[g],x=i(e?e+g:g),d=!1,v=!1,a(y)&&(h=y.call(w||n,y,g,x,n),c(h)&&null!=h.value?(y=h.value,v=h.prefix,x=h.name?i(h.name):x):y=h),b=typeof y,m="number"==b||"string"==b&&""!=y&&1*y==y,null==y||null==x||""===x)continue;if((m||"string"==b)&&(d=!0),!d&&null!=y.value&&y.prefix&&(d=!0,v=y.prefix,y=y.value),d){if(v=v||!!P[x],m&&(y=!j||x in O?y+"":y+_),"border"!=x&&(x.indexOf("border")||~x.indexOf("radius")||~x.indexOf("width"))||!m||(x+="-width"),!x.indexOf("border-radius-")&&(x.replace(/border(-radius)(-(.*))/,function(n,t,e){var r={"-top":["-top-left","-top-right"],"-left":["-top-left","-bottom-left"],"-right":["-top-right","-bottom-right"],"-bottom":["-bottom-left","-bottom-right"]};e in r?(x=[],r[e].forEach(function(n){x.push("border"+n+t)})):x="border"+e+t}),Array.isArray(x))){x.forEach(function(n){v?l(r,n,y,S):r[S(n)]=y});continue}v?l(r,x,y,S):r[S(x)]=y}else p(y,t,x+"-",r)}return r};n.exports=p},function(n,t,e){"use strict";n.exports={prefixProperties:e(4),cssUnitless:e(1),object:e(8),string:e(20)}},function(n,e){n.exports=t},,function(n,t){n.exports=e},function(n,t,e){n.exports=e(16)()},function(n,t,e){"use strict";var r=Object.prototype.toString;n.exports=function(n){return"[object Function]"===r.apply(n)}},function(n,t,e){"use strict";var r=Object.prototype.toString;n.exports=function(n){return!!n&&"[object Object]"===r.call(n)}},function(n,t,e){"use strict";var r=e(5),i=e(6),o=e(19),s=e(7),c=e(3),a=e(4),l="undefined"==typeof document?{}:document.documentElement.style;n.exports=function(n){return function(t,e){e=e||{};var u=o(r(t)),f=i(t),p=n?u:f,d=c.style?n?c.style:c.css:"";if(u in l)return e.asString?p:[p];var x=p,g=a[f],y=[];if(n&&(x=s(p)),"function"==typeof g){var b=g(p,d)||[];b&&!Array.isArray(b)&&(b=[b]),b.length&&(b=b.map(function(t){return n?o(r(t)):i(t)})),y=y.concat(b)}return d&&y.push(d+x),y.push(p),e.asString||1==y.length?y[0]:y}}},function(n,t){n.exports=/[-\s]+(.)?/g},function(n,t,e){"use strict";var r=/::/g,i=/([A-Z]+)([A-Z][a-z])/g,o=/([a-z\d])([A-Z])/g,s=/_/g;n.exports=function(n,t){return n?n.replace(r,"/").replace(i,"$1_$2").replace(o,"$1_$2").replace(s,t||"-"):""}},function(n,t,e){"use strict";n.exports=function(n){return n.length?n.charAt(0).toLowerCase()+n.substring(1):n}},function(n,t,e){"use strict";var r=e(8),i=e(2);n.exports=function(n,t){n=r(n,t);var e,o=[];for(e in n)i(n,e)&&o.push(e+": "+n[e]);return o.join("; ")}},,function(n,t,e){"use strict";function r(){return function(n){return n}}Object.defineProperty(t,"__esModule",{value:!0}),e.d(t,"Layout",function(){return _}),e.d(t,"Section",function(){return S});var i,o,s,c,a,l,u,f,p,d,x=e(0),g=(e.n(x),e(12)),y=e.n(g),b=e(10),m=(e.n(b),e(9)),h=(e.n(m),this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])};return function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}()),v=this&&this.__makeTemplateObject||function(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n},w=this&&this.__assign||Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},j=this&&this.__rest||function(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&(e[r[i]]=n[r[i]]);return e},O=function(n,t){return n?t||"":""},_=function(n){function t(){var t=n.call(this)||this;return t.handleBasis=t.handleBasis.bind(t),t}return h(t,n),t.prototype.render=function(){var n=this.props,t=n.basis,r=n.bottom,i=n.center,o=n.centerHorizontal,s=n.centerVertical,c=n.grow,a=n.horizontal,l=n.left,u=n.noWrap,f=n.right,p=(n.spacing,n.style,n.top),d=n.wrapEven,g=j(n,["basis","bottom","center","centerHorizontal","centerVertical","grow","horizontal","left","noWrap","right","spacing","style","top","wrapEven"]),y=e.i(m.string)(this.props.style),h=new b(this.props.spacing),v=h.value,O=h.unit,_={basis:t,bottom:r,center:i,centerHorizontal:o,centerVertical:s,grow:c,horizontal:a,left:l,noWrap:u,right:f,spacingUnit:O,spacingValue:v,styleString:y,top:p,wrapEven:d};return x.createElement(P,w({},_,g),x.createElement(z,w({},_),x.Children.map(g.children,function(n){return n?e.i(x.cloneElement)(n,{parentProps:_}):null}),t&&d&&this.handleBasis(_)))},t.prototype.handleBasis=function(n){var t=this.props,e=t.children,r=t.basis;if(e instanceof Array){e&&e.length;return e.map(function(t,e){return x.createElement(S,{key:e,basis:r,parentProps:n,wrapperStyle:{paddingTop:0,paddingBottom:0}})})}return null},t.displayName="Layout",t.defaultProps={spacing:"0px",spacingValue:0,spacingUnit:"px"},t}(x.PureComponent),P=r()(y.a.div)(o||(o=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.grow,r=(n.horizontal,n.styleString);return e.i(g.css)(i||(i=v(["\n display: flex;\n ","\n ","\n ","\n "],["\n display: flex;\n ","\n ","\n ","\n "])),O(t,"flex: "+("number"==typeof t?t:1)+";"),O(t,"align-self: stretch;"),O(r,r))}),z=r()(y.a.div)(l||(l=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.noWrap,r=n.horizontal,i=n.grow,o=n.spacingValue,l=n.spacingUnit,u=n.center,f=n.centerVertical,p=n.centerHorizontal,d=n.top,x=n.right,y=n.bottom,b=n.left;return e.i(g.css)(a||(a=v(["\n display: flex;\n flex: 1;\n ","\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "],["\n display: flex;\n flex: 1;\n ","\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "])),O(r,"flex-wrap: wrap;"),O(t,"flex-wrap: nowrap;"),O(i||r,"align-self: stretch;"),r?"row":"column",O(o&&l,"margin: "+((-(o||0)/2).toString()+l)+";"),r?e.i(g.css)(s||(s=v(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),O(u,"align-items: center; justify-content: center;"),O(f,"align-items: center;"),O(p,"justify-content: center;"),O(d,"align-items: flex-start;"),O(x,"justify-content: flex-end;"),O(y,"align-items: flex-end;"),O(b,"justify-content: flex-start;")):e.i(g.css)(c||(c=v(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),O(u,"align-items: center; justify-content: center;"),O(f,"justify-content: center;"),O(p,"align-items: center;"),O(d,"justify-content: flex-start;"),O(x,"align-items: flex-end;"),O(y,"justify-content: flex-end;"),O(b,"align-items: flex-start;")))}),S=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return h(t,n),t.prototype.render=function(){var n=this.props,t=n.style,r=n.wrapperStyle,i=n.children,o=j(n,["style","wrapperStyle","children"]),s=e.i(m.string)(r),c=e.i(m.string)(t);return x.createElement(U,w({},o,{styleString:s}),x.createElement(E,w({},o,{styleString:c}),i))},t.displayName="Section",t}(x.PureComponent),U=r()(y.a.div)(f||(f=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.basis,r=n.grow,i=n.parentProps,o=n.styleString,s=t||i&&i.basis;return e.i(g.css)(u||(u=v(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: ",";\n ","\n ","\n ","\n "],["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n padding: ",";\n ","\n ","\n ","\n "])),((i&&i.spacingValue||0)/2).toString()+(i&&i.spacingUnit),O(s,"flex-basis: "+s+"; flex-grow: 1;"),O(r,"flex: "+("number"==typeof r?r:1)+";"),O(o,o))}),E=r()(y.a.div)(d||(d=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.center,r=n.centerVertical,i=n.centerHorizontal,o=n.top,s=n.right,c=n.bottom,a=n.left,l=(n.parentProps,n.styleString);return e.i(g.css)(p||(p=v(["\n display: flex;\n flex: 1;\n flex-direction: column;\n box-sizing: border-box;\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "],["\n display: flex;\n flex: 1;\n flex-direction: column;\n box-sizing: border-box;\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "])),O(r,"justify-content: center;"),O(i,"align-items: center;"),O(t,"align-items: center; justify-content: center;"),O(o,"justify-content: flex-start;"),O(s,"align-items: flex-end;"),O(c,"justify-content: flex-end;"),O(a,"align-items: flex-start;"),O(l,l))})}])}); |
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
25375