@swc/plugin-styled-jsx 1.5.83 → 1.5.86

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 (217) hide show
  1. package/package.json +1 -1
  2. package/swc_plugin_styled_jsx.wasm +0 -0
  3. package/transform/Cargo.toml +0 -39
  4. package/transform/src/lib.rs +0 -7
  5. package/transform/src/lifetime.rs +0 -408
  6. package/transform/src/style.rs +0 -25
  7. package/transform/src/transform_css_lightningcss.rs +0 -589
  8. package/transform/src/transform_css_swc.rs +0 -392
  9. package/transform/src/utils.rs +0 -371
  10. package/transform/src/visitor.rs +0 -963
  11. package/transform/tests/errors/nested-style-tags/input.js +0 -31
  12. package/transform/tests/errors/nested-style-tags/output-lightningcss.js +0 -58
  13. package/transform/tests/errors/nested-style-tags/output-lightningcss.stderr +0 -27
  14. package/transform/tests/errors/nested-style-tags/output-swc.js +0 -58
  15. package/transform/tests/errors/nested-style-tags/output-swc.stderr +0 -27
  16. package/transform/tests/errors/nested-style-tags/output.js +0 -58
  17. package/transform/tests/errors/no-child/input.js +0 -6
  18. package/transform/tests/errors/no-child/output-lightningcss.js +0 -8
  19. package/transform/tests/errors/no-child/output-lightningcss.stderr +0 -9
  20. package/transform/tests/errors/no-child/output-swc.js +0 -8
  21. package/transform/tests/errors/no-child/output-swc.stderr +0 -9
  22. package/transform/tests/errors/no-child/output.js +0 -8
  23. package/transform/tests/errors/ts-with-css-resolve/input.js +0 -10
  24. package/transform/tests/errors/ts-with-css-resolve/output-lightningcss.js +0 -5
  25. package/transform/tests/errors/ts-with-css-resolve/output-lightningcss.stderr +0 -2
  26. package/transform/tests/errors/ts-with-css-resolve/output-swc.js +0 -5
  27. package/transform/tests/errors/ts-with-css-resolve/output-swc.stderr +0 -2
  28. package/transform/tests/errors/ts-with-css-resolve/output.js +0 -5
  29. package/transform/tests/errors/two-children/input.js +0 -8
  30. package/transform/tests/errors/two-children/output-lightningcss.js +0 -12
  31. package/transform/tests/errors/two-children/output-lightningcss.stderr +0 -11
  32. package/transform/tests/errors/two-children/output-swc.js +0 -12
  33. package/transform/tests/errors/two-children/output-swc.stderr +0 -11
  34. package/transform/tests/errors/two-children/output.js +0 -12
  35. package/transform/tests/errors/wrong-child-type/input.js +0 -7
  36. package/transform/tests/errors/wrong-child-type/output-lightningcss.js +0 -10
  37. package/transform/tests/errors/wrong-child-type/output-lightningcss.stderr +0 -10
  38. package/transform/tests/errors/wrong-child-type/output-swc.js +0 -10
  39. package/transform/tests/errors/wrong-child-type/output-swc.stderr +0 -10
  40. package/transform/tests/errors/wrong-child-type/output.js +0 -10
  41. package/transform/tests/errors/wrong-jsx-expression-type/input.js +0 -7
  42. package/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.js +0 -10
  43. package/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.stderr +0 -10
  44. package/transform/tests/errors/wrong-jsx-expression-type/output-swc.js +0 -10
  45. package/transform/tests/errors/wrong-jsx-expression-type/output-swc.stderr +0 -10
  46. package/transform/tests/errors/wrong-jsx-expression-type/output.js +0 -10
  47. package/transform/tests/fixture/.expressions/input.js +0 -90
  48. package/transform/tests/fixture/absent/input.js +0 -6
  49. package/transform/tests/fixture/absent/output.lightningcss.js +0 -7
  50. package/transform/tests/fixture/absent/output.swc.js +0 -7
  51. package/transform/tests/fixture/attribute-generation-classname-rewriting/input.js +0 -55
  52. package/transform/tests/fixture/attribute-generation-classname-rewriting/output.lightningcss.js +0 -112
  53. package/transform/tests/fixture/attribute-generation-classname-rewriting/output.swc.js +0 -112
  54. package/transform/tests/fixture/attribute-generation-modes/input.js +0 -166
  55. package/transform/tests/fixture/attribute-generation-modes/output.lightningcss.js +0 -228
  56. package/transform/tests/fixture/attribute-generation-modes/output.swc.js +0 -228
  57. package/transform/tests/fixture/class/input.js +0 -14
  58. package/transform/tests/fixture/class/output.lightningcss.js +0 -12
  59. package/transform/tests/fixture/class/output.swc.js +0 -12
  60. package/transform/tests/fixture/comments/input.js +0 -18
  61. package/transform/tests/fixture/comments/output.lightningcss.js +0 -12
  62. package/transform/tests/fixture/comments/output.swc.js +0 -12
  63. package/transform/tests/fixture/component-attribute/input.js +0 -11
  64. package/transform/tests/fixture/component-attribute/output.lightningcss.js +0 -10
  65. package/transform/tests/fixture/component-attribute/output.swc.js +0 -10
  66. package/transform/tests/fixture/conflicts/input.js +0 -16
  67. package/transform/tests/fixture/conflicts/output.lightningcss.js +0 -14
  68. package/transform/tests/fixture/conflicts/output.swc.js +0 -14
  69. package/transform/tests/fixture/css-selector-after-pseudo/input.js +0 -18
  70. package/transform/tests/fixture/css-selector-after-pseudo/output.lightningcss.js +0 -11
  71. package/transform/tests/fixture/css-selector-after-pseudo/output.swc.js +0 -11
  72. package/transform/tests/fixture/css-tag-same-file/input.js +0 -25
  73. package/transform/tests/fixture/css-tag-same-file/output.lightningcss.js +0 -21
  74. package/transform/tests/fixture/css-tag-same-file/output.swc.js +0 -21
  75. package/transform/tests/fixture/different-jsx-ids/input.js +0 -23
  76. package/transform/tests/fixture/different-jsx-ids/output.lightningcss.js +0 -24
  77. package/transform/tests/fixture/different-jsx-ids/output.swc.js +0 -24
  78. package/transform/tests/fixture/dynamic-element/input.js +0 -56
  79. package/transform/tests/fixture/dynamic-element/output.lightningcss.js +0 -40
  80. package/transform/tests/fixture/dynamic-element/output.swc.js +0 -40
  81. package/transform/tests/fixture/dynamic-element-class/input.js +0 -32
  82. package/transform/tests/fixture/dynamic-element-class/output.lightningcss.js +0 -25
  83. package/transform/tests/fixture/dynamic-element-class/output.swc.js +0 -25
  84. package/transform/tests/fixture/dynamic-element-external/input.js +0 -12
  85. package/transform/tests/fixture/dynamic-element-external/output.lightningcss.js +0 -12
  86. package/transform/tests/fixture/dynamic-element-external/output.swc.js +0 -12
  87. package/transform/tests/fixture/dynamic-this-in-arrow/input.js +0 -41
  88. package/transform/tests/fixture/dynamic-this-in-arrow/output.lightningcss.js +0 -39
  89. package/transform/tests/fixture/dynamic-this-in-arrow/output.swc.js +0 -39
  90. package/transform/tests/fixture/exported-jsx-style/input.js +0 -1
  91. package/transform/tests/fixture/exported-jsx-style/output.lightningcss.js +0 -1
  92. package/transform/tests/fixture/exported-jsx-style/output.swc.js +0 -1
  93. package/transform/tests/fixture/exported-non-jsx-style/input.js +0 -1
  94. package/transform/tests/fixture/exported-non-jsx-style/output.lightningcss.js +0 -1
  95. package/transform/tests/fixture/exported-non-jsx-style/output.swc.js +0 -1
  96. package/transform/tests/fixture/external-nested-scope/input.js +0 -5
  97. package/transform/tests/fixture/external-nested-scope/output.lightningcss.js +0 -7
  98. package/transform/tests/fixture/external-nested-scope/output.swc.js +0 -7
  99. package/transform/tests/fixture/external-stylesheet/input.js +0 -41
  100. package/transform/tests/fixture/external-stylesheet/output.lightningcss.js +0 -34
  101. package/transform/tests/fixture/external-stylesheet/output.swc.js +0 -34
  102. package/transform/tests/fixture/external-stylesheet-global/input.js +0 -19
  103. package/transform/tests/fixture/external-stylesheet-global/output.lightningcss.js +0 -18
  104. package/transform/tests/fixture/external-stylesheet-global/output.swc.js +0 -18
  105. package/transform/tests/fixture/external-stylesheet-multi-line/input.js +0 -9
  106. package/transform/tests/fixture/external-stylesheet-multi-line/output.lightningcss.js +0 -9
  107. package/transform/tests/fixture/external-stylesheet-multi-line/output.swc.js +0 -9
  108. package/transform/tests/fixture/fragment/input.js +0 -51
  109. package/transform/tests/fixture/fragment/output.lightningcss.js +0 -47
  110. package/transform/tests/fixture/fragment/output.swc.js +0 -47
  111. package/transform/tests/fixture/global/input.js +0 -22
  112. package/transform/tests/fixture/global/output.lightningcss.js +0 -7
  113. package/transform/tests/fixture/global/output.swc.js +0 -7
  114. package/transform/tests/fixture/global-child-selector/input.js +0 -10
  115. package/transform/tests/fixture/global-child-selector/output.lightningcss.js +0 -8
  116. package/transform/tests/fixture/global-child-selector/output.swc.js +0 -8
  117. package/transform/tests/fixture/global-redundant/input.js +0 -12
  118. package/transform/tests/fixture/global-redundant/output.lightningcss.js +0 -10
  119. package/transform/tests/fixture/global-redundant/output.swc.js +0 -10
  120. package/transform/tests/fixture/issue-30480/input.js +0 -11
  121. package/transform/tests/fixture/issue-30480/output.lightningcss.js +0 -15
  122. package/transform/tests/fixture/issue-30480/output.swc.js +0 -15
  123. package/transform/tests/fixture/issue-30570/input.js +0 -15
  124. package/transform/tests/fixture/issue-30570/output.lightningcss.js +0 -12
  125. package/transform/tests/fixture/issue-30570/output.swc.js +0 -12
  126. package/transform/tests/fixture/issue-31562-interpolation-in-mdea/input.js +0 -30
  127. package/transform/tests/fixture/issue-31562-interpolation-in-mdea/output.lightningcss.js +0 -43
  128. package/transform/tests/fixture/issue-31562-interpolation-in-mdea/output.swc.js +0 -43
  129. package/transform/tests/fixture/mixed-global-scoped/input.js +0 -9
  130. package/transform/tests/fixture/mixed-global-scoped/output.lightningcss.js +0 -11
  131. package/transform/tests/fixture/mixed-global-scoped/output.swc.js +0 -11
  132. package/transform/tests/fixture/multiple-jsx/input.js +0 -43
  133. package/transform/tests/fixture/multiple-jsx/output.lightningcss.js +0 -32
  134. package/transform/tests/fixture/multiple-jsx/output.swc.js +0 -32
  135. package/transform/tests/fixture/nested-style-tags/index.js +0 -0
  136. package/transform/tests/fixture/next-54653/input.js +0 -10
  137. package/transform/tests/fixture/next-54653/output.lightningcss.js +0 -3
  138. package/transform/tests/fixture/next-54653/output.swc.js +0 -3
  139. package/transform/tests/fixture/non-styled-jsx-style/input.js +0 -7
  140. package/transform/tests/fixture/non-styled-jsx-style/output.lightningcss.js +0 -12
  141. package/transform/tests/fixture/non-styled-jsx-style/output.swc.js +0 -12
  142. package/transform/tests/fixture/not-styled-jsx-tagged-templates/input.js +0 -30
  143. package/transform/tests/fixture/not-styled-jsx-tagged-templates/output.lightningcss.js +0 -23
  144. package/transform/tests/fixture/not-styled-jsx-tagged-templates/output.swc.js +0 -23
  145. package/transform/tests/fixture/number-after-placeholder/input.js +0 -17
  146. package/transform/tests/fixture/number-after-placeholder/output.lightningcss.js +0 -17
  147. package/transform/tests/fixture/number-after-placeholder/output.swc.js +0 -17
  148. package/transform/tests/fixture/one-off-global-selectors/input.js +0 -10
  149. package/transform/tests/fixture/one-off-global-selectors/output.lightningcss.js +0 -8
  150. package/transform/tests/fixture/one-off-global-selectors/output.swc.js +0 -8
  151. package/transform/tests/fixture/source-maps/input.js +0 -8
  152. package/transform/tests/fixture/source-maps/output.lightningcss.js +0 -8
  153. package/transform/tests/fixture/source-maps/output.swc.js +0 -8
  154. package/transform/tests/fixture/stateless/input.js +0 -8
  155. package/transform/tests/fixture/stateless/output.lightningcss.js +0 -12
  156. package/transform/tests/fixture/stateless/output.swc.js +0 -12
  157. package/transform/tests/fixture/styles/input.js +0 -57
  158. package/transform/tests/fixture/styles/output.lightningcss.js +0 -39
  159. package/transform/tests/fixture/styles/output.swc.js +0 -39
  160. package/transform/tests/fixture/styles-external-invalid/input.js +0 -13
  161. package/transform/tests/fixture/styles-external-invalid/output.lightningcss.js +0 -9
  162. package/transform/tests/fixture/styles-external-invalid/output.swc.js +0 -9
  163. package/transform/tests/fixture/styles-external-invalid2/input.js +0 -11
  164. package/transform/tests/fixture/styles-external-invalid2/output.lightningcss.js +0 -8
  165. package/transform/tests/fixture/styles-external-invalid2/output.swc.js +0 -8
  166. package/transform/tests/fixture/styles2/input.js +0 -6
  167. package/transform/tests/fixture/styles2/output.lightningcss.js +0 -5
  168. package/transform/tests/fixture/styles2/output.swc.js +0 -5
  169. package/transform/tests/fixture/too-many/input.js +0 -35
  170. package/transform/tests/fixture/too-many/output.lightningcss.js +0 -49
  171. package/transform/tests/fixture/too-many/output.swc.js +0 -49
  172. package/transform/tests/fixture/tpl-escape-1/input.js +0 -14
  173. package/transform/tests/fixture/tpl-escape-1/output.lightningcss.js +0 -12
  174. package/transform/tests/fixture/tpl-escape-1/output.swc.js +0 -12
  175. package/transform/tests/fixture/tpl-escape-2/input.js +0 -17
  176. package/transform/tests/fixture/tpl-escape-2/output.lightningcss.js +0 -17
  177. package/transform/tests/fixture/tpl-escape-2/output.swc.js +0 -17
  178. package/transform/tests/fixture/tpl-placeholder-1-as-property/input.js +0 -17
  179. package/transform/tests/fixture/tpl-placeholder-1-as-property/output.lightningcss.js +0 -28
  180. package/transform/tests/fixture/tpl-placeholder-1-as-property/output.swc.js +0 -28
  181. package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/input.js +0 -21
  182. package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/output.lightningcss.js +0 -34
  183. package/transform/tests/fixture/tpl-placeholder-2-as-part-of-value/output.swc.js +0 -34
  184. package/transform/tests/fixture/tpl-placeholder-3-as-value/input.js +0 -17
  185. package/transform/tests/fixture/tpl-placeholder-3-as-value/output.lightningcss.js +0 -28
  186. package/transform/tests/fixture/tpl-placeholder-3-as-value/output.swc.js +0 -28
  187. package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/input.js +0 -17
  188. package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.lightningcss.js +0 -31
  189. package/transform/tests/fixture/tpl-placeholder-4-as-part-of-value-in-multiple/output.swc.js +0 -31
  190. package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/input.js +0 -16
  191. package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.lightningcss.js +0 -31
  192. package/transform/tests/fixture/tpl-placeholder-5-values-of-multiple-properties/output.swc.js +0 -31
  193. package/transform/tests/fixture/transform-css/input.js +0 -176
  194. package/transform/tests/fixture/transform-css/output.lightningcss.js +0 -8
  195. package/transform/tests/fixture/transform-css/output.swc.js +0 -8
  196. package/transform/tests/fixture/transform-css-complex-selector/input.js +0 -116
  197. package/transform/tests/fixture/transform-css-complex-selector/output.lightningcss.js +0 -8
  198. package/transform/tests/fixture/transform-css-complex-selector/output.swc.js +0 -8
  199. package/transform/tests/fixture/transform-css-complex-selector-2/input.js +0 -12
  200. package/transform/tests/fixture/transform-css-complex-selector-2/output.lightningcss.js +0 -8
  201. package/transform/tests/fixture/transform-css-complex-selector-2/output.swc.js +0 -8
  202. package/transform/tests/fixture/transform-css-global/input.js +0 -32
  203. package/transform/tests/fixture/transform-css-global/output.lightningcss.js +0 -8
  204. package/transform/tests/fixture/transform-css-global/output.swc.js +0 -8
  205. package/transform/tests/fixture/transform-css-media-query/input.js +0 -24
  206. package/transform/tests/fixture/transform-css-media-query/output.lightningcss.js +0 -8
  207. package/transform/tests/fixture/transform-css-media-query/output.swc.js +0 -8
  208. package/transform/tests/fixture/transform-css-normal/input.js +0 -22
  209. package/transform/tests/fixture/transform-css-normal/output.lightningcss.js +0 -8
  210. package/transform/tests/fixture/transform-css-normal/output.swc.js +0 -8
  211. package/transform/tests/fixture/transform-css-nth-1/input.js +0 -10
  212. package/transform/tests/fixture/transform-css-nth-1/output.lightningcss.js +0 -8
  213. package/transform/tests/fixture/transform-css-nth-1/output.swc.js +0 -8
  214. package/transform/tests/fixture/whitespace/input.js +0 -12
  215. package/transform/tests/fixture/whitespace/output.lightningcss.js +0 -12
  216. package/transform/tests/fixture/whitespace/output.swc.js +0 -12
  217. package/transform/tests/fixture.rs +0 -129
