@swc/plugin-styled-jsx 1.5.75 → 1.5.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/Cargo.toml +3 -2
  2. package/package.json +1 -1
  3. package/src/lib.rs +10 -3
  4. package/swc_plugin_styled_jsx.wasm +0 -0
  5. package/transform/Cargo.toml +10 -3
  6. package/transform/src/lib.rs +2 -1
  7. package/transform/src/transform_css_swc.rs +394 -0
  8. package/transform/src/visitor.rs +43 -10
  9. package/transform/tests/errors/nested-style-tags/output.js +31 -4
  10. package/transform/tests/errors/ts-with-css-resolve/output.js +1 -1
  11. package/transform/tests/fixture/absent/output.swc.js +7 -0
  12. package/transform/tests/fixture/attribute-generation-classname-rewriting/output.swc.js +112 -0
  13. package/transform/tests/fixture/attribute-generation-modes/output.swc.js +228 -0
  14. package/transform/tests/fixture/class/output.swc.js +12 -0
  15. package/transform/tests/fixture/comments/output.swc.js +12 -0
  16. package/transform/tests/fixture/component-attribute/output.swc.js +10 -0
  17. package/transform/tests/fixture/conflicts/output.swc.js +14 -0
  18. package/transform/tests/fixture/css-selector-after-pseudo/output.swc.js +11 -0
  19. package/transform/tests/fixture/css-tag-same-file/output.swc.js +21 -0
  20. package/transform/tests/fixture/different-jsx-ids/output.swc.js +24 -0
  21. package/transform/tests/fixture/dynamic-element/output.swc.js +40 -0
  22. package/transform/tests/fixture/dynamic-element-class/output.swc.js +25 -0
  23. package/transform/tests/fixture/dynamic-element-external/output.swc.js +12 -0
  24. package/transform/tests/fixture/dynamic-this-in-arrow/output.swc.js +39 -0
  25. package/transform/tests/fixture/exported-jsx-style/output.swc.js +1 -0
  26. package/transform/tests/fixture/exported-non-jsx-style/output.swc.js +1 -0
  27. package/transform/tests/fixture/external-nested-scope/output.swc.js +7 -0
  28. package/transform/tests/fixture/external-stylesheet/output.swc.js +34 -0
  29. package/transform/tests/fixture/external-stylesheet-global/output.swc.js +18 -0
  30. package/transform/tests/fixture/external-stylesheet-multi-line/output.swc.js +9 -0
  31. package/transform/tests/fixture/fragment/output.swc.js +47 -0
  32. package/transform/tests/fixture/global/output.swc.js +7 -0
  33. package/transform/tests/fixture/global-child-selector/output.swc.js +8 -0
  34. package/transform/tests/fixture/global-redundant/output.swc.js +10 -0
  35. package/transform/tests/fixture/issue-30480/output.swc.js +15 -0
  36. package/transform/tests/fixture/issue-30570/output.swc.js +12 -0
  37. package/transform/tests/fixture/issue-31562-interpolation-in-mdea/output.swc.js +43 -0
  38. package/transform/tests/fixture/mixed-global-scoped/output.swc.js +11 -0
  39. package/transform/tests/fixture/multiple-jsx/output.swc.js +32 -0
  40. package/transform/tests/fixture/next-54653/output.swc.js +3 -0
  41. package/transform/tests/fixture/non-styled-jsx-style/output.swc.js +12 -0
  42. package/transform/tests/fixture/not-styled-jsx-tagged-templates/{output.js → output.lightningcss.js} +1 -2
  43. package/transform/tests/fixture/not-styled-jsx-tagged-templates/output.swc.js +23 -0
  44. package/transform/tests/fixture/number-after-placeholder/output.swc.js +17 -0
  45. package/transform/tests/fixture/one-off-global-selectors/output.swc.js +8 -0
  46. package/transform/tests/fixture/source-maps/output.swc.js +8 -0
  47. package/transform/tests/fixture/styles/output.swc.js +39 -0
  48. package/transform/tests/fixture/styles-external-invalid/output.swc.js +9 -0
  49. package/transform/tests/fixture/styles-external-invalid2/output.swc.js +8 -0
  50. package/transform/tests/fixture/styles2/output.swc.js +5 -0
  51. package/transform/tests/fixture/too-many/output.swc.js +49 -0
  52. package/transform/tests/fixture/tpl-escape-1/output.swc.js +12 -0
  53. package/transform/tests/fixture/tpl-escape-2/output.swc.js +17 -0
  54. package/transform/tests/fixture/tpl-placeholder-1-as-property/output.swc.js +28 -0
  55. package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/output.swc.js +34 -0
  56. package/transform/tests/fixture/tpl-placeholder-3-as-value/output.swc.js +28 -0
  57. package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.swc.js +31 -0
  58. package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.swc.js +31 -0
  59. package/transform/tests/fixture/transform-css/output.swc.js +8 -0
  60. package/transform/tests/fixture/transform-css-complex-selector/output.swc.js +8 -0
  61. package/transform/tests/fixture/transform-css-complex-selector-2/output.swc.js +8 -0
  62. package/transform/tests/fixture/transform-css-global/output.swc.js +8 -0
  63. package/transform/tests/fixture/transform-css-media-query/output.swc.js +8 -0
  64. package/transform/tests/fixture/transform-css-normal/output.swc.js +8 -0
  65. package/transform/tests/fixture/transform-css-nth-1/output.swc.js +8 -0
  66. package/transform/tests/fixture/whitespace/output.lightningcss.js +12 -0
  67. package/transform/tests/fixture/whitespace/output.swc.js +12 -0
  68. package/transform/tests/fixture.rs +55 -38
  69. package/transform/tests/fixture/.expressions/output.js +0 -91
  70. package/transform/tests/fixture/nested-style-tags/output.js +0 -0
  71. /package/transform/src/{transform_css.rs → transform_css_lightningcss.rs} +0 -0
  72. /package/transform/tests/fixture/absent/{output.js → output.lightningcss.js} +0 -0
  73. /package/transform/tests/fixture/attribute-generation-classname-rewriting/{output.js → output.lightningcss.js} +0 -0
  74. /package/transform/tests/fixture/attribute-generation-modes/{output.js → output.lightningcss.js} +0 -0
  75. /package/transform/tests/fixture/class/{output.js → output.lightningcss.js} +0 -0
  76. /package/transform/tests/fixture/comments/{output.js → output.lightningcss.js} +0 -0
  77. /package/transform/tests/fixture/component-attribute/{output.js → output.lightningcss.js} +0 -0
  78. /package/transform/tests/fixture/conflicts/{output.js → output.lightningcss.js} +0 -0
  79. /package/transform/tests/fixture/css-selector-after-pseudo/{output.js → output.lightningcss.js} +0 -0
  80. /package/transform/tests/fixture/css-tag-same-file/{output.js → output.lightningcss.js} +0 -0
  81. /package/transform/tests/fixture/different-jsx-ids/{output.js → output.lightningcss.js} +0 -0
  82. /package/transform/tests/fixture/dynamic-element/{output.js → output.lightningcss.js} +0 -0
  83. /package/transform/tests/fixture/dynamic-element-class/{output.js → output.lightningcss.js} +0 -0
  84. /package/transform/tests/fixture/dynamic-element-external/{output.js → output.lightningcss.js} +0 -0
  85. /package/transform/tests/fixture/dynamic-this-in-arrow/{output.js → output.lightningcss.js} +0 -0
  86. /package/transform/tests/fixture/exported-jsx-style/{output.js → output.lightningcss.js} +0 -0
  87. /package/transform/tests/fixture/exported-non-jsx-style/{output.js → output.lightningcss.js} +0 -0
  88. /package/transform/tests/fixture/external-nested-scope/{output.js → output.lightningcss.js} +0 -0
  89. /package/transform/tests/fixture/external-stylesheet/{output.js → output.lightningcss.js} +0 -0
  90. /package/transform/tests/fixture/external-stylesheet-global/{output.js → output.lightningcss.js} +0 -0
  91. /package/transform/tests/fixture/external-stylesheet-multi-line/{output.js → output.lightningcss.js} +0 -0
  92. /package/transform/tests/fixture/fragment/{output.js → output.lightningcss.js} +0 -0
  93. /package/transform/tests/fixture/global/{output.js → output.lightningcss.js} +0 -0
  94. /package/transform/tests/fixture/global-child-selector/{output.js → output.lightningcss.js} +0 -0
  95. /package/transform/tests/fixture/global-redundant/{output.js → output.lightningcss.js} +0 -0
  96. /package/transform/tests/fixture/issue-30480/{output.js → output.lightningcss.js} +0 -0
  97. /package/transform/tests/fixture/issue-30570/{output.js → output.lightningcss.js} +0 -0
  98. /package/transform/tests/fixture/issue-31562-interpolation-in-mdea/{output.js → output.lightningcss.js} +0 -0
  99. /package/transform/tests/fixture/mixed-global-scoped/{output.js → output.lightningcss.js} +0 -0
  100. /package/transform/tests/fixture/multiple-jsx/{output.js → output.lightningcss.js} +0 -0
  101. /package/transform/tests/fixture/next-54653/{output.js → output.lightningcss.js} +0 -0
  102. /package/transform/tests/fixture/non-styled-jsx-style/{output.js → output.lightningcss.js} +0 -0
  103. /package/transform/tests/fixture/number-after-placeholder/{output.js → output.lightningcss.js} +0 -0
  104. /package/transform/tests/fixture/one-off-global-selectors/{output.js → output.lightningcss.js} +0 -0
  105. /package/transform/tests/fixture/source-maps/{output.js → output.lightningcss.js} +0 -0
  106. /package/transform/tests/fixture/stateless/{output.js → output.lightningcss.js} +0 -0
  107. /package/transform/tests/fixture/{whitespace/output.js → stateless/output.swc.js} +0 -0
  108. /package/transform/tests/fixture/styles/{output.js → output.lightningcss.js} +0 -0
  109. /package/transform/tests/fixture/styles-external-invalid/{output.js → output.lightningcss.js} +0 -0
  110. /package/transform/tests/fixture/styles-external-invalid2/{output.js → output.lightningcss.js} +0 -0
  111. /package/transform/tests/fixture/styles2/{output.js → output.lightningcss.js} +0 -0
  112. /package/transform/tests/fixture/too-many/{output.js → output.lightningcss.js} +0 -0
  113. /package/transform/tests/fixture/tpl-escape-1/{output.js → output.lightningcss.js} +0 -0
  114. /package/transform/tests/fixture/tpl-escape-2/{output.js → output.lightningcss.js} +0 -0
  115. /package/transform/tests/fixture/tpl-placeholder-1-as-property/{output.js → output.lightningcss.js} +0 -0
  116. /package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/{output.js → output.lightningcss.js} +0 -0
  117. /package/transform/tests/fixture/tpl-placeholder-3-as-value/{output.js → output.lightningcss.js} +0 -0
  118. /package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/{output.js → output.lightningcss.js} +0 -0
  119. /package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/{output.js → output.lightningcss.js} +0 -0
  120. /package/transform/tests/fixture/transform-css/{output.js → output.lightningcss.js} +0 -0
  121. /package/transform/tests/fixture/transform-css-complex-selector/{output.js → output.lightningcss.js} +0 -0
  122. /package/transform/tests/fixture/transform-css-complex-selector-2/{output.js → output.lightningcss.js} +0 -0
  123. /package/transform/tests/fixture/transform-css-global/{output.js → output.lightningcss.js} +0 -0
  124. /package/transform/tests/fixture/transform-css-media-query/{output.js → output.lightningcss.js} +0 -0
  125. /package/transform/tests/fixture/transform-css-normal/{output.js → output.lightningcss.js} +0 -0
  126. /package/transform/tests/fixture/transform-css-nth-1/{output.js → output.lightningcss.js} +0 -0
