@flamingo-stack/openframe-frontend-core 0.0.829 → 0.0.830

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 (74) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-DU6AF77X.cjs → chunk-2BGLALP5.cjs} +14 -14
  3. package/dist/{chunk-MFYSV7DE.cjs → chunk-56EP4QM2.cjs} +24 -24
  4. package/dist/{chunk-IHRMX3X6.cjs → chunk-5KSPG3TV.cjs} +357 -357
  5. package/dist/{chunk-UO6F6LLI.cjs → chunk-5LED4QHZ.cjs} +508 -451
  6. package/dist/{chunk-IMDYB77M.cjs → chunk-CAGQAMJ6.cjs} +21 -21
  7. package/dist/{chunk-4DUVTJ6A.cjs → chunk-D2LXFMZI.cjs} +22 -22
  8. package/dist/{chunk-LNXRTVOY.cjs → chunk-DUGOOTER.cjs} +11 -11
  9. package/dist/{chunk-R3PKAIX3.cjs → chunk-E6W4YDPS.cjs} +2 -2
  10. package/dist/{chunk-AH4YWTWZ.cjs → chunk-FFFN4IY2.cjs} +5 -5
  11. package/dist/{chunk-THPAGFT6.cjs → chunk-HYCMMECU.cjs} +44 -44
  12. package/dist/{chunk-UE5ZBCJ4.cjs → chunk-HYGWRUEM.cjs} +3 -3
  13. package/dist/{chunk-ZJXLNIWC.cjs → chunk-M75723HD.cjs} +8 -8
  14. package/dist/{chunk-IBQ3CSKL.cjs → chunk-PUXYAHH3.cjs} +3 -3
  15. package/dist/{chunk-3B6ZE4EZ.cjs → chunk-QTLWU6FY.cjs} +5 -5
  16. package/dist/{chunk-HMC2IWV4.cjs → chunk-RRPID7Z7.cjs} +6 -6
  17. package/dist/{chunk-6WNSZ5XP.cjs → chunk-SAW7V7CU.cjs} +13 -13
  18. package/dist/{chunk-4ZIKDOPY.cjs → chunk-TUMSVFVS.cjs} +4 -4
  19. package/dist/{chunk-DWSU35QQ.cjs → chunk-ULF4ZOUM.cjs} +57 -57
  20. package/dist/{chunk-IFLGIBFZ.cjs → chunk-WCCE4WF3.cjs} +50 -50
  21. package/dist/{chunk-7PZQ7SHB.cjs → chunk-WWDNLMB7.cjs} +16 -16
  22. package/dist/{chunk-PRZAEPGG.cjs → chunk-WZYBUJJG.cjs} +41 -41
  23. package/dist/{chunk-YHQDB5QJ.cjs → chunk-X425BGXS.cjs} +2 -2
  24. package/dist/{chunk-BIG3O33P.cjs → chunk-YJZ7R3W5.cjs} +28 -2
  25. package/dist/{cloud-tenants-YVCSVVIS.cjs → cloud-tenants-4KQQPXPM.cjs} +9 -9
  26. package/dist/components/case-studies/index.cjs +21 -21
  27. package/dist/components/chat/embeddable-chat.d.ts +3 -3
  28. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  29. package/dist/components/chat/embeddable-chat.js +21 -14
  30. package/dist/components/chat/guide-welcome.d.ts +5 -16
  31. package/dist/components/chat/guide-welcome.d.ts.map +1 -1
  32. package/dist/components/chat/guide-welcome.js +4 -29
  33. package/dist/components/chat/index.cjs +9 -5
  34. package/dist/components/chat/mingo-quick-action-wall.d.ts +42 -16
  35. package/dist/components/chat/mingo-quick-action-wall.d.ts.map +1 -1
  36. package/dist/components/chat/mingo-quick-action-wall.js +105 -19
  37. package/dist/components/chat/mingo-welcome.d.ts +6 -13
  38. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  39. package/dist/components/chat/mingo-welcome.js +5 -9
  40. package/dist/components/chat/quick-action-chip.d.ts +8 -2
  41. package/dist/components/chat/quick-action-chip.d.ts.map +1 -1
  42. package/dist/components/chat/quick-action-chip.js +18 -8
  43. package/dist/components/contact/index.cjs +10 -10
  44. package/dist/components/docs/index.cjs +13 -13
  45. package/dist/components/embeds/index.cjs +10 -10
  46. package/dist/components/faq/index.cjs +11 -11
  47. package/dist/components/features/index.cjs +9 -9
  48. package/dist/components/help-center-pages/index.cjs +71 -71
  49. package/dist/components/index.cjs +47 -43
  50. package/dist/components/meeting-scheduler/index.cjs +41 -41
  51. package/dist/components/navigation/index.cjs +12 -12
  52. package/dist/components/onboarding-guides/index.cjs +11 -11
  53. package/dist/components/product-demo/index.cjs +20 -20
  54. package/dist/components/tickets/index.cjs +14 -14
  55. package/dist/components/ui/actions-menu.d.ts.map +1 -1
  56. package/dist/components/ui/actions-menu.js +27 -1
  57. package/dist/components/ui/index.cjs +13 -9
  58. package/dist/{devices-AW6BERJF.cjs → devices-H6C4NMIY.cjs} +10 -10
  59. package/dist/{embeddable-chat-ZJIOMMSA.cjs → embeddable-chat-KUESE7P6.cjs} +104 -97
  60. package/dist/index.cjs +17 -13
  61. package/dist/{knowledge-PEOXTIVS.cjs → knowledge-O6IBO5Y5.cjs} +10 -10
  62. package/dist/{logs-CYA7H4KM.cjs → logs-Y2UCF24Z.cjs} +16 -16
  63. package/dist/{policies-M6QSFL5G.cjs → policies-J6O3RLJT.cjs} +13 -13
  64. package/dist/{remote-session-QGFG5WAL.cjs → remote-session-RVTFWSU4.cjs} +5 -5
  65. package/dist/{scripts-Y46ECDDP.cjs → scripts-N67MM4T2.cjs} +16 -16
  66. package/dist/{software-update-OTC2DGQZ.cjs → software-update-HB7F6KNG.cjs} +13 -13
  67. package/dist/{tickets-board-KCH6ITUV.cjs → tickets-board-2K3PBCNW.cjs} +8 -8
  68. package/package.json +1 -1
  69. package/src/components/chat/embeddable-chat.tsx +29 -45
  70. package/src/components/chat/guide-welcome.tsx +12 -57
  71. package/src/components/chat/mingo-quick-action-wall.tsx +166 -31
  72. package/src/components/chat/mingo-welcome.tsx +16 -35
  73. package/src/components/chat/quick-action-chip.tsx +32 -8
  74. package/src/components/ui/actions-menu.tsx +35 -1
