@orsetra/shared-ui 1.0.53 → 1.0.60

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-white border-b border-ui-border flex-shrink-0">
85
+ <header className="h-14 bg-gray-50 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,12 +66,9 @@ export function MainSidebar({
66
66
 
67
67
  const handleSubMenuClick = (e: React.MouseEvent, href: string) => {
68
68
  e.preventDefault()
69
- console.log('handleSubMenuClick - href:', href)
70
69
  const path = href.startsWith('http://') || href.startsWith('https://')
71
70
  ? new URL(href).pathname
72
71
  : href
73
- console.log('handleSubMenuClick - path:', path)
74
- console.log('Redirecting to:', path)
75
72
  window.location.href = path
76
73
  setHoveredMenu(null)
77
74
  }
@@ -86,14 +83,14 @@ export function MainSidebar({
86
83
  )}
87
84
 
88
85
  <div className={cn(
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",
86
+ "fixed left-0 top-0 h-full bg-gray-50 z-50 transform transition-all duration-300 ease-in-out",
90
87
  isMinimized ? "w-16" : "w-64 shadow-xl",
91
88
  isMinimized
92
89
  ? "translate-x-0"
93
90
  : (isOpen ? "translate-x-0" : "-translate-x-full")
94
91
  )}>
95
92
  <div className={cn(
96
- "flex items-center h-16 border-b border-ui-border bg-white",
93
+ "flex items-center h-16 bg-gray-50",
97
94
  isMinimized ? "justify-center px-2" : "justify-between px-4"
98
95
  )}>
99
96
  {!isMinimized && <Logo className="text-2xl font-semibold text-text-primary" />}
@@ -148,8 +145,8 @@ export function MainSidebar({
148
145
  </button>
149
146
 
150
147
  {isMinimized && hoveredMenu === item.id && sidebarMenus[item.id] && sidebarMenus[item.id].length > 0 && (
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">
148
+ <div className="absolute left-full top-0 ml-2 bg-gray-50 rounded-lg shadow-xl z-50 min-w-[200px] py-2">
149
+ <div className="px-4 py-2 bg-gray-50">
153
150
  <h3 className="text-sm font-semibold text-text-primary">{item.label}</h3>
154
151
  </div>
155
152
  <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-white border-r border-ui-border min-w-[var(--sidebar-width-icon)] transition-[width] duration-200"
207
+ <div className="h-screen sticky top-0 flex flex-col bg-gray-50 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">
@@ -244,16 +244,12 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
244
244
  const isActive = pathname === item.href || pathname.startsWith(`${item.href}/`)
245
245
 
246
246
  const handleClick = (e: React.MouseEvent) => {
247
- e.preventDefault()
248
- console.log('Sidebar handleClick - item.name:', item.name)
249
- console.log('Sidebar handleClick - item.href:', item.href)
250
247
  const href = item.href
251
- const path = href.startsWith('http://') || href.startsWith('https://')
252
- ? new URL(href).pathname
253
- : href
254
- console.log('Sidebar handleClick - path:', path)
255
- console.log('Navigating to:', path)
256
- window.location.href = path
248
+ if (href.startsWith('http://') || href.startsWith('https://')) {
249
+ e.preventDefault()
250
+ const path = new URL(href).pathname
251
+ window.location.href = path
252
+ }
257
253
  }
258
254
 
259
255
  return (
@@ -522,7 +518,6 @@ const SidebarGroupAction = React.forwardRef<
522
518
  data-sidebar="group-action"
523
519
  className={cn(
524
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",
525
- // Increases the hit area of the button on mobile.
526
521
  "after:absolute after:-inset-2 after:md:hidden",
527
522
  "group-data-[collapsible=icon]:hidden",
528
523
  className
@@ -668,7 +663,6 @@ const SidebarMenuAction = React.forwardRef<
668
663
  data-sidebar="menu-action"
669
664
  className={cn(
670
665
  "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",
671
- // Increases the hit area of the button on mobile.
672
666
  "after:absolute after:-inset-2 after:md:hidden",
673
667
  "peer-data-[size=sm]/menu-button:top-1",
674
668
  "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.53",
3
+ "version": "1.0.60",
4
4
  "description": "Shared UI components for Orsetra platform",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",
@@ -93,4 +93,4 @@
93
93
  "next": "^16.0.7",
94
94
  "typescript": "^5"
95
95
  }
96
- }
96
+ }