@caratlogic/design-system 0.1.2 → 0.1.3

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.esm.js CHANGED
@@ -65512,7 +65512,7 @@ const ShellHeader = ({ pageMeta, breadcrumbLeafOverride, user, profileMenuItems,
65512
65512
  const breadcrumb = resolveBreadcrumb(pageMeta, breadcrumbLeafOverride);
65513
65513
  return (jsxs(Navbar, { "aria-label": "Top navigation", children: [jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [isMobile && jsx(SidebarTrigger, {}), breadcrumb ? (jsx(NavbarTitle, { items: breadcrumb })) : (pageMeta?.title && jsx(NavbarTitle, { title: pageMeta.title }))] }), jsxs(NavbarActions, { gap: "lg", children: [headerActionsSlot, showThemeToggle && (jsx(NavbarIconButton, { "aria-label": isDark ? 'Switch to light theme' : 'Switch to dark theme', size: "md", onClick: onToggleTheme, children: isDark ? jsx(Sun, { size: 20 }) : jsx(Moon, { size: 20 }) })), showNotifications && (jsx(NavbarIconButton, { "aria-label": "Notifications", size: "md", indicator: notificationsIndicator || undefined, onClick: onNotificationsClick, children: jsx(Bell, { size: 20 }) })), jsx(ProfileMenu, { user: user, profileMenuItems: profileMenuItems, onLogout: onLogout })] })] }));
65514
65514
  };
65515
- const DashboardShell = ({ brand, navGroups, currentPath, onNavigate, pageMeta, breadcrumbLeafOverride, user, profileMenuItems, onLogout, showThemeToggle, isDark, onToggleTheme, showNotifications, notificationsIndicator, onNotificationsClick, headerActionsSlot, sidebarWidth, children, }) => (jsxs(SidebarProvider, { className: "h-screen min-h-0", style: { '--sidebar-width': sidebarWidth ?? DEFAULT_SIDEBAR_WIDTH }, children: [jsx(ShellSidebar, { brand: brand, navGroups: navGroups, currentPath: currentPath, onNavigate: onNavigate }), jsxs(SidebarInset, { className: "flex h-screen flex-col overflow-hidden bg-background", children: [jsx(ShellHeader, { pageMeta: pageMeta, breadcrumbLeafOverride: breadcrumbLeafOverride, user: user, profileMenuItems: profileMenuItems, onLogout: onLogout, showThemeToggle: showThemeToggle, isDark: isDark, onToggleTheme: onToggleTheme, showNotifications: showNotifications, notificationsIndicator: notificationsIndicator, onNotificationsClick: onNotificationsClick, headerActionsSlot: headerActionsSlot }), jsx("main", { className: "flex-1 min-h-0 overflow-y-auto", children: children })] })] }));
65515
+ const DashboardShell = ({ brand, navGroups, currentPath, onNavigate, pageMeta, breadcrumbLeafOverride, user, profileMenuItems, onLogout, showThemeToggle, isDark, onToggleTheme, showNotifications, notificationsIndicator, onNotificationsClick, headerActionsSlot, sidebarWidth, children, }) => (jsxs(SidebarProvider, { className: "h-screen min-h-0", style: { '--sidebar-width': sidebarWidth ?? DEFAULT_SIDEBAR_WIDTH }, children: [jsx(ShellSidebar, { brand: brand, navGroups: navGroups, currentPath: currentPath, onNavigate: onNavigate }), jsxs(SidebarInset, { className: "flex h-screen flex-col overflow-hidden bg-background", children: [jsx(ShellHeader, { pageMeta: pageMeta, breadcrumbLeafOverride: breadcrumbLeafOverride, user: user, profileMenuItems: profileMenuItems, onLogout: onLogout, showThemeToggle: showThemeToggle, isDark: isDark, onToggleTheme: onToggleTheme, showNotifications: showNotifications, notificationsIndicator: notificationsIndicator, onNotificationsClick: onNotificationsClick, headerActionsSlot: headerActionsSlot }), jsx("main", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children: children })] })] }));
65516
65516
 
65517
65517
  function CreateFormPageHeader({ title, onBack, backLabel = 'Go back', }) {
65518
65518
  return (jsxs("div", { className: "mb-4 flex items-center justify-between gap-4", children: [jsx("h1", { className: "min-w-0 text-xl font-semibold leading-7 text-foreground", children: title }), jsx("div", { className: "flex shrink-0 items-center gap-2", children: jsxs(Button$1, { type: "button", variant: "ghost", onClick: onBack, className: "h-8 shrink-0 gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium text-secondary-foreground hover:text-secondary-foreground", children: [jsx(ChevronLeft, { className: "h-4 w-4", "aria-hidden": true }), backLabel] }) })] }));