@linagora/twake-mui 16.0.0 → 16.0.1
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 +7 -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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @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)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **twake-mui:** Disabled ContactPopoved action has now visible state ([bcbf81e](https://github.com/linagora/twake-ui/commit/bcbf81e29cb997599cacc5fb0ea34a5813905820))
|
|
7
|
+
|
|
1
8
|
# @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
9
|
|
|
3
10
|
|
|
@@ -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
|
};
|