@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.
Files changed (99) hide show
  1. package/dist/{chunk-LPKQBDGY.cjs → chunk-2GRR6GSO.cjs} +26 -26
  2. package/dist/{chunk-LPKQBDGY.cjs.map → chunk-2GRR6GSO.cjs.map} +1 -1
  3. package/dist/{chunk-7A7K44DW.cjs → chunk-4DXWRLC4.cjs} +57 -57
  4. package/dist/{chunk-7A7K44DW.cjs.map → chunk-4DXWRLC4.cjs.map} +1 -1
  5. package/dist/{chunk-KPAB2RXJ.cjs → chunk-5SCIL5IK.cjs} +62 -62
  6. package/dist/{chunk-KPAB2RXJ.cjs.map → chunk-5SCIL5IK.cjs.map} +1 -1
  7. package/dist/{chunk-VVAKKX44.cjs → chunk-64TM6YLI.cjs} +37 -37
  8. package/dist/{chunk-VVAKKX44.cjs.map → chunk-64TM6YLI.cjs.map} +1 -1
  9. package/dist/{chunk-6XKKMJW4.js → chunk-6LKITKDS.js} +4 -4
  10. package/dist/{chunk-SVJ6TF2J.js → chunk-7ZAFRNT4.js} +2 -2
  11. package/dist/{chunk-V3XEWG2E.js → chunk-BCIETCTQ.js} +4 -4
  12. package/dist/{chunk-3MLQQZBN.js → chunk-BJX5HYBU.js} +2 -2
  13. package/dist/{chunk-Y7V5ZQ54.js → chunk-CTHA7BMH.js} +2 -2
  14. package/dist/{chunk-HWROGYII.js → chunk-EPR4XXRC.js} +2 -2
  15. package/dist/{chunk-DHZNTXJU.cjs → chunk-HA3KJN4J.cjs} +7 -7
  16. package/dist/{chunk-DHZNTXJU.cjs.map → chunk-HA3KJN4J.cjs.map} +1 -1
  17. package/dist/{chunk-YCIDCWA6.cjs → chunk-L7VRUDAP.cjs} +5 -5
  18. package/dist/{chunk-YCIDCWA6.cjs.map → chunk-L7VRUDAP.cjs.map} +1 -1
  19. package/dist/{chunk-A2HY3OMV.js → chunk-LDLRTG7B.js} +4 -4
  20. package/dist/{chunk-3QC76VZF.cjs → chunk-NMESBNMS.cjs} +25 -25
  21. package/dist/{chunk-3QC76VZF.cjs.map → chunk-NMESBNMS.cjs.map} +1 -1
  22. package/dist/{chunk-UI3YTBKK.js → chunk-NP3VAQE5.js} +2 -2
  23. package/dist/{chunk-J6JRBFJM.js → chunk-NVFKRKYO.js} +4 -4
  24. package/dist/{chunk-ZIPG4PAD.js → chunk-PUUB3ETT.js} +2 -2
  25. package/dist/{chunk-QN3WIJUN.cjs → chunk-QOPI56UU.cjs} +31 -31
  26. package/dist/{chunk-QN3WIJUN.cjs.map → chunk-QOPI56UU.cjs.map} +1 -1
  27. package/dist/{chunk-NIXFOPPT.js → chunk-UHO2TI5O.js} +207 -157
  28. package/dist/chunk-UHO2TI5O.js.map +1 -0
  29. package/dist/{chunk-O753O7H3.js → chunk-USUHSONY.js} +2 -2
  30. package/dist/{chunk-NRQSIW7I.cjs → chunk-V653GV4M.cjs} +388 -338
  31. package/dist/chunk-V653GV4M.cjs.map +1 -0
  32. package/dist/{chunk-7BO7CGXU.cjs → chunk-VS4RCAXP.cjs} +15 -15
  33. package/dist/{chunk-7BO7CGXU.cjs.map → chunk-VS4RCAXP.cjs.map} +1 -1
  34. package/dist/{chunk-KE4MBHEE.cjs → chunk-YZLZ35DX.cjs} +9 -9
  35. package/dist/{chunk-KE4MBHEE.cjs.map → chunk-YZLZ35DX.cjs.map} +1 -1
  36. package/dist/{chunk-GCXRNCZD.cjs → chunk-ZEYGYL76.cjs} +12 -12
  37. package/dist/{chunk-GCXRNCZD.cjs.map → chunk-ZEYGYL76.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/index.cjs +2 -2
  41. package/dist/components/chat/index.js +1 -1
  42. package/dist/components/contact/index.cjs +3 -3
  43. package/dist/components/contact/index.js +2 -2
  44. package/dist/components/docs/index.cjs +5 -5
  45. package/dist/components/docs/index.js +4 -4
  46. package/dist/components/embeds/index.cjs +3 -3
  47. package/dist/components/embeds/index.js +2 -2
  48. package/dist/components/faq/index.cjs +3 -3
  49. package/dist/components/faq/index.js +2 -2
  50. package/dist/components/features/index.cjs +2 -2
  51. package/dist/components/features/index.js +1 -1
  52. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +2 -1
  53. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
  54. package/dist/components/help-center-pages/index.cjs +20 -20
  55. package/dist/components/help-center-pages/index.js +11 -11
  56. package/dist/components/index.cjs +122 -120
  57. package/dist/components/index.cjs.map +1 -1
  58. package/dist/components/index.js +11 -9
  59. package/dist/components/index.js.map +1 -1
  60. package/dist/components/navigation/app-layout-drawer.d.ts.map +1 -1
  61. package/dist/components/navigation/app-layout.d.ts +20 -0
  62. package/dist/components/navigation/app-layout.d.ts.map +1 -1
  63. package/dist/components/navigation/index.cjs +2 -2
  64. package/dist/components/navigation/index.js +1 -1
  65. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  66. package/dist/components/onboarding-guides/index.cjs +5 -5
  67. package/dist/components/onboarding-guides/index.js +4 -4
  68. package/dist/components/related-content/index.cjs +3 -3
  69. package/dist/components/related-content/index.js +2 -2
  70. package/dist/components/tickets/index.cjs +5 -5
  71. package/dist/components/tickets/index.js +4 -4
  72. package/dist/components/ui/drawer.d.ts +5 -1
  73. package/dist/components/ui/drawer.d.ts.map +1 -1
  74. package/dist/components/ui/index.cjs +4 -2
  75. package/dist/components/ui/index.cjs.map +1 -1
  76. package/dist/components/ui/index.js +3 -1
  77. package/dist/index.cjs +4 -2
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.js +3 -1
  80. package/package.json +1 -1
  81. package/src/components/chat/embeddable-chat.tsx +1 -1
  82. package/src/components/features/time-tracker/time-tracker-header-button.tsx +18 -1
  83. package/src/components/navigation/app-layout-drawer.tsx +31 -3
  84. package/src/components/navigation/app-layout.tsx +50 -2
  85. package/src/components/navigation/mobile-burger-menu.tsx +3 -2
  86. package/src/components/ui/drawer.tsx +8 -1
  87. package/dist/chunk-NIXFOPPT.js.map +0 -1
  88. package/dist/chunk-NRQSIW7I.cjs.map +0 -1
  89. /package/dist/{chunk-6XKKMJW4.js.map → chunk-6LKITKDS.js.map} +0 -0
  90. /package/dist/{chunk-SVJ6TF2J.js.map → chunk-7ZAFRNT4.js.map} +0 -0
  91. /package/dist/{chunk-V3XEWG2E.js.map → chunk-BCIETCTQ.js.map} +0 -0
  92. /package/dist/{chunk-3MLQQZBN.js.map → chunk-BJX5HYBU.js.map} +0 -0
  93. /package/dist/{chunk-Y7V5ZQ54.js.map → chunk-CTHA7BMH.js.map} +0 -0
  94. /package/dist/{chunk-HWROGYII.js.map → chunk-EPR4XXRC.js.map} +0 -0
  95. /package/dist/{chunk-A2HY3OMV.js.map → chunk-LDLRTG7B.js.map} +0 -0
  96. /package/dist/{chunk-UI3YTBKK.js.map → chunk-NP3VAQE5.js.map} +0 -0
  97. /package/dist/{chunk-J6JRBFJM.js.map → chunk-NVFKRKYO.js.map} +0 -0
  98. /package/dist/{chunk-ZIPG4PAD.js.map → chunk-PUUB3ETT.js.map} +0 -0
  99. /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
- setMobileMenuOpen(prev => !prev)
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
- {/* Blur backdrop - positioned below header */}
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
- "backdrop-blur-sm bg-ods-bg-overlay",
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] bg-black/50 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",
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,