@linagora/twake-mui 10.4.0 → 10.4.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/AttendeeInfo.js +3 -3
- package/dist/components/ContactPopover/ContactPopoverCalendarAction.js +2 -2
- package/dist/components/ContactPopover/ContactPopoverChatAction.js +2 -2
- package/dist/components/ContactPopover/ContactPopoverEmailAction.js +2 -2
- package/dist/components/ContactPopover/ContactPopoverVideoAction.js +2 -2
- package/dist/components/SearchBar/DisableHighlight.js +1 -1
- package/dist/components/SearchBar/FocusHighlight.js +1 -1
- package/dist/components/SearchBar/SearchBarIconWrapper.js +1 -1
- package/dist/components/SearchBar/SearchBarRoot.js +4 -4
- package/dist/components/SpaceOverlay/OverlayFrame.js +17 -21
- package/dist/components/SpaceOverlay/SpaceOverlay.js +2 -2
- package/dist/index.d.ts +8 -1
- package/dist/index.js +4 -1
- package/dist/lib/overrides.js +21 -19
- package/package.json +1 -1
- package/dist/components/SpaceOverlay/index.d.ts +0 -8
- package/dist/components/SpaceOverlay/index.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @linagora/twake-mui [10.4.1](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@10.4.0...@linagora/twake-mui@10.4.1) (2026-10-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **twake-mui:** Follow the color scheme in overrides and SearchBar ([#142](https://github.com/linagora/twake-ui/issues/142)) ([1c2efac](https://github.com/linagora/twake-ui/commit/1c2efacba0a3e140384775e9a4f8e76416409b7a))
|
|
7
|
+
|
|
1
8
|
# @linagora/twake-mui [10.4.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@10.3.0...@linagora/twake-mui@10.4.0) (2026-10-07)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon } from '@linagora/twake-icons';
|
|
2
2
|
import { Copy } from '@linagora/twake-icons';
|
|
3
|
-
import { Box, IconButton, Typography, useTheme
|
|
3
|
+
import { Box, IconButton, Typography, useTheme } from '@mui/material';
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { useI18n } from 'twake-i18n';
|
|
6
6
|
import { Avatar } from '../Avatar';
|
|
@@ -28,8 +28,8 @@ export const AttendeeInfo = ({ name, email, onEmailCopy }) => {
|
|
|
28
28
|
name && name !== email ? (React.createElement(Typography, { variant: "body1", sx: { fontWeight: 500, wordBreak: 'break-word' } }, name)) : null,
|
|
29
29
|
React.createElement(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 } },
|
|
30
30
|
React.createElement(Typography, { variant: "body2", color: "text.secondary", sx: { wordBreak: 'break-word' } }, email),
|
|
31
|
-
React.createElement(IconButton, { size: "small", onClick: () => void handleCopy(), sx: { p: 0.5, color:
|
|
31
|
+
React.createElement(IconButton, { size: "small", onClick: () => void handleCopy(), sx: { p: 0.5, color: 'text.primary' }, title: showCopied
|
|
32
32
|
? t('ContactPopover.copiedTooltip')
|
|
33
33
|
: t('ContactPopover.copyTooltip') },
|
|
34
|
-
React.createElement(Icon, { icon: Copy, size: 16, color: theme.palette.text.icon }))))));
|
|
34
|
+
React.createElement(Icon, { icon: Copy, size: 16, color: theme.vars.palette.text.icon }))))));
|
|
35
35
|
};
|
|
@@ -4,6 +4,6 @@ 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: { border: `1px solid ${theme.palette.divider}` } },
|
|
8
|
-
React.createElement(Icon, { icon: CalendarToday, size: 20, color: theme.palette.text.icon })));
|
|
7
|
+
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: { border: `1px solid ${theme.vars.palette.divider}` } },
|
|
8
|
+
React.createElement(Icon, { icon: CalendarToday, size: 20, color: theme.vars.palette.text.icon })));
|
|
9
9
|
};
|
|
@@ -4,6 +4,6 @@ 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: { border: `1px solid ${theme.palette.divider}` } },
|
|
8
|
-
React.createElement(Icon, { icon: Discuss, size: 20, color: theme.palette.text.icon })));
|
|
7
|
+
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: { border: `1px solid ${theme.vars.palette.divider}` } },
|
|
8
|
+
React.createElement(Icon, { icon: Discuss, size: 20, color: theme.vars.palette.text.icon })));
|
|
9
9
|
};
|
|
@@ -6,7 +6,7 @@ export const ContactPopoverEmailAction = ({ url, disabled = false }) => {
|
|
|
6
6
|
const { t } = useI18n();
|
|
7
7
|
return (React.createElement(Button, { href: url, target: "_blank", rel: "noopener noreferrer", variant: "outlined", size: "small", disabled: disabled, sx: {
|
|
8
8
|
justifyContent: 'center',
|
|
9
|
-
color: theme.palette.text.primary,
|
|
10
|
-
borderColor: theme.palette.divider
|
|
9
|
+
color: theme.vars.palette.text.primary,
|
|
10
|
+
borderColor: theme.vars.palette.divider
|
|
11
11
|
} }, t('ContactPopover.emailButton')));
|
|
12
12
|
};
|
|
@@ -4,6 +4,6 @@ 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: { border: `1px solid ${theme.palette.divider}` } },
|
|
8
|
-
React.createElement(Icon, { icon: Camera, size: 20, color: theme.palette.text.icon })));
|
|
7
|
+
return (React.createElement(IconButton, { href: url, target: "_blank", rel: "noopener noreferrer", size: "small", disabled: disabled, sx: { border: `1px solid ${theme.vars.palette.divider}` } },
|
|
8
|
+
React.createElement(Icon, { icon: Camera, size: 20, color: theme.vars.palette.text.icon })));
|
|
9
9
|
};
|
|
@@ -2,5 +2,5 @@ import { styled } from '@mui/material';
|
|
|
2
2
|
import { Highlight } from './Highlight';
|
|
3
3
|
export const FocusHighlight = styled(Highlight)(({ theme }) => ({
|
|
4
4
|
pointerEvents: 'none',
|
|
5
|
-
backgroundColor: theme.palette.action.hover
|
|
5
|
+
backgroundColor: theme.vars.palette.action.hover
|
|
6
6
|
}));
|
|
@@ -15,10 +15,10 @@ export const SearchBarRoot = styled(Paper, {
|
|
|
15
15
|
borderStyle: 'solid',
|
|
16
16
|
borderWidth: 1,
|
|
17
17
|
paddingRight: '0.5rem',
|
|
18
|
-
borderColor: isFocused ? theme.palette.primary.main : 'transparent',
|
|
18
|
+
borderColor: isFocused ? theme.vars.palette.primary.main : 'transparent',
|
|
19
19
|
backgroundColor: isFocused
|
|
20
|
-
? theme.palette.background.paper
|
|
21
|
-
: theme.palette.background.default,
|
|
20
|
+
? theme.vars.palette.background.paper
|
|
21
|
+
: theme.vars.palette.background.default,
|
|
22
22
|
transition: theme.transitions.create(['border-color', 'background-color']),
|
|
23
23
|
'&:hover': {
|
|
24
24
|
'&:not(.Mui-disabled):not(.SearchBar-focused)': {
|
|
@@ -29,7 +29,7 @@ export const SearchBarRoot = styled(Paper, {
|
|
|
29
29
|
},
|
|
30
30
|
'&.Mui-disabled': {
|
|
31
31
|
'& .SearchBar-icon': {
|
|
32
|
-
color: theme.palette.text.disabled
|
|
32
|
+
color: theme.vars.palette.text.disabled
|
|
33
33
|
},
|
|
34
34
|
'& .SearchBar-disableHighlight': {
|
|
35
35
|
opacity: 1
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { Box } from '@mui/material';
|
|
2
|
-
import React
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
1
|
+
import { Box, Portal } from '@mui/material';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
export const OverlayFrame = ({ name, src, title, sandbox, allow, clipPath }) => {
|
|
5
|
-
const ref = useRef(null);
|
|
6
4
|
const empty = clipPath.startsWith('inset(');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
zIndex: theme => theme.zIndex.modal - 1
|
|
23
|
-
} }), document.body);
|
|
5
|
+
return (React.createElement(Portal, null,
|
|
6
|
+
React.createElement(Box, { component: "iframe", name: name, src: src, title: title, sandbox: sandbox, allow: allow, "aria-hidden": empty || undefined, tabIndex: empty ? -1 : undefined,
|
|
7
|
+
// Inline: it changes with every move of a menu, a class per value
|
|
8
|
+
// would pile up
|
|
9
|
+
style: { clipPath }, sx: {
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
inset: 0,
|
|
12
|
+
width: '100%',
|
|
13
|
+
height: '100%',
|
|
14
|
+
border: 0,
|
|
15
|
+
background: 'transparent',
|
|
16
|
+
// A frame whose colour scheme differs from the page is painted opaque
|
|
17
|
+
colorScheme: 'normal',
|
|
18
|
+
zIndex: theme => theme.zIndex.modal - 1
|
|
19
|
+
} })));
|
|
24
20
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Portal } from '@mui/material';
|
|
1
2
|
import React, { createContext, useContext, useSyncExternalStore } from 'react';
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
3
|
const SpaceOverlayContext = createContext(null);
|
|
4
4
|
export const SpaceOverlayProvider = ({ overlay, children }) => (React.createElement(SpaceOverlayContext.Provider, { value: overlay }, children));
|
|
5
5
|
const NO_OVERLAY = () => () => undefined;
|
|
@@ -31,7 +31,7 @@ export const OverlayPortal = ({ children }) => {
|
|
|
31
31
|
if (status === 'connecting')
|
|
32
32
|
return null;
|
|
33
33
|
const body = status === 'connected' ? (overlay?.getBody() ?? null) : null;
|
|
34
|
-
return React.createElement(
|
|
34
|
+
return (React.createElement(Portal, { container: body, disablePortal: body === null }, children));
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Theme options sending every dialog and temporary drawer to the overlay, so
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,10 @@ export { default as AccordionExpandIcon } from './components/AccordionExpandIcon
|
|
|
41
41
|
export { default as VirtualizedTable } from './components/VirtualizedTable';
|
|
42
42
|
export { VirtuosoMockContext } from 'react-virtuoso';
|
|
43
43
|
export { useBreakpoints } from './hooks/useBreakpoints';
|
|
44
|
-
export
|
|
44
|
+
export { connectSpaceOverlay, computeOverlayRegion } from './components/SpaceOverlay/spaceOverlay';
|
|
45
|
+
export { OverlayPortal, SpaceOverlayProvider, overlayThemeOptions, useOverlayWindow } from './components/SpaceOverlay/SpaceOverlay';
|
|
46
|
+
export { overlayClipPath, overlayRegionMessage, parseOverlayRegion, parseOverlayRegionMessage } from './components/SpaceOverlay/region';
|
|
47
|
+
export { OverlayFrame } from './components/SpaceOverlay/OverlayFrame';
|
|
45
48
|
export type { TwakeTheme } from './lib/theme';
|
|
46
49
|
export type { PaletteJson } from './lib/types';
|
|
47
50
|
export type { AvatarProps } from './components/Avatar';
|
|
@@ -54,6 +57,10 @@ export type { ContactPopoverVideoActionProps } from './components/ContactPopover
|
|
|
54
57
|
export type { ContactPopoverCalendarActionProps } from './components/ContactPopover/ContactPopoverCalendarAction';
|
|
55
58
|
export type { ContactPopoverEmailActionProps } from './components/ContactPopover/ContactPopoverEmailAction';
|
|
56
59
|
export type { ChipProps } from './components/Chip';
|
|
60
|
+
export type { SpaceOverlay, SpaceOverlayStatus } from './components/SpaceOverlay/spaceOverlay';
|
|
61
|
+
export type { SpaceOverlayProviderProps } from './components/SpaceOverlay/SpaceOverlay';
|
|
62
|
+
export type { OverlayBox, OverlayRegion } from './components/SpaceOverlay/region';
|
|
63
|
+
export type { OverlayFrameProps } from './components/SpaceOverlay/OverlayFrame';
|
|
57
64
|
export type { DialogProps, DialogSize } from './components/Dialog';
|
|
58
65
|
export type { PointerAlertProps, PointerAlertDirection } from './components/PointerAlert';
|
|
59
66
|
export type { EmptyProps, EmptyIconSize, EmptyComponentsProps } from './components/Empty';
|
package/dist/index.js
CHANGED
|
@@ -44,5 +44,8 @@ export { default as AccordionExpandIcon } from './components/AccordionExpandIcon
|
|
|
44
44
|
export { default as VirtualizedTable } from './components/VirtualizedTable';
|
|
45
45
|
export { VirtuosoMockContext } from 'react-virtuoso';
|
|
46
46
|
export { useBreakpoints } from './hooks/useBreakpoints';
|
|
47
|
-
export
|
|
47
|
+
export { connectSpaceOverlay, computeOverlayRegion } from './components/SpaceOverlay/spaceOverlay';
|
|
48
|
+
export { OverlayPortal, SpaceOverlayProvider, overlayThemeOptions, useOverlayWindow } from './components/SpaceOverlay/SpaceOverlay';
|
|
49
|
+
export { overlayClipPath, overlayRegionMessage, parseOverlayRegion, parseOverlayRegionMessage } from './components/SpaceOverlay/region';
|
|
50
|
+
export { OverlayFrame } from './components/SpaceOverlay/OverlayFrame';
|
|
48
51
|
export { ContactPopoverActions, ContactPopoverChatAction, ContactPopoverVideoAction, ContactPopoverCalendarAction, ContactPopoverEmailAction } from './components/ContactPopover';
|
package/dist/lib/overrides.js
CHANGED
|
@@ -16,7 +16,7 @@ import { selectClasses } from '@mui/material/Select';
|
|
|
16
16
|
import { switchClasses } from '@mui/material/Switch';
|
|
17
17
|
import { tabClasses } from '@mui/material/Tab';
|
|
18
18
|
import { tabsClasses } from '@mui/material/Tabs';
|
|
19
|
-
import { alpha
|
|
19
|
+
import { alpha } from '@mui/material/styles';
|
|
20
20
|
import React from 'react';
|
|
21
21
|
import { radius } from './radius';
|
|
22
22
|
import AccordionExpandIcon from '../components/AccordionExpandIcon';
|
|
@@ -520,7 +520,7 @@ export const overrides = {
|
|
|
520
520
|
height: 14,
|
|
521
521
|
minWidth: 14,
|
|
522
522
|
padding: 0,
|
|
523
|
-
border: `2px solid ${theme.palette.background.paper}`,
|
|
523
|
+
border: `2px solid ${theme.vars.palette.background.paper}`,
|
|
524
524
|
borderRadius: '100%',
|
|
525
525
|
fontSize: theme.typography.pxToRem(10)
|
|
526
526
|
}),
|
|
@@ -587,12 +587,12 @@ export const overrides = {
|
|
|
587
587
|
MuiToggleButtonGroup: {
|
|
588
588
|
styleOverrides: {
|
|
589
589
|
root: ({ theme }) => ({
|
|
590
|
-
borderColor: theme.palette.secondary.dark,
|
|
590
|
+
borderColor: theme.vars.palette.secondary.dark,
|
|
591
591
|
'& .MuiToggleButton-root:not(.Mui-selected)': {
|
|
592
|
-
color: theme.palette.text.secondary,
|
|
593
|
-
backgroundColor: alpha(theme.palette.text.secondary, 0.08),
|
|
592
|
+
color: theme.vars.palette.text.secondary,
|
|
593
|
+
backgroundColor: theme.alpha(theme.vars.palette.text.secondary, 0.08),
|
|
594
594
|
'& svg, & .MuiSvgIcon-root': {
|
|
595
|
-
color: theme.palette.text.secondary
|
|
595
|
+
color: theme.vars.palette.text.secondary
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
})
|
|
@@ -601,15 +601,15 @@ export const overrides = {
|
|
|
601
601
|
MuiToggleButton: {
|
|
602
602
|
styleOverrides: {
|
|
603
603
|
root: ({ theme }) => ({
|
|
604
|
-
color: theme.palette.text.primary,
|
|
604
|
+
color: theme.vars.palette.text.primary,
|
|
605
605
|
'&.Mui-selected': {
|
|
606
|
-
color: theme.palette.text.primary,
|
|
606
|
+
color: theme.vars.palette.text.primary,
|
|
607
607
|
backgroundColor: 'transparent',
|
|
608
608
|
'&:hover': {
|
|
609
609
|
backgroundColor: 'transparent'
|
|
610
610
|
},
|
|
611
611
|
'& svg, & .MuiSvgIcon-root': {
|
|
612
|
-
color: theme.palette.primary.main
|
|
612
|
+
color: theme.vars.palette.primary.main
|
|
613
613
|
}
|
|
614
614
|
},
|
|
615
615
|
variants: [
|
|
@@ -631,7 +631,7 @@ export const overrides = {
|
|
|
631
631
|
{
|
|
632
632
|
props: { color: 'default' },
|
|
633
633
|
style: {
|
|
634
|
-
color: theme.palette.text.secondary
|
|
634
|
+
color: theme.vars.palette.text.secondary
|
|
635
635
|
}
|
|
636
636
|
},
|
|
637
637
|
{
|
|
@@ -955,7 +955,9 @@ export const overrides = {
|
|
|
955
955
|
marginLeft: 5,
|
|
956
956
|
marginRight: -12,
|
|
957
957
|
transform: 'rotate(-90deg)',
|
|
958
|
-
[`&.${accordionSummaryClasses.expanded}`]: {
|
|
958
|
+
[`&.${accordionSummaryClasses.expanded}`]: {
|
|
959
|
+
transform: 'rotate(0deg)'
|
|
960
|
+
}
|
|
959
961
|
}),
|
|
960
962
|
content: {
|
|
961
963
|
paddingLeft: 8,
|
|
@@ -981,23 +983,23 @@ export const overrides = {
|
|
|
981
983
|
borderRadius: 28,
|
|
982
984
|
width: 96,
|
|
983
985
|
height: 96,
|
|
984
|
-
color: theme.palette.text.primary,
|
|
985
|
-
backgroundColor: theme.palette.background.paper,
|
|
986
|
+
color: theme.vars.palette.text.primary,
|
|
987
|
+
backgroundColor: theme.vars.palette.background.paper,
|
|
986
988
|
'&:hover': {
|
|
987
|
-
backgroundColor:
|
|
989
|
+
backgroundColor: `color-mix(in srgb, ${theme.vars.palette.background.paper}, #000 5%)`
|
|
988
990
|
},
|
|
989
991
|
'@media (hover: none)': {
|
|
990
|
-
backgroundColor: theme.palette.background.paper
|
|
992
|
+
backgroundColor: theme.vars.palette.background.paper
|
|
991
993
|
}
|
|
992
994
|
}),
|
|
993
995
|
primary: ({ theme }) => ({
|
|
994
|
-
color: theme.palette.primary.dark,
|
|
995
|
-
backgroundColor: theme.palette.primary.light,
|
|
996
|
+
color: theme.vars.palette.primary.dark,
|
|
997
|
+
backgroundColor: theme.vars.palette.primary.light,
|
|
996
998
|
'&:hover': {
|
|
997
|
-
backgroundColor:
|
|
999
|
+
backgroundColor: `color-mix(in srgb, ${theme.vars.palette.primary.light}, #000 5%)`
|
|
998
1000
|
},
|
|
999
1001
|
'@media (hover: none)': {
|
|
1000
|
-
backgroundColor: theme.palette.primary.light
|
|
1002
|
+
backgroundColor: theme.vars.palette.primary.light
|
|
1001
1003
|
}
|
|
1002
1004
|
}),
|
|
1003
1005
|
extended: {
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { connectSpaceOverlay, computeOverlayRegion } from './spaceOverlay';
|
|
2
|
-
export type { SpaceOverlay, SpaceOverlayStatus } from './spaceOverlay';
|
|
3
|
-
export { OverlayPortal, SpaceOverlayProvider, overlayThemeOptions, useOverlayWindow } from './SpaceOverlay';
|
|
4
|
-
export type { SpaceOverlayProviderProps } from './SpaceOverlay';
|
|
5
|
-
export { overlayClipPath, overlayRegionMessage, parseOverlayRegion, parseOverlayRegionMessage } from './region';
|
|
6
|
-
export type { OverlayBox, OverlayRegion } from './region';
|
|
7
|
-
export { OverlayFrame } from './OverlayFrame';
|
|
8
|
-
export type { OverlayFrameProps } from './OverlayFrame';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { connectSpaceOverlay, computeOverlayRegion } from './spaceOverlay';
|
|
2
|
-
export { OverlayPortal, SpaceOverlayProvider, overlayThemeOptions, useOverlayWindow } from './SpaceOverlay';
|
|
3
|
-
export { overlayClipPath, overlayRegionMessage, parseOverlayRegion, parseOverlayRegionMessage } from './region';
|
|
4
|
-
export { OverlayFrame } from './OverlayFrame';
|