@@ -25,28 +25,75 @@ function createMuiDsfrTheme(params: { isDark: boolean }): MuiTheme {
2525 "values" : breakpointValues
2626 } ,
2727 "palette" : ( ( ) => {
28- const { decisions } = getColors ( isDark ) ;
28+ const { options , decisions } = getColors ( isDark ) ;
2929
3030 return {
3131 "mode" : isDark ? "dark" : "light" ,
3232 "primary" : {
33+ /*
34+ "main": options.blueFrance._850_200.default,
35+ "light": options.blueFrance._850_200.default,
36+ "dark": options.blueFrance.sun113_625.default,
37+ "contrastText": options.blueFrance._975sun113.default
38+ */
3339 "main" : decisions . background . actionHigh . blueFrance . default ,
3440 "light" : decisions . background . actionLow . blueFrance . default
3541 } ,
3642 "secondary" : {
43+ /*
44+ "main": options.redMarianne.main472.default,
45+ "light": options.redMarianne._850_200.default,
46+ "dark": options.redMarianne._425_625.default,
47+ "contrastText": options.redMarianne._975_75.default
48+ */
3749 "main" : decisions . background . actionHigh . redMarianne . default ,
3850 "light" : decisions . background . actionLow . redMarianne . default
39- }
40- /*
41- "primary": {
42- "900": colorOptions.blueFrance._925_125.default,
43- "800": colorOptions.blueFrance._850_200.default,
4451 } ,
45- "secondary": {
46- "main": colorDecisions.background.actionHigh.redMarianne.default,
47- "light": colorDecisions.background.actionLow.redMarianne.default,
52+ "error" : {
53+ "light" : options . error . _950_100 . default ,
54+ "main" : options . error . _425_625 . default ,
55+ "dark" : options . error . _425_625 . default ,
56+ "contrastText" : options . grey . _1000_50 . default
57+ } ,
58+ "warning" : {
59+ "light" : options . warning . _950_100 . default ,
60+ "main" : options . warning . _425_625 . default ,
61+ "dark" : options . warning . _425_625 . default ,
62+ "contrastText" : options . grey . _1000_50 . default
63+ } ,
64+ "info" : {
65+ "light" : options . info . _950_100 . default ,
66+ "main" : options . info . _425_625 . default ,
67+ "dark" : options . info . _425_625 . default ,
68+ "contrastText" : options . grey . _1000_50 . default
4869 } ,
49- */
70+ "success" : {
71+ "light" : options . success . _950_100 . default ,
72+ "main" : options . success . _425_625 . default ,
73+ "dark" : options . success . _425_625 . default ,
74+ "contrastText" : options . grey . _1000_50 . default
75+ } ,
76+ "text" : {
77+ "primary" : options . grey . _50_1000 . default ,
78+ "secondary" : options . grey . _200_850 . default ,
79+ "disabled" : options . grey . _625_425 . default ,
80+ "hint" : options . grey . _425_625 . default
81+ } ,
82+ "divider" : options . grey . _900_175 . default ,
83+ "action" : {
84+ "default" : options . blueFrance . sun113_625 . default ,
85+ "active" : options . blueFrance . sun113_625 . active ,
86+ "hover" : options . blueFrance . sun113_625 . hover ,
87+ "selected" : options . blueFrance . sun113_625 . active ,
88+ "disabled" : options . grey . _625_425 . default ,
89+ "disabledBackground" : options . grey . _925_125 . default ,
90+ "focus" : options . blueFrance . sun113_625 . active
91+ } ,
92+ "background" : {
93+ "default" : options . grey . _1000_50 . default ,
94+ "paper" : options . grey . _975_75 . default ,
95+ "paperHover" : options . grey . _975_75 . hover
96+ }
5097 } as const ;
5198 } ) ( ) ,
5299 "typography" : ( ( ) => {
@@ -141,43 +188,3 @@ export function noAugmentation(params: { nonAugmentedMuiTheme: MuiTheme }) {
141188 const { nonAugmentedMuiTheme } = params ;
142189 return nonAugmentedMuiTheme ;
143190}
144-
145- /*
146- const muiTheme = createMuiTheme({
147- "shape": {
148- "borderRadius": 0
149- },
150- "breakpoints": {
151- "unit": "em",
152- "values": {
153- "xs": 0,
154- "sm": number,
155- "md": number,
156- "lg": number,
157- "xl": number,
158- },
159- },
160- "typography": {
161- "h1": {
162- "color": "red",
163- [breakpoints.up("md")]: {
164- "color": "pink"
165- }
166-
167- }
168- }
169- "palette": createMuiPaletteOptions({
170- isDarkModeEnabled,
171- palette,
172- useCases,
173- }),
174- spacing,
175- "components": {
176- "MuiLink": {
177- "defaultProps": {
178- "underline": "hover",
179- },
180- },
181- },
182- });
183- */
0 commit comments