@linagora/twake-mui 11.0.0 → 11.2.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,17 @@
1
+ # @linagora/twake-mui [11.2.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@11.1.0...@linagora/twake-mui@11.2.0) (2026-10-08)
2
+
3
+
4
+ ### Features
5
+
6
+ * **twake-mui:** Migrate Markdown from cozy-ui ([120d160](https://github.com/linagora/twake-ui/commit/120d1608e7c7ef4d1d624293b6c3d49d0e27a281))
7
+
8
+ # @linagora/twake-mui [11.1.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@11.0.0...@linagora/twake-mui@11.1.0) (2026-10-08)
9
+
10
+
11
+ ### Features
12
+
13
+ * **twake-mui:** Migrate Link from cozy-ui ([8056744](https://github.com/linagora/twake-ui/commit/805674475d17bdab80cb0d01ec760ad716185818))
14
+
1
15
  # @linagora/twake-mui [11.0.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@10.5.1...@linagora/twake-mui@11.0.0) (2026-10-08)
2
16
 
3
17
 
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import Markdown from './index';
3
+ declare const meta: Meta<typeof Markdown>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Screenshot: Story;
@@ -0,0 +1,78 @@
1
+ import Markdown from './index';
2
+ const content = `
3
+ # Demo
4
+
5
+ This is a text to test all possibilities of markdown.
6
+
7
+ ## Headers
8
+
9
+ # H1 Header
10
+ ## H2 Header
11
+ ### H3 Header
12
+ #### H4 Header
13
+ ##### H5 Header
14
+ ###### H6 Header
15
+
16
+ ## Paragraphs
17
+
18
+ I really like using Markdown.
19
+
20
+ I think I'll use it to format all of my documents from now on.
21
+
22
+ ## Emphasis
23
+
24
+ _Italic Text_
25
+
26
+ ***Bold Text***
27
+
28
+ __Bold and Italic Text__
29
+
30
+ ~~Strikethrough~~
31
+
32
+ <u>Underline</u>
33
+
34
+ ## Lists
35
+
36
+ 1. Ordered List Item 1
37
+ 2. Ordered List Item 2
38
+ 3. Ordered List Item 3
39
+
40
+ - Unordered List Item 1
41
+ - Unordered List Item 2
42
+ - Unordered List Item 3
43
+
44
+ ## Links
45
+
46
+ [Link to GitHub](https://github.com/linagora/twake-ui)
47
+
48
+ ## Images
49
+
50
+ ![Mountains](https://picsum.photos/id/1018/400/200 "Mountains")
51
+
52
+ ## Code
53
+
54
+ Inline code: \`const variable = 'value';\`
55
+
56
+ Block code:
57
+ \`\`\`javascript function add(a, b) { return a + b; }\`\`\`
58
+
59
+ ## Blockquotes
60
+
61
+ > This is a blockquote.
62
+ `;
63
+ const meta = {
64
+ title: 'Markdown',
65
+ component: Markdown,
66
+ tags: ['autodocs'],
67
+ argTypes: {
68
+ content: { control: 'text' }
69
+ }
70
+ };
71
+ export default meta;
72
+ export const Default = {
73
+ args: { content }
74
+ };
75
+ export const Screenshot = {
76
+ tags: ['argos'],
77
+ args: { content }
78
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface MarkdownProps {
3
+ content: string;
4
+ }
5
+ declare const Markdown: React.FC<MarkdownProps>;
6
+ export default Markdown;
@@ -0,0 +1,21 @@
1
+ import { Link, Typography } from '@mui/material';
2
+ import React from 'react';
3
+ import ReactMarkdown from 'react-markdown';
4
+ import remarkGfm from 'remark-gfm';
5
+ const makeHeading = (variant) => {
6
+ const Heading = ({ children }) => (React.createElement(Typography, { variant: variant, sx: { mb: 2 } }, children));
7
+ return Heading;
8
+ };
9
+ const components = {
10
+ a: ({ children, href }) => (React.createElement(Link, { href: href, rel: "noreferrer", target: "_blank" }, children)),
11
+ p: ({ children }) => (React.createElement(Typography, { variant: "body1", sx: { mb: 2 } }, children)),
12
+ h1: makeHeading('h1'),
13
+ h2: makeHeading('h2'),
14
+ h3: makeHeading('h3'),
15
+ h4: makeHeading('h4'),
16
+ h5: makeHeading('h5'),
17
+ h6: makeHeading('h6')
18
+ };
19
+ const remarkPlugins = [remarkGfm];
20
+ const Markdown = ({ content }) => (React.createElement(ReactMarkdown, { remarkPlugins: remarkPlugins, components: components }, content));
21
+ export default Markdown;
package/dist/index.d.ts CHANGED
@@ -49,6 +49,7 @@ export { default as ListItemText } from './components/ListItemText';
49
49
  export { default as ListItemSkeleton } from './components/ListItemSkeleton';
50
50
  export { default as ListSkeleton } from './components/ListSkeleton';
51
51
  export { default as ListSubheader } from './components/ListSubheader';
52
+ export { default as Markdown } from './components/Markdown';
52
53
  export { default as PointerAlert } from './components/PointerAlert';
53
54
  export { Tabs, default as TabsDefault } from './components/Tabs';
54
55
  export { Switch, default as SwitchDefault } from './components/Switch';
@@ -119,6 +120,7 @@ export type { ListItemTextProps } from './components/ListItemText';
119
120
  export type { ListItemSkeletonProps } from './components/ListItemSkeleton';
120
121
  export type { ListSkeletonProps } from './components/ListSkeleton';
121
122
  export type { ListSubheaderProps } from './components/ListSubheader';
123
+ export type { MarkdownProps } from './components/Markdown';
122
124
  export type { TabsProps } from './components/Tabs';
123
125
  export type { SwitchProps } from './components/Switch';
124
126
  export type { SearchBarProps } from './components/SearchBar/types';
package/dist/index.js CHANGED
@@ -52,6 +52,7 @@ export { default as ListItemText } from './components/ListItemText';
52
52
  export { default as ListItemSkeleton } from './components/ListItemSkeleton';
53
53
  export { default as ListSkeleton } from './components/ListSkeleton';
54
54
  export { default as ListSubheader } from './components/ListSubheader';
55
+ export { default as Markdown } from './components/Markdown';
55
56
  export { default as PointerAlert } from './components/PointerAlert';
56
57
  export { Tabs, default as TabsDefault } from './components/Tabs';
57
58
  export { Switch, default as SwitchDefault } from './components/Switch';
@@ -883,6 +883,11 @@ export const overrides = {
883
883
  })
884
884
  }
885
885
  },
886
+ MuiLink: {
887
+ defaultProps: {
888
+ underline: 'hover'
889
+ }
890
+ },
886
891
  MuiAlert: {
887
892
  defaultProps: {
888
893
  severity: 'primary',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linagora/twake-mui",
3
3
  "type": "module",
4
- "version": "11.0.0",
4
+ "version": "11.2.0",
5
5
  "description": "MUI v9 theme system for Twake applications",
6
6
  "author": "Twake",
7
7
  "license": "MIT",
@@ -66,8 +66,10 @@
66
66
  "classnames": "^2.5.1",
67
67
  "cozy-minilog": "^3.10.1",
68
68
  "pdf-lib": "^1.17.1",
69
+ "react-markdown": "^10.1.0",
69
70
  "react-use-measure": "2.1.7",
70
71
  "react-virtuoso": "4.13.0",
72
+ "remark-gfm": "^4.0.1",
71
73
  "rooks": "8.4.0"
72
74
  },
73
75
  "devDependencies": {