@orsetra/shared-ui 1.1.32 → 1.1.34
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.
|
@@ -9,7 +9,7 @@ import { UserMenu, Button, type UserMenuConfig } from "../ui"
|
|
|
9
9
|
import { getMenuFromPath } from "../../lib/menu-utils"
|
|
10
10
|
import { useIsMobile } from "../../hooks/use-mobile"
|
|
11
11
|
import { cn } from "../../lib/utils"
|
|
12
|
-
import { Menu, ChevronDown,
|
|
12
|
+
import { Menu, ChevronDown, ChevronRight } from "lucide-react"
|
|
13
13
|
|
|
14
14
|
// ─── Dropdown Organisation / Projets ────────────────────────────────────────
|
|
15
15
|
|
|
@@ -77,7 +77,7 @@ function OrgProjectDropdown({
|
|
|
77
77
|
</button>
|
|
78
78
|
|
|
79
79
|
{open && (
|
|
80
|
-
<div className="absolute left-
|
|
80
|
+
<div className="absolute left-1/2 -translate-x-1/2 top-full mt-1 bg-white border border-ui-border shadow-lg z-[100] w-56 max-h-[280px] overflow-y-auto">
|
|
81
81
|
{loading ? (
|
|
82
82
|
<div className="px-4 py-3 text-sm text-text-secondary">Chargement…</div>
|
|
83
83
|
) : projects.length === 0 ? (
|
|
@@ -90,14 +90,20 @@ function OrgProjectDropdown({
|
|
|
90
90
|
key={project.id}
|
|
91
91
|
onClick={() => { onProjectChange(project.id); setOpen(false) }}
|
|
92
92
|
className={cn(
|
|
93
|
-
"flex items-center
|
|
93
|
+
"flex items-center justify-between w-full px-4 py-2.5 text-left transition-colors",
|
|
94
94
|
isActive
|
|
95
|
-
? "bg-interactive/10
|
|
96
|
-
: "
|
|
95
|
+
? "bg-interactive/10"
|
|
96
|
+
: "hover:bg-ui-background"
|
|
97
97
|
)}
|
|
98
98
|
>
|
|
99
|
-
<
|
|
100
|
-
|
|
99
|
+
<div className="flex flex-col min-w-0">
|
|
100
|
+
<span className={cn(
|
|
101
|
+
"text-sm font-medium truncate",
|
|
102
|
+
isActive ? "text-interactive" : "text-text-primary"
|
|
103
|
+
)}>{project.name}</span>
|
|
104
|
+
<span className="text-xs text-text-secondary truncate">{project.id}</span>
|
|
105
|
+
</div>
|
|
106
|
+
<ChevronRight className="h-3.5 w-3.5 text-text-secondary flex-shrink-0 ml-2" />
|
|
101
107
|
</button>
|
|
102
108
|
)
|
|
103
109
|
})
|
|
@@ -89,7 +89,7 @@ export function MainSidebar({
|
|
|
89
89
|
|
|
90
90
|
return (
|
|
91
91
|
<>
|
|
92
|
-
{isOpen && !isMinimized &&
|
|
92
|
+
{isOpen && !isMinimized && (
|
|
93
93
|
<div
|
|
94
94
|
className="fixed inset-0 bg-black/40 z-40"
|
|
95
95
|
onClick={onToggle}
|
|
@@ -153,7 +153,7 @@ export function MainSidebar({
|
|
|
153
153
|
"h-5 w-5 flex-shrink-0",
|
|
154
154
|
isActive ? "text-interactive" : "text-text-secondary"
|
|
155
155
|
)} />
|
|
156
|
-
{!isMinimized && <span className="text-
|
|
156
|
+
{!isMinimized && <span className="text-base">{item.label}</span>}
|
|
157
157
|
</button>
|
|
158
158
|
</div>
|
|
159
159
|
)
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
Menu,
|
|
24
24
|
User,
|
|
25
25
|
ChevronUp,
|
|
26
|
+
ChevronRight,
|
|
26
27
|
} from "lucide-react"
|
|
27
28
|
import { Logo } from "../../ui/logo"
|
|
28
29
|
import { type SidebarMenus, type SubMenuItem, type OrgInfo } from "./data"
|
|
@@ -260,7 +261,7 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
|
|
|
260
261
|
|
|
261
262
|
return (
|
|
262
263
|
<Link
|
|
263
|
-
key={item.
|
|
264
|
+
key={item.id}
|
|
264
265
|
href={item.href}
|
|
265
266
|
onClick={handleClick}
|
|
266
267
|
className={cn(
|
|
@@ -300,12 +301,13 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
|
|
|
300
301
|
{orgData?.nom?.charAt(0)?.toUpperCase() ?? 'O'}
|
|
301
302
|
</div>
|
|
302
303
|
)}
|
|
303
|
-
<div className="flex flex-col min-w-0">
|
|
304
|
+
<div className="flex flex-col min-w-0 flex-1">
|
|
304
305
|
<span className="text-xs text-text-secondary uppercase tracking-wide mb-1">Organisation</span>
|
|
305
306
|
<span className="text-base font-semibold text-text-primary truncate">
|
|
306
307
|
{orgLoading ? '…' : (orgData?.nom ?? 'Organisation')}
|
|
307
308
|
</span>
|
|
308
309
|
</div>
|
|
310
|
+
<ChevronRight className="h-4 w-4 text-text-secondary flex-shrink-0 opacity-40" />
|
|
309
311
|
</Link>
|
|
310
312
|
|
|
311
313
|
{/* Paramètres du compte */}
|
|
@@ -315,7 +317,8 @@ function Sidebar({ currentMenu, onMainMenuToggle, sidebarMenus = {}, main_base_u
|
|
|
315
317
|
className="flex items-center gap-3 px-5 py-3 text-sm text-text-secondary hover:bg-ui-background hover:text-text-primary transition-colors no-underline"
|
|
316
318
|
>
|
|
317
319
|
<User className="h-5 w-5 flex-shrink-0" />
|
|
318
|
-
<span>Paramètres du compte</span>
|
|
320
|
+
<span className="flex-1">Paramètres du compte</span>
|
|
321
|
+
<ChevronRight className="h-4 w-4 flex-shrink-0 opacity-40" />
|
|
319
322
|
</Link>
|
|
320
323
|
</div>
|
|
321
324
|
)}
|
|
@@ -66,7 +66,7 @@ const SidePanel = ({
|
|
|
66
66
|
)}
|
|
67
67
|
>
|
|
68
68
|
{/* Header fixe */}
|
|
69
|
-
<div className="flex items-center justify-between
|
|
69
|
+
<div className="flex items-center justify-between px-6 py-4 flex-shrink-0">
|
|
70
70
|
<div className="flex-1">
|
|
71
71
|
<DialogPrimitive.Title className="text-lg font-semibold text-ibm-gray-100">
|
|
72
72
|
{title}
|
|
@@ -92,7 +92,7 @@ const SidePanel = ({
|
|
|
92
92
|
</div>
|
|
93
93
|
|
|
94
94
|
{/* Footer fixe */}
|
|
95
|
-
<div className="flex items-center justify-end gap-3
|
|
95
|
+
<div className="flex items-center justify-end gap-3 px-6 py-4 flex-shrink-0">
|
|
96
96
|
{actions}
|
|
97
97
|
</div>
|
|
98
98
|
</DialogPrimitive.Content>
|
|
@@ -140,7 +140,7 @@ const SidePanelHeader = React.forwardRef<
|
|
|
140
140
|
<div
|
|
141
141
|
ref={ref}
|
|
142
142
|
className={cn(
|
|
143
|
-
"flex items-center justify-between
|
|
143
|
+
"flex items-center justify-between px-6 py-4 flex-shrink-0",
|
|
144
144
|
className
|
|
145
145
|
)}
|
|
146
146
|
{...props}
|
|
@@ -191,7 +191,7 @@ const SidePanelFooter = React.forwardRef<
|
|
|
191
191
|
<div
|
|
192
192
|
ref={ref}
|
|
193
193
|
className={cn(
|
|
194
|
-
"flex items-center justify-end gap-3
|
|
194
|
+
"flex items-center justify-end gap-3 px-6 py-4 flex-shrink-0",
|
|
195
195
|
className
|
|
196
196
|
)}
|
|
197
197
|
{...props}
|