@@ -1,7 +0,0 @@
1
- const a = ()=><div>
2
-
3
- <p>hi</p>
4
-
5
- <style>{'woot'}</style>
6
-
7
- </div>;
@@ -1,7 +0,0 @@
1
- const a = ()=><div>
2
-
3
- <p>hi</p>
4
-
5
- <style>{'woot'}</style>
6
-
7
- </div>;
@@ -1,55 +0,0 @@
1
- export default () => {
2
- const Element = 'div'
3
- return (
4
- <div>
5
- <div className="test" {...test.test} />
6
- <div className="test" {...test.test.test} />
7
- <div className="test" {...this.test.test} />
8
- <div data-test="test" />
9
- <div className={'test'} />
10
- <div className={`test`} />
11
- <div className={`test${true ? ' test2' : ''}`} />
12
- <div className={'test ' + test} />
13
- <div className={['test', 'test2'].join(' ')} />
14
- <div className={true && 'test'} />
15
- <div className={test ? 'test' : null} />
16
- <div className={test} />
17
- <div className={test && 'test'} />
18
- <div className={test && test('test')} />
19
- <div className={undefined} />
20
- <div className={null} />
21
- <div className={false} />
22
- <div className={'test'} data-test />
23
- <div data-test className={'test'} />
24
- <div className={'test'} data-test="test" />
25
- <div className={'test'} {...props} />
26
- <div className={'test'} {...props} {...rest} />
27
- <div className={`test ${test ? 'test' : ''}`} {...props} />
28
- <div className={test && test('test')} {...props} />
29
- <div className={test && test('test') && 'test'} {...props} />
30
- <div className={test && test('test') && test2('test')} {...props} />
31
- <div {...props} className={'test'} />
32
- <div {...props} {...rest} className={'test'} />
33
- <div {...props} className={'test'} {...rest} />
34
- <div {...props} />
35
- <div {...props} {...rest} />
36
- <div {...props} data-foo {...rest} />
37
- <div {...props} className={'test'} data-foo {...rest} />
38
- <div {...{ id: 'foo' }} />
39
- <div {...{ className: 'foo' }} />
40
- <div {...{ className: 'foo' }} className="test" />
41
- <div className="test" {...{ className: 'foo' }} />
42
- <div {...{ className: 'foo' }} {...bar} />
43
- <div {...{ className: 'foo' }} {...bar} className="test" />
44
- <div className="test" {...{ className: 'foo' }} {...bar} />
45
- <div className="test" {...{ className: props.className }} />
46
- <div className="test" {...{ className: props.className }} {...bar} />
47
- <div className="test" {...bar} {...{ className: props.className }} />
48
- <div className="test" {...bar()} />
49
- <Element />
50
- <Element className="test" />
51
- <Element {...props} />
52
- <style jsx>{'div { color: red }'}</style>
53
- </div>
54
- )
55
- }
@@ -1,112 +0,0 @@
1
- import _JSXStyle from "styled-jsx/style";
2
- export default (()=>{
3
- const Element = 'div';
4
- return <div className={"jsx-abb4c2202db1a207"}>
5
-
6
- <div {...test.test} className={"jsx-abb4c2202db1a207" + " " + (test.test && test.test.className != null && test.test.className || "test")}/>
7
-
8
- <div {...test.test.test} className={"jsx-abb4c2202db1a207" + " " + (test.test.test && test.test.test.className != null && test.test.test.className || "test")}/>
9
-
10
- <div {...this.test.test} className={"jsx-abb4c2202db1a207" + " " + (this.test.test && this.test.test.className != null && this.test.test.className || "test")}/>
11
-
12
- <div data-test="test" className={"jsx-abb4c2202db1a207"}/>
13
-
14
- <div className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
15
-
16
- <div className={"jsx-abb4c2202db1a207" + " " + `test`}/>
17
-
18
- <div className={"jsx-abb4c2202db1a207" + " " + `test${true ? ' test2' : ''}`}/>
19
-
20
- <div className={"jsx-abb4c2202db1a207" + " " + ('test ' + test || "")}/>
21
-
22
- <div className={"jsx-abb4c2202db1a207" + " " + ([
23
- 'test',
24
- 'test2'
25
- ].join(' ') || "")}/>
26
-
27
- <div className={"jsx-abb4c2202db1a207" + " " + (true && 'test' || "")}/>
28
-
29
- <div className={"jsx-abb4c2202db1a207" + " " + ((test ? 'test' : null) || "")}/>
30
-
31
- <div className={"jsx-abb4c2202db1a207" + " " + (test || "")}/>
32
-
33
- <div className={"jsx-abb4c2202db1a207" + " " + (test && 'test' || "")}/>
34
-
35
- <div className={"jsx-abb4c2202db1a207" + " " + (test && test('test') || "")}/>
36
-
37
- <div className={"jsx-abb4c2202db1a207" + " " + (undefined || "")}/>
38
-
39
- <div className={"jsx-abb4c2202db1a207" + " " + (null || "")}/>
40
-
41
- <div className={"jsx-abb4c2202db1a207" + " " + (false || "")}/>
42
-
43
- <div data-test className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
44
-
45
- <div data-test className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
46
-
47
- <div data-test="test" className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
48
-
49
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || 'test')}/>
50
-
51
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || 'test')}/>
52
-
53
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || `test ${test ? 'test' : ''}`)}/>
54
-
55
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') || "")}/>
56
-
57
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') && 'test' || "")}/>
58
-
59
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') && test2('test') || "")}/>
60
-
61
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
62
-
63
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
64
-
65
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || 'test')}/>
66
-
67
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")}/>
68
-
69
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")}/>
70
-
71
- <div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")}/>
72
-
73
- <div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || 'test')}/>
74
-
75
- <div {...{
76
- id: 'foo'
77
- }} className={"jsx-abb4c2202db1a207"}/>
78
-
79
- <div className={"jsx-abb4c2202db1a207" + " " + 'foo'}/>
80
-
81
- <div {...{
82
- className: 'foo'
83
- }} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
84
-
85
- <div className="test" className={"jsx-abb4c2202db1a207" + " " + 'foo'}/>
86
-
87
- <div {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || 'foo')}/>
88
-
89
- <div {...{
90
- className: 'foo'
91
- }} {...bar} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
92
-
93
- <div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || 'foo')}/>
94
-
95
- <div className="test" className={"jsx-abb4c2202db1a207" + " " + (props.className || "")}/>
96
-
97
- <div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || props.className || "")}/>
98
-
99
- <div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (props.className || "")}/>
100
-
101
- <div {...bar()} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
102
-
103
- <Element className={"jsx-abb4c2202db1a207"}/>
104
-
105
- <Element className={"jsx-abb4c2202db1a207" + " " + "test"}/>
106
-
107
- <Element {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")}/>
108
-
109
- <_JSXStyle id={"abb4c2202db1a207"}>{"div.jsx-abb4c2202db1a207{color:red}"}</_JSXStyle>
110
-
111
- </div>;
112
- });
@@ -1,112 +0,0 @@
1
- import _JSXStyle from "styled-jsx/style";
2
- export default (()=>{
3
- const Element = 'div';
4
- return <div className={"jsx-abb4c2202db1a207"}>
5
-
6
- <div {...test.test} className={"jsx-abb4c2202db1a207" + " " + (test.test && test.test.className != null && test.test.className || "test")}/>
7
-
8
- <div {...test.test.test} className={"jsx-abb4c2202db1a207" + " " + (test.test.test && test.test.test.className != null && test.test.test.className || "test")}/>
9
-
10
- <div {...this.test.test} className={"jsx-abb4c2202db1a207" + " " + (this.test.test && this.test.test.className != null && this.test.test.className || "test")}/>
11
-
12
- <div data-test="test" className={"jsx-abb4c2202db1a207"}/>
13
-
14
- <div className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
15
-
16
- <div className={"jsx-abb4c2202db1a207" + " " + `test`}/>
17
-
18
- <div className={"jsx-abb4c2202db1a207" + " " + `test${true ? ' test2' : ''}`}/>
19
-
20
- <div className={"jsx-abb4c2202db1a207" + " " + ('test ' + test || "")}/>
21
-
22
- <div className={"jsx-abb4c2202db1a207" + " " + ([
23
- 'test',
24
- 'test2'
25
- ].join(' ') || "")}/>
26
-
27
- <div className={"jsx-abb4c2202db1a207" + " " + (true && 'test' || "")}/>
28
-
29
- <div className={"jsx-abb4c2202db1a207" + " " + ((test ? 'test' : null) || "")}/>
30
-
31
- <div className={"jsx-abb4c2202db1a207" + " " + (test || "")}/>
32
-
33
- <div className={"jsx-abb4c2202db1a207" + " " + (test && 'test' || "")}/>
34
-
35
- <div className={"jsx-abb4c2202db1a207" + " " + (test && test('test') || "")}/>
36
-
37
- <div className={"jsx-abb4c2202db1a207" + " " + (undefined || "")}/>
38
-
39
- <div className={"jsx-abb4c2202db1a207" + " " + (null || "")}/>
40
-
41
- <div className={"jsx-abb4c2202db1a207" + " " + (false || "")}/>
42
-
43
- <div data-test className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
44
-
45
- <div data-test className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
46
-
47
- <div data-test="test" className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
48
-
49
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || 'test')}/>
50
-
51
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || 'test')}/>
52
-
53
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || `test ${test ? 'test' : ''}`)}/>
54
-
55
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') || "")}/>
56
-
57
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') && 'test' || "")}/>
58
-
59
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') && test2('test') || "")}/>
60
-
61
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
62
-
63
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
64
-
65
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || 'test')}/>
66
-
67
- <div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")}/>
68
-
69
- <div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")}/>
70
-
71
- <div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")}/>
72
-
73
- <div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || 'test')}/>
74
-
75
- <div {...{
76
- id: 'foo'
77
- }} className={"jsx-abb4c2202db1a207"}/>
78
-
79
- <div className={"jsx-abb4c2202db1a207" + " " + 'foo'}/>
80
-
81
- <div {...{
82
- className: 'foo'
83
- }} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
84
-
85
- <div className="test" className={"jsx-abb4c2202db1a207" + " " + 'foo'}/>
86
-
87
- <div {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || 'foo')}/>
88
-
89
- <div {...{
90
- className: 'foo'
91
- }} {...bar} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
92
-
93
- <div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || 'foo')}/>
94
-
95
- <div className="test" className={"jsx-abb4c2202db1a207" + " " + (props.className || "")}/>
96
-
97
- <div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || props.className || "")}/>
98
-
99
- <div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (props.className || "")}/>
100
-
101
- <div {...bar()} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
102
-
103
- <Element className={"jsx-abb4c2202db1a207"}/>
104
-
105
- <Element className={"jsx-abb4c2202db1a207" + " " + "test"}/>
106
-
107
- <Element {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")}/>
108
-
109
- <_JSXStyle id={"abb4c2202db1a207"}>{"div.jsx-abb4c2202db1a207{color:red}"}</_JSXStyle>
110
-
111
- </div>;
112
- });
@@ -1,166 +0,0 @@
1
- import styles from './styles'
2
-
3
- const styles2 = require('./styles2')
4
-
5
- // external only
6
- export const Test1 = () => (
7
- <div>
8
- <p>external only</p>
9
- <style jsx>{styles}</style>
10
- <style jsx>{styles2}</style>
11
- </div>
12
- )
13
-
14
- // external and static
15
- export const Test2 = () => (
16
- <div>
17
- <p>external and static</p>
18
- <style jsx>{`
19
- p {
20
- color: red;
21
- }
22
- `}</style>
23
- <style jsx>{styles}</style>
24
- </div>
25
- )
26
-
27
- // external and dynamic
28
- export const Test3 = ({ color }) => (
29
- <div>
30
- <p>external and dynamic</p>
31
- <style jsx>{`
32
- p {
33
- color: ${color};
34
- }
35
- `}</style>
36
- <style jsx>{styles}</style>
37
- </div>
38
- )
39
-
40
- // external, static and dynamic
41
- export const Test4 = ({ color }) => (
42
- <div>
43
- <p>external, static and dynamic</p>
44
- <style jsx>{`
45
- p {
46
- display: inline-block;
47
- }
48
- `}</style>
49
- <style jsx>{`
50
- p {
51
- color: ${color};
52
- }
53
- `}</style>
54
- <style jsx>{styles}</style>
55
- </div>
56
- )
57
-
58
- // static only
59
- export const Test5 = () => (
60
- <div>
61
- <p>static only</p>
62
- <style jsx>{`
63
- p {
64
- display: inline-block;
65
- }
66
- `}</style>
67
- <style jsx>{`
68
- p {
69
- color: red;
70
- }
71
- `}</style>
72
- </div>
73
- )
74
-
75
- // static and dynamic
76
- export const Test6 = ({ color }) => (
77
- <div>
78
- <p>static and dynamic</p>
79
- <style jsx>{`
80
- p {
81
- display: inline-block;
82
- }
83
- `}</style>
84
- <style jsx>{`
85
- p {
86
- color: ${color};
87
- }
88
- `}</style>
89
- </div>
90
- )
91
-
92
- // dynamic only
93
- export const Test7 = ({ color }) => (
94
- <div>
95
- <p>dynamic only</p>
96
- <style jsx>{`
97
- p {
98
- color: ${color};
99
- }
100
- `}</style>
101
- </div>
102
- )
103
-
104
- // dynamic with scoped compound variable
105
- export const Test8 = ({ color }) => {
106
- if (color) {
107
- const innerProps = { color }
108
-
109
- return (
110
- <div>
111
- <p>dynamic with scoped compound variable</p>
112
- <style jsx>{`
113
- p {
114
- color: ${innerProps.color};
115
- }
116
- `}</style>
117
- </div>
118
- )
119
- }
120
- }
121
-
122
- // dynamic with compound variable
123
- export const Test9 = ({ color }) => {
124
- const innerProps = { color }
125
-
126
- return (
127
- <div>
128
- <p>dynamic with compound variable</p>
129
- <style jsx>{`
130
- p {
131
- color: ${innerProps.color};
132
- }
133
- `}</style>
134
- </div>
135
- )
136
- }
137
-
138
- const foo = 'red'
139
-
140
- // dynamic with constant variable
141
- export const Test10 = () => (
142
- <div>
143
- <p>dynamic with constant variable</p>
144
- <style jsx>{`
145
- p {
146
- color: ${foo};
147
- }
148
- `}</style>
149
- </div>
150
- )
151
-
152
- // dynamic with complex scope
153
- export const Test11 = ({ color }) => {
154
- const items = Array.from({ length: 5 }).map((item, i) => (
155
- <li className="item" key={i}>
156
- <style jsx>{`
157
- .item {
158
- color: ${color};
159
- }
160
- `}</style>
161
- Item #{i + 1}
162
- </li>
163
- ))
164
-
165
- return <ul className="items">{items}</ul>
166
- }