Socket
Socket
Sign inDemoInstall

system-props

Package Overview
Dependencies
0
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.21.1 to 0.22.0

dist/system-props.esm.js

2

dist/system-props.js

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

function r(){return(r=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 e={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};e.bgImage=e.backgroundImage,e.bgSize=e.backgroundSize,e.bgPosition=e.backgroundPosition,e.bgRepeat=e.backgroundRepeat;var t,o="",i=0,a=[[]],n=function(r){if(s(),a=[[]],!r)return a;for(var e=r.length,n=0;n<e;n++){var c=r[n];switch(c){case" ":1===t?p():t&&(o+=c);break;case",":i?o+=c:(p(),a[a.length]=[],s());break;case'"':o+=c,i||t?1===i&&2===t&&(i=0,p()):(t=2,i=1);break;case"(":i||(t=3),i++,o+=c;break;case")":o+=c,i--,3!==t||i||p();break;case"[":i||(t=4),o+=c,i++;break;case"]":o+=c,--i||p();break;default:t||(t=1),o+=c}}return o&&p(),a};function s(){i=t=0,o=""}function p(){t&&a[a.length-1].push(o),s()}var c=function(r){var e,t,o,i,a=r.path,s=r.props,p=r.strict,c=r.get;if("string"!=typeof a)return a;var l=c((null==s||null==(e=s.theme)?void 0:e.borders)||r.object,a);if(l)return l;var d=n(a)[0],f=d[0],u=d[1],g=d[2];return[c(null==s||null==(t=s.theme)?void 0:t.borderWidths,f,p?void 0:f),c(null==s||null==(o=s.theme)?void 0:o.borderStyles,u,p?void 0:u),c(null==s||null==(i=s.theme)?void 0:i.colors,g,p?void 0:g)].filter(Boolean).join(" ")},l={border:{property:"border",scale:"borders",transform:c},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders",transform:c},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders",transform:c},borderBottom:{property:"borderBottom",scale:"borders",transform:c},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders",transform:c},borderX:{properties:["borderLeft","borderRight"],scale:"borders",transform:c},borderY:{properties:["borderTop","borderBottom"],scale:"borders",transform:c},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderBottomStyle:{property:"borderBottomStyle",scale:"borderStyles"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderLeftStyle:{property:"borderLeftStyle",scale:"borderStyles"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"},borderRightColor:{property:"borderRightColor",scale:"colors"},borderRightStyle:{property:"borderRightStyle",scale:"borderStyles"}},d={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},fill:{property:"fill",scale:"colors"},stroke:{property:"stroke",scale:"colors"},opacity:!0};d.bg=d.backgroundColor,d.textColor=d.color;var f={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0},u={flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0},g=r({},f,u),h={gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,justifySelf:!0,alignSelf:!0,placeSelf:!0},m={gap:{property:"gap",scale:"space"},gridGap:{property:"gridGap",scale:"space"},gridColumnGap:{property:"gridColumnGap",scale:"space"},gridRowGap:{property:"gridRowGap",scale:"space"},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0},y=r({},h,m),b={width:{property:"width",scale:"sizes"},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},v=function(r){return"number"==typeof r&&!isNaN(r)},x=function(r){var e=r.path,t=r.object,o=r.strict,i=r.get;if(!v(e)){if("string"==typeof e&&e.startsWith("-")){var a=e.slice(1),n=i(t,a,a);return v(n)?-1*n:"-"+n}return i(t,e,o?void 0:e)}var s=e<0,p=Math.abs(e),c=i(t,p,o?void 0:p);return v(c)?c*(s?-1:1):null!=c?s?"-"+c:c:void 0},k={position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",transform:x},right:{property:"right",scale:"space",transform:x},bottom:{property:"bottom",scale:"space",transform:x},left:{property:"left",scale:"space",transform:x}},S=function(r){var e=r.path,t=r.get,o=r.props;return t(r.object,e)||("string"==typeof e?n(e).map(function(r){return r.map(function(r){var e;return t(null==o||null==(e=o.theme)?void 0:e.colors,r,r)}).join(" ")}).join(", "):e)},w={boxShadow:{property:"boxShadow",scale:"shadows",transform:S},textShadow:{property:"textShadow",scale:"shadows",transform:S}},j=function(r){var e=r.path,t=r.object,o=r.props,i=r.strict,a=r.get;if("number"==typeof e){var n=x({path:e,object:t,props:o,strict:i,get:a});if(n)return n}if("string"==typeof e){var s=e.split(" ");return 1===s.length?x({path:e,object:t,props:o,strict:i,get:a}):s.reduce(function(r,e){var n=x({get:a,path:e,object:t,props:o,strict:i});return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" ")}return e},R=function(r){var e,t=r.path,o=r.props,i=r.strict,a=r.get;if("number"==typeof t){var n=a(r.object,t);if(n)return n}return"string"==typeof t?1===t.split(" ").length?a(null==o||null==(e=o.theme)?void 0:e.space,t,i?void 0:t):t.split(" ").reduce(function(r,e){var t,n=a(null==o||null==(t=o.theme)?void 0:t.space,e,i?void 0:e);return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" "):t},C={margin:{property:"margin",scale:"space",transform:j},marginTop:{property:"marginTop",scale:"space",transform:j},marginRight:{property:"marginRight",scale:"space",transform:j},marginBottom:{property:"marginBottom",scale:"space",transform:j},marginLeft:{property:"marginLeft",scale:"space",transform:j},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:j},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:j}};C.m=C.margin,C.mt=C.marginTop,C.mr=C.marginRight,C.mb=C.marginBottom,C.ml=C.marginLeft,C.mx=C.marginX,C.my=C.marginY;var W={padding:{property:"padding",scale:"space",transform:R},paddingTop:{property:"paddingTop",scale:"space",transform:R},paddingRight:{property:"paddingRight",scale:"space",transform:R},paddingBottom:{property:"paddingBottom",scale:"space",transform:R},paddingLeft:{property:"paddingLeft",scale:"space",transform:R},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",transform:R},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",transform:R}};W.p=W.padding,W.pt=W.paddingTop,W.pr=W.paddingRight,W.pb=W.paddingBottom,W.pl=W.paddingLeft,W.px=W.paddingX,W.py=W.paddingY;var T=r({},W,C),z={transition:{property:"transition",scale:"transitions",transform:function(r){var e=r.path,t=r.object,o=r.get,i=r.strict,a=o(t,e);return a||("string"==typeof e?a=n(e).map(function(r){return 1===r.length?o(t,r[0],i?void 0:r[0]):r.join(" ")}).join(", "):e)}},transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"},transitionProperty:!0,transitionDelay:!0},B={fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes"},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0},_={width:{property:"width",scale:"sizes",transform:function(r){var e,t=r.path,o=r.object,i=r.get,a=t;return"number"!=typeof(e=t)||isNaN(e)||(a=t>1?t:100*t+"%"),i(o,t,a)}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},L=function(r,e,t){if(!r)return t;for(var o="string"==typeof e?e.split("."):[e],i=r,a=0;a<o.length;a++){var n=o[a];i=!i||"number"!=typeof n&&"string"!=typeof n?void 0:i[n]}return void 0===i?t:i},P=function(r){var e=new WeakMap;return function(t,o,i){if(void 0===t)return r(t,o,i);e.has(t)||e.set(t,new Map);var a=e.get(t);if(a.has(o))return a.get(o);var n=r(t,o,i);return a.set(o,n),n}},O={all:P(function(r,e,t){var o=L(r,e);return"string"==typeof e&&e.startsWith("$")&&(o=L(r,e.slice(1))),void 0===o?t:o}),prefix:P(function(r,e,t){var o;return"string"==typeof e&&e.startsWith("$")&&(o=L(r,e.slice(1))),void 0===o?t:o}),noprefix:P(L)},A=function(r){var e=r.path;return(0,r.get)(r.object,e,!0===r.strict?void 0:e)},I=function(r){var e=r.scale,t=r.transform,o=void 0===t?A:t,i=r.defaultScale,a=r.tokenPrefix,n=r.properties||[r.property];if(!a||!["all","noprefix","prefix"].includes(a))throw new Error('Invalid tokenPrefix configuration option. Expected "all", "noprefix" or "prefix". Received: '+a);var s=O[a],p=function(r,e,t,i){var a,p={};return null===(a=o({path:r,object:e,props:t,strict:null==i?void 0:i.strict,get:s}))||n.forEach(function(r){r&&(p[r]=a)}),p};return Object.assign(p,{scale:e,defaultScale:i}),p},E=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),H=function(r){var e={};return Object.keys(r).sort(function(r,e){return E.compare(r,e)}).forEach(function(t){e[t]=r[t]}),e};function F(e,t){return r({},e,t)}var G=function(r,e){var t=F(r,e);for(var o in r){var i;r[o]&&"object"==typeof e[o]&&(t=F(t,((i={})[o]=F(r[o],e[o]),i)))}return t},X={_hover:"&:hover",_focus:"&:focus",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_active:"&:active",_visited:"&:visited",_selection:"&::selection",_before:"&::before",_after:"&::after",_placeholder:"&::placeholder",_hoverAndFocus:"&:hover, &:focus",_disabled:"&[disabled], &[disabled]:hover, &[disabled]:focus, &[aria-disabled], &[aria-disabled]:hover, &[aria-disabled]:focus",_readOnly:"&[readOnly]",_first:"&:first-child",_last:"&:last-child",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_checked:"&[aria-checked=true], &[checked]",_odd:"&:nth-of-type(odd)",_even:"&:nth-of-type(even)"},Y=function(r){return"@media screen and (min-width: "+r+")"},N=function e(t,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var a={strict:i,key:"__systemprops__"},n=function(e){var i,n={},s=!1,p=!1;void 0!==(null==(i=e.theme)?void 0:i.systemPropsCacheKey)&&e.theme.systemPropsCacheKey!==a.key&&(a.key=e.theme.systemPropsCacheKey,p=!0);var c=function(o,i){var n=t[i],c=o[i];if(void 0===c)return{};var l,d,f=L(e.theme,n.scale);if("function"==typeof c&&(c=c(e.theme)),"object"==typeof c){var u;if(a.breakpoints=!p&&a.breakpoints||(null==e||null==(u=e.theme)?void 0:u.breakpoints),Array.isArray(c)){if(void 0===a.breakpoints)throw new Error("The system props parser could not find a `breakpoints` property in the theme object, which is required for responsive styles to work. Make sure that the theme object has a breakpoints property.");return a.media=!p&&a.media||[null].concat((d=l=a.breakpoints,Array.isArray(l)||(d=Object.values(l)),d.map(Y))),function(e){var t=e.cache,o=e.systemConfig,i=e.scale,a=e.props,n={},s=t.media;return e.propValue.slice(0,s.length).forEach(function(e,p){var c,l="function"==typeof e?e(a.theme):e,d=s[p],f=o(l,i,a,t);n=r({},n,d?((c={})[d]=r({},n[d],f),c):f)}),n}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}if(null!==c)return s=!0,function(e){var t=e.cache,o=e.systemConfig,i=e.scale,a=e.propValue,n=e.props,s=t.breakpoints,p={};for(var c in a){var l=s[c],d=a[c],f=o("function"==typeof d?d(n.theme):d,i,n,t);if(l){var u,g="@media screen and (min-width: "+l+")";p=r({},p,((u={})[g]=r({},p[g],f),u))}else p=r({},p,f)}return p}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}return n(c,f,e,a)};for(var l in e)if(o[l]){var d=o[l],f=e[l];for(var u in f)n[d]=r({},n[d],c(f,u)),s&&(n[o[l]]=H(n[o[l]]),s=!1)}else t[l]&&(n=G(n,c(e,l)));return s&&(n=H(n)),n};n.config=t,n.propNames=Object.keys(t),n.cache=a;var s=Object.keys(t).filter(function(r){return"config"!==r});return s.length>1&&s.forEach(function(r){var o,i;Object.assign(n,((i={})[r]=e(((o={})[r]=t[r],o)),i))}),n},D=function(e,t){void 0===t&&(t={tokenPrefix:"prefix"});var o=t.tokenPrefix,i={};return Object.keys(e).forEach(function(t){var a=e[t];!0!==a?"function"!=typeof a&&(i[t]=I(r({},a,{tokenPrefix:o}))):i[t]=I({property:t,scale:t,tokenPrefix:o})}),function r(e){return function(t){var a=t.theme;if(void 0===e)return{};var n={},s="function"==typeof e?e(a):e;for(var p in s){var c=s[p];if(c&&"object"==typeof c){var l,d=c,f=(0,O[o])(a.mediaQueries,p);if(void 0!==f){var u;Object.assign(n,((u={})[f]=r(d)({theme:a}),u));continue}Object.assign(n,((l={})[p]=r(d)({theme:a}),l))}else{var g=i[p];if(g){var h=L(a,g.scale);n=G(n,g(c,h,{theme:a}))}else{var m;Object.assign(n,((m={})[p]=c,m))}}}return n}}},V=r({},X,e,l,d,y,g,b,k,w,T,B),M=Object.keys(V),K=new Set(M),$=D(r({},e,l,d,g,y,b,k,w,T,z,B),{tokenPrefix:"prefix"});exports.background=e,exports.border=l,exports.color=d,exports.createCss=D,exports.createSystem=function(e){var t=void 0===e?{}:e,o=t.strict,i=void 0!==o&&o,a=t.pseudoSelectors,n=void 0===a?X:a,s=t.tokenPrefix,p=void 0===s?"prefix":s;return function(e){var t={};return Object.keys(e).forEach(function(o){var i=e[o];!0!==i?"function"!=typeof i&&(t[o]=I(r({},i,{tokenPrefix:p}))):t[o]=I({property:o,scale:o,tokenPrefix:p})}),N(t,n,i)}},exports.css=$,exports.flexContainer=f,exports.flexItem=u,exports.flexbox=g,exports.grid=y,exports.gridContainer=m,exports.gridItem=h,exports.layout=b,exports.margin=C,exports.padding=W,exports.position=k,exports.propNames=M,exports.pseudoSelectors=X,exports.shadow=w,exports.shouldForwardProp=function(r){return!K.has(r)},exports.space=T,exports.styledSystemLayout=_,exports.transition=z,exports.typography=B;
function r(){return(r=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 e={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};e.bgImage=e.backgroundImage,e.bgSize=e.backgroundSize,e.bgPosition=e.backgroundPosition,e.bgRepeat=e.backgroundRepeat;var t,o="",i=0,a=[[]],n=function(r){if(s(),a=[[]],!r)return a;for(var e=r.length,n=0;n<e;n++){var c=r[n];switch(c){case" ":1===t?p():t&&(o+=c);break;case",":i?o+=c:(p(),a[a.length]=[],s());break;case'"':o+=c,i||t?1===i&&2===t&&(i=0,p()):(t=2,i=1);break;case"(":i||(t=3),i++,o+=c;break;case")":o+=c,i--,3!==t||i||p();break;case"[":i||(t=4),o+=c,i++;break;case"]":o+=c,--i||p();break;default:t||(t=1),o+=c}}return o&&p(),a};function s(){i=t=0,o=""}function p(){t&&a[a.length-1].push(o),s()}var c=function(r){var e,t,o,i,a=r.path,s=r.object,p=r.props,c=r.strict,l=r.get;if("string"!=typeof a)return a;var d=l((null==p||null==(e=p.theme)?void 0:e.borders)||s,a);if(d)return d;var f=n(a)[0],u=f[0],g=f[1],h=f[2];return[l(null==p||null==(t=p.theme)?void 0:t.borderWidths,u,c&&s?void 0:u),l(null==p||null==(o=p.theme)?void 0:o.borderStyles,g,c&&s?void 0:g),l(null==p||null==(i=p.theme)?void 0:i.colors,h,c&&s?void 0:h)].filter(Boolean).join(" ")},l={border:{property:"border",scale:"borders",transform:c},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders",transform:c},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders",transform:c},borderBottom:{property:"borderBottom",scale:"borders",transform:c},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders",transform:c},borderX:{properties:["borderLeft","borderRight"],scale:"borders",transform:c},borderY:{properties:["borderTop","borderBottom"],scale:"borders",transform:c},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderBottomStyle:{property:"borderBottomStyle",scale:"borderStyles"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderLeftStyle:{property:"borderLeftStyle",scale:"borderStyles"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"},borderRightColor:{property:"borderRightColor",scale:"colors"},borderRightStyle:{property:"borderRightStyle",scale:"borderStyles"}},d={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},fill:{property:"fill",scale:"colors"},stroke:{property:"stroke",scale:"colors"},opacity:!0};d.bg=d.backgroundColor,d.textColor=d.color;var f={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0},u={flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0},g=r({},f,u),h={gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,justifySelf:!0,alignSelf:!0,placeSelf:!0},m={gap:{property:"gap",scale:"space"},gridGap:{property:"gridGap",scale:"space"},gridColumnGap:{property:"gridColumnGap",scale:"space"},gridRowGap:{property:"gridRowGap",scale:"space"},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0},y=r({},h,m),b={width:{property:"width",scale:"sizes"},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},v=function(r){return"number"==typeof r&&!isNaN(r)},x=function(r){var e=r.path,t=r.object,o=r.strict,i=r.get;if(!v(e)){if("string"==typeof e&&e.startsWith("-")){var a=e.slice(1),n=i(t,a,o&&t?void 0:a);return v(n)?-1*n:"-"+n}return i(t,e,o&&t?void 0:e)}var s=e<0,p=Math.abs(e),c=i(t,p,o&&t?void 0:p);return v(c)?c*(s?-1:1):null!=c?s?"-"+c:c:void 0},k={position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",transform:x},right:{property:"right",scale:"space",transform:x},bottom:{property:"bottom",scale:"space",transform:x},left:{property:"left",scale:"space",transform:x}},S=function(r){var e=r.path,t=r.object,o=r.get,i=r.props,a=r.strict;return o(t,e)||("string"==typeof e?n(e).map(function(r){return r.map(function(r){var e;return o(null==i||null==(e=i.theme)?void 0:e.colors,r,a&&t?void 0:r)}).join(" ")}).join(", "):e)},w={boxShadow:{property:"boxShadow",scale:"shadows",transform:S},textShadow:{property:"textShadow",scale:"shadows",transform:S}},j=function(r){var e=r.path,t=r.object,o=r.props,i=r.strict,a=r.get;if("number"==typeof e){var n=x({path:e,object:t,props:o,strict:i,get:a});if(n)return n}if("string"==typeof e){var s=e.split(" ");return 1===s.length?x({path:e,object:t,props:o,strict:i,get:a}):s.reduce(function(r,e){var n=x({get:a,path:e,object:t,props:o,strict:i});return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" ")}return e},R=function(r){var e,t=r.path,o=r.props,i=r.strict,a=r.get;if("number"==typeof t){var n=a(r.object,t);if(n)return n}return"string"==typeof t?1===t.split(" ").length?a(null==o||null==(e=o.theme)?void 0:e.space,t,i?void 0:t):t.split(" ").reduce(function(r,e){var t,n=a(null==o||null==(t=o.theme)?void 0:t.space,e,i?void 0:e);return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" "):t},C={margin:{property:"margin",scale:"space",transform:j},marginTop:{property:"marginTop",scale:"space",transform:j},marginRight:{property:"marginRight",scale:"space",transform:j},marginBottom:{property:"marginBottom",scale:"space",transform:j},marginLeft:{property:"marginLeft",scale:"space",transform:j},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:j},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:j}};C.m=C.margin,C.mt=C.marginTop,C.mr=C.marginRight,C.mb=C.marginBottom,C.ml=C.marginLeft,C.mx=C.marginX,C.my=C.marginY;var W={padding:{property:"padding",scale:"space",transform:R},paddingTop:{property:"paddingTop",scale:"space",transform:R},paddingRight:{property:"paddingRight",scale:"space",transform:R},paddingBottom:{property:"paddingBottom",scale:"space",transform:R},paddingLeft:{property:"paddingLeft",scale:"space",transform:R},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",transform:R},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",transform:R}};W.p=W.padding,W.pt=W.paddingTop,W.pr=W.paddingRight,W.pb=W.paddingBottom,W.pl=W.paddingLeft,W.px=W.paddingX,W.py=W.paddingY;var T=r({},W,C),z={transition:{property:"transition",scale:"transitions",transform:function(r){var e=r.path,t=r.object,o=r.get,i=r.strict,a=o(t,e);return a||("string"==typeof e?a=n(e).map(function(r){return 1===r.length?o(t,r[0],i&&t?void 0:r[0]):r.join(" ")}).join(", "):e)}},transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"},transitionProperty:!0,transitionDelay:!0},B={fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes"},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0},_={width:{property:"width",scale:"sizes",transform:function(r){var e,t=r.path,o=r.object,i=r.get,a=t;return"number"!=typeof(e=t)||isNaN(e)||(a=t>1?t:100*t+"%"),i(o,t,a)}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},L=function(r,e,t){if(!r)return t;for(var o="string"==typeof e?e.split("."):[e],i=r,a=0;a<o.length;a++){var n=o[a];i=!i||"number"!=typeof n&&"string"!=typeof n?void 0:i[n]}return void 0===i?t:i},P=function(r){var e=new WeakMap;return function(t,o,i){if(void 0===t)return r(t,o,i);e.has(t)||e.set(t,new Map);var a=e.get(t);if(a.has(o))return a.get(o);var n=r(t,o,i);return a.set(o,n),n}},O={all:P(function(r,e,t){var o=L(r,e);return"string"==typeof e&&e.startsWith("$")&&(o=L(r,e.slice(1))),void 0===o?t:o}),prefix:P(function(r,e,t){var o;return"string"==typeof e&&e.startsWith("$")&&(o=L(r,e.slice(1))),void 0===o?t:o}),noprefix:P(L)},A=function(r){var e=r.path,t=r.object;return(0,r.get)(t,e,!0===r.strict&&t?void 0:e)},I=function(r){var e=r.scale,t=r.transform,o=void 0===t?A:t,i=r.defaultScale,a=r.tokenPrefix,n=r.properties||[r.property];if(!a||!["all","noprefix","prefix"].includes(a))throw new Error('Invalid tokenPrefix configuration option. Expected "all", "noprefix" or "prefix". Received: '+a);var s=O[a],p=function(r,e,t,i){var a,p={};return null===(a=o({path:r,object:e,props:t,strict:null==i?void 0:i.strict,get:s}))||n.forEach(function(r){r&&(p[r]=a)}),p};return Object.assign(p,{scale:e,defaultScale:i}),p},E=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),H=function(r){var e={};return Object.keys(r).sort(function(r,e){return E.compare(r,e)}).forEach(function(t){e[t]=r[t]}),e};function F(e,t){return r({},e,t)}var G=function(r,e){var t=F(r,e);for(var o in r){var i;r[o]&&"object"==typeof e[o]&&(t=F(t,((i={})[o]=F(r[o],e[o]),i)))}return t},X={_hover:"&:hover",_focus:"&:focus",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_active:"&:active",_visited:"&:visited",_selection:"&::selection",_before:"&::before",_after:"&::after",_placeholder:"&::placeholder",_hoverAndFocus:"&:hover, &:focus",_disabled:"&[disabled], &[disabled]:hover, &[disabled]:focus, &[aria-disabled], &[aria-disabled]:hover, &[aria-disabled]:focus",_readOnly:"&[readOnly]",_first:"&:first-child",_last:"&:last-child",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_checked:"&[aria-checked=true], &[checked]",_odd:"&:nth-of-type(odd)",_even:"&:nth-of-type(even)"},Y=function(r){return"@media screen and (min-width: "+r+")"},N=function e(t,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var a={strict:i,key:"__systemprops__"},n=function(e){var i,n={},s=!1,p=!1;void 0!==(null==(i=e.theme)?void 0:i.systemPropsCacheKey)&&e.theme.systemPropsCacheKey!==a.key&&(a.key=e.theme.systemPropsCacheKey,p=!0);var c=function(o,i){var n=t[i],c=o[i];if(void 0===c)return{};var l,d,f=L(e.theme,n.scale);if("function"==typeof c&&(c=c(e.theme)),"object"==typeof c){var u;if(a.breakpoints=!p&&a.breakpoints||(null==e||null==(u=e.theme)?void 0:u.breakpoints),Array.isArray(c)){if(void 0===a.breakpoints)throw new Error("The system props parser could not find a `breakpoints` property in the theme object, which is required for responsive styles to work. Make sure that the theme object has a breakpoints property.");return a.media=!p&&a.media||[null].concat((d=l=a.breakpoints,Array.isArray(l)||(d=Object.values(l)),d.map(Y))),function(e){var t=e.cache,o=e.systemConfig,i=e.scale,a=e.props,n={},s=t.media;return e.propValue.slice(0,s.length).forEach(function(e,p){var c,l="function"==typeof e?e(a.theme):e,d=s[p],f=o(l,i,a,t);n=r({},n,d?((c={})[d]=r({},n[d],f),c):f)}),n}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}if(null!==c)return s=!0,function(e){var t=e.cache,o=e.systemConfig,i=e.scale,a=e.propValue,n=e.props,s=t.breakpoints,p={};for(var c in a){var l=s[c],d=a[c],f=o("function"==typeof d?d(n.theme):d,i,n,t);if(l){var u,g="@media screen and (min-width: "+l+")";p=r({},p,((u={})[g]=r({},p[g],f),u))}else p=r({},p,f)}return p}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}return n(c,f,e,a)};for(var l in e)if(o[l]){var d=o[l],f=e[l];for(var u in f)n[d]=r({},n[d],c(f,u)),s&&(n[o[l]]=H(n[o[l]]),s=!1)}else t[l]&&(n=G(n,c(e,l)));return s&&(n=H(n)),n};n.config=t,n.propNames=Object.keys(t),n.cache=a;var s=Object.keys(t).filter(function(r){return"config"!==r});return s.length>1&&s.forEach(function(r){var o,i;Object.assign(n,((i={})[r]=e(((o={})[r]=t[r],o)),i))}),n},D=function(e,t){void 0===t&&(t={tokenPrefix:"prefix"});var o=t.tokenPrefix,i={};return Object.keys(e).forEach(function(t){var a=e[t];!0!==a?"function"!=typeof a&&(i[t]=I(r({},a,{tokenPrefix:o}))):i[t]=I({property:t,scale:t,tokenPrefix:o})}),function r(e){return function(t){var a=t.theme;if(void 0===e)return{};var n={},s="function"==typeof e?e(a):e;for(var p in s){var c=s[p];if(c&&"object"==typeof c){var l,d=c,f=(0,O[o])(a.mediaQueries,p);if(void 0!==f){var u;Object.assign(n,((u={})[f]=r(d)({theme:a}),u));continue}Object.assign(n,((l={})[p]=r(d)({theme:a}),l))}else{var g=i[p];if(g){var h=L(a,g.scale);n=G(n,g(c,h,{theme:a}))}else{var m;Object.assign(n,((m={})[p]=c,m))}}}return n}}},V=r({},X,e,l,d,y,g,b,k,w,T,B),M=Object.keys(V),K=new Set(M),$=D(r({},e,l,d,g,y,b,k,w,T,z,B),{tokenPrefix:"prefix"});exports.background=e,exports.border=l,exports.color=d,exports.createCss=D,exports.createSystem=function(e){var t=void 0===e?{}:e,o=t.strict,i=void 0!==o&&o,a=t.pseudoSelectors,n=void 0===a?X:a,s=t.tokenPrefix,p=void 0===s?"prefix":s;return function(e){var t={};return Object.keys(e).forEach(function(o){var i=e[o];!0!==i?"function"!=typeof i&&(t[o]=I(r({},i,{tokenPrefix:p}))):t[o]=I({property:o,scale:o,tokenPrefix:p})}),N(t,n,i)}},exports.css=$,exports.flexContainer=f,exports.flexItem=u,exports.flexbox=g,exports.grid=y,exports.gridContainer=m,exports.gridItem=h,exports.layout=b,exports.margin=C,exports.padding=W,exports.position=k,exports.propNames=M,exports.pseudoSelectors=X,exports.shadow=w,exports.shouldForwardProp=function(r){return!K.has(r)},exports.space=T,exports.styledSystemLayout=_,exports.transition=z,exports.typography=B;
//# sourceMappingURL=system-props.js.map

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

function e(){return(e=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)}const r={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};r.bgImage=r.backgroundImage,r.bgSize=r.backgroundSize,r.bgPosition=r.backgroundPosition,r.bgRepeat=r.backgroundRepeat;let t,o="",i=0,s=[[]];const n=e=>{if(a(),s=[[]],!e)return s;const r=e.length;for(let n=0;n<r;n++){const r=e[n];switch(r){case" ":1===t?p():t&&(o+=r);break;case",":i?o+=r:(p(),s[s.length]=[],a());break;case'"':o+=r,i||t?1===i&&2===t&&(i=0,p()):(t=2,i=1);break;case"(":i||(t=3),i++,o+=r;break;case")":o+=r,i--,3!==t||i||p();break;case"[":i||(t=4),o+=r,i++;break;case"]":o+=r,i--,i||p();break;default:t||(t=1),o+=r}}return o&&p(),s};function a(){i=t=0,o=""}function p(){t&&s[s.length-1].push(o),a()}const l=({path:e,object:r,props:t,strict:o,get:i})=>{var s,a,p,l;if("string"!=typeof e)return e;let c=i((null==t||null==(s=t.theme)?void 0:s.borders)||r,e);if(c)return c;const[[d,f,g]]=n(e);return[i(null==t||null==(a=t.theme)?void 0:a.borderWidths,d,o?void 0:d),i(null==t||null==(p=t.theme)?void 0:p.borderStyles,f,o?void 0:f),i(null==t||null==(l=t.theme)?void 0:l.colors,g,o?void 0:g)].filter(Boolean).join(" ")},c={border:{property:"border",scale:"borders",transform:l},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders",transform:l},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders",transform:l},borderBottom:{property:"borderBottom",scale:"borders",transform:l},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders",transform:l},borderX:{properties:["borderLeft","borderRight"],scale:"borders",transform:l},borderY:{properties:["borderTop","borderBottom"],scale:"borders",transform:l},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderBottomStyle:{property:"borderBottomStyle",scale:"borderStyles"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderLeftStyle:{property:"borderLeftStyle",scale:"borderStyles"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"},borderRightColor:{property:"borderRightColor",scale:"colors"},borderRightStyle:{property:"borderRightStyle",scale:"borderStyles"}},d={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},fill:{property:"fill",scale:"colors"},stroke:{property:"stroke",scale:"colors"},opacity:!0};d.bg=d.backgroundColor,d.textColor=d.color;const f={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0},g={flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0},h=e({},f,g),m={gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,justifySelf:!0,alignSelf:!0,placeSelf:!0},y={gap:{property:"gap",scale:"space"},gridGap:{property:"gridGap",scale:"space"},gridColumnGap:{property:"gridColumnGap",scale:"space"},gridRowGap:{property:"gridRowGap",scale:"space"},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0},b=e({},m,y),u={width:{property:"width",scale:"sizes"},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},v=e=>"number"==typeof e&&!isNaN(e),k=({path:e,object:r,strict:t,get:o})=>{if(!v(e)){if("string"==typeof e&&e.startsWith("-")){const t=e.slice(1),i=o(r,t,t);return v(i)?-1*i:`-${i}`}return o(r,e,t?void 0:e)}const i=e<0,s=Math.abs(e),n=o(r,s,t?void 0:s);return v(n)?n*(i?-1:1):null!=n?i?`-${n}`:n:void 0},x={position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",transform:k},right:{property:"right",scale:"space",transform:k},bottom:{property:"bottom",scale:"space",transform:k},left:{property:"left",scale:"space",transform:k}},S=({path:e,object:r,get:t,props:o})=>t(r,e)||("string"==typeof e?n(e).map(e=>e.map(e=>{var r;return t(null==o||null==(r=o.theme)?void 0:r.colors,e,e)}).join(" ")).join(", "):e),j={boxShadow:{property:"boxShadow",scale:"shadows",transform:S},textShadow:{property:"textShadow",scale:"shadows",transform:S}},w=({path:e,object:r,props:t,strict:o,get:i})=>{if("number"==typeof e){const s=k({path:e,object:r,props:t,strict:o,get:i});if(s)return s}if("string"==typeof e){const s=e.split(" ");return 1===s.length?k({path:e,object:r,props:t,strict:o,get:i}):s.reduce((e,s)=>{let n=k({get:i,path:s,object:r,props:t,strict:o});return"number"==typeof n&&(n=`${n}px`),[...e,n]},[]).filter(Boolean).join(" ")}return e},R=({path:e,object:r,props:t,strict:o,get:i})=>{if("number"==typeof e){const t=i(r,e);if(t)return t}var s;return"string"==typeof e?1===e.split(" ").length?i(null==t||null==(s=t.theme)?void 0:s.space,e,o?void 0:e):e.split(" ").reduce((e,r)=>{var s;let n=i(null==t||null==(s=t.theme)?void 0:s.space,r,o?void 0:r);return"number"==typeof n&&(n=`${n}px`),[...e,n]},[]).filter(Boolean).join(" "):e},W={margin:{property:"margin",scale:"space",transform:w},marginTop:{property:"marginTop",scale:"space",transform:w},marginRight:{property:"marginRight",scale:"space",transform:w},marginBottom:{property:"marginBottom",scale:"space",transform:w},marginLeft:{property:"marginLeft",scale:"space",transform:w},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:w},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:w}};W.m=W.margin,W.mt=W.marginTop,W.mr=W.marginRight,W.mb=W.marginBottom,W.ml=W.marginLeft,W.mx=W.marginX,W.my=W.marginY;const C={padding:{property:"padding",scale:"space",transform:R},paddingTop:{property:"paddingTop",scale:"space",transform:R},paddingRight:{property:"paddingRight",scale:"space",transform:R},paddingBottom:{property:"paddingBottom",scale:"space",transform:R},paddingLeft:{property:"paddingLeft",scale:"space",transform:R},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",transform:R},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",transform:R}};C.p=C.padding,C.pt=C.paddingTop,C.pr=C.paddingRight,C.pb=C.paddingBottom,C.pl=C.paddingLeft,C.px=C.paddingX,C.py=C.paddingY;const T=e({},C,W),z={transition:{property:"transition",scale:"transitions",transform:({path:e,object:r,get:t,strict:o})=>{let i=t(r,e);return i||("string"==typeof e?(i=n(e).map(e=>1===e.length?t(r,e[0],o?void 0:e[0]):e.join(" ")).join(", "),i):e)}},transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"},transitionProperty:!0,transitionDelay:!0},B={fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes"},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0},_={width:{property:"width",scale:"sizes",transform:({path:e,object:r,get:t})=>{let o=e;if("number"==typeof(i=e)&&!isNaN(i)){const r=e;o=r>1?e:100*r+"%"}var i;return t(r,e,o)}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},L=(e,r,t)=>{if(!e)return t;const o="string"==typeof r?r.split("."):[r];let i=e;for(let e=0;e<o.length;e++){const r=o[e];i=!i||"number"!=typeof r&&"string"!=typeof r?void 0:i[r]}return void 0===i?t:i},P=e=>{let r=new WeakMap;return(t,o,i)=>{if(void 0===t)return e(t,o,i);r.has(t)||r.set(t,new Map);const s=r.get(t);if(s.has(o))return s.get(o);const n=e(t,o,i);return s.set(o,n),n}},O={all:P((e,r,t)=>{let o=L(e,r);return"string"==typeof r&&r.startsWith("$")&&(o=L(e,r.slice(1))),void 0===o?t:o}),prefix:P((e,r,t)=>{let o;return"string"==typeof r&&r.startsWith("$")&&(o=L(e,r.slice(1))),void 0===o?t:o}),noprefix:P(L)},A=({path:e,object:r,strict:t,get:o})=>o(r,e,!0===t?void 0:e),E=({properties:e,property:r,scale:t,transform:o=A,defaultScale:i,tokenPrefix:s})=>{const n=e||[r];if(!s||!["all","noprefix","prefix"].includes(s))throw new Error(`Invalid tokenPrefix configuration option. Expected "all", "noprefix" or "prefix". Received: ${s}`);const a=O[s],p=(e,r,t,i)=>{const s={};let p=e;return p=o({path:e,object:r,props:t,strict:null==i?void 0:i.strict,get:a}),null===p||n.forEach(e=>{e&&(s[e]=p)}),s};return Object.assign(p,{scale:t,defaultScale:i}),p},H=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),I=e=>{const r={};return Object.keys(e).sort((e,r)=>H.compare(e,r)).forEach(t=>{r[t]=e[t]}),r};function $(r,t){return e({},r,t)}const F=(e,r)=>{let t=$(e,r);for(const o in e)e[o]&&"object"==typeof r[o]&&(t=$(t,{[o]:$(e[o],r[o])}));return t},G={_hover:"&:hover",_focus:"&:focus",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_active:"&:active",_visited:"&:visited",_selection:"&::selection",_before:"&::before",_after:"&::after",_placeholder:"&::placeholder",_hoverAndFocus:"&:hover, &:focus",_disabled:"&[disabled], &[disabled]:hover, &[disabled]:focus, &[aria-disabled], &[aria-disabled]:hover, &[aria-disabled]:focus",_readOnly:"&[readOnly]",_first:"&:first-child",_last:"&:last-child",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_checked:"&[aria-checked=true], &[checked]",_odd:"&:nth-of-type(odd)",_even:"&:nth-of-type(even)"},X=e=>`@media screen and (min-width: ${e})`;function Y(e){let r=e;return Array.isArray(e)||(r=Object.values(e)),r.map(X)}const D=(r,t={},o=!1)=>{const i={strict:o,key:"__systemprops__"},s=o=>{var s;let n={},a=!1,p=!1;void 0!==(null==(s=o.theme)?void 0:s.systemPropsCacheKey)&&o.theme.systemPropsCacheKey!==i.key&&(i.key=o.theme.systemPropsCacheKey,p=!0);const l=(t,s)=>{const n=r[s];let l=t[s];if(void 0===l)return{};const c=L(o.theme,n.scale);if("function"==typeof l&&(l=l(o.theme)),"object"==typeof l){var d;if(i.breakpoints=!p&&i.breakpoints||(null==o||null==(d=o.theme)?void 0:d.breakpoints),Array.isArray(l)){if(void 0===i.breakpoints)throw new Error("The system props parser could not find a `breakpoints` property in the theme object, which is required for responsive styles to work. Make sure that the theme object has a breakpoints property.");return i.media=!p&&i.media||[null,...Y(i.breakpoints)],(({cache:r,systemConfig:t,scale:o,propValue:i,props:s})=>{let n={};const a=r.media;return i.slice(0,a.length).forEach((i,p)=>{const l="function"==typeof i?i(s.theme):i,c=a[p],d=t(l,o,s,r);n=e({},n,c?{[c]:e({},n[c],d)}:d)}),n})({cache:i,systemConfig:n,scale:c,propValue:l,props:t})}if(null!==l)return a=!0,(({cache:r,systemConfig:t,scale:o,propValue:i,props:s})=>{const n=r.breakpoints;let a={};for(const p in i){const l=n[p],c=i[p],d=t("function"==typeof c?c(s.theme):c,o,s,r);if(l){const r=`@media screen and (min-width: ${l})`;a=e({},a,{[r]:e({},a[r],d)})}else a=e({},a,d)}return a})({cache:i,systemConfig:n,scale:c,propValue:l,props:t})}return n(l,c,o,i)};for(const i in o)if(t[i]){const r=t[i],s=o[i];for(const o in s)n[r]=e({},n[r],l(s,o)),a&&(n[t[i]]=I(n[t[i]]),a=!1)}else r[i]&&(n=F(n,l(o,i)));return a&&(n=I(n)),n};s.config=r,s.propNames=Object.keys(r),s.cache=i;const n=Object.keys(r).filter(e=>"config"!==e);return n.length>1&&n.forEach(e=>{Object.assign(s,{[e]:D({[e]:r[e]})})}),s},N=({strict:r=!1,pseudoSelectors:t=G,tokenPrefix:o="prefix"}={})=>i=>{const s={};return Object.keys(i).forEach(r=>{const t=i[r];!0!==t?"function"!=typeof t&&(s[r]=E(e({},t,{tokenPrefix:o}))):s[r]=E({property:r,scale:r,tokenPrefix:o})}),D(s,t,r)},V=(r,t={tokenPrefix:"prefix"})=>{const{tokenPrefix:o}=t,i={};Object.keys(r).forEach(t=>{const s=r[t];!0!==s?"function"!=typeof s&&(i[t]=E(e({},s,{tokenPrefix:o}))):i[t]=E({property:t,scale:t,tokenPrefix:o})});const s=e=>({theme:r})=>{if(void 0===e)return{};let t={};const n="function"==typeof e?e(r):e;for(let e in n){const a=n[e];if(a&&"object"==typeof a){const i=a,n=(0,O[o])(r.mediaQueries,e);if(void 0!==n){Object.assign(t,{[n]:s(i)({theme:r})});continue}Object.assign(t,{[e]:s(i)({theme:r})});continue}const p=i[e];if(!p){Object.assign(t,{[e]:a});continue}const l=L(r,p.scale);t=F(t,p(a,l,{theme:r}))}return t};return s},M=e({},G,r,c,d,b,h,u,x,j,T,B),K=Object.keys(M),q=new Set(K),Q=e=>!q.has(e),J=V(e({},r,c,d,h,b,u,x,j,T,z,B),{tokenPrefix:"prefix"});export{r as background,c as border,d as color,V as createCss,N as createSystem,J as css,f as flexContainer,g as flexItem,h as flexbox,b as grid,y as gridContainer,m as gridItem,u as layout,W as margin,C as padding,x as position,K as propNames,G as pseudoSelectors,j as shadow,Q as shouldForwardProp,T as space,_ as styledSystemLayout,z as transition,B as typography};
function e(){return(e=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)}const r={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};r.bgImage=r.backgroundImage,r.bgSize=r.backgroundSize,r.bgPosition=r.backgroundPosition,r.bgRepeat=r.backgroundRepeat;let t,o="",i=0,s=[[]];const n=e=>{if(a(),s=[[]],!e)return s;const r=e.length;for(let n=0;n<r;n++){const r=e[n];switch(r){case" ":1===t?p():t&&(o+=r);break;case",":i?o+=r:(p(),s[s.length]=[],a());break;case'"':o+=r,i||t?1===i&&2===t&&(i=0,p()):(t=2,i=1);break;case"(":i||(t=3),i++,o+=r;break;case")":o+=r,i--,3!==t||i||p();break;case"[":i||(t=4),o+=r,i++;break;case"]":o+=r,i--,i||p();break;default:t||(t=1),o+=r}}return o&&p(),s};function a(){i=t=0,o=""}function p(){t&&s[s.length-1].push(o),a()}const c=({path:e,object:r,props:t,strict:o,get:i})=>{var s,a,p,c;if("string"!=typeof e)return e;let l=i((null==t||null==(s=t.theme)?void 0:s.borders)||r,e);if(l)return l;const[[d,f,g]]=n(e);return[i(null==t||null==(a=t.theme)?void 0:a.borderWidths,d,o&&r?void 0:d),i(null==t||null==(p=t.theme)?void 0:p.borderStyles,f,o&&r?void 0:f),i(null==t||null==(c=t.theme)?void 0:c.colors,g,o&&r?void 0:g)].filter(Boolean).join(" ")},l={border:{property:"border",scale:"borders",transform:c},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders",transform:c},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders",transform:c},borderBottom:{property:"borderBottom",scale:"borders",transform:c},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders",transform:c},borderX:{properties:["borderLeft","borderRight"],scale:"borders",transform:c},borderY:{properties:["borderTop","borderBottom"],scale:"borders",transform:c},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderBottomStyle:{property:"borderBottomStyle",scale:"borderStyles"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderLeftStyle:{property:"borderLeftStyle",scale:"borderStyles"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"},borderRightColor:{property:"borderRightColor",scale:"colors"},borderRightStyle:{property:"borderRightStyle",scale:"borderStyles"}},d={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},fill:{property:"fill",scale:"colors"},stroke:{property:"stroke",scale:"colors"},opacity:!0};d.bg=d.backgroundColor,d.textColor=d.color;const f={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0},g={flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0},h=e({},f,g),m={gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,justifySelf:!0,alignSelf:!0,placeSelf:!0},y={gap:{property:"gap",scale:"space"},gridGap:{property:"gridGap",scale:"space"},gridColumnGap:{property:"gridColumnGap",scale:"space"},gridRowGap:{property:"gridRowGap",scale:"space"},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0},b=e({},m,y),u={width:{property:"width",scale:"sizes"},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},v=e=>"number"==typeof e&&!isNaN(e),k=({path:e,object:r,strict:t,get:o})=>{if(!v(e)){if("string"==typeof e&&e.startsWith("-")){const i=e.slice(1),s=o(r,i,t&&r?void 0:i);return v(s)?-1*s:`-${s}`}return o(r,e,t&&r?void 0:e)}const i=e<0,s=Math.abs(e),n=o(r,s,t&&r?void 0:s);return v(n)?n*(i?-1:1):null!=n?i?`-${n}`:n:void 0},x={position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",transform:k},right:{property:"right",scale:"space",transform:k},bottom:{property:"bottom",scale:"space",transform:k},left:{property:"left",scale:"space",transform:k}},S=({path:e,object:r,get:t,props:o,strict:i})=>t(r,e)||("string"==typeof e?n(e).map(e=>e.map(e=>{var s;return t(null==o||null==(s=o.theme)?void 0:s.colors,e,i&&r?void 0:e)}).join(" ")).join(", "):e),j={boxShadow:{property:"boxShadow",scale:"shadows",transform:S},textShadow:{property:"textShadow",scale:"shadows",transform:S}},w=({path:e,object:r,props:t,strict:o,get:i})=>{if("number"==typeof e){const s=k({path:e,object:r,props:t,strict:o,get:i});if(s)return s}if("string"==typeof e){const s=e.split(" ");return 1===s.length?k({path:e,object:r,props:t,strict:o,get:i}):s.reduce((e,s)=>{let n=k({get:i,path:s,object:r,props:t,strict:o});return"number"==typeof n&&(n=`${n}px`),[...e,n]},[]).filter(Boolean).join(" ")}return e},R=({path:e,object:r,props:t,strict:o,get:i})=>{if("number"==typeof e){const t=i(r,e);if(t)return t}var s;return"string"==typeof e?1===e.split(" ").length?i(null==t||null==(s=t.theme)?void 0:s.space,e,o?void 0:e):e.split(" ").reduce((e,r)=>{var s;let n=i(null==t||null==(s=t.theme)?void 0:s.space,r,o?void 0:r);return"number"==typeof n&&(n=`${n}px`),[...e,n]},[]).filter(Boolean).join(" "):e},W={margin:{property:"margin",scale:"space",transform:w},marginTop:{property:"marginTop",scale:"space",transform:w},marginRight:{property:"marginRight",scale:"space",transform:w},marginBottom:{property:"marginBottom",scale:"space",transform:w},marginLeft:{property:"marginLeft",scale:"space",transform:w},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:w},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:w}};W.m=W.margin,W.mt=W.marginTop,W.mr=W.marginRight,W.mb=W.marginBottom,W.ml=W.marginLeft,W.mx=W.marginX,W.my=W.marginY;const C={padding:{property:"padding",scale:"space",transform:R},paddingTop:{property:"paddingTop",scale:"space",transform:R},paddingRight:{property:"paddingRight",scale:"space",transform:R},paddingBottom:{property:"paddingBottom",scale:"space",transform:R},paddingLeft:{property:"paddingLeft",scale:"space",transform:R},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",transform:R},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",transform:R}};C.p=C.padding,C.pt=C.paddingTop,C.pr=C.paddingRight,C.pb=C.paddingBottom,C.pl=C.paddingLeft,C.px=C.paddingX,C.py=C.paddingY;const T=e({},C,W),z={transition:{property:"transition",scale:"transitions",transform:({path:e,object:r,get:t,strict:o})=>{let i=t(r,e);return i||("string"==typeof e?(i=n(e).map(e=>1===e.length?t(r,e[0],o&&r?void 0:e[0]):e.join(" ")).join(", "),i):e)}},transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"},transitionProperty:!0,transitionDelay:!0},B={fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes"},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0},_={width:{property:"width",scale:"sizes",transform:({path:e,object:r,get:t})=>{let o=e;if("number"==typeof(i=e)&&!isNaN(i)){const r=e;o=r>1?e:100*r+"%"}var i;return t(r,e,o)}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},L=(e,r,t)=>{if(!e)return t;const o="string"==typeof r?r.split("."):[r];let i=e;for(let e=0;e<o.length;e++){const r=o[e];i=!i||"number"!=typeof r&&"string"!=typeof r?void 0:i[r]}return void 0===i?t:i},P=e=>{let r=new WeakMap;return(t,o,i)=>{if(void 0===t)return e(t,o,i);r.has(t)||r.set(t,new Map);const s=r.get(t);if(s.has(o))return s.get(o);const n=e(t,o,i);return s.set(o,n),n}},O={all:P((e,r,t)=>{let o=L(e,r);return"string"==typeof r&&r.startsWith("$")&&(o=L(e,r.slice(1))),void 0===o?t:o}),prefix:P((e,r,t)=>{let o;return"string"==typeof r&&r.startsWith("$")&&(o=L(e,r.slice(1))),void 0===o?t:o}),noprefix:P(L)},A=({path:e,object:r,strict:t,get:o})=>o(r,e,!0===t&&r?void 0:e),E=({properties:e,property:r,scale:t,transform:o=A,defaultScale:i,tokenPrefix:s})=>{const n=e||[r];if(!s||!["all","noprefix","prefix"].includes(s))throw new Error(`Invalid tokenPrefix configuration option. Expected "all", "noprefix" or "prefix". Received: ${s}`);const a=O[s],p=(e,r,t,i)=>{const s={};let p=e;return p=o({path:e,object:r,props:t,strict:null==i?void 0:i.strict,get:a}),null===p||n.forEach(e=>{e&&(s[e]=p)}),s};return Object.assign(p,{scale:t,defaultScale:i}),p},H=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),I=e=>{const r={};return Object.keys(e).sort((e,r)=>H.compare(e,r)).forEach(t=>{r[t]=e[t]}),r};function $(r,t){return e({},r,t)}const F=(e,r)=>{let t=$(e,r);for(const o in e)e[o]&&"object"==typeof r[o]&&(t=$(t,{[o]:$(e[o],r[o])}));return t},G={_hover:"&:hover",_focus:"&:focus",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_active:"&:active",_visited:"&:visited",_selection:"&::selection",_before:"&::before",_after:"&::after",_placeholder:"&::placeholder",_hoverAndFocus:"&:hover, &:focus",_disabled:"&[disabled], &[disabled]:hover, &[disabled]:focus, &[aria-disabled], &[aria-disabled]:hover, &[aria-disabled]:focus",_readOnly:"&[readOnly]",_first:"&:first-child",_last:"&:last-child",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_checked:"&[aria-checked=true], &[checked]",_odd:"&:nth-of-type(odd)",_even:"&:nth-of-type(even)"},X=e=>`@media screen and (min-width: ${e})`;function Y(e){let r=e;return Array.isArray(e)||(r=Object.values(e)),r.map(X)}const D=(r,t={},o=!1)=>{const i={strict:o,key:"__systemprops__"},s=o=>{var s;let n={},a=!1,p=!1;void 0!==(null==(s=o.theme)?void 0:s.systemPropsCacheKey)&&o.theme.systemPropsCacheKey!==i.key&&(i.key=o.theme.systemPropsCacheKey,p=!0);const c=(t,s)=>{const n=r[s];let c=t[s];if(void 0===c)return{};const l=L(o.theme,n.scale);if("function"==typeof c&&(c=c(o.theme)),"object"==typeof c){var d;if(i.breakpoints=!p&&i.breakpoints||(null==o||null==(d=o.theme)?void 0:d.breakpoints),Array.isArray(c)){if(void 0===i.breakpoints)throw new Error("The system props parser could not find a `breakpoints` property in the theme object, which is required for responsive styles to work. Make sure that the theme object has a breakpoints property.");return i.media=!p&&i.media||[null,...Y(i.breakpoints)],(({cache:r,systemConfig:t,scale:o,propValue:i,props:s})=>{let n={};const a=r.media;return i.slice(0,a.length).forEach((i,p)=>{const c="function"==typeof i?i(s.theme):i,l=a[p],d=t(c,o,s,r);n=e({},n,l?{[l]:e({},n[l],d)}:d)}),n})({cache:i,systemConfig:n,scale:l,propValue:c,props:t})}if(null!==c)return a=!0,(({cache:r,systemConfig:t,scale:o,propValue:i,props:s})=>{const n=r.breakpoints;let a={};for(const p in i){const c=n[p],l=i[p],d=t("function"==typeof l?l(s.theme):l,o,s,r);if(c){const r=`@media screen and (min-width: ${c})`;a=e({},a,{[r]:e({},a[r],d)})}else a=e({},a,d)}return a})({cache:i,systemConfig:n,scale:l,propValue:c,props:t})}return n(c,l,o,i)};for(const i in o)if(t[i]){const r=t[i],s=o[i];for(const o in s)n[r]=e({},n[r],c(s,o)),a&&(n[t[i]]=I(n[t[i]]),a=!1)}else r[i]&&(n=F(n,c(o,i)));return a&&(n=I(n)),n};s.config=r,s.propNames=Object.keys(r),s.cache=i;const n=Object.keys(r).filter(e=>"config"!==e);return n.length>1&&n.forEach(e=>{Object.assign(s,{[e]:D({[e]:r[e]})})}),s},N=({strict:r=!1,pseudoSelectors:t=G,tokenPrefix:o="prefix"}={})=>i=>{const s={};return Object.keys(i).forEach(r=>{const t=i[r];!0!==t?"function"!=typeof t&&(s[r]=E(e({},t,{tokenPrefix:o}))):s[r]=E({property:r,scale:r,tokenPrefix:o})}),D(s,t,r)},V=(r,t={tokenPrefix:"prefix"})=>{const{tokenPrefix:o}=t,i={};Object.keys(r).forEach(t=>{const s=r[t];!0!==s?"function"!=typeof s&&(i[t]=E(e({},s,{tokenPrefix:o}))):i[t]=E({property:t,scale:t,tokenPrefix:o})});const s=e=>({theme:r})=>{if(void 0===e)return{};let t={};const n="function"==typeof e?e(r):e;for(let e in n){const a=n[e];if(a&&"object"==typeof a){const i=a,n=(0,O[o])(r.mediaQueries,e);if(void 0!==n){Object.assign(t,{[n]:s(i)({theme:r})});continue}Object.assign(t,{[e]:s(i)({theme:r})});continue}const p=i[e];if(!p){Object.assign(t,{[e]:a});continue}const c=L(r,p.scale);t=F(t,p(a,c,{theme:r}))}return t};return s},M=e({},G,r,l,d,b,h,u,x,j,T,B),K=Object.keys(M),q=new Set(K),Q=e=>!q.has(e),J=V(e({},r,l,d,h,b,u,x,j,T,z,B),{tokenPrefix:"prefix"});export{r as background,l as border,d as color,V as createCss,N as createSystem,J as css,f as flexContainer,g as flexItem,h as flexbox,b as grid,y as gridContainer,m as gridItem,u as layout,W as margin,C as padding,x as position,K as propNames,G as pseudoSelectors,j as shadow,Q as shouldForwardProp,T as space,_ as styledSystemLayout,z as transition,B as typography};
//# sourceMappingURL=system-props.modern.js.map

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

!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r||self).systemProps={})}(this,function(r){function e(){return(e=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 t={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};t.bgImage=t.backgroundImage,t.bgSize=t.backgroundSize,t.bgPosition=t.backgroundPosition,t.bgRepeat=t.backgroundRepeat;var o,i="",a=0,n=[[]],s=function(r){if(p(),n=[[]],!r)return n;for(var e=r.length,t=0;t<e;t++){var s=r[t];switch(s){case" ":1===o?c():o&&(i+=s);break;case",":a?i+=s:(c(),n[n.length]=[],p());break;case'"':i+=s,a||o?1===a&&2===o&&(a=0,c()):(o=2,a=1);break;case"(":a||(o=3),a++,i+=s;break;case")":i+=s,a--,3!==o||a||c();break;case"[":a||(o=4),i+=s,a++;break;case"]":i+=s,--a||c();break;default:o||(o=1),i+=s}}return i&&c(),n};function p(){a=o=0,i=""}function c(){o&&n[n.length-1].push(i),p()}var l=function(r){var e,t,o,i,a=r.path,n=r.props,p=r.strict,c=r.get;if("string"!=typeof a)return a;var l=c((null==n||null==(e=n.theme)?void 0:e.borders)||r.object,a);if(l)return l;var d=s(a)[0],f=d[0],u=d[1],g=d[2];return[c(null==n||null==(t=n.theme)?void 0:t.borderWidths,f,p?void 0:f),c(null==n||null==(o=n.theme)?void 0:o.borderStyles,u,p?void 0:u),c(null==n||null==(i=n.theme)?void 0:i.colors,g,p?void 0:g)].filter(Boolean).join(" ")},d={border:{property:"border",scale:"borders",transform:l},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders",transform:l},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders",transform:l},borderBottom:{property:"borderBottom",scale:"borders",transform:l},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders",transform:l},borderX:{properties:["borderLeft","borderRight"],scale:"borders",transform:l},borderY:{properties:["borderTop","borderBottom"],scale:"borders",transform:l},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderBottomStyle:{property:"borderBottomStyle",scale:"borderStyles"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderLeftStyle:{property:"borderLeftStyle",scale:"borderStyles"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"},borderRightColor:{property:"borderRightColor",scale:"colors"},borderRightStyle:{property:"borderRightStyle",scale:"borderStyles"}},f={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},fill:{property:"fill",scale:"colors"},stroke:{property:"stroke",scale:"colors"},opacity:!0};f.bg=f.backgroundColor,f.textColor=f.color;var u={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0},g={flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0},h=e({},u,g),m={gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,justifySelf:!0,alignSelf:!0,placeSelf:!0},y={gap:{property:"gap",scale:"space"},gridGap:{property:"gridGap",scale:"space"},gridColumnGap:{property:"gridColumnGap",scale:"space"},gridRowGap:{property:"gridRowGap",scale:"space"},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0},b=e({},m,y),v={width:{property:"width",scale:"sizes"},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},k=function(r){return"number"==typeof r&&!isNaN(r)},x=function(r){var e=r.path,t=r.object,o=r.strict,i=r.get;if(!k(e)){if("string"==typeof e&&e.startsWith("-")){var a=e.slice(1),n=i(t,a,a);return k(n)?-1*n:"-"+n}return i(t,e,o?void 0:e)}var s=e<0,p=Math.abs(e),c=i(t,p,o?void 0:p);return k(c)?c*(s?-1:1):null!=c?s?"-"+c:c:void 0},S={position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",transform:x},right:{property:"right",scale:"space",transform:x},bottom:{property:"bottom",scale:"space",transform:x},left:{property:"left",scale:"space",transform:x}},w=function(r){var e=r.path,t=r.get,o=r.props;return t(r.object,e)||("string"==typeof e?s(e).map(function(r){return r.map(function(r){var e;return t(null==o||null==(e=o.theme)?void 0:e.colors,r,r)}).join(" ")}).join(", "):e)},j={boxShadow:{property:"boxShadow",scale:"shadows",transform:w},textShadow:{property:"textShadow",scale:"shadows",transform:w}},R=function(r){var e=r.path,t=r.object,o=r.props,i=r.strict,a=r.get;if("number"==typeof e){var n=x({path:e,object:t,props:o,strict:i,get:a});if(n)return n}if("string"==typeof e){var s=e.split(" ");return 1===s.length?x({path:e,object:t,props:o,strict:i,get:a}):s.reduce(function(r,e){var n=x({get:a,path:e,object:t,props:o,strict:i});return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" ")}return e},C=function(r){var e,t=r.path,o=r.props,i=r.strict,a=r.get;if("number"==typeof t){var n=a(r.object,t);if(n)return n}return"string"==typeof t?1===t.split(" ").length?a(null==o||null==(e=o.theme)?void 0:e.space,t,i?void 0:t):t.split(" ").reduce(function(r,e){var t,n=a(null==o||null==(t=o.theme)?void 0:t.space,e,i?void 0:e);return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" "):t},W={margin:{property:"margin",scale:"space",transform:R},marginTop:{property:"marginTop",scale:"space",transform:R},marginRight:{property:"marginRight",scale:"space",transform:R},marginBottom:{property:"marginBottom",scale:"space",transform:R},marginLeft:{property:"marginLeft",scale:"space",transform:R},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:R},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:R}};W.m=W.margin,W.mt=W.marginTop,W.mr=W.marginRight,W.mb=W.marginBottom,W.ml=W.marginLeft,W.mx=W.marginX,W.my=W.marginY;var T={padding:{property:"padding",scale:"space",transform:C},paddingTop:{property:"paddingTop",scale:"space",transform:C},paddingRight:{property:"paddingRight",scale:"space",transform:C},paddingBottom:{property:"paddingBottom",scale:"space",transform:C},paddingLeft:{property:"paddingLeft",scale:"space",transform:C},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",transform:C},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",transform:C}};T.p=T.padding,T.pt=T.paddingTop,T.pr=T.paddingRight,T.pb=T.paddingBottom,T.pl=T.paddingLeft,T.px=T.paddingX,T.py=T.paddingY;var z=e({},T,W),B={transition:{property:"transition",scale:"transitions",transform:function(r){var e=r.path,t=r.object,o=r.get,i=r.strict,a=o(t,e);return a||("string"==typeof e?a=s(e).map(function(r){return 1===r.length?o(t,r[0],i?void 0:r[0]):r.join(" ")}).join(", "):e)}},transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"},transitionProperty:!0,transitionDelay:!0},_={fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes"},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0},L={width:{property:"width",scale:"sizes",transform:function(r){var e,t=r.path,o=r.object,i=r.get,a=t;return"number"!=typeof(e=t)||isNaN(e)||(a=t>1?t:100*t+"%"),i(o,t,a)}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},P=function(r,e,t){if(!r)return t;for(var o="string"==typeof e?e.split("."):[e],i=r,a=0;a<o.length;a++){var n=o[a];i=!i||"number"!=typeof n&&"string"!=typeof n?void 0:i[n]}return void 0===i?t:i},O=function(r){var e=new WeakMap;return function(t,o,i){if(void 0===t)return r(t,o,i);e.has(t)||e.set(t,new Map);var a=e.get(t);if(a.has(o))return a.get(o);var n=r(t,o,i);return a.set(o,n),n}},A={all:O(function(r,e,t){var o=P(r,e);return"string"==typeof e&&e.startsWith("$")&&(o=P(r,e.slice(1))),void 0===o?t:o}),prefix:O(function(r,e,t){var o;return"string"==typeof e&&e.startsWith("$")&&(o=P(r,e.slice(1))),void 0===o?t:o}),noprefix:O(P)},I=function(r){var e=r.path;return(0,r.get)(r.object,e,!0===r.strict?void 0:e)},E=function(r){var e=r.scale,t=r.transform,o=void 0===t?I:t,i=r.defaultScale,a=r.tokenPrefix,n=r.properties||[r.property];if(!a||!["all","noprefix","prefix"].includes(a))throw new Error('Invalid tokenPrefix configuration option. Expected "all", "noprefix" or "prefix". Received: '+a);var s=A[a],p=function(r,e,t,i){var a,p={};return null===(a=o({path:r,object:e,props:t,strict:null==i?void 0:i.strict,get:s}))||n.forEach(function(r){r&&(p[r]=a)}),p};return Object.assign(p,{scale:e,defaultScale:i}),p},H=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),F=function(r){var e={};return Object.keys(r).sort(function(r,e){return H.compare(r,e)}).forEach(function(t){e[t]=r[t]}),e};function G(r,t){return e({},r,t)}var X=function(r,e){var t=G(r,e);for(var o in r){var i;r[o]&&"object"==typeof e[o]&&(t=G(t,((i={})[o]=G(r[o],e[o]),i)))}return t},Y={_hover:"&:hover",_focus:"&:focus",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_active:"&:active",_visited:"&:visited",_selection:"&::selection",_before:"&::before",_after:"&::after",_placeholder:"&::placeholder",_hoverAndFocus:"&:hover, &:focus",_disabled:"&[disabled], &[disabled]:hover, &[disabled]:focus, &[aria-disabled], &[aria-disabled]:hover, &[aria-disabled]:focus",_readOnly:"&[readOnly]",_first:"&:first-child",_last:"&:last-child",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_checked:"&[aria-checked=true], &[checked]",_odd:"&:nth-of-type(odd)",_even:"&:nth-of-type(even)"},N=function(r){return"@media screen and (min-width: "+r+")"},D=function r(t,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var a={strict:i,key:"__systemprops__"},n=function(r){var i,n={},s=!1,p=!1;void 0!==(null==(i=r.theme)?void 0:i.systemPropsCacheKey)&&r.theme.systemPropsCacheKey!==a.key&&(a.key=r.theme.systemPropsCacheKey,p=!0);var c=function(o,i){var n=t[i],c=o[i];if(void 0===c)return{};var l,d,f=P(r.theme,n.scale);if("function"==typeof c&&(c=c(r.theme)),"object"==typeof c){var u;if(a.breakpoints=!p&&a.breakpoints||(null==r||null==(u=r.theme)?void 0:u.breakpoints),Array.isArray(c)){if(void 0===a.breakpoints)throw new Error("The system props parser could not find a `breakpoints` property in the theme object, which is required for responsive styles to work. Make sure that the theme object has a breakpoints property.");return a.media=!p&&a.media||[null].concat((d=l=a.breakpoints,Array.isArray(l)||(d=Object.values(l)),d.map(N))),function(r){var t=r.cache,o=r.systemConfig,i=r.scale,a=r.props,n={},s=t.media;return r.propValue.slice(0,s.length).forEach(function(r,p){var c,l="function"==typeof r?r(a.theme):r,d=s[p],f=o(l,i,a,t);n=e({},n,d?((c={})[d]=e({},n[d],f),c):f)}),n}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}if(null!==c)return s=!0,function(r){var t=r.cache,o=r.systemConfig,i=r.scale,a=r.propValue,n=r.props,s=t.breakpoints,p={};for(var c in a){var l=s[c],d=a[c],f=o("function"==typeof d?d(n.theme):d,i,n,t);if(l){var u,g="@media screen and (min-width: "+l+")";p=e({},p,((u={})[g]=e({},p[g],f),u))}else p=e({},p,f)}return p}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}return n(c,f,r,a)};for(var l in r)if(o[l]){var d=o[l],f=r[l];for(var u in f)n[d]=e({},n[d],c(f,u)),s&&(n[o[l]]=F(n[o[l]]),s=!1)}else t[l]&&(n=X(n,c(r,l)));return s&&(n=F(n)),n};n.config=t,n.propNames=Object.keys(t),n.cache=a;var s=Object.keys(t).filter(function(r){return"config"!==r});return s.length>1&&s.forEach(function(e){var o,i;Object.assign(n,((i={})[e]=r(((o={})[e]=t[e],o)),i))}),n},V=function(r,t){void 0===t&&(t={tokenPrefix:"prefix"});var o=t.tokenPrefix,i={};return Object.keys(r).forEach(function(t){var a=r[t];!0!==a?"function"!=typeof a&&(i[t]=E(e({},a,{tokenPrefix:o}))):i[t]=E({property:t,scale:t,tokenPrefix:o})}),function r(e){return function(t){var a=t.theme;if(void 0===e)return{};var n={},s="function"==typeof e?e(a):e;for(var p in s){var c=s[p];if(c&&"object"==typeof c){var l,d=c,f=(0,A[o])(a.mediaQueries,p);if(void 0!==f){var u;Object.assign(n,((u={})[f]=r(d)({theme:a}),u));continue}Object.assign(n,((l={})[p]=r(d)({theme:a}),l))}else{var g=i[p];if(g){var h=P(a,g.scale);n=X(n,g(c,h,{theme:a}))}else{var m;Object.assign(n,((m={})[p]=c,m))}}}return n}}},M=e({},Y,t,d,f,b,h,v,S,j,z,_),K=Object.keys(M),$=new Set(K),q=V(e({},t,d,f,h,b,v,S,j,z,B,_),{tokenPrefix:"prefix"});r.background=t,r.border=d,r.color=f,r.createCss=V,r.createSystem=function(r){var t=void 0===r?{}:r,o=t.strict,i=void 0!==o&&o,a=t.pseudoSelectors,n=void 0===a?Y:a,s=t.tokenPrefix,p=void 0===s?"prefix":s;return function(r){var t={};return Object.keys(r).forEach(function(o){var i=r[o];!0!==i?"function"!=typeof i&&(t[o]=E(e({},i,{tokenPrefix:p}))):t[o]=E({property:o,scale:o,tokenPrefix:p})}),D(t,n,i)}},r.css=q,r.flexContainer=u,r.flexItem=g,r.flexbox=h,r.grid=b,r.gridContainer=y,r.gridItem=m,r.layout=v,r.margin=W,r.padding=T,r.position=S,r.propNames=K,r.pseudoSelectors=Y,r.shadow=j,r.shouldForwardProp=function(r){return!$.has(r)},r.space=z,r.styledSystemLayout=L,r.transition=B,r.typography=_});
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r||self).systemProps={})}(this,function(r){function e(){return(e=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 t={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};t.bgImage=t.backgroundImage,t.bgSize=t.backgroundSize,t.bgPosition=t.backgroundPosition,t.bgRepeat=t.backgroundRepeat;var o,i="",a=0,n=[[]],s=function(r){if(p(),n=[[]],!r)return n;for(var e=r.length,t=0;t<e;t++){var s=r[t];switch(s){case" ":1===o?c():o&&(i+=s);break;case",":a?i+=s:(c(),n[n.length]=[],p());break;case'"':i+=s,a||o?1===a&&2===o&&(a=0,c()):(o=2,a=1);break;case"(":a||(o=3),a++,i+=s;break;case")":i+=s,a--,3!==o||a||c();break;case"[":a||(o=4),i+=s,a++;break;case"]":i+=s,--a||c();break;default:o||(o=1),i+=s}}return i&&c(),n};function p(){a=o=0,i=""}function c(){o&&n[n.length-1].push(i),p()}var d=function(r){var e,t,o,i,a=r.path,n=r.object,p=r.props,c=r.strict,d=r.get;if("string"!=typeof a)return a;var l=d((null==p||null==(e=p.theme)?void 0:e.borders)||n,a);if(l)return l;var f=s(a)[0],u=f[0],g=f[1],h=f[2];return[d(null==p||null==(t=p.theme)?void 0:t.borderWidths,u,c&&n?void 0:u),d(null==p||null==(o=p.theme)?void 0:o.borderStyles,g,c&&n?void 0:g),d(null==p||null==(i=p.theme)?void 0:i.colors,h,c&&n?void 0:h)].filter(Boolean).join(" ")},l={border:{property:"border",scale:"borders",transform:d},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders",transform:d},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders",transform:d},borderBottom:{property:"borderBottom",scale:"borders",transform:d},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders",transform:d},borderX:{properties:["borderLeft","borderRight"],scale:"borders",transform:d},borderY:{properties:["borderTop","borderBottom"],scale:"borders",transform:d},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"},borderBottomWidth:{property:"borderBottomWidth",scale:"borderWidths"},borderBottomColor:{property:"borderBottomColor",scale:"colors"},borderBottomStyle:{property:"borderBottomStyle",scale:"borderStyles"},borderLeftWidth:{property:"borderLeftWidth",scale:"borderWidths"},borderLeftColor:{property:"borderLeftColor",scale:"colors"},borderLeftStyle:{property:"borderLeftStyle",scale:"borderStyles"},borderRightWidth:{property:"borderRightWidth",scale:"borderWidths"},borderRightColor:{property:"borderRightColor",scale:"colors"},borderRightStyle:{property:"borderRightStyle",scale:"borderStyles"}},f={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},fill:{property:"fill",scale:"colors"},stroke:{property:"stroke",scale:"colors"},opacity:!0};f.bg=f.backgroundColor,f.textColor=f.color;var u={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0},g={flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0},h=e({},u,g),m={gridArea:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,justifySelf:!0,alignSelf:!0,placeSelf:!0},y={gap:{property:"gap",scale:"space"},gridGap:{property:"gridGap",scale:"space"},gridColumnGap:{property:"gridColumnGap",scale:"space"},gridRowGap:{property:"gridRowGap",scale:"space"},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0},b=e({},m,y),v={width:{property:"width",scale:"sizes"},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},k=function(r){return"number"==typeof r&&!isNaN(r)},x=function(r){var e=r.path,t=r.object,o=r.strict,i=r.get;if(!k(e)){if("string"==typeof e&&e.startsWith("-")){var a=e.slice(1),n=i(t,a,o&&t?void 0:a);return k(n)?-1*n:"-"+n}return i(t,e,o&&t?void 0:e)}var s=e<0,p=Math.abs(e),c=i(t,p,o&&t?void 0:p);return k(c)?c*(s?-1:1):null!=c?s?"-"+c:c:void 0},S={position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",transform:x},right:{property:"right",scale:"space",transform:x},bottom:{property:"bottom",scale:"space",transform:x},left:{property:"left",scale:"space",transform:x}},w=function(r){var e=r.path,t=r.object,o=r.get,i=r.props,a=r.strict;return o(t,e)||("string"==typeof e?s(e).map(function(r){return r.map(function(r){var e;return o(null==i||null==(e=i.theme)?void 0:e.colors,r,a&&t?void 0:r)}).join(" ")}).join(", "):e)},j={boxShadow:{property:"boxShadow",scale:"shadows",transform:w},textShadow:{property:"textShadow",scale:"shadows",transform:w}},R=function(r){var e=r.path,t=r.object,o=r.props,i=r.strict,a=r.get;if("number"==typeof e){var n=x({path:e,object:t,props:o,strict:i,get:a});if(n)return n}if("string"==typeof e){var s=e.split(" ");return 1===s.length?x({path:e,object:t,props:o,strict:i,get:a}):s.reduce(function(r,e){var n=x({get:a,path:e,object:t,props:o,strict:i});return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" ")}return e},C=function(r){var e,t=r.path,o=r.props,i=r.strict,a=r.get;if("number"==typeof t){var n=a(r.object,t);if(n)return n}return"string"==typeof t?1===t.split(" ").length?a(null==o||null==(e=o.theme)?void 0:e.space,t,i?void 0:t):t.split(" ").reduce(function(r,e){var t,n=a(null==o||null==(t=o.theme)?void 0:t.space,e,i?void 0:e);return"number"==typeof n&&(n+="px"),[].concat(r,[n])},[]).filter(Boolean).join(" "):t},W={margin:{property:"margin",scale:"space",transform:R},marginTop:{property:"marginTop",scale:"space",transform:R},marginRight:{property:"marginRight",scale:"space",transform:R},marginBottom:{property:"marginBottom",scale:"space",transform:R},marginLeft:{property:"marginLeft",scale:"space",transform:R},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:R},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:R}};W.m=W.margin,W.mt=W.marginTop,W.mr=W.marginRight,W.mb=W.marginBottom,W.ml=W.marginLeft,W.mx=W.marginX,W.my=W.marginY;var T={padding:{property:"padding",scale:"space",transform:C},paddingTop:{property:"paddingTop",scale:"space",transform:C},paddingRight:{property:"paddingRight",scale:"space",transform:C},paddingBottom:{property:"paddingBottom",scale:"space",transform:C},paddingLeft:{property:"paddingLeft",scale:"space",transform:C},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",transform:C},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",transform:C}};T.p=T.padding,T.pt=T.paddingTop,T.pr=T.paddingRight,T.pb=T.paddingBottom,T.pl=T.paddingLeft,T.px=T.paddingX,T.py=T.paddingY;var z=e({},T,W),B={transition:{property:"transition",scale:"transitions",transform:function(r){var e=r.path,t=r.object,o=r.get,i=r.strict,a=o(t,e);return a||("string"==typeof e?a=s(e).map(function(r){return 1===r.length?o(t,r[0],i&&t?void 0:r[0]):r.join(" ")}).join(", "):e)}},transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"},transitionProperty:!0,transitionDelay:!0},_={fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes"},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0},L={width:{property:"width",scale:"sizes",transform:function(r){var e,t=r.path,o=r.object,i=r.get,a=t;return"number"!=typeof(e=t)||isNaN(e)||(a=t>1?t:100*t+"%"),i(o,t,a)}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0},P=function(r,e,t){if(!r)return t;for(var o="string"==typeof e?e.split("."):[e],i=r,a=0;a<o.length;a++){var n=o[a];i=!i||"number"!=typeof n&&"string"!=typeof n?void 0:i[n]}return void 0===i?t:i},O=function(r){var e=new WeakMap;return function(t,o,i){if(void 0===t)return r(t,o,i);e.has(t)||e.set(t,new Map);var a=e.get(t);if(a.has(o))return a.get(o);var n=r(t,o,i);return a.set(o,n),n}},A={all:O(function(r,e,t){var o=P(r,e);return"string"==typeof e&&e.startsWith("$")&&(o=P(r,e.slice(1))),void 0===o?t:o}),prefix:O(function(r,e,t){var o;return"string"==typeof e&&e.startsWith("$")&&(o=P(r,e.slice(1))),void 0===o?t:o}),noprefix:O(P)},I=function(r){var e=r.path,t=r.object;return(0,r.get)(t,e,!0===r.strict&&t?void 0:e)},E=function(r){var e=r.scale,t=r.transform,o=void 0===t?I:t,i=r.defaultScale,a=r.tokenPrefix,n=r.properties||[r.property];if(!a||!["all","noprefix","prefix"].includes(a))throw new Error('Invalid tokenPrefix configuration option. Expected "all", "noprefix" or "prefix". Received: '+a);var s=A[a],p=function(r,e,t,i){var a,p={};return null===(a=o({path:r,object:e,props:t,strict:null==i?void 0:i.strict,get:s}))||n.forEach(function(r){r&&(p[r]=a)}),p};return Object.assign(p,{scale:e,defaultScale:i}),p},H=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),F=function(r){var e={};return Object.keys(r).sort(function(r,e){return H.compare(r,e)}).forEach(function(t){e[t]=r[t]}),e};function G(r,t){return e({},r,t)}var X=function(r,e){var t=G(r,e);for(var o in r){var i;r[o]&&"object"==typeof e[o]&&(t=G(t,((i={})[o]=G(r[o],e[o]),i)))}return t},Y={_hover:"&:hover",_focus:"&:focus",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible",_active:"&:active",_visited:"&:visited",_selection:"&::selection",_before:"&::before",_after:"&::after",_placeholder:"&::placeholder",_hoverAndFocus:"&:hover, &:focus",_disabled:"&[disabled], &[disabled]:hover, &[disabled]:focus, &[aria-disabled], &[aria-disabled]:hover, &[aria-disabled]:focus",_readOnly:"&[readOnly]",_first:"&:first-child",_last:"&:last-child",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_checked:"&[aria-checked=true], &[checked]",_odd:"&:nth-of-type(odd)",_even:"&:nth-of-type(even)"},N=function(r){return"@media screen and (min-width: "+r+")"},D=function r(t,o,i){void 0===o&&(o={}),void 0===i&&(i=!1);var a={strict:i,key:"__systemprops__"},n=function(r){var i,n={},s=!1,p=!1;void 0!==(null==(i=r.theme)?void 0:i.systemPropsCacheKey)&&r.theme.systemPropsCacheKey!==a.key&&(a.key=r.theme.systemPropsCacheKey,p=!0);var c=function(o,i){var n=t[i],c=o[i];if(void 0===c)return{};var d,l,f=P(r.theme,n.scale);if("function"==typeof c&&(c=c(r.theme)),"object"==typeof c){var u;if(a.breakpoints=!p&&a.breakpoints||(null==r||null==(u=r.theme)?void 0:u.breakpoints),Array.isArray(c)){if(void 0===a.breakpoints)throw new Error("The system props parser could not find a `breakpoints` property in the theme object, which is required for responsive styles to work. Make sure that the theme object has a breakpoints property.");return a.media=!p&&a.media||[null].concat((l=d=a.breakpoints,Array.isArray(d)||(l=Object.values(d)),l.map(N))),function(r){var t=r.cache,o=r.systemConfig,i=r.scale,a=r.props,n={},s=t.media;return r.propValue.slice(0,s.length).forEach(function(r,p){var c,d="function"==typeof r?r(a.theme):r,l=s[p],f=o(d,i,a,t);n=e({},n,l?((c={})[l]=e({},n[l],f),c):f)}),n}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}if(null!==c)return s=!0,function(r){var t=r.cache,o=r.systemConfig,i=r.scale,a=r.propValue,n=r.props,s=t.breakpoints,p={};for(var c in a){var d=s[c],l=a[c],f=o("function"==typeof l?l(n.theme):l,i,n,t);if(d){var u,g="@media screen and (min-width: "+d+")";p=e({},p,((u={})[g]=e({},p[g],f),u))}else p=e({},p,f)}return p}({cache:a,systemConfig:n,scale:f,propValue:c,props:o})}return n(c,f,r,a)};for(var d in r)if(o[d]){var l=o[d],f=r[d];for(var u in f)n[l]=e({},n[l],c(f,u)),s&&(n[o[d]]=F(n[o[d]]),s=!1)}else t[d]&&(n=X(n,c(r,d)));return s&&(n=F(n)),n};n.config=t,n.propNames=Object.keys(t),n.cache=a;var s=Object.keys(t).filter(function(r){return"config"!==r});return s.length>1&&s.forEach(function(e){var o,i;Object.assign(n,((i={})[e]=r(((o={})[e]=t[e],o)),i))}),n},V=function(r,t){void 0===t&&(t={tokenPrefix:"prefix"});var o=t.tokenPrefix,i={};return Object.keys(r).forEach(function(t){var a=r[t];!0!==a?"function"!=typeof a&&(i[t]=E(e({},a,{tokenPrefix:o}))):i[t]=E({property:t,scale:t,tokenPrefix:o})}),function r(e){return function(t){var a=t.theme;if(void 0===e)return{};var n={},s="function"==typeof e?e(a):e;for(var p in s){var c=s[p];if(c&&"object"==typeof c){var d,l=c,f=(0,A[o])(a.mediaQueries,p);if(void 0!==f){var u;Object.assign(n,((u={})[f]=r(l)({theme:a}),u));continue}Object.assign(n,((d={})[p]=r(l)({theme:a}),d))}else{var g=i[p];if(g){var h=P(a,g.scale);n=X(n,g(c,h,{theme:a}))}else{var m;Object.assign(n,((m={})[p]=c,m))}}}return n}}},M=e({},Y,t,l,f,b,h,v,S,j,z,_),K=Object.keys(M),$=new Set(K),q=V(e({},t,l,f,h,b,v,S,j,z,B,_),{tokenPrefix:"prefix"});r.background=t,r.border=l,r.color=f,r.createCss=V,r.createSystem=function(r){var t=void 0===r?{}:r,o=t.strict,i=void 0!==o&&o,a=t.pseudoSelectors,n=void 0===a?Y:a,s=t.tokenPrefix,p=void 0===s?"prefix":s;return function(r){var t={};return Object.keys(r).forEach(function(o){var i=r[o];!0!==i?"function"!=typeof i&&(t[o]=E(e({},i,{tokenPrefix:p}))):t[o]=E({property:o,scale:o,tokenPrefix:p})}),D(t,n,i)}},r.css=q,r.flexContainer=u,r.flexItem=g,r.flexbox=h,r.grid=b,r.gridContainer=y,r.gridItem=m,r.layout=v,r.margin=W,r.padding=T,r.position=S,r.propNames=K,r.pseudoSelectors=Y,r.shadow=j,r.shouldForwardProp=function(r){return!$.has(r)},r.space=z,r.styledSystemLayout=L,r.transition=B,r.typography=_});
//# sourceMappingURL=system-props.umd.js.map
{
"name": "system-props",
"version": "0.21.1",
"version": "0.22.0",
"description": "Inspired by styled-system, a responsive, theme-based style props for building design systems with React.",

@@ -12,5 +12,5 @@ "author": "Rogin Farrer",

"source": "src/index.ts",
"module": "dist/system-props.module.js",
"main": "dist/system-props.cjs",
"exports": "dist/system-props.modern.js",
"module": "dist/system-props.esm.js",
"main": "dist/system-props.js",
"umd:main": "dist/system-props.umd.js",
"unpkg": "dist/system-props.umd.js",

@@ -25,2 +25,3 @@ "types": "dist/index.d.ts",

"np": "^7.5.0",
"semantic-release": "^18.0.0",
"ts-node": "^10.2.1",

@@ -27,0 +28,0 @@ "typescript": "^4.3.0"

@@ -11,3 +11,3 @@ import { memoizedGet } from './get';

const defaultTransform: Transform = ({ path, object, strict, get }) => {
return get(object, path, strict === true ? undefined : path);
return get(object, path, strict === true && !!object ? undefined : path);
};

@@ -14,0 +14,0 @@

@@ -158,2 +158,4 @@ import { createSystem } from '../createSystem';

const parser = system({
// verify that strict mode allows properties that don't rely on theme values
textAlign: true,
mx: {

@@ -183,2 +185,3 @@ properties: ['marginLeft', 'marginRight'],

bg: 'blue',
textAlign: 'center',
});

@@ -189,2 +192,3 @@ expect(style).toEqual({

marginRight: 0,
textAlign: 'center',
'@media screen and (min-width: 40em)': {

@@ -191,0 +195,0 @@ marginLeft: 6,

@@ -19,6 +19,7 @@ import { Transform } from '../../core/types';

const [[width, style, color]] = tokenizeValue(path);
const borderWidth = get(
props?.theme?.borderWidths,
width,
strict ? undefined : width
strict && !!object ? undefined : width
);

@@ -28,3 +29,3 @@ const borderStyle = get(

style,
strict ? undefined : style
strict && !!object ? undefined : style
);

@@ -34,5 +35,5 @@ const borderColor = get(

color,
strict ? undefined : color
strict && !!object ? undefined : color
);
return [borderWidth, borderStyle, borderColor].filter(Boolean).join(' ');
};

@@ -94,1 +94,43 @@ import { border } from '..';

});
test('strict only allows theme values', () => {
const strictSystem = createSystem({ strict: true });
const strictParser = strictSystem(border);
expect(
strictParser({
theme: {
breakpoints: [],
colors: { red500: '#ff0000' },
borders: { base: '1px solid papayawhip' },
borderWidths: { thin: '1px' },
borderStyles: { solid: 'solid' },
},
border: '$thin $solid $red500',
borderRight: '$base',
})
).toMatchObject({
border: '1px solid #ff0000',
borderRight: '1px solid papayawhip',
});
expect(
strictParser({
theme: {
breakpoints: [],
colors: { red500: '#ff0000' },
borders: { base: '1px solid papayawhip' },
},
border: '1px solid $red500',
borderLeft: '1px solid $red500',
borderRight: '$base',
borderBottom: '1px solid',
borderTop: '1px solid blue',
})
).toMatchObject({
borderLeft: '#ff0000',
border: '#ff0000',
borderRight: '1px solid papayawhip',
});
});

@@ -14,3 +14,3 @@ import { Transform } from '../core/types';

const raw = path.slice(1);
const value = get(object, raw, raw);
const value = get(object, raw, strict && !!object ? undefined : raw);
if (isNumber(value)) {

@@ -21,3 +21,3 @@ return value * -1;

}
return get(object, path, strict ? undefined : path);
return get(object, path, strict && !!object ? undefined : path);
}

@@ -29,3 +29,7 @@

const absolute = Math.abs(num);
const value = get(object, absolute, strict ? undefined : absolute);
const value = get(
object,
absolute,
strict && !!object ? undefined : absolute
);
if (isNumber(value)) {

@@ -32,0 +36,0 @@ return value * (isNegative ? -1 : 1);

import { Transform } from '../../core/types';
import { tokenizeValue } from '../tokenizeValue';
export const getShadow: Transform = ({ path, object, get, props }) => {
export const getShadow: Transform = ({ path, object, get, props, strict }) => {
let result = get(object, path);

@@ -12,3 +12,7 @@ if (result) {

.map((chain) =>
chain.map((val) => get(props?.theme?.colors, val, val)).join(' ')
chain
.map((val) =>
get(props?.theme?.colors, val, strict && !!object ? undefined : val)
)
.join(' ')
)

@@ -15,0 +19,0 @@ .join(', ');

@@ -282,1 +282,28 @@ import { space } from '..';

});
test('does not allow non theme values if strict enabled', () => {
const strictSystem = createSystem({ strict: true });
const strictSpace = strictSystem(space);
const strictParser = (config: { [x: string]: any }) =>
strictSpace({
theme: {
breakpoints: ['40em', '52em', '64em'],
space: [0, 4, 8, 12, 16],
},
...config,
});
expect(
strictParser({
m: '4px',
})
).toEqual({});
expect(
strictParser({
m: '$2',
})
).toEqual({ margin: 8 });
expect(strictParser({ m: '$2 $4', p: '$2 $4' })).toEqual({
margin: '8px 16px',
padding: '8px 16px',
});
});

@@ -17,3 +17,7 @@ import { PropConfigCollection, Transform } from '../../core/types';

if (transition.length === 1) {
return get(object, transition[0], strict ? undefined : transition[0]);
return get(
object,
transition[0],
strict && !!object ? undefined : transition[0]
);
}

@@ -20,0 +24,0 @@ return transition.join(' ');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc