@twilio-paste/grid
Advanced tools
Comparing version 0.2.65 to 0.2.66
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.2.66](https://github.com/twilio-labs/paste/compare/@twilio-paste/grid@0.2.65...@twilio-paste/grid@0.2.66) (2020-10-13) | ||
**Note:** Version bump only for package @twilio-paste/grid | ||
## [0.2.65](https://github.com/twilio-labs/paste/compare/@twilio-paste/grid@0.2.64...@twilio-paste/grid@0.2.65) (2020-10-07) | ||
@@ -8,0 +16,0 @@ |
@@ -1,15 +0,1 @@ | ||
import{useMemo as r,Children as t,isValidElement as e,cloneElement as n,createElement as a}from"react";import{string as o,node as i,bool as p,number as c}from"prop-types";import{ResponsiveProp as s}from"@twilio-paste/style-props";import{safelySpreadBoxProps as u}from"@twilio-paste/box";import{Flex as f}from"@twilio-paste/flex";import{styled as l,compose as m,space as g,layout as y}from"@twilio-paste/styling-library"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */var v=function(){return(v=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var a in t=arguments[e])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r}).apply(this,arguments)};var d=function(r){return Array.isArray(r)?r.map((function(r){return"space0"!==r?r.replace("space","spaceNegative"):"space0"===r?"space0":null})):"space0"===r?"space0":r&&"string"==typeof r?r.replace("space","spaceNegative"):"auto"},O=function(o){var i=o.as,p=o.children,c=o.gutter,s=o.marginTop,l=o.marginBottom,m=o.vertical,g=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(r);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(e[n[a]]=r[n[a]])}return e}(o,["as","children","gutter","marginTop","marginBottom","vertical"]),y=r((function(){return t.map(p,(function(r){return e(r)?n(r,{count:t.count(p),gutter:c,vertical:m}):r}))}),[p]),O=r((function(){return function(r){return{marginLeft:d(r),marginRight:d(r)}}(c)}),[c]);return a(f,v({},O,u(g),{as:i,marginTop:s,marginBottom:l,vertical:m,wrap:!0}),y)};O.displayName="Grid",O.defaultProps={vertical:!1},"development"===process.env.NODE_ENV&&(O.propTypes={as:o,children:i.isRequired,vertical:s(p)});var b=function(r){var t,e,n,a,o,i={width:(t=r,e=t.count,n=t.span,Array.isArray(n)&&e?n.map((function(r){return r/12*100+"%"})):"number"==typeof n&&e&&e<=12?n/12*100+"%":void 0!==e?1/e*100+"%":1/12*100+"%")};return r.gutter&&(i.paddingLeft=r.gutter,i.paddingRight=r.gutter),r.offset&&(i.marginLeft=(a=r.offset,Array.isArray(a)?a.map((function(r){return r/12*100+"%"})):a/12*100+"%")),r.vertical&&!r.offset&&(i.minWidth=(o=r.vertical,Array.isArray(o)?o.map((function(r){return"boolean"==typeof r?!0===r?"100%":"0":null})):o?"100%":"0"),i.marginLeft="space0"),i},h=l.div(m(g,y)),w=function(t){var e=t.as,n=t.children,o=t.count,i=t.gutter,p=t.offset,c=t.span,s=t.vertical,u=r((function(){return b({count:o,gutter:i,offset:p,span:c,vertical:s})}),[o,i,p,c,s]);return a(h,v({},u,{as:e}),n)};w.displayName="Column","development"===process.env.NODE_ENV&&(w.propTypes={as:o,offset:s(c),span:s(c)});export{w as Column,O as Grid}; | ||
import{useMemo as r,Children as t,isValidElement as e,cloneElement as n,createElement as a}from"react";import{string as o,node as i,bool as p,number as c}from"prop-types";import{ResponsiveProp as s}from"@twilio-paste/style-props";import{safelySpreadBoxProps as u}from"@twilio-paste/box";import{Flex as f}from"@twilio-paste/flex";import{styled as l,compose as m,space as g,layout as y}from"@twilio-paste/styling-library";var v=function(){return(v=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var a in t=arguments[e])Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a]);return r}).apply(this,arguments)};var d=function(r){return Array.isArray(r)?r.map((function(r){return"space0"!==r?r.replace("space","spaceNegative"):"space0"===r?"space0":null})):"space0"===r?"space0":r&&"string"==typeof r?r.replace("space","spaceNegative"):"auto"},O=function(o){var i=o.as,p=o.children,c=o.gutter,s=o.marginTop,l=o.marginBottom,m=o.vertical,g=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(r);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(e[n[a]]=r[n[a]])}return e}(o,["as","children","gutter","marginTop","marginBottom","vertical"]),y=r((function(){return t.map(p,(function(r){return e(r)?n(r,{count:t.count(p),gutter:c,vertical:m}):r}))}),[p]),O=r((function(){return function(r){return{marginLeft:d(r),marginRight:d(r)}}(c)}),[c]);return a(f,v({},O,u(g),{as:i,marginTop:s,marginBottom:l,vertical:m,wrap:!0}),y)};O.displayName="Grid",O.defaultProps={vertical:!1},"development"===process.env.NODE_ENV&&(O.propTypes={as:o,children:i.isRequired,vertical:s(p)});var b=function(r){var t,e,n,a,o,i={width:(t=r,e=t.count,n=t.span,Array.isArray(n)&&e?n.map((function(r){return r/12*100+"%"})):"number"==typeof n&&e&&e<=12?n/12*100+"%":void 0!==e?1/e*100+"%":1/12*100+"%")};return r.gutter&&(i.paddingLeft=r.gutter,i.paddingRight=r.gutter),r.offset&&(i.marginLeft=(a=r.offset,Array.isArray(a)?a.map((function(r){return r/12*100+"%"})):a/12*100+"%")),r.vertical&&!r.offset&&(i.minWidth=(o=r.vertical,Array.isArray(o)?o.map((function(r){return"boolean"==typeof r?!0===r?"100%":"0":null})):o?"100%":"0"),i.marginLeft="space0"),i},h=l.div(m(g,y)),w=function(t){var e=t.as,n=t.children,o=t.count,i=t.gutter,p=t.offset,c=t.span,s=t.vertical,u=r((function(){return b({count:o,gutter:i,offset:p,span:c,vertical:s})}),[o,i,p,c,s]);return a(h,v({},u,{as:e}),n)};w.displayName="Column","development"===process.env.NODE_ENV&&(w.propTypes={as:o,offset:s(c),span:s(c)});export{w as Column,O as Grid}; |
{ | ||
"name": "@twilio-paste/grid", | ||
"version": "0.2.65", | ||
"version": "0.2.66", | ||
"category": "layout", | ||
@@ -31,9 +31,9 @@ "status": "beta", | ||
"peerDependencies": { | ||
"@twilio-paste/box": "^2.11.2", | ||
"@twilio-paste/design-tokens": "^6.3.3", | ||
"@twilio-paste/flex": "^0.3.62", | ||
"@twilio-paste/style-props": "^1.8.2", | ||
"@twilio-paste/box": "^2.11.3", | ||
"@twilio-paste/design-tokens": "^6.3.4", | ||
"@twilio-paste/flex": "^0.3.63", | ||
"@twilio-paste/style-props": "^1.8.3", | ||
"@twilio-paste/styling-library": "^0.1.2", | ||
"@twilio-paste/theme": "^3.2.23", | ||
"@twilio-paste/types": "^3.0.25", | ||
"@twilio-paste/theme": "^3.2.24", | ||
"@twilio-paste/types": "^3.0.26", | ||
"prop-types": "^15.7.2", | ||
@@ -44,11 +44,11 @@ "react": "^16.8.6", | ||
"devDependencies": { | ||
"@twilio-paste/box": "^2.11.3", | ||
"@twilio-paste/box": "^2.11.4", | ||
"@twilio-paste/design-tokens": "^6.3.4", | ||
"@twilio-paste/flex": "^0.3.63", | ||
"@twilio-paste/style-props": "^1.8.3", | ||
"@twilio-paste/styling-library": "^0.1.2", | ||
"@twilio-paste/theme": "^3.2.24", | ||
"@twilio-paste/types": "^3.0.26" | ||
"@twilio-paste/flex": "^0.3.64", | ||
"@twilio-paste/style-props": "^1.8.4", | ||
"@twilio-paste/styling-library": "^0.1.3", | ||
"@twilio-paste/theme": "^3.2.25", | ||
"@twilio-paste/types": "^3.0.27" | ||
}, | ||
"gitHead": "099694d89be8b73b83fb7d5496c5d659af26c08a" | ||
"gitHead": "7b34b4af994258e26c6f6d4ac82ae9a7ec7d38df" | ||
} |
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
32562
79