@antebudimir/eslint-plugin-vanilla-extract 1.13.0 → 1.15.0
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/README.md +150 -4
- package/dist/css-rules/prefer-logical-properties/_tests_/prefer-logical-properties.test.d.ts +1 -0
- package/dist/css-rules/prefer-logical-properties/_tests_/prefer-logical-properties.test.js +572 -0
- package/dist/css-rules/prefer-logical-properties/index.d.ts +2 -0
- package/dist/css-rules/prefer-logical-properties/index.js +2 -0
- package/dist/css-rules/prefer-logical-properties/logical-properties-processor.d.ts +19 -0
- package/dist/css-rules/prefer-logical-properties/logical-properties-processor.js +202 -0
- package/dist/css-rules/prefer-logical-properties/logical-properties-visitor-creator.d.ts +14 -0
- package/dist/css-rules/prefer-logical-properties/logical-properties-visitor-creator.js +67 -0
- package/dist/css-rules/prefer-logical-properties/property-mappings.d.ts +44 -0
- package/dist/css-rules/prefer-logical-properties/property-mappings.js +179 -0
- package/dist/css-rules/prefer-logical-properties/rule-definition.d.ts +3 -0
- package/dist/css-rules/prefer-logical-properties/rule-definition.js +35 -0
- package/dist/css-rules/prefer-theme-tokens/index.d.ts +2 -0
- package/dist/css-rules/prefer-theme-tokens/index.js +2 -0
- package/dist/css-rules/prefer-theme-tokens/rule-definition.d.ts +3 -0
- package/dist/css-rules/prefer-theme-tokens/rule-definition.js +119 -0
- package/dist/css-rules/prefer-theme-tokens/theme-contract-analyzer.d.ts +60 -0
- package/dist/css-rules/prefer-theme-tokens/theme-contract-analyzer.js +322 -0
- package/dist/css-rules/prefer-theme-tokens/theme-token-processor.d.ts +26 -0
- package/dist/css-rules/prefer-theme-tokens/theme-token-processor.js +562 -0
- package/dist/css-rules/prefer-theme-tokens/theme-token-visitor-creator.d.ts +6 -0
- package/dist/css-rules/prefer-theme-tokens/theme-token-visitor-creator.js +81 -0
- package/dist/css-rules/prefer-theme-tokens/value-evaluator.d.ts +43 -0
- package/dist/css-rules/prefer-theme-tokens/value-evaluator.js +190 -0
- package/dist/demo-bad-example.css.d.ts +4 -0
- package/dist/demo-bad-example.css.js +45 -0
- package/dist/demo-good-example.css.d.ts +5 -0
- package/dist/demo-good-example.css.js +48 -0
- package/dist/demo-theme.css.d.ts +37 -0
- package/dist/demo-theme.css.js +39 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/sample-bad.css.d.ts +26 -0
- package/dist/sample-bad.css.js +85 -0
- package/dist/sample-good.css.d.ts +27 -0
- package/dist/sample-good.css.js +94 -0
- package/dist/sample-theme.css.d.ts +37 -0
- package/dist/sample-theme.css.js +38 -0
- package/dist/sample.css.d.ts +75 -0
- package/dist/sample.css.js +530 -0
- package/package.json +5 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const themeClass: string, theme: {
|
|
2
|
+
colors: {
|
|
3
|
+
primary: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
4
|
+
secondary: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
5
|
+
background: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
6
|
+
text: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
7
|
+
error: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
8
|
+
success: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
9
|
+
warning: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
10
|
+
hover: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
11
|
+
border: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
+
};
|
|
13
|
+
spacing: {
|
|
14
|
+
xs: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
15
|
+
sm: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
16
|
+
md: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
17
|
+
lg: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
+
xl: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
19
|
+
'2xl': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
20
|
+
};
|
|
21
|
+
fontSizes: {
|
|
22
|
+
xs: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
23
|
+
sm: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
24
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
25
|
+
lg: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
26
|
+
xl: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
27
|
+
'2xl': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
28
|
+
'3xl': `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
29
|
+
};
|
|
30
|
+
radii: {
|
|
31
|
+
none: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
32
|
+
sm: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
33
|
+
md: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
34
|
+
lg: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
35
|
+
full: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createTheme } from '@vanilla-extract/css';
|
|
2
|
+
export const [themeClass, theme] = createTheme({
|
|
3
|
+
colors: {
|
|
4
|
+
primary: '#3b82f6',
|
|
5
|
+
secondary: '#8b5cf6',
|
|
6
|
+
background: '#ffffff',
|
|
7
|
+
text: '#1f2937',
|
|
8
|
+
error: '#ef4444',
|
|
9
|
+
success: '#10b981',
|
|
10
|
+
warning: '#f59e0b',
|
|
11
|
+
hover: '#2563eb',
|
|
12
|
+
border: '#e5e7eb',
|
|
13
|
+
},
|
|
14
|
+
spacing: {
|
|
15
|
+
xs: '0.25rem',
|
|
16
|
+
sm: '0.5rem',
|
|
17
|
+
md: '1rem',
|
|
18
|
+
lg: '1.5rem',
|
|
19
|
+
xl: '2rem',
|
|
20
|
+
'2xl': '3rem',
|
|
21
|
+
},
|
|
22
|
+
fontSizes: {
|
|
23
|
+
xs: '0.75rem',
|
|
24
|
+
sm: '0.875rem',
|
|
25
|
+
base: '1rem',
|
|
26
|
+
lg: '1.125rem',
|
|
27
|
+
xl: '1.25rem',
|
|
28
|
+
'2xl': '1.5rem',
|
|
29
|
+
'3xl': '1.875rem',
|
|
30
|
+
},
|
|
31
|
+
radii: {
|
|
32
|
+
none: '0',
|
|
33
|
+
sm: '0.125rem',
|
|
34
|
+
md: '0.375rem',
|
|
35
|
+
lg: '0.5rem',
|
|
36
|
+
full: '9999px',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare const theFont: string;
|
|
2
|
+
export declare const spinster: void;
|
|
3
|
+
export declare const starter: string;
|
|
4
|
+
export declare const accordionContent: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
5
|
+
isOpen: {
|
|
6
|
+
false: {
|
|
7
|
+
boxSizing: "inherit";
|
|
8
|
+
position: "relative";
|
|
9
|
+
right: "inherit";
|
|
10
|
+
display: "flex";
|
|
11
|
+
gap: "revert";
|
|
12
|
+
transform: "none";
|
|
13
|
+
margin: "11rem";
|
|
14
|
+
outline: "none";
|
|
15
|
+
border: "Background";
|
|
16
|
+
borderRight: "ActiveBorder";
|
|
17
|
+
borderLeft: "ActiveBorder";
|
|
18
|
+
borderRadius: "initial";
|
|
19
|
+
borderBottomLeftRadius: "initial";
|
|
20
|
+
borderBottomRightRadius: "initial";
|
|
21
|
+
boxShadow: "none";
|
|
22
|
+
backgroundColor: "initial";
|
|
23
|
+
cursor: "pointer";
|
|
24
|
+
width: "100%";
|
|
25
|
+
color: "red";
|
|
26
|
+
fontSize: "large";
|
|
27
|
+
};
|
|
28
|
+
true: {
|
|
29
|
+
boxSizing: "inherit";
|
|
30
|
+
position: "relative";
|
|
31
|
+
right: "inherit";
|
|
32
|
+
display: "flex";
|
|
33
|
+
gap: "revert";
|
|
34
|
+
transform: "none";
|
|
35
|
+
margin: "11rem";
|
|
36
|
+
outline: "none";
|
|
37
|
+
border: "Background";
|
|
38
|
+
borderRight: "ActiveBorder";
|
|
39
|
+
borderLeft: "ActiveBorder";
|
|
40
|
+
borderRadius: "initial";
|
|
41
|
+
borderBottomLeftRadius: "initial";
|
|
42
|
+
borderBottomRightRadius: "initial";
|
|
43
|
+
boxShadow: "none";
|
|
44
|
+
backgroundColor: "initial";
|
|
45
|
+
cursor: "pointer";
|
|
46
|
+
width: "100%";
|
|
47
|
+
color: "red";
|
|
48
|
+
fontSize: "large";
|
|
49
|
+
':hover': {
|
|
50
|
+
boxSizing: "inherit";
|
|
51
|
+
position: "relative";
|
|
52
|
+
right: "inherit";
|
|
53
|
+
display: "flex";
|
|
54
|
+
gap: "revert";
|
|
55
|
+
transform: "none";
|
|
56
|
+
margin: "11rem";
|
|
57
|
+
outline: "none";
|
|
58
|
+
border: "Background";
|
|
59
|
+
borderRight: "ActiveBorder";
|
|
60
|
+
borderLeft: "ActiveBorder";
|
|
61
|
+
borderRadius: "initial";
|
|
62
|
+
borderBottomLeftRadius: "initial";
|
|
63
|
+
borderBottomRightRadius: "initial";
|
|
64
|
+
boxShadow: "none";
|
|
65
|
+
backgroundColor: "initial";
|
|
66
|
+
cursor: "pointer";
|
|
67
|
+
width: "100%";
|
|
68
|
+
color: "red";
|
|
69
|
+
fontSize: "large";
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
export declare const item: string;
|
|
75
|
+
export declare const selectButtonVariants: Record<"bordered" | "borderless", string>;
|
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import { fontFace, globalFontFace, globalKeyframes, globalStyle, keyframes, style, styleVariants, } from '@vanilla-extract/css';
|
|
2
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
3
|
+
// fontFaces
|
|
4
|
+
export const theFont = fontFace({
|
|
5
|
+
// Comment to test that the linter doesn't remove it
|
|
6
|
+
src: ['url("/fonts/MyFont.woff2") format("woff2")', 'url("/fonts/MyFont.woff") format("woff")'],
|
|
7
|
+
ascentOverride: '90%',
|
|
8
|
+
descentOverride: '10%',
|
|
9
|
+
fontDisplay: 'swap',
|
|
10
|
+
fontFeatureSettings: '"liga" 1',
|
|
11
|
+
fontStretch: 'normal',
|
|
12
|
+
fontStyle: 'normal',
|
|
13
|
+
fontVariant: 'normal',
|
|
14
|
+
fontVariationSettings: '"wght" 400',
|
|
15
|
+
fontWeight: '400 700',
|
|
16
|
+
lineGapOverride: '10%',
|
|
17
|
+
sizeAdjust: '90%',
|
|
18
|
+
unicodeRange: 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD',
|
|
19
|
+
});
|
|
20
|
+
globalFontFace('GlobalFont', {
|
|
21
|
+
// Comment to test that the linter doesn't remove it
|
|
22
|
+
src: ['url("/fonts/MyFont.woff2") format("woff2")', 'url("/fonts/MyFont.woff") format("woff")'],
|
|
23
|
+
ascentOverride: '90%',
|
|
24
|
+
descentOverride: '10%',
|
|
25
|
+
fontDisplay: 'swap',
|
|
26
|
+
fontFeatureSettings: '"liga" 1',
|
|
27
|
+
fontStretch: 'normal',
|
|
28
|
+
fontStyle: 'normal',
|
|
29
|
+
fontVariant: 'normal',
|
|
30
|
+
fontVariationSettings: '"wght" 400',
|
|
31
|
+
fontWeight: '400 700',
|
|
32
|
+
lineGapOverride: '10%',
|
|
33
|
+
sizeAdjust: '90%',
|
|
34
|
+
unicodeRange: 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD',
|
|
35
|
+
});
|
|
36
|
+
// keyframes
|
|
37
|
+
export const spinster = globalKeyframes('spin', {
|
|
38
|
+
// Comment to test that the linter doesn't remove it
|
|
39
|
+
from: {
|
|
40
|
+
boxSizing: 'inherit',
|
|
41
|
+
position: 'relative',
|
|
42
|
+
right: 'inherit',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
gap: 'revert',
|
|
45
|
+
transform: 'none',
|
|
46
|
+
margin: '11rem',
|
|
47
|
+
outline: 'none',
|
|
48
|
+
border: 'Background',
|
|
49
|
+
borderRight: 'ActiveBorder',
|
|
50
|
+
borderLeft: 'ActiveBorder',
|
|
51
|
+
borderRadius: 'initial',
|
|
52
|
+
borderBottomLeftRadius: 'initial',
|
|
53
|
+
borderBottomRightRadius: 'initial',
|
|
54
|
+
boxShadow: 'none',
|
|
55
|
+
backgroundColor: 'initial',
|
|
56
|
+
cursor: 'pointer',
|
|
57
|
+
width: '100%',
|
|
58
|
+
color: 'red',
|
|
59
|
+
fontSize: 'large',
|
|
60
|
+
},
|
|
61
|
+
// Comment to test that the linter doesn't remove it
|
|
62
|
+
to: {
|
|
63
|
+
// Comment to test that the linter doesn't remove it
|
|
64
|
+
boxSizing: 'inherit',
|
|
65
|
+
position: 'relative',
|
|
66
|
+
right: 'inherit',
|
|
67
|
+
display: 'flex',
|
|
68
|
+
gap: 'revert',
|
|
69
|
+
transform: 'none',
|
|
70
|
+
margin: '11rem',
|
|
71
|
+
outline: 'none',
|
|
72
|
+
border: 'Background',
|
|
73
|
+
borderRight: 'ActiveBorder',
|
|
74
|
+
borderLeft: 'ActiveBorder',
|
|
75
|
+
borderRadius: 'initial',
|
|
76
|
+
borderBottomLeftRadius: 'initial',
|
|
77
|
+
borderBottomRightRadius: 'initial',
|
|
78
|
+
boxShadow: 'none',
|
|
79
|
+
backgroundColor: 'initial',
|
|
80
|
+
cursor: 'pointer',
|
|
81
|
+
width: '100%',
|
|
82
|
+
color: 'red',
|
|
83
|
+
fontSize: 'large',
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
export const starter = keyframes({
|
|
87
|
+
// Comment to test that the linter doesn't remove it
|
|
88
|
+
'0%': {
|
|
89
|
+
boxSizing: 'inherit',
|
|
90
|
+
position: 'relative',
|
|
91
|
+
right: 'inherit',
|
|
92
|
+
display: 'flex',
|
|
93
|
+
gap: 'revert',
|
|
94
|
+
transform: 'none',
|
|
95
|
+
margin: '11rem',
|
|
96
|
+
outline: 'none',
|
|
97
|
+
border: 'Background',
|
|
98
|
+
borderRight: 'ActiveBorder',
|
|
99
|
+
borderLeft: 'ActiveBorder',
|
|
100
|
+
borderRadius: 'initial',
|
|
101
|
+
borderBottomLeftRadius: 'initial',
|
|
102
|
+
borderBottomRightRadius: 'initial',
|
|
103
|
+
boxShadow: 'none',
|
|
104
|
+
backgroundColor: 'initial',
|
|
105
|
+
cursor: 'pointer',
|
|
106
|
+
width: '100%',
|
|
107
|
+
color: 'red',
|
|
108
|
+
fontSize: 'large',
|
|
109
|
+
},
|
|
110
|
+
// Comment to test that the linter doesn't remove it
|
|
111
|
+
'100%': {
|
|
112
|
+
// Comment to test that the linter doesn't remove it
|
|
113
|
+
boxSizing: 'inherit',
|
|
114
|
+
position: 'relative',
|
|
115
|
+
right: 'inherit',
|
|
116
|
+
display: 'flex',
|
|
117
|
+
gap: 'revert',
|
|
118
|
+
transform: 'none',
|
|
119
|
+
margin: '11rem',
|
|
120
|
+
outline: 'none',
|
|
121
|
+
border: 'Background',
|
|
122
|
+
borderRight: 'ActiveBorder',
|
|
123
|
+
borderLeft: 'ActiveBorder',
|
|
124
|
+
borderRadius: 'initial',
|
|
125
|
+
borderBottomLeftRadius: 'initial',
|
|
126
|
+
borderBottomRightRadius: 'initial',
|
|
127
|
+
boxShadow: 'none',
|
|
128
|
+
backgroundColor: 'initial',
|
|
129
|
+
cursor: 'pointer',
|
|
130
|
+
width: '100%',
|
|
131
|
+
color: 'red',
|
|
132
|
+
fontSize: 'large',
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
globalStyle('*, ::before, ::after', {
|
|
136
|
+
// Comment to test that the linter doesn't remove it
|
|
137
|
+
boxSizing: 'inherit',
|
|
138
|
+
position: 'relative',
|
|
139
|
+
right: 'inherit',
|
|
140
|
+
display: 'flex',
|
|
141
|
+
gap: 'revert',
|
|
142
|
+
transform: 'none',
|
|
143
|
+
margin: '11rem',
|
|
144
|
+
outline: 'none',
|
|
145
|
+
border: 'Background',
|
|
146
|
+
borderRight: 'ActiveBorder',
|
|
147
|
+
borderLeft: 'ActiveBorder',
|
|
148
|
+
borderRadius: 'initial',
|
|
149
|
+
borderBottomLeftRadius: 'initial',
|
|
150
|
+
borderBottomRightRadius: 'initial',
|
|
151
|
+
backgroundColor: 'initial',
|
|
152
|
+
cursor: 'pointer',
|
|
153
|
+
width: '100%',
|
|
154
|
+
color: 'red',
|
|
155
|
+
fontSize: 'large',
|
|
156
|
+
});
|
|
157
|
+
// style with an array
|
|
158
|
+
const accordionContentBase = style([
|
|
159
|
+
// Comment to test that the linter doesn't remove it
|
|
160
|
+
{
|
|
161
|
+
// Comment to test that the linter doesn't remove it
|
|
162
|
+
boxSizing: 'inherit',
|
|
163
|
+
position: 'relative',
|
|
164
|
+
right: 'inherit',
|
|
165
|
+
display: 'flex',
|
|
166
|
+
gap: 'revert',
|
|
167
|
+
transform: 'none',
|
|
168
|
+
margin: '11rem',
|
|
169
|
+
outline: 'none',
|
|
170
|
+
border: 'Background',
|
|
171
|
+
borderRight: 'ActiveBorder',
|
|
172
|
+
borderLeft: 'ActiveBorder',
|
|
173
|
+
borderRadius: 'initial',
|
|
174
|
+
borderBottomLeftRadius: 'initial',
|
|
175
|
+
borderBottomRightRadius: 'initial',
|
|
176
|
+
boxShadow: 'none',
|
|
177
|
+
backgroundColor: 'initial',
|
|
178
|
+
cursor: 'pointer',
|
|
179
|
+
width: '100%',
|
|
180
|
+
color: 'red',
|
|
181
|
+
fontSize: 'large',
|
|
182
|
+
// special selector to test that the linter doesn't remove it
|
|
183
|
+
'@supports': {
|
|
184
|
+
'(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none)': {
|
|
185
|
+
// Comment to test that the linter doesn't remove it
|
|
186
|
+
boxSizing: 'inherit',
|
|
187
|
+
position: 'relative',
|
|
188
|
+
right: 'inherit',
|
|
189
|
+
display: 'flex',
|
|
190
|
+
gap: 'revert',
|
|
191
|
+
transform: 'none',
|
|
192
|
+
margin: '11rem',
|
|
193
|
+
outline: 'none',
|
|
194
|
+
border: 'Background',
|
|
195
|
+
borderRight: 'ActiveBorder',
|
|
196
|
+
borderLeft: 'ActiveBorder',
|
|
197
|
+
borderRadius: 'initial',
|
|
198
|
+
borderBottomLeftRadius: 'initial',
|
|
199
|
+
borderBottomRightRadius: 'initial',
|
|
200
|
+
boxShadow: 'none',
|
|
201
|
+
backgroundColor: 'initial',
|
|
202
|
+
cursor: 'pointer',
|
|
203
|
+
width: '100%',
|
|
204
|
+
color: 'red',
|
|
205
|
+
fontSize: 'large',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
]);
|
|
210
|
+
export const accordionContent = recipe({
|
|
211
|
+
// Comment to test that the linter doesn't remove it
|
|
212
|
+
base: accordionContentBase,
|
|
213
|
+
// Comment to test that the linter doesn't remove it
|
|
214
|
+
variants: {
|
|
215
|
+
// Comment to test that the linter doesn't remove it
|
|
216
|
+
isOpen: {
|
|
217
|
+
// Comment to test that the linter doesn't remove it
|
|
218
|
+
false: {
|
|
219
|
+
// Comment to test that the linter doesn't remove it
|
|
220
|
+
boxSizing: 'inherit',
|
|
221
|
+
position: 'relative',
|
|
222
|
+
right: 'inherit',
|
|
223
|
+
display: 'flex',
|
|
224
|
+
gap: 'revert',
|
|
225
|
+
transform: 'none',
|
|
226
|
+
margin: '11rem',
|
|
227
|
+
outline: 'none',
|
|
228
|
+
border: 'Background',
|
|
229
|
+
borderRight: 'ActiveBorder',
|
|
230
|
+
borderLeft: 'ActiveBorder',
|
|
231
|
+
borderRadius: 'initial',
|
|
232
|
+
borderBottomLeftRadius: 'initial',
|
|
233
|
+
borderBottomRightRadius: 'initial',
|
|
234
|
+
boxShadow: 'none',
|
|
235
|
+
backgroundColor: 'initial',
|
|
236
|
+
cursor: 'pointer',
|
|
237
|
+
width: '100%',
|
|
238
|
+
color: 'red',
|
|
239
|
+
fontSize: 'large',
|
|
240
|
+
},
|
|
241
|
+
true: {
|
|
242
|
+
boxSizing: 'inherit',
|
|
243
|
+
position: 'relative',
|
|
244
|
+
right: 'inherit',
|
|
245
|
+
display: 'flex',
|
|
246
|
+
gap: 'revert',
|
|
247
|
+
transform: 'none',
|
|
248
|
+
margin: '11rem',
|
|
249
|
+
outline: 'none',
|
|
250
|
+
border: 'Background',
|
|
251
|
+
borderRight: 'ActiveBorder',
|
|
252
|
+
borderLeft: 'ActiveBorder',
|
|
253
|
+
borderRadius: 'initial',
|
|
254
|
+
borderBottomLeftRadius: 'initial',
|
|
255
|
+
borderBottomRightRadius: 'initial',
|
|
256
|
+
boxShadow: 'none',
|
|
257
|
+
backgroundColor: 'initial',
|
|
258
|
+
cursor: 'pointer',
|
|
259
|
+
width: '100%',
|
|
260
|
+
color: 'red',
|
|
261
|
+
fontSize: 'large',
|
|
262
|
+
// pseudo selector inside a variant
|
|
263
|
+
':hover': {
|
|
264
|
+
// Comment to test that the linter doesn't remove it
|
|
265
|
+
boxSizing: 'inherit',
|
|
266
|
+
position: 'relative',
|
|
267
|
+
right: 'inherit',
|
|
268
|
+
display: 'flex',
|
|
269
|
+
gap: 'revert',
|
|
270
|
+
transform: 'none',
|
|
271
|
+
margin: '11rem',
|
|
272
|
+
outline: 'none',
|
|
273
|
+
border: 'Background',
|
|
274
|
+
borderRight: 'ActiveBorder',
|
|
275
|
+
borderLeft: 'ActiveBorder',
|
|
276
|
+
borderRadius: 'initial',
|
|
277
|
+
borderBottomLeftRadius: 'initial',
|
|
278
|
+
borderBottomRightRadius: 'initial',
|
|
279
|
+
boxShadow: 'none',
|
|
280
|
+
backgroundColor: 'initial',
|
|
281
|
+
cursor: 'pointer',
|
|
282
|
+
width: '100%',
|
|
283
|
+
color: 'red',
|
|
284
|
+
fontSize: 'large',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
export const item = style({
|
|
291
|
+
boxSizing: 'inherit',
|
|
292
|
+
position: 'relative',
|
|
293
|
+
right: 'inherit',
|
|
294
|
+
display: 'flex',
|
|
295
|
+
gap: 'revert',
|
|
296
|
+
transform: 'none',
|
|
297
|
+
margin: '11rem',
|
|
298
|
+
outline: 'none',
|
|
299
|
+
border: 'Background',
|
|
300
|
+
borderRight: 'ActiveBorder',
|
|
301
|
+
borderLeft: 'ActiveBorder',
|
|
302
|
+
borderRadius: 'initial',
|
|
303
|
+
borderBottomLeftRadius: 'initial',
|
|
304
|
+
borderBottomRightRadius: 'initial',
|
|
305
|
+
backgroundColor: 'initial',
|
|
306
|
+
cursor: 'pointer',
|
|
307
|
+
width: '100%',
|
|
308
|
+
color: 'red',
|
|
309
|
+
fontSize: 'large',
|
|
310
|
+
// pseudo selector inside a style
|
|
311
|
+
':focus-visible': {
|
|
312
|
+
// Comment to test that the linter doesn't remove it
|
|
313
|
+
boxSizing: 'inherit',
|
|
314
|
+
position: 'relative',
|
|
315
|
+
right: 'inherit',
|
|
316
|
+
display: 'flex',
|
|
317
|
+
gap: 'revert',
|
|
318
|
+
transform: 'none',
|
|
319
|
+
margin: '11rem',
|
|
320
|
+
outline: 'none',
|
|
321
|
+
border: 'Background',
|
|
322
|
+
borderRight: 'ActiveBorder',
|
|
323
|
+
borderLeft: 'ActiveBorder',
|
|
324
|
+
borderRadius: 'initial',
|
|
325
|
+
borderBottomLeftRadius: 'initial',
|
|
326
|
+
borderBottomRightRadius: 'initial',
|
|
327
|
+
boxShadow: 'none',
|
|
328
|
+
backgroundColor: 'initial',
|
|
329
|
+
cursor: 'pointer',
|
|
330
|
+
width: '100%',
|
|
331
|
+
color: 'red',
|
|
332
|
+
fontSize: 'large',
|
|
333
|
+
},
|
|
334
|
+
selectors: {
|
|
335
|
+
// Comment to test that the linter doesn't remove it
|
|
336
|
+
'&[data-pressed]': {
|
|
337
|
+
// Comment to test that the linter doesn't remove it
|
|
338
|
+
boxSizing: 'inherit',
|
|
339
|
+
position: 'relative',
|
|
340
|
+
right: 'inherit',
|
|
341
|
+
display: 'flex',
|
|
342
|
+
gap: 'revert',
|
|
343
|
+
transform: 'none',
|
|
344
|
+
margin: '11rem',
|
|
345
|
+
outline: 'none',
|
|
346
|
+
border: 'Background',
|
|
347
|
+
borderRight: 'ActiveBorder',
|
|
348
|
+
borderLeft: 'ActiveBorder',
|
|
349
|
+
borderRadius: 'initial',
|
|
350
|
+
borderBottomLeftRadius: 'initial',
|
|
351
|
+
borderBottomRightRadius: 'initial',
|
|
352
|
+
boxShadow: 'none',
|
|
353
|
+
backgroundColor: 'initial',
|
|
354
|
+
cursor: 'pointer',
|
|
355
|
+
width: '100%',
|
|
356
|
+
color: 'red',
|
|
357
|
+
fontSize: 'large',
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
});
|
|
361
|
+
export const selectButtonVariants = styleVariants({
|
|
362
|
+
// Comment to test that the linter doesn't remove it
|
|
363
|
+
bordered: {
|
|
364
|
+
// Comment to test that the linter doesn't remove it
|
|
365
|
+
boxSizing: 'inherit',
|
|
366
|
+
position: 'relative',
|
|
367
|
+
right: 'inherit',
|
|
368
|
+
display: 'flex',
|
|
369
|
+
gap: 'revert',
|
|
370
|
+
transform: 'none',
|
|
371
|
+
margin: '11rem',
|
|
372
|
+
outline: 'none',
|
|
373
|
+
border: 'Background',
|
|
374
|
+
borderRight: 'ActiveBorder',
|
|
375
|
+
borderLeft: 'ActiveBorder',
|
|
376
|
+
borderRadius: 'initial',
|
|
377
|
+
borderBottomLeftRadius: 'initial',
|
|
378
|
+
borderBottomRightRadius: 'initial',
|
|
379
|
+
backgroundColor: 'initial',
|
|
380
|
+
cursor: 'pointer',
|
|
381
|
+
width: '100%',
|
|
382
|
+
color: 'red',
|
|
383
|
+
fontSize: 'large',
|
|
384
|
+
},
|
|
385
|
+
borderless: {
|
|
386
|
+
boxSizing: 'inherit',
|
|
387
|
+
position: 'relative',
|
|
388
|
+
right: 'inherit',
|
|
389
|
+
display: 'flex',
|
|
390
|
+
gap: 'revert',
|
|
391
|
+
transform: 'none',
|
|
392
|
+
margin: '11rem',
|
|
393
|
+
outline: 'none',
|
|
394
|
+
border: 'Background',
|
|
395
|
+
borderRight: 'ActiveBorder',
|
|
396
|
+
borderLeft: 'ActiveBorder',
|
|
397
|
+
borderRadius: 'initial',
|
|
398
|
+
borderBottomLeftRadius: 'initial',
|
|
399
|
+
borderBottomRightRadius: 'initial',
|
|
400
|
+
boxShadow: 'none',
|
|
401
|
+
backgroundColor: 'initial',
|
|
402
|
+
cursor: 'pointer',
|
|
403
|
+
width: '100%',
|
|
404
|
+
color: 'red',
|
|
405
|
+
fontSize: 'large',
|
|
406
|
+
},
|
|
407
|
+
});
|
|
408
|
+
// Test cases for noEmptyStyleBlocksRule
|
|
409
|
+
// export const myRecipe = recipe({
|
|
410
|
+
// base: {
|
|
411
|
+
// color: 'blue',
|
|
412
|
+
// selectors: {},
|
|
413
|
+
// '@media': {},
|
|
414
|
+
// '@supports': {},
|
|
415
|
+
// },
|
|
416
|
+
// variants: {
|
|
417
|
+
// size: {
|
|
418
|
+
// small: {
|
|
419
|
+
// selectors: {
|
|
420
|
+
// '&:hover': {},
|
|
421
|
+
// },
|
|
422
|
+
// '@media': {
|
|
423
|
+
// '(min-width: 768px)': {},
|
|
424
|
+
// },
|
|
425
|
+
// '@supports': {
|
|
426
|
+
// '(display: grid)': {},
|
|
427
|
+
// },
|
|
428
|
+
// },
|
|
429
|
+
// },
|
|
430
|
+
// },
|
|
431
|
+
// });
|
|
432
|
+
// const base = style({ padding: 12 });
|
|
433
|
+
// export const variant = styleVariants({
|
|
434
|
+
// primary: [],
|
|
435
|
+
// secondary: [],
|
|
436
|
+
// bordered: {},
|
|
437
|
+
// borderless: {},
|
|
438
|
+
// });
|
|
439
|
+
// const baseStyles = {
|
|
440
|
+
// color: 'blue',
|
|
441
|
+
// margin: '10px',
|
|
442
|
+
// };
|
|
443
|
+
// const isDarkMode = false;
|
|
444
|
+
// export const spreadStyle = style({
|
|
445
|
+
// ...baseStyles,
|
|
446
|
+
// ...{},
|
|
447
|
+
// });
|
|
448
|
+
// export const recipeWithNonObjectValue = recipe({
|
|
449
|
+
// base: { color: 'black' },
|
|
450
|
+
// variants: {
|
|
451
|
+
// color: {
|
|
452
|
+
// red: { color: 'red' },
|
|
453
|
+
// // string instead of object
|
|
454
|
+
// string: 'string',
|
|
455
|
+
// // variable instead of object
|
|
456
|
+
// variable: baseStyles,
|
|
457
|
+
// },
|
|
458
|
+
// },
|
|
459
|
+
// });
|
|
460
|
+
// export const conditionalStyle = style(isDarkMode ? {} : {});
|
|
461
|
+
// export const recipeWithEmptyVariantValues = recipe({
|
|
462
|
+
// base: { color: 'black' },
|
|
463
|
+
// variants: {
|
|
464
|
+
// color: {
|
|
465
|
+
// blue: {},
|
|
466
|
+
// red: {},
|
|
467
|
+
// },
|
|
468
|
+
// },
|
|
469
|
+
// });
|
|
470
|
+
// export const nestedEmptyStyle = style({
|
|
471
|
+
// selectors: {
|
|
472
|
+
// '&:hover': {},
|
|
473
|
+
// '&:focus': {},
|
|
474
|
+
// },
|
|
475
|
+
// });
|
|
476
|
+
// const myEmptyStyle = style({});
|
|
477
|
+
// export { myEmptyStyle };
|
|
478
|
+
// export const emptyStyle1 = style({});
|
|
479
|
+
// export const emptyStyle2 = style({});
|
|
480
|
+
// export const emptyVariants = styleVariants({});
|
|
481
|
+
// export const emptyRecipe = recipe({});
|
|
482
|
+
// export const styleWithComments = style({
|
|
483
|
+
// /_This is an empty style_/
|
|
484
|
+
// });
|
|
485
|
+
// export const styleWithEmptyMedia = style({
|
|
486
|
+
// color: 'blue',
|
|
487
|
+
// '@media': {
|
|
488
|
+
// '(min-width: 768px)': {},
|
|
489
|
+
// },
|
|
490
|
+
// });
|
|
491
|
+
// export const styleWithEmptySelector = style({
|
|
492
|
+
// color: 'blue',
|
|
493
|
+
// selectors: {
|
|
494
|
+
// '&:hover': {},
|
|
495
|
+
// },
|
|
496
|
+
// });
|
|
497
|
+
// export const recipeWithBothEmpty = recipe({
|
|
498
|
+
// base: {},
|
|
499
|
+
// variants: {},
|
|
500
|
+
// });
|
|
501
|
+
// export const recipeWithEmptyVariants = recipe({
|
|
502
|
+
// base: { color: 'black' },
|
|
503
|
+
// variants: {},
|
|
504
|
+
// });
|
|
505
|
+
// export const recipeWithEmptyBase = recipe({
|
|
506
|
+
// base: {},
|
|
507
|
+
// variants: {
|
|
508
|
+
// color: {
|
|
509
|
+
// blue: { color: 'blue' },
|
|
510
|
+
// },
|
|
511
|
+
// },
|
|
512
|
+
// });
|
|
513
|
+
// export const recipeWithNonObjectVariants = recipe({
|
|
514
|
+
// base: { color: 'blue' },
|
|
515
|
+
// variants: {
|
|
516
|
+
// color: {
|
|
517
|
+
// size: 'string instead of object', // This is a string, not an object
|
|
518
|
+
// red: {},
|
|
519
|
+
// },
|
|
520
|
+
// },
|
|
521
|
+
// });
|
|
522
|
+
// Using the same empty object reference in both branches
|
|
523
|
+
// export const myStyle = style(true ? {} : {});
|
|
524
|
+
// export const emptyFontFace = fontFace({});
|
|
525
|
+
// globalFontFace('GlobalFont', {});
|
|
526
|
+
// globalKeyframes('a', {});
|
|
527
|
+
// export const emptyKeyframes = keyframes({});
|
|
528
|
+
// globalStyle('ul', {});
|
|
529
|
+
// export const emptyStyleVariants = styleVariants({});
|
|
530
|
+
// export const emptyStyle = style({});
|