@linagora/twake-mui 16.0.0 → 16.1.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 +14 -0
- package/dist/components/ContactPopover/ContactPopover.stories.d.ts +1 -0
- package/dist/components/ContactPopover/ContactPopover.stories.js +25 -30
- package/dist/components/ContactPopover/ContactPopoverCalendarAction.js +5 -2
- package/dist/components/ContactPopover/ContactPopoverChatAction.js +5 -2
- package/dist/components/ContactPopover/ContactPopoverVideoAction.js +5 -2
- package/dist/components/FilePath/FilePath.stories.d.ts +7 -0
- package/dist/components/FilePath/FilePath.stories.js +34 -0
- package/dist/components/FilePath/index.d.ts +7 -0
- package/dist/components/FilePath/index.js +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# @linagora/twake-mui [16.1.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@16.0.1...@linagora/twake-mui@16.1.0) (2026-10-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **twake-mui:** Migrate FilePath from cozy-ui ([622be6f](https://github.com/linagora/twake-ui/commit/622be6fd697ae5d067e4d1ca71063a4b14f1970d))
|
|
7
|
+
|
|
8
|
+
## @linagora/twake-mui [16.0.1](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@16.0.0...@linagora/twake-mui@16.0.1) (2026-10-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **twake-mui:** Disabled ContactPopoved action has now visible state ([bcbf81e](https://github.com/linagora/twake-ui/commit/bcbf81e29cb997599cacc5fb0ea34a5813905820))
|
|
14
|
+
|
|
1
15
|
# @linagora/twake-mui [16.0.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@15.2.0...@linagora/twake-mui@16.0.0) (2026-10-19)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -31,39 +31,34 @@ const meta = {
|
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
export default meta;
|
|
34
|
+
const Variant = ({ title, children }) => (React.createElement(Box, null,
|
|
35
|
+
React.createElement(Typography, { variant: "subtitle2", gutterBottom: true }, title),
|
|
36
|
+
children));
|
|
34
37
|
export const Default = {
|
|
35
|
-
render: () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
React.createElement(ContactPopover.EmailAction, { url: "https://mail.example.com/john.doe" }),
|
|
43
|
-
React.createElement(ContactPopover.CalendarAction, { url: "https://calendar.example.com/john.doe" }),
|
|
44
|
-
React.createElement(ContactPopover.ChatAction, { url: "https://chat.example.com/john.doe" }),
|
|
45
|
-
React.createElement(ContactPopover.VideoAction, { url: "https://meet.example.com/john.doe" })))),
|
|
46
|
-
React.createElement(Box, null,
|
|
47
|
-
React.createElement(Typography, { variant: "subtitle2", gutterBottom: true }, "Email only"),
|
|
48
|
-
React.createElement(ContactPopover, { name: "", email: "jane.smith@example.com" },
|
|
49
|
-
React.createElement(Chip, { label: "jane.smith@example.com", clickable: true }),
|
|
50
|
-
React.createElement(ContactPopover.Actions, null,
|
|
51
|
-
React.createElement(ContactPopover.EmailAction, { url: "mailto:jane.smith@example.com" })))),
|
|
52
|
-
React.createElement(Box, null,
|
|
53
|
-
React.createElement(Typography, { variant: "subtitle2", gutterBottom: true }, "Without actions"),
|
|
54
|
-
React.createElement(ContactPopover, { name: "Alice Brown", email: "alice.brown@example.com" },
|
|
55
|
-
React.createElement(Chip, { label: "Alice Brown", clickable: true }))),
|
|
56
|
-
React.createElement(Box, null,
|
|
57
|
-
React.createElement(Typography, { variant: "subtitle2", gutterBottom: true }, "Long name / email"),
|
|
58
|
-
React.createElement(ContactPopover, { name: "Christopher Alexander Montgomery", email: "christopher.montgomery@verylongdomain.example.com" },
|
|
59
|
-
React.createElement(Chip, { label: "Christopher Alexander Montgomery", clickable: true }),
|
|
60
|
-
React.createElement(ContactPopover.Actions, null,
|
|
61
|
-
React.createElement(ContactPopover.ChatAction, { url: "https://chat.example.com/christopher" }),
|
|
62
|
-
React.createElement(ContactPopover.VideoAction, { url: "https://meet.example.com/christopher" }),
|
|
63
|
-
React.createElement(ContactPopover.CalendarAction, { url: "https://calendar.example.com/christopher" }))))));
|
|
64
|
-
},
|
|
38
|
+
render: () => (React.createElement(ContactPopover, { name: "John Doe", email: "john.doe@example.com" },
|
|
39
|
+
React.createElement(Chip, { label: "John Doe", clickable: true }),
|
|
40
|
+
React.createElement(ContactPopover.Actions, null,
|
|
41
|
+
React.createElement(ContactPopover.EmailAction, { url: "https://mail.example.com/john.doe" }),
|
|
42
|
+
React.createElement(ContactPopover.CalendarAction, { url: "https://calendar.example.com/john.doe" }),
|
|
43
|
+
React.createElement(ContactPopover.ChatAction, { url: "https://chat.example.com/john.doe" }),
|
|
44
|
+
React.createElement(ContactPopover.VideoAction, { url: "https://meet.example.com/john.doe" })))),
|
|
65
45
|
play: async ({ canvas, userEvent }) => {
|
|
66
46
|
await userEvent.click(canvas.getByText('John Doe'));
|
|
67
47
|
await screen.findByText('john.doe@example.com');
|
|
68
48
|
}
|
|
69
49
|
};
|
|
50
|
+
export const AllActionsVariants = {
|
|
51
|
+
render: () => (React.createElement(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 3 } },
|
|
52
|
+
React.createElement(Variant, { title: "Default \u2014 all actions" },
|
|
53
|
+
React.createElement(ContactPopover.Actions, null,
|
|
54
|
+
React.createElement(ContactPopover.EmailAction, { url: "https://mail.example.com/john.doe" }),
|
|
55
|
+
React.createElement(ContactPopover.CalendarAction, { url: "https://calendar.example.com/john.doe" }),
|
|
56
|
+
React.createElement(ContactPopover.ChatAction, { url: "https://chat.example.com/john.doe" }),
|
|
57
|
+
React.createElement(ContactPopover.VideoAction, { url: "https://meet.example.com/john.doe" }))),
|
|
58
|
+
React.createElement(Variant, { title: "Default \u2014 all actions \u2014 Disabled" },
|
|
59
|
+
React.createElement(ContactPopover.Actions, null,
|
|
60
|
+
React.createElement(ContactPopover.EmailAction, { disabled: true, url: "https://mail.example.com/jane.doe" }),
|
|
61
|
+
React.createElement(ContactPopover.CalendarAction, { disabled: true, url: "https://calendar.example.com/jane.doe" }),
|
|
62
|
+
React.createElement(ContactPopover.ChatAction, { disabled: true, url: "https://chat.example.com/jane.doe" }),
|
|
63
|
+
React.createElement(ContactPopover.VideoAction, { disabled: true, url: "https://meet.example.com/jane.doe" })))))
|
|
64
|
+
};
|
|
@@ -4,6 +4,9 @@ import { IconButton, useTheme } from '@mui/material';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
export const ContactPopoverCalendarAction = ({ url, disabled = false }) => {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: {
|
|
8
|
-
|
|
7
|
+
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: {
|
|
8
|
+
border: `1px solid ${theme.vars.palette.divider}`,
|
|
9
|
+
color: theme.vars.palette.text.icon
|
|
10
|
+
} },
|
|
11
|
+
React.createElement(Icon, { icon: CalendarToday, size: 20 })));
|
|
9
12
|
};
|
|
@@ -4,6 +4,9 @@ import { IconButton, useTheme } from '@mui/material';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
export const ContactPopoverChatAction = ({ url, disabled = false }) => {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: {
|
|
8
|
-
|
|
7
|
+
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: {
|
|
8
|
+
border: `1px solid ${theme.vars.palette.divider}`,
|
|
9
|
+
color: theme.vars.palette.text.icon
|
|
10
|
+
} },
|
|
11
|
+
React.createElement(Icon, { icon: Discuss, size: 20 })));
|
|
9
12
|
};
|
|
@@ -4,6 +4,9 @@ import { IconButton, useTheme } from '@mui/material';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
export const ContactPopoverVideoAction = ({ url, disabled = false }) => {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: {
|
|
8
|
-
|
|
7
|
+
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: {
|
|
8
|
+
border: `1px solid ${theme.vars.palette.divider}`,
|
|
9
|
+
color: theme.vars.palette.text.icon
|
|
10
|
+
} },
|
|
11
|
+
React.createElement(Icon, { icon: Camera, size: 20 })));
|
|
9
12
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import FilePath from './index';
|
|
3
|
+
declare const meta: Meta<typeof FilePath>;
|
|
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,34 @@
|
|
|
1
|
+
import { Box, Stack } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import FilePath from './index';
|
|
4
|
+
const path = '/Partages reçus/Cozy 🗄 - Team/Customers & Partners 🛒/Xxxxxx (Xxxxxxxx)/4_Suivi opérationnel/Point de synchro';
|
|
5
|
+
const widths = [150, 250, 400];
|
|
6
|
+
const Section = ({ title, children }) => (React.createElement("section", null,
|
|
7
|
+
React.createElement("h3", null, title),
|
|
8
|
+
children));
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'FilePath',
|
|
11
|
+
component: FilePath,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
argTypes: {
|
|
14
|
+
children: { control: 'text' },
|
|
15
|
+
className: { control: 'text' }
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
export const Default = {
|
|
20
|
+
args: {
|
|
21
|
+
children: path
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const Screenshot = {
|
|
25
|
+
tags: ['argos'],
|
|
26
|
+
render: () => (React.createElement(Stack, { spacing: 4 },
|
|
27
|
+
React.createElement(Section, { title: "Default" },
|
|
28
|
+
React.createElement(FilePath, null, path)),
|
|
29
|
+
React.createElement(Section, { title: "Container widths" },
|
|
30
|
+
React.createElement(Stack, { spacing: 1 }, widths.map(width => (React.createElement(Box, { key: width, sx: { width } },
|
|
31
|
+
React.createElement(FilePath, null, path)))))),
|
|
32
|
+
React.createElement(Section, { title: "Custom className" },
|
|
33
|
+
React.createElement(FilePath, { className: "u-error" }, path))))
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { styled } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import MidEllipsis from '../MidEllipsis';
|
|
4
|
+
const FilePathRoot = styled(MidEllipsis)(({ theme }) => ({
|
|
5
|
+
color: theme.palette.text.secondary,
|
|
6
|
+
fontSize: theme.typography.pxToRem(12)
|
|
7
|
+
}));
|
|
8
|
+
const FilePath = ({ children, className }) => (React.createElement(FilePathRoot, { className: className }, children));
|
|
9
|
+
export default FilePath;
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export { default as DropdownText } from './components/DropdownText';
|
|
|
59
59
|
export { Empty, EmptySubTitle } from './components/Empty';
|
|
60
60
|
export { ExtendableFab } from './components/ExtendableFab';
|
|
61
61
|
export { default as Filename } from './components/Filename';
|
|
62
|
+
export { default as FilePath } from './components/FilePath';
|
|
62
63
|
export { default as ListItem } from './components/ListItem';
|
|
63
64
|
export { default as ListItemButton } from './components/ListItemButton';
|
|
64
65
|
export { default as ListItemText } from './components/ListItemText';
|
|
@@ -157,6 +158,7 @@ export type { DropdownButtonProps } from './components/DropdownButton';
|
|
|
157
158
|
export type { DropdownTextProps, DropdownTextVariant } from './components/DropdownText';
|
|
158
159
|
export type { ExtendableFabProps, ScrollOptions } from './components/ExtendableFab';
|
|
159
160
|
export type { FilenameProps } from './components/Filename';
|
|
161
|
+
export type { FilePathProps } from './components/FilePath';
|
|
160
162
|
export type { ListItemProps, ListItemGutters, ListItemSize } from './components/ListItem';
|
|
161
163
|
export type { ListItemButtonProps } from './components/ListItemButton';
|
|
162
164
|
export type { ListItemTextProps } from './components/ListItemText';
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ export { default as DropdownText } from './components/DropdownText';
|
|
|
62
62
|
export { Empty, EmptySubTitle } from './components/Empty';
|
|
63
63
|
export { ExtendableFab } from './components/ExtendableFab';
|
|
64
64
|
export { default as Filename } from './components/Filename';
|
|
65
|
+
export { default as FilePath } from './components/FilePath';
|
|
65
66
|
export { default as ListItem } from './components/ListItem';
|
|
66
67
|
export { default as ListItemButton } from './components/ListItemButton';
|
|
67
68
|
export { default as ListItemText } from './components/ListItemText';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linagora/twake-mui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "16.
|
|
4
|
+
"version": "16.1.0",
|
|
5
5
|
"description": "MUI v9 theme system for Twake applications",
|
|
6
6
|
"author": "Twake",
|
|
7
7
|
"license": "MIT",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"eslint-plugin-storybook": "10.3.5",
|
|
101
101
|
"jsdom": "^30.1.2",
|
|
102
102
|
"lodash": "4.18.1",
|
|
103
|
-
"playwright": "1.
|
|
103
|
+
"playwright": "1.64.1",
|
|
104
104
|
"react": "^19.3.0",
|
|
105
105
|
"react-dom": "^19.3.0",
|
|
106
106
|
"storybook": "10.3.5",
|