@flamingo-stack/openframe-frontend-core 0.0.409 → 0.0.410-snapshot.20260711165901
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-STGWQFYT.cjs → chunk-3SNDISEN.cjs} +92 -30
- package/dist/chunk-3SNDISEN.cjs.map +1 -0
- package/dist/{chunk-RL344I7V.cjs → chunk-3U4IZF7H.cjs} +7 -7
- package/dist/{chunk-RL344I7V.cjs.map → chunk-3U4IZF7H.cjs.map} +1 -1
- package/dist/{chunk-7Q52HP45.js → chunk-4FNDOTW2.js} +139 -77
- package/dist/chunk-4FNDOTW2.js.map +1 -0
- package/dist/{chunk-O5W26SCL.js → chunk-6AB36PRE.js} +2 -2
- package/dist/{chunk-IK5AR6QG.js → chunk-B2BERJ4M.js} +6 -6
- package/dist/{chunk-SOALFYU6.cjs → chunk-BKYV2ALJ.cjs} +582 -591
- package/dist/chunk-BKYV2ALJ.cjs.map +1 -0
- package/dist/{chunk-KPGKNUJF.cjs → chunk-BRHCGXOH.cjs} +40 -40
- package/dist/{chunk-KPGKNUJF.cjs.map → chunk-BRHCGXOH.cjs.map} +1 -1
- package/dist/{chunk-NO2KT42M.js → chunk-DGIF3YDV.js} +2 -2
- package/dist/{chunk-LQWYXIKB.js → chunk-FXZO4EKN.js} +5 -5
- package/dist/{chunk-CUN4CJUN.cjs → chunk-G2G7HLEM.cjs} +3 -3
- package/dist/{chunk-CUN4CJUN.cjs.map → chunk-G2G7HLEM.cjs.map} +1 -1
- package/dist/{chunk-NEMUCNCG.cjs → chunk-H4ISMWHG.cjs} +73 -73
- package/dist/{chunk-NEMUCNCG.cjs.map → chunk-H4ISMWHG.cjs.map} +1 -1
- package/dist/{chunk-L6OPVKVR.js → chunk-HXRULNWA.js} +5 -5
- package/dist/{chunk-RPGFIUN3.cjs → chunk-MF5CVIAC.cjs} +32 -32
- package/dist/{chunk-RPGFIUN3.cjs.map → chunk-MF5CVIAC.cjs.map} +1 -1
- package/dist/{chunk-J6M2G6TD.js → chunk-MHNBDSWH.js} +6 -6
- package/dist/{chunk-E4J5KKHH.js → chunk-NJSBYUJZ.js} +3 -3
- package/dist/{chunk-YRKPMYI3.cjs → chunk-RALT6D4H.cjs} +15 -15
- package/dist/{chunk-YRKPMYI3.cjs.map → chunk-RALT6D4H.cjs.map} +1 -1
- package/dist/{chunk-ZMFQWMM7.js → chunk-SAJM3PDE.js} +2 -2
- package/dist/{chunk-V3EZQWHQ.cjs → chunk-SMLAYAIW.cjs} +5 -5
- package/dist/{chunk-V3EZQWHQ.cjs.map → chunk-SMLAYAIW.cjs.map} +1 -1
- package/dist/{chunk-5HOII3WB.js → chunk-SOLI7V4I.js} +4 -4
- package/dist/{chunk-WGOATV3P.cjs → chunk-SZ27SV6T.cjs} +73 -73
- package/dist/{chunk-WGOATV3P.cjs.map → chunk-SZ27SV6T.cjs.map} +1 -1
- package/dist/{chunk-ZF5O3KUQ.js → chunk-TYCWPT33.js} +3 -3
- package/dist/{chunk-F4KE5AZO.cjs → chunk-VTTPNZX3.cjs} +40 -40
- package/dist/{chunk-F4KE5AZO.cjs.map → chunk-VTTPNZX3.cjs.map} +1 -1
- package/dist/{chunk-T6ZUBXPA.cjs → chunk-VXM2GCKS.cjs} +12 -12
- package/dist/{chunk-T6ZUBXPA.cjs.map → chunk-VXM2GCKS.cjs.map} +1 -1
- package/dist/{chunk-KZPVN7AZ.js → chunk-XBC5AES6.js} +2 -2
- package/dist/{chunk-KRLBVBYU.cjs → chunk-XVPWVG6N.cjs} +18 -18
- package/dist/{chunk-KRLBVBYU.cjs.map → chunk-XVPWVG6N.cjs.map} +1 -1
- package/dist/{chunk-IVM47EGI.js → chunk-YVJ2XBFU.js} +389 -398
- package/dist/chunk-YVJ2XBFU.js.map +1 -0
- package/dist/{chunk-VUW4G6SU.js → chunk-Z4RKJOFH.js} +3 -3
- package/dist/{chunk-A3RW7M6B.cjs → chunk-ZZWFS7CD.cjs} +29 -29
- package/dist/{chunk-A3RW7M6B.cjs.map → chunk-ZZWFS7CD.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +137 -135
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +14 -12
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/header.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +5 -3
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +4 -2
- package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
- package/dist/components/navigation/mobile-nav-panel.d.ts +2 -0
- package/dist/components/navigation/mobile-nav-panel.d.ts.map +1 -1
- package/dist/components/navigation/sliding-sidebar.d.ts.map +1 -1
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/modal-v2.d.ts.map +1 -1
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/ui/index.d.ts +2 -0
- package/dist/hooks/ui/index.d.ts.map +1 -1
- package/dist/hooks/ui/use-focus-trap.d.ts +32 -0
- package/dist/hooks/ui/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/ui/use-header-height.d.ts +10 -1
- package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +1 -1
- package/src/components/navigation/header.tsx +5 -0
- package/src/components/navigation/index.ts +1 -1
- package/src/components/navigation/mobile-burger-menu.tsx +16 -29
- package/src/components/navigation/mobile-nav-panel.tsx +32 -35
- package/src/components/navigation/sliding-sidebar.tsx +29 -9
- package/src/components/ui/modal-v2.tsx +7 -6
- package/src/components/ui/modal.tsx +7 -9
- package/src/hooks/ui/index.ts +6 -0
- package/src/hooks/ui/use-focus-trap.ts +110 -0
- package/src/hooks/ui/use-header-height.ts +17 -2
- package/src/stories/MobileNavPanel.stories.tsx +150 -0
- package/dist/chunk-7Q52HP45.js.map +0 -1
- package/dist/chunk-IVM47EGI.js.map +0 -1
- package/dist/chunk-SOALFYU6.cjs.map +0 -1
- package/dist/chunk-STGWQFYT.cjs.map +0 -1
- /package/dist/{chunk-O5W26SCL.js.map → chunk-6AB36PRE.js.map} +0 -0
- /package/dist/{chunk-IK5AR6QG.js.map → chunk-B2BERJ4M.js.map} +0 -0
- /package/dist/{chunk-NO2KT42M.js.map → chunk-DGIF3YDV.js.map} +0 -0
- /package/dist/{chunk-LQWYXIKB.js.map → chunk-FXZO4EKN.js.map} +0 -0
- /package/dist/{chunk-L6OPVKVR.js.map → chunk-HXRULNWA.js.map} +0 -0
- /package/dist/{chunk-J6M2G6TD.js.map → chunk-MHNBDSWH.js.map} +0 -0
- /package/dist/{chunk-E4J5KKHH.js.map → chunk-NJSBYUJZ.js.map} +0 -0
- /package/dist/{chunk-ZMFQWMM7.js.map → chunk-SAJM3PDE.js.map} +0 -0
- /package/dist/{chunk-5HOII3WB.js.map → chunk-SOLI7V4I.js.map} +0 -0
- /package/dist/{chunk-ZF5O3KUQ.js.map → chunk-TYCWPT33.js.map} +0 -0
- /package/dist/{chunk-KZPVN7AZ.js.map → chunk-XBC5AES6.js.map} +0 -0
- /package/dist/{chunk-VUW4G6SU.js.map → chunk-Z4RKJOFH.js.map} +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
|
2
|
+
import { useState, type ReactNode } from 'react'
|
|
3
|
+
import { Button } from '../components/ui/button'
|
|
4
|
+
import { StatusBadge } from '../components/ui/status-badge'
|
|
5
|
+
import { MobileNavPanel } from '../components/navigation/mobile-nav-panel'
|
|
6
|
+
import type { MobileNavConfig } from '../types/navigation'
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof MobileNavPanel> = {
|
|
9
|
+
title: 'Navigation/MobileNavPanel',
|
|
10
|
+
component: MobileNavPanel,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'fullscreen',
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default meta
|
|
17
|
+
type Story = StoryObj<typeof meta>
|
|
18
|
+
|
|
19
|
+
const baseSections: MobileNavConfig['sections'] = [
|
|
20
|
+
{
|
|
21
|
+
title: 'Product',
|
|
22
|
+
items: [
|
|
23
|
+
{ id: 'home', label: 'Home', href: '#', isActive: true },
|
|
24
|
+
{ id: 'features', label: 'Features', href: '#' },
|
|
25
|
+
{ id: 'pricing', label: 'Pricing', href: '#' },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: 'Community',
|
|
30
|
+
items: [
|
|
31
|
+
{ id: 'blog', label: 'Blog', href: '#' },
|
|
32
|
+
{ id: 'podcasts', label: 'Podcasts', href: '#' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
function PanelHarness({
|
|
38
|
+
config,
|
|
39
|
+
children,
|
|
40
|
+
}: {
|
|
41
|
+
config: Omit<MobileNavConfig, 'onClose'>
|
|
42
|
+
children?: ReactNode
|
|
43
|
+
}) {
|
|
44
|
+
const [open, setOpen] = useState(true)
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div className="min-h-screen bg-ods-bg p-4">
|
|
48
|
+
<Button variant="outline" onClick={() => setOpen(true)}>
|
|
49
|
+
Open menu
|
|
50
|
+
</Button>
|
|
51
|
+
{children}
|
|
52
|
+
<MobileNavPanel
|
|
53
|
+
isOpen={open}
|
|
54
|
+
config={{ ...config, onClose: () => setOpen(false) }}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Default chrome (openmsp-style): bg-ods-card + border, auth footer. */
|
|
61
|
+
export const Default: Story = {
|
|
62
|
+
render: function Render() {
|
|
63
|
+
return (
|
|
64
|
+
<PanelHarness
|
|
65
|
+
config={{
|
|
66
|
+
sections: baseSections,
|
|
67
|
+
footer: (
|
|
68
|
+
<Button className="w-full" variant="outline">
|
|
69
|
+
Sign Up
|
|
70
|
+
</Button>
|
|
71
|
+
),
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Flamingo-style custom chrome via config.className (mobileNavClassName knob). */
|
|
79
|
+
export const CustomChrome: Story = {
|
|
80
|
+
render: function Render() {
|
|
81
|
+
return (
|
|
82
|
+
<PanelHarness
|
|
83
|
+
config={{
|
|
84
|
+
sections: baseSections,
|
|
85
|
+
className: 'bg-ods-bg border border-ods-border',
|
|
86
|
+
}}
|
|
87
|
+
/>
|
|
88
|
+
)
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** TMCG-style disabled auth footer with a status badge. */
|
|
93
|
+
export const DisabledFooter: Story = {
|
|
94
|
+
render: function Render() {
|
|
95
|
+
return (
|
|
96
|
+
<PanelHarness
|
|
97
|
+
config={{
|
|
98
|
+
sections: baseSections,
|
|
99
|
+
footer: (
|
|
100
|
+
<Button className="w-full cursor-not-allowed opacity-75" variant="outline" disabled>
|
|
101
|
+
<span className="flex items-center justify-center gap-2 w-full">
|
|
102
|
+
Member Login
|
|
103
|
+
<StatusBadge text="Coming Soon" variant="button" colorScheme="cyan" />
|
|
104
|
+
</span>
|
|
105
|
+
</Button>
|
|
106
|
+
),
|
|
107
|
+
}}
|
|
108
|
+
/>
|
|
109
|
+
)
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Regression story for the reported bug shape: a SHORT visible viewport with
|
|
115
|
+
* a long menu. The panel must fit inside the fold (svh-based max-height), the
|
|
116
|
+
* footer must stay visible, and the list must scroll internally to the last
|
|
117
|
+
* item. View in a ~660px-tall viewport (or the story's constrained frame).
|
|
118
|
+
*/
|
|
119
|
+
export const ShortViewportLongList: Story = {
|
|
120
|
+
render: function Render() {
|
|
121
|
+
const longSections: MobileNavConfig['sections'] = [
|
|
122
|
+
{
|
|
123
|
+
title: 'All entries',
|
|
124
|
+
items: Array.from({ length: 30 }, (_, i) => ({
|
|
125
|
+
id: `item-${i + 1}`,
|
|
126
|
+
label: i === 29 ? 'Last entry (must be reachable)' : `Menu entry ${i + 1}`,
|
|
127
|
+
href: '#',
|
|
128
|
+
})),
|
|
129
|
+
},
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<PanelHarness
|
|
134
|
+
config={{
|
|
135
|
+
sections: longSections,
|
|
136
|
+
footer: (
|
|
137
|
+
<Button className="w-full" variant="outline">
|
|
138
|
+
Sign Up
|
|
139
|
+
</Button>
|
|
140
|
+
),
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
<p className="mt-4 text-sm text-ods-text-secondary">
|
|
144
|
+
Resize the viewport short (~660px): the footer stays pinned and the
|
|
145
|
+
list scrolls to "Last entry".
|
|
146
|
+
</p>
|
|
147
|
+
</PanelHarness>
|
|
148
|
+
)
|
|
149
|
+
},
|
|
150
|
+
}
|