@@ -0,0 +1,47 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ import React from 'react';
3
+ export default (()=><>
4
+
5
+ <p className={"jsx-6dd5f97e085c0297"}>Testing!!!</p>
6
+
7
+ <p className={"jsx-6dd5f97e085c0297" + " " + "foo"}>Bar</p>
8
+
9
+ <>
10
+
11
+ <h3 id="head" className={"jsx-6dd5f97e085c0297"}>Title...</h3>
12
+
13
+ <React.Fragment>
14
+
15
+ <p className={"jsx-6dd5f97e085c0297"}>hello</p>
16
+
17
+ <>
18
+
19
+ <p className={"jsx-6dd5f97e085c0297"}>foo</p>
20
+
21
+ <p className={"jsx-6dd5f97e085c0297"}>bar</p>
22
+
23
+ </>
24
+
25
+ <p className={"jsx-6dd5f97e085c0297"}>world</p>
26
+
27
+ </React.Fragment>
28
+
29
+ </>
30
+
31
+ <_JSXStyle id={"6dd5f97e085c0297"}>{"p.jsx-6dd5f97e085c0297{color:cyan}.foo.jsx-6dd5f97e085c0297{font-size:18px;color:hotpink}#head.jsx-6dd5f97e085c0297{text-decoration:underline}"}</_JSXStyle>
32
+
33
+ </>);
34
+ function Component1() {
35
+ return <>
36
+
37
+ <div>test</div>
38
+
39
+ </>;
40
+ }
41
+ function Component2() {
42
+ return <div className={"jsx-678f41ca6d3b294b"}>
43
+
44
+ <_JSXStyle id={"678f41ca6d3b294b"}>{"div.jsx-678f41ca6d3b294b{color:red}"}</_JSXStyle>
45
+
46
+ </div>;
47
+ }
@@ -0,0 +1,7 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ const Test = ()=><div className={"jsx-d47d6adadf14e957"}>
3
+
4
+ <_JSXStyle id={"d47d6adadf14e957"}>{"body{color:red}:hover{color:red;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-animation:foo 1s ease-out;-moz-animation:foo 1s ease-out;-o-animation:foo 1s ease-out;animation:foo 1s ease-out}div a{display:none}[data-test]>div{color:red}"}</_JSXStyle>
5
+
6
+ </div>;
7
+ const Test2 = ()=><_JSXStyle id={"94239b6d6b42c9b5"}>{"p{color:red}"}</_JSXStyle>;
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ const Test = ()=><div className={"jsx-5a206f122d1cb32e"}>
3
+
4
+ <span className={"jsx-5a206f122d1cb32e"}>test</span>
5
+
6
+ <_JSXStyle id={"5a206f122d1cb32e"}>{"div.jsx-5a206f122d1cb32e>span{color:red}"}</_JSXStyle>
7
+
8
+ </div>;
@@ -0,0 +1,10 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default function IndexPage() {
3
+ return <div className={"jsx-b6abd0684ba81871"}>
4
+
5
+ should be blue.
6
+
7
+ <_JSXStyle id={"b6abd0684ba81871"}>{"div{color:blue}"}</_JSXStyle>
8
+
9
+ </div>;
10
+ }
@@ -0,0 +1,15 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (({ breakPoint })=><div className={_JSXStyle.dynamic([
3
+ [
4
+ "ff798a455a83a572",
5
+ [
6
+ breakPoint
7
+ ]
8
+ ]
9
+ ])}>
10
+
11
+ <_JSXStyle id={"ff798a455a83a572"} dynamic={[
12
+ breakPoint
13
+ ]}>{`@media(${breakPoint}){.test.__jsx-style-dynamic-selector{margin-bottom:1em}}`}</_JSXStyle>
14
+
15
+ </div>);
@@ -0,0 +1,12 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default function IndexPage() {
3
+ return <div className={"jsx-bbdada4ef17d18ef"}>
4
+
5
+ <h1 className={"jsx-bbdada4ef17d18ef"}>Hello World.</h1>
6
+
7
+
8
+
9
+ <_JSXStyle id={"bbdada4ef17d18ef"}>{"@supports((display:flex)or (display:-webkit-box)or (display:-webkit-flex)or (display:-moz-box)or (display:-ms-flexbox)){h1{color:hotpink}}"}</_JSXStyle>
10
+
11
+ </div>;
12
+ }
@@ -0,0 +1,43 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={_JSXStyle.dynamic([
5
+ [
6
+ "60bda1963c17b640",
7
+ [
8
+ Typography.base.size.default,
9
+ Typography.base.lineHeight,
10
+ Target.mediumPlus,
11
+ Typography.base.size.mediumPlus,
12
+ Target.largePlus,
13
+ Typography.base.size.largePlus
14
+ ]
15
+ ]
16
+ ])}>
17
+
18
+ <p className={_JSXStyle.dynamic([
19
+ [
20
+ "60bda1963c17b640",
21
+ [
22
+ Typography.base.size.default,
23
+ Typography.base.lineHeight,
24
+ Target.mediumPlus,
25
+ Typography.base.size.mediumPlus,
26
+ Target.largePlus,
27
+ Typography.base.size.largePlus
28
+ ]
29
+ ]
30
+ ])}>test</p>
31
+
32
+ <_JSXStyle id={"60bda1963c17b640"} dynamic={[
33
+ Typography.base.size.default,
34
+ Typography.base.lineHeight,
35
+ Target.mediumPlus,
36
+ Typography.base.size.mediumPlus,
37
+ Target.largePlus,
38
+ Typography.base.size.largePlus
39
+ ]}>{`html{font-size:${Typography.base.size.default};line-height:${Typography.base.lineHeight}}@media ${Target.mediumPlus}{html{font-size:${Typography.base.size.mediumPlus}}}@media ${Target.largePlus}{html{font-size:${Typography.base.size.largePlus}}}`}</_JSXStyle>
40
+
41
+ </div>;
42
+ }
43
+ }
@@ -0,0 +1,11 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ const Test = ()=><_JSXStyle id={"94239b6d6b42c9b5"}>{"p{color:red}"}</_JSXStyle>;
3
+ export default (()=><div className={"jsx-3822e6e1fb9fa41a"}>
4
+
5
+ <p className={"jsx-3822e6e1fb9fa41a"}>test</p>
6
+
7
+ <_JSXStyle id={"b7efb453c85593c1"}>{"body{background:red}"}</_JSXStyle>
8
+
9
+ <_JSXStyle id={"94239b6d6b42c9b5"}>{"p.jsx-3822e6e1fb9fa41a{color:red}"}</_JSXStyle>
10
+
11
+ </div>);
@@ -0,0 +1,32 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ const attrs = {
3
+ id: 'test'
4
+ };
5
+ const Test1 = ()=><div className={"jsx-a9535d7d5f32c3c4"}>
6
+
7
+ <span {...attrs} data-test="test" className={"jsx-a9535d7d5f32c3c4" + " " + (attrs && attrs.className != null && attrs.className || "")}>test</span>
8
+
9
+ <Component/>
10
+
11
+ <_JSXStyle id={"a9535d7d5f32c3c4"}>{"span.jsx-a9535d7d5f32c3c4{color:red}"}</_JSXStyle>
12
+
13
+ </div>;
14
+ const Test2 = ()=><span>test</span>;
15
+ const Test3 = ()=><div className={"jsx-a9535d7d5f32c3c4"}>
16
+
17
+ <span className={"jsx-a9535d7d5f32c3c4"}>test</span>
18
+
19
+ <_JSXStyle id={"a9535d7d5f32c3c4"}>{"span.jsx-a9535d7d5f32c3c4{color:red}"}</_JSXStyle>
20
+
21
+ </div>;
22
+ export default class {
23
+ render() {
24
+ return <div className={"jsx-b2b86d63f35d25ee"}>
25
+
26
+ <p className={"jsx-b2b86d63f35d25ee"}>test</p>
27
+
28
+ <_JSXStyle id={"b2b86d63f35d25ee"}>{"p.jsx-b2b86d63f35d25ee{color:red}"}</_JSXStyle>
29
+
30
+ </div>;
31
+ }
32
+ }
@@ -0,0 +1,3 @@
1
+ const _defaultExport = new String("@media(max-width:870px){th.expiration-date-cell,td.expiration-date-cell{display:none}}");
2
+ _defaultExport.__hash = "fd71bf06ba8860bb";
3
+ export default _defaultExport;
@@ -0,0 +1,12 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-94239b6d6b42c9b5"}>
3
+
4
+ <p className={"jsx-94239b6d6b42c9b5"}>woot</p>
5
+
6
+ <style dangerouslySetInnerHTML={{
7
+ __html: `body { margin: 0; }`
8
+ }}></style>
9
+
10
+ <_JSXStyle id={"94239b6d6b42c9b5"}>{"p.jsx-94239b6d6b42c9b5{color:red}"}</_JSXStyle>
11
+
12
+ </div>);
@@ -20,5 +20,4 @@ const Title = styled.h1`
20
20
  font-size: 50px;
21
21
  `;
