-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pigment-css] Fix
keyframes
serialize styles error (#41395)
- Loading branch information
1 parent
20d8eb6
commit d93226a
Showing
16 changed files
with
214 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/pigment-react/tests/keyframes/fixtures/keyframes-theme.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { keyframes } from '@pigment-css/react'; | ||
|
||
const green = 'green'; | ||
|
||
const gradientKeyframe = keyframes(({ theme }) => ({ | ||
'0%': { | ||
background: theme.palette.primary.main, | ||
}, | ||
'50%': { | ||
background: green, | ||
}, | ||
'100%': { | ||
background: theme.palette.secondary.main, | ||
}, | ||
})); | ||
|
||
const gradientKeyframe2 = keyframes` | ||
0% { | ||
background: ${({ theme }) => theme.palette.primary.main}; | ||
} | ||
50% { | ||
background: ${green}; | ||
} | ||
100% { | ||
background: ${({ theme }) => theme.palette.secondary.main}; | ||
} | ||
`; |
22 changes: 22 additions & 0 deletions
22
packages/pigment-react/tests/keyframes/fixtures/keyframes-theme.output.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@keyframes g2c7x3u { | ||
0% { | ||
background: red; | ||
} | ||
50% { | ||
background: green; | ||
} | ||
100% { | ||
background: blue; | ||
} | ||
} | ||
@keyframes gb35t65 { | ||
0% { | ||
background: red; | ||
} | ||
50% { | ||
background: green; | ||
} | ||
100% { | ||
background: blue; | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/pigment-react/tests/keyframes/fixtures/keyframes-theme.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const gradientKeyframe = 'g2c7x3u'; | ||
const gradientKeyframe2 = 'gb35t65'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/pigment-react/tests/keyframes/fixtures/keyframes.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
const rotateKeyframe = 'r14c1bqo'; | ||
const rotateKeyframe2 = 'r3amm75'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/pigment-react/tests/styled/fixtures/styled-theme.input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { styled, keyframes } from '@pigment-css/react'; | ||
|
||
const rotateKeyframe = keyframes({ | ||
from: { | ||
transform: 'rotate(360deg)', | ||
}, | ||
to: { | ||
transform: 'rotate(0deg)', | ||
}, | ||
}); | ||
|
||
const Component = styled.div(({ theme }) => ({ | ||
color: (theme.vars ?? theme).palette.primary.main, | ||
animation: `${rotateKeyframe} 2s ease-out 0s infinite`, | ||
})); | ||
|
||
const SliderRail = styled('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})` | ||
display: block; | ||
position: absolute; | ||
border-radius: inherit; | ||
background-color: currentColor; | ||
opacity: 0.38; | ||
font-size: ${({ theme }) => (theme.vars ?? theme).size.font.h1}; | ||
`; | ||
|
||
const SliderRail2 = styled.span` | ||
display: block; | ||
opacity: 0.38; | ||
font-size: ${({ theme }) => (theme.vars ?? theme).size.font.h1}; | ||
${SliderRail} { | ||
display: none; | ||
} | ||
`; |
31 changes: 31 additions & 0 deletions
31
packages/pigment-react/tests/styled/fixtures/styled-theme.output.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@keyframes r3sp8jf { | ||
from { | ||
transform: rotate(360deg); | ||
} | ||
to { | ||
transform: rotate(0deg); | ||
} | ||
} | ||
.clqufod { | ||
color: red; | ||
animation: r3sp8jf 2s ease-out 0s infinite; | ||
} | ||
.s1fopuc2 { | ||
display: block; | ||
position: absolute; | ||
border-radius: inherit; | ||
background-color: currentColor; | ||
opacity: 0.38; | ||
font-size: 3rem; | ||
} | ||
.s1fopuc2-1 { | ||
font-size: 1.5rem; | ||
} | ||
.s1tggtaa { | ||
display: block; | ||
opacity: 0.38; | ||
font-size: 3rem; | ||
} | ||
.s1tggtaa .s1fopuc2 { | ||
display: none; | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/pigment-react/tests/styled/fixtures/styled-theme.output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { styled as _styled3 } from '@pigment-css/react'; | ||
import { styled as _styled2 } from '@pigment-css/react'; | ||
import { styled as _styled } from '@pigment-css/react'; | ||
import _theme from '@pigment-css/react/theme'; | ||
const Component = /*#__PURE__*/ _styled('div')({ | ||
classes: ['clqufod'], | ||
}); | ||
const SliderRail2 = /*#__PURE__*/ _styled3('span')({ | ||
classes: ['s1tggtaa'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters