forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pigment-css] Create a wrapper package over Pigment CSS (mui#42819)
- Loading branch information
1 parent
25b67eb
commit 63878a5
Showing
66 changed files
with
1,036 additions
and
299 deletions.
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
Oops, something went wrong.