@contentful/f36-menu 4.0.1-beta.2590 → 4.0.1-beta.2705

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AGSA,KAAA,CAAMyH,qCAAe,GAAG,CAAxB;IACEC,QAAQ,EAAE,CAAVA;QACEC,IAAI,EAAE,CADE;QAERC,IAAI,EAAE,CAANA;IAFQ,CADY;IAKtBC,UAAU,EAAE,CAAZA;QACEF,IAAI,EAAE,CADI;QAEVC,IAAI,EAAE,CAANA;IAFU,CAAA;AALU,CAAxB;AAWO,KAAA,CAAMzF,wCAAqB,IAAI,CAAtC,oBACE6B,iBADoC,kBAEpCC,aAFoC,YAGpCsD,OAAO,GAAG,CAAVA,WACCF,CAJkC,GAIH,CAJI;IAKpC,KAAA,EAAOxD,YAAD,EAAeE,eAAf,IAAkCnC,qBAAQ,CAAS,CAAT;IAEhD,KAAA,CAAMkC,mBAAmB,GAAGjC,wBAAW,EACpCoD,KAAD,GAAgC,CADlC;QAEI,KAAA,CAAM6C,SAAS,GAAG9D,iBAAiB,CAACE,OAApC;QACA,EAAA,GAAK4D,SAAL,EAAgB,MAAhB;QAEA,KAAA,CAAMC,KAAK,GAAGD,SAAS,CAAC1D,gBAAV,CAA2BH,aAA3B;QACd,EAAA,EAAI8D,KAAK,CAAC1D,MAAN,KAAiB,CAArB,EAAwB,MAAxB;QAEA,KAAA,CAAM2D,aAAa,GAAGD,KAAK,CAAC1D,MAAN,GAAe,CAArC;QAEA,KAAA,CAAM4D,cAAc,OAASlE,eAAe,CAAC,CAAD;;QAC5C,KAAA,CAAMmE,aAAa,OAASnE,eAAe,CAACiE,aAAD;;QAC3C,KAAA,CAAMG,aAAa,OAAS,CAA5B;YACE,EAAA,EAAItE,YAAY,KAAKmE,aAArB,EACEC,cAAc;iBAEdlE,eAAe,CAACF,YAAY,GA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,EAEtB2C,GAFsB,GAGnB,CAHL;IAIE,KAAA,CAAM,CAAN,YAAQiE,SAAF,aAAa3G,QAAAA,EAAb,CAAA,GAA0BD,KAAhC;IACA,KAAA,CAAM,CAAN,yBAAQ6H,sBAAF,WAA0BpI,MAAAA,EAA1B,CAAA,GAAqCyG,yCAAiB;IAE5D,KAAA,CAAMmB,MAAM,GAAGwF,yCAAuB;IAEtC,MAAA,0CACG,yCAAD;4DACG,yCAAD;eACM7M,KAAJ;eACI6H,sBAAsB,CAAC7H,KAAD,EAAQ2C,GAAR;YAC1B,SAAA,EAAW,iBAAA,CAAG0E,MAAM,CAAC8C,IAAP,CAAY,CAHlC;gBAGoC4C,QAAQ,EAAEtN,MAAVsN;YAAF,CAAZ,GAAmCnG,SAAtC;;yDAEV,CAAD;oBAAM,SAAA,EAAWS,MAAM,CAAC2F,OAAR;8BAAkB/M,QAAD;;yDAChC,0CAAD;oBAAkB,SAAA,EAAWoH,MAAM,CAAC4F,IAAR;;;;;AAInC,CArBD;AAuBO,KAAA,CAAMpP,yCAAc,iBAAGa,oCAAK,CAACgJ,UAAN,CAAiBoF,qCAAjB;;;AjBdvB,KAAA,CAAM/P,yCAAI,GAAGgB,yCAAY;AAChChB,yCAAI,CAACoB,IAAL,GAAYlB,wCAAZ;AACAF,yCAAI,CAACqB,UAAL,GAAkBJ,yCAAlB;AACAjB,yCAAI,CAACsB,UAAL,GAAkBJ,yCAAlB;AACAlB,yCAAI,CAACuB,IAAL,GAAYnB,yCAAZ;AACAJ,yCAAI,CAACwB,OAAL,GAAelB,yCAAf;AACAN,yCAAI,CAACyB,OAAL,GAAejB,yCAAf;AACAR,yCAAI,CAAC0B,YAAL,GAAoBhB,yCAApB;AACAV,yCAAI,CAACY,OAAL,GAAeA,yCAAf;AACAZ,yCAAI,CAACc,cAAL,GAAsBA,yCAAtB","sources":["packages/components/menu/src/index.ts","packages/components/menu/src/CompoundMenu.tsx","packages/components/menu/src/Menu.tsx","packages/components/menu/src/useArrowKeyNavigation.ts","packages/components/menu/src/MenuContext.ts","packages/components/menu/src/MenuList/MenuList.tsx","packages/components/menu/src/SubmenuContext.ts","packages/components/menu/src/MenuList/MenuList.styles.ts","packages/components/menu/src/MenuList/MenuListHeader.tsx","packages/components/menu/src/MenuList/MenuListFooter.tsx","packages/components/menu/src/MenuItem/MenuItem.tsx","packages/components/menu/src/MenuItem/MenuItem.styles.ts","packages/components/menu/src/MenuTrigger/MenuTrigger.tsx","packages/components/menu/src/MenuDivider/MenuDivider.tsx","packages/components/menu/src/MenuDivider/MenuDivider.styles.ts","packages/components/menu/src/MenuSectionTitle/MenuSectionTitle.tsx","packages/components/menu/src/MenuSectionTitle/MenuSectionTitle.styles.ts","packages/components/menu/src/Submenu/Submenu.tsx","packages/components/menu/src/SubmenuTrigger/SubmenuTrigger.tsx","packages/components/menu/src/SubmenuTrigger/SubmenuTrigger.styles.ts"],"sourcesContent":["export { Menu } from './CompoundMenu';\nexport type { MenuProps } from './Menu';\nexport { MenuList } from './MenuList/MenuList';\nexport type { MenuListProps } from './MenuList/MenuList';\nexport { MenuItem } from './MenuItem/MenuItem';\nexport type { MenuItemProps } from './MenuItem/MenuItem';\nexport { MenuTrigger } from './MenuTrigger/MenuTrigger';\nexport type { MenuTriggerProps } from './MenuTrigger/MenuTrigger';\nexport { MenuDivider } from './MenuDivider/MenuDivider';\nexport type { MenuDividerProps } from './MenuDivider/MenuDivider';\nexport { MenuSectionTitle } from './MenuSectionTitle/MenuSectionTitle';\nexport type { MenuSectionTitleProps } from './MenuSectionTitle/MenuSectionTitle';\nexport { Submenu } from './Submenu/Submenu';\nexport type { SubmenuProps } from './Submenu/Submenu';\nexport { SubmenuTrigger } from './SubmenuTrigger/SubmenuTrigger';\nexport type { SubmenuTriggerProps } from './SubmenuTrigger/SubmenuTrigger';\n","import { Menu as OriginalMenu } from './Menu';\nimport { MenuList } from './MenuList/MenuList';\nimport { MenuListHeader } from './MenuList/MenuListHeader';\nimport { MenuListFooter } from './MenuList/MenuListFooter';\nimport { MenuItem } from './MenuItem/MenuItem';\nimport { MenuTrigger } from './MenuTrigger/MenuTrigger';\nimport { MenuDivider } from './MenuDivider/MenuDivider';\nimport { MenuSectionTitle } from './MenuSectionTitle/MenuSectionTitle';\nimport { Submenu } from './Submenu/Submenu';\nimport { SubmenuTrigger } from './SubmenuTrigger/SubmenuTrigger';\n\ntype CompoundMenu = typeof OriginalMenu & {\n List: typeof MenuList;\n ListHeader: typeof MenuListHeader;\n ListFooter: typeof MenuListFooter;\n Item: typeof MenuItem;\n Trigger: typeof MenuTrigger;\n Divider: typeof MenuDivider;\n SectionTitle: typeof MenuSectionTitle;\n Submenu: typeof Submenu;\n SubmenuTrigger: typeof SubmenuTrigger;\n};\n\nexport const Menu = OriginalMenu as CompoundMenu;\nMenu.List = MenuList;\nMenu.ListHeader = MenuListHeader;\nMenu.ListFooter = MenuListFooter;\nMenu.Item = MenuItem;\nMenu.Trigger = MenuTrigger;\nMenu.Divider = MenuDivider;\nMenu.SectionTitle = MenuSectionTitle;\nMenu.Submenu = Submenu;\nMenu.SubmenuTrigger = SubmenuTrigger;\n","import React, {\n useState,\n useCallback,\n useMemo,\n useRef,\n useEffect,\n} from 'react';\nimport { mergeRefs, useId } from '@contentful/f36-core';\nimport { useArrowKeyNavigation } from './useArrowKeyNavigation';\nimport { Popover, PopoverProps } from '@contentful/f36-popover';\nimport { MenuContextProvider, MenuContextType } from './MenuContext';\n\nconst MENU_ITEMS_SELECTOR = '[role=\"menuitem\"]:not(:disabled)';\n\nexport interface MenuProps\n extends Omit<PopoverProps, 'autoFocus' | 'id' | 'closeOnBlur'> {\n /**\n * If `true`, the Menu will be opened in controlled mode.\n * By default the Menu is uncontrolled\n */\n isOpen?: boolean;\n\n /**\n * If `true`, the Menu will be initially opened.\n */\n defaultIsOpen?: boolean;\n\n /**\n * Callback fired when the Menu opens\n */\n onOpen?: () => void;\n\n /**\n * Callback fired when the Menu closes\n */\n onClose?: () => void;\n\n /**\n * If `true`, the Menu will close when a menu item is\n * clicked\n *\n * Note: This prop will be propagated to all submenus,\n * unless you will override it with props on submenu itself\n *\n * @default true\n */\n closeOnSelect?: boolean;\n\n /**\n * If true, the menu will close when you blur out it by clicking outside\n *\n * Note: This prop will be propagated to all submenus,\n * unless you will override it with props on submenu itself\n *\n * @default true\n */\n closeOnBlur?: boolean;\n\n /**\n * If true, the menu will close when you hit the Esc key\n *\n * Note: This prop will be propagated to all submenus,\n * unless you will override it with props on submenu itself\n *\n * @default true\n */\n closeOnEsc?: boolean;\n}\n\nexport function Menu(props: MenuProps) {\n const {\n closeOnSelect = true,\n closeOnBlur = true,\n closeOnEsc = true,\n children,\n onOpen,\n ...otherProps\n } = props;\n const { isOpen, handleOpen, handleClose, isControlled } = useMenuOpenState(\n props,\n );\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuListRef = useRef<HTMLDivElement>(null);\n\n const menuId = useId(null, 'menu');\n\n const {\n focusedIndex,\n handleArrowsKeyDown,\n setFocusedIndex,\n } = useArrowKeyNavigation({\n itemsContainerRef: menuListRef,\n itemsSelector: MENU_ITEMS_SELECTOR,\n });\n\n useEffect(() => {\n if (isOpen && menuListRef.current) {\n const menuItems = menuListRef.current.querySelectorAll(\n MENU_ITEMS_SELECTOR,\n );\n\n if (menuItems.length > 0 && focusedIndex < menuItems.length) {\n // timeout trick to prevent scroll from jumping\n // when the popover is not positioned correctly yet in the opening phase\n setTimeout(() => {\n (menuItems[focusedIndex] as HTMLElement).focus({\n preventScroll: false,\n });\n }, 0);\n }\n }\n }, [isOpen, focusedIndex]);\n\n const focusMenuItem = useCallback(\n (item: HTMLElement) => {\n const menuItems = menuListRef.current.querySelectorAll(\n MENU_ITEMS_SELECTOR,\n );\n\n const itemIndex = [...menuItems].findIndex(\n (menuItem) => item === menuItem,\n );\n\n if (itemIndex !== -1) {\n setFocusedIndex(itemIndex);\n }\n },\n [setFocusedIndex],\n );\n\n const closeAndFocusTrigger = useCallback(() => {\n handleClose();\n triggerRef.current?.focus({ preventScroll: true });\n }, [handleClose]);\n\n const handleMenuListKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n closeAndFocusTrigger();\n return;\n }\n\n // we don't want to propagate other keydown events except `Tab`\n event.stopPropagation();\n\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n closeAndFocusTrigger();\n return;\n }\n\n handleArrowsKeyDown(event);\n },\n [closeAndFocusTrigger, handleArrowsKeyDown],\n );\n\n const contextValue: MenuContextType = useMemo(\n () => ({\n isOpen,\n menuId,\n focusMenuItem,\n getTriggerProps: (_props = {}, _ref = null) => ({\n onClick: (event) => {\n // if the user made component controlled by providing isOpen prop\n // but onOpen callback is not provided, we won't add toggle logic\n // to the trigger component. So they can make any toggle logic on their own.\n const isFullyControlled = isControlled && !onOpen;\n\n if (!isFullyControlled) {\n if (isOpen) {\n handleClose();\n } else {\n handleOpen();\n }\n }\n\n _props.onClick?.(event);\n },\n ref: mergeRefs(triggerRef, _ref),\n }),\n getMenuListProps: (_props = {}, _ref = null) => ({\n ref: mergeRefs(menuListRef, _ref),\n onKeyDown: (event) => {\n handleMenuListKeyDown(event);\n _props.onKeyDown?.(event);\n },\n onBlur: (event) => {\n _props.onBlur?.(event);\n\n if (!closeOnBlur) {\n return;\n }\n\n const relatedTarget = event.relatedTarget as Node;\n\n const targetIsMenu =\n menuListRef.current === relatedTarget ||\n menuListRef.current?.contains(relatedTarget);\n const targetIsTrigger =\n triggerRef.current === relatedTarget ||\n triggerRef.current?.contains(relatedTarget);\n const targetIsSubmenu =\n relatedTarget?.parentElement?.dataset.parentMenu === menuId;\n\n if (targetIsMenu || targetIsTrigger || targetIsSubmenu) {\n event.stopPropagation();\n return;\n }\n\n handleClose();\n },\n }),\n getMenuItemProps: (_props = {}) => ({\n onClick: (event) => {\n _props.onClick?.(event);\n\n const isSubmenuTrigger = Boolean(\n (event.target as HTMLElement).getAttribute('aria-haspopup'),\n );\n if (closeOnSelect && !isSubmenuTrigger) {\n closeAndFocusTrigger();\n }\n },\n }),\n propsToPropagateToSubmenus: {\n closeOnSelect,\n closeOnBlur,\n closeOnEsc,\n },\n }),\n [\n menuId,\n isOpen,\n handleMenuListKeyDown,\n closeOnSelect,\n handleClose,\n handleOpen,\n focusMenuItem,\n closeOnBlur,\n closeOnEsc,\n closeAndFocusTrigger,\n isControlled,\n onOpen,\n ],\n );\n\n return (\n <MenuContextProvider value={contextValue}>\n <Popover\n {...otherProps}\n isOpen={isOpen}\n onClose={handleClose}\n id={menuId}\n closeOnEsc={closeOnEsc}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={false}\n closeOnBlur={false}\n >\n {children}\n </Popover>\n </MenuContextProvider>\n );\n}\n\ntype UseMenuOpenStateProps = Pick<\n MenuProps,\n 'isOpen' | 'defaultIsOpen' | 'onOpen' | 'onClose'\n>;\n\nconst useMenuOpenState = (props: UseMenuOpenStateProps) => {\n const { isOpen, defaultIsOpen, onOpen, onClose } = props;\n const [isOpenState, setIsOpen] = useState(defaultIsOpen || false);\n\n const isControlled = isOpen !== undefined;\n const isOpenValue = isControlled ? isOpen : isOpenState;\n\n const handleClose = useCallback(() => {\n if (!isControlled) {\n setIsOpen(false);\n }\n onClose?.();\n }, [isControlled, onClose]);\n\n const handleOpen = useCallback(() => {\n if (!isControlled) {\n setIsOpen(true);\n }\n onOpen?.();\n }, [isControlled, onOpen]);\n\n return { isOpen: isOpenValue, isControlled, handleClose, handleOpen };\n};\n","import { useState, useCallback } from 'react';\n\ninterface UseArrowKeyNavigationProps {\n itemsContainerRef: React.MutableRefObject<HTMLElement>;\n itemsSelector: string;\n keyType?: 'vertical' | 'horizontal';\n initialFocusedIndex?: number;\n}\n\nconst ARROW_KEY_TYPES = {\n vertical: {\n prev: 'ArrowUp',\n next: 'ArrowDown',\n },\n horizontal: {\n prev: 'ArrowLeft',\n next: 'ArrowRight',\n },\n};\n\nexport const useArrowKeyNavigation = ({\n itemsContainerRef,\n itemsSelector,\n keyType = 'vertical',\n}: UseArrowKeyNavigationProps) => {\n const [focusedIndex, setFocusedIndex] = useState<number>(0);\n\n const handleArrowsKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const container = itemsContainerRef.current;\n if (!container) return;\n\n const items = container.querySelectorAll(itemsSelector);\n if (items.length === 0) return;\n\n const lastItemIndex = items.length - 1;\n\n const focusFirstItem = () => setFocusedIndex(0);\n const focusLastItem = () => setFocusedIndex(lastItemIndex);\n const focusNextItem = () => {\n if (focusedIndex === lastItemIndex) {\n focusFirstItem();\n } else {\n setFocusedIndex(focusedIndex + 1);\n }\n };\n const focusPrevItem = () => {\n if (focusedIndex === 0) {\n focusLastItem();\n } else {\n setFocusedIndex(focusedIndex - 1);\n }\n };\n\n const keyToFnMap = {\n [ARROW_KEY_TYPES[keyType].next]: focusNextItem,\n [ARROW_KEY_TYPES[keyType].prev]: focusPrevItem,\n };\n\n const fn = keyToFnMap[event.key];\n if (fn) {\n event.preventDefault();\n fn();\n }\n },\n [focusedIndex, itemsSelector, itemsContainerRef, keyType],\n );\n\n return { focusedIndex, handleArrowsKeyDown, setFocusedIndex };\n};\n","import React, { ComponentPropsWithRef } from 'react';\nimport { MenuProps } from '.';\n\nexport type MenuContextType = {\n isOpen: boolean;\n menuId: string;\n focusMenuItem: (item: HTMLElement) => void;\n getTriggerProps: (\n _props: ComponentPropsWithRef<'button'>,\n _ref: React.Ref<HTMLButtonElement>,\n ) => ComponentPropsWithRef<'button'>;\n getMenuListProps: (\n _props: ComponentPropsWithRef<'div'>,\n _ref: React.Ref<HTMLDivElement>,\n ) => ComponentPropsWithRef<'div'>;\n getMenuItemProps: (\n _props: ComponentPropsWithRef<'button'>,\n ) => ComponentPropsWithRef<'button'>;\n propsToPropagateToSubmenus: Pick<\n MenuProps,\n 'closeOnBlur' | 'closeOnEsc' | 'closeOnSelect'\n >;\n};\n\nconst MenuContext = React.createContext<MenuContextType | undefined>(undefined);\n\nexport const useMenuContext = () => {\n const context = React.useContext(MenuContext);\n\n if (context === undefined) {\n throw new Error('useMenuContext must be used within a MenuContextProvider');\n }\n\n return context;\n};\n\nexport const MenuContextProvider = MenuContext.Provider;\n","import React from 'react';\nimport {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { useMenuContext } from '../MenuContext';\nimport { useSubmenuContext } from '../SubmenuContext';\nimport { Popover } from '@contentful/f36-popover';\nimport { cx } from 'emotion';\nimport { getMenuListStyles } from './MenuList.styles';\nimport { MenuListHeader } from './MenuListHeader';\nimport { MenuListFooter } from './MenuListFooter';\n\ninterface MenuListInternalProps extends CommonProps {\n children?: React.ReactNode;\n}\n\nfunction assertChild(child: any): child is { type: { displayName: string } } {\n return Boolean(child?.type?.displayName);\n}\n\nexport type MenuListProps = PropsWithHTMLElement<MenuListInternalProps, 'div'>;\n\nconst _MenuList = (\n props: ExpandProps<MenuListProps>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n children,\n testId = 'cf-ui-menu-list',\n className,\n ...otherProps\n } = props;\n\n const { getMenuListProps } = useMenuContext();\n const submenuContext = useSubmenuContext();\n\n let header: React.ReactElement | null = null;\n let footer: React.ReactElement | null = null;\n const items: React.ReactElement[] = [];\n\n React.Children.forEach(children, (child) => {\n let appendChild = true;\n if (assertChild(child)) {\n if (child.type.displayName === MenuListHeader.displayName) {\n header = (child as unknown) as React.ReactElement;\n appendChild = false;\n } else if (child.type.displayName === MenuListFooter.displayName) {\n footer = (child as unknown) as React.ReactElement;\n appendChild = false;\n }\n }\n if (appendChild) {\n items.push((child as unknown) as React.ReactElement);\n }\n });\n\n const styles = getMenuListStyles({\n hasStickyHeader: Boolean(header),\n hasStickyFooter: Boolean(footer),\n });\n\n const extendedOtherProps = submenuContext\n ? submenuContext.getSubmenuListProps(otherProps)\n : otherProps;\n\n return (\n <Popover.Content\n role=\"menu\"\n {...extendedOtherProps}\n {...getMenuListProps(extendedOtherProps, ref)}\n className={cx(styles.container, className)}\n testId={testId}\n >\n {header}\n {items}\n {footer}\n </Popover.Content>\n );\n};\n\nexport const MenuList = React.forwardRef(_MenuList);\n","import React, { ComponentPropsWithRef, ComponentPropsWithoutRef } from 'react';\n\nexport type SubmenuContextType = {\n isOpen: boolean;\n getSubmenuListProps: (\n _props: ComponentPropsWithRef<'div'>,\n ) => { 'data-parent-menu': string } & ComponentPropsWithoutRef<'div'>;\n getSubmenuTriggerProps: (\n _props: ComponentPropsWithRef<'button'>,\n _ref: React.Ref<HTMLButtonElement>,\n ) => ComponentPropsWithRef<'button'>;\n};\n\nconst SubmenuContext = React.createContext<SubmenuContextType | undefined>(\n undefined,\n);\n\nexport const useSubmenuContext = () => {\n const context = React.useContext(SubmenuContext);\n return context;\n};\n\nexport const SubmenuContextProvider = SubmenuContext.Provider;\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuHeaderStyles = () => {\n return css({\n position: 'sticky',\n top: 0,\n left: 0,\n backgroundColor: tokens.colorWhite,\n borderBottom: `1px solid ${tokens.gray300}`,\n padding: `${tokens.spacingXs} 0`,\n zIndex: 1001,\n });\n};\n\nexport const getMenuFooterStyles = () => {\n return css({\n position: 'sticky',\n bottom: 0,\n left: 0,\n backgroundColor: tokens.colorWhite,\n borderTop: `1px solid ${tokens.gray300}`,\n padding: `${tokens.spacingXs} 0`,\n zIndex: 1001,\n });\n};\n\nexport const getMenuListStyles = (props: {\n hasStickyFooter?: boolean;\n hasStickyHeader?: boolean;\n}) => ({\n container: css({\n overflowY: 'auto',\n position: 'relative',\n padding: 0,\n paddingTop: props.hasStickyHeader ? 0 : tokens.spacingXs,\n paddingBottom: props.hasStickyFooter ? 0 : tokens.spacingXs,\n }),\n});\n","import React from 'react';\nimport { cx } from 'emotion';\nimport type {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\n\nimport { getMenuHeaderStyles } from './MenuList.styles';\n\nexport type MenuListHeaderProps = PropsWithHTMLElement<CommonProps, 'div'>;\n\nexport const MenuListHeader: React.FC<ExpandProps<MenuListHeaderProps>> = (\n props,\n) => {\n const {\n children,\n testId = 'cf-ui-menu-list-header',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuHeaderStyles();\n\n return (\n <div\n data-test-id={testId}\n className={cx(styles, className)}\n {...otherProps}\n >\n {children}\n </div>\n );\n};\n\nMenuListHeader.displayName = 'MenuListHeader';\n","import React from 'react';\nimport { cx } from 'emotion';\nimport type {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\n\nimport { getMenuFooterStyles } from './MenuList.styles';\n\nexport type MenuListFooterProps = PropsWithHTMLElement<CommonProps, 'div'>;\n\nexport const MenuListFooter: React.FC<ExpandProps<MenuListFooterProps>> = (\n props,\n) => {\n const {\n children,\n testId = 'cf-ui-menu-list-footer',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuFooterStyles();\n\n return (\n <div\n data-test-id={testId}\n className={cx(styles, className)}\n {...otherProps}\n >\n {children}\n </div>\n );\n};\n\nMenuListFooter.displayName = 'MenuListFooter';\n","import React, { useEffect, useRef } from 'react';\nimport { cx } from 'emotion';\nimport {\n CommonProps,\n mergeRefs,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { useMenuContext } from '../MenuContext';\nimport { useId } from '@contentful/f36-core';\nimport { getMenuItemStyles } from './MenuItem.styles';\n\nconst MENU_ITEM_DEFAULT_TAG = 'button';\n\ninterface MenuItemInternalProps extends CommonProps {\n children?: React.ReactNode;\n as?: 'a' | 'button';\n\n /**\n * Sets focus on item\n */\n isInitiallyFocused?: boolean;\n}\n\nexport type MenuItemProps<\n E extends React.ElementType = typeof MENU_ITEM_DEFAULT_TAG\n> = PolymorphicProps<MenuItemInternalProps, E>;\n\nfunction _MenuItem<E extends React.ElementType = typeof MENU_ITEM_DEFAULT_TAG>(\n props: MenuItemProps<E>,\n ref: React.Ref<any>,\n) {\n const { testId, className, as, isInitiallyFocused, ...otherProps } = props;\n\n const id = useId(null, 'menu-item');\n const itemTestId = testId || `cf-ui-${id}`;\n const styles = getMenuItemStyles();\n\n const { getMenuItemProps, focusMenuItem } = useMenuContext();\n\n const itemRef = useRef<HTMLElement>(null);\n useEffect(() => {\n if (isInitiallyFocused && itemRef.current) {\n focusMenuItem(itemRef.current);\n }\n }, [isInitiallyFocused, focusMenuItem]);\n\n const Element = (as ?? MENU_ITEM_DEFAULT_TAG) as React.ElementType;\n\n return (\n <Element\n role=\"menuitem\"\n {...otherProps}\n {...getMenuItemProps(otherProps)}\n className={cx(styles.root, className)}\n data-test-id={itemTestId}\n ref={mergeRefs(itemRef, ref)}\n tabIndex={-1}\n >\n {props.children}\n </Element>\n );\n}\n\nexport const MenuItem: PolymorphicComponent<\n ExpandProps<MenuItemInternalProps>,\n typeof MENU_ITEM_DEFAULT_TAG\n> = React.forwardRef(_MenuItem);\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuItemStyles = () => {\n return {\n root: css({\n display: 'block',\n width: '100%',\n background: 'none',\n border: 0,\n margin: 0,\n outline: 'none',\n fontSize: tokens.fontSizeM,\n lineHeight: tokens.lineHeightM,\n fontWeight: tokens.fontWeightNormal,\n position: 'relative',\n textAlign: 'left',\n padding: `${tokens.spacingXs} ${tokens.spacingM}`,\n wordBreak: 'break-word',\n whiteSpace: 'break-spaces',\n cursor: 'pointer',\n hyphens: 'auto',\n minWidth: '150px',\n textDecoration: 'none',\n color: tokens.gray800,\n\n '&:focus, &:hover': {\n backgroundColor: tokens.gray100,\n },\n '&:active': {\n backgroundColor: tokens.gray200,\n },\n '&:disabled': {\n opacity: 0.5,\n cursor: 'auto',\n },\n }),\n };\n};\n","import React from 'react';\nimport { Popover } from '@contentful/f36-popover';\nimport { useMenuContext } from '../MenuContext';\nimport { ExpandProps } from '@contentful/f36-core';\n\nexport interface MenuTriggerProps {\n children: React.ReactNode;\n}\n\nexport const MenuTrigger = (props: ExpandProps<MenuTriggerProps>) => {\n const child = React.Children.only(props.children) as any;\n const { getTriggerProps } = useMenuContext();\n\n return (\n <Popover.Trigger>\n {React.cloneElement(child, {\n ...getTriggerProps(child.props, child.ref),\n ['aria-haspopup']: 'menu',\n })}\n </Popover.Trigger>\n );\n};\n","import React from 'react';\nimport {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { cx } from 'emotion';\nimport { getMenuDividerStyles } from './MenuDivider.styles';\n\nexport type MenuDividerProps = PropsWithHTMLElement<CommonProps, 'hr'>;\n\nexport const MenuDivider = (props: ExpandProps<MenuDividerProps>) => {\n const {\n children,\n testId = 'cf-ui-menu-divider',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuDividerStyles();\n\n return (\n <hr\n aria-orientation=\"horizontal\"\n data-test-id={testId}\n className={cx(styles, className)}\n {...otherProps}\n />\n );\n};\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuDividerStyles = () =>\n css({\n border: 'none',\n width: '100%',\n height: '1px',\n background: tokens.gray300,\n margin: `${tokens.spacingXs} 0`,\n });\n","import React from 'react';\nimport { cx } from 'emotion';\nimport { getMenuSectionTitleStyles } from './MenuSectionTitle.styles';\nimport {\n SectionHeading,\n SectionHeadingProps,\n} from '@contentful/f36-typography';\nimport { ExpandProps } from '@contentful/f36-core';\n\nexport type MenuSectionTitleProps = SectionHeadingProps;\n\nexport const MenuSectionTitle = (props: ExpandProps<MenuSectionTitleProps>) => {\n const {\n children,\n testId = 'cf-ui-menu-section-title',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuSectionTitleStyles();\n\n return (\n <SectionHeading\n // Techincally, menus cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, and only use it\n // as a label\n aria-hidden=\"true\"\n testId={testId}\n className={cx(styles, className)}\n marginBottom=\"none\"\n {...otherProps}\n >\n {children}\n </SectionHeading>\n );\n};\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuSectionTitleStyles = () =>\n css({\n textAlign: 'left',\n padding: `${tokens.spacingXs} ${tokens.spacingM}`,\n lineHeight: tokens.lineHeightM,\n\n 'hr + &': {\n marginTop: '-8px',\n },\n });\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Menu, MenuProps } from '../Menu';\nimport { useMenuContext } from '../MenuContext';\nimport { SubmenuContextProvider, SubmenuContextType } from '../SubmenuContext';\nimport { mergeRefs } from '@contentful/f36-core';\n\nconst SUBMENU_OFFSET: [number, number] = [-8, 2];\n\nexport type SubmenuProps = Omit<\n MenuProps,\n | 'placement'\n | 'offset'\n | 'usePortal'\n | 'isOpen'\n | 'isAutoalignmentEnabled'\n | 'defaultIsOpen'\n>;\n\nexport const Submenu = (props: SubmenuProps) => {\n const { onClose, onOpen, ...otherProps } = props;\n\n const {\n isOpen: isParentMenuOpen,\n menuId,\n propsToPropagateToSubmenus,\n } = useMenuContext();\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const mouseLeaveTimerRef = useRef(null);\n\n const [isOpen, setIsOpen] = useState(false);\n const handleOpen = useCallback(() => {\n setIsOpen(true);\n window.clearTimeout(mouseLeaveTimerRef.current);\n\n onOpen?.();\n }, [onOpen]);\n const handleClose = useCallback(() => {\n setIsOpen(false);\n window.clearTimeout(mouseLeaveTimerRef.current);\n\n onClose?.();\n }, [onClose]);\n const closeAndFocusTrigger = useCallback(() => {\n handleClose();\n triggerRef.current?.focus({ preventScroll: true });\n }, [handleClose]);\n\n useEffect(() => {\n // close when parent menu closed\n if (isParentMenuOpen === false) {\n setIsOpen(false);\n }\n }, [isParentMenuOpen]);\n\n const contextValue: SubmenuContextType = useMemo(\n () => ({\n isOpen,\n getSubmenuListProps: (_props) => ({\n 'data-parent-menu': menuId,\n onMouseOver: (event) => {\n handleOpen();\n\n _props.onMouseOver?.(event);\n },\n onMouseLeave: (event) => {\n closeAndFocusTrigger();\n\n _props.onMouseLeave?.(event);\n },\n }),\n getSubmenuTriggerProps: (_props, _ref) => ({\n ref: mergeRefs(triggerRef, _ref),\n onKeyDown: (event) => {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n handleOpen();\n }\n\n _props.onKeyDown?.(event);\n },\n onMouseOver: (event) => {\n handleOpen();\n\n _props.onMouseOver?.(event);\n },\n onMouseLeave: (event) => {\n mouseLeaveTimerRef.current = window.setTimeout(\n closeAndFocusTrigger,\n 300,\n );\n\n _props.onMouseLeave?.(event);\n },\n }),\n }),\n [isOpen, menuId, handleOpen, closeAndFocusTrigger],\n );\n\n return (\n <SubmenuContextProvider value={contextValue}>\n <Menu\n {...propsToPropagateToSubmenus}\n {...otherProps}\n isOpen={isOpen}\n onClose={handleClose}\n onOpen={handleOpen}\n placement=\"right-start\"\n offset={SUBMENU_OFFSET}\n isAutoalignmentEnabled={false}\n />\n </SubmenuContextProvider>\n );\n};\n","import React from 'react';\nimport { MenuTrigger } from '../MenuTrigger/MenuTrigger';\nimport { MenuItem, MenuItemProps } from '../MenuItem/MenuItem';\nimport { useSubmenuContext } from '../SubmenuContext';\nimport { ChevronRightIcon } from '@contentful/f36-icons';\nimport { ExpandProps } from '@contentful/f36-core';\nimport { cx } from 'emotion';\nimport { getSubmenuTriggerStyles } from './SubmenuTrigger.styles';\n\nexport type SubmenuTriggerProps = Omit<\n MenuItemProps<'button'>,\n 'isInitiallyFocused' | 'as'\n>;\n\nconst _SubmenuTrigger = (\n props: ExpandProps<SubmenuTriggerProps>,\n ref: React.Ref<HTMLButtonElement>,\n) => {\n const { className, children } = props;\n const { getSubmenuTriggerProps, isOpen } = useSubmenuContext();\n\n const styles = getSubmenuTriggerStyles();\n\n return (\n <MenuTrigger>\n <MenuItem\n {...props}\n {...getSubmenuTriggerProps(props, ref)}\n className={cx(styles.root({ isActive: isOpen }), className)}\n >\n <span className={styles.content}>{children}</span>\n <ChevronRightIcon className={styles.icon} />\n </MenuItem>\n </MenuTrigger>\n );\n};\n\nexport const SubmenuTrigger = React.forwardRef(_SubmenuTrigger);\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getSubmenuTriggerStyles = () => {\n return {\n root: ({ isActive }) =>\n css({\n display: 'flex',\n alignItems: 'center',\n paddingRight: tokens.spacingXs,\n ...(isActive\n ? {\n backgroundColor: tokens.gray100,\n }\n : {}),\n }),\n content: css({\n marginRight: tokens.spacingM,\n }),\n icon: css({\n marginLeft: 'auto',\n fill: 'currentColor',\n }),\n };\n};\n"],"names":["Menu","MenuProps","MenuList","MenuListProps","MenuItem","MenuItemProps","MenuTrigger","MenuTriggerProps","MenuDivider","MenuDividerProps","MenuSectionTitle","MenuSectionTitleProps","Submenu","SubmenuProps","SubmenuTrigger","SubmenuTriggerProps","OriginalMenu","MenuListHeader","MenuListFooter","CompoundMenu","List","ListHeader","ListFooter","Item","Trigger","Divider","SectionTitle","React","useState","useCallback","useMemo","useRef","useEffect","mergeRefs","useId","useArrowKeyNavigation","Popover","PopoverProps","MenuContextProvider","MenuContextType","MENU_ITEMS_SELECTOR","Omit","isOpen","defaultIsOpen","onOpen","onClose","closeOnSelect","closeOnBlur","closeOnEsc","props","children","otherProps","handleOpen","handleClose","isControlled","useMenuOpenState","triggerRef","HTMLButtonElement","menuListRef","HTMLDivElement","menuId","focusedIndex","handleArrowsKeyDown","setFocusedIndex","itemsContainerRef","itemsSelector","current","menuItems","querySelectorAll","length","setTimeout","HTMLElement","focus","preventScroll","focusMenuItem","item","itemIndex","findIndex","menuItem","closeAndFocusTrigger","handleMenuListKeyDown","event","KeyboardEvent","key","preventDefault","stopPropagation","contextValue","getTriggerProps","_props","_ref","onClick","isFullyControlled","ref","getMenuListProps","onKeyDown","onBlur","relatedTarget","Node","targetIsMenu","contains","targetIsTrigger","targetIsSubmenu","parentElement","dataset","parentMenu","getMenuItemProps","isSubmenuTrigger","Boolean","target","getAttribute","propsToPropagateToSubmenus","UseMenuOpenStateProps","Pick","isOpenState","setIsOpen","undefined","isOpenValue","UseArrowKeyNavigationProps","MutableRefObject","keyType","initialFocusedIndex","ARROW_KEY_TYPES","vertical","prev","next","horizontal","container","items","lastItemIndex","focusFirstItem","focusLastItem","focusNextItem","focusPrevItem","keyToFnMap","fn","ComponentPropsWithRef","Ref","MenuContext","createContext","useMenuContext","context","useContext","Error","Provider","CommonProps","PropsWithHTMLElement","ExpandProps","useSubmenuContext","getMenuListStyles","MenuListInternalProps","ReactNode","assertChild","child","type","displayName","_MenuList","testId","className","submenuContext","header","ReactElement","footer","Children","forEach","appendChild","push","styles","hasStickyHeader","hasStickyFooter","extendedOtherProps","getSubmenuListProps","forwardRef","ComponentPropsWithoutRef","SubmenuContextType","getSubmenuTriggerProps","SubmenuContext","SubmenuContextProvider","tokens","getMenuHeaderStyles","position","top","left","backgroundColor","colorWhite","borderBottom","gray300","padding","spacingXs","zIndex","getMenuFooterStyles","bottom","borderTop","overflowY","paddingTop","paddingBottom","MenuListHeaderProps","FC","MenuListFooterProps","PolymorphicComponent","PolymorphicProps","getMenuItemStyles","MENU_ITEM_DEFAULT_TAG","MenuItemInternalProps","as","isInitiallyFocused","ElementType","E","_MenuItem","id","itemTestId","itemRef","Element","root","display","width","background","border","margin","outline","fontSize","fontSizeM","lineHeight","lineHeightM","fontWeight","fontWeightNormal","textAlign","spacingM","wordBreak","whiteSpace","cursor","hyphens","minWidth","textDecoration","color","gray800","gray100","gray200","opacity","only","cloneElement","getMenuDividerStyles","height","getMenuSectionTitleStyles","SectionHeading","SectionHeadingProps","marginTop","SUBMENU_OFFSET","isParentMenuOpen","mouseLeaveTimerRef","window","clearTimeout","onMouseOver","onMouseLeave","ChevronRightIcon","getSubmenuTriggerStyles","_SubmenuTrigger","isActive","content","icon","alignItems","paddingRight","marginRight"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AGSA,KAAA,CAAMyH,qCAAe,GAAG,CAAxB;IACEC,QAAQ,EAAE,CAAVA;QACEC,IAAI,EAAE,CADE;QAERC,IAAI,EAAE,CAANA;IAFQ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AAA,EAAW,iBAAA,CAAG0E,MAAM,CAAC8C,IAAP,CAAY,CAHlC;YAGoC4C,QAAQ,EAAEtN,MAAVsN;QAAF,CAAZ,GAAmCnG,SAAtC;0EAEV,CAAD;QAAM,SAAA,EAAWS,MAAM,CAAC2F,OAAR;OAAkB/M,QAAD,sEAChC,0CAAD;QAAkB,SAAA,EAAWoH,MAAM,CAAC4F,IAAR;;AAInC,CArBD;AAuBO,KAAA,CAAMpP,yCAAc,iBAAGa,sCAAK,CAACgJ,UAAN,CAAiBoF,qCAAjB;;;AjBdvB,KAAA,CAAM/P,yCAAI,GAAGgB,yCAAY;AAChChB,yCAAI,CAACoB,IAAL,GAAYlB,wCAAZ;AACAF,yCAAI,CAACqB,UAAL,GAAkBJ,yCAAlB;AACAjB,yCAAI,CAACsB,UAAL,GAAkBJ,yCAAlB;AACAlB,yCAAI,CAACuB,IAAL,GAAYnB,yCAAZ;AACAJ,yCAAI,CAACwB,OAAL,GAAelB,yCAAf;AACAN,yCAAI,CAACyB,OAAL,GAAejB,yCAAf;AACAR,yCAAI,CAAC0B,YAAL,GAAoBhB,yCAApB;AACAV,yCAAI,CAACY,OAAL,GAAeA,yCAAf;AACAZ,yCAAI,CAACc,cAAL,GAAsBA,yCAAtB","sources":["packages/components/menu/src/index.ts","packages/components/menu/src/CompoundMenu.tsx","packages/components/menu/src/Menu.tsx","packages/components/menu/src/useArrowKeyNavigation.ts","packages/components/menu/src/MenuContext.ts","packages/components/menu/src/MenuList/MenuList.tsx","packages/components/menu/src/SubmenuContext.ts","packages/components/menu/src/MenuList/MenuList.styles.ts","packages/components/menu/src/MenuList/MenuListHeader.tsx","packages/components/menu/src/MenuList/MenuListFooter.tsx","packages/components/menu/src/MenuItem/MenuItem.tsx","packages/components/menu/src/MenuItem/MenuItem.styles.ts","packages/components/menu/src/MenuTrigger/MenuTrigger.tsx","packages/components/menu/src/MenuDivider/MenuDivider.tsx","packages/components/menu/src/MenuDivider/MenuDivider.styles.ts","packages/components/menu/src/MenuSectionTitle/MenuSectionTitle.tsx","packages/components/menu/src/MenuSectionTitle/MenuSectionTitle.styles.ts","packages/components/menu/src/Submenu/Submenu.tsx","packages/components/menu/src/SubmenuTrigger/SubmenuTrigger.tsx","packages/components/menu/src/SubmenuTrigger/SubmenuTrigger.styles.ts"],"sourcesContent":["export { Menu } from './CompoundMenu';\nexport type { MenuProps } from './Menu';\nexport { MenuList } from './MenuList/MenuList';\nexport type { MenuListProps } from './MenuList/MenuList';\nexport { MenuItem } from './MenuItem/MenuItem';\nexport type { MenuItemProps } from './MenuItem/MenuItem';\nexport { MenuTrigger } from './MenuTrigger/MenuTrigger';\nexport type { MenuTriggerProps } from './MenuTrigger/MenuTrigger';\nexport { MenuDivider } from './MenuDivider/MenuDivider';\nexport type { MenuDividerProps } from './MenuDivider/MenuDivider';\nexport { MenuSectionTitle } from './MenuSectionTitle/MenuSectionTitle';\nexport type { MenuSectionTitleProps } from './MenuSectionTitle/MenuSectionTitle';\nexport { Submenu } from './Submenu/Submenu';\nexport type { SubmenuProps } from './Submenu/Submenu';\nexport { SubmenuTrigger } from './SubmenuTrigger/SubmenuTrigger';\nexport type { SubmenuTriggerProps } from './SubmenuTrigger/SubmenuTrigger';\n","import { Menu as OriginalMenu } from './Menu';\nimport { MenuList } from './MenuList/MenuList';\nimport { MenuListHeader } from './MenuList/MenuListHeader';\nimport { MenuListFooter } from './MenuList/MenuListFooter';\nimport { MenuItem } from './MenuItem/MenuItem';\nimport { MenuTrigger } from './MenuTrigger/MenuTrigger';\nimport { MenuDivider } from './MenuDivider/MenuDivider';\nimport { MenuSectionTitle } from './MenuSectionTitle/MenuSectionTitle';\nimport { Submenu } from './Submenu/Submenu';\nimport { SubmenuTrigger } from './SubmenuTrigger/SubmenuTrigger';\n\ntype CompoundMenu = typeof OriginalMenu & {\n List: typeof MenuList;\n ListHeader: typeof MenuListHeader;\n ListFooter: typeof MenuListFooter;\n Item: typeof MenuItem;\n Trigger: typeof MenuTrigger;\n Divider: typeof MenuDivider;\n SectionTitle: typeof MenuSectionTitle;\n Submenu: typeof Submenu;\n SubmenuTrigger: typeof SubmenuTrigger;\n};\n\nexport const Menu = OriginalMenu as CompoundMenu;\nMenu.List = MenuList;\nMenu.ListHeader = MenuListHeader;\nMenu.ListFooter = MenuListFooter;\nMenu.Item = MenuItem;\nMenu.Trigger = MenuTrigger;\nMenu.Divider = MenuDivider;\nMenu.SectionTitle = MenuSectionTitle;\nMenu.Submenu = Submenu;\nMenu.SubmenuTrigger = SubmenuTrigger;\n","import React, {\n useState,\n useCallback,\n useMemo,\n useRef,\n useEffect,\n} from 'react';\nimport { mergeRefs, useId } from '@contentful/f36-core';\nimport { useArrowKeyNavigation } from './useArrowKeyNavigation';\nimport { Popover, PopoverProps } from '@contentful/f36-popover';\nimport { MenuContextProvider, MenuContextType } from './MenuContext';\n\nconst MENU_ITEMS_SELECTOR = '[role=\"menuitem\"]:not(:disabled)';\n\nexport interface MenuProps\n extends Omit<PopoverProps, 'autoFocus' | 'id' | 'closeOnBlur'> {\n /**\n * If `true`, the Menu will be opened in controlled mode.\n * By default the Menu is uncontrolled\n */\n isOpen?: boolean;\n\n /**\n * If `true`, the Menu will be initially opened.\n */\n defaultIsOpen?: boolean;\n\n /**\n * Callback fired when the Menu opens\n */\n onOpen?: () => void;\n\n /**\n * Callback fired when the Menu closes\n */\n onClose?: () => void;\n\n /**\n * If `true`, the Menu will close when a menu item is\n * clicked\n *\n * Note: This prop will be propagated to all submenus,\n * unless you will override it with props on submenu itself\n *\n * @default true\n */\n closeOnSelect?: boolean;\n\n /**\n * If true, the menu will close when you blur out it by clicking outside\n *\n * Note: This prop will be propagated to all submenus,\n * unless you will override it with props on submenu itself\n *\n * @default true\n */\n closeOnBlur?: boolean;\n\n /**\n * If true, the menu will close when you hit the Esc key\n *\n * Note: This prop will be propagated to all submenus,\n * unless you will override it with props on submenu itself\n *\n * @default true\n */\n closeOnEsc?: boolean;\n}\n\nexport function Menu(props: MenuProps) {\n const {\n closeOnSelect = true,\n closeOnBlur = true,\n closeOnEsc = true,\n children,\n onOpen,\n ...otherProps\n } = props;\n const { isOpen, handleOpen, handleClose, isControlled } = useMenuOpenState(\n props,\n );\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const menuListRef = useRef<HTMLDivElement>(null);\n\n const menuId = useId(null, 'menu');\n\n const {\n focusedIndex,\n handleArrowsKeyDown,\n setFocusedIndex,\n } = useArrowKeyNavigation({\n itemsContainerRef: menuListRef,\n itemsSelector: MENU_ITEMS_SELECTOR,\n });\n\n useEffect(() => {\n if (isOpen && menuListRef.current) {\n const menuItems = menuListRef.current.querySelectorAll(\n MENU_ITEMS_SELECTOR,\n );\n\n if (menuItems.length > 0 && focusedIndex < menuItems.length) {\n // timeout trick to prevent scroll from jumping\n // when the popover is not positioned correctly yet in the opening phase\n setTimeout(() => {\n (menuItems[focusedIndex] as HTMLElement).focus({\n preventScroll: false,\n });\n }, 0);\n }\n }\n }, [isOpen, focusedIndex]);\n\n const focusMenuItem = useCallback(\n (item: HTMLElement) => {\n const menuItems = menuListRef.current.querySelectorAll(\n MENU_ITEMS_SELECTOR,\n );\n\n const itemIndex = [...menuItems].findIndex(\n (menuItem) => item === menuItem,\n );\n\n if (itemIndex !== -1) {\n setFocusedIndex(itemIndex);\n }\n },\n [setFocusedIndex],\n );\n\n const closeAndFocusTrigger = useCallback(() => {\n handleClose();\n triggerRef.current?.focus({ preventScroll: true });\n }, [handleClose]);\n\n const handleMenuListKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n closeAndFocusTrigger();\n return;\n }\n\n // we don't want to propagate other keydown events except `Tab`\n event.stopPropagation();\n\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n closeAndFocusTrigger();\n return;\n }\n\n handleArrowsKeyDown(event);\n },\n [closeAndFocusTrigger, handleArrowsKeyDown],\n );\n\n const contextValue: MenuContextType = useMemo(\n () => ({\n isOpen,\n menuId,\n focusMenuItem,\n getTriggerProps: (_props = {}, _ref = null) => ({\n onClick: (event) => {\n // if the user made component controlled by providing isOpen prop\n // but onOpen callback is not provided, we won't add toggle logic\n // to the trigger component. So they can make any toggle logic on their own.\n const isFullyControlled = isControlled && !onOpen;\n\n if (!isFullyControlled) {\n if (isOpen) {\n handleClose();\n } else {\n handleOpen();\n }\n }\n\n _props.onClick?.(event);\n },\n ref: mergeRefs(triggerRef, _ref),\n }),\n getMenuListProps: (_props = {}, _ref = null) => ({\n ref: mergeRefs(menuListRef, _ref),\n onKeyDown: (event) => {\n handleMenuListKeyDown(event);\n _props.onKeyDown?.(event);\n },\n onBlur: (event) => {\n _props.onBlur?.(event);\n\n if (!closeOnBlur) {\n return;\n }\n\n const relatedTarget = event.relatedTarget as Node;\n\n const targetIsMenu =\n menuListRef.current === relatedTarget ||\n menuListRef.current?.contains(relatedTarget);\n const targetIsTrigger =\n triggerRef.current === relatedTarget ||\n triggerRef.current?.contains(relatedTarget);\n const targetIsSubmenu =\n relatedTarget?.parentElement?.dataset.parentMenu === menuId;\n\n if (targetIsMenu || targetIsTrigger || targetIsSubmenu) {\n event.stopPropagation();\n return;\n }\n\n handleClose();\n },\n }),\n getMenuItemProps: (_props = {}) => ({\n onClick: (event) => {\n _props.onClick?.(event);\n\n const isSubmenuTrigger = Boolean(\n (event.target as HTMLElement).getAttribute('aria-haspopup'),\n );\n if (closeOnSelect && !isSubmenuTrigger) {\n closeAndFocusTrigger();\n }\n },\n }),\n propsToPropagateToSubmenus: {\n closeOnSelect,\n closeOnBlur,\n closeOnEsc,\n },\n }),\n [\n menuId,\n isOpen,\n handleMenuListKeyDown,\n closeOnSelect,\n handleClose,\n handleOpen,\n focusMenuItem,\n closeOnBlur,\n closeOnEsc,\n closeAndFocusTrigger,\n isControlled,\n onOpen,\n ],\n );\n\n return (\n <MenuContextProvider value={contextValue}>\n <Popover\n {...otherProps}\n isOpen={isOpen}\n onClose={handleClose}\n id={menuId}\n closeOnEsc={closeOnEsc}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={false}\n closeOnBlur={false}\n >\n {children}\n </Popover>\n </MenuContextProvider>\n );\n}\n\ntype UseMenuOpenStateProps = Pick<\n MenuProps,\n 'isOpen' | 'defaultIsOpen' | 'onOpen' | 'onClose'\n>;\n\nconst useMenuOpenState = (props: UseMenuOpenStateProps) => {\n const { isOpen, defaultIsOpen, onOpen, onClose } = props;\n const [isOpenState, setIsOpen] = useState(defaultIsOpen || false);\n\n const isControlled = isOpen !== undefined;\n const isOpenValue = isControlled ? isOpen : isOpenState;\n\n const handleClose = useCallback(() => {\n if (!isControlled) {\n setIsOpen(false);\n }\n onClose?.();\n }, [isControlled, onClose]);\n\n const handleOpen = useCallback(() => {\n if (!isControlled) {\n setIsOpen(true);\n }\n onOpen?.();\n }, [isControlled, onOpen]);\n\n return { isOpen: isOpenValue, isControlled, handleClose, handleOpen };\n};\n","import { useState, useCallback } from 'react';\n\ninterface UseArrowKeyNavigationProps {\n itemsContainerRef: React.MutableRefObject<HTMLElement>;\n itemsSelector: string;\n keyType?: 'vertical' | 'horizontal';\n initialFocusedIndex?: number;\n}\n\nconst ARROW_KEY_TYPES = {\n vertical: {\n prev: 'ArrowUp',\n next: 'ArrowDown',\n },\n horizontal: {\n prev: 'ArrowLeft',\n next: 'ArrowRight',\n },\n};\n\nexport const useArrowKeyNavigation = ({\n itemsContainerRef,\n itemsSelector,\n keyType = 'vertical',\n}: UseArrowKeyNavigationProps) => {\n const [focusedIndex, setFocusedIndex] = useState<number>(0);\n\n const handleArrowsKeyDown = useCallback(\n (event: React.KeyboardEvent) => {\n const container = itemsContainerRef.current;\n if (!container) return;\n\n const items = container.querySelectorAll(itemsSelector);\n if (items.length === 0) return;\n\n const lastItemIndex = items.length - 1;\n\n const focusFirstItem = () => setFocusedIndex(0);\n const focusLastItem = () => setFocusedIndex(lastItemIndex);\n const focusNextItem = () => {\n if (focusedIndex === lastItemIndex) {\n focusFirstItem();\n } else {\n setFocusedIndex(focusedIndex + 1);\n }\n };\n const focusPrevItem = () => {\n if (focusedIndex === 0) {\n focusLastItem();\n } else {\n setFocusedIndex(focusedIndex - 1);\n }\n };\n\n const keyToFnMap = {\n [ARROW_KEY_TYPES[keyType].next]: focusNextItem,\n [ARROW_KEY_TYPES[keyType].prev]: focusPrevItem,\n };\n\n const fn = keyToFnMap[event.key];\n if (fn) {\n event.preventDefault();\n fn();\n }\n },\n [focusedIndex, itemsSelector, itemsContainerRef, keyType],\n );\n\n return { focusedIndex, handleArrowsKeyDown, setFocusedIndex };\n};\n","import React, { ComponentPropsWithRef } from 'react';\nimport { MenuProps } from '.';\n\nexport type MenuContextType = {\n isOpen: boolean;\n menuId: string;\n focusMenuItem: (item: HTMLElement) => void;\n getTriggerProps: (\n _props: ComponentPropsWithRef<'button'>,\n _ref: React.Ref<HTMLButtonElement>,\n ) => ComponentPropsWithRef<'button'>;\n getMenuListProps: (\n _props: ComponentPropsWithRef<'div'>,\n _ref: React.Ref<HTMLDivElement>,\n ) => ComponentPropsWithRef<'div'>;\n getMenuItemProps: (\n _props: ComponentPropsWithRef<'button'>,\n ) => ComponentPropsWithRef<'button'>;\n propsToPropagateToSubmenus: Pick<\n MenuProps,\n 'closeOnBlur' | 'closeOnEsc' | 'closeOnSelect'\n >;\n};\n\nconst MenuContext = React.createContext<MenuContextType | undefined>(undefined);\n\nexport const useMenuContext = () => {\n const context = React.useContext(MenuContext);\n\n if (context === undefined) {\n throw new Error('useMenuContext must be used within a MenuContextProvider');\n }\n\n return context;\n};\n\nexport const MenuContextProvider = MenuContext.Provider;\n","import React from 'react';\nimport {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { useMenuContext } from '../MenuContext';\nimport { useSubmenuContext } from '../SubmenuContext';\nimport { Popover } from '@contentful/f36-popover';\nimport { cx } from 'emotion';\nimport { getMenuListStyles } from './MenuList.styles';\nimport { MenuListHeader } from './MenuListHeader';\nimport { MenuListFooter } from './MenuListFooter';\n\ninterface MenuListInternalProps extends CommonProps {\n children?: React.ReactNode;\n}\n\nfunction assertChild(child: any): child is { type: { displayName: string } } {\n return Boolean(child?.type?.displayName);\n}\n\nexport type MenuListProps = PropsWithHTMLElement<MenuListInternalProps, 'div'>;\n\nconst _MenuList = (\n props: ExpandProps<MenuListProps>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n children,\n testId = 'cf-ui-menu-list',\n className,\n ...otherProps\n } = props;\n\n const { getMenuListProps } = useMenuContext();\n const submenuContext = useSubmenuContext();\n\n let header: React.ReactElement | null = null;\n let footer: React.ReactElement | null = null;\n const items: React.ReactElement[] = [];\n\n React.Children.forEach(children, (child) => {\n let appendChild = true;\n if (assertChild(child)) {\n if (child.type.displayName === MenuListHeader.displayName) {\n header = (child as unknown) as React.ReactElement;\n appendChild = false;\n } else if (child.type.displayName === MenuListFooter.displayName) {\n footer = (child as unknown) as React.ReactElement;\n appendChild = false;\n }\n }\n if (appendChild) {\n items.push((child as unknown) as React.ReactElement);\n }\n });\n\n const styles = getMenuListStyles({\n hasStickyHeader: Boolean(header),\n hasStickyFooter: Boolean(footer),\n });\n\n const extendedOtherProps = submenuContext\n ? submenuContext.getSubmenuListProps(otherProps)\n : otherProps;\n\n return (\n <Popover.Content\n role=\"menu\"\n {...extendedOtherProps}\n {...getMenuListProps(extendedOtherProps, ref)}\n className={cx(styles.container, className)}\n testId={testId}\n >\n {header}\n {items}\n {footer}\n </Popover.Content>\n );\n};\n\nexport const MenuList = React.forwardRef(_MenuList);\n","import React, { ComponentPropsWithRef, ComponentPropsWithoutRef } from 'react';\n\nexport type SubmenuContextType = {\n isOpen: boolean;\n getSubmenuListProps: (\n _props: ComponentPropsWithRef<'div'>,\n ) => { 'data-parent-menu': string } & ComponentPropsWithoutRef<'div'>;\n getSubmenuTriggerProps: (\n _props: ComponentPropsWithRef<'button'>,\n _ref: React.Ref<HTMLButtonElement>,\n ) => ComponentPropsWithRef<'button'>;\n};\n\nconst SubmenuContext = React.createContext<SubmenuContextType | undefined>(\n undefined,\n);\n\nexport const useSubmenuContext = () => {\n const context = React.useContext(SubmenuContext);\n return context;\n};\n\nexport const SubmenuContextProvider = SubmenuContext.Provider;\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuHeaderStyles = () => {\n return css({\n position: 'sticky',\n top: 0,\n left: 0,\n backgroundColor: tokens.colorWhite,\n borderBottom: `1px solid ${tokens.gray300}`,\n padding: `${tokens.spacingXs} 0`,\n zIndex: 1001,\n });\n};\n\nexport const getMenuFooterStyles = () => {\n return css({\n position: 'sticky',\n bottom: 0,\n left: 0,\n backgroundColor: tokens.colorWhite,\n borderTop: `1px solid ${tokens.gray300}`,\n padding: `${tokens.spacingXs} 0`,\n zIndex: 1001,\n });\n};\n\nexport const getMenuListStyles = (props: {\n hasStickyFooter?: boolean;\n hasStickyHeader?: boolean;\n}) => ({\n container: css({\n overflowY: 'auto',\n position: 'relative',\n padding: 0,\n paddingTop: props.hasStickyHeader ? 0 : tokens.spacingXs,\n paddingBottom: props.hasStickyFooter ? 0 : tokens.spacingXs,\n }),\n});\n","import React from 'react';\nimport { cx } from 'emotion';\nimport type {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\n\nimport { getMenuHeaderStyles } from './MenuList.styles';\n\nexport type MenuListHeaderProps = PropsWithHTMLElement<CommonProps, 'div'>;\n\nexport const MenuListHeader: React.FC<ExpandProps<MenuListHeaderProps>> = (\n props,\n) => {\n const {\n children,\n testId = 'cf-ui-menu-list-header',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuHeaderStyles();\n\n return (\n <div\n data-test-id={testId}\n className={cx(styles, className)}\n {...otherProps}\n >\n {children}\n </div>\n );\n};\n\nMenuListHeader.displayName = 'MenuListHeader';\n","import React from 'react';\nimport { cx } from 'emotion';\nimport type {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\n\nimport { getMenuFooterStyles } from './MenuList.styles';\n\nexport type MenuListFooterProps = PropsWithHTMLElement<CommonProps, 'div'>;\n\nexport const MenuListFooter: React.FC<ExpandProps<MenuListFooterProps>> = (\n props,\n) => {\n const {\n children,\n testId = 'cf-ui-menu-list-footer',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuFooterStyles();\n\n return (\n <div\n data-test-id={testId}\n className={cx(styles, className)}\n {...otherProps}\n >\n {children}\n </div>\n );\n};\n\nMenuListFooter.displayName = 'MenuListFooter';\n","import React, { useEffect, useRef } from 'react';\nimport { cx } from 'emotion';\nimport {\n CommonProps,\n mergeRefs,\n PolymorphicComponent,\n PolymorphicProps,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { useMenuContext } from '../MenuContext';\nimport { useId } from '@contentful/f36-core';\nimport { getMenuItemStyles } from './MenuItem.styles';\n\nconst MENU_ITEM_DEFAULT_TAG = 'button';\n\ninterface MenuItemInternalProps extends CommonProps {\n children?: React.ReactNode;\n as?: 'a' | 'button';\n\n /**\n * Sets focus on item\n */\n isInitiallyFocused?: boolean;\n}\n\nexport type MenuItemProps<\n E extends React.ElementType = typeof MENU_ITEM_DEFAULT_TAG\n> = PolymorphicProps<MenuItemInternalProps, E>;\n\nfunction _MenuItem<E extends React.ElementType = typeof MENU_ITEM_DEFAULT_TAG>(\n props: MenuItemProps<E>,\n ref: React.Ref<any>,\n) {\n const { testId, className, as, isInitiallyFocused, ...otherProps } = props;\n\n const id = useId(null, 'menu-item');\n const itemTestId = testId || `cf-ui-${id}`;\n const styles = getMenuItemStyles();\n\n const { getMenuItemProps, focusMenuItem } = useMenuContext();\n\n const itemRef = useRef<HTMLElement>(null);\n useEffect(() => {\n if (isInitiallyFocused && itemRef.current) {\n focusMenuItem(itemRef.current);\n }\n }, [isInitiallyFocused, focusMenuItem]);\n\n const Element = (as ?? MENU_ITEM_DEFAULT_TAG) as React.ElementType;\n\n return (\n <Element\n role=\"menuitem\"\n {...otherProps}\n {...getMenuItemProps(otherProps)}\n className={cx(styles.root, className)}\n data-test-id={itemTestId}\n ref={mergeRefs(itemRef, ref)}\n tabIndex={-1}\n >\n {props.children}\n </Element>\n );\n}\n\nexport const MenuItem: PolymorphicComponent<\n ExpandProps<MenuItemInternalProps>,\n typeof MENU_ITEM_DEFAULT_TAG\n> = React.forwardRef(_MenuItem);\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuItemStyles = () => {\n return {\n root: css({\n display: 'block',\n width: '100%',\n background: 'none',\n border: 0,\n margin: 0,\n outline: 'none',\n fontSize: tokens.fontSizeM,\n lineHeight: tokens.lineHeightM,\n fontWeight: tokens.fontWeightNormal,\n position: 'relative',\n textAlign: 'left',\n padding: `${tokens.spacingXs} ${tokens.spacingM}`,\n wordBreak: 'break-word',\n whiteSpace: 'break-spaces',\n cursor: 'pointer',\n hyphens: 'auto',\n minWidth: '150px',\n textDecoration: 'none',\n color: tokens.gray800,\n\n '&:focus, &:hover': {\n backgroundColor: tokens.gray100,\n },\n '&:active': {\n backgroundColor: tokens.gray200,\n },\n '&:disabled': {\n opacity: 0.5,\n cursor: 'auto',\n },\n }),\n };\n};\n","import React from 'react';\nimport { Popover } from '@contentful/f36-popover';\nimport { useMenuContext } from '../MenuContext';\nimport { ExpandProps } from '@contentful/f36-core';\n\nexport interface MenuTriggerProps {\n children: React.ReactNode;\n}\n\nexport const MenuTrigger = (props: ExpandProps<MenuTriggerProps>) => {\n const child = React.Children.only(props.children) as any;\n const { getTriggerProps } = useMenuContext();\n\n return (\n <Popover.Trigger>\n {React.cloneElement(child, {\n ...getTriggerProps(child.props, child.ref),\n ['aria-haspopup']: 'menu',\n })}\n </Popover.Trigger>\n );\n};\n","import React from 'react';\nimport {\n CommonProps,\n PropsWithHTMLElement,\n ExpandProps,\n} from '@contentful/f36-core';\nimport { cx } from 'emotion';\nimport { getMenuDividerStyles } from './MenuDivider.styles';\n\nexport type MenuDividerProps = PropsWithHTMLElement<CommonProps, 'hr'>;\n\nexport const MenuDivider = (props: ExpandProps<MenuDividerProps>) => {\n const {\n children,\n testId = 'cf-ui-menu-divider',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuDividerStyles();\n\n return (\n <hr\n aria-orientation=\"horizontal\"\n data-test-id={testId}\n className={cx(styles, className)}\n {...otherProps}\n />\n );\n};\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuDividerStyles = () =>\n css({\n border: 'none',\n width: '100%',\n height: '1px',\n background: tokens.gray300,\n margin: `${tokens.spacingXs} 0`,\n });\n","import React from 'react';\nimport { cx } from 'emotion';\nimport { getMenuSectionTitleStyles } from './MenuSectionTitle.styles';\nimport {\n SectionHeading,\n SectionHeadingProps,\n} from '@contentful/f36-typography';\nimport { ExpandProps } from '@contentful/f36-core';\n\nexport type MenuSectionTitleProps = SectionHeadingProps;\n\nexport const MenuSectionTitle = (props: ExpandProps<MenuSectionTitleProps>) => {\n const {\n children,\n testId = 'cf-ui-menu-section-title',\n className,\n ...otherProps\n } = props;\n\n const styles = getMenuSectionTitleStyles();\n\n return (\n <SectionHeading\n // Techincally, menus cannot contain headings according to ARIA.\n // We hide the heading from assistive technology, and only use it\n // as a label\n aria-hidden=\"true\"\n testId={testId}\n className={cx(styles, className)}\n marginBottom=\"none\"\n {...otherProps}\n >\n {children}\n </SectionHeading>\n );\n};\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getMenuSectionTitleStyles = () =>\n css({\n textAlign: 'left',\n padding: `${tokens.spacingXs} ${tokens.spacingM}`,\n lineHeight: tokens.lineHeightM,\n\n 'hr + &': {\n marginTop: '-8px',\n },\n });\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Menu, MenuProps } from '../Menu';\nimport { useMenuContext } from '../MenuContext';\nimport { SubmenuContextProvider, SubmenuContextType } from '../SubmenuContext';\nimport { mergeRefs } from '@contentful/f36-core';\n\nconst SUBMENU_OFFSET: [number, number] = [-8, 2];\n\nexport type SubmenuProps = Omit<\n MenuProps,\n | 'placement'\n | 'offset'\n | 'usePortal'\n | 'isOpen'\n | 'isAutoalignmentEnabled'\n | 'defaultIsOpen'\n>;\n\nexport const Submenu = (props: SubmenuProps) => {\n const { onClose, onOpen, ...otherProps } = props;\n\n const {\n isOpen: isParentMenuOpen,\n menuId,\n propsToPropagateToSubmenus,\n } = useMenuContext();\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const mouseLeaveTimerRef = useRef(null);\n\n const [isOpen, setIsOpen] = useState(false);\n const handleOpen = useCallback(() => {\n setIsOpen(true);\n window.clearTimeout(mouseLeaveTimerRef.current);\n\n onOpen?.();\n }, [onOpen]);\n const handleClose = useCallback(() => {\n setIsOpen(false);\n window.clearTimeout(mouseLeaveTimerRef.current);\n\n onClose?.();\n }, [onClose]);\n const closeAndFocusTrigger = useCallback(() => {\n handleClose();\n triggerRef.current?.focus({ preventScroll: true });\n }, [handleClose]);\n\n useEffect(() => {\n // close when parent menu closed\n if (isParentMenuOpen === false) {\n setIsOpen(false);\n }\n }, [isParentMenuOpen]);\n\n const contextValue: SubmenuContextType = useMemo(\n () => ({\n isOpen,\n getSubmenuListProps: (_props) => ({\n 'data-parent-menu': menuId,\n onMouseOver: (event) => {\n handleOpen();\n\n _props.onMouseOver?.(event);\n },\n onMouseLeave: (event) => {\n closeAndFocusTrigger();\n\n _props.onMouseLeave?.(event);\n },\n }),\n getSubmenuTriggerProps: (_props, _ref) => ({\n ref: mergeRefs(triggerRef, _ref),\n onKeyDown: (event) => {\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n handleOpen();\n }\n\n _props.onKeyDown?.(event);\n },\n onMouseOver: (event) => {\n handleOpen();\n\n _props.onMouseOver?.(event);\n },\n onMouseLeave: (event) => {\n mouseLeaveTimerRef.current = window.setTimeout(\n closeAndFocusTrigger,\n 300,\n );\n\n _props.onMouseLeave?.(event);\n },\n }),\n }),\n [isOpen, menuId, handleOpen, closeAndFocusTrigger],\n );\n\n return (\n <SubmenuContextProvider value={contextValue}>\n <Menu\n {...propsToPropagateToSubmenus}\n {...otherProps}\n isOpen={isOpen}\n onClose={handleClose}\n onOpen={handleOpen}\n placement=\"right-start\"\n offset={SUBMENU_OFFSET}\n isAutoalignmentEnabled={false}\n />\n </SubmenuContextProvider>\n );\n};\n","import React from 'react';\nimport { MenuTrigger } from '../MenuTrigger/MenuTrigger';\nimport { MenuItem, MenuItemProps } from '../MenuItem/MenuItem';\nimport { useSubmenuContext } from '../SubmenuContext';\nimport { ChevronRightIcon } from '@contentful/f36-icons';\nimport { ExpandProps } from '@contentful/f36-core';\nimport { cx } from 'emotion';\nimport { getSubmenuTriggerStyles } from './SubmenuTrigger.styles';\n\nexport type SubmenuTriggerProps = Omit<\n MenuItemProps<'button'>,\n 'isInitiallyFocused' | 'as'\n>;\n\nconst _SubmenuTrigger = (\n props: ExpandProps<SubmenuTriggerProps>,\n ref: React.Ref<HTMLButtonElement>,\n) => {\n const { className, children } = props;\n const { getSubmenuTriggerProps, isOpen } = useSubmenuContext();\n\n const styles = getSubmenuTriggerStyles();\n\n return (\n <MenuTrigger>\n <MenuItem\n {...props}\n {...getSubmenuTriggerProps(props, ref)}\n className={cx(styles.root({ isActive: isOpen }), className)}\n >\n <span className={styles.content}>{children}</span>\n <ChevronRightIcon className={styles.icon} />\n </MenuItem>\n </MenuTrigger>\n );\n};\n\nexport const SubmenuTrigger = React.forwardRef(_SubmenuTrigger);\n","import { css } from 'emotion';\nimport tokens from '@contentful/f36-tokens';\n\nexport const getSubmenuTriggerStyles = () => {\n return {\n root: ({ isActive }) =>\n css({\n display: 'flex',\n alignItems: 'center',\n paddingRight: tokens.spacingXs,\n ...(isActive\n ? {\n backgroundColor: tokens.gray100,\n }\n : {}),\n }),\n content: css({\n marginRight: tokens.spacingM,\n }),\n icon: css({\n marginLeft: 'auto',\n fill: 'currentColor',\n }),\n };\n};\n"],"names":["Menu","MenuProps","MenuList","MenuListProps","MenuItem","MenuItemProps","MenuTrigger","MenuTriggerProps","MenuDivider","MenuDividerProps","MenuSectionTitle","MenuSectionTitleProps","Submenu","SubmenuProps","SubmenuTrigger","SubmenuTriggerProps","OriginalMenu","MenuListHeader","MenuListFooter","CompoundMenu","List","ListHeader","ListFooter","Item","Trigger","Divider","SectionTitle","React","useState","useCallback","useMemo","useRef","useEffect","mergeRefs","useId","useArrowKeyNavigation","Popover","PopoverProps","MenuContextProvider","MenuContextType","MENU_ITEMS_SELECTOR","Omit","isOpen","defaultIsOpen","onOpen","onClose","closeOnSelect","closeOnBlur","closeOnEsc","props","children","otherProps","handleOpen","handleClose","isControlled","useMenuOpenState","triggerRef","HTMLButtonElement","menuListRef","HTMLDivElement","menuId","focusedIndex","handleArrowsKeyDown","setFocusedIndex","itemsContainerRef","itemsSelector","current","menuItems","querySelectorAll","length","setTimeout","HTMLElement","focus","preventScroll","focusMenuItem","item","itemIndex","findIndex","menuItem","closeAndFocusTrigger","handleMenuListKeyDown","event","KeyboardEvent","key","preventDefault","stopPropagation","contextValue","getTriggerProps","_props","_ref","onClick","isFullyControlled","ref","getMenuListProps","onKeyDown","onBlur","relatedTarget","Node","targetIsMenu","contains","targetIsTrigger","targetIsSubmenu","parentElement","dataset","parentMenu","getMenuItemProps","isSubmenuTrigger","Boolean","target","getAttribute","propsToPropagateToSubmenus","UseMenuOpenStateProps","Pick","isOpenState","setIsOpen","undefined","isOpenValue","UseArrowKeyNavigationProps","MutableRefObject","keyType","initialFocusedIndex","ARROW_KEY_TYPES","vertical","prev","next","horizontal","container","items","lastItemIndex","focusFirstItem","focusLastItem","focusNextItem","focusPrevItem","keyToFnMap","fn","ComponentPropsWithRef","Ref","MenuContext","createContext","useMenuContext","context","useContext","Error","Provider","CommonProps","PropsWithHTMLElement","ExpandProps","useSubmenuContext","getMenuListStyles","MenuListInternalProps","ReactNode","assertChild","child","type","displayName","_MenuList","testId","className","submenuContext","header","ReactElement","footer","Children","forEach","appendChild","push","styles","hasStickyHeader","hasStickyFooter","extendedOtherProps","getSubmenuListProps","forwardRef","ComponentPropsWithoutRef","SubmenuContextType","getSubmenuTriggerProps","SubmenuContext","SubmenuContextProvider","tokens","getMenuHeaderStyles","position","top","left","backgroundColor","colorWhite","borderBottom","gray300","padding","spacingXs","zIndex","getMenuFooterStyles","bottom","borderTop","overflowY","paddingTop","paddingBottom","MenuListHeaderProps","FC","MenuListFooterProps","PolymorphicComponent","PolymorphicProps","getMenuItemStyles","MENU_ITEM_DEFAULT_TAG","MenuItemInternalProps","as","isInitiallyFocused","ElementType","E","_MenuItem","id","itemTestId","itemRef","Element","root","display","width","background","border","margin","outline","fontSize","fontSizeM","lineHeight","lineHeightM","fontWeight","fontWeightNormal","textAlign","spacingM","wordBreak","whiteSpace","cursor","hyphens","minWidth","textDecoration","color","gray800","gray100","gray200","opacity","only","cloneElement","getMenuDividerStyles","height","getMenuSectionTitleStyles","SectionHeading","SectionHeadingProps","marginTop","SUBMENU_OFFSET","isParentMenuOpen","mouseLeaveTimerRef","window","clearTimeout","onMouseOver","onMouseLeave","ChevronRightIcon","getSubmenuTriggerStyles","_SubmenuTrigger","isActive","content","icon","alignItems","paddingRight","marginRight"],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import $eBAEH$react, {useRef as $eBAEH$useRef, useEffect as $eBAEH$useEffect, useCallback as $eBAEH$useCallback, useMemo as $eBAEH$useMemo, useState as $eBAEH$useState} from "react";
2
2
  import {useId as $eBAEH$useId, mergeRefs as $eBAEH$mergeRefs} from "@contentful/f36-core";
3
3
  import {Popover as $eBAEH$Popover} from "@contentful/f36-popover";
4
- import {jsx as $eBAEH$jsx, jsxs as $eBAEH$jsxs} from "react/jsx-runtime";
5
4
  import {cx as $eBAEH$cx, css as $eBAEH$css} from "emotion";
6
5
  import $eBAEH$contentfulf36tokens from "@contentful/f36-tokens";
7
6
  import {SectionHeading as $eBAEH$SectionHeading} from "@contentful/f36-typography";
@@ -10,7 +9,6 @@ import {ChevronRightIcon as $eBAEH$ChevronRightIcon} from "@contentful/f36-icons
10
9
 
11
10
 
12
11
 
13
-
14
12
  const $d3c8cb97d16f8911$var$ARROW_KEY_TYPES = {
15
13
  vertical: {
16
14
  prev: 'ArrowUp',
@@ -216,19 +214,17 @@ function $815624c5c2e33d2d$export$d9b273488cd8ce6f(props) {
216
214
  isControlled,
217
215
  onOpen
218
216
  ]);
219
- return(/*#__PURE__*/ $eBAEH$jsx($c66e4ce1999d7489$export$2cad3fd48ac06579, {
220
- value: contextValue,
221
- children: /*#__PURE__*/ $eBAEH$jsx($eBAEH$Popover, {
222
- ...otherProps,
223
- isOpen: isOpen,
224
- onClose: handleClose,
225
- id: menuId,
226
- closeOnEsc: closeOnEsc,
227
- autoFocus: false,
228
- closeOnBlur: false,
229
- children: children
230
- })
231
- }));
217
+ return(/*#__PURE__*/ $eBAEH$react.createElement($c66e4ce1999d7489$export$2cad3fd48ac06579, {
218
+ value: contextValue
219
+ }, /*#__PURE__*/ $eBAEH$react.createElement($eBAEH$Popover, {
220
+ ...otherProps,
221
+ isOpen: isOpen,
222
+ onClose: handleClose,
223
+ id: menuId,
224
+ closeOnEsc: closeOnEsc,
225
+ autoFocus: false,
226
+ closeOnBlur: false
227
+ }, children)));
232
228
  }
233
229
  const $815624c5c2e33d2d$var$useMenuOpenState = (props)=>{
234
230
  const { isOpen: isOpen , defaultIsOpen: defaultIsOpen , onOpen: onOpen , onClose: onClose } = props;
@@ -262,7 +258,6 @@ const $815624c5c2e33d2d$var$useMenuOpenState = (props)=>{
262
258
 
263
259
 
264
260
 
265
-
266
261
  const $5f642d41e782730b$var$SubmenuContext = $eBAEH$react.createContext(undefined);
267
262
  const $5f642d41e782730b$export$958673a266cbe049 = ()=>{
268
263
  const context = $eBAEH$react.useContext($5f642d41e782730b$var$SubmenuContext);
@@ -311,16 +306,14 @@ const $e1ca220e91193b42$export$10ce7613b0465b57 = (props)=>({
311
306
 
312
307
 
313
308
 
314
-
315
309
  const $042de7e263db0945$export$77451990ddb9d17c = (props)=>{
316
310
  const { children: children , testId: testId = 'cf-ui-menu-list-header' , className: className , ...otherProps } = props;
317
311
  const styles = $e1ca220e91193b42$export$396ce14bde1b7929();
318
- return(/*#__PURE__*/ $eBAEH$jsx("div", {
312
+ return(/*#__PURE__*/ $eBAEH$react.createElement("div", {
319
313
  "data-test-id": testId,
320
314
  className: $eBAEH$cx(styles, className),
321
- ...otherProps,
322
- children: children
323
- }));
315
+ ...otherProps
316
+ }, children));
324
317
  };
325
318
  $042de7e263db0945$export$77451990ddb9d17c.displayName = 'MenuListHeader';
326
319
 
@@ -328,16 +321,14 @@ $042de7e263db0945$export$77451990ddb9d17c.displayName = 'MenuListHeader';
328
321
 
329
322
 
330
323
 
331
-
332
324
  const $5a5dcb1ec14dca9d$export$3e8a81e7ad0650f4 = (props)=>{
333
325
  const { children: children , testId: testId = 'cf-ui-menu-list-footer' , className: className , ...otherProps } = props;
334
326
  const styles = $e1ca220e91193b42$export$fd3dbc8a890448f();
335
- return(/*#__PURE__*/ $eBAEH$jsx("div", {
327
+ return(/*#__PURE__*/ $eBAEH$react.createElement("div", {
336
328
  "data-test-id": testId,
337
329
  className: $eBAEH$cx(styles, className),
338
- ...otherProps,
339
- children: children
340
- }));
330
+ ...otherProps
331
+ }, children));
341
332
  };
342
333
  $5a5dcb1ec14dca9d$export$3e8a81e7ad0650f4.displayName = 'MenuListFooter';
343
334
 
@@ -371,18 +362,13 @@ const $511d273ec51beeae$var$_MenuList = (props, ref)=>{
371
362
  hasStickyFooter: Boolean(footer)
372
363
  });
373
364
  const extendedOtherProps = submenuContext ? submenuContext.getSubmenuListProps(otherProps) : otherProps;
374
- return(/*#__PURE__*/ $eBAEH$jsxs($eBAEH$Popover.Content, {
365
+ return(/*#__PURE__*/ $eBAEH$react.createElement($eBAEH$Popover.Content, {
375
366
  role: "menu",
376
367
  ...extendedOtherProps,
377
368
  ...getMenuListProps(extendedOtherProps, ref),
378
369
  className: $eBAEH$cx(styles.container, className),
379
- testId: testId,
380
- children: [
381
- header,
382
- items,
383
- footer
384
- ]
385
- }));
370
+ testId: testId
371
+ }, header, items, footer));
386
372
  };
387
373
  const $511d273ec51beeae$export$d4c4e98c5044dc8 = /*#__PURE__*/ $eBAEH$react.forwardRef($511d273ec51beeae$var$_MenuList);
388
374
 
@@ -396,7 +382,6 @@ const $511d273ec51beeae$export$d4c4e98c5044dc8 = /*#__PURE__*/ $eBAEH$react.forw
396
382
 
397
383
 
398
384
 
399
-
400
385
  const $0cc53a77e90ceec6$export$adaad53e003c74d0 = ()=>{
401
386
  return {
402
387
  root: /*#__PURE__*/ $eBAEH$css({
@@ -449,16 +434,15 @@ function $ea346231d142cd67$var$_MenuItem(props, ref) {
449
434
  focusMenuItem
450
435
  ]);
451
436
  const Element = as !== null && as !== void 0 ? as : $ea346231d142cd67$var$MENU_ITEM_DEFAULT_TAG;
452
- return(/*#__PURE__*/ $eBAEH$jsx(Element, {
437
+ return(/*#__PURE__*/ $eBAEH$react.createElement(Element, {
453
438
  role: "menuitem",
454
439
  ...otherProps,
455
440
  ...getMenuItemProps(otherProps),
456
441
  className: $eBAEH$cx(styles.root, className),
457
442
  "data-test-id": itemTestId,
458
443
  ref: $eBAEH$mergeRefs(itemRef, ref),
459
- tabIndex: -1,
460
- children: props.children
461
- }));
444
+ tabIndex: -1
445
+ }, props.children));
462
446
  }
463
447
  const $ea346231d142cd67$export$2ce376c2cc3355c8 = /*#__PURE__*/ $eBAEH$react.forwardRef($ea346231d142cd67$var$_MenuItem);
464
448
 
@@ -466,16 +450,13 @@ const $ea346231d142cd67$export$2ce376c2cc3355c8 = /*#__PURE__*/ $eBAEH$react.for
466
450
 
467
451
 
468
452
 
469
-
470
453
  const $94016b6f927b504d$export$27d2ad3c5815583e = (props)=>{
471
454
  const child = $eBAEH$react.Children.only(props.children);
472
455
  const { getTriggerProps: getTriggerProps } = $c66e4ce1999d7489$export$21c7ab35b39f78ec();
473
- return(/*#__PURE__*/ $eBAEH$jsx($eBAEH$Popover.Trigger, {
474
- children: /*#__PURE__*/ $eBAEH$react.cloneElement(child, {
475
- ...getTriggerProps(child.props, child.ref),
476
- ['aria-haspopup']: 'menu'
477
- })
478
- }));
456
+ return(/*#__PURE__*/ $eBAEH$react.createElement($eBAEH$Popover.Trigger, null, /*#__PURE__*/ $eBAEH$react.cloneElement(child, {
457
+ ...getTriggerProps(child.props, child.ref),
458
+ ['aria-haspopup']: 'menu'
459
+ })));
479
460
  };
480
461
 
481
462
 
@@ -483,7 +464,6 @@ const $94016b6f927b504d$export$27d2ad3c5815583e = (props)=>{
483
464
 
484
465
 
485
466
 
486
-
487
467
  const $90fd1006b83bc4dd$export$4605da6f9a8ef405 = ()=>/*#__PURE__*/ $eBAEH$css({
488
468
  border: 'none',
489
469
  width: '100%',
@@ -497,7 +477,7 @@ const $90fd1006b83bc4dd$export$4605da6f9a8ef405 = ()=>/*#__PURE__*/ $eBAEH$css({
497
477
  const $a6a319b65dbbd900$export$acb07b4664ac227c = (props)=>{
498
478
  const { children: children , testId: testId = 'cf-ui-menu-divider' , className: className , ...otherProps } = props;
499
479
  const styles = $90fd1006b83bc4dd$export$4605da6f9a8ef405();
500
- return(/*#__PURE__*/ $eBAEH$jsx("hr", {
480
+ return(/*#__PURE__*/ $eBAEH$react.createElement("hr", {
501
481
  "aria-orientation": "horizontal",
502
482
  "data-test-id": testId,
503
483
  className: $eBAEH$cx(styles, className),
@@ -510,7 +490,6 @@ const $a6a319b65dbbd900$export$acb07b4664ac227c = (props)=>{
510
490
 
511
491
 
512
492
 
513
-
514
493
  const $7f43fb9a4d140447$export$2698fa8b3a0a79e6 = ()=>/*#__PURE__*/ $eBAEH$css({
515
494
  textAlign: 'left',
516
495
  padding: `${$eBAEH$contentfulf36tokens.spacingXs} ${$eBAEH$contentfulf36tokens.spacingM}`,
@@ -526,7 +505,7 @@ const $7f43fb9a4d140447$export$2698fa8b3a0a79e6 = ()=>/*#__PURE__*/ $eBAEH$css({
526
505
  const $7c6385c774644580$export$5d1e6c648985631e = (props)=>{
527
506
  const { children: children , testId: testId = 'cf-ui-menu-section-title' , className: className , ...otherProps } = props;
528
507
  const styles = $7f43fb9a4d140447$export$2698fa8b3a0a79e6();
529
- return(/*#__PURE__*/ $eBAEH$jsx($eBAEH$SectionHeading // Techincally, menus cannot contain headings according to ARIA.
508
+ return(/*#__PURE__*/ $eBAEH$react.createElement($eBAEH$SectionHeading // Techincally, menus cannot contain headings according to ARIA.
530
509
  , {
531
510
  // We hide the heading from assistive technology, and only use it
532
511
  // as a label
@@ -534,9 +513,8 @@ const $7c6385c774644580$export$5d1e6c648985631e = (props)=>{
534
513
  testId: testId,
535
514
  className: $eBAEH$cx(styles, className),
536
515
  marginBottom: "none",
537
- ...otherProps,
538
- children: children
539
- }));
516
+ ...otherProps
517
+ }, children));
540
518
  };
541
519
 
542
520
 
@@ -545,7 +523,6 @@ const $7c6385c774644580$export$5d1e6c648985631e = (props)=>{
545
523
 
546
524
 
547
525
 
548
-
549
526
  const $407bba9f98210b35$var$SUBMENU_OFFSET = [
550
527
  -8,
551
528
  2
@@ -633,19 +610,18 @@ const $407bba9f98210b35$export$49229ebf838c159b = (props)=>{
633
610
  handleOpen,
634
611
  closeAndFocusTrigger
635
612
  ]);
636
- return(/*#__PURE__*/ $eBAEH$jsx($5f642d41e782730b$export$81b3dbd1f003f0c7, {
637
- value: contextValue,
638
- children: /*#__PURE__*/ $eBAEH$jsx($815624c5c2e33d2d$export$d9b273488cd8ce6f, {
639
- ...propsToPropagateToSubmenus,
640
- ...otherProps,
641
- isOpen: isOpen,
642
- onClose: handleClose,
643
- onOpen: handleOpen,
644
- placement: "right-start",
645
- offset: $407bba9f98210b35$var$SUBMENU_OFFSET,
646
- isAutoalignmentEnabled: false
647
- })
648
- }));
613
+ return(/*#__PURE__*/ $eBAEH$react.createElement($5f642d41e782730b$export$81b3dbd1f003f0c7, {
614
+ value: contextValue
615
+ }, /*#__PURE__*/ $eBAEH$react.createElement($815624c5c2e33d2d$export$d9b273488cd8ce6f, {
616
+ ...propsToPropagateToSubmenus,
617
+ ...otherProps,
618
+ isOpen: isOpen,
619
+ onClose: handleClose,
620
+ onOpen: handleOpen,
621
+ placement: "right-start",
622
+ offset: $407bba9f98210b35$var$SUBMENU_OFFSET,
623
+ isAutoalignmentEnabled: false
624
+ })));
649
625
  };
650
626
 
651
627
 
@@ -657,7 +633,6 @@ const $407bba9f98210b35$export$49229ebf838c159b = (props)=>{
657
633
 
658
634
 
659
635
 
660
-
661
636
  const $f5b15ecf1bfa860d$export$ce276565acbba1c9 = ()=>{
662
637
  return {
663
638
  root: ({ isActive: isActive })=>/*#__PURE__*/ $eBAEH$css({
@@ -685,24 +660,17 @@ const $423d6b42721d64f8$var$_SubmenuTrigger = (props, ref)=>{
685
660
  const { className: className , children: children } = props;
686
661
  const { getSubmenuTriggerProps: getSubmenuTriggerProps , isOpen: isOpen } = $5f642d41e782730b$export$958673a266cbe049();
687
662
  const styles = $f5b15ecf1bfa860d$export$ce276565acbba1c9();
688
- return(/*#__PURE__*/ $eBAEH$jsx($94016b6f927b504d$export$27d2ad3c5815583e, {
689
- children: /*#__PURE__*/ $eBAEH$jsxs($ea346231d142cd67$export$2ce376c2cc3355c8, {
690
- ...props,
691
- ...getSubmenuTriggerProps(props, ref),
692
- className: $eBAEH$cx(styles.root({
693
- isActive: isOpen
694
- }), className),
695
- children: [
696
- /*#__PURE__*/ $eBAEH$jsx("span", {
697
- className: styles.content,
698
- children: children
699
- }),
700
- /*#__PURE__*/ $eBAEH$jsx($eBAEH$ChevronRightIcon, {
701
- className: styles.icon
702
- })
703
- ]
704
- })
705
- }));
663
+ return(/*#__PURE__*/ $eBAEH$react.createElement($94016b6f927b504d$export$27d2ad3c5815583e, null, /*#__PURE__*/ $eBAEH$react.createElement($ea346231d142cd67$export$2ce376c2cc3355c8, {
664
+ ...props,
665
+ ...getSubmenuTriggerProps(props, ref),
666
+ className: $eBAEH$cx(styles.root({
667
+ isActive: isOpen
668
+ }), className)
669
+ }, /*#__PURE__*/ $eBAEH$react.createElement("span", {
670
+ className: styles.content
671
+ }, children), /*#__PURE__*/ $eBAEH$react.createElement($eBAEH$ChevronRightIcon, {
672
+ className: styles.icon
673
+ }))));
706
674
  };
707
675
  const $423d6b42721d64f8$export$ecabc99eeffab7ca = /*#__PURE__*/ $eBAEH$react.forwardRef($423d6b42721d64f8$var$_SubmenuTrigger);
708
676