@griffel/transform 3.0.3 → 3.0.5
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/CHANGELOG.json +404 -0
- package/CHANGELOG.md +130 -0
- package/__fixtures__/assets/blank.jpg +0 -0
- package/__fixtures__/assets/code.ts +12 -0
- package/__fixtures__/assets/empty.jpg +0 -0
- package/__fixtures__/assets/output.meta.json +12 -0
- package/__fixtures__/assets/output.ts +12 -0
- package/__fixtures__/assets-multiple-declarations/blank.jpg +0 -0
- package/__fixtures__/assets-multiple-declarations/code.ts +8 -0
- package/__fixtures__/assets-multiple-declarations/empty.jpg +0 -0
- package/__fixtures__/assets-multiple-declarations/output.meta.json +9 -0
- package/__fixtures__/assets-multiple-declarations/output.ts +6 -0
- package/__fixtures__/assets-reset-styles/blank.jpg +0 -0
- package/__fixtures__/assets-reset-styles/code.ts +11 -0
- package/__fixtures__/assets-reset-styles/empty.jpg +0 -0
- package/__fixtures__/assets-reset-styles/output.meta.json +11 -0
- package/__fixtures__/assets-reset-styles/output.ts +7 -0
- package/__fixtures__/assets-urls/code.ts +13 -0
- package/__fixtures__/assets-urls/output.meta.json +14 -0
- package/__fixtures__/assets-urls/output.ts +10 -0
- package/__fixtures__/at-rules/code.ts +14 -0
- package/__fixtures__/at-rules/output.meta.json +15 -0
- package/__fixtures__/at-rules/output.ts +10 -0
- package/__fixtures__/config-classname-hash-salt/code.ts +5 -0
- package/__fixtures__/config-classname-hash-salt/output.meta.json +7 -0
- package/__fixtures__/config-classname-hash-salt/output.ts +3 -0
- package/__fixtures__/config-evaluation-rules/code.ts +8 -0
- package/__fixtures__/config-evaluation-rules/consts.ts +1 -0
- package/__fixtures__/config-evaluation-rules/output.meta.json +7 -0
- package/__fixtures__/config-evaluation-rules/output.ts +4 -0
- package/__fixtures__/config-evaluation-rules/sampleEvaluator.cjs +12 -0
- package/__fixtures__/error-argument-count/fixture.js +4 -0
- package/__fixtures__/error-cjs/fixture.js +4 -0
- package/__fixtures__/error-on-undefined/fixture.ts +7 -0
- package/__fixtures__/error-on-undefined/tokens.ts +1 -0
- package/__fixtures__/export-default/code.ts +6 -0
- package/__fixtures__/export-default/output.meta.json +14 -0
- package/__fixtures__/export-default/output.ts +6 -0
- package/__fixtures__/function-mixin/code.ts +6 -0
- package/__fixtures__/function-mixin/mixins.ts +7 -0
- package/__fixtures__/function-mixin/output.meta.json +7 -0
- package/__fixtures__/function-mixin/output.ts +4 -0
- package/__fixtures__/function-mixin/tokens.ts +3 -0
- package/__fixtures__/import-alias/code.ts +5 -0
- package/__fixtures__/import-alias/output.meta.json +7 -0
- package/__fixtures__/import-alias/output.ts +3 -0
- package/__fixtures__/import-custom-module/code.ts +6 -0
- package/__fixtures__/import-custom-module/output.meta.json +7 -0
- package/__fixtures__/import-custom-module/output.ts +4 -0
- package/__fixtures__/keyframes/code.ts +22 -0
- package/__fixtures__/keyframes/output.meta.json +17 -0
- package/__fixtures__/keyframes/output.ts +6 -0
- package/__fixtures__/multiple-declarations/code.ts +8 -0
- package/__fixtures__/multiple-declarations/output.meta.json +7 -0
- package/__fixtures__/multiple-declarations/output.ts +4 -0
- package/__fixtures__/non-existing-module-call/code.ts +10 -0
- package/__fixtures__/non-existing-module-call/module.ts +13 -0
- package/__fixtures__/non-existing-module-call/output.meta.json +7 -0
- package/__fixtures__/non-existing-module-call/output.ts +6 -0
- package/__fixtures__/object/code.ts +6 -0
- package/__fixtures__/object/output.meta.json +14 -0
- package/__fixtures__/object/output.ts +6 -0
- package/__fixtures__/object-computed-keys/code.ts +8 -0
- package/__fixtures__/object-computed-keys/output.meta.json +14 -0
- package/__fixtures__/object-computed-keys/output.ts +8 -0
- package/__fixtures__/object-imported-keys/code.ts +9 -0
- package/__fixtures__/object-imported-keys/consts.ts +2 -0
- package/__fixtures__/object-imported-keys/output.meta.json +7 -0
- package/__fixtures__/object-imported-keys/output.ts +4 -0
- package/__fixtures__/object-mixins/code.ts +11 -0
- package/__fixtures__/object-mixins/mixins.ts +17 -0
- package/__fixtures__/object-mixins/output.meta.json +16 -0
- package/__fixtures__/object-mixins/output.ts +10 -0
- package/__fixtures__/object-mixins/tokens.ts +3 -0
- package/__fixtures__/object-nesting/code.ts +13 -0
- package/__fixtures__/object-nesting/consts.ts +1 -0
- package/__fixtures__/object-nesting/output.meta.json +9 -0
- package/__fixtures__/object-nesting/output.ts +6 -0
- package/__fixtures__/object-reset/code.ts +8 -0
- package/__fixtures__/object-reset/output.meta.json +7 -0
- package/__fixtures__/object-reset/output.ts +5 -0
- package/__fixtures__/object-sequence-expr/code.ts +16 -0
- package/__fixtures__/object-sequence-expr/output.meta.json +7 -0
- package/__fixtures__/object-sequence-expr/output.ts +7 -0
- package/__fixtures__/object-shorthands/code.ts +8 -0
- package/__fixtures__/object-shorthands/output.meta.json +20 -0
- package/__fixtures__/object-shorthands/output.ts +5 -0
- package/__fixtures__/object-variables/code.ts +9 -0
- package/__fixtures__/object-variables/output.meta.json +15 -0
- package/__fixtures__/object-variables/output.ts +9 -0
- package/__fixtures__/object-variables/vars.ts +5 -0
- package/__fixtures__/reset-styles/code.ts +6 -0
- package/__fixtures__/reset-styles/output.meta.json +7 -0
- package/__fixtures__/reset-styles/output.ts +3 -0
- package/__fixtures__/reset-styles-at-rules/code.ts +7 -0
- package/__fixtures__/reset-styles-at-rules/output.meta.json +8 -0
- package/__fixtures__/reset-styles-at-rules/output.ts +3 -0
- package/__fixtures__/rules-with-metadata/code.ts +9 -0
- package/__fixtures__/rules-with-metadata/output.meta.json +14 -0
- package/__fixtures__/rules-with-metadata/output.ts +3 -0
- package/__fixtures__/shared-mixins/code.ts +7 -0
- package/__fixtures__/shared-mixins/mixins.ts +6 -0
- package/__fixtures__/shared-mixins/output.meta.json +7 -0
- package/__fixtures__/shared-mixins/output.ts +8 -0
- package/__fixtures__/static-styles/code.ts +7 -0
- package/__fixtures__/static-styles/output.meta.json +7 -0
- package/__fixtures__/static-styles/output.ts +3 -0
- package/__fixtures__/static-styles-array/code.ts +10 -0
- package/__fixtures__/static-styles-array/output.meta.json +7 -0
- package/__fixtures__/static-styles-array/output.ts +3 -0
- package/__fixtures__/static-styles-string/code.ts +3 -0
- package/__fixtures__/static-styles-string/output.meta.json +7 -0
- package/__fixtures__/static-styles-string/output.ts +3 -0
- package/__fixtures__/tokens/code.ts +11 -0
- package/__fixtures__/tokens/output.meta.json +12 -0
- package/__fixtures__/tokens/output.ts +7 -0
- package/__fixtures__/tokens/tokens.ts +4 -0
- package/__fixtures__/unsupported-css-properties/fixture.ts +16 -0
- package/__fixtures__/unsupported-css-properties/output.meta.json +5 -0
- package/__fixtures__/unsupported-css-properties/output.ts +3 -0
- package/eslint.config.mjs +31 -0
- package/package.json +7 -8
- package/project.json +51 -0
- package/src/{constants.mjs → constants.mts} +0 -1
- package/src/evaluation/astEvaluator.mts +109 -0
- package/src/evaluation/astEvaluator.test.mts +126 -0
- package/src/evaluation/batchEvaluator.mts +79 -0
- package/src/evaluation/evalCache.mts +84 -0
- package/src/evaluation/fluentTokensPlugin.mts +82 -0
- package/src/evaluation/fluentTokensPlugin.test.mts +130 -0
- package/src/evaluation/module.mts +271 -0
- package/src/evaluation/module.test.mts +133 -0
- package/src/evaluation/{process.mjs → process.mts} +12 -7
- package/src/evaluation/types.mts +49 -0
- package/src/evaluation/vmEvaluator.mts +45 -0
- package/src/evaluation/vmEvaluator.test.mts +30 -0
- package/src/{index.d.mts → index.mts} +4 -0
- package/src/transformSync.mts +425 -0
- package/src/transformSync.test.mts +429 -0
- package/src/types.mts +13 -0
- package/src/utils/convertESMtoCJS.mts +226 -0
- package/src/utils/convertESMtoCJS.test.mts +159 -0
- package/src/utils/dedupeCSSRules.mts +25 -0
- package/src/utils/dedupeCSSRules.test.mts +39 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +30 -0
- package/tsconfig.spec.json +24 -0
- package/vitest.config.mts +18 -0
- package/LICENSE.md +0 -21
- package/src/constants.d.mts +0 -2
- package/src/constants.mjs.map +0 -1
- package/src/evaluation/astEvaluator.d.mts +0 -20
- package/src/evaluation/astEvaluator.mjs +0 -90
- package/src/evaluation/astEvaluator.mjs.map +0 -1
- package/src/evaluation/batchEvaluator.d.mts +0 -13
- package/src/evaluation/batchEvaluator.mjs +0 -54
- package/src/evaluation/batchEvaluator.mjs.map +0 -1
- package/src/evaluation/evalCache.d.mts +0 -9
- package/src/evaluation/evalCache.mjs +0 -65
- package/src/evaluation/evalCache.mjs.map +0 -1
- package/src/evaluation/fluentTokensPlugin.d.mts +0 -2
- package/src/evaluation/fluentTokensPlugin.mjs +0 -70
- package/src/evaluation/fluentTokensPlugin.mjs.map +0 -1
- package/src/evaluation/module.d.mts +0 -44
- package/src/evaluation/module.mjs +0 -207
- package/src/evaluation/module.mjs.map +0 -1
- package/src/evaluation/process.d.mts +0 -24
- package/src/evaluation/process.mjs.map +0 -1
- package/src/evaluation/types.d.mts +0 -34
- package/src/evaluation/types.mjs +0 -2
- package/src/evaluation/types.mjs.map +0 -1
- package/src/evaluation/vmEvaluator.d.mts +0 -3
- package/src/evaluation/vmEvaluator.mjs +0 -33
- package/src/evaluation/vmEvaluator.mjs.map +0 -1
- package/src/index.mjs +0 -9
- package/src/index.mjs.map +0 -1
- package/src/transformSync.d.mts +0 -41
- package/src/transformSync.mjs +0 -252
- package/src/transformSync.mjs.map +0 -1
- package/src/types.d.mts +0 -12
- package/src/types.mjs +0 -2
- package/src/types.mjs.map +0 -1
- package/src/utils/convertESMtoCJS.d.mts +0 -6
- package/src/utils/convertESMtoCJS.mjs +0 -203
- package/src/utils/convertESMtoCJS.mjs.map +0 -1
- package/src/utils/dedupeCSSRules.d.mts +0 -6
- package/src/utils/dedupeCSSRules.mjs +0 -19
- package/src/utils/dedupeCSSRules.mjs.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": false,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"d": [
|
|
6
|
+
".f405sdg{background-image:url(http://www.example.com);}",
|
|
7
|
+
".fvpuk3z{background-image:url(https://www.example.com);}",
|
|
8
|
+
".fcrzfig{background-image:url(\"https://www.example.com\");}",
|
|
9
|
+
".f1b0d1k8{background-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);}",
|
|
10
|
+
".f15gfcnl{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" height=\"32\" aria-hidden=\"true\" viewBox=\"0 0 16 16\" width=\"32\" data-view-component=\"true\" class=\"octicon octicon-mark-github v-align-middle\"%3E%3Cpath fill-rule=\"evenodd\" d=\"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z\"%3E%3C/path%3E%3C/svg%3E');}",
|
|
11
|
+
".f1bk4c0y{filter:url(#a);}"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __css } from '@griffel/react';
|
|
2
|
+
|
|
3
|
+
export const useStyles = __css({
|
|
4
|
+
httpUrl: { Bcmaq0h: 'f405sdg' },
|
|
5
|
+
httpsUrl: { Bcmaq0h: 'fvpuk3z' },
|
|
6
|
+
httpsUrlWithQuotes: { Bcmaq0h: 'fcrzfig' },
|
|
7
|
+
dataUrl: { Bcmaq0h: 'f1b0d1k8' },
|
|
8
|
+
dataUrlQuotes: { Bcmaq0h: 'f15gfcnl' },
|
|
9
|
+
hashOnly: { Bhu2qc9: 'f1bk4c0y' },
|
|
10
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { makeStyles } from '@griffel/react';
|
|
2
|
+
|
|
3
|
+
export const useStyles = makeStyles({
|
|
4
|
+
root: {
|
|
5
|
+
'@media (min-width: 600px)': {
|
|
6
|
+
paddingLeft: '4px',
|
|
7
|
+
paddingRight: '4px',
|
|
8
|
+
},
|
|
9
|
+
'@supports (display: flex)': {
|
|
10
|
+
paddingLeft: '4px',
|
|
11
|
+
paddingRight: '4px',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": false,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"m": [
|
|
6
|
+
[
|
|
7
|
+
"@media (min-width: 600px){.f1h4p6a1{padding-right:4px;}.fgefjy{padding-left:4px;}}",
|
|
8
|
+
{
|
|
9
|
+
"m": "(min-width: 600px)"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
],
|
|
13
|
+
"t": ["@supports (display: flex){.f1dyc5nu{padding-left:4px;}.f1kq3x14{padding-right:4px;}}"]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { makeStyles } from '@griffel/react';
|
|
2
|
+
import { colorRed } from './consts';
|
|
3
|
+
|
|
4
|
+
export const useStyles = makeStyles({
|
|
5
|
+
// This import has no sense, but it will prevent us from evaluation in AST by Babel
|
|
6
|
+
// This fixture uses "sampleEvaluator.js" in transformPlugin's config so input we should get a different color
|
|
7
|
+
root: { color: colorRed },
|
|
8
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const colorRed = 'red';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/** @type {import("@linaria/babel-preset").Evaluator} */
|
|
4
|
+
const sampleEvaluator = () => {
|
|
5
|
+
// Evaluators transform input code to something that will be evaluated by Node later. In evaluatePathsInVM() we expect
|
|
6
|
+
// that results will be available as "exports.__mkPreval", this evaluator mocks it
|
|
7
|
+
const result = `exports.__mkPreval = [{ root: { color: 'blue' } }]`;
|
|
8
|
+
|
|
9
|
+
return { code: result, imports: null, moduleKind: 'cjs' };
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
module.exports.default = sampleEvaluator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const tokens = {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": false,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"d": [
|
|
6
|
+
".fe3e8s9{color:red;}",
|
|
7
|
+
".fycuoez{padding-left:4px;}",
|
|
8
|
+
".f8wuabp{padding-right:4px;}",
|
|
9
|
+
".fcnqdeg{background-color:green;}",
|
|
10
|
+
".fjf1xye{margin-left:4px;}",
|
|
11
|
+
".f8zmjen{margin-right:4px;}"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { makeStyles } from '@griffel/react';
|
|
2
|
+
|
|
3
|
+
export const useStyles = makeStyles({
|
|
4
|
+
single: {
|
|
5
|
+
animationName: {
|
|
6
|
+
from: { transform: 'rotate(0deg)' },
|
|
7
|
+
to: { transform: 'rotate(360deg)' },
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
multiple: {
|
|
11
|
+
animationName: [
|
|
12
|
+
{
|
|
13
|
+
from: { transform: 'rotate(0deg)' },
|
|
14
|
+
to: { transform: 'rotate(360deg)' },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
from: { height: '100px' },
|
|
18
|
+
to: { height: '200px' },
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": true,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"k": [
|
|
6
|
+
"@keyframes f1q8eu9e{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}",
|
|
7
|
+
"@keyframes f55c0se{from{transform:rotate(0deg);}to{transform:rotate(-360deg);}}",
|
|
8
|
+
"@keyframes f19fnzg9{from{height:100px;}to{height:200px;}}"
|
|
9
|
+
],
|
|
10
|
+
"d": [
|
|
11
|
+
".f1g6ul6r{animation-name:f1q8eu9e;}",
|
|
12
|
+
".f1fp4ujf{animation-name:f55c0se;}",
|
|
13
|
+
".f1e467oh{animation-name:f1q8eu9e,f19fnzg9;}",
|
|
14
|
+
".f1w9bd63{animation-name:f55c0se,f19fnzg9;}"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type FakeModule = {
|
|
2
|
+
foo: () => void;
|
|
3
|
+
bar: () => void;
|
|
4
|
+
baz: () => void;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export function createModule(): FakeModule {
|
|
8
|
+
return {
|
|
9
|
+
foo: () => {},
|
|
10
|
+
bar: () => {},
|
|
11
|
+
// this implementation intentionally missing "baz" property to throw on calls in runtime
|
|
12
|
+
} as unknown as FakeModule;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": false,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"d": [
|
|
6
|
+
".fe3e8s9{color:red;}",
|
|
7
|
+
".fycuoez{padding-left:4px;}",
|
|
8
|
+
".f8wuabp{padding-right:4px;}",
|
|
9
|
+
".fcnqdeg{background-color:green;}",
|
|
10
|
+
".fjf1xye{margin-left:4px;}",
|
|
11
|
+
".f8zmjen{margin-right:4px;}"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": true,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"d": [
|
|
6
|
+
".fe3e8s9{color:red;}",
|
|
7
|
+
".fycuoez{padding-left:4px;}",
|
|
8
|
+
".f8wuabp{padding-right:4px;}",
|
|
9
|
+
".fcnqdeg{background-color:green;}",
|
|
10
|
+
".fjf1xye{margin-left:4px;}",
|
|
11
|
+
".f8zmjen{margin-right:4px;}"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { makeStyles } from '@griffel/react';
|
|
2
|
+
import { flexStyles, gridStyles, typography } from './mixins';
|
|
3
|
+
|
|
4
|
+
export const useStyles = makeStyles({
|
|
5
|
+
root: flexStyles,
|
|
6
|
+
label: typography.text,
|
|
7
|
+
header: typography.header,
|
|
8
|
+
|
|
9
|
+
icon: { ...flexStyles, color: 'red' },
|
|
10
|
+
image: { ...gridStyles('10px'), color: 'green' },
|
|
11
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GriffelStyle } from '@griffel/core';
|
|
2
|
+
import { tokens } from './tokens';
|
|
3
|
+
|
|
4
|
+
export const flexStyles: GriffelStyle = {
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const gridStyles = (gridGap: string): GriffelStyle => ({
|
|
10
|
+
display: 'grid',
|
|
11
|
+
gridRowGap: gridGap,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const typography: Record<'text' | 'header', GriffelStyle> = {
|
|
15
|
+
text: { fontWeight: tokens.fontWeightRegular },
|
|
16
|
+
header: { fontWeight: 'bold' },
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usedProcessing": true,
|
|
3
|
+
"usedVMForEvaluation": true,
|
|
4
|
+
"cssRulesByBucket": {
|
|
5
|
+
"d": [
|
|
6
|
+
".f22iagw{display:flex;}",
|
|
7
|
+
".f1vx9l62{flex-direction:column;}",
|
|
8
|
+
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
9
|
+
".f16wzh4i{font-weight:bold;}",
|
|
10
|
+
".fe3e8s9{color:red;}",
|
|
11
|
+
".f13qh94s{display:grid;}",
|
|
12
|
+
".f85kjgz{grid-row-gap:10px;}",
|
|
13
|
+
".fka9v86{color:green;}"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __css } from '@griffel/react';
|
|
2
|
+
import { flexStyles, gridStyles, typography } from './mixins';
|
|
3
|
+
|
|
4
|
+
export const useStyles = __css({
|
|
5
|
+
root: { mc9l5x: 'f22iagw', Beiy3e4: 'f1vx9l62' },
|
|
6
|
+
label: { Bhrd7zp: 'figsok6' },
|
|
7
|
+
header: { Bhrd7zp: 'f16wzh4i' },
|
|
8
|
+
icon: { mc9l5x: 'f22iagw', Beiy3e4: 'f1vx9l62', sj55zd: 'fe3e8s9' },
|
|
9
|
+
image: { mc9l5x: 'f13qh94s', a6qtfi: 'f85kjgz', sj55zd: 'fka9v86' },
|
|
10
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { makeStyles } from '@griffel/react';
|
|
2
|
+
import { colorBlue } from './consts';
|
|
3
|
+
|
|
4
|
+
export const useStyles = makeStyles({
|
|
5
|
+
root: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
|
|
8
|
+
':hover': { color: 'red' },
|
|
9
|
+
':focus': { ':hover': { color: colorBlue } },
|
|
10
|
+
|
|
11
|
+
'& .foo': { ':hover': { color: 'green' } },
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const colorBlue = 'blue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GriffelStyle } from '@griffel/react';
|
|
2
|
+
import { makeStyles } from '@griffel/react';
|
|
3
|
+
|
|
4
|
+
const switchClassName = 'fui-Switch';
|
|
5
|
+
let _a: Record<string, GriffelStyle>;
|
|
6
|
+
|
|
7
|
+
export const useStyles = makeStyles({
|
|
8
|
+
root:
|
|
9
|
+
((_a = {}),
|
|
10
|
+
(_a[':hover .' + switchClassName] = {
|
|
11
|
+
':before': {
|
|
12
|
+
backgroundColor: 'red',
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
_a),
|
|
16
|
+
});
|