styled-components
Advanced tools
Comparing version 6.0.0-beta.6 to 6.0.0-beta.7
@@ -8,3 +8,3 @@ import { SC_VERSION } from './constants'; | ||
import ServerStyleSheet from './models/ServerStyleSheet'; | ||
import StyleSheetManager, { StyleSheetConsumer, StyleSheetContext } from './models/StyleSheetManager'; | ||
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager'; | ||
import ThemeProvider, { ThemeConsumer, ThemeContext } from './models/ThemeProvider'; | ||
@@ -19,2 +19,2 @@ import isStyledComponent from './utils/isStyledComponent'; | ||
export { AttrsArg as Attrs, DefaultTheme, ShouldForwardProp } from './types'; | ||
export { createGlobalStyle, css, isStyledComponent, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, }; | ||
export { createGlobalStyle, css, isStyledComponent, IStyleSheetManager, IStyleSheetContext, IStylisContext, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, }; |
import styled from './constructors/styled'; | ||
export * from './base'; | ||
export { CSSProp, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, WebTarget, } from './types'; | ||
export { styled as default }; | ||
export { styled, styled as default }; |
import React from 'react'; | ||
import StyleSheet from '../sheet'; | ||
import { Stringifier } from '../types'; | ||
declare type Props = { | ||
children?: React.ReactChild; | ||
export declare type IStyleSheetContext = StyleSheet | void; | ||
export declare const StyleSheetContext: React.Context<IStyleSheetContext>; | ||
export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>; | ||
export declare type IStylisContext = Stringifier | void; | ||
export declare const StylisContext: React.Context<IStylisContext>; | ||
export declare const StylisConsumer: React.Consumer<IStylisContext>; | ||
export declare const mainSheet: StyleSheet; | ||
export declare const mainStylis: Stringifier; | ||
export declare function useStyleSheet(): StyleSheet; | ||
export declare function useStylis(): Stringifier; | ||
export declare type IStyleSheetManager = React.PropsWithChildren<{ | ||
/** | ||
* If desired, you can pass this prop to disable "speedy" insertion mode, which | ||
* uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet). | ||
* When disabled, rules are inserted as simple text into style blocks. | ||
*/ | ||
disableCSSOMInjection?: boolean; | ||
/** | ||
* If you are working exclusively with modern browsers, vendor prefixes can often be omitted | ||
* to reduce the weight of CSS on the page. | ||
*/ | ||
disableVendorPrefixes?: boolean; | ||
/** | ||
* Provide an optional selector to be prepended to all generated style rules. | ||
*/ | ||
namespace?: string; | ||
/** | ||
* Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios. | ||
*/ | ||
sheet?: StyleSheet; | ||
/** | ||
* An array of plugins to be run by stylis (style processor) during compilation. | ||
* Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis). | ||
* | ||
* \* The plugin(s) must be compatible with stylis v4 or above. | ||
*/ | ||
stylisPlugins?: stylis.Middleware[]; | ||
/** | ||
* Provide an alternate DOM node to host generated styles; useful for iframes. | ||
*/ | ||
target?: HTMLElement; | ||
}; | ||
export declare const StyleSheetContext: React.Context<void | StyleSheet>; | ||
export declare const StyleSheetConsumer: React.Consumer<void | StyleSheet>; | ||
export declare const StylisContext: React.Context<void | Stringifier>; | ||
export declare const StylisConsumer: React.Consumer<void | Stringifier>; | ||
export declare const mainSheet: StyleSheet; | ||
export declare const mainStylis: Stringifier; | ||
export declare function useStyleSheet(): StyleSheet; | ||
export declare function useStylis(): Stringifier; | ||
export default function StyleSheetManager(props: Props): JSX.Element; | ||
export {}; | ||
}>; | ||
export declare function StyleSheetManager(props: IStyleSheetManager): JSX.Element; |
@@ -37,2 +37,2 @@ import React from 'react'; | ||
export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme }; | ||
export default styled; | ||
export { styled, styled as default }; |
@@ -11,7 +11,2 @@ 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var traverse__default = /*#__PURE__*/_interopDefaultLegacy(traverse); | ||
var babelPlugin__default = /*#__PURE__*/_interopDefaultLegacy(babelPlugin); | ||
function styledComponentsMacro(_a) { | ||
@@ -42,3 +37,3 @@ var references = _a.references, state = _a.state, t = _a.babel.types, _b = _a.config, _c = _b === void 0 ? {} : _b, _d = _c.importModuleName, importModuleName = _d === void 0 ? 'styled-components' : _d, config = tslib.__rest(_c, ["importModuleName"]); | ||
var stateWithOpts = tslib.__assign(tslib.__assign({}, state), { opts: tslib.__assign(tslib.__assign({}, config), { topLevelImportPaths: (config.topLevelImportPaths || []).concat(importModuleName) }), customImportName: customImportName }); | ||
traverse__default["default"](program.parent, babelPlugin__default["default"]({ types: t }).visitor, undefined, stateWithOpts); | ||
traverse(program.parent, babelPlugin({ types: t }).visitor, undefined, stateWithOpts); | ||
} | ||
@@ -49,3 +44,3 @@ var index = babelPluginMacros.createMacro(styledComponentsMacro, { | ||
exports["default"] = index; | ||
exports.default = index; | ||
//# sourceMappingURL=styled-components-macro.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=/*#__PURE__*/t(e),n="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",o="active",s="data-styled-version",a="6.0.0-beta.6",i="/*!sc*/\n",c="undefined"!=typeof window&&"HTMLElement"in window,u=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),l={},f=function(){return(f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function p(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var d=Object.freeze([]),h=Object.freeze({});function m(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var g=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw m(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}var a=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var i=t.length;s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)}else this.tag.insertRule(a,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,s=n;s<o;s++)t+="".concat(this.tag.getRule(s)).concat(i);return t},e}(),v=new Map,y=new Map,S=1,b=function(e){if(v.has(e))return v.get(e);for(;y.has(S);)S++;var t=S++;return v.set(e,t),y.set(t,e),t},w=function(e,t){v.set(e,t),y.set(t,e)},C="style[".concat(n,"][").concat(s,'="').concat(a,'"]'),x=new RegExp("^".concat(n,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),I=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},O=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(i),o=[],s=0,a=n.length;s<a;s++){var c=n[s].trim();if(c){var u=c.match(x);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(w(f,l),I(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}};function P(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var _=function(e){var t=document.head,r=e||t,i=document.createElement("style"),c=function(e){for(var t=e.childNodes,r=t.length;r>=0;r--){var o=t[r];if(o&&1===o.nodeType&&o.hasAttribute(n))return o}}(r),u=void 0!==c?c.nextSibling:null;i.setAttribute(n,o),i.setAttribute(s,a);var l=P();return l&&i.setAttribute("nonce",l),r.insertBefore(i,u),i},E=function(){function e(e){var t=this.element=_(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw m(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),j=function(){function e(e){var t=this.element=_(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),A=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),R=c,k={isServer:!c,useCSSOMInjection:!u},$=function(){function e(e,t,r){void 0===e&&(e=h),void 0===t&&(t={}),this.options=f(f({},k),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&c&&R&&(R=!1,function(e){for(var t=document.querySelectorAll(C),r=0,s=t.length;r<s;r++){var a=t[r];a&&a.getAttribute(n)!==o&&(O(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}return e.registerId=function(e){return b(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(f(f({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new A(r):t?new E(r):new j(r)}(this.options),new g(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(b(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(b(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(b(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var t=e.getTag(),r=t.length,o="",s=function(r){var s=function(e){return y.get(e)}(r);if(void 0===s)return"continue";var a=e.names.get(s),c=t.getGroup(r);if(void 0===a||0===c.length)return"continue";var u="".concat(n,".g").concat(r,'[id="').concat(s,'"]'),l="";void 0!==a&&a.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(c).concat(u,'{content:"').concat(l,'"}').concat(i)},a=0;a<r;a++)s(a);return o}(this)},e}(),N="-ms-",T="-moz-",D="-webkit-",z="comm",G="rule",M="decl",B="@keyframes",F=Math.abs,L=String.fromCharCode,W=Object.assign;function Y(e){return e.trim()}function H(e,t){return(e=t.exec(e))?e[0]:e}function q(e,t,r){return e.replace(t,r)}function V(e,t){return e.indexOf(t)}function U(e,t){return 0|e.charCodeAt(t)}function Z(e,t,r){return e.slice(t,r)}function J(e){return e.length}function K(e){return e.length}function Q(e,t){return t.push(e),e}var X=1,ee=1,te=0,re=0,ne=0,oe="";function se(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:X,column:ee,length:a,return:""}}function ae(e,t){return W(se("",null,null,"",null,null,0),e,{length:-e.length},t)}function ie(){return ne=re<te?U(oe,re++):0,ee++,10===ne&&(ee=1,X++),ne}function ce(){return U(oe,re)}function ue(){return re}function le(e,t){return Z(oe,e,t)}function fe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pe(e){return Y(le(re-1,me(91===e?e+2:40===e?e+1:e)))}function de(e){for(;(ne=ce())&&ne<33;)ie();return fe(e)>2||fe(ne)>3?"":" "}function he(e,t){for(;--t&&ie()&&!(ne<48||ne>102||ne>57&&ne<65||ne>70&&ne<97););return le(e,ue()+(t<6&&32==ce()&&32==ie()))}function me(e){for(;ie();)switch(ne){case e:return re;case 34:case 39:34!==e&&39!==e&&me(ne);break;case 40:41===e&&me(e);break;case 92:ie()}return re}function ge(e,t){for(;ie()&&e+ne!==57&&(e+ne!==84||47!==ce()););return"/*"+le(t,re-1)+"*"+L(47===e?e:ie())}function ve(e){for(;!fe(ce());)ie();return le(e,re)}function ye(e){return function(e){return oe="",e}(Se("",null,null,null,[""],e=function(e){return X=ee=1,te=J(oe=e),re=0,[]}(e),0,[0],e))}function Se(e,t,r,n,o,s,a,i,c){for(var u=0,l=0,f=a,p=0,d=0,h=0,m=1,g=1,v=1,y=0,S="",b=o,w=s,C=n,x=S;g;)switch(h=y,y=ie()){case 40:if(108!=h&&58==U(x,f-1)){-1!=V(x+=q(pe(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=pe(y);break;case 9:case 10:case 13:case 32:x+=de(h);break;case 92:x+=he(ue()-1,7);continue;case 47:switch(ce()){case 42:case 47:Q(we(ge(ie(),ue()),t,r),c);break;default:x+="/"}break;case 123*m:i[u++]=J(x)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:d>0&&J(x)-f&&Q(d>32?Ce(x+";",n,r,f-1):Ce(q(x," ","")+";",n,r,f-2),c);break;case 59:x+=";";default:if(Q(C=be(x,t,r,u,l,o,i,S,b=[],w=[],f),s),123===y)if(0===l)Se(x,t,C,C,b,s,f,i,w);else switch(99===p&&110===U(x,3)?100:p){case 100:case 109:case 115:Se(e,C,C,n&&Q(be(e,C,C,0,0,o,i,S,o,b=[],f),w),o,w,f,i,n?b:w);break;default:Se(x,C,C,C,[""],w,0,i,w)}}u=l=d=0,m=v=1,S=x="",f=a;break;case 58:f=1+J(x),d=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(ne=re>0?U(oe,--re):0,ee--,10===ne&&(ee=1,X--),ne))continue;switch(x+=L(y),y*m){case 38:v=l>0?1:(x+="\f",-1);break;case 44:i[u++]=(J(x)-1)*v,v=1;break;case 64:45===ce()&&(x+=pe(ie())),p=ce(),l=f=J(S=x+=ve(ue())),y++;break;case 45:45===h&&2==J(x)&&(m=0)}}return s}function be(e,t,r,n,o,s,a,i,c,u,l){for(var f=o-1,p=0===o?s:[""],d=K(p),h=0,m=0,g=0;h<n;++h)for(var v=0,y=Z(e,f+1,f=F(m=a[h])),S=e;v<d;++v)(S=Y(m>0?p[v]+" "+y:q(y,/&\f/g,p[v])))&&(c[g++]=S);return se(e,t,r,0===o?G:i,c,u,l)}function we(e,t,r){return se(e,t,r,z,L(ne),Z(e,2,-2),0)}function Ce(e,t,r,n){return se(e,t,r,M,Z(e,0,n),Z(e,n+1,-1),n)}function xe(e,t,r){switch(function(e,t){return 45^U(e,0)?(((t<<2^U(e,0))<<2^U(e,1))<<2^U(e,2))<<2^U(e,3):0}(e,t)){case 5103:return D+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return D+e+e;case 4789:return T+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return D+e+T+e+N+e+e;case 5936:switch(U(e,t+11)){case 114:return D+e+N+q(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return D+e+N+q(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return D+e+N+q(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return D+e+N+e+e;case 6165:return D+e+N+"flex-"+e+e;case 5187:return D+e+q(e,/(\w+).+(:[^]+)/,D+"box-$1$2"+N+"flex-$1$2")+e;case 5443:return D+e+N+"flex-item-"+q(e,/flex-|-self/g,"")+(H(e,/flex-|baseline/)?"":N+"grid-row-"+q(e,/flex-|-self/g,""))+e;case 4675:return D+e+N+"flex-line-pack"+q(e,/align-content|flex-|-self/g,"")+e;case 5548:return D+e+N+q(e,"shrink","negative")+e;case 5292:return D+e+N+q(e,"basis","preferred-size")+e;case 6060:return D+"box-"+q(e,"-grow","")+D+e+N+q(e,"grow","positive")+e;case 4554:return D+q(e,/([^-])(transform)/g,"$1"+D+"$2")+e;case 6187:return q(q(q(e,/(zoom-|grab)/,D+"$1"),/(image-set)/,D+"$1"),e,"")+e;case 5495:case 3959:return q(e,/(image-set\([^]*)/,D+"$1$`$1");case 4968:return q(q(e,/(.+:)(flex-)?(.*)/,D+"box-pack:$3"+N+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+D+e+e;case 4200:if(!H(e,/flex-|baseline/))return N+"grid-column-align"+Z(e,t)+e;break;case 2592:case 3360:return N+q(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,H(e.props,/grid-\w+-end/)})?~V(e+(r=r[t].value),"span")?e:N+q(e,"-start","")+e+N+"grid-row-span:"+(~V(r,"span")?H(r,/\d+/):+H(r,/\d+/)-+H(e,/\d+/))+";":N+q(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return H(e.props,/grid-\w+-start/)})?e:N+q(q(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return q(e,/(.+)-inline(.+)/,D+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(J(e)-1-t>6)switch(U(e,t+1)){case 109:if(45!==U(e,t+4))break;case 102:return q(e,/(.+:)(.+)-([^]+)/,"$1"+D+"$2-$3$1"+T+(108==U(e,t+3)?"$3":"$2-$3"))+e;case 115:return~V(e,"stretch")?xe(q(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return q(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return N+r+":"+n+i+(o?N+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===U(e,t+6))return q(e,":",":"+D)+e;break;case 6444:switch(U(e,45===U(e,14)?18:11)){case 120:return q(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+D+(45===U(e,14)?"inline-":"")+"box$3$1"+D+"$2$3$1"+N+"$2box$3")+e;case 100:return q(e,":",":"+N)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return q(e,"scroll-","scroll-snap-")+e}return e}function Ie(e,t){for(var r="",n=K(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Oe(e,t,r,n){switch(e.type){case"@import":case M:return e.return=e.return||e.value;case z:return"";case B:return e.return=e.value+"{"+Ie(e.children,n)+"}";case G:e.value=e.props.join(",")}return J(r=Ie(e.children,n))?e.return=e.value+"{"+r+"}":""}function Pe(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case M:return void(e.return=xe(e.value,e.length,r));case B:return Ie([ae(e,{value:q(e.value,"@","@"+D)})],n);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(H(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ie([ae(e,{props:[q(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ie([ae(e,{props:[q(t,/:(plac\w+)/,":"+D+"input-$1")]}),ae(e,{props:[q(t,/:(plac\w+)/,":-moz-$1")]}),ae(e,{props:[q(t,/:(plac\w+)/,N+"input-$1")]})],n)}return""})}}var _e=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ee=function(e){return _e(5381,e)},je=/^\s*\/\/.*$/gm,Ae=[":","[",".","#"];function Re(e){var t,r,n,o,s=void 0===e?h:e,a=s.options,i=void 0===a?h:a,c=s.plugins,u=void 0===c?d:c,l=function(e,n,s){return 0===n&&Ae.includes(s[r.length])||s.match(o)?e:".".concat(t)},f=function(e){if(e.type===G&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(n,l)}},p=function(e,s,a,c){void 0===s&&(s=""),void 0===a&&(a=""),void 0===c&&(c="&");var l=e.replace(je,"");t=c,r=s,n=new RegExp("\\".concat(r,"\\b"),"g"),o=new RegExp("(\\".concat(r,"\\b){2,}"));var p,d,h=u.slice();return(i.prefix||void 0===i.prefix)&&h.unshift(Pe),h.push(f,Oe),p=ye(a||s?"".concat(a," ").concat(s," { ").concat(l," }"):l),d=function(e){var t=K(e);return function(r,n,o,s){for(var a="",i=0;i<t;i++)a+=e[i](r,n,o,s)||"";return a}}(h),p.map(function(e,t){return d(e,t,p,d)}).filter(Boolean)};return p.hash=u.length?u.reduce(function(e,t){return t.name||m(15),_e(e,t.name)},5381).toString():"",p}var ke=r.default.createContext(void 0),$e=ke.Consumer,Ne=r.default.createContext(void 0),Te=new $,De=Re();function ze(){return e.useContext(ke)||Te}function Ge(){return e.useContext(Ne)||De}function Me(t){var n=e.useState(t.stylisPlugins),o=n[0],s=n[1],a=ze(),i=e.useMemo(function(){var e=a;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e},[t.disableCSSOMInjection,t.sheet,t.target]),c=e.useMemo(function(){return Re({options:{prefix:!t.disableVendorPrefixes},plugins:o})},[t.disableVendorPrefixes,o]);return e.useEffect(function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var u=s[c];if(!i(u))return!1;if(!1===(o=void 0)||void 0===o&&e[u]!==t[u])return!1}return!0})(o,t.stylisPlugins)||s(t.stylisPlugins)},[t.stylisPlugins]),r.default.createElement(ke.Provider,{value:i},r.default.createElement(Ne.Provider,{value:c},t.children))}var Be=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=De);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){throw m(12,String(r.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=De),this.name+e.hash},e}();function Fe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Le(e,t){return e(t={exports:{}},t.exports),t.exports}var We=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}});Fe(We),Fe(Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}}));var Ye=Le(function(e){e.exports=We});function He(e){return e.displayName||e.name||"Component"}var qe=/[A-Z]/,Ve=/[A-Z]/g,Ue=/^ms-/,Ze=function(e){return"-".concat(e.toLowerCase())};function Je(e){return qe.test(e)&&!e.startsWith("--")?e.replace(Ve,Ze).replace(Ue,"-ms-"):e}function Ke(e){return"function"==typeof e}function Qe(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function Xe(e){return"object"==typeof e&&"styledComponentId"in e}var et=function(e){return null==e||!1===e||""===e},tt=function(e,t){var r,n=[];for(var o in e)e.hasOwnProperty(o)&&!et(e[o])&&(Array.isArray(e[o])&&e[o].isCss||Ke(e[o])?n.push("".concat(Je(o),":"),e[o],";"):Qe(e[o])?n.push.apply(n,tt(e[o],o)):n.push("".concat(Je(o),": ").concat(null==(r=e[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in Ye?String(r).trim():"".concat(r,"px"),";")));return t?p(p(["".concat(t," {")],n,!0),["}"],!1):n};function rt(e,t,r,n){if(Array.isArray(e)){for(var o=[],s=0,a=e.length,i=void 0;s<a;s+=1)0!==(i=rt(e[s],t,r,n)).length&&o.push.apply(o,i);return o}return et(e)?[]:Xe(e)?[".".concat(e.styledComponentId)]:Ke(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?[e]:rt(i=e(t),t,r,n):e instanceof Be?r?(e.inject(r,n),[e.getName(n)]):[e]:Qe(e)?tt(e):[e.toString()];var c}function nt(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Ke(r)&&!Xe(r))return!1}return!0}var ot=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=nt(e),$.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(rt(this.rules,t,r,n).join(""),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&$.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),st=r.default.createContext(void 0),at=st.Consumer;function it(e,t,r){return void 0===r&&(r=h),e.theme!==r.theme&&e.theme||t||r.theme}var ct=/(a)(d)/gi,ut=function(e){return String.fromCharCode(e+(e>25?39:97))};function lt(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=ut(t%52)+r;return(ut(t%52)+r).replace(ct,"$1-$2")}function ft(e){return lt(Ee(e)>>>0)}function pt(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var dt,ht=function(e){return Object.assign(e,{isCss:!0})};function mt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Ke(e)||Qe(e)){var n=e;return ht(rt(pt(d,p([n],t,!0))))}var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?rt(o):ht(rt(pt(o,t)))}var gt="function"==typeof Symbol&&Symbol.for,vt=gt?Symbol.for("react.memo"):60115,yt=gt?Symbol.for("react.forward_ref"):60112,St={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},bt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ct=((dt={})[yt]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},dt[vt]=wt,dt);function xt(e){return("type"in(t=e)&&t.type.$$typeof)===vt?wt:"$$typeof"in e?Ct[e.$$typeof]:St;var t}var It=Object.defineProperty,Ot=Object.getOwnPropertyNames,Pt=Object.getOwnPropertySymbols,_t=Object.getOwnPropertyDescriptor,Et=Object.getPrototypeOf,jt=Object.prototype;function At(e,t,r){if("string"!=typeof t){if(jt){var n=Et(t);n&&n!==jt&&At(e,n,r)}var o=Ot(t);Pt&&(o=o.concat(Pt(t)));for(var s=xt(e),a=xt(t),i=0;i<o.length;++i){var c=o[i];if(!(c in bt||r&&r[c]||a&&c in a||s&&c in s)){var u=_t(t,c);try{It(e,c,u)}catch(e){}}}}return e}var Rt=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),r=P(),o=[r&&'nonce="'.concat(r,'"'),"".concat(n,'="true"'),"".concat(s,'="').concat(a,'"')].filter(Boolean).join(" ");return"<style ".concat(o,">").concat(t,"</style>")},this.getStyleTags=function(){if(e.sealed)throw m(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw m(2);var o=((t={})[n]="",t[s]=a,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),i=P();return i&&(o.nonce=i),[r.default.createElement("style",f({},o,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new $({isServer:!0}),this.sealed=!1}return e.prototype.collectStyles=function(e){if(this.sealed)throw m(2);return r.default.createElement(Me,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw m(3)},e}(),kt=/*#__PURE__*/Object.freeze({__proto__:null,createGlobalStyle:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=mt.apply(void 0,p([e],t,!1)),s="sc-global-".concat(ft(JSON.stringify(o))),a=new ot(o,s),i=function(e){var t=ze(),n=Ge(),o=r.default.useContext(st),i=r.default.useRef(t.allocateGSInstance(s)).current;return t.server&&c(i,e,t,o,n),(r.default.useInsertionEffect||r.default.useLayoutEffect)(function(){if(!t.server)return c(i,e,t,o,n),function(){return a.removeStyles(i,t)}},[i,e,t,o,n]),null};function c(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,l,r,o);else{var s=f(f({},t),{theme:it(t,n,i.defaultProps)});a.renderStyles(e,s,r,o)}}return r.default.memo(i)},css:mt,isStyledComponent:Xe,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=mt.apply(void 0,p([e],t,!1)).join(""),o=ft(n);return new Be(o,n)},ServerStyleSheet:Rt,StyleSheetConsumer:$e,StyleSheetContext:ke,StyleSheetManager:Me,ThemeConsumer:at,ThemeContext:st,ThemeProvider:function(t){var n=e.useContext(st),o=e.useMemo(function(){return function(e,t){if(!e)throw m(14);if(Ke(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw m(8);return t?f(f({},t),e):e}(t.theme,n)},[t.theme,n]);return t.children?r.default.createElement(st.Provider,{value:o},t.children):null},useTheme:function(){return e.useContext(st)},version:a,withTheme:function(e){var t=r.default.forwardRef(function(t,n){var o=it(t,r.default.useContext(st),e.defaultProps);return r.default.createElement(e,f({},t,{theme:o,ref:n}))});return t.displayName="WithTheme(".concat(He(e),")"),At(t,e)},__PRIVATE__:{StyleSheet:$,mainSheet:Te}}),$t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Nt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Tt=/(^-|-$)/g;function Dt(e){return e.replace(Nt,"-").replace(Tt,"")}function zt(e){return"string"==typeof e&&!0}function Gt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function Mt(e,t,r){if(void 0===r&&(r=!1),!r&&!Qe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Mt(e[n],t[n]);else if(Qe(t))for(var n in t)e[n]=Mt(e[n],t[n]);return e}var Bt=Ee(a),Ft=function(){function e(e,t,r){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&nt(e),this.componentId=t,this.baseHash=_e(Bt,t),this.baseStyle=r,$.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))this.names.push(this.staticRulesId);else{var o=rt(this.rules,e,t,r).join(""),s=lt(_e(this.baseHash,o)>>>0);if(!t.hasNameForId(n,s)){var a=r(o,".".concat(s),void 0,n);t.insertRules(n,s,a)}this.names.push(s),this.staticRulesId=s}else{for(var i=this.rules.length,c=_e(this.baseHash,r.hash),u="",l=0;l<i;l++){var f=this.rules[l];if("string"==typeof f)u+=f;else if(f){var p=rt(f,e,t,r),d=Array.isArray(p)?p.join(""):p;c=_e(c,d),u+=d}}if(u){var h=lt(c>>>0);if(!t.hasNameForId(n,h)){var m=r(u,".".concat(h),void 0,n);t.insertRules(n,h,m)}this.names.push(h)}}return this.names.join(" ")},e}(),Lt={};function Wt(t,n,o){var s=Xe(t),i=t,c=!zt(t),u=n.attrs,l=void 0===u?d:u,p=n.componentId,m=void 0===p?function(e,t){var r="string"!=typeof e?"sc":Dt(e);Lt[r]=(Lt[r]||0)+1;var n="".concat(r,"-").concat(ft(a+r+Lt[r]));return t?"".concat(t,"-").concat(n):n}(n.displayName,n.parentComponentId):p,g=n.displayName,v=void 0===g?function(e){return zt(e)?"styled.".concat(e):"Styled(".concat(He(e),")")}(t):g,y=n.displayName&&n.componentId?"".concat(Dt(n.displayName),"-").concat(n.componentId):n.componentId||m,S=s&&i.attrs?i.attrs.concat(l).filter(Boolean):l,b=n.shouldForwardProp;if(s&&i.shouldForwardProp){var w=i.shouldForwardProp;if(n.shouldForwardProp){var C=n.shouldForwardProp;b=function(e,t){return w(e,t)&&C(e,t)}}else b=w}var x=new Ft(o,y,s?i.componentStyle:void 0),I=x.isStatic&&0===l.length;function O(t,r){return function(t,r,n,o){var s=t.attrs,a=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,u=t.shouldForwardProp,l=t.styledComponentId,p=t.target,d=it(r,e.useContext(st),i)||h,m=s.reduce(function(e,t){var r="function"==typeof t?t(e):t;for(var n in r)e[n]="className"===n?Gt(e[n],r[n]):"style"===n?f(f({},e[n]),r[n]):r[n];return e},f(f({},r),{theme:d})),g=function(e,t,r,n){var o=ze(),s=Ge();return e.generateAndInjectStyles(t?h:r,o,s)}(a,o,m),v=n,y=m.as||p,S=zt(y),b={};for(var w in m)void 0===m[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?b.as=m.forwardedAs:u&&!u(w,y)||(b[w]=m[w]));return b[S&&-1===$t.indexOf(y)?"class":"className"]=c.concat(l,g!==l?g:"",m.className||"").filter(Boolean).join(" "),b.ref=v,e.createElement(y,b)}(P,t,r,I)}O.displayName=v;var P=r.default.forwardRef(O);return P.attrs=S,P.componentStyle=x,P.displayName=v,P.shouldForwardProp=b,P.foldedComponentIds=s?i.foldedComponentIds.concat(i.styledComponentId):d,P.styledComponentId=y,P.target=s?i.target:t,P.withComponent=function(e){var t=n.componentId,r=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(n,["componentId"]),s=t&&"".concat(t,"-").concat(zt(e)?e:Dt(He(e)));return Wt(e,f(f({},r),{attrs:S,componentId:s}),o)},Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Mt(e,o[n],!0);return e}({},i.defaultProps,e):e}}),P.toString=function(){return".".concat(P.styledComponentId)},c&&At(P,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),P}function Yt(e,t,r){if(void 0===r&&(r=h),!t)throw m(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,mt.apply(void 0,p([n],o,!1)))};return n.attrs=function(n){return Yt(e,t,f(f({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Yt(e,t,f(f({},r),n))},n}var Ht=function(e){return Yt(Wt,e)},qt=Ht;for(var Vt in $t.forEach(function(e){qt[e]=Ht(e)}),kt)qt[Vt]=kt[Vt];return qt}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e=e||self).styled=t(e.React)}(this,function(e){"use strict";var t="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",r="active",n="data-styled-version",o="6.0.0-beta.7",s="/*!sc*/\n",a="undefined"!=typeof window&&"HTMLElement"in window,i=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY),c={},u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e,t,r){if(r||2===arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}var f=Object.freeze([]),p=Object.freeze({});function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var d=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw h(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=n;s<o;s++)this.groupSizes[s]=0}var a=this.indexOfGroup(e+1);if(Array.isArray(t)){s=0;for(var i=t.length;s<i;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)}else this.tag.insertRule(a,t)&&this.groupSizes[e]++},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,a=n;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(s);return t},e}(),g=new Map,m=new Map,v=1,y=function(e){if(g.has(e))return g.get(e);for(;m.has(v);)v++;var t=v++;return g.set(e,t),m.set(t,e),t},S=function(e,t){g.set(e,t),m.set(t,e)},b="style[".concat(t,"][").concat(n,'="').concat(o,'"]'),w=new RegExp("^".concat(t,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),C=function(e,t,r){for(var n,o=r.split(","),s=0,a=o.length;s<a;s++)(n=o[s])&&e.registerName(t,n)},x=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(s),o=[],a=0,i=n.length;a<i;a++){var c=n[a].trim();if(c){var u=c.match(w);if(u){var l=0|parseInt(u[1],10),f=u[2];0!==l&&(S(f,l),C(e,f,u[3]),e.getTag().insertRules(l,o)),o.length=0}else o.push(c)}}};function I(){return"undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var P=function(e){var s=document.head,a=e||s,i=document.createElement("style"),c=function(e){for(var r=e.childNodes,n=r.length;n>=0;n--){var o=r[n];if(o&&1===o.nodeType&&o.hasAttribute(t))return o}}(a),u=void 0!==c?c.nextSibling:null;i.setAttribute(t,r),i.setAttribute(n,o);var l=I();return l&&i.setAttribute("nonce",l),a.insertBefore(i,u),i},A=function(){function e(e){var t=this.element=P(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw h(17)}(t),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),E=function(){function e(e){var t=this.element=P(e);this.nodes=t.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),_=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),R=a,$={isServer:!a,useCSSOMInjection:!i},j=function(){function e(e,n,o){void 0===e&&(e=p),void 0===n&&(n={}),this.options=u(u({},$),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&a&&R&&(R=!1,function(e){for(var n=document.querySelectorAll(b),o=0,s=n.length;o<s;o++){var a=n[o];a&&a.getAttribute(t)!==r&&(x(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}return e.registerId=function(e){return y(e)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(u(u({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new _(r):t?new A(r):new E(r)}(this.options),new d(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(y(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(y(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(y(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e.prototype.toString=function(){return function(e){for(var r=e.getTag(),n=r.length,o="",a=function(n){var a=function(e){return m.get(e)}(n);if(void 0===a)return"continue";var i=e.names.get(a),c=r.getGroup(n);if(void 0===i||0===c.length)return"continue";var u="".concat(t,".g").concat(n,'[id="').concat(a,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(c).concat(u,'{content:"').concat(l,'"}').concat(s)},i=0;i<n;i++)a(i);return o}(this)},e}(),O="-ms-",k="-moz-",N="-webkit-",T="comm",D="rule",z="decl",G="@keyframes",B=Math.abs,F=String.fromCharCode,M=Object.assign;function L(e){return e.trim()}function W(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,r){return e.replace(t,r)}function H(e,t){return e.indexOf(t)}function q(e,t){return 0|e.charCodeAt(t)}function V(e,t,r){return e.slice(t,r)}function U(e){return e.length}function Z(e){return e.length}function J(e,t){return t.push(e),e}var K=1,Q=1,X=0,ee=0,te=0,re="";function ne(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:K,column:Q,length:a,return:""}}function oe(e,t){return M(ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function se(){return te=ee<X?q(re,ee++):0,Q++,10===te&&(Q=1,K++),te}function ae(){return q(re,ee)}function ie(){return ee}function ce(e,t){return V(re,e,t)}function ue(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function le(e){return L(ce(ee-1,he(91===e?e+2:40===e?e+1:e)))}function fe(e){for(;(te=ae())&&te<33;)se();return ue(e)>2||ue(te)>3?"":" "}function pe(e,t){for(;--t&&se()&&!(te<48||te>102||te>57&&te<65||te>70&&te<97););return ce(e,ie()+(t<6&&32==ae()&&32==se()))}function he(e){for(;se();)switch(te){case e:return ee;case 34:case 39:34!==e&&39!==e&&he(te);break;case 40:41===e&&he(e);break;case 92:se()}return ee}function de(e,t){for(;se()&&e+te!==57&&(e+te!==84||47!==ae()););return"/*"+ce(t,ee-1)+"*"+F(47===e?e:se())}function ge(e){for(;!ue(ae());)se();return ce(e,ee)}function me(e){return function(e){return re="",e}(ve("",null,null,null,[""],e=function(e){return K=Q=1,X=U(re=e),ee=0,[]}(e),0,[0],e))}function ve(e,t,r,n,o,s,a,i,c){for(var u=0,l=0,f=a,p=0,h=0,d=0,g=1,m=1,v=1,y=0,S="",b=o,w=s,C=n,x=S;m;)switch(d=y,y=se()){case 40:if(108!=d&&58==q(x,f-1)){-1!=H(x+=Y(le(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=le(y);break;case 9:case 10:case 13:case 32:x+=fe(d);break;case 92:x+=pe(ie()-1,7);continue;case 47:switch(ae()){case 42:case 47:J(Se(de(se(),ie()),t,r),c);break;default:x+="/"}break;case 123*g:i[u++]=U(x)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+l:h>0&&U(x)-f&&J(h>32?be(x+";",n,r,f-1):be(Y(x," ","")+";",n,r,f-2),c);break;case 59:x+=";";default:if(J(C=ye(x,t,r,u,l,o,i,S,b=[],w=[],f),s),123===y)if(0===l)ve(x,t,C,C,b,s,f,i,w);else switch(99===p&&110===q(x,3)?100:p){case 100:case 109:case 115:ve(e,C,C,n&&J(ye(e,C,C,0,0,o,i,S,o,b=[],f),w),o,w,f,i,n?b:w);break;default:ve(x,C,C,C,[""],w,0,i,w)}}u=l=h=0,g=v=1,S=x="",f=a;break;case 58:f=1+U(x),h=d;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==(te=ee>0?q(re,--ee):0,Q--,10===te&&(Q=1,K--),te))continue;switch(x+=F(y),y*g){case 38:v=l>0?1:(x+="\f",-1);break;case 44:i[u++]=(U(x)-1)*v,v=1;break;case 64:45===ae()&&(x+=le(se())),p=ae(),l=f=U(S=x+=ge(ie())),y++;break;case 45:45===d&&2==U(x)&&(g=0)}}return s}function ye(e,t,r,n,o,s,a,i,c,u,l){for(var f=o-1,p=0===o?s:[""],h=Z(p),d=0,g=0,m=0;d<n;++d)for(var v=0,y=V(e,f+1,f=B(g=a[d])),S=e;v<h;++v)(S=L(g>0?p[v]+" "+y:Y(y,/&\f/g,p[v])))&&(c[m++]=S);return ne(e,t,r,0===o?D:i,c,u,l)}function Se(e,t,r){return ne(e,t,r,T,F(te),V(e,2,-2),0)}function be(e,t,r,n){return ne(e,t,r,z,V(e,0,n),V(e,n+1,-1),n)}function we(e,t,r){switch(function(e,t){return 45^q(e,0)?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}(e,t)){case 5103:return N+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return N+e+e;case 4789:return k+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return N+e+k+e+O+e+e;case 5936:switch(q(e,t+11)){case 114:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return N+e+O+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return N+e+O+e+e;case 6165:return N+e+O+"flex-"+e+e;case 5187:return N+e+Y(e,/(\w+).+(:[^]+)/,N+"box-$1$2"+O+"flex-$1$2")+e;case 5443:return N+e+O+"flex-item-"+Y(e,/flex-|-self/g,"")+(W(e,/flex-|baseline/)?"":O+"grid-row-"+Y(e,/flex-|-self/g,""))+e;case 4675:return N+e+O+"flex-line-pack"+Y(e,/align-content|flex-|-self/g,"")+e;case 5548:return N+e+O+Y(e,"shrink","negative")+e;case 5292:return N+e+O+Y(e,"basis","preferred-size")+e;case 6060:return N+"box-"+Y(e,"-grow","")+N+e+O+Y(e,"grow","positive")+e;case 4554:return N+Y(e,/([^-])(transform)/g,"$1"+N+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,N+"$1"),/(image-set)/,N+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,N+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,N+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+N+e+e;case 4200:if(!W(e,/flex-|baseline/))return O+"grid-column-align"+V(e,t)+e;break;case 2592:case 3360:return O+Y(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,W(e.props,/grid-\w+-end/)})?~H(e+(r=r[t].value),"span")?e:O+Y(e,"-start","")+e+O+"grid-row-span:"+(~H(r,"span")?W(r,/\d+/):+W(r,/\d+/)-+W(e,/\d+/))+";":O+Y(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return W(e.props,/grid-\w+-start/)})?e:O+Y(Y(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,N+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(U(e)-1-t>6)switch(q(e,t+1)){case 109:if(45!==q(e,t+4))break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+N+"$2-$3$1"+k+(108==q(e,t+3)?"$3":"$2-$3"))+e;case 115:return~H(e,"stretch")?we(Y(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Y(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,s,a,i){return O+r+":"+n+i+(o?O+r+"-span:"+(s?a:+a-+n)+i:"")+e});case 4949:if(121===q(e,t+6))return Y(e,":",":"+N)+e;break;case 6444:switch(q(e,45===q(e,14)?18:11)){case 120:return Y(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+N+(45===q(e,14)?"inline-":"")+"box$3$1"+N+"$2$3$1"+O+"$2box$3")+e;case 100:return Y(e,":",":"+O)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Y(e,"scroll-","scroll-snap-")+e}return e}function Ce(e,t){for(var r="",n=Z(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function xe(e,t,r,n){switch(e.type){case"@import":case z:return e.return=e.return||e.value;case T:return"";case G:return e.return=e.value+"{"+Ce(e.children,n)+"}";case D:e.value=e.props.join(",")}return U(r=Ce(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ie(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case z:return void(e.return=we(e.value,e.length,r));case G:return Ce([oe(e,{value:Y(e.value,"@","@"+N)})],n);case D:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(W(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ce([oe(e,{props:[Y(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ce([oe(e,{props:[Y(t,/:(plac\w+)/,":"+N+"input-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,":-moz-$1")]}),oe(e,{props:[Y(t,/:(plac\w+)/,O+"input-$1")]})],n)}return""})}}var Pe=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ae=function(e){return Pe(5381,e)},Ee=/^\s*\/\/.*$/gm,_e=[":","[",".","#"];function Re(e){var t,r,n,o,s=void 0===e?p:e,a=s.options,i=void 0===a?p:a,c=s.plugins,u=void 0===c?f:c,l=function(e,n,s){return 0===n&&_e.includes(s[r.length])||s.match(o)?e:".".concat(t)},d=function(e){if(e.type===D&&e.value.includes("&")){var t=e.props;t[0]=t[0].replace(n,l)}},g=function(e,s,a,c){void 0===s&&(s=""),void 0===a&&(a=""),void 0===c&&(c="&");var l=e.replace(Ee,"");t=c,r=s,n=new RegExp("\\".concat(r,"\\b"),"g"),o=new RegExp("(\\".concat(r,"\\b){2,}"));var f,p,h=u.slice();return(i.prefix||void 0===i.prefix)&&h.unshift(Ie),h.push(d,xe),f=me(i.namespace||a||s?"".concat(i.namespace?i.namespace+" ":"").concat(a," ").concat(s," { ").concat(l," }"):l),p=function(e){var t=Z(e);return function(r,n,o,s){for(var a="",i=0;i<t;i++)a+=e[i](r,n,o,s)||"";return a}}(h),f.map(function(e,t){return p(e,t,f,p)}).filter(Boolean)};return g.hash=u.length?u.reduce(function(e,t){return t.name||h(15),Pe(e,t.name)},5381).toString():"",g}var $e=e.createContext(void 0),je=$e.Consumer,Oe=e.createContext(void 0),ke=new j,Ne=Re();function Te(){return e.useContext($e)||ke}function De(){return e.useContext(Oe)||Ne}function ze(t){var r=e.useState(t.stylisPlugins),n=r[0],o=r[1],s=Te(),a=e.useMemo(function(){var e=s;return t.sheet?e=t.sheet:t.target&&(e=e.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(e=e.reconstructWithOptions({useCSSOMInjection:!1})),e},[t.disableCSSOMInjection,t.sheet,t.target]),i=e.useMemo(function(){return Re({options:{namespace:t.namespace,prefix:!t.disableVendorPrefixes},plugins:n})},[t.disableVendorPrefixes,t.namespace,n]);return e.useEffect(function(){(function(e,t,r,n){var o=void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),c=0;c<s.length;c++){var u=s[c];if(!i(u))return!1;if(!1===(o=void 0)||void 0===o&&e[u]!==t[u])return!1}return!0})(n,t.stylisPlugins)||o(t.stylisPlugins)},[t.stylisPlugins]),e.createElement($e.Provider,{value:a},e.createElement(Oe.Provider,{value:i},t.children))}var Ge=function(){function e(e,t){var r=this;this.inject=function(e,t){void 0===t&&(t=Ne);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.toString=function(){throw h(12,String(r.name))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Ne),this.name+e.hash},e}(),Be={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Fe(e){return e.displayName||e.name||"Component"}var Me=/[A-Z]/,Le=/[A-Z]/g,We=/^ms-/,Ye=function(e){return"-".concat(e.toLowerCase())};function He(e){return Me.test(e)&&!e.startsWith("--")?e.replace(Le,Ye).replace(We,"-ms-"):e}function qe(e){return"function"==typeof e}function Ve(e){return!(null===e||"object"!=typeof e||e.constructor&&"Object"!==e.constructor.name||"[object Object]"!==(e.toString?e.toString():Object.prototype.toString.call(e))||"props"in e&&(e.$$typeof||void 0===e.constructor))}function Ue(e){return"object"==typeof e&&"styledComponentId"in e}var Ze=function(e){return null==e||!1===e||""===e},Je=function(e,t){var r,n=[];for(var o in e)e.hasOwnProperty(o)&&!Ze(e[o])&&(Array.isArray(e[o])&&e[o].isCss||qe(e[o])?n.push("".concat(He(o),":"),e[o],";"):Ve(e[o])?n.push.apply(n,Je(e[o],o)):n.push("".concat(He(o),": ").concat(null==(r=e[o])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||o in Be?String(r).trim():"".concat(r,"px"),";")));return t?l(l(["".concat(t," {")],n,!0),["}"],!1):n};function Ke(e,t,r,n){if(Array.isArray(e)){for(var o=[],s=0,a=e.length,i=void 0;s<a;s+=1)0!==(i=Ke(e[s],t,r,n)).length&&o.push.apply(o,i);return o}return Ze(e)?[]:Ue(e)?[".".concat(e.styledComponentId)]:qe(e)?"function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t?[e]:Ke(i=e(t),t,r,n):e instanceof Ge?r?(e.inject(r,n),[e.getName(n)]):[e]:Ve(e)?Je(e):[e.toString()];var c}function Qe(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(qe(r)&&!Ue(r))return!1}return!0}var Xe=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Qe(e),j.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var o=n(Ke(this.rules,t,r,n).join(""),""),s=this.componentId+e;r.insertRules(s,s,o)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&j.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)},e}(),et=e.createContext(void 0),tt=et.Consumer;function rt(e,t,r){return void 0===r&&(r=p),e.theme!==r.theme&&e.theme||t||r.theme}var nt=/(a)(d)/gi,ot=function(e){return String.fromCharCode(e+(e>25?39:97))};function st(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=ot(t%52)+r;return(ot(t%52)+r).replace(nt,"$1-$2")}function at(e){return st(Ae(e)>>>0)}function it(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var ct,ut=function(e){return Object.assign(e,{isCss:!0})};function lt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(qe(e)||Ve(e)){var n=e;return ut(Ke(it(f,l([n],t,!0))))}var o=e;return 0===t.length&&1===o.length&&"string"==typeof o[0]?Ke(o):ut(Ke(it(o,t)))}var ft="function"==typeof Symbol&&Symbol.for,pt=ft?Symbol.for("react.memo"):60115,ht=ft?Symbol.for("react.forward_ref"):60112,dt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vt=((ct={})[ht]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ct[pt]=mt,ct);function yt(e){return("type"in(t=e)&&t.type.$$typeof)===pt?mt:"$$typeof"in e?vt[e.$$typeof]:dt;var t}var St=Object.defineProperty,bt=Object.getOwnPropertyNames,wt=Object.getOwnPropertySymbols,Ct=Object.getOwnPropertyDescriptor,xt=Object.getPrototypeOf,It=Object.prototype;function Pt(e,t,r){if("string"!=typeof t){if(It){var n=xt(t);n&&n!==It&&Pt(e,n,r)}var o=bt(t);wt&&(o=o.concat(wt(t)));for(var s=yt(e),a=yt(t),i=0;i<o.length;++i){var c=o[i];if(!(c in gt||r&&r[c]||a&&c in a||s&&c in s)){var u=Ct(t,c);try{St(e,c,u)}catch(e){}}}}return e}var At=function(){function r(){var r=this;this._emitSheetCSS=function(){var e=r.instance.toString(),s=I(),a=[s&&'nonce="'.concat(s,'"'),"".concat(t,'="true"'),"".concat(n,'="').concat(o,'"')].filter(Boolean).join(" ");return"<style ".concat(a,">").concat(e,"</style>")},this.getStyleTags=function(){if(r.sealed)throw h(2);return r._emitSheetCSS()},this.getStyleElement=function(){var s;if(r.sealed)throw h(2);var a=((s={})[t]="",s[n]=o,s.dangerouslySetInnerHTML={__html:r.instance.toString()},s),i=I();return i&&(a.nonce=i),[e.createElement("style",u({},a,{key:"sc-0-0"}))]},this.seal=function(){r.sealed=!0},this.instance=new j({isServer:!0}),this.sealed=!1}return r.prototype.collectStyles=function(t){if(this.sealed)throw h(2);return e.createElement(ze,{sheet:this.instance},t)},r.prototype.interleaveWithNodeStream=function(e){throw h(3)},r}(),Et=/*#__PURE__*/Object.freeze({__proto__:null,createGlobalStyle:function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=lt.apply(void 0,l([t],r,!1)),s="sc-global-".concat(at(JSON.stringify(o))),a=new Xe(o,s),i=function(t){var r=Te(),n=De(),o=e.useContext(et),i=e.useRef(r.allocateGSInstance(s)).current;return r.server&&f(i,t,r,o,n),(e.useInsertionEffect||e.useLayoutEffect)(function(){if(!r.server)return f(i,t,r,o,n),function(){return a.removeStyles(i,r)}},[i,t,r,o,n]),null};function f(e,t,r,n,o){if(a.isStatic)a.renderStyles(e,c,r,o);else{var s=u(u({},t),{theme:rt(t,n,i.defaultProps)});a.renderStyles(e,s,r,o)}}return e.memo(i)},css:lt,isStyledComponent:Ue,keyframes:function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=lt.apply(void 0,l([e],t,!1)).join(""),o=at(n);return new Ge(o,n)},ServerStyleSheet:At,StyleSheetConsumer:je,StyleSheetContext:$e,StyleSheetManager:ze,ThemeConsumer:tt,ThemeContext:et,ThemeProvider:function(t){var r=e.useContext(et),n=e.useMemo(function(){return function(e,t){if(!e)throw h(14);if(qe(e))return e(t);if(Array.isArray(e)||"object"!=typeof e)throw h(8);return t?u(u({},t),e):e}(t.theme,r)},[t.theme,r]);return t.children?e.createElement(et.Provider,{value:n},t.children):null},useTheme:function(){return e.useContext(et)},version:o,withTheme:function(t){var r=e.forwardRef(function(r,n){var o=rt(r,e.useContext(et),t.defaultProps);return e.createElement(t,u({},r,{theme:o,ref:n}))});return r.displayName="WithTheme(".concat(Fe(t),")"),Pt(r,t)},__PRIVATE__:{StyleSheet:j,mainSheet:ke}}),_t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Rt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,$t=/(^-|-$)/g;function jt(e){return e.replace(Rt,"-").replace($t,"")}function Ot(e){return"string"==typeof e&&!0}function kt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(Boolean).join(" ")}function Nt(e,t,r){if(void 0===r&&(r=!1),!r&&!Ve(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Nt(e[n],t[n]);else if(Ve(t))for(var n in t)e[n]=Nt(e[n],t[n]);return e}var Tt=Ae(o),Dt=function(){function e(e,t,r){this.names=[],this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Qe(e),this.componentId=t,this.baseHash=Pe(Tt,t),this.baseStyle=r,j.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.componentId;if(this.names.length=0,this.baseStyle&&this.names.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(n,this.staticRulesId))this.names.push(this.staticRulesId);else{var o=Ke(this.rules,e,t,r).join(""),s=st(Pe(this.baseHash,o)>>>0);if(!t.hasNameForId(n,s)){var a=r(o,".".concat(s),void 0,n);t.insertRules(n,s,a)}this.names.push(s),this.staticRulesId=s}else{for(var i=this.rules.length,c=Pe(this.baseHash,r.hash),u="",l=0;l<i;l++){var f=this.rules[l];if("string"==typeof f)u+=f;else if(f){var p=Ke(f,e,t,r),h=Array.isArray(p)?p.join(""):p;c=Pe(c,h),u+=h}}if(u){var d=st(c>>>0);if(!t.hasNameForId(n,d)){var g=r(u,".".concat(d),void 0,n);t.insertRules(n,d,g)}this.names.push(d)}}return this.names.join(" ")},e}(),zt={};function Gt(t,r,n){var s=Ue(t),a=t,i=!Ot(t),c=r.attrs,l=void 0===c?f:c,h=r.componentId,d=void 0===h?function(e,t){var r="string"!=typeof e?"sc":jt(e);zt[r]=(zt[r]||0)+1;var n="".concat(r,"-").concat(at(o+r+zt[r]));return t?"".concat(t,"-").concat(n):n}(r.displayName,r.parentComponentId):h,g=r.displayName,m=void 0===g?function(e){return Ot(e)?"styled.".concat(e):"Styled(".concat(Fe(e),")")}(t):g,v=r.displayName&&r.componentId?"".concat(jt(r.displayName),"-").concat(r.componentId):r.componentId||d,y=s&&a.attrs?a.attrs.concat(l).filter(Boolean):l,S=r.shouldForwardProp;if(s&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var w=r.shouldForwardProp;S=function(e,t){return b(e,t)&&w(e,t)}}else S=b}var C=new Dt(n,v,s?a.componentStyle:void 0),x=C.isStatic&&0===l.length;function I(t,r){return function(t,r,n,o){var s=t.attrs,a=t.componentStyle,i=t.defaultProps,c=t.foldedComponentIds,l=t.shouldForwardProp,f=t.styledComponentId,h=t.target,d=rt(r,e.useContext(et),i)||p,g=s.reduce(function(e,t){var r="function"==typeof t?t(e):t;for(var n in r)e[n]="className"===n?kt(e[n],r[n]):"style"===n?u(u({},e[n]),r[n]):r[n];return e},u(u({},r),{theme:d})),m=function(e,t,r,n){var o=Te(),s=De();return e.generateAndInjectStyles(t?p:r,o,s)}(a,o,g),v=n,y=g.as||h,S=Ot(y),b={};for(var w in g)void 0===g[w]||"$"===w[0]||"as"===w||"theme"===w||("forwardedAs"===w?b.as=g.forwardedAs:l&&!l(w,y)||(b[w]=g[w]));return b[S&&-1===_t.indexOf(y)?"class":"className"]=c.concat(f,m!==f?m:"",g.className||"").filter(Boolean).join(" "),b.ref=v,e.createElement(y,b)}(P,t,r,x)}I.displayName=m;var P=e.forwardRef(I);return P.attrs=y,P.componentStyle=C,P.displayName=m,P.shouldForwardProp=S,P.foldedComponentIds=s?a.foldedComponentIds.concat(a.styledComponentId):f,P.styledComponentId=v,P.target=s?a.target:t,Object.defineProperty(P,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=s?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,o=t;n<o.length;n++)Nt(e,o[n],!0);return e}({},a.defaultProps,e):e}}),P.toString=function(){return".".concat(P.styledComponentId)},i&&Pt(P,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),P}function Bt(e,t,r){if(void 0===r&&(r=p),!t)throw h(1,t);var n=function(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];return e(t,r,lt.apply(void 0,l([n],o,!1)))};return n.attrs=function(n){return Bt(e,t,u(u({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return Bt(e,t,u(u({},r),n))},n}var Ft=function(e){return Bt(Gt,e)},Mt=Ft;for(var Lt in _t.forEach(function(e){Mt[e]=Ft(e)}),Et)Mt[Lt]=Et[Lt];return Mt}); | ||
//# sourceMappingURL=styled-components.min.js.map |
@@ -81,3 +81,2 @@ import React from 'react'; | ||
shouldForwardProp?: ShouldForwardProp<R>; | ||
withComponent: any; | ||
} | ||
@@ -91,3 +90,2 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> extends CommonStatics<R, OuterProps> { | ||
warnTooManyClasses?: R extends 'web' ? ReturnType<typeof createWarnTooManyClasses> : never; | ||
withComponent: <Target extends StyledTarget<R>, Props extends object = object>(tag: Target) => IStyledComponent<R, Target, OuterProps & Props>; | ||
} | ||
@@ -94,0 +92,0 @@ /** |
import { Middleware } from 'stylis'; | ||
import { Stringifier } from '../types'; | ||
declare type StylisInstanceConstructorArgs = { | ||
export declare type ICreateStylisInstance = { | ||
options?: { | ||
namespace?: string; | ||
prefix?: boolean; | ||
@@ -9,3 +10,2 @@ }; | ||
}; | ||
export default function createStylisInstance({ options, plugins, }?: StylisInstanceConstructorArgs): Stringifier; | ||
export {}; | ||
export default function createStylisInstance({ options, plugins, }?: ICreateStylisInstance): Stringifier; |
@@ -8,3 +8,3 @@ import { SC_VERSION } from './constants'; | ||
import ServerStyleSheet from './models/ServerStyleSheet'; | ||
import StyleSheetManager, { StyleSheetConsumer, StyleSheetContext } from './models/StyleSheetManager'; | ||
import { IStyleSheetContext, IStyleSheetManager, IStylisContext, StyleSheetConsumer, StyleSheetContext, StyleSheetManager } from './models/StyleSheetManager'; | ||
import ThemeProvider, { ThemeConsumer, ThemeContext } from './models/ThemeProvider'; | ||
@@ -19,2 +19,2 @@ import isStyledComponent from './utils/isStyledComponent'; | ||
export { AttrsArg as Attrs, DefaultTheme, ShouldForwardProp } from './types'; | ||
export { createGlobalStyle, css, isStyledComponent, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, }; | ||
export { createGlobalStyle, css, isStyledComponent, IStyleSheetManager, IStyleSheetContext, IStylisContext, keyframes, ServerStyleSheet, StyleSheetConsumer, StyleSheetContext, StyleSheetManager, ThemeConsumer, ThemeContext, ThemeProvider, useTheme, SC_VERSION as version, withTheme, }; |
import styled from './constructors/styled'; | ||
export * from './base'; | ||
export { CSSProp, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, WebTarget, } from './types'; | ||
export { styled as default }; | ||
export { styled, styled as default }; |
import React from 'react'; | ||
import StyleSheet from '../sheet'; | ||
import { Stringifier } from '../types'; | ||
declare type Props = { | ||
children?: React.ReactChild; | ||
export declare type IStyleSheetContext = StyleSheet | void; | ||
export declare const StyleSheetContext: React.Context<IStyleSheetContext>; | ||
export declare const StyleSheetConsumer: React.Consumer<IStyleSheetContext>; | ||
export declare type IStylisContext = Stringifier | void; | ||
export declare const StylisContext: React.Context<IStylisContext>; | ||
export declare const StylisConsumer: React.Consumer<IStylisContext>; | ||
export declare const mainSheet: StyleSheet; | ||
export declare const mainStylis: Stringifier; | ||
export declare function useStyleSheet(): StyleSheet; | ||
export declare function useStylis(): Stringifier; | ||
export declare type IStyleSheetManager = React.PropsWithChildren<{ | ||
/** | ||
* If desired, you can pass this prop to disable "speedy" insertion mode, which | ||
* uses the browser [CSSOM APIs](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet). | ||
* When disabled, rules are inserted as simple text into style blocks. | ||
*/ | ||
disableCSSOMInjection?: boolean; | ||
/** | ||
* If you are working exclusively with modern browsers, vendor prefixes can often be omitted | ||
* to reduce the weight of CSS on the page. | ||
*/ | ||
disableVendorPrefixes?: boolean; | ||
/** | ||
* Provide an optional selector to be prepended to all generated style rules. | ||
*/ | ||
namespace?: string; | ||
/** | ||
* Create and provide your own `StyleSheet` if necessary for advanced SSR scenarios. | ||
*/ | ||
sheet?: StyleSheet; | ||
/** | ||
* An array of plugins to be run by stylis (style processor) during compilation. | ||
* Check out [what's available on npm*](https://www.npmjs.com/search?q=keywords%3Astylis). | ||
* | ||
* \* The plugin(s) must be compatible with stylis v4 or above. | ||
*/ | ||
stylisPlugins?: stylis.Middleware[]; | ||
/** | ||
* Provide an alternate DOM node to host generated styles; useful for iframes. | ||
*/ | ||
target?: HTMLElement; | ||
}; | ||
export declare const StyleSheetContext: React.Context<void | StyleSheet>; | ||
export declare const StyleSheetConsumer: React.Consumer<void | StyleSheet>; | ||
export declare const StylisContext: React.Context<void | Stringifier>; | ||
export declare const StylisConsumer: React.Consumer<void | Stringifier>; | ||
export declare const mainSheet: StyleSheet; | ||
export declare const mainStylis: Stringifier; | ||
export declare function useStyleSheet(): StyleSheet; | ||
export declare function useStylis(): Stringifier; | ||
export default function StyleSheetManager(props: Props): JSX.Element; | ||
export {}; | ||
}>; | ||
export declare function StyleSheetManager(props: IStyleSheetManager): JSX.Element; |
@@ -37,2 +37,2 @@ import React from 'react'; | ||
export { css, isStyledComponent, ThemeProvider, ThemeConsumer, ThemeContext, withTheme, useTheme }; | ||
export default styled; | ||
export { styled, styled as default }; |
@@ -13,8 +13,2 @@ 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var React__default = /*#__PURE__*/_interopDefaultLegacy(React); | ||
var unitless__default = /*#__PURE__*/_interopDefaultLegacy(unitless); | ||
var transformDeclPairs__default = /*#__PURE__*/_interopDefaultLegacy(transformDeclPairs); | ||
var EMPTY_ARRAY = Object.freeze([]); | ||
@@ -83,3 +77,3 @@ var EMPTY_OBJECT = Object.freeze({}); | ||
var SC_ATTR_VERSION = 'data-styled-version'; | ||
var SC_VERSION = "6.0.0-beta.6"; | ||
var SC_VERSION = "6.0.0-beta.7"; | ||
var SPLITTER = '/*!sc*/\n'; | ||
@@ -587,3 +581,7 @@ var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; | ||
}; | ||
var stringifyRules = function (css, selector, prefix, componentId) { | ||
var stringifyRules = function (css, selector, | ||
/** | ||
* This "prefix" referes to a _selector_ prefix. | ||
*/ | ||
prefix, componentId) { | ||
if (selector === void 0) { selector = ''; } | ||
@@ -601,2 +599,5 @@ if (prefix === void 0) { prefix = ''; } | ||
var middlewares = plugins.slice(); | ||
/** | ||
* Enables automatic vendor-prefixing for styles. | ||
*/ | ||
if (options.prefix || options.prefix === undefined) { | ||
@@ -606,3 +607,5 @@ middlewares.unshift(stylis.prefixer); | ||
middlewares.push(selfReferenceReplacementPlugin, stylis.stringify); | ||
return serialize(stylis.compile(prefix || selector ? "".concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") : flatCSS), stylis.middleware(middlewares)); | ||
return serialize(stylis.compile(options.namespace || prefix || selector | ||
? "".concat(options.namespace ? options.namespace + ' ' : '').concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") | ||
: flatCSS), stylis.middleware(middlewares)); | ||
}; | ||
@@ -622,5 +625,5 @@ stringifyRules.hash = plugins.length | ||
var StyleSheetContext = React__default["default"].createContext(undefined); | ||
var StyleSheetContext = React.createContext(undefined); | ||
StyleSheetContext.Consumer; | ||
var StylisContext = React__default["default"].createContext(undefined); | ||
var StylisContext = React.createContext(undefined); | ||
StylisContext.Consumer; | ||
@@ -660,3 +663,3 @@ new StyleSheet(); | ||
} | ||
if (typeof value === 'number' && value !== 0 && !(name in unitless__default["default"])) { | ||
if (typeof value === 'number' && value !== 0 && !(name in unitless)) { | ||
return "".concat(value, "px"); // Presumes implicit 'px' suffix for unitless numbers | ||
@@ -861,3 +864,3 @@ } | ||
var ThemeContext = React__default["default"].createContext(undefined); | ||
var ThemeContext = React.createContext(undefined); | ||
var ThemeConsumer = ThemeContext.Consumer; | ||
@@ -891,3 +894,3 @@ function mergeTheme(theme, outerTheme) { | ||
} | ||
return React__default["default"].createElement(ThemeContext.Provider, { value: themeContext }, props.children); | ||
return React.createElement(ThemeContext.Provider, { value: themeContext }, props.children); | ||
} | ||
@@ -1006,4 +1009,4 @@ | ||
function withTheme(Component) { | ||
var WithTheme = React__default["default"].forwardRef(function (props, ref) { | ||
var theme = React__default["default"].useContext(ThemeContext); | ||
var WithTheme = React.forwardRef(function (props, ref) { | ||
var theme = React.useContext(ThemeContext); | ||
var themeProp = determineTheme(props, theme, Component.defaultProps); | ||
@@ -1014,3 +1017,3 @@ if (process.env.NODE_ENV !== 'production' && themeProp === undefined) { | ||
} | ||
return React__default["default"].createElement(Component, tslib.__assign({}, props, { theme: themeProp, ref: ref })); | ||
return React.createElement(Component, tslib.__assign({}, props, { theme: themeProp, ref: ref })); | ||
}); | ||
@@ -1069,3 +1072,3 @@ WithTheme.displayName = "WithTheme(".concat(getComponentName(Component), ")"); | ||
}); | ||
var styleObject = transformDeclPairs__default["default"](declPairs_1); | ||
var styleObject = transformDeclPairs(declPairs_1); | ||
var styles = styleSheet.create({ | ||
@@ -1217,3 +1220,3 @@ generated: styleObject, | ||
*/ | ||
var WrappedStyledComponent = React__default["default"].forwardRef(forwardRef); | ||
var WrappedStyledComponent = React.forwardRef(forwardRef); | ||
WrappedStyledComponent.attrs = finalAttrs; | ||
@@ -1227,6 +1230,2 @@ WrappedStyledComponent.inlineStyle = new InlineStyle(isTargetStyledComp ? styledComponentTarget.inlineStyle.rules.concat(rules) : rules); | ||
WrappedStyledComponent.target = isTargetStyledComp ? styledComponentTarget.target : target; | ||
WrappedStyledComponent.withComponent = function withComponent(tag) { | ||
var newOptions = tslib.__assign(tslib.__assign({}, options), { attrs: finalAttrs }); | ||
return createStyledNativeComponent(tag, newOptions, rules); | ||
}; | ||
Object.defineProperty(WrappedStyledComponent, 'defaultProps', { | ||
@@ -1249,3 +1248,2 @@ get: function () { | ||
target: true, | ||
withComponent: true, | ||
}); | ||
@@ -1312,6 +1310,7 @@ return WrappedStyledComponent; | ||
exports.css = css; | ||
exports["default"] = styled; | ||
exports.default = styled; | ||
exports.isStyledComponent = isStyledComponent; | ||
exports.styled = styled; | ||
exports.useTheme = useTheme; | ||
exports.withTheme = withTheme; | ||
//# sourceMappingURL=styled-components.native.cjs.js.map |
@@ -72,3 +72,3 @@ import { __spreadArray, __assign } from 'tslib'; | ||
var SC_ATTR_VERSION = 'data-styled-version'; | ||
var SC_VERSION = "6.0.0-beta.6"; | ||
var SC_VERSION = "6.0.0-beta.7"; | ||
var SPLITTER = '/*!sc*/\n'; | ||
@@ -576,3 +576,7 @@ var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; | ||
}; | ||
var stringifyRules = function (css, selector, prefix, componentId) { | ||
var stringifyRules = function (css, selector, | ||
/** | ||
* This "prefix" referes to a _selector_ prefix. | ||
*/ | ||
prefix, componentId) { | ||
if (selector === void 0) { selector = ''; } | ||
@@ -590,2 +594,5 @@ if (prefix === void 0) { prefix = ''; } | ||
var middlewares = plugins.slice(); | ||
/** | ||
* Enables automatic vendor-prefixing for styles. | ||
*/ | ||
if (options.prefix || options.prefix === undefined) { | ||
@@ -595,3 +602,5 @@ middlewares.unshift(prefixer); | ||
middlewares.push(selfReferenceReplacementPlugin, stringify); | ||
return serialize(compile(prefix || selector ? "".concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") : flatCSS), middleware(middlewares)); | ||
return serialize(compile(options.namespace || prefix || selector | ||
? "".concat(options.namespace ? options.namespace + ' ' : '').concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") | ||
: flatCSS), middleware(middlewares)); | ||
}; | ||
@@ -1208,6 +1217,2 @@ stringifyRules.hash = plugins.length | ||
WrappedStyledComponent.target = isTargetStyledComp ? styledComponentTarget.target : target; | ||
WrappedStyledComponent.withComponent = function withComponent(tag) { | ||
var newOptions = __assign(__assign({}, options), { attrs: finalAttrs }); | ||
return createStyledNativeComponent(tag, newOptions, rules); | ||
}; | ||
Object.defineProperty(WrappedStyledComponent, 'defaultProps', { | ||
@@ -1230,3 +1235,2 @@ get: function () { | ||
target: true, | ||
withComponent: true, | ||
}); | ||
@@ -1289,3 +1293,3 @@ return WrappedStyledComponent; | ||
export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, useTheme, withTheme }; | ||
export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, styled, useTheme, withTheme }; | ||
//# sourceMappingURL=styled-components.native.esm.js.map |
@@ -81,3 +81,2 @@ import React from 'react'; | ||
shouldForwardProp?: ShouldForwardProp<R>; | ||
withComponent: any; | ||
} | ||
@@ -91,3 +90,2 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> extends CommonStatics<R, OuterProps> { | ||
warnTooManyClasses?: R extends 'web' ? ReturnType<typeof createWarnTooManyClasses> : never; | ||
withComponent: <Target extends StyledTarget<R>, Props extends object = object>(tag: Target) => IStyledComponent<R, Target, OuterProps & Props>; | ||
} | ||
@@ -94,0 +92,0 @@ /** |
import { Middleware } from 'stylis'; | ||
import { Stringifier } from '../types'; | ||
declare type StylisInstanceConstructorArgs = { | ||
export declare type ICreateStylisInstance = { | ||
options?: { | ||
namespace?: string; | ||
prefix?: boolean; | ||
@@ -9,3 +10,2 @@ }; | ||
}; | ||
export default function createStylisInstance({ options, plugins, }?: StylisInstanceConstructorArgs): Stringifier; | ||
export {}; | ||
export default function createStylisInstance({ options, plugins, }?: ICreateStylisInstance): Stringifier; |
{ | ||
"name": "styled-components", | ||
"version": "6.0.0-beta.6", | ||
"version": "6.0.0-beta.7", | ||
"description": "Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress", | ||
@@ -23,3 +23,3 @@ "types": "dist/index.d.ts", | ||
"test": "yarn test:web && yarn test:native", | ||
"test:web": "jest -c jest.config.main.js --forceExit", | ||
"test:web": "jest -c jest.config.main.js", | ||
"test:native": "jest -c jest.config.native.js --forceExit", | ||
@@ -63,13 +63,13 @@ "test:integration": "jest -c jest.config.integration.js --runInBand --forceExit", | ||
"dependencies": { | ||
"@babel/cli": "^7.18.6", | ||
"@babel/core": "^7.18.6", | ||
"@babel/cli": "^7.20.7", | ||
"@babel/core": "^7.20.7", | ||
"@babel/helper-module-imports": "^7.18.6", | ||
"@babel/plugin-external-helpers": "^7.18.6", | ||
"@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.18.6", | ||
"@babel/preset-env": "^7.18.6", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.20.7", | ||
"@babel/preset-env": "^7.20.2", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@babel/traverse": "^7.18.8", | ||
"@emotion/unitless": "^0.7.4", | ||
"@babel/traverse": "^7.20.10", | ||
"@emotion/unitless": "^0.8.0", | ||
"css-to-react-native": "^3.0.0", | ||
@@ -90,12 +90,12 @@ "shallowequal": "^1.1.0", | ||
"devDependencies": { | ||
"@babel/plugin-transform-flow-strip-types": "^7.18.6", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
"@babel/plugin-transform-flow-strip-types": "^7.19.0", | ||
"@rollup/plugin-typescript": "^10.0.1", | ||
"@types/babel-plugin-macros": "^2.8.4", | ||
"@types/enzyme": "^3.10.9", | ||
"@types/jest": "^28.1.6", | ||
"@types/enzyme": "^3.10.12", | ||
"@types/jest": "^29.2.4", | ||
"@types/js-beautify": "^1.13.1", | ||
"@types/node": "^14.0.0", | ||
"@types/node": "^18.11.17", | ||
"@types/react": "^17.0.22", | ||
"@types/react-dom": "^17.0.9", | ||
"@types/react-frame-component": "^4.1.1", | ||
"@types/react-frame-component": "^4.1.3", | ||
"@types/react-native": "^0.69.1", | ||
@@ -105,30 +105,29 @@ "@types/react-test-renderer": "^17.0.1", | ||
"@types/stylis": "^4.0.2", | ||
"@typescript-eslint/eslint-plugin": "^4.20.0", | ||
"@typescript-eslint/parser": "^4.20.0", | ||
"@typescript-eslint/eslint-plugin": "^5.47.0", | ||
"@typescript-eslint/parser": "^5.47.0", | ||
"babel-eslint": "^10.0.1", | ||
"babel-jest": "^28.1.3", | ||
"babel-jest": "^29.3.1", | ||
"babel-plugin-add-module-exports": "^1.0.4", | ||
"babel-plugin-macros": "^3.1.0", | ||
"babel-plugin-styled-components": "^2.0.5", | ||
"babel-plugin-styled-components": "^2.0.7", | ||
"babel-plugin-tester": "^10.0.0", | ||
"bundlewatch": "^0.3.1", | ||
"eslint": "^7.23.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.20.6", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"jest": "^28.1.3", | ||
"jest-environment-jsdom": "^28.1.3", | ||
"jest-image-snapshot": "^4.2.0", | ||
"bundlewatch": "^0.3.3", | ||
"eslint": "^8.30.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.31.11", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"jest": "^29.3.1", | ||
"jest-environment-jsdom": "^29.3.1", | ||
"jest-serializer-html": "^7.0.0", | ||
"jest-watch-typeahead": "^2.0.0", | ||
"js-beautify": "^1.13.0", | ||
"prettier": "^2.2.0", | ||
"prop-types": "^15.7.2", | ||
"js-beautify": "^1.14.7", | ||
"prettier": "^2.8.1", | ||
"prop-types": "^15.8.1", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-frame-component": "^4.0.2", | ||
"react-native": "^0.69.1", | ||
"react-native": "^0.70.6", | ||
"react-test-renderer": "^17.0.2", | ||
"rollup": "^2.76.0", | ||
"rollup": "^3.8.1", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
@@ -135,0 +134,0 @@ "rollup-plugin-json": "^4.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50
1993054
154
14061
- Removed@emotion/unitless@0.7.5(transitive)
Updated@babel/cli@^7.20.7
Updated@babel/core@^7.20.7
Updated@babel/preset-env@^7.20.2
Updated@babel/traverse@^7.20.10
Updated@emotion/unitless@^0.8.0