@webpros/mui-theme 0.1.6 → 0.3.0

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.
Files changed (242) hide show
  1. package/dist/package.json +21 -11
  2. package/dist/src/components/data-display/Avatar/Avatar.theme.js +11 -8
  3. package/dist/src/components/data-display/Badge/Badge.theme.d.ts +4 -1
  4. package/dist/src/components/data-display/Badge/Badge.theme.js +216 -55
  5. package/dist/src/components/data-display/Chip/Chip.theme.d.ts +17 -3
  6. package/dist/src/components/data-display/Chip/Chip.theme.js +133 -477
  7. package/dist/src/components/data-display/Chip/get-chip-colors-map.d.ts +42 -0
  8. package/dist/src/components/data-display/Chip/get-chip-colors-map.js +253 -0
  9. package/dist/src/components/data-display/Divider/Divider.theme.d.ts +6 -1
  10. package/dist/src/components/data-display/Divider/Divider.theme.js +60 -3
  11. package/dist/src/components/data-display/List/List.theme.d.ts +1 -1
  12. package/dist/src/components/data-display/List/List.theme.js +1 -1
  13. package/dist/src/components/data-display/ListItem/ListItem.theme.d.ts +1 -1
  14. package/dist/src/components/data-display/ListItem/ListItem.theme.js +16 -8
  15. package/dist/src/components/data-display/ListItemAvatar/ListItemAvatar.theme.js +1 -2
  16. package/dist/src/components/data-display/ListItemButton/ListItemButton.theme.d.ts +0 -5
  17. package/dist/src/components/data-display/ListItemButton/ListItemButton.theme.js +14 -48
  18. package/dist/src/components/data-display/ListItemIcon/ListItemIcon.theme.js +4 -4
  19. package/dist/src/components/data-display/ListSubheader/ListSubheader.theme.d.ts +1 -1
  20. package/dist/src/components/data-display/ListSubheader/ListSubheader.theme.js +2 -5
  21. package/dist/src/components/data-display/Skeleton/Skeleton.d.ts +3 -0
  22. package/dist/src/components/data-display/Skeleton/Skeleton.js +4 -0
  23. package/dist/src/components/data-display/Skeleton/Skeleton.theme.d.ts +15 -0
  24. package/dist/src/components/data-display/Skeleton/Skeleton.theme.js +31 -0
  25. package/dist/src/components/data-display/Skeleton/index.d.ts +1 -0
  26. package/dist/src/components/data-display/Skeleton/index.js +2 -0
  27. package/dist/src/components/data-display/Tooltip/Tooltip.theme.js +7 -9
  28. package/dist/src/components/data-display/Typography/Typography.theme.d.ts +19 -26
  29. package/dist/src/components/data-display/Typography/Typography.theme.js +7 -163
  30. package/dist/src/components/feedback/Alert/Alert.theme.d.ts +12 -0
  31. package/dist/src/components/feedback/Alert/Alert.theme.js +61 -45
  32. package/dist/src/components/feedback/CircularProgress/CircularProgress.theme.d.ts +6 -1
  33. package/dist/src/components/feedback/CircularProgress/CircularProgress.theme.js +49 -8
  34. package/dist/src/components/feedback/Dialog/Dialog.theme.d.ts +5 -0
  35. package/dist/src/components/feedback/Dialog/Dialog.theme.js +43 -14
  36. package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.d.ts +6 -1
  37. package/dist/src/components/feedback/LinearProgress/LinearProgress.theme.js +91 -9
  38. package/dist/src/components/feedback/Snackbar/Snackbar.theme.d.ts +4 -4
  39. package/dist/src/components/feedback/Snackbar/Snackbar.theme.js +11 -3
  40. package/dist/src/components/index.d.ts +10 -1
  41. package/dist/src/components/index.js +10 -1
  42. package/dist/src/components/inputs/Autocomplete/Autocomplete.theme.d.ts +1 -1
  43. package/dist/src/components/inputs/Autocomplete/Autocomplete.theme.js +23 -51
  44. package/dist/src/components/inputs/Autocomplete/components/AutocompleteCaretDownIcon.d.ts +1 -0
  45. package/dist/src/components/inputs/Autocomplete/components/{AutocompletePopupIcon.js → AutocompleteCaretDownIcon.js} +1 -1
  46. package/dist/src/components/inputs/Autocomplete/components/AutocompleteXIcon.d.ts +1 -0
  47. package/dist/src/components/inputs/Autocomplete/components/AutocompleteXIcon.js +4 -0
  48. package/dist/src/components/inputs/Button/Button.theme.d.ts +4 -0
  49. package/dist/src/components/inputs/Button/Button.theme.js +93 -226
  50. package/dist/src/components/inputs/Button/get-button-colors-map.d.ts +24 -0
  51. package/dist/src/components/inputs/Button/get-button-colors-map.js +211 -0
  52. package/dist/src/components/inputs/Checkbox/Checkbox.theme.d.ts +7 -2
  53. package/dist/src/components/inputs/Checkbox/Checkbox.theme.js +57 -7
  54. package/dist/src/components/inputs/Fab/Fab.theme.d.ts +5 -9
  55. package/dist/src/components/inputs/Fab/Fab.theme.js +27 -98
  56. package/dist/src/components/inputs/FormHelperText/FormHelperText.d.ts +2 -0
  57. package/dist/src/components/inputs/FormHelperText/FormHelperText.js +3 -0
  58. package/dist/src/components/inputs/FormHelperText/FormHelperText.theme.d.ts +7 -0
  59. package/dist/src/components/inputs/FormHelperText/FormHelperText.theme.js +8 -0
  60. package/dist/src/components/inputs/FormHelperText/index.d.ts +1 -0
  61. package/dist/src/components/inputs/FormHelperText/index.js +2 -0
  62. package/dist/src/components/inputs/FormLabel/FormLabel.d.ts +2 -0
  63. package/dist/src/components/inputs/FormLabel/FormLabel.js +3 -0
  64. package/dist/src/components/inputs/FormLabel/FormLabel.theme.d.ts +7 -0
  65. package/dist/src/components/inputs/FormLabel/FormLabel.theme.js +8 -0
  66. package/dist/src/components/inputs/FormLabel/index.d.ts +1 -0
  67. package/dist/src/components/inputs/FormLabel/index.js +2 -0
  68. package/dist/src/components/inputs/IconButton/IconButton.theme.d.ts +3 -2
  69. package/dist/src/components/inputs/IconButton/IconButton.theme.js +90 -95
  70. package/dist/src/components/inputs/InputBase/InputBase.theme.d.ts +9 -26
  71. package/dist/src/components/inputs/InputBase/InputBase.theme.js +2 -64
  72. package/dist/src/components/inputs/InputLabel/InputLabel.theme.d.ts +7 -4
  73. package/dist/src/components/inputs/InputLabel/InputLabel.theme.js +26 -12
  74. package/dist/src/components/inputs/OutlinedInput/OutlinedInput.theme.d.ts +8 -0
  75. package/dist/src/components/inputs/OutlinedInput/OutlinedInput.theme.js +67 -0
  76. package/dist/src/components/inputs/OutlinedInput/index.d.ts +1 -0
  77. package/dist/src/components/inputs/OutlinedInput/index.js +2 -0
  78. package/dist/src/components/inputs/Radio/Radio.d.ts +4 -0
  79. package/dist/src/components/inputs/Radio/Radio.js +4 -0
  80. package/dist/src/components/inputs/Radio/Radio.theme.d.ts +11 -0
  81. package/dist/src/components/inputs/Radio/Radio.theme.js +35 -0
  82. package/dist/src/components/inputs/Radio/index.d.ts +1 -0
  83. package/dist/src/components/{navigation/TabList → inputs/Radio}/index.js +1 -1
  84. package/dist/src/components/inputs/Select/Select.theme.d.ts +2 -3
  85. package/dist/src/components/inputs/Select/Select.theme.js +6 -33
  86. package/dist/src/components/inputs/Switch/Switch.theme.js +125 -49
  87. package/dist/src/components/inputs/TextField/TextField.theme.d.ts +2 -3
  88. package/dist/src/components/inputs/TextField/TextField.theme.js +2 -26
  89. package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +4 -0
  90. package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.js +5 -0
  91. package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.theme.d.ts +11 -0
  92. package/dist/src/components/navigation/Breadcrumbs/Breadcrumbs.theme.js +23 -0
  93. package/dist/src/components/navigation/Breadcrumbs/Crumb.d.ts +10 -0
  94. package/dist/src/components/navigation/Breadcrumbs/Crumb.js +10 -0
  95. package/dist/src/components/navigation/Breadcrumbs/index.d.ts +1 -0
  96. package/dist/src/components/navigation/Breadcrumbs/index.js +2 -0
  97. package/dist/src/components/navigation/Drawer/Drawer.theme.d.ts +1 -1
  98. package/dist/src/components/navigation/Drawer/Drawer.theme.js +50 -6
  99. package/dist/src/components/navigation/Link/Link.theme.d.ts +11 -2
  100. package/dist/src/components/navigation/Link/Link.theme.js +66 -9
  101. package/dist/src/components/navigation/Menu/Menu.theme.d.ts +2 -3
  102. package/dist/src/components/navigation/Menu/Menu.theme.js +6 -11
  103. package/dist/src/components/navigation/MenuItem/MenuItem.theme.d.ts +2 -4
  104. package/dist/src/components/navigation/MenuItem/MenuItem.theme.js +8 -8
  105. package/dist/src/components/navigation/Pagination/Pagination.theme.d.ts +1 -1
  106. package/dist/src/components/navigation/Pagination/Pagination.theme.js +11 -3
  107. package/dist/src/components/navigation/PaginationItem/PaginationItem.theme.js +65 -10
  108. package/dist/src/components/navigation/PaginationItem/components/PaginationIcons.d.ts +4 -0
  109. package/dist/src/components/navigation/PaginationItem/components/PaginationIcons.js +8 -0
  110. package/dist/src/components/navigation/PaginationItem/components/index.d.ts +1 -0
  111. package/dist/src/components/navigation/PaginationItem/components/index.js +2 -0
  112. package/dist/src/components/navigation/Tab/Tab.theme.d.ts +7 -1
  113. package/dist/src/components/navigation/Tab/Tab.theme.js +52 -13
  114. package/dist/src/components/navigation/Tabs/Tabs.d.ts +3 -0
  115. package/dist/src/components/navigation/Tabs/Tabs.js +4 -0
  116. package/dist/src/components/navigation/Tabs/Tabs.theme.d.ts +16 -0
  117. package/dist/src/components/navigation/Tabs/Tabs.theme.js +55 -0
  118. package/dist/src/components/navigation/Tabs/index.d.ts +1 -0
  119. package/dist/src/components/navigation/Tabs/index.js +2 -0
  120. package/dist/src/components/surfaces/Accordion/Accordion.theme.js +54 -22
  121. package/dist/src/components/surfaces/Accordion/AccordionDetails.theme.d.ts +10 -0
  122. package/dist/src/components/surfaces/Accordion/AccordionDetails.theme.js +19 -0
  123. package/dist/src/components/surfaces/Accordion/AccordionSummary.theme.d.ts +10 -0
  124. package/dist/src/components/surfaces/Accordion/AccordionSummary.theme.js +37 -0
  125. package/dist/src/components/surfaces/Accordion/index.d.ts +2 -0
  126. package/dist/src/components/surfaces/Accordion/index.js +2 -0
  127. package/dist/src/components/surfaces/Card/Card.theme.js +1 -1
  128. package/dist/src/components/surfaces/Paper/Paper.theme.d.ts +16 -1
  129. package/dist/src/components/surfaces/Paper/Paper.theme.js +21 -7
  130. package/dist/src/components/surfaces/Paper/Paper.tokens.d.ts +8 -0
  131. package/dist/src/components/surfaces/Paper/Paper.tokens.js +50 -0
  132. package/dist/src/components/surfaces/Paper/Paper.variants.d.ts +4 -0
  133. package/dist/src/components/surfaces/Paper/Paper.variants.js +3 -0
  134. package/dist/src/components/surfaces/Popover/Popover.d.ts +4 -0
  135. package/dist/src/components/surfaces/Popover/Popover.js +4 -0
  136. package/dist/src/components/surfaces/Popover/Popover.theme.d.ts +9 -0
  137. package/dist/src/components/surfaces/Popover/Popover.theme.js +14 -0
  138. package/dist/src/components/surfaces/Popover/index.d.ts +1 -0
  139. package/dist/src/components/surfaces/Popover/index.js +2 -0
  140. package/dist/src/components/utils/Backdrop/Backdrop.d.ts +3 -0
  141. package/dist/src/components/utils/Backdrop/Backdrop.js +4 -0
  142. package/dist/src/components/utils/Backdrop/Backdrop.theme.d.ts +11 -0
  143. package/dist/src/components/utils/Backdrop/Backdrop.theme.js +17 -0
  144. package/dist/src/components/utils/Backdrop/index.d.ts +1 -0
  145. package/dist/src/components/utils/Backdrop/index.js +2 -0
  146. package/dist/src/icons/index.d.ts +4 -0
  147. package/dist/src/icons/index.js +12 -0
  148. package/dist/src/providers/ThemeModeProvider.d.ts +1 -2
  149. package/dist/src/providers/ThemeModeProvider.js +2 -2
  150. package/dist/src/providers/WebProsMuiThemeProvider.js +1 -1
  151. package/dist/src/providers/WebProsTheme.d.ts +1 -0
  152. package/dist/src/providers/WebProsTheme.js +11 -5
  153. package/dist/src/shared/rippleEnterKeyframe.d.ts +6 -0
  154. package/dist/src/shared/rippleEnterKeyframe.js +12 -0
  155. package/dist/src/shared/viewContext/index.d.ts +1 -0
  156. package/dist/src/shared/viewContext/index.js +2 -0
  157. package/dist/src/shared/viewContext/viewContext.d.ts +4 -0
  158. package/dist/src/shared/viewContext/viewContext.js +2 -0
  159. package/dist/src/style/additional-color-palette.d.ts +1 -3
  160. package/dist/src/style/additional-color-palette.js +4 -7
  161. package/dist/src/style/custom-color-palette.js +51 -53
  162. package/dist/src/tokens/ThemeColorTokens.d.ts +11 -93
  163. package/dist/src/tokens/ThemeColorTokens.js +4 -168
  164. package/dist/src/tokens/ThemeScheme.d.ts +0 -3
  165. package/dist/src/tokens/ThemeScheme.js +0 -2
  166. package/dist/src/tokens/colors/Dark.d.ts +16 -0
  167. package/dist/src/tokens/colors/Dark.js +1422 -0
  168. package/dist/src/tokens/colors/Light.d.ts +16 -0
  169. package/dist/src/tokens/colors/Light.js +1392 -0
  170. package/dist/src/tokens/colors/index.d.ts +7 -0
  171. package/dist/src/tokens/colors/index.js +4 -0
  172. package/dist/src/tokens/colors/inverseSchemas.d.ts +40 -0
  173. package/dist/src/tokens/colors/inverseSchemas.js +3 -0
  174. package/dist/src/tokens/colors/inverseSchemes.d.ts +53 -0
  175. package/dist/src/tokens/colors/inverseSchemes.js +3 -0
  176. package/dist/src/tokens/colors/inverseStateLayers.d.ts +188 -0
  177. package/dist/src/tokens/colors/inverseStateLayers.js +3 -0
  178. package/dist/src/tokens/colors/schemas.d.ts +111 -0
  179. package/dist/src/tokens/colors/schemas.js +3 -0
  180. package/dist/src/tokens/colors/schemes.d.ts +111 -0
  181. package/dist/src/tokens/colors/schemes.js +3 -0
  182. package/dist/src/tokens/colors/stateLayers.d.ts +456 -0
  183. package/dist/src/tokens/colors/stateLayers.js +3 -0
  184. package/dist/src/tokens/colors/types.d.ts +9 -0
  185. package/dist/src/tokens/colors/types.js +2 -0
  186. package/dist/src/tokens/index.d.ts +6 -2
  187. package/dist/src/tokens/index.js +2 -1
  188. package/dist/src/tokens/legacyColors/LegacyDark.d.ts +2 -0
  189. package/dist/src/tokens/legacyColors/LegacyDark.js +88 -0
  190. package/dist/src/tokens/legacyColors/LegacyLight.d.ts +2 -0
  191. package/dist/src/tokens/legacyColors/LegacyLight.js +86 -0
  192. package/dist/src/tokens/legacyColors/ThemeColorTokensLegacy.d.ts +74 -0
  193. package/dist/src/tokens/legacyColors/ThemeColorTokensLegacy.js +2 -0
  194. package/dist/src/tokens/legacyColors/additionalColors/additionalColors.d.ts +21 -0
  195. package/dist/src/tokens/legacyColors/additionalColors/additionalColors.js +2 -0
  196. package/dist/src/tokens/{additionalColors → legacyColors/additionalColors}/index.d.ts +1 -0
  197. package/dist/src/tokens/{additionalColors → legacyColors/additionalColors}/index.js +1 -0
  198. package/dist/src/tokens/legacyColors/index.d.ts +2 -0
  199. package/dist/src/tokens/legacyColors/index.js +3 -0
  200. package/dist/src/tokens/shadows/index.d.ts +12 -0
  201. package/dist/src/tokens/shadows/index.js +112 -0
  202. package/dist/src/tokens/typography/index.d.ts +2 -0
  203. package/dist/src/tokens/typography/index.js +4 -0
  204. package/dist/src/tokens/typography/typescale.d.ts +28 -0
  205. package/dist/src/tokens/typography/typescale.js +26 -0
  206. package/dist/src/tokens/typography/typography.d.ts +2 -0
  207. package/dist/src/tokens/typography/typography.js +156 -0
  208. package/dist/src/utils/createIcon.d.ts +12 -0
  209. package/dist/src/utils/createIcon.js +94 -0
  210. package/dist/src/utils/flatten.d.ts +1 -0
  211. package/dist/src/utils/flatten.js +12 -0
  212. package/dist/src/utils/getMUIComponents.js +2 -2
  213. package/dist/src/utils/getMUIPalette.d.ts +6 -11
  214. package/dist/src/utils/getMUIPalette.js +49 -25
  215. package/dist/src/utils/getMUIThemeCustoimzationType.d.ts +31 -0
  216. package/dist/src/utils/getMUIThemeCustoimzationType.js +2 -0
  217. package/dist/src/utils/getMUITypography.d.ts +2 -0
  218. package/dist/src/utils/getMUITypography.js +5 -0
  219. package/dist/src/utils/getStateLayerColor.d.ts +37 -0
  220. package/dist/src/utils/getStateLayerColor.js +43 -1
  221. package/dist/src/utils/index.d.ts +1 -1
  222. package/dist/src/utils/index.js +1 -1
  223. package/dist/src/utils/patchMUIShadows.js +4 -3
  224. package/package.json +21 -11
  225. package/dist/src/components/inputs/Autocomplete/components/AutocompletePopupIcon.d.ts +0 -1
  226. package/dist/src/components/navigation/PaginationItem/PaginationItem.d.ts +0 -3
  227. package/dist/src/components/navigation/PaginationItem/PaginationItem.js +0 -4
  228. package/dist/src/components/navigation/TabList/TabList.d.ts +0 -3
  229. package/dist/src/components/navigation/TabList/TabList.js +0 -4
  230. package/dist/src/components/navigation/TabList/TabList.theme.d.ts +0 -10
  231. package/dist/src/components/navigation/TabList/TabList.theme.js +0 -17
  232. package/dist/src/components/navigation/TabList/index.d.ts +0 -1
  233. package/dist/src/hooks/useTonalPalette.d.ts +0 -3
  234. package/dist/src/hooks/useTonalPalette.js +0 -32
  235. package/dist/src/providers/ThemeSchemeProvider.d.ts +0 -12
  236. package/dist/src/providers/ThemeSchemeProvider.js +0 -29
  237. package/dist/src/tokens/TonalPalette.d.ts +0 -10
  238. package/dist/src/tokens/TonalPalette.js +0 -10
  239. package/dist/src/utils/generateTokens.d.ts +0 -4
  240. package/dist/src/utils/generateTokens.js +0 -107
  241. /package/dist/src/tokens/{Tone.d.ts → legacyColors/Tone.d.ts} +0 -0
  242. /package/dist/src/tokens/{Tone.js → legacyColors/Tone.js} +0 -0
