@mui/material 7.3.3 → 7.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/Alert/alertClasses.d.ts +24 -24
- package/Breadcrumbs/BreadcrumbCollapsed.js +0 -2
- package/Button/buttonClasses.d.ts +33 -33
- package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/CHANGELOG.md +80 -0
- package/Chip/chipClasses.d.ts +26 -26
- package/CircularProgress/circularProgressClasses.d.ts +2 -2
- package/Collapse/Collapse.d.ts +31 -1
- package/Collapse/Collapse.js +73 -30
- package/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
- package/Dialog/dialogClasses.d.ts +2 -2
- package/Divider/dividerClasses.d.ts +1 -1
- package/Drawer/drawerClasses.d.ts +8 -8
- package/GlobalStyles/GlobalStyles.js +0 -2
- package/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
- package/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
- package/InitColorSchemeScript/InitColorSchemeScript.js +0 -2
- package/Input/inputClasses.d.ts +4 -4
- package/InputBase/inputBaseClasses.d.ts +5 -5
- package/LinearProgress/linearProgressClasses.d.ts +9 -9
- package/OutlinedInput/NotchedOutline.js +0 -2
- package/OutlinedInput/outlinedInputClasses.d.ts +4 -4
- package/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/Radio/RadioButtonIcon.js +0 -2
- package/Select/selectClasses.d.ts +3 -3
- package/Slider/sliderClasses.d.ts +7 -7
- package/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
- package/Tabs/Tabs.js +0 -5
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
- package/Zoom/Zoom.d.ts +1 -1
- package/Zoom/Zoom.js +1 -1
- package/esm/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
- package/esm/Alert/alertClasses.d.ts +24 -24
- package/esm/Breadcrumbs/BreadcrumbCollapsed.js +0 -1
- package/esm/Button/buttonClasses.d.ts +33 -33
- package/esm/ButtonGroup/buttonGroupClasses.d.ts +17 -17
- package/esm/Chip/chipClasses.d.ts +26 -26
- package/esm/CircularProgress/circularProgressClasses.d.ts +2 -2
- package/esm/Collapse/Collapse.d.ts +31 -1
- package/esm/Collapse/Collapse.js +73 -30
- package/esm/DefaultPropsProvider/DefaultPropsProvider.d.ts +1 -1
- package/esm/Dialog/dialogClasses.d.ts +2 -2
- package/esm/Divider/dividerClasses.d.ts +1 -1
- package/esm/Drawer/drawerClasses.d.ts +8 -8
- package/esm/GlobalStyles/GlobalStyles.js +0 -1
- package/esm/ImageListItemBar/imageListItemBarClasses.d.ts +4 -4
- package/esm/InitColorSchemeScript/InitColorSchemeScript.d.ts +1 -2
- package/esm/InitColorSchemeScript/InitColorSchemeScript.js +0 -1
- package/esm/Input/inputClasses.d.ts +4 -4
- package/esm/InputBase/inputBaseClasses.d.ts +5 -5
- package/esm/LinearProgress/linearProgressClasses.d.ts +9 -9
- package/esm/OutlinedInput/NotchedOutline.js +0 -1
- package/esm/OutlinedInput/outlinedInputClasses.d.ts +4 -4
- package/esm/PaginationItem/paginationItemClasses.d.ts +4 -4
- package/esm/Radio/RadioButtonIcon.js +0 -1
- package/esm/Select/selectClasses.d.ts +3 -3
- package/esm/Slider/sliderClasses.d.ts +7 -7
- package/esm/StepConnector/stepConnectorClasses.d.ts +2 -2
- package/esm/TableSortLabel/tableSortLabelClasses.d.ts +2 -2
- package/esm/Tabs/Tabs.js +0 -5
- package/esm/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
- package/esm/Zoom/Zoom.d.ts +1 -1
- package/esm/Zoom/Zoom.js +1 -1
- package/esm/index.js +1 -1
- package/esm/internal/svg-icons/Add.js +0 -1
- package/esm/internal/svg-icons/ArrowDownward.js +0 -1
- package/esm/internal/svg-icons/ArrowDropDown.js +0 -1
- package/esm/internal/svg-icons/Cancel.js +0 -1
- package/esm/internal/svg-icons/CheckBox.js +0 -1
- package/esm/internal/svg-icons/CheckBoxOutlineBlank.js +0 -1
- package/esm/internal/svg-icons/CheckCircle.js +0 -1
- package/esm/internal/svg-icons/Close.js +0 -1
- package/esm/internal/svg-icons/ErrorOutline.js +0 -1
- package/esm/internal/svg-icons/FirstPage.js +0 -1
- package/esm/internal/svg-icons/IndeterminateCheckBox.js +0 -1
- package/esm/internal/svg-icons/InfoOutlined.js +0 -1
- package/esm/internal/svg-icons/KeyboardArrowLeft.js +0 -1
- package/esm/internal/svg-icons/KeyboardArrowRight.js +0 -1
- package/esm/internal/svg-icons/LastPage.js +0 -1
- package/esm/internal/svg-icons/MoreHoriz.js +0 -1
- package/esm/internal/svg-icons/NavigateBefore.js +0 -1
- package/esm/internal/svg-icons/NavigateNext.js +0 -1
- package/esm/internal/svg-icons/Person.js +0 -1
- package/esm/internal/svg-icons/RadioButtonChecked.js +0 -1
- package/esm/internal/svg-icons/RadioButtonUnchecked.js +0 -1
- package/esm/internal/svg-icons/ReportProblemOutlined.js +0 -1
- package/esm/internal/svg-icons/Star.js +0 -1
- package/esm/internal/svg-icons/StarBorder.js +0 -1
- package/esm/internal/svg-icons/SuccessOutlined.js +0 -1
- package/esm/internal/svg-icons/Warning.js +0 -1
- package/esm/locale/caES.js +45 -42
- package/esm/styles/ThemeProvider.d.ts +1 -1
- package/esm/styles/ThemeProviderWithVars.d.ts +2 -3
- package/esm/styles/ThemeProviderWithVars.js +0 -1
- package/esm/styles/createTheme.d.ts +13 -5
- package/esm/styles/createThemeFoundation.d.ts +279 -0
- package/esm/styles/createThemeFoundation.js +37 -0
- package/esm/styles/createThemeNoVars.d.ts +3 -1
- package/esm/styles/createThemeWithVars.d.ts +23 -306
- package/esm/styles/index.d.ts +1 -1
- package/esm/version/index.js +2 -2
- package/esm/zero-styled/index.d.ts +1 -2
- package/esm/zero-styled/index.js +0 -1
- package/index.js +1 -1
- package/internal/svg-icons/Add.js +0 -2
- package/internal/svg-icons/ArrowDownward.js +0 -2
- package/internal/svg-icons/ArrowDropDown.js +0 -2
- package/internal/svg-icons/Cancel.js +0 -2
- package/internal/svg-icons/CheckBox.js +0 -2
- package/internal/svg-icons/CheckBoxOutlineBlank.js +0 -2
- package/internal/svg-icons/CheckCircle.js +0 -2
- package/internal/svg-icons/Close.js +0 -2
- package/internal/svg-icons/ErrorOutline.js +0 -2
- package/internal/svg-icons/FirstPage.js +0 -2
- package/internal/svg-icons/IndeterminateCheckBox.js +0 -2
- package/internal/svg-icons/InfoOutlined.js +0 -2
- package/internal/svg-icons/KeyboardArrowLeft.js +0 -2
- package/internal/svg-icons/KeyboardArrowRight.js +0 -2
- package/internal/svg-icons/LastPage.js +0 -2
- package/internal/svg-icons/MoreHoriz.js +0 -2
- package/internal/svg-icons/NavigateBefore.js +0 -2
- package/internal/svg-icons/NavigateNext.js +0 -2
- package/internal/svg-icons/Person.js +0 -2
- package/internal/svg-icons/RadioButtonChecked.js +0 -2
- package/internal/svg-icons/RadioButtonUnchecked.js +0 -2
- package/internal/svg-icons/ReportProblemOutlined.js +0 -2
- package/internal/svg-icons/Star.js +0 -2
- package/internal/svg-icons/StarBorder.js +0 -2
- package/internal/svg-icons/SuccessOutlined.js +0 -2
- package/internal/svg-icons/Warning.js +0 -2
- package/locale/caES.js +45 -42
- package/package.json +7 -7
- package/styles/ThemeProvider.d.ts +1 -1
- package/styles/ThemeProviderWithVars.d.ts +2 -3
- package/styles/ThemeProviderWithVars.js +0 -2
- package/styles/createTheme.d.ts +13 -5
- package/styles/createThemeFoundation.d.ts +279 -0
- package/styles/createThemeFoundation.js +5 -0
- package/styles/createThemeNoVars.d.ts +3 -1
- package/styles/createThemeWithVars.d.ts +23 -306
- package/styles/index.d.ts +1 -1
- package/version/index.js +2 -2
- package/zero-styled/index.d.ts +1 -2
- package/zero-styled/index.js +0 -2
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { OverridableStringUnion } from '@mui/types';
|
|
2
|
+
import { SxConfig, SxProps, CSSObject, ApplyStyles, Theme as SystemTheme, Shape as SystemShape, ShapeOptions as SystemShapeOptions } from '@mui/system';
|
|
3
|
+
import { ExtractTypographyTokens } from '@mui/system/cssVars';
|
|
4
|
+
import { Palette, PaletteOptions } from "./createPalette.js";
|
|
5
|
+
import { Shadows } from "./shadows.js";
|
|
6
|
+
import { Transitions } from "./createTransitions.js";
|
|
7
|
+
import { Mixins } from "./createMixins.js";
|
|
8
|
+
import { TypographyVariants } from "./createTypography.js";
|
|
9
|
+
import { ZIndex } from "./zIndex.js";
|
|
10
|
+
/**
|
|
11
|
+
* default MD color-schemes
|
|
12
|
+
*/
|
|
13
|
+
export type DefaultColorScheme = 'light' | 'dark';
|
|
14
|
+
/**
|
|
15
|
+
* The application can add more color-scheme by extending this interface via module augmentation
|
|
16
|
+
*
|
|
17
|
+
* Ex.
|
|
18
|
+
* declare module @mui/material/styles {
|
|
19
|
+
* interface ColorSchemeOverrides {
|
|
20
|
+
* foo: true;
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* // SupportedColorScheme = 'light' | 'dark' | 'foo';
|
|
25
|
+
*/
|
|
26
|
+
export interface ColorSchemeOverrides {}
|
|
27
|
+
export type ExtendedColorScheme = OverridableStringUnion<never, ColorSchemeOverrides>;
|
|
28
|
+
/**
|
|
29
|
+
* All color-schemes that the application has
|
|
30
|
+
*/
|
|
31
|
+
export type SupportedColorScheme = DefaultColorScheme | ExtendedColorScheme;
|
|
32
|
+
export interface Opacity {
|
|
33
|
+
inputPlaceholder: number;
|
|
34
|
+
inputUnderline: number;
|
|
35
|
+
switchTrackDisabled: number;
|
|
36
|
+
switchTrack: number;
|
|
37
|
+
}
|
|
38
|
+
export type Overlays = [string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined, string | undefined];
|
|
39
|
+
export interface PaletteBackgroundChannel {
|
|
40
|
+
defaultChannel: string;
|
|
41
|
+
paperChannel: string;
|
|
42
|
+
}
|
|
43
|
+
export interface PaletteCommonChannel {
|
|
44
|
+
background: string;
|
|
45
|
+
backgroundChannel: string;
|
|
46
|
+
onBackground: string;
|
|
47
|
+
onBackgroundChannel: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PaletteColorChannel {
|
|
50
|
+
mainChannel: string;
|
|
51
|
+
lightChannel: string;
|
|
52
|
+
darkChannel: string;
|
|
53
|
+
contrastTextChannel: string;
|
|
54
|
+
}
|
|
55
|
+
export interface PaletteActionChannel {
|
|
56
|
+
activeChannel: string;
|
|
57
|
+
selectedChannel: string;
|
|
58
|
+
}
|
|
59
|
+
export interface PaletteTextChannel {
|
|
60
|
+
primaryChannel: string;
|
|
61
|
+
secondaryChannel: string;
|
|
62
|
+
}
|
|
63
|
+
export interface PaletteAlert {
|
|
64
|
+
errorColor: string;
|
|
65
|
+
infoColor: string;
|
|
66
|
+
successColor: string;
|
|
67
|
+
warningColor: string;
|
|
68
|
+
errorFilledBg: string;
|
|
69
|
+
infoFilledBg: string;
|
|
70
|
+
successFilledBg: string;
|
|
71
|
+
warningFilledBg: string;
|
|
72
|
+
errorFilledColor: string;
|
|
73
|
+
infoFilledColor: string;
|
|
74
|
+
successFilledColor: string;
|
|
75
|
+
warningFilledColor: string;
|
|
76
|
+
errorStandardBg: string;
|
|
77
|
+
infoStandardBg: string;
|
|
78
|
+
successStandardBg: string;
|
|
79
|
+
warningStandardBg: string;
|
|
80
|
+
errorIconColor: string;
|
|
81
|
+
infoIconColor: string;
|
|
82
|
+
successIconColor: string;
|
|
83
|
+
warningIconColor: string;
|
|
84
|
+
}
|
|
85
|
+
export interface PaletteAppBar {
|
|
86
|
+
defaultBg: string;
|
|
87
|
+
darkBg: string;
|
|
88
|
+
darkColor: string;
|
|
89
|
+
}
|
|
90
|
+
export interface PaletteAvatar {
|
|
91
|
+
defaultBg: string;
|
|
92
|
+
}
|
|
93
|
+
export interface PaletteButton {
|
|
94
|
+
inheritContainedBg: string;
|
|
95
|
+
inheritContainedHoverBg: string;
|
|
96
|
+
}
|
|
97
|
+
export interface PaletteChip {
|
|
98
|
+
defaultBorder: string;
|
|
99
|
+
defaultAvatarColor: string;
|
|
100
|
+
defaultIconColor: string;
|
|
101
|
+
}
|
|
102
|
+
export interface PaletteFilledInput {
|
|
103
|
+
bg: string;
|
|
104
|
+
hoverBg: string;
|
|
105
|
+
disabledBg: string;
|
|
106
|
+
}
|
|
107
|
+
export interface PaletteLinearProgress {
|
|
108
|
+
primaryBg: string;
|
|
109
|
+
secondaryBg: string;
|
|
110
|
+
errorBg: string;
|
|
111
|
+
infoBg: string;
|
|
112
|
+
successBg: string;
|
|
113
|
+
warningBg: string;
|
|
114
|
+
}
|
|
115
|
+
export interface PaletteSkeleton {
|
|
116
|
+
bg: string;
|
|
117
|
+
}
|
|
118
|
+
export interface PaletteSlider {
|
|
119
|
+
primaryTrack: string;
|
|
120
|
+
secondaryTrack: string;
|
|
121
|
+
errorTrack: string;
|
|
122
|
+
infoTrack: string;
|
|
123
|
+
successTrack: string;
|
|
124
|
+
warningTrack: string;
|
|
125
|
+
}
|
|
126
|
+
export interface PaletteSnackbarContent {
|
|
127
|
+
bg: string;
|
|
128
|
+
color: string;
|
|
129
|
+
}
|
|
130
|
+
export interface PaletteSpeedDialAction {
|
|
131
|
+
fabHoverBg: string;
|
|
132
|
+
}
|
|
133
|
+
export interface PaletteStepConnector {
|
|
134
|
+
border: string;
|
|
135
|
+
}
|
|
136
|
+
export interface PaletteStepContent {
|
|
137
|
+
border: string;
|
|
138
|
+
}
|
|
139
|
+
export interface PaletteSwitch {
|
|
140
|
+
defaultColor: string;
|
|
141
|
+
defaultDisabledColor: string;
|
|
142
|
+
primaryDisabledColor: string;
|
|
143
|
+
secondaryDisabledColor: string;
|
|
144
|
+
errorDisabledColor: string;
|
|
145
|
+
infoDisabledColor: string;
|
|
146
|
+
successDisabledColor: string;
|
|
147
|
+
warningDisabledColor: string;
|
|
148
|
+
}
|
|
149
|
+
export interface PaletteTableCell {
|
|
150
|
+
border: string;
|
|
151
|
+
}
|
|
152
|
+
export interface PaletteTooltip {
|
|
153
|
+
bg: string;
|
|
154
|
+
}
|
|
155
|
+
export interface Shape extends SystemShape {}
|
|
156
|
+
export interface ShapeOptions extends SystemShapeOptions {}
|
|
157
|
+
export interface ColorSystemOptions {
|
|
158
|
+
palette?: PaletteOptions & {
|
|
159
|
+
background?: Partial<PaletteBackgroundChannel>;
|
|
160
|
+
common?: Partial<PaletteCommonChannel>;
|
|
161
|
+
primary?: Partial<PaletteColorChannel>;
|
|
162
|
+
secondary?: Partial<PaletteColorChannel>;
|
|
163
|
+
error?: Partial<PaletteColorChannel>;
|
|
164
|
+
info?: Partial<PaletteColorChannel>;
|
|
165
|
+
success?: Partial<PaletteColorChannel>;
|
|
166
|
+
text?: Partial<PaletteTextChannel>;
|
|
167
|
+
dividerChannel?: Partial<string>;
|
|
168
|
+
action?: Partial<PaletteActionChannel>;
|
|
169
|
+
Alert?: Partial<PaletteAlert>;
|
|
170
|
+
AppBar?: Partial<PaletteAppBar>;
|
|
171
|
+
Avatar?: Partial<PaletteAvatar>;
|
|
172
|
+
Button?: Partial<PaletteButton>;
|
|
173
|
+
Chip?: Partial<PaletteChip>;
|
|
174
|
+
FilledInput?: Partial<PaletteFilledInput>;
|
|
175
|
+
LinearProgress?: Partial<PaletteLinearProgress>;
|
|
176
|
+
Skeleton?: Partial<PaletteSkeleton>;
|
|
177
|
+
Slider?: Partial<PaletteSlider>;
|
|
178
|
+
SnackbarContent?: Partial<PaletteSnackbarContent>;
|
|
179
|
+
SpeedDialAction?: Partial<PaletteSpeedDialAction>;
|
|
180
|
+
StepConnector?: Partial<PaletteStepConnector>;
|
|
181
|
+
StepContent?: Partial<PaletteStepContent>;
|
|
182
|
+
Switch?: Partial<PaletteSwitch>;
|
|
183
|
+
TableCell?: Partial<PaletteTableCell>;
|
|
184
|
+
Tooltip?: Partial<PaletteTooltip>;
|
|
185
|
+
};
|
|
186
|
+
opacity?: Partial<Opacity>;
|
|
187
|
+
overlays?: Overlays;
|
|
188
|
+
}
|
|
189
|
+
export interface CssVarsPalette {
|
|
190
|
+
common: PaletteCommonChannel;
|
|
191
|
+
primary: PaletteColorChannel;
|
|
192
|
+
secondary: PaletteColorChannel;
|
|
193
|
+
error: PaletteColorChannel;
|
|
194
|
+
info: PaletteColorChannel;
|
|
195
|
+
success: PaletteColorChannel;
|
|
196
|
+
warning: PaletteColorChannel;
|
|
197
|
+
text: PaletteTextChannel;
|
|
198
|
+
background: PaletteBackgroundChannel;
|
|
199
|
+
dividerChannel: string;
|
|
200
|
+
action: PaletteActionChannel;
|
|
201
|
+
Alert: PaletteAlert;
|
|
202
|
+
AppBar: PaletteAppBar;
|
|
203
|
+
Avatar: PaletteAvatar;
|
|
204
|
+
Button: PaletteButton;
|
|
205
|
+
Chip: PaletteChip;
|
|
206
|
+
FilledInput: PaletteFilledInput;
|
|
207
|
+
LinearProgress: PaletteLinearProgress;
|
|
208
|
+
Skeleton: PaletteSkeleton;
|
|
209
|
+
Slider: PaletteSlider;
|
|
210
|
+
SnackbarContent: PaletteSnackbarContent;
|
|
211
|
+
SpeedDialAction: PaletteSpeedDialAction;
|
|
212
|
+
StepConnector: PaletteStepConnector;
|
|
213
|
+
StepContent: PaletteStepContent;
|
|
214
|
+
Switch: PaletteSwitch;
|
|
215
|
+
TableCell: PaletteTableCell;
|
|
216
|
+
Tooltip: PaletteTooltip;
|
|
217
|
+
}
|
|
218
|
+
export interface ColorSystem {
|
|
219
|
+
palette: Palette & CssVarsPalette;
|
|
220
|
+
opacity: Opacity;
|
|
221
|
+
overlays: Overlays;
|
|
222
|
+
}
|
|
223
|
+
export interface ThemeVars {
|
|
224
|
+
font: ExtractTypographyTokens<TypographyVariants>;
|
|
225
|
+
palette: Omit<ColorSystem['palette'], 'colorScheme' | 'mode' | 'contrastThreshold' | 'tonalOffset' | 'getContrastText' | 'augmentColor'>;
|
|
226
|
+
opacity: Opacity;
|
|
227
|
+
overlays: Overlays;
|
|
228
|
+
shadows: Shadows;
|
|
229
|
+
shape: Shape;
|
|
230
|
+
spacing: string;
|
|
231
|
+
zIndex: ZIndex;
|
|
232
|
+
}
|
|
233
|
+
type Split<T, K extends keyof T = keyof T> = K extends string | number ? { [k in K]: Exclude<T[K], undefined> } : never;
|
|
234
|
+
type ConcatDeep<T> = T extends Record<string | number, infer V> ? keyof T extends string | number ? V extends string | number ? keyof T : keyof V extends string | number ? `${keyof T}-${ConcatDeep<Split<V>>}` : never : never : never;
|
|
235
|
+
/**
|
|
236
|
+
* Does not work for these cases:
|
|
237
|
+
* - { borderRadius: string | number } // the value can't be a union
|
|
238
|
+
* - { shadows: [string, string, ..., string] } // the value can't be an array
|
|
239
|
+
*/
|
|
240
|
+
type NormalizeVars<T> = ConcatDeep<Split<T>>;
|
|
241
|
+
export {};
|
|
242
|
+
export interface ThemeCssVarOverrides {}
|
|
243
|
+
export type ThemeCssVar = OverridableStringUnion<NormalizeVars<Omit<ThemeVars, 'overlays' | 'shadows' | 'shape'>> | 'shape-borderRadius' | 'shadows-0' | 'shadows-1' | 'shadows-2' | 'shadows-3' | 'shadows-4' | 'shadows-5' | 'shadows-6' | 'shadows-7' | 'shadows-8' | 'shadows-9' | 'shadows-10' | 'shadows-11' | 'shadows-12' | 'shadows-13' | 'shadows-14' | 'shadows-15' | 'shadows-16' | 'shadows-17' | 'shadows-18' | 'shadows-19' | 'shadows-20' | 'shadows-21' | 'shadows-22' | 'shadows-23' | 'shadows-24' | 'overlays-0' | 'overlays-1' | 'overlays-2' | 'overlays-3' | 'overlays-4' | 'overlays-5' | 'overlays-6' | 'overlays-7' | 'overlays-8' | 'overlays-9' | 'overlays-10' | 'overlays-11' | 'overlays-12' | 'overlays-13' | 'overlays-14' | 'overlays-15' | 'overlays-16' | 'overlays-17' | 'overlays-18' | 'overlays-19' | 'overlays-20' | 'overlays-21' | 'overlays-22' | 'overlays-23' | 'overlays-24', ThemeCssVarOverrides>;
|
|
244
|
+
/**
|
|
245
|
+
* Theme properties generated by extendTheme and CssVarsProvider
|
|
246
|
+
*/
|
|
247
|
+
export interface CssVarsTheme extends ColorSystem {
|
|
248
|
+
colorSchemes: Partial<Record<SupportedColorScheme, ColorSystem>>;
|
|
249
|
+
rootSelector: string;
|
|
250
|
+
colorSchemeSelector: 'media' | 'class' | 'data' | string;
|
|
251
|
+
cssVarPrefix: string;
|
|
252
|
+
defaultColorScheme: SupportedColorScheme;
|
|
253
|
+
vars: ThemeVars;
|
|
254
|
+
getCssVar: (field: ThemeCssVar, ...vars: ThemeCssVar[]) => string;
|
|
255
|
+
getColorSchemeSelector: (colorScheme: SupportedColorScheme) => string;
|
|
256
|
+
generateThemeVars: () => ThemeVars;
|
|
257
|
+
generateStyleSheets: () => Array<Record<string, any>>;
|
|
258
|
+
generateSpacing: () => SystemTheme['spacing'];
|
|
259
|
+
spacing: SystemTheme['spacing'];
|
|
260
|
+
breakpoints: SystemTheme['breakpoints'];
|
|
261
|
+
shape: Shape;
|
|
262
|
+
typography: TypographyVariants;
|
|
263
|
+
transitions: Transitions;
|
|
264
|
+
shadows: Shadows;
|
|
265
|
+
mixins: Mixins;
|
|
266
|
+
zIndex: ZIndex;
|
|
267
|
+
direction: SystemTheme['direction'];
|
|
268
|
+
/**
|
|
269
|
+
* A function to determine if the key, value should be attached as CSS Variable
|
|
270
|
+
* `keys` is an array that represents the object path keys.
|
|
271
|
+
* Ex, if the theme is { foo: { bar: 'var(--test)' } }
|
|
272
|
+
* then, keys = ['foo', 'bar']
|
|
273
|
+
* value = 'var(--test)'
|
|
274
|
+
*/
|
|
275
|
+
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
276
|
+
unstable_sxConfig: SxConfig;
|
|
277
|
+
unstable_sx: (props: SxProps<CssVarsTheme>) => CSSObject;
|
|
278
|
+
applyStyles: ApplyStyles<SupportedColorScheme>;
|
|
279
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* default MD color-schemes
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The application can add more color-scheme by extending this interface via module augmentation
|
|
7
|
+
*
|
|
8
|
+
* Ex.
|
|
9
|
+
* declare module @mui/material/styles {
|
|
10
|
+
* interface ColorSchemeOverrides {
|
|
11
|
+
* foo: true;
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* // SupportedColorScheme = 'light' | 'dark' | 'foo';
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* All color-schemes that the application has
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// The Palette should be sync with `../themeCssVarsAugmentation/index.d.ts`
|
|
23
|
+
|
|
24
|
+
// should not include keys defined in `shouldSkipGeneratingVar` and have value typeof function
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Does not work for these cases:
|
|
28
|
+
* - { borderRadius: string | number } // the value can't be a union
|
|
29
|
+
* - { shadows: [string, string, ..., string] } // the value can't be an array
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
// shut off automatic exporting for the Generics above
|
|
33
|
+
export {};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Theme properties generated by extendTheme and CssVarsProvider
|
|
37
|
+
*/
|
|
@@ -6,7 +6,7 @@ import { Shadows } from "./shadows.js";
|
|
|
6
6
|
import { Transitions, TransitionsOptions } from "./createTransitions.js";
|
|
7
7
|
import { ZIndex, ZIndexOptions } from "./zIndex.js";
|
|
8
8
|
import { Components } from "./components.js";
|
|
9
|
-
import { CssVarsTheme, CssVarsPalette, ColorSystemOptions } from "./
|
|
9
|
+
import { CssVarsTheme, CssVarsPalette, ColorSystemOptions, Shape, ShapeOptions } from "./createThemeFoundation.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* To disable custom properties, use module augmentation
|
|
@@ -27,6 +27,7 @@ export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'>, CssVar
|
|
|
27
27
|
components?: Components<Omit<Theme, 'components'>>;
|
|
28
28
|
palette?: PaletteOptions;
|
|
29
29
|
shadows?: Shadows;
|
|
30
|
+
shape?: ShapeOptions;
|
|
30
31
|
transitions?: TransitionsOptions;
|
|
31
32
|
typography?: TypographyVariantsOptions | ((palette: Palette) => TypographyVariantsOptions);
|
|
32
33
|
zIndex?: ZIndexOptions;
|
|
@@ -40,6 +41,7 @@ export interface BaseTheme extends SystemTheme {
|
|
|
40
41
|
enabled: true;
|
|
41
42
|
} ? CssVarsPalette : {});
|
|
42
43
|
shadows: Shadows;
|
|
44
|
+
shape: Shape;
|
|
43
45
|
transitions: Transitions;
|
|
44
46
|
typography: TypographyVariants;
|
|
45
47
|
zIndex: ZIndex;
|