@orsetra/shared-ui 1.0.63 → 1.0.66

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.
@@ -82,7 +82,7 @@ function LayoutContent({ children, sidebarMenus, user, onSignOut, mode = 'expand
82
82
  />
83
83
 
84
84
  <div className="flex-1 flex flex-col min-w-0">
85
- <header className="h-14 bg-gray-50 flex-shrink-0">
85
+ <header className="h-14 bg-gray-50 border-b border-ui-border flex-shrink-0">
86
86
  <div className="h-full px-4 md:px-6 flex items-center justify-between">
87
87
  {/* Menu button - shown when sidebar is hidden (including on mobile) */}
88
88
  {isHidden ? (
@@ -66,9 +66,12 @@ export function MainSidebar({
66
66
 
67
67
  const handleSubMenuClick = (e: React.MouseEvent, href: string) => {
68
68
  e.preventDefault()
69
+ console.log('handleSubMenuClick - href:', href)
69
70
  const path = href.startsWith('http://') || href.startsWith('https://')
70
71
  ? new URL(href).pathname
71
72
  : href
73
+ console.log('handleSubMenuClick - path:', path)
74
+ console.log('Redirecting to:', path)
72
75
  window.location.href = path
73
76
  setHoveredMenu(null)
74
77
  }
@@ -83,14 +86,14 @@ export function MainSidebar({
83
86
  )}
84
87
 
85
88
  <div className={cn(
86
- "fixed left-0 top-0 h-full bg-gray-50 z-50 transform transition-all duration-300 ease-in-out",
89
+ "fixed left-0 top-0 h-full bg-white border-r border-ui-border z-50 transform transition-all duration-300 ease-in-out",
87
90
  isMinimized ? "w-16" : "w-64 shadow-xl",
88
91
  isMinimized
89
92
  ? "translate-x-0"
90
93
  : (isOpen ? "translate-x-0" : "-translate-x-full")
91
94
  )}>
92
95
  <div className={cn(
93
- "flex items-center h-16 bg-gray-50",
96
+ "flex items-center h-16 border-b border-ui-border bg-white",
94
97
  isMinimized ? "justify-center px-2" : "justify-between px-4"
95
98
  )}>
96
99
  {!isMinimized && <Logo className="text-2xl font-semibold text-text-primary" />}
@@ -145,8 +148,8 @@ export function MainSidebar({
145
148
  </button>
146
149
 
147
150
  {isMinimized && hoveredMenu === item.id && sidebarMenus[item.id] && sidebarMenus[item.id].length > 0 && (
148
- <div className="absolute left-full top-0 ml-2 bg-white rounded-lg shadow-xl z-50 min-w-[200px] py-2">
149
- <div className="px-4 py-2">
151
+ <div className="absolute left-full top-0 ml-2 bg-white border border-ui-border rounded-lg shadow-xl z-50 min-w-[200px] py-2">
152
+ <div className="px-4 py-2 border-b border-ui-border">
150
153
  <h3 className="text-sm font-semibold text-text-primary">{item.label}</h3>
151
154
  </div>
152
155
  <div className="py-1">
@@ -204,7 +204,7 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
204
204
  || []
205
205
 
206
206
  return (
207
- <div className="h-screen sticky top-0 flex flex-col bg-gray-50 min-w-[var(--sidebar-width-icon)] transition-[width] duration-200"
207
+ <div className="h-screen sticky top-0 flex flex-col bg-gray-50 border-r border-ui-border min-w-[var(--sidebar-width-icon)] transition-[width] duration-200"
208
208
  style={{ width: state === "expanded" ? "var(--sidebar-width)" : "var(--sidebar-width-icon)" }}>
209
209
  {/* Logo avec bouton de menu principal */}
210
210
  <div className="h-14 flex items-center justify-between px-4 border-b border-ui-border">
@@ -224,7 +224,7 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
224
224
 
225
225
  {/* En-tête du menu principal sélectionné */}
226
226
  {currentMenu && menuLabels[currentMenu] && (
227
- <div className="px-4 py-3 border-ui-border">
227
+ <div className="px-4 py-3 border-b border-ui-border">
228
228
  <div className="flex items-center gap-2">
229
229
  {currentMenu === "assets" && <Rocket className="h-4 w-4 text-interactive" />}
230
230
  {currentMenu === "runtime" && <Package className="h-4 w-4 text-interactive" />}
@@ -272,10 +272,10 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
272
272
  </nav>
273
273
 
274
274
  {/* Footer - Menu Paramètres */}
275
- <div className="relative border-ui-border px-3 py-3" ref={settingsRef}>
275
+ <div className="relative border-t border-ui-border px-3 py-3" ref={settingsRef}>
276
276
  {/* Dropdown vers le haut */}
277
277
  {settingsOpen && (
278
- <div className="absolute bottom-full left-2 right-2 mb-1 bg-white border border-ui-border rounded-none shadow-lg z-50">
278
+ <div className="absolute bottom-full left-2 right-2 mb-1 bg-gray-50 border border-ui-border rounded-none shadow-lg z-50">
279
279
  <div className="py-1">
280
280
  <Link
281
281
  href={`${main_base_url}/organization`}
@@ -518,6 +518,7 @@ const SidebarGroupAction = React.forwardRef<
518
518
  data-sidebar="group-action"
519
519
  className={cn(
520
520
  "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
521
+ // Increases the hit area of the button on mobile.
521
522
  "after:absolute after:-inset-2 after:md:hidden",
522
523
  "group-data-[collapsible=icon]:hidden",
523
524
  className
@@ -663,6 +664,7 @@ const SidebarMenuAction = React.forwardRef<
663
664
  data-sidebar="menu-action"
664
665
  className={cn(
665
666
  "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
667
+ // Increases the hit area of the button on mobile.
666
668
  "after:absolute after:-inset-2 after:md:hidden",
667
669
  "peer-data-[size=sm]/menu-button:top-1",
668
670
  "peer-data-[size=default]/menu-button:top-1.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orsetra/shared-ui",
3
- "version": "1.0.63",
3
+ "version": "1.0.66",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",