tfy-web-components 0.0.45 → 0.0.47
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/{CompositeItem-GNejxLcK.js → CompositeItem-ClTKQQ4f.js} +2 -2
- package/dist/{CompositeItem-GNejxLcK.js.map → CompositeItem-ClTKQQ4f.js.map} +1 -1
- package/dist/{CompositeRoot-7_u1HqDT.js → CompositeRoot-CR4V84Em.js} +6 -6
- package/dist/{CompositeRoot-7_u1HqDT.js.map → CompositeRoot-CR4V84Em.js.map} +1 -1
- package/dist/{DropdownMenu-Crlf-J4E.js → DropdownMenu-B_tIHJUl.js} +14 -14
- package/dist/{DropdownMenu-Crlf-J4E.js.map → DropdownMenu-B_tIHJUl.js.map} +1 -1
- package/dist/{Modal-DaHG8mjy.js → Modal-CJj8wP0E.js} +7 -7
- package/dist/{Modal-DaHG8mjy.js.map → Modal-CJj8wP0E.js.map} +1 -1
- package/dist/{Popover-A8IyEt2w.js → Popover-DOpJ7QW-.js} +5 -5
- package/dist/{Popover-A8IyEt2w.js.map → Popover-DOpJ7QW-.js.map} +1 -1
- package/dist/{PopoverPopup-teGm7D5T.js → PopoverPopup-Dd6Z5rv7.js} +8 -8
- package/dist/{PopoverPopup-teGm7D5T.js.map → PopoverPopup-Dd6Z5rv7.js.map} +1 -1
- package/dist/{PrehydrationScript-B3u_PP2W.js → PrehydrationScript-BfRb7l5u.js} +2 -2
- package/dist/{PrehydrationScript-B3u_PP2W.js.map → PrehydrationScript-BfRb7l5u.js.map} +1 -1
- package/dist/{Select-BtX40h2K.js → Select-OlnvlAXg.js} +14 -14
- package/dist/{Select-BtX40h2K.js.map → Select-OlnvlAXg.js.map} +1 -1
- package/dist/components/atoms/Accordion.d.ts +11 -4
- package/dist/components/atoms/Accordion.es.js +108 -52
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/ButtonGroup.es.js +2 -0
- package/dist/components/atoms/ButtonGroup.es.js.map +1 -1
- package/dist/components/atoms/Combobox.es.js +12 -12
- package/dist/components/atoms/ContextMenu.es.js +6 -6
- package/dist/components/atoms/DropdownMenu.es.js +1 -1
- package/dist/components/atoms/Modal.es.js +1 -1
- package/dist/components/atoms/Popover.es.js +1 -1
- package/dist/components/atoms/Select.es.js +2 -2
- package/dist/components/atoms/Switch.es.js +4 -4
- package/dist/components/atoms/TabButton.d.ts +10 -7
- package/dist/components/atoms/TabButton.es.js +198 -49
- package/dist/components/atoms/TabButton.es.js.map +1 -1
- package/dist/components/atoms/Tooltip.es.js +7 -7
- package/dist/components/molecules/Alert.es.js +1 -1
- package/dist/components/molecules/CustomDrawer.es.js +1 -1
- package/dist/components/molecules/Dialog.es.js +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +1 -1
- package/dist/components/molecules/Pagination.es.js +18 -23
- package/dist/components/molecules/Pagination.es.js.map +1 -1
- package/dist/{composite-IA--dSel.js → composite-CH__oBQH.js} +2 -2
- package/dist/{composite-IA--dSel.js.map → composite-CH__oBQH.js.map} +1 -1
- package/dist/{composite-DnShFmi7.js → composite-Dzn8P1fl.js} +11 -11
- package/dist/{composite-DnShFmi7.js.map → composite-Dzn8P1fl.js.map} +1 -1
- package/dist/{constants-BaUKmVF_.js → constants-BzjgA7aT.js} +2 -2
- package/dist/{constants-BaUKmVF_.js.map → constants-BzjgA7aT.js.map} +1 -1
- package/dist/{element-B1vbc-LG.js → element-BI1c88Lp.js} +3 -3
- package/dist/{element-B1vbc-LG.js.map → element-BI1c88Lp.js.map} +1 -1
- package/dist/index.es.js +3 -3
- package/dist/{isElementDisabled-lq1fKien.js → isElementDisabled-CcmHYLra.js} +2 -2
- package/dist/{isElementDisabled-lq1fKien.js.map → isElementDisabled-CcmHYLra.js.map} +1 -1
- package/dist/new-components/atoms/Checkbox.es.js +4 -4
- package/dist/new-components/atoms/Popover.es.js +2 -2
- package/dist/new-components/atoms/Radio.es.js +8 -8
- package/dist/new-components/atoms/SegmentedControl.es.js +4 -4
- package/dist/new-components/atoms/Slider.es.js +6 -6
- package/dist/new-components/atoms/Toast.d.ts +1 -2
- package/dist/new-components/atoms/Toast.es.js +70 -98
- package/dist/new-components/atoms/Toast.es.js.map +1 -1
- package/dist/new-components/atoms/Toggletip.es.js +2 -2
- package/dist/style.css +1 -1
- package/dist/theme.css +1 -2
- package/dist/tokens.css +5 -5
- package/dist/{useAriaLabelledBy-CP4wKTYs.js → useAriaLabelledBy-C_Zzl94S.js} +2 -2
- package/dist/{useAriaLabelledBy-CP4wKTYs.js.map → useAriaLabelledBy-C_Zzl94S.js.map} +1 -1
- package/dist/{useBaseUiId-CYT1vFMG.js → useBaseUiId-DCE1GVlg.js} +6 -6
- package/dist/{useBaseUiId-CYT1vFMG.js.map → useBaseUiId-DCE1GVlg.js.map} +1 -1
- package/dist/{useButton-BlHadUfM.js → useButton-CtXDdeoI.js} +2 -2
- package/dist/{useButton-BlHadUfM.js.map → useButton-CtXDdeoI.js.map} +1 -1
- package/dist/{useFocus-C__7iwl1.js → useFocus-BGyXJhul.js} +6 -6
- package/dist/{useFocus-C__7iwl1.js.map → useFocus-BGyXJhul.js.map} +1 -1
- package/dist/{usePopupHandleStore-C_Vw7xcw.js → usePopupHandleStore-9hGUXtn5.js} +30 -30
- package/dist/{usePopupHandleStore-C_Vw7xcw.js.map → usePopupHandleStore-9hGUXtn5.js.map} +1 -1
- package/dist/{usePositioner-BmYVsMO_.js → usePositioner-CAWMEP8L.js} +6 -6
- package/dist/{usePositioner-BmYVsMO_.js.map → usePositioner-CAWMEP8L.js.map} +1 -1
- package/dist/{useScrollLock-By-42HSc.js → useScrollLock-QpeWQmdB.js} +6 -6
- package/dist/{useScrollLock-By-42HSc.js.map → useScrollLock-QpeWQmdB.js.map} +1 -1
- package/dist/{useSetFieldFocused-CcdG6FNp.js → useSetFieldFocused-BO2Y66f_.js} +2 -2
- package/dist/{useSetFieldFocused-CcdG6FNp.js.map → useSetFieldFocused-BO2Y66f_.js.map} +1 -1
- package/dist/{useTriggerFocusGuards-CXAhW8P6.js → useTriggerFocusGuards-Ss68N7Fe.js} +5 -5
- package/dist/{useTriggerFocusGuards-CXAhW8P6.js.map → useTriggerFocusGuards-Ss68N7Fe.js.map} +1 -1
- package/dist/utilities.css +38 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu-Crlf-J4E.js","sources":["../node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs","../node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs","../node_modules/@base-ui/react/utils/getHighlightReason.mjs","../node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs","../node_modules/@base-ui/react/menu/positioner/MenuPositionerContext.mjs","../node_modules/@base-ui/react/menu/root/MenuRootContext.mjs","../node_modules/@base-ui/react/context-menu/root/ContextMenuRootContext.mjs","../node_modules/@base-ui/react/menu/filter-root/MenuFilterContext.mjs","../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemContext.mjs","../node_modules/@base-ui/react/menu/item/useMenuItemCommonProps.mjs","../node_modules/@base-ui/react/menu/item/useMenuItem.mjs","../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemDataAttributes.mjs","../node_modules/@base-ui/react/menu/utils/stateAttributesMapping.mjs","../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItem.mjs","../node_modules/@base-ui/react/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs","../node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs","../node_modules/@base-ui/react/menu/group/MenuGroup.mjs","../node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs","../node_modules/@base-ui/react/menu/item/MenuItem.mjs","../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRootContext.mjs","../node_modules/@base-ui/react/internals/resolveRenderedId.mjs","../node_modules/@base-ui/react/internals/resolvePopupLabel.mjs","../node_modules/@base-ui/react/menu/popup/MenuPopup.mjs","../node_modules/@base-ui/react/menu/portal/MenuPortalContext.mjs","../node_modules/@base-ui/react/menu/portal/MenuPortal.mjs","../node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs","../node_modules/@base-ui/react/menu/radio-group/MenuRadioGroupContext.mjs","../node_modules/@base-ui/react/menu/radio-group/MenuRadioGroup.mjs","../node_modules/@base-ui/react/menu/radio-item/MenuRadioItemContext.mjs","../node_modules/@base-ui/react/menu/radio-item/MenuRadioItem.mjs","../node_modules/@base-ui/react/menu/radio-item-indicator/MenuRadioItemIndicator.mjs","../node_modules/@base-ui/react/menubar/MenubarContext.mjs","../node_modules/@base-ui/react/menu/store/MenuStore.mjs","../node_modules/@base-ui/react/menu/filter-provider/MenuFilterProviderContext.mjs","../node_modules/@base-ui/react/menu/utils/isKeyboardOpen.mjs","../node_modules/@base-ui/react/menu/root/MenuRoot.mjs","../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRoot.mjs","../node_modules/@base-ui/react/menu/utils/findRootOwnerId.mjs","../node_modules/@base-ui/react/utils/useMixedToggleClickHandler.mjs","../node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs","../node_modules/@base-ui/react/separator/Separator.mjs","../node_modules/@base-ui/react/menu/submenu-trigger/MenuSubmenuTrigger.mjs","../src/components/atoms/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { platform } from '@base-ui/utils/platform';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { getMaxListIndex, getMinListIndex, getNextListIndex, isIndexOutOfListBounds } from \"../utils/composite.mjs\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"../utils/constants.mjs\";\nimport { activeElement, contains, getFloatingFocusElement, getTarget, isTypeableCombobox, isTypeableElement } from \"../utils/element.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\n\n// WebKit fires zero-delta `mousemove`/`pointermove` events when the list scrolls\n// beneath a stationary pointer, moving the highlight during keyboard navigation.\n// https://github.com/mui/base-ui/issues/4002\nfunction isStationaryWebKitPointer(event) {\n return platform.engine.webkit && event.movementX === 0 && event.movementY === 0;\n}\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nexport function isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nexport function isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nexport function isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nexport function isCrossOrientationCloseKey(key, orientation, rtl, grid) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && grid) {\n return key === 'Escape';\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nexport function useListNavigation(store, props) {\n const {\n listRef,\n activeIndex,\n onNavigate: onNavigateProp = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loopFocus = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n triggerOrientation = orientation,\n parentOrientation,\n id,\n resetOnPointerLeave = true,\n externalTree,\n nestedReturnFocusRef,\n grid: navigateGrid\n } = props;\n const isGrid = navigateGrid != null;\n if (process.env.NODE_ENV !== 'production') {\n if (allowEscape) {\n if (!loopFocus) {\n console.warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n console.warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && isGrid) {\n console.warn('In grid list navigation mode, the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const dataRef = store.context.dataRef;\n const floatingFocusElement = getFloatingFocusElement(floatingElement);\n const typeableComboboxReference = isTypeableCombobox(domReferenceElement);\n const floatingFocusElementRef = useValueAsRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree(externalTree);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex ?? -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const onNavigate = useStableCallback(event => {\n onNavigateProp(indexRef.current === -1 ? null : indexRef.current, event);\n });\n const previousMountedRef = React.useRef(!!floatingElement);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const cancelQueuedFocusRef = React.useRef(null);\n const disabledIndicesRef = useValueAsRef(disabledIndices);\n const latestOpenRef = useValueAsRef(open);\n const selectedIndexRef = useValueAsRef(selectedIndex);\n const resetOnPointerLeaveRef = useValueAsRef(resetOnPointerLeave);\n const focusFrame = useAnimationFrame();\n const waitForListPopulatedFrame = useAnimationFrame();\n const focusItem = useStableCallback(() => {\n // Synchronous navigation must also supersede any deferred focus from an earlier update.\n focusFrame.cancel();\n function runFocus(item) {\n if (!virtual) {\n cancelQueuedFocusRef.current = enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? callback => callback() : callback => focusFrame.request(callback);\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) {\n return;\n }\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const shouldScrollIntoView =\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView?.({\n block: 'nearest',\n inline: 'nearest'\n });\n }\n });\n });\n useIsoLayoutEffect(() => {\n dataRef.current.orientation = orientation;\n }, [dataRef, orientation]);\n useIsoLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n }\n // Explicit values can change with the opening interaction. Keep an inferred 'auto' value\n // from the trigger event, but apply a boolean before the initial highlight is synchronized.\n if (!open || focusItemOnOpen !== 'auto') {\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (open && floatingElement) {\n indexRef.current = selectedIndex ?? -1;\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Reset the active index when the list is no longer open and mounted (closing or\n // unmounting). `onNavigate` is a stable callback that always forwards to the latest\n // `onNavigate` prop.\n indexRef.current = -1;\n onNavigate();\n }\n }, [enabled, open, floatingElement, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (!open) {\n forceSyncFocusRef.current = false;\n return;\n }\n if (!floatingElement) {\n return;\n }\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? callback => waitForListPopulatedFrame.request(callback) : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs += 1;\n } else {\n // Initially focus the first non-disabled item. `disabledIndices` is deliberately\n // omitted here so attribute-disabled items (`disabled`/`aria-disabled`) are skipped\n // on open even when the consumer passes an empty `disabledIndices` array. Passing it\n // would regress that behavior (see mui/base-ui#2604).\n // The key came from the trigger, so it is read on the trigger's orientation.\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, triggerOrientation, rtl) || nested ? getMinListIndex(listRef) : getMaxListIndex(listRef);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, floatingElement, activeIndex, selectedIndexRef, nested, listRef, triggerOrientation, rtl, onNavigate, focusItem, waitForListPopulatedFrame]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useIsoLayoutEffect(() => {\n if (!enabled || floatingElement || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = nodes.find(node => node.id === parentId)?.context?.elements.floating;\n // `floatingElement` is null here (see the guard above), so resolve the owner document from an\n // in-DOM element for realm-safety (shadow DOM/iframes): the reference element, falling back to\n // the parent floating element when the reference is virtual (`domReferenceElement` is null).\n const activeEl = activeElement(ownerDocument(domReferenceElement ?? parent ?? null));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, floatingElement, domReferenceElement, tree, parentId, virtual]);\n useIsoLayoutEffect(() => {\n previousOpenRef.current = open;\n previousMountedRef.current = !!floatingElement;\n });\n const hasActiveIndex = activeIndex != null;\n const syncCurrentTarget = useStableCallback(event => {\n if (!latestOpenRef.current) {\n return;\n }\n const index = listRef.current.indexOf(event.currentTarget);\n if (index !== -1 && (indexRef.current !== index || activeIndex !== index)) {\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const getParentOrientation = useStableCallback(() => {\n return parentOrientation ?? tree?.nodesRef.current.find(node => node.id === parentId)?.context?.dataRef?.current.orientation;\n });\n const getMinEnabledIndex = useStableCallback(() => {\n return getMinListIndex(listRef, disabledIndicesRef.current);\n });\n const commonOnKeyDown = useStableCallback(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, isGrid)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n store.setOpen(false, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement;\n if (isHTMLElement(returnElement)) {\n returnElement.focus();\n }\n return;\n }\n\n // The consumer owns `activeIndex` and may decline a navigation this hook proposed, such as a\n // virtual list keeping its highlight when the reference is refocused. Declining produces no\n // re-render, so reconcile here: otherwise the cursor drifts from the rendered highlight and\n // this key moves from the wrong position.\n if (activeIndex != null && activeIndex !== indexRef.current && !isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate(event);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(event);\n }\n }\n\n // Grid navigation is injected by grid-capable consumers so non-grid\n // consumers (menu, select) tree-shake the grid helpers out.\n if (navigateGrid != null) {\n const index = navigateGrid(event, indexRef.current, listRef, orientation, loopFocus, rtl, disabledIndices, minIndex, maxIndex);\n\n // The grid navigator returns the unchanged index for keys it does not handle, and\n // reporting that as a navigation would re-emit the current highlight on every keydown.\n if (index != null && index !== indexRef.current) {\n indexRef.current = index;\n onNavigate(event);\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused. Focus can also rest on a container inside the\n // popup, such as a list that holds the `menu` role. Keys bubbling from a portaled nested\n // popup are not in this popup's DOM, so they navigate from the current index.\n const focusedElement = activeElement(event.currentTarget.ownerDocument);\n if (open && !virtual && contains(event.currentTarget, focusedElement) && !listRef.current.some(item => item != null && contains(item, focusedElement))) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate(event);\n // The boundary item may already be highlighted, so `activeIndex` won't change and the\n // effect that moves focus to the highlighted item won't run.\n if (activeIndex === indexRef.current) {\n focusItem();\n }\n return;\n }\n const {\n index,\n wrapped\n } = getNextListIndex(listRef.current, currentIndex, {\n decrement: !isMainOrientationToEndKey(event.key, orientation, rtl),\n loopFocus,\n allowEscape,\n disabledIndices,\n minIndex,\n maxIndex\n });\n if (wrapped) {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n }\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const item = React.useMemo(() => {\n const itemProps = {\n onFocus(event) {\n forceSyncFocusRef.current = true;\n syncCurrentTarget(event);\n },\n onClick({\n currentTarget\n }) {\n // Safari. Skipped under virtual focus, which must keep real focus on the reference.\n if (!virtual) {\n currentTarget.focus({\n preventScroll: true\n });\n }\n },\n onMouseMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(event);\n }\n },\n onPointerLeave(event) {\n if (!latestOpenRef.current || !isPointerModalityRef.current || event.pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n const relatedTarget = event.relatedTarget;\n if (!focusItemOnHover || listRef.current.includes(relatedTarget)) {\n return;\n }\n if (!resetOnPointerLeaveRef.current) {\n return;\n }\n cancelQueuedFocusRef.current?.();\n cancelQueuedFocusRef.current = null;\n indexRef.current = -1;\n onNavigate(event);\n if (!virtual) {\n const floatingFocusEl = floatingFocusElementRef.current;\n const activeEl = activeElement(ownerDocument(floatingFocusEl));\n if (floatingFocusEl && contains(floatingFocusEl, activeEl)) {\n floatingFocusEl.focus({\n preventScroll: true\n });\n }\n }\n }\n };\n return itemProps;\n }, [syncCurrentTarget, latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, resetOnPointerLeaveRef, virtual]);\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': `${id}-${activeIndex}`\n };\n }, [virtual, open, hasActiveIndex, id, activeIndex]);\n const floating = React.useMemo(() => {\n return {\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown(event) {\n // Close submenu on Shift+Tab\n if (event.key === 'Tab' && event.shiftKey && open && !virtual) {\n // If the event originated from within a nested element (e.g., a Dialog opened from\n // within the menu), don't close the menu. The nested element has its own focus\n // management and should handle the Tab key.\n const target = getTarget(event.nativeEvent);\n if (target && !contains(floatingFocusElementRef.current, target)) {\n return;\n }\n stopEvent(event);\n const details = createChangeEventDetails(REASONS.focusOut, event.nativeEvent);\n store.setOpen(false, details);\n const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement;\n if (!details.isCanceled && isHTMLElement(returnElement)) {\n returnElement.focus();\n }\n return;\n }\n commonOnKeyDown(event);\n },\n onPointerMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, floatingFocusElementRef, typeableComboboxReference, store, open, virtual, domReferenceElement, nestedReturnFocusRef]);\n const trigger = React.useMemo(() => {\n function openOnNavigationKeyDown(event) {\n store.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent, event.currentTarget));\n }\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = !virtual;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n onKeyDown(event) {\n // non-reactive open state (to prevent re-creation of the handler)\n const currentOpen = store.select('open');\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, currentOpen ? orientation : triggerOrientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && currentOpen && (!nested || isTypeableElement(event.currentTarget))) {\n return commonOnKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!currentOpen && !openOnArrowKeyDown && isArrowKey) {\n return undefined;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (currentOpen) {\n indexRef.current = getMinEnabledIndex();\n onNavigate(event);\n if (virtual) {\n floatingFocusElementRef.current?.focus();\n }\n } else {\n openOnNavigationKeyDown(event);\n }\n }\n return undefined;\n }\n if (isMainKey) {\n if (selectedIndexRef.current != null) {\n indexRef.current = selectedIndexRef.current;\n }\n stopEvent(event);\n if (!currentOpen && openOnArrowKeyDown) {\n openOnNavigationKeyDown(event);\n } else {\n commonOnKeyDown(event);\n }\n if (currentOpen) {\n onNavigate(event);\n }\n }\n return undefined;\n },\n onFocus(event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n if (store.select('open') && !virtual) {\n indexRef.current = -1;\n onNavigate(event);\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [commonOnKeyDown, focusItemOnOpen, getMinEnabledIndex, nested, onNavigate, store, openOnArrowKeyDown, orientation, triggerOrientation, getParentOrientation, rtl, selectedIndexRef, virtual, floatingFocusElementRef]);\n const reference = React.useMemo(() => {\n return {\n ...ariaActiveDescendantProp,\n ...trigger\n };\n }, [ariaActiveDescendantProp, trigger]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { isElementVisible, isListIndexDisabled } from \"../utils/composite.mjs\";\nimport { contains } from \"../utils/element.mjs\";\nimport { stopEvent } from \"../utils/event.mjs\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(store, props) {\n const {\n listRef,\n elementsRef,\n activeIndex,\n onMatch: onMatchProp,\n disabledIndices,\n onTyping: onTypingProp,\n enabled = true,\n resetMs = 750,\n selectedIndex = null\n } = props;\n const onTyping = useStableCallback(onTypingProp);\n const open = store.useState('open');\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n const onKeyDown = useStableCallback(event => {\n function getElement(index) {\n return elementsRef?.current[index];\n }\n function isItemAvailable(index) {\n const element = getElement(index);\n if (element && !isElementVisible(element) || element?.matches(':disabled')) {\n return false;\n }\n // Visibility and native disabled state are handled above; pass an empty\n // element list so `isListIndexDisabled` resolves only the explicit\n // `disabledIndices` (array/predicate) and skips its own fallbacks.\n // Consumers that don't pass `disabledIndices` keep matching every visible\n // item except native disabled elements provided through `elementsRef`.\n return disabledIndices == null || !isListIndexDisabled(EMPTY_ARRAY, index, disabledIndices);\n }\n function getMatchingIndex(list, string, startIndex = 0) {\n if (list.length === 0) {\n return -1;\n }\n const normalizedStartIndex = (startIndex % list.length + list.length) % list.length;\n const lowerString = string.toLowerCase();\n for (let offset = 0; offset < list.length; offset += 1) {\n const index = (normalizedStartIndex + offset) % list.length;\n const text = list[index];\n if (!text?.toLowerCase().startsWith(lowerString) || !isItemAvailable(index)) {\n continue;\n }\n return index;\n }\n return -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && event.key === ' ') {\n // Space should continue the in-progress typeahead session.\n stopEvent(event);\n onTyping?.(true);\n }\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, stringRef.current) === -1 && event.key !== ' ') {\n onTyping?.(false);\n }\n }\n if (listContent == null ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n onTyping?.(true);\n }\n\n // Capture whether this is a new typing session before mutating the string.\n const isNewSession = stringRef.current === '';\n if (isNewSession) {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too. Unavailable items are skipped while matching, so\n // they must be ignored here as well — otherwise a hidden or disabled double-letter\n // label would block rapid cycling through the available items.\n const allowRapidSuccessionOfFirstLetter = listContent.every((text, index) => text && isItemAvailable(index) ? text[0]?.toLowerCase() !== text[1]?.toLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n\n // Compute the starting index for this search.\n // If this is a new typing session (string is empty), base it on the current\n // selection/active item; otherwise continue from the last matched index.\n const prevIndex = isNewSession ? selectedIndex ?? activeIndex ?? -1 : prevIndexRef.current;\n const startIndex = (prevIndex ?? 0) + 1;\n const index = getMatchingIndex(listContent, stringRef.current, startIndex);\n if (index !== -1) {\n onMatchProp?.(index, event);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n onTyping?.(false);\n }\n });\n const onBlur = useStableCallback(event => {\n const next = event.relatedTarget;\n const currentDomReferenceElement = store.select('domReferenceElement');\n const currentFloatingElement = store.select('floatingElement');\n const withinComposite = contains(currentDomReferenceElement, next) || contains(currentFloatingElement, next);\n\n // Keep the session if focus moves within the composite (reference <-> floating).\n if (withinComposite) {\n return;\n }\n\n // End the current typing session when focus leaves the composite entirely.\n timeout.clear();\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n useIsoLayoutEffect(() => {\n if (!open && selectedIndex !== null) {\n return;\n }\n timeout.clear();\n matchIndexRef.current = null;\n if (stringRef.current !== '') {\n stringRef.current = '';\n onTyping?.(false);\n }\n }, [open, selectedIndex, timeout, onTyping]);\n const sharedProps = React.useMemo(() => ({\n onKeyDown,\n onBlur\n }), [onKeyDown, onBlur]);\n return React.useMemo(() => enabled ? {\n reference: sharedProps,\n floating: sharedProps\n } : {}, [enabled, sharedProps]);\n}","import { REASONS } from \"../internals/reasons.mjs\";\n\n/**\n * The `onItemHighlighted` reason for a list navigation event, matching the event type that the\n * reason promises in its details.\n */\nexport function getHighlightReason(event) {\n if (event == null) {\n return REASONS.none;\n }\n if (event.type.startsWith('key')) {\n return REASONS.keyboard;\n }\n if (event.type.startsWith('mouse') || event.type.startsWith('pointer')) {\n return REASONS.pointer;\n }\n return REASONS.none;\n}","import { ownerWindow } from '@base-ui/utils/owner';\nimport { platform } from '@base-ui/utils/platform';\n// Tolerance around the element bounds so a fast click whose pointer drifts slightly\n// during press-release isn't mistaken for a drag-off-and-release cancellation.\n// Matches typical OS/browser drag-initiation thresholds.\nconst BOUNDARY_OFFSET = 5;\n\n/**\n * Determines if a mouse event occurred within the bounds of an element\n * (including its pseudo-elements), with a small tolerance for pointer drift.\n */\nexport function isMouseWithinBounds(event, element) {\n const bounds = getPseudoElementBounds(element);\n return event.clientX >= bounds.left - BOUNDARY_OFFSET && event.clientX <= bounds.right + BOUNDARY_OFFSET && event.clientY >= bounds.top - BOUNDARY_OFFSET && event.clientY <= bounds.bottom + BOUNDARY_OFFSET;\n}\nexport function getPseudoElementBounds(element) {\n const elementRect = element.getBoundingClientRect();\n const win = ownerWindow(element);\n\n // Avoid \"Not implemented: window.getComputedStyle(elt, pseudoElt)\" in jsdom.\n if (platform.env.jsdom) {\n return elementRect;\n }\n const beforeStyles = win.getComputedStyle(element, '::before');\n const afterStyles = win.getComputedStyle(element, '::after');\n const hasPseudoElements = beforeStyles.content !== 'none' || afterStyles.content !== 'none';\n if (!hasPseudoElements) {\n return elementRect;\n }\n\n // Get dimensions of pseudo-elements\n const beforeWidth = parseFloat(beforeStyles.width) || 0;\n const beforeHeight = parseFloat(beforeStyles.height) || 0;\n const afterWidth = parseFloat(afterStyles.width) || 0;\n const afterHeight = parseFloat(afterStyles.height) || 0;\n\n // Calculate max dimensions including pseudo-elements\n const totalWidth = Math.max(elementRect.width, beforeWidth, afterWidth);\n const totalHeight = Math.max(elementRect.height, beforeHeight, afterHeight);\n\n // Calculate the differences to extend the bounds\n const widthDiff = totalWidth - elementRect.width;\n const heightDiff = totalHeight - elementRect.height;\n return {\n left: elementRect.left - widthDiff / 2,\n right: elementRect.right + widthDiff / 2,\n top: elementRect.top - heightDiff / 2,\n bottom: elementRect.bottom + heightDiff / 2\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuPositionerContext.displayName = \"MenuPositionerContext\";\nexport function useMenuPositionerContext(optional) {\n const context = React.useContext(MenuPositionerContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.' : _formatErrorMessage(33));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRootContext.displayName = \"MenuRootContext\";\nexport function useMenuRootContext(optional) {\n const context = React.useContext(MenuRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.' : _formatErrorMessage(36));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ContextMenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ContextMenuRootContext.displayName = \"ContextMenuRootContext\";\nexport function useContextMenuRootContext(optional = true) {\n const context = React.useContext(ContextMenuRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.' : _formatErrorMessage(25));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { MenuRootContext } from \"../root/MenuRootContext.mjs\";\n\n/**\n * The filter implementation that a filterable root hands to the parts below it. Only the roots\n * `Menu.FilterProvider` renders import it, so a plain menu never bundles it. Parts whose whole\n * structure differs are swapped as components; parts that only register with the filter call an\n * injected hook, so a menu that never renders them doesn't bundle a second implementation.\n */\n\n/** Static below a filter root: the implementation never changes, so subscribers never re-render. */\nexport const MenuFilterImplContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenuFilterImplContext.displayName = \"MenuFilterImplContext\";\n/**\n * The filter implementation when the menu this part belongs to is filterable, otherwise `null`.\n * `virtualFocus` marks a filter root; a plain `Menu.Root` never sets it. The result is fixed for\n * a mounted part: a filter root can't appear above it without remounting it.\n */\nexport function useMenuFilterImpl(scope = 'root') {\n const impl = React.useContext(MenuFilterImplContext);\n const root = React.useContext(MenuRootContext);\n if (impl === null || root === undefined) {\n return null;\n }\n const filterable = scope === 'submenu-trigger' ? root.virtualFocus || root.parentVirtualFocus : root.virtualFocus;\n return filterable ? impl : null;\n}\n\n/**\n * Throws unless the menu this part renders in is filterable, naming the part and the provider.\n */\nexport function useMenuFilterPart(part) {\n if (useMenuFilterImpl() === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Base UI: <Menu.${part}> must be placed in a menu wrapped in <Menu.FilterProvider>. ` + 'It reads the filter query and the matching items from the provider, which a plain menu ' + 'does not have. Wrap the <Menu.Root> or <Menu.SubmenuRoot> it belongs to in ' + '<Menu.FilterProvider>. See https://base-ui.com/react/components/menu#filtering' : _formatErrorMessage(104, part));\n }\n}\nconst UNFILTERED = {\n visible: true,\n ref: null\n};\nfunction useUnfilteredItem() {\n return UNFILTERED;\n}\n\n/**\n * Registers an item part with the filter of the menu it belongs to. A plain menu's items are\n * always visible.\n */\nexport function useMenuFilterItem(props, forwardedRef, scope = 'root') {\n const impl = useMenuFilterImpl(scope);\n const useItem = (scope === 'submenu-trigger' ? impl?.useSubmenuTrigger : impl?.useItem) ?? useUnfilteredItem;\n const item = useItem({\n label: props.label,\n children: props.children,\n render: props.render\n });\n const ref = useMergedRefs(forwardedRef, item.ref);\n return {\n visible: item.visible,\n ref,\n props: item.props\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuCheckboxItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItemContext.displayName = \"MenuCheckboxItemContext\";\nexport function useMenuCheckboxItemContext() {\n const context = React.useContext(MenuCheckboxItemContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.' : _formatErrorMessage(30));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { platform } from '@base-ui/utils/platform';\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nfunction preventMouseDownDefault(event) {\n event.preventDefault();\n}\n/**\n * Returns common props shared by all menu item types.\n * This hook extracts the shared logic for id, role, tabIndex, and interaction handlers.\n */\nexport function useMenuItemCommonProps(params) {\n const {\n closeOnClick,\n highlighted,\n id,\n nodeId,\n store,\n typingRef,\n itemRef,\n itemMetadata\n } = params;\n const rootContext = useMenuRootContext();\n const contextMenuContext = useContextMenuRootContext(true);\n\n // A submenu trigger is an item of the parent menu's list, so it follows that list's focus model.\n const isSubmenuTrigger = itemMetadata.type === 'submenu-trigger';\n const virtualFocus = isSubmenuTrigger ? rootContext.parentVirtualFocus : rootContext.virtualFocus;\n const selectionStore = isSubmenuTrigger && rootContext.parent.type === 'menu' ? rootContext.parent.store : rootContext.store;\n const ariaSelected = selectionStore.useState('webkitAriaSelected', highlighted);\n const {\n events: menuEvents\n } = store.useState('floatingTreeRoot');\n const open = store.useState('open');\n const isContextMenu = contextMenuContext !== undefined;\n // `-1` rather than omitting it, which leaves links and buttons in the tab order.\n const tabIndex = !virtualFocus && open && highlighted ? 0 : -1;\n return React.useMemo(() => ({\n id,\n role: 'menuitem',\n tabIndex,\n 'aria-selected': ariaSelected,\n // Real focus stays on the input or list that owns virtual navigation.\n onMouseDown: virtualFocus ? preventMouseDownDefault : undefined,\n onKeyDown(event) {\n if (event.key === ' ' && typingRef?.current) {\n event.preventDefault();\n }\n },\n onMouseMove(event) {\n if (!nodeId) {\n return;\n }\n\n // Inform the floating tree that a menu item within this menu was hovered/moved over\n // so unrelated descendant submenus can be closed.\n menuEvents.emit('itemhover', {\n nodeId,\n target: event.currentTarget\n });\n },\n onClick(event) {\n if (closeOnClick) {\n menuEvents.emit('close', {\n domEvent: event.nativeEvent,\n reason: REASONS.itemPress\n });\n }\n },\n onMouseUp(event) {\n if (contextMenuContext) {\n const initialCursorPoint = contextMenuContext.initialCursorPointRef.current;\n contextMenuContext.initialCursorPointRef.current = null;\n if (isContextMenu && initialCursorPoint && Math.abs(event.clientX - initialCursorPoint.x) <= 1 && Math.abs(event.clientY - initialCursorPoint.y) <= 1) {\n return;\n }\n\n // On non-macOS platforms, this mouseup belongs to the right-click gesture\n // that opened the context menu, so it must not activate an item.\n if (isContextMenu && !platform.os.mac && event.button === 2) {\n return;\n }\n }\n if (itemRef.current && store.context.allowMouseUpTriggerRef.current && (!isContextMenu || event.button === 2)) {\n // This fires whenever the user clicks on the trigger, moves the cursor, and releases it over the item.\n // We trigger the click and override the `closeOnClick` preference to always close the menu.\n if (itemMetadata.type === 'regular-item') {\n // `detail: 1` and `pointerType: 'mouse'` mark this as a mouse-gesture click so\n // MenuRoot and FloatingFocusManager don't treat it as a keyboard activation.\n dispatchClickWithModifiers(itemRef.current, event, {\n detail: 1,\n pointerType: 'mouse'\n });\n }\n }\n }\n }), [closeOnClick, tabIndex, id, menuEvents, nodeId, store.context.allowMouseUpTriggerRef, typingRef, itemRef, contextMenuContext, isContextMenu, itemMetadata.type, ariaSelected, virtualFocus]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useMenuItemCommonProps } from \"./useMenuItemCommonProps.mjs\";\nexport const REGULAR_ITEM = {\n type: 'regular-item'\n};\nexport function useMenuItem(params) {\n const {\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n typingRef = store.context.typingRef,\n nativeButton,\n itemMetadata,\n nodeId\n } = params;\n const itemRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const commonProps = useMenuItemCommonProps({\n closeOnClick,\n highlighted,\n id,\n nodeId,\n store,\n typingRef,\n itemRef,\n itemMetadata\n });\n const getItemProps = React.useCallback(externalProps => {\n return mergeProps(commonProps, {\n onMouseEnter(event) {\n if (itemMetadata.type !== 'submenu-trigger') {\n return;\n }\n itemMetadata.setActive(event.nativeEvent);\n }\n }, externalProps, getButtonProps);\n }, [commonProps, getButtonProps, itemMetadata]);\n const mergedRef = useMergedRefs(itemRef, buttonRef);\n return React.useMemo(() => ({\n getItemProps,\n itemRef: mergedRef\n }), [getItemProps, mergedRef]);\n}","/**\n * Present when the menu checkbox item is checked.\n */\nexport const checked = 'data-checked';\n/**\n * Present when the menu checkbox item is not checked.\n */\nexport const unchecked = 'data-unchecked';\n/**\n * Present when the menu checkbox item is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the menu checkbox item is highlighted.\n */\nexport const highlighted = 'data-highlighted';","import { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport * as MenuCheckboxItemDataAttributes from \"../checkbox-item/MenuCheckboxItemDataAttributes.mjs\";\nexport const itemMapping = {\n checked(value) {\n if (value) {\n return {\n [MenuCheckboxItemDataAttributes.checked]: ''\n };\n }\n return {\n [MenuCheckboxItemDataAttributes.unchecked]: ''\n };\n },\n ...transitionStatusMapping\n};","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { MenuCheckboxItemContext } from \"./MenuCheckboxItemContext.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuCheckboxItemPlain = /*#__PURE__*/React.forwardRef(function MenuCheckboxItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = false,\n checked = false,\n onCheckedChange,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const rootDisabled = store.useState('disabled');\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const disabled = disabledProp || rootDisabled;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = React.useMemo(() => ({\n disabled,\n highlighted,\n checked\n }), [disabled, highlighted, checked]);\n function handleClick(event) {\n const details = createChangeEventDetails(REASONS.itemPress, event.nativeEvent, undefined, {\n preventUnmountOnClose: NOOP\n });\n onCheckedChange?.(!checked, details);\n }\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n props: [itemProps, {\n role: 'menuitemcheckbox',\n 'aria-checked': checked,\n onClick: handleClick\n }, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n return /*#__PURE__*/_jsx(MenuCheckboxItemContext.Provider, {\n value: state,\n children: element\n });\n});\n\n/**\n * A menu item that toggles a setting on or off.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItemPlain.displayName = \"MenuCheckboxItemPlain\";\nexport const MenuCheckboxItem = /*#__PURE__*/React.forwardRef(function MenuCheckboxItem(props, forwardedRef) {\n const {\n checked: checkedProp,\n defaultChecked,\n onCheckedChange,\n ...plainProps\n } = props;\n\n // Owned above the element so an uncontrolled item keeps its state while a filter hides it.\n const [checked, setChecked] = useControlled({\n controlled: checkedProp,\n default: defaultChecked ?? false,\n name: 'MenuCheckboxItem',\n state: 'checked'\n });\n const filterItem = useMenuFilterItem(props, forwardedRef);\n function handleCheckedChange(nextChecked, eventDetails) {\n onCheckedChange?.(nextChecked, eventDetails);\n if (!eventDetails.isCanceled) {\n setChecked(nextChecked);\n }\n }\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuCheckboxItemPlain, {\n ...plainProps,\n checked: checked,\n onCheckedChange: handleCheckedChange,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItem.displayName = \"MenuCheckboxItem\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuCheckboxItemContext } from \"../checkbox-item/MenuCheckboxItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\n\n/**\n * Indicates whether the checkbox item is ticked.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuCheckboxItemIndicator = /*#__PURE__*/React.forwardRef(function MenuCheckboxItemIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const item = useMenuCheckboxItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n mounted,\n setMounted\n } = useTransitionStatus(item.checked);\n useOpenChangeComplete({\n batch: true,\n enabled: !item.checked,\n open: item.checked,\n ref: indicatorRef,\n onComplete() {\n if (!item.checked) {\n setMounted(false);\n }\n }\n });\n const state = {\n checked: item.checked,\n disabled: item.disabled,\n highlighted: item.highlighted,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, indicatorRef],\n stateAttributesMapping: itemMapping,\n props: {\n 'aria-hidden': true,\n ...elementProps\n },\n enabled: keepMounted || mounted\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItemIndicator.displayName = \"MenuCheckboxItemIndicator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuGroupContext.displayName = \"MenuGroupContext\";\nexport function useMenuGroupRootContext() {\n const context = React.useContext(MenuGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>.' : _formatErrorMessage(31));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { MenuGroupContext } from \"./MenuGroupContext.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MenuGroupPlain = /*#__PURE__*/React.forwardRef(function MenuGroupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState(undefined);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: {\n role: 'group',\n 'aria-labelledby': labelId,\n ...elementProps\n }\n });\n return /*#__PURE__*/_jsx(MenuGroupContext.Provider, {\n value: setLabelId,\n children: element\n });\n});\n\n/**\n * Groups related menu items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuGroupPlain.displayName = \"MenuGroupPlain\";\nexport const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(props, forwardedRef) {\n const Group = useMenuFilterImpl()?.Group ?? MenuGroupPlain;\n return /*#__PURE__*/_jsx(Group, {\n ...props,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuGroup.displayName = \"MenuGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useMenuGroupRootContext } from \"../group/MenuGroupContext.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuGroupLabel = /*#__PURE__*/React.forwardRef(function MenuGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const id = useBaseUiId(idProp);\n const setLabelId = useMenuGroupRootContext();\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [setLabelId, id]);\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: {\n id,\n 'aria-hidden': true,\n ...elementProps\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuGroupLabel.displayName = \"MenuGroupLabel\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"./useMenuItem.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuItemPlain = /*#__PURE__*/React.forwardRef(function MenuItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const rootDisabled = store.useState('disabled');\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const disabled = disabledProp || rootDisabled;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = {\n disabled,\n highlighted\n };\n return useRenderElement('div', componentProps, {\n state,\n props: [itemProps, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n});\n\n/**\n * An individual interactive item in the menu.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuItemPlain.displayName = \"MenuItemPlain\";\nexport const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef);\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuItemPlain, {\n ...props,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuItem.displayName = \"MenuItem\";","'use client';\n\nimport * as React from 'react';\nexport const MenuSubmenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuRootContext.displayName = \"MenuSubmenuRootContext\";\nexport function useMenuSubmenuRootContext() {\n return React.useContext(MenuSubmenuRootContext);\n}","import * as React from 'react';\nimport { unwrapLazyRenderProp } from \"./useRenderElement.mjs\";\n/**\n * Resolves an element's id using the same precedence as `useRenderElement`.\n * Returns `''` when the element renders with an explicitly empty id, which consumers must treat\n * as \"no id\" rather than falling back to the generated one, so ARIA relationships never reference\n * an id no element carries. Render callbacks are opaque and are expected to use the id passed to\n * them.\n *\n * @internal\n */\nexport function resolveRenderedId(props, fallbackId) {\n const render = unwrapLazyRenderProp(props.render);\n if (/*#__PURE__*/React.isValidElement(render)) {\n const renderProps = render.props;\n if (Object.hasOwn(renderProps, 'id')) {\n return renderProps.id ?? '';\n }\n }\n return props.id ?? fallbackId;\n}\n\n/**\n * Resolves the element's id and returns a ref that publishes it to the owner while mounted.\n * A generated fallback is never published as an override, so removing an explicit id lets the\n * element return to the generated one.\n *\n * @internal\n */\nexport function useRenderedId(props, defaultId, setId) {\n const id = resolveRenderedId(props, defaultId);\n const registeredId = id === defaultId ? undefined : id;\n const ref = React.useCallback(element => setId?.(element ? registeredId : undefined), [registeredId, setId]);\n return [id, ref];\n}","import * as React from 'react';\nimport { unwrapLazyRenderProp } from \"./useRenderElement.mjs\";\nexport function resolvePopupLabel(props, activeTriggerElement, activeTriggerId) {\n const render = unwrapLazyRenderProp(props.render);\n const renderedElementProps = /*#__PURE__*/React.isValidElement(render) ? render.props : undefined;\n const ariaLabel = props['aria-label'] ?? renderedElementProps?.['aria-label'];\n let ariaLabelledBy = props['aria-labelledby'] ?? renderedElementProps?.['aria-labelledby'];\n if (ariaLabelledBy == null && !ariaLabel) {\n // Prefer the element's live id: a `render` element's own id wins over the registered one.\n ariaLabelledBy = activeTriggerElement ? activeTriggerElement.id || undefined : activeTriggerId || undefined;\n }\n return ariaLabelledBy;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingFocusManager, useHoverFloatingInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useMenuPositionerContext } from \"../positioner/MenuPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { useMenuSubmenuRootContext } from \"../submenu-root/MenuSubmenuRootContext.mjs\";\nimport { useRenderedId } from \"../../internals/resolveRenderedId.mjs\";\nimport { resolvePopupLabel } from \"../../internals/resolvePopupLabel.mjs\";\nimport { MenuFilterImplContext, useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const MenuPopupPlain = /*#__PURE__*/React.forwardRef(function MenuPopupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n id: idProp,\n initialFocus: initialFocusProp,\n ...elementProps\n } = componentProps;\n const {\n store,\n defaultFloatingId,\n setRenderedFloatingId,\n virtualFocus,\n orientation\n } = useMenuRootContext();\n const inheritedSubmenuRootContext = useMenuSubmenuRootContext();\n const {\n side,\n align\n } = useMenuPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const open = store.useState('open');\n const transitionStatus = store.useState('transitionStatus');\n const popupProps = store.useState('popupProps');\n const mounted = store.useState('mounted');\n const instantType = store.useState('instantType');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const parent = store.useState('parent');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const rootId = store.useState('rootId');\n const floatingContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const closeDelay = store.useState('closeDelay');\n const hoverEnabled = store.useState('hoverEnabled');\n const disabled = store.useState('disabled');\n const openMethod = store.useState('openMethod');\n const activeTriggerId = store.useState('activeTriggerId');\n const listElement = store.useState('listElement');\n const [id, registerIdRef] = useRenderedId(componentProps, defaultFloatingId, setRenderedFloatingId);\n const ariaLabelledBy = resolvePopupLabel(componentProps, activeTriggerElement, activeTriggerId);\n\n // A dialog's menu can render under a submenu provider; only the actual submenu inherits it.\n const submenuRootContext = parent.type === 'menu' ? inheritedSubmenuRootContext : undefined;\n const isContextMenu = parent.type === 'context-menu';\n let initialFocus = initialFocusProp ?? parent.type !== 'menu';\n if (initialFocusProp === undefined && listElement && parent.type !== 'menu') {\n initialFocus = () => {\n // A keyboard or screen reader open highlights an item, which list navigation focuses.\n if (store.state.activeIndex !== null) {\n return false;\n }\n // The list holds the `menu` role, so a pointer open lands focus on it rather than on the\n // presentational popup.\n return listElement;\n };\n }\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n React.useEffect(() => {\n function handleClose(event) {\n store.setOpen(false, createChangeEventDetails(event.reason, event.domEvent));\n }\n floatingTreeRoot.events.on('close', handleClose);\n return () => {\n floatingTreeRoot.events.off('close', handleClose);\n };\n }, [floatingTreeRoot.events, store]);\n useHoverFloatingInteraction(floatingContext, {\n enabled: hoverEnabled && !disabled && !isContextMenu && parent.type !== 'menubar',\n closeDelay\n });\n const setPopupElement = store.useStateSetter('popupElement');\n\n // Only a menu under a filter root bundles the handoff to a filterable parent. Whether one is\n // above is fixed for a mounted popup, so the hook doesn't change between renders.\n const useParentHandoff = React.useContext(MenuFilterImplContext)?.useParentHandoff ?? useNoParentHandoff;\n const {\n parentVirtualFocusRef,\n handleFocus\n } = useParentHandoff(store, parent, open, virtualFocus);\n const state = {\n transitionStatus,\n side,\n align,\n open,\n nested: parent.type === 'menu',\n instant: instantType\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef, setPopupElement, registerIdRef],\n stateAttributesMapping: popupTransitionStateMapping,\n props: [popupProps, {\n id,\n // A rendered `Menu.List` carries the `menu` semantics instead.\n ...(listElement ? {\n role: 'presentation'\n } : {\n role: 'menu',\n // `menu` is implicitly vertical, so only the non-default value needs to be\n // rendered.\n 'aria-orientation': orientation === 'horizontal' ? 'horizontal' : undefined,\n 'aria-labelledby': ariaLabelledBy\n }),\n onKeyDown(event) {\n submenuRootContext?.onPopupKeyDown?.(event);\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onFocus: handleFocus\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps, {\n 'data-rootownerid': rootId\n }]\n });\n let returnFocus = parent.type === undefined || isContextMenu;\n if (activeTriggerElement || parent.type === 'menubar' && lastOpenChangeReason !== REASONS.outsidePress) {\n returnFocus = true;\n }\n\n // Internal defaults rather than consumer targets, so focus that already moved is respected.\n const dynamicReturnFocus = submenuRootContext?.getReturnElement ?? parentVirtualFocusRef;\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingContext,\n openInteractionType: openMethod,\n modal: isContextMenu,\n disabled: !mounted,\n returnFocus: finalFocus ?? dynamicReturnFocus ?? returnFocus,\n explicitReturnFocus: finalFocus === undefined && dynamicReturnFocus ? false : undefined,\n initialFocus: initialFocus,\n restoreFocus: true,\n getInsideElements: parent.type === undefined ? () => [store.context.beforeTriggerFocusGuardRef.current] : undefined,\n externalTree: parent.type !== 'menubar' ? floatingTreeRoot : undefined,\n previousFocusableElement: activeTriggerElement,\n nextFocusableElement: parent.type === undefined ? store.context.triggerFocusTargetRef : undefined,\n beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPopupPlain.displayName = \"MenuPopupPlain\";\nconst NO_PARENT_HANDOFF = {\n parentVirtualFocusRef: undefined,\n handleFocus: undefined\n};\nfunction useNoParentHandoff() {\n return NO_PARENT_HANDOFF;\n}\n\n/**\n * A container for the menu items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuPopup = /*#__PURE__*/React.forwardRef(function MenuPopup(props, forwardedRef) {\n const Popup = useMenuFilterImpl()?.Popup ?? MenuPopupPlain;\n return /*#__PURE__*/_jsx(Popup, {\n ...props,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPopup.displayName = \"MenuPopup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuPortalContext.displayName = \"MenuPortalContext\";\nexport function useMenuPortalContext() {\n const value = React.useContext(MenuPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.Portal> is missing.' : _formatErrorMessage(32));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { MenuPortalContext } from \"./MenuPortalContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MenuPortal = /*#__PURE__*/React.forwardRef(function MenuPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const {\n store,\n parent\n } = useMenuRootContext();\n const mounted = store.useState('mounted');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n\n // The hidden `aria-owns` owner renders here, in the React tree, so the role must be decided by\n // where this portal sits, not by the active trigger. `parent` comes from context (the `Menu.Root`\n // position), unlike the store's `parent`, which a detached trigger overwrites with its own.\n const portalOwnerRole = parent.type === 'menu' || parent.type === 'menubar' ? 'group' : undefined;\n return /*#__PURE__*/_jsx(MenuPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n portalOwnerRole: portalOwnerRole\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPortal.displayName = \"MenuPortal\";","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { FloatingNode } from \"../../floating-ui-react/index.mjs\";\nimport { MenuPositionerContext } from \"./MenuPositionerContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { useMenuPortalContext } from \"../portal/MenuPortalContext.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE, POPUP_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useTriggerSwitchTransition } from \"../../internals/useTriggerSwitchTransition.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\n\n/**\n * Positions the menu popup against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuPositioner = /*#__PURE__*/React.forwardRef(function MenuPositioner(componentProps, forwardedRef) {\n const {\n anchor: anchorProp,\n positionMethod: positionMethodProp = 'absolute',\n className,\n render,\n side,\n align: alignProp,\n sideOffset: sideOffsetProp = 0,\n alignOffset: alignOffsetProp = 0,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding = 5,\n arrowPadding = 5,\n sticky = false,\n disableAnchorTracking = false,\n collisionAvoidance: collisionAvoidanceProp = DROPDOWN_COLLISION_AVOIDANCE,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n virtualFocus,\n syncHighlightedItem\n } = useMenuRootContext();\n const keepMounted = useMenuPortalContext();\n const contextMenuContext = useContextMenuRootContext(true);\n const parent = store.useState('parent');\n const floatingRootContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const modal = store.useState('modal');\n const openMethod = store.useState('openMethod');\n const triggerElement = store.useState('activeTriggerElement');\n const transitionStatus = store.useState('transitionStatus');\n const positionerElement = store.useState('positionerElement');\n const instantType = store.useState('instantType');\n const adaptiveOrigin = store.useState('adaptiveOrigin');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const floatingNodeId = store.useState('floatingNodeId');\n const floatingParentNodeId = store.useState('floatingParentNodeId');\n const domReference = floatingRootContext.useState('domReferenceElement');\n let anchor = anchorProp;\n let sideOffset = sideOffsetProp;\n let alignOffset = alignOffsetProp;\n let align = alignProp;\n let collisionAvoidance = collisionAvoidanceProp;\n if (parent.type === 'context-menu') {\n anchor = anchorProp ?? parent.context?.anchor;\n align = align ?? 'start';\n if (!side && align !== 'center') {\n alignOffset = componentProps.alignOffset ?? 2;\n sideOffset = componentProps.sideOffset ?? -5;\n }\n }\n let computedSide = side;\n let computedAlign = align;\n if (parent.type === 'menu') {\n computedSide = computedSide ?? 'inline-end';\n computedAlign = computedAlign ?? 'start';\n collisionAvoidance = componentProps.collisionAvoidance ?? POPUP_COLLISION_AVOIDANCE;\n } else if (parent.type === 'menubar') {\n computedSide = computedSide ?? (parent.context.orientation === 'vertical' ? 'inline-end' : 'bottom');\n computedAlign = computedAlign ?? 'start';\n }\n const contextMenu = parent.type === 'context-menu';\n const positioner = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod: contextMenuContext ? 'fixed' : positionMethodProp,\n mounted,\n side: computedSide,\n sideOffset,\n align: computedAlign,\n alignOffset,\n arrowPadding: contextMenu ? 0 : arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n nodeId: floatingNodeId,\n keepMounted,\n disableAnchorTracking,\n collisionAvoidance,\n shift: contextMenu ? {\n crossAxis: !('side' in collisionAvoidance && collisionAvoidance.side === 'flip'),\n rootBoundary: 'layoutViewport'\n } : undefined,\n externalTree: floatingTreeRoot,\n adaptiveOrigin,\n lazyFlip: virtualFocus ? 'placement' : false\n });\n React.useEffect(() => {\n function onMenuOpenChange(details) {\n if (details.open) {\n if (details.parentNodeId === floatingNodeId) {\n store.set('hoverEnabled', false);\n }\n if (details.nodeId !== floatingNodeId && details.parentNodeId === store.select('floatingParentNodeId')) {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n }\n }\n }\n floatingTreeRoot.events.on('menuopenchange', onMenuOpenChange);\n return () => {\n floatingTreeRoot.events.off('menuopenchange', onMenuOpenChange);\n };\n }, [store, floatingTreeRoot.events, floatingNodeId]);\n React.useEffect(() => {\n if (store.select('floatingParentNodeId') == null) {\n return undefined;\n }\n function onParentClose(details) {\n if (details.open || details.nodeId !== store.select('floatingParentNodeId')) {\n return;\n }\n const reason = details.reason ?? REASONS.siblingOpen;\n store.setOpen(false, createChangeEventDetails(reason));\n }\n floatingTreeRoot.events.on('menuopenchange', onParentClose);\n return () => {\n floatingTreeRoot.events.off('menuopenchange', onParentClose);\n };\n }, [floatingTreeRoot.events, store]);\n const closeTimeout = useTimeout();\n\n // Clear pending close timeout when the menu closes.\n React.useEffect(() => {\n if (!open) {\n closeTimeout.clear();\n }\n }, [open, closeTimeout]);\n\n // Close unrelated child submenus when hovering a different item in the parent menu.\n React.useEffect(() => {\n function onItemHover(event) {\n // If an item within our parent menu is hovered, and this menu's trigger is not that item,\n // close this submenu. This ensures hovering a different item in the parent closes other branches.\n if (!open || event.nodeId !== store.select('floatingParentNodeId')) {\n return;\n }\n if (event.target && triggerElement && triggerElement !== event.target) {\n const delay = store.select('closeDelay');\n if (delay > 0) {\n if (!closeTimeout.isStarted()) {\n closeTimeout.start(delay, () => {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n });\n }\n } else {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n }\n } else {\n // User re-hovered the submenu trigger, cancel pending close.\n closeTimeout.clear();\n }\n }\n floatingTreeRoot.events.on('itemhover', onItemHover);\n return () => {\n floatingTreeRoot.events.off('itemhover', onItemHover);\n };\n }, [floatingTreeRoot.events, open, triggerElement, store, closeTimeout]);\n React.useEffect(() => {\n const eventDetails = {\n open,\n nodeId: floatingNodeId,\n parentNodeId: floatingParentNodeId,\n reason: store.select('lastOpenChangeReason')\n };\n floatingTreeRoot.events.emit('menuopenchange', eventDetails);\n }, [floatingTreeRoot.events, open, store, floatingNodeId, floatingParentNodeId]);\n useTriggerSwitchTransition({\n store,\n domReference,\n positionerElement,\n open\n });\n const state = {\n open,\n side: positioner.side,\n align: positioner.align,\n anchorHidden: positioner.anchorHidden,\n nested: parent.type === 'menu',\n instant: instantType\n };\n const menubarModal = parent.type === 'menubar' && parent.context.modal;\n const popupModal = modal && lastOpenChangeReason !== REASONS.triggerHover;\n useAnchoredPopupScrollLock(open && (menubarModal || popupModal), openMethod === 'touch', positionerElement, triggerElement);\n const element = usePositioner(componentProps, state, {\n styles: positioner.positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, store.useStateSetter('positionerElement')],\n hidden: !mounted,\n inert: !open\n });\n const shouldRenderBackdrop = mounted && parent.type !== 'menu' && (parent.type !== 'menubar' && modal && lastOpenChangeReason !== REASONS.triggerHover || parent.type === 'menubar' && parent.context.modal);\n\n // cuts a hole in the backdrop to allow pointer interaction with the menubar or dropdown menu trigger element\n let backdropCutout = null;\n if (parent.type === 'menubar') {\n backdropCutout = parent.context.contentElement;\n } else if (parent.type === undefined) {\n backdropCutout = triggerElement;\n }\n return /*#__PURE__*/_jsxs(MenuPositionerContext.Provider, {\n value: positioner,\n children: [shouldRenderBackdrop && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: parent.type === 'context-menu' || parent.type === 'nested-context-menu' ? parent.context.internalBackdropRef : null,\n inert: inertValue(!open),\n cutout: backdropCutout\n }), /*#__PURE__*/_jsx(FloatingNode, {\n id: floatingNodeId,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: store.context.itemDomElements,\n labelsRef: store.context.itemLabels,\n onMapChange: syncHighlightedItem,\n children: element\n })\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPositioner.displayName = \"MenuPositioner\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroupContext.displayName = \"MenuRadioGroupContext\";\nexport function useMenuRadioGroupContext() {\n const context = React.useContext(MenuRadioGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.' : _formatErrorMessage(34));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { MenuRadioGroupContext } from \"./MenuRadioGroupContext.mjs\";\nimport { MenuGroupContext } from \"../group/MenuGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const MenuRadioGroupPlain = /*#__PURE__*/React.forwardRef(function MenuRadioGroupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n value: valueProp,\n defaultValue,\n onValueChange: onValueChangeProp,\n disabled = false,\n style,\n 'aria-labelledby': ariaLabelledByProp,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState(undefined);\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'MenuRadioGroup'\n });\n const setValue = useStableCallback((newValue, eventDetails) => {\n onValueChangeProp?.(newValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(newValue);\n });\n const state = {\n disabled\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: {\n role: 'group',\n 'aria-labelledby': ariaLabelledByProp ?? labelId,\n 'aria-disabled': disabled || undefined,\n ...elementProps\n }\n });\n const context = React.useMemo(() => ({\n value,\n setValue,\n disabled\n }), [value, setValue, disabled]);\n return /*#__PURE__*/_jsx(MenuGroupContext.Provider, {\n value: setLabelId,\n children: /*#__PURE__*/_jsx(MenuRadioGroupContext.Provider, {\n value: context,\n children: element\n })\n });\n});\n\n/**\n * Groups related radio items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroupPlain.displayName = \"MenuRadioGroupPlain\";\nexport const MenuRadioGroup = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function MenuRadioGroup(props, forwardedRef) {\n const RadioGroup = useMenuFilterImpl()?.RadioGroup ?? MenuRadioGroupPlain;\n return /*#__PURE__*/_jsx(RadioGroup, {\n ...props,\n ref: forwardedRef\n });\n}));\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroup.displayName = \"MenuRadioGroup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRadioItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemContext.displayName = \"MenuRadioItemContext\";\nexport function useMenuRadioItemContext() {\n const context = React.useContext(MenuRadioItemContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.' : _formatErrorMessage(35));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useMenuRadioGroupContext } from \"../radio-group/MenuRadioGroupContext.mjs\";\nimport { MenuRadioItemContext } from \"./MenuRadioItemContext.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuRadioItemPlain = /*#__PURE__*/React.forwardRef(function MenuRadioItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = false,\n value,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const {\n value: selectedValue,\n setValue: setSelectedValue,\n disabled: groupDisabled\n } = useMenuRadioGroupContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const rootDisabled = store.useState('disabled');\n const disabled = disabledProp || groupDisabled || rootDisabled;\n const checked = selectedValue === value;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = React.useMemo(() => ({\n disabled,\n highlighted,\n checked\n }), [disabled, highlighted, checked]);\n function handleClick(event) {\n const details = createChangeEventDetails(REASONS.itemPress, event.nativeEvent, undefined, {\n preventUnmountOnClose: NOOP\n });\n setSelectedValue(value, details);\n }\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n props: [itemProps, {\n role: 'menuitemradio',\n 'aria-checked': checked,\n onClick: handleClick\n }, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n return /*#__PURE__*/_jsx(MenuRadioItemContext.Provider, {\n value: state,\n children: element\n });\n});\n\n/**\n * A menu item that works like a radio button in a given group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemPlain.displayName = \"MenuRadioItemPlain\";\nexport const MenuRadioItem = /*#__PURE__*/React.forwardRef(function MenuRadioItem(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef);\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuRadioItemPlain, {\n ...props,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuRadioItem.displayName = \"MenuRadioItem\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuRadioItemContext } from \"../radio-item/MenuRadioItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\n\n/**\n * Indicates whether the radio item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuRadioItemIndicator = /*#__PURE__*/React.forwardRef(function MenuRadioItemIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const item = useMenuRadioItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n mounted,\n setMounted\n } = useTransitionStatus(item.checked);\n useOpenChangeComplete({\n batch: true,\n enabled: !item.checked,\n open: item.checked,\n ref: indicatorRef,\n onComplete() {\n if (!item.checked) {\n setMounted(false);\n }\n }\n });\n const state = {\n checked: item.checked,\n disabled: item.disabled,\n highlighted: item.highlighted,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n ref: [forwardedRef, indicatorRef],\n props: {\n 'aria-hidden': true,\n ...elementProps\n },\n enabled: keepMounted || mounted\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemIndicator.displayName = \"MenuRadioItemIndicator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenubarContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenubarContext.displayName = \"MenubarContext\";\nexport function useMenubarContext(optional) {\n const context = React.useContext(MenubarContext);\n if (context === null && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.' : _formatErrorMessage(5));\n }\n return context;\n}","import * as React from 'react';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_OBJECT, NOOP } from '@base-ui/utils/empty';\nimport { platform } from '@base-ui/utils/platform';\nimport { FloatingTreeStore } from \"../../floating-ui-react/components/FloatingTreeStore.mjs\";\nimport { NullStore } from \"../../utils/NullStore.mjs\";\nimport { createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nconst selectors = {\n ...popupStoreSelectors,\n disabled: state => state.parent.type === 'menubar' ? state.parent.context.disabled || state.disabled : state.disabled,\n modal: state => (state.parent.type === undefined || state.parent.type === 'context-menu') && (state.modal ?? true),\n openMethod: state => state.openMethod,\n keyboardOpen: state => state.keyboardOpen,\n allowMouseEnter: state => state.allowMouseEnter,\n highlightItemOnHover: state => state.highlightItemOnHover,\n parent: state => state.parent,\n rootId: state => {\n if (state.parent.type === 'menu') {\n return state.parent.store.select('rootId');\n }\n return state.parent.type !== undefined ? state.parent.context.rootId : state.rootId;\n },\n activeIndex: state => state.activeIndex,\n listElement: state => state.listElement,\n /** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */\n triggerControlsId: (state, triggerId) => {\n const popupId = popupStoreSelectors.triggerPopupId(state, triggerId);\n return popupId ? state.listElement?.id || popupId : undefined;\n },\n filterTriggerProps: state => state.filterTriggerProps,\n inputProps: state => state.inputProps,\n // `aria-selected` is invalid on `menuitem`, but Safari VoiceOver needs it for arrow-key\n // navigation. Limit it to WebKit while the input has focus so normal VoiceOver navigation\n // does not encounter the invalid attribute.\n webkitAriaSelected: (state, highlighted) => platform.engine.webkit && state.inputFocused && highlighted ? true : undefined,\n highlightedItemId: state => state.highlightedItem?.id || undefined,\n isActive: (state, itemIndex) => state.activeIndex === itemIndex,\n hoverEnabled: state => state.hoverEnabled,\n // `trigger-change` describes a popup moving between triggers, which only has\n // meaning while it is open. Dropping it once closed keeps a late or stale\n // restoration from marking a closing popup instant and skipping its exit\n // transition, including on close paths that never reach `setOpen` — a\n // controlled consumer committing `open={false}` goes straight through the prop.\n instantType: state => state.instantType === 'trigger-change' && !popupStoreSelectors.open(state) ? undefined : state.instantType,\n lastOpenChangeReason: state => state.openChangeReason,\n floatingTreeRoot: state => {\n if (state.parent.type === 'menu') {\n return state.parent.store.select('floatingTreeRoot');\n }\n return state.floatingTreeRoot;\n },\n floatingNodeId: state => state.floatingNodeId,\n floatingParentNodeId: state => state.floatingParentNodeId,\n itemProps: state => state.itemProps,\n closeDelay: state => state.closeDelay,\n adaptiveOrigin: state => state.adaptiveOrigin,\n keyboardEventRelay: state => {\n if (state.keyboardEventRelay) {\n return state.keyboardEventRelay;\n }\n if (state.parent.type === 'menu') {\n return state.parent.store.select('keyboardEventRelay');\n }\n return undefined;\n }\n};\n\n/**\n * The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the\n * inert fallback store satisfy it, so a trigger can read from whichever store the handle currently\n * exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`\n * (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on\n * the detached fallback store every one of these mutations is a no-op.\n */\n\nexport class MenuStore extends ReactStore {\n constructor(initialState, floatingId, nested = false) {\n const triggerElements = new PopupTriggerMap();\n const state = createInitialState(triggerElements, floatingId, nested, initialState);\n super(state, createInitialContext(triggerElements), selectors);\n\n // Share the mouse-up trigger ref of the parent menu, if any. This observes the store's own\n // state, so the subscription lives exactly as long as the store and needs no cleanup.\n void this.observe('parent', parent => {\n if (parent.type === 'menu') {\n this.context.allowMouseUpTriggerRef = parent.store.context.allowMouseUpTriggerRef;\n } else if (parent.type !== undefined) {\n this.context.allowMouseUpTriggerRef = parent.context.allowMouseUpTriggerRef;\n }\n });\n }\n\n /**\n * Propagates changes of the parent menu's shared tree state to this store's subscribers.\n * The owning `Menu.Root` calls it from an effect so the parent store subscription is released\n * when the submenu unmounts.\n * @returns A function that removes the parent store subscription.\n */\n subscribeToParentMenu() {\n const parent = this.state.parent;\n if (parent.type !== 'menu') {\n return undefined;\n }\n let rootId = parent.store.select('rootId');\n let floatingTreeRoot = parent.store.select('floatingTreeRoot');\n let keyboardEventRelay = parent.store.select('keyboardEventRelay');\n return parent.store.subscribe(() => {\n const nextRootId = parent.store.select('rootId');\n const nextFloatingTreeRoot = parent.store.select('floatingTreeRoot');\n const nextKeyboardEventRelay = parent.store.select('keyboardEventRelay');\n if (rootId === nextRootId && floatingTreeRoot === nextFloatingTreeRoot && keyboardEventRelay === nextKeyboardEventRelay) {\n return;\n }\n rootId = nextRootId;\n floatingTreeRoot = nextFloatingTreeRoot;\n keyboardEventRelay = nextKeyboardEventRelay;\n this.notifyAll();\n });\n }\n setOpen(open, eventDetails) {\n this.state.floatingRootContext.context.events.emit('setOpen', {\n open,\n eventDetails\n });\n }\n setActiveIndex(activeIndex, reason, event) {\n // Only a write that changes the index is reported. Tagging a no-op, or a write back to the\n // reported item before the change commits, would let a later registry-driven re-emit report\n // this reason instead of `none`.\n if (this.state.activeIndex !== activeIndex) {\n const item = activeIndex === null ? undefined : this.context.itemDomElements.current[activeIndex];\n const isWriteBack = item === this.context.reportedItem;\n this.context.highlightReason = isWriteBack ? 'none' : reason;\n this.context.highlightEvent = isWriteBack ? undefined : event;\n }\n this.set('activeIndex', activeIndex);\n }\n highlightItem(element, reason, event) {\n const index = this.context.itemDomElements.current.indexOf(element);\n if (index > -1) {\n this.setActiveIndex(index, reason, event);\n }\n }\n}\n\n/**\n * Creates the inert fallback store used by detached handle-backed triggers while no `Menu.Root` is\n * attached. It preserves a menu-specific trigger registry in context so detached triggers can\n * register before migrating to the live root store. `setOpen` is a no-op (matching the inert\n * reads/writes of `NullStore`), so a trigger can hand the store to focus-guard helpers that expect\n * `setOpen` without it ever taking effect while detached.\n */\nexport function createNullMenuStore() {\n const triggerElements = new PopupTriggerMap();\n const store = new NullStore(Object.freeze(createInitialState(triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors);\n return Object.assign(store, {\n setOpen: NOOP\n });\n}\nfunction createInitialContext(triggerElements) {\n return {\n positionerRef: /*#__PURE__*/React.createRef(),\n popupRef: /*#__PURE__*/React.createRef(),\n typingRef: {\n current: false\n },\n itemDomElements: {\n current: []\n },\n itemLabels: {\n current: []\n },\n highlightReason: 'none',\n highlightEvent: undefined,\n reportedItem: undefined,\n allowMouseUpTriggerRef: {\n current: false\n },\n virtualFocusRef: undefined,\n triggerFocusTargetRef: /*#__PURE__*/React.createRef(),\n beforeTriggerFocusGuardRef: /*#__PURE__*/React.createRef(),\n beforeContentFocusGuardRef: /*#__PURE__*/React.createRef(),\n onOpenChangeComplete: undefined,\n triggerElements\n };\n}\nfunction createInitialState(triggerElements, floatingId, nested = false, initialState) {\n return {\n ...createInitialPopupStoreState(triggerElements, floatingId, nested),\n disabled: false,\n modal: true,\n openMethod: null,\n keyboardOpen: false,\n allowMouseEnter: false,\n highlightItemOnHover: true,\n parent: {\n type: undefined\n },\n rootId: undefined,\n activeIndex: null,\n listElement: null,\n filterTriggerProps: EMPTY_OBJECT,\n inputProps: EMPTY_OBJECT,\n inputFocused: false,\n highlightedItem: undefined,\n hoverEnabled: true,\n instantType: undefined,\n openChangeReason: null,\n floatingTreeRoot: new FloatingTreeStore(),\n floatingNodeId: undefined,\n floatingParentNodeId: null,\n itemProps: EMPTY_OBJECT,\n keyboardEventRelay: undefined,\n closeDelay: 0,\n adaptiveOrigin: undefined,\n ...initialState\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * What `Menu.FilterProvider` hands to the root directly inside it: the filterable root\n * implementations (the provider is their only importer) and the filter props.\n */\n\n/**\n * Non-null only directly below a provider. The root that consumes it resets it, so a plain\n * `Menu.SubmenuRoot` inside a filterable menu stays plain.\n */\nexport const MenuFilterProviderContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenuFilterProviderContext.displayName = \"MenuFilterProviderContext\";","import { REASONS } from \"../../internals/reasons.mjs\";\n\n/**\n * Keyboard and assistive-technology activations produce `detail === 0` clicks; mouse-gesture\n * clicks (including the synthesized drag-release click from `useMenuItemCommonProps`) carry\n * `detail >= 1`.\n */\nexport function isKeyboardClick(reason, event) {\n return (reason === REASONS.triggerPress || reason === REASONS.itemPress) && event?.detail === 0;\n}\n\n/**\n * Whether a menu opens from the keyboard, which lands focus in the popup. Arrow keys report\n * `list-navigation`; Enter and Space dispatch a click carrying no pointer detail.\n */\nexport function isKeyboardOpen(reason, event) {\n return reason === REASONS.listNavigation || isKeyboardClick(reason, event);\n}","'use client';\n\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { fastComponent } from '@base-ui/utils/fastHooks';\nimport { FloatingTree, useDismiss, useFloatingNodeId, useFloatingParentNodeId, useListNavigation, useTypeahead, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.mjs\";\nimport { MenuRootContext, useMenuRootContext } from \"./MenuRootContext.mjs\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.mjs\";\nimport { TYPEAHEAD_RESET_MS } from \"../../internals/constants.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useAnimationsFinished } from \"../../internals/useAnimationsFinished.mjs\";\nimport { MenuStore } from \"../store/MenuStore.mjs\";\nimport { attachPreventUnmountOnClose, FOCUSABLE_POPUP_PROPS, createPopupOpenState, PopupHandleAttachment, useImplicitActiveTrigger, useOpenStateTransitions, usePopupInteractionProps } from \"../../utils/popups/index.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { MenuFilterProviderContext } from \"../filter-provider/MenuFilterProviderContext.mjs\";\nimport { isKeyboardClick, isKeyboardOpen } from \"../utils/isKeyboardOpen.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuRootInternal = fastComponent(function MenuRootInternal(props) {\n const {\n children,\n open: openProp,\n onOpenChange,\n onOpenChangeComplete,\n onItemHighlighted: onItemHighlightedProp,\n defaultOpen = false,\n disabled: disabledProp = false,\n modal: modalProp,\n loopFocus = true,\n orientation = 'vertical',\n actionsRef,\n closeParentOnEsc = false,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null,\n highlightItemOnHover = true,\n isSubmenu = false,\n virtualFocus = false,\n virtualFocusRef,\n allowEscape = true,\n resetOnPointerLeave = true\n } = props;\n const contextMenuContext = useContextMenuRootContext(true);\n const parentMenuRootContext = useMenuRootContext(true);\n const menubarContext = useMenubarContext(true);\n\n // Depend on the stable pieces rather than the parent context object, so a parent context\n // invalidation doesn't cascade into every descendant root's context.\n const enclosingMenuStore = parentMenuRootContext?.store;\n const parentVirtualFocus = parentMenuRootContext?.virtualFocus ?? false;\n const parentFromContext = React.useMemo(() => {\n if (isSubmenu && enclosingMenuStore) {\n return {\n type: 'menu',\n store: enclosingMenuStore\n };\n }\n if (menubarContext) {\n return {\n type: 'menubar',\n context: menubarContext\n };\n }\n\n // Ensure this is not a Menu nested inside ContextMenu.Trigger.\n // ContextMenu parentContext is always undefined as ContextMenu.Root is instantiated with\n // <MenuRootContext.Provider value={undefined}>\n if (contextMenuContext && !enclosingMenuStore) {\n return {\n type: 'context-menu',\n context: contextMenuContext\n };\n }\n return {\n type: undefined\n };\n }, [contextMenuContext, enclosingMenuStore, menubarContext, isSubmenu]);\n const rootId = useBaseUiId();\n // React 17 resolves generated ids in an effect, so they must be read live rather than captured\n // in a state initializer.\n const defaultFloatingId = useBaseUiId();\n const [renderedFloatingId, setRenderedFloatingId] = React.useState(undefined);\n\n // A registered `''` means the popup rendered with an explicitly empty id, so nothing may point\n // at the generated fallback.\n const floatingId = (renderedFloatingId ?? defaultFloatingId) || undefined;\n const floatingParentNodeIdFromContext = useFloatingParentNodeId();\n const parentMenuStore = parentFromContext.type === 'menu' ? parentFromContext.store : undefined;\n // An initially open submenu should animate in only when the user watches it appear, i.e. when\n // its subtree mounts because the parent popup is playing its own enter transition. A parent\n // that was `defaultOpen` at page load never passes through `'starting'`, and under a\n // `keepMounted` parent these initializers run at page load while the parent's status is still\n // `undefined` — in both cases the submenu is page-load content that must not animate. Gated on\n // being open at mount so a closed submenu doesn't seed `instantType` it would never clear. Read\n // during the first render only — consumed exclusively by first-render initializers below\n // (`useState` and the store's initial state).\n const animateInitialOpen = (openProp ?? defaultOpen) && parentMenuStore?.state.transitionStatus === 'starting';\n\n // Mirror an instantly-opened parent (e.g. keyboard click) so `[data-instant]` styling\n // suppresses the enter transition on both popups or neither. Captured once —\n // `animateInitialOpen` is only meaningful during the first render.\n const seededInstantType = useRefWithInit(() => animateInitialOpen ? parentMenuStore?.state.instantType : undefined).current;\n const store = useRefWithInit(() => {\n const menuStore = new MenuStore({\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n parent: parentFromContext,\n disabled: disabledProp,\n highlightItemOnHover,\n modal: parentFromContext.type === undefined ? modalProp : undefined,\n rootId,\n instantType: seededInstantType\n }, floatingId, floatingParentNodeIdFromContext != null);\n // A stable ref object, so descendants can read it during render from the first commit.\n menuStore.context.virtualFocusRef = virtualFocusRef;\n return menuStore;\n }).current;\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const floatingNodeIdFromContext = useFloatingNodeId(floatingTreeRoot);\n const open = store.useState('open');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const positionerElement = store.useState('positionerElement');\n const hoverEnabled = store.useState('hoverEnabled');\n const disabled = store.useState('disabled');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const parent = store.useState('parent');\n const activeIndex = store.useState('activeIndex');\n const keyboardOpen = store.useState('keyboardOpen');\n const payload = store.useState('payload');\n const floatingParentNodeId = store.useState('floatingParentNodeId');\n const openEventRef = React.useRef(null);\n const allowOutsidePressDismissalRef = React.useRef(parent.type !== 'context-menu');\n const allowOutsidePressDismissalTimeout = useTimeout();\n const allowTouchToCloseRef = React.useRef(true);\n const allowTouchToCloseTimeout = useTimeout();\n const nested = floatingParentNodeId != null;\n if (process.env.NODE_ENV !== 'production') {\n if (parent.type !== undefined && modalProp !== undefined) {\n console.warn('Base UI: The `modal` prop is not supported on nested menus. It will be ignored.');\n }\n }\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n store.useSyncedValues({\n disabled: disabledProp,\n highlightItemOnHover,\n modal: parent.type === undefined ? modalProp : undefined,\n openMethod,\n rootId\n });\n useImplicitActiveTrigger(store);\n const {\n forceUnmount,\n transitionStatus\n } = useOpenStateTransitions(open, store, () => {\n store.set('allowMouseEnter', false);\n }, animateInitialOpen);\n const runOnceAnimationsFinish = useAnimationsFinished(store.context.popupRef);\n\n // An inherited `instantType` is only for the initial reveal. A later controlled `open` flip\n // bypasses `setOpen`, so nothing would reset it and `[data-instant]` would wrongly suppress\n // every subsequent transition. Clear it once the enter phase settles, unless an interactive\n // open change already replaced it.\n React.useEffect(() => {\n if (seededInstantType === undefined) {\n return undefined;\n }\n const clearSeededInstantType = () => {\n if (store.state.instantType === seededInstantType) {\n store.set('instantType', undefined);\n }\n };\n\n // A controlled close can interrupt the initial enter before the animations-finished cleanup\n // below fires (its abort cancels the pending callback, and a closed popup schedules no new\n // one). Nothing is left to protect once closing starts — the exit's suppression was already\n // decided at its trigger commit — so clear now or the next reopen renders a stale\n // `[data-instant]`.\n if (!open) {\n clearSeededInstantType();\n return undefined;\n }\n if (transitionStatus !== undefined) {\n return undefined;\n }\n\n // With no popup element (e.g. its subtree is suspended or waiting on data), there is no\n // enter transition to protect, and `useAnimationsFinished` would return without invoking the\n // callback — a ref assignment alone would never rerun this effect, leaving the seed stuck.\n // Clear immediately: a popup that appears after the reveal settles is page-load-like content.\n if (store.context.popupRef.current == null) {\n clearSeededInstantType();\n return undefined;\n }\n const abortController = new AbortController();\n runOnceAnimationsFinish(clearSeededInstantType, abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [seededInstantType, open, transitionStatus, runOnceAnimationsFinish, store]);\n useIsoLayoutEffect(() => {\n if (contextMenuContext && !parentMenuRootContext) {\n // This is a context menu root.\n // It doesn't support detached triggers yet, so we have to sync the parent context manually.\n store.update({\n parent: {\n type: 'context-menu',\n context: contextMenuContext\n },\n floatingNodeId: floatingNodeIdFromContext,\n floatingParentNodeId: floatingParentNodeIdFromContext\n });\n } else if (parentMenuRootContext || !store.select('activeTriggerElement')) {\n // Without an active trigger, the root must supply its own tree IDs.\n // Read the store here: a trigger can register after render, before this effect.\n store.update({\n floatingNodeId: floatingNodeIdFromContext,\n floatingParentNodeId: floatingParentNodeIdFromContext\n });\n }\n }, [contextMenuContext, parentMenuRootContext, floatingNodeIdFromContext, floatingParentNodeIdFromContext, activeTriggerElement, store]);\n React.useEffect(() => {\n if (!open) {\n openEventRef.current = null;\n }\n if (parent.type !== 'context-menu') {\n return;\n }\n if (!open) {\n allowOutsidePressDismissalTimeout.clear();\n allowOutsidePressDismissalRef.current = false;\n return;\n }\n\n // With `mousedown` outside press events and long press touch input, there\n // needs to be a grace period after opening to ensure the dismissal event\n // doesn't fire immediately after open.\n allowOutsidePressDismissalTimeout.start(500, () => {\n allowOutsidePressDismissalRef.current = true;\n });\n }, [allowOutsidePressDismissalTimeout, open, parent.type]);\n useIsoLayoutEffect(() => {\n if (!open && !hoverEnabled) {\n store.set('hoverEnabled', true);\n }\n }, [open, hoverEnabled, store]);\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n const reason = eventDetails.reason;\n\n // Read the store directly, as relayed tree events and stale hover timers can request\n // a close after the state changed but before this component re-rendered.\n if (!nextOpen && !store.select('open')) {\n return;\n }\n if (open === nextOpen && eventDetails.trigger === activeTriggerElement && lastOpenChangeReason === reason) {\n return;\n }\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n\n // Do not immediately reset the activeTriggerId to allow\n // exit animations to play and focus to be returned correctly.\n if (!nextOpen && eventDetails.trigger == null) {\n eventDetails.trigger = activeTriggerElement ?? undefined;\n }\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const nativeEvent = eventDetails.event;\n if (nextOpen === false && reason !== REASONS.itemPress && nativeEvent?.type === 'click' && nativeEvent.pointerType === 'touch' && !allowTouchToCloseRef.current) {\n return;\n }\n\n // Prevent the menu from closing on mobile devices that have a delayed click event.\n // In some cases the menu, when tapped, will fire the focus event first and then the click event.\n // Without this guard, the menu will close immediately after opening.\n if (nextOpen && reason === REASONS.triggerFocus) {\n allowTouchToCloseRef.current = false;\n allowTouchToCloseTimeout.start(300, () => {\n allowTouchToCloseRef.current = true;\n });\n } else {\n allowTouchToCloseRef.current = true;\n allowTouchToCloseTimeout.clear();\n }\n const isDismissClose = !nextOpen && (reason === REASONS.escapeKey || reason == null);\n openEventRef.current = eventDetails.event;\n const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n popupOpenState.openChangeReason = reason;\n popupOpenState.keyboardOpen = nextOpen && isKeyboardOpen(reason, nativeEvent);\n if (parent.type === 'menubar' && (reason === REASONS.triggerFocus || reason === REASONS.focusOut || reason === REASONS.triggerHover || reason === REASONS.listNavigation || reason === REASONS.siblingOpen)) {\n popupOpenState.instantType = 'group';\n } else if (isKeyboardClick(reason, nativeEvent)) {\n popupOpenState.instantType = 'click';\n } else if (isDismissClose) {\n popupOpenState.instantType = 'dismiss';\n } else {\n popupOpenState.instantType = undefined;\n }\n\n // `instantType` must land in the same update that mounts the popup subtree: in React 17\n // legacy mode this `update` can flush synchronously, and a separate `instantType` write\n // after it would come too late for an initially open submenu seeding its own store from\n // this one during that flush.\n store.update(popupOpenState);\n });\n const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested: floatingParentNodeIdFromContext != null,\n onOpenChange: setOpen\n });\n const floatingEvents = floatingRootContext.context.events;\n\n // Registered in a layout effect (not a passive one) so `setOpen` emits from imperative\n // `MenuHandle.open()` calls made in the same commit this root mounts — e.g. from another layout\n // effect during a route-transition handoff — are received instead of being silently dropped.\n useIsoLayoutEffect(() => {\n const handleSetOpenEvent = ({\n open: nextOpen,\n eventDetails\n }) => setOpen(nextOpen, eventDetails);\n floatingEvents.on('setOpen', handleSetOpenEvent);\n return () => {\n floatingEvents?.off('setOpen', handleSetOpenEvent);\n };\n }, [floatingEvents, setOpen]);\n useIsoLayoutEffect(() => store.subscribeToParentMenu(), [store]);\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.imperativeAction));\n }, [store]);\n React.useImperativeHandle(actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n let ctx;\n if (parent.type === 'context-menu') {\n ctx = parent.context;\n }\n React.useImperativeHandle(ctx?.positionerRef, () => positionerElement, [positionerElement]);\n React.useImperativeHandle(ctx?.actionsRef, () => ({\n setOpen\n }), [setOpen]);\n const dismiss = useDismiss(floatingRootContext, {\n enabled: !disabled,\n bubbles: {\n escapeKey: closeParentOnEsc && parent.type === 'menu'\n },\n outsidePress() {\n if (parent.type !== 'context-menu' || openEventRef.current?.type === 'contextmenu') {\n return true;\n }\n return allowOutsidePressDismissalRef.current;\n },\n externalTree: nested ? floatingTreeRoot : undefined\n });\n const direction = useDirection();\n const listNavigation = useListNavigation(floatingRootContext, {\n enabled: !disabled,\n listRef: store.context.itemDomElements,\n activeIndex,\n virtual: virtualFocus,\n nested: parent.type === 'menubar' || !virtualFocus && parent.type !== undefined,\n parentOrientation: parent.type === 'menubar' ? parent.context.orientation : undefined,\n loopFocus,\n // Filtered menus keep DOM focus on the input, while keyboard and virtual opens initially\n // highlight an item as ordinary menus do. The input stays in the arrow-key loop unless the\n // filter highlights automatically.\n focusItemOnOpen: virtualFocus ? keyboardOpen : undefined,\n allowEscape: virtualFocus && loopFocus && allowEscape,\n orientation,\n // A virtual-focus list can navigate on either axis, but its trigger always opens on the\n // vertical one.\n triggerOrientation: virtualFocus ? 'vertical' : orientation,\n rtl: direction === 'rtl',\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex, event) {\n store.setActiveIndex(nextActiveIndex, getHighlightReason(event), event?.nativeEvent);\n },\n // A virtual-focus submenu's keyboard opening is orchestrated by its navigation wrapper based\n // on both menus' orientations; the generic arrow-key opening would also react to the parent's\n // forwarded cross-axis keys while closed.\n openOnArrowKeyDown: parent.type !== 'context-menu' && !(virtualFocus && isSubmenu),\n externalTree: !virtualFocus && nested ? floatingTreeRoot : undefined,\n nestedReturnFocusRef: parentMenuStore?.context.virtualFocusRef,\n focusItemOnHover: highlightItemOnHover,\n resetOnPointerLeave\n });\n const onTyping = React.useCallback(nextTyping => {\n store.context.typingRef.current = nextTyping;\n }, [store]);\n const typeahead = useTypeahead(floatingRootContext, {\n // Under virtual focus the input owns typing, so typeahead would race the filter query.\n enabled: !disabled && !virtualFocus,\n listRef: store.context.itemLabels,\n elementsRef: store.context.itemDomElements,\n activeIndex,\n resetMs: TYPEAHEAD_RESET_MS,\n onMatch: (index, event) => {\n if (open && index !== activeIndex) {\n store.setActiveIndex(index, REASONS.keyboard, event.nativeEvent);\n }\n },\n onTyping\n });\n const onItemHighlighted = useStableCallback(onItemHighlightedProp);\n const lastHighlightIndexRef = React.useRef(-1);\n\n // Runs when `activeIndex` commits and again when the item registry settles, since an index\n // can come to point at a different element while its value stays the same.\n const syncHighlightedItem = useStableCallback(() => {\n const index = store.state.activeIndex;\n const item = index === null ? undefined : store.context.itemDomElements.current[index] ?? undefined;\n // An item removed in this commit stays registered until the list flushes, which calls back\n // here with the settled registry.\n if (item?.isConnected === false) {\n return;\n }\n const itemIndex = item === undefined ? -1 : index;\n if (lastHighlightIndexRef.current === itemIndex && store.context.reportedItem === item) {\n return;\n }\n lastHighlightIndexRef.current = itemIndex;\n store.context.reportedItem = item;\n // Only virtual focus renders from the highlighted element. Publishing it in every menu would\n // notify each item's subscription on every highlight change.\n if (virtualFocus) {\n store.set('highlightedItem', item);\n }\n // The tag left by the write that produced this committed value.\n const {\n highlightReason,\n highlightEvent\n } = store.context;\n store.context.highlightReason = REASONS.none;\n store.context.highlightEvent = undefined;\n if (!onItemHighlightedProp) {\n return;\n }\n onItemHighlighted(item, createGenericEventDetails(highlightReason, highlightEvent, {\n label: item === undefined ? undefined : store.context.itemLabels.current[itemIndex] ?? undefined\n }));\n });\n useIsoLayoutEffect(() => {\n syncHighlightedItem();\n }, [activeIndex, syncHighlightedItem]);\n\n // Under virtual focus an element inside the popup holds real focus, so it takes the\n // navigation's reference props (`aria-activedescendant` and the key handling) and the trigger\n // keeps only the props that open the menu.\n const openTriggerProps = React.useMemo(() => {\n if (!virtualFocus) {\n return listNavigation.reference;\n }\n if (!listNavigation.trigger) {\n return EMPTY_OBJECT;\n }\n // Focusing the trigger while the menu is open must not seed the virtual highlight. This can\n // happen before a pointer press closes the menu in Safari.\n const {\n onFocus,\n ...rest\n } = listNavigation.trigger;\n return rest;\n }, [virtualFocus, listNavigation.reference, listNavigation.trigger]);\n store.useSyncedValue('inputProps', virtualFocus ? listNavigation.reference ?? EMPTY_OBJECT : EMPTY_OBJECT);\n const activeTriggerProps = React.useMemo(() => {\n const mergedProps = mergeProps(typeahead.reference, openTriggerProps, dismiss.reference, {\n onMouseMove() {\n store.set('allowMouseEnter', true);\n }\n }, interactionTypeProps);\n mergedProps['aria-haspopup'] = 'menu';\n mergedProps['aria-expanded'] = open;\n return mergedProps;\n }, [store, typeahead.reference, openTriggerProps, dismiss.reference, interactionTypeProps, open]);\n const inactiveTriggerProps = React.useMemo(() => {\n const mergedProps = mergeProps(listNavigation.trigger, dismiss.trigger, interactionTypeProps);\n mergedProps['aria-haspopup'] = 'menu';\n mergedProps['aria-expanded'] = false;\n return mergedProps;\n }, [listNavigation.trigger, dismiss.trigger, interactionTypeProps]);\n\n // The initial render has no store subscribers yet. Seed these props before triggers render so\n // the synchronization effect below doesn't make every trigger render twice in the first commit.\n useRefWithInit(() => {\n store.update({\n inactiveTriggerProps\n });\n return null;\n });\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, {\n onMouseMove() {\n store.set('allowMouseEnter', true);\n if (parent.type === 'menu') {\n store.set('hoverEnabled', false);\n }\n },\n onClick() {\n if (store.select('hoverEnabled')) {\n store.set('hoverEnabled', false);\n }\n },\n onKeyDown(event) {\n // The Menubar's CompositeRoot captures keyboard events via\n // event delegation. This works well when Menu.Root is nested inside Menubar,\n // but with detached triggers we need to manually forward the event to the CompositeRoot.\n const relay = store.select('keyboardEventRelay');\n if (relay && !event.isPropagationStopped()) {\n relay(event);\n }\n }\n }, typeahead.floating, listNavigation.floating, dismiss.floating), [parent.type, store, typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n usePopupInteractionProps(store, {\n floatingRootContext,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n itemProps\n });\n const context = React.useMemo(() => ({\n store,\n parent: parentFromContext,\n orientation,\n loopFocus,\n allowEscape,\n defaultFloatingId,\n setRenderedFloatingId,\n virtualFocus,\n parentVirtualFocus,\n syncHighlightedItem\n }), [store, parentFromContext, orientation, loopFocus, allowEscape, defaultFloatingId, virtualFocus, parentVirtualFocus, syncHighlightedItem]);\n const renderedChildren = typeof children === 'function' ? children({\n payload\n }) : children;\n let content = /*#__PURE__*/_jsxs(MenuRootContext.Provider, {\n value: context,\n children: [handle && /*#__PURE__*/_jsx(PopupHandleAttachment, {\n handle: handle,\n store: store\n }), renderedChildren]\n });\n if (parent.type === undefined || parent.type === 'context-menu') {\n // set up a FloatingTree to provide the context to nested menus\n content = /*#__PURE__*/_jsx(FloatingTree, {\n externalTree: floatingTreeRoot,\n children: content\n });\n }\n return content;\n});\n\n/**\n * Groups all parts of the menu.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRootInternal.displayName = \"MenuRootInternal\";\nexport function MenuRoot(props) {\n const filterProvider = React.useContext(MenuFilterProviderContext);\n if (filterProvider === null) {\n return /*#__PURE__*/_jsx(MenuRootInternal, {\n ...props\n });\n }\n const FilterRoot = filterProvider.Root;\n return (\n /*#__PURE__*/\n // The root consumes its provider so a plain submenu inside doesn't inherit it.\n _jsx(MenuFilterProviderContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(FilterRoot, {\n ...filterProvider.options,\n ...props\n })\n })\n );\n}","'use client';\n\nimport * as React from 'react';\nimport { MenuRootInternal } from \"../root/MenuRoot.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { MenuSubmenuRootContext } from \"./MenuSubmenuRootContext.mjs\";\nimport { MenuFilterProviderContext } from \"../filter-provider/MenuFilterProviderContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport { useMenuSubmenuRootContext } from \"./MenuSubmenuRootContext.mjs\";\nconst EMPTY_SUBMENU_ROOT_CONTEXT = {};\n\n/**\n * Groups all parts of a submenu.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport function MenuSubmenuRoot(props) {\n // Throws when the submenu isn't inside a menu.\n useMenuRootContext();\n const filterProvider = React.useContext(MenuFilterProviderContext);\n if (filterProvider !== null) {\n const FilterSubmenuRoot = filterProvider.SubmenuRoot;\n return /*#__PURE__*/_jsx(MenuFilterProviderContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(FilterSubmenuRoot, {\n ...filterProvider.options,\n ...props\n })\n });\n }\n return /*#__PURE__*/_jsx(MenuSubmenuRootContext.Provider, {\n value: EMPTY_SUBMENU_ROOT_CONTEXT,\n children: /*#__PURE__*/_jsx(MenuRootInternal, {\n ...props,\n isSubmenu: true\n })\n });\n}","import { getParentNode, isHTMLElement, isLastTraversableNode } from '@floating-ui/utils/dom';\nexport function findRootOwnerId(node) {\n if (isHTMLElement(node) && node.hasAttribute('data-rootownerid')) {\n return node.getAttribute('data-rootownerid');\n }\n if (isLastTraversableNode(node)) {\n return undefined;\n }\n return findRootOwnerId(getParentNode(node));\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\n/**\n * Returns `click` and `mousedown` handlers that fix the behavior of triggers of popups that are toggled by different events.\n * For example, a button that opens a popup on mousedown and closes it on click.\n * This hook prevents the popup from closing immediately after the mouse button is released.\n */\nexport function useMixedToggleClickHandler(params) {\n const {\n enabled = true,\n mouseDownAction,\n open\n } = params;\n const ignoreClickRef = React.useRef(false);\n return React.useMemo(() => {\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n return {\n onMouseDown: event => {\n if (mouseDownAction === 'open' && !open || mouseDownAction === 'close' && open) {\n ignoreClickRef.current = true;\n ownerDocument(event.currentTarget).addEventListener('click', () => {\n ignoreClickRef.current = false;\n }, {\n once: true\n });\n }\n },\n onClick: event => {\n if (ignoreClickRef.current) {\n ignoreClickRef.current = false;\n event.preventBaseUIHandler();\n }\n }\n };\n }, [enabled, mouseDownAction, open]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { fastComponentRef } from '@base-ui/utils/fastHooks';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { safePolygon, useClick, useFloatingTree, useFocus, useHoverReferenceInteraction, useFloatingNodeId, useFloatingParentNodeId } from \"../../floating-ui-react/index.mjs\";\nimport { FloatingTreeStore } from \"../../floating-ui-react/components/FloatingTreeStore.mjs\";\nimport { contains } from \"../../floating-ui-react/utils.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/useButton.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { CompositeItem } from \"../../internals/composite/item/CompositeItem.mjs\";\nimport { useCompositeRootContext } from \"../../internals/composite/root/CompositeRootContext.mjs\";\nimport { findRootOwnerId } from \"../utils/findRootOwnerId.mjs\";\nimport { usePopupHandleStore, useTriggerDataForwarding } from \"../../utils/popups/index.mjs\";\nimport { useTriggerFocusGuards } from \"../../utils/popups/useTriggerFocusGuards.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useMixedToggleClickHandler } from \"../../utils/useMixedToggleClickHandler.mjs\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.mjs\";\nimport { PATIENT_CLICK_THRESHOLD } from \"../../internals/constants.mjs\";\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\n\n/**\n * A button that opens the menu.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuTrigger = fastComponentRef(function MenuTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled: disabledProp = false,\n nativeButton = true,\n id: idProp,\n openOnHover: openOnHoverProp,\n delay = 100,\n closeDelay = 0,\n handle,\n payload,\n ...elementProps\n } = componentProps;\n const rootContext = useMenuRootContext(true);\n const handleStore = usePopupHandleStore(handle);\n const store = handleStore ?? rootContext?.store;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.' : _formatErrorMessage(85));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const isTriggerActive = store.useState('isTriggerActive', thisTriggerId);\n const floatingRootContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const controlsId = store.useState('triggerControlsId', thisTriggerId);\n const triggerElementRef = React.useRef(null);\n const parent = useMenuParent();\n const compositeRootContext = useCompositeRootContext(true);\n const floatingTreeRootFromContext = useFloatingTree();\n const floatingTreeRoot = React.useMemo(() => {\n return floatingTreeRootFromContext ?? new FloatingTreeStore();\n }, [floatingTreeRootFromContext]);\n const floatingNodeId = useFloatingNodeId(floatingTreeRoot);\n const floatingParentNodeId = useFloatingParentNodeId();\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {\n payload,\n closeDelay,\n parent,\n floatingTreeRoot,\n floatingNodeId,\n floatingParentNodeId,\n keyboardEventRelay: compositeRootContext?.relayKeyboardEvent\n });\n const isInMenubar = parent.type === 'menubar';\n const rootDisabled = store.useState('disabled');\n const disabled = disabledProp || rootDisabled || isInMenubar && parent.context.disabled;\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n React.useEffect(() => {\n if (!isOpenedByThisTrigger && parent.type === undefined) {\n store.context.allowMouseUpTriggerRef.current = false;\n }\n }, [store, isOpenedByThisTrigger, parent.type]);\n const triggerRef = React.useRef(null);\n const allowMouseUpTriggerTimeout = useTimeout();\n const handleDocumentMouseUp = useStableCallback(mouseEvent => {\n if (!triggerRef.current) {\n return;\n }\n allowMouseUpTriggerTimeout.clear();\n store.context.allowMouseUpTriggerRef.current = false;\n const mouseUpTarget = mouseEvent.target;\n if (contains(triggerRef.current, mouseUpTarget) || contains(store.select('positionerElement'), mouseUpTarget) || mouseUpTarget === triggerRef.current) {\n return;\n }\n if (mouseUpTarget != null && findRootOwnerId(mouseUpTarget) === store.select('rootId')) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, triggerRef.current)) {\n return;\n }\n floatingTreeRoot.events.emit('close', {\n domEvent: mouseEvent,\n reason: REASONS.cancelOpen\n });\n });\n React.useEffect(() => {\n const doc = ownerDocument(triggerRef.current);\n if (isOpenedByThisTrigger && store.select('lastOpenChangeReason') === REASONS.triggerHover) {\n doc.addEventListener('mouseup', handleDocumentMouseUp, {\n once: true\n });\n return () => {\n doc.removeEventListener('mouseup', handleDocumentMouseUp);\n };\n }\n return undefined;\n }, [isOpenedByThisTrigger, handleDocumentMouseUp, store]);\n const parentMenubarHasSubmenuOpen = isInMenubar && parent.context.hasSubmenuOpen;\n const openOnHover = openOnHoverProp ?? parentMenubarHasSubmenuOpen;\n const hoverProps = useHoverReferenceInteraction(floatingRootContext, {\n enabled: openOnHover && !disabled && (!isInMenubar || parentMenubarHasSubmenuOpen && !isMountedByThisTrigger),\n handleClose: safePolygon({\n blockPointerEvents: !isInMenubar\n }),\n mouseOnly: true,\n move: false,\n restMs: parent.type === undefined ? delay : undefined,\n delay: {\n close: closeDelay\n },\n triggerElementRef,\n externalTree: floatingTreeRoot,\n isActiveTrigger: isTriggerActive,\n isClosing: () => store.select('transitionStatus') === 'ending'\n });\n\n // Whether to ignore clicks to open the menu.\n // `lastOpenChangeReason` doesn't need to be reactive here, as we need to run this\n // only when `isOpenedByThisTrigger` changes.\n const stickIfOpen = useStickIfOpen(isOpenedByThisTrigger, store.select('lastOpenChangeReason'));\n const click = useClick(floatingRootContext, {\n enabled: !disabled,\n event: isOpenedByThisTrigger && isInMenubar ? 'click' : 'mousedown',\n toggle: true,\n ignoreMouse: false,\n stickIfOpen: parent.type === undefined ? stickIfOpen : false\n });\n const focus = useFocus(floatingRootContext, {\n enabled: !disabled && parentMenubarHasSubmenuOpen\n });\n const mixedToggleHandlers = useMixedToggleClickHandler({\n open: isOpenedByThisTrigger,\n enabled: isInMenubar,\n mouseDownAction: 'open'\n });\n const localInteractionProps = React.useMemo(() => mergeProps(focus.reference, click.reference), [focus.reference, click.reference]);\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n // A filterable menu keeps real focus inside its popup and publishes what its trigger needs.\n const filterTriggerProps = store.useState('filterTriggerProps');\n const {\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n } = useTriggerFocusGuards(store, triggerElementRef);\n const state = {\n disabled,\n open: isOpenedByThisTrigger\n };\n const ref = [triggerRef, forwardedRef, buttonRef, registerTrigger, triggerElementRef];\n const props = [localInteractionProps, hoverProps ?? EMPTY_OBJECT, rootTriggerProps, {\n 'aria-haspopup': 'menu',\n 'aria-controls': controlsId,\n id: thisTriggerId,\n onMouseDown: event => {\n if (store.select('open')) {\n return;\n }\n\n // mousedown -> mouseup on menu item should not trigger it within 200ms.\n allowMouseUpTriggerTimeout.start(200, () => {\n store.context.allowMouseUpTriggerRef.current = true;\n });\n const doc = ownerDocument(event.currentTarget);\n doc.addEventListener('mouseup', handleDocumentMouseUp, {\n once: true\n });\n }\n }, filterTriggerProps, isInMenubar ? {\n role: 'menuitem'\n } : {}, mixedToggleHandlers, elementProps, getButtonProps];\n const element = useRenderElement('button', componentProps, {\n enabled: !isInMenubar,\n stateAttributesMapping: pressableTriggerOpenStateMapping,\n state,\n ref,\n props\n });\n if (isInMenubar) {\n return /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"button\",\n render: render,\n className: className,\n style: style,\n state: state,\n refs: ref,\n props: props,\n stateAttributesMapping: pressableTriggerOpenStateMapping\n });\n }\n\n // A fragment with key is required to ensure that the `element` is mounted to the same DOM node\n // regardless of whether the focus guards are rendered or not.\n\n if (isOpenedByThisTrigger) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.beforeTriggerFocusGuardRef,\n onFocus: handlePreFocusGuardFocus\n }, `${thisTriggerId}-pre-focus-guard`), /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId), /*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.triggerFocusTargetRef,\n onFocus: handleFocusTargetFocus\n }, `${thisTriggerId}-post-focus-guard`)]\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId);\n});\nif (process.env.NODE_ENV !== \"production\") MenuTrigger.displayName = \"MenuTrigger\";\n/**\n * Determines whether to ignore clicks after a hover-open.\n */\nfunction useStickIfOpen(open, openReason) {\n const stickIfOpenTimeout = useTimeout();\n const [stickIfOpen, setStickIfOpen] = React.useState(false);\n useIsoLayoutEffect(() => {\n if (open && openReason === REASONS.triggerHover) {\n // Only allow \"patient\" clicks to close the menu if it's open.\n // If they clicked within 500ms of the menu opening, keep it open.\n setStickIfOpen(true);\n stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n setStickIfOpen(false);\n });\n } else if (!open) {\n stickIfOpenTimeout.clear();\n setStickIfOpen(false);\n }\n }, [open, openReason, stickIfOpenTimeout]);\n return stickIfOpen;\n}\nfunction useMenuParent() {\n const menubarContext = useMenubarContext(true);\n const parent = React.useMemo(() => {\n if (menubarContext) {\n return {\n type: 'menubar',\n context: menubarContext\n };\n }\n return {\n type: undefined\n };\n }, [menubarContext]);\n return parent;\n}","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\n\n/**\n * A separator element accessible to screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)\n */\nexport const Separator = /*#__PURE__*/React.forwardRef(function SeparatorComponent(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'separator',\n 'aria-orientation': orientation\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") Separator.displayName = \"Separator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { warn } from '@base-ui/utils/warn';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { getTarget } from '@base-ui/utils/shadowDom';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { safePolygon, useClick, useHoverReferenceInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useMenuPositionerContext } from \"../positioner/MenuPositionerContext.mjs\";\nimport { useTriggerRegistration } from \"../../utils/popups/index.mjs\";\nimport { useMenuSubmenuRootContext } from \"../submenu-root/MenuSubmenuRootContext.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst VOICE_OVER_EXPANDED_PROPS = {\n 'aria-expanded': undefined\n};\nconst MenuSubmenuTriggerPlain = /*#__PURE__*/React.forwardRef(function MenuSubmenuTriggerPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n label,\n id: idProp,\n nativeButton = false,\n openOnHover = true,\n delay = 100,\n closeDelay = 0,\n disabled: disabledProp = false,\n ...elementProps\n } = componentProps;\n const context = useMenuRootContext(true);\n if (context?.parent.type !== 'menu') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.' : _formatErrorMessage(37));\n }\n const menuPositionerContext = useMenuPositionerContext();\n const submenuRootContext = useMenuSubmenuRootContext();\n const {\n store,\n parentVirtualFocus\n } = context;\n const parentMenuStore = context.parent.store;\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const thisTriggerId = useBaseUiId(idProp);\n const open = store.useState('open');\n const focusReturnedThroughGuardRef = React.useRef(false);\n const positionerElement = store.useState('positionerElement');\n const floatingRootContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const popupId = store.useState('triggerPopupId', thisTriggerId);\n const baseRegisterTrigger = useTriggerRegistration(thisTriggerId, store);\n\n // Stable, so the merged ref on the rendered element keeps its identity for the trigger's whole\n // lifetime; the latest `closeDelay` is read when it runs.\n const registerTrigger = useStableCallback(element => {\n baseRegisterTrigger(element);\n const activeTriggerElement = store.select('activeTriggerElement');\n if (element !== null && store.select('open') && (activeTriggerElement === element || store.select('activeTriggerId') == null)) {\n store.update({\n activeTriggerId: thisTriggerId ?? null,\n activeTriggerElement: element,\n closeDelay\n });\n }\n });\n const triggerElementRef = React.useRef(null);\n const handleTriggerElementRef = React.useCallback(el => {\n triggerElementRef.current = el;\n store.set('activeTriggerElement', el);\n }, [store]);\n\n // A stable ref does not re-fire when the id changes, so register the rendered element here\n // instead. On React 17 the id also starts out `undefined`, so this is what registers the trigger\n // at all.\n useIsoLayoutEffect(() => {\n registerTrigger(triggerElementRef.current);\n return () => registerTrigger(null);\n }, [registerTrigger, thisTriggerId, store]);\n useIsoLayoutEffect(() => {\n if (!open || !positionerElement) {\n return undefined;\n }\n function handleGuardFocusOut(event) {\n if (getTarget(event) === store.context.beforeContentFocusGuardRef.current) {\n focusReturnedThroughGuardRef.current = event.relatedTarget === triggerElementRef.current;\n }\n }\n\n // Observe focus leaving the guard inside its positioner. When the portal is in a shadow root,\n // the trigger's focus event can report the shadow host as `relatedTarget`, not the guard.\n positionerElement.addEventListener('focusout', handleGuardFocusOut, true);\n return () => {\n focusReturnedThroughGuardRef.current = false;\n positionerElement.removeEventListener('focusout', handleGuardFocusOut, true);\n };\n }, [open, positionerElement, store]);\n store.useSyncedValue('closeDelay', closeDelay);\n const rootDisabled = store.useState('disabled');\n const parentDisabled = parentMenuStore.useState('disabled');\n const disabled = disabledProp || rootDisabled || parentDisabled;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n const element = triggerElementRef.current;\n if (element && isElementDisabled(element) && !disabled) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \\`disabled\\` prop on the component instead of setting it on the rendered element.${ownerStackMessage}`);\n }\n });\n }\n const itemProps = parentMenuStore.useState('itemProps');\n const highlighted = parentMenuStore.useState('isActive', listItem.index);\n const itemMetadata = React.useMemo(() => ({\n type: 'submenu-trigger',\n setActive(event) {\n if (parentMenuStore.select('highlightItemOnHover')) {\n parentMenuStore.setActiveIndex(listItem.index, REASONS.pointer, event);\n }\n }\n }), [parentMenuStore, listItem.index]);\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick: false,\n disabled,\n highlighted,\n id: thisTriggerId,\n store,\n typingRef: parentMenuStore.context.typingRef,\n nativeButton,\n itemMetadata,\n nodeId: menuPositionerContext?.context.nodeId\n });\n const hoverEnabled = store.useState('hoverEnabled');\n const hoverProps = useHoverReferenceInteraction(floatingRootContext, {\n enabled: hoverEnabled && openOnHover && !disabled,\n handleClose: safePolygon({\n blockPointerEvents: true\n }),\n mouseOnly: true,\n move: true,\n restMs: delay,\n delay: {\n open: delay,\n close: closeDelay\n },\n shouldOpen: delay > 0 ? () => parentMenuStore.select('allowMouseEnter') : undefined,\n triggerElementRef,\n externalTree: floatingTreeRoot,\n isClosing: () => store.select('transitionStatus') === 'ending',\n // Chrome can drop the trigger's `mouseleave` during a fast pointer sweep,\n // leaving a stale submenu open (see #5152) — cancel from `mouseout` too.\n guardStaleOpen: true\n });\n const click = useClick(floatingRootContext, {\n enabled: !disabled,\n event: 'mousedown',\n // Without toggling, TalkBack users cannot close the submenu to reach the next parent menu\n // item: moving the virtual cursor outside does not close it, and moving forward again\n // re-enters the still-open submenu. Keep toggling enabled so activating its trigger closes it.\n // Toggling applies to touch and keyboard activation. In hover mode, mouse presses are\n // ignored and the first activation after hover-opening keeps the submenu open.\n toggle: true,\n ignoreMouse: openOnHover,\n stickIfOpen: openOnHover\n });\n const localInteractionProps = click.reference ?? EMPTY_OBJECT;\n const rootTriggerProps = store.useState('triggerProps', true);\n delete rootTriggerProps.id;\n const state = {\n disabled,\n highlighted,\n open\n };\n const openMethod = store.useState('openMethod');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n // Arrow keys open the submenu through list navigation without dispatching a click, so\n // `openMethod` stays null there; Enter and Space do dispatch one and report `keyboard`.\n const openedByKeyboard = lastOpenChangeReason === REASONS.listNavigation || openMethod === 'keyboard';\n const shouldOmitExpanded = open && openedByKeyboard && platform.screenReader.voiceOver;\n const submenuKeyDownProps = submenuRootContext?.onTriggerKeyDown ? {\n onKeyDown: submenuRootContext.onTriggerKeyDown\n } : undefined;\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: triggerOpenStateMapping,\n props: [localInteractionProps, hoverProps, rootTriggerProps,\n // MenuFilterSubmenuRoot overrides the generic trigger handler because entry and exit\n // depend on both the parent and child menu orientations.\n submenuKeyDownProps, itemProps,\n // Opening a submenu changes the trigger's expanded state while the trigger still holds\n // focus, and VoiceOver announces that state change instead of the submenu item that focus\n // moves to a moment later, so the first item is never announced. Dropping the state while\n // the submenu is open avoids the announcement without claiming the submenu is collapsed;\n // `aria-haspopup` still conveys that the item opens a submenu.\n shouldOmitExpanded ? VOICE_OVER_EXPANDED_PROPS : undefined, {\n 'aria-controls': popupId,\n // A virtually focused parent keeps real focus on its input, so the trigger must stay out\n // of the tab order.\n tabIndex: parentVirtualFocus || !(open || highlighted) ? -1 : 0,\n onFocus(event) {\n // Close when focus returns through the submenu's guard to its trigger. This also lets\n // screen reader users move past the trigger in the parent menu. Direct focus from a\n // submenu item, such as on hover, leaves the submenu open.\n if (store.select('open') && focusReturnedThroughGuardRef.current) {\n focusReturnedThroughGuardRef.current = false;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n },\n onBlur() {\n if (highlighted) {\n parentMenuStore.setActiveIndex(null, REASONS.none);\n }\n }\n }, elementProps,\n // `getItemProps` stays last so `useButton` keeps gating consumer handlers while disabled.\n getItemProps],\n ref: [forwardedRef, listItem.ref, itemRef, registerTrigger, handleTriggerElementRef]\n });\n return element;\n});\n\n/**\n * A menu item that opens a submenu.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuTriggerPlain.displayName = \"MenuSubmenuTriggerPlain\";\nexport const MenuSubmenuTrigger = /*#__PURE__*/React.forwardRef(function MenuSubmenuTrigger(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef, 'submenu-trigger');\n if (!filterItem.visible) {\n return null;\n }\n const mergedProps = filterItem.props ? mergeProps(filterItem.props, props) : props;\n return /*#__PURE__*/_jsx(MenuSubmenuTriggerPlain, {\n ...mergedProps,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuTrigger.displayName = \"MenuSubmenuTrigger\";","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu'\n\nimport IconProvider from '@/components/atoms/IconProvider'\nimport { cn } from '@/lib/utils'\n\n// Same open/close motion as the tooltip: 200ms fade and grow from 75%, anchored to the trigger side.\nconst dropdownPanelVariants = cva(\n 'flex max-h-[min(25rem,var(--available-height))] flex-col gap-space-2 overflow-y-auto rounded-container border border-border-subtle bg-background-overlay p-space-6 text-text-primary shadow-elevation-2 outline-none transition-[opacity,scale,translate] duration-200 ease-out data-[instant]:transition-none data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n {\n variants: {\n // select: wide list under its trigger, so it fades in with a slight slide from the trigger side, not a corner grow.\n motion: {\n menu: 'origin-[var(--transform-origin)] data-[starting-style]:scale-75 data-[ending-style]:scale-75',\n select:\n 'duration-100 origin-[var(--transform-origin)] data-[starting-style]:scale-95 data-[ending-style]:scale-95 data-[side=bottom]:data-[starting-style]:-translate-y-2 data-[side=bottom]:data-[ending-style]:-translate-y-2 data-[side=top]:data-[starting-style]:translate-y-2 data-[side=top]:data-[ending-style]:translate-y-2',\n },\n width: {\n sm: 'w-44',\n default: 'w-60',\n lg: 'w-80',\n trigger: 'w-(--anchor-width)',\n },\n },\n defaultVariants: {\n motion: 'menu',\n width: 'default',\n },\n },\n)\n\nconst dropdownItemVariants = cva(\n [\n 'group/item flex min-h-8 w-full shrink-0 cursor-pointer items-center gap-space-8 rounded-sm px-space-8 py-space-6 text-left font-lab text-body-md outline-none select-none',\n 'data-highlighted:bg-background-item-hover data-selected:bg-background-brand data-selected:text-text-brand',\n 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n ],\n {\n variants: {\n tone: {\n default: 'text-text-primary',\n destructive: 'text-text-destructive data-highlighted:bg-status-background-error',\n },\n },\n defaultVariants: {\n tone: 'default',\n },\n },\n)\n\nconst dropdownLabelVariants = cva(\n 'flex items-center px-space-8 py-space-6 font-lab text-label-sm text-text-secondary',\n {\n variants: {\n caps: {\n true: 'border-b border-border-subtle uppercase',\n false: '',\n },\n },\n defaultVariants: {\n caps: false,\n },\n },\n)\n\nconst dropdownSeparatorVariants = cva('my-space-4 h-px shrink-0 border-0 bg-border-subtle')\n\n// Scroll preset clips the rows, not the panel, so header and footer stay put; 8 rows plus 7 gaps.\nconst dropdownListVariants = cva('flex max-h-[16.875rem] flex-col gap-space-2 overflow-y-auto outline-none')\n\nconst DropdownMenu = MenuPrimitive.Root\n\nfunction DropdownMenuTrigger(props: MenuPrimitive.Trigger.Props) {\n return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\ntype DropdownMenuContentProps = MenuPrimitive.Popup.Props &\n VariantProps<typeof dropdownPanelVariants> &\n Pick<\n MenuPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'anchor' | 'collisionAvoidance' | 'side' | 'sideOffset'\n > & {\n container?: MenuPrimitive.Portal.Props['container']\n positionerClassName?: string\n // Keeps rows mounted while closed, for items that own a dialog or drawer which must outlive the menu.\n keepMounted?: boolean\n }\n\nfunction DropdownMenuContent({\n align = 'start',\n alignOffset,\n anchor,\n className,\n collisionAvoidance,\n container,\n keepMounted,\n motion,\n positionerClassName,\n side,\n sideOffset = 4,\n width,\n ...props\n}: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal container={container} keepMounted={keepMounted}>\n <MenuPrimitive.Positioner\n data-slot=\"dropdown-menu-positioner\"\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n collisionAvoidance={collisionAvoidance}\n side={side}\n sideOffset={sideOffset}\n className={cn('isolate z-[1600] outline-none', positionerClassName)}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(dropdownPanelVariants({ motion, width }), className)}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n )\n}\n\ntype DropdownMenuItemProps = MenuPrimitive.Item.Props & VariantProps<typeof dropdownItemVariants>\n\nfunction DropdownMenuItem({ className, tone, ...props }: DropdownMenuItemProps) {\n return (\n <MenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n className={cn(dropdownItemVariants({ tone }), className)}\n {...props}\n />\n )\n}\n\ntype DropdownMenuItemTextProps = React.ComponentProps<'span'> & {\n description?: React.ReactNode\n}\n\nfunction DropdownMenuItemText({ children, className, description, ...props }: DropdownMenuItemTextProps) {\n return (\n <span data-slot=\"dropdown-menu-item-text\" className={cn('flex min-w-0 flex-1 flex-col', className)} {...props}>\n <span className=\"truncate\">{children}</span>\n {description ? <span className=\"truncate font-lab text-body-sm text-text-secondary\">{description}</span> : null}\n </span>\n )\n}\n\ntype DropdownMenuShortcutProps = React.ComponentProps<'span'> & {\n keys: string[]\n}\n\nfunction DropdownMenuShortcut({ className, keys, ...props }: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto flex shrink-0 items-center gap-space-4 font-lab text-label-sm text-text-secondary',\n className,\n )}\n {...props}\n >\n {keys.map((key, index) => (\n <React.Fragment key={`${key}-${index}`}>\n {index > 0 ? <span aria-hidden=\"true\">+</span> : null}\n <kbd className=\"flex h-5 min-w-5 items-center justify-center rounded-md border border-border-default px-space-4 font-[inherit]\">\n {key}\n </kbd>\n </React.Fragment>\n ))}\n </span>\n )\n}\n\ntype DropdownMenuCheckboxItemProps = MenuPrimitive.CheckboxItem.Props\n\nfunction DropdownMenuCheckboxItem({ children, className, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(dropdownItemVariants(), className)}\n {...props}\n >\n <span className=\"flex size-4 shrink-0 items-center justify-center rounded-sm border border-border-default bg-background-input group-data-checked/item:border-border-brand-bold group-data-checked/item:bg-background-brand-bold\">\n <MenuPrimitive.CheckboxItemIndicator className=\"flex text-icon-on-bold\">\n <IconProvider icon=\"check\" size=\"12\" />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup(props: MenuPrimitive.RadioGroup.Props) {\n return <MenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\ntype DropdownMenuRadioItemProps = MenuPrimitive.RadioItem.Props\n\nfunction DropdownMenuRadioItem({ children, className, ...props }: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(dropdownItemVariants(), className)}\n {...props}\n >\n <span className=\"flex size-4 shrink-0 items-center justify-center rounded-pill border border-border-default bg-background-input group-data-checked/item:border-border-brand-bold\">\n <MenuPrimitive.RadioItemIndicator className=\"size-2 rounded-pill bg-background-brand-bold\" />\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n )\n}\n\ntype DropdownMenuListProps = React.ComponentProps<'div'>\n\nfunction DropdownMenuList({ className, ...props }: DropdownMenuListProps) {\n return <div data-slot=\"dropdown-menu-list\" className={cn(dropdownListVariants(), className)} {...props} />\n}\n\nfunction DropdownMenuGroup({ className, ...props }: MenuPrimitive.Group.Props) {\n return (\n <MenuPrimitive.Group\n data-slot=\"dropdown-menu-group\"\n className={cn('flex flex-col gap-space-2', className)}\n {...props}\n />\n )\n}\n\ntype DropdownMenuLabelProps = MenuPrimitive.GroupLabel.Props & VariantProps<typeof dropdownLabelVariants>\n\nfunction DropdownMenuLabel({ caps, className, ...props }: DropdownMenuLabelProps) {\n return (\n <MenuPrimitive.GroupLabel\n data-slot=\"dropdown-menu-label\"\n className={cn(dropdownLabelVariants({ caps }), className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {\n return (\n <MenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(dropdownSeparatorVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dropdown-menu-header\"\n className={cn(\n 'mb-space-4 box-content flex min-h-6 shrink-0 items-center gap-space-4 border-b border-border-subtle pb-space-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dropdown-menu-footer\"\n className={cn(\n 'mt-space-4 flex shrink-0 items-center gap-space-4 border-t border-border-subtle px-space-8 pt-space-4 pb-space-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst DropdownMenuSub = MenuPrimitive.SubmenuRoot\n\ntype DropdownMenuSubTriggerProps = MenuPrimitive.SubmenuTrigger.Props\n\nfunction DropdownMenuSubTrigger({ children, className, ...props }: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(dropdownItemVariants(), 'data-popup-open:bg-background-item-hover', className)}\n {...props}\n >\n {children}\n <IconProvider icon=\"chevron-right\" size=\"16\" className=\"ml-auto text-icon-secondary\" />\n </MenuPrimitive.SubmenuTrigger>\n )\n}\n\nexport {\n dropdownItemVariants,\n dropdownLabelVariants,\n dropdownListVariants,\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuFooter,\n DropdownMenuGroup,\n DropdownMenuHeader,\n DropdownMenuItem,\n DropdownMenuItemText,\n DropdownMenuLabel,\n DropdownMenuList,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n dropdownPanelVariants,\n dropdownSeparatorVariants,\n}\nexport type {\n DropdownMenuCheckboxItemProps,\n DropdownMenuContentProps,\n DropdownMenuItemProps,\n DropdownMenuItemTextProps,\n DropdownMenuLabelProps,\n DropdownMenuListProps,\n DropdownMenuRadioItemProps,\n DropdownMenuShortcutProps,\n DropdownMenuSubTriggerProps,\n}\n"],"names":["platform.engine.webkit","item","REASONS.listNavigation","REASONS.focusOut","index","startIndex","REASONS.none","REASONS.keyboard","REASONS.pointer","ownerWindow","platform.env.jsdom","_formatErrorMessage","REASONS.itemPress","platform.os.mac","MenuCheckboxItemDataAttributes.checked","MenuCheckboxItemDataAttributes.unchecked","MenuCheckboxItemPlain","checked","_jsx","MenuCheckboxItem","MenuCheckboxItemIndicator","MenuGroupPlain","MenuGroup","MenuGroupLabel","MenuItemPlain","MenuItem","MenuPopupPlain","_a","REASONS.outsidePress","MenuPopup","MenuPortal","MenuPositioner","REASONS.siblingOpen","REASONS.triggerHover","_jsxs","MenuRadioGroupPlain","MenuRadioGroup","MenuRadioItemPlain","MenuRadioItem","MenuRadioItemIndicator","REASONS.triggerPress","MenuRootInternal","REASONS.triggerFocus","REASONS.escapeKey","REASONS.imperativeAction","listNavigation","MenuTrigger","REASONS.cancelOpen","MenuSubmenuTriggerPlain","element","platform.screenReader.voiceOver","MenuSubmenuTrigger","MenuPrimitive.Root","MenuPrimitive.Trigger","MenuPrimitive.Portal","MenuPrimitive.Positioner","cn","MenuPrimitive.Popup","MenuPrimitive.Item","MenuPrimitive.CheckboxItem","MenuPrimitive.CheckboxItemIndicator","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.RadioItemIndicator","MenuPrimitive.Group","MenuPrimitive.GroupLabel","MenuPrimitive.Separator","MenuPrimitive.SubmenuRoot","MenuPrimitive.SubmenuTrigger"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,0BAA0B,OAAO;AACxC,SAAOA,UAA0B,MAAM,cAAc,KAAK,MAAM,cAAc;AAChF;AACA,SAAS,SAAS,aAAa,UAAU,YAAY;AACnD,UAAQ,aAAW;AAAA,IACjB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,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;AAGV;AAEA,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAwC;AACrF,SACE;AAAA,IAACU;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWV,WAAG,0BAAA,GAA6B,SAAS;AAAA,MACnD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAsC;AAChF,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWA;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAsC;AAChF,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWA;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAM,kBAAkBW;AAIxB,SAAS,uBAAuB,EAAE,UAAU,WAAW,GAAG,SAAsC;AAC9F,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWZ,WAAG,wBAAwB,4CAA4C,SAAS;AAAA,MAC1F,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA;AAAA,4BACA,cAAA,EAAa,MAAK,iBAAgB,MAAK,MAAK,WAAU,8BAAA,CAA8B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3F;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]}
|
|
1
|
+
{"version":3,"file":"DropdownMenu-B_tIHJUl.js","sources":["../node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs","../node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs","../node_modules/@base-ui/react/utils/getHighlightReason.mjs","../node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs","../node_modules/@base-ui/react/menu/positioner/MenuPositionerContext.mjs","../node_modules/@base-ui/react/menu/root/MenuRootContext.mjs","../node_modules/@base-ui/react/context-menu/root/ContextMenuRootContext.mjs","../node_modules/@base-ui/react/menu/filter-root/MenuFilterContext.mjs","../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemContext.mjs","../node_modules/@base-ui/react/menu/item/useMenuItemCommonProps.mjs","../node_modules/@base-ui/react/menu/item/useMenuItem.mjs","../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemDataAttributes.mjs","../node_modules/@base-ui/react/menu/utils/stateAttributesMapping.mjs","../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItem.mjs","../node_modules/@base-ui/react/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.mjs","../node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs","../node_modules/@base-ui/react/menu/group/MenuGroup.mjs","../node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs","../node_modules/@base-ui/react/menu/item/MenuItem.mjs","../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRootContext.mjs","../node_modules/@base-ui/react/internals/resolveRenderedId.mjs","../node_modules/@base-ui/react/internals/resolvePopupLabel.mjs","../node_modules/@base-ui/react/menu/popup/MenuPopup.mjs","../node_modules/@base-ui/react/menu/portal/MenuPortalContext.mjs","../node_modules/@base-ui/react/menu/portal/MenuPortal.mjs","../node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs","../node_modules/@base-ui/react/menu/radio-group/MenuRadioGroupContext.mjs","../node_modules/@base-ui/react/menu/radio-group/MenuRadioGroup.mjs","../node_modules/@base-ui/react/menu/radio-item/MenuRadioItemContext.mjs","../node_modules/@base-ui/react/menu/radio-item/MenuRadioItem.mjs","../node_modules/@base-ui/react/menu/radio-item-indicator/MenuRadioItemIndicator.mjs","../node_modules/@base-ui/react/menubar/MenubarContext.mjs","../node_modules/@base-ui/react/menu/store/MenuStore.mjs","../node_modules/@base-ui/react/menu/filter-provider/MenuFilterProviderContext.mjs","../node_modules/@base-ui/react/menu/utils/isKeyboardOpen.mjs","../node_modules/@base-ui/react/menu/root/MenuRoot.mjs","../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRoot.mjs","../node_modules/@base-ui/react/menu/utils/findRootOwnerId.mjs","../node_modules/@base-ui/react/utils/useMixedToggleClickHandler.mjs","../node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs","../node_modules/@base-ui/react/separator/Separator.mjs","../node_modules/@base-ui/react/menu/submenu-trigger/MenuSubmenuTrigger.mjs","../src/components/atoms/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { platform } from '@base-ui/utils/platform';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { getMaxListIndex, getMinListIndex, getNextListIndex, isIndexOutOfListBounds } from \"../utils/composite.mjs\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"../utils/constants.mjs\";\nimport { activeElement, contains, getFloatingFocusElement, getTarget, isTypeableCombobox, isTypeableElement } from \"../utils/element.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\n\n// WebKit fires zero-delta `mousemove`/`pointermove` events when the list scrolls\n// beneath a stationary pointer, moving the highlight during keyboard navigation.\n// https://github.com/mui/base-ui/issues/4002\nfunction isStationaryWebKitPointer(event) {\n return platform.engine.webkit && event.movementX === 0 && event.movementY === 0;\n}\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nexport function isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nexport function isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nexport function isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nexport function isCrossOrientationCloseKey(key, orientation, rtl, grid) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && grid) {\n return key === 'Escape';\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nexport function useListNavigation(store, props) {\n const {\n listRef,\n activeIndex,\n onNavigate: onNavigateProp = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loopFocus = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n triggerOrientation = orientation,\n parentOrientation,\n id,\n resetOnPointerLeave = true,\n externalTree,\n nestedReturnFocusRef,\n grid: navigateGrid\n } = props;\n const isGrid = navigateGrid != null;\n if (process.env.NODE_ENV !== 'production') {\n if (allowEscape) {\n if (!loopFocus) {\n console.warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n console.warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && isGrid) {\n console.warn('In grid list navigation mode, the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const dataRef = store.context.dataRef;\n const floatingFocusElement = getFloatingFocusElement(floatingElement);\n const typeableComboboxReference = isTypeableCombobox(domReferenceElement);\n const floatingFocusElementRef = useValueAsRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree(externalTree);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex ?? -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const onNavigate = useStableCallback(event => {\n onNavigateProp(indexRef.current === -1 ? null : indexRef.current, event);\n });\n const previousMountedRef = React.useRef(!!floatingElement);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const cancelQueuedFocusRef = React.useRef(null);\n const disabledIndicesRef = useValueAsRef(disabledIndices);\n const latestOpenRef = useValueAsRef(open);\n const selectedIndexRef = useValueAsRef(selectedIndex);\n const resetOnPointerLeaveRef = useValueAsRef(resetOnPointerLeave);\n const focusFrame = useAnimationFrame();\n const waitForListPopulatedFrame = useAnimationFrame();\n const focusItem = useStableCallback(() => {\n // Synchronous navigation must also supersede any deferred focus from an earlier update.\n focusFrame.cancel();\n function runFocus(item) {\n if (!virtual) {\n cancelQueuedFocusRef.current = enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? callback => callback() : callback => focusFrame.request(callback);\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) {\n return;\n }\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const shouldScrollIntoView =\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView?.({\n block: 'nearest',\n inline: 'nearest'\n });\n }\n });\n });\n useIsoLayoutEffect(() => {\n dataRef.current.orientation = orientation;\n }, [dataRef, orientation]);\n useIsoLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n }\n // Explicit values can change with the opening interaction. Keep an inferred 'auto' value\n // from the trigger event, but apply a boolean before the initial highlight is synchronized.\n if (!open || focusItemOnOpen !== 'auto') {\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (open && floatingElement) {\n indexRef.current = selectedIndex ?? -1;\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Reset the active index when the list is no longer open and mounted (closing or\n // unmounting). `onNavigate` is a stable callback that always forwards to the latest\n // `onNavigate` prop.\n indexRef.current = -1;\n onNavigate();\n }\n }, [enabled, open, floatingElement, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (!open) {\n forceSyncFocusRef.current = false;\n return;\n }\n if (!floatingElement) {\n return;\n }\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? callback => waitForListPopulatedFrame.request(callback) : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs += 1;\n } else {\n // Initially focus the first non-disabled item. `disabledIndices` is deliberately\n // omitted here so attribute-disabled items (`disabled`/`aria-disabled`) are skipped\n // on open even when the consumer passes an empty `disabledIndices` array. Passing it\n // would regress that behavior (see mui/base-ui#2604).\n // The key came from the trigger, so it is read on the trigger's orientation.\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, triggerOrientation, rtl) || nested ? getMinListIndex(listRef) : getMaxListIndex(listRef);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, floatingElement, activeIndex, selectedIndexRef, nested, listRef, triggerOrientation, rtl, onNavigate, focusItem, waitForListPopulatedFrame]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useIsoLayoutEffect(() => {\n if (!enabled || floatingElement || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = nodes.find(node => node.id === parentId)?.context?.elements.floating;\n // `floatingElement` is null here (see the guard above), so resolve the owner document from an\n // in-DOM element for realm-safety (shadow DOM/iframes): the reference element, falling back to\n // the parent floating element when the reference is virtual (`domReferenceElement` is null).\n const activeEl = activeElement(ownerDocument(domReferenceElement ?? parent ?? null));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, floatingElement, domReferenceElement, tree, parentId, virtual]);\n useIsoLayoutEffect(() => {\n previousOpenRef.current = open;\n previousMountedRef.current = !!floatingElement;\n });\n const hasActiveIndex = activeIndex != null;\n const syncCurrentTarget = useStableCallback(event => {\n if (!latestOpenRef.current) {\n return;\n }\n const index = listRef.current.indexOf(event.currentTarget);\n if (index !== -1 && (indexRef.current !== index || activeIndex !== index)) {\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const getParentOrientation = useStableCallback(() => {\n return parentOrientation ?? tree?.nodesRef.current.find(node => node.id === parentId)?.context?.dataRef?.current.orientation;\n });\n const getMinEnabledIndex = useStableCallback(() => {\n return getMinListIndex(listRef, disabledIndicesRef.current);\n });\n const commonOnKeyDown = useStableCallback(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, isGrid)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n store.setOpen(false, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement;\n if (isHTMLElement(returnElement)) {\n returnElement.focus();\n }\n return;\n }\n\n // The consumer owns `activeIndex` and may decline a navigation this hook proposed, such as a\n // virtual list keeping its highlight when the reference is refocused. Declining produces no\n // re-render, so reconcile here: otherwise the cursor drifts from the rendered highlight and\n // this key moves from the wrong position.\n if (activeIndex != null && activeIndex !== indexRef.current && !isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate(event);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(event);\n }\n }\n\n // Grid navigation is injected by grid-capable consumers so non-grid\n // consumers (menu, select) tree-shake the grid helpers out.\n if (navigateGrid != null) {\n const index = navigateGrid(event, indexRef.current, listRef, orientation, loopFocus, rtl, disabledIndices, minIndex, maxIndex);\n\n // The grid navigator returns the unchanged index for keys it does not handle, and\n // reporting that as a navigation would re-emit the current highlight on every keydown.\n if (index != null && index !== indexRef.current) {\n indexRef.current = index;\n onNavigate(event);\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused. Focus can also rest on a container inside the\n // popup, such as a list that holds the `menu` role. Keys bubbling from a portaled nested\n // popup are not in this popup's DOM, so they navigate from the current index.\n const focusedElement = activeElement(event.currentTarget.ownerDocument);\n if (open && !virtual && contains(event.currentTarget, focusedElement) && !listRef.current.some(item => item != null && contains(item, focusedElement))) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate(event);\n // The boundary item may already be highlighted, so `activeIndex` won't change and the\n // effect that moves focus to the highlighted item won't run.\n if (activeIndex === indexRef.current) {\n focusItem();\n }\n return;\n }\n const {\n index,\n wrapped\n } = getNextListIndex(listRef.current, currentIndex, {\n decrement: !isMainOrientationToEndKey(event.key, orientation, rtl),\n loopFocus,\n allowEscape,\n disabledIndices,\n minIndex,\n maxIndex\n });\n if (wrapped) {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n }\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const item = React.useMemo(() => {\n const itemProps = {\n onFocus(event) {\n forceSyncFocusRef.current = true;\n syncCurrentTarget(event);\n },\n onClick({\n currentTarget\n }) {\n // Safari. Skipped under virtual focus, which must keep real focus on the reference.\n if (!virtual) {\n currentTarget.focus({\n preventScroll: true\n });\n }\n },\n onMouseMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(event);\n }\n },\n onPointerLeave(event) {\n if (!latestOpenRef.current || !isPointerModalityRef.current || event.pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n const relatedTarget = event.relatedTarget;\n if (!focusItemOnHover || listRef.current.includes(relatedTarget)) {\n return;\n }\n if (!resetOnPointerLeaveRef.current) {\n return;\n }\n cancelQueuedFocusRef.current?.();\n cancelQueuedFocusRef.current = null;\n indexRef.current = -1;\n onNavigate(event);\n if (!virtual) {\n const floatingFocusEl = floatingFocusElementRef.current;\n const activeEl = activeElement(ownerDocument(floatingFocusEl));\n if (floatingFocusEl && contains(floatingFocusEl, activeEl)) {\n floatingFocusEl.focus({\n preventScroll: true\n });\n }\n }\n }\n };\n return itemProps;\n }, [syncCurrentTarget, latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, resetOnPointerLeaveRef, virtual]);\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': `${id}-${activeIndex}`\n };\n }, [virtual, open, hasActiveIndex, id, activeIndex]);\n const floating = React.useMemo(() => {\n return {\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown(event) {\n // Close submenu on Shift+Tab\n if (event.key === 'Tab' && event.shiftKey && open && !virtual) {\n // If the event originated from within a nested element (e.g., a Dialog opened from\n // within the menu), don't close the menu. The nested element has its own focus\n // management and should handle the Tab key.\n const target = getTarget(event.nativeEvent);\n if (target && !contains(floatingFocusElementRef.current, target)) {\n return;\n }\n stopEvent(event);\n const details = createChangeEventDetails(REASONS.focusOut, event.nativeEvent);\n store.setOpen(false, details);\n const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement;\n if (!details.isCanceled && isHTMLElement(returnElement)) {\n returnElement.focus();\n }\n return;\n }\n commonOnKeyDown(event);\n },\n onPointerMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, floatingFocusElementRef, typeableComboboxReference, store, open, virtual, domReferenceElement, nestedReturnFocusRef]);\n const trigger = React.useMemo(() => {\n function openOnNavigationKeyDown(event) {\n store.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent, event.currentTarget));\n }\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = !virtual;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n onKeyDown(event) {\n // non-reactive open state (to prevent re-creation of the handler)\n const currentOpen = store.select('open');\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, currentOpen ? orientation : triggerOrientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && currentOpen && (!nested || isTypeableElement(event.currentTarget))) {\n return commonOnKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!currentOpen && !openOnArrowKeyDown && isArrowKey) {\n return undefined;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (currentOpen) {\n indexRef.current = getMinEnabledIndex();\n onNavigate(event);\n if (virtual) {\n floatingFocusElementRef.current?.focus();\n }\n } else {\n openOnNavigationKeyDown(event);\n }\n }\n return undefined;\n }\n if (isMainKey) {\n if (selectedIndexRef.current != null) {\n indexRef.current = selectedIndexRef.current;\n }\n stopEvent(event);\n if (!currentOpen && openOnArrowKeyDown) {\n openOnNavigationKeyDown(event);\n } else {\n commonOnKeyDown(event);\n }\n if (currentOpen) {\n onNavigate(event);\n }\n }\n return undefined;\n },\n onFocus(event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n if (store.select('open') && !virtual) {\n indexRef.current = -1;\n onNavigate(event);\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [commonOnKeyDown, focusItemOnOpen, getMinEnabledIndex, nested, onNavigate, store, openOnArrowKeyDown, orientation, triggerOrientation, getParentOrientation, rtl, selectedIndexRef, virtual, floatingFocusElementRef]);\n const reference = React.useMemo(() => {\n return {\n ...ariaActiveDescendantProp,\n ...trigger\n };\n }, [ariaActiveDescendantProp, trigger]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { isElementVisible, isListIndexDisabled } from \"../utils/composite.mjs\";\nimport { contains } from \"../utils/element.mjs\";\nimport { stopEvent } from \"../utils/event.mjs\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(store, props) {\n const {\n listRef,\n elementsRef,\n activeIndex,\n onMatch: onMatchProp,\n disabledIndices,\n onTyping: onTypingProp,\n enabled = true,\n resetMs = 750,\n selectedIndex = null\n } = props;\n const onTyping = useStableCallback(onTypingProp);\n const open = store.useState('open');\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n const onKeyDown = useStableCallback(event => {\n function getElement(index) {\n return elementsRef?.current[index];\n }\n function isItemAvailable(index) {\n const element = getElement(index);\n if (element && !isElementVisible(element) || element?.matches(':disabled')) {\n return false;\n }\n // Visibility and native disabled state are handled above; pass an empty\n // element list so `isListIndexDisabled` resolves only the explicit\n // `disabledIndices` (array/predicate) and skips its own fallbacks.\n // Consumers that don't pass `disabledIndices` keep matching every visible\n // item except native disabled elements provided through `elementsRef`.\n return disabledIndices == null || !isListIndexDisabled(EMPTY_ARRAY, index, disabledIndices);\n }\n function getMatchingIndex(list, string, startIndex = 0) {\n if (list.length === 0) {\n return -1;\n }\n const normalizedStartIndex = (startIndex % list.length + list.length) % list.length;\n const lowerString = string.toLowerCase();\n for (let offset = 0; offset < list.length; offset += 1) {\n const index = (normalizedStartIndex + offset) % list.length;\n const text = list[index];\n if (!text?.toLowerCase().startsWith(lowerString) || !isItemAvailable(index)) {\n continue;\n }\n return index;\n }\n return -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && event.key === ' ') {\n // Space should continue the in-progress typeahead session.\n stopEvent(event);\n onTyping?.(true);\n }\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, stringRef.current) === -1 && event.key !== ' ') {\n onTyping?.(false);\n }\n }\n if (listContent == null ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n onTyping?.(true);\n }\n\n // Capture whether this is a new typing session before mutating the string.\n const isNewSession = stringRef.current === '';\n if (isNewSession) {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too. Unavailable items are skipped while matching, so\n // they must be ignored here as well — otherwise a hidden or disabled double-letter\n // label would block rapid cycling through the available items.\n const allowRapidSuccessionOfFirstLetter = listContent.every((text, index) => text && isItemAvailable(index) ? text[0]?.toLowerCase() !== text[1]?.toLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n\n // Compute the starting index for this search.\n // If this is a new typing session (string is empty), base it on the current\n // selection/active item; otherwise continue from the last matched index.\n const prevIndex = isNewSession ? selectedIndex ?? activeIndex ?? -1 : prevIndexRef.current;\n const startIndex = (prevIndex ?? 0) + 1;\n const index = getMatchingIndex(listContent, stringRef.current, startIndex);\n if (index !== -1) {\n onMatchProp?.(index, event);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n onTyping?.(false);\n }\n });\n const onBlur = useStableCallback(event => {\n const next = event.relatedTarget;\n const currentDomReferenceElement = store.select('domReferenceElement');\n const currentFloatingElement = store.select('floatingElement');\n const withinComposite = contains(currentDomReferenceElement, next) || contains(currentFloatingElement, next);\n\n // Keep the session if focus moves within the composite (reference <-> floating).\n if (withinComposite) {\n return;\n }\n\n // End the current typing session when focus leaves the composite entirely.\n timeout.clear();\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n useIsoLayoutEffect(() => {\n if (!open && selectedIndex !== null) {\n return;\n }\n timeout.clear();\n matchIndexRef.current = null;\n if (stringRef.current !== '') {\n stringRef.current = '';\n onTyping?.(false);\n }\n }, [open, selectedIndex, timeout, onTyping]);\n const sharedProps = React.useMemo(() => ({\n onKeyDown,\n onBlur\n }), [onKeyDown, onBlur]);\n return React.useMemo(() => enabled ? {\n reference: sharedProps,\n floating: sharedProps\n } : {}, [enabled, sharedProps]);\n}","import { REASONS } from \"../internals/reasons.mjs\";\n\n/**\n * The `onItemHighlighted` reason for a list navigation event, matching the event type that the\n * reason promises in its details.\n */\nexport function getHighlightReason(event) {\n if (event == null) {\n return REASONS.none;\n }\n if (event.type.startsWith('key')) {\n return REASONS.keyboard;\n }\n if (event.type.startsWith('mouse') || event.type.startsWith('pointer')) {\n return REASONS.pointer;\n }\n return REASONS.none;\n}","import { ownerWindow } from '@base-ui/utils/owner';\nimport { platform } from '@base-ui/utils/platform';\n// Tolerance around the element bounds so a fast click whose pointer drifts slightly\n// during press-release isn't mistaken for a drag-off-and-release cancellation.\n// Matches typical OS/browser drag-initiation thresholds.\nconst BOUNDARY_OFFSET = 5;\n\n/**\n * Determines if a mouse event occurred within the bounds of an element\n * (including its pseudo-elements), with a small tolerance for pointer drift.\n */\nexport function isMouseWithinBounds(event, element) {\n const bounds = getPseudoElementBounds(element);\n return event.clientX >= bounds.left - BOUNDARY_OFFSET && event.clientX <= bounds.right + BOUNDARY_OFFSET && event.clientY >= bounds.top - BOUNDARY_OFFSET && event.clientY <= bounds.bottom + BOUNDARY_OFFSET;\n}\nexport function getPseudoElementBounds(element) {\n const elementRect = element.getBoundingClientRect();\n const win = ownerWindow(element);\n\n // Avoid \"Not implemented: window.getComputedStyle(elt, pseudoElt)\" in jsdom.\n if (platform.env.jsdom) {\n return elementRect;\n }\n const beforeStyles = win.getComputedStyle(element, '::before');\n const afterStyles = win.getComputedStyle(element, '::after');\n const hasPseudoElements = beforeStyles.content !== 'none' || afterStyles.content !== 'none';\n if (!hasPseudoElements) {\n return elementRect;\n }\n\n // Get dimensions of pseudo-elements\n const beforeWidth = parseFloat(beforeStyles.width) || 0;\n const beforeHeight = parseFloat(beforeStyles.height) || 0;\n const afterWidth = parseFloat(afterStyles.width) || 0;\n const afterHeight = parseFloat(afterStyles.height) || 0;\n\n // Calculate max dimensions including pseudo-elements\n const totalWidth = Math.max(elementRect.width, beforeWidth, afterWidth);\n const totalHeight = Math.max(elementRect.height, beforeHeight, afterHeight);\n\n // Calculate the differences to extend the bounds\n const widthDiff = totalWidth - elementRect.width;\n const heightDiff = totalHeight - elementRect.height;\n return {\n left: elementRect.left - widthDiff / 2,\n right: elementRect.right + widthDiff / 2,\n top: elementRect.top - heightDiff / 2,\n bottom: elementRect.bottom + heightDiff / 2\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuPositionerContext.displayName = \"MenuPositionerContext\";\nexport function useMenuPositionerContext(optional) {\n const context = React.useContext(MenuPositionerContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.' : _formatErrorMessage(33));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRootContext.displayName = \"MenuRootContext\";\nexport function useMenuRootContext(optional) {\n const context = React.useContext(MenuRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.' : _formatErrorMessage(36));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ContextMenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ContextMenuRootContext.displayName = \"ContextMenuRootContext\";\nexport function useContextMenuRootContext(optional = true) {\n const context = React.useContext(ContextMenuRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.' : _formatErrorMessage(25));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { MenuRootContext } from \"../root/MenuRootContext.mjs\";\n\n/**\n * The filter implementation that a filterable root hands to the parts below it. Only the roots\n * `Menu.FilterProvider` renders import it, so a plain menu never bundles it. Parts whose whole\n * structure differs are swapped as components; parts that only register with the filter call an\n * injected hook, so a menu that never renders them doesn't bundle a second implementation.\n */\n\n/** Static below a filter root: the implementation never changes, so subscribers never re-render. */\nexport const MenuFilterImplContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenuFilterImplContext.displayName = \"MenuFilterImplContext\";\n/**\n * The filter implementation when the menu this part belongs to is filterable, otherwise `null`.\n * `virtualFocus` marks a filter root; a plain `Menu.Root` never sets it. The result is fixed for\n * a mounted part: a filter root can't appear above it without remounting it.\n */\nexport function useMenuFilterImpl(scope = 'root') {\n const impl = React.useContext(MenuFilterImplContext);\n const root = React.useContext(MenuRootContext);\n if (impl === null || root === undefined) {\n return null;\n }\n const filterable = scope === 'submenu-trigger' ? root.virtualFocus || root.parentVirtualFocus : root.virtualFocus;\n return filterable ? impl : null;\n}\n\n/**\n * Throws unless the menu this part renders in is filterable, naming the part and the provider.\n */\nexport function useMenuFilterPart(part) {\n if (useMenuFilterImpl() === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Base UI: <Menu.${part}> must be placed in a menu wrapped in <Menu.FilterProvider>. ` + 'It reads the filter query and the matching items from the provider, which a plain menu ' + 'does not have. Wrap the <Menu.Root> or <Menu.SubmenuRoot> it belongs to in ' + '<Menu.FilterProvider>. See https://base-ui.com/react/components/menu#filtering' : _formatErrorMessage(104, part));\n }\n}\nconst UNFILTERED = {\n visible: true,\n ref: null\n};\nfunction useUnfilteredItem() {\n return UNFILTERED;\n}\n\n/**\n * Registers an item part with the filter of the menu it belongs to. A plain menu's items are\n * always visible.\n */\nexport function useMenuFilterItem(props, forwardedRef, scope = 'root') {\n const impl = useMenuFilterImpl(scope);\n const useItem = (scope === 'submenu-trigger' ? impl?.useSubmenuTrigger : impl?.useItem) ?? useUnfilteredItem;\n const item = useItem({\n label: props.label,\n children: props.children,\n render: props.render\n });\n const ref = useMergedRefs(forwardedRef, item.ref);\n return {\n visible: item.visible,\n ref,\n props: item.props\n };\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuCheckboxItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItemContext.displayName = \"MenuCheckboxItemContext\";\nexport function useMenuCheckboxItemContext() {\n const context = React.useContext(MenuCheckboxItemContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.' : _formatErrorMessage(30));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { platform } from '@base-ui/utils/platform';\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nfunction preventMouseDownDefault(event) {\n event.preventDefault();\n}\n/**\n * Returns common props shared by all menu item types.\n * This hook extracts the shared logic for id, role, tabIndex, and interaction handlers.\n */\nexport function useMenuItemCommonProps(params) {\n const {\n closeOnClick,\n highlighted,\n id,\n nodeId,\n store,\n typingRef,\n itemRef,\n itemMetadata\n } = params;\n const rootContext = useMenuRootContext();\n const contextMenuContext = useContextMenuRootContext(true);\n\n // A submenu trigger is an item of the parent menu's list, so it follows that list's focus model.\n const isSubmenuTrigger = itemMetadata.type === 'submenu-trigger';\n const virtualFocus = isSubmenuTrigger ? rootContext.parentVirtualFocus : rootContext.virtualFocus;\n const selectionStore = isSubmenuTrigger && rootContext.parent.type === 'menu' ? rootContext.parent.store : rootContext.store;\n const ariaSelected = selectionStore.useState('webkitAriaSelected', highlighted);\n const {\n events: menuEvents\n } = store.useState('floatingTreeRoot');\n const open = store.useState('open');\n const isContextMenu = contextMenuContext !== undefined;\n // `-1` rather than omitting it, which leaves links and buttons in the tab order.\n const tabIndex = !virtualFocus && open && highlighted ? 0 : -1;\n return React.useMemo(() => ({\n id,\n role: 'menuitem',\n tabIndex,\n 'aria-selected': ariaSelected,\n // Real focus stays on the input or list that owns virtual navigation.\n onMouseDown: virtualFocus ? preventMouseDownDefault : undefined,\n onKeyDown(event) {\n if (event.key === ' ' && typingRef?.current) {\n event.preventDefault();\n }\n },\n onMouseMove(event) {\n if (!nodeId) {\n return;\n }\n\n // Inform the floating tree that a menu item within this menu was hovered/moved over\n // so unrelated descendant submenus can be closed.\n menuEvents.emit('itemhover', {\n nodeId,\n target: event.currentTarget\n });\n },\n onClick(event) {\n if (closeOnClick) {\n menuEvents.emit('close', {\n domEvent: event.nativeEvent,\n reason: REASONS.itemPress\n });\n }\n },\n onMouseUp(event) {\n if (contextMenuContext) {\n const initialCursorPoint = contextMenuContext.initialCursorPointRef.current;\n contextMenuContext.initialCursorPointRef.current = null;\n if (isContextMenu && initialCursorPoint && Math.abs(event.clientX - initialCursorPoint.x) <= 1 && Math.abs(event.clientY - initialCursorPoint.y) <= 1) {\n return;\n }\n\n // On non-macOS platforms, this mouseup belongs to the right-click gesture\n // that opened the context menu, so it must not activate an item.\n if (isContextMenu && !platform.os.mac && event.button === 2) {\n return;\n }\n }\n if (itemRef.current && store.context.allowMouseUpTriggerRef.current && (!isContextMenu || event.button === 2)) {\n // This fires whenever the user clicks on the trigger, moves the cursor, and releases it over the item.\n // We trigger the click and override the `closeOnClick` preference to always close the menu.\n if (itemMetadata.type === 'regular-item') {\n // `detail: 1` and `pointerType: 'mouse'` mark this as a mouse-gesture click so\n // MenuRoot and FloatingFocusManager don't treat it as a keyboard activation.\n dispatchClickWithModifiers(itemRef.current, event, {\n detail: 1,\n pointerType: 'mouse'\n });\n }\n }\n }\n }), [closeOnClick, tabIndex, id, menuEvents, nodeId, store.context.allowMouseUpTriggerRef, typingRef, itemRef, contextMenuContext, isContextMenu, itemMetadata.type, ariaSelected, virtualFocus]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useMenuItemCommonProps } from \"./useMenuItemCommonProps.mjs\";\nexport const REGULAR_ITEM = {\n type: 'regular-item'\n};\nexport function useMenuItem(params) {\n const {\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n typingRef = store.context.typingRef,\n nativeButton,\n itemMetadata,\n nodeId\n } = params;\n const itemRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const commonProps = useMenuItemCommonProps({\n closeOnClick,\n highlighted,\n id,\n nodeId,\n store,\n typingRef,\n itemRef,\n itemMetadata\n });\n const getItemProps = React.useCallback(externalProps => {\n return mergeProps(commonProps, {\n onMouseEnter(event) {\n if (itemMetadata.type !== 'submenu-trigger') {\n return;\n }\n itemMetadata.setActive(event.nativeEvent);\n }\n }, externalProps, getButtonProps);\n }, [commonProps, getButtonProps, itemMetadata]);\n const mergedRef = useMergedRefs(itemRef, buttonRef);\n return React.useMemo(() => ({\n getItemProps,\n itemRef: mergedRef\n }), [getItemProps, mergedRef]);\n}","/**\n * Present when the menu checkbox item is checked.\n */\nexport const checked = 'data-checked';\n/**\n * Present when the menu checkbox item is not checked.\n */\nexport const unchecked = 'data-unchecked';\n/**\n * Present when the menu checkbox item is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the menu checkbox item is highlighted.\n */\nexport const highlighted = 'data-highlighted';","import { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport * as MenuCheckboxItemDataAttributes from \"../checkbox-item/MenuCheckboxItemDataAttributes.mjs\";\nexport const itemMapping = {\n checked(value) {\n if (value) {\n return {\n [MenuCheckboxItemDataAttributes.checked]: ''\n };\n }\n return {\n [MenuCheckboxItemDataAttributes.unchecked]: ''\n };\n },\n ...transitionStatusMapping\n};","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { MenuCheckboxItemContext } from \"./MenuCheckboxItemContext.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuCheckboxItemPlain = /*#__PURE__*/React.forwardRef(function MenuCheckboxItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = false,\n checked = false,\n onCheckedChange,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const rootDisabled = store.useState('disabled');\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const disabled = disabledProp || rootDisabled;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = React.useMemo(() => ({\n disabled,\n highlighted,\n checked\n }), [disabled, highlighted, checked]);\n function handleClick(event) {\n const details = createChangeEventDetails(REASONS.itemPress, event.nativeEvent, undefined, {\n preventUnmountOnClose: NOOP\n });\n onCheckedChange?.(!checked, details);\n }\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n props: [itemProps, {\n role: 'menuitemcheckbox',\n 'aria-checked': checked,\n onClick: handleClick\n }, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n return /*#__PURE__*/_jsx(MenuCheckboxItemContext.Provider, {\n value: state,\n children: element\n });\n});\n\n/**\n * A menu item that toggles a setting on or off.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItemPlain.displayName = \"MenuCheckboxItemPlain\";\nexport const MenuCheckboxItem = /*#__PURE__*/React.forwardRef(function MenuCheckboxItem(props, forwardedRef) {\n const {\n checked: checkedProp,\n defaultChecked,\n onCheckedChange,\n ...plainProps\n } = props;\n\n // Owned above the element so an uncontrolled item keeps its state while a filter hides it.\n const [checked, setChecked] = useControlled({\n controlled: checkedProp,\n default: defaultChecked ?? false,\n name: 'MenuCheckboxItem',\n state: 'checked'\n });\n const filterItem = useMenuFilterItem(props, forwardedRef);\n function handleCheckedChange(nextChecked, eventDetails) {\n onCheckedChange?.(nextChecked, eventDetails);\n if (!eventDetails.isCanceled) {\n setChecked(nextChecked);\n }\n }\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuCheckboxItemPlain, {\n ...plainProps,\n checked: checked,\n onCheckedChange: handleCheckedChange,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItem.displayName = \"MenuCheckboxItem\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuCheckboxItemContext } from \"../checkbox-item/MenuCheckboxItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\n\n/**\n * Indicates whether the checkbox item is ticked.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuCheckboxItemIndicator = /*#__PURE__*/React.forwardRef(function MenuCheckboxItemIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const item = useMenuCheckboxItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n mounted,\n setMounted\n } = useTransitionStatus(item.checked);\n useOpenChangeComplete({\n batch: true,\n enabled: !item.checked,\n open: item.checked,\n ref: indicatorRef,\n onComplete() {\n if (!item.checked) {\n setMounted(false);\n }\n }\n });\n const state = {\n checked: item.checked,\n disabled: item.disabled,\n highlighted: item.highlighted,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n state,\n ref: [forwardedRef, indicatorRef],\n stateAttributesMapping: itemMapping,\n props: {\n 'aria-hidden': true,\n ...elementProps\n },\n enabled: keepMounted || mounted\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") MenuCheckboxItemIndicator.displayName = \"MenuCheckboxItemIndicator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuGroupContext.displayName = \"MenuGroupContext\";\nexport function useMenuGroupRootContext() {\n const context = React.useContext(MenuGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>.' : _formatErrorMessage(31));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { MenuGroupContext } from \"./MenuGroupContext.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MenuGroupPlain = /*#__PURE__*/React.forwardRef(function MenuGroupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState(undefined);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: {\n role: 'group',\n 'aria-labelledby': labelId,\n ...elementProps\n }\n });\n return /*#__PURE__*/_jsx(MenuGroupContext.Provider, {\n value: setLabelId,\n children: element\n });\n});\n\n/**\n * Groups related menu items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuGroupPlain.displayName = \"MenuGroupPlain\";\nexport const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(props, forwardedRef) {\n const Group = useMenuFilterImpl()?.Group ?? MenuGroupPlain;\n return /*#__PURE__*/_jsx(Group, {\n ...props,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuGroup.displayName = \"MenuGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useMenuGroupRootContext } from \"../group/MenuGroupContext.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuGroupLabel = /*#__PURE__*/React.forwardRef(function MenuGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const id = useBaseUiId(idProp);\n const setLabelId = useMenuGroupRootContext();\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [setLabelId, id]);\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: {\n id,\n 'aria-hidden': true,\n ...elementProps\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuGroupLabel.displayName = \"MenuGroupLabel\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"./useMenuItem.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuItemPlain = /*#__PURE__*/React.forwardRef(function MenuItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const rootDisabled = store.useState('disabled');\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const disabled = disabledProp || rootDisabled;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = {\n disabled,\n highlighted\n };\n return useRenderElement('div', componentProps, {\n state,\n props: [itemProps, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n});\n\n/**\n * An individual interactive item in the menu.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuItemPlain.displayName = \"MenuItemPlain\";\nexport const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef);\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuItemPlain, {\n ...props,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuItem.displayName = \"MenuItem\";","'use client';\n\nimport * as React from 'react';\nexport const MenuSubmenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuRootContext.displayName = \"MenuSubmenuRootContext\";\nexport function useMenuSubmenuRootContext() {\n return React.useContext(MenuSubmenuRootContext);\n}","import * as React from 'react';\nimport { unwrapLazyRenderProp } from \"./useRenderElement.mjs\";\n/**\n * Resolves an element's id using the same precedence as `useRenderElement`.\n * Returns `''` when the element renders with an explicitly empty id, which consumers must treat\n * as \"no id\" rather than falling back to the generated one, so ARIA relationships never reference\n * an id no element carries. Render callbacks are opaque and are expected to use the id passed to\n * them.\n *\n * @internal\n */\nexport function resolveRenderedId(props, fallbackId) {\n const render = unwrapLazyRenderProp(props.render);\n if (/*#__PURE__*/React.isValidElement(render)) {\n const renderProps = render.props;\n if (Object.hasOwn(renderProps, 'id')) {\n return renderProps.id ?? '';\n }\n }\n return props.id ?? fallbackId;\n}\n\n/**\n * Resolves the element's id and returns a ref that publishes it to the owner while mounted.\n * A generated fallback is never published as an override, so removing an explicit id lets the\n * element return to the generated one.\n *\n * @internal\n */\nexport function useRenderedId(props, defaultId, setId) {\n const id = resolveRenderedId(props, defaultId);\n const registeredId = id === defaultId ? undefined : id;\n const ref = React.useCallback(element => setId?.(element ? registeredId : undefined), [registeredId, setId]);\n return [id, ref];\n}","import * as React from 'react';\nimport { unwrapLazyRenderProp } from \"./useRenderElement.mjs\";\nexport function resolvePopupLabel(props, activeTriggerElement, activeTriggerId) {\n const render = unwrapLazyRenderProp(props.render);\n const renderedElementProps = /*#__PURE__*/React.isValidElement(render) ? render.props : undefined;\n const ariaLabel = props['aria-label'] ?? renderedElementProps?.['aria-label'];\n let ariaLabelledBy = props['aria-labelledby'] ?? renderedElementProps?.['aria-labelledby'];\n if (ariaLabelledBy == null && !ariaLabel) {\n // Prefer the element's live id: a `render` element's own id wins over the registered one.\n ariaLabelledBy = activeTriggerElement ? activeTriggerElement.id || undefined : activeTriggerId || undefined;\n }\n return ariaLabelledBy;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingFocusManager, useHoverFloatingInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useMenuPositionerContext } from \"../positioner/MenuPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { useMenuSubmenuRootContext } from \"../submenu-root/MenuSubmenuRootContext.mjs\";\nimport { useRenderedId } from \"../../internals/resolveRenderedId.mjs\";\nimport { resolvePopupLabel } from \"../../internals/resolvePopupLabel.mjs\";\nimport { MenuFilterImplContext, useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const MenuPopupPlain = /*#__PURE__*/React.forwardRef(function MenuPopupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n id: idProp,\n initialFocus: initialFocusProp,\n ...elementProps\n } = componentProps;\n const {\n store,\n defaultFloatingId,\n setRenderedFloatingId,\n virtualFocus,\n orientation\n } = useMenuRootContext();\n const inheritedSubmenuRootContext = useMenuSubmenuRootContext();\n const {\n side,\n align\n } = useMenuPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const open = store.useState('open');\n const transitionStatus = store.useState('transitionStatus');\n const popupProps = store.useState('popupProps');\n const mounted = store.useState('mounted');\n const instantType = store.useState('instantType');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const parent = store.useState('parent');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const rootId = store.useState('rootId');\n const floatingContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const closeDelay = store.useState('closeDelay');\n const hoverEnabled = store.useState('hoverEnabled');\n const disabled = store.useState('disabled');\n const openMethod = store.useState('openMethod');\n const activeTriggerId = store.useState('activeTriggerId');\n const listElement = store.useState('listElement');\n const [id, registerIdRef] = useRenderedId(componentProps, defaultFloatingId, setRenderedFloatingId);\n const ariaLabelledBy = resolvePopupLabel(componentProps, activeTriggerElement, activeTriggerId);\n\n // A dialog's menu can render under a submenu provider; only the actual submenu inherits it.\n const submenuRootContext = parent.type === 'menu' ? inheritedSubmenuRootContext : undefined;\n const isContextMenu = parent.type === 'context-menu';\n let initialFocus = initialFocusProp ?? parent.type !== 'menu';\n if (initialFocusProp === undefined && listElement && parent.type !== 'menu') {\n initialFocus = () => {\n // A keyboard or screen reader open highlights an item, which list navigation focuses.\n if (store.state.activeIndex !== null) {\n return false;\n }\n // The list holds the `menu` role, so a pointer open lands focus on it rather than on the\n // presentational popup.\n return listElement;\n };\n }\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n React.useEffect(() => {\n function handleClose(event) {\n store.setOpen(false, createChangeEventDetails(event.reason, event.domEvent));\n }\n floatingTreeRoot.events.on('close', handleClose);\n return () => {\n floatingTreeRoot.events.off('close', handleClose);\n };\n }, [floatingTreeRoot.events, store]);\n useHoverFloatingInteraction(floatingContext, {\n enabled: hoverEnabled && !disabled && !isContextMenu && parent.type !== 'menubar',\n closeDelay\n });\n const setPopupElement = store.useStateSetter('popupElement');\n\n // Only a menu under a filter root bundles the handoff to a filterable parent. Whether one is\n // above is fixed for a mounted popup, so the hook doesn't change between renders.\n const useParentHandoff = React.useContext(MenuFilterImplContext)?.useParentHandoff ?? useNoParentHandoff;\n const {\n parentVirtualFocusRef,\n handleFocus\n } = useParentHandoff(store, parent, open, virtualFocus);\n const state = {\n transitionStatus,\n side,\n align,\n open,\n nested: parent.type === 'menu',\n instant: instantType\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef, setPopupElement, registerIdRef],\n stateAttributesMapping: popupTransitionStateMapping,\n props: [popupProps, {\n id,\n // A rendered `Menu.List` carries the `menu` semantics instead.\n ...(listElement ? {\n role: 'presentation'\n } : {\n role: 'menu',\n // `menu` is implicitly vertical, so only the non-default value needs to be\n // rendered.\n 'aria-orientation': orientation === 'horizontal' ? 'horizontal' : undefined,\n 'aria-labelledby': ariaLabelledBy\n }),\n onKeyDown(event) {\n submenuRootContext?.onPopupKeyDown?.(event);\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onFocus: handleFocus\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps, {\n 'data-rootownerid': rootId\n }]\n });\n let returnFocus = parent.type === undefined || isContextMenu;\n if (activeTriggerElement || parent.type === 'menubar' && lastOpenChangeReason !== REASONS.outsidePress) {\n returnFocus = true;\n }\n\n // Internal defaults rather than consumer targets, so focus that already moved is respected.\n const dynamicReturnFocus = submenuRootContext?.getReturnElement ?? parentVirtualFocusRef;\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingContext,\n openInteractionType: openMethod,\n modal: isContextMenu,\n disabled: !mounted,\n returnFocus: finalFocus ?? dynamicReturnFocus ?? returnFocus,\n explicitReturnFocus: finalFocus === undefined && dynamicReturnFocus ? false : undefined,\n initialFocus: initialFocus,\n restoreFocus: true,\n getInsideElements: parent.type === undefined ? () => [store.context.beforeTriggerFocusGuardRef.current] : undefined,\n externalTree: parent.type !== 'menubar' ? floatingTreeRoot : undefined,\n previousFocusableElement: activeTriggerElement,\n nextFocusableElement: parent.type === undefined ? store.context.triggerFocusTargetRef : undefined,\n beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPopupPlain.displayName = \"MenuPopupPlain\";\nconst NO_PARENT_HANDOFF = {\n parentVirtualFocusRef: undefined,\n handleFocus: undefined\n};\nfunction useNoParentHandoff() {\n return NO_PARENT_HANDOFF;\n}\n\n/**\n * A container for the menu items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuPopup = /*#__PURE__*/React.forwardRef(function MenuPopup(props, forwardedRef) {\n const Popup = useMenuFilterImpl()?.Popup ?? MenuPopupPlain;\n return /*#__PURE__*/_jsx(Popup, {\n ...props,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPopup.displayName = \"MenuPopup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuPortalContext.displayName = \"MenuPortalContext\";\nexport function useMenuPortalContext() {\n const value = React.useContext(MenuPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.Portal> is missing.' : _formatErrorMessage(32));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { MenuPortalContext } from \"./MenuPortalContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MenuPortal = /*#__PURE__*/React.forwardRef(function MenuPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const {\n store,\n parent\n } = useMenuRootContext();\n const mounted = store.useState('mounted');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n\n // The hidden `aria-owns` owner renders here, in the React tree, so the role must be decided by\n // where this portal sits, not by the active trigger. `parent` comes from context (the `Menu.Root`\n // position), unlike the store's `parent`, which a detached trigger overwrites with its own.\n const portalOwnerRole = parent.type === 'menu' || parent.type === 'menubar' ? 'group' : undefined;\n return /*#__PURE__*/_jsx(MenuPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n portalOwnerRole: portalOwnerRole\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPortal.displayName = \"MenuPortal\";","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { FloatingNode } from \"../../floating-ui-react/index.mjs\";\nimport { MenuPositionerContext } from \"./MenuPositionerContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { useMenuPortalContext } from \"../portal/MenuPortalContext.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE, POPUP_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useTriggerSwitchTransition } from \"../../internals/useTriggerSwitchTransition.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\n\n/**\n * Positions the menu popup against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuPositioner = /*#__PURE__*/React.forwardRef(function MenuPositioner(componentProps, forwardedRef) {\n const {\n anchor: anchorProp,\n positionMethod: positionMethodProp = 'absolute',\n className,\n render,\n side,\n align: alignProp,\n sideOffset: sideOffsetProp = 0,\n alignOffset: alignOffsetProp = 0,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding = 5,\n arrowPadding = 5,\n sticky = false,\n disableAnchorTracking = false,\n collisionAvoidance: collisionAvoidanceProp = DROPDOWN_COLLISION_AVOIDANCE,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n virtualFocus,\n syncHighlightedItem\n } = useMenuRootContext();\n const keepMounted = useMenuPortalContext();\n const contextMenuContext = useContextMenuRootContext(true);\n const parent = store.useState('parent');\n const floatingRootContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const modal = store.useState('modal');\n const openMethod = store.useState('openMethod');\n const triggerElement = store.useState('activeTriggerElement');\n const transitionStatus = store.useState('transitionStatus');\n const positionerElement = store.useState('positionerElement');\n const instantType = store.useState('instantType');\n const adaptiveOrigin = store.useState('adaptiveOrigin');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const floatingNodeId = store.useState('floatingNodeId');\n const floatingParentNodeId = store.useState('floatingParentNodeId');\n const domReference = floatingRootContext.useState('domReferenceElement');\n let anchor = anchorProp;\n let sideOffset = sideOffsetProp;\n let alignOffset = alignOffsetProp;\n let align = alignProp;\n let collisionAvoidance = collisionAvoidanceProp;\n if (parent.type === 'context-menu') {\n anchor = anchorProp ?? parent.context?.anchor;\n align = align ?? 'start';\n if (!side && align !== 'center') {\n alignOffset = componentProps.alignOffset ?? 2;\n sideOffset = componentProps.sideOffset ?? -5;\n }\n }\n let computedSide = side;\n let computedAlign = align;\n if (parent.type === 'menu') {\n computedSide = computedSide ?? 'inline-end';\n computedAlign = computedAlign ?? 'start';\n collisionAvoidance = componentProps.collisionAvoidance ?? POPUP_COLLISION_AVOIDANCE;\n } else if (parent.type === 'menubar') {\n computedSide = computedSide ?? (parent.context.orientation === 'vertical' ? 'inline-end' : 'bottom');\n computedAlign = computedAlign ?? 'start';\n }\n const contextMenu = parent.type === 'context-menu';\n const positioner = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod: contextMenuContext ? 'fixed' : positionMethodProp,\n mounted,\n side: computedSide,\n sideOffset,\n align: computedAlign,\n alignOffset,\n arrowPadding: contextMenu ? 0 : arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n nodeId: floatingNodeId,\n keepMounted,\n disableAnchorTracking,\n collisionAvoidance,\n shift: contextMenu ? {\n crossAxis: !('side' in collisionAvoidance && collisionAvoidance.side === 'flip'),\n rootBoundary: 'layoutViewport'\n } : undefined,\n externalTree: floatingTreeRoot,\n adaptiveOrigin,\n lazyFlip: virtualFocus ? 'placement' : false\n });\n React.useEffect(() => {\n function onMenuOpenChange(details) {\n if (details.open) {\n if (details.parentNodeId === floatingNodeId) {\n store.set('hoverEnabled', false);\n }\n if (details.nodeId !== floatingNodeId && details.parentNodeId === store.select('floatingParentNodeId')) {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n }\n }\n }\n floatingTreeRoot.events.on('menuopenchange', onMenuOpenChange);\n return () => {\n floatingTreeRoot.events.off('menuopenchange', onMenuOpenChange);\n };\n }, [store, floatingTreeRoot.events, floatingNodeId]);\n React.useEffect(() => {\n if (store.select('floatingParentNodeId') == null) {\n return undefined;\n }\n function onParentClose(details) {\n if (details.open || details.nodeId !== store.select('floatingParentNodeId')) {\n return;\n }\n const reason = details.reason ?? REASONS.siblingOpen;\n store.setOpen(false, createChangeEventDetails(reason));\n }\n floatingTreeRoot.events.on('menuopenchange', onParentClose);\n return () => {\n floatingTreeRoot.events.off('menuopenchange', onParentClose);\n };\n }, [floatingTreeRoot.events, store]);\n const closeTimeout = useTimeout();\n\n // Clear pending close timeout when the menu closes.\n React.useEffect(() => {\n if (!open) {\n closeTimeout.clear();\n }\n }, [open, closeTimeout]);\n\n // Close unrelated child submenus when hovering a different item in the parent menu.\n React.useEffect(() => {\n function onItemHover(event) {\n // If an item within our parent menu is hovered, and this menu's trigger is not that item,\n // close this submenu. This ensures hovering a different item in the parent closes other branches.\n if (!open || event.nodeId !== store.select('floatingParentNodeId')) {\n return;\n }\n if (event.target && triggerElement && triggerElement !== event.target) {\n const delay = store.select('closeDelay');\n if (delay > 0) {\n if (!closeTimeout.isStarted()) {\n closeTimeout.start(delay, () => {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n });\n }\n } else {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n }\n } else {\n // User re-hovered the submenu trigger, cancel pending close.\n closeTimeout.clear();\n }\n }\n floatingTreeRoot.events.on('itemhover', onItemHover);\n return () => {\n floatingTreeRoot.events.off('itemhover', onItemHover);\n };\n }, [floatingTreeRoot.events, open, triggerElement, store, closeTimeout]);\n React.useEffect(() => {\n const eventDetails = {\n open,\n nodeId: floatingNodeId,\n parentNodeId: floatingParentNodeId,\n reason: store.select('lastOpenChangeReason')\n };\n floatingTreeRoot.events.emit('menuopenchange', eventDetails);\n }, [floatingTreeRoot.events, open, store, floatingNodeId, floatingParentNodeId]);\n useTriggerSwitchTransition({\n store,\n domReference,\n positionerElement,\n open\n });\n const state = {\n open,\n side: positioner.side,\n align: positioner.align,\n anchorHidden: positioner.anchorHidden,\n nested: parent.type === 'menu',\n instant: instantType\n };\n const menubarModal = parent.type === 'menubar' && parent.context.modal;\n const popupModal = modal && lastOpenChangeReason !== REASONS.triggerHover;\n useAnchoredPopupScrollLock(open && (menubarModal || popupModal), openMethod === 'touch', positionerElement, triggerElement);\n const element = usePositioner(componentProps, state, {\n styles: positioner.positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, store.useStateSetter('positionerElement')],\n hidden: !mounted,\n inert: !open\n });\n const shouldRenderBackdrop = mounted && parent.type !== 'menu' && (parent.type !== 'menubar' && modal && lastOpenChangeReason !== REASONS.triggerHover || parent.type === 'menubar' && parent.context.modal);\n\n // cuts a hole in the backdrop to allow pointer interaction with the menubar or dropdown menu trigger element\n let backdropCutout = null;\n if (parent.type === 'menubar') {\n backdropCutout = parent.context.contentElement;\n } else if (parent.type === undefined) {\n backdropCutout = triggerElement;\n }\n return /*#__PURE__*/_jsxs(MenuPositionerContext.Provider, {\n value: positioner,\n children: [shouldRenderBackdrop && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: parent.type === 'context-menu' || parent.type === 'nested-context-menu' ? parent.context.internalBackdropRef : null,\n inert: inertValue(!open),\n cutout: backdropCutout\n }), /*#__PURE__*/_jsx(FloatingNode, {\n id: floatingNodeId,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: store.context.itemDomElements,\n labelsRef: store.context.itemLabels,\n onMapChange: syncHighlightedItem,\n children: element\n })\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPositioner.displayName = \"MenuPositioner\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroupContext.displayName = \"MenuRadioGroupContext\";\nexport function useMenuRadioGroupContext() {\n const context = React.useContext(MenuRadioGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.' : _formatErrorMessage(34));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { MenuRadioGroupContext } from \"./MenuRadioGroupContext.mjs\";\nimport { MenuGroupContext } from \"../group/MenuGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const MenuRadioGroupPlain = /*#__PURE__*/React.forwardRef(function MenuRadioGroupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n value: valueProp,\n defaultValue,\n onValueChange: onValueChangeProp,\n disabled = false,\n style,\n 'aria-labelledby': ariaLabelledByProp,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState(undefined);\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'MenuRadioGroup'\n });\n const setValue = useStableCallback((newValue, eventDetails) => {\n onValueChangeProp?.(newValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(newValue);\n });\n const state = {\n disabled\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: {\n role: 'group',\n 'aria-labelledby': ariaLabelledByProp ?? labelId,\n 'aria-disabled': disabled || undefined,\n ...elementProps\n }\n });\n const context = React.useMemo(() => ({\n value,\n setValue,\n disabled\n }), [value, setValue, disabled]);\n return /*#__PURE__*/_jsx(MenuGroupContext.Provider, {\n value: setLabelId,\n children: /*#__PURE__*/_jsx(MenuRadioGroupContext.Provider, {\n value: context,\n children: element\n })\n });\n});\n\n/**\n * Groups related radio items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroupPlain.displayName = \"MenuRadioGroupPlain\";\nexport const MenuRadioGroup = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function MenuRadioGroup(props, forwardedRef) {\n const RadioGroup = useMenuFilterImpl()?.RadioGroup ?? MenuRadioGroupPlain;\n return /*#__PURE__*/_jsx(RadioGroup, {\n ...props,\n ref: forwardedRef\n });\n}));\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroup.displayName = \"MenuRadioGroup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRadioItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemContext.displayName = \"MenuRadioItemContext\";\nexport function useMenuRadioItemContext() {\n const context = React.useContext(MenuRadioItemContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.' : _formatErrorMessage(35));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useMenuRadioGroupContext } from \"../radio-group/MenuRadioGroupContext.mjs\";\nimport { MenuRadioItemContext } from \"./MenuRadioItemContext.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuRadioItemPlain = /*#__PURE__*/React.forwardRef(function MenuRadioItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = false,\n value,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const {\n value: selectedValue,\n setValue: setSelectedValue,\n disabled: groupDisabled\n } = useMenuRadioGroupContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const rootDisabled = store.useState('disabled');\n const disabled = disabledProp || groupDisabled || rootDisabled;\n const checked = selectedValue === value;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = React.useMemo(() => ({\n disabled,\n highlighted,\n checked\n }), [disabled, highlighted, checked]);\n function handleClick(event) {\n const details = createChangeEventDetails(REASONS.itemPress, event.nativeEvent, undefined, {\n preventUnmountOnClose: NOOP\n });\n setSelectedValue(value, details);\n }\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n props: [itemProps, {\n role: 'menuitemradio',\n 'aria-checked': checked,\n onClick: handleClick\n }, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n return /*#__PURE__*/_jsx(MenuRadioItemContext.Provider, {\n value: state,\n children: element\n });\n});\n\n/**\n * A menu item that works like a radio button in a given group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemPlain.displayName = \"MenuRadioItemPlain\";\nexport const MenuRadioItem = /*#__PURE__*/React.forwardRef(function MenuRadioItem(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef);\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuRadioItemPlain, {\n ...props,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuRadioItem.displayName = \"MenuRadioItem\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuRadioItemContext } from \"../radio-item/MenuRadioItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\n\n/**\n * Indicates whether the radio item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuRadioItemIndicator = /*#__PURE__*/React.forwardRef(function MenuRadioItemIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const item = useMenuRadioItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n mounted,\n setMounted\n } = useTransitionStatus(item.checked);\n useOpenChangeComplete({\n batch: true,\n enabled: !item.checked,\n open: item.checked,\n ref: indicatorRef,\n onComplete() {\n if (!item.checked) {\n setMounted(false);\n }\n }\n });\n const state = {\n checked: item.checked,\n disabled: item.disabled,\n highlighted: item.highlighted,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n ref: [forwardedRef, indicatorRef],\n props: {\n 'aria-hidden': true,\n ...elementProps\n },\n enabled: keepMounted || mounted\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemIndicator.displayName = \"MenuRadioItemIndicator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenubarContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenubarContext.displayName = \"MenubarContext\";\nexport function useMenubarContext(optional) {\n const context = React.useContext(MenubarContext);\n if (context === null && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.' : _formatErrorMessage(5));\n }\n return context;\n}","import * as React from 'react';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_OBJECT, NOOP } from '@base-ui/utils/empty';\nimport { platform } from '@base-ui/utils/platform';\nimport { FloatingTreeStore } from \"../../floating-ui-react/components/FloatingTreeStore.mjs\";\nimport { NullStore } from \"../../utils/NullStore.mjs\";\nimport { createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nconst selectors = {\n ...popupStoreSelectors,\n disabled: state => state.parent.type === 'menubar' ? state.parent.context.disabled || state.disabled : state.disabled,\n modal: state => (state.parent.type === undefined || state.parent.type === 'context-menu') && (state.modal ?? true),\n openMethod: state => state.openMethod,\n keyboardOpen: state => state.keyboardOpen,\n allowMouseEnter: state => state.allowMouseEnter,\n highlightItemOnHover: state => state.highlightItemOnHover,\n parent: state => state.parent,\n rootId: state => {\n if (state.parent.type === 'menu') {\n return state.parent.store.select('rootId');\n }\n return state.parent.type !== undefined ? state.parent.context.rootId : state.rootId;\n },\n activeIndex: state => state.activeIndex,\n listElement: state => state.listElement,\n /** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */\n triggerControlsId: (state, triggerId) => {\n const popupId = popupStoreSelectors.triggerPopupId(state, triggerId);\n return popupId ? state.listElement?.id || popupId : undefined;\n },\n filterTriggerProps: state => state.filterTriggerProps,\n inputProps: state => state.inputProps,\n // `aria-selected` is invalid on `menuitem`, but Safari VoiceOver needs it for arrow-key\n // navigation. Limit it to WebKit while the input has focus so normal VoiceOver navigation\n // does not encounter the invalid attribute.\n webkitAriaSelected: (state, highlighted) => platform.engine.webkit && state.inputFocused && highlighted ? true : undefined,\n highlightedItemId: state => state.highlightedItem?.id || undefined,\n isActive: (state, itemIndex) => state.activeIndex === itemIndex,\n hoverEnabled: state => state.hoverEnabled,\n // `trigger-change` describes a popup moving between triggers, which only has\n // meaning while it is open. Dropping it once closed keeps a late or stale\n // restoration from marking a closing popup instant and skipping its exit\n // transition, including on close paths that never reach `setOpen` — a\n // controlled consumer committing `open={false}` goes straight through the prop.\n instantType: state => state.instantType === 'trigger-change' && !popupStoreSelectors.open(state) ? undefined : state.instantType,\n lastOpenChangeReason: state => state.openChangeReason,\n floatingTreeRoot: state => {\n if (state.parent.type === 'menu') {\n return state.parent.store.select('floatingTreeRoot');\n }\n return state.floatingTreeRoot;\n },\n floatingNodeId: state => state.floatingNodeId,\n floatingParentNodeId: state => state.floatingParentNodeId,\n itemProps: state => state.itemProps,\n closeDelay: state => state.closeDelay,\n adaptiveOrigin: state => state.adaptiveOrigin,\n keyboardEventRelay: state => {\n if (state.keyboardEventRelay) {\n return state.keyboardEventRelay;\n }\n if (state.parent.type === 'menu') {\n return state.parent.store.select('keyboardEventRelay');\n }\n return undefined;\n }\n};\n\n/**\n * The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the\n * inert fallback store satisfy it, so a trigger can read from whichever store the handle currently\n * exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`\n * (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on\n * the detached fallback store every one of these mutations is a no-op.\n */\n\nexport class MenuStore extends ReactStore {\n constructor(initialState, floatingId, nested = false) {\n const triggerElements = new PopupTriggerMap();\n const state = createInitialState(triggerElements, floatingId, nested, initialState);\n super(state, createInitialContext(triggerElements), selectors);\n\n // Share the mouse-up trigger ref of the parent menu, if any. This observes the store's own\n // state, so the subscription lives exactly as long as the store and needs no cleanup.\n void this.observe('parent', parent => {\n if (parent.type === 'menu') {\n this.context.allowMouseUpTriggerRef = parent.store.context.allowMouseUpTriggerRef;\n } else if (parent.type !== undefined) {\n this.context.allowMouseUpTriggerRef = parent.context.allowMouseUpTriggerRef;\n }\n });\n }\n\n /**\n * Propagates changes of the parent menu's shared tree state to this store's subscribers.\n * The owning `Menu.Root` calls it from an effect so the parent store subscription is released\n * when the submenu unmounts.\n * @returns A function that removes the parent store subscription.\n */\n subscribeToParentMenu() {\n const parent = this.state.parent;\n if (parent.type !== 'menu') {\n return undefined;\n }\n let rootId = parent.store.select('rootId');\n let floatingTreeRoot = parent.store.select('floatingTreeRoot');\n let keyboardEventRelay = parent.store.select('keyboardEventRelay');\n return parent.store.subscribe(() => {\n const nextRootId = parent.store.select('rootId');\n const nextFloatingTreeRoot = parent.store.select('floatingTreeRoot');\n const nextKeyboardEventRelay = parent.store.select('keyboardEventRelay');\n if (rootId === nextRootId && floatingTreeRoot === nextFloatingTreeRoot && keyboardEventRelay === nextKeyboardEventRelay) {\n return;\n }\n rootId = nextRootId;\n floatingTreeRoot = nextFloatingTreeRoot;\n keyboardEventRelay = nextKeyboardEventRelay;\n this.notifyAll();\n });\n }\n setOpen(open, eventDetails) {\n this.state.floatingRootContext.context.events.emit('setOpen', {\n open,\n eventDetails\n });\n }\n setActiveIndex(activeIndex, reason, event) {\n // Only a write that changes the index is reported. Tagging a no-op, or a write back to the\n // reported item before the change commits, would let a later registry-driven re-emit report\n // this reason instead of `none`.\n if (this.state.activeIndex !== activeIndex) {\n const item = activeIndex === null ? undefined : this.context.itemDomElements.current[activeIndex];\n const isWriteBack = item === this.context.reportedItem;\n this.context.highlightReason = isWriteBack ? 'none' : reason;\n this.context.highlightEvent = isWriteBack ? undefined : event;\n }\n this.set('activeIndex', activeIndex);\n }\n highlightItem(element, reason, event) {\n const index = this.context.itemDomElements.current.indexOf(element);\n if (index > -1) {\n this.setActiveIndex(index, reason, event);\n }\n }\n}\n\n/**\n * Creates the inert fallback store used by detached handle-backed triggers while no `Menu.Root` is\n * attached. It preserves a menu-specific trigger registry in context so detached triggers can\n * register before migrating to the live root store. `setOpen` is a no-op (matching the inert\n * reads/writes of `NullStore`), so a trigger can hand the store to focus-guard helpers that expect\n * `setOpen` without it ever taking effect while detached.\n */\nexport function createNullMenuStore() {\n const triggerElements = new PopupTriggerMap();\n const store = new NullStore(Object.freeze(createInitialState(triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors);\n return Object.assign(store, {\n setOpen: NOOP\n });\n}\nfunction createInitialContext(triggerElements) {\n return {\n positionerRef: /*#__PURE__*/React.createRef(),\n popupRef: /*#__PURE__*/React.createRef(),\n typingRef: {\n current: false\n },\n itemDomElements: {\n current: []\n },\n itemLabels: {\n current: []\n },\n highlightReason: 'none',\n highlightEvent: undefined,\n reportedItem: undefined,\n allowMouseUpTriggerRef: {\n current: false\n },\n virtualFocusRef: undefined,\n triggerFocusTargetRef: /*#__PURE__*/React.createRef(),\n beforeTriggerFocusGuardRef: /*#__PURE__*/React.createRef(),\n beforeContentFocusGuardRef: /*#__PURE__*/React.createRef(),\n onOpenChangeComplete: undefined,\n triggerElements\n };\n}\nfunction createInitialState(triggerElements, floatingId, nested = false, initialState) {\n return {\n ...createInitialPopupStoreState(triggerElements, floatingId, nested),\n disabled: false,\n modal: true,\n openMethod: null,\n keyboardOpen: false,\n allowMouseEnter: false,\n highlightItemOnHover: true,\n parent: {\n type: undefined\n },\n rootId: undefined,\n activeIndex: null,\n listElement: null,\n filterTriggerProps: EMPTY_OBJECT,\n inputProps: EMPTY_OBJECT,\n inputFocused: false,\n highlightedItem: undefined,\n hoverEnabled: true,\n instantType: undefined,\n openChangeReason: null,\n floatingTreeRoot: new FloatingTreeStore(),\n floatingNodeId: undefined,\n floatingParentNodeId: null,\n itemProps: EMPTY_OBJECT,\n keyboardEventRelay: undefined,\n closeDelay: 0,\n adaptiveOrigin: undefined,\n ...initialState\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * What `Menu.FilterProvider` hands to the root directly inside it: the filterable root\n * implementations (the provider is their only importer) and the filter props.\n */\n\n/**\n * Non-null only directly below a provider. The root that consumes it resets it, so a plain\n * `Menu.SubmenuRoot` inside a filterable menu stays plain.\n */\nexport const MenuFilterProviderContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenuFilterProviderContext.displayName = \"MenuFilterProviderContext\";","import { REASONS } from \"../../internals/reasons.mjs\";\n\n/**\n * Keyboard and assistive-technology activations produce `detail === 0` clicks; mouse-gesture\n * clicks (including the synthesized drag-release click from `useMenuItemCommonProps`) carry\n * `detail >= 1`.\n */\nexport function isKeyboardClick(reason, event) {\n return (reason === REASONS.triggerPress || reason === REASONS.itemPress) && event?.detail === 0;\n}\n\n/**\n * Whether a menu opens from the keyboard, which lands focus in the popup. Arrow keys report\n * `list-navigation`; Enter and Space dispatch a click carrying no pointer detail.\n */\nexport function isKeyboardOpen(reason, event) {\n return reason === REASONS.listNavigation || isKeyboardClick(reason, event);\n}","'use client';\n\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { fastComponent } from '@base-ui/utils/fastHooks';\nimport { FloatingTree, useDismiss, useFloatingNodeId, useFloatingParentNodeId, useListNavigation, useTypeahead, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.mjs\";\nimport { MenuRootContext, useMenuRootContext } from \"./MenuRootContext.mjs\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.mjs\";\nimport { TYPEAHEAD_RESET_MS } from \"../../internals/constants.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useAnimationsFinished } from \"../../internals/useAnimationsFinished.mjs\";\nimport { MenuStore } from \"../store/MenuStore.mjs\";\nimport { attachPreventUnmountOnClose, FOCUSABLE_POPUP_PROPS, createPopupOpenState, PopupHandleAttachment, useImplicitActiveTrigger, useOpenStateTransitions, usePopupInteractionProps } from \"../../utils/popups/index.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { MenuFilterProviderContext } from \"../filter-provider/MenuFilterProviderContext.mjs\";\nimport { isKeyboardClick, isKeyboardOpen } from \"../utils/isKeyboardOpen.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuRootInternal = fastComponent(function MenuRootInternal(props) {\n const {\n children,\n open: openProp,\n onOpenChange,\n onOpenChangeComplete,\n onItemHighlighted: onItemHighlightedProp,\n defaultOpen = false,\n disabled: disabledProp = false,\n modal: modalProp,\n loopFocus = true,\n orientation = 'vertical',\n actionsRef,\n closeParentOnEsc = false,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null,\n highlightItemOnHover = true,\n isSubmenu = false,\n virtualFocus = false,\n virtualFocusRef,\n allowEscape = true,\n resetOnPointerLeave = true\n } = props;\n const contextMenuContext = useContextMenuRootContext(true);\n const parentMenuRootContext = useMenuRootContext(true);\n const menubarContext = useMenubarContext(true);\n\n // Depend on the stable pieces rather than the parent context object, so a parent context\n // invalidation doesn't cascade into every descendant root's context.\n const enclosingMenuStore = parentMenuRootContext?.store;\n const parentVirtualFocus = parentMenuRootContext?.virtualFocus ?? false;\n const parentFromContext = React.useMemo(() => {\n if (isSubmenu && enclosingMenuStore) {\n return {\n type: 'menu',\n store: enclosingMenuStore\n };\n }\n if (menubarContext) {\n return {\n type: 'menubar',\n context: menubarContext\n };\n }\n\n // Ensure this is not a Menu nested inside ContextMenu.Trigger.\n // ContextMenu parentContext is always undefined as ContextMenu.Root is instantiated with\n // <MenuRootContext.Provider value={undefined}>\n if (contextMenuContext && !enclosingMenuStore) {\n return {\n type: 'context-menu',\n context: contextMenuContext\n };\n }\n return {\n type: undefined\n };\n }, [contextMenuContext, enclosingMenuStore, menubarContext, isSubmenu]);\n const rootId = useBaseUiId();\n // React 17 resolves generated ids in an effect, so they must be read live rather than captured\n // in a state initializer.\n const defaultFloatingId = useBaseUiId();\n const [renderedFloatingId, setRenderedFloatingId] = React.useState(undefined);\n\n // A registered `''` means the popup rendered with an explicitly empty id, so nothing may point\n // at the generated fallback.\n const floatingId = (renderedFloatingId ?? defaultFloatingId) || undefined;\n const floatingParentNodeIdFromContext = useFloatingParentNodeId();\n const parentMenuStore = parentFromContext.type === 'menu' ? parentFromContext.store : undefined;\n // An initially open submenu should animate in only when the user watches it appear, i.e. when\n // its subtree mounts because the parent popup is playing its own enter transition. A parent\n // that was `defaultOpen` at page load never passes through `'starting'`, and under a\n // `keepMounted` parent these initializers run at page load while the parent's status is still\n // `undefined` — in both cases the submenu is page-load content that must not animate. Gated on\n // being open at mount so a closed submenu doesn't seed `instantType` it would never clear. Read\n // during the first render only — consumed exclusively by first-render initializers below\n // (`useState` and the store's initial state).\n const animateInitialOpen = (openProp ?? defaultOpen) && parentMenuStore?.state.transitionStatus === 'starting';\n\n // Mirror an instantly-opened parent (e.g. keyboard click) so `[data-instant]` styling\n // suppresses the enter transition on both popups or neither. Captured once —\n // `animateInitialOpen` is only meaningful during the first render.\n const seededInstantType = useRefWithInit(() => animateInitialOpen ? parentMenuStore?.state.instantType : undefined).current;\n const store = useRefWithInit(() => {\n const menuStore = new MenuStore({\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n parent: parentFromContext,\n disabled: disabledProp,\n highlightItemOnHover,\n modal: parentFromContext.type === undefined ? modalProp : undefined,\n rootId,\n instantType: seededInstantType\n }, floatingId, floatingParentNodeIdFromContext != null);\n // A stable ref object, so descendants can read it during render from the first commit.\n menuStore.context.virtualFocusRef = virtualFocusRef;\n return menuStore;\n }).current;\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const floatingNodeIdFromContext = useFloatingNodeId(floatingTreeRoot);\n const open = store.useState('open');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const positionerElement = store.useState('positionerElement');\n const hoverEnabled = store.useState('hoverEnabled');\n const disabled = store.useState('disabled');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const parent = store.useState('parent');\n const activeIndex = store.useState('activeIndex');\n const keyboardOpen = store.useState('keyboardOpen');\n const payload = store.useState('payload');\n const floatingParentNodeId = store.useState('floatingParentNodeId');\n const openEventRef = React.useRef(null);\n const allowOutsidePressDismissalRef = React.useRef(parent.type !== 'context-menu');\n const allowOutsidePressDismissalTimeout = useTimeout();\n const allowTouchToCloseRef = React.useRef(true);\n const allowTouchToCloseTimeout = useTimeout();\n const nested = floatingParentNodeId != null;\n if (process.env.NODE_ENV !== 'production') {\n if (parent.type !== undefined && modalProp !== undefined) {\n console.warn('Base UI: The `modal` prop is not supported on nested menus. It will be ignored.');\n }\n }\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n store.useSyncedValues({\n disabled: disabledProp,\n highlightItemOnHover,\n modal: parent.type === undefined ? modalProp : undefined,\n openMethod,\n rootId\n });\n useImplicitActiveTrigger(store);\n const {\n forceUnmount,\n transitionStatus\n } = useOpenStateTransitions(open, store, () => {\n store.set('allowMouseEnter', false);\n }, animateInitialOpen);\n const runOnceAnimationsFinish = useAnimationsFinished(store.context.popupRef);\n\n // An inherited `instantType` is only for the initial reveal. A later controlled `open` flip\n // bypasses `setOpen`, so nothing would reset it and `[data-instant]` would wrongly suppress\n // every subsequent transition. Clear it once the enter phase settles, unless an interactive\n // open change already replaced it.\n React.useEffect(() => {\n if (seededInstantType === undefined) {\n return undefined;\n }\n const clearSeededInstantType = () => {\n if (store.state.instantType === seededInstantType) {\n store.set('instantType', undefined);\n }\n };\n\n // A controlled close can interrupt the initial enter before the animations-finished cleanup\n // below fires (its abort cancels the pending callback, and a closed popup schedules no new\n // one). Nothing is left to protect once closing starts — the exit's suppression was already\n // decided at its trigger commit — so clear now or the next reopen renders a stale\n // `[data-instant]`.\n if (!open) {\n clearSeededInstantType();\n return undefined;\n }\n if (transitionStatus !== undefined) {\n return undefined;\n }\n\n // With no popup element (e.g. its subtree is suspended or waiting on data), there is no\n // enter transition to protect, and `useAnimationsFinished` would return without invoking the\n // callback — a ref assignment alone would never rerun this effect, leaving the seed stuck.\n // Clear immediately: a popup that appears after the reveal settles is page-load-like content.\n if (store.context.popupRef.current == null) {\n clearSeededInstantType();\n return undefined;\n }\n const abortController = new AbortController();\n runOnceAnimationsFinish(clearSeededInstantType, abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [seededInstantType, open, transitionStatus, runOnceAnimationsFinish, store]);\n useIsoLayoutEffect(() => {\n if (contextMenuContext && !parentMenuRootContext) {\n // This is a context menu root.\n // It doesn't support detached triggers yet, so we have to sync the parent context manually.\n store.update({\n parent: {\n type: 'context-menu',\n context: contextMenuContext\n },\n floatingNodeId: floatingNodeIdFromContext,\n floatingParentNodeId: floatingParentNodeIdFromContext\n });\n } else if (parentMenuRootContext || !store.select('activeTriggerElement')) {\n // Without an active trigger, the root must supply its own tree IDs.\n // Read the store here: a trigger can register after render, before this effect.\n store.update({\n floatingNodeId: floatingNodeIdFromContext,\n floatingParentNodeId: floatingParentNodeIdFromContext\n });\n }\n }, [contextMenuContext, parentMenuRootContext, floatingNodeIdFromContext, floatingParentNodeIdFromContext, activeTriggerElement, store]);\n React.useEffect(() => {\n if (!open) {\n openEventRef.current = null;\n }\n if (parent.type !== 'context-menu') {\n return;\n }\n if (!open) {\n allowOutsidePressDismissalTimeout.clear();\n allowOutsidePressDismissalRef.current = false;\n return;\n }\n\n // With `mousedown` outside press events and long press touch input, there\n // needs to be a grace period after opening to ensure the dismissal event\n // doesn't fire immediately after open.\n allowOutsidePressDismissalTimeout.start(500, () => {\n allowOutsidePressDismissalRef.current = true;\n });\n }, [allowOutsidePressDismissalTimeout, open, parent.type]);\n useIsoLayoutEffect(() => {\n if (!open && !hoverEnabled) {\n store.set('hoverEnabled', true);\n }\n }, [open, hoverEnabled, store]);\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n const reason = eventDetails.reason;\n\n // Read the store directly, as relayed tree events and stale hover timers can request\n // a close after the state changed but before this component re-rendered.\n if (!nextOpen && !store.select('open')) {\n return;\n }\n if (open === nextOpen && eventDetails.trigger === activeTriggerElement && lastOpenChangeReason === reason) {\n return;\n }\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n\n // Do not immediately reset the activeTriggerId to allow\n // exit animations to play and focus to be returned correctly.\n if (!nextOpen && eventDetails.trigger == null) {\n eventDetails.trigger = activeTriggerElement ?? undefined;\n }\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const nativeEvent = eventDetails.event;\n if (nextOpen === false && reason !== REASONS.itemPress && nativeEvent?.type === 'click' && nativeEvent.pointerType === 'touch' && !allowTouchToCloseRef.current) {\n return;\n }\n\n // Prevent the menu from closing on mobile devices that have a delayed click event.\n // In some cases the menu, when tapped, will fire the focus event first and then the click event.\n // Without this guard, the menu will close immediately after opening.\n if (nextOpen && reason === REASONS.triggerFocus) {\n allowTouchToCloseRef.current = false;\n allowTouchToCloseTimeout.start(300, () => {\n allowTouchToCloseRef.current = true;\n });\n } else {\n allowTouchToCloseRef.current = true;\n allowTouchToCloseTimeout.clear();\n }\n const isDismissClose = !nextOpen && (reason === REASONS.escapeKey || reason == null);\n openEventRef.current = eventDetails.event;\n const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n popupOpenState.openChangeReason = reason;\n popupOpenState.keyboardOpen = nextOpen && isKeyboardOpen(reason, nativeEvent);\n if (parent.type === 'menubar' && (reason === REASONS.triggerFocus || reason === REASONS.focusOut || reason === REASONS.triggerHover || reason === REASONS.listNavigation || reason === REASONS.siblingOpen)) {\n popupOpenState.instantType = 'group';\n } else if (isKeyboardClick(reason, nativeEvent)) {\n popupOpenState.instantType = 'click';\n } else if (isDismissClose) {\n popupOpenState.instantType = 'dismiss';\n } else {\n popupOpenState.instantType = undefined;\n }\n\n // `instantType` must land in the same update that mounts the popup subtree: in React 17\n // legacy mode this `update` can flush synchronously, and a separate `instantType` write\n // after it would come too late for an initially open submenu seeding its own store from\n // this one during that flush.\n store.update(popupOpenState);\n });\n const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested: floatingParentNodeIdFromContext != null,\n onOpenChange: setOpen\n });\n const floatingEvents = floatingRootContext.context.events;\n\n // Registered in a layout effect (not a passive one) so `setOpen` emits from imperative\n // `MenuHandle.open()` calls made in the same commit this root mounts — e.g. from another layout\n // effect during a route-transition handoff — are received instead of being silently dropped.\n useIsoLayoutEffect(() => {\n const handleSetOpenEvent = ({\n open: nextOpen,\n eventDetails\n }) => setOpen(nextOpen, eventDetails);\n floatingEvents.on('setOpen', handleSetOpenEvent);\n return () => {\n floatingEvents?.off('setOpen', handleSetOpenEvent);\n };\n }, [floatingEvents, setOpen]);\n useIsoLayoutEffect(() => store.subscribeToParentMenu(), [store]);\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.imperativeAction));\n }, [store]);\n React.useImperativeHandle(actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n let ctx;\n if (parent.type === 'context-menu') {\n ctx = parent.context;\n }\n React.useImperativeHandle(ctx?.positionerRef, () => positionerElement, [positionerElement]);\n React.useImperativeHandle(ctx?.actionsRef, () => ({\n setOpen\n }), [setOpen]);\n const dismiss = useDismiss(floatingRootContext, {\n enabled: !disabled,\n bubbles: {\n escapeKey: closeParentOnEsc && parent.type === 'menu'\n },\n outsidePress() {\n if (parent.type !== 'context-menu' || openEventRef.current?.type === 'contextmenu') {\n return true;\n }\n return allowOutsidePressDismissalRef.current;\n },\n externalTree: nested ? floatingTreeRoot : undefined\n });\n const direction = useDirection();\n const listNavigation = useListNavigation(floatingRootContext, {\n enabled: !disabled,\n listRef: store.context.itemDomElements,\n activeIndex,\n virtual: virtualFocus,\n nested: parent.type === 'menubar' || !virtualFocus && parent.type !== undefined,\n parentOrientation: parent.type === 'menubar' ? parent.context.orientation : undefined,\n loopFocus,\n // Filtered menus keep DOM focus on the input, while keyboard and virtual opens initially\n // highlight an item as ordinary menus do. The input stays in the arrow-key loop unless the\n // filter highlights automatically.\n focusItemOnOpen: virtualFocus ? keyboardOpen : undefined,\n allowEscape: virtualFocus && loopFocus && allowEscape,\n orientation,\n // A virtual-focus list can navigate on either axis, but its trigger always opens on the\n // vertical one.\n triggerOrientation: virtualFocus ? 'vertical' : orientation,\n rtl: direction === 'rtl',\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex, event) {\n store.setActiveIndex(nextActiveIndex, getHighlightReason(event), event?.nativeEvent);\n },\n // A virtual-focus submenu's keyboard opening is orchestrated by its navigation wrapper based\n // on both menus' orientations; the generic arrow-key opening would also react to the parent's\n // forwarded cross-axis keys while closed.\n openOnArrowKeyDown: parent.type !== 'context-menu' && !(virtualFocus && isSubmenu),\n externalTree: !virtualFocus && nested ? floatingTreeRoot : undefined,\n nestedReturnFocusRef: parentMenuStore?.context.virtualFocusRef,\n focusItemOnHover: highlightItemOnHover,\n resetOnPointerLeave\n });\n const onTyping = React.useCallback(nextTyping => {\n store.context.typingRef.current = nextTyping;\n }, [store]);\n const typeahead = useTypeahead(floatingRootContext, {\n // Under virtual focus the input owns typing, so typeahead would race the filter query.\n enabled: !disabled && !virtualFocus,\n listRef: store.context.itemLabels,\n elementsRef: store.context.itemDomElements,\n activeIndex,\n resetMs: TYPEAHEAD_RESET_MS,\n onMatch: (index, event) => {\n if (open && index !== activeIndex) {\n store.setActiveIndex(index, REASONS.keyboard, event.nativeEvent);\n }\n },\n onTyping\n });\n const onItemHighlighted = useStableCallback(onItemHighlightedProp);\n const lastHighlightIndexRef = React.useRef(-1);\n\n // Runs when `activeIndex` commits and again when the item registry settles, since an index\n // can come to point at a different element while its value stays the same.\n const syncHighlightedItem = useStableCallback(() => {\n const index = store.state.activeIndex;\n const item = index === null ? undefined : store.context.itemDomElements.current[index] ?? undefined;\n // An item removed in this commit stays registered until the list flushes, which calls back\n // here with the settled registry.\n if (item?.isConnected === false) {\n return;\n }\n const itemIndex = item === undefined ? -1 : index;\n if (lastHighlightIndexRef.current === itemIndex && store.context.reportedItem === item) {\n return;\n }\n lastHighlightIndexRef.current = itemIndex;\n store.context.reportedItem = item;\n // Only virtual focus renders from the highlighted element. Publishing it in every menu would\n // notify each item's subscription on every highlight change.\n if (virtualFocus) {\n store.set('highlightedItem', item);\n }\n // The tag left by the write that produced this committed value.\n const {\n highlightReason,\n highlightEvent\n } = store.context;\n store.context.highlightReason = REASONS.none;\n store.context.highlightEvent = undefined;\n if (!onItemHighlightedProp) {\n return;\n }\n onItemHighlighted(item, createGenericEventDetails(highlightReason, highlightEvent, {\n label: item === undefined ? undefined : store.context.itemLabels.current[itemIndex] ?? undefined\n }));\n });\n useIsoLayoutEffect(() => {\n syncHighlightedItem();\n }, [activeIndex, syncHighlightedItem]);\n\n // Under virtual focus an element inside the popup holds real focus, so it takes the\n // navigation's reference props (`aria-activedescendant` and the key handling) and the trigger\n // keeps only the props that open the menu.\n const openTriggerProps = React.useMemo(() => {\n if (!virtualFocus) {\n return listNavigation.reference;\n }\n if (!listNavigation.trigger) {\n return EMPTY_OBJECT;\n }\n // Focusing the trigger while the menu is open must not seed the virtual highlight. This can\n // happen before a pointer press closes the menu in Safari.\n const {\n onFocus,\n ...rest\n } = listNavigation.trigger;\n return rest;\n }, [virtualFocus, listNavigation.reference, listNavigation.trigger]);\n store.useSyncedValue('inputProps', virtualFocus ? listNavigation.reference ?? EMPTY_OBJECT : EMPTY_OBJECT);\n const activeTriggerProps = React.useMemo(() => {\n const mergedProps = mergeProps(typeahead.reference, openTriggerProps, dismiss.reference, {\n onMouseMove() {\n store.set('allowMouseEnter', true);\n }\n }, interactionTypeProps);\n mergedProps['aria-haspopup'] = 'menu';\n mergedProps['aria-expanded'] = open;\n return mergedProps;\n }, [store, typeahead.reference, openTriggerProps, dismiss.reference, interactionTypeProps, open]);\n const inactiveTriggerProps = React.useMemo(() => {\n const mergedProps = mergeProps(listNavigation.trigger, dismiss.trigger, interactionTypeProps);\n mergedProps['aria-haspopup'] = 'menu';\n mergedProps['aria-expanded'] = false;\n return mergedProps;\n }, [listNavigation.trigger, dismiss.trigger, interactionTypeProps]);\n\n // The initial render has no store subscribers yet. Seed these props before triggers render so\n // the synchronization effect below doesn't make every trigger render twice in the first commit.\n useRefWithInit(() => {\n store.update({\n inactiveTriggerProps\n });\n return null;\n });\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, {\n onMouseMove() {\n store.set('allowMouseEnter', true);\n if (parent.type === 'menu') {\n store.set('hoverEnabled', false);\n }\n },\n onClick() {\n if (store.select('hoverEnabled')) {\n store.set('hoverEnabled', false);\n }\n },\n onKeyDown(event) {\n // The Menubar's CompositeRoot captures keyboard events via\n // event delegation. This works well when Menu.Root is nested inside Menubar,\n // but with detached triggers we need to manually forward the event to the CompositeRoot.\n const relay = store.select('keyboardEventRelay');\n if (relay && !event.isPropagationStopped()) {\n relay(event);\n }\n }\n }, typeahead.floating, listNavigation.floating, dismiss.floating), [parent.type, store, typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n usePopupInteractionProps(store, {\n floatingRootContext,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n itemProps\n });\n const context = React.useMemo(() => ({\n store,\n parent: parentFromContext,\n orientation,\n loopFocus,\n allowEscape,\n defaultFloatingId,\n setRenderedFloatingId,\n virtualFocus,\n parentVirtualFocus,\n syncHighlightedItem\n }), [store, parentFromContext, orientation, loopFocus, allowEscape, defaultFloatingId, virtualFocus, parentVirtualFocus, syncHighlightedItem]);\n const renderedChildren = typeof children === 'function' ? children({\n payload\n }) : children;\n let content = /*#__PURE__*/_jsxs(MenuRootContext.Provider, {\n value: context,\n children: [handle && /*#__PURE__*/_jsx(PopupHandleAttachment, {\n handle: handle,\n store: store\n }), renderedChildren]\n });\n if (parent.type === undefined || parent.type === 'context-menu') {\n // set up a FloatingTree to provide the context to nested menus\n content = /*#__PURE__*/_jsx(FloatingTree, {\n externalTree: floatingTreeRoot,\n children: content\n });\n }\n return content;\n});\n\n/**\n * Groups all parts of the menu.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRootInternal.displayName = \"MenuRootInternal\";\nexport function MenuRoot(props) {\n const filterProvider = React.useContext(MenuFilterProviderContext);\n if (filterProvider === null) {\n return /*#__PURE__*/_jsx(MenuRootInternal, {\n ...props\n });\n }\n const FilterRoot = filterProvider.Root;\n return (\n /*#__PURE__*/\n // The root consumes its provider so a plain submenu inside doesn't inherit it.\n _jsx(MenuFilterProviderContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(FilterRoot, {\n ...filterProvider.options,\n ...props\n })\n })\n );\n}","'use client';\n\nimport * as React from 'react';\nimport { MenuRootInternal } from \"../root/MenuRoot.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { MenuSubmenuRootContext } from \"./MenuSubmenuRootContext.mjs\";\nimport { MenuFilterProviderContext } from \"../filter-provider/MenuFilterProviderContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport { useMenuSubmenuRootContext } from \"./MenuSubmenuRootContext.mjs\";\nconst EMPTY_SUBMENU_ROOT_CONTEXT = {};\n\n/**\n * Groups all parts of a submenu.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport function MenuSubmenuRoot(props) {\n // Throws when the submenu isn't inside a menu.\n useMenuRootContext();\n const filterProvider = React.useContext(MenuFilterProviderContext);\n if (filterProvider !== null) {\n const FilterSubmenuRoot = filterProvider.SubmenuRoot;\n return /*#__PURE__*/_jsx(MenuFilterProviderContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(FilterSubmenuRoot, {\n ...filterProvider.options,\n ...props\n })\n });\n }\n return /*#__PURE__*/_jsx(MenuSubmenuRootContext.Provider, {\n value: EMPTY_SUBMENU_ROOT_CONTEXT,\n children: /*#__PURE__*/_jsx(MenuRootInternal, {\n ...props,\n isSubmenu: true\n })\n });\n}","import { getParentNode, isHTMLElement, isLastTraversableNode } from '@floating-ui/utils/dom';\nexport function findRootOwnerId(node) {\n if (isHTMLElement(node) && node.hasAttribute('data-rootownerid')) {\n return node.getAttribute('data-rootownerid');\n }\n if (isLastTraversableNode(node)) {\n return undefined;\n }\n return findRootOwnerId(getParentNode(node));\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\n/**\n * Returns `click` and `mousedown` handlers that fix the behavior of triggers of popups that are toggled by different events.\n * For example, a button that opens a popup on mousedown and closes it on click.\n * This hook prevents the popup from closing immediately after the mouse button is released.\n */\nexport function useMixedToggleClickHandler(params) {\n const {\n enabled = true,\n mouseDownAction,\n open\n } = params;\n const ignoreClickRef = React.useRef(false);\n return React.useMemo(() => {\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n return {\n onMouseDown: event => {\n if (mouseDownAction === 'open' && !open || mouseDownAction === 'close' && open) {\n ignoreClickRef.current = true;\n ownerDocument(event.currentTarget).addEventListener('click', () => {\n ignoreClickRef.current = false;\n }, {\n once: true\n });\n }\n },\n onClick: event => {\n if (ignoreClickRef.current) {\n ignoreClickRef.current = false;\n event.preventBaseUIHandler();\n }\n }\n };\n }, [enabled, mouseDownAction, open]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { fastComponentRef } from '@base-ui/utils/fastHooks';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { safePolygon, useClick, useFloatingTree, useFocus, useHoverReferenceInteraction, useFloatingNodeId, useFloatingParentNodeId } from \"../../floating-ui-react/index.mjs\";\nimport { FloatingTreeStore } from \"../../floating-ui-react/components/FloatingTreeStore.mjs\";\nimport { contains } from \"../../floating-ui-react/utils.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/useButton.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { CompositeItem } from \"../../internals/composite/item/CompositeItem.mjs\";\nimport { useCompositeRootContext } from \"../../internals/composite/root/CompositeRootContext.mjs\";\nimport { findRootOwnerId } from \"../utils/findRootOwnerId.mjs\";\nimport { usePopupHandleStore, useTriggerDataForwarding } from \"../../utils/popups/index.mjs\";\nimport { useTriggerFocusGuards } from \"../../utils/popups/useTriggerFocusGuards.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useMixedToggleClickHandler } from \"../../utils/useMixedToggleClickHandler.mjs\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.mjs\";\nimport { PATIENT_CLICK_THRESHOLD } from \"../../internals/constants.mjs\";\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\n\n/**\n * A button that opens the menu.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuTrigger = fastComponentRef(function MenuTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled: disabledProp = false,\n nativeButton = true,\n id: idProp,\n openOnHover: openOnHoverProp,\n delay = 100,\n closeDelay = 0,\n handle,\n payload,\n ...elementProps\n } = componentProps;\n const rootContext = useMenuRootContext(true);\n const handleStore = usePopupHandleStore(handle);\n const store = handleStore ?? rootContext?.store;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.' : _formatErrorMessage(85));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const isTriggerActive = store.useState('isTriggerActive', thisTriggerId);\n const floatingRootContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const controlsId = store.useState('triggerControlsId', thisTriggerId);\n const triggerElementRef = React.useRef(null);\n const parent = useMenuParent();\n const compositeRootContext = useCompositeRootContext(true);\n const floatingTreeRootFromContext = useFloatingTree();\n const floatingTreeRoot = React.useMemo(() => {\n return floatingTreeRootFromContext ?? new FloatingTreeStore();\n }, [floatingTreeRootFromContext]);\n const floatingNodeId = useFloatingNodeId(floatingTreeRoot);\n const floatingParentNodeId = useFloatingParentNodeId();\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {\n payload,\n closeDelay,\n parent,\n floatingTreeRoot,\n floatingNodeId,\n floatingParentNodeId,\n keyboardEventRelay: compositeRootContext?.relayKeyboardEvent\n });\n const isInMenubar = parent.type === 'menubar';\n const rootDisabled = store.useState('disabled');\n const disabled = disabledProp || rootDisabled || isInMenubar && parent.context.disabled;\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n React.useEffect(() => {\n if (!isOpenedByThisTrigger && parent.type === undefined) {\n store.context.allowMouseUpTriggerRef.current = false;\n }\n }, [store, isOpenedByThisTrigger, parent.type]);\n const triggerRef = React.useRef(null);\n const allowMouseUpTriggerTimeout = useTimeout();\n const handleDocumentMouseUp = useStableCallback(mouseEvent => {\n if (!triggerRef.current) {\n return;\n }\n allowMouseUpTriggerTimeout.clear();\n store.context.allowMouseUpTriggerRef.current = false;\n const mouseUpTarget = mouseEvent.target;\n if (contains(triggerRef.current, mouseUpTarget) || contains(store.select('positionerElement'), mouseUpTarget) || mouseUpTarget === triggerRef.current) {\n return;\n }\n if (mouseUpTarget != null && findRootOwnerId(mouseUpTarget) === store.select('rootId')) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, triggerRef.current)) {\n return;\n }\n floatingTreeRoot.events.emit('close', {\n domEvent: mouseEvent,\n reason: REASONS.cancelOpen\n });\n });\n React.useEffect(() => {\n const doc = ownerDocument(triggerRef.current);\n if (isOpenedByThisTrigger && store.select('lastOpenChangeReason') === REASONS.triggerHover) {\n doc.addEventListener('mouseup', handleDocumentMouseUp, {\n once: true\n });\n return () => {\n doc.removeEventListener('mouseup', handleDocumentMouseUp);\n };\n }\n return undefined;\n }, [isOpenedByThisTrigger, handleDocumentMouseUp, store]);\n const parentMenubarHasSubmenuOpen = isInMenubar && parent.context.hasSubmenuOpen;\n const openOnHover = openOnHoverProp ?? parentMenubarHasSubmenuOpen;\n const hoverProps = useHoverReferenceInteraction(floatingRootContext, {\n enabled: openOnHover && !disabled && (!isInMenubar || parentMenubarHasSubmenuOpen && !isMountedByThisTrigger),\n handleClose: safePolygon({\n blockPointerEvents: !isInMenubar\n }),\n mouseOnly: true,\n move: false,\n restMs: parent.type === undefined ? delay : undefined,\n delay: {\n close: closeDelay\n },\n triggerElementRef,\n externalTree: floatingTreeRoot,\n isActiveTrigger: isTriggerActive,\n isClosing: () => store.select('transitionStatus') === 'ending'\n });\n\n // Whether to ignore clicks to open the menu.\n // `lastOpenChangeReason` doesn't need to be reactive here, as we need to run this\n // only when `isOpenedByThisTrigger` changes.\n const stickIfOpen = useStickIfOpen(isOpenedByThisTrigger, store.select('lastOpenChangeReason'));\n const click = useClick(floatingRootContext, {\n enabled: !disabled,\n event: isOpenedByThisTrigger && isInMenubar ? 'click' : 'mousedown',\n toggle: true,\n ignoreMouse: false,\n stickIfOpen: parent.type === undefined ? stickIfOpen : false\n });\n const focus = useFocus(floatingRootContext, {\n enabled: !disabled && parentMenubarHasSubmenuOpen\n });\n const mixedToggleHandlers = useMixedToggleClickHandler({\n open: isOpenedByThisTrigger,\n enabled: isInMenubar,\n mouseDownAction: 'open'\n });\n const localInteractionProps = React.useMemo(() => mergeProps(focus.reference, click.reference), [focus.reference, click.reference]);\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n // A filterable menu keeps real focus inside its popup and publishes what its trigger needs.\n const filterTriggerProps = store.useState('filterTriggerProps');\n const {\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n } = useTriggerFocusGuards(store, triggerElementRef);\n const state = {\n disabled,\n open: isOpenedByThisTrigger\n };\n const ref = [triggerRef, forwardedRef, buttonRef, registerTrigger, triggerElementRef];\n const props = [localInteractionProps, hoverProps ?? EMPTY_OBJECT, rootTriggerProps, {\n 'aria-haspopup': 'menu',\n 'aria-controls': controlsId,\n id: thisTriggerId,\n onMouseDown: event => {\n if (store.select('open')) {\n return;\n }\n\n // mousedown -> mouseup on menu item should not trigger it within 200ms.\n allowMouseUpTriggerTimeout.start(200, () => {\n store.context.allowMouseUpTriggerRef.current = true;\n });\n const doc = ownerDocument(event.currentTarget);\n doc.addEventListener('mouseup', handleDocumentMouseUp, {\n once: true\n });\n }\n }, filterTriggerProps, isInMenubar ? {\n role: 'menuitem'\n } : {}, mixedToggleHandlers, elementProps, getButtonProps];\n const element = useRenderElement('button', componentProps, {\n enabled: !isInMenubar,\n stateAttributesMapping: pressableTriggerOpenStateMapping,\n state,\n ref,\n props\n });\n if (isInMenubar) {\n return /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"button\",\n render: render,\n className: className,\n style: style,\n state: state,\n refs: ref,\n props: props,\n stateAttributesMapping: pressableTriggerOpenStateMapping\n });\n }\n\n // A fragment with key is required to ensure that the `element` is mounted to the same DOM node\n // regardless of whether the focus guards are rendered or not.\n\n if (isOpenedByThisTrigger) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.beforeTriggerFocusGuardRef,\n onFocus: handlePreFocusGuardFocus\n }, `${thisTriggerId}-pre-focus-guard`), /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId), /*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.triggerFocusTargetRef,\n onFocus: handleFocusTargetFocus\n }, `${thisTriggerId}-post-focus-guard`)]\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId);\n});\nif (process.env.NODE_ENV !== \"production\") MenuTrigger.displayName = \"MenuTrigger\";\n/**\n * Determines whether to ignore clicks after a hover-open.\n */\nfunction useStickIfOpen(open, openReason) {\n const stickIfOpenTimeout = useTimeout();\n const [stickIfOpen, setStickIfOpen] = React.useState(false);\n useIsoLayoutEffect(() => {\n if (open && openReason === REASONS.triggerHover) {\n // Only allow \"patient\" clicks to close the menu if it's open.\n // If they clicked within 500ms of the menu opening, keep it open.\n setStickIfOpen(true);\n stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n setStickIfOpen(false);\n });\n } else if (!open) {\n stickIfOpenTimeout.clear();\n setStickIfOpen(false);\n }\n }, [open, openReason, stickIfOpenTimeout]);\n return stickIfOpen;\n}\nfunction useMenuParent() {\n const menubarContext = useMenubarContext(true);\n const parent = React.useMemo(() => {\n if (menubarContext) {\n return {\n type: 'menubar',\n context: menubarContext\n };\n }\n return {\n type: undefined\n };\n }, [menubarContext]);\n return parent;\n}","'use client';\n\nimport * as React from 'react';\nimport { useRenderElement } from \"../internals/useRenderElement.mjs\";\n\n/**\n * A separator element accessible to screen readers.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)\n */\nexport const Separator = /*#__PURE__*/React.forwardRef(function SeparatorComponent(componentProps, forwardedRef) {\n const {\n className,\n render,\n orientation = 'horizontal',\n style,\n ...elementProps\n } = componentProps;\n const state = {\n orientation\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: [{\n role: 'separator',\n 'aria-orientation': orientation\n }, elementProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") Separator.displayName = \"Separator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { isElementDisabled } from '@base-ui/utils/isElementDisabled';\nimport { warn } from '@base-ui/utils/warn';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { platform } from '@base-ui/utils/platform';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { getTarget } from '@base-ui/utils/shadowDom';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { safePolygon, useClick, useHoverReferenceInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useMenuPositionerContext } from \"../positioner/MenuPositionerContext.mjs\";\nimport { useTriggerRegistration } from \"../../utils/popups/index.mjs\";\nimport { useMenuSubmenuRootContext } from \"../submenu-root/MenuSubmenuRootContext.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst VOICE_OVER_EXPANDED_PROPS = {\n 'aria-expanded': undefined\n};\nconst MenuSubmenuTriggerPlain = /*#__PURE__*/React.forwardRef(function MenuSubmenuTriggerPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n label,\n id: idProp,\n nativeButton = false,\n openOnHover = true,\n delay = 100,\n closeDelay = 0,\n disabled: disabledProp = false,\n ...elementProps\n } = componentProps;\n const context = useMenuRootContext(true);\n if (context?.parent.type !== 'menu') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.' : _formatErrorMessage(37));\n }\n const menuPositionerContext = useMenuPositionerContext();\n const submenuRootContext = useMenuSubmenuRootContext();\n const {\n store,\n parentVirtualFocus\n } = context;\n const parentMenuStore = context.parent.store;\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const thisTriggerId = useBaseUiId(idProp);\n const open = store.useState('open');\n const focusReturnedThroughGuardRef = React.useRef(false);\n const positionerElement = store.useState('positionerElement');\n const floatingRootContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const popupId = store.useState('triggerPopupId', thisTriggerId);\n const baseRegisterTrigger = useTriggerRegistration(thisTriggerId, store);\n\n // Stable, so the merged ref on the rendered element keeps its identity for the trigger's whole\n // lifetime; the latest `closeDelay` is read when it runs.\n const registerTrigger = useStableCallback(element => {\n baseRegisterTrigger(element);\n const activeTriggerElement = store.select('activeTriggerElement');\n if (element !== null && store.select('open') && (activeTriggerElement === element || store.select('activeTriggerId') == null)) {\n store.update({\n activeTriggerId: thisTriggerId ?? null,\n activeTriggerElement: element,\n closeDelay\n });\n }\n });\n const triggerElementRef = React.useRef(null);\n const handleTriggerElementRef = React.useCallback(el => {\n triggerElementRef.current = el;\n store.set('activeTriggerElement', el);\n }, [store]);\n\n // A stable ref does not re-fire when the id changes, so register the rendered element here\n // instead. On React 17 the id also starts out `undefined`, so this is what registers the trigger\n // at all.\n useIsoLayoutEffect(() => {\n registerTrigger(triggerElementRef.current);\n return () => registerTrigger(null);\n }, [registerTrigger, thisTriggerId, store]);\n useIsoLayoutEffect(() => {\n if (!open || !positionerElement) {\n return undefined;\n }\n function handleGuardFocusOut(event) {\n if (getTarget(event) === store.context.beforeContentFocusGuardRef.current) {\n focusReturnedThroughGuardRef.current = event.relatedTarget === triggerElementRef.current;\n }\n }\n\n // Observe focus leaving the guard inside its positioner. When the portal is in a shadow root,\n // the trigger's focus event can report the shadow host as `relatedTarget`, not the guard.\n positionerElement.addEventListener('focusout', handleGuardFocusOut, true);\n return () => {\n focusReturnedThroughGuardRef.current = false;\n positionerElement.removeEventListener('focusout', handleGuardFocusOut, true);\n };\n }, [open, positionerElement, store]);\n store.useSyncedValue('closeDelay', closeDelay);\n const rootDisabled = store.useState('disabled');\n const parentDisabled = parentMenuStore.useState('disabled');\n const disabled = disabledProp || rootDisabled || parentDisabled;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n const element = triggerElementRef.current;\n if (element && isElementDisabled(element) && !disabled) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n warn(`A disabled element was detected on <Menu.SubmenuTrigger>. To properly disable the trigger, use the \\`disabled\\` prop on the component instead of setting it on the rendered element.${ownerStackMessage}`);\n }\n });\n }\n const itemProps = parentMenuStore.useState('itemProps');\n const highlighted = parentMenuStore.useState('isActive', listItem.index);\n const itemMetadata = React.useMemo(() => ({\n type: 'submenu-trigger',\n setActive(event) {\n if (parentMenuStore.select('highlightItemOnHover')) {\n parentMenuStore.setActiveIndex(listItem.index, REASONS.pointer, event);\n }\n }\n }), [parentMenuStore, listItem.index]);\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick: false,\n disabled,\n highlighted,\n id: thisTriggerId,\n store,\n typingRef: parentMenuStore.context.typingRef,\n nativeButton,\n itemMetadata,\n nodeId: menuPositionerContext?.context.nodeId\n });\n const hoverEnabled = store.useState('hoverEnabled');\n const hoverProps = useHoverReferenceInteraction(floatingRootContext, {\n enabled: hoverEnabled && openOnHover && !disabled,\n handleClose: safePolygon({\n blockPointerEvents: true\n }),\n mouseOnly: true,\n move: true,\n restMs: delay,\n delay: {\n open: delay,\n close: closeDelay\n },\n shouldOpen: delay > 0 ? () => parentMenuStore.select('allowMouseEnter') : undefined,\n triggerElementRef,\n externalTree: floatingTreeRoot,\n isClosing: () => store.select('transitionStatus') === 'ending',\n // Chrome can drop the trigger's `mouseleave` during a fast pointer sweep,\n // leaving a stale submenu open (see #5152) — cancel from `mouseout` too.\n guardStaleOpen: true\n });\n const click = useClick(floatingRootContext, {\n enabled: !disabled,\n event: 'mousedown',\n // Without toggling, TalkBack users cannot close the submenu to reach the next parent menu\n // item: moving the virtual cursor outside does not close it, and moving forward again\n // re-enters the still-open submenu. Keep toggling enabled so activating its trigger closes it.\n // Toggling applies to touch and keyboard activation. In hover mode, mouse presses are\n // ignored and the first activation after hover-opening keeps the submenu open.\n toggle: true,\n ignoreMouse: openOnHover,\n stickIfOpen: openOnHover\n });\n const localInteractionProps = click.reference ?? EMPTY_OBJECT;\n const rootTriggerProps = store.useState('triggerProps', true);\n delete rootTriggerProps.id;\n const state = {\n disabled,\n highlighted,\n open\n };\n const openMethod = store.useState('openMethod');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n // Arrow keys open the submenu through list navigation without dispatching a click, so\n // `openMethod` stays null there; Enter and Space do dispatch one and report `keyboard`.\n const openedByKeyboard = lastOpenChangeReason === REASONS.listNavigation || openMethod === 'keyboard';\n const shouldOmitExpanded = open && openedByKeyboard && platform.screenReader.voiceOver;\n const submenuKeyDownProps = submenuRootContext?.onTriggerKeyDown ? {\n onKeyDown: submenuRootContext.onTriggerKeyDown\n } : undefined;\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: triggerOpenStateMapping,\n props: [localInteractionProps, hoverProps, rootTriggerProps,\n // MenuFilterSubmenuRoot overrides the generic trigger handler because entry and exit\n // depend on both the parent and child menu orientations.\n submenuKeyDownProps, itemProps,\n // Opening a submenu changes the trigger's expanded state while the trigger still holds\n // focus, and VoiceOver announces that state change instead of the submenu item that focus\n // moves to a moment later, so the first item is never announced. Dropping the state while\n // the submenu is open avoids the announcement without claiming the submenu is collapsed;\n // `aria-haspopup` still conveys that the item opens a submenu.\n shouldOmitExpanded ? VOICE_OVER_EXPANDED_PROPS : undefined, {\n 'aria-controls': popupId,\n // A virtually focused parent keeps real focus on its input, so the trigger must stay out\n // of the tab order.\n tabIndex: parentVirtualFocus || !(open || highlighted) ? -1 : 0,\n onFocus(event) {\n // Close when focus returns through the submenu's guard to its trigger. This also lets\n // screen reader users move past the trigger in the parent menu. Direct focus from a\n // submenu item, such as on hover, leaves the submenu open.\n if (store.select('open') && focusReturnedThroughGuardRef.current) {\n focusReturnedThroughGuardRef.current = false;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n },\n onBlur() {\n if (highlighted) {\n parentMenuStore.setActiveIndex(null, REASONS.none);\n }\n }\n }, elementProps,\n // `getItemProps` stays last so `useButton` keeps gating consumer handlers while disabled.\n getItemProps],\n ref: [forwardedRef, listItem.ref, itemRef, registerTrigger, handleTriggerElementRef]\n });\n return element;\n});\n\n/**\n * A menu item that opens a submenu.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuTriggerPlain.displayName = \"MenuSubmenuTriggerPlain\";\nexport const MenuSubmenuTrigger = /*#__PURE__*/React.forwardRef(function MenuSubmenuTrigger(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef, 'submenu-trigger');\n if (!filterItem.visible) {\n return null;\n }\n const mergedProps = filterItem.props ? mergeProps(filterItem.props, props) : props;\n return /*#__PURE__*/_jsx(MenuSubmenuTriggerPlain, {\n ...mergedProps,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuTrigger.displayName = \"MenuSubmenuTrigger\";","import * as React from 'react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu'\n\nimport IconProvider from '@/components/atoms/IconProvider'\nimport { cn } from '@/lib/utils'\n\n// Same open/close motion as the tooltip: 200ms fade and grow from 75%, anchored to the trigger side.\nconst dropdownPanelVariants = cva(\n 'flex max-h-[min(25rem,var(--available-height))] flex-col gap-space-2 overflow-y-auto rounded-container border border-border-subtle bg-background-overlay p-space-6 text-text-primary shadow-elevation-2 outline-none transition-[opacity,scale,translate] duration-200 ease-out data-[instant]:transition-none data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n {\n variants: {\n // select: wide list under its trigger, so it fades in with a slight slide from the trigger side, not a corner grow.\n motion: {\n menu: 'origin-[var(--transform-origin)] data-[starting-style]:scale-75 data-[ending-style]:scale-75',\n select:\n 'duration-100 origin-[var(--transform-origin)] data-[starting-style]:scale-95 data-[ending-style]:scale-95 data-[side=bottom]:data-[starting-style]:-translate-y-2 data-[side=bottom]:data-[ending-style]:-translate-y-2 data-[side=top]:data-[starting-style]:translate-y-2 data-[side=top]:data-[ending-style]:translate-y-2',\n },\n width: {\n sm: 'w-44',\n default: 'w-60',\n lg: 'w-80',\n trigger: 'w-(--anchor-width)',\n },\n },\n defaultVariants: {\n motion: 'menu',\n width: 'default',\n },\n },\n)\n\nconst dropdownItemVariants = cva(\n [\n 'group/item flex min-h-8 w-full shrink-0 cursor-pointer items-center gap-space-8 rounded-sm px-space-8 py-space-6 text-left font-lab text-body-md outline-none select-none',\n 'data-highlighted:bg-background-item-hover data-selected:bg-background-brand data-selected:text-text-brand',\n 'focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus',\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n ],\n {\n variants: {\n tone: {\n default: 'text-text-primary',\n destructive: 'text-text-destructive data-highlighted:bg-status-background-error',\n },\n },\n defaultVariants: {\n tone: 'default',\n },\n },\n)\n\nconst dropdownLabelVariants = cva(\n 'flex items-center px-space-8 py-space-6 font-lab text-label-sm text-text-secondary',\n {\n variants: {\n caps: {\n true: 'border-b border-border-subtle uppercase',\n false: '',\n },\n },\n defaultVariants: {\n caps: false,\n },\n },\n)\n\nconst dropdownSeparatorVariants = cva('my-space-4 h-px shrink-0 border-0 bg-border-subtle')\n\n// Scroll preset clips the rows, not the panel, so header and footer stay put; 8 rows plus 7 gaps.\nconst dropdownListVariants = cva('flex max-h-[16.875rem] flex-col gap-space-2 overflow-y-auto outline-none')\n\nconst DropdownMenu = MenuPrimitive.Root\n\nfunction DropdownMenuTrigger(props: MenuPrimitive.Trigger.Props) {\n return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\ntype DropdownMenuContentProps = MenuPrimitive.Popup.Props &\n VariantProps<typeof dropdownPanelVariants> &\n Pick<\n MenuPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'anchor' | 'collisionAvoidance' | 'side' | 'sideOffset'\n > & {\n container?: MenuPrimitive.Portal.Props['container']\n positionerClassName?: string\n // Keeps rows mounted while closed, for items that own a dialog or drawer which must outlive the menu.\n keepMounted?: boolean\n }\n\nfunction DropdownMenuContent({\n align = 'start',\n alignOffset,\n anchor,\n className,\n collisionAvoidance,\n container,\n keepMounted,\n motion,\n positionerClassName,\n side,\n sideOffset = 4,\n width,\n ...props\n}: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal container={container} keepMounted={keepMounted}>\n <MenuPrimitive.Positioner\n data-slot=\"dropdown-menu-positioner\"\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n collisionAvoidance={collisionAvoidance}\n side={side}\n sideOffset={sideOffset}\n className={cn('isolate z-[1600] outline-none', positionerClassName)}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(dropdownPanelVariants({ motion, width }), className)}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n )\n}\n\ntype DropdownMenuItemProps = MenuPrimitive.Item.Props & VariantProps<typeof dropdownItemVariants>\n\nfunction DropdownMenuItem({ className, tone, ...props }: DropdownMenuItemProps) {\n return (\n <MenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n className={cn(dropdownItemVariants({ tone }), className)}\n {...props}\n />\n )\n}\n\ntype DropdownMenuItemTextProps = React.ComponentProps<'span'> & {\n description?: React.ReactNode\n}\n\nfunction DropdownMenuItemText({ children, className, description, ...props }: DropdownMenuItemTextProps) {\n return (\n <span data-slot=\"dropdown-menu-item-text\" className={cn('flex min-w-0 flex-1 flex-col', className)} {...props}>\n <span className=\"truncate\">{children}</span>\n {description ? <span className=\"truncate font-lab text-body-sm text-text-secondary\">{description}</span> : null}\n </span>\n )\n}\n\ntype DropdownMenuShortcutProps = React.ComponentProps<'span'> & {\n keys: string[]\n}\n\nfunction DropdownMenuShortcut({ className, keys, ...props }: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n 'ml-auto flex shrink-0 items-center gap-space-4 font-lab text-label-sm text-text-secondary',\n className,\n )}\n {...props}\n >\n {keys.map((key, index) => (\n <React.Fragment key={`${key}-${index}`}>\n {index > 0 ? <span aria-hidden=\"true\">+</span> : null}\n <kbd className=\"flex h-5 min-w-5 items-center justify-center rounded-md border border-border-default px-space-4 font-[inherit]\">\n {key}\n </kbd>\n </React.Fragment>\n ))}\n </span>\n )\n}\n\ntype DropdownMenuCheckboxItemProps = MenuPrimitive.CheckboxItem.Props\n\nfunction DropdownMenuCheckboxItem({ children, className, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(dropdownItemVariants(), className)}\n {...props}\n >\n <span className=\"flex size-4 shrink-0 items-center justify-center rounded-sm border border-border-default bg-background-input group-data-checked/item:border-border-brand-bold group-data-checked/item:bg-background-brand-bold\">\n <MenuPrimitive.CheckboxItemIndicator className=\"flex text-icon-on-bold\">\n <IconProvider icon=\"check\" size=\"12\" />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup(props: MenuPrimitive.RadioGroup.Props) {\n return <MenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />\n}\n\ntype DropdownMenuRadioItemProps = MenuPrimitive.RadioItem.Props\n\nfunction DropdownMenuRadioItem({ children, className, ...props }: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(dropdownItemVariants(), className)}\n {...props}\n >\n <span className=\"flex size-4 shrink-0 items-center justify-center rounded-pill border border-border-default bg-background-input group-data-checked/item:border-border-brand-bold\">\n <MenuPrimitive.RadioItemIndicator className=\"size-2 rounded-pill bg-background-brand-bold\" />\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n )\n}\n\ntype DropdownMenuListProps = React.ComponentProps<'div'>\n\nfunction DropdownMenuList({ className, ...props }: DropdownMenuListProps) {\n return <div data-slot=\"dropdown-menu-list\" className={cn(dropdownListVariants(), className)} {...props} />\n}\n\nfunction DropdownMenuGroup({ className, ...props }: MenuPrimitive.Group.Props) {\n return (\n <MenuPrimitive.Group\n data-slot=\"dropdown-menu-group\"\n className={cn('flex flex-col gap-space-2', className)}\n {...props}\n />\n )\n}\n\ntype DropdownMenuLabelProps = MenuPrimitive.GroupLabel.Props & VariantProps<typeof dropdownLabelVariants>\n\nfunction DropdownMenuLabel({ caps, className, ...props }: DropdownMenuLabelProps) {\n return (\n <MenuPrimitive.GroupLabel\n data-slot=\"dropdown-menu-label\"\n className={cn(dropdownLabelVariants({ caps }), className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props) {\n return (\n <MenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(dropdownSeparatorVariants(), className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dropdown-menu-header\"\n className={cn(\n 'mb-space-4 box-content flex min-h-6 shrink-0 items-center gap-space-4 border-b border-border-subtle pb-space-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dropdown-menu-footer\"\n className={cn(\n 'mt-space-4 flex shrink-0 items-center gap-space-4 border-t border-border-subtle px-space-8 pt-space-4 pb-space-4',\n className,\n )}\n {...props}\n />\n )\n}\n\nconst DropdownMenuSub = MenuPrimitive.SubmenuRoot\n\ntype DropdownMenuSubTriggerProps = MenuPrimitive.SubmenuTrigger.Props\n\nfunction DropdownMenuSubTrigger({ children, className, ...props }: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(dropdownItemVariants(), 'data-popup-open:bg-background-item-hover', className)}\n {...props}\n >\n {children}\n <IconProvider icon=\"chevron-right\" size=\"16\" className=\"ml-auto text-icon-secondary\" />\n </MenuPrimitive.SubmenuTrigger>\n )\n}\n\nexport {\n dropdownItemVariants,\n dropdownLabelVariants,\n dropdownListVariants,\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuFooter,\n DropdownMenuGroup,\n DropdownMenuHeader,\n DropdownMenuItem,\n DropdownMenuItemText,\n DropdownMenuLabel,\n DropdownMenuList,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n dropdownPanelVariants,\n dropdownSeparatorVariants,\n}\nexport type {\n DropdownMenuCheckboxItemProps,\n DropdownMenuContentProps,\n DropdownMenuItemProps,\n DropdownMenuItemTextProps,\n DropdownMenuLabelProps,\n DropdownMenuListProps,\n DropdownMenuRadioItemProps,\n DropdownMenuShortcutProps,\n DropdownMenuSubTriggerProps,\n}\n"],"names":["platform.engine.webkit","item","REASONS.listNavigation","REASONS.focusOut","index","startIndex","REASONS.none","REASONS.keyboard","REASONS.pointer","ownerWindow","platform.env.jsdom","_formatErrorMessage","REASONS.itemPress","platform.os.mac","MenuCheckboxItemDataAttributes.checked","MenuCheckboxItemDataAttributes.unchecked","MenuCheckboxItemPlain","checked","_jsx","MenuCheckboxItem","MenuCheckboxItemIndicator","MenuGroupPlain","MenuGroup","MenuGroupLabel","MenuItemPlain","MenuItem","MenuPopupPlain","_a","REASONS.outsidePress","MenuPopup","MenuPortal","MenuPositioner","REASONS.siblingOpen","REASONS.triggerHover","_jsxs","MenuRadioGroupPlain","MenuRadioGroup","MenuRadioItemPlain","MenuRadioItem","MenuRadioItemIndicator","REASONS.triggerPress","MenuRootInternal","REASONS.triggerFocus","REASONS.escapeKey","REASONS.imperativeAction","listNavigation","MenuTrigger","REASONS.cancelOpen","MenuSubmenuTriggerPlain","element","platform.screenReader.voiceOver","MenuSubmenuTrigger","MenuPrimitive.Root","MenuPrimitive.Trigger","MenuPrimitive.Portal","MenuPrimitive.Positioner","cn","MenuPrimitive.Popup","MenuPrimitive.Item","MenuPrimitive.CheckboxItem","MenuPrimitive.CheckboxItemIndicator","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.RadioItemIndicator","MenuPrimitive.Group","MenuPrimitive.GroupLabel","MenuPrimitive.Separator","MenuPrimitive.SubmenuRoot","MenuPrimitive.SubmenuTrigger"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,0BAA0B,OAAO;AACxC,SAAOA,UAA0B,MAAM,cAAc,KAAK,MAAM,cAAc;AAChF;AACA,SAAS,SAAS,aAAa,UAAU,YAAY;AACnD,UAAQ,aAAW;AAAA,IACjB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO,YAAY;AAAA,EACzB;AACA;AACO,SAAS,qBAAqB,KAAK,aAAa;AACrD,QAAM,WAAW,QAAQ,YAAY,QAAQ;AAC7C,QAAM,aAAa,QAAQ,cAAc,QAAQ;AACjD,SAAO,SAAS,aAAa,UAAU,UAAU;AACnD;AACO,SAAS,0BAA0B,KAAK,aAAa,KAAK;AAC/D,QAAM,WAAW,QAAQ;AACzB,QAAM,aAAa,MAAM,QAAQ,aAAa,QAAQ;AACtD,SAAO,SAAS,aAAa,UAAU,UAAU,KAAK,QAAQ,WAAW,QAAQ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