-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add packageMap option to replace import path with a configurable path
from plugin options.
- Loading branch information
1 parent
8129df8
commit 863e795
Showing
15 changed files
with
193 additions
and
24 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
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
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
33 changes: 33 additions & 0 deletions
33
packages/pigment-css-react/tests/styled/fixtures/styled-import-replacement.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,33 @@ | ||
import { styled, keyframes } from '@pigment-css/react'; | ||
|
||
const rotateKeyframe = keyframes({ | ||
from: { | ||
transform: 'translateX(0%)', | ||
}, | ||
to: { | ||
transform: 'translateX(100%)', | ||
}, | ||
}); | ||
|
||
const Component = styled.div(({ theme }) => ({ | ||
animation: `${rotateKeyframe} 2s ease-out 0s infinite`, | ||
marginLeft: 10, | ||
})); | ||
|
||
export const SliderRail = styled('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})` | ||
display: block; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
border-top-left-radius: 3px; | ||
`; | ||
|
||
const SliderRail2 = styled.span` | ||
${SliderRail} { | ||
padding-inline-start: none; | ||
margin: 0px 10px 10px 30px; | ||
} | ||
`; |
23 changes: 23 additions & 0 deletions
23
packages/pigment-css-react/tests/styled/fixtures/styled-import-replacement.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,23 @@ | ||
@keyframes rrqhzm2 { | ||
from { | ||
transform: translateX(0%); | ||
} | ||
to { | ||
transform: translateX(100%); | ||
} | ||
} | ||
.ci0148v { | ||
animation: rrqhzm2 2s ease-out 0s infinite; | ||
margin-left: 10px; | ||
} | ||
.suo5xob { | ||
display: block; | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
border-top-left-radius: 3px; | ||
} | ||
.sudpq9z .suo5xob { | ||
padding-inline-start: none; | ||
margin: 0px 10px 10px 30px; | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/pigment-css-react/tests/styled/fixtures/styled-import-replacement.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,18 @@ | ||
import { | ||
styled as _styled, | ||
styled as _styled2, | ||
styled as _styled3, | ||
} from '@mui/material-pigment-css'; | ||
import _theme from '@mui/material-pigment-css/theme'; | ||
const Component = /*#__PURE__*/ _styled('div')({ | ||
classes: ['ci0148v'], | ||
}); | ||
export const SliderRail = /*#__PURE__*/ _styled2('span', { | ||
name: 'MuiSlider', | ||
slot: 'Rail', | ||
})({ | ||
classes: ['suo5xob'], | ||
}); | ||
const SliderRail2 = /*#__PURE__*/ _styled3('span')({ | ||
classes: ['sudpq9z'], | ||
}); |
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
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