@linagora/twake-mui 1.6.1 → 3.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,35 @@
1
+ # @linagora/twake-mui [3.0.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@2.0.0...@linagora/twake-mui@3.0.0) (2026-07-27)
2
+
3
+
4
+ ### Features
5
+
6
+ * **twake-mui:** Export mui/lab components and upgrade mui ([9b1d516](https://github.com/linagora/twake-ui/commit/9b1d5162464daa8bfbb8da74c001c0ade3bf0cf4))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * **twake-mui:** You must have `"@mui/material": "^9.2.0"` and "@mui/lab": "^9.0.0-beta.6"
12
+
13
+ # [2.0.0](https://github.com/linagora/twake-ui/compare/v1.6.1...v2.0.0) (2026-06-10)
14
+
15
+
16
+ * 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))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **CI:** use NPM_TOKEN_IN_VAULT for publishing ([967b795](https://github.com/linagora/twake-ui/commit/967b7956d3e13d3ba744ea674606646ccf7e85e3))
22
+
23
+
24
+ ### Features
25
+
26
+ * makePalette now has palette as an argument and is exported into the lib ([5a9850f](https://github.com/linagora/twake-ui/commit/5a9850f21dd9befec6a20d652ee306478c943a20))
27
+
28
+
29
+ ### BREAKING CHANGES
30
+
31
+ * updated to mui v9
32
+
1
33
  ## [1.6.1](https://github.com/linagora/twake-ui/compare/v1.6.0...v1.6.1) (2026-05-06)
2
34
 
3
35
 
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
@@ -1,7 +1,9 @@
1
1
  export * from '@mui/material';
2
+ export * from '@mui/lab';
2
3
  export { createTheme, ThemeProvider, styled, alpha, darken, lighten, useTheme } from '@mui/material/styles';
3
4
  export { default as Autocomplete } from '@mui/material/Autocomplete';
4
5
  export { TwakeMuiThemeProvider } from './components/ThemeProvider';
6
+ export { makePalette } from './lib/makePalette';
5
7
  export { theme } from './lib/theme';
6
8
  export type { TwakeTheme } from './lib/theme';
7
9
  export { radius } from './lib/radius';
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  export * from '@mui/material';
2
+ export * from '@mui/lab';
2
3
  export { createTheme, ThemeProvider, styled, alpha, darken, lighten, useTheme } from '@mui/material/styles';
3
4
  export { default as Autocomplete } from '@mui/material/Autocomplete';
4
5
  export { TwakeMuiThemeProvider } from './components/ThemeProvider';
6
+ export { makePalette } from './lib/makePalette';
5
7
  export { theme } from './lib/theme';
6
8
  export { radius } from './lib/radius';
7
9
  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"]>;
@@ -240,11 +240,11 @@ export const makeLightOverrides = (theme) => {
240
240
  MuiDialogTitle: {
241
241
  styleOverrides: {
242
242
  root: {
243
+ ...theme.typography.h3,
243
244
  padding: '12px 32px',
244
- fontSize: 17,
245
- fontWeight: 400,
246
- lineHeight: 1.273,
247
- letterSpacing: '0'
245
+ [theme.breakpoints.down('sm')]: {
246
+ ...theme.typography.h4
247
+ }
248
248
  }
249
249
  }
250
250
  },
@@ -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": "3.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,8 @@
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/lab": "^9.0.0-beta.6",
54
+ "@mui/material": "^9.2.0",
54
55
  "react": "^18",
55
56
  "react-dom": "^18"
56
57
  },
@@ -59,8 +60,9 @@
59
60
  "@argos-ci/storybook": "5.3.2",
60
61
  "@emotion/react": "^11.5.0",
61
62
  "@emotion/styled": "^11.3.0",
62
- "@mui/icons-material": "7.3.10",
63
- "@mui/material": "^7.1.2",
63
+ "@mui/icons-material": "^9.2.0",
64
+ "@mui/lab": "^9.0.0-beta.6",
65
+ "@mui/material": "^9.2.0",
64
66
  "@storybook/addon-docs": "10.3.5",
65
67
  "@storybook/addon-vitest": "10.3.5",
66
68
  "@storybook/builder-vite": "10.3.5",
@@ -73,7 +75,7 @@
73
75
  "eslint-config-cozy-app": "7.0.0",
74
76
  "eslint-plugin-storybook": "10.3.5",
75
77
  "lodash": "4.18.1",
76
- "playwright": "1.59.1",
78
+ "playwright": "1.60.0",
77
79
  "react": "^18.2.0",
78
80
  "react-dom": "^18.2.0",
79
81
  "storybook": "10.3.5",