@@ -1,17 +1,15 @@
1
- // Copyright 2025 WebPros International GmbH. All rights reserved.
2
- import { tooltipClasses, } from '@mui/material';
3
1
  export const getTooltip = (theme) => {
4
- const { palette } = theme;
2
+ const { colors } = theme;
5
3
  return {
6
4
  MuiTooltip: {
7
5
  styleOverrides: {
8
6
  tooltip: {
9
- background: palette.inverseSurface.main,
10
- color: palette.inverseOnSurface.main,
11
- },
12
- popper: {
13
- [`&.${tooltipClasses.popper}[data-popper-placement*="top"] .${tooltipClasses.tooltip}`]: {
14
- marginBottom: 2,
7
+ background: colors.inverseSchemes.surfaces.surface,
8
+ color: colors.inverseSchemes.surfaces.onSurface,
9
+ borderRadius: '6px',
10
+ padding: '8px 12px',
11
+ '& .MuiTooltip-arrow': {
12
+ color: colors.inverseSchemes.surfaces.surface,
15
13
  },
16
14
  },
17
15
  },
@@ -1,4 +1,22 @@
1
1
  import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
2
+ import { TypescaleTypographyVariantsBooleans } from '../../../tokens/typography/typescale';
3
+ declare module '@mui/material/Typography' {
4
+ interface TypographyPropsVariantOverrides extends TypescaleTypographyVariantsBooleans {
5
+ h1: true;
6
+ h2: true;
7
+ h3: true;
8
+ h4: true;
9
+ h5: true;
10
+ h6: true;
11
+ subtitle1: true;
12
+ subtitle2: true;
13
+ body1: true;
14
+ body2: true;
15
+ button: true;
16
+ caption: true;
17
+ overline: true;
18
+ }
19
+ }
2
20
  interface M3Typography {
3
21
  MuiTypography: {
4
22
  defaultProps?: ComponentsProps['MuiTypography'];
@@ -6,31 +24,6 @@ interface M3Typography {
6
24
  variants?: ComponentsVariants['MuiTypography'];
7
25
  };
8
26
  }
9
- declare module '@mui/material/Typography' {
10
- interface TypographyPropsVariantOverrides {
11
- DisplayLarge: true;
12
- DisplayMedium: true;
13
- DisplaySmall: true;
14
- HeadlineLarge: true;
15
- HeadlineMedium: true;
16
- HeadlineSmall: true;
17
- TitleLarge: true;
18
- TitleMedium: true;
19
- TitleSmall: true;
20
- LabelLarge: true;
21
- LabelMedium: true;
22
- LabelSmall: true;
23
- BodyLarge: true;
24
- BodyMedium: true;
25
- BodySmall: true;
26
- Caption: true;
27
- }
28
- interface TypographyPropsColorOverrides {
29
- additional: true;
30
- supportive: true;
31
- undefined: true;
32
- }
33
- }
34
- export declare const getTypography: (theme: Theme) => M3Typography;
27
+ export declare const getTypography: (_theme: Theme) => M3Typography;
35
28
  declare const _default: {};
36
29
  export default _default;
@@ -1,168 +1,12 @@
1
- export const getTypography = (theme) => {
2
- const { palette } = theme;
1
+ import { TypographyVariantsNames, } from '../../../tokens/typography/typescale';
2
+ import { typographyVariants } from '../../../tokens/typography/typography';
3
+ export const getTypography = (_theme) => {
3
4
  return {
4
5
  MuiTypography: {
5
- styleOverrides: {
6
- root: {
7
- fontWeight: 400,
8
- },
9
- },
10
- variants: [
11
- {
12
- props: { color: 'supportive' },
13
- style: {
14
- color: palette.supportive.main,
15
- },
16
- },
17
- {
18
- props: { color: 'undefined' },
19
- style: {
20
- color: palette.undefined.main,
21
- },
22
- },
23
- {
24
- props: { color: 'additional' },
25
- style: {
26
- color: '#78909C',
27
- },
28
- },
29
- {
30
- props: { color: 'error' },
31
- style: {
32
- color: palette.error.main,
33
- },
34
- },
35
- {
36
- props: { variant: 'DisplayLarge' },
37
- style: {
38
- fontSize: '3.563rem',
39
- lineHeight: '4rem',
40
- },
41
- },
42
- {
43
- props: { variant: 'DisplayMedium' },
44
- style: {
45
- fontSize: '2.8125rem',
46
- lineHeight: '3.25rem',
47
- },
48
- },
49
- {
50
- props: { variant: 'DisplaySmall' },
51
- style: {
52
- fontSize: '2.25rem',
53
- lineHeight: '2.75rem',
54
- },
55
- },
56
- {
57
- props: { variant: 'HeadlineLarge' },
58
- style: {
59
- fontSize: '2rem',
60
- lineHeight: '2.5rem',
61
- },
62
- },
63
- {
64
- props: { variant: 'HeadlineMedium' },
65
- style: {
66
- fontSize: '1.75rem',
67
- lineHeight: '2.25rem',
68
- },
69
- },
70
- {
71
- props: { variant: 'HeadlineSmall' },
72
- style: {
73
- fontSize: '1.5rem',
74
- lineHeight: '2rem',
75
- },
76
- },
77
- {
78
- props: { variant: 'TitleLarge' },
79
- style: {
80
- fontSize: '1.375rem',
81
- lineHeight: '1.75rem',
82
- },
83
- },
84
- {
85
- props: { variant: 'TitleMedium' },
86
- style: {
87
- fontSize: '1rem',
88
- fontWeight: 500,
89
- lineHeight: '1.5rem',
90
- letterSpacing: '0.009rem',
91
- },
92
- },
93
- {
94
- props: { variant: 'TitleSmall' },
95
- style: {
96
- fontSize: '0.875rem',
97
- fontWeight: 500,
98
- lineHeight: '1.25rem',
99
- letterSpacing: '0.006rem',
100
- },
101
- },
102
- {
103
- props: { variant: 'LabelLarge' },
104
- style: {
105
- fontSize: '0.875rem',
106
- fontWeight: 500,
107
- lineHeight: '1.25rem',
108
- letterSpacing: '0.006rem',
109
- },
110
- },
111
- {
112
- props: { variant: 'LabelMedium' },
113
- style: {
114
- fontSize: '0.75rem',
115
- fontWeight: 500,
116
- lineHeight: '1rem',
117
- letterSpacing: '0.031rem',
118
- },
119
- },
120
- {
121
- props: { variant: 'LabelSmall' },
122
- style: {
123
- fontSize: '0.688rem',
124
- fontWeight: 500,
125
- lineHeight: '1rem',
126
- letterSpacing: '0.031rem',
127
- },
128
- },
129
- {
130
- props: { variant: 'BodyLarge' },
131
- style: {
132
- fontSize: '1rem',
133
- fontWeight: 400,
134
- lineHeight: '1.5rem',
135
- letterSpacing: '0.031rem',
136
- },
137
- },
138
- {
139
- props: { variant: 'BodyMedium' },
140
- style: {
141
- fontSize: '0.875rem',
142
- fontWeight: 400,
143
- lineHeight: '1.25rem',
144
- letterSpacing: '0.016rem',
145
- },
146
- },
147
- {
148
- props: { variant: 'BodySmall' },
149
- style: {
150
- fontSize: '0.75rem',
151
- fontWeight: 400,
152
- lineHeight: '1rem',
153
- letterSpacing: '0.025rem',
154
- },
155
- },
156
- {
157
- props: { variant: 'Caption' },
158
- style: {
159
- fontSize: '0.75rem',
160
- lineHeight: '1rem',
161
- fontWeight: 400,
162
- letterSpacing: '0.025rem',
163
- },
164
- },
165
- ],
6
+ variants: TypographyVariantsNames.map((variantName) => ({
7
+ props: { variant: variantName },
8
+ style: Object.assign({}, typographyVariants[variantName]),
9
+ })),
166
10
  },
167
11
  };
168
12
  };
@@ -1,4 +1,16 @@
1
1
  import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
2
+ import { ComponentWithViewContextOwnProps } from '../../../shared/viewContext';
3
+ declare module '@mui/material/Alert' {
4
+ interface AlertPropsColorOverrides {
5
+ error: true;
6
+ warning: true;
7
+ info: true;
8
+ success: true;
9
+ primary: true;
10
+ }
11
+ interface AlertsOwnProps extends ComponentWithViewContextOwnProps {
12
+ }
13
+ }
2
14
  interface M3Alert {
3
15
  MuiAlert: {
4
16
  defaultProps?: ComponentsProps['MuiAlert'];
@@ -1,59 +1,75 @@
1
1
  export const getAlert = (theme) => {
2
- const { palette } = theme;
2
+ const { colors } = theme;
3
3
  return {
4
4
  MuiAlert: {
5
- defaultProps: {
6
- variant: 'standard',
7
- },
5
+ // Example of how custom iconMapping can be used, though need to pass severity instead of/along with color for it to work
6
+ // defaultProps: {
7
+ // iconMapping: {
8
+ // error: <XCircleIcon />,
9
+ // },
10
+ // },
8
11
  styleOverrides: {
9
12
  root: {
10
- borderRadius: '20px',
11
- },
12
- standardError: {
13
- background: palette.errorContainer.main,
14
- color: palette.onErrorContainer.main,
15
- },
16
- standardInfo: {
17
- background: palette.infoContainer.main,
18
- color: palette.infoContainer.contrastText,
19
- },
20
- standardWarning: {
21
- background: palette.warningContainer.main,
22
- color: palette.onWarningContainer.main,
23
- },
24
- standardSuccess: {
25
- background: palette.successContainer.main,
26
- color: palette.onSuccessContainer.main,
13
+ borderRadius: '6px',
14
+ padding: '8px',
15
+ '& svg': {
16
+ width: '20px',
17
+ height: '20px',
18
+ },
19
+ '.MuiAlert-action': {
20
+ marginTop: '-6px',
21
+ },
27
22
  },
28
- filledError: {
29
- background: palette.error.main,
30
- color: palette.onError.main,
31
- },
32
- filledInfo: {
33
- background: palette.info.main,
34
- color: palette.onInfo.main,
35
- },
36
- filledWarning: {
37
- background: palette.warning.main,
38
- color: palette.onWarning.main,
39
- },
40
- filledSuccess: {
41
- background: palette.success.main,
42
- color: palette.onSuccess.main,
23
+ },
24
+ variants: [
25
+ {
26
+ props: { variant: 'standard', color: 'error' },
27
+ style: {
28
+ color: colors.schemes.status.onErrorContainer,
29
+ backgroundColor: colors.schemes.status.errorContainer,
30
+ },
43
31
  },
44
- outlinedError: {
45
- color: palette.error.main,
32
+ {
33
+ props: { variant: 'standard', color: 'warning' },
34
+ style: {
35
+ backgroundColor: colors.schemes.status.warningContainer,
36
+ color: colors.schemes.status.onWarningContainer,
37
+ '& svg': {
38
+ color: colors.schemes.status.onWarningContainer,
39
+ },
40
+ },
46
41
  },
47
- outlinedInfo: {
48
- color: palette.info.main,
42
+ {
43
+ props: { variant: 'standard', color: 'info' },
44
+ style: {
45
+ backgroundColor: colors.schemes.status.infoContainer,
46
+ color: colors.schemes.status.onInfoContainer,
47
+ '& svg': {
48
+ color: colors.schemes.status.onInfoContainer,
49
+ },
50
+ },
49
51
  },
50
- outlinedWarning: {
51
- color: palette.warning.main,
52
+ {
53
+ props: { variant: 'standard', color: 'success' },
54
+ style: {
55
+ backgroundColor: colors.schemes.status.successContainer,
56
+ color: colors.schemes.status.onSuccessContainer,
57
+ '& svg': {
58
+ color: colors.schemes.status.onSuccessContainer,
59
+ },
60
+ },
52
61
  },
53
- outlinedSuccess: {
54
- color: palette.success.main,
62
+ {
63
+ props: { variant: 'standard', color: 'primary' },
64
+ style: {
65
+ backgroundColor: colors.schemes.base.primaryContainer,
66
+ color: colors.schemes.base.onPrimaryContainer,
67
+ '& svg': {
68
+ color: colors.schemes.base.onPrimaryContainer,
69
+ },
70
+ },
55
71
  },
56
- },
72
+ ],
57
73
  },
58
74
  };
59
75
  };
@@ -1,4 +1,9 @@
1
1
  import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
2
+ import { ComponentWithViewContextOwnProps } from '../../../shared/viewContext';
3
+ declare module '@mui/material/CircularProgress' {
4
+ interface CircularProgressProps extends ComponentWithViewContextOwnProps {
5
+ }
6
+ }
2
7
  interface M3CircularProgress {
3
8
  MuiCircularProgress: {
4
9
  defaultProps?: ComponentsProps['MuiCircularProgress'];
@@ -6,5 +11,5 @@ interface M3CircularProgress {
6
11
  variants?: ComponentsVariants['MuiCircularProgress'];
7
12
  };
8
13
  }
9
- export declare const getCircularProgress: (_theme: Theme) => M3CircularProgress;
14
+ export declare const getCircularProgress: (theme: Theme) => M3CircularProgress;
10
15
  export {};
@@ -1,11 +1,52 @@
1
- export const getCircularProgress = (_theme) => ({
2
- MuiCircularProgress: {
3
- styleOverrides: {
4
- root: {
5
- '& .MuiCircularProgress-circle': {
6
- strokeLinecap: 'round',
1
+ export const getCircularProgress = (theme) => {
2
+ const getCircularProgressColors = (color, viewContext) => {
3
+ const isInverseView = viewContext === 'inverse';
4
+ const { colors } = theme;
5
+ const schemesPath = isInverseView ? 'inverseSchemes' : 'schemes';
6
+ const palette = colors[schemesPath];
7
+ const colorMap = {
8
+ primary: palette.base.primary,
9
+ secondary: palette.base.secondary,
10
+ error: palette.status.error,
11
+ info: palette.status.info,
12
+ success: palette.status.success,
13
+ warning: palette.status.warning,
14
+ inherit: 'inherit',
15
+ };
16
+ return [
17
+ {
18
+ props: { color, viewContext },
19
+ style: {
20
+ color: colorMap[color],
7
21
  },
8
22
  },
23
+ ];
24
+ };
25
+ return {
26
+ MuiCircularProgress: {
27
+ styleOverrides: {
28
+ root: {
29
+ '& .MuiCircularProgress-circle': {
30
+ strokeLinecap: 'round',
31
+ },
32
+ },
33
+ },
34
+ variants: [
35
+ ...getCircularProgressColors('primary'),
36
+ ...getCircularProgressColors('secondary'),
37
+ ...getCircularProgressColors('error'),
38
+ ...getCircularProgressColors('info'),
39
+ ...getCircularProgressColors('success'),
40
+ ...getCircularProgressColors('warning'),
41
+ ...getCircularProgressColors('inherit'),
42
+ ...getCircularProgressColors('primary', 'inverse'),
43
+ ...getCircularProgressColors('secondary', 'inverse'),
44
+ ...getCircularProgressColors('error', 'inverse'),
45
+ ...getCircularProgressColors('info', 'inverse'),
46
+ ...getCircularProgressColors('success', 'inverse'),
47
+ ...getCircularProgressColors('warning', 'inverse'),
48
+ ...getCircularProgressColors('inherit', 'inverse'),
49
+ ],
9
50
  },
10
- },
11
- });
51
+ };
52
+ };
@@ -1,4 +1,9 @@
1
1
  import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
2
+ declare module '@mui/material/DialogActions' {
3
+ interface DialogActionsProps {
4
+ alignment?: 'left' | 'right';
5
+ }
6
+ }
2
7
  interface M3Dialog {
3
8
  MuiDialog: {
4
9
  defaultProps?: ComponentsProps['MuiDialog'];
@@ -1,7 +1,12 @@
1
1
  // Copyright 2025 WebPros International GmbH. All rights reserved.
2
- import { modalClasses, dialogContentClasses, dialogClasses, } from '@mui/material';
2
+ import { modalClasses, dialogContentClasses, dialogClasses, iconButtonClasses, } from '@mui/material';
3
3
  export const getDialog = (theme) => {
4
- const { spacing, palette } = theme;
4
+ const { spacing, palette, colors } = theme;
5
+ const closeButtonPosition = {
6
+ position: 'absolute',
7
+ right: spacing(3),
8
+ top: 25,
9
+ };
5
10
  return {
6
11
  MuiDialogTitle: {
7
12
  defaultProps: {
@@ -9,21 +14,29 @@ export const getDialog = (theme) => {
9
14
  },
10
15
  styleOverrides: {
11
16
  root: {
12
- padding: `${spacing(2)} ${spacing(3)} ${spacing(1.5)}`,
13
- // By default, MUI removes top padding from DialogContent when it follows DialogTitle,
14
- // which can cause content to appear 'behind' the title. We're changing default padding to
15
- // create proper spacing between title and content without adjusting design of all dialogs
16
- // important set because with value 1 it does not work
17
+ padding: spacing(3.75, 8.25, 2.375, 4.5),
18
+ color: palette.onSurface.main,
17
19
  [`& + .${dialogContentClasses.root}`]: {
18
- paddingTop: `${spacing(1)} !important`,
20
+ paddingTop: '0 !important',
19
21
  },
22
+ [`& .${iconButtonClasses.root}`]: closeButtonPosition,
20
23
  },
21
24
  },
22
25
  },
23
26
  MuiDialog: {
27
+ defaultProps: {
28
+ PaperProps: {
29
+ elevation: 3,
30
+ },
31
+ },
24
32
  styleOverrides: {
25
33
  paper: {
26
- borderRadius: spacing(3.5),
34
+ borderRadius: 10,
35
+ backgroundColor: colors.schemes.surfaces.elevatedContainer,
36
+ [`& > .${iconButtonClasses.root}`]: closeButtonPosition,
37
+ [`& > .${iconButtonClasses.root} + .${dialogContentClasses.root}`]: {
38
+ paddingTop: spacing(5.125),
39
+ },
27
40
  [`&.${dialogClasses.paperFullScreen}`]: {
28
41
  borderRadius: 0,
29
42
  maxWidth: 'none',
@@ -34,9 +47,8 @@ export const getDialog = (theme) => {
34
47
  height: 'auto',
35
48
  [`&.${modalClasses.root}.${dialogClasses.root} .${dialogClasses.paper}`]: {
36
49
  height: 'auto',
37
- minHeight: '200px',
50
+ minHeight: spacing(25),
38
51
  },
39
- borderRadius: spacing(1),
40
52
  },
41
53
  },
42
54
  },
@@ -44,17 +56,34 @@ export const getDialog = (theme) => {
44
56
  styleOverrides: {
45
57
  root: {
46
58
  color: palette.onSurfaceVariant.main,
47
- padding: `0 ${spacing(3)} ${spacing(3)}`,
59
+ padding: spacing(0, 4.5, 1, 4.5),
60
+ },
61
+ dividers: {
62
+ padding: spacing(2, 4.5),
63
+ borderColor: colors.schemes.surfaces.outlineVariant,
48
64
  },
49
65
  },
50
66
  },
51
67
  MuiDialogActions: {
52
68
  styleOverrides: {
53
69
  root: {
54
- padding: `${spacing(1)} ${spacing(3)} ${spacing(3)}`,
55
- justifyContent: 'flex-start',
70
+ padding: spacing(2, 4.25, 2.5, 2.375),
71
+ justifyContent: 'flex-end',
72
+ gap: spacing(0.5),
73
+ '& > :not(style) ~ :not(style)': {
74
+ marginLeft: 0,
75
+ },
56
76
  },
57
77
  },
78
+ variants: [
79
+ {
80
+ props: { alignment: 'left' },
81
+ style: {
82
+ justifyContent: 'flex-start',
83
+ padding: spacing(2, 2.375, 2.5, 4.25),
84
+ },
85
+ },
86
+ ],
58
87
  },
59
88
  MuiDialogContentText: {
60
89
  styleOverrides: {
@@ -1,4 +1,9 @@
1
1
  import { Theme, ComponentsProps, ComponentsOverrides, ComponentsVariants } from '@mui/material';
2
+ import { ComponentWithViewContextOwnProps } from '../../../shared/viewContext';
3
+ declare module '@mui/material/LinearProgress' {
4
+ interface LinearProgressProps extends ComponentWithViewContextOwnProps {
5
+ }
6
+ }
2
7
  interface M3LinearProgress {
3
8
  MuiLinearProgress: {
4
9
  defaultProps?: ComponentsProps['MuiLinearProgress'];
@@ -6,5 +11,5 @@ interface M3LinearProgress {
6
11
  variants?: ComponentsVariants['MuiLinearProgress'];
7
12
  };
8
13
  }
9
- export declare const getLinearProgress: (_theme: Theme) => M3LinearProgress;
14
+ export declare const getLinearProgress: (theme: Theme) => M3LinearProgress;
10
15
  export {};