@@ -190,7 +190,7 @@ const MenuItem: React.FC<MenuItemProps> = ({ item, onItemClick }) => {
190
190
  ROW_CLASSES,
191
191
  item.disabled
192
192
  ? 'pointer-events-none cursor-not-allowed text-ods-text-secondary opacity-60'
193
- : 'text-ods-text-primary hover:bg-ods-bg-hover',
193
+ : 'text-ods-text-primary hover:bg-ods-bg-hover focus-visible:bg-ods-bg-hover',
194
194
  );
195
195
 
196
196
  const subTriggerClasses = cn(itemClasses, 'focus:bg-ods-bg-hover data-[state=open]:bg-ods-bg-active');
@@ -306,6 +306,20 @@ const MenuItem: React.FC<MenuItemProps> = ({ item, onItemClick }) => {
306
306
  );
307
307
  };
308
308
 
309
+ /** The rows a keyboard moves between in an open menu: every enabled `menuitem` (plain, radio, submenu trigger). */
310
+ function menuRows(content: HTMLElement | null): HTMLElement[] {
311
+ if (!content) return [];
312
+ return [...content.querySelectorAll<HTMLElement>('[role^="menuitem"]:not([aria-disabled="true"])')];
313
+ }
314
+
315
+ /** The menu-button keys (WAI-ARIA APG, "Menu Button"): ↓/↑ move between rows (wrapping), Home/End jump to the ends. */
316
+ const MENU_ROW_KEYS: Record<string, (index: number, count: number) => number> = {
317
+ ArrowDown: (index, count) => (index + 1) % count,
318
+ ArrowUp: (index, count) => (index - 1 + count) % count,
319
+ Home: () => 0,
320
+ End: (_index, count) => count - 1,
321
+ };
322
+
309
323
  const GroupSeparator: React.FC = () => <div className="h-[3px] w-full bg-ods-bg-surface" />;
310
324
 
311
325
  export const ActionsMenu: React.FC<ActionsMenuProps> = ({ groups, className = '', onItemClick, header }) => {
@@ -407,6 +421,14 @@ export const ActionsMenuDropdown: React.FC<ActionsMenuDropdownProps> = ({
407
421
  // momentum and the ~1px settle after opening don't close the menu the
408
422
  // user is reaching for.
409
423
  const triggerRef = React.useRef<HTMLButtonElement | null>(null);
424
+ const contentRef = React.useRef<HTMLDivElement | null>(null);
425
+ // On open, focus goes to the first row (WAI-ARIA APG, "Menu Button"). The rows are not Radix items, so Radix only
426
+ // focuses the menu itself; one frame later, once it has, the first row takes focus.
427
+ React.useEffect(() => {
428
+ if (!open) return undefined;
429
+ const frame = requestAnimationFrame(() => menuRows(contentRef.current)[0]?.focus());
430
+ return () => cancelAnimationFrame(frame);
431
+ }, [open]);
410
432
  React.useEffect(() => {
411
433
  if (!open) return undefined;
412
434
  if (typeof document === 'undefined') return undefined;
@@ -461,9 +483,21 @@ export const ActionsMenuDropdown: React.FC<ActionsMenuDropdownProps> = ({
461
483
  {triggerNode}
462
484
  </DropdownMenuTrigger>
463
485
  <DropdownMenuContent
486
+ ref={contentRef}
464
487
  align={align}
465
488
  side={side}
466
489
  sideOffset={sideOffset}
490
+ // The rows are this menu's own, not Radix items, so Radix does not move between them: the menu-button
491
+ // pattern's keys are done here, and the first row takes focus on open (the effect above).
492
+ onKeyDown={event => {
493
+ const move = MENU_ROW_KEYS[event.key];
494
+ if (!move) return;
495
+ const rows = menuRows(contentRef.current);
496
+ if (rows.length === 0) return;
497
+ event.preventDefault();
498
+ const current = rows.indexOf(document.activeElement as HTMLElement);
499
+ rows[move(Math.max(current, 0), rows.length)]?.focus();
500
+ }}
467
501
  onCloseAutoFocus={onCloseAutoFocus}
468
502
  className={cn('overflow-visible border-0 bg-transparent p-0 shadow-none', contentClassName)}
469
503
  >