@fluentui/react-menu 9.14.9 → 9.14.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -2
- package/lib/Menu.js.map +1 -1
- package/lib/MenuDivider.js.map +1 -1
- package/lib/MenuGroup.js.map +1 -1
- package/lib/MenuGroupHeader.js.map +1 -1
- package/lib/MenuItem.js.map +1 -1
- package/lib/MenuItemCheckbox.js.map +1 -1
- package/lib/MenuItemLink.js.map +1 -1
- package/lib/MenuItemRadio.js.map +1 -1
- package/lib/MenuItemSwitch.js.map +1 -1
- package/lib/MenuList.js.map +1 -1
- package/lib/MenuPopover.js.map +1 -1
- package/lib/MenuSplitGroup.js.map +1 -1
- package/lib/MenuTrigger.js.map +1 -1
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.types.js.map +1 -1
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib/components/MenuDivider/index.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
- package/lib/components/MenuGroupHeader/index.js.map +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib/components/MenuItem/index.js.map +1 -1
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
- package/lib/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemLink/MenuItemLink.js.map +1 -1
- package/lib/components/MenuItemLink/MenuItemLink.types.js +3 -1
- package/lib/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
- package/lib/components/MenuItemLink/index.js.map +1 -1
- package/lib/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
- package/lib/components/MenuItemLink/useMenuItemLink.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
- package/lib/components/MenuItemRadio/index.js.map +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemSwitch/MenuItemSwitch.js.map +1 -1
- package/lib/components/MenuItemSwitch/MenuItemSwitch.types.js +3 -1
- package/lib/components/MenuItemSwitch/MenuItemSwitch.types.js.map +1 -1
- package/lib/components/MenuItemSwitch/index.js.map +1 -1
- package/lib/components/MenuItemSwitch/renderMenuItemSwitch.js.map +1 -1
- package/lib/components/MenuItemSwitch/useMenuItemSwitch.js.map +1 -1
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/MenuList.types.js.map +1 -1
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.types.js +3 -1
- package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib/components/MenuPopover/index.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib/components/MenuSplitGroup/index.js.map +1 -1
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib/components/MenuTrigger/index.js.map +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/selectable/index.js.map +1 -1
- package/lib/selectable/types.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/useIsSubmenu.js.map +1 -1
- package/lib/utils/useOnMenuEnter.js.map +1 -1
- package/lib-commonjs/Menu.js.map +1 -1
- package/lib-commonjs/MenuDivider.js.map +1 -1
- package/lib-commonjs/MenuGroup.js.map +1 -1
- package/lib-commonjs/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/MenuItem.js.map +1 -1
- package/lib-commonjs/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/MenuItemLink.js.map +1 -1
- package/lib-commonjs/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/MenuItemSwitch.js.map +1 -1
- package/lib-commonjs/MenuList.js.map +1 -1
- package/lib-commonjs/MenuPopover.js.map +1 -1
- package/lib-commonjs/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.types.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/index.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/index.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib-commonjs/components/MenuItem/index.js.map +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.types.js +3 -1
- package/lib-commonjs/components/MenuItemLink/MenuItemLink.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/renderMenuItemLink.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/useMenuItemLink.js.map +1 -1
- package/lib-commonjs/components/MenuItemLink/useMenuItemLinkStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.js.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.types.js +3 -1
- package/lib-commonjs/components/MenuItemSwitch/MenuItemSwitch.types.js.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/index.js.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/renderMenuItemSwitch.js.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitch.js.map +1 -1
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js +3 -3
- package/lib-commonjs/components/MenuItemSwitch/useMenuItemSwitchStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.js +3 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/index.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js +3 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/index.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/index.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- package/lib-commonjs/index.js +136 -136
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/selectable/index.js.map +1 -1
- package/lib-commonjs/selectable/types.js.map +1 -1
- package/lib-commonjs/selectable/useCheckmarkStyles.styles.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js +3 -3
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +9 -9
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["menuContext.
|
1
|
+
{"version":3,"sources":["menuContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { MenuState } from '../components/Menu/index';\n\nexport const MenuContext: Context<MenuContextValue> = createContext<MenuContextValue | undefined>(\n undefined,\n) as Context<MenuContextValue>;\n\nconst menuContextDefaultValue: MenuContextValue = {\n open: false,\n setOpen: () => false,\n checkedValues: {},\n onCheckedValueChange: () => null,\n isSubmenu: false,\n triggerRef: { current: null } as unknown as React.MutableRefObject<HTMLElement>,\n menuPopoverRef: { current: null } as unknown as React.MutableRefObject<HTMLElement>,\n mountNode: null,\n triggerId: '',\n openOnContext: false,\n openOnHover: false,\n hasIcons: false,\n hasCheckmarks: false,\n inline: false,\n persistOnItemClick: false,\n};\n\n/**\n * Context shared between Menu and its children components\n *\n * Extends and drills down MenuList props to simplify API\n */\nexport type MenuContextValue = Pick<\n MenuState,\n | 'openOnHover'\n | 'openOnContext'\n | 'triggerRef'\n | 'menuPopoverRef'\n | 'setOpen'\n | 'isSubmenu'\n | 'mountNode'\n | 'triggerId'\n | 'hasIcons'\n | 'hasCheckmarks'\n | 'persistOnItemClick'\n | 'inline'\n | 'checkedValues'\n | 'onCheckedValueChange'\n> & {\n open: boolean;\n triggerId: string;\n /**\n * Default values to be checked on mount\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n defaultCheckedValues?: Record<string, string[]>;\n};\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext_unstable = <T>(selector: ContextSelector<MenuContextValue, T>) =>\n useContextSelector(MenuContext, (ctx = menuContextDefaultValue) => selector(ctx));\n"],"names":["MenuContext","MenuProvider","useMenuContext_unstable","createContext","undefined","menuContextDefaultValue","open","setOpen","checkedValues","onCheckedValueChange","isSubmenu","triggerRef","current","menuPopoverRef","mountNode","triggerId","openOnContext","openOnHover","hasIcons","hasCheckmarks","inline","persistOnItemClick","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,WAAAA;eAAAA;;IAsDAC,YAAAA;eAAAA;;IAEAC,uBAAAA;eAAAA;;;;iEA7DU;sCAC2B;AAI3C,MAAMF,cAAyCG,IAAAA,mCAAAA,EACpDC;AAGF,MAAMC,0BAA4C;IAChDC,MAAM;IACNC,SAAS,IAAM;IACfC,eAAe,CAAC;IAChBC,sBAAsB,IAAM;IAC5BC,WAAW;IACXC,YAAY;QAAEC,SAAS;IAAK;IAC5BC,gBAAgB;QAAED,SAAS;IAAK;IAChCE,WAAW;IACXC,WAAW;IACXC,eAAe;IACfC,aAAa;IACbC,UAAU;IACVC,eAAe;IACfC,QAAQ;IACRC,oBAAoB;AACtB;AAkCO,MAAMpB,eAAeD,YAAYsB,QAAQ;AAEzC,MAAMpB,0BAA0B,CAAIqB,WACzCC,IAAAA,wCAAAA,EAAmBxB,aAAa,CAACyB,MAAMpB,uBAAuB,GAAKkB,SAASE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["menuGroupContext.
|
1
|
+
{"version":3,"sources":["menuGroupContext.ts"],"sourcesContent":["import * as React from 'react';\n\nconst MenuGroupContext = React.createContext<MenuGroupContextValue | undefined>(\n undefined,\n) as React.Context<MenuGroupContextValue>;\n\nconst menuGroupContextDefaultValue: MenuGroupContextValue = {\n headerId: '',\n};\n\n/**\n * Context used to guarantee correct aria-relationship between header\n * and group information\n */\nexport type MenuGroupContextValue = {\n /**\n * Element id applied to the `MenuGroupHeader` component\n */\n headerId: string;\n};\n\nexport const MenuGroupContextProvider = MenuGroupContext.Provider;\nexport const useMenuGroupContext_unstable = () => React.useContext(MenuGroupContext) ?? menuGroupContextDefaultValue;\n"],"names":["MenuGroupContextProvider","useMenuGroupContext_unstable","MenuGroupContext","React","createContext","undefined","menuGroupContextDefaultValue","headerId","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAqBaA,wBAAAA;eAAAA;;IACAC,4BAAAA;eAAAA;;;;iEAtBU;AAEvB,MAAMC,iCAAmBC,OAAMC,aAAa,CAC1CC;AAGF,MAAMC,+BAAsD;IAC1DC,UAAU;AACZ;AAaO,MAAMP,2BAA2BE,iBAAiBM,QAAQ;AAC1D,MAAMP,+BAA+B;QAAME;WAAAA,CAAAA,oBAAAA,OAAMM,UAAU,CAACP,iBAAAA,MAAAA,QAAjBC,sBAAAA,KAAAA,IAAAA,oBAAsCG;AAA2B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["menuListContext.
|
1
|
+
{"version":3,"sources":["menuListContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { SelectableHandler } from '../selectable/index';\nimport type { MenuCheckedValueChangeData, MenuCheckedValueChangeEvent, MenuListProps } from '../components/index';\n\nexport const MenuListContext: Context<MenuListContextValue> = createContext<MenuListContextValue | undefined>(\n undefined,\n) as Context<MenuListContextValue>;\n\nconst menuListContextDefaultValue: MenuListContextValue = {\n checkedValues: {},\n setFocusByFirstCharacter: () => null,\n toggleCheckbox: () => null,\n selectRadio: () => null,\n hasIcons: false,\n hasCheckmarks: false,\n};\n\n/**\n * Context shared between MenuList and its children components\n */\nexport type MenuListContextValue = Pick<MenuListProps, 'checkedValues' | 'hasIcons' | 'hasCheckmarks'> & {\n setFocusByFirstCharacter?: (e: React.KeyboardEvent<HTMLElement>, itemEl: HTMLElement) => void;\n toggleCheckbox?: SelectableHandler;\n selectRadio?: SelectableHandler;\n /**\n * Callback when checked items change for value with a name\n *\n * @param event - React's original SyntheticEvent\n * @param data - A data object with relevant information\n *\n * @deprecated this property is not used internally anymore,\n * the signature remains just to avoid breaking changes\n */\n onCheckedValueChange?: (e: MenuCheckedValueChangeEvent, data: MenuCheckedValueChangeData) => void;\n};\n\nexport const MenuListProvider = MenuListContext.Provider;\n\nexport const useMenuListContext_unstable = <T,>(selector: ContextSelector<MenuListContextValue, T>) =>\n useContextSelector(MenuListContext, (ctx = menuListContextDefaultValue) => selector(ctx));\n"],"names":["MenuListContext","MenuListProvider","useMenuListContext_unstable","createContext","undefined","menuListContextDefaultValue","checkedValues","setFocusByFirstCharacter","toggleCheckbox","selectRadio","hasIcons","hasCheckmarks","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,eAAAA;eAAAA;;IAgCAC,gBAAAA;eAAAA;;IAEAC,2BAAAA;eAAAA;;;;iEAxCU;sCAC2B;AAK3C,MAAMF,kBAAiDG,IAAAA,mCAAAA,EAC5DC;AAGF,MAAMC,8BAAoD;IACxDC,eAAe,CAAC;IAChBC,0BAA0B,IAAM;IAChCC,gBAAgB,IAAM;IACtBC,aAAa,IAAM;IACnBC,UAAU;IACVC,eAAe;AACjB;AAqBO,MAAMV,mBAAmBD,gBAAgBY,QAAQ;AAEjD,MAAMV,8BAA8B,CAAKW,WAC9CC,IAAAA,wCAAAA,EAAmBd,iBAAiB,CAACe,MAAMV,2BAA2B,GAAKQ,SAASE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["menuTriggerContext.
|
1
|
+
{"version":3,"sources":["menuTriggerContext.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Context used communicate with a child menu item that it is a trigger for a submenu\n */\nconst MenuTriggerContext = React.createContext<boolean | undefined>(undefined) as React.Context<boolean>;\n\nconst menuTriggerContextDefaultValue = false;\n\nexport const MenuTriggerContextProvider = MenuTriggerContext.Provider;\nexport const useMenuTriggerContext_unstable = () =>\n React.useContext(MenuTriggerContext) ?? menuTriggerContextDefaultValue;\n"],"names":["MenuTriggerContextProvider","useMenuTriggerContext_unstable","MenuTriggerContext","React","createContext","undefined","menuTriggerContextDefaultValue","Provider","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IASaA,0BAAAA;eAAAA;;IACAC,8BAAAA;eAAAA;;;;iEAVU;AAEvB;;CAEC,GACD,MAAMC,mCAAqBC,OAAMC,aAAa,CAAsBC;AAEpE,MAAMC,iCAAiC;AAEhC,MAAMN,6BAA6BE,mBAAmBK,QAAQ;AAC9D,MAAMN,iCAAiC;QAC5CE;WAAAA,CAAAA,oBAAAA,OAAMK,UAAU,CAACN,mBAAAA,MAAAA,QAAjBC,sBAAAA,KAAAA,IAAAA,oBAAwCG;AAA6B"}
|
package/lib-commonjs/index.js
CHANGED
@@ -9,113 +9,167 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
|
13
|
-
return
|
12
|
+
MENU_ENTER_EVENT: function() {
|
13
|
+
return _utils.MENU_ENTER_EVENT;
|
14
14
|
},
|
15
|
-
|
16
|
-
return
|
15
|
+
Menu: function() {
|
16
|
+
return _Menu.Menu;
|
17
17
|
},
|
18
|
-
|
19
|
-
return
|
18
|
+
MenuDivider: function() {
|
19
|
+
return _MenuDivider.MenuDivider;
|
20
20
|
},
|
21
|
-
|
22
|
-
return
|
21
|
+
MenuGroup: function() {
|
22
|
+
return _MenuGroup.MenuGroup;
|
23
23
|
},
|
24
24
|
MenuGroupContextProvider: function() {
|
25
25
|
return _menuGroupContext.MenuGroupContextProvider;
|
26
26
|
},
|
27
|
-
|
28
|
-
return
|
27
|
+
MenuGroupHeader: function() {
|
28
|
+
return _MenuGroupHeader.MenuGroupHeader;
|
29
|
+
},
|
30
|
+
MenuItem: function() {
|
31
|
+
return _MenuItem.MenuItem;
|
32
|
+
},
|
33
|
+
MenuItemCheckbox: function() {
|
34
|
+
return _MenuItemCheckbox.MenuItemCheckbox;
|
35
|
+
},
|
36
|
+
MenuItemLink: function() {
|
37
|
+
return _MenuItemLink.MenuItemLink;
|
38
|
+
},
|
39
|
+
MenuItemRadio: function() {
|
40
|
+
return _MenuItemRadio.MenuItemRadio;
|
41
|
+
},
|
42
|
+
MenuItemSwitch: function() {
|
43
|
+
return _MenuItemSwitch.MenuItemSwitch;
|
44
|
+
},
|
45
|
+
MenuList: function() {
|
46
|
+
return _MenuList.MenuList;
|
29
47
|
},
|
30
48
|
MenuListProvider: function() {
|
31
49
|
return _menuListContext.MenuListProvider;
|
32
50
|
},
|
33
|
-
|
34
|
-
return
|
51
|
+
MenuPopover: function() {
|
52
|
+
return _MenuPopover.MenuPopover;
|
35
53
|
},
|
36
|
-
|
37
|
-
return
|
54
|
+
MenuProvider: function() {
|
55
|
+
return _menuContext.MenuProvider;
|
38
56
|
},
|
39
|
-
|
40
|
-
return
|
57
|
+
MenuSplitGroup: function() {
|
58
|
+
return _MenuSplitGroup.MenuSplitGroup;
|
41
59
|
},
|
42
|
-
|
43
|
-
return
|
60
|
+
MenuTrigger: function() {
|
61
|
+
return _MenuTrigger.MenuTrigger;
|
44
62
|
},
|
45
|
-
|
46
|
-
return
|
63
|
+
MenuTriggerContextProvider: function() {
|
64
|
+
return _menuTriggerContext.MenuTriggerContextProvider;
|
47
65
|
},
|
48
|
-
|
49
|
-
return
|
66
|
+
dispatchMenuEnterEvent: function() {
|
67
|
+
return _utils.dispatchMenuEnterEvent;
|
50
68
|
},
|
51
69
|
menuDividerClassNames: function() {
|
52
70
|
return _MenuDivider.menuDividerClassNames;
|
53
71
|
},
|
54
|
-
|
55
|
-
return
|
72
|
+
menuGroupClassNames: function() {
|
73
|
+
return _MenuGroup.menuGroupClassNames;
|
56
74
|
},
|
57
|
-
|
58
|
-
return
|
75
|
+
menuGroupHeaderClassNames: function() {
|
76
|
+
return _MenuGroupHeader.menuGroupHeaderClassNames;
|
59
77
|
},
|
60
|
-
|
61
|
-
return
|
78
|
+
menuItemCheckboxClassNames: function() {
|
79
|
+
return _MenuItemCheckbox.menuItemCheckboxClassNames;
|
62
80
|
},
|
63
|
-
|
64
|
-
return
|
81
|
+
menuItemClassNames: function() {
|
82
|
+
return _MenuItem.menuItemClassNames;
|
65
83
|
},
|
66
|
-
|
67
|
-
return
|
84
|
+
menuItemLinkClassNames: function() {
|
85
|
+
return _MenuItemLink.menuItemLinkClassNames;
|
68
86
|
},
|
69
|
-
|
70
|
-
return
|
87
|
+
menuItemRadioClassNames: function() {
|
88
|
+
return _MenuItemRadio.menuItemRadioClassNames;
|
71
89
|
},
|
72
|
-
|
73
|
-
return
|
90
|
+
menuItemSwitchClassNames: function() {
|
91
|
+
return _MenuItemSwitch.menuItemSwitchClassNames;
|
74
92
|
},
|
75
|
-
|
76
|
-
return
|
93
|
+
menuListClassNames: function() {
|
94
|
+
return _MenuList.menuListClassNames;
|
77
95
|
},
|
78
|
-
|
79
|
-
return
|
96
|
+
menuPopoverClassNames: function() {
|
97
|
+
return _MenuPopover.menuPopoverClassNames;
|
80
98
|
},
|
81
|
-
|
82
|
-
return
|
99
|
+
menuSplitGroupClassNames: function() {
|
100
|
+
return _MenuSplitGroup.menuSplitGroupClassNames;
|
83
101
|
},
|
84
|
-
|
85
|
-
return
|
102
|
+
renderMenuDivider_unstable: function() {
|
103
|
+
return _MenuDivider.renderMenuDivider_unstable;
|
86
104
|
},
|
87
105
|
renderMenuGroupHeader_unstable: function() {
|
88
106
|
return _MenuGroupHeader.renderMenuGroupHeader_unstable;
|
89
107
|
},
|
90
|
-
|
91
|
-
return
|
108
|
+
renderMenuGroup_unstable: function() {
|
109
|
+
return _MenuGroup.renderMenuGroup_unstable;
|
92
110
|
},
|
93
|
-
|
94
|
-
return
|
111
|
+
renderMenuItemCheckbox_unstable: function() {
|
112
|
+
return _MenuItemCheckbox.renderMenuItemCheckbox_unstable;
|
95
113
|
},
|
96
|
-
|
97
|
-
return
|
114
|
+
renderMenuItemLink_unstable: function() {
|
115
|
+
return _MenuItemLink.renderMenuItemLink_unstable;
|
98
116
|
},
|
99
|
-
|
100
|
-
return
|
117
|
+
renderMenuItemRadio_unstable: function() {
|
118
|
+
return _MenuItemRadio.renderMenuItemRadio_unstable;
|
119
|
+
},
|
120
|
+
renderMenuItemSwitch_unstable: function() {
|
121
|
+
return _MenuItemSwitch.renderMenuItemSwitch_unstable;
|
101
122
|
},
|
102
123
|
renderMenuItem_unstable: function() {
|
103
124
|
return _MenuItem.renderMenuItem_unstable;
|
104
125
|
},
|
105
|
-
|
106
|
-
return
|
126
|
+
renderMenuList_unstable: function() {
|
127
|
+
return _MenuList.renderMenuList_unstable;
|
107
128
|
},
|
108
|
-
|
109
|
-
return
|
129
|
+
renderMenuPopover_unstable: function() {
|
130
|
+
return _MenuPopover.renderMenuPopover_unstable;
|
110
131
|
},
|
111
|
-
|
112
|
-
return
|
132
|
+
renderMenuSplitGroup_unstable: function() {
|
133
|
+
return _MenuSplitGroup.renderMenuSplitGroup_unstable;
|
113
134
|
},
|
114
|
-
|
115
|
-
return
|
135
|
+
renderMenuTrigger_unstable: function() {
|
136
|
+
return _MenuTrigger.renderMenuTrigger_unstable;
|
116
137
|
},
|
117
|
-
|
118
|
-
return
|
138
|
+
renderMenu_unstable: function() {
|
139
|
+
return _Menu.renderMenu_unstable;
|
140
|
+
},
|
141
|
+
useCheckmarkStyles_unstable: function() {
|
142
|
+
return _index.useCheckmarkStyles_unstable;
|
143
|
+
},
|
144
|
+
useMenuContextValues_unstable: function() {
|
145
|
+
return _Menu.useMenuContextValues_unstable;
|
146
|
+
},
|
147
|
+
useMenuContext_unstable: function() {
|
148
|
+
return _menuContext.useMenuContext_unstable;
|
149
|
+
},
|
150
|
+
useMenuDividerStyles_unstable: function() {
|
151
|
+
return _MenuDivider.useMenuDividerStyles_unstable;
|
152
|
+
},
|
153
|
+
useMenuDivider_unstable: function() {
|
154
|
+
return _MenuDivider.useMenuDivider_unstable;
|
155
|
+
},
|
156
|
+
useMenuGroupContextValues_unstable: function() {
|
157
|
+
return _MenuGroup.useMenuGroupContextValues_unstable;
|
158
|
+
},
|
159
|
+
useMenuGroupContext_unstable: function() {
|
160
|
+
return _menuGroupContext.useMenuGroupContext_unstable;
|
161
|
+
},
|
162
|
+
useMenuGroupHeaderStyles_unstable: function() {
|
163
|
+
return _MenuGroupHeader.useMenuGroupHeaderStyles_unstable;
|
164
|
+
},
|
165
|
+
useMenuGroupHeader_unstable: function() {
|
166
|
+
return _MenuGroupHeader.useMenuGroupHeader_unstable;
|
167
|
+
},
|
168
|
+
useMenuGroupStyles_unstable: function() {
|
169
|
+
return _MenuGroup.useMenuGroupStyles_unstable;
|
170
|
+
},
|
171
|
+
useMenuGroup_unstable: function() {
|
172
|
+
return _MenuGroup.useMenuGroup_unstable;
|
119
173
|
},
|
120
174
|
useMenuItemCheckboxStyles_unstable: function() {
|
121
175
|
return _MenuItemCheckbox.useMenuItemCheckboxStyles_unstable;
|
@@ -123,14 +177,11 @@ _export(exports, {
|
|
123
177
|
useMenuItemCheckbox_unstable: function() {
|
124
178
|
return _MenuItemCheckbox.useMenuItemCheckbox_unstable;
|
125
179
|
},
|
126
|
-
|
127
|
-
return
|
128
|
-
},
|
129
|
-
menuItemRadioClassNames: function() {
|
130
|
-
return _MenuItemRadio.menuItemRadioClassNames;
|
180
|
+
useMenuItemLinkStyles_unstable: function() {
|
181
|
+
return _MenuItemLink.useMenuItemLinkStyles_unstable;
|
131
182
|
},
|
132
|
-
|
133
|
-
return
|
183
|
+
useMenuItemLink_unstable: function() {
|
184
|
+
return _MenuItemLink.useMenuItemLink_unstable;
|
134
185
|
},
|
135
186
|
useMenuItemRadioStyles_unstable: function() {
|
136
187
|
return _MenuItemRadio.useMenuItemRadioStyles_unstable;
|
@@ -138,104 +189,53 @@ _export(exports, {
|
|
138
189
|
useMenuItemRadio_unstable: function() {
|
139
190
|
return _MenuItemRadio.useMenuItemRadio_unstable;
|
140
191
|
},
|
141
|
-
|
142
|
-
return
|
192
|
+
useMenuItemStyles_unstable: function() {
|
193
|
+
return _MenuItem.useMenuItemStyles_unstable;
|
143
194
|
},
|
144
|
-
|
145
|
-
return
|
195
|
+
useMenuItemSwitchStyles_unstable: function() {
|
196
|
+
return _MenuItemSwitch.useMenuItemSwitchStyles_unstable;
|
146
197
|
},
|
147
|
-
|
148
|
-
return
|
198
|
+
useMenuItemSwitch_unstable: function() {
|
199
|
+
return _MenuItemSwitch.useMenuItemSwitch_unstable;
|
200
|
+
},
|
201
|
+
useMenuItem_unstable: function() {
|
202
|
+
return _MenuItem.useMenuItem_unstable;
|
149
203
|
},
|
150
204
|
useMenuListContextValues_unstable: function() {
|
151
205
|
return _MenuList.useMenuListContextValues_unstable;
|
152
206
|
},
|
207
|
+
useMenuListContext_unstable: function() {
|
208
|
+
return _menuListContext.useMenuListContext_unstable;
|
209
|
+
},
|
153
210
|
useMenuListStyles_unstable: function() {
|
154
211
|
return _MenuList.useMenuListStyles_unstable;
|
155
212
|
},
|
156
213
|
useMenuList_unstable: function() {
|
157
214
|
return _MenuList.useMenuList_unstable;
|
158
215
|
},
|
159
|
-
MenuPopover: function() {
|
160
|
-
return _MenuPopover.MenuPopover;
|
161
|
-
},
|
162
|
-
menuPopoverClassNames: function() {
|
163
|
-
return _MenuPopover.menuPopoverClassNames;
|
164
|
-
},
|
165
|
-
renderMenuPopover_unstable: function() {
|
166
|
-
return _MenuPopover.renderMenuPopover_unstable;
|
167
|
-
},
|
168
216
|
useMenuPopoverStyles_unstable: function() {
|
169
217
|
return _MenuPopover.useMenuPopoverStyles_unstable;
|
170
218
|
},
|
171
219
|
useMenuPopover_unstable: function() {
|
172
220
|
return _MenuPopover.useMenuPopover_unstable;
|
173
221
|
},
|
174
|
-
MenuSplitGroup: function() {
|
175
|
-
return _MenuSplitGroup.MenuSplitGroup;
|
176
|
-
},
|
177
|
-
menuSplitGroupClassNames: function() {
|
178
|
-
return _MenuSplitGroup.menuSplitGroupClassNames;
|
179
|
-
},
|
180
|
-
renderMenuSplitGroup_unstable: function() {
|
181
|
-
return _MenuSplitGroup.renderMenuSplitGroup_unstable;
|
182
|
-
},
|
183
222
|
useMenuSplitGroupStyles_unstable: function() {
|
184
223
|
return _MenuSplitGroup.useMenuSplitGroupStyles_unstable;
|
185
224
|
},
|
186
225
|
useMenuSplitGroup_unstable: function() {
|
187
226
|
return _MenuSplitGroup.useMenuSplitGroup_unstable;
|
188
227
|
},
|
189
|
-
|
190
|
-
return
|
191
|
-
},
|
192
|
-
renderMenuTrigger_unstable: function() {
|
193
|
-
return _MenuTrigger.renderMenuTrigger_unstable;
|
228
|
+
useMenuTriggerContext_unstable: function() {
|
229
|
+
return _menuTriggerContext.useMenuTriggerContext_unstable;
|
194
230
|
},
|
195
231
|
useMenuTrigger_unstable: function() {
|
196
232
|
return _MenuTrigger.useMenuTrigger_unstable;
|
197
233
|
},
|
198
|
-
|
199
|
-
return
|
200
|
-
},
|
201
|
-
MenuItemLink: function() {
|
202
|
-
return _MenuItemLink.MenuItemLink;
|
203
|
-
},
|
204
|
-
menuItemLinkClassNames: function() {
|
205
|
-
return _MenuItemLink.menuItemLinkClassNames;
|
206
|
-
},
|
207
|
-
renderMenuItemLink_unstable: function() {
|
208
|
-
return _MenuItemLink.renderMenuItemLink_unstable;
|
209
|
-
},
|
210
|
-
useMenuItemLinkStyles_unstable: function() {
|
211
|
-
return _MenuItemLink.useMenuItemLinkStyles_unstable;
|
212
|
-
},
|
213
|
-
useMenuItemLink_unstable: function() {
|
214
|
-
return _MenuItemLink.useMenuItemLink_unstable;
|
215
|
-
},
|
216
|
-
MENU_ENTER_EVENT: function() {
|
217
|
-
return _utils.MENU_ENTER_EVENT;
|
218
|
-
},
|
219
|
-
dispatchMenuEnterEvent: function() {
|
220
|
-
return _utils.dispatchMenuEnterEvent;
|
234
|
+
useMenu_unstable: function() {
|
235
|
+
return _Menu.useMenu_unstable;
|
221
236
|
},
|
222
237
|
useOnMenuMouseEnter: function() {
|
223
238
|
return _utils.useOnMenuMouseEnter;
|
224
|
-
},
|
225
|
-
MenuItemSwitch: function() {
|
226
|
-
return _MenuItemSwitch.MenuItemSwitch;
|
227
|
-
},
|
228
|
-
useMenuItemSwitch_unstable: function() {
|
229
|
-
return _MenuItemSwitch.useMenuItemSwitch_unstable;
|
230
|
-
},
|
231
|
-
useMenuItemSwitchStyles_unstable: function() {
|
232
|
-
return _MenuItemSwitch.useMenuItemSwitchStyles_unstable;
|
233
|
-
},
|
234
|
-
renderMenuItemSwitch_unstable: function() {
|
235
|
-
return _MenuItemSwitch.renderMenuItemSwitch_unstable;
|
236
|
-
},
|
237
|
-
menuItemSwitchClassNames: function() {
|
238
|
-
return _MenuItemSwitch.menuItemSwitchClassNames;
|
239
239
|
}
|
240
240
|
});
|
241
241
|
const _menuContext = require("./contexts/menuContext");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { MenuProvider, useMenuContext_unstable } from './contexts/menuContext';\nexport type { MenuContextValue } from './contexts/menuContext';\nexport { MenuTriggerContextProvider, useMenuTriggerContext_unstable } from './contexts/menuTriggerContext';\nexport { MenuGroupContextProvider, useMenuGroupContext_unstable } from './contexts/menuGroupContext';\nexport type { MenuGroupContextValue } from './contexts/menuGroupContext';\nexport { MenuListProvider, useMenuListContext_unstable } from './contexts/menuListContext';\nexport type { MenuListContextValue } from './contexts/menuListContext';\n\nexport { Menu, renderMenu_unstable, useMenuContextValues_unstable, useMenu_unstable } from './Menu';\nexport type {\n MenuContextValues,\n MenuOpenChangeData,\n MenuOpenEvent,\n // MenuOpenEvents is deprecated but removing it would be a breaking change\n // eslint-disable-next-line deprecation/deprecation\n MenuOpenEvents,\n MenuProps,\n MenuSlots,\n MenuState,\n} from './Menu';\nexport {\n MenuDivider,\n menuDividerClassNames,\n renderMenuDivider_unstable,\n useMenuDividerStyles_unstable,\n useMenuDivider_unstable,\n} from './MenuDivider';\nexport type { MenuDividerProps, MenuDividerSlots, MenuDividerState } from './MenuDivider';\nexport {\n MenuGroup,\n menuGroupClassNames,\n renderMenuGroup_unstable,\n useMenuGroupContextValues_unstable,\n useMenuGroupStyles_unstable,\n useMenuGroup_unstable,\n} from './MenuGroup';\nexport type { MenuGroupContextValues, MenuGroupProps, MenuGroupSlots, MenuGroupState } from './MenuGroup';\nexport {\n MenuGroupHeader,\n menuGroupHeaderClassNames,\n renderMenuGroupHeader_unstable,\n useMenuGroupHeaderStyles_unstable,\n useMenuGroupHeader_unstable,\n} from './MenuGroupHeader';\nexport type { MenuGroupHeaderProps, MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader';\nexport {\n MenuItem,\n menuItemClassNames,\n renderMenuItem_unstable,\n useMenuItemStyles_unstable,\n useMenuItem_unstable,\n} from './MenuItem';\nexport type { MenuItemProps, MenuItemSlots, MenuItemState } from './MenuItem';\nexport {\n MenuItemCheckbox,\n menuItemCheckboxClassNames,\n renderMenuItemCheckbox_unstable,\n useMenuItemCheckboxStyles_unstable,\n useMenuItemCheckbox_unstable,\n} from './MenuItemCheckbox';\nexport type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox';\nexport {\n MenuItemRadio,\n menuItemRadioClassNames,\n renderMenuItemRadio_unstable,\n useMenuItemRadioStyles_unstable,\n useMenuItemRadio_unstable,\n} from './MenuItemRadio';\nexport type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio';\nexport {\n MenuList,\n menuListClassNames,\n renderMenuList_unstable,\n useMenuListContextValues_unstable,\n useMenuListStyles_unstable,\n useMenuList_unstable,\n} from './MenuList';\nexport type {\n MenuCheckedValueChangeData,\n MenuCheckedValueChangeEvent,\n MenuListContextValues,\n MenuListProps,\n MenuListSlots,\n MenuListState,\n // UninitializedMenuListState is deprecated but removing it would be a breaking change\n // eslint-disable-next-line deprecation/deprecation\n UninitializedMenuListState,\n} from './MenuList';\nexport {\n MenuPopover,\n menuPopoverClassNames,\n renderMenuPopover_unstable,\n useMenuPopoverStyles_unstable,\n useMenuPopover_unstable,\n} from './MenuPopover';\nexport type { MenuPopoverProps, MenuPopoverSlots, MenuPopoverState } from './MenuPopover';\nexport {\n MenuSplitGroup,\n menuSplitGroupClassNames,\n renderMenuSplitGroup_unstable,\n useMenuSplitGroupStyles_unstable,\n useMenuSplitGroup_unstable,\n} from './MenuSplitGroup';\nexport type { MenuSplitGroupProps, MenuSplitGroupSlots, MenuSplitGroupState } from './MenuSplitGroup';\nexport { MenuTrigger, renderMenuTrigger_unstable, useMenuTrigger_unstable } from './MenuTrigger';\nexport type { MenuTriggerChildProps, MenuTriggerProps, MenuTriggerState } from './MenuTrigger';\n\nexport { useCheckmarkStyles_unstable } from './selectable/index';\nexport type { MenuItemSelectableProps, MenuItemSelectableState, SelectableHandler } from './selectable/index';\n\nexport {\n MenuItemLink,\n menuItemLinkClassNames,\n renderMenuItemLink_unstable,\n useMenuItemLinkStyles_unstable,\n useMenuItemLink_unstable,\n} from './MenuItemLink';\nexport type { MenuItemLinkProps, MenuItemLinkSlots, MenuItemLinkState } from './MenuItemLink';\n\nexport { MENU_ENTER_EVENT, dispatchMenuEnterEvent, useOnMenuMouseEnter } from './utils';\nexport {\n MenuItemSwitch,\n useMenuItemSwitch_unstable,\n useMenuItemSwitchStyles_unstable,\n renderMenuItemSwitch_unstable,\n menuItemSwitchClassNames,\n} from './MenuItemSwitch';\n\nexport type { MenuItemSwitchProps, MenuItemSwitchState, MenuItemSwitchSlots } from './MenuItemSwitch';\n"],"names":["MENU_ENTER_EVENT","Menu","MenuDivider","MenuGroup","MenuGroupContextProvider","MenuGroupHeader","MenuItem","MenuItemCheckbox","MenuItemLink","MenuItemRadio","MenuItemSwitch","MenuList","MenuListProvider","MenuPopover","MenuProvider","MenuSplitGroup","MenuTrigger","MenuTriggerContextProvider","dispatchMenuEnterEvent","menuDividerClassNames","menuGroupClassNames","menuGroupHeaderClassNames","menuItemCheckboxClassNames","menuItemClassNames","menuItemLinkClassNames","menuItemRadioClassNames","menuItemSwitchClassNames","menuListClassNames","menuPopoverClassNames","menuSplitGroupClassNames","renderMenuDivider_unstable","renderMenuGroupHeader_unstable","renderMenuGroup_unstable","renderMenuItemCheckbox_unstable","renderMenuItemLink_unstable","renderMenuItemRadio_unstable","renderMenuItemSwitch_unstable","renderMenuItem_unstable","renderMenuList_unstable","renderMenuPopover_unstable","renderMenuSplitGroup_unstable","renderMenuTrigger_unstable","renderMenu_unstable","useCheckmarkStyles_unstable","useMenuContextValues_unstable","useMenuContext_unstable","useMenuDividerStyles_unstable","useMenuDivider_unstable","useMenuGroupContextValues_unstable","useMenuGroupContext_unstable","useMenuGroupHeaderStyles_unstable","useMenuGroupHeader_unstable","useMenuGroupStyles_unstable","useMenuGroup_unstable","useMenuItemCheckboxStyles_unstable","useMenuItemCheckbox_unstable","useMenuItemLinkStyles_unstable","useMenuItemLink_unstable","useMenuItemRadioStyles_unstable","useMenuItemRadio_unstable","useMenuItemStyles_unstable","useMenuItemSwitchStyles_unstable","useMenuItemSwitch_unstable","useMenuItem_unstable","useMenuListContextValues_unstable","useMenuListContext_unstable","useMenuListStyles_unstable","useMenuList_unstable","useMenuPopoverStyles_unstable","useMenuPopover_unstable","useMenuSplitGroupStyles_unstable","useMenuSplitGroup_unstable","useMenuTriggerContext_unstable","useMenuTrigger_unstable","useMenu_unstable","useOnMenuMouseEnter"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './useCheckmarkStyles.styles';\nexport * from './types';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["types.
|
1
|
+
{"version":3,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type SelectableHandler = (\n e: React.MouseEvent | React.KeyboardEvent,\n name: string,\n value: string,\n checked: boolean,\n) => void;\n\n/**\n * Props for selecatble menu items\n */\nexport type MenuItemSelectableProps = {\n /**\n * Follows input convention\n * https://www.w3schools.com/jsref/prop_checkbox_name.asp\n */\n name: string;\n\n /**\n * Follows input convention\n * https://www.w3schools.com/jsref/prop_checkbox_value.asp\n */\n value: string;\n};\n\n/**\n * State for selectable menu items\n */\nexport type MenuItemSelectableState = MenuItemSelectableProps & {\n /**\n * Selectable is checked\n */\n checked: boolean;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCheckmarkStyles.styles.js"],"sourcesContent":["import { mergeClasses,
|
1
|
+
{"version":3,"sources":["useCheckmarkStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nconst useStyles = makeStyles({\n root: {\n width: '16px',\n height: '16px',\n visibility: 'hidden'\n },\n rootChecked: {\n visibility: 'visible'\n }\n});\n/**\n * Applies styles to a checkmark slot for selectable menu items\n *\n * @param state - should contain a `checkmark` slot\n */ export const useCheckmarkStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n if (state.checkmark) {\n state.checkmark.className = mergeClasses(styles.root, state.checked && styles.rootChecked, state.checkmark.className);\n }\n};\n"],"names":["useCheckmarkStyles_unstable","useStyles","__styles","root","a9b677","Bqenvij","Bcdw1i0","rootChecked","d","state","styles","checkmark","className","mergeClasses","checked"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeiBA;;;eAAAA;;;uBAfwB;AACzC,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAC,aAAA;QAAAD,SAAA;IAAA;AAAA,GAAA;IAAAE,GAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAcP,MAAMR,8BAA+BS,CAAAA;IAC5C;IACA,MAAMC,SAAST;IACf,IAAIQ,MAAME,SAAS,EAAE;QACjBF,MAAME,SAAS,CAACC,SAAS,GAAGC,IAAAA,mBAAY,EAACH,OAAOP,IAAI,EAAEM,MAAMK,OAAO,IAAIJ,OAAOH,WAAW,EAAEE,MAAME,SAAS,CAACC,SAAS;IACxH;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './useOnMenuEnter';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useIsSubmenu.
|
1
|
+
{"version":3,"sources":["useIsSubmenu.ts"],"sourcesContent":["import { useHasParentContext } from '@fluentui/react-context-selector';\nimport { useMenuContext_unstable } from '../contexts/menuContext';\nimport { MenuListContext } from '../contexts/menuListContext';\n\n/**\n * A component can be a part of a submenu whether its menu context `isSubmenu` flag is true\n * or whether it is a part of a `MenuList`\n *\n * A simple hook to check box contexts easily\n *\n * @returns whether the component is part of a submenu\n */\nexport function useIsSubmenu() {\n const menuContextValue = useMenuContext_unstable(context => context.isSubmenu);\n const hasMenuListContext = useHasParentContext(MenuListContext);\n\n return menuContextValue || hasMenuListContext;\n}\n"],"names":["useIsSubmenu","menuContextValue","useMenuContext_unstable","context","isSubmenu","hasMenuListContext","useHasParentContext","MenuListContext"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAYgBA;;;eAAAA;;;sCAZoB;6BACI;iCACR;AAUzB,SAASA;IACd,MAAMC,mBAAmBC,IAAAA,oCAAAA,EAAwBC,CAAAA,UAAWA,QAAQC,SAAS;IAC7E,MAAMC,qBAAqBC,IAAAA,yCAAAA,EAAoBC,gCAAAA;IAE/C,OAAON,oBAAoBI;AAC7B"}
|
@@ -12,11 +12,11 @@ _export(exports, {
|
|
12
12
|
MENU_ENTER_EVENT: function() {
|
13
13
|
return MENU_ENTER_EVENT;
|
14
14
|
},
|
15
|
-
useOnMenuMouseEnter: function() {
|
16
|
-
return useOnMenuMouseEnter;
|
17
|
-
},
|
18
15
|
dispatchMenuEnterEvent: function() {
|
19
16
|
return dispatchMenuEnterEvent;
|
17
|
+
},
|
18
|
+
useOnMenuMouseEnter: function() {
|
19
|
+
return useOnMenuMouseEnter;
|
20
20
|
}
|
21
21
|
});
|
22
22
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useOnMenuEnter.
|
1
|
+
{"version":3,"sources":["useOnMenuEnter.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback, elementContains } from '@fluentui/react-utilities';\nimport type { UseOnClickOrScrollOutsideOptions } from '@fluentui/react-utilities';\n\n/**\n * Name of the custom event\n */\nexport const MENU_ENTER_EVENT = 'fuimenuenter';\n\n/**\n * This hook works similarly to @see useOnClickOutside\n *\n * Problem: Trying to behave the same as system menus:\n * When the mouse leaves a stack of nested menus the stack should not dismiss.\n * However if the mouse leaves a stack of menus and enters a parent menu all its children menu should dismiss.\n *\n * We don't use the native mouseenter event because it would trigger too many times in the document\n * Instead, dispatch custom DOM event from the menu so that it can bubble\n * Each nested menu can use the listener to check if the event is from a child or parent menu\n */\nexport const useOnMenuMouseEnter = (options: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled } = options;\n\n // Keep mouse event here because this is essentially a custom 'mouseenter' event\n const listener = useEventCallback((ev: MouseEvent) => {\n const popoverRef = refs[0];\n const someMenuPopover = ev.target as HTMLElement;\n\n // someMenu is a child -> will always be contained because of vParents\n // someMenu is a parent -> will always not be contained because no vParent\n // someMenu is the current popover -> it will contain itself\n const isOutsidePopover = !elementContains(popoverRef.current ?? null, someMenuPopover);\n if (isOutsidePopover && !disabled) {\n callback(ev);\n }\n });\n\n React.useEffect(() => {\n // eslint-disable-next-line eqeqeq\n if (element == null) {\n return;\n }\n\n /**\n * Because `addEventListener` type override falls back to 2nd definition (evt name is unknown string literal)\n * evt is being typed as a base class of MouseEvent -> `Event`.\n * This type is used to override `listener` calls to make TS happy\n */\n\n type ListenerOverride = (evt: Event) => void;\n\n if (!disabled) {\n element.addEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n }\n\n return () => {\n element.removeEventListener(MENU_ENTER_EVENT, listener as ListenerOverride);\n };\n }, [listener, element, disabled]);\n};\n\n/**\n * Dispatches the custom MouseEvent enter event. Similar to calling `el.click()`\n * @param el - element for the event target\n * @param nativeEvent - the native mouse event this is mapped to\n */\nexport const dispatchMenuEnterEvent = (el: HTMLElement, nativeEvent: MouseEvent) => {\n el.dispatchEvent(new CustomEvent(MENU_ENTER_EVENT, { bubbles: true, detail: { nativeEvent } }));\n};\n"],"names":["MENU_ENTER_EVENT","dispatchMenuEnterEvent","useOnMenuMouseEnter","options","refs","callback","element","disabled","listener","useEventCallback","ev","popoverRef","someMenuPopover","target","isOutsidePopover","elementContains","current","React","useEffect","addEventListener","removeEventListener","el","nativeEvent","dispatchEvent","CustomEvent","bubbles","detail"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOaA,gBAAAA;eAAAA;;IA2DAC,sBAAAA;eAAAA;;IA9CAC,mBAAAA;eAAAA;;;;iEApBU;gCAC2B;AAM3C,MAAMF,mBAAmB;AAazB,MAAME,sBAAsB,CAACC;IAClC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGJ;IAE9C,gFAAgF;IAChF,MAAMK,WAAWC,IAAAA,gCAAAA,EAAiB,CAACC;QACjC,MAAMC,aAAaP,IAAI,CAAC,EAAE;QAC1B,MAAMQ,kBAAkBF,GAAGG,MAAM;YAKSF;QAH1C,sEAAsE;QACtE,0EAA0E;QAC1E,4DAA4D;QAC5D,MAAMG,mBAAmB,CAACC,IAAAA,+BAAAA,EAAgBJ,CAAAA,sBAAAA,WAAWK,OAAO,AAAPA,MAAO,QAAlBL,wBAAAA,KAAAA,IAAAA,sBAAsB,MAAMC;QACtE,IAAIE,oBAAoB,CAACP,UAAU;YACjCF,SAASK;QACX;IACF;IAEAO,OAAMC,SAAS,CAAC;QACd,kCAAkC;QAClC,IAAIZ,WAAW,MAAM;YACnB;QACF;QAUA,IAAI,CAACC,UAAU;YACbD,QAAQa,gBAAgB,CAACnB,kBAAkBQ;QAC7C;QAEA,OAAO;YACLF,QAAQc,mBAAmB,CAACpB,kBAAkBQ;QAChD;IACF,GAAG;QAACA;QAAUF;QAASC;KAAS;AAClC;AAOO,MAAMN,yBAAyB,CAACoB,IAAiBC;IACtDD,GAAGE,aAAa,CAAC,IAAIC,YAAYxB,kBAAkB;QAAEyB,SAAS;QAAMC,QAAQ;YAAEJ;QAAY;IAAE;AAC9F"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-menu",
|
3
|
-
"version": "9.14.
|
3
|
+
"version": "9.14.10",
|
4
4
|
"description": "Fluent UI menu component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -37,16 +37,16 @@
|
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
39
|
"@fluentui/keyboard-keys": "^9.0.7",
|
40
|
-
"@fluentui/react-aria": "^9.13.
|
41
|
-
"@fluentui/react-context-selector": "^9.1.
|
40
|
+
"@fluentui/react-aria": "^9.13.1",
|
41
|
+
"@fluentui/react-context-selector": "^9.1.64",
|
42
42
|
"@fluentui/react-icons": "^2.0.245",
|
43
|
-
"@fluentui/react-portal": "^9.4.
|
44
|
-
"@fluentui/react-positioning": "^9.15.
|
45
|
-
"@fluentui/react-shared-contexts": "^9.19.
|
46
|
-
"@fluentui/react-tabster": "^9.22.
|
43
|
+
"@fluentui/react-portal": "^9.4.30",
|
44
|
+
"@fluentui/react-positioning": "^9.15.5",
|
45
|
+
"@fluentui/react-shared-contexts": "^9.19.1",
|
46
|
+
"@fluentui/react-tabster": "^9.22.2",
|
47
47
|
"@fluentui/react-theme": "^9.1.19",
|
48
|
-
"@fluentui/react-utilities": "^9.18.
|
49
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
48
|
+
"@fluentui/react-utilities": "^9.18.12",
|
49
|
+
"@fluentui/react-jsx-runtime": "^9.0.41",
|
50
50
|
"@griffel/react": "^1.5.22",
|
51
51
|
"@swc/helpers": "^0.5.1"
|
52
52
|
},
|