{"version":3,"names":["dynamic","createSignal","omit","onCleanup","untrack","useDirection","useBaseUiId","FloatingNode","FloatingTree","useFloatingNodeId","FloatingTreeStore","readOption","mergeRootProps","resolveClassStyle","createMenubar","MenubarContext","MenubarDataAttributes","getTriggers","content","nodes","querySelectorAll","Array","from","filter","el","hasAttribute","MenubarInner","props","tree","menubarPrimitive","orientation","modal","disabled","loopFocus","hasSubmenuOpen","setHasSubmenuOpen","registerOpenMenu","fallbackId","resolvedId","id","contentElement","setContentElement","ownedWrite","allowMouseUpTriggerRef","current","menubarNodeId","openFromEvents","handleMenuOpenChange","data","parentNodeId","open","Math","max","events","on","off","direction","handleKeyDown","event","triggers","length","target","active","HTMLElement","find","t","contains","undefined","isRtl","forwardKey","backwardKey","firstKey","lastKey","currentIndex","indexOf","nextIndex","key","preventDefault","stopPropagation","focus","contextValue","rootId","setRef","userStyling","userHtmlProps","internalProps","ref","role","onKeyDown","aria-orientation","styledUserProps","merged","Tag","as","children","Menubar"],"sources":["menubar.tsx"],"sourcesContent":["import type { JSX, ValidComponent } from \"@solidjs/web\";\n/**\n * `<Menubar>` — container for top-level menus with arrow-key roving focus\n * between triggers. Solid 2 port of Base UI React's `Menubar`\n * (`packages/react/src/menubar/Menubar.tsx`).\n *\n * Wraps the contained `<Menu.Root>`s in a shared `<FloatingTree>`, provides\n * a `MenubarContext` that each child menu reads, and owns a keyboard\n * handler on the `role=\"menubar\"` element so arrow keys navigate between\n * the contained `<Menu.Trigger>` elements.\n *\n * ### Port deviations from React\n *\n *  - React uses `useListNavigation` inside each menu with `externalTree`\n *    + `parentOrientation` so arrow-keys flow across menus through the\n *    floating tree. The Solid port discovers triggers by querying the\n *    menubar's content element for `button[aria-haspopup=\"menu\"]`.\n *    `useListNavigation` already accepts `parentOrientation` as an\n *    accessor (P3 landed) — now needs structural plumbing\n *    (MenubarContext → child Menu.Root → listnav) and top-level menus\n *    must consume the parent-axis main-key to suppress the menu's own\n *    open-on-arrow path in vertical menubars. Deferred until the\n *    browser harness can verify vertical-menubar key mapping.\n *  - `menuopenchange` events ARE consumed from the shared `FloatingTree`.\n *    The menubar wraps children in\n *    `<FloatingNode id={menubarNodeId}>` so contained `<Menu.Root>`s'\n *    `floatingParentNodeId` equals the menubar's id — that's the key the\n *    event handler filters on. The older direct-through-context path\n *    (`MenubarContext.setHasSubmenuOpen` + `registerOpenMenu`) is\n *    preserved; both paths are idempotent.\n *  - `allowMouseUpTriggerRef` is ported as a shared `MutableRef<boolean>`;\n *    consumers (child menus) can read it when the mouseup-on-item window\n *    lands.\n */\n\nimport { dynamic } from \"@solidjs/web\";\nimport {\n\ttype Accessor,\n\tcreateSignal,\n\tomit,\n\tonCleanup,\n\tuntrack,\n} from \"solid-js\";\nimport { useDirection } from \"../direction-provider/direction-provider-context.ts\";\nimport { useBaseUiId } from \"../internals/base-ui-id\";\nimport {\n\tFloatingNode,\n\tFloatingTree,\n\tuseFloatingNodeId,\n} from \"../internals/floating-ui/components/floating-tree.tsx\";\nimport { FloatingTreeStore } from \"../internals/floating-ui/components/floating-tree-store.ts\";\nimport type { MutableRef } from \"../internals/floating-ui/types.ts\";\nimport { type MaybeAccessor, readOption } from \"../internals/maybe-accessor\";\nimport { mergeRootProps } from \"../internals/merge-root-props\";\nimport { resolveClassStyle } from \"../internals/resolve-class-style\";\nimport type { BaseUIComponentProps } from \"../internals/types\";\nimport type { MenuRootOrientation } from \"../menu/root/menu-root-context\";\nimport { createMenubar } from \"./create-menubar\";\nimport { MenubarContext, type MenubarContextValue } from \"./menubar-context.ts\";\nimport { MenubarDataAttributes } from \"./menubar-data-attributes.ts\";\n\nexport interface MenubarState {\n\t/** The orientation of the menubar. */\n\torientation: MenuRootOrientation;\n\t/** Whether the menubar is modal. */\n\tmodal: boolean;\n\t/** Whether any submenu within the menubar is open. */\n\thasSubmenuOpen: boolean;\n}\n\nexport interface MenubarProps\n\textends BaseUIComponentProps<\"div\", MenubarState> {\n\t/** Tag/component to render. Defaults to `\"div\"`. */\n\tas?: ValidComponent;\n\t/**\n\t * Whether the menubar is modal.\n\t * @default true\n\t */\n\tmodal?: MaybeAccessor<boolean | undefined>;\n\t/**\n\t * Whether the whole menubar is disabled.\n\t * @default false\n\t */\n\tdisabled?: MaybeAccessor<boolean | undefined>;\n\t/**\n\t * The orientation of the menubar.\n\t * @default 'horizontal'\n\t */\n\torientation?: MaybeAccessor<MenuRootOrientation | undefined>;\n\t/**\n\t * Whether to loop keyboard focus back to the first item when the end of\n\t * the list is reached while using the arrow keys.\n\t * @default true\n\t */\n\tloopFocus?: MaybeAccessor<boolean | undefined>;\n}\n\n/** Collect the top-level menu triggers rendered inside the menubar. */\nfunction getTriggers(content: HTMLElement | null): HTMLElement[] {\n\tif (!content) return [];\n\t// Each `<Menu.Trigger>` renders `aria-haspopup=\"menu\"`; a submenu trigger\n\t// sets the same but lives inside a nested menu popup that is portalled —\n\t// so it won't match our container-scoped query.\n\tconst nodes = content.querySelectorAll<HTMLElement>(\n\t\t'button[aria-haspopup=\"menu\"]',\n\t);\n\treturn Array.from(nodes).filter(\n\t\t(el) => !el.hasAttribute(\"disabled\") && !el.hasAttribute(\"aria-disabled\"),\n\t);\n}\n\n/**\n * Inner body — runs INSIDE the `<FloatingTree>` so `useFloatingNodeId` can\n * allocate a node id bound to the menubar's tree. Child `<Menu.Root>`s\n * mounted under this node read `floatingParentNodeId` as the menubar's id,\n * which is the key the events path filters on.\n */\nfunction MenubarInner(\n\tprops: MenubarProps & { tree: FloatingTreeStore },\n): JSX.Element {\n\t// `tree` is a stable store instance passed once from `<Menubar>`; read it\n\t// under `untrack` so the body-time access doesn't trip STRICT_READ.\n\tconst tree = untrack(() => props.tree);\n\t// Compose the headless Menubar primitive — owns orientation, modal, disabled,\n\t// loopFocus, hasSubmenuOpen, and the single-open coordinator. The wrapper\n\t// layers FloatingTree, FloatingNode, role=\"menubar\", and the keyboard\n\t// handler on top.\n\tconst menubarPrimitive = createMenubar({\n\t\torientation: () => readOption(props.orientation) ?? \"horizontal\",\n\t\tmodal: () => readOption(props.modal) ?? true,\n\t\tdisabled: () => readOption(props.disabled) ?? false,\n\t\tloopFocus: () => readOption(props.loopFocus) ?? true,\n\t});\n\n\tconst modal = menubarPrimitive.modal;\n\tconst disabled = menubarPrimitive.disabled;\n\tconst orientation = menubarPrimitive.orientation;\n\tconst loopFocus = menubarPrimitive.loopFocus;\n\tconst hasSubmenuOpen = menubarPrimitive.hasSubmenuOpen;\n\tconst setHasSubmenuOpen = menubarPrimitive.setHasSubmenuOpen;\n\tconst registerOpenMenu = menubarPrimitive.registerOpenMenu;\n\n\tconst fallbackId = useBaseUiId();\n\tconst resolvedId = (): string | undefined =>\n\t\ttypeof props.id === \"string\" ? props.id : fallbackId;\n\n\tconst [contentElement, setContentElement] = createSignal<HTMLElement | null>(\n\t\tnull,\n\t\t{ ownedWrite: true },\n\t);\n\n\tconst allowMouseUpTriggerRef: MutableRef<boolean> = { current: false };\n\n\t// Allocate a floating-tree node id for the menubar itself. Every child\n\t// `<Menu.Root>` inside reads this as its `floatingParentNodeId` — that's\n\t// what distinguishes a top-level menubar child from a submenu when the\n\t// events path filters `menuopenchange`.\n\tconst menubarNodeId = useFloatingNodeId();\n\n\t// Events-path consumption of `menuopenchange`. Child menus\n\t// emit through `floatingTreeRoot.events`; we filter for ones whose\n\t// `parentNodeId === menubarNodeId` and track `hasSubmenuOpen` from that\n\t// stream in parallel with the existing direct-`setHasSubmenuOpen` path.\n\t// The two are idempotent — a child menu both calls `setHasSubmenuOpen`\n\t// directly and emits an event; `hasSubmenuOpen` is the disjunction.\n\tlet openFromEvents = 0;\n\tconst handleMenuOpenChange = (data: {\n\t\topen: boolean;\n\t\tnodeId: string | undefined;\n\t\tparentNodeId: string | null;\n\t}): void => {\n\t\tif (data.parentNodeId !== menubarNodeId) return;\n\t\tif (data.open) {\n\t\t\topenFromEvents += 1;\n\t\t\tsetHasSubmenuOpen(true);\n\t\t} else {\n\t\t\topenFromEvents = Math.max(0, openFromEvents - 1);\n\t\t\tif (openFromEvents === 0) {\n\t\t\t\tsetHasSubmenuOpen(false);\n\t\t\t}\n\t\t}\n\t};\n\ttree.events.on(\"menuopenchange\", handleMenuOpenChange);\n\tonCleanup(() => {\n\t\ttree.events.off(\"menuopenchange\", handleMenuOpenChange);\n\t});\n\n\tconst direction = useDirection();\n\n\t// Keyboard handler — arrow keys traverse top-level triggers. We discover\n\t// them by DOM query at event time (the trigger set is stable per render\n\t// so re-queries are cheap + avoid registration plumbing).\n\tconst handleKeyDown = (event: KeyboardEvent): void => {\n\t\tconst content = contentElement();\n\t\tif (!content) return;\n\n\t\tconst triggers = getTriggers(content);\n\t\tif (triggers.length === 0) return;\n\n\t\tconst target = event.target as Node | null;\n\t\tconst active =\n\t\t\ttarget instanceof HTMLElement\n\t\t\t\t? triggers.find((t) => t === target || t.contains(target))\n\t\t\t\t: undefined;\n\t\tif (!active) return;\n\n\t\tconst isRtl = direction() === \"rtl\";\n\t\tconst forwardKey =\n\t\t\torientation() === \"horizontal\"\n\t\t\t\t? isRtl\n\t\t\t\t\t? \"ArrowLeft\"\n\t\t\t\t\t: \"ArrowRight\"\n\t\t\t\t: \"ArrowDown\";\n\t\tconst backwardKey =\n\t\t\torientation() === \"horizontal\"\n\t\t\t\t? isRtl\n\t\t\t\t\t? \"ArrowRight\"\n\t\t\t\t\t: \"ArrowLeft\"\n\t\t\t\t: \"ArrowUp\";\n\t\tconst firstKey = \"Home\";\n\t\tconst lastKey = \"End\";\n\n\t\tconst currentIndex = triggers.indexOf(active);\n\t\tconst max = triggers.length - 1;\n\n\t\tlet nextIndex: number | null = null;\n\n\t\tif (event.key === forwardKey) {\n\t\t\tif (currentIndex < max) {\n\t\t\t\tnextIndex = currentIndex + 1;\n\t\t\t} else if (loopFocus()) {\n\t\t\t\tnextIndex = 0;\n\t\t\t}\n\t\t} else if (event.key === backwardKey) {\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tnextIndex = currentIndex - 1;\n\t\t\t} else if (loopFocus()) {\n\t\t\t\tnextIndex = max;\n\t\t\t}\n\t\t} else if (event.key === firstKey) {\n\t\t\tnextIndex = 0;\n\t\t} else if (event.key === lastKey) {\n\t\t\tnextIndex = max;\n\t\t}\n\n\t\tif (nextIndex == null || nextIndex === currentIndex) return;\n\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\ttriggers[nextIndex]?.focus();\n\t};\n\n\tconst contextValue: MenubarContextValue = {\n\t\tmodal,\n\t\tdisabled,\n\t\tcontentElement,\n\t\tsetContentElement,\n\t\thasSubmenuOpen,\n\t\tsetHasSubmenuOpen: (open) => {\n\t\t\tsetHasSubmenuOpen(open);\n\t\t},\n\t\torientation,\n\t\tallowMouseUpTriggerRef,\n\t\trootId: resolvedId as Accessor<string | undefined>,\n\t\tregisterOpenMenu,\n\t};\n\n\tconst setRef = (el: HTMLElement | null): void => {\n\t\tsetContentElement(el);\n\t};\n\n\tconst userStyling = resolveClassStyle(props, () => ({\n\t\torientation: orientation(),\n\t\tmodal: modal(),\n\t\thasSubmenuOpen: hasSubmenuOpen(),\n\t}));\n\n\tconst userHtmlProps = omit(\n\t\tprops,\n\t\t\"class\",\n\t\t\"style\",\n\t\t\"attrs\",\n\t\t\"as\",\n\t\t\"children\",\n\t\t\"modal\",\n\t\t\"disabled\",\n\t\t\"orientation\",\n\t\t\"loopFocus\",\n\t\t\"id\",\n\t\t\"tree\",\n\t) as Record<string, unknown>;\n\n\tconst internalProps = {\n\t\tref: setRef,\n\t\trole: \"menubar\" as const,\n\t\tonKeyDown: handleKeyDown,\n\t\tget id() {\n\t\t\treturn resolvedId();\n\t\t},\n\t\tget \"aria-orientation\"() {\n\t\t\treturn orientation();\n\t\t},\n\t\tget [MenubarDataAttributes.orientation]() {\n\t\t\treturn orientation();\n\t\t},\n\t\tget [MenubarDataAttributes.modal]() {\n\t\t\treturn modal() ? \"\" : undefined;\n\t\t},\n\t\tget [MenubarDataAttributes.hasSubmenuOpen]() {\n\t\t\treturn hasSubmenuOpen() ? \"\" : undefined;\n\t\t},\n\t};\n\n\tconst styledUserProps = mergeRootProps(userStyling, userHtmlProps);\n\n\tconst merged = mergeRootProps(internalProps, styledUserProps);\n\n\tconst Tag = dynamic(() => props.as ?? \"div\");\n\treturn (\n\t\t<Tag {...merged}>\n\t\t\t<MenubarContext value={contextValue}>\n\t\t\t\t<FloatingNode id={menubarNodeId}>{props.children}</FloatingNode>\n\t\t\t</MenubarContext>\n\t\t</Tag>\n\t);\n}\n\n/**\n * The container for menus. Renders a `<div role=\"menubar\">` that roving-focuses\n * across contained `<Menu.Trigger>` elements via arrow keys.\n */\nexport function Menubar(props: MenubarProps): JSX.Element {\n\tconst tree = new FloatingTreeStore();\n\t// Render `MenubarInner` as a component (not a plain call) so its body runs\n\t// INSIDE the `<FloatingTree>` provider's owner — otherwise `useFloatingNodeId`\n\t// reads a null tree context and the menubar's own node never registers.\n\treturn (\n\t\t<FloatingTree externalTree={tree}>\n\t\t\t<MenubarInner {...props} tree={tree} />\n\t\t</FloatingTree>\n\t);\n}\n"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,cAAc;AACtC,SAECC,YAAY,EACZC,IAAI,EACJC,SAAS,EACTC,OAAO,QACD,UAAU;AACjB,SAASC,YAAY,QAAQ,qDAAqD;AAClF,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SACCC,YAAY,EACZC,YAAY,EACZC,iBAAiB,QACX,uDAAuD;AAC9D,SAASC,iBAAiB,QAAQ,4DAA4D;AAE9F,SAA6BC,UAAU,QAAQ,6BAA6B;AAC5E,SAASC,cAAc,QAAQ,+BAA+B;AAC9D,SAASC,iBAAiB,QAAQ,kCAAkC;AAGpE,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,cAAc,QAAkC,sBAAsB;AAC/E,S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