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