@xstyled/system
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.2.0](https://github.com/smooth-code/xstyled/compare/v1.1.1...v1.2.0) (2019-06-07) | ||
### Features | ||
* support emotion ([4b600a4](https://github.com/smooth-code/xstyled/commit/4b600a4)) | ||
## [1.1.1](https://github.com/smooth-code/xstyled/compare/v1.1.0...v1.1.1) (2019-06-03) | ||
@@ -8,0 +19,0 @@ |
@@ -1021,10 +1021,5 @@ 'use strict'; | ||
var max = getBreakpointMax(breakpoints, upper); | ||
if (min !== null && max !== null) { | ||
return [mediaBetweenWidth(min, max) + " {", rules, '}']; | ||
} | ||
if (max === null) return up(lower, rules)(props); | ||
if (min === null) return down(upper, rules)(props); | ||
return null; | ||
return [mediaBetweenWidth(min, max) + " {", rules, '}']; | ||
}; | ||
@@ -1031,0 +1026,0 @@ }; |
@@ -1015,10 +1015,5 @@ import deepmerge from 'deepmerge'; | ||
var max = getBreakpointMax(breakpoints, upper); | ||
if (min !== null && max !== null) { | ||
return [mediaBetweenWidth(min, max) + " {", rules, '}']; | ||
} | ||
if (max === null) return up(lower, rules)(props); | ||
if (min === null) return down(upper, rules)(props); | ||
return null; | ||
return [mediaBetweenWidth(min, max) + " {", rules, '}']; | ||
}; | ||
@@ -1025,0 +1020,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r=r||self).system={})}(this,function(r){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e=function(r,e){return r(e={exports:{}},e.exports),e.exports}(function(r,e){var t;t=function(){var r=function(r){return function(r){return!!r&&"object"==typeof r}(r)&&!function(r){var t=Object.prototype.toString.call(r);return"[object RegExp]"===t||"[object Date]"===t||function(r){return r.$$typeof===e}(r)}(r)},e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function t(r,e){return!1!==e.clone&&e.isMergeableObject(r)?i((t=r,Array.isArray(t)?[]:{}),r,e):r;var t}function o(r,e,o){return r.concat(e).map(function(r){return t(r,o)})}function n(r,e,o){var n={};return o.isMergeableObject(r)&&Object.keys(r).forEach(function(e){n[e]=t(r[e],o)}),Object.keys(e).forEach(function(p){o.isMergeableObject(e[p])&&r[p]?n[p]=function(r,e){if(!e.customMerge)return i;var t=e.customMerge(r);return"function"==typeof t?t:i}(p,o)(r[p],e[p],o):n[p]=t(e[p],o)}),n}function i(e,i,p){(p=p||{}).arrayMerge=p.arrayMerge||o,p.isMergeableObject=p.isMergeableObject||r;var a=Array.isArray(i);return a===Array.isArray(e)?a?p.arrayMerge(e,i,p):n(e,i,p):t(i,p)}return i.all=function(r,e){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(r,t){return i(r,t,e)},{})},i},r.exports=t()}),t=function(r){return r},o=function(r){return null!=r},n=function(r){return"number"==typeof r&&!Number.isNaN(r)},i=function(r){return"string"==typeof r&&""!==r},p=function(r){return"object"==typeof r&&null!==r},a=function(r,t){return o(t)?e(r,t,{clone:!1}):r},u=function(r,e,t){return void 0===t&&(t=r.theme),function r(e){if("function"!=typeof e)return e;for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];var i=e.apply(void 0,o);return r.apply(void 0,[i].concat(o))}(function(r,e){for(var t=String(e).split("."),n=t.length,i=r,p=0;p<n;p+=1){if(void 0===i)return i;var a=t[p];i=o(i[a])?i[a]:void 0}return i}(t,e),r)},d=function(r){return function(e){return n(e)&&0!==e?""+e+r:e}}("px"),f=function(r){return 0!==r&&r>=-1&&r<=1?100*r+"%":d(r)},l={xs:0,sm:576,md:768,lg:992,xl:1200};function s(r){var e=u(r,"breakpoints");return o(e)?e:l}var g=function(r){return"@media (min-width: "+r+")"},m=function(r){return"@media (max-width: "+r+")"},c=function(r,e){return"@media (min-width: "+r+") and (max-width: "+e+")"},h=function(r,e){var t=r[e];return 0===t?null:d(t)},y=function(r,e){var t=r[e];return 0===t?null:d(t-.02)},b={},v=function(r){var e=r.transform,t=r.key,n=r.defaultVariants;return function(r){return function(i){var p=o(t)?u(i,t):null;p=o(p)?p:n;var a=o(p)?u(i,r,p):null,d=o(a)?a:r;return e?(b.rawValue=r,b.variants=p,e(d,b)):d}}};function G(r,e,t,o){var p=o(e)(t);if(i(p)||n(p)){for(var a={},u=0;u<r.length;u++)a[r[u]]=p;return a}return null}function x(r,e,t){return r.meta={props:e,getStyle:r,generators:t},r}function k(r,e,n){return function(i){var u=i[r];if(!o(u))return null;var d=G(e,u,i,n);return null!==d?d:p(u)?function(r,e,o){void 0===o&&(o=t);for(var n=s(r),i=Object.keys(e),p={},u=0;u<i.length;u++){var d=i[u],f=o(e[d]);if(null!==f){var l,m=h(n,d);p=a(p,null===m?f:((l={})[g(m)]=f,l))}}return p}(i,u,function(r){return G(e,r,i,n)}):null}}function w(){for(var r=[],e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.forEach(function(e){e&&(e.meta.generators?r=[].concat(r,e.meta.generators):r.push(e))});var n=function(r){for(var e={},t=0;t<r.length;t++){var o=r[t];if(o&&o.meta)for(var n=Object.keys(o.meta.props),i=0;i<n.length;i++)e[o.meta.props[n[i]]]=o}return e}(r);return x(function(r){for(var e=Object.keys(r),t=e.length,o={},i=0;i<t;i++){var p=e[i],u=n[p];u&&(o=a(o,u.meta.getStyle(r)))}return o},r.reduce(function(r,e){return[].concat(r,e.meta.props)},[]),t)}function S(r){var e=r.prop,t=r.cssProperty,o=r.key,n=void 0===o?null:o,i=r.transform,p=void 0===i?null:i,a=r.themeGet,u=void 0===a?null:a,d=Array.isArray(t)?t:[t||e];return Array.isArray(e)?w.apply(void 0,e.map(function(r){return S({prop:r,cssProperty:d,key:n,transform:p,themeGet:u})})):(u=u||v({key:n,transform:p}),x(k(e,d,u),[e]))}var A=v({key:"colors"}),R=v({transform:d}),C=v({transform:f}),j=v({key:"radii",transform:d}),T=S({prop:"opacity"}),P=S({prop:"overflow"}),B=v({key:"transitions"}),z=S({prop:"transition",themeGet:B}),W=w(T,P,z),L=S({prop:"background"}),O=S({prop:"backgroundColor",themeGet:A}),M=S({prop:"backgroundImage"}),I=S({prop:"backgroundSize"}),H=S({prop:"backgroundPosition"}),F=S({prop:"backgroundRepeat"}),E=w(L,O,M,I,H,F),V=v({key:"borders",transform:function(r){return n(r)&&r>0?r+"px solid":r}}),D=S({prop:"border",themeGet:V}),N=S({prop:"borderTop",themeGet:V}),$=S({prop:"borderTopColor",themeGet:A}),_=S({prop:"borderRight",themeGet:V}),Z=S({prop:"borderRightColor",themeGet:A}),q=S({prop:"borderBottom",themeGet:V}),J=S({prop:"borderBottomColor",themeGet:A}),K=S({prop:"borderLeft",themeGet:V}),Q=S({prop:"borderLeftColor",themeGet:A}),U=S({prop:"borderColor",themeGet:A}),X=v({key:"borderWidths",transform:d}),Y=S({prop:"borderWidth",themeGet:X}),rr=v({key:"borderStyles"}),er=S({prop:"borderStyle",themeGet:rr}),tr=S({prop:"borderRadius",themeGet:j}),or=v({key:"shadows"}),nr=S({prop:"boxShadow",themeGet:or}),ir=w(D,N,$,_,Z,q,J,K,Q,U,Y,er,tr,nr),pr=v({transform:f,key:"sizes"}),ar=S({prop:"display"}),ur=S({prop:"width",themeGet:pr}),dr=S({prop:"height",themeGet:pr}),fr=S({prop:"maxWidth",themeGet:pr}),lr=S({prop:"maxHeight",themeGet:pr}),sr=S({prop:"minWidth",themeGet:pr}),gr=S({prop:"minHeight",themeGet:pr}),mr=S({prop:"size",cssProperty:["width","height"],themeGet:pr}),cr=S({prop:"verticalAlign"}),hr=w(ar,ur,dr,fr,lr,sr,gr,mr,cr),yr=S({prop:"alignItems"}),br=S({prop:"alignContent"}),vr=S({prop:"justifyContent"}),Gr=S({prop:"justifyItems"}),xr=S({prop:"flexWrap"}),kr=S({prop:"flexBasis",themeGet:C}),wr=S({prop:"flexDirection"}),Sr=S({prop:"flex"}),Ar=S({prop:"justifySelf"}),Rr=S({prop:"alignSelf"}),Cr=S({prop:"order"}),jr=w(ar,yr,br,vr,Gr,xr,kr,wr,Sr,Ar,Rr,Cr),Tr=v({key:"space",defaultVariants:[0,4,8,16,24,48,96,144,192,240],transform:function(r,e){var t=e.rawValue,o=e.variants;if(!n(t))return o[t]||t;var i,p=Math.abs(t),a=n(i=t)&&i<0,u=o[p]||p;return n(u)?d(u*(a?-1:1)):d(a?"-"+u:u)}}),Pr=S({prop:["margin","m"],cssProperty:"margin",themeGet:Tr}),Br=S({prop:["marginTop","mt"],cssProperty:"marginTop",themeGet:Tr}),zr=S({prop:["marginRight","mr"],cssProperty:"marginRight",themeGet:Tr}),Wr=S({prop:["marginBottom","mb"],cssProperty:"marginBottom",themeGet:Tr}),Lr=S({prop:["marginLeft","ml"],cssProperty:"marginLeft",themeGet:Tr}),Or=S({prop:"mx",cssProperty:["marginRight","marginLeft"],themeGet:Tr}),Mr=S({prop:"my",cssProperty:["marginTop","marginBottom"],themeGet:Tr}),Ir=S({prop:["padding","p"],cssProperty:"padding",themeGet:Tr}),Hr=S({prop:["paddingTop","pt"],cssProperty:"paddingTop",themeGet:Tr}),Fr=S({prop:["paddingRight","pr"],cssProperty:"paddingRight",themeGet:Tr}),Er=S({prop:["paddingBottom","pb"],cssProperty:"paddingBottom",themeGet:Tr}),Vr=S({prop:["paddingLeft","pl"],cssProperty:"paddingLeft",themeGet:Tr}),Dr=S({prop:"px",cssProperty:["paddingRight","paddingLeft"],themeGet:Tr}),Nr=S({prop:"py",cssProperty:["paddingTop","paddingBottom"],themeGet:Tr}),$r=w(Pr,Br,zr,Wr,Lr,Or,Mr,Ir,Hr,Fr,Er,Vr,Dr,Nr),_r=S({prop:"gridGap",themeGet:Tr}),Zr=S({prop:"gridColumnGap",themeGet:Tr}),qr=S({prop:"gridRowGap",themeGet:Tr}),Jr=S({prop:"gridColumn"}),Kr=S({prop:"gridRow"}),Qr=S({prop:"gridAutoFlow"}),Ur=S({prop:"gridAutoColumns"}),Xr=S({prop:"gridAutoRows"}),Yr=S({prop:"gridTemplateColumns"}),re=S({prop:"gridTemplateRows"}),ee=S({prop:"gridTemplateAreas"}),te=S({prop:"gridArea"}),oe=w(_r,Zr,qr,Jr,Kr,Qr,Ur,Xr,Yr,re,ee,te),ne=S({prop:"position"}),ie=v({key:"zIndices"}),pe=S({prop:"zIndex",themeGet:ie}),ae=S({prop:"top",themeGet:R}),ue=S({prop:"right",themeGet:R}),de=S({prop:"bottom",themeGet:R}),fe=S({prop:"left",themeGet:R}),le=w(ne,pe,ae,ue,de,fe),se=v({key:"fonts"}),ge=S({prop:"fontFamily",themeGet:se}),me=v({key:"fontSizes",defaultVariants:[0,12,14,16,20,24,32,48,64,72],transform:d}),ce=S({prop:"fontSize",themeGet:me}),he=v({key:"lineHeights"}),ye=S({prop:"lineHeight",themeGet:he}),be=v({key:"fontWeights"}),ve=S({prop:"fontWeight",themeGet:be}),Ge=S({prop:"textAlign"}),xe=v({key:"letterSpacings",transform:d}),ke=S({prop:"letterSpacing",themeGet:xe}),we=S({prop:"color",themeGet:A}),Se=S({prop:"textTransform"}),Ae=w(ge,ce,ye,ve,Ge,ke,we,Se),Re=w(E,W,ir,jr,oe,hr,le,$r,Ae),Ce=function(r){return function(e){return u(e,r)}};Ce.color=A,Ce.px=R,Ce.percent=C,Ce.radius=j,Ce.border=V,Ce.borderWidth=X,Ce.borderStyle=rr,Ce.shadow=or,Ce.size=pr,Ce.zIndex=ie,Ce.space=Tr,Ce.font=se,Ce.fontSize=me,Ce.lineHeight=he,Ce.fontWeight=be,Ce.letterSpacing=xe,Ce.transition=B;var je=function(r,e){return function(t){var o=s(t),n=h(o,r);return null===n?e:[g(n)+" {",e,"}"]}},Te=function(r,e){return function(t){var o=s(t),n=y(o,r);return null===n?null:[m(n)+" {",e,"}"]}};r.alignContent=br,r.alignItems=yr,r.alignSelf=Rr,r.background=L,r.backgroundColor=O,r.backgroundImage=M,r.backgroundPosition=H,r.backgroundRepeat=F,r.backgroundSize=I,r.backgrounds=E,r.basics=W,r.between=function(r,e,t){return function(o){var n=s(o),i=h(n,r),p=y(n,e);return null!==i&&null!==p?[c(i,p)+" {",t,"}"]:null===p?je(r,t)(o):null===i?Te(e,t)(o):null}},r.border=D,r.borderBottom=q,r.borderBottomColor=J,r.borderColor=U,r.borderLeft=K,r.borderLeftColor=Q,r.borderRadius=tr,r.borderRight=_,r.borderRightColor=Z,r.borderStyle=er,r.borderTop=N,r.borderTopColor=$,r.borderWidth=Y,r.borders=ir,r.bottom=de,r.boxShadow=nr,r.breakpoints=function(r){return function(e){for(var t=[],o=Object.keys(r),n=o.length,i=0;i<n;i++){var p=o[i],a=r[p],u=je(p,a)(e);Array.isArray(u)?u.forEach(function(r){return t.push(r)}):t.push(u)}return t}},r.color=we,r.compose=w,r.display=ar,r.down=Te,r.flex=Sr,r.flexBasis=kr,r.flexDirection=wr,r.flexWrap=xr,r.flexboxes=jr,r.fontFamily=ge,r.fontSize=ce,r.fontWeight=ve,r.getBorder=V,r.getBorderStyle=rr,r.getBorderWidth=X,r.getColor=A,r.getFont=se,r.getFontSize=me,r.getFontWeight=be,r.getLetterSpacing=xe,r.getLineHeight=he,r.getPercent=C,r.getPx=R,r.getRadius=j,r.getShadow=or,r.getSize=pr,r.getSpace=Tr,r.getTransition=B,r.getZIndex=ie,r.gridArea=te,r.gridAutoColumns=Ur,r.gridAutoFlow=Qr,r.gridAutoRows=Xr,r.gridColumn=Jr,r.gridColumnGap=Zr,r.gridGap=_r,r.gridRow=Kr,r.gridRowGap=qr,r.gridTemplateAreas=ee,r.gridTemplateColumns=Yr,r.gridTemplateRows=re,r.grids=oe,r.height=dr,r.justifyContent=vr,r.justifyItems=Gr,r.justifySelf=Ar,r.layout=hr,r.left=fe,r.letterSpacing=ke,r.lineHeight=ye,r.margin=Pr,r.marginBottom=Wr,r.marginLeft=Lr,r.marginRight=zr,r.marginTop=Br,r.maxHeight=lr,r.maxWidth=fr,r.merge=a,r.minHeight=gr,r.minWidth=sr,r.mx=Or,r.my=Mr,r.opacity=T,r.order=Cr,r.overflow=P,r.padding=Ir,r.paddingBottom=Er,r.paddingLeft=Vr,r.paddingRight=Fr,r.paddingTop=Hr,r.position=ne,r.positioning=le,r.px=Dr,r.py=Nr,r.right=ue,r.size=mr,r.space=$r,r.style=S,r.system=Re,r.textAlign=Ge,r.textTransform=Se,r.th=Ce,r.themeGetter=v,r.top=ae,r.transition=z,r.typography=Ae,r.up=je,r.variant=function(r){var e=r.key,t=void 0===e?null:e,n=r.default,i=r.variants,p=void 0===i?{}:i,d=r.prop,f=void 0===d?"variant":d;return function(r){var e=o(t)?u(r,t):null,i=a(p,e),d=void 0!==r[f]?r[f]:n;return u(r,d,i)}},r.verticalAlign=cr,r.width=ur,r.zIndex=pe,Object.defineProperty(r,"__esModule",{value:!0})}); | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r=r||self).xstyledSystem={})}(this,function(r){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e=function(r,e){return r(e={exports:{}},e.exports),e.exports}(function(r,e){var t;t=function(){var r=function(r){return function(r){return!!r&&"object"==typeof r}(r)&&!function(r){var t=Object.prototype.toString.call(r);return"[object RegExp]"===t||"[object Date]"===t||function(r){return r.$$typeof===e}(r)}(r)},e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function t(r,e){return!1!==e.clone&&e.isMergeableObject(r)?i((t=r,Array.isArray(t)?[]:{}),r,e):r;var t}function o(r,e,o){return r.concat(e).map(function(r){return t(r,o)})}function n(r,e,o){var n={};return o.isMergeableObject(r)&&Object.keys(r).forEach(function(e){n[e]=t(r[e],o)}),Object.keys(e).forEach(function(p){o.isMergeableObject(e[p])&&r[p]?n[p]=function(r,e){if(!e.customMerge)return i;var t=e.customMerge(r);return"function"==typeof t?t:i}(p,o)(r[p],e[p],o):n[p]=t(e[p],o)}),n}function i(e,i,p){(p=p||{}).arrayMerge=p.arrayMerge||o,p.isMergeableObject=p.isMergeableObject||r;var a=Array.isArray(i);return a===Array.isArray(e)?a?p.arrayMerge(e,i,p):n(e,i,p):t(i,p)}return i.all=function(r,e){if(!Array.isArray(r))throw new Error("first argument should be an array");return r.reduce(function(r,t){return i(r,t,e)},{})},i},r.exports=t()}),t=function(r){return r},o=function(r){return null!=r},n=function(r){return"number"==typeof r&&!Number.isNaN(r)},i=function(r){return"string"==typeof r&&""!==r},p=function(r){return"object"==typeof r&&null!==r},a=function(r,t){return o(t)?e(r,t,{clone:!1}):r},u=function(r,e,t){return void 0===t&&(t=r.theme),function r(e){if("function"!=typeof e)return e;for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];var i=e.apply(void 0,o);return r.apply(void 0,[i].concat(o))}(function(r,e){for(var t=String(e).split("."),n=t.length,i=r,p=0;p<n;p+=1){if(void 0===i)return i;var a=t[p];i=o(i[a])?i[a]:void 0}return i}(t,e),r)},d=function(r){return function(e){return n(e)&&0!==e?""+e+r:e}}("px"),f=function(r){return 0!==r&&r>=-1&&r<=1?100*r+"%":d(r)},s={xs:0,sm:576,md:768,lg:992,xl:1200};function l(r){var e=u(r,"breakpoints");return o(e)?e:s}var g=function(r){return"@media (min-width: "+r+")"},m=function(r){return"@media (max-width: "+r+")"},c=function(r,e){return"@media (min-width: "+r+") and (max-width: "+e+")"},h=function(r,e){var t=r[e];return 0===t?null:d(t)},y=function(r,e){var t=r[e];return 0===t?null:d(t-.02)},b={},v=function(r){var e=r.transform,t=r.key,n=r.defaultVariants;return function(r){return function(i){var p=o(t)?u(i,t):null;p=o(p)?p:n;var a=o(p)?u(i,r,p):null,d=o(a)?a:r;return e?(b.rawValue=r,b.variants=p,e(d,b)):d}}};function G(r,e,t,o){var p=o(e)(t);if(i(p)||n(p)){for(var a={},u=0;u<r.length;u++)a[r[u]]=p;return a}return null}function x(r,e,t){return r.meta={props:e,getStyle:r,generators:t},r}function k(r,e,n){return function(i){var u=i[r];if(!o(u))return null;var d=G(e,u,i,n);return null!==d?d:p(u)?function(r,e,o){void 0===o&&(o=t);for(var n=l(r),i=Object.keys(e),p={},u=0;u<i.length;u++){var d=i[u],f=o(e[d]);if(null!==f){var s,m=h(n,d);p=a(p,null===m?f:((s={})[g(m)]=f,s))}}return p}(i,u,function(r){return G(e,r,i,n)}):null}}function w(){for(var r=[],e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.forEach(function(e){e&&(e.meta.generators?r=[].concat(r,e.meta.generators):r.push(e))});var n=function(r){for(var e={},t=0;t<r.length;t++){var o=r[t];if(o&&o.meta)for(var n=Object.keys(o.meta.props),i=0;i<n.length;i++)e[o.meta.props[n[i]]]=o}return e}(r);return x(function(r){for(var e=Object.keys(r),t=e.length,o={},i=0;i<t;i++){var p=e[i],u=n[p];u&&(o=a(o,u.meta.getStyle(r)))}return o},r.reduce(function(r,e){return[].concat(r,e.meta.props)},[]),t)}function S(r){var e=r.prop,t=r.cssProperty,o=r.key,n=void 0===o?null:o,i=r.transform,p=void 0===i?null:i,a=r.themeGet,u=void 0===a?null:a,d=Array.isArray(t)?t:[t||e];return Array.isArray(e)?w.apply(void 0,e.map(function(r){return S({prop:r,cssProperty:d,key:n,transform:p,themeGet:u})})):(u=u||v({key:n,transform:p}),x(k(e,d,u),[e]))}var A=v({key:"colors"}),R=v({transform:d}),C=v({transform:f}),j=v({key:"radii",transform:d}),T=S({prop:"opacity"}),P=S({prop:"overflow"}),B=v({key:"transitions"}),z=S({prop:"transition",themeGet:B}),W=w(T,P,z),L=S({prop:"background"}),O=S({prop:"backgroundColor",themeGet:A}),M=S({prop:"backgroundImage"}),I=S({prop:"backgroundSize"}),H=S({prop:"backgroundPosition"}),F=S({prop:"backgroundRepeat"}),E=w(L,O,M,I,H,F),V=v({key:"borders",transform:function(r){return n(r)&&r>0?r+"px solid":r}}),D=S({prop:"border",themeGet:V}),N=S({prop:"borderTop",themeGet:V}),$=S({prop:"borderTopColor",themeGet:A}),_=S({prop:"borderRight",themeGet:V}),Z=S({prop:"borderRightColor",themeGet:A}),q=S({prop:"borderBottom",themeGet:V}),J=S({prop:"borderBottomColor",themeGet:A}),K=S({prop:"borderLeft",themeGet:V}),Q=S({prop:"borderLeftColor",themeGet:A}),U=S({prop:"borderColor",themeGet:A}),X=v({key:"borderWidths",transform:d}),Y=S({prop:"borderWidth",themeGet:X}),rr=v({key:"borderStyles"}),er=S({prop:"borderStyle",themeGet:rr}),tr=S({prop:"borderRadius",themeGet:j}),or=v({key:"shadows"}),nr=S({prop:"boxShadow",themeGet:or}),ir=w(D,N,$,_,Z,q,J,K,Q,U,Y,er,tr,nr),pr=v({transform:f,key:"sizes"}),ar=S({prop:"display"}),ur=S({prop:"width",themeGet:pr}),dr=S({prop:"height",themeGet:pr}),fr=S({prop:"maxWidth",themeGet:pr}),sr=S({prop:"maxHeight",themeGet:pr}),lr=S({prop:"minWidth",themeGet:pr}),gr=S({prop:"minHeight",themeGet:pr}),mr=S({prop:"size",cssProperty:["width","height"],themeGet:pr}),cr=S({prop:"verticalAlign"}),hr=w(ar,ur,dr,fr,sr,lr,gr,mr,cr),yr=S({prop:"alignItems"}),br=S({prop:"alignContent"}),vr=S({prop:"justifyContent"}),Gr=S({prop:"justifyItems"}),xr=S({prop:"flexWrap"}),kr=S({prop:"flexBasis",themeGet:C}),wr=S({prop:"flexDirection"}),Sr=S({prop:"flex"}),Ar=S({prop:"justifySelf"}),Rr=S({prop:"alignSelf"}),Cr=S({prop:"order"}),jr=w(ar,yr,br,vr,Gr,xr,kr,wr,Sr,Ar,Rr,Cr),Tr=v({key:"space",defaultVariants:[0,4,8,16,24,48,96,144,192,240],transform:function(r,e){var t=e.rawValue,o=e.variants;if(!n(t))return o[t]||t;var i,p=Math.abs(t),a=n(i=t)&&i<0,u=o[p]||p;return n(u)?d(u*(a?-1:1)):d(a?"-"+u:u)}}),Pr=S({prop:["margin","m"],cssProperty:"margin",themeGet:Tr}),Br=S({prop:["marginTop","mt"],cssProperty:"marginTop",themeGet:Tr}),zr=S({prop:["marginRight","mr"],cssProperty:"marginRight",themeGet:Tr}),Wr=S({prop:["marginBottom","mb"],cssProperty:"marginBottom",themeGet:Tr}),Lr=S({prop:["marginLeft","ml"],cssProperty:"marginLeft",themeGet:Tr}),Or=S({prop:"mx",cssProperty:["marginRight","marginLeft"],themeGet:Tr}),Mr=S({prop:"my",cssProperty:["marginTop","marginBottom"],themeGet:Tr}),Ir=S({prop:["padding","p"],cssProperty:"padding",themeGet:Tr}),Hr=S({prop:["paddingTop","pt"],cssProperty:"paddingTop",themeGet:Tr}),Fr=S({prop:["paddingRight","pr"],cssProperty:"paddingRight",themeGet:Tr}),Er=S({prop:["paddingBottom","pb"],cssProperty:"paddingBottom",themeGet:Tr}),Vr=S({prop:["paddingLeft","pl"],cssProperty:"paddingLeft",themeGet:Tr}),Dr=S({prop:"px",cssProperty:["paddingRight","paddingLeft"],themeGet:Tr}),Nr=S({prop:"py",cssProperty:["paddingTop","paddingBottom"],themeGet:Tr}),$r=w(Pr,Br,zr,Wr,Lr,Or,Mr,Ir,Hr,Fr,Er,Vr,Dr,Nr),_r=S({prop:"gridGap",themeGet:Tr}),Zr=S({prop:"gridColumnGap",themeGet:Tr}),qr=S({prop:"gridRowGap",themeGet:Tr}),Jr=S({prop:"gridColumn"}),Kr=S({prop:"gridRow"}),Qr=S({prop:"gridAutoFlow"}),Ur=S({prop:"gridAutoColumns"}),Xr=S({prop:"gridAutoRows"}),Yr=S({prop:"gridTemplateColumns"}),re=S({prop:"gridTemplateRows"}),ee=S({prop:"gridTemplateAreas"}),te=S({prop:"gridArea"}),oe=w(_r,Zr,qr,Jr,Kr,Qr,Ur,Xr,Yr,re,ee,te),ne=S({prop:"position"}),ie=v({key:"zIndices"}),pe=S({prop:"zIndex",themeGet:ie}),ae=S({prop:"top",themeGet:R}),ue=S({prop:"right",themeGet:R}),de=S({prop:"bottom",themeGet:R}),fe=S({prop:"left",themeGet:R}),se=w(ne,pe,ae,ue,de,fe),le=v({key:"fonts"}),ge=S({prop:"fontFamily",themeGet:le}),me=v({key:"fontSizes",defaultVariants:[0,12,14,16,20,24,32,48,64,72],transform:d}),ce=S({prop:"fontSize",themeGet:me}),he=v({key:"lineHeights"}),ye=S({prop:"lineHeight",themeGet:he}),be=v({key:"fontWeights"}),ve=S({prop:"fontWeight",themeGet:be}),Ge=S({prop:"textAlign"}),xe=v({key:"letterSpacings",transform:d}),ke=S({prop:"letterSpacing",themeGet:xe}),we=S({prop:"color",themeGet:A}),Se=S({prop:"textTransform"}),Ae=w(ge,ce,ye,ve,Ge,ke,we,Se),Re=w(E,W,ir,jr,oe,hr,se,$r,Ae),Ce=function(r){return function(e){return u(e,r)}};Ce.color=A,Ce.px=R,Ce.percent=C,Ce.radius=j,Ce.border=V,Ce.borderWidth=X,Ce.borderStyle=rr,Ce.shadow=or,Ce.size=pr,Ce.zIndex=ie,Ce.space=Tr,Ce.font=le,Ce.fontSize=me,Ce.lineHeight=he,Ce.fontWeight=be,Ce.letterSpacing=xe,Ce.transition=B;var je=function(r,e){return function(t){var o=l(t),n=h(o,r);return null===n?e:[g(n)+" {",e,"}"]}},Te=function(r,e){return function(t){var o=l(t),n=y(o,r);return null===n?null:[m(n)+" {",e,"}"]}};r.alignContent=br,r.alignItems=yr,r.alignSelf=Rr,r.background=L,r.backgroundColor=O,r.backgroundImage=M,r.backgroundPosition=H,r.backgroundRepeat=F,r.backgroundSize=I,r.backgrounds=E,r.basics=W,r.between=function(r,e,t){return function(o){var n=l(o),i=h(n,r),p=y(n,e);return null===p?je(r,t)(o):null===i?Te(e,t)(o):[c(i,p)+" {",t,"}"]}},r.border=D,r.borderBottom=q,r.borderBottomColor=J,r.borderColor=U,r.borderLeft=K,r.borderLeftColor=Q,r.borderRadius=tr,r.borderRight=_,r.borderRightColor=Z,r.borderStyle=er,r.borderTop=N,r.borderTopColor=$,r.borderWidth=Y,r.borders=ir,r.bottom=de,r.boxShadow=nr,r.breakpoints=function(r){return function(e){for(var t=[],o=Object.keys(r),n=o.length,i=0;i<n;i++){var p=o[i],a=r[p],u=je(p,a)(e);Array.isArray(u)?u.forEach(function(r){return t.push(r)}):t.push(u)}return t}},r.color=we,r.compose=w,r.display=ar,r.down=Te,r.flex=Sr,r.flexBasis=kr,r.flexDirection=wr,r.flexWrap=xr,r.flexboxes=jr,r.fontFamily=ge,r.fontSize=ce,r.fontWeight=ve,r.getBorder=V,r.getBorderStyle=rr,r.getBorderWidth=X,r.getColor=A,r.getFont=le,r.getFontSize=me,r.getFontWeight=be,r.getLetterSpacing=xe,r.getLineHeight=he,r.getPercent=C,r.getPx=R,r.getRadius=j,r.getShadow=or,r.getSize=pr,r.getSpace=Tr,r.getTransition=B,r.getZIndex=ie,r.gridArea=te,r.gridAutoColumns=Ur,r.gridAutoFlow=Qr,r.gridAutoRows=Xr,r.gridColumn=Jr,r.gridColumnGap=Zr,r.gridGap=_r,r.gridRow=Kr,r.gridRowGap=qr,r.gridTemplateAreas=ee,r.gridTemplateColumns=Yr,r.gridTemplateRows=re,r.grids=oe,r.height=dr,r.justifyContent=vr,r.justifyItems=Gr,r.justifySelf=Ar,r.layout=hr,r.left=fe,r.letterSpacing=ke,r.lineHeight=ye,r.margin=Pr,r.marginBottom=Wr,r.marginLeft=Lr,r.marginRight=zr,r.marginTop=Br,r.maxHeight=sr,r.maxWidth=fr,r.merge=a,r.minHeight=gr,r.minWidth=lr,r.mx=Or,r.my=Mr,r.opacity=T,r.order=Cr,r.overflow=P,r.padding=Ir,r.paddingBottom=Er,r.paddingLeft=Vr,r.paddingRight=Fr,r.paddingTop=Hr,r.position=ne,r.positioning=se,r.px=Dr,r.py=Nr,r.right=ue,r.size=mr,r.space=$r,r.style=S,r.system=Re,r.textAlign=Ge,r.textTransform=Se,r.th=Ce,r.themeGetter=v,r.top=ae,r.transition=z,r.typography=Ae,r.up=je,r.variant=function(r){var e=r.key,t=void 0===e?null:e,n=r.default,i=r.variants,p=void 0===i?{}:i,d=r.prop,f=void 0===d?"variant":d;return function(r){var e=o(t)?u(r,t):null,i=a(p,e),d=void 0!==r[f]?r[f]:n;return u(r,d,i)}},r.verticalAlign=cr,r.width=ur,r.zIndex=pe,Object.defineProperty(r,"__esModule",{value:!0})}); |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.system = {})); | ||
(global = global || self, factory(global.xstyledSystem = {})); | ||
}(this, function (exports) { 'use strict'; | ||
@@ -1125,10 +1125,5 @@ | ||
var max = getBreakpointMax(breakpoints, upper); | ||
if (min !== null && max !== null) { | ||
return [mediaBetweenWidth(min, max) + " {", rules, '}']; | ||
} | ||
if (max === null) return up(lower, rules)(props); | ||
if (min === null) return down(upper, rules)(props); | ||
return null; | ||
return [mediaBetweenWidth(min, max) + " {", rules, '}']; | ||
}; | ||
@@ -1135,0 +1130,0 @@ }; |
{ | ||
"name": "@xstyled/system", | ||
"description": "Modern style system for styled-components & emotion.", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"keywords": [ | ||
@@ -29,3 +29,3 @@ "emotion", | ||
}, | ||
"gitHead": "698119af3c098d8c24eed8b4ae47edc6914de182" | ||
"gitHead": "ec3a79561f3ea17075d2e7ce073d25ca08817f46" | ||
} |
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
95728
3306