@flamingo-stack/openframe-frontend-core 0.0.502 → 0.0.503-snapshot.20260731162644
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-O45BOJMS.js → chunk-32J4AXWO.js} +3 -3
- package/dist/{chunk-I64ZGPA6.cjs → chunk-5JEL52KB.cjs} +3 -3
- package/dist/{chunk-I64ZGPA6.cjs.map → chunk-5JEL52KB.cjs.map} +1 -1
- package/dist/{chunk-5W6IMPJW.js → chunk-AFHWEJXM.js} +6 -6
- package/dist/{chunk-KOZAEN36.cjs → chunk-AI7ASU6V.cjs} +93 -93
- package/dist/{chunk-KOZAEN36.cjs.map → chunk-AI7ASU6V.cjs.map} +1 -1
- package/dist/{chunk-C5R2OX7A.cjs → chunk-C6Q3BJDJ.cjs} +3 -3
- package/dist/chunk-C6Q3BJDJ.cjs.map +1 -0
- package/dist/{chunk-INZAM757.cjs → chunk-CQ6O6ER2.cjs} +12 -12
- package/dist/{chunk-INZAM757.cjs.map → chunk-CQ6O6ER2.cjs.map} +1 -1
- package/dist/{chunk-ZEEQTDDD.js → chunk-CSRGIQ2G.js} +3 -3
- package/dist/{chunk-2Z75A5MH.cjs → chunk-D3VTZBWC.cjs} +32 -32
- package/dist/{chunk-2Z75A5MH.cjs.map → chunk-D3VTZBWC.cjs.map} +1 -1
- package/dist/{chunk-ZGU3KBAM.js → chunk-EFBKOCEA.js} +3 -3
- package/dist/{chunk-EMMJIXDF.js → chunk-FW2U6U4P.js} +3336 -3292
- package/dist/chunk-FW2U6U4P.js.map +1 -0
- package/dist/{chunk-IRR6733A.js → chunk-GCVAZR52.js} +5 -5
- package/dist/{chunk-EC3G3BIT.js → chunk-HNDHCJV4.js} +6 -6
- package/dist/{chunk-IHYEMZ2B.cjs → chunk-IZTXVVGY.cjs} +40 -40
- package/dist/{chunk-IHYEMZ2B.cjs.map → chunk-IZTXVVGY.cjs.map} +1 -1
- package/dist/{chunk-NZEQGBVS.js → chunk-JCF55O7G.js} +2 -2
- package/dist/{chunk-JJV237MJ.js → chunk-JQDGP4CE.js} +4 -4
- package/dist/{chunk-4YDUZB5N.cjs → chunk-KHE3OBHD.cjs} +18 -18
- package/dist/{chunk-4YDUZB5N.cjs.map → chunk-KHE3OBHD.cjs.map} +1 -1
- package/dist/{chunk-AHZCNPTI.cjs → chunk-KZSQMZUL.cjs} +19 -19
- package/dist/{chunk-AHZCNPTI.cjs.map → chunk-KZSQMZUL.cjs.map} +1 -1
- package/dist/{chunk-LS3DMQTE.js → chunk-MRPFFHBK.js} +3 -3
- package/dist/{chunk-GE6DRWPN.cjs → chunk-NNQMA3N6.cjs} +12 -12
- package/dist/{chunk-GE6DRWPN.cjs.map → chunk-NNQMA3N6.cjs.map} +1 -1
- package/dist/{chunk-LA4UJ2D3.cjs → chunk-OK34RZWT.cjs} +73 -73
- package/dist/{chunk-LA4UJ2D3.cjs.map → chunk-OK34RZWT.cjs.map} +1 -1
- package/dist/{chunk-ABVQ54WR.cjs → chunk-Q6RMV5WK.cjs} +5 -5
- package/dist/{chunk-ABVQ54WR.cjs.map → chunk-Q6RMV5WK.cjs.map} +1 -1
- package/dist/{chunk-2Q6X4SE3.js → chunk-QFQBYNQJ.js} +4 -4
- package/dist/{chunk-WHJGRRK2.js → chunk-QW7SW5HY.js} +52 -43
- package/dist/chunk-QW7SW5HY.js.map +1 -0
- package/dist/{chunk-L5CI57RM.cjs → chunk-T3BF6JTQ.cjs} +52 -43
- package/dist/chunk-T3BF6JTQ.cjs.map +1 -0
- package/dist/{chunk-ADM7LRDY.cjs → chunk-US2F5GJO.cjs} +40 -40
- package/dist/{chunk-ADM7LRDY.cjs.map → chunk-US2F5GJO.cjs.map} +1 -1
- package/dist/{chunk-BRXSYV4M.cjs → chunk-WXARO2KA.cjs} +33 -33
- package/dist/{chunk-BRXSYV4M.cjs.map → chunk-WXARO2KA.cjs.map} +1 -1
- package/dist/{chunk-LBSC62XJ.cjs → chunk-X5USQ6UC.cjs} +995 -951
- package/dist/chunk-X5USQ6UC.cjs.map +1 -0
- package/dist/{chunk-VPQBQJ4S.js → chunk-XRGAQM3F.js} +2 -2
- package/dist/{chunk-QJMFF2YG.js → chunk-XT4P4JGJ.js} +6 -6
- package/dist/{chunk-P7IOCYGD.js → chunk-YKF25XRY.js} +3 -3
- package/dist/chunk-YKF25XRY.js.map +1 -0
- package/dist/components/case-studies/index.cjs +10 -10
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/index.cjs +4 -4
- package/dist/components/chat/index.js +3 -3
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/content-loading-container.d.ts +1 -1
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +161 -161
- package/dist/components/index.js +12 -12
- package/dist/components/navigation/header-button.d.ts.map +1 -1
- package/dist/components/navigation/header.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +4 -4
- package/dist/components/navigation/index.js +3 -3
- package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
- package/dist/components/navigation/top-navigation.d.ts +5 -1
- package/dist/components/navigation/top-navigation.d.ts.map +1 -1
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/related-content/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/autocomplete.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +6 -5
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +50 -50
- package/dist/components/ui/file-manager/index.js +1 -1
- package/dist/components/ui/floating-tooltip.d.ts +9 -4
- package/dist/components/ui/floating-tooltip.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/index.js +3 -3
- package/dist/components/ui/service-card.d.ts.map +1 -1
- package/dist/components/ui/status-badge.d.ts +1 -1
- package/dist/components/ui/tag.d.ts +1 -1
- package/dist/components/ui/tag.d.ts.map +1 -1
- package/dist/components/ui/truncate-text.d.ts +14 -1
- package/dist/components/ui/truncate-text.d.ts.map +1 -1
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/components/features/time-tracker/time-tracker-header-button.tsx +1 -1
- package/src/components/navigation/app-header.tsx +10 -10
- package/src/components/navigation/header-button.tsx +4 -1
- package/src/components/navigation/header-mingo-button.tsx +2 -2
- package/src/components/navigation/header-skeleton.tsx +4 -4
- package/src/components/navigation/header.tsx +20 -14
- package/src/components/navigation/mingo-ai-button.tsx +23 -22
- package/src/components/navigation/mobile-burger-menu.tsx +3 -3
- package/src/components/navigation/top-navigation.tsx +17 -1
- package/src/components/ui/autocomplete.tsx +5 -2
- package/src/components/ui/button/button.tsx +165 -133
- package/src/components/ui/floating-tooltip.tsx +11 -5
- package/src/components/ui/service-card.tsx +18 -3
- package/src/components/ui/tag.tsx +34 -1
- package/src/components/ui/truncate-text.tsx +20 -0
- package/src/hooks/ui/use-header-height.ts +3 -1
- package/src/stories/TopNavigation.stories.tsx +20 -1
- package/dist/chunk-C5R2OX7A.cjs.map +0 -1
- package/dist/chunk-EMMJIXDF.js.map +0 -1
- package/dist/chunk-L5CI57RM.cjs.map +0 -1
- package/dist/chunk-LBSC62XJ.cjs.map +0 -1
- package/dist/chunk-P7IOCYGD.js.map +0 -1
- package/dist/chunk-WHJGRRK2.js.map +0 -1
- /package/dist/{chunk-O45BOJMS.js.map → chunk-32J4AXWO.js.map} +0 -0
- /package/dist/{chunk-5W6IMPJW.js.map → chunk-AFHWEJXM.js.map} +0 -0
- /package/dist/{chunk-ZEEQTDDD.js.map → chunk-CSRGIQ2G.js.map} +0 -0
- /package/dist/{chunk-ZGU3KBAM.js.map → chunk-EFBKOCEA.js.map} +0 -0
- /package/dist/{chunk-IRR6733A.js.map → chunk-GCVAZR52.js.map} +0 -0
- /package/dist/{chunk-EC3G3BIT.js.map → chunk-HNDHCJV4.js.map} +0 -0
- /package/dist/{chunk-NZEQGBVS.js.map → chunk-JCF55O7G.js.map} +0 -0
- /package/dist/{chunk-JJV237MJ.js.map → chunk-JQDGP4CE.js.map} +0 -0
- /package/dist/{chunk-LS3DMQTE.js.map → chunk-MRPFFHBK.js.map} +0 -0
- /package/dist/{chunk-2Q6X4SE3.js.map → chunk-QFQBYNQJ.js.map} +0 -0
- /package/dist/{chunk-VPQBQJ4S.js.map → chunk-XRGAQM3F.js.map} +0 -0
- /package/dist/{chunk-QJMFF2YG.js.map → chunk-XT4P4JGJ.js.map} +0 -0
|
@@ -169,7 +169,7 @@ export const AppHeader = React.memo(function AppHeader({
|
|
|
169
169
|
<HeaderButton
|
|
170
170
|
onClick={onToggleMobileMenu}
|
|
171
171
|
isActive={isMobileMenuOpen}
|
|
172
|
-
icon={isMobileMenuOpen ? <XmarkIcon className="w-
|
|
172
|
+
icon={isMobileMenuOpen ? <XmarkIcon className="w-6 h-6" /> : <Menu01Icon className="w-6 h-6" />}
|
|
173
173
|
aria-label={isMobileMenuOpen ? 'Close menu' : 'Open menu'}
|
|
174
174
|
aria-expanded={isMobileMenuOpen}
|
|
175
175
|
className="border-r border-ods-border"
|
|
@@ -195,7 +195,7 @@ export const AppHeader = React.memo(function AppHeader({
|
|
|
195
195
|
{/* Mobile: Search button */}
|
|
196
196
|
{showSearch && (
|
|
197
197
|
<HeaderButton
|
|
198
|
-
icon={<SearchIcon className="w-
|
|
198
|
+
icon={<SearchIcon className="w-6 h-6" />}
|
|
199
199
|
aria-label="Search"
|
|
200
200
|
className={cn('md:hidden', cellDivider, dimmedClass)}
|
|
201
201
|
disabled={disabled}
|
|
@@ -324,9 +324,9 @@ function NotificationsHeaderButton({ fallbackUnreadCount, disabled, dimmedClass
|
|
|
324
324
|
<HeaderButton
|
|
325
325
|
icon={
|
|
326
326
|
isActive ? (
|
|
327
|
-
<XmarkIcon className="w-
|
|
327
|
+
<XmarkIcon className="w-6 h-6" />
|
|
328
328
|
) : (
|
|
329
|
-
<div className="relative w-
|
|
329
|
+
<div className="relative w-6 h-6">
|
|
330
330
|
<BellIcon className="w-full h-full" />
|
|
331
331
|
{hasUnread && (
|
|
332
332
|
<span className="absolute top-0 right-0 bg-ods-warning rounded-full w-1.5 h-1.5 md:w-2 md:h-2" />
|
|
@@ -357,11 +357,11 @@ function HeaderCellSkeleton({ className }: { className?: string }) {
|
|
|
357
357
|
return (
|
|
358
358
|
<div
|
|
359
359
|
className={cn(
|
|
360
|
-
'flex h-full w-
|
|
360
|
+
'flex h-full w-14 shrink-0 items-center justify-center border-l border-ods-border',
|
|
361
361
|
className,
|
|
362
362
|
)}
|
|
363
363
|
>
|
|
364
|
-
<div className="h-
|
|
364
|
+
<div className="h-6 w-6 animate-pulse rounded bg-ods-border" />
|
|
365
365
|
</div>
|
|
366
366
|
);
|
|
367
367
|
}
|
|
@@ -376,8 +376,8 @@ function HeaderCellSkeleton({ className }: { className?: string }) {
|
|
|
376
376
|
*/
|
|
377
377
|
function HeaderWideCellSkeleton() {
|
|
378
378
|
return (
|
|
379
|
-
<div className="flex h-full w-
|
|
380
|
-
<div className="h-
|
|
379
|
+
<div className="flex h-full w-14 shrink-0 items-center justify-center gap-2 border-l border-ods-border md:w-[140px] md:px-4">
|
|
380
|
+
<div className="h-6 w-6 shrink-0 animate-pulse rounded bg-ods-border" />
|
|
381
381
|
<div className="hidden h-5 animate-pulse rounded bg-ods-border md:block md:w-[72px]" />
|
|
382
382
|
</div>
|
|
383
383
|
);
|
|
@@ -411,8 +411,8 @@ function AppHeaderSkeleton({
|
|
|
411
411
|
aria-busy="true"
|
|
412
412
|
leading={
|
|
413
413
|
// Burger cell: mobile only, in CSS.
|
|
414
|
-
<div className="flex h-full w-
|
|
415
|
-
<div className="h-
|
|
414
|
+
<div className="flex h-full w-14 shrink-0 items-center justify-center border-r border-ods-border md:hidden">
|
|
415
|
+
<div className="h-6 w-6 animate-pulse rounded bg-ods-border" />
|
|
416
416
|
</div>
|
|
417
417
|
}
|
|
418
418
|
logo={
|
|
@@ -23,7 +23,10 @@ export function HeaderButton({
|
|
|
23
23
|
className={cn(
|
|
24
24
|
"flex items-center justify-center shrink-0",
|
|
25
25
|
"transition-colors duration-200",
|
|
26
|
-
|
|
26
|
+
// Square cell width follows the TopNavigation size (56px small /
|
|
27
|
+
// 72px big) via the shell's --top-nav-cell var; 56px fallback for
|
|
28
|
+
// standalone use.
|
|
29
|
+
"w-[var(--top-nav-cell,3.5rem)] h-full",
|
|
27
30
|
isActive
|
|
28
31
|
? "text-ods-text-primary bg-ods-bg-active"
|
|
29
32
|
: // Transparent at rest so the cell inherits the bar's background
|
|
@@ -57,7 +57,7 @@ export function HeaderMingoButton({
|
|
|
57
57
|
// Mobile, drawer open: the icon-only button doubles as the close
|
|
58
58
|
// affordance, so swap the Mingo logo for an X. Match the other header
|
|
59
59
|
// icons (e.g. notifications): secondary color, w-4 h-4 → md:w-6 h-6.
|
|
60
|
-
<XmarkIcon className="w-
|
|
60
|
+
<XmarkIcon className="w-6 h-6 shrink-0 text-ods-text-secondary" />
|
|
61
61
|
) : (
|
|
62
62
|
// Outer frame follows the button's text color (currentColor); the eyes
|
|
63
63
|
// and corner block are ODS cyan.
|
|
@@ -65,7 +65,7 @@ export function HeaderMingoButton({
|
|
|
65
65
|
color="currentColor"
|
|
66
66
|
eyesColor="var(--ods-flamingo-cyan-base)"
|
|
67
67
|
cornerColor="var(--ods-flamingo-cyan-base)"
|
|
68
|
-
className="w-
|
|
68
|
+
className="w-6 h-6 shrink-0"
|
|
69
69
|
/>
|
|
70
70
|
)}
|
|
71
71
|
{!iconOnly && (
|
|
@@ -21,20 +21,20 @@ export function HeaderSkeleton({ config }: HeaderSkeletonProps) {
|
|
|
21
21
|
<div className="sticky top-0 z-[50] w-full">
|
|
22
22
|
<header
|
|
23
23
|
className={cn(
|
|
24
|
-
'flex h-
|
|
24
|
+
'flex h-[72px] w-full items-center border-b border-t border-ods-border md:border-t-0',
|
|
25
25
|
config?.backgroundColor || 'bg-ods-card',
|
|
26
26
|
config?.className,
|
|
27
27
|
)}
|
|
28
28
|
>
|
|
29
29
|
{/* Leading cells: admin toggle / burger */}
|
|
30
30
|
{showLeftActions && (
|
|
31
|
-
<div className="flex h-full w-
|
|
31
|
+
<div className="flex h-full w-[72px] items-center justify-center border-r border-ods-border">
|
|
32
32
|
<div className="h-6 w-6 animate-pulse rounded bg-ods-border" />
|
|
33
33
|
</div>
|
|
34
34
|
)}
|
|
35
35
|
{showMobileMenu && (
|
|
36
|
-
<div className="flex h-full w-
|
|
37
|
-
<div className="h-
|
|
36
|
+
<div className="flex h-full w-[72px] items-center justify-center border-r border-ods-border lg:hidden">
|
|
37
|
+
<div className="h-6 w-6 animate-pulse rounded bg-ods-border" />
|
|
38
38
|
</div>
|
|
39
39
|
)}
|
|
40
40
|
|
|
@@ -135,11 +135,12 @@ export function Header({ config, platform }: HeaderProps) {
|
|
|
135
135
|
[item.id]: !prev[item.id],
|
|
136
136
|
}));
|
|
137
137
|
}}
|
|
138
|
-
size="
|
|
138
|
+
size="default"
|
|
139
|
+
font="regular"
|
|
139
140
|
className={cn(
|
|
140
|
-
// Top-level nav links:
|
|
141
|
-
// (
|
|
142
|
-
|
|
141
|
+
// Top-level nav links: the default-size button with the h4
|
|
142
|
+
// (DM Sans 500) `font="regular"` label — Figma 133-740, added
|
|
143
|
+
// for navigation; dropdown children stay on the h6 step.
|
|
143
144
|
item.isActive && 'bg-ods-bg-hover', // Active items get subtle gray background
|
|
144
145
|
isOpen && 'bg-ods-bg-hover', // Open dropdowns get gray background
|
|
145
146
|
item.className,
|
|
@@ -227,9 +228,9 @@ export function Header({ config, platform }: HeaderProps) {
|
|
|
227
228
|
onClick={item.onClick} // Only for non-navigation actions
|
|
228
229
|
leftIcon={item.icon}
|
|
229
230
|
rightIcon={item.badge}
|
|
230
|
-
size="
|
|
231
|
+
size="default"
|
|
232
|
+
font="regular"
|
|
231
233
|
className={cn(
|
|
232
|
-
'text-h3 font-bold tracking-[-0.36px]',
|
|
233
234
|
'hover:bg-ods-bg-hover focus:bg-ods-bg-hover',
|
|
234
235
|
'whitespace-nowrap',
|
|
235
236
|
'text-ods-text-primary', // All items use primary text color
|
|
@@ -251,9 +252,9 @@ export function Header({ config, platform }: HeaderProps) {
|
|
|
251
252
|
onClick={item.onClick}
|
|
252
253
|
leftIcon={item.icon}
|
|
253
254
|
rightIcon={item.badge}
|
|
254
|
-
size="
|
|
255
|
+
size="default"
|
|
256
|
+
font="regular"
|
|
255
257
|
className={cn(
|
|
256
|
-
'text-h3 font-bold tracking-[-0.36px]',
|
|
257
258
|
'hover:bg-ods-bg-hover focus:bg-ods-bg-hover',
|
|
258
259
|
'whitespace-nowrap',
|
|
259
260
|
'text-ods-text-primary', // All items use primary text color
|
|
@@ -301,15 +302,16 @@ export function Header({ config, platform }: HeaderProps) {
|
|
|
301
302
|
style={config.style}
|
|
302
303
|
backgroundClassName={config.backgroundColor}
|
|
303
304
|
centerBreakpoint="lg"
|
|
305
|
+
size="big"
|
|
304
306
|
leading={
|
|
305
307
|
<>
|
|
306
308
|
{/* Length-guarded: platform configs often pass `left: []`, and an
|
|
307
309
|
empty array is truthy — without the guard the cell would render
|
|
308
310
|
as a bare divider + padding. */}
|
|
311
|
+
{/* No padding on the wrapper: leading cells (HeaderButton-based
|
|
312
|
+
admin toggles) size themselves to the bar's square cell. */}
|
|
309
313
|
{!!config.actions?.left?.length && (
|
|
310
|
-
<div className="flex h-full items-center border-r border-ods-border
|
|
311
|
-
{config.actions.left}
|
|
312
|
-
</div>
|
|
314
|
+
<div className="flex h-full items-center border-r border-ods-border">{config.actions.left}</div>
|
|
313
315
|
)}
|
|
314
316
|
{/* Mobile/tablet menu toggle — a leading cell per the ODS spec
|
|
315
317
|
(banded with the nav breakpoint `lg` so the desktop nav and the
|
|
@@ -328,8 +330,8 @@ export function Header({ config, platform }: HeaderProps) {
|
|
|
328
330
|
aria-controls={config.mobile?.isOpen ? MOBILE_NAV_PANEL_ID : undefined}
|
|
329
331
|
icon={
|
|
330
332
|
config.mobile?.isOpen
|
|
331
|
-
? config.mobile?.closeIcon || <XmarkIcon className="w-
|
|
332
|
-
: config.mobile?.menuIcon || <Menu01Icon className="w-
|
|
333
|
+
? config.mobile?.closeIcon || <XmarkIcon className="w-6 h-6" />
|
|
334
|
+
: config.mobile?.menuIcon || <Menu01Icon className="w-6 h-6" />
|
|
333
335
|
}
|
|
334
336
|
/>
|
|
335
337
|
)}
|
|
@@ -340,7 +342,11 @@ export function Header({ config, platform }: HeaderProps) {
|
|
|
340
342
|
{config.logo.element}
|
|
341
343
|
</Link>
|
|
342
344
|
}
|
|
343
|
-
|
|
345
|
+
// Logo inset for the hub sites: 12px on mobile (the shell's base p-m),
|
|
346
|
+
// 16px on tablet (mf token; the shell default is pl-l = 24px there),
|
|
347
|
+
// desktop unchanged — pl-xxl, collapsed to pl-l when an always-visible
|
|
348
|
+
// leading cell sits before the logo.
|
|
349
|
+
logoClassName={cn('md:pl-[var(--spacing-system-mf)]', hasLeftCells && 'lg:pl-[var(--spacing-system-l)]')}
|
|
344
350
|
center={
|
|
345
351
|
hasNav ? (
|
|
346
352
|
<nav
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
'use client'
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { cn } from '../../utils';
|
|
5
|
+
import { MingoIcon } from '../icons';
|
|
6
6
|
|
|
7
7
|
export interface MingoAiButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
-
source?: string
|
|
8
|
+
source?: string;
|
|
9
9
|
/** The platform's Mingo identity glyph — pass the SAME server-configured
|
|
10
10
|
* icon the chat panel renders (host-side: `EntityIcon` fed by the admin
|
|
11
11
|
* `assistantIcon`), so the launcher and the panel can never diverge.
|
|
12
12
|
* Falls back to the packaged Mingo mark when the server has none. */
|
|
13
|
-
icon?: React.ReactNode
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
14
|
/** The launcher's wordmark + aria-label — pass the server-configured
|
|
15
15
|
* assistant name (same `assistantName` the chat panel shows) so the
|
|
16
16
|
* launcher never hardcodes an identity the admin has renamed. */
|
|
17
|
-
label?: string
|
|
17
|
+
label?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -32,7 +32,7 @@ export interface MingoAiButtonProps extends React.ButtonHTMLAttributes<HTMLButto
|
|
|
32
32
|
* icon-only collapse that `Button` cannot express (same precedent as
|
|
33
33
|
* `header-mingo-button.tsx`).
|
|
34
34
|
*/
|
|
35
|
-
const MINGO_ACCENT = 'var(--ods-flamingo-cyan-base)'
|
|
35
|
+
const MINGO_ACCENT = 'var(--ods-flamingo-cyan-base)';
|
|
36
36
|
|
|
37
37
|
export function MingoAiButton({ source, icon, label = 'Mingo AI', className, onClick, ...props }: MingoAiButtonProps) {
|
|
38
38
|
return (
|
|
@@ -40,12 +40,12 @@ export function MingoAiButton({ source, icon, label = 'Mingo AI', className, onC
|
|
|
40
40
|
{...props}
|
|
41
41
|
type="button"
|
|
42
42
|
aria-label={label}
|
|
43
|
-
onClick={
|
|
43
|
+
onClick={e => {
|
|
44
44
|
// Coalesce to '' so a source-less mount still matches EmbeddableChat's
|
|
45
45
|
// own `runtime.source ?? ''` comparison (undefined !== '' would make
|
|
46
46
|
// the panel silently ignore the event).
|
|
47
|
-
window.dispatchEvent(new CustomEvent('ask-ai:open', { detail: { source: source ?? '' } }))
|
|
48
|
-
onClick?.(e)
|
|
47
|
+
window.dispatchEvent(new CustomEvent('ask-ai:open', { detail: { source: source ?? '' } }));
|
|
48
|
+
onClick?.(e);
|
|
49
49
|
}}
|
|
50
50
|
className={cn(
|
|
51
51
|
// Unified ODS top-navigation cell (Figma 2797-6808 desktop /
|
|
@@ -58,11 +58,11 @@ export function MingoAiButton({ source, icon, label = 'Mingo AI', className, onC
|
|
|
58
58
|
className,
|
|
59
59
|
)}
|
|
60
60
|
>
|
|
61
|
-
{/* Inner box = 1:1 twin of the
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<span className="relative flex h-
|
|
61
|
+
{/* Inner box = 1:1 twin of the DEFAULT-size Button geometry (rounded-md,
|
|
62
|
+
h-11 md:h-12, px-m) — the same footprint as the header's "Try for
|
|
63
|
+
Free" CTA — so the animated ring traces exactly where a full button
|
|
64
|
+
border would sit inside the 72px bar. */}
|
|
65
|
+
<span className="relative flex h-11 items-center gap-[var(--spacing-system-xsf)] rounded-md px-[var(--spacing-system-m)] md:h-12">
|
|
66
66
|
{/* AI edge light (Apple-Intelligence-style): a rotating accent-
|
|
67
67
|
gradient arc clipped to a 3px ring on the box outline via CSS
|
|
68
68
|
mask (.mingo-edge-frame) — NO opaque cover, so the launcher
|
|
@@ -92,13 +92,14 @@ export function MingoAiButton({ source, icon, label = 'Mingo AI', className, onC
|
|
|
92
92
|
/>
|
|
93
93
|
)}
|
|
94
94
|
{/* Wordmark collapses below md — the mobile cell is icon-only per
|
|
95
|
-
spec.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
spec. h3 bold, matching the default-size CTA label next to it
|
|
96
|
+
(Figma 2936-6825). */}
|
|
97
|
+
{/* Bare `text-h3` — the exact composite the default-size Button label
|
|
98
|
+
uses (bold 700 and -0.02em tracking are built into the utility). */}
|
|
99
|
+
<span className="relative hidden whitespace-nowrap text-h3 text-ods-text-primary md:inline">{label}</span>
|
|
99
100
|
</span>
|
|
100
101
|
</button>
|
|
101
|
-
)
|
|
102
|
+
);
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
export default MingoAiButton
|
|
105
|
+
export default MingoAiButton;
|
|
@@ -9,8 +9,8 @@ import { Logout02Icon, PenEditIcon, UserSearchIcon } from '../icons-v2-generated
|
|
|
9
9
|
import { Button, SquareAvatar } from '../ui'
|
|
10
10
|
import { OVERLAY_BACKDROP_CLASS } from '../ui/drawer'
|
|
11
11
|
|
|
12
|
-
// Header height constant
|
|
13
|
-
const HEADER_HEIGHT =
|
|
12
|
+
// Header height constant — the unified top-navigation `small` bar (56px on all screens)
|
|
13
|
+
const HEADER_HEIGHT = 56
|
|
14
14
|
|
|
15
15
|
export interface MobileBurgerMenuProps {
|
|
16
16
|
/** Whether the menu is open */
|
|
@@ -188,7 +188,7 @@ export const MobileBurgerMenu = React.memo(function MobileBurgerMenu({
|
|
|
188
188
|
fallback={user.userName}
|
|
189
189
|
size="lg"
|
|
190
190
|
variant="round"
|
|
191
|
-
className="w-
|
|
191
|
+
className="w-14 h-14 shrink-0"
|
|
192
192
|
/>
|
|
193
193
|
|
|
194
194
|
{/* User Info */}
|
|
@@ -5,6 +5,17 @@ import { cn } from '../../utils/cn';
|
|
|
5
5
|
|
|
6
6
|
export type TopNavigationCenterBreakpoint = 'md' | 'lg';
|
|
7
7
|
|
|
8
|
+
export type TopNavigationSize = 'small' | 'big';
|
|
9
|
+
|
|
10
|
+
// Bar height + square-cell width per size (Figma 2797-5978 `size` axis).
|
|
11
|
+
// Heights are FIXED across breakpoints. `--top-nav-cell` is consumed by
|
|
12
|
+
// `HeaderButton` (and any custom cell) so cell widths follow the size without
|
|
13
|
+
// each cell knowing about it.
|
|
14
|
+
const SIZE_CLASSES: Record<TopNavigationSize, string> = {
|
|
15
|
+
small: 'h-14 [--top-nav-cell:3.5rem]',
|
|
16
|
+
big: 'h-[72px] [--top-nav-cell:4.5rem]',
|
|
17
|
+
};
|
|
18
|
+
|
|
8
19
|
// Literal class maps — Tailwind's scanner needs the full class strings.
|
|
9
20
|
const CENTER_VISIBILITY: Record<TopNavigationCenterBreakpoint, string> = {
|
|
10
21
|
md: 'hidden md:flex',
|
|
@@ -52,6 +63,9 @@ export interface TopNavigationProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
52
63
|
backgroundClassName?: string;
|
|
53
64
|
/** Top border on mobile (the ODS spec bar shows it below md). Default true. */
|
|
54
65
|
mobileTopBorder?: boolean;
|
|
66
|
+
/** Bar size (Figma 2797-5978 `size` axis): `small` = 56px (console),
|
|
67
|
+
* `big` = 72px (marketing/hub sites). Fixed across breakpoints. */
|
|
68
|
+
size?: TopNavigationSize;
|
|
55
69
|
}
|
|
56
70
|
|
|
57
71
|
const hasContent = (node: React.ReactNode): boolean => node !== null && node !== undefined && node !== false;
|
|
@@ -80,6 +94,7 @@ export function TopNavigation({
|
|
|
80
94
|
sideActions,
|
|
81
95
|
backgroundClassName,
|
|
82
96
|
mobileTopBorder = true,
|
|
97
|
+
size = 'small',
|
|
83
98
|
className,
|
|
84
99
|
children,
|
|
85
100
|
...props
|
|
@@ -87,7 +102,8 @@ export function TopNavigation({
|
|
|
87
102
|
return (
|
|
88
103
|
<header
|
|
89
104
|
className={cn(
|
|
90
|
-
'flex
|
|
105
|
+
'flex w-full items-center border-b border-ods-border',
|
|
106
|
+
SIZE_CLASSES[size],
|
|
91
107
|
mobileTopBorder && 'border-t md:border-t-0',
|
|
92
108
|
backgroundClassName ?? 'bg-ods-card',
|
|
93
109
|
className,
|
|
@@ -25,6 +25,7 @@ import { Chevron02DownIcon } from "../icons-v2-generated/arrows/chevron-02-down-
|
|
|
25
25
|
|
|
26
26
|
import { Loader2 } from "lucide-react"
|
|
27
27
|
import { cn } from "../../utils/cn"
|
|
28
|
+
import { TruncateText } from "./truncate-text"
|
|
28
29
|
import { useAutoLimitTags } from "../../hooks/ui/use-auto-limit-tags"
|
|
29
30
|
import { FieldWrapper } from "./field-wrapper"
|
|
30
31
|
import { HiddenTagsPopup } from "./hidden-tags-popup"
|
|
@@ -601,7 +602,8 @@ function AutocompleteInner<T = string>(
|
|
|
601
602
|
)}
|
|
602
603
|
onClick={handleCreate}
|
|
603
604
|
>
|
|
604
|
-
|
|
605
|
+
{/* text-current: the row owns the typography/color (accent), not the TruncateText defaults. */}
|
|
606
|
+
<TruncateText className="text-current">{`+ Create "${inputValue.trim()}"`}</TruncateText>
|
|
605
607
|
</div>
|
|
606
608
|
)
|
|
607
609
|
) : (
|
|
@@ -635,7 +637,8 @@ function AutocompleteInner<T = string>(
|
|
|
635
637
|
>
|
|
636
638
|
{renderOption ? renderOption(option, isSelected) : (
|
|
637
639
|
<div className="flex items-center justify-between gap-[var(--spacing-system-xsf)] w-full min-w-0">
|
|
638
|
-
|
|
640
|
+
{/* text-current: selection state colors the row (accent vs primary); inherit it. */}
|
|
641
|
+
<TruncateText className="text-current">{option.label}</TruncateText>
|
|
639
642
|
<div className="flex items-center gap-[var(--spacing-system-xsf)] shrink-0">
|
|
640
643
|
{isSelected && (
|
|
641
644
|
<CheckIcon className="text-ods-accent" size={20} />
|