react-layout-views
Advanced tools
Comparing version 0.2.8 to 0.3.0
@@ -8,3 +8,5 @@ /// <reference types="react" /> | ||
static defaultProps: Partial<LayoutProps>; | ||
constructor(); | ||
render(): JSX.Element; | ||
handleBasis(trimmedProps: LayoutProps): JSX.Element[] | null; | ||
} | ||
@@ -11,0 +13,0 @@ export declare type SectionProps = SectionProps; |
@@ -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 l}),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)}}()),c=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},a=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},l=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.bottom,i=t.center,l=t.centerVertical,f=t.centerHorizontal,p=t.grow,y=t.horizontal,g=t.left,m=t.right,h=t.spacing,d=t.style,x=t.top,b=a(t,["bottom","center","centerVertical","centerHorizontal","grow","horizontal","left","right","spacing","style","top"]),j={bottom:e,center:i,centerVertical:l,centerHorizontal:f,grow:p,horizontal:y,left:g,right:m,spacing:h,top:x};return r.createElement(o.View,c({style:[u(j),d]},b),r.createElement(o.View,{style:s(j)},r.Children.map(b.children,function(t){return t?n.i(r.cloneElement)(t,{parentProps:j}):null})))},e.displayName="Layout",e.defaultProps={spacing:0},e}(r.PureComponent),u=function(t){var e=t.grow;return c({},e&&{flex:"number"==typeof e?e:1},e&&{alignSelf:"stretch"})},s=function(t){var e=t.horizontal,n=t.spacing,r=t.grow,o=t.center,i=t.centerVertical,a=t.centerHorizontal,l=t.top,u=t.right,s=t.bottom,f=t.left;return c({flexDirection:e?"row":"column"},r&&{flex:"number"==typeof r?r:1},{margin:-n/2},e?c({},o&&{alignItems:"center",justifyContent:"center"},i&&{alignItems:"center"},a&&{justifyContent:"center"},l&&{alignItems:"flex-start"},u&&{justifyContent:"flex-end"},s&&{alignItems:"flex-end"},f&&{justifyContent:"flex-start"}):c({},o&&{alignItems:"center",justifyContent:"center"},i&&{justifyContent:"center"},a&&{alignItems:"center"},l&&{justifyContent:"flex-start"},u&&{alignItems:"flex-end"},s&&{justifyContent:"flex-end"},f&&{alignItems:"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=a(t,["style"]);return r.createElement(o.View,{style:[p(n),e]},n.children)},e.displayName="Section",e}(r.PureComponent),p=function(t){var e=t.grow,n=t.center,r=t.centerVertical,o=t.centerHorizontal,i=t.top,a=t.right,l=t.bottom,u=t.left,s=t.parentProps.spacing;return c({margin:s/2},e&&{flex:"number"==typeof e?e:1},n&&{alignItems:"center",justifyContent:"center"},r&&{justifyContent:"center"},o&&{alignItems:"center"},i&&{justifyContent:"flex-start"},a&&{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.centerVertical,p=t.centerHorizontal,y=t.grow,m=t.horizontal,g=t.left,h=t.right,d=t.spacing,x=t.style,b=t.top,v=t.wrapEven,w=s(t,["basis","bottom","center","centerVertical","centerHorizontal","grow","horizontal","left","right","spacing","style","top","wrapEven"]),j={basis:e,bottom:i,center:c,centerVertical:f,centerHorizontal:p,grow:y,horizontal:m,left:g,right:h,spacing:d,top:b,wrapEven:v};return r.createElement(o.View,a({style:[l(j),x]},w),r.createElement(o.View,{style:u(j)},r.Children.map(w.children,function(t){return t?n.i(r.cloneElement)(t,{parentProps:j}):null}),e&&v&&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,style:{marginTop:0,marginBottom:0}})})}return null},e.displayName="Layout",e.defaultProps={spacing:0},e}(r.PureComponent),l=function(t){var e=t.grow;return a({},e&&{flex:"number"==typeof e?e:1},e&&{alignSelf:"stretch"})},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({flexWrap:"wrap"},e&&{flexWrap:"nowrap"},{flexDirection:n?"row":"column"},o&&{flex:"number"==typeof o?o:1},{margin:-r/2},n?a({},i&&{alignItems:"center",justifyContent:"center"},s&&{alignItems:"center"},c&&{justifyContent:"center"},l&&{alignItems:"flex-start"},u&&{justifyContent:"flex-end"},f&&{alignItems:"flex-end"},p&&{justifyContent:"flex-start"}):a({},i&&{alignItems:"center",justifyContent:"center"},s&&{justifyContent:"center"},c&&{alignItems:"center"},l&&{justifyContent:"flex-start"},u&&{alignItems:"flex-end"},f&&{justifyContent:"flex-end"},p&&{alignItems:"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=s(t,["style"]);return r.createElement(o.View,{style:[p(n),e]},n.children)},e.displayName="Section",e}(r.PureComponent),p=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,y=e||f&&f.basis;return a({margin:p/2},y&&{flexBasis:y,flexGrow:1},n&&{flex:"number"==typeof n?n:1},r&&{alignItems:"center",justifyContent:"center"},o&&{justifyContent:"center"},i&&{alignItems:"center"},s&&{justifyContent:"flex-start"},c&&{alignItems:"flex-end"},l&&{justifyContent:"flex-end"},u&&{alignItems:"flex-start"})}}})}); |
{ | ||
"name": "react-layout-views", | ||
"version": "0.2.8", | ||
"version": "0.3.0", | ||
"main": "./web/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./web/index.d.ts", |
import { ViewProperties } from 'react-native' | ||
export interface LayoutProps extends ViewProperties { | ||
basis?: string | number | ||
grow?: boolean | number | ||
@@ -14,5 +15,8 @@ spacing: number | ||
left?: boolean | ||
noWrap?: boolean | ||
wrapEven?: boolean | ||
} | ||
export interface SectionProps extends ViewProperties { | ||
basis?: string | number | ||
parentProps: LayoutProps | ||
@@ -19,0 +23,0 @@ grow?: boolean | number |
import * as React from 'react' | ||
export interface LayoutProps extends React.HTMLProps<React.ReactNode> { | ||
basis?: string | ||
grow?: boolean | number | ||
@@ -17,5 +18,8 @@ spacing?: string | ||
left?: boolean | ||
noWrap?: boolean | ||
wrapEven?: boolean | ||
} | ||
export interface SectionProps extends React.HTMLProps<React.ReactNode> { | ||
basis?: string | ||
parentProps?: LayoutProps | ||
@@ -22,0 +26,0 @@ styleString?: string |
@@ -8,3 +8,5 @@ /// <reference types="react" /> | ||
static defaultProps: Partial<LayoutProps>; | ||
constructor(); | ||
render(): JSX.Element; | ||
handleBasis(trimmedProps: object): JSX.Element[] | null; | ||
} | ||
@@ -11,0 +13,0 @@ export declare type SectionProps = SectionProps; |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("css-length"),require("styled-components")):"function"==typeof define&&define.amd?define("react-layout-views",["react","css-length","styled-components"],n):"object"==typeof exports?exports["react-layout-views"]=n(require("react"),require("css-length"),require("styled-components")):t["react-layout-views"]=n(t.react,t["css-length"],t["styled-components"])}(this,function(t,n,e){return function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=22)}([function(n,e){n.exports=t},function(t,n){"use exports";t.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(t,n,e){"use strict";var r=Object.prototype.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,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 t=function(){for(var t in o)if(i.test(t))return t.match(i)[0];return"WebkitOpacity"in o?"Webkit":"KhtmlOpacity"in o?"Khtml":""}();return{style:t,css:"-"+t.toLowerCase()+"-",dom:{Webkit:"WebKit",ms:"MS",o:"WebKit"}[t]||r(t)}}();t.exports=s},function(t,n){t.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(t,n){return[n+"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(t,n,e){"use strict";var r=function(t,n){return n?n.toUpperCase():""},i=e(17);t.exports=function(t){return t?t.replace(i,r):""}},function(t,n,e){"use strict";var r=e(18);t.exports=function(t){return r(t).toLowerCase()}},function(t,n,e){"use strict";t.exports=function(t){return t.length?t.charAt(0).toUpperCase()+t.substring(1):t}},function(t,n,e){"use strict";var r=(e(3),e(13)),i=e(6),o=e(5),s=e(2),c=e(15),u=e(14),a=function(t,n,e,i){r(n).forEach(function(n){t[i?i(n):n]=e})},l=function(t){t=(t||"").split(";");var n={};return t.forEach(function(t){var e=t.split(":");2==e.length&&(n[e[0].trim()]=e[1].trim())}),n},f={cssUnitless:e(1)},p=function(t,n,e,r){"string"==typeof t&&(t=l(t)),n=n||f,n.cssUnitless=n.cssUnitless||f.cssUnitless,r=r||{};var d,y,g,m,x,h,b,v,j=n.scope||{},O=null!=n.addUnits?n.addUnits:!j||null==j.addUnits||j.addUnits,w=(null!=n.cssUnitless?n.cssUnitless:j?j.cssUnitless:null)||{},_=(n.cssUnit||j?j.cssUnit:null)||"px",P=n.prefixProperties||(j?j.prefixProperties:null)||{},U=n.camelize,z=U?o:i;for(g in t)if(s(t,g)){if(m=t[g],y=i(e?e+g:g),d=!1,v=!1,u(m)&&(b=m.call(j||t,m,g,y,t),c(b)&&null!=b.value?(m=b.value,v=b.prefix,y=b.name?i(b.name):y):m=b),x=typeof m,h="number"==x||"string"==x&&""!=m&&1*m==m,null==m||null==y||""===y)continue;if((h||"string"==x)&&(d=!0),!d&&null!=m.value&&m.prefix&&(d=!0,v=m.prefix,m=m.value),d){if(v=v||!!P[y],h&&(m=!O||y in w?m+"":m+_),"border"!=y&&(y.indexOf("border")||~y.indexOf("radius")||~y.indexOf("width"))||!h||(y+="-width"),!y.indexOf("border-radius-")&&(y.replace(/border(-radius)(-(.*))/,function(t,n,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?(y=[],r[e].forEach(function(t){y.push("border"+t+n)})):y="border"+e+n}),Array.isArray(y))){y.forEach(function(t){v?a(r,t,m,z):r[z(t)]=m});continue}v?a(r,y,m,z):r[z(y)]=m}else p(m,n,y+"-",r)}return r};t.exports=p},function(t,n,e){"use strict";t.exports={prefixProperties:e(4),cssUnitless:e(1),object:e(8),string:e(20)}},function(t,e){t.exports=n},,function(t,n){t.exports=e},function(t,n,e){t.exports=e(16)()},function(t,n,e){"use strict";var r=Object.prototype.toString;t.exports=function(t){return"[object Function]"===r.apply(t)}},function(t,n,e){"use strict";var r=Object.prototype.toString;t.exports=function(t){return!!t&&"[object Object]"===r.call(t)}},function(t,n,e){"use strict";var r=e(5),i=e(6),o=e(19),s=e(7),c=e(3),u=e(4),a="undefined"==typeof document?{}:document.documentElement.style;t.exports=function(t){return function(n,e){e=e||{};var l=o(r(n)),f=i(n),p=t?l:f,d=c.style?t?c.style:c.css:"";if(l in a)return e.asString?p:[p];var y=p,g=u[f],m=[];if(t&&(y=s(p)),"function"==typeof g){var x=g(p,d)||[];x&&!Array.isArray(x)&&(x=[x]),x.length&&(x=x.map(function(n){return t?o(r(n)):i(n)})),m=m.concat(x)}return d&&m.push(d+y),m.push(p),e.asString||1==m.length?m[0]:m}}},function(t,n){t.exports=/[-\s]+(.)?/g},function(t,n,e){"use strict";var r=/::/g,i=/([A-Z]+)([A-Z][a-z])/g,o=/([a-z\d])([A-Z])/g,s=/_/g;t.exports=function(t,n){return t?t.replace(r,"/").replace(i,"$1_$2").replace(o,"$1_$2").replace(s,n||"-"):""}},function(t,n,e){"use strict";t.exports=function(t){return t.length?t.charAt(0).toLowerCase()+t.substring(1):t}},function(t,n,e){"use strict";var r=e(8),i=e(2);t.exports=function(t,n){t=r(t,n);var e,o=[];for(e in t)i(t,e)&&o.push(e+": "+t[e]);return o.join("; ")}},,function(t,n,e){"use strict";function r(){return function(t){return t}}Object.defineProperty(n,"__esModule",{value:!0}),e.d(n,"Layout",function(){return O}),e.d(n,"Section",function(){return P});var i,o,s,c,u,a,l,f,p=e(0),d=(e.n(p),e(12)),y=e.n(d),g=e(10),m=(e.n(g),e(9)),x=(e.n(m),this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])};return function(n,e){function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}()),h=this&&this.__makeTemplateObject||function(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t},b=this&&this.__assign||Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++){n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},v=this&&this.__rest||function(t,n){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&n.indexOf(r)<0&&(e[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)n.indexOf(r[i])<0&&(e[r[i]]=t[r[i]]);return e},j=function(t,n){return t?n||"":""},O=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return x(n,t),n.prototype.render=function(){var t=this.props,n=t.bottom,r=t.center,i=t.centerVertical,o=t.centerHorizontal,s=t.grow,c=t.horizontal,u=t.left,a=t.right,l=(t.spacing,t.style,t.top),f=v(t,["bottom","center","centerVertical","centerHorizontal","grow","horizontal","left","right","spacing","style","top"]),d=e.i(m.string)(this.props.style),y=new g(this.props.spacing),x=y.value,h=y.unit,j={bottom:n,center:r,centerVertical:i,centerHorizontal:o,grow:s,horizontal:c,left:u,right:a,spacingValue:x,spacingUnit:h,styleString:d,top:l};return p.createElement(w,b({},j,f),p.createElement(_,b({},j),p.Children.map(f.children,function(t){return t?e.i(p.cloneElement)(t,{parentProps:j}):null})))},n.displayName="Layout",n.defaultProps={spacing:"0px",spacingValue:0,spacingUnit:"px"},n}(p.PureComponent),w=r()(y.a.div)(o||(o=h(["\n ","\n"],["\n ","\n"])),function(t){var n=t.grow,r=(t.horizontal,t.styleString);return e.i(d.css)(i||(i=h(["\n overflow: hidden;\n display: flex;\n ","\n ","\n ","\n "],["\n overflow: hidden;\n display: flex;\n ","\n ","\n ","\n "])),j(n,"flex: "+("number"==typeof n?n:1)+";"),j(n,"align-self: stretch;"),j(r,r))}),_=r()(y.a.div)(a||(a=h(["\n ","\n"],["\n ","\n"])),function(t){var n=t.horizontal,r=t.grow,i=t.spacingValue,o=t.spacingUnit,a=t.center,l=t.centerVertical,f=t.centerHorizontal,p=t.top,y=t.right,g=t.bottom,m=t.left;return e.i(d.css)(u||(u=h(["\n display: flex;\n flex: 1;\n ","\n flex-direction: ",";\n ","\n ","\n "],["\n display: flex;\n flex: 1;\n ","\n flex-direction: ",";\n ","\n ","\n "])),j(r||n,"align-self: stretch;"),n?"row":"column",j(i&&o,"margin: "+((-(i||0)/2).toString()+o)+";"),n?e.i(d.css)(s||(s=h(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),j(a,"align-items: center; justify-content: center;"),j(l,"align-items: center;"),j(f,"justify-content: center;"),j(p,"align-items: flex-start;"),j(y,"justify-content: flex-end;"),j(g,"align-items: flex-end;"),j(m,"justify-content: flex-start;")):e.i(d.css)(c||(c=h(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),j(a,"align-items: center; justify-content: center;"),j(l,"justify-content: center;"),j(f,"align-items: center;"),j(p,"justify-content: flex-start;"),j(y,"align-items: flex-end;"),j(g,"justify-content: flex-end;"),j(m,"align-items: flex-start;")))}),P=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return x(n,t),n.prototype.render=function(){var t=this.props,n=t.style,r=v(t,["style"]),i=e.i(m.string)(n);return p.createElement(U,b({},r,{styleString:i}),r.children)},n.displayName="Section",n}(p.PureComponent),U=r()(y.a.div)(f||(f=h(["\n ","\n"],["\n ","\n"])),function(t){var n=t.grow,r=t.center,i=t.centerVertical,o=t.centerHorizontal,s=t.top,c=t.right,u=t.bottom,a=t.left,f=t.parentProps,p=t.styleString;return e.i(d.css)(l||(l=h(["\n display: flex;\n flex-direction: column;\n margin: ",";\n ","\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "],["\n display: flex;\n flex-direction: column;\n margin: ",";\n ","\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "])),((f&&f.spacingValue||0)/2).toString()+(f&&f.spacingUnit),j(n,"flex: "+("number"==typeof n?n:1)+";"),j(r,"align-items: center; justify-content: center;"),j(i,"justify-content: center;"),j(o,"align-items: center;"),j(r,"align-items: center; justify-content: center;"),j(s,"justify-content: flex-start;"),j(c,"align-items: flex-end;"),j(u,"justify-content: flex-end;"),j(a,"align-items: flex-start;"),j(p,p))})}])}); | ||
!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,m,b,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)||{},U=t.camelize,z=U?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),m=typeof x,b="number"==m||"string"==m&&""!=x&&1*x==x,null==x||null==g||""===g)continue;if((b||"string"==m)&&(d=!0),!d&&null!=x.value&&x.prefix&&(d=!0,v=x.prefix,x=x.value),d){if(v=v||!!P[g],b&&(x=!j||g in O?x+"":x+_),"border"!=g&&(g.indexOf("border")||~g.indexOf("radius")||~g.indexOf("width"))||!b||(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,z):r[z(n)]=x});continue}v?u(r,g,x,z):r[z(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 m=y(p,d)||[];m&&!Array.isArray(m)&&(m=[m]),m.length&&(m=m.map(function(t){return n?o(r(t)):i(t)})),x=x.concat(m)}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 j}),e.d(t,"Section",function(){return P});var i,o,s,c,a,u,l,f,p=e(0),d=(e.n(p),e(12)),g=e.n(d),y=e(10),x=(e.n(y),e(9)),m=(e.n(x),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)}}()),b=this&&this.__makeTemplateObject||function(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n},h=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},v=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},w=function(n,t){return n?t||"":""},j=function(n){function t(){var t=n.call(this)||this;return t.handleBasis=t.handleBasis.bind(t),t}return m(t,n),t.prototype.render=function(){var n=this.props,t=n.basis,r=n.bottom,i=n.center,o=n.centerVertical,s=n.centerHorizontal,c=n.grow,a=n.horizontal,u=n.left,l=n.noWrap,f=n.right,d=(n.spacing,n.style,n.top),g=n.wrapEven,m=v(n,["basis","bottom","center","centerVertical","centerHorizontal","grow","horizontal","left","noWrap","right","spacing","style","top","wrapEven"]),b=e.i(x.string)(this.props.style),w=new y(this.props.spacing),j=w.value,P=w.unit,U={basis:t,bottom:r,center:i,centerVertical:o,centerHorizontal:s,grow:c,horizontal:a,left:u,noWrap:l,right:f,spacingValue:j,spacingUnit:P,styleString:b,top:d,wrapEven:g};return p.createElement(O,h({},U,m),p.createElement(_,h({},U),p.Children.map(m.children,function(n){return n?e.i(p.cloneElement)(n,{parentProps:U}):null}),t&&g&&this.handleBasis(U)))},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){return p.createElement(P,{basis:r,parentProps:n,style:{marginTop:0,marginBottom:0}})})}return null},t.displayName="Layout",t.defaultProps={spacing:"0px",spacingValue:0,spacingUnit:"px"},t}(p.PureComponent),O=r()(g.a.div)(o||(o=b(["\n ","\n"],["\n ","\n"])),function(n){var t=n.grow,r=(n.horizontal,n.styleString);return e.i(d.css)(i||(i=b(["\n overflow: hidden;\n display: flex;\n ","\n ","\n ","\n "],["\n overflow: hidden;\n display: flex;\n ","\n ","\n ","\n "])),w(t,"flex: "+("number"==typeof t?t:1)+";"),w(t,"align-self: stretch;"),w(r,r))}),_=r()(g.a.div)(u||(u=b(["\n ","\n"],["\n ","\n"])),function(n){var t=n.noWrap,r=n.horizontal,i=n.grow,o=n.spacingValue,u=n.spacingUnit,l=n.center,f=n.centerVertical,p=n.centerHorizontal,g=n.top,y=n.right,x=n.bottom,m=n.left;return e.i(d.css)(a||(a=b(["\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "],["\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n ","\n ","\n flex-direction: ",";\n ","\n ","\n "])),w(t,"flex-wrap: nowrap;"),w(i||r,"align-self: stretch;"),r?"row":"column",w(o&&u,"margin: "+((-(o||0)/2).toString()+u)+";"),r?e.i(d.css)(s||(s=b(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),w(l,"align-items: center; justify-content: center;"),w(f,"align-items: center;"),w(p,"justify-content: center;"),w(g,"align-items: flex-start;"),w(y,"justify-content: flex-end;"),w(x,"align-items: flex-end;"),w(m,"justify-content: flex-start;")):e.i(d.css)(c||(c=b(["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "],["\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n "])),w(l,"align-items: center; justify-content: center;"),w(f,"justify-content: center;"),w(p,"align-items: center;"),w(g,"justify-content: flex-start;"),w(y,"align-items: flex-end;"),w(x,"justify-content: flex-end;"),w(m,"align-items: flex-start;")))}),P=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return m(t,n),t.prototype.render=function(){var n=this.props,t=n.style,r=v(n,["style"]),i=e.i(x.string)(t);return p.createElement(U,h({},r,{styleString:i}),r.children)},t.displayName="Section",t}(p.PureComponent),U=r()(g.a.div)(f||(f=b(["\n ","\n"],["\n ","\n"])),function(n){var t=n.basis,r=n.grow,i=n.center,o=n.centerVertical,s=n.centerHorizontal,c=n.top,a=n.right,u=n.bottom,f=n.left,p=n.parentProps,g=n.styleString,y=t||p&&p.basis;return e.i(d.css)(l||(l=b(["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n margin: ",";\n ","\n ","\n ","\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "],["\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n margin: ",";\n ","\n ","\n ","\n ","\n "," \n "," \n ","\n ","\n ","\n ","\n ","\n ","\n "])),((p&&p.spacingValue||0)/2).toString()+(p&&p.spacingUnit),w(y,"flex-basis: "+y+";"),w(y,"flex-grow: 1;"),w(r,"flex: "+("number"==typeof r?r:1)+";"),w(i,"align-items: center; justify-content: center;"),w(o,"justify-content: center;"),w(s,"align-items: center;"),w(i,"align-items: center; justify-content: center;"),w(c,"justify-content: flex-start;"),w(a,"align-items: flex-end;"),w(u,"justify-content: flex-end;"),w(f,"align-items: flex-start;"),w(g,g))})}])}); |
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
24531
91