@linagora/twake-mui 16.2.0 → 16.3.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # @linagora/twake-mui [16.3.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@16.2.0...@linagora/twake-mui@16.3.0) (2026-10-22)
2
+
3
+
4
+ ### Features
5
+
6
+ * **twake-mui:** Migrate NavigationList from cozy-ui ([2bb292a](https://github.com/linagora/twake-ui/commit/2bb292a1534e53d332194b4e609210479cea9aaa))
7
+
1
8
  # @linagora/twake-mui [16.2.0](https://github.com/linagora/twake-ui/compare/@linagora/twake-mui@16.1.0...@linagora/twake-mui@16.2.0) (2026-10-21)
2
9
 
3
10
 
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import NavigationList from './index';
3
+ declare const meta: Meta<typeof NavigationList>;
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,83 @@
1
+ import { Bank, Gear, Icon, People, Right, Trash } from '@linagora/twake-icons';
2
+ import { Divider, ListItemIcon, ListItemSecondaryAction, Stack, Tab, Typography } from '@mui/material';
3
+ import React, { useState } from 'react';
4
+ import NavigationListHeader from './NavigationListHeader';
5
+ import NavigationListSection from './NavigationListSection';
6
+ import NavigationList from './index';
7
+ import ListItem from '../ListItem';
8
+ import ListItemText from '../ListItemText';
9
+ import Tabs from '../Tabs';
10
+ const rightArrow = (React.createElement(ListItemSecondaryAction, null,
11
+ React.createElement(Icon, { icon: Right, size: 16, className: "u-mr-1" })));
12
+ const sections = (React.createElement(React.Fragment, null,
13
+ React.createElement(NavigationListHeader, null, "General"),
14
+ React.createElement(NavigationListSection, null,
15
+ React.createElement(ListItem, null,
16
+ React.createElement(ListItemIcon, null,
17
+ React.createElement(Icon, { icon: Gear, size: 24 })),
18
+ React.createElement(ListItemText, { primary: "General settings" }),
19
+ rightArrow),
20
+ React.createElement(Divider, { variant: "inset" }),
21
+ React.createElement(ListItem, null,
22
+ React.createElement(ListItemIcon, null,
23
+ React.createElement(Icon, { icon: Gear, size: 32 })),
24
+ React.createElement(ListItemText, { primary: "A large icon does not change size of icon area" }),
25
+ rightArrow),
26
+ React.createElement(Divider, { variant: "inset" }),
27
+ React.createElement(ListItem, null,
28
+ React.createElement(ListItemIcon, null,
29
+ React.createElement(Icon, { icon: People, size: 16 })),
30
+ React.createElement(ListItemText, { primary: "User preferences", secondary: "Notifications and theme" }),
31
+ rightArrow),
32
+ React.createElement(Divider, { variant: "inset" }),
33
+ React.createElement(ListItem, null,
34
+ React.createElement(ListItemIcon, null,
35
+ React.createElement(Icon, { icon: Trash, size: 16, className: "u-error" })),
36
+ React.createElement(ListItemText, { primary: "Delete account", secondary: "Permanently delete all your data", slotProps: {
37
+ primary: { color: 'error' },
38
+ secondary: { color: 'error' }
39
+ } }))),
40
+ React.createElement(NavigationListHeader, null, "Accounts"),
41
+ React.createElement(NavigationListSection, null,
42
+ React.createElement(ListItem, null,
43
+ React.createElement(ListItemIcon, null,
44
+ React.createElement(Icon, { icon: Bank, size: 16 })),
45
+ React.createElement(ListItemText, { primary: "Bank accounts" }),
46
+ rightArrow))));
47
+ const TabsExample = () => {
48
+ const [tab, setTab] = useState('nav');
49
+ const handleChange = (_, value) => setTab(value);
50
+ return (React.createElement("div", null,
51
+ React.createElement(Tabs, { value: tab, onChange: handleChange },
52
+ React.createElement(Tab, { value: "nav", label: "Nav" }),
53
+ React.createElement(Tab, { value: "details", label: "Details" })),
54
+ React.createElement(Divider, { className: "u-mb-1" }),
55
+ tab === 'nav' ? React.createElement(NavigationList, null, sections) : null,
56
+ tab === 'details' ? (React.createElement(Typography, { variant: "body1" }, "Ada Lovelace wrote the first algorithm meant to be carried out by a machine.")) : null));
57
+ };
58
+ const meta = {
59
+ title: 'NavigationList',
60
+ component: NavigationList,
61
+ subcomponents: { NavigationListHeader, NavigationListSection },
62
+ tags: ['autodocs'],
63
+ argTypes: {
64
+ children: { control: false },
65
+ className: { control: 'text' },
66
+ style: { control: 'object' }
67
+ }
68
+ };
69
+ export default meta;
70
+ export const Default = {
71
+ args: {
72
+ children: sections
73
+ }
74
+ };
75
+ // Visual Regression - Combined view for Argos testing
76
+ export const Screenshot = {
77
+ tags: ['argos'],
78
+ render: () => (React.createElement(Stack, { spacing: 4 },
79
+ React.createElement("section", null,
80
+ React.createElement(NavigationList, null, sections)),
81
+ React.createElement("section", null,
82
+ React.createElement(TabsExample, null))))
83
+ };
@@ -0,0 +1,6 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface NavigationListHeaderProps {
3
+ children?: ReactNode;
4
+ }
5
+ declare const NavigationListHeader: ({ children }: NavigationListHeaderProps) => React.ReactElement;
6
+ export default NavigationListHeader;
@@ -0,0 +1,9 @@
1
+ import { Typography } from '@mui/material';
2
+ import React from 'react';
3
+ import { useBreakpoints } from '../../hooks/useBreakpoints';
4
+ import ListSubheader from '../ListSubheader';
5
+ const NavigationListHeader = ({ children }) => {
6
+ const { isMobile } = useBreakpoints();
7
+ return isMobile ? (React.createElement(ListSubheader, null, children)) : (React.createElement(Typography, { variant: "subtitle1", color: "text.secondary", className: "u-mb-1" }, children));
8
+ };
9
+ export default NavigationListHeader;
@@ -0,0 +1,6 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface NavigationListSectionProps {
3
+ children?: ReactNode;
4
+ }
5
+ declare const NavigationListSection: ({ children }: NavigationListSectionProps) => React.ReactElement;
6
+ export default NavigationListSection;
@@ -0,0 +1,8 @@
1
+ import { Box } from '@mui/material';
2
+ import React from 'react';
3
+ import { useBreakpoints } from '../../hooks/useBreakpoints';
4
+ const NavigationListSection = ({ children }) => {
5
+ const { isMobile } = useBreakpoints();
6
+ return isMobile ? (React.createElement(React.Fragment, null, children)) : (React.createElement(Box, { className: "u-ov-hidden u-mb-1-half u-bdrs-4", sx: { border: 1, borderColor: 'divider' } }, children));
7
+ };
8
+ export default NavigationListSection;
@@ -0,0 +1,12 @@
1
+ import React, { CSSProperties, ReactNode } from 'react';
2
+ export interface NavigationListProps {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ style?: CSSProperties;
6
+ }
7
+ /**
8
+ * Navigation choices grouped in sections: a plain list with subheaders on
9
+ * mobile, one bordered card per section on desktop.
10
+ */
11
+ declare const NavigationList: ({ children, className, style }: NavigationListProps) => React.ReactElement;
12
+ export default NavigationList;
@@ -0,0 +1,13 @@
1
+ import { List } from '@mui/material';
2
+ import cx from 'classnames';
3
+ import React from 'react';
4
+ import { useBreakpoints } from '../../hooks/useBreakpoints';
5
+ /**
6
+ * Navigation choices grouped in sections: a plain list with subheaders on
7
+ * mobile, one bordered card per section on desktop.
8
+ */
9
+ const NavigationList = ({ children, className, style }) => {
10
+ const { isMobile } = useBreakpoints();
11
+ return isMobile ? (React.createElement(List, { className: className, style: style }, children)) : (React.createElement("div", { className: cx('u-stack-s u-nolist', className), style: style }, children));
12
+ };
13
+ export default NavigationList;
package/dist/index.d.ts CHANGED
@@ -70,6 +70,9 @@ export { default as ListSubheader } from './components/ListSubheader';
70
70
  export { default as LoadMore } from './components/LoadMore';
71
71
  export { default as Markdown } from './components/Markdown';
72
72
  export { default as MidEllipsis } from './components/MidEllipsis';
73
+ export { default as NavigationList } from './components/NavigationList';
74
+ export { default as NavigationListHeader } from './components/NavigationList/NavigationListHeader';
75
+ export { default as NavigationListSection } from './components/NavigationList/NavigationListSection';
73
76
  export { default as PointerAlert } from './components/PointerAlert';
74
77
  export type { AlertProviderProps } from './providers/AlertProvider';
75
78
  export type { AlertContextValue, ShowAlert, ShowAlertOptions } from './providers/AlertProvider/useAlert';
@@ -170,6 +173,9 @@ export type { ListSubheaderProps } from './components/ListSubheader';
170
173
  export type { LoadMoreProps } from './components/LoadMore';
171
174
  export type { MarkdownProps } from './components/Markdown';
172
175
  export type { MidEllipsisProps } from './components/MidEllipsis';
176
+ export type { NavigationListProps } from './components/NavigationList';
177
+ export type { NavigationListHeaderProps } from './components/NavigationList/NavigationListHeader';
178
+ export type { NavigationListSectionProps } from './components/NavigationList/NavigationListSection';
173
179
  export type { TabsProps } from './components/Tabs';
174
180
  export type { SwitchProps } from './components/Switch';
175
181
  export type { SearchBarProps } from './components/SearchBar/types';
package/dist/index.js CHANGED
@@ -73,6 +73,9 @@ export { default as ListSubheader } from './components/ListSubheader';
73
73
  export { default as LoadMore } from './components/LoadMore';
74
74
  export { default as Markdown } from './components/Markdown';
75
75
  export { default as MidEllipsis } from './components/MidEllipsis';
76
+ export { default as NavigationList } from './components/NavigationList';
77
+ export { default as NavigationListHeader } from './components/NavigationList/NavigationListHeader';
78
+ export { default as NavigationListSection } from './components/NavigationList/NavigationListSection';
76
79
  export { default as PointerAlert } from './components/PointerAlert';
77
80
  export { default as AlertProvider } from './providers/AlertProvider';
78
81
  export { useAlert } from './providers/AlertProvider/useAlert';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linagora/twake-mui",
3
3
  "type": "module",
4
- "version": "16.2.0",
4
+ "version": "16.3.0",
5
5
  "description": "MUI v9 theme system for Twake applications",
6
6
  "author": "Twake",
7
7
  "license": "MIT",