@cognitap/radiant 0.0.36 → 0.0.37

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/src/index.ts CHANGED
@@ -469,3 +469,41 @@ export type {
469
469
  ContextMenuSubContentProps,
470
470
  ContextMenuState
471
471
  } from './ContextMenu.js'
472
+
473
+ export {
474
+ Menubar,
475
+ MenubarMenu,
476
+ MenubarTrigger,
477
+ MenubarPortal,
478
+ MenubarContent,
479
+ MenubarItem,
480
+ MenubarGroup,
481
+ MenubarLabel,
482
+ MenubarSeparator,
483
+ MenubarCheckboxItem,
484
+ MenubarRadioGroup,
485
+ MenubarRadioItem,
486
+ MenubarSub,
487
+ MenubarSubTrigger,
488
+ MenubarSubContent,
489
+ useMenubar
490
+ } from './Menubar.js'
491
+ export type {
492
+ MenubarProps,
493
+ MenubarMenuProps,
494
+ MenubarTriggerProps,
495
+ MenubarPortalProps,
496
+ MenubarContentProps,
497
+ MenubarItemProps,
498
+ MenubarGroupProps,
499
+ MenubarLabelProps,
500
+ MenubarSeparatorProps,
501
+ MenubarCheckboxItemProps,
502
+ MenubarRadioGroupProps,
503
+ MenubarRadioItemProps,
504
+ MenubarSubProps,
505
+ MenubarSubTriggerProps,
506
+ MenubarSubContentProps,
507
+ MenubarState,
508
+ MenubarRenderProps
509
+ } from './Menubar.js'
@@ -20,6 +20,7 @@ type Options<Node extends HTMLElement> = {
20
20
  loop: boolean
21
21
  active?: boolean
22
22
  deferTo?: string
23
+ includeAriaDisabled?: boolean
23
24
  }
24
25
 
25
26
  /** Native hosts and DOM order stay authoritative, including dynamic disabled items. */
@@ -31,7 +32,8 @@ export function useRovingFocus<Node extends HTMLElement>({
31
32
  orientation,
32
33
  loop,
33
34
  active = true,
34
- deferTo
35
+ deferTo,
36
+ includeAriaDisabled = false
35
37
  }: Options<Node>) {
36
38
  const ownsFocus = (node: Node) => {
37
39
  if (!active) return false
@@ -50,7 +52,7 @@ export function useRovingFocus<Node extends HTMLElement>({
50
52
  return items(node).filter(
51
53
  item =>
52
54
  !item.matches(':disabled') &&
53
- item.getAttribute('aria-disabled') !== 'true' &&
55
+ (includeAriaDisabled || item.getAttribute('aria-disabled') !== 'true') &&
54
56
  !item.closest('[inert], [hidden]') &&
55
57
  item.getClientRects().length > 0 &&
56
58
  !['hidden', 'collapse'].includes(view.getComputedStyle(item).visibility)
@@ -123,6 +125,7 @@ export function useRovingFocus<Node extends HTMLElement>({
123
125
  }
124
126
  })
125
127
  return {
128
+ items: enabled,
126
129
  onFocus(event: FocusEvent<Node>) {
127
130
  if (
128
131
  ownsFocus(event.currentTarget) &&
@@ -2,6 +2,7 @@ import { kebabCase } from './tokens.js'
2
2
 
3
3
  /** Explicit component slots; omitted slots reset to CSS fallback semantics. */
4
4
  export const componentRegistry = {
5
+ menubar: { gap: 'css', padding: 'css', radius: 'css', background: 'css' },
5
6
  contextMenu: { width: 'css' },
6
7
  hoverCard: { width: 'css' },
7
8
  button: {