eai-frontend-components 2.0.15 → 2.0.16

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/dist/index.js CHANGED
@@ -3057,9 +3057,13 @@ const SidebarItemTwoLines = ({ item }) => {
3057
3057
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: '[&_svg]:size-4 text-white', children: item.iconLeft }), jsxRuntime.jsxs("div", { className: 'grid flex-1 text-left text-sm leading-tight', children: [jsxRuntime.jsx("span", { className: 'truncate font-semibold', children: item.title }), jsxRuntime.jsx("span", { className: 'truncate text-xs text-foreground', children: item.subTitle })] }), item.iconRight] }));
3058
3058
  };
3059
3059
 
3060
- const ModuleSwitcher = ({ modules, activeModule, onModuleChange, }) => {
3060
+ const ModuleSwitcher = ({ modules, activeModule, onModuleChange }) => {
3061
3061
  const { isMobile } = useSidebar();
3062
- return (jsxRuntime.jsx(SidebarMenu, { children: jsxRuntime.jsx(SidebarMenuItem, { children: jsxRuntime.jsxs(DropdownMenu, { children: [jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsx(SidebarMenuButton, { size: 'lg', className: 'data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground', children: jsxRuntime.jsx(SidebarItemTwoLines, { item: {
3062
+ return modules.length === 1 ? (jsxRuntime.jsx(SidebarMenuButton, { size: 'lg', className: 'data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground', children: jsxRuntime.jsx(SidebarItemTwoLines, { item: {
3063
+ iconLeft: jsxRuntime.jsx("div", { className: 'flex p-[7.6px] items-center rounded-md bg-background-primary', children: activeModule?.icon }),
3064
+ title: activeModule?.title ?? '',
3065
+ subTitle: activeModule?.subTitle ?? '',
3066
+ } }) })) : (jsxRuntime.jsx(SidebarMenu, { children: jsxRuntime.jsx(SidebarMenuItem, { children: jsxRuntime.jsxs(DropdownMenu, { children: [jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsx(SidebarMenuButton, { size: 'lg', className: 'data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground', children: jsxRuntime.jsx(SidebarItemTwoLines, { item: {
3063
3067
  iconLeft: (jsxRuntime.jsx("div", { className: 'flex p-[7.6px] items-center rounded-md bg-background-primary', children: activeModule?.icon })),
3064
3068
  title: activeModule?.title ?? '',
3065
3069
  subTitle: activeModule?.subTitle ?? '',