22
22
  const AnotherTitle = Title.extend`color: blue;`;
23
- export const Component = ()=><AnotherTitle >My page</AnotherTitle>
24
- ;
23
+ export const Component = ()=><AnotherTitle>My page</AnotherTitle>;
@@ -0,0 +1,23 @@
1
+ import css from 'hell';
2
+ const color = 'red';
3
+ const bar = css`
4
+ div {
5
+ font-size: 3em;
6
+ }
7
+ `;
8
+ export const uh = bar;
9
+ export const foo = css`div { color: ${color}}`;
10
+ export default css`
11
+ div {
12
+ font-size: 3em;
13
+ }
14
+ p {
15
+ color: ${color};
16
+ }
17
+ `;
18
+ const Title = styled.h1`
19
+ color: red;
20
+ font-size: 50px;
21
+ `;
22
+ const AnotherTitle = Title.extend`color: blue;`;
23
+ export const Component = ()=><AnotherTitle>My page</AnotherTitle>;
@@ -0,0 +1,17 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ import Link from "next/link";
3
+ export default function IndexPage() {
4
+ return <div className={"jsx-9a4b3442d519aae9"}>
5
+
6
+ Hello World.{" "}
7
+
8
+ <Link href="/about">
9
+
10
+ <a className={"jsx-9a4b3442d519aae9"}>Abound</a>
11
+
12
+ </Link>
13
+
14
+ <_JSXStyle id={"9a4b3442d519aae9"}>{`a.jsx-9a4b3442d519aae9{color:${"#abcdef"}12}`}</_JSXStyle>
15
+
16
+ </div>;
17
+ }
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-c7c3a8e231c9215a"}>
3
+
4
+ <p className={"jsx-c7c3a8e231c9215a"}>test</p>
5
+
6
+ <_JSXStyle id={"c7c3a8e231c9215a"}>{".container.jsx-c7c3a8e231c9215a>*{color:red}"}</_JSXStyle>
7
+
8
+ </div>);
@@ -0,0 +1,8 @@
1
+ // TODO: needs sourcemaps
2
+ // export default () => (
3
+ // <div>
4
+ // <p>test</p>
5
+ // <p>woot</p>
6
+ // <style jsx>{'p { color: red }'}</style>
7
+ // </div>
8
+ // )
@@ -0,0 +1,39 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ import colors, { size } from './constants';
3
+ const color = 'red';
4
+ const bar = new String("div.jsx-aaed0341accea8f{font-size:3em}");
5
+ bar.__hash = "aaed0341accea8f";
6
+ const baz = new String("div{font-size:3em}");
7
+ baz.__hash = "aaed0341accea8f";
8
+ const a = new String(`div{font-size:${size}em}`);
9
+ a.__hash = "b4e02b3e84cc50c";
10
+ export const uh = bar;
11
+ export const foo = new String(`div.jsx-1a001e3709d54ba4{color:${color}}`);
12
+ foo.__hash = "1a001e3709d54ba4";
13
+ ({
14
+ styles: <_JSXStyle id={"7a7480dd17e82e07"}>{`div.jsx-7a7480dd17e82e07{color:${colors.green.light}}a.jsx-7a7480dd17e82e07{color:red}`}</_JSXStyle>,
15
+ className: "jsx-7a7480dd17e82e07"
16
+ });
17
+ const b = {
18
+ styles: <_JSXStyle id={"7a7480dd17e82e07"}>{`div.jsx-7a7480dd17e82e07{color:${colors.green.light}}a.jsx-7a7480dd17e82e07{color:red}`}</_JSXStyle>,
19
+ className: "jsx-7a7480dd17e82e07"
20
+ };
21
+ const dynamic = (colors)=>{
22
+ const b = {
23
+ styles: <_JSXStyle id={"9f775f199a8dfb95"} dynamic={[
24
+ colors.green.light
25
+ ]}>{`div.__jsx-style-dynamic-selector{color:${colors.green.light}}a.__jsx-style-dynamic-selector{color:red}`}</_JSXStyle>,
26
+ className: _JSXStyle.dynamic([
27
+ [
28
+ "9f775f199a8dfb95",
29
+ [
30
+ colors.green.light
31
+ ]
32
+ ]
33
+ ])
34
+ };
35
+ };
36
+ export default {
37
+ styles: <_JSXStyle id={"e14aa5a1efa47449"}>{`div.jsx-e14aa5a1efa47449{font-size:3em}p.jsx-e14aa5a1efa47449{color:${color}}`}</_JSXStyle>,
38
+ className: "jsx-e14aa5a1efa47449"
39
+ };
@@ -0,0 +1,9 @@
1
+ // TODO
2
+ // import css from 'styled-jsx/css'
3
+ // const color = 'red'
4
+ // export const foo = css`div { color: ${color}}`
5
+ // const props = { color: 'red ' }
6
+ // export default css`
7
+ // div { font-size: 3em; color: ${props.color} }
8
+ // p { color: ${this.props.color};}
9
+ // `
@@ -0,0 +1,8 @@
1
+ // TODO
2
+ // import css from 'styled-jsx/css'
3
+ // const color = 'red'
4
+ // export const foo = css`div { color: ${color}}`
5
+ // export default css`
6
+ // div { font-size: 3em }
7
+ // p { color: ${props.color};}
8
+ // `
@@ -0,0 +1,5 @@
1
+ // TODO: support common js
2
+ // import css from 'styled-jsx/css'
3
+ // module.exports = css`
4
+ // div { font-size: 3em }
5
+ // `
@@ -0,0 +1,49 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export const Red = ({ Component = 'button' })=>{
3
+ return <Component className={_JSXStyle.dynamic([
4
+ [
5
+ "1a9f9e2fa701f7ec",
6
+ [
7
+ e1,
8
+ e2,
9
+ e3,
10
+ e4,
11
+ e5,
12
+ e6,
13
+ e7,
14
+ e8,
15
+ e9,
16
+ e10,
17
+ e11,
18
+ e12,
19
+ e13,
20
+ e14,
21
+ e15
22
+ ]
23
+ ]
24
+ ])}>
25
+
26
+
27
+
28
+ {}
29
+
30
+ <_JSXStyle id={"1a9f9e2fa701f7ec"} dynamic={[
31
+ e1,
32
+ e2,
33
+ e3,
34
+ e4,
35
+ e5,
36
+ e6,
37
+ e7,
38
+ e8,
39
+ e9,
40
+ e10,
41
+ e11,
42
+ e12,
43
+ e13,
44
+ e14,
45
+ e15
46
+ ]}>{`.button.__jsx-style-dynamic-selector{--button-1:${e1};--button-2:${e2};--button-3:${e3};--button-4:${e4};--button-5:${e5};--button-6:${e6};--button-7:${e7};--button-8:${e8};--button-9:${e9};--button-10:${e10};--button-11:${e11};--button-12:${e12};--button-13:${e13};--button-14:${e14};--button-15:${e15}}`}</_JSXStyle>
47
+
48
+ </Component>;
49
+ };
@@ -0,0 +1,12 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={"jsx-1f6cef12199c3a8f"}>
5
+
6
+ <p className={"jsx-1f6cef12199c3a8f"}>test</p>
7
+
8
+ <_JSXStyle id={"1f6cef12199c3a8f"}>{'p.jsx-1f6cef12199c3a8f{content:"`"}'}</_JSXStyle>
9
+
10
+ </div>;
11
+ }
12
+ }
@@ -0,0 +1,17 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default function Home({ fontFamily }) {
3
+ return <div className={_JSXStyle.dynamic([
4
+ [
5
+ "3892513b52a23034",
6
+ [
7
+ fontFamily
8
+ ]
9
+ ]
10
+ ])}>
11
+
12
+ <_JSXStyle id={"3892513b52a23034"} dynamic={[
13
+ fontFamily
14
+ ]}>{`body{font-family:${fontFamily}}code:before,code:after{content:"\`"}`}</_JSXStyle>
15
+
16
+ </div>;
17
+ }
@@ -0,0 +1,28 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={_JSXStyle.dynamic([
5
+ [
6
+ "fc144a5ba38f1ea7",
7
+ [
8
+ inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
9
+ ]
10
+ ]
11
+ ])}>
12
+
13
+ <p className={_JSXStyle.dynamic([
14
+ [
15
+ "fc144a5ba38f1ea7",
16
+ [
17
+ inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
18
+ ]
19
+ ]
20
+ ])}>test</p>
21
+
22
+ <_JSXStyle id={"fc144a5ba38f1ea7"} dynamic={[
23
+ inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
24
+ ]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? 'height: calc(2 * var(--a)) !important;' : ''}:0}}`}</_JSXStyle>
25
+
26
+ </div>;
27
+ }
28
+ }
@@ -0,0 +1,34 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={_JSXStyle.dynamic([
5
+ [
6
+ "2afd62ca79f8b081",
7
+ [
8
+ a[b],
9
+ -1 * (c || 0),
10
+ d
11
+ ]
12
+ ]
13
+ ])}>
14
+
15
+ <p className={_JSXStyle.dynamic([
16
+ [
17
+ "2afd62ca79f8b081",
18
+ [
19
+ a[b],
20
+ -1 * (c || 0),
21
+ d
22
+ ]
23
+ ]
24
+ ])}>test</p>
25
+
26
+ <_JSXStyle id={"2afd62ca79f8b081"} dynamic={[
27
+ a[b],
28
+ -1 * (c || 0),
29
+ d
30
+ ]}>{`.a:hover .b.__jsx-style-dynamic-selector{a:${a[b]}px!important;b:translate3d(0,${-1 * (c || 0)}px,-${d}px)scale(1)!important}`}</_JSXStyle>
31
+
32
+ </div>;
33
+ }
34
+ }
@@ -0,0 +1,28 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={_JSXStyle.dynamic([
5
+ [
6
+ "e37942245bf0eb35",
7
+ [
8
+ a
9
+ ]
10
+ ]
11
+ ])}>
12
+
13
+ <p className={_JSXStyle.dynamic([
14
+ [
15
+ "e37942245bf0eb35",
16
+ [
17
+ a
18
+ ]
19
+ ]
20
+ ])}>test</p>
21
+
22
+ <_JSXStyle id={"e37942245bf0eb35"} dynamic={[
23
+ a
24
+ ]}>{`@media only screen{a.__jsx-style-dynamic-selector{color:${a}}}`}</_JSXStyle>
25
+
26
+ </div>;
27
+ }
28
+ }
@@ -0,0 +1,31 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={_JSXStyle.dynamic([
5
+ [
6
+ "b9b97de593829e6",
7
+ [
8
+ a || 'var(--c)',
9
+ b || 'inherit'
10
+ ]
11
+ ]
12
+ ])}>
13
+
14
+ <p className={_JSXStyle.dynamic([
15
+ [
16
+ "b9b97de593829e6",
17
+ [
18
+ a || 'var(--c)',
19
+ b || 'inherit'
20
+ ]
21
+ ]
22
+ ])}>test</p>
23
+
24
+ <_JSXStyle id={"b9b97de593829e6"} dynamic={[
25
+ a || 'var(--c)',
26
+ b || 'inherit'
27
+ ]}>{`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 ${a || 'var(--c)'};color:${b || 'inherit'}}`}</_JSXStyle>
28
+
29
+ </div>;
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default class {
3
+ render() {
4
+ return <div className={_JSXStyle.dynamic([
5
+ [
6
+ "23692842dc904882",
7
+ [
8
+ a ? '100%' : '200px',
9
+ b ? '0' : '8px 20px'
10
+ ]
11
+ ]
12
+ ])}>
13
+
14
+ <p className={_JSXStyle.dynamic([
15
+ [
16
+ "23692842dc904882",
17
+ [
18
+ a ? '100%' : '200px',
19
+ b ? '0' : '8px 20px'
20
+ ]
21
+ ]
22
+ ])}>test</p>
23
+
24
+ <_JSXStyle id={"23692842dc904882"} dynamic={[
25
+ a ? '100%' : '200px',
26
+ b ? '0' : '8px 20px'
27
+ ]}>{`.item.__jsx-style-dynamic-selector{max-width:${a ? '100%' : '200px'};padding:${b ? '0' : '8px 20px'}}`}</_JSXStyle>
28
+
29
+ </div>;
30
+ }
31
+ }
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-4a27e5cf1c34b3df"}>
3
+
4
+ <p className={"jsx-4a27e5cf1c34b3df"}>test</p>
5
+
6
+ <_JSXStyle id={"4a27e5cf1c34b3df"}>{'html.jsx-4a27e5cf1c34b3df{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:#001}p{color:#002}p,a.jsx-4a27e5cf1c34b3df{color:#003}.foo+a{color:#004}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}p.jsx-4a27e5cf1c34b3df{color:#005}p.jsx-4a27e5cf1c34b3df{color:#006}*.jsx-4a27e5cf1c34b3df{color:#007}[href="woot"].jsx-4a27e5cf1c34b3df{color:#008}p.jsx-4a27e5cf1c34b3df a.jsx-4a27e5cf1c34b3df span.jsx-4a27e5cf1c34b3df{color:#009}p.jsx-4a27e5cf1c34b3df span{background:#00a}p.jsx-4a27e5cf1c34b3df a[title="\'w \' \' t\'"].jsx-4a27e5cf1c34b3df{margin:auto}p.jsx-4a27e5cf1c34b3df span:not(.test){color:#00b}p.jsx-4a27e5cf1c34b3df,h1.jsx-4a27e5cf1c34b3df{color:#00c;-webkit-animation:hahaha 3s ease forwards infinite;-moz-animation:hahaha 3s ease forwards infinite;-o-animation:hahaha 3s ease forwards infinite;animation:hahaha 3s ease forwards infinite;-webkit-animation-name:hahaha;-moz-animation-name:hahaha;-o-animation-name:hahaha;animation-name:hahaha;-webkit-animation-delay:100ms;-moz-animation-delay:100ms;-o-animation-delay:100ms;animation-delay:100ms}p.jsx-4a27e5cf1c34b3df{-webkit-animation:hahaha 1s,hehehe 2s;-moz-animation:hahaha 1s,hehehe 2s;-o-animation:hahaha 1s,hehehe 2s;animation:hahaha 1s,hehehe 2s}p.jsx-4a27e5cf1c34b3df:hover{color:#00d}p.jsx-4a27e5cf1c34b3df::before{color:#00e}.jsx-4a27e5cf1c34b3df:hover{color:#00f}.jsx-4a27e5cf1c34b3df::before{color:#010}.jsx-4a27e5cf1c34b3df:hover p.jsx-4a27e5cf1c34b3df{color:#011}p.jsx-4a27e5cf1c34b3df+a.jsx-4a27e5cf1c34b3df{color:#012}p.jsx-4a27e5cf1c34b3df~a.jsx-4a27e5cf1c34b3df{color:#013}p.jsx-4a27e5cf1c34b3df>a.jsx-4a27e5cf1c34b3df{color:#014}@-webkit-keyframes hahaha{from{top:0}to{top:100}}@-moz-keyframes hahaha{from{top:0}to{top:100}}@-o-keyframes hahaha{from{top:0}to{top:100}}@keyframes hahaha{from{top:0}to{top:100}}@-webkit-keyframes hehehe{from{left:0}to{left:100}}@-moz-keyframes hehehe{from{left:0}to{left:100}}@-o-keyframes hehehe{from{left:0}to{left:100}}@keyframes hehehe{from{left:0}to{left:100}}@media(min-width:500px){.test.jsx-4a27e5cf1c34b3df{color:#015}}.test.jsx-4a27e5cf1c34b3df{display:block}.inline-flex.jsx-4a27e5cf1c34b3df{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flex.jsx-4a27e5cf1c34b3df{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.test.jsx-4a27e5cf1c34b3df{-webkit-box-shadow:0 0 10px black,inset 0 0 5px black;-moz-box-shadow:0 0 10px black,inset 0 0 5px black;box-shadow:0 0 10px black,inset 0 0 5px black}.test[title=","].jsx-4a27e5cf1c34b3df{display:inline-block}.test.is-status.jsx-4a27e5cf1c34b3df .test.jsx-4a27e5cf1c34b3df{color:#016}.a-selector.jsx-4a27e5cf1c34b3df:hover,.a-selector.jsx-4a27e5cf1c34b3df:focus{outline:none}@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-4a27e5cf1c34b3df{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-4a27e5cf1c34b3df{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-4a27e5cf1c34b3df{margin-bottom:2rem}}}'}</_JSXStyle>
7
+
8
+ </div>);
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-713499aa363d6373"}>
3
+
4
+ <p className={"jsx-713499aa363d6373"}>test</p>
5
+
6
+ <_JSXStyle id={"713499aa363d6373"}>{"p.jsx-713499aa363d6373 a.jsx-713499aa363d6373 span.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373 span{background:blue}p.jsx-713499aa363d6373 a[title=\"'w ' ' t'\"].jsx-713499aa363d6373{margin:auto}p.jsx-713499aa363d6373 span:not(.test){color:green}p.jsx-713499aa363d6373,h1.jsx-713499aa363d6373{color:blue;-webkit-animation:hahaha 3s ease forwards infinite;-moz-animation:hahaha 3s ease forwards infinite;-o-animation:hahaha 3s ease forwards infinite;animation:hahaha 3s ease forwards infinite;-webkit-animation-name:hahaha;-moz-animation-name:hahaha;-o-animation-name:hahaha;animation-name:hahaha;-webkit-animation-delay:100ms;-moz-animation-delay:100ms;-o-animation-delay:100ms;animation-delay:100ms}p.jsx-713499aa363d6373{-webkit-animation:hahaha 1s,hehehe 2s;-moz-animation:hahaha 1s,hehehe 2s;-o-animation:hahaha 1s,hehehe 2s;animation:hahaha 1s,hehehe 2s}p.jsx-713499aa363d6373:hover{color:red}p.jsx-713499aa363d6373::before{color:red}.jsx-713499aa363d6373:hover{color:red}.jsx-713499aa363d6373::before{color:red}.jsx-713499aa363d6373:hover p.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373+a.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373~a.jsx-713499aa363d6373{color:red}p.jsx-713499aa363d6373>a.jsx-713499aa363d6373{color:red}@-webkit-keyframes hahaha{from{top:0}to{top:100}}@-moz-keyframes hahaha{from{top:0}to{top:100}}@-o-keyframes hahaha{from{top:0}to{top:100}}@keyframes hahaha{from{top:0}to{top:100}}@-webkit-keyframes hehehe{from{left:0}to{left:100}}@-moz-keyframes hehehe{from{left:0}to{left:100}}@-o-keyframes hehehe{from{left:0}to{left:100}}@keyframes hehehe{from{left:0}to{left:100}}@media(min-width:500px){.test.jsx-713499aa363d6373{color:red}}.test.jsx-713499aa363d6373{display:block}.inline-flex.jsx-713499aa363d6373{display:-webkit-inline-box;display:-webkit-inline-flex;display:-moz-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flex.jsx-713499aa363d6373{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.test.jsx-713499aa363d6373{-webkit-box-shadow:0 0 10px black,inset 0 0 5px black;-moz-box-shadow:0 0 10px black,inset 0 0 5px black;box-shadow:0 0 10px black,inset 0 0 5px black}.test[title=\",\"].jsx-713499aa363d6373{display:inline-block}.test.is-status.jsx-713499aa363d6373 .test.jsx-713499aa363d6373{color:red}.a-selector.jsx-713499aa363d6373:hover,.a-selector.jsx-713499aa363d6373:focus{outline:none}"}</_JSXStyle>
7
+
8
+ </div>);
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-efc590d693035654"}>
3
+
4
+ <p className={"jsx-efc590d693035654"}>test</p>
5
+
6
+ <_JSXStyle id={"efc590d693035654"}>{".a-selector.jsx-efc590d693035654:hover,.a-selector.jsx-efc590d693035654:focus{outline:none}"}</_JSXStyle>
7
+
8
+ </div>);
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-6881055ff9b1aeb6"}>
3
+
4
+ <p className={"jsx-6881055ff9b1aeb6"}>test</p>
5
+
6
+ <_JSXStyle id={"6881055ff9b1aeb6"}>{'html.jsx-6881055ff9b1aeb6{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:#001}h1{color:#002}h2,a.jsx-6881055ff9b1aeb6{color:#003}.foo+a{color:#004}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}'}</_JSXStyle>
7
+
8
+ </div>);
@@ -0,0 +1,8 @@
1
+ import _JSXStyle from "styled-jsx/style";
2
+ export default (()=><div className={"jsx-1f7963ae04c6466a"}>
3
+
4
+ <p className={"jsx-1f7963ae04c6466a"}>test</p>
5
+
6
+ <_JSXStyle id={"1f7963ae04c6466a"}>{'@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-1f7963ae04c6466a{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-1f7963ae04c6466a{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-1f7963ae04c6466a{margin-bottom:2rem}}}'}</_JSXStyle>
7
+
8
+ </div>);