Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xstyled/system

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xstyled/system - npm Package Compare versions

Comparing version 1.15.1 to 1.16.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [1.16.0](https://github.com/smooth-code/xstyled/tree/master/packages/system/compare/v1.15.1...v1.16.0) (2020-02-02)
**Note:** Version bump only for package @xstyled/system
## [1.15.1](https://github.com/smooth-code/xstyled/tree/master/packages/system/compare/v1.15.0...v1.15.1) (2019-12-29)

@@ -8,0 +16,0 @@

2

dist/xstyled-system.min.js

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).xstyledSystem={})}(this,(function(e){"use strict";var r=function(e){return e},t=function(e){return null!=e},o=function(e){return"number"==typeof e&&!Number.isNaN(e)},n=function(e){return"string"==typeof e&&""!==e},i=function(e){return"object"==typeof e&&null!==e},p=function(e,r){if(!t(r))return e;for(var o in r)e[o]=r[o];return e},a=function e(r,o){if(!t(o))return r;for(var n in o)i(r[n])?r[n]=e(p({},r[n]),o[n]):r[n]=o[n];return r};var u=function(e,r,o){return void 0===o&&(o=e.theme),function e(r,t){return"function"==typeof r?e(r(t),t):r}(function(e,r){for(var o=String(r).split("."),n=o.length,i=e,p=0;p<n;p+=1){if(void 0===i)return i;var a=o[p];i=t(i[a])?i[a]:void 0}return i}(o,r),e)};var m=function(e){return Math.round(e*Math.pow(10,4))/Math.pow(10,4)},f=function(e){return function(r){return o(r)&&0!==r?""+r+e:r}}("px"),s=function(e){return m(e/16)},d=function(e){return o(e)&&0!==e?s(e)+"rem":e},l=function(e){if(!n(e)||e.length<4)return e;if("rpx"!==e.slice(-3))return e;var r=Number(e.slice(0,e.length-3));return 0===r?0:s(r)+"rem"},g={xs:0,sm:576,md:768,lg:992,xl:1200};function c(e){var r=u(e,"breakpoints");return t(r)?r:g}var h=function(e){return e?"@media (min-width: "+e+")":null},y=function(e){return e?"@media (max-width: "+e+")":null},v=function(e,r){return"@media (min-width: "+e+") and (max-width: "+r+")"},b=function(e,r){var t=e[r];return 0===t?null:f(t)},G=function(e,r){var t=e[r];return 0===t?null:f(t-.02)},x="undefined"!=typeof Map&&"undefined"!=typeof WeakMap,w=x?new WeakMap:null;var k={has:function(){return!1},set:function(){},get:function(){}};function S(e,r){if(!x||!e)return k;var t=function(e){if(w.has(e))return w.get(e);var r={};return w.set(e,r),r}(e);return t[r]=t[r]||new Map,t[r]}var C=0,R=function(e){var r=e.name,i=e.transform,p=e.key,a=e.defaultVariants,m=e.compose,f=C++,s=function(e){return function(s){var d=e;if(!n(e)&&!o(e))return d;var l=S(s.theme,"__themeGetter"+f);if(l.has(e))return l.get(e);var g=t(p)?u(s,p):null;g=t(g)?g:a,d=t(g)?u(s,e,g):null,d=t(d)?d:e;var c=(r&&s.theme&&s.theme.transformers?s.theme.transformers[r]:null)||i;return c&&(d=c(d,{rawValue:e,variants:g,props:s})),d=m?m(d)(s):d,l.set(e,d),d}};return s.meta={name:r,transform:i},s};function W(e,r,t,p,a){if(i(r))return null;if(a.has(r))return a.get(r);var u=p(r)(t);if(!n(u)&&!o(u))return null;var m={};for(var f in e)m[e[f]]=u;return a.set(r,m),m}function P(e,r,t){return e.meta={props:r,getStyle:e,generators:t},e}function T(e){var r=c(e),t={};for(var o in r)t[o]=h(b(r,o));return t}function A(e,t,o,n){void 0===o&&(o=r);var i=n?function(e,r){if(r.has("_medias"))return r.get("_medias");var t=T(e);return r.set("_medias",t),t}(e,n):T(e),u={};for(var m in t){var f=o(t[m]);if(null!==f){var s=i[m];null===s?u=a(u,f):u[s]=u[s]?p(u[s],f):f}}return u}function B(){for(var e=[],r=arguments.length,t=new Array(r),o=0;o<r;o++)t[o]=arguments[o];t.forEach((function(r){r&&(r.meta.generators?e=[].concat(e,r.meta.generators):e.push(r))}));var n=function(e){for(var r={},t=0;t<e.length;t++){var o=e[t];if(o&&o.meta)for(var n=Object.keys(o.meta.props),i=0;i<n.length;i++){r[o.meta.props[n[i]]]=o}}return r}(e);return P((function(e){var r={};for(var t in e){var o=n[t];if(o){var i=o.meta.getStyle(e);a(r,i)}}return r}),e.reduce((function(e,r){return[].concat(e,r.meta.props)}),[]),t)}function z(e){var r=e.prop,o=e.cssProperty,n=e.key,p=void 0===n?null:n,a=e.transform,u=void 0===a?null:a,m=e.themeGet,f=void 0===m?null:m,s=Array.isArray(o)?o:[o||r];return Array.isArray(r)?B.apply(void 0,r.map((function(e){return z({prop:e,cssProperty:s,key:p,transform:u,themeGet:f})}))):(f=f||R({key:p,transform:u}),P(function(e,r,o){return function(n){var p=n[e];if(!t(p))return null;var a=S(n.theme,e);return i(p)?A(n,p,(function(e){return W(r,e,n,o,a)}),a):W(r,p,n,o,a)}}(r,s,f),[r]))}var j=R({name:"color",key:"colors"}),L=R({name:"px",transform:function(e){return f(l(e))}}),I=R({name:"percent",transform:function(e){return 0!==e&&e>=-1&&e<=1?m(100*e)+"%":e},compose:L}),H=R({name:"radius",key:"radii",compose:L}),M=R({name:"transition",key:"transitions"}),O=z({prop:"opacity"}),F=z({prop:"overflow"}),_=z({prop:"transition",themeGet:M}),N=B(O,F,_),V=z({prop:"background"}),E=z({prop:"backgroundColor",themeGet:j}),D=z({prop:"backgroundImage"}),Z=z({prop:"backgroundSize"}),q=z({prop:"backgroundPosition"}),J=z({prop:"backgroundRepeat"}),K=B(V,E,D,Z,q,J),Q=R({name:"border",key:"borders",transform:function(e){return o(e)&&e>0?f(e)+" solid":e}}),U=R({name:"borderWidth",key:"borderWidths",compose:L}),X=R({name:"borderStyle",key:"borderStyles"}),Y=z({prop:"border",themeGet:Q}),$=z({prop:"borderTop",themeGet:Q}),ee=z({prop:"borderTopColor",themeGet:j}),re=z({prop:"borderRight",themeGet:Q}),te=z({prop:"borderRightColor",themeGet:j}),oe=z({prop:"borderBottom",themeGet:Q}),ne=z({prop:"borderBottomColor",themeGet:j}),ie=z({prop:"borderLeft",themeGet:Q}),pe=z({prop:"borderLeftColor",themeGet:j}),ae=z({prop:"borderColor",themeGet:j}),ue=z({prop:"borderWidth",themeGet:U}),me=z({prop:"borderStyle",themeGet:X}),fe=z({prop:"borderRadius",themeGet:H}),se=B(Y,$,ee,re,te,oe,ne,ie,pe,ae,ue,me,fe),de=R({name:"size",key:"sizes",compose:I}),le=z({prop:"display"}),ge=z({prop:"width",themeGet:de}),ce=z({prop:"height",themeGet:de}),he=z({prop:"maxWidth",themeGet:de}),ye=z({prop:"maxHeight",themeGet:de}),ve=z({prop:"minWidth",themeGet:de}),be=z({prop:"minHeight",themeGet:de}),Ge=z({prop:"size",cssProperty:["width","height"],themeGet:de}),xe=z({prop:"verticalAlign"}),we=B(le,ge,ce,he,ye,ve,be,Ge,xe),ke=z({prop:"alignItems"}),Se=z({prop:"alignContent"}),Ce=z({prop:"justifyContent"}),Re=z({prop:"justifyItems"}),We=z({prop:"flexWrap"}),Pe=z({prop:"flexBasis",themeGet:I}),Te=z({prop:"flexDirection"}),Ae=z({prop:"flex"}),Be=z({prop:"justifySelf"}),ze=z({prop:"alignSelf"}),je=z({prop:"order"}),Le=B(le,ke,Se,Ce,Re,We,Pe,Te,Ae,Be,ze,je);function Ie(e){return n(e)?"-"+e:-1*e}var He=R({name:"space",key:"space",defaultVariants:[0,4,8,16,24,48,96,144,192,240],compose:L,transform:function(e,r){var i=r.rawValue,p=r.variants,a=r.props;if(n(i)){var m=i.startsWith("-"),f=m?i.substr(1):i,s=u(a,f,p),d=t(s)?s:f;return m?Ie(d):d}var l,g=Math.abs(i),c=o(l=i)&&l<0,h=t(p[g])?p[g]:g;return c?Ie(h):h}}),Me=z({prop:["margin","m"],cssProperty:"margin",themeGet:He}),Oe=z({prop:["marginTop","mt"],cssProperty:"marginTop",themeGet:He}),Fe=z({prop:["marginRight","mr"],cssProperty:"marginRight",themeGet:He}),_e=z({prop:["marginBottom","mb"],cssProperty:"marginBottom",themeGet:He}),Ne=z({prop:["marginLeft","ml"],cssProperty:"marginLeft",themeGet:He}),Ve=z({prop:"mx",cssProperty:["marginRight","marginLeft"],themeGet:He}),Ee=z({prop:"my",cssProperty:["marginTop","marginBottom"],themeGet:He}),De=z({prop:["padding","p"],cssProperty:"padding",themeGet:He}),Ze=z({prop:["paddingTop","pt"],cssProperty:"paddingTop",themeGet:He}),qe=z({prop:["paddingRight","pr"],cssProperty:"paddingRight",themeGet:He}),Je=z({prop:["paddingBottom","pb"],cssProperty:"paddingBottom",themeGet:He}),Ke=z({prop:["paddingLeft","pl"],cssProperty:"paddingLeft",themeGet:He}),Qe=z({prop:"px",cssProperty:["paddingRight","paddingLeft"],themeGet:He}),Ue=z({prop:"py",cssProperty:["paddingTop","paddingBottom"],themeGet:He}),Xe=B(Me,Oe,Fe,_e,Ne,Ve,Ee,De,Ze,qe,Je,Ke,Qe,Ue),Ye=z({prop:"gridGap",themeGet:He}),$e=z({prop:"gridColumnGap",themeGet:He}),er=z({prop:"gridRowGap",themeGet:He}),rr=z({prop:"gridColumn"}),tr=z({prop:"gridRow"}),or=z({prop:"gridAutoFlow"}),nr=z({prop:"gridAutoColumns"}),ir=z({prop:"gridAutoRows"}),pr=z({prop:"gridTemplateColumns"}),ar=z({prop:"gridTemplateRows"}),ur=z({prop:"gridTemplateAreas"}),mr=z({prop:"gridArea"}),fr=B(Ye,$e,er,rr,tr,or,nr,ir,pr,ar,ur,mr),sr=R({name:"zIndex",key:"zIndices"}),dr=z({prop:"position"}),lr=z({prop:"zIndex",themeGet:sr}),gr=z({prop:"top",themeGet:L}),cr=z({prop:"right",themeGet:L}),hr=z({prop:"bottom",themeGet:L}),yr=z({prop:"left",themeGet:L}),vr=B(dr,lr,gr,cr,hr,yr),br=R({name:"shadow",key:"shadows"}),Gr=z({prop:"boxShadow",themeGet:br}),xr=z({prop:"textShadow",themeGet:br}),wr=B(Gr,xr),kr=R({name:"font",key:"fonts"}),Sr=R({name:"lineHeight",key:"lineHeights",transform:l}),Cr=R({name:"fontWeight",key:"fontWeights"}),Rr=R({name:"letterSpacing",key:"letterSpacings",compose:L}),Wr=z({prop:"fontFamily",themeGet:kr}),Pr=R({name:"fontSize",key:"fontSizes",defaultVariants:[0,12,14,16,20,24,32,48,64,72],compose:L}),Tr=z({prop:"fontSize",themeGet:Pr}),Ar=z({prop:"lineHeight",themeGet:Sr}),Br=z({prop:"fontWeight",themeGet:Cr}),zr=z({prop:"textAlign"}),jr=z({prop:"letterSpacing",themeGet:Rr}),Lr=z({prop:"color",themeGet:j}),Ir=z({prop:"textTransform"}),Hr=B(Wr,Tr,Ar,Br,zr,jr,Lr,Ir);function Mr(){return(Mr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}var Or=P((function(){return{boxSizing:"border-box",flexGrow:1,flexWrap:"wrap",display:"flex"}}),["row"]);function Fr(e,r){if(!0===r)return{flexBasis:0,flexGrow:1,maxWidth:"100%"};if("auto"===r)return{flex:"0 0 auto",maxWidth:"none",width:"auto"};var t=I(r)(e);return{flex:"0 0 "+t,maxWidth:t}}var _r=P((function(e){var r=e.col,t={boxSizing:"border-box",flexBasis:0,flexGrow:1,maxWidth:"100%"};return i(r)?Mr({},t,{},A(e,r,(function(r){return Fr(e,r)}))):Mr({},t,{},Fr(e,r))}),["col"]),Nr=B(Or,_r),Vr=B(K,N,se,Le,fr,we,vr,wr,Xe,Hr,Nr),Er=function(e){return function(r){return u(r,e)}};[j,L,I,H,Q,U,X,br,de,sr,He,kr,Pr,Sr,Cr,Rr,M].forEach((function(e){Er[e.meta.name]=e}));var Dr=function(e,r){return function(t){var o=c(t),n=b(o,e);return null===n?r:[h(n)+" {",r,"}"]}},Zr=function(e,r){return function(t){var o=c(t),n=G(o,e);return null===n?null:[y(n)+" {",r,"}"]}},qr={px:function(e){return d(l(e))},border:function(e){return o(e)&&e>0?d(e)+" solid":e}};e.alignContent=Se,e.alignItems=ke,e.alignSelf=ze,e.background=V,e.backgroundColor=E,e.backgroundImage=D,e.backgroundPosition=q,e.backgroundRepeat=J,e.backgroundSize=Z,e.backgrounds=K,e.basics=N,e.between=function(e,r,t){return function(o){var n=c(o),i=b(n,e),p=G(n,r);return null===p?Dr(e,t)(o):null===i?Zr(r,t)(o):[v(i,p)+" {",t,"}"]}},e.border=Y,e.borderBottom=oe,e.borderBottomColor=ne,e.borderColor=ae,e.borderLeft=ie,e.borderLeftColor=pe,e.borderRadius=fe,e.borderRight=re,e.borderRightColor=te,e.borderStyle=me,e.borderTop=$,e.borderTopColor=ee,e.borderWidth=ue,e.borders=se,e.bottom=hr,e.boxShadow=Gr,e.breakpoints=function(e){return function(r){for(var t=[],o=Object.keys(e),n=o.length,i=0;i<n;i++){var p=o[i],a=e[p],u=Dr(p,a)(r);Array.isArray(u)?u.forEach((function(e){return t.push(e)})):t.push(u)}return t}},e.col=_r,e.color=Lr,e.compose=B,e.createStyleGenerator=P,e.createSystemComponent=function(e,r,t){var o=e.createElement,n=e.forwardRef;void 0===r&&(r="div"),void 0===t&&(t=Vr);var i=n((function(e,n){var i=e.as,p=function(e,r){var t={};for(var o in e)-1===r.indexOf(o)&&(t[o]=e[o]);return t}(function(e,r){if(null==e)return{};var t,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,["as"]),t.meta.props);return o(i||r,Mr({ref:n},p))}));return i.displayName="SystemComponent",i},e.display=le,e.down=Zr,e.flex=Ae,e.flexBasis=Pe,e.flexDirection=Te,e.flexWrap=We,e.flexboxes=Le,e.fontFamily=Wr,e.fontSize=Tr,e.fontWeight=Br,e.getBorder=Q,e.getBorderStyle=X,e.getBorderWidth=U,e.getBreakpoints=c,e.getColor=j,e.getFont=kr,e.getFontSize=Pr,e.getFontWeight=Cr,e.getLetterSpacing=Rr,e.getLineHeight=Sr,e.getPercent=I,e.getPx=L,e.getRadius=H,e.getShadow=br,e.getSize=de,e.getSpace=He,e.getTransition=M,e.getZIndex=sr,e.gridArea=mr,e.gridAutoColumns=nr,e.gridAutoFlow=or,e.gridAutoRows=ir,e.gridColumn=rr,e.gridColumnGap=$e,e.gridGap=Ye,e.gridRow=tr,e.gridRowGap=er,e.gridTemplateAreas=ur,e.gridTemplateColumns=pr,e.gridTemplateRows=ar,e.grids=fr,e.height=ce,e.justifyContent=Ce,e.justifyItems=Re,e.justifySelf=Be,e.layout=we,e.left=yr,e.letterSpacing=jr,e.lineHeight=Ar,e.margin=Me,e.marginBottom=_e,e.marginLeft=Ne,e.marginRight=Fe,e.marginTop=Oe,e.maxHeight=ye,e.maxWidth=he,e.minHeight=be,e.minWidth=ve,e.mx=Ve,e.my=Ee,e.opacity=O,e.order=je,e.overflow=F,e.padding=De,e.paddingBottom=Je,e.paddingLeft=Ke,e.paddingRight=qe,e.paddingTop=Ze,e.position=dr,e.positioning=vr,e.px=Qe,e.py=Ue,e.reduceBreakpoints=A,e.right=cr,e.row=Or,e.rpxTransformers=qr,e.shadows=wr,e.size=Ge,e.space=Xe,e.style=z,e.system=Vr,e.textAlign=zr,e.textShadow=xr,e.textTransform=Ir,e.th=Er,e.themeGetter=R,e.top=gr,e.transition=_,e.typography=Hr,e.up=Dr,e.variant=function(e){var r=e.key,o=void 0===r?null:r,n=e.default,i=e.variants,m=void 0===i?{}:i,f=e.prop,s=void 0===f?"variant":f;return function(e){var r=t(o)?u(e,o):null,i=a(p({},m),r),f=void 0!==e[s]?e[s]:n;return u(e,f,i)}},e.verticalAlign=xe,e.width=ge,e.xgrids=Nr,e.zIndex=lr,Object.defineProperty(e,"__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";var e=function(r){return r},t=function(r){return null!=r},o=function(r){return"number"==typeof r&&!Number.isNaN(r)},n=function(r){return"string"==typeof r&&""!==r},i=function(r){return"object"==typeof r&&null!==r},a=function(r,e){if(!t(e))return r;for(var o in e)r[o]=e[o];return r},p=function r(e,o){if(!t(o))return e;for(var n in o)i(e[n])?e[n]=r(a({},e[n]),o[n]):e[n]=o[n];return e};var u=function(r,e,o){return void 0===o&&(o=r.theme),function r(e,t){return"function"==typeof e?r(e(t),t):e}(function(r,e){for(var o=String(e).split("."),n=o.length,i=r,a=0;a<n;a+=1){if(void 0===i)return i;var p=o[a];i=t(i[p])?i[p]:void 0}return i}(o,e),r)};var m=function(r){return Math.round(r*Math.pow(10,4))/Math.pow(10,4)},f=function(r){return function(e){return o(e)&&0!==e?""+e+r:e}}("px"),s=function(r){return m(r/16)},d=function(r){return o(r)&&0!==r?s(r)+"rem":r},l=function(r){if(!n(r)||r.length<4)return r;if("rpx"!==r.slice(-3))return r;var e=Number(r.slice(0,r.length-3));return 0===e?0:s(e)+"rem"},g={xs:0,sm:576,md:768,lg:992,xl:1200};function c(r){var e=u(r,"breakpoints");return t(e)?e:g}var h=function(r){return r?"@media (min-width: "+r+")":null},y=function(r){return r?"@media (max-width: "+r+")":null},v=function(r,e){return"@media (min-width: "+r+") and (max-width: "+e+")"},b=function(r,e){var t=r[e];return 0===t?null:f(t)},G=function(r,e){var t=r[e];return 0===t?null:f(t-.02)},x="undefined"!=typeof Map&&"undefined"!=typeof WeakMap,w=x?new WeakMap:null;var k={has:function(){return!1},set:function(){},get:function(){}};function S(r,e){if(!x||!r)return k;var t=function(r){if(w.has(r))return w.get(r);var e={};return w.set(r,e),e}(r);return t[e]=t[e]||new Map,t[e]}var C=0,R=function(r){var e=r.name,i=r.transform,a=r.key,p=r.defaultVariants,m=r.compose,f=C++,s=function(r){return function(s){var d=r;if(!n(r)&&!o(r))return d;var l=S(s.theme,"__themeGetter"+f);if(l.has(r))return l.get(r);var g=t(a)?u(s,a):null;g=t(g)?g:p,d=t(g)?u(s,r,g):null,d=t(d)?d:r;var c=(e&&s.theme&&s.theme.transformers?s.theme.transformers[e]:null)||i;return c&&(d=c(d,{rawValue:r,variants:g,props:s})),d=m?m(d)(s):d,l.set(r,d),d}};return s.meta={name:e,transform:i},s};function W(r,e,t,a,p){if(i(e))return null;if(p.has(e))return p.get(e);var u=a(e)(t);if(!n(u)&&!o(u))return null;var m={};for(var f in r)m[r[f]]=u;return p.set(e,m),m}function P(r,e,t){return r.meta={props:e,getStyle:r,generators:t},r}function T(r){var e=c(r),t={};for(var o in e)t[o]=h(b(e,o));return t}function A(r,t,o,n){void 0===o&&(o=e);var i=n?function(r,e){if(e.has("_medias"))return e.get("_medias");var t=T(r);return e.set("_medias",t),t}(r,n):T(r),u={};for(var m in t){var f=o(t[m]);if(null!==f){var s=i[m];null===s?u=p(u,f):u[s]=u[s]?a(u[s],f):f}}return u}function B(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}function z(){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=B(r);function i(r){var e={};for(var t in r){var o=n[t];if(o){var i=o.meta.getStyle(r);p(e,i)}}return e}var a=r.reduce((function(r,e){return[].concat(r,e.meta.props)}),[]);return P(i,a,t)}function j(r){var e=r.prop,o=r.cssProperty,n=r.key,a=void 0===n?null:n,p=r.transform,u=void 0===p?null:p,m=r.themeGet,f=void 0===m?null:m,s=Array.isArray(o)?o:[o||e];return Array.isArray(e)?z.apply(void 0,e.map((function(r){return j({prop:r,cssProperty:s,key:a,transform:u,themeGet:f})}))):(f=f||R({key:a,transform:u}),P(function(r,e,o){return function(n){var a=n[r];if(!t(a))return null;var p=S(n.theme,r);return i(a)?A(n,a,(function(r){return W(e,r,n,o,p)}),p):W(e,a,n,o,p)}}(e,s,f),[e]))}var L=R({name:"color",key:"colors"}),I=R({name:"px",transform:function(r){return f(l(r))}}),H=R({name:"percent",transform:function(r){return 0!==r&&r>=-1&&r<=1?m(100*r)+"%":r},compose:I}),M=R({name:"radius",key:"radii",compose:I}),O=R({name:"transition",key:"transitions"}),F=j({prop:"opacity"}),_=j({prop:"overflow"}),N=j({prop:"transition",themeGet:O}),V=z(F,_,N),E=j({prop:"background"}),D=j({prop:"backgroundColor",themeGet:L}),Z=j({prop:"backgroundImage"}),q=j({prop:"backgroundSize"}),J=j({prop:"backgroundPosition"}),K=j({prop:"backgroundRepeat"}),Q=z(E,D,Z,q,J,K),U=R({name:"border",key:"borders",transform:function(r){return o(r)&&r>0?f(r)+" solid":r}}),X=R({name:"borderWidth",key:"borderWidths",compose:I}),Y=R({name:"borderStyle",key:"borderStyles"}),$=j({prop:"border",themeGet:U}),rr=j({prop:"borderTop",themeGet:U}),er=j({prop:"borderTopColor",themeGet:L}),tr=j({prop:"borderRight",themeGet:U}),or=j({prop:"borderRightColor",themeGet:L}),nr=j({prop:"borderBottom",themeGet:U}),ir=j({prop:"borderBottomColor",themeGet:L}),ar=j({prop:"borderLeft",themeGet:U}),pr=j({prop:"borderLeftColor",themeGet:L}),ur=j({prop:"borderColor",themeGet:L}),mr=j({prop:"borderWidth",themeGet:X}),fr=j({prop:"borderStyle",themeGet:Y}),sr=j({prop:"borderRadius",themeGet:M}),dr=z($,rr,er,tr,or,nr,ir,ar,pr,ur,mr,fr,sr),lr=R({name:"size",key:"sizes",compose:H}),gr=j({prop:"display"}),cr=j({prop:"width",themeGet:lr}),hr=j({prop:"height",themeGet:lr}),yr=j({prop:"maxWidth",themeGet:lr}),vr=j({prop:"maxHeight",themeGet:lr}),br=j({prop:"minWidth",themeGet:lr}),Gr=j({prop:"minHeight",themeGet:lr}),xr=j({prop:"size",cssProperty:["width","height"],themeGet:lr}),wr=j({prop:"verticalAlign"}),kr=z(gr,cr,hr,yr,vr,br,Gr,xr,wr),Sr=j({prop:"alignItems"}),Cr=j({prop:"alignContent"}),Rr=j({prop:"justifyContent"}),Wr=j({prop:"justifyItems"}),Pr=j({prop:"flexWrap"}),Tr=j({prop:"flexBasis",themeGet:H}),Ar=j({prop:"flexDirection"}),Br=j({prop:"flex"}),zr=j({prop:"justifySelf"}),jr=j({prop:"alignSelf"}),Lr=j({prop:"order"}),Ir=z(gr,Sr,Cr,Rr,Wr,Pr,Tr,Ar,Br,zr,jr,Lr);function Hr(r){return n(r)?"-"+r:-1*r}var Mr=R({name:"space",key:"space",defaultVariants:[0,4,8,16,24,48,96,144,192,240],compose:I,transform:function(r,e){var i=e.rawValue,a=e.variants,p=e.props;if(n(i)){var m=i.startsWith("-"),f=m?i.substr(1):i,s=u(p,f,a),d=t(s)?s:f;return m?Hr(d):d}var l,g=Math.abs(i),c=o(l=i)&&l<0,h=t(a[g])?a[g]:g;return c?Hr(h):h}}),Or=j({prop:["margin","m"],cssProperty:"margin",themeGet:Mr}),Fr=j({prop:["marginTop","mt"],cssProperty:"marginTop",themeGet:Mr}),_r=j({prop:["marginRight","mr"],cssProperty:"marginRight",themeGet:Mr}),Nr=j({prop:["marginBottom","mb"],cssProperty:"marginBottom",themeGet:Mr}),Vr=j({prop:["marginLeft","ml"],cssProperty:"marginLeft",themeGet:Mr}),Er=j({prop:"mx",cssProperty:["marginRight","marginLeft"],themeGet:Mr}),Dr=j({prop:"my",cssProperty:["marginTop","marginBottom"],themeGet:Mr}),Zr=j({prop:["padding","p"],cssProperty:"padding",themeGet:Mr}),qr=j({prop:["paddingTop","pt"],cssProperty:"paddingTop",themeGet:Mr}),Jr=j({prop:["paddingRight","pr"],cssProperty:"paddingRight",themeGet:Mr}),Kr=j({prop:["paddingBottom","pb"],cssProperty:"paddingBottom",themeGet:Mr}),Qr=j({prop:["paddingLeft","pl"],cssProperty:"paddingLeft",themeGet:Mr}),Ur=j({prop:"px",cssProperty:["paddingRight","paddingLeft"],themeGet:Mr}),Xr=j({prop:"py",cssProperty:["paddingTop","paddingBottom"],themeGet:Mr}),Yr=z(Or,Fr,_r,Nr,Vr,Er,Dr,Zr,qr,Jr,Kr,Qr,Ur,Xr),$r=j({prop:"gridGap",themeGet:Mr}),re=j({prop:"gridColumnGap",themeGet:Mr}),ee=j({prop:"gridRowGap",themeGet:Mr}),te=j({prop:"gridColumn"}),oe=j({prop:"gridRow"}),ne=j({prop:"gridAutoFlow"}),ie=j({prop:"gridAutoColumns"}),ae=j({prop:"gridAutoRows"}),pe=j({prop:"gridTemplateColumns"}),ue=j({prop:"gridTemplateRows"}),me=j({prop:"gridTemplateAreas"}),fe=j({prop:"gridArea"}),se=z($r,re,ee,te,oe,ne,ie,ae,pe,ue,me,fe),de=R({name:"zIndex",key:"zIndices"}),le=j({prop:"position"}),ge=j({prop:"zIndex",themeGet:de}),ce=j({prop:"top",themeGet:I}),he=j({prop:"right",themeGet:I}),ye=j({prop:"bottom",themeGet:I}),ve=j({prop:"left",themeGet:I}),be=z(le,ge,ce,he,ye,ve),Ge=R({name:"shadow",key:"shadows"}),xe=j({prop:"boxShadow",themeGet:Ge}),we=j({prop:"textShadow",themeGet:Ge}),ke=z(xe,we),Se=R({name:"font",key:"fonts"}),Ce=R({name:"lineHeight",key:"lineHeights",transform:l}),Re=R({name:"fontWeight",key:"fontWeights"}),We=R({name:"letterSpacing",key:"letterSpacings",compose:I}),Pe=j({prop:"fontFamily",themeGet:Se}),Te=R({name:"fontSize",key:"fontSizes",defaultVariants:[0,12,14,16,20,24,32,48,64,72],compose:I}),Ae=j({prop:"fontSize",themeGet:Te}),Be=j({prop:"lineHeight",themeGet:Ce}),ze=j({prop:"fontWeight",themeGet:Re}),je=j({prop:"textAlign"}),Le=j({prop:"letterSpacing",themeGet:We}),Ie=j({prop:"color",themeGet:L}),He=j({prop:"textTransform"}),Me=z(Pe,Ae,Be,ze,je,Le,Ie,He);function Oe(){return(Oe=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}return r}).apply(this,arguments)}var Fe=P((function(){return{boxSizing:"border-box",flexGrow:1,flexWrap:"wrap",display:"flex"}}),["row"]);function _e(r,e){if(!0===e)return{flexBasis:0,flexGrow:1,maxWidth:"100%"};if("auto"===e)return{flex:"0 0 auto",maxWidth:"none",width:"auto"};var t=H(e)(r);return{flex:"0 0 "+t,maxWidth:t}}var Ne=P((function(r){var e=r.col,t={boxSizing:"border-box",flexBasis:0,flexGrow:1,maxWidth:"100%"};return i(e)?Oe({},t,{},A(r,e,(function(e){return _e(r,e)}))):Oe({},t,{},_e(r,e))}),["col"]),Ve=z(Fe,Ne),Ee=z(Q,V,dr,Ir,se,kr,be,ke,Yr,Me,Ve),De=function(r){return function(e){return u(e,r)}};[L,I,H,M,U,X,Y,Ge,lr,de,Mr,Se,Te,Ce,Re,We,O].forEach((function(r){De[r.meta.name]=r}));var Ze=function(r,e){return function(t){var o=c(t),n=b(o,r);return null===n?e:[h(n)+" {",e,"}"]}},qe=function(r,e){return function(t){var o=c(t),n=G(o,r);return null===n?null:[y(n)+" {",e,"}"]}},Je={px:function(r){return d(l(r))},border:function(r){return o(r)&&r>0?d(r)+" solid":r}};r.alignContent=Cr,r.alignItems=Sr,r.alignSelf=jr,r.background=E,r.backgroundColor=D,r.backgroundImage=Z,r.backgroundPosition=J,r.backgroundRepeat=K,r.backgroundSize=q,r.backgrounds=Q,r.basics=V,r.between=function(r,e,t){return function(o){var n=c(o),i=b(n,r),a=G(n,e);return null===a?Ze(r,t)(o):null===i?qe(e,t)(o):[v(i,a)+" {",t,"}"]}},r.border=$,r.borderBottom=nr,r.borderBottomColor=ir,r.borderColor=ur,r.borderLeft=ar,r.borderLeftColor=pr,r.borderRadius=sr,r.borderRight=tr,r.borderRightColor=or,r.borderStyle=fr,r.borderTop=rr,r.borderTopColor=er,r.borderWidth=mr,r.borders=dr,r.bottom=ye,r.boxShadow=xe,r.breakpoints=function(r){return function(e){for(var t=[],o=Object.keys(r),n=o.length,i=0;i<n;i++){var a=o[i],p=r[a],u=Ze(a,p)(e);Array.isArray(u)?u.forEach((function(r){return t.push(r)})):t.push(u)}return t}},r.col=Ne,r.color=Ie,r.compose=z,r.createStyleGenerator=P,r.createSystemComponent=function(r,e,t){var o=r.createElement,n=r.forwardRef;void 0===e&&(e="div"),void 0===t&&(t=Ee);var i=n((function(r,n){var i=r.as,a=function(r,e){var t={};for(var o in r)-1===e.indexOf(o)&&(t[o]=r[o]);return t}(function(r,e){if(null==r)return{};var t,o,n={},i=Object.keys(r);for(o=0;o<i.length;o++)t=i[o],e.indexOf(t)>=0||(n[t]=r[t]);return n}(r,["as"]),t.meta.props);return o(i||e,Oe({ref:n},a))}));return i.displayName="SystemComponent",i},r.display=gr,r.down=qe,r.flex=Br,r.flexBasis=Tr,r.flexDirection=Ar,r.flexWrap=Pr,r.flexboxes=Ir,r.fontFamily=Pe,r.fontSize=Ae,r.fontWeight=ze,r.getBorder=U,r.getBorderStyle=Y,r.getBorderWidth=X,r.getBreakpoints=c,r.getColor=L,r.getFont=Se,r.getFontSize=Te,r.getFontWeight=Re,r.getLetterSpacing=We,r.getLineHeight=Ce,r.getPercent=H,r.getPx=I,r.getRadius=M,r.getShadow=Ge,r.getSize=lr,r.getSpace=Mr,r.getTransition=O,r.getZIndex=de,r.gridArea=fe,r.gridAutoColumns=ie,r.gridAutoFlow=ne,r.gridAutoRows=ae,r.gridColumn=te,r.gridColumnGap=re,r.gridGap=$r,r.gridRow=oe,r.gridRowGap=ee,r.gridTemplateAreas=me,r.gridTemplateColumns=pe,r.gridTemplateRows=ue,r.grids=se,r.height=hr,r.justifyContent=Rr,r.justifyItems=Wr,r.justifySelf=zr,r.layout=kr,r.left=ve,r.letterSpacing=Le,r.lineHeight=Be,r.margin=Or,r.marginBottom=Nr,r.marginLeft=Vr,r.marginRight=_r,r.marginTop=Fr,r.maxHeight=vr,r.maxWidth=yr,r.minHeight=Gr,r.minWidth=br,r.mx=Er,r.my=Dr,r.opacity=F,r.order=Lr,r.overflow=_,r.padding=Zr,r.paddingBottom=Kr,r.paddingLeft=Qr,r.paddingRight=Jr,r.paddingTop=qr,r.position=le,r.positioning=be,r.px=Ur,r.py=Xr,r.reduceBreakpoints=A,r.right=he,r.row=Fe,r.rpxTransformers=Je,r.shadows=ke,r.size=xr,r.space=Yr,r.style=j,r.system=Ee,r.textAlign=je,r.textShadow=we,r.textTransform=He,r.th=De,r.themeGetter=R,r.top=ce,r.transition=N,r.typography=Me,r.up=Ze,r.variant=function(r){var e=r.key,o=void 0===e?null:e,n=r.default,i=r.variants,m=void 0===i?{}:i,f=r.prop,s=void 0===f?"variant":f;return function(r){var e=t(o)?u(r,o):null,i=p(a({},m),e),f=void 0!==r[s]?r[s]:n;return u(r,f,i)}},r.verticalAlign=wr,r.width=cr,r.xgrids=Ve,r.zIndex=ge,Object.defineProperty(r,"__esModule",{value:!0})}));
{
"name": "@xstyled/system",
"description": "Modern style system for styled-components & emotion.",
"version": "1.15.1",
"version": "1.16.0",
"keywords": [

@@ -32,6 +32,6 @@ "emotion",

"dependencies": {
"@babel/runtime": "^7.7.2",
"@xstyled/util": "^1.15.1"
"@babel/runtime": "^7.8.3",
"@xstyled/util": "^1.16.0"
},
"gitHead": "ca84683705444b074527c3773e594e466e6a1694"
"gitHead": "60cba0cdbba087588d32243339cd2c0585747fd0"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc