@flamingo-stack/openframe-frontend-core 0.0.372 → 0.0.373-snapshot.20260706145330
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/{chunk-LPKQBDGY.cjs → chunk-2GRR6GSO.cjs} +26 -26
- package/dist/{chunk-LPKQBDGY.cjs.map → chunk-2GRR6GSO.cjs.map} +1 -1
- package/dist/{chunk-7A7K44DW.cjs → chunk-4DXWRLC4.cjs} +57 -57
- package/dist/{chunk-7A7K44DW.cjs.map → chunk-4DXWRLC4.cjs.map} +1 -1
- package/dist/{chunk-KPAB2RXJ.cjs → chunk-5SCIL5IK.cjs} +62 -62
- package/dist/{chunk-KPAB2RXJ.cjs.map → chunk-5SCIL5IK.cjs.map} +1 -1
- package/dist/{chunk-VVAKKX44.cjs → chunk-64TM6YLI.cjs} +37 -37
- package/dist/{chunk-VVAKKX44.cjs.map → chunk-64TM6YLI.cjs.map} +1 -1
- package/dist/{chunk-6XKKMJW4.js → chunk-6LKITKDS.js} +4 -4
- package/dist/{chunk-SVJ6TF2J.js → chunk-7ZAFRNT4.js} +2 -2
- package/dist/{chunk-V3XEWG2E.js → chunk-BCIETCTQ.js} +4 -4
- package/dist/{chunk-3MLQQZBN.js → chunk-BJX5HYBU.js} +2 -2
- package/dist/{chunk-Y7V5ZQ54.js → chunk-CTHA7BMH.js} +2 -2
- package/dist/{chunk-HWROGYII.js → chunk-EPR4XXRC.js} +2 -2
- package/dist/{chunk-DHZNTXJU.cjs → chunk-HA3KJN4J.cjs} +7 -7
- package/dist/{chunk-DHZNTXJU.cjs.map → chunk-HA3KJN4J.cjs.map} +1 -1
- package/dist/{chunk-YCIDCWA6.cjs → chunk-L7VRUDAP.cjs} +5 -5
- package/dist/{chunk-YCIDCWA6.cjs.map → chunk-L7VRUDAP.cjs.map} +1 -1
- package/dist/{chunk-A2HY3OMV.js → chunk-LDLRTG7B.js} +4 -4
- package/dist/{chunk-3QC76VZF.cjs → chunk-NMESBNMS.cjs} +25 -25
- package/dist/{chunk-3QC76VZF.cjs.map → chunk-NMESBNMS.cjs.map} +1 -1
- package/dist/{chunk-UI3YTBKK.js → chunk-NP3VAQE5.js} +2 -2
- package/dist/{chunk-J6JRBFJM.js → chunk-NVFKRKYO.js} +4 -4
- package/dist/{chunk-ZIPG4PAD.js → chunk-PUUB3ETT.js} +2 -2
- package/dist/{chunk-QN3WIJUN.cjs → chunk-QOPI56UU.cjs} +31 -31
- package/dist/{chunk-QN3WIJUN.cjs.map → chunk-QOPI56UU.cjs.map} +1 -1
- package/dist/{chunk-NIXFOPPT.js → chunk-UHO2TI5O.js} +207 -157
- package/dist/chunk-UHO2TI5O.js.map +1 -0
- package/dist/{chunk-O753O7H3.js → chunk-USUHSONY.js} +2 -2
- package/dist/{chunk-NRQSIW7I.cjs → chunk-V653GV4M.cjs} +388 -338
- package/dist/chunk-V653GV4M.cjs.map +1 -0
- package/dist/{chunk-7BO7CGXU.cjs → chunk-VS4RCAXP.cjs} +15 -15
- package/dist/{chunk-7BO7CGXU.cjs.map → chunk-VS4RCAXP.cjs.map} +1 -1
- package/dist/{chunk-KE4MBHEE.cjs → chunk-YZLZ35DX.cjs} +9 -9
- package/dist/{chunk-KE4MBHEE.cjs.map → chunk-YZLZ35DX.cjs.map} +1 -1
- package/dist/{chunk-GCXRNCZD.cjs → chunk-ZEYGYL76.cjs} +12 -12
- package/dist/{chunk-GCXRNCZD.cjs.map → chunk-ZEYGYL76.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +2 -1
- package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +122 -120
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +11 -9
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/app-layout-drawer.d.ts.map +1 -1
- package/dist/components/navigation/app-layout.d.ts +20 -0
- package/dist/components/navigation/app-layout.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/drawer.d.ts +5 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +4 -2
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +3 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/components/chat/embeddable-chat.tsx +1 -1
- package/src/components/features/time-tracker/time-tracker-header-button.tsx +18 -1
- package/src/components/navigation/app-layout-drawer.tsx +31 -3
- package/src/components/navigation/app-layout.tsx +50 -2
- package/src/components/navigation/mobile-burger-menu.tsx +3 -2
- package/src/components/ui/drawer.tsx +8 -1
- package/dist/chunk-NIXFOPPT.js.map +0 -1
- package/dist/chunk-NRQSIW7I.cjs.map +0 -1
- /package/dist/{chunk-6XKKMJW4.js.map → chunk-6LKITKDS.js.map} +0 -0
- /package/dist/{chunk-SVJ6TF2J.js.map → chunk-7ZAFRNT4.js.map} +0 -0
- /package/dist/{chunk-V3XEWG2E.js.map → chunk-BCIETCTQ.js.map} +0 -0
- /package/dist/{chunk-3MLQQZBN.js.map → chunk-BJX5HYBU.js.map} +0 -0
- /package/dist/{chunk-Y7V5ZQ54.js.map → chunk-CTHA7BMH.js.map} +0 -0
- /package/dist/{chunk-HWROGYII.js.map → chunk-EPR4XXRC.js.map} +0 -0
- /package/dist/{chunk-A2HY3OMV.js.map → chunk-LDLRTG7B.js.map} +0 -0
- /package/dist/{chunk-UI3YTBKK.js.map → chunk-NP3VAQE5.js.map} +0 -0
- /package/dist/{chunk-J6JRBFJM.js.map → chunk-NVFKRKYO.js.map} +0 -0
- /package/dist/{chunk-ZIPG4PAD.js.map → chunk-PUUB3ETT.js.map} +0 -0
- /package/dist/{chunk-O753O7H3.js.map → chunk-USUHSONY.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { createContext, Suspense, useCallback, useContext, useState } from 'react'
|
|
3
|
+
import { createContext, Suspense, useCallback, useContext, useMemo, useRef, useState } from 'react'
|
|
4
4
|
import { NavigationSidebarConfig } from '../../types/navigation'
|
|
5
5
|
import { cn } from '../../utils'
|
|
6
6
|
import { NotificationDrawer } from '../features/notifications/notification-drawer'
|
|
@@ -20,6 +20,32 @@ export function useAppLayoutDrawerContainer(): HTMLElement | null {
|
|
|
20
20
|
return useContext(AppLayoutDrawerContainerContext)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Two-way coordination between AppLayout's mobile burger menu and in-layout
|
|
25
|
+
* drawers (`AppLayoutDrawer`), which render above the menu (z-[103] vs
|
|
26
|
+
* z-[101]) — the two must never be open at the same time:
|
|
27
|
+
* - a drawer that opens calls `notifyDrawerDidOpen` so the layout closes
|
|
28
|
+
* the menu (otherwise it would resurface once the drawer closes);
|
|
29
|
+
* - each drawer registers a close handle so opening the menu via the
|
|
30
|
+
* burger button closes any open drawer instead of hiding the menu
|
|
31
|
+
* underneath it. Null outside of AppLayout.
|
|
32
|
+
*/
|
|
33
|
+
export interface AppLayoutDrawerHandle {
|
|
34
|
+
close: () => void
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface AppLayoutDrawerCoordination {
|
|
38
|
+
notifyDrawerDidOpen: () => void
|
|
39
|
+
/** Returns an unregister cleanup. */
|
|
40
|
+
registerDrawer: (handle: AppLayoutDrawerHandle) => () => void
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const AppLayoutDrawerCoordinationContext = createContext<AppLayoutDrawerCoordination | null>(null)
|
|
44
|
+
|
|
45
|
+
export function useAppLayoutDrawerCoordination(): AppLayoutDrawerCoordination | null {
|
|
46
|
+
return useContext(AppLayoutDrawerCoordinationContext)
|
|
47
|
+
}
|
|
48
|
+
|
|
23
49
|
export interface AppLayoutProps {
|
|
24
50
|
children: React.ReactNode
|
|
25
51
|
sidebarConfig: NavigationSidebarConfig
|
|
@@ -57,16 +83,37 @@ export function AppLayout({
|
|
|
57
83
|
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
|
58
84
|
const [drawerContainer, setDrawerContainer] = useState<HTMLDivElement | null>(null)
|
|
59
85
|
|
|
86
|
+
// Mirrors `mobileMenuOpen` so the toggle callback can stay identity-stable.
|
|
87
|
+
const mobileMenuOpenRef = useRef(mobileMenuOpen)
|
|
88
|
+
mobileMenuOpenRef.current = mobileMenuOpen
|
|
89
|
+
|
|
90
|
+
const drawerHandlesRef = useRef(new Set<AppLayoutDrawerHandle>())
|
|
91
|
+
|
|
60
92
|
const handleToggleMobileMenu = useCallback(() => {
|
|
61
|
-
|
|
93
|
+
const opening = !mobileMenuOpenRef.current
|
|
94
|
+
// Opening the menu closes any open in-layout drawer — otherwise the menu
|
|
95
|
+
// would open invisibly underneath it (the drawer renders above the menu).
|
|
96
|
+
if (opening) {
|
|
97
|
+
for (const handle of drawerHandlesRef.current) handle.close()
|
|
98
|
+
}
|
|
99
|
+
setMobileMenuOpen(opening)
|
|
62
100
|
}, [])
|
|
63
101
|
|
|
64
102
|
const handleCloseMobileMenu = useCallback(() => {
|
|
65
103
|
setMobileMenuOpen(false)
|
|
66
104
|
}, [])
|
|
67
105
|
|
|
106
|
+
const drawerCoordination = useMemo<AppLayoutDrawerCoordination>(() => ({
|
|
107
|
+
notifyDrawerDidOpen: () => setMobileMenuOpen(false),
|
|
108
|
+
registerDrawer: (handle) => {
|
|
109
|
+
drawerHandlesRef.current.add(handle)
|
|
110
|
+
return () => drawerHandlesRef.current.delete(handle)
|
|
111
|
+
},
|
|
112
|
+
}), [])
|
|
113
|
+
|
|
68
114
|
return (
|
|
69
115
|
<AppLayoutDrawerContainerContext.Provider value={drawerContainer}>
|
|
116
|
+
<AppLayoutDrawerCoordinationContext.Provider value={drawerCoordination}>
|
|
70
117
|
<div className={cn("flex h-screen bg-ods-bg", className)}>
|
|
71
118
|
<NavigationSidebar config={sidebarConfig} disabled={disabled} />
|
|
72
119
|
{/* Mobile Burger Menu - opens below header */}
|
|
@@ -112,6 +159,7 @@ export function AppLayout({
|
|
|
112
159
|
</div>
|
|
113
160
|
</div>
|
|
114
161
|
</div>
|
|
162
|
+
</AppLayoutDrawerCoordinationContext.Provider>
|
|
115
163
|
</AppLayoutDrawerContainerContext.Provider>
|
|
116
164
|
)
|
|
117
165
|
}
|
|
@@ -5,6 +5,7 @@ import { NavigationSidebarConfig, NavigationSidebarItem } from '../../types/navi
|
|
|
5
5
|
import { cn } from '../../utils'
|
|
6
6
|
import { Logout02Icon, PenEditIcon, UserSearchIcon } from '../icons-v2-generated'
|
|
7
7
|
import { Button, SquareAvatar } from '../ui'
|
|
8
|
+
import { OVERLAY_BACKDROP_CLASS } from '../ui/drawer'
|
|
8
9
|
|
|
9
10
|
// Header height constant (h-12 = 48px)
|
|
10
11
|
const HEADER_HEIGHT = 48
|
|
@@ -154,11 +155,11 @@ export const MobileBurgerMenu = React.memo(function MobileBurgerMenu({
|
|
|
154
155
|
|
|
155
156
|
return (
|
|
156
157
|
<>
|
|
157
|
-
{/*
|
|
158
|
+
{/* Dim backdrop (no blur, unified with Drawer) - positioned below header */}
|
|
158
159
|
<div
|
|
159
160
|
className={cn(
|
|
160
161
|
"fixed inset-0 z-[100] md:hidden",
|
|
161
|
-
|
|
162
|
+
OVERLAY_BACKDROP_CLASS,
|
|
162
163
|
"transition-all duration-300",
|
|
163
164
|
isOpen ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
164
165
|
)}
|
|
@@ -8,6 +8,11 @@ import { X } from "lucide-react"
|
|
|
8
8
|
import { cn } from "../../utils/cn"
|
|
9
9
|
import { useHeaderHeight } from "../../hooks/ui/use-header-height"
|
|
10
10
|
|
|
11
|
+
/** Unified overlay backdrop — dimmed, no blur. Single source of truth for
|
|
12
|
+
* every full-screen backdrop (Drawer, AppLayoutDrawer, MobileBurgerMenu,
|
|
13
|
+
* TimeTracker popover) so all panels dim the page identically. */
|
|
14
|
+
const OVERLAY_BACKDROP_CLASS = "bg-black/50"
|
|
15
|
+
|
|
11
16
|
const Drawer = DialogPrimitive.Root
|
|
12
17
|
|
|
13
18
|
const DrawerTrigger = DialogPrimitive.Trigger
|
|
@@ -23,7 +28,8 @@ const DrawerOverlay = React.forwardRef<
|
|
|
23
28
|
<DialogPrimitive.Overlay
|
|
24
29
|
ref={ref}
|
|
25
30
|
className={cn(
|
|
26
|
-
"fixed inset-0 z-[9997]
|
|
31
|
+
"fixed inset-0 z-[9997] outline-none focus:outline-none focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
32
|
+
OVERLAY_BACKDROP_CLASS,
|
|
27
33
|
className
|
|
28
34
|
)}
|
|
29
35
|
{...props}
|
|
@@ -543,6 +549,7 @@ const DrawerFooter = ({
|
|
|
543
549
|
DrawerFooter.displayName = "DrawerFooter"
|
|
544
550
|
|
|
545
551
|
export {
|
|
552
|
+
OVERLAY_BACKDROP_CLASS,
|
|
546
553
|
Drawer,
|
|
547
554
|
DrawerTrigger,
|
|
548
555
|
DrawerClose,
|