-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pigment-css] Create a wrapper package over Pigment CSS #42819
Merged
Merged
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cbf7538
[pigment-css] A new package that is a wrapper over Pigment CSS
brijeshb42 69aa126
Modify demo apps to use @mui/material-pigment-css
brijeshb42 da0ee4a
Testing changes
brijeshb42 65edeb7
create submodules
siriwatknp 33eb3e7
use mui/material-pigment-css components
siriwatknp 6ac9e5e
Dedupe
brijeshb42 498dbb4
Lint fix
brijeshb42 aa1ee3d
Fix module resolution
brijeshb42 5f169ef
add pigment css migration
siriwatknp a3f9cb4
fix package name
siriwatknp 8ab22a1
Update TS types in app for sx prop
brijeshb42 e6ceaff
Remove unwanted package name in metadata
brijeshb42 a2e16da
Update Pigment to latest published version
brijeshb42 9688bf5
follow naming convention
siriwatknp 4c96f59
add toRuntimeSource to extendTheme
siriwatknp 723668c
update content
siriwatknp d46ce78
Fix export
brijeshb42 2052eec
Change module resolution to bundler
brijeshb42 973ff45
fix non-breaking space
siriwatknp 475621c
update content
siriwatknp b824288
Merge branch 'material-pigment-css' of https://github.com/brijeshb42/…
siriwatknp bb38558
Convert stringifyTheme to named export
brijeshb42 71f0e58
remove stringify export
siriwatknp 4cf7383
fix non-breaking space
siriwatknp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,48 @@ | ||
import type { ExtendTheme } from '@pigment-css/react'; | ||
import type { ExtendTheme } from '@mui/material-pigment-css'; | ||
|
||
declare module '@pigment-css/react/theme' { | ||
interface ThemeTokens { | ||
'max-width': string; | ||
'border-radius': string; | ||
'font-mono': string; | ||
'foreground-rgb': string; | ||
'background-start-rgb': string; | ||
'background-end-rgb': string; | ||
'primary-glow': string; | ||
'secondary-glow': string; | ||
title: { | ||
'start-rgb': string; | ||
'end-rgb': string; | ||
border: string; | ||
}; | ||
callout: { | ||
rgb: string; | ||
'border-rgb': string; | ||
}; | ||
card: { | ||
rgb: string; | ||
'border-rgb': string; | ||
}; | ||
} | ||
interface ThemeTokens { | ||
'max-width': string; | ||
'border-radius': string; | ||
'font-mono': string; | ||
'foreground-rgb': string; | ||
'background-start-rgb': string; | ||
'background-end-rgb': string; | ||
'primary-glow': string; | ||
'secondary-glow': string; | ||
title: { | ||
'start-rgb': string; | ||
'end-rgb': string; | ||
border: string; | ||
}; | ||
callout: { | ||
rgb: string; | ||
'border-rgb': string; | ||
}; | ||
card: { | ||
rgb: string; | ||
'border-rgb': string; | ||
}; | ||
} | ||
|
||
type CustomTheme = ExtendTheme<{ | ||
colorScheme: 'light' | 'dark'; | ||
tokens: ThemeTokens; | ||
}>; | ||
|
||
declare module '@mui/material-pigment-css/theme' { | ||
interface ThemeArgs { | ||
theme: ExtendTheme<{ | ||
colorScheme: 'light' | 'dark'; | ||
tokens: ThemeTokens; | ||
}>; | ||
theme: CustomTheme; | ||
} | ||
} | ||
|
||
declare global { | ||
namespace React { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
interface HTMLAttributes<T> { | ||
sx?: | ||
| React.CSSProperties | ||
| ((theme: CustomTheme) => React.CSSProperties) | ||
| ReadonlyArray<React.CSSProperties | ((theme: CustomTheme) => React.CSSProperties)>; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"rules": { | ||
"import/prefer-default-export": "off", | ||
"react/react-in-jsx-scope": "off" | ||
} | ||
"react/react-in-jsx-scope": "off", | ||
"react/no-unknown-property": ["error", { "ignore": ["sx"] }], | ||
}, | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️