react-layout-views
Advanced tools
Comparing version 0.4.0-beta.2 to 0.4.0-beta.3
/// <reference types="react" /> | ||
import { PureComponent } from 'react'; | ||
import { LayoutProps, SectionProps } from '../typings/native'; | ||
import { PureComponent } from "react"; | ||
import { LayoutProps, SectionProps } from "../typings/native"; | ||
export declare type LayoutProps = LayoutProps; | ||
@@ -5,0 +5,0 @@ export declare class Layout extends PureComponent<LayoutProps> { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-native")):"function"==typeof define&&define.amd?define("react-layout-views",["react","react-native"],e):"object"==typeof exports?exports["react-layout-views"]=e(require("react"),require("react-native")):t["react-layout-views"]=e(t.react,t["react-native"])}(this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},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=21)}({0:function(e,n){e.exports=t},11:function(t,n){t.exports=e},21:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"Layout",function(){return c}),n.d(e,"Section",function(){return f});var r=n(0),o=(n.n(r),n(11)),i=(n.n(o),this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),a=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},s=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n},c=function(t){function e(){var e=t.call(this)||this;return e.handleBasis=e.handleBasis.bind(e),e}return i(e,t),e.prototype.render=function(){var t=this.props,e=t.basis,i=t.bottom,c=t.center,f=t.centerHorizontal,p=t.centerVertical,y=t.grow,g=t.horizontal,d=t.left,h=t.right,m=t.spacing,b=t.style,w=t.top,x=t.wrapEven,v=s(t,["basis","bottom","center","centerHorizontal","centerVertical","grow","horizontal","left","right","spacing","style","top","wrapEven"]),j={basis:e,bottom:i,center:c,centerHorizontal:f,centerVertical:p,grow:y,horizontal:g,left:d,right:h,spacing:m,top:w,wrapEven:x};return r.createElement(o.View,a({style:[l(j),b]},v),r.createElement(o.View,{style:u(j)},r.Children.map(v.children,function(t){return t?n.i(r.cloneElement)(t,{parentProps:j}):null}),e&&x&&this.handleBasis(j)))},e.prototype.handleBasis=function(t){var e=this.props,n=e.children,o=e.basis;if(n instanceof Array){n&&n.length;return n.map(function(e,n){return r.createElement(f,{key:n,basis:o,parentProps:t,wrapperStyle:{paddingTop:0,paddingBottom:0}})})}return null},e.displayName="Layout",e.defaultProps={spacing:0},e}(r.PureComponent),l=function(t){var e=t.grow;return a({},e&&{flexGrow:"number"==typeof e?e:1})},u=function(t){var e=t.noWrap,n=t.horizontal,r=t.spacing,o=t.grow,i=t.center,s=t.centerVertical,c=t.centerHorizontal,l=t.top,u=t.right,f=t.bottom,p=t.left;return a({},o&&{flexGrow:"number"==typeof o?o:1},n&&{flexWrap:"wrap"},e&&{flexWrap:"nowrap"},{flexDirection:n?"row":"column",margin:-r/2},n?a({},i&&{alignItems:"center",justifyContent:"center"},c&&{justifyContent:"center"},s&&{alignItems:"center"},f&&{alignItems:"flex-end"},p&&{justifyContent:"flex-start"},u&&{justifyContent:"flex-end"},l&&{alignItems:"flex-start"},{alignContent:"stretch"}):a({},i&&{alignItems:"center",justifyContent:"center"},c&&{alignItems:"center"},s&&{justifyContent:"center"},f&&{justifyContent:"flex-end"},p&&{alignItems:"flex-start"},u&&{alignItems:"flex-end"},l&&{justifyContent:"flex-start"}))},f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(){var t=this.props,e=t.style,n=t.wrapperStyle,i=t.children,a=s(t,["style","wrapperStyle","children"]);return r.createElement(o.View,{style:[p(a),n]},r.createElement(o.View,{style:[y(a),e]},i))},e.displayName="Section",e}(r.PureComponent),p=function(t){var e=t.basis,n=t.grow,r=(t.center,t.centerVertical,t.centerHorizontal,t.top,t.right,t.bottom,t.left,t.parentProps),o=r.spacing,i=e||r&&r.basis;return a({},r.horizontal&&!i?{flexDirection:"row"}:{},{padding:o/2,alignItems:"stretch"},i&&{flexBasis:i,flexGrow:1},n&&{flexGrow:"number"==typeof n?n:1})},y=function(t){var e=t.basis,n=t.grow,r=t.center,o=t.centerVertical,i=t.centerHorizontal,s=t.top,c=t.right,l=t.bottom,u=t.left,f=t.parentProps,p=(f.spacing,e||f&&f.basis),y=n;return a({},(y||p)&&{flexGrow:"number"==typeof y?y:1},o&&{justifyContent:"center"},i&&{alignItems:"center"},r&&{alignItems:"center",justifyContent:"center"},s&&{justifyContent:"flex-start"},c&&{alignItems:"flex-end"},l&&{justifyContent:"flex-end"},u&&{alignItems:"flex-start"})}}})}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-native")):"function"==typeof define&&define.amd?define("react-layout-views",["react","react-native"],e):"object"==typeof exports?exports["react-layout-views"]=e(require("react"),require("react-native")):t["react-layout-views"]=e(t.react,t["react-native"])}(this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},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=21)}({0:function(e,n){e.exports=t},11:function(t,n){t.exports=e},21:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"Layout",function(){return c}),n.d(e,"Section",function(){return f});var r=n(0),o=(n.n(r),n(11)),i=(n.n(o),this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),a=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},s=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]]);return n},c=function(t){function e(){var e=t.call(this)||this;return e.handleBasis=e.handleBasis.bind(e),e}return i(e,t),e.prototype.render=function(){var t=this.props,e=t.basis,i=t.bottom,c=t.center,f=t.centerHorizontal,p=t.centerVertical,y=t.grow,g=t.horizontal,h=t.left,m=t.reverse,d=t.right,b=t.spacing,w=t.style,v=t.top,x=t.wrapEven,j=s(t,["basis","bottom","center","centerHorizontal","centerVertical","grow","horizontal","left","reverse","right","spacing","style","top","wrapEven"]),O={basis:e,bottom:i,center:c,centerHorizontal:f,centerVertical:p,grow:y,horizontal:g,left:h,reverse:m,right:d,spacing:b,top:v,wrapEven:x};return r.createElement(o.View,a({style:[l(O),w]},j),r.createElement(o.View,{style:u(O)},r.Children.map(j.children,function(t){return t?n.i(r.cloneElement)(t,{parentProps:O}):null}),e&&x&&this.handleBasis(O)))},e.prototype.handleBasis=function(t){var e=this.props,n=e.children,o=e.basis;if(n instanceof Array){n&&n.length;return n.map(function(e,n){return r.createElement(f,{key:n,basis:o,parentProps:t,wrapperStyle:{paddingTop:0,paddingBottom:0}})})}return null},e.displayName="Layout",e.defaultProps={spacing:0},e}(r.PureComponent),l=function(t){var e=t.grow;return a({},e&&{flexGrow:"number"==typeof e?e:1})},u=function(t){var e=t.noWrap,n=t.horizontal,r=t.spacing,o=t.grow,i=t.center,s=t.centerVertical,c=t.centerHorizontal,l=t.top,u=t.reverse,f=t.right,p=t.bottom,y=t.left,g=u?"flex-end":"flex-start",h=u?"flex-start":"flex-end";return a({},o&&{flexGrow:"number"==typeof o?o:1},n&&{flexWrap:"wrap"},e&&{flexWrap:"nowrap"},{flexDirection:n?u?"row-reverse":"row":u?"column-reverse":"column",margin:-r/2},n?a({},u&&{justifyContent:g},i&&{alignItems:"center",justifyContent:"center"},c&&{justifyContent:"center"},s&&{alignItems:"center"},p&&{alignItems:h},y&&{justifyContent:g},f&&{justifyContent:h},l&&{alignItems:g},{alignContent:"stretch"}):a({},u&&{justifyContent:g},i&&{alignItems:"center",justifyContent:"center"},c&&{alignItems:"center"},s&&{justifyContent:"center"},p&&{justifyContent:h},y&&{alignItems:g},f&&{alignItems:h},l&&{justifyContent:g}))},f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.render=function(){var t=this.props,e=t.style,n=t.wrapperStyle,i=t.children,a=s(t,["style","wrapperStyle","children"]);return r.createElement(o.View,{style:[p(a),n]},r.createElement(o.View,{style:[y(a),e]},i))},e.displayName="Section",e}(r.PureComponent),p=function(t){var e=t.basis,n=t.grow,r=(t.center,t.centerVertical,t.centerHorizontal,t.top,t.right,t.bottom,t.left,t.parentProps),o=r.spacing,i=r.horizontal,s=e||r&&r.basis;return a({padding:o/2},s&&{flexBasis:s,flexGrow:1},n&&{flexGrow:"number"==typeof n?n:1},i?{}:{flexDirection:"row",alignItems:"stretch"})},y=function(t){var e=t.basis,n=(t.grow,t.center),r=t.centerVertical,o=t.centerHorizontal,i=t.top,s=t.right,c=t.bottom,l=t.left,u=t.parentProps,f=(u.spacing,e||u&&u.basis,u.horizontal&&!u.centerVertical&&!u.center&&!u.top&&!u.bottom),p=!(u.horizontal||u.centerHorizontal||u.center||u.right||u.left);return a({flexGrow:f||p?1:0},r&&{justifyContent:"center"},o&&{alignItems:"center"},n&&{alignItems:"center",justifyContent:"center"},i&&{justifyContent:"flex-start"},s&&{alignItems:"flex-end"},c&&{justifyContent:"flex-end"},l&&{alignItems:"flex-start"})}}})}); |
{ | ||
"name": "react-layout-views", | ||
"version": "0.4.0-beta.2", | ||
"version": "0.4.0-beta.3", | ||
"main": "./web/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./web/index.d.ts", |
@@ -13,2 +13,3 @@ import { ViewProperties, ViewStyle } from 'react-native' | ||
noWrap?: boolean | ||
reverse?: boolean | ||
right?: boolean | ||
@@ -15,0 +16,0 @@ spacing: number |
@@ -13,2 +13,3 @@ import * as React from 'react' | ||
noWrap?: boolean | ||
reverse?: boolean | ||
right?: boolean | ||
@@ -15,0 +16,0 @@ spacing?: string |
@@ -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 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))})}])}); | ||
!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),u=function(n,t,e,i){r(t).forEach(function(t){n[i?i(t):t]=e})},l=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=l(n)),t=t||f,t.cssUnitless=t.cssUnitless||f.cssUnitless,r=r||{};var d,g,y,x,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(y in n)if(s(n,y)){if(x=n[y],g=i(e?e+y:y),d=!1,v=!1,a(x)&&(h=x.call(w||n,x,y,g,n),c(h)&&null!=h.value?(x=h.value,v=h.prefix,g=h.name?i(h.name):g):x=h),b=typeof x,m="number"==b||"string"==b&&""!=x&&1*x==x,null==x||null==g||""===g)continue;if((m||"string"==b)&&(d=!0),!d&&null!=x.value&&x.prefix&&(d=!0,v=x.prefix,x=x.value),d){if(v=v||!!P[g],m&&(x=!j||g in O?x+"":x+_),"border"!=g&&(g.indexOf("border")||~g.indexOf("radius")||~g.indexOf("width"))||!m||(g+="-width"),!g.indexOf("border-radius-")&&(g.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?(g=[],r[e].forEach(function(n){g.push("border"+n+t)})):g="border"+e+t}),Array.isArray(g))){g.forEach(function(n){v?u(r,n,x,S):r[S(n)]=x});continue}v?u(r,g,x,S):r[S(g)]=x}else p(x,t,g+"-",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),u="undefined"==typeof document?{}:document.documentElement.style;n.exports=function(n){return function(t,e){e=e||{};var l=o(r(t)),f=i(t),p=n?l:f,d=c.style?n?c.style:c.css:"";if(l in u)return e.asString?p:[p];var g=p,y=a[f],x=[];if(n&&(g=s(p)),"function"==typeof y){var b=y(p,d)||[];b&&!Array.isArray(b)&&(b=[b]),b.length&&(b=b.map(function(t){return n?o(r(t)):i(t)})),x=x.concat(b)}return d&&x.push(d+g),x.push(p),e.asString||1==x.length?x[0]:x}}},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,u,l,f,p,d,g=e(0),y=(e.n(g),e(12)),x=e.n(y),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,u=n.left,l=n.noWrap,f=n.reverse,p=n.right,d=(n.spacing,n.style,n.top),y=n.wrapEven,x=j(n,["basis","bottom","center","centerHorizontal","centerVertical","grow","horizontal","left","noWrap","reverse","right","spacing","style","top","wrapEven"]),h=e.i(m.string)(this.props.style),v=new b(this.props.spacing),O=v.value,_=v.unit,S={basis:t,bottom:r,center:i,centerHorizontal:o,centerVertical:s,grow:c,horizontal:a,left:u,noWrap:l,reverse:f,right:p,spacingUnit:_,spacingValue:O,styleString:h,top:d,wrapEven:y};return g.createElement(P,w({},S,x),g.createElement(z,w({},S),g.Children.map(x.children,function(n){return n?e.i(g.cloneElement)(n,{parentProps:S}):null}),t&&y&&this.handleBasis(S)))},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 g.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}(g.PureComponent),P=r()(x.a.div)(o||(o=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.grow,r=(n.horizontal,n.styleString);return e.i(y.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()(x.a.div)(u||(u=v(["\n ","\n"],["\n ","\n"])),function(n){var t=n.bottom,r=n.center,i=n.centerHorizontal,o=n.centerVertical,u=n.grow,l=n.horizontal,f=n.left,p=n.noWrap,d=n.reverse,g=n.right,x=n.spacingUnit,b=n.spacingValue,m=n.top,h=d?"flex-end":"flex-start",w=d?"flex-start":"flex-end";return e.i(y.css)(a||(a=v(["\n display: flex;\n flex-grow: 1;\n justify-content: ",";\n ","\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "],["\n display: flex;\n flex-grow: 1;\n justify-content: ",";\n ","\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "])),h,O(l,"flex-wrap: wrap;"),O(p,"flex-wrap: nowrap;"),O(u||l,"align-self: stretch;"),l?d?"row-reverse":"row":d?"column-reverse":"column",O(b&&x,"margin: "+((-(b||0)/2).toString()+x)+";"),l?e.i(y.css)(s||(s=v(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),O(r,"align-items: center; justify-content: center;"),O(o,"align-items: center;"),O(i,"justify-content: center;"),O(m,"align-items: "+h+";"),O(g,"justify-content: "+w+";"),O(t,"align-items: "+w+";"),O(f,"justify-content: "+h+";")):e.i(y.css)(c||(c=v(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),O(r,"align-items: center; justify-content: center;"),O(o,"justify-content: center;"),O(i,"align-items: center;"),O(m,"justify-content: "+h+";"),O(g,"align-items: "+w+";"),O(t,"justify-content: "+w+";"),O(f,"align-items: "+h+";")))}),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 g.createElement(U,w({},o,{styleString:s}),g.createElement(E,w({},o,{styleString:c}),i))},t.displayName="Section",t}(g.PureComponent),U=r()(x.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(y.css)(l||(l=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()(x.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,u=(n.parentProps,n.styleString);return e.i(y.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(u,u))})}])}); |
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
25782
95