@linagora/twake-mui 14.4.0 → 15.0.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 +28 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.js +1 -1
- package/dist/components/Avatar/index.d.ts +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ColorList/index.js +1 -1
- package/dist/components/ContactPopover/AttendeeInfo.js +1 -1
- package/dist/components/ContactPopover/ContactPopover.stories.d.ts +1 -1
- package/dist/components/ContactPopover/ContactPopover.stories.js +1 -1
- package/dist/components/ContactPopover/index.d.ts +1 -1
- package/dist/components/ContactPopover/index.js +1 -1
- package/dist/components/ListItem/ListItem.stories.js +1 -1
- package/dist/components/SearchBar/SearchBar.stories.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.stories.js +1 -1
- package/dist/components/SearchBar/index.d.ts +1 -1
- package/dist/components/SearchBar/index.js +1 -1
- package/dist/components/Switch/Switch.stories.d.ts +1 -1
- package/dist/components/Switch/Switch.stories.js +1 -1
- package/dist/components/Switch/index.d.ts +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +1 -1
- package/dist/components/Tabs/Tabs.stories.js +1 -1
- package/dist/components/Tabs/index.d.ts +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/stories/Button.stories.d.ts +1 -1
- package/dist/stories/Button.stories.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
# @linagora/twake-mui [15.0.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@14.4.0...@linagora/twake-mui@15.0.0) (2026-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Code Refactoring
|
|
5
|
+
|
|
6
|
+
* **twake-mui:** Export Avatar as default only ([a7a138e](https://github.com/linagora/twake-ui/commit/a7a138e0cf2e731fb5eba00bc7dfdbe2c8993f0b))
|
|
7
|
+
* **twake-mui:** Export Button as default only ([c5ac445](https://github.com/linagora/twake-ui/commit/c5ac445f3f438e1d3f366c906067b18fd19e2ded))
|
|
8
|
+
* **twake-mui:** Export ContactPopover as default only ([e74ddbe](https://github.com/linagora/twake-ui/commit/e74ddbec7a0fe526d508075364cc52d586cc26db))
|
|
9
|
+
* **twake-mui:** Export SearchBar as default only ([34d0050](https://github.com/linagora/twake-ui/commit/34d00502da7c41edfcf841a49494b139cf977d9f))
|
|
10
|
+
* **twake-mui:** Export Switch as default only ([b22aebc](https://github.com/linagora/twake-ui/commit/b22aebc9809137eb8a7effb30f8dd5ed98ff97cc))
|
|
11
|
+
* **twake-mui:** Export Tabs as default only ([47d31fe](https://github.com/linagora/twake-ui/commit/47d31fea3c68ba104ff92f455b7ca0db47d43cab))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **twake-mui:** ContactPopoverDefault is no longer exported. Import
|
|
17
|
+
ContactPopover instead.
|
|
18
|
+
* **twake-mui:** SearchBarDefault is no longer exported. Import SearchBar
|
|
19
|
+
instead.
|
|
20
|
+
* **twake-mui:** SwitchDefault is no longer exported. Import Switch
|
|
21
|
+
instead.
|
|
22
|
+
* **twake-mui:** TabsDefault is no longer exported. Import Tabs
|
|
23
|
+
instead.
|
|
24
|
+
* **twake-mui:** ButtonDefault is no longer exported. Import Button
|
|
25
|
+
instead.
|
|
26
|
+
* **twake-mui:** AvatarDefault is no longer exported. Import Avatar
|
|
27
|
+
instead.
|
|
28
|
+
|
|
1
29
|
# @linagora/twake-mui [14.4.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@14.3.0...@linagora/twake-mui@14.4.0) (2026-10-15)
|
|
2
30
|
|
|
3
31
|
|
|
@@ -2,7 +2,7 @@ import { Icon, Link } from '@linagora/twake-icons';
|
|
|
2
2
|
import { AvatarGroup, Stack } from '@mui/material';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { supportedColors } from './helpers';
|
|
5
|
-
import
|
|
5
|
+
import Avatar from './index';
|
|
6
6
|
const sizes = ['xs', 's', 'm', 'l', 'xl'];
|
|
7
7
|
const image = 'https://i.pravatar.cc/150?img=11';
|
|
8
8
|
const meta = {
|
|
@@ -16,7 +16,7 @@ const StyledAvatar = styled(MuiAvatar, {
|
|
|
16
16
|
...(background && { background, color: '#fff' }),
|
|
17
17
|
...(textColor && { color: textColor })
|
|
18
18
|
}));
|
|
19
|
-
|
|
19
|
+
const Avatar = ({ className, color, size = 'm', textColor, border, innerBorder, disabled, display = 'initial', children, ...props }) => {
|
|
20
20
|
const isCustomSize = typeof size === 'number';
|
|
21
21
|
const nameColor = typeof children === 'string' ? nameToColor(children) : '';
|
|
22
22
|
const madeColor = color === 'none' ? '' : color || nameColor;
|
|
@@ -13,7 +13,7 @@ export interface ButtonTypeMap<AdditionalProps = object, RootComponent extends R
|
|
|
13
13
|
defaultComponent: RootComponent;
|
|
14
14
|
}
|
|
15
15
|
export type ButtonProps<RootComponent extends React.ElementType = 'button', AdditionalProps = object> = OverrideProps<ButtonTypeMap<AdditionalProps, RootComponent>, RootComponent>;
|
|
16
|
-
|
|
16
|
+
declare const Button: OverridableComponent<ButtonTypeMap> & {
|
|
17
17
|
displayName?: string;
|
|
18
18
|
};
|
|
19
19
|
export default Button;
|
|
@@ -3,6 +3,6 @@ import React from 'react';
|
|
|
3
3
|
// legacy variant names, mapped to their MUI counterpart
|
|
4
4
|
const legacyVariants = { primary: 'contained', secondary: 'outlined' };
|
|
5
5
|
const isLegacy = (variant) => typeof variant === 'string' && variant in legacyVariants;
|
|
6
|
-
|
|
6
|
+
const Button = React.forwardRef(({ variant, ...props }, ref) => (React.createElement(MuiButton, { ref: ref, variant: isLegacy(variant) ? legacyVariants[variant] : variant, ...props })));
|
|
7
7
|
Button.displayName = 'Button';
|
|
8
8
|
export default Button;
|
|
@@ -3,7 +3,7 @@ import { ButtonBase, ImageList, ImageListItem, imageListItemClasses } from '@mui
|
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useBreakpoints } from '../../hooks/useBreakpoints';
|
|
6
|
-
import
|
|
6
|
+
import Avatar from '../Avatar';
|
|
7
7
|
import { COLORS } from './helpers';
|
|
8
8
|
const sizes = {
|
|
9
9
|
small: { avatar: 21, icon: 10, cols: 7, gap: 5 },
|
|
@@ -3,7 +3,7 @@ import { Copy } from '@linagora/twake-icons';
|
|
|
3
3
|
import { Box, IconButton, Typography, useTheme } from '@mui/material';
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { useI18n } from 'twake-i18n';
|
|
6
|
-
import
|
|
6
|
+
import Avatar from '../Avatar';
|
|
7
7
|
import { nameToColor, getInitials } from '../Avatar/helpers';
|
|
8
8
|
export const AttendeeInfo = ({ name, email, onEmailCopy }) => {
|
|
9
9
|
const theme = useTheme();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Chip, Box, Typography } from '@mui/material';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { screen } from 'storybook/test';
|
|
4
|
-
import
|
|
4
|
+
import ContactPopover from './index';
|
|
5
5
|
const meta = {
|
|
6
6
|
title: 'ContactPopover',
|
|
7
7
|
component: ContactPopover,
|
|
@@ -25,6 +25,6 @@ interface ContactPopoverComponent extends React.FC<ContactPopoverProps> {
|
|
|
25
25
|
CalendarAction: typeof ContactPopoverCalendarAction;
|
|
26
26
|
EmailAction: typeof ContactPopoverEmailAction;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
declare const ContactPopover: ContactPopoverComponent;
|
|
29
29
|
export { ContactPopoverActions, ContactPopoverChatAction, ContactPopoverVideoAction, ContactPopoverCalendarAction, ContactPopoverEmailAction };
|
|
30
30
|
export default ContactPopover;
|
|
@@ -30,7 +30,7 @@ const CloseButton = styled(IconButton)(() => ({
|
|
|
30
30
|
top: 8,
|
|
31
31
|
right: 8
|
|
32
32
|
}));
|
|
33
|
-
|
|
33
|
+
const ContactPopover = ({ name, email, children, onEmailCopy, onClose, disabled = false }) => {
|
|
34
34
|
useExtendI18n(locales);
|
|
35
35
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
36
36
|
const openTimeoutRef = useRef(null);
|
|
@@ -2,7 +2,7 @@ import { Comment, Dots, Icon, Pen, People, Right, Trash } from '@linagora/twake-
|
|
|
2
2
|
import { Box, Checkbox, IconButton, List, ListItemAvatar, ListItemIcon, ListItemSecondaryAction, Radio, Stack } from '@mui/material';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import ListItem from './index';
|
|
5
|
-
import
|
|
5
|
+
import Avatar from '../Avatar';
|
|
6
6
|
import ListItemButton from '../ListItemButton';
|
|
7
7
|
import ListItemText from '../ListItemText';
|
|
8
8
|
import ListSubheader from '../ListSubheader';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Cloud } from '@linagora/twake-icons';
|
|
2
2
|
import { Stack, Typography } from '@mui/material';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import SearchBar from './index';
|
|
5
5
|
const sizes = ['small', 'medium', 'large', 'auto'];
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'SearchBar',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SearchBarProps } from './types';
|
|
3
|
-
|
|
3
|
+
declare const SearchBar: React.ForwardRefExoticComponent<Omit<SearchBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export default SearchBar;
|
|
@@ -19,7 +19,7 @@ import it from './locales/it.json';
|
|
|
19
19
|
import ru from './locales/ru.json';
|
|
20
20
|
import vi from './locales/vi.json';
|
|
21
21
|
const locales = { de, en, es, fr, it, ru, vi };
|
|
22
|
-
|
|
22
|
+
const SearchBar = forwardRef(({ placeholder, icon = Magnifier, size = 'small', type = 'search', label, componentsProps, disabledClear = false, disabledFocus = false, disabledHover = false, className, defaultValue = '', value, elevation = 1, disabled = false, onChange = () => { }, onClear = () => { }, onFocus = () => { }, onBlur = () => { }, ...props }, ref) => {
|
|
23
23
|
useExtendI18n(locales);
|
|
24
24
|
const { t } = useI18n();
|
|
25
25
|
const [currentValue, setCurrentValue] = useState(defaultValue);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Check } from '@linagora/twake-icons';
|
|
2
2
|
import { Divider, FormControlLabel, FormGroup, Stack, Typography } from '@mui/material';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import Switch from './index';
|
|
5
5
|
const colors = ['primary', 'secondary', 'success', 'default'];
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Switch',
|
|
@@ -5,5 +5,5 @@ export interface SwitchProps extends Omit<MuiSwitchProps, 'icon' | 'checkedIcon'
|
|
|
5
5
|
/** A twake icon drawn inside the thumb */
|
|
6
6
|
icon?: IconProps['icon'];
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
declare const Switch: React.FC<SwitchProps>;
|
|
9
9
|
export default Switch;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon } from '@linagora/twake-icons';
|
|
2
2
|
import { Switch as MuiSwitch } from '@mui/material';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
|
|
4
|
+
const Switch = ({ icon, ...props }) => {
|
|
5
5
|
const thumb = (React.createElement("span", { className: "switchThumb" }, !!icon && React.createElement(Icon, { icon: icon, size: 14 })));
|
|
6
6
|
return React.createElement(MuiSwitch, { icon: thumb, checkedIcon: thumb, ...props });
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tabs as MuiTabs } from '@mui/material';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
|
|
4
|
+
const Tabs = ({ className, narrowed, segmented, ...props }) => React.createElement(MuiTabs, { className: cx(className, { narrowed, segmented }), ...props });
|
|
5
5
|
export default Tabs;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ export { copyToClipboard } from './components/ActionsMenu/Actions/copyToClipboar
|
|
|
31
31
|
export { editAttribute } from './components/ActionsMenu/Actions/editAttribute';
|
|
32
32
|
export { others } from './components/ActionsMenu/Actions/others';
|
|
33
33
|
export { exportToText } from './components/ActionsMenu/Actions/exportToText';
|
|
34
|
-
export {
|
|
34
|
+
export { default as Avatar } from './components/Avatar';
|
|
35
35
|
export { default as BarTitle } from './components/BarTitle';
|
|
36
|
-
export {
|
|
36
|
+
export { default as Button } from './components/Button';
|
|
37
37
|
export { default as BottomSheet } from './components/BottomSheet';
|
|
38
38
|
export { default as BottomSheetItem } from './components/BottomSheet/BottomSheetItem';
|
|
39
39
|
export { default as BottomSheetHeader } from './components/BottomSheet/BottomSheetHeader';
|
|
@@ -41,7 +41,7 @@ export { default as BottomSheetTitle } from './components/BottomSheet/BottomShee
|
|
|
41
41
|
export { default as Chip } from './components/Chip';
|
|
42
42
|
export { default as ColorList } from './components/ColorList';
|
|
43
43
|
export { Dialog, default as DialogDefault } from './components/Dialog';
|
|
44
|
-
export {
|
|
44
|
+
export { default as ContactPopover } from './components/ContactPopover';
|
|
45
45
|
export { default as DropdownButton } from './components/DropdownButton';
|
|
46
46
|
export { default as DropdownText } from './components/DropdownText';
|
|
47
47
|
export { Empty, EmptySubTitle } from './components/Empty';
|
|
@@ -62,9 +62,9 @@ export type { AlertContextValue, ShowAlert, ShowAlertOptions } from './providers
|
|
|
62
62
|
export { default as AlertProvider } from './providers/AlertProvider';
|
|
63
63
|
export { useAlert } from './providers/AlertProvider/useAlert';
|
|
64
64
|
export { default as ProgressionBanner } from './components/ProgressionBanner';
|
|
65
|
-
export {
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
65
|
+
export { default as Tabs } from './components/Tabs';
|
|
66
|
+
export { default as Switch } from './components/Switch';
|
|
67
|
+
export { default as SearchBar } from './components/SearchBar';
|
|
68
68
|
export { Sidebar, SIDEBAR_MOBILE_HEIGHT } from './components/Sidebar';
|
|
69
69
|
export { Layout, Main, Content } from './components/Layout';
|
|
70
70
|
export { Nav } from './components/Nav';
|
package/dist/index.js
CHANGED
|
@@ -34,9 +34,9 @@ export { copyToClipboard } from './components/ActionsMenu/Actions/copyToClipboar
|
|
|
34
34
|
export { editAttribute } from './components/ActionsMenu/Actions/editAttribute';
|
|
35
35
|
export { others } from './components/ActionsMenu/Actions/others';
|
|
36
36
|
export { exportToText } from './components/ActionsMenu/Actions/exportToText';
|
|
37
|
-
export {
|
|
37
|
+
export { default as Avatar } from './components/Avatar';
|
|
38
38
|
export { default as BarTitle } from './components/BarTitle';
|
|
39
|
-
export {
|
|
39
|
+
export { default as Button } from './components/Button';
|
|
40
40
|
export { default as BottomSheet } from './components/BottomSheet';
|
|
41
41
|
export { default as BottomSheetItem } from './components/BottomSheet/BottomSheetItem';
|
|
42
42
|
export { default as BottomSheetHeader } from './components/BottomSheet/BottomSheetHeader';
|
|
@@ -44,7 +44,7 @@ export { default as BottomSheetTitle } from './components/BottomSheet/BottomShee
|
|
|
44
44
|
export { default as Chip } from './components/Chip';
|
|
45
45
|
export { default as ColorList } from './components/ColorList';
|
|
46
46
|
export { Dialog, default as DialogDefault } from './components/Dialog';
|
|
47
|
-
export {
|
|
47
|
+
export { default as ContactPopover } from './components/ContactPopover';
|
|
48
48
|
export { default as DropdownButton } from './components/DropdownButton';
|
|
49
49
|
export { default as DropdownText } from './components/DropdownText';
|
|
50
50
|
export { Empty, EmptySubTitle } from './components/Empty';
|
|
@@ -63,9 +63,9 @@ export { default as PointerAlert } from './components/PointerAlert';
|
|
|
63
63
|
export { default as AlertProvider } from './providers/AlertProvider';
|
|
64
64
|
export { useAlert } from './providers/AlertProvider/useAlert';
|
|
65
65
|
export { default as ProgressionBanner } from './components/ProgressionBanner';
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
68
|
-
export {
|
|
66
|
+
export { default as Tabs } from './components/Tabs';
|
|
67
|
+
export { default as Switch } from './components/Switch';
|
|
68
|
+
export { default as SearchBar } from './components/SearchBar';
|
|
69
69
|
export { Sidebar, SIDEBAR_MOBILE_HEIGHT } from './components/Sidebar';
|
|
70
70
|
export { Layout, Main, Content } from './components/Layout';
|
|
71
71
|
export { Nav } from './components/Nav';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon, Plus, Stop } from '@linagora/twake-icons';
|
|
2
2
|
import { Box, Stack } from '@mui/material';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import Button from '../components/Button';
|
|
5
5
|
const variants = ['contained', 'outlined', 'ghost', 'text'];
|
|
6
6
|
const sizes = ['small', 'medium', 'large'];
|
|
7
7
|
const colors = [
|