// Copyright (c) Meta Platforms, Inc. and affiliates. 'use client'; /** * @file index.ts * @output Exports DropdownMenu, DropdownMenuItem and related types * @position Public API entry point * * SYNC: The item components below are re-exported (aliased) by the other menu * surfaces that reuse the DropdownMenu item pipeline. When you add or remove an * item component here, mirror it in: * - /packages/core/src/ContextMenu/index.ts (ContextMenu* aliases) * - /packages/core/src/Breadcrumbs/index.ts (BreadcrumbMenu* aliases) * Those surfaces render menu items through the same renderDropdownItems + * DropdownMenuContext + useListFocus path, so a new item type (e.g. a submenu) * only shows up in their public API once it's aliased there too. */ export { DropdownMenu, type DropdownMenuProps, type DropdownMenuPresentation, type DropdownMenuButtonProps, type DropdownMenuItemData, type DropdownMenuDividerData, type DropdownMenuSection, type DropdownMenuOption } from "./DropdownMenu.js"; export type { AdaptivePresentation as MenuPresentation } from "../hooks/useAdaptivePresentation.js"; export { DropdownMenuItem, type DropdownMenuItemProps } from "./DropdownMenuItem.js"; // Divider — the compound peer of the data API's `{type: 'divider'}`. Both // modes render this component, so they cannot drift. export { DropdownMenuDivider, type DropdownMenuDividerProps } from "./DropdownMenuDivider.js"; // Selectable items — checkbox (independent) and radio (single-select group). export { DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps } from "./DropdownMenuCheckboxItem.js"; export { DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps } from "./DropdownMenuRadioGroup.js"; export { DropdownMenuRadioItem, type DropdownMenuRadioItemProps } from "./DropdownMenuRadioItem.js"; // Submenu — a single menu row that reveals a nested flyout of its own // children/items. Data mode via DropdownMenuItemData.items. export { DropdownMenuSubMenu, type DropdownMenuSubMenuProps } from "./DropdownMenuSubMenu.js"; // Menu-coordination context — public so consumers can build custom menu items // that read the menu size / close the menu. export { DropdownMenuContext, useDropdownMenuContext, type DropdownMenuContextValue, type DropdownMenuSize } from "./DropdownMenuContext.js";