The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Remove unused Menu API (#27815)
Raphaël Bosi3c66c8fe3d97
diff --git a/packages/twenty-docs/docs.json b/packages/twenty-docs/docs.jsonindex 2cd8c968a1e..4c0747ec3eb 100644--- a/packages/twenty-docs/docs.json+++ b/packages/twenty-docs/docs.json@@ -604,7 +604,6 @@"ui/primitives/surfaces/alert-dialog","ui/primitives/surfaces/card","ui/primitives/surfaces/dialog",- "ui/primitives/surfaces/menu","ui/primitives/surfaces/popover","ui/primitives/surfaces/tooltip"]diff --git a/packages/twenty-docs/navigation/base-structure.json b/packages/twenty-docs/navigation/base-structure.jsonindex 98a725908e2..aa1c0d9f5e5 100644--- a/packages/twenty-docs/navigation/base-structure.json+++ b/packages/twenty-docs/navigation/base-structure.json@@ -620,7 +620,6 @@"ui/primitives/surfaces/alert-dialog","ui/primitives/surfaces/card","ui/primitives/surfaces/dialog",- "ui/primitives/surfaces/menu","ui/primitives/surfaces/popover","ui/primitives/surfaces/tooltip"]diff --git a/packages/twenty-docs/snippets/ui/generated/surfaces/menu.mdx b/packages/twenty-docs/snippets/ui/generated/surfaces/menu.mdxdeleted file mode 100644index 50056d8774d..00000000000--- a/packages/twenty-docs/snippets/ui/generated/surfaces/menu.mdx+++ /dev/null@@ -1,690 +0,0 @@-{/*- * _____ _- *|_ _|_ _____ _ __ | |_ _ _- * | | \ \ /\ / / _ \ '_ \| __| | | | Auto-generated file- * | | \ V V / __/ | | | |_| |_| | DO NOT EDIT - changes will be overwritten- * |_| \_/\_/ \___|_| |_|\__|\__, | Generated by: npx nx generate:ui twenty-docs- * |___/- *- * This file is generated from the documentation data in packages/twenty-ui/generated.- * To update it, edit the component prop types or design tokens in twenty-ui and run:- * npx nx generate:ui twenty-docs- */}--### Menu.Root--<ParamField body="Root.actionsRef" type="RefObject<MenuRootActions | null>">- A ref to imperative actions.- - `unmount`: Manually unmounts the menu.- Call this after any externally controlled closing animation finishes.- - `close`: When specified, the menu can be closed imperatively.-</ParamField>--<ParamField body="Root.children" type="ReactNode | PayloadChildRenderFunction<Payload>">- The content of the menu.- This can be a regular React node or a render function that receives the `payload` of the active trigger.-</ParamField>--<ParamField body="Root.closeParentOnEsc" type="boolean" default="false">- When in a submenu, determines whether pressing the Escape key- closes the entire menu, or only the current child menu.-</ParamField>--<ParamField body="Root.defaultOpen" type="boolean" default="false">- Whether the menu is initially open.-- To render a controlled menu, use the `open` prop instead.-</ParamField>--<ParamField body="Root.defaultTriggerId" type="string | null">- ID of the trigger that the menu is associated with.- This is useful in conjunction with the `defaultOpen` prop to create an initially open menu.-</ParamField>--<ParamField body="Root.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="Root.handle" type="MenuHandle<Payload>">- A handle to associate the menu with a trigger.- If specified, allows external triggers to control the menu's open state.-</ParamField>--<ParamField body="Root.highlightItemOnHover" type="boolean" default="true">- Whether moving the pointer over items should highlight them.- Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state.-</ParamField>--<ParamField body="Root.loopFocus" type="boolean" default="true">- Whether to loop keyboard focus back to the first item- when the end of the list is reached while using the arrow keys.-</ParamField>--<ParamField body="Root.modal" type="boolean" default="true">- Determines if the menu enters a modal state when open.- - `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.- - `false`: user interaction with the rest of the document is allowed.-- On touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.-- Nested menus ignore this prop, and menus opened by hover are never modal.-</ParamField>--<ParamField body="Root.onOpenChange" type="((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)">- Event handler called when the menu is opened or closed.-</ParamField>--<ParamField body="Root.onOpenChangeComplete" type="((open: boolean) => void)">- Event handler called after any animations complete when the menu is opened or closed.-</ParamField>--<ParamField body="Root.open" type="boolean">- Whether the menu is currently open.-</ParamField>--<ParamField body="Root.orientation" type=""horizontal" | "vertical"" default="vertical">- The visual orientation of the menu.- Controls whether roving focus uses up/down or left/right arrow keys.-</ParamField>--<ParamField body="Root.triggerId" type="string | null">- ID of the trigger that the menu is associated with.- This is useful in conjunction with the `open` prop to create a controlled menu.- There's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set).-</ParamField>--### Menu.Trigger--<ParamField body="Trigger.className" type="string | ((state: MenuTriggerState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="Trigger.closeDelay" type="number" default="0">- How long to wait before closing the menu that was opened on hover.- Specified in milliseconds.-- Requires the `openOnHover` prop.-</ParamField>--<ParamField body="Trigger.delay" type="number" default="100">- How long to wait before the menu may be opened on hover. Specified in milliseconds.-- Requires the `openOnHover` prop.-</ParamField>--<ParamField body="Trigger.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="Trigger.handle" type="MenuHandle<Payload>">- A handle to associate the trigger with a menu.-</ParamField>--<ParamField body="Trigger.nativeButton" type="boolean" default="true">- Whether the component renders a native `<button>` element when replacing it- via the `render` prop.- Set to `false` if the rendered element is not a button (for example, `<div>`).-</ParamField>--<ParamField body="Trigger.openOnHover" type="boolean">- Whether the menu should also open when the trigger is hovered.-</ParamField>--<ParamField body="Trigger.payload" type="Payload">- A payload to pass to the menu when it is opened.-</ParamField>--<ParamField body="Trigger.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuTriggerState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="Trigger.style" type="CSSProperties | ((state: MenuTriggerState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.Popup--<ParamField body="Popup.align" type=""center" | "end" | "start"">- Alignment of the popup along the anchor. Defaults to `start`.-</ParamField>--<ParamField body="Popup.alignOffset" type="number">- Offset in pixels along the alignment axis. Defaults to `0` for a menu and- `-4` for a submenu.-</ParamField>--<ParamField body="Popup.anchor" type="Element | VirtualElement | RefObject<Element | null> | (() => Element | VirtualElement | null) | null">- Element or position the popup is anchored to. Defaults to the trigger.-</ParamField>--<ParamField body="Popup.className" type="string | ((state: MenuPopupState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="Popup.container" type="HTMLElement | ShadowRoot | RefObject<HTMLElement | ShadowRoot | null> | null">- Element the popup is portaled into. Defaults to the theme's portal- container.-</ParamField>--<ParamField body="Popup.finalFocus" type="boolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | void | HTMLElement | null)">- Determines the element to focus when the menu is closed.-- - `false`: Do not move focus.- - `true`: Move focus based on the default behavior (trigger or previously focused element).- - `RefObject`: Move focus to the ref element.- - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).- Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.-</ParamField>--<ParamField body="Popup.keepMounted" type="boolean">- Keeps the popup mounted in the DOM while the menu is closed.-</ParamField>--<ParamField body="Popup.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuPopupState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="Popup.side" type=""bottom" | "inline-end" | "inline-start" | "left" | "right" | "top"">- Side of the anchor the popup is placed on. Defaults to `bottom` for a menu- and `inline-end` for a submenu.-</ParamField>--<ParamField body="Popup.sideOffset" type="number">- Distance in pixels between the anchor and the popup. Defaults to `8` for a- menu and `0` for a submenu.-</ParamField>--<ParamField body="Popup.style" type="CSSProperties | ((state: MenuPopupState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.Item--<ParamField body="Item.className" type="string | ((state: MenuItemState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="Item.closeOnClick" type="boolean" default="true">- Whether to close the menu when the item is clicked.-</ParamField>--<ParamField body="Item.color" type=""danger" | "neutral"">- Color of the text and icons. `danger` marks a destructive action.-</ParamField>--<ParamField body="Item.description" type="ReactNode">- Supporting text, placed according to `descriptionPlacement`.-</ParamField>--<ParamField body="Item.descriptionPlacement" type=""end" | "inline"">- Where the description renders: inline after the content or at the end of- the row.-</ParamField>--<ParamField body="Item.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="Item.endIcon" type="ReactNode">- Icon rendered after the content.-</ParamField>--<ParamField body="Item.label" type="string">- Overrides the text label to use when the item is matched during keyboard text navigation.-</ParamField>--<ParamField body="Item.nativeButton" type="boolean" default="false">- Whether the component renders a native `<button>` element when replacing it- via the `render` prop.- Set to `true` if the rendered element is a native button.-</ParamField>--<ParamField body="Item.onClick" type="((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)">- The click handler for the menu item.-</ParamField>--<ParamField body="Item.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuItemState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="Item.shortcut" type="ShortcutDefinition">- Keyboard shortcut keys displayed at the end of the row. Registering the- shortcut is up to the application.-</ParamField>--<ParamField body="Item.shortcutJoinLabel" type="string">- Text between sequential shortcut steps. Defaults to `then`.-</ParamField>--<ParamField body="Item.startIcon" type="ReactNode">- Icon rendered before the content.-</ParamField>--<ParamField body="Item.style" type="CSSProperties | ((state: MenuItemState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.CheckboxItem--<ParamField body="CheckboxItem.checked" type="boolean">- Whether the checkbox item is currently ticked.-- To render an uncontrolled checkbox item, use the `defaultChecked` prop instead.-</ParamField>--<ParamField body="CheckboxItem.className" type="string | ((state: MenuCheckboxItemState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="CheckboxItem.closeOnClick" type="boolean" default="false">- Whether to close the menu when the item is clicked.-</ParamField>--<ParamField body="CheckboxItem.color" type=""danger" | "neutral"">- Color of the text and icons. `danger` marks a destructive action.-</ParamField>--<ParamField body="CheckboxItem.defaultChecked" type="boolean" default="false">- Whether the checkbox item is initially ticked.-- To render a controlled checkbox item, use the `checked` prop instead.-</ParamField>--<ParamField body="CheckboxItem.description" type="ReactNode">- Supporting text, placed according to `descriptionPlacement`.-</ParamField>--<ParamField body="CheckboxItem.descriptionPlacement" type=""end" | "inline"">- Where the description renders: inline after the content or at the end of- the row.-</ParamField>--<ParamField body="CheckboxItem.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="CheckboxItem.endIcon" type="ReactNode">- Icon rendered after the content.-</ParamField>--<ParamField body="CheckboxItem.label" type="string">- Overrides the text label to use when the item is matched during keyboard text navigation.-</ParamField>--<ParamField body="CheckboxItem.nativeButton" type="boolean" default="false">- Whether the component renders a native `<button>` element when replacing it- via the `render` prop.- Set to `true` if the rendered element is a native button.-</ParamField>--<ParamField body="CheckboxItem.onCheckedChange" type="((checked: boolean, eventDetails: MenuRootChangeEventDetails) => void)">- Event handler called when the checkbox item is ticked or unticked.-</ParamField>--<ParamField body="CheckboxItem.onClick" type="((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)">- The click handler for the menu item.-</ParamField>--<ParamField body="CheckboxItem.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuCheckboxItemState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="CheckboxItem.shortcut" type="ShortcutDefinition">- Keyboard shortcut keys displayed at the end of the row. Registering the- shortcut is up to the application.-</ParamField>--<ParamField body="CheckboxItem.shortcutJoinLabel" type="string">- Text between sequential shortcut steps. Defaults to `then`.-</ParamField>--<ParamField body="CheckboxItem.startIcon" type="ReactNode">- Icon rendered before the content.-</ParamField>--<ParamField body="CheckboxItem.style" type="CSSProperties | ((state: MenuCheckboxItemState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.RadioGroup--<ParamField body="RadioGroup.children" type="ReactNode">- The content of the component.-</ParamField>--<ParamField body="RadioGroup.className" type="string | ((state: MenuRadioGroupState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="RadioGroup.defaultValue" type="any">- The uncontrolled value of the radio item that should be initially selected.-- To render a controlled radio group, use the `value` prop instead.-</ParamField>--<ParamField body="RadioGroup.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="RadioGroup.onValueChange" type="((value: any, eventDetails: MenuRootChangeEventDetails) => void)">- Function called when the selected value changes.-</ParamField>--<ParamField body="RadioGroup.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuRadioGroupState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="RadioGroup.style" type="CSSProperties | ((state: MenuRadioGroupState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--<ParamField body="RadioGroup.value" type="any">- The controlled value of the radio item that should be currently selected.-- To render an uncontrolled radio group, use the `defaultValue` prop instead.-</ParamField>--### Menu.RadioItem--<ParamField body="RadioItem.className" type="string | ((state: MenuRadioItemState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="RadioItem.closeOnClick" type="boolean" default="false">- Whether to close the menu when the item is clicked.-</ParamField>--<ParamField body="RadioItem.color" type=""danger" | "neutral"">- Color of the text and icons. `danger` marks a destructive action.-</ParamField>--<ParamField body="RadioItem.description" type="ReactNode">- Supporting text, placed according to `descriptionPlacement`.-</ParamField>--<ParamField body="RadioItem.descriptionPlacement" type=""end" | "inline"">- Where the description renders: inline after the content or at the end of- the row.-</ParamField>--<ParamField body="RadioItem.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="RadioItem.endIcon" type="ReactNode">- Icon rendered after the content.-</ParamField>--<ParamField body="RadioItem.label" type="string">- Overrides the text label to use when the item is matched during keyboard text navigation.-</ParamField>--<ParamField body="RadioItem.nativeButton" type="boolean" default="false">- Whether the component renders a native `<button>` element when replacing it- via the `render` prop.- Set to `true` if the rendered element is a native button.-</ParamField>--<ParamField body="RadioItem.onClick" type="((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)">- The click handler for the menu item.-</ParamField>--<ParamField body="RadioItem.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuRadioItemState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="RadioItem.shortcut" type="ShortcutDefinition">- Keyboard shortcut keys displayed at the end of the row. Registering the- shortcut is up to the application.-</ParamField>--<ParamField body="RadioItem.shortcutJoinLabel" type="string">- Text between sequential shortcut steps. Defaults to `then`.-</ParamField>--<ParamField body="RadioItem.startIcon" type="ReactNode">- Icon rendered before the content.-</ParamField>--<ParamField body="RadioItem.style" type="CSSProperties | ((state: MenuRadioItemState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--<ParamField body="RadioItem.value" type="any" required>- Value of the radio item.- This is the value that will be set in the MenuRadioGroup when the item is selected.-</ParamField>--### Menu.Group--<ParamField body="Group.children" type="ReactNode">- The content of the component.-</ParamField>--<ParamField body="Group.className" type="string | ((state: MenuGroupState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="Group.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuGroupState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="Group.style" type="CSSProperties | ((state: MenuGroupState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.GroupLabel--<ParamField body="GroupLabel.className" type="string | ((state: MenuGroupLabelState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="GroupLabel.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuGroupLabelState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="GroupLabel.style" type="CSSProperties | ((state: MenuGroupLabelState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.Separator--<ParamField body="Separator.className" type="string | ((state: SeparatorState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="Separator.orientation" type=""horizontal" | "vertical"" default="horizontal">- The orientation of the separator.-</ParamField>--<ParamField body="Separator.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SeparatorState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="Separator.style" type="CSSProperties | ((state: SeparatorState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>--### Menu.SubmenuRoot--<ParamField body="SubmenuRoot.actionsRef" type="RefObject<MenuRootActions | null>">- A ref to imperative actions.- - `unmount`: Manually unmounts the menu.- Call this after any externally controlled closing animation finishes.- - `close`: When specified, the menu can be closed imperatively.-</ParamField>--<ParamField body="SubmenuRoot.children" type="ReactNode">- The content of the submenu.-</ParamField>--<ParamField body="SubmenuRoot.closeParentOnEsc" type="boolean" default="false">- When in a submenu, determines whether pressing the Escape key- closes the entire menu, or only the current child menu.-</ParamField>--<ParamField body="SubmenuRoot.defaultOpen" type="boolean" default="false">- Whether the menu is initially open.-- To render a controlled menu, use the `open` prop instead.-</ParamField>--<ParamField body="SubmenuRoot.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="SubmenuRoot.highlightItemOnHover" type="boolean" default="true">- Whether moving the pointer over items should highlight them.- Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state.-</ParamField>--<ParamField body="SubmenuRoot.loopFocus" type="boolean" default="true">- Whether to loop keyboard focus back to the first item- when the end of the list is reached while using the arrow keys.-</ParamField>--<ParamField body="SubmenuRoot.onOpenChange" type="((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)">- Event handler called when the menu is opened or closed.-</ParamField>--<ParamField body="SubmenuRoot.onOpenChangeComplete" type="((open: boolean) => void)">- Event handler called after any animations complete when the menu is opened or closed.-</ParamField>--<ParamField body="SubmenuRoot.open" type="boolean">- Whether the menu is currently open.-</ParamField>--<ParamField body="SubmenuRoot.orientation" type=""horizontal" | "vertical"" default="vertical">- The visual orientation of the menu.- Controls whether roving focus uses up/down or left/right arrow keys.-</ParamField>--### Menu.SubmenuTrigger--<ParamField body="SubmenuTrigger.className" type="string | ((state: MenuSubmenuTriggerState) => string | undefined)">- CSS class applied to the element, or a function that- returns a class based on the component's state.-</ParamField>--<ParamField body="SubmenuTrigger.closeDelay" type="number" default="0">- How long to wait before closing the menu that was opened on hover.- Specified in milliseconds.-- Requires the `openOnHover` prop.-</ParamField>--<ParamField body="SubmenuTrigger.color" type=""danger" | "neutral"">- Color of the text and icons. `danger` marks a destructive action.-</ParamField>--<ParamField body="SubmenuTrigger.delay" type="number" default="100">- How long to wait before the menu may be opened on hover. Specified in milliseconds.-- Requires the `openOnHover` prop.-</ParamField>--<ParamField body="SubmenuTrigger.description" type="ReactNode">- Supporting text, placed according to `descriptionPlacement`.-</ParamField>--<ParamField body="SubmenuTrigger.descriptionPlacement" type=""end" | "inline"">- Where the description renders: inline after the content or at the end of- the row.-</ParamField>--<ParamField body="SubmenuTrigger.disabled" type="boolean" default="false">- Whether the component should ignore user interaction.-</ParamField>--<ParamField body="SubmenuTrigger.endIcon" type="ReactNode">- Icon rendered after the content.-</ParamField>--<ParamField body="SubmenuTrigger.label" type="string">- Overrides the text label to use when the item is matched during keyboard text navigation.-</ParamField>--<ParamField body="SubmenuTrigger.nativeButton" type="boolean" default="false">- Whether the component renders a native `<button>` element when replacing it- via the `render` prop.- Set to `true` if the rendered element is a native button.-</ParamField>--<ParamField body="SubmenuTrigger.onClick" type="((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)">- The click handler for the submenu trigger.-</ParamField>--<ParamField body="SubmenuTrigger.openOnHover" type="boolean" default="true">- Whether the menu should also open when the trigger is hovered.-</ParamField>--<ParamField body="SubmenuTrigger.render" type="ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuSubmenuTriggerState>">- Allows you to replace the component's HTML element- with a different tag, or compose it with another component.-- Accepts a `ReactElement` or a function that returns the element to render.-</ParamField>--<ParamField body="SubmenuTrigger.shortcut" type="ShortcutDefinition">- Keyboard shortcut keys displayed at the end of the row. Registering the- shortcut is up to the application.-</ParamField>--<ParamField body="SubmenuTrigger.shortcutJoinLabel" type="string">- Text between sequential shortcut steps. Defaults to `then`.-</ParamField>--<ParamField body="SubmenuTrigger.startIcon" type="ReactNode">- Icon rendered before the content.-</ParamField>--<ParamField body="SubmenuTrigger.style" type="CSSProperties | ((state: MenuSubmenuTriggerState) => CSSProperties | undefined)">- Style applied to the element, or a function that- returns a style object based on the component's state.-</ParamField>diff --git a/packages/twenty-docs/ui/components/navigation/dropdown.mdx b/packages/twenty-docs/ui/components/navigation/dropdown.mdxindex 19df38a2ac0..47e32f5b043 100644--- a/packages/twenty-docs/ui/components/navigation/dropdown.mdx+++ b/packages/twenty-docs/ui/components/navigation/dropdown.mdx@@ -30,7 +30,7 @@ Pickers allow creation actions and selectable values in the same list, in any or`Content` takes its accessible name from `Trigger`, or from `SubmenuTrigger` in a submenu. Pass `aria-label` on `Content` when the trigger shows a value, such as the selected option, or when the root has no trigger. An explicit `aria-label` or `aria-labelledby`, and a `Title` inside a `Header`, take precedence over the trigger name.-The underlying [Menu](/ui/primitives/surfaces/menu), [Select](/ui/primitives/input/select), and [Popover](/ui/primitives/surfaces/popover) remain available for direct composition.+[Select](/ui/primitives/input/select) and [Popover](/ui/primitives/surfaces/popover) remain available for direct composition.## Anatomydiff --git a/packages/twenty-docs/ui/components/navigation/list-item-button.mdx b/packages/twenty-docs/ui/components/navigation/list-item-button.mdxindex d1de8a32b47..f27119d652f 100644--- a/packages/twenty-docs/ui/components/navigation/list-item-button.mdx+++ b/packages/twenty-docs/ui/components/navigation/list-item-button.mdx@@ -113,7 +113,7 @@ export const ContactActions = ({ onOpen, onDetails }: ContactActionsProps) => (height={180}/>-Use `ListItem` for passive content, links, or custom semantic owners. Use the existing [Menu](/ui/primitives/surfaces/menu), [Dropdown](/ui/components/navigation/dropdown), and [Select](/ui/primitives/input/select) item parts within their popup owners, which supply roles and keyboard navigation.+Use `ListItem` for passive content, links, or custom semantic owners. Use the existing [Dropdown](/ui/components/navigation/dropdown), and [Select](/ui/primitives/input/select) item parts within their popup owners, which supply roles and keyboard navigation.## Propsdiff --git a/packages/twenty-docs/ui/components/navigation/menu-items.mdx b/packages/twenty-docs/ui/components/navigation/menu-items.mdxindex f98211cea59..dd83054f819 100644--- a/packages/twenty-docs/ui/components/navigation/menu-items.mdx+++ b/packages/twenty-docs/ui/components/navigation/menu-items.mdx@@ -8,7 +8,7 @@ import MenuItemAvatarReference from '/snippets/ui/generated/components/navigatioimport MenuItemDraggableReference from '/snippets/ui/generated/components/navigation/menu-item-draggable.mdx';import MenuItemSuggestionReference from '/snippets/ui/generated/components/navigation/menu-item-suggestion.mdx';-These components provide row presentation. For complete menu semantics, keyboard navigation, and dismissal, use [Dropdown](/ui/components/navigation/dropdown) or [Menu](/ui/primitives/surfaces/menu).+These components provide row presentation. For complete menu semantics, keyboard navigation, and dismissal, use [Dropdown](/ui/components/navigation/dropdown).## MenuItemdiff --git a/packages/twenty-docs/ui/getting-started.mdx b/packages/twenty-docs/ui/getting-started.mdxindex 5f2e090f2db..18bc678a4a6 100644--- a/packages/twenty-docs/ui/getting-started.mdx+++ b/packages/twenty-docs/ui/getting-started.mdx@@ -56,7 +56,7 @@ The component stylesheet includes a global reset. Review its effect when addingImport components from their public subpath to keep imports focused:Primitives are foundational controls, including compound controls such as Select,-Menu, and AlertDialog. Shared components combine primitives into recurring+Popover, and AlertDialog. Shared components combine primitives into recurringdesign presets and reusable app building blocks. Both receive data and callbacksfrom the application.diff --git a/packages/twenty-docs/ui/primitives/input/select.mdx b/packages/twenty-docs/ui/primitives/input/select.mdxindex d260e092101..99902987eb7 100644--- a/packages/twenty-docs/ui/primitives/input/select.mdx+++ b/packages/twenty-docs/ui/primitives/input/select.mdx@@ -7,7 +7,7 @@ import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';import SelectReference from '/snippets/ui/generated/input/select.mdx';-Use `Select` for a form value chosen from a list. [Dropdown](/ui/components/navigation/dropdown) remains the main higher-level API for menus, pickers, panels, and pages that combine those workflows. Use [Menu](/ui/primitives/surfaces/menu) for primitive commands and actions.+Use `Select` for a form value chosen from a list. [Dropdown](/ui/components/navigation/dropdown) remains the main higher-level API for menus, pickers, panels, and pages that combine those workflows.<StoryEmbedstoryId="ui-input-select--documentation"diff --git a/packages/twenty-docs/ui/primitives/layout/direction-provider.mdx b/packages/twenty-docs/ui/primitives/layout/direction-provider.mdxindex 292e33bbcd3..b261cd1beb7 100644--- a/packages/twenty-docs/ui/primitives/layout/direction-provider.mdx+++ b/packages/twenty-docs/ui/primitives/layout/direction-provider.mdx@@ -46,7 +46,7 @@ Place one provider around the controls that share a direction. Nested providers## Portals and layout-Menu, Dropdown, Popover, Tooltip, Select, Dialog, and Toast portals carry the provider direction even when their container is outside the element with `dir`. Without a provider they inherit the direction of their container. Keep the provider direction and the trigger's HTML direction consistent. A scoped `ThemeProvider` continues to own the default portal container.+Dropdown, Popover, Tooltip, Select, Dialog, and Toast portals carry the provider direction even when their container is outside the element with `dir`. Without a provider they inherit the direction of their container. Keep the provider direction and the trigger's HTML direction consistent. A scoped `ThemeProvider` continues to own the default portal container.Submenus open toward `inline-end`. ArrowRight opens a submenu in LTR; ArrowLeft opens it in RTL. The opposite key returns to the parent. Explicit `left` and `right` popup placement still mean physical sides. Collision handling can move a popup when space is limited.diff --git a/packages/twenty-docs/ui/primitives/navigation/list-item.mdx b/packages/twenty-docs/ui/primitives/navigation/list-item.mdxindex a3327a1a1d2..f66e539e252 100644--- a/packages/twenty-docs/ui/primitives/navigation/list-item.mdx+++ b/packages/twenty-docs/ui/primitives/navigation/list-item.mdx@@ -7,7 +7,7 @@ import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';import ListItemReference from '/snippets/ui/generated/navigation/list-item.mdx';-`ListItem` supplies the visual layout shared by list and menu rows. It renders a `div` by default for passive content. Use [ListItemButton](/ui/components/navigation/list-item-button) for ordinary action rows. Compose `ListItem` with an anchor for navigation or with a custom semantic owner when needed. Use [Menu](/ui/primitives/surfaces/menu), [Dropdown](/ui/components/navigation/dropdown), or [Select](/ui/primitives/input/select) when you need a complete popup or selection owner.+`ListItem` supplies the visual layout shared by list and menu rows. It renders a `div` by default for passive content. Use [ListItemButton](/ui/components/navigation/list-item-button) for ordinary action rows. Compose `ListItem` with an anchor for navigation or with a custom semantic owner when needed. Use [Dropdown](/ui/components/navigation/dropdown) or [Select](/ui/primitives/input/select) when you need a complete popup or selection owner.<StoryEmbedstoryId="ui-navigation-listitem--default"@@ -100,28 +100,30 @@ Links do not have a native `disabled` attribute. If a destination is unavailable## Popup item owner-Use `Menu.Item`, `Dropdown.ActionItem`, or `Dropdown.OptionItem` inside their respective popup owner. These parts already compose the ListItem layout and expose its visual slots. The popup owner supplies roles, focus, keyboard navigation, activation, and disabled behavior.+Use `Dropdown.ActionItem` or `Dropdown.OptionItem` inside their popup owner. These parts already compose the ListItem layout and expose its visual slots. The popup owner supplies roles, focus, keyboard navigation, activation, and disabled behavior.```tsximport { Button } from 'twenty-ui/primitives/input';-import { Menu } from 'twenty-ui/primitives/surfaces';+import { Dropdown } from 'twenty-ui/components/navigation';type RecordActionsProps = { onDuplicate: () => void };export const RecordActions = ({ onDuplicate }: RecordActionsProps) => (- <Menu.Root>- <Menu.Trigger render={<Button>Record actions</Button>} />- <Menu.Popup>- <Menu.Item onClick={onDuplicate}>Duplicate record</Menu.Item>- <Menu.Item disabled>Unavailable action</Menu.Item>- </Menu.Popup>- </Menu.Root>+ <Dropdown.Root type="menu">+ <Dropdown.Trigger render={<Button>Record actions</Button>} />+ <Dropdown.Content>+ <Dropdown.ActionItem onClick={onDuplicate}>+ Duplicate record+ </Dropdown.ActionItem>+ <Dropdown.ActionItem disabled>Unavailable action</Dropdown.ActionItem>+ </Dropdown.Content>+ </Dropdown.Root>);```<StoryEmbed- storyId="ui-navigation-listitem--menu-owner"- title="Menu item owner"+ storyId="ui-components-dropdown--documentation"+ title="Dropdown item owner"height={260}/>@@ -300,7 +302,7 @@ export const ContactRow = ({ onOpen }: ContactRowProps) => (## Labels-Use `shortcutJoinLabel` to customize the text between sequential shortcut steps. It defaults to `then`; an empty string removes the join text. The same prop is available on `Menu` and `Dropdown` item parts. The legacy `MenuItem` composition uses `shortcutJoinLabel` alongside `shortcut`.+Use `shortcutJoinLabel` to customize the text between sequential shortcut steps. It defaults to `then`; an empty string removes the join text. The same prop is available on `Dropdown` item parts. The legacy `MenuItem` composition uses `shortcutJoinLabel` alongside `shortcut`.## Propsdiff --git a/packages/twenty-docs/ui/primitives/overview.mdx b/packages/twenty-docs/ui/primitives/overview.mdxindex 3c9a053be26..bd350ab4a9f 100644--- a/packages/twenty-docs/ui/primitives/overview.mdx+++ b/packages/twenty-docs/ui/primitives/overview.mdx@@ -4,7 +4,7 @@ sidebarTitle: Overviewdescription: Foundational controls for building interfaces with Twenty UI.----Primitives are the foundational controls in Twenty UI. They include inputs, display elements, navigation, and compound controls such as Select, Menu, and AlertDialog. Each primitive receives data and callbacks from your application.+Primitives are the foundational controls in Twenty UI. They include inputs, display elements, navigation, and compound controls such as Select, Popover, and AlertDialog. Each primitive receives data and callbacks from your application.Import primitives from a family entry point, such as `twenty-ui/primitives/input`. See [Getting started](/ui/getting-started) for installation and theme setup.@@ -24,7 +24,7 @@ In controlled mode, pass the current state and update it in the change callback.Choose a mode for each state and keep it for the lifetime of the component. Default props initialize state; changing them later does not replace the current state. Avoid passing both the default and controlled prop for the same state.-Some components have more than one independent state. For example, [Select](/ui/primitives/input/select#open-state) can have a controlled value and uncontrolled popup visibility. [Menu](/ui/primitives/surfaces/menu#selection-and-submenus) can manage its own visibility while the application controls checkbox and radio selections.+Some components have more than one independent state. For example, [Select](/ui/primitives/input/select#open-state) can have a controlled value and uncontrolled popup visibility.State belongs to the part that manages the interaction. Configure radio selection on [RadioGroup](/ui/primitives/input/radio-group), not on each Radio. Display components such as Text do not have a controlled or uncontrolled mode. [Toast](/ui/components/feedback/toast) delegates its visibility and removal to the application.@@ -41,7 +41,6 @@ Some primitives package supporting overlay elements inside their `Popup` part:| Component | Included in `Popup` | Configure on `Popup` || --------- | -------------------------------------- | -------------------------------------------------------- || `Select` | Portal and positioner | Placement, anchor, and portal container |-| `Menu` | Portal and positioner | Placement, anchor, portal container, and mounting || `Popover` | Portal, positioner, and optional arrow | Placement, anchor, portal container, mounting, and arrow |Place content directly inside these popup parts. Their portal may move the rendered DOM to another container while preserving the component hierarchy and context. See [theming](/ui/theming#scope-an-override) for scoped portal containers.@@ -99,5 +98,5 @@ Each page includes usage examples, interaction guidance, and a generated API ref| Forms | [Button](/ui/primitives/input/button), [ButtonGroup](/ui/primitives/input/button-group), [Checkbox](/ui/primitives/input/checkbox), [Field](/ui/primitives/input/field), [Input](/ui/primitives/input/input), [InputGroup](/ui/primitives/input/input-group), [Radio](/ui/primitives/input/radio), [RadioGroup](/ui/primitives/input/radio-group), [SegmentedControl](/ui/primitives/input/segmented-control), [Select](/ui/primitives/input/select), [Slider](/ui/primitives/input/slider), [Switch](/ui/primitives/input/switch), [Textarea](/ui/primitives/input/textarea) || Layout | [Collapsible](/ui/primitives/layout/collapsible), [Separator](/ui/primitives/layout/separator), [ResizeHandle](/ui/primitives/layout/resize-handle), [DirectionProvider](/ui/primitives/layout/direction-provider) || Navigation | [ListItem](/ui/primitives/navigation/list-item), [Tabs](/ui/primitives/navigation/tabs) |-| Surfaces | [AlertDialog](/ui/primitives/surfaces/alert-dialog), [Card](/ui/primitives/surfaces/card), [Dialog](/ui/primitives/surfaces/dialog), [Menu](/ui/primitives/surfaces/menu), [Popover](/ui/primitives/surfaces/popover), [Tooltip](/ui/primitives/surfaces/tooltip) |+| Surfaces | [AlertDialog](/ui/primitives/surfaces/alert-dialog), [Card](/ui/primitives/surfaces/card), [Dialog](/ui/primitives/surfaces/dialog), [Popover](/ui/primitives/surfaces/popover), [Tooltip](/ui/primitives/surfaces/tooltip) || Typography | [Heading](/ui/primitives/typography/heading), [OverflowingTextWithTooltip](/ui/primitives/typography/overflowing-text-with-tooltip), [Text](/ui/primitives/typography/text) |diff --git a/packages/twenty-docs/ui/primitives/surfaces/menu.mdx b/packages/twenty-docs/ui/primitives/surfaces/menu.mdxdeleted file mode 100644index 7cfc157f398..00000000000--- a/packages/twenty-docs/ui/primitives/surfaces/menu.mdx+++ /dev/null@@ -1,239 +0,0 @@-----title: Menu-description: Present commands, checked options, radio choices, and nested menus.------import { StoryEmbed } from '/snippets/ui/StoryEmbed.mdx';--import MenuReference from '/snippets/ui/generated/surfaces/menu.mdx';--Use `Menu` for actions opened from a trigger. Its items supply keyboard navigation and the visual layout of [ListItem](/ui/primitives/navigation/list-item).--<StoryEmbed- storyId="ui-surfaces-menu--documentation"- title="Menu example"- height={440}-/>--## Anatomy--Keep the trigger and popup inside the same `Menu.Root`. Put action or selection items inside the popup.--```text-Menu.Root-├── Menu.Trigger-└── Menu.Popup- ├── Menu.Item- ├── Menu.Separator- └── Menu.Item-```--| Part | Requirement | Purpose |-| ------------------------------- | --------------------------------- | -------------------------------------------------------------------------- |-| `Root` | Required | Owns open state and coordinates menu interaction. |-| `Trigger` | Required for a trigger-based menu | Opens the menu and provides its accessible name. |-| `Popup` | Required | Renders the positioned, portaled menu with keyboard navigation. |-| `Item` | One per action | Runs a command when selected. |-| `CheckboxItem` | Optional | Toggles an independent boolean option. |-| `RadioGroup`, `RadioItem` | Optional | Coordinate mutually exclusive options. Put radio items inside their group. |-| `Group`, `GroupLabel` | Optional | Group related items under a label. |-| `Separator` | Optional | Separates groups visually. |-| `SubmenuRoot`, `SubmenuTrigger` | Optional | Add a nested menu with its own popup. |--`Popup` includes the portal and positioner. Menu items include the row layout and selection indicators. Supply labels as children and use `startIcon`, `endIcon`, and `description` for supporting content.--## Uncontrolled state--Use `defaultOpen` to set the initial visibility. The menu owns subsequent changes from its trigger, item selection, and dismissal interactions.--```tsx-import { IconCopy, IconTrash } from 'twenty-ui/icon';-import { Menu } from 'twenty-ui/primitives/surfaces';--type RecordMenuProps = { onDuplicate: () => void; onDelete: () => void };--export const RecordMenu = ({ onDuplicate, onDelete }: RecordMenuProps) => (- <Menu.Root defaultOpen={false}>- <Menu.Trigger>Record actions</Menu.Trigger>- <Menu.Popup>- <Menu.Item startIcon={<IconCopy />} onClick={onDuplicate}>- Duplicate- </Menu.Item>- <Menu.Separator />- <Menu.Item startIcon={<IconTrash />} color="danger" onClick={onDelete}>- Delete- </Menu.Item>- </Menu.Popup>- </Menu.Root>-);-```--`defaultOpen` defaults to `false`, so it can be omitted. Action items close the menu when selected by default. `disabled` prevents selection. `shortcut` displays shortcut hints; register shortcut handlers in your application.--## Controlled state--Pass `open` and update it with `onOpenChange` to own the same menu's visibility in React state. The callback receives the next boolean and event details, including dismissal and item selection.--```tsx-import { useState } from 'react';-import { IconCopy, IconTrash } from 'twenty-ui/icon';-import { Menu } from 'twenty-ui/primitives/surfaces';--type RecordMenuProps = { onDuplicate: () => void; onDelete: () => void };--export const RecordMenu = ({ onDuplicate, onDelete }: RecordMenuProps) => {- const [open, setOpen] = useState(false);-- return (- <Menu.Root open={open} onOpenChange={setOpen}>- <Menu.Trigger>Record actions</Menu.Trigger>- <Menu.Popup>- <Menu.Item startIcon={<IconCopy />} onClick={onDuplicate}>- Duplicate- </Menu.Item>- <Menu.Separator />- <Menu.Item startIcon={<IconTrash />} color="danger" onClick={onDelete}>- Delete- </Menu.Item>- </Menu.Popup>- </Menu.Root>- );-};-```--## Selection and submenus--Item selection is independent of popup visibility. Checkbox items use `defaultChecked` or `checked` with `onCheckedChange`. Radio groups use `defaultValue` or `value` with `onValueChange`.--For a submenu, place `SubmenuRoot` inside the parent popup, with its own trigger and popup. Each nested popup retains its own positioning and keyboard behavior.--```text-Menu.Popup-└── Menu.SubmenuRoot- ├── Menu.SubmenuTrigger- └── Menu.Popup- └── Menu.RadioGroup- ├── Menu.RadioItem- └── Menu.RadioItem-```--### Uncontrolled item state--Each checkbox item and radio group owns its selection. Both the menu and submenu also manage their own visibility.--```tsx-import { Menu } from 'twenty-ui/primitives/surfaces';--export const ViewMenu = () => (- <Menu.Root>- <Menu.Trigger>View options</Menu.Trigger>- <Menu.Popup>- <Menu.CheckboxItem defaultChecked={false}>- Show archived records- </Menu.CheckboxItem>- <Menu.Separator />- <Menu.SubmenuRoot>- <Menu.SubmenuTrigger>Layout</Menu.SubmenuTrigger>- <Menu.Popup>- <Menu.RadioGroup defaultValue="list">- <Menu.RadioItem value="list">List</Menu.RadioItem>- <Menu.RadioItem value="board">Board</Menu.RadioItem>- </Menu.RadioGroup>- </Menu.Popup>- </Menu.SubmenuRoot>- </Menu.Popup>- </Menu.Root>-);-```--### Controlled item state--The application owns the same selections in React state. Popup visibility remains uncontrolled because neither root receives `open`.--```tsx-import { useState } from 'react';-import { Menu } from 'twenty-ui/primitives/surfaces';--export const ViewMenu = () => {- const [showArchived, setShowArchived] = useState(false);- const [view, setView] = useState('list');-- return (- <Menu.Root>- <Menu.Trigger>View options</Menu.Trigger>- <Menu.Popup>- <Menu.CheckboxItem- checked={showArchived}- onCheckedChange={setShowArchived}- >- Show archived records- </Menu.CheckboxItem>- <Menu.Separator />- <Menu.SubmenuRoot>- <Menu.SubmenuTrigger>Layout</Menu.SubmenuTrigger>- <Menu.Popup>- <Menu.RadioGroup value={view} onValueChange={setView}>- <Menu.RadioItem value="list">List</Menu.RadioItem>- <Menu.RadioItem value="board">Board</Menu.RadioItem>- </Menu.RadioGroup>- </Menu.Popup>- </Menu.SubmenuRoot>- </Menu.Popup>- </Menu.Root>- );-};-```--Checkbox and radio items keep the popup open by default so users can adjust options. Use `closeOnClick` to change that behavior. Nest a `SubmenuRoot`, `SubmenuTrigger`, and `Popup` inside a parent popup for submenus. Each `SubmenuRoot` has its own `defaultOpen`, `open`, and `onOpenChange` props, independent of the parent menu.--## Compose a trigger--Use `render` to make a Twenty UI `Button` the trigger. The menu supplies the button's activation handlers and accessibility attributes.--```tsx-import { IconCopy, IconTrash } from 'twenty-ui/icon';-import { Button } from 'twenty-ui/primitives/input';-import { Menu } from 'twenty-ui/primitives/surfaces';--type RecordMenuProps = { onDuplicate: () => void; onDelete: () => void };--export const RecordMenu = ({ onDuplicate, onDelete }: RecordMenuProps) => (- <Menu.Root>- <Menu.Trigger render={<Button variant="outline">Record actions</Button>} />- <Menu.Popup>- <Menu.Item startIcon={<IconCopy />} onClick={onDuplicate}>- Duplicate- </Menu.Item>- <Menu.Separator />- <Menu.Item startIcon={<IconTrash />} color="danger" onClick={onDelete}>- Delete- </Menu.Item>- </Menu.Popup>- </Menu.Root>-);-```--Put `Button` in the trigger's `render` prop to preserve a single interactive control. For custom wrapper components, [forward the supplied props and ref](/ui/primitives/overview#custom-components).--## Keyboard and placement--Arrow keys move through the items, including disabled ones, which receive focus but cannot be selected; typeahead finds items by their text. Enter or Space selects an item. Escape closes the menu and returns focus to its trigger. Use clear text labels even when items have icons.--`Popup` owns its portal and accepts placement props and a `container` override. Placement defaults depend on whether it is a top-level menu or a submenu:--| Popup | `side` | `align` | `sideOffset` | `alignOffset` |-| -------------- | ------------ | ------- | ------------ | ------------- |-| Top-level menu | `bottom` | `start` | `8` | `0` |-| Submenu | `inline-end` | `start` | `0` | `-4` |--It uses the [theme's portal container](/ui/theming) by default.--## Labels--Supply labels through each part’s children and native accessible attributes. `Item`, `CheckboxItem`, `RadioItem`, and `SubmenuTrigger` accept `shortcutJoinLabel` to replace the default `then` between sequential shortcut steps.--## Props--The reference is generated from the public component types. Native attributes, including accessible names and event handlers, are also accepted on parts that render elements.--<MenuReference />diff --git a/packages/twenty-docs/ui/primitives/typography/shortcut.mdx b/packages/twenty-docs/ui/primitives/typography/shortcut.mdxindex c1097aee61d..ff14100331a 100644--- a/packages/twenty-docs/ui/primitives/typography/shortcut.mdx+++ b/packages/twenty-docs/ui/primitives/typography/shortcut.mdx@@ -47,12 +47,12 @@ Key symbols have readable accessible names. Supply `aria-label` or `aria-labelle## Migration-| Previous prop | Replacement |-| ----------------------------------------------------- | -------------------------------------------------------------------------- |-| Button `hotkeys={['⌘', 'K']}` | `shortcut={['Mod', 'K']}` |-| ListItem or MenuItem sequential `hotkeys` / `hotKeys` | `shortcut={[['G'], ['P']]}` |-| `hotkeysJoinLabel` / `hotKeysJoinLabel` | `shortcutJoinLabel` on Button, ListItem, MenuItem, Menu and Dropdown parts |-| Manual tooltip key concatenation | `formatShortcut({ shortcut: ['Mod', 'Enter'] })` |+| Previous prop | Replacement |+| ----------------------------------------------------- | -------------------------------------------------------------------- |+| Button `hotkeys={['⌘', 'K']}` | `shortcut={['Mod', 'K']}` |+| ListItem or MenuItem sequential `hotkeys` / `hotKeys` | `shortcut={[['G'], ['P']]}` |+| `hotkeysJoinLabel` / `hotKeysJoinLabel` | `shortcutJoinLabel` on Button, ListItem, MenuItem and Dropdown parts |+| Manual tooltip key concatenation | `formatShortcut({ shortcut: ['Mod', 'Enter'] })` |Flat stored arrays that represent successive key presses need nesting before being passed to `shortcut`: `hotKeys.map((key) => [key])`. Arrays that represent simultaneous keys can be passed directly. Key strings remain literal tokens, so `['Mod', '+']` contains a plus key and `['Space']` contains the Space key; no shortcut-string parsing is required.diff --git a/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx b/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsxindex 5d65540f0e6..3d3702e70e4 100644--- a/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/TwentyUiGallery.stories.tsx@@ -49,7 +49,6 @@ import {displayHelpersTest,galleryRenderTest,} from '@/__stories__/twenty-ui-gallery/utils/galleryRenderTests';-import { menuTest } from '@/__stories__/twenty-ui-gallery/utils/menuTest';import { popoverTest } from '@/__stories__/twenty-ui-gallery/utils/popoverTest';import { selectTest } from '@/__stories__/twenty-ui-gallery/utils/selectTest';import { switchTest } from '@/__stories__/twenty-ui-gallery/utils/switchTest';@@ -400,17 +399,6 @@ export const TooltipPreact: Story = createGalleryStory({play: tooltipEscapeDismissalTest,});-export const MenuReact: Story = createGalleryStory({- frontComponentBundleName: 'twenty-ui-menu',- runtime: 'react',- play: menuTest,-});-export const MenuPreact: Story = createGalleryStory({- frontComponentBundleName: 'twenty-ui-menu',- runtime: 'preact',- play: menuTest,-});-export const PortalBoundsReact: Story = createGalleryStory({frontComponentBundleName: 'twenty-ui-portals',runtime: 'react',diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/README.md b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/README.mdindex ae34c653491..8901b582b51 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/README.md+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/README.md@@ -13,9 +13,11 @@ NumberField checks locale formatting and localized paste, controlled empty valuePopover composes Portal, Positioner, Popup, Arrow and Viewport. Its focused React/Preact cases check controlled trigger requests, native attributes, Button render composition, DOM refs and callback reasons. These checks do not establish popup visibility, geometry or dismissal support. The omitted-container popup still requires C04/C05/C07 renderer acceptance.+Dropdown checks controlled opening, native action refs and Button render composition, disabled callback suppression, action callbacks, page navigation, option selection and click-to-close in both runtimes. The portal fixture preserves all 16 rows and checks attachment along the physical collision side, overlap with the trigger and confinement to the owner portal area. A temporary constrained long-menu probe passed End-key focus and scrolling in both runtimes: a 128px popup scrolled to 386px and kept the last item visible. Outside-host dismissal remains a C07 renderer limitation. Clicking the host action invokes that action, while Dropdown remains expanded with its popup mounted. Search, broader keyboard navigation and focus restoration are not established by these checks.+Typography composition checks constrained text, explicit links, semantic elements, refs and native focus handlers in both runtimes. Overflow tooltip popup acceptance still depends on renderer portal and geometry support.-ListItemButton checks native action activation, selected state, refs and events, disabled and focusable disabled behavior, ordinary bubbling, caller-owned propagation boundaries, and independent sibling controls in React and Preact. ListItem keeps its default div presentational, including visual disabled, selected and focused state and caller-owned content. Its React/Preact cases check native button/link owners, actual root refs, pointer and keyboard activation, focus handlers, disabled native buttons, event bubbling and explicit propagation boundaries. URL text stays plain unless the caller supplies a link. Menu.Item checks visible pointer activation, disabled behavior and click-to-close. Popup keyboard navigation, outside dismissal and focus restoration remain outside this fixture. The retained overflow-tooltip check re-enters after renderer measurements arrive, so it does not establish first-hover geometry acceptance.+ListItemButton checks native action activation, selected state, refs and events, disabled and focusable disabled behavior, ordinary bubbling, caller-owned propagation boundaries, and independent sibling controls in React and Preact. ListItem keeps its default div presentational, including visual disabled, selected and focused state and caller-owned content. Its React/Preact cases check native button/link owners, actual root refs, pointer and keyboard activation, focus handlers, disabled native buttons, event bubbling and explicit propagation boundaries. URL text stays plain unless the caller supplies a link. Dropdown.ActionItem checks visible pointer activation, disabled behavior and click-to-close. Popup keyboard navigation, outside dismissal and focus restoration remain outside this fixture. The retained overflow-tooltip check re-enters after renderer measurements arrive, so it does not establish first-hover geometry acceptance.Tag and Status retain their presentational span when a native click handler is supplied. Their focused React/Preact fixtures check explicit native button/link composition, keyboard activation, disabled owners, refs, caller-owned links and native handlers. Tag checks positive truncation and native padding styles; Status checks controlled loading, caller-owned busy state and a decorative loader without an implicit live region.@@ -53,7 +55,7 @@ effect within the interaction timeout.| `twenty-ui-status-controls` | Status (stable presentational root, loading/busy state, node content, refs and explicit button/link composition) || `twenty-ui-avatar-image` | Avatar Root/Image/Fallback (image labels/attributes/refs, loading callbacks, decoded images, fallback, replacement and unmount/remount) || `twenty-ui-image-input` | ImageInput (native chooser, readable files, preview URLs, reset and ownership cleanup) |-| `twenty-ui-list-item` | ListItemButton and ListItem (native action composition, visual rows, explicit button/link/Menu.Item owners, refs/events/focus/keyboard, disabled behavior and sibling controls) |+| `twenty-ui-list-item` | ListItemButton and ListItem (native action composition, visual rows, explicit button/link/Dropdown.ActionItem owners, refs/events/focus/keyboard, disabled behavior and sibling controls) || `twenty-ui-settings-row` | SettingsRow || `twenty-ui-tabs` | Tabs and TabButton || `twenty-ui-overflowing-list` | OverflowingList |@@ -62,10 +64,9 @@ effect within the interaction timeout.| `twenty-ui-popover` | Popover || `twenty-ui-card-composition` | Card (native parts and refs, render composition, display semantics, button/link ownership and nested controls) || `twenty-ui-dialog` | SDK `openCommandConfirmationModal` confirmation request |-| `twenty-ui-menu` | Menu || `twenty-ui-select` | Select || `twenty-ui-portals` | Body portal callbacks, removal, nearby overflow, menu placement and confinement |-| `twenty-ui-dropdown` | Dropdown |+| `twenty-ui-dropdown` | Dropdown (controlled opening, action refs and callbacks, disabled actions, page navigation and selection) || `twenty-ui-toast` | Toast || `twenty-ui-switch` | Switch (interaction coverage in addition to the original input gallery) || `twenty-ui-checkbox` | Checkbox |@@ -221,7 +222,7 @@ expected-to-fail by the runner.| Component | Current limitation || ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| Popover, Menu, Select, Dropdown, CurrencyPicker, PhoneCountryPicker, CountrySelect (React and Preact) | Body portal content reaches the host inside the component portal area. These fixtures cover opening and visible content; search, selection, dismissal and focus restoration are not covered yet. |+| Popover, Select, CurrencyPicker, PhoneCountryPicker, CountrySelect (React and Preact) | Body portal content reaches the host inside the component portal area. These fixtures cover opening and visible content; search, selection, dismissal and focus restoration are not covered yet. || Slider | Thumbs stay hidden because the sandbox has no `ResizeObserver` to re-measure after the first geometry batch. || Responsive hooks | The sandbox `window.matchMedia` answers for the widget's own box, so `useIsMobile` follows the widget width rather than the browser viewport: a widget 768px wide or narrower gets the mobile layout, and Button drops its hotkey hint, on any screen. `useIsTouchDevice` follows the primary input of the host device, so it is `false` under the desktop Chromium that runs these stories. The fixture asserts both at a 1024px and a 400px widget width. |diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/list-item-popup-owner-example.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/list-item-popup-owner-example.tsxindex 7ec518ac8f5..3032c41746d 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/list-item-popup-owner-example.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/list-item-popup-owner-example.tsx@@ -1,7 +1,7 @@import { useState } from 'react';import { isDefined } from 'twenty-shared/utils';+import { Dropdown } from 'twenty-ui/components/navigation';import { Button } from 'twenty-ui/primitives/input';-import { Menu } from 'twenty-ui/primitives/surfaces';import { Text } from 'twenty-ui/primitives/typography';export const ListItemPopupOwnerExample = () => {@@ -9,32 +9,32 @@ export const ListItemPopupOwnerExample = () => {return (<>- <Menu.Root>- <Menu.Trigger render={<Button>Preference actions</Button>} />- <Menu.Popup>- <Menu.Item+ <Dropdown.Root type="menu">+ <Dropdown.Trigger render={<Button>Preference actions</Button>} />+ <Dropdown.Content>+ <Dropdown.ActionItemnativeButtonrender={<button type="button" />}description="Popup owner"onClick={() => setActivations((count) => count + 1)}- ref={(element) => {+ ref={(element: HTMLElement | null) => {if (isDefined(element)) {element.dataset.refTag = element.tagName;}}}>Enable notifications- </Menu.Item>- <Menu.Item+ </Dropdown.ActionItem>+ <Dropdown.ActionItemdisablednativeButtonrender={<button type="button" />}onClick={() => setActivations((count) => count + 1)}>Unavailable notifications- </Menu.Item>- </Menu.Popup>- </Menu.Root>+ </Dropdown.ActionItem>+ </Dropdown.Content>+ </Dropdown.Root><Text aria-label="Popup activations">Popup activations: {activations}</Text>diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-dropdown.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-dropdown.front-component.tsxindex b95b1c0b383..51f4fcab056 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-dropdown.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-dropdown.front-component.tsx@@ -1,5 +1,6 @@import { useState } from 'react';import { defineFrontComponent } from 'twenty-sdk/define';+import { isDefined } from 'twenty-shared/utils';import { Dropdown } from 'twenty-ui/components/navigation';import { Button } from 'twenty-ui/primitives/input';import { Text } from 'twenty-ui/primitives/typography';@@ -12,6 +13,7 @@ const DropdownExample = () => {const [open, setOpen] = useState(false);const [query, setQuery] = useState('');const [selection, setSelection] = useState('Unassigned');+ const [actionCount, setActionCount] = useState(0);const matchingAssignees = ASSIGNEES.filter((assignee) =>assignee.toLowerCase().includes(query.toLowerCase()),);@@ -30,6 +32,24 @@ const DropdownExample = () => {>Assign person</Dropdown.ActionItem>+ <Dropdown.ActionItem+ disabled+ onClick={() => setSelection('Archived')}+ >+ Archive assignee+ </Dropdown.ActionItem>+ <Dropdown.ActionItem+ nativeButton+ render={<Button />}+ ref={(element: HTMLElement | null) => {+ if (isDefined(element)) {+ element.dataset.refTag = element.tagName;+ }+ }}+ onClick={() => setActionCount((count) => count + 1)}+ >+ Duplicate assignment+ </Dropdown.ActionItem><Dropdown.ActionItem onClick={() => setSelection('Unassigned')}>Remove assignee</Dropdown.ActionItem>@@ -62,7 +82,12 @@ const DropdownExample = () => {</Dropdown.Page></Dropdown.Content></Dropdown.Root>- <Text role="status">Assignee: {selection}</Text>+ <Text role="status" aria-label="Assignee">+ Assignee: {selection}+ </Text>+ <Text role="status" aria-label="Assignment actions">+ Actions: {actionCount}+ </Text></TwentyUiGalleryCard>);};diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-menu.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-menu.front-component.tsxdeleted file mode 100644index cdf16d8fddb..00000000000--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-menu.front-component.tsx+++ /dev/null@@ -1,42 +0,0 @@-import { useState } from 'react';-import { defineFrontComponent } from 'twenty-sdk/define';-import { Menu } from 'twenty-ui/primitives/surfaces';--import { TwentyUiGalleryCard } from '@/__stories__/shared/front-components/twenty-ui-gallery-card';--const MenuExample = () => {- const [action, setAction] = useState('none');-- return (- <TwentyUiGalleryCard title="Menu">- <Menu.Root>- <Menu.Trigger>Account actions</Menu.Trigger>- <Menu.Popup>- <Menu.Group>- <Menu.GroupLabel>Record</Menu.GroupLabel>- <Menu.Item- shortcut={[['G'], ['A']]}- shortcutJoinLabel="followed by"- onClick={() => setAction('duplicated')}- >- Duplicate- </Menu.Item>- <Menu.Item disabled onClick={() => setAction('archived')}>- Archive- </Menu.Item>- </Menu.Group>- <Menu.Separator />- <Menu.Item onClick={() => setAction('exported')}>Export</Menu.Item>- </Menu.Popup>- </Menu.Root>- <p role="status">Action: {action}</p>- </TwentyUiGalleryCard>- );-};--export default defineFrontComponent({- universalIdentifier: '4d23e9af-7cb3-4e4a-bbca-8e960f840006',- name: 'twenty-ui-menu',- description: 'Menu portal, activation and disabled items in the sandbox',- component: MenuExample,-});diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-portals.front-component.tsx b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-portals.front-component.tsxindex 2ecef0888b3..50530f766bf 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-portals.front-component.tsx+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/twenty-ui-portals.front-component.tsx@@ -1,8 +1,8 @@import { useState } from 'react';import { createPortal } from 'react-dom';import { defineFrontComponent } from 'twenty-sdk/define';+import { Dropdown } from 'twenty-ui/components/navigation';import { Button } from 'twenty-ui/primitives/input';-import { Menu } from 'twenty-ui/primitives/surfaces';import { Text } from 'twenty-ui/primitives/typography';import { TwentyUiGalleryCard } from '@/__stories__/shared/front-components/twenty-ui-gallery-card';@@ -22,14 +22,16 @@ const PortalsExample = () => {return (<TwentyUiGalleryCard title="Portals">- <Menu.Root>- <Menu.Trigger>Open menu</Menu.Trigger>- <Menu.Popup>+ <Dropdown.Root type="menu">+ <Dropdown.Trigger render={<Button>Open menu</Button>} />+ <Dropdown.Content>{MENU_ITEM_LABELS.map((menuItemLabel) => (- <Menu.Item key={menuItemLabel}>{menuItemLabel}</Menu.Item>+ <Dropdown.ActionItem key={menuItemLabel}>+ {menuItemLabel}+ </Dropdown.ActionItem>))}- </Menu.Popup>- </Menu.Root>+ </Dropdown.Content>+ </Dropdown.Root><Button onClick={() => setIsOpen(!isOpen)}>Toggle popup</Button><Button onClick={() => setIsOversizedOpen(!isOversizedOpen)}>Fill portal areadiff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/dropdownTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/dropdownTest.tsindex 4a3cfacd8ef..31fb36c963c 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/dropdownTest.ts+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/dropdownTest.ts@@ -1,9 +1,58 @@+import { expect, userEvent, waitFor, within } from 'storybook/test';++import { errorHandler } from '@/__stories__/shared/test-utils/createFrontComponentStoryMeta';+import { expectFrontComponentMounted } from '@/__stories__/shared/test-utils/matchers/expectFrontComponentMounted';import { type TwentyUiGalleryPlayFunction } from '@/__stories__/twenty-ui-gallery/types/TwentyUiGalleryPlayFunction';-import { createDropdownOpenTest } from '@/__stories__/twenty-ui-gallery/utils/createDropdownOpenTest';-export const dropdownTest: TwentyUiGalleryPlayFunction = createDropdownOpenTest(- {- triggerName: 'Choose assignee',- popupText: 'Assign person',- },-);+export const dropdownTest: TwentyUiGalleryPlayFunction = async ({+ canvasElement,+}) => {+ const canvas = within(canvasElement);+ const page = within(canvasElement.ownerDocument.body);+ await expectFrontComponentMounted(canvas);+ const trigger = canvas.getByRole('button', { name: 'Choose assignee' });+ expect(trigger).toHaveAttribute('aria-expanded', 'false');+ await userEvent.click(trigger);+ await waitFor(() => expect(trigger).toHaveAttribute('aria-expanded', 'true'));+ const assignment = await page.findByRole('menuitem', {+ name: /^Assign person/,+ });+ await waitFor(() => expect(assignment).toBeVisible());+ const disabledItem = page.getByRole('menuitem', { name: 'Archive assignee' });+ expect(disabledItem).toBeDisabled();+ await userEvent.click(disabledItem);+ expect(canvas.getByLabelText('Assignee')).toHaveTextContent(+ 'Assignee: Unassigned',+ );+ expect(trigger).toHaveAttribute('aria-expanded', 'true');+ const duplicate = page.getByRole('menuitem', {+ name: 'Duplicate assignment',+ });+ expect(duplicate.tagName).toBe('BUTTON');+ expect(duplicate).toHaveAttribute('data-ref-tag', 'HTML-BUTTON');+ await userEvent.click(duplicate);+ await waitFor(() =>+ expect(canvas.getByLabelText('Assignment actions')).toHaveTextContent(+ 'Actions: 1',+ ),+ );+ await waitFor(() =>+ expect(trigger).toHaveAttribute('aria-expanded', 'false'),+ );+ await userEvent.click(trigger);+ await userEvent.click(+ await page.findByRole('menuitem', { name: /^Assign person/ }),+ );+ const option = await page.findByText('Ada Lovelace');+ await waitFor(() => expect(option).toBeVisible());+ await userEvent.click(option);+ await waitFor(() =>+ expect(canvas.getByLabelText('Assignee')).toHaveTextContent(+ 'Assignee: Ada Lovelace',+ ),+ );+ await waitFor(() =>+ expect(trigger).toHaveAttribute('aria-expanded', 'false'),+ );+ expect(errorHandler).not.toHaveBeenCalled();+};diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/listItemPopupOwnerTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/listItemPopupOwnerTest.tsindex a613b19b418..0b7459648c9 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/listItemPopupOwnerTest.ts+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/listItemPopupOwnerTest.ts@@ -22,7 +22,7 @@ export const listItemPopupOwnerTest: TwentyUiGalleryPlayFunction = async ({await waitFor(() => expect(item).toBeVisible());expect(item.tagName).toBe('BUTTON');expect(item).toHaveAttribute('data-ref-tag', 'HTML-BUTTON');- expect(disabledItem).toHaveAttribute('aria-disabled', 'true');+ expect(disabledItem).toBeDisabled();await userEvent.click(disabledItem);expect(canvas.getByLabelText('Popup activations')).toHaveTextContent('0');await userEvent.click(item);diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/menuTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/menuTest.tsdeleted file mode 100644index d47e2e90c10..00000000000--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/menuTest.ts+++ /dev/null@@ -1,6 +0,0 @@-import { createOverlayOpenTest } from '@/__stories__/twenty-ui-gallery/utils/createOverlayOpenTest';--export const menuTest = createOverlayOpenTest({- trigger: { role: 'button', name: 'Account actions' },- popupText: 'Duplicate',-});diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/portalBoundsTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/portalBoundsTest.tsindex ab3ec8cc1da..90b3f300ef5 100644--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/portalBoundsTest.ts+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/portalBoundsTest.ts@@ -8,7 +8,7 @@ import { type TwentyUiGalleryPlayFunction } from '@/__stories__/twenty-ui-gallerimport { FRONT_COMPONENT_PORTAL_MARGIN } from '@/constants/FrontComponentPortalMargin';import { GEOMETRY_IDLE_FRAME_THRESHOLD } from '@/host/geometry/constants/GeometryIdleFrameThreshold';-const MAXIMUM_MENU_TRIGGER_GAP = 16;+const MAXIMUM_DROPDOWN_TRIGGER_GAP = 16;const WIDGET_SCROLL_OFFSET = 40;const waitForGeometryTrackerToIdle = () =>@@ -53,7 +53,7 @@ const expectPortalActionHiddenWhileScrollFrameStyleIsNone = async ({);};-const expectMenuAttachedToTriggerWithinPortalArea = ({+const expectDropdownAttachedToTriggerWithinPortalArea = ({menu,menuTrigger,ownerRoot,@@ -65,15 +65,40 @@ const expectMenuAttachedToTriggerWithinPortalArea = ({const menuRectangle = menu.getBoundingClientRect();const menuTriggerRectangle = menuTrigger.getBoundingClientRect();const ownerRectangle = ownerRoot.getBoundingClientRect();- const menuTriggerGap = Math.max(- menuRectangle.top - menuTriggerRectangle.bottom,- menuTriggerRectangle.top - menuRectangle.bottom,- );+ const side = menu.getAttribute('data-side');+ const isHorizontallyPositioned = side === 'left' || side === 'right';+ const menuTriggerGap = isHorizontallyPositioned+ ? Math.max(+ menuRectangle.left - menuTriggerRectangle.right,+ menuTriggerRectangle.left - menuRectangle.right,+ )+ : Math.max(+ menuRectangle.top - menuTriggerRectangle.bottom,+ menuTriggerRectangle.top - menuRectangle.bottom,+ );+ const menuOverlapStart = isHorizontallyPositioned+ ? menuRectangle.top+ : menuRectangle.left;+ const menuOverlapEnd = isHorizontallyPositioned+ ? menuRectangle.bottom+ : menuRectangle.right;+ const triggerOverlapStart = isHorizontallyPositioned+ ? menuTriggerRectangle.top+ : menuTriggerRectangle.left;+ const triggerOverlapEnd = isHorizontallyPositioned+ ? menuTriggerRectangle.bottom+ : menuTriggerRectangle.right;expect(menuTriggerGap).toBeGreaterThanOrEqual(0);- expect(menuTriggerGap).toBeLessThanOrEqual(MAXIMUM_MENU_TRIGGER_GAP);- expect(menuRectangle.left).toBeLessThan(menuTriggerRectangle.right);- expect(menuRectangle.right).toBeGreaterThan(menuTriggerRectangle.left);+ expect(menuTriggerGap).toBeLessThanOrEqual(MAXIMUM_DROPDOWN_TRIGGER_GAP);+ expect(menuOverlapStart).toBeLessThan(triggerOverlapEnd);+ expect(menuOverlapEnd).toBeGreaterThan(triggerOverlapStart);+ expect(menuRectangle.left).toBeGreaterThanOrEqual(+ ownerRectangle.left - FRONT_COMPONENT_PORTAL_MARGIN,+ );+ expect(menuRectangle.right).toBeLessThanOrEqual(+ ownerRectangle.right + FRONT_COMPONENT_PORTAL_MARGIN,+ );expect(menuRectangle.top).toBeGreaterThanOrEqual(ownerRectangle.top - FRONT_COMPONENT_PORTAL_MARGIN,);@@ -166,7 +191,7 @@ export const portalBoundsTest: TwentyUiGalleryPlayFunction = async ({});await waitFor(() => {expectElementToReceivePointer(firstMenuItem);- expectMenuAttachedToTriggerWithinPortalArea({+ expectDropdownAttachedToTriggerWithinPortalArea({menu: page.getByRole('menu'),menuTrigger,ownerRoot,diff --git a/packages/twenty-shared/src/constants/DocumentationPaths.ts b/packages/twenty-shared/src/constants/DocumentationPaths.tsindex ef765e8629b..3fdbddc00f8 100644--- a/packages/twenty-shared/src/constants/DocumentationPaths.ts+++ b/packages/twenty-shared/src/constants/DocumentationPaths.ts@@ -213,7 +213,6 @@ export const DOCUMENTATION_PATHS = {UI_PRIMITIVES_SURFACES_ALERT_DIALOG: '/ui/primitives/surfaces/alert-dialog',UI_PRIMITIVES_SURFACES_CARD: '/ui/primitives/surfaces/card',UI_PRIMITIVES_SURFACES_DIALOG: '/ui/primitives/surfaces/dialog',- UI_PRIMITIVES_SURFACES_MENU: '/ui/primitives/surfaces/menu',UI_PRIMITIVES_SURFACES_POPOVER: '/ui/primitives/surfaces/popover',UI_PRIMITIVES_SURFACES_TOOLTIP: '/ui/primitives/surfaces/tooltip',UI_PRIMITIVES_TYPOGRAPHY_HEADING: '/ui/primitives/typography/heading',diff --git a/packages/twenty-ui/docs/components.ts b/packages/twenty-ui/docs/components.tsindex 52a22340b2c..353508c6038 100644--- a/packages/twenty-ui/docs/components.ts+++ b/packages/twenty-ui/docs/components.ts@@ -581,31 +581,6 @@ export const DOCUMENTED_COMPONENTS = [partPropDescriptions: ALERT_DIALOG_PART_PROP_DESCRIPTIONS,partPropDefaults: { Popup: { size: 'md' } },},- {- name: 'Menu',- source: 'primitives/surfaces/Menu/Menu.tsx',- entryPoint: 'twenty-ui/primitives/surfaces',- slug: 'surfaces/menu',- partPropDescriptions: {- Item: {- shortcutJoinLabel:- 'Text between sequential shortcut steps. Defaults to `then`.',- },- CheckboxItem: {- shortcutJoinLabel:- 'Text between sequential shortcut steps. Defaults to `then`.',- },- RadioItem: {- shortcutJoinLabel:- 'Text between sequential shortcut steps. Defaults to `then`.',- },- SubmenuTrigger: {- shortcutJoinLabel:- 'Text between sequential shortcut steps. Defaults to `then`.',- onClick: 'The click handler for the submenu trigger.',- },- },- },{name: 'Popover',source: 'primitives/surfaces/Popover/Popover.tsx',diff --git a/packages/twenty-ui/docs/label-ownership.md b/packages/twenty-ui/docs/label-ownership.mdindex 29a90bef198..4b29cba70e7 100644--- a/packages/twenty-ui/docs/label-ownership.md+++ b/packages/twenty-ui/docs/label-ownership.md@@ -5,7 +5,7 @@ This covers production exports under components, primitives, and icons, includin| Surface | Text ownership || ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || Callout | `title`, `description`, `icon`, and `action` nodes, plus `closeLabel` (default `Close`). The optional `onDismiss` requests caller-owned visibility changes. |-| ListItem and Menu item parts | Children, description, action slots, native accessible attributes, and `shortcutJoinLabel` (default `then`). |+| ListItem | Children, description, action slots, native accessible attributes, and `shortcutJoinLabel` (default `then`). || ListItemButton | Children, description, native accessible attributes, and `shortcutJoinLabel` (default `then`). Independent actions remain sibling controls. || Dropdown | Children name actions, options, titles, sections, empty states, and loading states. `Back` children default to `Back`. Search accepts native placeholder and accessible attributes. Close requires a caller-supplied accessible label and accepts native `aria-labelledby`. Item parts pass `shortcutJoinLabel` to ListItem. || CurrencyPicker | `searchLabel` defaults to `Search` and supplies the search placeholder and accessible name. `emptyLabel` defaults to `No results`. Currency names and codes are caller data; trigger and dropdown accessible names belong to the host. |diff --git a/packages/twenty-ui/docs/module-ownership.json b/packages/twenty-ui/docs/module-ownership.jsonindex f5b039bb3f5..a0e19d07a48 100644--- a/packages/twenty-ui/docs/module-ownership.json+++ b/packages/twenty-ui/docs/module-ownership.json@@ -21,7 +21,6 @@"InputGroup","ListItem","Loader",- "Menu","NumberField","OverflowingTextWithTooltip","Popover",diff --git a/packages/twenty-ui/docs/public-exports.json b/packages/twenty-ui/docs/public-exports.jsonindex f4dddc9d46f..ba3248aebcd 100644--- a/packages/twenty-ui/docs/public-exports.json+++ b/packages/twenty-ui/docs/public-exports.json@@ -974,7 +974,6 @@"AlertDialog": "primitives/surfaces/AlertDialog/AlertDialog","Card": "primitives/surfaces/Card/Card","Dialog": "primitives/surfaces/Dialog/Dialog",- "Menu": "primitives/surfaces/Menu/Menu","Popover": "primitives/surfaces/Popover/Popover","Tooltip": "primitives/surfaces/Tooltip/Tooltip"},@@ -1035,21 +1034,6 @@"DialogTriggerState": "primitives/surfaces/Dialog/types/DialogTriggerState","DialogViewportProps": "primitives/surfaces/Dialog/types/DialogViewportProps","DialogViewportState": "primitives/surfaces/Dialog/types/DialogViewportState",- "MenuActionItemProps": "primitives/surfaces/Menu/types/MenuActionItemProps",- "MenuAlign": "primitives/surfaces/Menu/types/MenuAlign",- "MenuCheckboxItemProps": "primitives/surfaces/Menu/types/MenuCheckboxItemProps",- "MenuGroupLabelProps": "primitives/surfaces/Menu/types/MenuGroupLabelProps",- "MenuGroupProps": "primitives/surfaces/Menu/types/MenuGroupProps",- "MenuItemSlotProps": "primitives/surfaces/Menu/types/MenuItemSlotProps",- "MenuPopupProps": "primitives/surfaces/Menu/types/MenuPopupProps",- "MenuRadioGroupProps": "primitives/surfaces/Menu/types/MenuRadioGroupProps",- "MenuRadioItemProps": "primitives/surfaces/Menu/types/MenuRadioItemProps",- "MenuRootProps": "primitives/surfaces/Menu/types/MenuRootProps",- "MenuSeparatorProps": "primitives/surfaces/Menu/types/MenuSeparatorProps",- "MenuSide": "primitives/surfaces/Menu/types/MenuSide",- "MenuSubmenuRootProps": "primitives/surfaces/Menu/types/MenuSubmenuRootProps",- "MenuSubmenuTriggerProps": "primitives/surfaces/Menu/types/MenuSubmenuTriggerProps",- "MenuTriggerProps": "primitives/surfaces/Menu/types/MenuTriggerProps","PopoverAlign": "primitives/surfaces/Popover/types/PopoverAlign","PopoverArrowProps": "primitives/surfaces/Popover/types/PopoverArrowProps","PopoverArrowState": "primitives/surfaces/Popover/types/PopoverArrowState",diff --git a/packages/twenty-ui/generated/components.docs.json b/packages/twenty-ui/generated/components.docs.jsonindex 96f3013a8a7..30bc0732c02 100644--- a/packages/twenty-ui/generated/components.docs.json+++ b/packages/twenty-ui/generated/components.docs.json@@ -7578,998 +7578,6 @@}]},- {- "name": "Menu",- "entryPoint": "twenty-ui/primitives/surfaces",- "slug": "surfaces/menu",- "props": [],- "parts": [- {- "name": "Root",- "props": [- {- "name": "actionsRef",- "type": "RefObject<MenuRootActions | null>",- "required": false,- "defaultValue": null,- "description": "A ref to imperative actions.\n- `unmount`: Manually unmounts the menu.\n Call this after any externally controlled closing animation finishes.\n- `close`: When specified, the menu can be closed imperatively."- },- {- "name": "children",- "type": "ReactNode | PayloadChildRenderFunction<Payload>",- "required": false,- "defaultValue": null,- "description": "The content of the menu.\nThis can be a regular React node or a render function that receives the `payload` of the active trigger."- },- {- "name": "closeParentOnEsc",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "When in a submenu, determines whether pressing the Escape key\ncloses the entire menu, or only the current child menu."- },- {- "name": "defaultOpen",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the menu is initially open.\n\nTo render a controlled menu, use the `open` prop instead."- },- {- "name": "defaultTriggerId",- "type": "string | null",- "required": false,- "defaultValue": null,- "description": "ID of the trigger that the menu is associated with.\nThis is useful in conjunction with the `defaultOpen` prop to create an initially open menu."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "handle",- "type": "MenuHandle<Payload>",- "required": false,- "defaultValue": null,- "description": "A handle to associate the menu with a trigger.\nIf specified, allows external triggers to control the menu's open state."- },- {- "name": "highlightItemOnHover",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether moving the pointer over items should highlight them.\nDisabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state."- },- {- "name": "loopFocus",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys."- },- {- "name": "modal",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Determines if the menu enters a modal state when open.\n- `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.\n- `false`: user interaction with the rest of the document is allowed.\n\nOn touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.\n\nNested menus ignore this prop, and menus opened by hover are never modal."- },- {- "name": "onOpenChange",- "type": "((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)",- "required": false,- "defaultValue": null,- "description": "Event handler called when the menu is opened or closed."- },- {- "name": "onOpenChangeComplete",- "type": "((open: boolean) => void)",- "required": false,- "defaultValue": null,- "description": "Event handler called after any animations complete when the menu is opened or closed."- },- {- "name": "open",- "type": "boolean",- "required": false,- "defaultValue": null,- "description": "Whether the menu is currently open."- },- {- "name": "orientation",- "type": "\"horizontal\" | \"vertical\"",- "required": false,- "defaultValue": "vertical",- "description": "The visual orientation of the menu.\nControls whether roving focus uses up/down or left/right arrow keys."- },- {- "name": "triggerId",- "type": "string | null",- "required": false,- "defaultValue": null,- "description": "ID of the trigger that the menu is associated with.\nThis is useful in conjunction with the `open` prop to create a controlled menu.\nThere's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set)."- }- ]- },- {- "name": "Trigger",- "props": [- {- "name": "className",- "type": "string | ((state: MenuTriggerState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "closeDelay",- "type": "number",- "required": false,- "defaultValue": "0",- "description": "How long to wait before closing the menu that was opened on hover.\nSpecified in milliseconds.\n\nRequires the `openOnHover` prop."- },- {- "name": "delay",- "type": "number",- "required": false,- "defaultValue": "100",- "description": "How long to wait before the menu may be opened on hover. Specified in milliseconds.\n\nRequires the `openOnHover` prop."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "handle",- "type": "MenuHandle<Payload>",- "required": false,- "defaultValue": null,- "description": "A handle to associate the trigger with a menu."- },- {- "name": "nativeButton",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `false` if the rendered element is not a button (for example, `<div>`)."- },- {- "name": "openOnHover",- "type": "boolean",- "required": false,- "defaultValue": null,- "description": "Whether the menu should also open when the trigger is hovered."- },- {- "name": "payload",- "type": "Payload",- "required": false,- "defaultValue": null,- "description": "A payload to pass to the menu when it is opened."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuTriggerState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuTriggerState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "Popup",- "props": [- {- "name": "align",- "type": "\"center\" | \"end\" | \"start\"",- "required": false,- "defaultValue": null,- "description": "Alignment of the popup along the anchor. Defaults to `start`."- },- {- "name": "alignOffset",- "type": "number",- "required": false,- "defaultValue": null,- "description": "Offset in pixels along the alignment axis. Defaults to `0` for a menu and\n`-4` for a submenu."- },- {- "name": "anchor",- "type": "Element | VirtualElement | RefObject<Element | null> | (() => Element | VirtualElement | null) | null",- "required": false,- "defaultValue": null,- "description": "Element or position the popup is anchored to. Defaults to the trigger."- },- {- "name": "className",- "type": "string | ((state: MenuPopupState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "container",- "type": "HTMLElement | ShadowRoot | RefObject<HTMLElement | ShadowRoot | null> | null",- "required": false,- "defaultValue": null,- "description": "Element the popup is portaled into. Defaults to the theme's portal\ncontainer."- },- {- "name": "finalFocus",- "type": "boolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | void | HTMLElement | null)",- "required": false,- "defaultValue": null,- "description": "Determines the element to focus when the menu is closed.\n\n- `false`: Do not move focus.\n- `true`: Move focus based on the default behavior (trigger or previously focused element).\n- `RefObject`: Move focus to the ref element.\n- `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).\n Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing."- },- {- "name": "keepMounted",- "type": "boolean",- "required": false,- "defaultValue": null,- "description": "Keeps the popup mounted in the DOM while the menu is closed."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuPopupState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "side",- "type": "\"bottom\" | \"inline-end\" | \"inline-start\" | \"left\" | \"right\" | \"top\"",- "required": false,- "defaultValue": null,- "description": "Side of the anchor the popup is placed on. Defaults to `bottom` for a menu\nand `inline-end` for a submenu."- },- {- "name": "sideOffset",- "type": "number",- "required": false,- "defaultValue": null,- "description": "Distance in pixels between the anchor and the popup. Defaults to `8` for a\nmenu and `0` for a submenu."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuPopupState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "Item",- "props": [- {- "name": "className",- "type": "string | ((state: MenuItemState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "closeOnClick",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether to close the menu when the item is clicked."- },- {- "name": "color",- "type": "\"danger\" | \"neutral\"",- "required": false,- "defaultValue": null,- "description": "Color of the text and icons. `danger` marks a destructive action."- },- {- "name": "description",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Supporting text, placed according to `descriptionPlacement`."- },- {- "name": "descriptionPlacement",- "type": "\"end\" | \"inline\"",- "required": false,- "defaultValue": null,- "description": "Where the description renders: inline after the content or at the end of\nthe row."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "endIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered after the content."- },- {- "name": "label",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Overrides the text label to use when the item is matched during keyboard text navigation."- },- {- "name": "nativeButton",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `true` if the rendered element is a native button."- },- {- "name": "onClick",- "type": "((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)",- "required": false,- "defaultValue": null,- "description": "The click handler for the menu item."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuItemState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "shortcut",- "type": "ShortcutDefinition",- "required": false,- "defaultValue": null,- "description": "Keyboard shortcut keys displayed at the end of the row. Registering the\nshortcut is up to the application."- },- {- "name": "shortcutJoinLabel",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Text between sequential shortcut steps. Defaults to `then`."- },- {- "name": "startIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered before the content."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuItemState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "CheckboxItem",- "props": [- {- "name": "checked",- "type": "boolean",- "required": false,- "defaultValue": null,- "description": "Whether the checkbox item is currently ticked.\n\nTo render an uncontrolled checkbox item, use the `defaultChecked` prop instead."- },- {- "name": "className",- "type": "string | ((state: MenuCheckboxItemState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "closeOnClick",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether to close the menu when the item is clicked."- },- {- "name": "color",- "type": "\"danger\" | \"neutral\"",- "required": false,- "defaultValue": null,- "description": "Color of the text and icons. `danger` marks a destructive action."- },- {- "name": "defaultChecked",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the checkbox item is initially ticked.\n\nTo render a controlled checkbox item, use the `checked` prop instead."- },- {- "name": "description",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Supporting text, placed according to `descriptionPlacement`."- },- {- "name": "descriptionPlacement",- "type": "\"end\" | \"inline\"",- "required": false,- "defaultValue": null,- "description": "Where the description renders: inline after the content or at the end of\nthe row."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "endIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered after the content."- },- {- "name": "label",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Overrides the text label to use when the item is matched during keyboard text navigation."- },- {- "name": "nativeButton",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `true` if the rendered element is a native button."- },- {- "name": "onCheckedChange",- "type": "((checked: boolean, eventDetails: MenuRootChangeEventDetails) => void)",- "required": false,- "defaultValue": null,- "description": "Event handler called when the checkbox item is ticked or unticked."- },- {- "name": "onClick",- "type": "((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)",- "required": false,- "defaultValue": null,- "description": "The click handler for the menu item."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuCheckboxItemState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "shortcut",- "type": "ShortcutDefinition",- "required": false,- "defaultValue": null,- "description": "Keyboard shortcut keys displayed at the end of the row. Registering the\nshortcut is up to the application."- },- {- "name": "shortcutJoinLabel",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Text between sequential shortcut steps. Defaults to `then`."- },- {- "name": "startIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered before the content."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuCheckboxItemState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "RadioGroup",- "props": [- {- "name": "children",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "The content of the component."- },- {- "name": "className",- "type": "string | ((state: MenuRadioGroupState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "defaultValue",- "type": "any",- "required": false,- "defaultValue": null,- "description": "The uncontrolled value of the radio item that should be initially selected.\n\nTo render a controlled radio group, use the `value` prop instead."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "onValueChange",- "type": "((value: any, eventDetails: MenuRootChangeEventDetails) => void)",- "required": false,- "defaultValue": null,- "description": "Function called when the selected value changes."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuRadioGroupState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuRadioGroupState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- },- {- "name": "value",- "type": "any",- "required": false,- "defaultValue": null,- "description": "The controlled value of the radio item that should be currently selected.\n\nTo render an uncontrolled radio group, use the `defaultValue` prop instead."- }- ]- },- {- "name": "RadioItem",- "props": [- {- "name": "className",- "type": "string | ((state: MenuRadioItemState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "closeOnClick",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether to close the menu when the item is clicked."- },- {- "name": "color",- "type": "\"danger\" | \"neutral\"",- "required": false,- "defaultValue": null,- "description": "Color of the text and icons. `danger` marks a destructive action."- },- {- "name": "description",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Supporting text, placed according to `descriptionPlacement`."- },- {- "name": "descriptionPlacement",- "type": "\"end\" | \"inline\"",- "required": false,- "defaultValue": null,- "description": "Where the description renders: inline after the content or at the end of\nthe row."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "endIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered after the content."- },- {- "name": "label",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Overrides the text label to use when the item is matched during keyboard text navigation."- },- {- "name": "nativeButton",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `true` if the rendered element is a native button."- },- {- "name": "onClick",- "type": "((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)",- "required": false,- "defaultValue": null,- "description": "The click handler for the menu item."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuRadioItemState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "shortcut",- "type": "ShortcutDefinition",- "required": false,- "defaultValue": null,- "description": "Keyboard shortcut keys displayed at the end of the row. Registering the\nshortcut is up to the application."- },- {- "name": "shortcutJoinLabel",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Text between sequential shortcut steps. Defaults to `then`."- },- {- "name": "startIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered before the content."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuRadioItemState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- },- {- "name": "value",- "type": "any",- "required": true,- "defaultValue": null,- "description": "Value of the radio item.\nThis is the value that will be set in the MenuRadioGroup when the item is selected."- }- ]- },- {- "name": "Group",- "props": [- {- "name": "children",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "The content of the component."- },- {- "name": "className",- "type": "string | ((state: MenuGroupState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuGroupState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuGroupState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "GroupLabel",- "props": [- {- "name": "className",- "type": "string | ((state: MenuGroupLabelState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuGroupLabelState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuGroupLabelState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "Separator",- "props": [- {- "name": "className",- "type": "string | ((state: SeparatorState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "orientation",- "type": "\"horizontal\" | \"vertical\"",- "required": false,- "defaultValue": "horizontal",- "description": "The orientation of the separator."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, SeparatorState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "style",- "type": "CSSProperties | ((state: SeparatorState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- },- {- "name": "SubmenuRoot",- "props": [- {- "name": "actionsRef",- "type": "RefObject<MenuRootActions | null>",- "required": false,- "defaultValue": null,- "description": "A ref to imperative actions.\n- `unmount`: Manually unmounts the menu.\n Call this after any externally controlled closing animation finishes.\n- `close`: When specified, the menu can be closed imperatively."- },- {- "name": "children",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "The content of the submenu."- },- {- "name": "closeParentOnEsc",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "When in a submenu, determines whether pressing the Escape key\ncloses the entire menu, or only the current child menu."- },- {- "name": "defaultOpen",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the menu is initially open.\n\nTo render a controlled menu, use the `open` prop instead."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "highlightItemOnHover",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether moving the pointer over items should highlight them.\nDisabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state."- },- {- "name": "loopFocus",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether to loop keyboard focus back to the first item\nwhen the end of the list is reached while using the arrow keys."- },- {- "name": "onOpenChange",- "type": "((open: boolean, eventDetails: MenuRootChangeEventDetails) => void)",- "required": false,- "defaultValue": null,- "description": "Event handler called when the menu is opened or closed."- },- {- "name": "onOpenChangeComplete",- "type": "((open: boolean) => void)",- "required": false,- "defaultValue": null,- "description": "Event handler called after any animations complete when the menu is opened or closed."- },- {- "name": "open",- "type": "boolean",- "required": false,- "defaultValue": null,- "description": "Whether the menu is currently open."- },- {- "name": "orientation",- "type": "\"horizontal\" | \"vertical\"",- "required": false,- "defaultValue": "vertical",- "description": "The visual orientation of the menu.\nControls whether roving focus uses up/down or left/right arrow keys."- }- ]- },- {- "name": "SubmenuTrigger",- "props": [- {- "name": "className",- "type": "string | ((state: MenuSubmenuTriggerState) => string | undefined)",- "required": false,- "defaultValue": null,- "description": "CSS class applied to the element, or a function that\nreturns a class based on the component's state."- },- {- "name": "closeDelay",- "type": "number",- "required": false,- "defaultValue": "0",- "description": "How long to wait before closing the menu that was opened on hover.\nSpecified in milliseconds.\n\nRequires the `openOnHover` prop."- },- {- "name": "color",- "type": "\"danger\" | \"neutral\"",- "required": false,- "defaultValue": null,- "description": "Color of the text and icons. `danger` marks a destructive action."- },- {- "name": "delay",- "type": "number",- "required": false,- "defaultValue": "100",- "description": "How long to wait before the menu may be opened on hover. Specified in milliseconds.\n\nRequires the `openOnHover` prop."- },- {- "name": "description",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Supporting text, placed according to `descriptionPlacement`."- },- {- "name": "descriptionPlacement",- "type": "\"end\" | \"inline\"",- "required": false,- "defaultValue": null,- "description": "Where the description renders: inline after the content or at the end of\nthe row."- },- {- "name": "disabled",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component should ignore user interaction."- },- {- "name": "endIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered after the content."- },- {- "name": "label",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Overrides the text label to use when the item is matched during keyboard text navigation."- },- {- "name": "nativeButton",- "type": "boolean",- "required": false,- "defaultValue": "false",- "description": "Whether the component renders a native `<button>` element when replacing it\nvia the `render` prop.\nSet to `true` if the rendered element is a native button."- },- {- "name": "onClick",- "type": "((event: BaseUIEvent<MouseEvent<HTMLDivElement, MouseEvent>>) => void)",- "required": false,- "defaultValue": null,- "description": "The click handler for the submenu trigger."- },- {- "name": "openOnHover",- "type": "boolean",- "required": false,- "defaultValue": "true",- "description": "Whether the menu should also open when the trigger is hovered."- },- {- "name": "render",- "type": "ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, MenuSubmenuTriggerState>",- "required": false,- "defaultValue": null,- "description": "Allows you to replace the component's HTML element\nwith a different tag, or compose it with another component.\n\nAccepts a `ReactElement` or a function that returns the element to render."- },- {- "name": "shortcut",- "type": "ShortcutDefinition",- "required": false,- "defaultValue": null,- "description": "Keyboard shortcut keys displayed at the end of the row. Registering the\nshortcut is up to the application."- },- {- "name": "shortcutJoinLabel",- "type": "string",- "required": false,- "defaultValue": null,- "description": "Text between sequential shortcut steps. Defaults to `then`."- },- {- "name": "startIcon",- "type": "ReactNode",- "required": false,- "defaultValue": null,- "description": "Icon rendered before the content."- },- {- "name": "style",- "type": "CSSProperties | ((state: MenuSubmenuTriggerState) => CSSProperties | undefined)",- "required": false,- "defaultValue": null,- "description": "Style applied to the element, or a function that\nreturns a style object based on the component's state."- }- ]- }- ]- },{"name": "Popover","entryPoint": "twenty-ui/primitives/surfaces",diff --git a/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx b/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsxindex ad67efe3eb6..6e67a625319 100644--- a/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx+++ b/packages/twenty-ui/src/components/__stories__/LabelOverrides.stories.tsx@@ -10,11 +10,11 @@ import {Toaster,ToastProvider,} from '@ui/components';+import { DROPDOWN_STORY_A11Y_PARAMETERS } from '@ui/components/navigation/Dropdown/__stories__/dropdownStoryA11yParameters';import { Avatar } from '@ui/primitives/data-display/Avatar/Avatar';import { Button } from '@ui/primitives/input/Button/Button';import { ResizeHandle } from '@ui/primitives/layout/ResizeHandle/ResizeHandle';import { ListItem } from '@ui/primitives/navigation/ListItem/ListItem';-import { Menu } from '@ui/primitives/surfaces/Menu/Menu';import { Text } from '@ui/primitives/typography/Text/Text';import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';@@ -132,40 +132,50 @@ export const NativeNames: Story = {},};-export const MenuShortcutLabels: Story = {+export const DropdownShortcutLabels: Story = {+ parameters: { a11y: DROPDOWN_STORY_A11Y_PARAMETERS },render: () => (- <Menu.Root>- <Menu.Trigger render={<Button>Open shortcuts</Button>} />- <Menu.Popup aria-label="Shortcuts">- <Menu.Item shortcut={[['G'], ['D']]}>Default</Menu.Item>- <Menu.Item shortcut={[['G'], ['A']]} shortcutJoinLabel="followed by">+ <Dropdown.Root type="menu">+ <Dropdown.Trigger render={<Button>Open shortcuts</Button>} />+ <Dropdown.Content aria-label="Shortcuts">+ <Dropdown.ActionItem shortcut={[['G'], ['D']]}>+ Default+ </Dropdown.ActionItem>+ <Dropdown.ActionItem+ shortcut={[['G'], ['A']]}+ shortcutJoinLabel="followed by"+ >Action- </Menu.Item>- <Menu.CheckboxItem shortcut={[['G'], ['C']]} shortcutJoinLabel="next">- Checkbox- </Menu.CheckboxItem>- <Menu.RadioGroup value="radio">- <Menu.RadioItem- value="radio"- shortcut={[['G'], ['R']]}- shortcutJoinLabel="afterwards"- >- Radio- </Menu.RadioItem>- </Menu.RadioGroup>- <Menu.SubmenuRoot>- <Menu.SubmenuTrigger+ </Dropdown.ActionItem>+ <Dropdown.OptionItem+ selected={false}+ indicator="checkbox"+ shortcut={[['G'], ['C']]}+ shortcutJoinLabel="next"+ >+ Unselected option+ </Dropdown.OptionItem>+ <Dropdown.OptionItem+ selected+ closeOnSelect={false}+ shortcut={[['G'], ['R']]}+ shortcutJoinLabel="afterwards"+ >+ Selected option+ </Dropdown.OptionItem>+ <Dropdown.Submenu>+ <Dropdown.SubmenuTriggershortcut={[['G'], ['S']]}shortcutJoinLabel="and">Submenu- </Menu.SubmenuTrigger>- <Menu.Popup>- <Menu.Item>Nested action</Menu.Item>- </Menu.Popup>- </Menu.SubmenuRoot>- </Menu.Popup>- </Menu.Root>+ </Dropdown.SubmenuTrigger>+ <Dropdown.Content>+ <Dropdown.ActionItem>Nested action</Dropdown.ActionItem>+ </Dropdown.Content>+ </Dropdown.Submenu>+ </Dropdown.Content>+ </Dropdown.Root>),play: async ({ canvasElement }) => {await userEvent.click(diff --git a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.interactions.stories.tsx b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.interactions.stories.tsxindex d605e54147b..67504b91904 100644--- a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.interactions.stories.tsx+++ b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionProvider.interactions.stories.tsx@@ -22,57 +22,55 @@ export const LeftToRight: Story = {const backwardKey =args.direction === 'rtl' ? '{ArrowRight}' : '{ArrowLeft}';- for (const family of ['Menu', 'Dropdown']) {- const trigger = canvas.getByRole('button', {- name: `Open ${family.toLowerCase()}`,- });- await userEvent.click(trigger);- const popup = await body.findByRole('menu', {- name: family === 'Menu' ? 'Open menu' : 'Record options',- });- expect(getComputedStyle(popup).direction).toBe(args.direction);- expect(canvasElement.contains(popup)).toBe(args.scoped !== false);- const submenuTrigger = within(popup).getByRole('menuitem', {- name: `${family} export`,- });- submenuTrigger.focus();- await userEvent.keyboard(forwardKey);- const submenu = await body.findByRole('menu', {- name: family === 'Menu' ? 'Menu export' : 'Dropdown export formats',- });- const item = within(submenu).getByRole('menuitem', {- name: `${family} CSV`,- });- await waitFor(() => expect(item).toHaveFocus());- expect(getComputedStyle(submenu).direction).toBe(args.direction);- await waitFor(() => {- const parentBox = submenuTrigger.getBoundingClientRect();- const childBox = submenu.getBoundingClientRect();- expect(- args.direction === 'rtl'- ? childBox.right <= parentBox.left + 2- : childBox.left >= parentBox.right - 2,- ).toBe(true);- });- await userEvent.keyboard(backwardKey);- await waitFor(() => expect(submenuTrigger).toHaveFocus());- await userEvent.keyboard('{Escape}');- await waitFor(() => expect(trigger).toHaveFocus());- await userEvent.click(trigger);- await userEvent.hover(- await body.findByRole('menuitem', { name: `${family} export` }),- );- await userEvent.click(- await body.findByRole('menuitem', { name: `${family} CSV` }),- );- await waitFor(() =>- expect(- body.queryByRole('menu', {- name: family === 'Menu' ? 'Open menu' : 'Record options',- }),- ).not.toBeInTheDocument(),- );- }+ const trigger = canvas.getByRole('button', {+ name: 'Open dropdown',+ });+ await userEvent.click(trigger);+ const popup = await body.findByRole('menu', {+ name: 'Record options',+ });+ expect(getComputedStyle(popup).direction).toBe(args.direction);+ expect(canvasElement.contains(popup)).toBe(args.scoped !== false);+ const submenuTrigger = within(popup).getByRole('menuitem', {+ name: 'Dropdown export',+ });+ submenuTrigger.focus();+ await userEvent.keyboard(forwardKey);+ const submenu = await body.findByRole('menu', {+ name: 'Dropdown export formats',+ });+ const item = within(submenu).getByRole('menuitem', {+ name: 'Dropdown CSV',+ });+ await waitFor(() => expect(item).toHaveFocus());+ expect(getComputedStyle(submenu).direction).toBe(args.direction);+ await waitFor(() => {+ const parentBox = submenuTrigger.getBoundingClientRect();+ const childBox = submenu.getBoundingClientRect();+ expect(+ args.direction === 'rtl'+ ? childBox.right <= parentBox.left + 2+ : childBox.left >= parentBox.right - 2,+ ).toBe(true);+ });+ await userEvent.keyboard(backwardKey);+ await waitFor(() => expect(submenuTrigger).toHaveFocus());+ await userEvent.keyboard('{Escape}');+ await waitFor(() => expect(trigger).toHaveFocus());+ await userEvent.click(trigger);+ await userEvent.hover(+ await body.findByRole('menuitem', { name: 'Dropdown export' }),+ );+ await userEvent.click(+ await body.findByRole('menuitem', { name: 'Dropdown CSV' }),+ );+ await waitFor(() =>+ expect(+ body.queryByRole('menu', {+ name: 'Record options',+ }),+ ).not.toBeInTheDocument(),+ );await userEvent.click(canvas.getByRole('button', { name: 'Open dropdown' }),);diff --git a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalMenusExample.tsx b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalMenusExample.tsxindex a2c251b6f90..267f379769e 100644--- a/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalMenusExample.tsx+++ b/packages/twenty-ui/src/components/__stories__/reading-direction/DirectionalMenusExample.tsx@@ -1,7 +1,7 @@import { Dropdown } from '@ui/components';import { Button } from '@ui/primitives/input';import { IconInfoCircle } from '@ui/icon';-import { Menu, Tooltip } from '@ui/primitives/surfaces';+import { Tooltip } from '@ui/primitives/surfaces';import { ThemeProvider } from '@ui/theme';import { DirectionProvider } from '@ui/primitives/layout/DirectionProvider/DirectionProvider';@@ -26,17 +26,6 @@ export const DirectionalMenusExample = ({background: 'var(--t-background-primary)',}}>- <Menu.Root>- <Menu.Trigger render={<Button>Open menu</Button>} />- <Menu.Popup>- <Menu.SubmenuRoot>- <Menu.SubmenuTrigger>Menu export</Menu.SubmenuTrigger>- <Menu.Popup>- <Menu.Item>Menu CSV</Menu.Item>- </Menu.Popup>- </Menu.SubmenuRoot>- </Menu.Popup>- </Menu.Root><Dropdown.Root type="menu"><Dropdown.Trigger render={<Button>Open dropdown</Button>} /><Dropdown.Content>diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss b/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scssindex f7182a96706..6d7accb5f39 100644--- a/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss+++ b/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss@@ -15,6 +15,31 @@display: contents;}+.group {+ display: flex;+ flex-direction: column;+ gap: var(--t-between-siblings-gap);+}++.groupLabel {+ background: var(--t-background-transparent-lighter);+ color: var(--t-font-color-tertiary);+ font-size: var(--t-font-size-xxs);+ padding-inline: var(--t-spacing-2);+ margin-inline: calc(-1 * var(--t-spacing-1));+ min-block-size: 20px;+ display: flex;+ align-items: center;+ user-select: none;+}++.separator {+ block-size: 1px;+ flex: none;+ background: var(--t-border-color-light);+ margin-inline: calc(-1 * var(--t-spacing-1));+}+.section {padding: var(--t-spacing-1);diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss.d.ts b/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss.d.tsindex 91d03f861d4..42b204f218b 100644--- a/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss.d.ts+++ b/packages/twenty-ui/src/components/navigation/Dropdown/Dropdown.module.scss.d.ts@@ -2,6 +2,8 @@ declare const classNames: {readonly header: 'header';readonly content: 'content';readonly page: 'page';+ readonly group: 'group';+ readonly groupLabel: 'groupLabel';readonly section: 'section';readonly separator: 'separator';readonly back: 'back';diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuGroup.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownGroup.tsxsimilarity index 57%rename from packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuGroup.tsxrename to packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownGroup.tsxindex 1e89972a7e0..8e7deb3bdcb 100644--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuGroup.tsx+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownGroup.tsx@@ -2,10 +2,11 @@ import { Menu as MenuPrimitive } from '@base-ui/react/menu';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';-import styles from '../Menu.module.scss';-import { type MenuGroupProps } from '../types/MenuGroupProps';+import styles from '../Dropdown.module.scss';-export const MenuGroup = ({ className, ...props }: MenuGroupProps) => (+type DropdownGroupProps = MenuPrimitive.Group.Props;++export const DropdownGroup = ({ className, ...props }: DropdownGroupProps) => (<MenuPrimitive.Group{...props}className={mergeClassNames(styles.group, className)}diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuGroupLabel.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownGroupLabel.tsxsimilarity index 60%rename from packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuGroupLabel.tsxrename to packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownGroupLabel.tsxindex 836836b84e4..dd441a0afce 100644--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuGroupLabel.tsx+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownGroupLabel.tsx@@ -2,13 +2,14 @@ import { Menu as MenuPrimitive } from '@base-ui/react/menu';import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';-import styles from '../Menu.module.scss';-import { type MenuGroupLabelProps } from '../types/MenuGroupLabelProps';+import styles from '../Dropdown.module.scss';-export const MenuGroupLabel = ({+type DropdownGroupLabelProps = MenuPrimitive.GroupLabel.Props;++export const DropdownGroupLabel = ({className,...props-}: MenuGroupLabelProps) => (+}: DropdownGroupLabelProps) => (<MenuPrimitive.GroupLabel{...props}className={mergeClassNames(styles.groupLabel, className)}diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSection.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSection.tsxindex 0b09ea34b7f..77d4df264f5 100644--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSection.tsx+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSection.tsx@@ -1,11 +1,11 @@import { isPositiveInteger } from '@sniptt/guards';import { clsx } from 'clsx';-import { MenuGroup } from '@ui/primitives/surfaces/Menu/internal/MenuGroup';-import { MenuGroupLabel } from '@ui/primitives/surfaces/Menu/internal/MenuGroupLabel';import { isDefined } from '@ui/utilities/utils/isDefined';import styles from '../Dropdown.module.scss';+import { DropdownGroup } from './DropdownGroup';+import { DropdownGroupLabel } from './DropdownGroupLabel';import { type DropdownSectionProps } from '../types/DropdownSectionProps';export const DropdownSection = ({@@ -20,7 +20,7 @@ export const DropdownSection = ({const gridColumns = isPositiveInteger(columns) ? columns : undefined;return (- <MenuGroup+ <DropdownGroup{...props}data-scrollable={scrollable || undefined}data-dropdown-columns={gridColumns}@@ -33,9 +33,11 @@ export const DropdownSection = ({className={clsx(styles.section, className)}>{isDefined(label) && (- <MenuGroupLabel data-dropdown-section-label="">{label}</MenuGroupLabel>+ <DropdownGroupLabel data-dropdown-section-label="">+ {label}+ </DropdownGroupLabel>)}{children}- </MenuGroup>+ </DropdownGroup>);};diff --git a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSeparator.tsx b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSeparator.tsxindex 430d903d0bd..e552e03be9c 100644--- a/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSeparator.tsx+++ b/packages/twenty-ui/src/components/navigation/Dropdown/internal/DropdownSeparator.tsx@@ -1,7 +1,7 @@import { clsx } from 'clsx';import { type ComponentPropsWithRef } from 'react';-import { MenuSeparator } from '@ui/primitives/surfaces/Menu/internal/MenuSeparator';+import { Menu as MenuPrimitive } from '@base-ui/react/menu';import styles from '../Dropdown.module.scss';@@ -9,7 +9,7 @@ export const DropdownSeparator = ({className,...props}: ComponentPropsWithRef<'div'>) => (- <MenuSeparator+ <MenuPrimitive.Separator{...props}role="separator"data-dropdown-separator=""diff --git a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsx b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsxindex fcf0bc6be50..8f4d840efee 100644--- a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsx+++ b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItem.stories.tsx@@ -21,8 +21,6 @@ import { type ListItemColor } from '@ui/primitives/navigation/ListItem/types/Lisimport { type ListItemIndicator } from '@ui/primitives/navigation/ListItem/types/ListItemIndicator';import { type ListItemProps } from '@ui/primitives/navigation/ListItem/types/ListItemProps';-import { ListItemMenuExample } from './ListItemMenuExample';-const meta: Meta<typeof ListItem> = {title: 'UI/Navigation/ListItem',component: ListItem,@@ -116,12 +114,6 @@ export const ExplicitLinkContent: Story = {},};-export const MenuOwner: Story = {- decorators: [ComponentDecorator],- parameters: { container: { width: 240, height: 200 } },- render: () => <ListItemMenuExample />,-};-export const WithCheckbox: Story = {decorators: [ComponentDecorator],parameters: { container: { width: 240 } },diff --git a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemInteractions.stories.tsx b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemInteractions.stories.tsxindex 8b720172579..c080248971f 100644--- a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemInteractions.stories.tsx+++ b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemInteractions.stories.tsx@@ -1,6 +1,6 @@import { type Meta, type StoryObj } from '@storybook/react-vite';import { useState } from 'react';-import { expect, fn, userEvent, waitFor, within } from 'storybook/test';+import { expect, fn, userEvent, within } from 'storybook/test';import { IconEdit, IconTrash } from '@ui/icon';import { Button } from '@ui/primitives/input/Button/Button';@@ -10,8 +10,6 @@ import { ListItem } from '../ListItem';import styles from '../ListItem.module.scss';import { type ListItemProps } from '../types/ListItemProps';-import { ListItemMenuExample } from './ListItemMenuExample';-const SelectableListItemExample = (props: ListItemProps) => {const [selected, setSelected] = useState(false);@@ -353,42 +351,3 @@ export const PersistentActions: Story = {await expect(canvas.getByRole('button', { name: 'Delete' })).toBeVisible();},};--export const MenuOwner: Story = {- parameters: { container: { width: 240, height: 200 } },- render: (args) => <ListItemMenuExample onClick={args.onClick} />,- play: async ({ canvasElement, args }) => {- const canvas = within(canvasElement);- const page = within(canvasElement.ownerDocument.body);- const trigger = canvas.getByRole('button', { name: 'Record actions' });-- await userEvent.click(trigger);- const menu = await page.findByRole('menu', { name: 'Record actions' });- await waitFor(() => expect(menu).toBeVisible());- const duplicate = within(menu).getByRole('menuitem', {- name: 'Duplicate record',- });- const unavailable = within(menu).getByRole('menuitem', {- name: 'Unavailable action',- });- const exported = within(menu).getByRole('menuitem', {- name: 'Export record',- });-- await expect(unavailable).toHaveAttribute('aria-disabled', 'true');- duplicate.focus();- await userEvent.keyboard('{ArrowDown}');- await expect(unavailable).toHaveFocus();- await userEvent.keyboard('{Enter}');- await expect(args.onClick).not.toHaveBeenCalled();- await expect(menu).toBeVisible();- await userEvent.keyboard('{ArrowDown}');- await expect(exported).toHaveFocus();- await userEvent.keyboard('{ArrowUp}{ArrowUp}{Enter}');- await expect(args.onClick).toHaveBeenCalledOnce();- await waitFor(() =>- expect(page.queryByRole('menu')).not.toBeInTheDocument(),- );- await expect(trigger).toHaveFocus();- },-};diff --git a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemMenuExample.tsx b/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemMenuExample.tsxdeleted file mode 100644index c8f2f0a05ba..00000000000--- a/packages/twenty-ui/src/primitives/navigation/ListItem/__stories__/ListItemMenuExample.tsx+++ /dev/null@@ -1,20 +0,0 @@-import { Button } from '@ui/primitives/input/Button/Button';-import { type ListItemProps } from '@ui/primitives/navigation/ListItem/types/ListItemProps';-import { Menu } from '@ui/primitives/surfaces/Menu/Menu';--type ListItemMenuExampleProps = {- onClick?: ListItemProps['onClick'];-};--export const ListItemMenuExample = ({ onClick }: ListItemMenuExampleProps) => (- <Menu.Root>- <Menu.Trigger render={<Button>Record actions</Button>} />- <Menu.Popup>- <Menu.Item onClick={onClick}>Duplicate record</Menu.Item>- <Menu.Item disabled onClick={onClick}>- Unavailable action- </Menu.Item>- <Menu.Item>Export record</Menu.Item>- </Menu.Popup>- </Menu.Root>-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.module.scss b/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.module.scssdeleted file mode 100644index 0cc36d7d408..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.module.scss+++ /dev/null@@ -1,64 +0,0 @@-.positioner {- z-index: var(--t-last-layer-z-index);-}--.popup {- --tw-menu-popup-inline-size: 200px;-- backdrop-filter: var(--t-blur-medium);- background: var(--t-background-transparent-primary);- border: 1px solid var(--t-border-color-medium);- border-radius: var(--t-border-radius-md);- box-shadow: var(--t-box-shadow-strong);- color: var(--t-font-color-primary);- outline: none;- padding: var(--t-spacing-1);- display: flex;- flex-direction: column;- gap: var(--t-between-siblings-gap);- inline-size: var(--tw-menu-popup-inline-size);- max-block-size: var(--available-height);- overflow-y: auto;- box-sizing: border-box;- transition: opacity duration(fast) ease-out;-- [role='menuitem'],- [role='menuitemcheckbox'],- [role='menuitemradio'] {- box-sizing: border-box;- }-- &[data-starting-style],- &[data-ending-style] {- opacity: 0;- }-- &[data-ending-style] {- transition-timing-function: ease-in;- }-}--.group {- display: flex;- flex-direction: column;- gap: var(--t-between-siblings-gap);-}--.groupLabel {- background: var(--t-background-transparent-lighter);- color: var(--t-font-color-tertiary);- font-size: var(--t-font-size-xxs);- padding-inline: var(--t-spacing-2);- margin-inline: calc(-1 * var(--t-spacing-1));- min-block-size: 20px;- display: flex;- align-items: center;- user-select: none;-}--.separator {- block-size: 1px;- flex: none;- background: var(--t-border-color-light);- margin-inline: calc(-1 * var(--t-spacing-1));-}diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.module.scss.d.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.module.scss.d.tsdeleted file mode 100644index 59e6e48c772..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.module.scss.d.ts+++ /dev/null@@ -1,8 +0,0 @@-declare const classNames: {- readonly positioner: 'positioner';- readonly popup: 'popup';- readonly group: 'group';- readonly groupLabel: 'groupLabel';- readonly separator: 'separator';-};-export default classNames;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.tsxdeleted file mode 100644index 1744409d145..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/Menu.tsx+++ /dev/null@@ -1,27 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { MenuCheckboxItem } from './internal/MenuCheckboxItem';-import { MenuGroup } from './internal/MenuGroup';-import { MenuGroupLabel } from './internal/MenuGroupLabel';-import { MenuItem } from './internal/MenuItem';-import { MenuPopup } from './internal/MenuPopup';-import { MenuRadioGroup } from './internal/MenuRadioGroup';-import { MenuRadioItem } from './internal/MenuRadioItem';-import { MenuSeparator } from './internal/MenuSeparator';-import { MenuSubmenuRoot } from './internal/MenuSubmenuRoot';-import { MenuSubmenuTrigger } from './internal/MenuSubmenuTrigger';--export const Menu = {- Root: MenuPrimitive.Root,- Trigger: MenuPrimitive.Trigger,- Popup: MenuPopup,- Item: MenuItem,- CheckboxItem: MenuCheckboxItem,- RadioGroup: MenuRadioGroup,- RadioItem: MenuRadioItem,- Group: MenuGroup,- GroupLabel: MenuGroupLabel,- Separator: MenuSeparator,- SubmenuRoot: MenuSubmenuRoot,- SubmenuTrigger: MenuSubmenuTrigger,-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.interactions.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.interactions.stories.tsxdeleted file mode 100644index 7bf01f261db..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.interactions.stories.tsx+++ /dev/null@@ -1,483 +0,0 @@-import { type Meta, type StoryObj } from '@storybook/react-vite';-import { type ReactNode, useId, useState } from 'react';-import { expect, fn, userEvent, waitFor, within } from 'storybook/test';--import { A11Y_DEFER_COLOR_CONTRAST, ComponentDecorator } from '@ui/testing';--import { Menu } from '../Menu';-import { type MenuPopupProps } from '../types/MenuPopupProps';-import { type MenuRootProps } from '../types/MenuRootProps';--type MenuExampleProps = Omit<MenuRootProps, 'children'> & {- children?: ReactNode;- popupProps?: MenuPopupProps;-};--const MenuExample = ({ children, popupProps, ...props }: MenuExampleProps) => {- const triggerId = useId();-- return (- <>- <Menu.Root defaultTriggerId={triggerId} {...props}>- <Menu.Trigger id={triggerId}>Options</Menu.Trigger>- <Menu.Popup {...popupProps}>- {children ?? (- <>- <Menu.Item>Duplicate</Menu.Item>- <Menu.Item>Archive</Menu.Item>- <Menu.Item>Delete</Menu.Item>- </>- )}- </Menu.Popup>- </Menu.Root>- <button type="button">Outside</button>- </>- );-};--const meta: Meta<typeof MenuExample> = {- title: 'UI/Surfaces/Menu/Interactions',- component: MenuExample,- decorators: [ComponentDecorator],- parameters: { container: { width: 260, height: 320 } },-};--export default meta;-type Story = StoryObj<typeof MenuExample>;--export const Keyboard: Story = {- play: async ({ canvasElement, step }) => {- const canvas = within(canvasElement);- const body = within(canvasElement.ownerDocument.body);- const trigger = canvas.getByRole('button', { name: 'Options' });- await userEvent.tab();- expect(trigger).toHaveFocus();- await userEvent.keyboard('{ArrowDown}');- const menu = await body.findByRole('menu');- const first = within(menu).getByRole('menuitem', { name: 'Duplicate' });- const middle = within(menu).getByRole('menuitem', { name: 'Archive' });- const last = within(menu).getByRole('menuitem', { name: 'Delete' });- await waitFor(() => expect(first).toHaveFocus());- expect(first).toHaveAttribute('data-highlighted');- await step('Navigate, wrap, and jump with Home and End', async () => {- for (const [key, item] of [- ['{ArrowDown}', middle],- ['{ArrowUp}', first],- ['{ArrowUp}', last],- ['{ArrowDown}', first],- ['{End}', last],- ['{Home}', first],- ] as const) {- await userEvent.keyboard(key);- await waitFor(() => expect(item).toHaveFocus());- }- });- await step('Escape closes and restores trigger focus', async () => {- await userEvent.keyboard('{Escape}');- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- await waitFor(() => expect(trigger).toHaveFocus());- });- },-};--export const Typeahead: Story = {- parameters: { a11y: A11Y_DEFER_COLOR_CONTRAST },- render: (args) => (- <MenuExample {...args}>- <Menu.Item>Duplicate</Menu.Item>- <Menu.Item description="Delete old records">Archive</Menu.Item>- <Menu.Item description="Remove this record">Delete</Menu.Item>- </MenuExample>- ),- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- await userEvent.tab();- await userEvent.keyboard('{ArrowDown}');- await waitFor(() =>- expect(body.getByRole('menuitem', { name: 'Duplicate' })).toHaveFocus(),- );- await userEvent.keyboard('de');- await waitFor(() =>- expect(- body.getByRole('menuitem', { name: 'Delete Remove this record' }),- ).toHaveFocus(),- );- expect(- body.getByRole('menuitem', { name: 'Archive Delete old records' }),- ).not.toHaveFocus();- },-};--export const ExplicitTypeaheadLabel: Story = {- render: (args) => (- <MenuExample {...args}>- <Menu.Item>Duplicate</Menu.Item>- <Menu.Item label="Delete" startIcon={<span>Prefix</span>}>- Remove- </Menu.Item>- </MenuExample>- ),- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- await userEvent.tab();- await userEvent.keyboard('{ArrowDown}');- await waitFor(() =>- expect(body.getByRole('menuitem', { name: 'Duplicate' })).toHaveFocus(),- );- await userEvent.keyboard('de');- await waitFor(() =>- expect(- body.getByRole('menuitem', { name: 'Prefix Remove' }),- ).toHaveFocus(),- );- },-};--const onActivate = fn();--export const Activation: Story = {- render: (args) => (- <MenuExample {...args}>- <Menu.Item onClick={onActivate}>Run</Menu.Item>- </MenuExample>- ),- play: async ({ canvasElement, step }) => {- const body = within(canvasElement.ownerDocument.body);- onActivate.mockClear();- await userEvent.tab();- let activationCount = 0;- for (const activation of ['Click', 'Enter', 'Space']) {- await step(`Activate with ${activation}`, async () => {- await userEvent.keyboard('{ArrowDown}');- const item = await body.findByRole('menuitem', { name: 'Run' });- await waitFor(() => expect(item).toHaveFocus());- if (activation === 'Click') await userEvent.click(item);- else await userEvent.keyboard(activation === 'Enter' ? '{Enter}' : ' ');- activationCount += 1;- expect(onActivate).toHaveBeenCalledTimes(activationCount);- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- await waitFor(() =>- expect(- within(canvasElement).getByRole('button', { name: 'Options' }),- ).toHaveFocus(),- );- });- }- },-};--export const KeepOpenOnActivation: Story = {- render: (args) => (- <MenuExample {...args}>- <Menu.Item closeOnClick={false} onClick={onActivate}>- Run- </Menu.Item>- </MenuExample>- ),- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- onActivate.mockClear();- await userEvent.tab();- await userEvent.keyboard('{ArrowDown}');- const item = await body.findByRole('menuitem', { name: 'Run' });- await waitFor(() => expect(item).toHaveFocus());- await waitFor(() => {- expect(body.getByRole('menu')).toBeVisible();- expect(body.getByRole('menu')).toHaveStyle({ opacity: '1' });- });- await userEvent.keyboard('{Enter}');- expect(onActivate).toHaveBeenCalledTimes(1);- expect(body.getByRole('menu')).toBeVisible();- await userEvent.click(item);- expect(onActivate).toHaveBeenCalledTimes(2);- expect(body.getByRole('menu')).toBeVisible();- },-};--export const OutsideDismissal: Story = {- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);- const body = within(canvasElement.ownerDocument.body);- await userEvent.click(canvas.getByRole('button', { name: 'Options' }));- await waitFor(() => expect(body.getByRole('menu')).toBeVisible());- await userEvent.click(canvas.getByRole('button', { name: 'Outside' }));- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- },-};--export const NonModalTabbing: Story = {- args: { modal: false },- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- await userEvent.tab();- await userEvent.keyboard('{ArrowDown}');- await waitFor(() =>- expect(body.getByRole('menuitem', { name: 'Duplicate' })).toHaveFocus(),- );- await userEvent.tab();- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- await waitFor(() =>- expect(- within(canvasElement).getByRole('button', { name: 'Outside' }),- ).toHaveFocus(),- );- },-};--export const DisabledItem: Story = {- render: (args) => (- <MenuExample {...args}>- <Menu.Item>Duplicate</Menu.Item>- <Menu.Item disabled onClick={onActivate}>- Delete- </Menu.Item>- </MenuExample>- ),- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- onActivate.mockClear();- await userEvent.tab();- await userEvent.keyboard('{ArrowDown}');- await waitFor(() => expect(body.getByRole('menu')).toBeVisible());- await waitFor(() =>- expect(body.getByRole('menuitem', { name: 'Duplicate' })).toHaveFocus(),- );- await userEvent.keyboard('{ArrowDown}');- const item = body.getByRole('menuitem', { name: 'Delete' });- await waitFor(() => expect(item).toHaveFocus());- expect(item).toHaveAttribute('aria-disabled', 'true');- expect(item).toHaveAttribute('data-disabled');- expect(item).toHaveAttribute('data-highlighted');- await userEvent.keyboard('{Enter}');- await userEvent.click(item);- expect(onActivate).not.toHaveBeenCalled();- expect(body.getByRole('menu')).toBeVisible();- },-};--const ControlledMenu = (props: MenuExampleProps) => {- const [open, setOpen] = useState(true);- return (- <>- <MenuExample {...props} open={open} />- <button type="button" onClick={() => setOpen(false)}>- Apply closed state- </button>- </>- );-};--export const Controlled: Story = {- args: { onOpenChange: fn() },- render: (args) => <ControlledMenu {...args} />,- play: async ({ canvasElement, args }) => {- const body = within(canvasElement.ownerDocument.body);- const menu = await body.findByRole('menu');- await userEvent.keyboard('{Escape}');- expect(args.onOpenChange).toHaveBeenCalledWith(- false,- expect.objectContaining({ reason: 'escape-key' }),- );- expect(menu).toBeVisible();- await userEvent.click(- within(menu).getByRole('menuitem', { name: 'Duplicate' }),- );- expect(args.onOpenChange).toHaveBeenCalledWith(- false,- expect.objectContaining({ reason: 'item-press' }),- );- expect(menu).toBeVisible();- await userEvent.click(- within(canvasElement).getByRole('button', { name: 'Apply closed state' }),- );- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- },-};--const onCheckedChange = fn();-const onValueChange = fn();--export const UncontrolledSelection: Story = {- args: { defaultOpen: true },- render: (args) => (- <MenuExample {...args}>- <Menu.CheckboxItem onCheckedChange={onCheckedChange}>- Notifications- </Menu.CheckboxItem>- <Menu.CheckboxItem defaultChecked>Pinned</Menu.CheckboxItem>- <Menu.RadioGroup defaultValue="list" onValueChange={onValueChange}>- <Menu.RadioItem value="list">List view</Menu.RadioItem>- <Menu.RadioItem value="board">Board view</Menu.RadioItem>- </Menu.RadioGroup>- </MenuExample>- ),- play: async ({ canvasElement }) => {- const menu = await within(canvasElement.ownerDocument.body).findByRole(- 'menu',- );- const item = within(menu).getByRole('menuitemcheckbox', {- name: 'Notifications',- });- expect(item).toHaveAttribute('aria-checked', 'false');- expect(item).toHaveAttribute('data-indicator', 'checkbox');- expect(item).not.toHaveAttribute('data-selected');- expect(- within(menu).getByRole('menuitemcheckbox', { name: 'Pinned' }),- ).toHaveAttribute('data-selected');- await userEvent.click(item);- expect(onCheckedChange).toHaveBeenLastCalledWith(true, expect.anything());- expect(item).toHaveAttribute('aria-checked', 'true');- expect(item).toHaveAttribute('data-selected');- await userEvent.click(item);- expect(item).toHaveAttribute('aria-checked', 'false');- expect(item).not.toHaveAttribute('data-selected');- const first = within(menu).getByRole('menuitemradio', {- name: 'List view',- });- const second = within(menu).getByRole('menuitemradio', {- name: 'Board view',- });- await userEvent.click(second);- expect(onValueChange).toHaveBeenLastCalledWith('board', expect.anything());- expect(first).toHaveAttribute('aria-checked', 'false');- expect(first).not.toHaveAttribute('data-selected');- expect(second).toHaveAttribute('aria-checked', 'true');- expect(second).toHaveAttribute('data-selected');- expect(second).toHaveAttribute('data-indicator', 'check');- expect(first.querySelector('svg')).not.toBeInTheDocument();- expect(second.querySelectorAll('svg')).toHaveLength(1);- expect(menu).toBeVisible();- },-};--const SubmenuExample = ({ popupProps, ...props }: MenuExampleProps) => (- <MenuExample {...props}>- <Menu.SubmenuRoot>- <Menu.SubmenuTrigger>More</Menu.SubmenuTrigger>- <Menu.Popup {...popupProps}>- <Menu.Item>Export</Menu.Item>- <Menu.Item>Share</Menu.Item>- </Menu.Popup>- </Menu.SubmenuRoot>- </MenuExample>-);--export const KeyboardSubmenu: Story = {- render: (args) => <SubmenuExample {...args} />,- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- await userEvent.tab();- await userEvent.keyboard('{ArrowDown}');- const trigger = await body.findByRole('menuitem', { name: 'More' });- await waitFor(() => expect(trigger).toHaveFocus());- expect(trigger).toHaveAttribute('aria-haspopup', 'menu');- expect(trigger.querySelector('svg')).toBeInTheDocument();- await userEvent.keyboard('{ArrowRight}');- const submenu = await body.findByRole('menu', { name: 'More' });- expect(trigger).toHaveAttribute('data-popup-open');- await waitFor(() =>- expect(submenu).toHaveAttribute('data-side', 'inline-end'),- );- expect(submenu).toHaveAttribute('data-align', 'start');- expect(body.getByRole('menu', { name: 'Options' })).toHaveAttribute(- 'data-side',- 'bottom',- );- await waitFor(() =>- expect(- within(submenu).getByRole('menuitem', { name: 'Export' }),- ).toHaveFocus(),- );- await userEvent.keyboard('{ArrowLeft}');- await waitFor(() =>- expect(- body.queryByRole('menu', { name: 'More' }),- ).not.toBeInTheDocument(),- );- await waitFor(() => expect(trigger).toHaveFocus());- },-};--export const HoverSubmenu: Story = {- parameters: { container: { width: 480, height: 400 } },- args: { popupProps: { side: 'top', align: 'end' } },- render: (args) => (- <div style={{ paddingTop: 160, paddingInlineStart: 160 }}>- <SubmenuExample {...args} />- </div>- ),- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- await userEvent.click(- within(canvasElement).getByRole('button', { name: 'Options' }),- );- await userEvent.hover(await body.findByRole('menuitem', { name: 'More' }));- const submenu = await body.findByRole('menu', { name: 'More' });- await waitFor(() => expect(submenu).toHaveAttribute('data-side', 'top'));- expect(submenu).toHaveAttribute('data-align', 'end');- },-};--export const RenderState: Story = {- args: { defaultOpen: true },- render: (args) => (- <MenuExample {...args}>- <Menu.CheckboxItem- className={(state) => (state.checked ? 'checked' : 'unchecked')}- style={(state) => ({ marginTop: state.checked ? 7 : 3 })}- render={(props, state) => (- <div {...props} data-render-checked={state.checked} />- )}- >- Notifications- </Menu.CheckboxItem>- </MenuExample>- ),- play: async ({ canvasElement }) => {- const item = await within(canvasElement.ownerDocument.body).findByRole(- 'menuitemcheckbox',- { name: 'Notifications' },- );- expect(item).toHaveClass('unchecked');- expect(item).toHaveAttribute('data-render-checked', 'false');- await userEvent.click(item);- expect(item).toHaveClass('checked');- expect(item).toHaveStyle({ marginTop: '7px' });- expect(item).toHaveAttribute('data-render-checked', 'true');- },-};--export const DisabledRoot: Story = {- args: { disabled: true },- play: async ({ canvasElement }) => {- await userEvent.click(- within(canvasElement).getByRole('button', { name: 'Options' }),- );- expect(- within(canvasElement.ownerDocument.body).queryByRole('menu'),- ).not.toBeInTheDocument();- },-};--export const KeepMounted: Story = {- args: { defaultOpen: true, popupProps: { keepMounted: true } },- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- expect(await body.findByRole('menu')).toBeVisible();- await userEvent.keyboard('{Escape}');- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- expect(body.getByRole('menu', { hidden: true })).not.toBeVisible();- },-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsxdeleted file mode 100644index b59ce73c645..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.portals.stories.tsx+++ /dev/null@@ -1,152 +0,0 @@-import { type Meta, type StoryObj } from '@storybook/react-vite';-import { useId, useState } from 'react';-import { expect, userEvent, within } from 'storybook/test';--import { ComponentDecorator } from '@ui/testing';-import { ThemeProvider } from '@ui/theme/ThemeProvider';--import { Menu } from '../Menu';-import { type MenuPopupProps } from '../types/MenuPopupProps';--const PortalMenu = ({ container }: Pick<MenuPopupProps, 'container'>) => {- const triggerId = useId();-- return (- <Menu.Root open triggerId={triggerId}>- <Menu.Trigger id={triggerId}>Options</Menu.Trigger>- <Menu.Popup container={container}>- <Menu.Item>Export</Menu.Item>- <Menu.Item>Share</Menu.Item>- </Menu.Popup>- </Menu.Root>- );-};--const meta: Meta<typeof PortalMenu> = {- title: 'UI/Surfaces/Menu/Portals',- component: PortalMenu,- decorators: [ComponentDecorator],- parameters: { container: { width: 260, height: 240 } },-};--export default meta;-type Story = StoryObj<typeof PortalMenu>;--export const Body: Story = {- play: async ({ canvasElement }) => {- const menu = await within(canvasElement.ownerDocument.body).findByRole(- 'menu',- { name: 'Options' },- );- expect(menu).toBeVisible();- expect(canvasElement).not.toContainElement(menu);- },-};--const ExplicitContainerMenu = () => {- const [container, setContainer] = useState<HTMLDivElement | null>(null);-- return (- <>- <PortalMenu container={container} />- <div ref={setContainer} role="region" aria-label="Menu portal" />- </>- );-};--export const ExplicitContainer: Story = {- render: () => <ExplicitContainerMenu />,- play: async ({ canvasElement }) => {- const container = within(canvasElement).getByRole('region', {- name: 'Menu portal',- });- expect(- await within(container).findByRole('menu', { name: 'Options' }),- ).toBeVisible();- },-};--export const ScopedTheme: Story = {- render: () => (- <section aria-label="Scoped theme">- <ThemeProvider colorScheme="dark" applyToRoot={false}>- <div- style={{- background: 'var(--t-background-primary)',- width: 260,- height: 240,- }}- >- <PortalMenu />- </div>- </ThemeProvider>- </section>- ),- play: async ({ canvasElement }) => {- const scope = within(canvasElement).getByRole('region', {- name: 'Scoped theme',- });- expect(- await within(scope).findByRole('menu', { name: 'Options' }),- ).toBeVisible();- },-};--export const InheritedDirection: Story = {- render: () => (- <section aria-label="Right-to-left container" dir="rtl">- <ThemeProvider colorScheme="light" applyToRoot={false}>- <div style={{ width: 260, height: 240 }}>- <PortalMenu />- </div>- </ThemeProvider>- </section>- ),- play: async ({ canvasElement }) => {- const scope = within(canvasElement).getByRole('region', {- name: 'Right-to-left container',- });- const menu = await within(scope).findByRole('menu', { name: 'Options' });- expect(getComputedStyle(menu).direction).toBe('rtl');- },-};--const DeferredContainerMenu = () => {- const [showContainer, setShowContainer] = useState(false);- const [container, setContainer] = useState<HTMLDivElement | null>(null);-- return (- <ThemeProvider colorScheme="light" applyToRoot={false}>- <PortalMenu container={container} />- <button type="button" onClick={() => setShowContainer(true)}>- Create portal container- </button>- {showContainer && (- <div- ref={setContainer}- role="region"- aria-label="Deferred menu portal"- />- )}- </ThemeProvider>- );-};--export const DeferredContainer: Story = {- render: () => <DeferredContainerMenu />,- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);- expect(- within(canvasElement.ownerDocument.body).queryByRole('menu'),- ).not.toBeInTheDocument();- await userEvent.click(- canvas.getByRole('button', { name: 'Create portal container' }),- );- const container = canvas.getByRole('region', {- name: 'Deferred menu portal',- });- expect(- await within(container).findByRole('menu', { name: 'Options' }),- ).toBeVisible();- },-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.stories.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.stories.tsxdeleted file mode 100644index 9ee65c1e194..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/__stories__/Menu.stories.tsx+++ /dev/null@@ -1,333 +0,0 @@-import { type Meta, type StoryObj } from '@storybook/react-vite';-import { type ReactNode, useId, useState } from 'react';-import { expect, userEvent, waitFor, within } from 'storybook/test';--import {- IconArchive,- IconCopy,- IconDownload,- IconShare,- IconTrash,-} from '@ui/icon';-import { Button } from '@ui/primitives/input/Button/Button';-import {- A11Y_DEFER_COLOR_CONTRAST,- CatalogDecorator,- type CatalogStory,- ComponentDecorator,-} from '@ui/testing';--import { Menu } from '../Menu';-import { type MenuRootProps } from '../types/MenuRootProps';--type MenuCatalogContent = 'basic' | 'selection' | 'groups' | 'submenu';-type MenuStoryProps = MenuRootProps & { content?: MenuCatalogContent };--const BASIC_ITEMS = (- <>- <Menu.Item startIcon={<IconCopy />} shortcut={['Mod', 'D']}>- Duplicate- </Menu.Item>- <Menu.Item startIcon={<IconDownload />} description="CSV">- Export- </Menu.Item>- <Menu.Item startIcon={<IconShare />}>Share</Menu.Item>- <Menu.Separator />- <Menu.Item startIcon={<IconArchive />} disabled>- Archive- </Menu.Item>- <Menu.Item startIcon={<IconTrash />} color="danger">- Delete- </Menu.Item>- </>-);--const MenuSelectionContent = () => {- const [notifications, setNotifications] = useState(true);- const [pinned, setPinned] = useState(false);- const [view, setView] = useState('list');-- return (- <>- <Menu.CheckboxItem- checked={notifications}- onCheckedChange={setNotifications}- >- Notifications- </Menu.CheckboxItem>- <Menu.CheckboxItem checked={pinned} onCheckedChange={setPinned}>- Pinned- </Menu.CheckboxItem>- <Menu.Separator />- <Menu.RadioGroup value={view} onValueChange={setView}>- <Menu.RadioItem value="list">List view</Menu.RadioItem>- <Menu.RadioItem value="board">Board view</Menu.RadioItem>- </Menu.RadioGroup>- </>- );-};--const GROUPED_ITEMS = (- <>- <Menu.Group>- <Menu.GroupLabel>Record</Menu.GroupLabel>- <Menu.Item startIcon={<IconCopy />}>Duplicate</Menu.Item>- <Menu.Item startIcon={<IconShare />}>Share</Menu.Item>- </Menu.Group>- <Menu.Separator />- <Menu.Group>- <Menu.GroupLabel>Manage</Menu.GroupLabel>- <Menu.Item startIcon={<IconArchive />}>Archive</Menu.Item>- <Menu.Item startIcon={<IconTrash />} color="danger">- Delete- </Menu.Item>- </Menu.Group>- </>-);--const MenuSubmenuContent = ({- container,- open,-}: {- container?: HTMLElement | null;- open?: boolean;-}) => (- <>- <Menu.Item startIcon={<IconCopy />}>Duplicate</Menu.Item>- <Menu.SubmenuRoot defaultOpen open={open}>- <Menu.SubmenuTrigger startIcon={<IconDownload />}>- Export- </Menu.SubmenuTrigger>- <Menu.Popup container={container}>- <Menu.Item>CSV file</Menu.Item>- <Menu.Item>Excel file</Menu.Item>- </Menu.Popup>- </Menu.SubmenuRoot>- <Menu.Item startIcon={<IconShare />}>Share</Menu.Item>- </>-);--const MENU_STORY_CONTENT: Record<MenuCatalogContent, ReactNode> = {- basic: BASIC_ITEMS,- selection: <MenuSelectionContent />,- groups: GROUPED_ITEMS,- submenu: <MenuSubmenuContent />,-};--const MenuStory = ({ content = 'basic', ...props }: MenuStoryProps) => {- const triggerId = useId();-- return (- <Menu.Root defaultOpen defaultTriggerId={triggerId} {...props}>- <Menu.Trigger- id={triggerId}- aria-label="Options"- style={{ alignSelf: 'flex-start' }}- render={<Button>Options</Button>}- />- <Menu.Popup>{MENU_STORY_CONTENT[content]}</Menu.Popup>- </Menu.Root>- );-};--const meta: Meta<typeof MenuStory> = {- title: 'UI/Surfaces/Menu',- component: MenuStory,-};-export default meta;-type Story = StoryObj<typeof MenuStory>;--export const Default: Story = {- decorators: [ComponentDecorator],- parameters: {- a11y: A11Y_DEFER_COLOR_CONTRAST,- container: { width: 240, height: 320 },- },- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- const menu = await body.findByRole('menu', { name: 'Options' });- expect(menu).toBeVisible();- expect(canvasElement).not.toContainElement(menu);- const item = within(menu).getByRole('menuitem', { name: /Duplicate/ });- await userEvent.hover(item);- await waitFor(() => expect(item).toHaveAttribute('data-highlighted'));- },-};--export const Documentation: Story = {- decorators: Default.decorators,- parameters: Default.parameters,- args: { defaultOpen: false },-};--export const DocumentationInteractions: Story = {- ...Documentation,- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);- const body = within(canvasElement.ownerDocument.body);- const trigger = canvas.getByRole('button', { name: 'Options' });-- await userEvent.click(trigger);- const menu = await body.findByRole('menu', { name: 'Options' });- await expect(trigger).toHaveAttribute('aria-expanded', 'true');- await expect(trigger).toHaveAttribute('aria-controls', menu.id);-- await userEvent.keyboard('{Escape}');- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- await expect(trigger).toHaveFocus();-- await userEvent.keyboard('{ArrowDown}');- const reopenedMenu = await body.findByRole('menu', { name: 'Options' });- await userEvent.click(- within(reopenedMenu).getByRole('menuitem', { name: /Duplicate/ }),- );- await waitFor(() =>- expect(body.queryByRole('menu')).not.toBeInTheDocument(),- );- await expect(trigger).toHaveFocus();- },-};-export const Selection: Story = {- decorators: [ComponentDecorator],- parameters: { container: { width: 240, height: 320 } },- args: { content: 'selection' },- play: async ({ canvasElement }) => {- const menu = await within(canvasElement.ownerDocument.body).findByRole(- 'menu',- );- const notifications = within(menu).getByRole('menuitemcheckbox', {- name: 'Notifications',- });- expect(notifications).toHaveAttribute('aria-checked', 'true');- await userEvent.click(notifications);- expect(notifications).toHaveAttribute('aria-checked', 'false');- expect(notifications).not.toHaveAttribute('data-selected');- await userEvent.click(notifications);- expect(notifications).toHaveAttribute('data-selected');- const listView = within(menu).getByRole('menuitemradio', {- name: 'List view',- });- const boardView = within(menu).getByRole('menuitemradio', {- name: 'Board view',- });- await userEvent.click(boardView);- expect(listView).toHaveAttribute('aria-checked', 'false');- expect(boardView).toHaveAttribute('aria-checked', 'true');- expect(boardView).toHaveAttribute('data-selected');- expect(menu).toBeVisible();- },-};-export const Groups: Story = {- ...Default,- args: { content: 'groups' },- play: async ({ canvasElement }) => {- const menu = await within(canvasElement.ownerDocument.body).findByRole(- 'menu',- );- for (const label of ['Record', 'Manage']) {- expect(within(menu).getByRole('group', { name: label })).toHaveAttribute(- 'aria-labelledby',- within(menu).getByText(label).id,- );- }- expect(within(menu).getByRole('separator')).toBeVisible();- },-};-export const Submenu: Story = {- decorators: [ComponentDecorator],- parameters: { container: { width: 240, height: 320 } },- args: { content: 'submenu' },- play: async ({ canvasElement }) => {- const body = within(canvasElement.ownerDocument.body);- const submenu = await body.findByRole('menu', { name: 'Export' });- expect(- within(submenu).getByRole('menuitem', { name: 'CSV file' }),- ).toBeVisible();- expect(body.getByRole('menuitem', { name: 'Export' })).toHaveAttribute(- 'aria-haspopup',- 'menu',- );- },-};--const MenuCatalogCell = ({ content = 'basic' }: MenuStoryProps) => {- const [cellElement, setCellElement] = useState<HTMLDivElement | null>(null);- const triggerId = useId();- const contentByType: Record<MenuCatalogContent, ReactNode> = {- ...MENU_STORY_CONTENT,- submenu: <MenuSubmenuContent container={cellElement} open />,- };-- return (- <div- ref={setCellElement}- data-menu-catalog=""- style={{ position: 'relative', width: 220, height: 230 }}- >- <Menu.Root open triggerId={triggerId} modal={false}>- <Menu.Trigger- id={triggerId}- aria-label={`${content} options`}- render={<Button>Options</Button>}- />- <Menu.Popup container={cellElement} side="bottom" align="start">- {contentByType[content]}- </Menu.Popup>- </Menu.Root>- </div>- );-};--export const Catalog: CatalogStory<Story, typeof MenuStory> = {- render: (args) => <MenuCatalogCell {...args} />,- decorators: [CatalogDecorator],- parameters: {- a11y: {- ...A11Y_DEFER_COLOR_CONTRAST,- config: {- rules: [- ...A11Y_DEFER_COLOR_CONTRAST.config.rules,- {- id: 'aria-hidden-focus',- // Simultaneously open non-modal menus keep Base UI's focus sentinels active.- // Limit this exception to catalog sentinels; menu content stays audited.- selector:- '[aria-hidden="true"]:not([data-menu-catalog] [data-base-ui-focus-guard])',- },- ],- },- },- catalog: {- dimensions: [- { name: 'menu', values: ['menu'], labels: () => '', props: () => ({}) },- {- name: 'content',- values: [- 'basic',- 'selection',- 'groups',- 'submenu',- ] satisfies MenuCatalogContent[],- props: (content: MenuCatalogContent) => ({ content }),- },- ],- options: { elementContainer: { style: { width: 220, height: 230 } } },- },- },- play: async ({ canvasElement }) => {- const canvas = within(canvasElement);- for (const content of ['basic', 'selection', 'groups', 'submenu']) {- expect(- await canvas.findByRole('menu', { name: `${content} options` }),- ).toBeVisible();- }- expect(await canvas.findByRole('menu', { name: 'Export' })).toBeVisible();- },-};-export const CatalogDark: CatalogStory<Story, typeof MenuStory> = {- ...Catalog,- tags: ['!autodocs'],- globals: { colorScheme: 'dark' },-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/__tests__/Menu.test.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/__tests__/Menu.test.tsxdeleted file mode 100644index 06e16f94fce..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/__tests__/Menu.test.tsx+++ /dev/null@@ -1,105 +0,0 @@-import { type ReactNode } from 'react';--import { runComponentConformance } from '@test-utilities/conformance/runComponentConformance';-import listItemStyles from '@ui/primitives/navigation/ListItem/ListItem.module.scss';--import { Menu } from '../Menu';-import styles from '../Menu.module.scss';--const MenuRootWrapper = ({ children }: { children: ReactNode }) => (- <Menu.Root>{children}</Menu.Root>-);-const OpenMenuWrapper = ({ children }: { children: ReactNode }) => (- <Menu.Root open>{children}</Menu.Root>-);-const MenuPopupWrapper = ({ children }: { children: ReactNode }) => (- <Menu.Root open>- <Menu.Popup>{children}</Menu.Popup>- </Menu.Root>-);-const MenuRadioGroupWrapper = ({ children }: { children: ReactNode }) => (- <MenuPopupWrapper>- <Menu.RadioGroup>{children}</Menu.RadioGroup>- </MenuPopupWrapper>-);-const MenuGroupWrapper = ({ children }: { children: ReactNode }) => (- <MenuPopupWrapper>- <Menu.Group>{children}</Menu.Group>- </MenuPopupWrapper>-);-const MenuSubmenuWrapper = ({ children }: { children: ReactNode }) => (- <MenuPopupWrapper>- <Menu.SubmenuRoot>{children}</Menu.SubmenuRoot>- </MenuPopupWrapper>-);--runComponentConformance({- name: 'Menu.Trigger',- element: <Menu.Trigger>Options</Menu.Trigger>,- refInstanceOf: HTMLButtonElement,- wrapper: MenuRootWrapper,- renderPropTagName: 'button',-});-runComponentConformance({- name: 'Menu.Popup',- element: <Menu.Popup />,- refInstanceOf: HTMLDivElement,- wrapper: OpenMenuWrapper,- ownClassName: styles.popup,-});-runComponentConformance({- name: 'Menu.Item',- element: <Menu.Item>Item</Menu.Item>,- refInstanceOf: HTMLDivElement,- wrapper: MenuPopupWrapper,- ownClassName: listItemStyles.root,-});-runComponentConformance({- name: 'Menu.CheckboxItem',- element: <Menu.CheckboxItem>Item</Menu.CheckboxItem>,- refInstanceOf: HTMLDivElement,- wrapper: MenuPopupWrapper,- ownClassName: listItemStyles.root,-});-runComponentConformance({- name: 'Menu.RadioItem',- element: <Menu.RadioItem value="a">Item</Menu.RadioItem>,- refInstanceOf: HTMLDivElement,- wrapper: MenuRadioGroupWrapper,- ownClassName: listItemStyles.root,-});-runComponentConformance({- name: 'Menu.SubmenuTrigger',- element: <Menu.SubmenuTrigger>More</Menu.SubmenuTrigger>,- refInstanceOf: HTMLDivElement,- wrapper: MenuSubmenuWrapper,- ownClassName: listItemStyles.root,-});-runComponentConformance({- name: 'Menu.RadioGroup',- element: <Menu.RadioGroup />,- refInstanceOf: HTMLDivElement,- wrapper: MenuPopupWrapper,- ownClassName: styles.group,-});-runComponentConformance({- name: 'Menu.Group',- element: <Menu.Group />,- refInstanceOf: HTMLDivElement,- wrapper: MenuPopupWrapper,- ownClassName: styles.group,-});-runComponentConformance({- name: 'Menu.GroupLabel',- element: <Menu.GroupLabel>Group</Menu.GroupLabel>,- refInstanceOf: HTMLDivElement,- wrapper: MenuGroupWrapper,- ownClassName: styles.groupLabel,-});-runComponentConformance({- name: 'Menu.Separator',- element: <Menu.Separator />,- refInstanceOf: HTMLDivElement,- wrapper: MenuPopupWrapper,- ownClassName: styles.separator,-});diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuCheckboxItem.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuCheckboxItem.tsxdeleted file mode 100644index 088697d217f..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuCheckboxItem.tsx+++ /dev/null@@ -1,20 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuCheckboxItemProps } from '../types/MenuCheckboxItemProps';--import { getMenuListItemProps } from './getMenuListItemProps';--export const MenuCheckboxItem = (props: MenuCheckboxItemProps) => (- <MenuPrimitive.CheckboxItem- {...getMenuListItemProps<- MenuPrimitive.CheckboxItem.State,- MenuCheckboxItemProps- >({- props,- getListItemState: (state) => ({- indicator: 'checkbox',- selected: state.checked,- }),- })}- />-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuItem.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuItem.tsxdeleted file mode 100644index 90c845e0b1f..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuItem.tsx+++ /dev/null@@ -1,13 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuActionItemProps } from '../types/MenuActionItemProps';--import { getMenuListItemProps } from './getMenuListItemProps';--export const MenuItem = (props: MenuActionItemProps) => (- <MenuPrimitive.Item- {...getMenuListItemProps<MenuPrimitive.Item.State, MenuActionItemProps>({- props,- })}- />-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuNestingContext.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuNestingContext.tsdeleted file mode 100644index 070562f129c..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuNestingContext.ts+++ /dev/null@@ -1,3 +0,0 @@-import { createContext } from 'react';--export const MenuNestingContext = createContext<boolean>(false);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsxdeleted file mode 100644index 66c8e0ce05a..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopup.tsx+++ /dev/null@@ -1,50 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';-import { useContext } from 'react';--import { useProvidedTextDirection } from '@ui/primitives/layout/DirectionProvider/internal/useProvidedTextDirection';-import { useThemeContainer } from '@ui/theme';-import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';--import styles from '../Menu.module.scss';-import { type MenuPopupProps } from '../types/MenuPopupProps';-import { MenuNestingContext } from './MenuNestingContext';-import { MENU_POPUP_POSITION_DEFAULTS } from './MenuPopupPositionDefaults';--export const MenuPopup = ({- side,- align,- sideOffset,- alignOffset,- anchor,- keepMounted,- className,- children,- ...props-}: MenuPopupProps) => {- const themeContainer = useThemeContainer();- const direction = useProvidedTextDirection();- const { container = themeContainer ?? undefined, ...popupProps } = props;- const isNested = useContext(MenuNestingContext);- const defaults = MENU_POPUP_POSITION_DEFAULTS[isNested ? 'submenu' : 'root'];-- return (- <MenuPrimitive.Portal container={container} keepMounted={keepMounted}>- <MenuPrimitive.Positioner- dir={direction}- side={side ?? defaults.side}- align={align ?? defaults.align}- sideOffset={sideOffset ?? defaults.sideOffset}- alignOffset={alignOffset ?? defaults.alignOffset}- anchor={anchor}- className={styles.positioner}- >- <MenuPrimitive.Popup- {...popupProps}- className={mergeClassNames(styles.popup, className)}- >- {children}- </MenuPrimitive.Popup>- </MenuPrimitive.Positioner>- </MenuPrimitive.Portal>- );-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopupPositionDefaults.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopupPositionDefaults.tsdeleted file mode 100644index 8091ef7418e..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuPopupPositionDefaults.ts+++ /dev/null@@ -1,15 +0,0 @@-import { type MenuAlign } from '../types/MenuAlign';-import { type MenuSide } from '../types/MenuSide';--export const MENU_POPUP_POSITION_DEFAULTS: Record<- 'root' | 'submenu',- { side: MenuSide; align: MenuAlign; sideOffset: number; alignOffset: number }-> = {- root: { side: 'bottom', align: 'start', sideOffset: 8, alignOffset: 0 },- submenu: {- side: 'inline-end',- align: 'start',- sideOffset: 0,- alignOffset: -4,- },-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuRadioGroup.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuRadioGroup.tsxdeleted file mode 100644index aa9cb040380..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuRadioGroup.tsx+++ /dev/null@@ -1,16 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';--import styles from '../Menu.module.scss';-import { type MenuRadioGroupProps } from '../types/MenuRadioGroupProps';--export const MenuRadioGroup = ({- className,- ...props-}: MenuRadioGroupProps) => (- <MenuPrimitive.RadioGroup- {...props}- className={mergeClassNames(styles.group, className)}- />-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuRadioItem.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuRadioItem.tsxdeleted file mode 100644index 72c4e28b425..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuRadioItem.tsx+++ /dev/null@@ -1,19 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuRadioItemProps } from '../types/MenuRadioItemProps';--import { getMenuListItemProps } from './getMenuListItemProps';--export const MenuRadioItem = (props: MenuRadioItemProps) => (- <MenuPrimitive.RadioItem- {...getMenuListItemProps<MenuPrimitive.RadioItem.State, MenuRadioItemProps>(- {- props,- getListItemState: (state) => ({- indicator: 'check',- selected: state.checked,- }),- },- )}- />-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSeparator.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSeparator.tsxdeleted file mode 100644index c8ef692c01f..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSeparator.tsx+++ /dev/null@@ -1,13 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { mergeClassNames } from '@ui/utilities/internal/mergeClassNames';--import styles from '../Menu.module.scss';-import { type MenuSeparatorProps } from '../types/MenuSeparatorProps';--export const MenuSeparator = ({ className, ...props }: MenuSeparatorProps) => (- <MenuPrimitive.Separator- {...props}- className={mergeClassNames(styles.separator, className)}- />-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSubmenuRoot.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSubmenuRoot.tsxdeleted file mode 100644index 458e4ed35d1..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSubmenuRoot.tsx+++ /dev/null@@ -1,13 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuSubmenuRootProps } from '../types/MenuSubmenuRootProps';-import { MenuNestingContext } from './MenuNestingContext';--export const MenuSubmenuRoot = ({- children,- ...props-}: MenuSubmenuRootProps) => (- <MenuNestingContext.Provider value={true}>- <MenuPrimitive.SubmenuRoot {...props}>{children}</MenuPrimitive.SubmenuRoot>- </MenuNestingContext.Provider>-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSubmenuTrigger.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSubmenuTrigger.tsxdeleted file mode 100644index 24c114fc91a..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/MenuSubmenuTrigger.tsx+++ /dev/null@@ -1,14 +0,0 @@-import { Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuSubmenuTriggerProps } from '../types/MenuSubmenuTriggerProps';--import { getMenuListItemProps } from './getMenuListItemProps';--export const MenuSubmenuTrigger = (props: MenuSubmenuTriggerProps) => (- <MenuPrimitive.SubmenuTrigger- {...getMenuListItemProps<- MenuPrimitive.SubmenuTrigger.State,- MenuSubmenuTriggerProps- >({ props, getListItemState: () => ({ hasSubmenu: true }) })}- />-);diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/getMenuListItemProps.tsx b/packages/twenty-ui/src/primitives/surfaces/Menu/internal/getMenuListItemProps.tsxdeleted file mode 100644index 3a147ff0311..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/internal/getMenuListItemProps.tsx+++ /dev/null@@ -1,63 +0,0 @@-import { type ComponentRenderFn, type HTMLProps } from '@base-ui/react/types';-import { isFunction } from '@sniptt/guards';-import { type ReactElement, type ReactNode } from 'react';--import { ListItem } from '@ui/primitives/navigation/ListItem/ListItem';-import { type ListItemProps } from '@ui/primitives/navigation/ListItem/types/ListItemProps';--import { type MenuItemSlotProps } from '../types/MenuItemSlotProps';--type MenuListItemProps<TState> = MenuItemSlotProps & {- children?: ReactNode;- disabled?: boolean;- render?: ReactElement | ComponentRenderFn<HTMLProps, TState>;-};--export const getMenuListItemProps = <- TState,- TProps extends MenuListItemProps<TState>,->({- props: {- color = 'neutral',- startIcon,- endIcon,- description,- descriptionPlacement,- shortcut,- shortcutJoinLabel,- disabled = false,- children,- render,- ...props- },- getListItemState,-}: {- props: TProps;- getListItemState?: (- state: TState,- ) => Pick<ListItemProps, 'indicator' | 'selected' | 'hasSubmenu'>;-}) => ({- ...props,- disabled,- render: (renderProps: HTMLProps, state: TState) => (- <ListItem- {...renderProps}- render={- isFunction(render)- ? (listItemProps) => render(listItemProps, state)- : render- }- color={color}- disabled={disabled}- startIcon={startIcon}- endIcon={endIcon}- description={description}- descriptionPlacement={descriptionPlacement}- shortcut={shortcut}- shortcutJoinLabel={shortcutJoinLabel}- {...getListItemState?.(state)}- >- {children}- </ListItem>- ),-});diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuActionItemProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuActionItemProps.tsdeleted file mode 100644index 289eb32f2dc..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuActionItemProps.ts+++ /dev/null@@ -1,5 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuItemSlotProps } from './MenuItemSlotProps';--export type MenuActionItemProps = MenuPrimitive.Item.Props & MenuItemSlotProps;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuAlign.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuAlign.tsdeleted file mode 100644index 80b44b41318..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuAlign.ts+++ /dev/null@@ -1 +0,0 @@-export type MenuAlign = 'start' | 'center' | 'end';diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuCheckboxItemProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuCheckboxItemProps.tsdeleted file mode 100644index 8487ef4fd3f..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuCheckboxItemProps.ts+++ /dev/null@@ -1,6 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuItemSlotProps } from './MenuItemSlotProps';--export type MenuCheckboxItemProps = MenuPrimitive.CheckboxItem.Props &- MenuItemSlotProps;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuGroupLabelProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuGroupLabelProps.tsdeleted file mode 100644index 307fb1d4d04..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuGroupLabelProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuGroupLabelProps = MenuPrimitive.GroupLabel.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuGroupProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuGroupProps.tsdeleted file mode 100644index df36433fa01..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuGroupProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuGroupProps = MenuPrimitive.Group.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuItemSlotProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuItemSlotProps.tsdeleted file mode 100644index ba36604c05f..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuItemSlotProps.ts+++ /dev/null@@ -1,12 +0,0 @@-import { type ListItemProps } from '@ui/primitives/navigation/ListItem/types/ListItemProps';--export type MenuItemSlotProps = Pick<- ListItemProps,- | 'color'- | 'startIcon'- | 'endIcon'- | 'description'- | 'descriptionPlacement'- | 'shortcut'- | 'shortcutJoinLabel'->;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuPopupProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuPopupProps.tsdeleted file mode 100644index dd82b7b7f3f..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuPopupProps.ts+++ /dev/null@@ -1,33 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuAlign } from './MenuAlign';-import { type MenuSide } from './MenuSide';--export type MenuPopupProps = MenuPrimitive.Popup.Props & {- /**- * Side of the anchor the popup is placed on. Defaults to `bottom` for a menu- * and `inline-end` for a submenu.- */- side?: MenuSide;- /** Alignment of the popup along the anchor. Defaults to `start`. */- align?: MenuAlign;- /**- * Distance in pixels between the anchor and the popup. Defaults to `8` for a- * menu and `0` for a submenu.- */- sideOffset?: number;- /**- * Offset in pixels along the alignment axis. Defaults to `0` for a menu and- * `-4` for a submenu.- */- alignOffset?: number;- /** Element or position the popup is anchored to. Defaults to the trigger. */- anchor?: MenuPrimitive.Positioner.Props['anchor'];- /**- * Element the popup is portaled into. Defaults to the theme's portal- * container.- */- container?: MenuPrimitive.Portal.Props['container'];- /** Keeps the popup mounted in the DOM while the menu is closed. */- keepMounted?: boolean;-};diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRadioGroupProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRadioGroupProps.tsdeleted file mode 100644index 77a0cf551ad..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRadioGroupProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuRadioGroupProps = MenuPrimitive.RadioGroup.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRadioItemProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRadioItemProps.tsdeleted file mode 100644index f8ca268f6c3..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRadioItemProps.ts+++ /dev/null@@ -1,6 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuItemSlotProps } from './MenuItemSlotProps';--export type MenuRadioItemProps = MenuPrimitive.RadioItem.Props &- MenuItemSlotProps;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRootProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRootProps.tsdeleted file mode 100644index 48029970529..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuRootProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuRootProps = MenuPrimitive.Root.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSeparatorProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSeparatorProps.tsdeleted file mode 100644index e3eee569519..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSeparatorProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuSeparatorProps = MenuPrimitive.Separator.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSide.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSide.tsdeleted file mode 100644index 16c31d7c808..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSide.ts+++ /dev/null@@ -1,7 +0,0 @@-export type MenuSide =- | 'top'- | 'bottom'- | 'left'- | 'right'- | 'inline-start'- | 'inline-end';diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSubmenuRootProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSubmenuRootProps.tsdeleted file mode 100644index 08619173c11..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSubmenuRootProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuSubmenuRootProps = MenuPrimitive.SubmenuRoot.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSubmenuTriggerProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSubmenuTriggerProps.tsdeleted file mode 100644index 4351eee20b5..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuSubmenuTriggerProps.ts+++ /dev/null@@ -1,6 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--import { type MenuItemSlotProps } from './MenuItemSlotProps';--export type MenuSubmenuTriggerProps = MenuPrimitive.SubmenuTrigger.Props &- MenuItemSlotProps;diff --git a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuTriggerProps.ts b/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuTriggerProps.tsdeleted file mode 100644index 300235f2a31..00000000000--- a/packages/twenty-ui/src/primitives/surfaces/Menu/types/MenuTriggerProps.ts+++ /dev/null@@ -1,3 +0,0 @@-import { type Menu as MenuPrimitive } from '@base-ui/react/menu';--export type MenuTriggerProps = MenuPrimitive.Trigger.Props;diff --git a/packages/twenty-ui/src/primitives/surfaces/index.ts b/packages/twenty-ui/src/primitives/surfaces/index.tsindex 379a615a1c3..bafe8d6b6d1 100644--- a/packages/twenty-ui/src/primitives/surfaces/index.ts+++ b/packages/twenty-ui/src/primitives/surfaces/index.ts@@ -66,22 +66,6 @@ export type { DialogTriggerProps } from './Dialog/types/DialogTriggerProps';export type { DialogTriggerState } from './Dialog/types/DialogTriggerState';export type { DialogViewportProps } from './Dialog/types/DialogViewportProps';export type { DialogViewportState } from './Dialog/types/DialogViewportState';-export { Menu } from './Menu/Menu';-export type { MenuActionItemProps } from './Menu/types/MenuActionItemProps';-export type { MenuAlign } from './Menu/types/MenuAlign';-export type { MenuCheckboxItemProps } from './Menu/types/MenuCheckboxItemProps';-export type { MenuGroupLabelProps } from './Menu/types/MenuGroupLabelProps';-export type { MenuGroupProps } from './Menu/types/MenuGroupProps';-export type { MenuItemSlotProps } from './Menu/types/MenuItemSlotProps';-export type { MenuPopupProps } from './Menu/types/MenuPopupProps';-export type { MenuRadioGroupProps } from './Menu/types/MenuRadioGroupProps';-export type { MenuRadioItemProps } from './Menu/types/MenuRadioItemProps';-export type { MenuRootProps } from './Menu/types/MenuRootProps';-export type { MenuSeparatorProps } from './Menu/types/MenuSeparatorProps';-export type { MenuSide } from './Menu/types/MenuSide';-export type { MenuSubmenuRootProps } from './Menu/types/MenuSubmenuRootProps';-export type { MenuSubmenuTriggerProps } from './Menu/types/MenuSubmenuTriggerProps';-export type { MenuTriggerProps } from './Menu/types/MenuTriggerProps';export { Popover } from './Popover/Popover';export type { PopoverAlign } from './Popover/types/PopoverAlign';export type { PopoverArrowProps } from './Popover/types/PopoverArrowProps';