@linagora/twake-mui 1.6.1 → 2.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # [2.0.0](https://github.com/linagora/twake-ui/compare/v1.6.1...v2.0.0) (2026-06-10)
2
+
3
+
4
+ * Merge pull request [#23](https://github.com/linagora/twake-ui/issues/23) from linagora/migrate-to-mui-v9 ([a0103e7](https://github.com/linagora/twake-ui/commit/a0103e76cc988ceb49611beaa72cd3df09425673))
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * **CI:** use NPM_TOKEN_IN_VAULT for publishing ([967b795](https://github.com/linagora/twake-ui/commit/967b7956d3e13d3ba744ea674606646ccf7e85e3))
10
+
11
+
12
+ ### Features
13
+
14
+ * makePalette now has palette as an argument and is exported into the lib ([5a9850f](https://github.com/linagora/twake-ui/commit/5a9850f21dd9befec6a20d652ee306478c943a20))
15
+
16
+
17
+ ### BREAKING CHANGES
18
+
19
+ * updated to mui v9
20
+
1
21
  ## [1.6.1](https://github.com/linagora/twake-ui/compare/v1.6.0...v1.6.1) (2026-05-06)
2
22
 
3
23
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # twake-mui
2
2
 
3
- MUI v7 theme system for Twake Calendar and other Twake applications.
3
+ MUI v9 theme system for Twake Calendar and other Twake applications.
4
4
 
5
5
  ## Requirements
6
6
 
@@ -58,7 +58,7 @@ function MyComponent() {
58
58
 
59
59
  - **Palette System**: Techno-independent color definitions
60
60
  - **Component Overrides**: Pre-styled Button, TextField, Dialog components
61
- - **MUI v7 Compatible**: Built for Material-UI v7
61
+ - **MUI v9 Compatible**: Built for Material-UI v9
62
62
 
63
63
  ## Development
64
64
 
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from '@mui/material';
2
2
  export { createTheme, ThemeProvider, styled, alpha, darken, lighten, useTheme } from '@mui/material/styles';
3
3
  export { default as Autocomplete } from '@mui/material/Autocomplete';
4
4
  export { TwakeMuiThemeProvider } from './components/ThemeProvider';
5
+ export { makePalette } from './lib/makePalette';
5
6
  export { theme } from './lib/theme';
6
7
  export type { TwakeTheme } from './lib/theme';
7
8
  export { radius } from './lib/radius';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export * from '@mui/material';
2
2
  export { createTheme, ThemeProvider, styled, alpha, darken, lighten, useTheme } from '@mui/material/styles';
3
3
  export { default as Autocomplete } from '@mui/material/Autocomplete';
4
4
  export { TwakeMuiThemeProvider } from './components/ThemeProvider';
5
+ export { makePalette } from './lib/makePalette';
5
6
  export { theme } from './lib/theme';
6
7
  export { radius } from './lib/radius';
7
8
  export { Avatar, default as AvatarDefault } from './components/Avatar';
@@ -1,2 +1,2 @@
1
- import { Theme, Components } from '@mui/material/styles';
2
- export declare const makeDarkOverrides: (theme: Theme) => Components;
1
+ import { Theme, ThemeOptions } from '@mui/material/styles';
2
+ export declare const makeDarkOverrides: (theme: Theme) => NonNullable<ThemeOptions["components"]>;
@@ -1,2 +1,2 @@
1
- import { Theme, Components } from '@mui/material/styles';
2
- export declare const makeLightOverrides: (theme: Theme) => Components;
1
+ import { Theme, ThemeOptions } from '@mui/material/styles';
2
+ export declare const makeLightOverrides: (theme: Theme) => NonNullable<ThemeOptions["components"]>;
@@ -481,146 +481,6 @@ export const makeLightOverrides = (theme) => {
481
481
  },
482
482
  MuiCssBaseline: {
483
483
  styleOverrides: {
484
- '.MuiDateCalendar-root.MuiDateCalendar-root': {
485
- width: '230px',
486
- maxWidth: '230px',
487
- height: '300px',
488
- maxHeight: '300px'
489
- },
490
- '.MuiDateCalendar-root .MuiDayCalendar-slideTransition': {
491
- minHeight: '208px'
492
- },
493
- '.MuiDateCalendar-root .MuiPickersCalendarHeader-root': {
494
- padding: '6px 4px',
495
- maxHeight: '32px',
496
- minHeight: '32px'
497
- },
498
- '.MuiDateCalendar-root .MuiPickersCalendarHeader-label': {
499
- fontSize: '14px',
500
- fontStyle: 'normal',
501
- fontWeight: 600,
502
- lineHeight: '20px',
503
- color: alpha(theme.palette.grey[900], 0.9)
504
- },
505
- '.MuiDateCalendar-root .MuiPickersCalendarHeader-switchViewButton': {
506
- padding: '0',
507
- width: '32px',
508
- height: '32px',
509
- color: theme.palette.grey[900]
510
- },
511
- '.MuiDateCalendar-root .MuiPickersCalendarHeader-switchViewIcon': {
512
- fontSize: '15px'
513
- },
514
- '.MuiDateCalendar-root .MuiPickersArrowSwitcher-button': {
515
- padding: '0',
516
- width: '32px',
517
- height: '32px',
518
- color: alpha(theme.palette.grey[900], 0.48)
519
- },
520
- '.MuiDateCalendar-root .MuiDayCalendar-weekDayLabel': {
521
- fontSize: '10px',
522
- fontStyle: 'normal',
523
- fontWeight: 500,
524
- lineHeight: '16px',
525
- height: '32px',
526
- width: '32px',
527
- margin: '0',
528
- color: alpha(theme.palette.grey[900], 0.48)
529
- },
530
- '.MuiDateCalendar-root .MuiPickersDay-root': {
531
- fontSize: '10px',
532
- fontStyle: 'normal',
533
- fontWeight: 500,
534
- lineHeight: '16px',
535
- height: '32px',
536
- width: '32px',
537
- margin: '0',
538
- color: alpha(theme.palette.grey[900], 0.9)
539
- },
540
- '.MuiDateCalendar-root .MuiPickersDay-root.Mui-selected': {
541
- backgroundColor: theme.palette.primary.main,
542
- '&:hover': {
543
- backgroundColor: theme.palette.primary.dark
544
- }
545
- },
546
- '.MuiDateCalendar-root .MuiButtonBase-root.MuiPickersDay-root.Mui-selected': {
547
- backgroundColor: `${theme.palette.primary.main}`,
548
- '&:hover': {
549
- backgroundColor: `${theme.palette.primary.dark}`
550
- }
551
- },
552
- '.MuiDateCalendar-root .MuiMonthCalendar-root': {
553
- width: '215px'
554
- },
555
- '.MuiDateCalendar-root .MuiMonthCalendar-button': {
556
- fontSize: '14px',
557
- lineHeight: 1,
558
- height: '30px',
559
- width: '55px'
560
- },
561
- '.MuiDateCalendar-root .MuiMonthCalendar-button[tabindex="0"]': {
562
- background: 'transparent'
563
- },
564
- '.MuiDateCalendar-root .MuiMonthCalendar-button.Mui-selected': {
565
- color: theme.palette.primary.contrastText,
566
- background: theme.palette.primary.main,
567
- '&:hover': {
568
- background: theme.palette.primary.dark
569
- },
570
- '&:focus': {
571
- background: theme.palette.primary.dark
572
- }
573
- },
574
- '.MuiDateCalendar-root .MuiMonthCalendar-button.Mui-selected[tabindex="0"]': {
575
- color: theme.palette.primary.contrastText,
576
- background: theme.palette.primary.main,
577
- '&:hover': {
578
- background: theme.palette.primary.dark
579
- },
580
- '&:focus': {
581
- background: theme.palette.primary.dark
582
- }
583
- },
584
- '.MuiDateCalendar-root .MuiYearCalendar-root': {
585
- width: '245px',
586
- maxWidth: '245px'
587
- },
588
- '.MuiDateCalendar-root .MuiYearCalendar-button': {
589
- fontSize: '14px',
590
- lineHeight: 1,
591
- height: '30px',
592
- width: '55px'
593
- },
594
- '.MuiDateCalendar-root .MuiYearCalendar-button[tabindex="0"]': {
595
- background: 'transparent'
596
- },
597
- '.MuiDateCalendar-root .MuiYearCalendar-button.Mui-selected': {
598
- color: theme.palette.primary.contrastText,
599
- background: theme.palette.primary.main,
600
- '&:hover': {
601
- background: theme.palette.primary.dark
602
- },
603
- '&:focus': {
604
- background: theme.palette.primary.dark
605
- }
606
- },
607
- '.MuiDateCalendar-root .MuiYearCalendar-button.Mui-selected[tabindex="0"]': {
608
- color: theme.palette.primary.contrastText,
609
- background: theme.palette.primary.main,
610
- '&:hover': {
611
- background: theme.palette.primary.dark
612
- },
613
- '&:focus': {
614
- background: theme.palette.primary.dark
615
- }
616
- },
617
- '.MuiButtonBase-root.MuiMenuItem-root.MuiDigitalClock-item.Mui-selected': {
618
- backgroundColor: theme.palette.primary.main,
619
- color: theme.palette.primary.contrastText,
620
- '&:hover': {
621
- backgroundColor: theme.palette.primary.dark
622
- }
623
- },
624
484
  '.MuiAccordion-root .MuiListItem-root': {
625
485
  padding: '0',
626
486
  borderRadius: '4px',
@@ -1,2 +1,3 @@
1
1
  import { PaletteOptions } from '@mui/material/styles';
2
- export declare const makePalette: (mode?: "light" | "dark") => PaletteOptions;
2
+ import { PaletteJson } from './types';
3
+ export declare const makePalette: (mode?: "light" | "dark", palette?: PaletteJson) => PaletteOptions;
@@ -1,60 +1,60 @@
1
1
  import paletteJson from './palette.json';
2
2
  const paletteData = paletteJson;
3
- export const makePalette = (mode = 'light') => {
3
+ export const makePalette = (mode = 'light', palette = paletteData) => {
4
4
  return {
5
5
  mode,
6
6
  primary: {
7
- light: paletteData.Primary[300],
8
- main: paletteData.Primary[600],
9
- dark: paletteData.Primary[800],
10
- contrastText: paletteData.Primary.ContrastText
7
+ light: palette.Primary[300],
8
+ main: palette.Primary[600],
9
+ dark: palette.Primary[800],
10
+ contrastText: palette.Primary.ContrastText
11
11
  },
12
12
  secondary: {
13
- light: paletteData.Secondary[300],
14
- main: paletteData.Secondary[600],
15
- dark: paletteData.Secondary[800],
16
- contrastText: paletteData.Secondary.ContrastText
13
+ light: palette.Secondary[300],
14
+ main: palette.Secondary[600],
15
+ dark: palette.Secondary[800],
16
+ contrastText: palette.Secondary.ContrastText
17
17
  },
18
18
  error: {
19
- light: paletteData.Error[300],
20
- main: paletteData.Error[600],
21
- dark: paletteData.Error[800],
22
- contrastText: paletteData.Error.ContrastText
19
+ light: palette.Error[300],
20
+ main: palette.Error[600],
21
+ dark: palette.Error[800],
22
+ contrastText: palette.Error.ContrastText
23
23
  },
24
24
  warning: {
25
- light: paletteData.Warning[300],
26
- main: paletteData.Warning[500],
27
- dark: paletteData.Warning[700],
28
- contrastText: paletteData.Warning.ContrastText
25
+ light: palette.Warning[300],
26
+ main: palette.Warning[500],
27
+ dark: palette.Warning[700],
28
+ contrastText: palette.Warning.ContrastText
29
29
  },
30
30
  success: {
31
- light: paletteData.Success[300],
32
- main: paletteData.Success[600],
33
- dark: paletteData.Success[800],
34
- contrastText: paletteData.Success.ContrastText
31
+ light: palette.Success[300],
32
+ main: palette.Success[600],
33
+ dark: palette.Success[800],
34
+ contrastText: palette.Success.ContrastText
35
35
  },
36
36
  info: {
37
- light: paletteData.Info[300],
38
- main: paletteData.Info[600],
39
- dark: paletteData.Info[800],
37
+ light: palette.Info[300],
38
+ main: palette.Info[600],
39
+ dark: palette.Info[800],
40
40
  contrastText: '#fff'
41
41
  },
42
42
  grey: {
43
- 50: paletteData.Grey[50],
44
- 100: paletteData.Grey[100],
45
- 200: paletteData.Grey[200],
46
- 300: paletteData.Grey[300],
47
- 400: paletteData.Grey[400],
48
- 500: paletteData.Grey[500],
49
- 600: paletteData.Grey[600],
50
- 700: paletteData.Grey[700],
51
- 800: paletteData.Grey[800],
52
- 900: paletteData.Grey[900],
53
- A100: paletteData.Grey.A100,
54
- A200: paletteData.Grey.A200,
55
- A400: paletteData.Grey.A400,
56
- A700: paletteData.Grey.A700,
57
- A900: paletteData.Grey.A900
43
+ 50: palette.Grey[50],
44
+ 100: palette.Grey[100],
45
+ 200: palette.Grey[200],
46
+ 300: palette.Grey[300],
47
+ 400: palette.Grey[400],
48
+ 500: palette.Grey[500],
49
+ 600: palette.Grey[600],
50
+ 700: palette.Grey[700],
51
+ 800: palette.Grey[800],
52
+ 900: palette.Grey[900],
53
+ A100: palette.Grey.A100,
54
+ A200: palette.Grey.A200,
55
+ A400: palette.Grey.A400,
56
+ A700: palette.Grey.A700,
57
+ A900: palette.Grey.A900
58
58
  },
59
59
  text: {
60
60
  primary: '#000000',
@@ -67,7 +67,7 @@ export const makePalette = (mode = 'light') => {
67
67
  },
68
68
  divider: '#E1E3E6',
69
69
  action: {
70
- active: paletteData.Primary['A400'],
70
+ active: palette.Primary['A400'],
71
71
  hover: 'rgba(246, 126, 53, 0.04)',
72
72
  selected: 'rgba(246, 126, 53, 0.08)',
73
73
  disabled: 'rgba(0, 0, 0, 0.32)',
@@ -30,7 +30,7 @@ export const Screenshot = {
30
30
  React.createElement("section", null,
31
31
  React.createElement("h3", { style: { marginBottom: '12px' } }, "Dialog Components"),
32
32
  React.createElement(Stack, { spacing: 2 },
33
- React.createElement(Dialog, { open: true },
33
+ React.createElement(Dialog, { open: true, disableAutoFocus: true },
34
34
  React.createElement(DialogTitle, null, "Standard Dialog"),
35
35
  React.createElement(DialogContent, null,
36
36
  React.createElement(DialogContentText, null, "This demonstrates the standard dialog appearance with all its subcomponents styled according to the Twake theme.")),
@@ -45,6 +45,6 @@ export const Screenshot = {
45
45
  React.createElement(Typography, { color: "textPrimary" }, "Text primary color"),
46
46
  React.createElement(Typography, { color: "textSecondary" }, "Text secondary color"),
47
47
  React.createElement(Typography, { color: "textDisabled" }, "Text disabled color"),
48
- React.createElement(Typography, { color: "text.primary" }, "Text primary color"),
49
- React.createElement(Typography, { color: "text.secondary" }, "Text secondary color")))))
48
+ React.createElement(Typography, { sx: { color: 'text.primary' } }, "Text primary color"),
49
+ React.createElement(Typography, { sx: { color: 'text.secondary' } }, "Text secondary color")))))
50
50
  };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@linagora/twake-mui",
3
3
  "type": "module",
4
- "version": "1.6.1",
5
- "description": "MUI v7 theme system for Twake applications",
4
+ "version": "2.0.0",
5
+ "description": "MUI v9 theme system for Twake applications",
6
6
  "author": "Twake",
7
7
  "license": "MIT",
8
8
  "engines": {
@@ -50,7 +50,7 @@
50
50
  "peerDependencies": {
51
51
  "@emotion/react": "^11.5.0",
52
52
  "@emotion/styled": "^11.3.0",
53
- "@mui/material": "^7.1.2",
53
+ "@mui/material": "^9.0.1",
54
54
  "react": "^18",
55
55
  "react-dom": "^18"
56
56
  },
@@ -59,8 +59,8 @@
59
59
  "@argos-ci/storybook": "5.3.2",
60
60
  "@emotion/react": "^11.5.0",
61
61
  "@emotion/styled": "^11.3.0",
62
- "@mui/icons-material": "7.3.10",
63
- "@mui/material": "^7.1.2",
62
+ "@mui/icons-material": "^9.0.1",
63
+ "@mui/material": "^9.0.1",
64
64
  "@storybook/addon-docs": "10.3.5",
65
65
  "@storybook/addon-vitest": "10.3.5",
66
66
  "@storybook/builder-vite": "10.3.5",
@@ -73,7 +73,7 @@
73
73
  "eslint-config-cozy-app": "7.0.0",
74
74
  "eslint-plugin-storybook": "10.3.5",
75
75
  "lodash": "4.18.1",
76
- "playwright": "1.59.1",
76
+ "playwright": "1.60.0",
77
77
  "react": "^18.2.0",
78
78
  "react-dom": "^18.2.0",
79
79
  "storybook": "10.3.5",