@linagora/twake-mui 14.4.0 → 15.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 +36 -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/Nav/index.d.ts +4 -3
- package/dist/components/Nav/index.js +17 -9
- package/dist/components/NavDesktopDropdown/index.js +4 -2
- package/dist/components/NavDesktopLimiter/index.js +5 -3
- package/dist/components/NavIcon/index.js +18 -10
- package/dist/components/NavItem/NavItemRoot.d.ts +1 -0
- package/dist/components/NavItem/NavItemRoot.js +18 -14
- package/dist/components/NavItem/index.js +4 -2
- package/dist/components/NavLink/NavDropdown.d.ts +2 -1
- package/dist/components/NavLink/NavDropdown.js +19 -5
- package/dist/components/NavLink/NavLinkBase.js +7 -3
- package/dist/components/NavLink/NavLinkRoot.d.ts +3 -2
- package/dist/components/NavLink/NavLinkRoot.js +19 -15
- package/dist/components/NavLink/locales/de.json +6 -0
- package/dist/components/NavLink/locales/en.json +6 -0
- package/dist/components/NavLink/locales/es.json +6 -0
- package/dist/components/NavLink/locales/fr.json +6 -0
- package/dist/components/NavLink/locales/it.json +6 -0
- package/dist/components/NavLink/locales/ru.json +6 -0
- package/dist/components/NavLink/locales/vi.json +6 -0
- package/dist/components/NavText/NavPrimaryText.d.ts +3 -2
- package/dist/components/NavText/NavPrimaryText.js +11 -7
- package/dist/components/NavText/index.js +4 -2
- 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/Sidebar/Sidebar.stories.d.ts +1 -0
- package/dist/components/Sidebar/Sidebar.stories.js +22 -2
- package/dist/components/Sidebar/SidebarContext.d.ts +1 -0
- package/dist/components/Sidebar/SidebarContext.js +2 -0
- package/dist/components/Sidebar/index.d.ts +6 -3
- package/dist/components/Sidebar/index.js +31 -16
- 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,39 @@
|
|
|
1
|
+
# @linagora/twake-mui [15.1.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@15.0.0...@linagora/twake-mui@15.1.0) (2026-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **twake-mui:** Implement sidebar drawer ([43a443b](https://github.com/linagora/twake-ui/commit/43a443bcff5719c828382230971beb83be4fb10a))
|
|
7
|
+
* **twake-mui:** Separate click and toggle event in NavDropdown ([4ae7157](https://github.com/linagora/twake-ui/commit/4ae715714a04ba4eb606c598b7ec4e715c511dca))
|
|
8
|
+
|
|
9
|
+
# @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)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Code Refactoring
|
|
13
|
+
|
|
14
|
+
* **twake-mui:** Export Avatar as default only ([a7a138e](https://github.com/linagora/twake-ui/commit/a7a138e0cf2e731fb5eba00bc7dfdbe2c8993f0b))
|
|
15
|
+
* **twake-mui:** Export Button as default only ([c5ac445](https://github.com/linagora/twake-ui/commit/c5ac445f3f438e1d3f366c906067b18fd19e2ded))
|
|
16
|
+
* **twake-mui:** Export ContactPopover as default only ([e74ddbe](https://github.com/linagora/twake-ui/commit/e74ddbec7a0fe526d508075364cc52d586cc26db))
|
|
17
|
+
* **twake-mui:** Export SearchBar as default only ([34d0050](https://github.com/linagora/twake-ui/commit/34d00502da7c41edfcf841a49494b139cf977d9f))
|
|
18
|
+
* **twake-mui:** Export Switch as default only ([b22aebc](https://github.com/linagora/twake-ui/commit/b22aebc9809137eb8a7effb30f8dd5ed98ff97cc))
|
|
19
|
+
* **twake-mui:** Export Tabs as default only ([47d31fe](https://github.com/linagora/twake-ui/commit/47d31fea3c68ba104ff92f455b7ca0db47d43cab))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **twake-mui:** ContactPopoverDefault is no longer exported. Import
|
|
25
|
+
ContactPopover instead.
|
|
26
|
+
* **twake-mui:** SearchBarDefault is no longer exported. Import SearchBar
|
|
27
|
+
instead.
|
|
28
|
+
* **twake-mui:** SwitchDefault is no longer exported. Import Switch
|
|
29
|
+
instead.
|
|
30
|
+
* **twake-mui:** TabsDefault is no longer exported. Import Tabs
|
|
31
|
+
instead.
|
|
32
|
+
* **twake-mui:** ButtonDefault is no longer exported. Import Button
|
|
33
|
+
instead.
|
|
34
|
+
* **twake-mui:** AvatarDefault is no longer exported. Import Avatar
|
|
35
|
+
instead.
|
|
36
|
+
|
|
1
37
|
# @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
38
|
|
|
3
39
|
|
|
@@ -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,6 +1,7 @@
|
|
|
1
|
-
import { Theme } from '@mui/material/styles';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
declare const NavRoot: import("@emotion/styled").StyledComponent<import("@mui/material").ListOwnProps & Omit<import("@mui/material").ListOwnProps, keyof import("@mui/material").ListOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "style" | "className" | "children" | "dense" | "disablePadding" | "classes" | "sx" | "subheader"> & import("@mui/system").MUIStyledCommonProps<Theme
|
|
4
|
-
|
|
2
|
+
declare const NavRoot: import("@emotion/styled").StyledComponent<import("@mui/material").ListOwnProps & Omit<import("@mui/material").ListOwnProps, keyof import("@mui/material").ListOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "style" | "className" | "children" | "dense" | "disablePadding" | "classes" | "sx" | "subheader"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
|
+
disableMobileView: boolean;
|
|
4
|
+
}, {}, {}>;
|
|
5
|
+
export type NavProps = Omit<React.ComponentProps<typeof NavRoot>, 'disableMobileView'>;
|
|
5
6
|
export declare const Nav: (props: NavProps) => React.ReactElement;
|
|
6
7
|
export {};
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { List } from '@mui/material';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
5
|
+
const NavRoot = styled(List, {
|
|
6
|
+
shouldForwardProp: prop => prop !== 'disableMobileView'
|
|
7
|
+
})(({ theme, disableMobileView }) => ({
|
|
5
8
|
margin: '24px 0',
|
|
6
9
|
padding: 0,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
...(!disableMobileView && {
|
|
11
|
+
[theme.breakpoints.down('lg')]: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
justifyContent: 'space-around',
|
|
14
|
+
margin: '6px 0 4px'
|
|
15
|
+
}
|
|
16
|
+
})
|
|
12
17
|
}));
|
|
13
|
-
export const Nav = (props) =>
|
|
14
|
-
|
|
18
|
+
export const Nav = (props) => {
|
|
19
|
+
const disableMobileView = useContext(SidebarContext);
|
|
20
|
+
return (React.createElement("nav", null,
|
|
21
|
+
React.createElement(NavRoot, { ...props, disableMobileView: disableMobileView })));
|
|
22
|
+
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import React, { Children, isValidElement, useState } from 'react';
|
|
1
|
+
import React, { Children, isValidElement, useState, useContext } from 'react';
|
|
2
2
|
import { useBreakpoints } from '../../hooks/useBreakpoints';
|
|
3
3
|
import DropdownText from '../DropdownText';
|
|
4
4
|
import ListItem from '../ListItem';
|
|
5
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
5
6
|
export const NavDesktopDropdown = ({ label, children, defaultOpen = true, limit = 5 }) => {
|
|
7
|
+
const disableMobileView = useContext(SidebarContext);
|
|
6
8
|
const { isDesktop } = useBreakpoints();
|
|
7
9
|
const [open, setOpen] = useState(defaultOpen);
|
|
8
10
|
const isActivated = Children.toArray(children).filter(isValidElement).length > limit;
|
|
9
11
|
const onToggle = () => setOpen(current => !current);
|
|
10
|
-
if (!isDesktop)
|
|
12
|
+
if (!isDesktop && !disableMobileView)
|
|
11
13
|
return null;
|
|
12
14
|
return (React.createElement(React.Fragment, null,
|
|
13
15
|
React.createElement(ListItem, { size: "small", sx: { cursor: isActivated ? 'pointer' : undefined } },
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Bottom, Top } from '@linagora/twake-icons';
|
|
2
|
-
import React, { Children, isValidElement, useState } from 'react';
|
|
2
|
+
import React, { Children, isValidElement, useState, useContext } from 'react';
|
|
3
3
|
import { useExtendI18n, useI18n } from 'twake-i18n';
|
|
4
4
|
import { NavIcon } from '../NavIcon';
|
|
5
5
|
import { NavItem } from '../NavItem';
|
|
6
6
|
import { NavLink } from '../NavLink/NavLink';
|
|
7
7
|
import NavText from '../NavText';
|
|
8
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
8
9
|
import de from './locales/de.json';
|
|
9
10
|
import en from './locales/en.json';
|
|
10
11
|
import es from './locales/es.json';
|
|
@@ -16,12 +17,13 @@ import { useBreakpoints } from '../../hooks/useBreakpoints';
|
|
|
16
17
|
const locales = { de, en, es, fr, it, ru, vi };
|
|
17
18
|
export const NavDesktopLimiter = ({ children, max = 5 }) => {
|
|
18
19
|
useExtendI18n(locales);
|
|
20
|
+
const disableMobileView = useContext(SidebarContext);
|
|
19
21
|
const { t } = useI18n();
|
|
20
22
|
const [viewingAll, setViewingAll] = useState(false);
|
|
21
|
-
const {
|
|
23
|
+
const { isDesktop } = useBreakpoints();
|
|
22
24
|
const items = Children.toArray(children).filter(isValidElement);
|
|
23
25
|
const amountHidden = Math.max(0, items.length - max);
|
|
24
|
-
if (
|
|
26
|
+
if (!isDesktop && !disableMobileView)
|
|
25
27
|
return null;
|
|
26
28
|
return (React.createElement(React.Fragment, null,
|
|
27
29
|
viewingAll ? items : items.slice(0, max),
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import { Icon } from '@linagora/twake-icons';
|
|
2
2
|
import { ListItemIcon } from '@mui/material';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
6
|
+
const NavIconRoot = styled(ListItemIcon, {
|
|
7
|
+
shouldForwardProp: prop => prop !== 'disableMobileView'
|
|
8
|
+
})(({ theme, disableMobileView }) => ({
|
|
6
9
|
minWidth: 0,
|
|
7
10
|
width: 'auto',
|
|
8
11
|
height: 'auto',
|
|
9
12
|
marginRight: 12,
|
|
10
13
|
color: theme.vars.palette.text.primary,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
...(!disableMobileView && {
|
|
15
|
+
[theme.breakpoints.down('lg')]: {
|
|
16
|
+
display: 'block',
|
|
17
|
+
marginRight: 0,
|
|
18
|
+
color: theme.vars.palette.text.secondary,
|
|
19
|
+
'& svg': { margin: '4px auto 5px', width: 16, height: 16 }
|
|
20
|
+
}
|
|
21
|
+
})
|
|
17
22
|
}));
|
|
18
|
-
export const NavIcon = ({ icon, ...props }) =>
|
|
19
|
-
|
|
23
|
+
export const NavIcon = ({ icon, ...props }) => {
|
|
24
|
+
const disableMobileView = useContext(SidebarContext);
|
|
25
|
+
return (React.createElement(NavIconRoot, { disableMobileView: disableMobileView, ...props },
|
|
26
|
+
React.createElement(Icon, { icon: icon, "aria-hidden": "true", focusable: "false" })));
|
|
27
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const NavItemRoot: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "style" | "className" | "children" | "alignItems" | "dense" | "disablePadding" | "disableGutters" | "classes" | "sx" | "divider" | "slotProps" | "slots" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
2
2
|
variant?: "primary" | "secondary" | "tertiary";
|
|
3
|
+
disableMobileView?: boolean;
|
|
3
4
|
}, {}, {}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ListItem } from '@mui/material';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
export const NavItemRoot = styled(ListItem, {
|
|
4
|
-
shouldForwardProp: prop => prop !== 'secondary' && prop !== 'variant'
|
|
5
|
-
})(({ theme, variant = 'primary' }) => {
|
|
4
|
+
shouldForwardProp: prop => prop !== 'secondary' && prop !== 'variant' && prop !== 'disableMobileView'
|
|
5
|
+
})(({ theme, variant = 'primary', disableMobileView = false }) => {
|
|
6
6
|
const isSecondary = variant === 'secondary';
|
|
7
7
|
const isTertiary = variant === 'tertiary';
|
|
8
8
|
return {
|
|
@@ -27,22 +27,26 @@ export const NavItemRoot = styled(ListItem, {
|
|
|
27
27
|
backgroundColor: theme.vars.palette.action.focus
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
...(!disableMobileView && {
|
|
31
|
+
[theme.breakpoints.down('lg')]: {
|
|
32
|
+
display: 'block',
|
|
33
|
+
height: 'auto',
|
|
34
|
+
margin: '0 12px',
|
|
35
|
+
flex: '0 0 40px',
|
|
36
|
+
[`&.Mui-selected, &:has(.Mui-selected), &:has(.active)`]: {
|
|
37
|
+
color: theme.vars.palette.text.primary,
|
|
38
|
+
backgroundColor: 'transparent',
|
|
39
|
+
'&:hover': {
|
|
40
|
+
backgroundColor: 'transparent'
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
|
-
},
|
|
44
|
+
}),
|
|
43
45
|
...((isSecondary || isTertiary) && {
|
|
44
46
|
margin: '3px 16px',
|
|
45
|
-
|
|
47
|
+
...(!disableMobileView && {
|
|
48
|
+
[theme.breakpoints.down('lg')]: { display: 'none' }
|
|
49
|
+
}),
|
|
46
50
|
paddingLeft: isTertiary ? '3rem' : '2rem'
|
|
47
51
|
})
|
|
48
52
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Divider } from '@mui/material';
|
|
2
2
|
import cx from 'classnames';
|
|
3
|
-
import React, { forwardRef } from 'react';
|
|
3
|
+
import React, { forwardRef, useContext } from 'react';
|
|
4
4
|
import { NavBadge } from './NavBadge';
|
|
5
5
|
import { NavIndicator } from './NavIndicator';
|
|
6
6
|
import { NavItemActions } from './NavItemActions';
|
|
7
7
|
import { NavItemRoot } from './NavItemRoot';
|
|
8
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
8
9
|
export const NavItem = forwardRef((props, ref) => {
|
|
9
10
|
const { variant = 'primary', selected, children, className, badge, hasIndicator, secondaryAction, divider, ...rest } = props;
|
|
11
|
+
const disableMobileView = useContext(SidebarContext);
|
|
10
12
|
return (React.createElement(React.Fragment, null,
|
|
11
|
-
React.createElement(NavItemRoot, { ref: ref, variant: variant, className: cx(className, selected && 'Mui-selected'), ...rest },
|
|
13
|
+
React.createElement(NavItemRoot, { ref: ref, variant: variant, disableMobileView: disableMobileView, className: cx(className, selected && 'Mui-selected'), ...rest },
|
|
12
14
|
children,
|
|
13
15
|
(hasIndicator || badge || secondaryAction) && (React.createElement(NavItemActions, null,
|
|
14
16
|
hasIndicator && React.createElement(NavIndicator, null),
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { NavLinkBaseProps } from './NavLinkBase';
|
|
3
3
|
export interface NavDropdownProps extends Omit<NavLinkBaseProps, 'onToggle'> {
|
|
4
4
|
open?: boolean;
|
|
5
|
-
onToggle?:
|
|
5
|
+
onToggle?: () => void;
|
|
6
|
+
toggleLabel?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare const NavDropdown: React.ForwardRefExoticComponent<NavDropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
import { Icon, Dropdown } from '@linagora/twake-icons';
|
|
2
|
+
import { IconButton } from '@mui/material';
|
|
2
3
|
import { useTheme } from '@mui/material/styles';
|
|
3
4
|
import React, { forwardRef } from 'react';
|
|
5
|
+
import { useExtendI18n, useI18n } from 'twake-i18n';
|
|
4
6
|
import { NavLinkBase } from './NavLinkBase';
|
|
5
|
-
|
|
7
|
+
import de from './locales/de.json';
|
|
8
|
+
import en from './locales/en.json';
|
|
9
|
+
import es from './locales/es.json';
|
|
10
|
+
import fr from './locales/fr.json';
|
|
11
|
+
import it from './locales/it.json';
|
|
12
|
+
import ru from './locales/ru.json';
|
|
13
|
+
import vi from './locales/vi.json';
|
|
14
|
+
const locales = { de, en, es, fr, it, ru, vi };
|
|
15
|
+
export const NavDropdown = forwardRef(({ open, onToggle, toggleLabel, onClick, children, ...rest }, ref) => {
|
|
16
|
+
useExtendI18n(locales);
|
|
17
|
+
const { t } = useI18n();
|
|
6
18
|
const theme = useTheme();
|
|
7
19
|
const handleClick = (e) => {
|
|
8
|
-
if (onToggle) {
|
|
9
|
-
onToggle(e);
|
|
10
|
-
}
|
|
11
20
|
if (onClick) {
|
|
12
21
|
onClick(e);
|
|
13
22
|
}
|
|
14
23
|
};
|
|
15
24
|
return (React.createElement(NavLinkBase, { ref: ref, onClick: handleClick, "aria-expanded": open, ...rest },
|
|
16
25
|
children,
|
|
17
|
-
React.createElement(
|
|
26
|
+
React.createElement(IconButton, { className: "u-ml-half", size: "xsmall", "aria-label": toggleLabel ??
|
|
27
|
+
t(open ? 'NavDropdown.collapse' : 'NavDropdown.expand'), "aria-expanded": open, onClick: e => {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
onToggle?.();
|
|
30
|
+
} },
|
|
31
|
+
React.createElement(Icon, { icon: Dropdown, rotate: open ? 0 : -90, size: 14, color: theme.vars.palette.text.primary }))));
|
|
18
32
|
});
|
|
19
33
|
NavDropdown.displayName = 'NavDropdown';
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import cx from 'classnames';
|
|
2
|
-
import React, { forwardRef } from 'react';
|
|
2
|
+
import React, { forwardRef, useContext } from 'react';
|
|
3
3
|
import { NavLinkRoot } from './NavLinkRoot';
|
|
4
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
4
5
|
export const NavLinkBase = forwardRef(({ selected, onClick, onKeyDown, className, children, ...rest }, ref) => {
|
|
5
|
-
|
|
6
|
+
const disableMobileView = useContext(SidebarContext);
|
|
7
|
+
return (React.createElement(NavLinkRoot, { ref: ref, disableMobileView: disableMobileView, role: "button", tabIndex: 0, onClick: onClick, onKeyDown: (e) => {
|
|
6
8
|
if (onKeyDown) {
|
|
7
9
|
onKeyDown(e);
|
|
8
10
|
}
|
|
9
|
-
if (
|
|
11
|
+
if (e.target === e.currentTarget &&
|
|
12
|
+
!e.defaultPrevented &&
|
|
13
|
+
(e.key === 'Enter' || e.key === ' ')) {
|
|
10
14
|
e.preventDefault();
|
|
11
15
|
e.currentTarget.click();
|
|
12
16
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const NavLinkRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
2
|
+
disableMobileView?: boolean;
|
|
3
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
|
-
export const NavLinkRoot = styled('div'
|
|
2
|
+
export const NavLinkRoot = styled('div', {
|
|
3
|
+
shouldForwardProp: prop => prop !== 'disableMobileView'
|
|
4
|
+
})(({ theme, disableMobileView }) => ({
|
|
3
5
|
padding: 8,
|
|
4
6
|
width: '100%',
|
|
5
7
|
height: '100%',
|
|
@@ -22,20 +24,22 @@ export const NavLinkRoot = styled('div')(({ theme }) => ({
|
|
|
22
24
|
color: theme.vars.palette.primary.main
|
|
23
25
|
}
|
|
24
26
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
...(!disableMobileView && {
|
|
28
|
+
[theme.breakpoints.down('lg')]: {
|
|
29
|
+
display: 'block',
|
|
30
|
+
height: 'auto',
|
|
31
|
+
margin: 0,
|
|
32
|
+
padding: 0,
|
|
33
|
+
textAlign: 'center',
|
|
34
|
+
fontSize: theme.typography.pxToRem(11),
|
|
35
|
+
lineHeight: '12px',
|
|
36
|
+
'&.selected, &.active': {
|
|
37
|
+
color: theme.vars.palette.text.primary,
|
|
38
|
+
'&:hover': { backgroundColor: 'transparent' },
|
|
39
|
+
'& svg, & span': {
|
|
40
|
+
color: theme.vars.palette.text.primary
|
|
41
|
+
}
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
}
|
|
44
|
+
})
|
|
41
45
|
}));
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const NavPrimaryText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
2
|
+
disableMobileView?: boolean;
|
|
3
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
|
-
export const NavPrimaryText = styled('span'
|
|
2
|
+
export const NavPrimaryText = styled('span', {
|
|
3
|
+
shouldForwardProp: prop => prop !== 'disableMobileView'
|
|
4
|
+
})(({ theme, disableMobileView }) => ({
|
|
3
5
|
fontSize: theme.typography.pxToRem(14),
|
|
4
6
|
fontWeight: 500,
|
|
5
7
|
letterSpacing: '.15px',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
...(!disableMobileView && {
|
|
9
|
+
[theme.breakpoints.down('lg')]: {
|
|
10
|
+
display: 'block',
|
|
11
|
+
textAlign: 'center',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
fontSize: theme.typography.pxToRem(12)
|
|
14
|
+
}
|
|
15
|
+
})
|
|
12
16
|
}));
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
2
|
import { NavPrimaryText } from './NavPrimaryText';
|
|
3
3
|
import { NavSecondaryText } from './NavSecondaryText';
|
|
4
4
|
import { NavTertiaryText } from './NavTertiaryText';
|
|
5
5
|
import { NavTextRoot } from './NavTextRoot';
|
|
6
|
+
import { SidebarContext } from '../Sidebar/SidebarContext';
|
|
6
7
|
const NavText = React.forwardRef(({ secondaryText, tertiaryText, tertiaryIcon, children, sx, ...rest }, ref) => {
|
|
8
|
+
const disableMobileView = useContext(SidebarContext);
|
|
7
9
|
return (React.createElement(NavTextRoot, { ref: ref, sx: sx, ...rest },
|
|
8
|
-
React.createElement(NavPrimaryText,
|
|
10
|
+
React.createElement(NavPrimaryText, { disableMobileView: disableMobileView }, children),
|
|
9
11
|
secondaryText && React.createElement(NavSecondaryText, null, secondaryText),
|
|
10
12
|
(tertiaryText || tertiaryIcon) && (React.createElement(NavTertiaryText, null,
|
|
11
13
|
tertiaryIcon,
|
|
@@ -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);
|
|
@@ -21,8 +21,7 @@ const SidebarDemo = (props) => {
|
|
|
21
21
|
React.createElement(Sidebar, { ...props },
|
|
22
22
|
React.createElement(Nav, null,
|
|
23
23
|
React.createElement(NavItem, null,
|
|
24
|
-
React.createElement(NavDropdown, { ...makeProps(['Section 1']), open: openSection1, onToggle: (
|
|
25
|
-
e.stopPropagation();
|
|
24
|
+
React.createElement(NavDropdown, { ...makeProps(['Section 1']), open: openSection1, onToggle: () => {
|
|
26
25
|
setOpenSection1(prev => !prev);
|
|
27
26
|
} },
|
|
28
27
|
React.createElement(NavIcon, { icon: Warn }),
|
|
@@ -52,6 +51,14 @@ const meta = {
|
|
|
52
51
|
title: 'Sidebar',
|
|
53
52
|
component: Sidebar,
|
|
54
53
|
tags: ['autodocs'],
|
|
54
|
+
argTypes: {
|
|
55
|
+
anchor: { control: 'radio', options: ['bottom', 'left'] },
|
|
56
|
+
open: { control: 'boolean' }
|
|
57
|
+
},
|
|
58
|
+
args: {
|
|
59
|
+
anchor: 'bottom',
|
|
60
|
+
open: false
|
|
61
|
+
},
|
|
55
62
|
render: args => React.createElement(SidebarDemo, { ...args })
|
|
56
63
|
};
|
|
57
64
|
export default meta;
|
|
@@ -60,3 +67,16 @@ export const Default = {};
|
|
|
60
67
|
export const Screenshot = {
|
|
61
68
|
tags: ['argos']
|
|
62
69
|
};
|
|
70
|
+
export const DrawerMobile = {
|
|
71
|
+
tags: ['argos', '!autodocs'],
|
|
72
|
+
globals: { viewport: 'mobile' },
|
|
73
|
+
args: { anchor: 'left', open: true },
|
|
74
|
+
parameters: {
|
|
75
|
+
argos: {
|
|
76
|
+
modes: {
|
|
77
|
+
'desktop-light': { disabled: true },
|
|
78
|
+
'desktop-dark': { disabled: true }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SidebarContext: import("react").Context<boolean>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { SxProps } from '@mui/material';
|
|
2
|
-
import { Theme } from '@mui/material/styles';
|
|
1
|
+
import { DrawerProps, SxProps, Theme } from '@mui/material';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
export declare const SIDEBAR_MOBILE_HEIGHT = "--sidebarHeight";
|
|
5
4
|
export interface SidebarProps extends React.ComponentPropsWithoutRef<'aside'> {
|
|
6
5
|
sx?: SxProps<Theme>;
|
|
6
|
+
/** Mobile presentation: a bottom bar or a temporary left drawer. */
|
|
7
|
+
anchor?: 'bottom' | 'left';
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onClose?: DrawerProps['onClose'];
|
|
7
10
|
}
|
|
8
|
-
export declare const Sidebar: React.
|
|
11
|
+
export declare const Sidebar: ({ children, anchor, open, onClose, sx, ...rest }: SidebarProps) => React.ReactElement;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { GlobalStyles } from '@mui/material';
|
|
1
|
+
import { Drawer, GlobalStyles } from '@mui/material';
|
|
2
2
|
import { styled } from '@mui/material/styles';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { SidebarContext } from './SidebarContext';
|
|
5
|
+
import { useBreakpoints } from '../../hooks/useBreakpoints';
|
|
4
6
|
export const SIDEBAR_MOBILE_HEIGHT = '--sidebarHeight';
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
+
const SidebarRoot = styled('aside', {
|
|
8
|
+
shouldForwardProp: prop => prop !== 'anchor'
|
|
9
|
+
})(({ theme, anchor }) => ({
|
|
7
10
|
width: 236,
|
|
8
11
|
flex: '0 0 auto',
|
|
9
12
|
display: 'flex',
|
|
@@ -11,18 +14,30 @@ const SidebarRoot = styled('aside')(({ theme }) => ({
|
|
|
11
14
|
overflowX: 'hidden',
|
|
12
15
|
overflowY: 'auto',
|
|
13
16
|
backgroundColor: theme.vars.palette.background.default,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
...(anchor === 'bottom' && {
|
|
18
|
+
[theme.breakpoints.down('lg')]: {
|
|
19
|
+
position: 'fixed',
|
|
20
|
+
bottom: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
width: '100%',
|
|
23
|
+
height: `var(${SIDEBAR_MOBILE_HEIGHT}, 52px)`,
|
|
24
|
+
boxSizing: 'content-box',
|
|
25
|
+
display: 'block',
|
|
26
|
+
borderTop: `1px solid ${theme.vars.palette.divider}`,
|
|
27
|
+
zIndex: theme.zIndex.appBar
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}));
|
|
31
|
+
const SidebarDrawer = styled(Drawer)(({ theme }) => ({
|
|
32
|
+
'& .MuiDrawer-paper': {
|
|
33
|
+
width: 300,
|
|
34
|
+
maxWidth: 'calc(100vw - 56px)',
|
|
35
|
+
backgroundColor: theme.vars.palette.background.default
|
|
24
36
|
}
|
|
25
37
|
}));
|
|
26
|
-
export const Sidebar =
|
|
27
|
-
|
|
28
|
-
React.createElement(
|
|
38
|
+
export const Sidebar = ({ children, anchor = 'bottom', open = false, onClose, sx, ...rest }) => {
|
|
39
|
+
const { isDesktop } = useBreakpoints();
|
|
40
|
+
return (React.createElement(SidebarContext.Provider, { value: anchor === 'left' },
|
|
41
|
+
anchor === 'bottom' && (React.createElement(GlobalStyles, { styles: { ':root': { [SIDEBAR_MOBILE_HEIGHT]: '52px' } } })),
|
|
42
|
+
anchor === 'left' && !isDesktop ? (React.createElement(SidebarDrawer, { ...rest, variant: "temporary", anchor: "left", open: open, onClose: onClose, sx: sx }, children)) : (React.createElement(SidebarRoot, { anchor: anchor, sx: sx, ...rest }, children))));
|
|
43
|
+
};
|
|
@@ -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 = [
|