@linagora/twake-mui 9.15.0 → 9.16.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,16 @@
1
+ # @linagora/twake-mui [9.16.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@9.15.0...@linagora/twake-mui@9.16.0) (2026-10-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **twake-mui:** Clean old Accordion override ([def3b03](https://github.com/linagora/twake-ui/commit/def3b03479b193a3246e716ae4adc89c4d85cbd2))
7
+ * **twake-mui:** Use theme shadow for Accordion ([97cb9b7](https://github.com/linagora/twake-ui/commit/97cb9b7ce81a61963cf9b3e5aaac615b3da4ae63))
8
+
9
+
10
+ ### Features
11
+
12
+ * **twake-mui:** Migrate Accordion from cozy-ui ([4033f8d](https://github.com/linagora/twake-ui/commit/4033f8dc03f550eed64263a77f9953e63f2572ec))
13
+
1
14
  # @linagora/twake-mui [9.15.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@9.14.1...@linagora/twake-mui@9.15.0) (2026-09-30)
2
15
 
3
16
 
@@ -1,4 +1,5 @@
1
1
  import { Bottom, CheckCircle, CheckSquare, Icon, Info, RadioChecked, RadioUnchecked, Spinner, Warning, WarningCircle } from '@linagora/twake-icons';
2
+ import { accordionSummaryClasses } from '@mui/material/AccordionSummary';
2
3
  import { alertClasses } from '@mui/material/Alert';
3
4
  import { buttonClasses } from '@mui/material/Button';
4
5
  import { checkboxClasses } from '@mui/material/Checkbox';
@@ -924,53 +925,53 @@ export const overrides = {
924
925
  },
925
926
  MuiAccordion: {
926
927
  styleOverrides: {
927
- root: {
928
- '&::before': {
929
- display: 'none'
930
- }
931
- }
928
+ root: ({ theme }) => ({
929
+ boxShadow: theme.vars.shadows[1],
930
+ border: `1px solid ${theme.vars.palette.border.main}`,
931
+ overflow: 'hidden',
932
+ marginBottom: 16,
933
+ '&::before': { display: 'none' }
934
+ }),
935
+ rounded: ({ theme }) => ({ borderRadius: theme.shape.borderRadius })
932
936
  }
933
937
  },
934
938
  MuiAccordionSummary: {
935
939
  defaultProps: { expandIcon: React.createElement(AccordionExpandIcon, null) },
936
940
  styleOverrides: {
937
941
  root: ({ theme }) => ({
938
- backgroundColor: theme.palette.grey[100],
942
+ backgroundColor: theme.vars.palette.background.default,
939
943
  textTransform: 'uppercase',
940
944
  fontWeight: 'bold',
941
- fontSize: '0.875rem',
942
- minHeight: '3.5rem',
945
+ fontSize: theme.typography.pxToRem(14),
946
+ minHeight: 56,
943
947
  padding: 0,
944
- color: theme.palette.text.primary,
945
- '&.Mui-expanded': {
946
- minHeight: '3.5rem'
947
- }
948
+ [`&.${accordionSummaryClasses.expanded}`]: { minHeight: 56 }
948
949
  }),
949
- expandIconWrapper: {
950
- order: 0,
951
- '&&': {
952
- marginLeft: '0.3125rem'
953
- },
950
+ expandIconWrapper: ({ theme }) => ({
951
+ color: theme.vars.palette.text.secondary,
952
+ padding: 12,
953
+ marginLeft: 5,
954
+ marginRight: -12,
954
955
  transform: 'rotate(-90deg)',
955
- '&.Mui-expanded': {
956
- marginLeft: '0.3125rem',
957
- transform: 'rotate(0deg)'
958
- }
959
- },
956
+ [`&.${accordionSummaryClasses.expanded}`]: { transform: 'rotate(0deg)' }
957
+ }),
960
958
  content: {
961
- margin: '0.75rem 0',
962
- paddingLeft: '0.5rem',
963
- paddingRight: '0.25rem',
959
+ paddingLeft: 8,
960
+ paddingRight: 4,
964
961
  order: 1,
965
- '& > :last-child': {
966
- paddingRight: 0
967
- },
968
- '&.Mui-expanded': {
969
- margin: '0.75rem 0'
970
- }
962
+ '& > :last-child': { paddingRight: 0 },
963
+ [`&.${accordionSummaryClasses.expanded}`]: { margin: '12px 0' }
971
964
  }
972
965
  }
973
966
  },
967
+ MuiAccordionDetails: {
968
+ styleOverrides: {
969
+ root: ({ theme }) => ({
970
+ padding: 0,
971
+ borderTop: `1px solid ${theme.vars.palette.border.main}`
972
+ })
973
+ }
974
+ },
974
975
  MuiFab: {
975
976
  defaultProps: { size: 'medium' },
976
977
  styleOverrides: {
@@ -3,5 +3,5 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
3
3
  declare const meta: Meta<typeof Accordion>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Accordion>;
6
- export declare const Docs: Story;
6
+ export declare const Default: Story;
7
7
  export declare const Screenshot: Story;
@@ -4,26 +4,42 @@ const meta = {
4
4
  title: 'Accordion',
5
5
  component: Accordion,
6
6
  parameters: { layout: 'centered' },
7
- tags: ['autodocs']
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ defaultExpanded: { control: 'boolean' },
10
+ disabled: { control: 'boolean' },
11
+ disableGutters: { control: 'boolean' },
12
+ square: { control: 'boolean' }
13
+ }
8
14
  };
9
15
  export default meta;
10
- const AccordionGroup = () => (React.createElement(Stack, { spacing: 2, sx: { width: 400 } },
11
- React.createElement(Accordion, null,
12
- React.createElement(AccordionSummary, null, "Click to expand/collapse the first item"),
13
- React.createElement(AccordionDetails, null,
14
- React.createElement(Typography, null, "Lorem ipsum dolor sit amet consectetur"))),
15
- React.createElement(Accordion, null,
16
- React.createElement(AccordionSummary, null, "Click to expand/collapse the second item"),
17
- React.createElement(AccordionDetails, null,
18
- React.createElement(Typography, null, "Lorem ipsum dolor sit amet consectetur"))),
19
- React.createElement(Accordion, null,
20
- React.createElement(AccordionSummary, null, "Click to expand/collapse the third item"),
21
- React.createElement(AccordionDetails, null,
22
- React.createElement(Typography, null, "Lorem ipsum dolor sit amet consectetur")))));
23
- export const Docs = {
24
- render: () => React.createElement(AccordionGroup, null)
16
+ const Item = ({ label, ...props }) => (React.createElement(Accordion, { ...props },
17
+ React.createElement(AccordionSummary, null,
18
+ "Click to expand/collapse the ",
19
+ label,
20
+ " item"),
21
+ React.createElement(AccordionDetails, null,
22
+ React.createElement(Typography, { sx: { m: 2 } }, "Lorem ipsum dolor sit amet consectetur"))));
23
+ export const Default = {
24
+ render: args => (React.createElement("div", { style: { width: 400, maxWidth: '100%' } },
25
+ React.createElement(Item, { ...args, label: "first" }),
26
+ React.createElement(Item, { ...args, label: "second" }),
27
+ React.createElement(Item, { ...args, label: "third" })))
25
28
  };
29
+ const Section = ({ title, children }) => (React.createElement("section", null,
30
+ React.createElement("h3", { style: { marginBottom: '12px' } }, title),
31
+ children));
32
+ // Visual Regression - Combined view for Argos testing
26
33
  export const Screenshot = {
27
34
  tags: ['argos'],
28
- render: () => React.createElement(AccordionGroup, null)
35
+ render: () => (React.createElement(Stack, { spacing: 4, sx: { width: 400, maxWidth: '100%' } },
36
+ React.createElement(Section, { title: "Default" },
37
+ React.createElement(Item, { label: "first" }),
38
+ React.createElement(Item, { label: "second" }),
39
+ React.createElement(Item, { label: "third" })),
40
+ React.createElement(Section, { title: "Expanded" },
41
+ React.createElement(Item, { label: "first", defaultExpanded: true }),
42
+ React.createElement(Item, { label: "second" })),
43
+ React.createElement(Section, { title: "Disabled" },
44
+ React.createElement(Item, { label: "first", disabled: true }))))
29
45
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linagora/twake-mui",
3
3
  "type": "module",
4
- "version": "9.15.0",
4
+ "version": "9.16.0",
5
5
  "description": "MUI v9 theme system for Twake applications",
6
6
  "author": "Twake",
7
7
  "license": "MIT",