@fluentui/react-menu 0.0.0-nightlyf8be6a7c6520220106.1 → 0.0.0-nightlyff78d1e27a20220217.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +204 -33
- package/CHANGELOG.md +47 -16
- package/dist/react-menu.d.ts +73 -80
- 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/MenuItemRadio.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 +6 -6
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/Menu.types.d.ts +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.d.ts +1 -1
- package/lib/components/Menu/renderMenu.js +1 -1
- package/lib/components/Menu/renderMenu.js.map +1 -1
- package/lib/components/Menu/useMenu.d.ts +2 -2
- package/lib/components/Menu/useMenu.js +6 -5
- package/lib/components/Menu/useMenu.js.map +1 -1
- package/lib/components/Menu/useMenuContextValues.d.ts +1 -1
- package/lib/components/Menu/useMenuContextValues.js +1 -1
- package/lib/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.d.ts +1 -1
- package/lib/components/MenuDivider/MenuDivider.js +7 -7
- package/lib/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/MenuDivider.types.d.ts +2 -2
- package/lib/components/MenuDivider/MenuDivider.types.js.map +1 -1
- package/lib/components/MenuDivider/index.js.map +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.d.ts +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js +1 -1
- package/lib/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDivider.d.ts +1 -1
- package/lib/components/MenuDivider/useMenuDivider.js +4 -1
- package/lib/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
- package/lib/components/MenuDivider/useMenuDividerStyles.js +3 -2
- package/lib/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.d.ts +1 -1
- package/lib/components/MenuGroup/MenuGroup.js +9 -9
- package/lib/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/MenuGroup.types.d.ts +3 -3
- package/lib/components/MenuGroup/MenuGroup.types.js.map +1 -1
- package/lib/components/MenuGroup/index.js.map +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.d.ts +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js +1 -1
- package/lib/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroup.d.ts +1 -1
- package/lib/components/MenuGroup/useMenuGroup.js +4 -1
- package/lib/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js +1 -1
- package/lib/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
- package/lib/components/MenuGroup/useMenuGroupStyles.js +2 -2
- package/lib/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js +7 -7
- package/lib/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
- package/lib/components/MenuGroupHeader/MenuGroupHeader.types.js.map +1 -1
- package/lib/components/MenuGroupHeader/index.js.map +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.d.ts +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js +1 -1
- package/lib/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js +6 -3
- package/lib/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +3 -2
- package/lib/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.d.ts +1 -1
- package/lib/components/MenuItem/MenuItem.js +7 -7
- package/lib/components/MenuItem/MenuItem.js.map +1 -1
- package/lib/components/MenuItem/MenuItem.types.d.ts +7 -7
- package/lib/components/MenuItem/MenuItem.types.js.map +1 -1
- package/lib/components/MenuItem/index.js.map +1 -1
- package/lib/components/MenuItem/renderMenuItem.d.ts +1 -1
- package/lib/components/MenuItem/renderMenuItem.js +7 -8
- package/lib/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useCharacterSearch.js +2 -2
- package/lib/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib/components/MenuItem/useMenuItem.d.ts +2 -6
- package/lib/components/MenuItem/useMenuItem.js +10 -15
- package/lib/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.d.ts +1 -1
- package/lib/components/MenuItem/useMenuItemStyles.js +12 -7
- package/lib/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/MenuItemCheckbox.js +7 -7
- 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.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js +6 -7
- package/lib/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
- package/lib/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +6 -6
- package/lib/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
- package/lib/components/MenuItemRadio/MenuItemRadio.js +7 -7
- 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.d.ts +1 -1
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js +6 -7
- package/lib/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadio.js +6 -6
- package/lib/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js +6 -6
- package/lib/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib/components/MenuList/MenuList.d.ts +1 -1
- package/lib/components/MenuList/MenuList.js +9 -9
- package/lib/components/MenuList/MenuList.js.map +1 -1
- package/lib/components/MenuList/MenuList.types.d.ts +4 -4
- package/lib/components/MenuList/MenuList.types.js.map +1 -1
- package/lib/components/MenuList/index.d.ts +1 -1
- package/lib/components/MenuList/index.js +0 -1
- package/lib/components/MenuList/index.js.map +1 -1
- package/lib/components/MenuList/renderMenuList.d.ts +1 -1
- package/lib/components/MenuList/renderMenuList.js +1 -1
- package/lib/components/MenuList/renderMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuList.d.ts +1 -1
- package/lib/components/MenuList/useMenuList.js +11 -8
- package/lib/components/MenuList/useMenuList.js.map +1 -1
- package/lib/components/MenuList/useMenuListContextValues.d.ts +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js +1 -1
- package/lib/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib/components/MenuList/useMenuListStyles.d.ts +1 -1
- package/lib/components/MenuList/useMenuListStyles.js +2 -2
- package/lib/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.js +6 -6
- package/lib/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/MenuPopover.types.d.ts +2 -2
- package/lib/components/MenuPopover/MenuPopover.types.js.map +1 -1
- package/lib/components/MenuPopover/index.js.map +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.d.ts +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js +1 -1
- package/lib/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopover.d.ts +3 -3
- package/lib/components/MenuPopover/useMenuPopover.js +11 -8
- package/lib/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
- package/lib/components/MenuPopover/useMenuPopoverStyles.js +3 -2
- package/lib/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js +6 -6
- package/lib/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +4 -3
- package/lib/components/MenuSplitGroup/MenuSplitGroup.types.js.map +1 -1
- package/lib/components/MenuSplitGroup/index.js.map +1 -1
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.d.ts +1 -1
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js +2 -3
- package/lib/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.d.ts +4 -8
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js +3 -8
- package/lib/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js +3 -2
- package/lib/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.d.ts +2 -1
- package/lib/components/MenuTrigger/MenuTrigger.js +5 -4
- package/lib/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/MenuTrigger.types.d.ts +5 -3
- package/lib/components/MenuTrigger/MenuTrigger.types.js.map +1 -1
- package/lib/components/MenuTrigger/index.js.map +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.d.ts +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js +1 -1
- package/lib/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
- package/lib/components/MenuTrigger/useMenuTrigger.js +167 -5
- package/lib/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/contexts/menuContext.d.ts +1 -1
- package/lib/contexts/menuContext.js +1 -1
- package/lib/contexts/menuContext.js.map +1 -1
- package/lib/contexts/menuGroupContext.d.ts +1 -1
- package/lib/contexts/menuGroupContext.js +1 -1
- package/lib/contexts/menuGroupContext.js.map +1 -1
- package/lib/contexts/menuListContext.d.ts +1 -1
- package/lib/contexts/menuListContext.js +1 -1
- package/lib/contexts/menuListContext.js.map +1 -1
- package/lib/contexts/menuTriggerContext.d.ts +1 -1
- package/lib/contexts/menuTriggerContext.js +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/selectable/useCheckmarkStyles.d.ts +2 -2
- package/lib/selectable/useCheckmarkStyles.js +2 -2
- package/lib/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/useIsSubmenu.js +2 -2
- 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/MenuItemRadio.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 +3 -3
- package/lib-commonjs/components/Menu/Menu.js.map +1 -1
- package/lib-commonjs/components/Menu/Menu.types.d.ts +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.d.ts +1 -1
- package/lib-commonjs/components/Menu/renderMenu.js +3 -3
- package/lib-commonjs/components/Menu/renderMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenu.d.ts +2 -2
- package/lib-commonjs/components/Menu/useMenu.js +7 -6
- package/lib-commonjs/components/Menu/useMenu.js.map +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.d.ts +1 -1
- package/lib-commonjs/components/Menu/useMenuContextValues.js +3 -3
- package/lib-commonjs/components/Menu/useMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.js +4 -4
- package/lib-commonjs/components/MenuDivider/MenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/MenuDivider.types.d.ts +2 -2
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js +3 -3
- package/lib-commonjs/components/MenuDivider/renderMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js +6 -3
- package/lib-commonjs/components/MenuDivider/useMenuDivider.js.map +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js +8 -6
- package/lib-commonjs/components/MenuDivider/useMenuDividerStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.js +5 -5
- package/lib-commonjs/components/MenuGroup/MenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/MenuGroup.types.d.ts +3 -3
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js +3 -3
- package/lib-commonjs/components/MenuGroup/renderMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js +6 -3
- package/lib-commonjs/components/MenuGroup/useMenuGroup.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js +3 -3
- package/lib-commonjs/components/MenuGroup/useMenuGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js +5 -5
- package/lib-commonjs/components/MenuGroup/useMenuGroupStyles.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js +4 -4
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/MenuGroupHeader.types.d.ts +2 -2
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js +3 -3
- package/lib-commonjs/components/MenuGroupHeader/renderMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js +7 -4
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeader.js.map +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js +8 -6
- package/lib-commonjs/components/MenuGroupHeader/useMenuGroupHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.js +4 -4
- package/lib-commonjs/components/MenuItem/MenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/MenuItem.types.d.ts +7 -7
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/renderMenuItem.js +9 -11
- package/lib-commonjs/components/MenuItem/renderMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js +1 -1
- package/lib-commonjs/components/MenuItem/useCharacterSearch.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItem.d.ts +2 -6
- package/lib-commonjs/components/MenuItem/useMenuItem.js +10 -15
- package/lib-commonjs/components/MenuItem/useMenuItem.js.map +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js +20 -14
- package/lib-commonjs/components/MenuItem/useMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/MenuItemCheckbox.js +4 -4
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js +8 -10
- package/lib-commonjs/components/MenuItemCheckbox/renderMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js +6 -6
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckbox.js.map +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js +7 -7
- package/lib-commonjs/components/MenuItemCheckbox/useMenuItemCheckboxStyles.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/MenuItemRadio.js +4 -4
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js +8 -10
- package/lib-commonjs/components/MenuItemRadio/renderMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js +6 -6
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadio.js.map +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js +7 -7
- package/lib-commonjs/components/MenuItemRadio/useMenuItemRadioStyles.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.d.ts +1 -1
- package/lib-commonjs/components/MenuList/MenuList.js +5 -5
- package/lib-commonjs/components/MenuList/MenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/MenuList.types.d.ts +4 -4
- package/lib-commonjs/components/MenuList/MenuList.types.js.map +1 -1
- package/lib-commonjs/components/MenuList/index.d.ts +1 -1
- package/lib-commonjs/components/MenuList/index.js +0 -2
- package/lib-commonjs/components/MenuList/index.js.map +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.d.ts +1 -1
- package/lib-commonjs/components/MenuList/renderMenuList.js +3 -3
- package/lib-commonjs/components/MenuList/renderMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.d.ts +1 -1
- package/lib-commonjs/components/MenuList/useMenuList.js +12 -9
- package/lib-commonjs/components/MenuList/useMenuList.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.d.ts +1 -1
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js +3 -3
- package/lib-commonjs/components/MenuList/useMenuListContextValues.js.map +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuList/useMenuListStyles.js +6 -6
- package/lib-commonjs/components/MenuList/useMenuListStyles.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.js +3 -3
- package/lib-commonjs/components/MenuPopover/MenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/MenuPopover.types.d.ts +2 -2
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js +3 -3
- package/lib-commonjs/components/MenuPopover/renderMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopover.d.ts +3 -3
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js +12 -9
- package/lib-commonjs/components/MenuPopover/useMenuPopover.js.map +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js +8 -6
- package/lib-commonjs/components/MenuPopover/useMenuPopoverStyles.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js +3 -3
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/MenuSplitGroup.types.d.ts +4 -3
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js +4 -6
- package/lib-commonjs/components/MenuSplitGroup/renderMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.d.ts +4 -8
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js +6 -11
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroup.js.map +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.d.ts +1 -1
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js +8 -6
- package/lib-commonjs/components/MenuSplitGroup/useMenuSplitGroupStyles.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.d.ts +2 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js +3 -2
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/MenuTrigger.types.d.ts +5 -3
- 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.d.ts +1 -1
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js +3 -3
- package/lib-commonjs/components/MenuTrigger/renderMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.d.ts +2 -2
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js +176 -7
- package/lib-commonjs/components/MenuTrigger/useMenuTrigger.js.map +1 -1
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/contexts/menuContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuContext.js +3 -3
- package/lib-commonjs/contexts/menuContext.js.map +1 -1
- package/lib-commonjs/contexts/menuGroupContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuGroupContext.js +3 -3
- package/lib-commonjs/contexts/menuGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/menuListContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuListContext.js +3 -3
- package/lib-commonjs/contexts/menuListContext.js.map +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.d.ts +1 -1
- package/lib-commonjs/contexts/menuTriggerContext.js +3 -3
- package/lib-commonjs/contexts/menuTriggerContext.js.map +1 -1
- 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.d.ts +2 -2
- package/lib-commonjs/selectable/useCheckmarkStyles.js +6 -6
- package/lib-commonjs/selectable/useCheckmarkStyles.js.map +1 -1
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js +1 -1
- package/lib-commonjs/utils/useIsSubmenu.js.map +1 -1
- package/lib-commonjs/utils/useOnMenuEnter.js.map +1 -1
- package/package.json +13 -15
- package/lib/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib/components/MenuTrigger/useTriggerElement.js +0 -166
- package/lib/components/MenuTrigger/useTriggerElement.js.map +0 -1
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.d.ts +0 -5
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js +0 -181
- package/lib-commonjs/components/MenuTrigger/useTriggerElement.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Menu/useMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,EAA+B,SAA/B,EAA0C,2BAA1C,QAA6E,6BAA7E;AACA,SAAS,oBAAT,EAA+B,KAA/B,EAAsC,iBAAtC,EAAyD,gBAAzD,QAAiF,2BAAjF;AACA,SAAS,SAAT,QAA0B,iCAA1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,IAAA,uBAAuB,CAAC,OAAxB,GAAkC,KAAlC;AACA,IAAA,kBAAkB,CAAC,OAAnB,GAA6B,KAA7B;AACA,IAAA,eAAe,CAAC,OAAhB,GAA0B,KAA1B;AACD,GAhBD,EAgBG,CAAC,KAAK,CAAC,UAAP,EAAmB,KAAK,CAAC,SAAzB,EAAoC,IAApC,EAA0C,UAA1C,EAAsD,qBAAtD,EAA6E,sBAA7E,CAhBH;AAkBA,SAAO,CAAC,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAA,IAAA,GAAQ,KAAT,EAAgB,OAAhB,CAAP;AACD,CAvID","sourcesContent":["import * as React from 'react';\nimport { usePopperMouseTarget, usePopper, resolvePositioningShorthand } from '@fluentui/react-positioning';\nimport { useControllableState, useId, useOnClickOutside, useEventCallback } from '@fluentui/react-utilities';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { useMenuContext_unstable } from '../../contexts/menuContext';\nimport { MENU_ENTER_EVENT, useOnMenuMouseEnter } from '../../utils/index';\nimport { useIsSubmenu } from '../../utils/useIsSubmenu';\nimport type { MenuOpenChangeData, MenuOpenEvents, MenuProps, MenuState } from './Menu.types';\n\n/**\n * Create the state required to render Menu.\n *\n * The returned state can be modified with hooks such as useMenuStyles,\n * before being passed to renderMenu_unstable.\n *\n * @param props - props from this instance of Menu\n */\nexport const useMenu_unstable = (props: MenuProps): MenuState => {\n const triggerId = useId('menu');\n const isSubmenu = useIsSubmenu();\n const [contextTarget, setContextTarget] = usePopperMouseTarget();\n\n const popperState = {\n position: isSubmenu ? ('after' as const) : ('below' as const),\n align: isSubmenu ? ('top' as const) : ('start' as const),\n target: props.openOnContext ? contextTarget : undefined,\n ...resolvePositioningShorthand(props.positioning),\n };\n\n const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (children.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at least one child');\n }\n\n if (children.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('Menu must contain at most two children');\n }\n }\n\n let menuTrigger: React.ReactElement | undefined = undefined;\n let menuPopover: React.ReactElement | undefined = undefined;\n if (children.length === 2) {\n menuTrigger = children[0];\n menuPopover = children[1];\n } else if (children.length === 1) {\n menuPopover = children[0];\n }\n const { targetRef: triggerRef, containerRef: menuPopoverRef } = usePopper(popperState);\n\n const initialState = {\n hoverDelay: 500,\n triggerId,\n isSubmenu: !!isSubmenu,\n openOnHover: !!isSubmenu,\n contextTarget,\n setContextTarget,\n ...props,\n menuTrigger,\n menuPopover,\n triggerRef,\n menuPopoverRef,\n components: {},\n } as const;\n\n // TODO Better way to narrow types ?\n\n const [open, setOpen] = useMenuOpenState(initialState);\n const [checkedValues, onCheckedValueChange] = useMenuSelectableState(initialState);\n\n return {\n ...initialState,\n open,\n setOpen,\n checkedValues,\n onCheckedValueChange,\n };\n};\n\n/**\n * Adds appropriate state values and handlers for selectable items\n * i.e checkboxes and radios\n */\nconst useMenuSelectableState = (\n state: Pick<MenuProps, 'checkedValues' | 'defaultCheckedValues' | 'onCheckedValueChange'>,\n) => {\n const [checkedValues, setCheckedValues] = useControllableState({\n state: state.checkedValues,\n defaultState: state.defaultCheckedValues,\n initialState: {},\n });\n const { onCheckedValueChange: onCheckedValueChangeOriginal } = state;\n const onCheckedValueChange: MenuState['onCheckedValueChange'] = useEventCallback((e, { name, checkedItems }) => {\n if (onCheckedValueChangeOriginal) {\n onCheckedValueChangeOriginal(e, { name, checkedItems });\n }\n\n setCheckedValues(s => {\n return s ? { ...s, [name]: checkedItems } : { [name]: checkedItems };\n });\n });\n\n return [checkedValues, onCheckedValueChange] as const;\n};\n\nconst useMenuOpenState = (\n state: Pick<MenuState, 'onOpenChange' | 'setContextTarget' | 'triggerRef' | 'menuPopoverRef' | 'isSubmenu'> &\n Pick<MenuProps, 'open' | 'defaultOpen'>,\n) => {\n const { targetDocument } = useFluent();\n const parentSetOpen = useMenuContext_unstable(context => context.setOpen);\n const onOpenChange: MenuState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n const shouldHandleKeyboardRef = React.useRef(false);\n const shouldHandleTabRef = React.useRef(false);\n const pressedShiftRef = React.useRef(false);\n const setOpenTimeout = React.useRef(0);\n const enteringTriggerRef = React.useRef(false);\n\n const [open, setOpenState] = useControllableState({\n state: state.open,\n defaultState: state.defaultOpen,\n initialState: false,\n });\n\n const trySetOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n const event = e instanceof CustomEvent && e.type === MENU_ENTER_EVENT ? e.detail.nativeEvent : e;\n onOpenChange?.(event, { ...data });\n if (data.open && e.type === 'contextmenu') {\n state.setContextTarget(e as React.MouseEvent);\n }\n\n if (!data.open) {\n state.setContextTarget(undefined);\n }\n\n if (data.keyboard) {\n shouldHandleKeyboardRef.current = true;\n shouldHandleTabRef.current = (e as React.KeyboardEvent).key === 'Tab';\n pressedShiftRef.current = (e as React.KeyboardEvent).shiftKey;\n }\n\n if (data.bubble) {\n parentSetOpen(e, { ...data });\n }\n\n setOpenState(data.open);\n });\n\n const setOpen = useEventCallback((e: MenuOpenEvents, data: MenuOpenChangeData) => {\n clearTimeout(setOpenTimeout.current);\n if (!(e instanceof Event) && e.persist) {\n // < React 17 still uses pooled synthetic events\n e.persist();\n }\n\n if (e.type === 'mouseleave' || e.type === 'mouseenter' || e.type === 'mousemove' || e.type === MENU_ENTER_EVENT) {\n if (state.triggerRef.current?.contains(e.target as HTMLElement)) {\n enteringTriggerRef.current = e.type === 'mouseenter' || e.type === 'mousemove';\n }\n\n // FIXME leaking Node timeout type\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n setOpenTimeout.current = setTimeout(() => trySetOpen(e, data), state.hoverDelay);\n } else {\n trySetOpen(e, data);\n }\n });\n\n useOnClickOutside({\n contains: elementContains,\n disabled: !open,\n element: targetDocument,\n refs: [state.menuPopoverRef, state.triggerRef],\n callback: e => setOpen(e, { open: false }),\n });\n useOnMenuMouseEnter({\n element: targetDocument,\n callback: e => {\n // When moving from a menu directly back to its trigger, this handler can close the menu\n // Explicitly check a flag to see if this situation happens\n if (!enteringTriggerRef.current) {\n setOpen(e, { open: false });\n }\n },\n disabled: !open,\n refs: [state.menuPopoverRef],\n });\n\n // Clear timeout on unmount\n // Setting state after a component unmounts can cause memory leaks\n React.useEffect(() => {\n return () => {\n clearTimeout(setOpenTimeout.current);\n };\n }, []);\n\n // Manage focus for open state\n const { findFirstFocusable, findNextFocusable, findPrevFocusable } = useFocusFinders();\n const focusFirst = React.useCallback(() => {\n const firstFocusable = findFirstFocusable(state.menuPopoverRef.current);\n firstFocusable?.focus();\n }, [findFirstFocusable, state.menuPopoverRef]);\n\n const focusAfterMenuTrigger = React.useCallback(() => {\n const nextFocusable = findNextFocusable(state.triggerRef.current);\n nextFocusable?.focus();\n }, [findNextFocusable, state.triggerRef]);\n\n const focusBeforeMenuTrigger = React.useCallback(() => {\n const prevFocusable = findPrevFocusable(state.triggerRef.current);\n prevFocusable?.focus();\n }, [findPrevFocusable, state.triggerRef]);\n\n React.useEffect(() => {\n if (open) {\n focusFirst();\n }\n }, [open, focusFirst]);\n\n React.useEffect(() => {\n if (open) {\n focusFirst();\n }\n\n if (shouldHandleKeyboardRef.current && !open) {\n if (shouldHandleTabRef.current && !state.isSubmenu) {\n pressedShiftRef.current ? focusBeforeMenuTrigger() : focusAfterMenuTrigger();\n } else {\n state.triggerRef.current?.focus();\n }\n }\n\n shouldHandleKeyboardRef.current = false;\n shouldHandleTabRef.current = false;\n pressedShiftRef.current = false;\n }, [state.triggerRef, state.isSubmenu, open, focusFirst, focusAfterMenuTrigger, focusBeforeMenuTrigger]);\n\n return [open ?? false, setOpen] as const;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { MenuContextValues, MenuState } from './Menu.types';
|
2
|
-
export declare function
|
2
|
+
export declare function useMenuContextValues_unstable(state: MenuState): MenuContextValues;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/Menu/useMenuContextValues.ts"],"names":[],"mappings":"AAEA,OAAM,SAAU,6BAAV,CAAwC,KAAxC,EAAwD;AAC5D,QAAM;AACJ,IAAA,IADI;AAEJ,IAAA,OAFI;AAGJ,IAAA,oBAHI;AAIJ,IAAA,aAJI;AAKJ,IAAA,oBALI;AAMJ,IAAA,WANI;AAOJ,IAAA,aAPI;AAQJ,IAAA,UARI;AASJ,IAAA,SATI;AAUJ,IAAA,cAVI;AAWJ,IAAA,SAXI;AAYJ,IAAA,aAZI;AAaJ,IAAA,QAbI;AAcJ,IAAA,kBAdI;AAeJ,IAAA;AAfI,MAgBF,KAhBJ,CAD4D,CAmB5D;;AACA,QAAM,IAAI,GAAG;AACX,IAAA,IADW;AAEX,IAAA,OAFW;AAGX,IAAA,oBAHW;AAIX,IAAA,aAJW;AAKX,IAAA,oBALW;AAMX,IAAA,UANW;AAOX,IAAA,WAPW;AAQX,IAAA,aARW;AASX,IAAA,SATW;AAUX,IAAA,cAVW;AAWX,IAAA,SAXW;AAYX,IAAA,aAZW;AAaX,IAAA,QAbW;AAcX,IAAA,kBAdW;AAeX,IAAA;AAfW,GAAb;AAkBA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD","sourcesContent":["import type { MenuContextValues, MenuState } from './Menu.types';\n\nexport function useMenuContextValues_unstable(state: MenuState): MenuContextValues {\n const {\n open,\n setOpen,\n onCheckedValueChange,\n checkedValues,\n defaultCheckedValues,\n openOnHover,\n openOnContext,\n triggerRef,\n triggerId,\n menuPopoverRef,\n isSubmenu,\n hasCheckmarks,\n hasIcons,\n persistOnItemClick,\n inline,\n } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", these is no sense to memoize it\n const menu = {\n open,\n setOpen,\n onCheckedValueChange,\n checkedValues,\n defaultCheckedValues,\n triggerRef,\n openOnHover,\n openOnContext,\n triggerId,\n menuPopoverRef,\n isSubmenu,\n hasCheckmarks,\n hasIcons,\n persistOnItemClick,\n inline,\n };\n\n return { menu };\n}\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { MenuDividerProps } from './MenuDivider.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
* Define a styled MenuDivider, using the `
|
4
|
+
* Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.
|
5
5
|
*/
|
6
6
|
export declare const MenuDivider: ForwardRefComponent<MenuDividerProps>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useMenuDivider_unstable } from './useMenuDivider';
|
3
|
+
import { useMenuDividerStyles_unstable } from './useMenuDividerStyles';
|
4
|
+
import { renderMenuDivider_unstable } from './renderMenuDivider';
|
5
5
|
/**
|
6
|
-
* Define a styled MenuDivider, using the `
|
6
|
+
* Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const MenuDivider = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
10
|
+
const state = useMenuDivider_unstable(props, ref);
|
11
|
+
useMenuDividerStyles_unstable(state);
|
12
|
+
return renderMenuDivider_unstable(state);
|
13
13
|
});
|
14
14
|
MenuDivider.displayName = 'MenuDivider';
|
15
15
|
//# sourceMappingURL=MenuDivider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuDivider/MenuDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;AACA,EAAA,6BAA6B,CAAC,KAAD,CAA7B;AAEA,SAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useMenuDivider_unstable } from './useMenuDivider';\nimport { useMenuDividerStyles_unstable } from './useMenuDividerStyles';\nimport { renderMenuDivider_unstable } from './renderMenuDivider';\nimport type { MenuDividerProps } from './MenuDivider.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuDivider, using the `useMenuDivider_unstable` hook.\n */\nexport const MenuDivider: ForwardRefComponent<MenuDividerProps> = React.forwardRef((props, ref) => {\n const state = useMenuDivider_unstable(props, ref);\n useMenuDividerStyles_unstable(state);\n\n return renderMenuDivider_unstable(state);\n});\n\nMenuDivider.displayName = 'MenuDivider';\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type MenuDividerSlots = {
|
3
|
-
root:
|
3
|
+
root: Slot<'div'>;
|
4
4
|
};
|
5
5
|
export declare type MenuDividerProps = ComponentProps<MenuDividerSlots>;
|
6
6
|
export declare type MenuDividerState = ComponentState<MenuDividerSlots>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuDivider.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"MenuDivider.types.js","sourceRoot":"../src/","sources":["components/MenuDivider/MenuDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuDividerSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuDividerProps = ComponentProps<MenuDividerSlots>;\n\nexport type MenuDividerState = ComponentState<MenuDividerSlots>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/MenuDivider/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './MenuDivider.types';\nexport * from './MenuDivider';\nexport * from './renderMenuDivider';\nexport * from './useMenuDivider';\nexport * from './useMenuDividerStyles';\n"]}
|
@@ -3,4 +3,4 @@ import { MenuDividerState } from './MenuDivider.types';
|
|
3
3
|
* Redefine the render function to add slots. Reuse the menudivider structure but add
|
4
4
|
* slots to children.
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const renderMenuDivider_unstable: (state: MenuDividerState) => JSX.Element;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuDivider/renderMenuDivider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuDividerSlots, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menudivider structure but add\n * slots to children.\n */\nexport const renderMenuDivider_unstable = (state: MenuDividerState) => {\n const { slots, slotProps } = getSlots<MenuDividerSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
@@ -3,4 +3,4 @@ import type { MenuDividerProps, MenuDividerState } from './MenuDivider.types';
|
|
3
3
|
/**
|
4
4
|
* Given user props, returns state and render function for a MenuDivider.
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useMenuDivider_unstable: (props: MenuDividerProps, ref: React.Ref<HTMLElement>) => MenuDividerState;
|
@@ -3,8 +3,11 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
|
|
3
3
|
* Given user props, returns state and render function for a MenuDivider.
|
4
4
|
*/
|
5
5
|
|
6
|
-
export const
|
6
|
+
export const useMenuDivider_unstable = (props, ref) => {
|
7
7
|
return {
|
8
|
+
components: {
|
9
|
+
root: 'div'
|
10
|
+
},
|
8
11
|
root: getNativeElementProps('div', {
|
9
12
|
role: 'presentation',
|
10
13
|
'aria-hidden': true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuDivider/useMenuDivider.ts"],"names":[],"mappings":"AAAA,SAAS,qBAAT,QAAsC,2BAAtC;AAIA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;AAChH,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,IAAI,EAAE,cAD2B;AAEjC,qBAAe,IAFkB;AAGjC,SAAG,KAH8B;AAIjC,MAAA;AAJiC,KAAR;AAJtB,GAAP;AAWD,CAZM","sourcesContent":["import { getNativeElementProps } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport type { MenuDividerProps, MenuDividerState } from './MenuDivider.types';\n\n/**\n * Given user props, returns state and render function for a MenuDivider.\n */\nexport const useMenuDivider_unstable = (props: MenuDividerProps, ref: React.Ref<HTMLElement>): MenuDividerState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n role: 'presentation',\n 'aria-hidden': true,\n ...props,\n ref,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { MenuDividerState } from './MenuDivider.types';
|
2
2
|
export declare const menuDividerClassName = "fui-MenuDivider";
|
3
|
-
export declare const
|
3
|
+
export declare const useMenuDividerStyles_unstable: (state: MenuDividerState) => MenuDividerState;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { shorthands, mergeClasses, __styles } from '@
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
2
3
|
export const menuDividerClassName = 'fui-MenuDivider';
|
3
4
|
|
4
5
|
const useStyles = /*#__PURE__*/__styles({
|
@@ -15,7 +16,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
15
16
|
"d": [".f1mpe4l3{height:1px;}", ".fvjh0tl{margin-top:4px;}", ".f1rnx978{margin-right:-5px;}", ".f1q7jvqi{margin-left:-5px;}", ".fd1gkq{margin-bottom:4px;}", ".f14z66ap{width:auto;}", ".fn4h89p{background-color:var(--colorNeutralStroke2);}"]
|
16
17
|
});
|
17
18
|
|
18
|
-
export const
|
19
|
+
export const useMenuDividerStyles_unstable = state => {
|
19
20
|
const styles = useStyles();
|
20
21
|
state.root.className = mergeClasses(menuDividerClassName, styles.root, state.root.className);
|
21
22
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuDivider/useMenuDividerStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AASA,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA4B;AACvE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { MenuDividerState } from './MenuDivider.types';\n\nexport const menuDividerClassName = 'fui-MenuDivider';\n\nconst useStyles = makeStyles({\n root: {\n height: '1px',\n ...shorthands.margin('4px', '-5px', '4px', '-5px'),\n width: 'auto',\n backgroundColor: tokens.colorNeutralStroke2,\n },\n});\n\nexport const useMenuDividerStyles_unstable = (state: MenuDividerState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuDividerClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { MenuGroupProps } from './MenuGroup.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
* Define a styled MenuGroup, using the `
|
4
|
+
* Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
|
5
5
|
*/
|
6
6
|
export declare const MenuGroup: ForwardRefComponent<MenuGroupProps>;
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
2
|
+
import { useMenuGroup_unstable } from './useMenuGroup';
|
3
|
+
import { renderMenuGroup_unstable } from './renderMenuGroup';
|
4
|
+
import { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';
|
5
|
+
import { useMenuGroupStyles_unstable } from './useMenuGroupStyles';
|
6
6
|
/**
|
7
|
-
* Define a styled MenuGroup, using the `
|
7
|
+
* Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.
|
8
8
|
*/
|
9
9
|
|
10
10
|
export const MenuGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
11
|
-
const state =
|
12
|
-
const contextValues =
|
13
|
-
|
14
|
-
return
|
11
|
+
const state = useMenuGroup_unstable(props, ref);
|
12
|
+
const contextValues = useMenuGroupContextValues_unstable(state);
|
13
|
+
useMenuGroupStyles_unstable(state);
|
14
|
+
return renderMenuGroup_unstable(state, contextValues);
|
15
15
|
});
|
16
16
|
MenuGroup.displayName = 'MenuGroup';
|
17
17
|
//# sourceMappingURL=MenuGroup.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroup/MenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,kCAAT,QAAmD,6BAAnD;AAGA,SAAS,2BAAT,QAA4C,sBAA5C;AAEA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC5F,QAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;AACA,QAAM,aAAa,GAAG,kCAAkC,CAAC,KAAD,CAAxD;AAEA,EAAA,2BAA2B,CAAC,KAAD,CAA3B;AAEA,SAAO,wBAAwB,CAAC,KAAD,EAAQ,aAAR,CAA/B;AACD,CAP6D,CAAvD;AASP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useMenuGroup_unstable } from './useMenuGroup';\nimport { renderMenuGroup_unstable } from './renderMenuGroup';\nimport { useMenuGroupContextValues_unstable } from './useMenuGroupContextValues';\nimport type { MenuGroupProps } from './MenuGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useMenuGroupStyles_unstable } from './useMenuGroupStyles';\n\n/**\n * Define a styled MenuGroup, using the `useMenuGroup_unstable` hook.\n */\nexport const MenuGroup: ForwardRefComponent<MenuGroupProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroup_unstable(props, ref);\n const contextValues = useMenuGroupContextValues_unstable(state);\n\n useMenuGroupStyles_unstable(state);\n\n return renderMenuGroup_unstable(state, contextValues);\n});\n\nMenuGroup.displayName = 'MenuGroup';\n"],"sourceRoot":"../src/"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ComponentProps, ComponentState,
|
2
|
-
import { MenuGroupContextValue } from '../../contexts/menuGroupContext';
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
|
+
import type { MenuGroupContextValue } from '../../contexts/menuGroupContext';
|
3
3
|
export declare type MenuGroupSlots = {
|
4
|
-
root:
|
4
|
+
root: Slot<'div'>;
|
5
5
|
};
|
6
6
|
export declare type MenuGroupProps = ComponentProps<MenuGroupSlots>;
|
7
7
|
export declare type MenuGroupState = ComponentState<MenuGroupSlots> & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuGroup.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"MenuGroup.types.js","sourceRoot":"../src/","sources":["components/MenuGroup/MenuGroup.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { MenuGroupContextValue } from '../../contexts/menuGroupContext';\n\nexport type MenuGroupSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGroupProps = ComponentProps<MenuGroupSlots>;\n\nexport type MenuGroupState = ComponentState<MenuGroupSlots> & {\n /**\n * id applied to the DOM element of `MenuGroupHeader`\n */\n headerId: string;\n};\n\nexport type MenuGroupContextValues = {\n menuGroup: MenuGroupContextValue;\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/MenuGroup/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './MenuGroup.types';\nexport * from './MenuGroup';\nexport * from './renderMenuGroup';\nexport * from './useMenuGroup';\nexport * from './useMenuGroupContextValues';\nexport * from './useMenuGroupStyles';\n"]}
|
@@ -3,4 +3,4 @@ import { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';
|
|
3
3
|
* Redefine the render function to add slots. Reuse the menugroup structure but add
|
4
4
|
* slots to children.
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const renderMenuGroup_unstable: (state: MenuGroupState, contextValues: MenuGroupContextValues) => JSX.Element;
|
@@ -6,7 +6,7 @@ import { MenuGroupContextProvider } from '../../contexts/menuGroupContext';
|
|
6
6
|
* slots to children.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export const
|
9
|
+
export const renderMenuGroup_unstable = (state, contextValues) => {
|
10
10
|
const {
|
11
11
|
slots,
|
12
12
|
slotProps
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroup/renderMenuGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,wBAAT,QAAyC,iCAAzC;AAEA;;;AAGG;;AACH,OAAO,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAAwB,aAAxB,KAAiE;AACvG,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAiB,KAAjB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,wBAAD,EAAyB;AAAC,IAAA,KAAK,EAAE,aAAa,CAAC;AAAtB,GAAzB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADF,CADF;AAKD,CARM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuGroupContextValues, MenuGroupSlots, MenuGroupState } from './MenuGroup.types';\nimport { MenuGroupContextProvider } from '../../contexts/menuGroupContext';\n\n/**\n * Redefine the render function to add slots. Reuse the menugroup structure but add\n * slots to children.\n */\nexport const renderMenuGroup_unstable = (state: MenuGroupState, contextValues: MenuGroupContextValues) => {\n const { slots, slotProps } = getSlots<MenuGroupSlots>(state);\n\n return (\n <MenuGroupContextProvider value={contextValues.menuGroup}>\n <slots.root {...slotProps.root} />\n </MenuGroupContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -3,4 +3,4 @@ import { MenuGroupProps, MenuGroupState } from './MenuGroup.types';
|
|
3
3
|
/**
|
4
4
|
* Given user props, returns state and render function for a MenuGroup.
|
5
5
|
*/
|
6
|
-
export declare function
|
6
|
+
export declare function useMenuGroup_unstable(props: MenuGroupProps, ref: React.Ref<HTMLElement>): MenuGroupState;
|
@@ -3,9 +3,12 @@ import { getNativeElementProps, useId } from '@fluentui/react-utilities';
|
|
3
3
|
* Given user props, returns state and render function for a MenuGroup.
|
4
4
|
*/
|
5
5
|
|
6
|
-
export function
|
6
|
+
export function useMenuGroup_unstable(props, ref) {
|
7
7
|
const headerId = useId('menu-group');
|
8
8
|
return {
|
9
|
+
components: {
|
10
|
+
root: 'div'
|
11
|
+
},
|
9
12
|
root: getNativeElementProps('div', {
|
10
13
|
ref,
|
11
14
|
'aria-labelledby': headerId,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroup/useMenuGroup.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,KAAhC,QAA6C,2BAA7C;AAGA;;AAEG;;AACH,OAAM,SAAU,qBAAV,CAAgC,KAAhC,EAAuD,GAAvD,EAAkF;AACtF,QAAM,QAAQ,GAAG,KAAK,CAAC,YAAD,CAAtB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,yBAAmB,QAFc;AAGjC,MAAA,IAAI,EAAE,OAH2B;AAIjC,SAAG;AAJ8B,KAAR,CAJtB;AAUL,IAAA,QAAQ,EAAE;AAVL,GAAP;AAYD","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId } from '@fluentui/react-utilities';\nimport { MenuGroupProps, MenuGroupState } from './MenuGroup.types';\n\n/**\n * Given user props, returns state and render function for a MenuGroup.\n */\nexport function useMenuGroup_unstable(props: MenuGroupProps, ref: React.Ref<HTMLElement>): MenuGroupState {\n const headerId = useId('menu-group');\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n 'aria-labelledby': headerId,\n role: 'group',\n ...props,\n }),\n headerId: headerId,\n };\n}\n"],"sourceRoot":"../src/"}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';
|
2
|
-
export declare function
|
2
|
+
export declare function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroup/useMenuGroupContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,kCAAV,CAA6C,KAA7C,EAAkE;AACtE,QAAM;AAAE,IAAA;AAAF,MAAe,KAArB;AACA,QAAM,SAAS,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;AAAE,IAAA;AAAF,GAAP,CAAd,EAAoC,CAAC,QAAD,CAApC,CAAlB;AAEA,SAAO;AAAE,IAAA;AAAF,GAAP;AACD","sourcesContent":["import * as React from 'react';\nimport type { MenuGroupContextValues, MenuGroupState } from './MenuGroup.types';\n\nexport function useMenuGroupContextValues_unstable(state: MenuGroupState): MenuGroupContextValues {\n const { headerId } = state;\n const menuGroup = React.useMemo(() => ({ headerId }), [headerId]);\n\n return { menuGroup };\n}\n"],"sourceRoot":"../src/"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { MenuGroupState } from './MenuGroup.types';
|
2
2
|
export declare const menuGroupClassName = "fui-MenuGroup";
|
3
|
-
export declare const
|
3
|
+
export declare const useMenuGroupStyles_unstable: (state: MenuGroupState) => MenuGroupState;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { mergeClasses } from '@
|
1
|
+
import { mergeClasses } from '@griffel/react';
|
2
2
|
export const menuGroupClassName = 'fui-MenuGroup';
|
3
|
-
export const
|
3
|
+
export const useMenuGroupStyles_unstable = state => {
|
4
4
|
state.root.className = mergeClasses(menuGroupClassName, state.root.className);
|
5
5
|
return state;
|
6
6
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroup/useMenuGroupStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,gBAA7B;AAGA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AAEP,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;AACnF,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAD,EAAqB,KAAK,CAAC,IAAN,CAAW,SAAhC,CAAnC;AAEA,SAAO,KAAP;AACD,CAJM","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { MenuGroupState } from './MenuGroup.types';\n\nexport const menuGroupClassName = 'fui-MenuGroup';\n\nexport const useMenuGroupStyles_unstable = (state: MenuGroupState): MenuGroupState => {\n state.root.className = mergeClasses(menuGroupClassName, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { MenuGroupHeaderProps } from './MenuGroupHeader.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
* Define a styled MenuGroupHeader, using the `
|
4
|
+
* Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
|
5
5
|
*/
|
6
6
|
export declare const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps>;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useMenuGroupHeader_unstable } from './useMenuGroupHeader';
|
3
|
+
import { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles';
|
4
|
+
import { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';
|
5
5
|
/**
|
6
|
-
* Define a styled MenuGroupHeader, using the `
|
6
|
+
* Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const MenuGroupHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
10
|
+
const state = useMenuGroupHeader_unstable(props, ref);
|
11
|
+
useMenuGroupHeaderStyles_unstable(state);
|
12
|
+
return renderMenuGroupHeader_unstable(state);
|
13
13
|
});
|
14
14
|
MenuGroupHeader.displayName = 'MenuGroupHeader';
|
15
15
|
//# sourceMappingURL=MenuGroupHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroupHeader/MenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AAIA;;AAEG;;AACH,OAAO,MAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACxG,QAAM,KAAK,GAAG,2BAA2B,CAAC,KAAD,EAAQ,GAAR,CAAzC;AACA,EAAA,iCAAiC,CAAC,KAAD,CAAjC;AAEA,SAAO,8BAA8B,CAAC,KAAD,CAArC;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useMenuGroupHeader_unstable } from './useMenuGroupHeader';\nimport { useMenuGroupHeaderStyles_unstable } from './useMenuGroupHeaderStyles';\nimport { renderMenuGroupHeader_unstable } from './renderMenuGroupHeader';\nimport type { MenuGroupHeaderProps } from './MenuGroupHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled MenuGroupHeader, using the `useMenuGroupHeader_unstable` hook.\n */\nexport const MenuGroupHeader: ForwardRefComponent<MenuGroupHeaderProps> = React.forwardRef((props, ref) => {\n const state = useMenuGroupHeader_unstable(props, ref);\n useMenuGroupHeaderStyles_unstable(state);\n\n return renderMenuGroupHeader_unstable(state);\n});\n\nMenuGroupHeader.displayName = 'MenuGroupHeader';\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type MenuGroupHeaderSlots = {
|
3
|
-
root:
|
3
|
+
root: Slot<'div'>;
|
4
4
|
};
|
5
5
|
export declare type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;
|
6
6
|
export declare type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuGroupHeader.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"MenuGroupHeader.types.js","sourceRoot":"../src/","sources":["components/MenuGroupHeader/MenuGroupHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MenuGroupHeaderSlots = {\n root: Slot<'div'>;\n};\n\nexport type MenuGroupHeaderProps = ComponentProps<MenuGroupHeaderSlots>;\n\nexport type MenuGroupHeaderState = ComponentState<MenuGroupHeaderSlots>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/MenuGroupHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './MenuGroupHeader.types';\nexport * from './MenuGroupHeader';\nexport * from './renderMenuGroupHeader';\nexport * from './useMenuGroupHeader';\nexport * from './useMenuGroupHeaderStyles';\n"]}
|
@@ -3,4 +3,4 @@ import { MenuGroupHeaderState } from './MenuGroupHeader.types';
|
|
3
3
|
* Redefine the render function to add slots. Reuse the menugroupheader structure but add
|
4
4
|
* slots to children.
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const renderMenuGroupHeader_unstable: (state: MenuGroupHeaderState) => JSX.Element;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroupHeader/renderMenuGroupHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;;AAGG;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgC;AAC5E,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAuB,KAAvB,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { MenuGroupHeaderSlots, MenuGroupHeaderState } from './MenuGroupHeader.types';\n\n/**\n * Redefine the render function to add slots. Reuse the menugroupheader structure but add\n * slots to children.\n */\nexport const renderMenuGroupHeader_unstable = (state: MenuGroupHeaderState) => {\n const { slots, slotProps } = getSlots<MenuGroupHeaderSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
@@ -3,4 +3,4 @@ import { MenuGroupHeaderProps, MenuGroupHeaderState } from './MenuGroupHeader.ty
|
|
3
3
|
/**
|
4
4
|
* Given user props, returns state and render function for a MenuGroupHeader.
|
5
5
|
*/
|
6
|
-
export declare function
|
6
|
+
export declare function useMenuGroupHeader_unstable(props: MenuGroupHeaderProps, ref: React.Ref<HTMLElement>): MenuGroupHeaderState;
|
@@ -1,14 +1,17 @@
|
|
1
|
-
import {
|
1
|
+
import { useMenuGroupContext_unstable } from '../../contexts/menuGroupContext';
|
2
2
|
import { getNativeElementProps } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
4
|
* Given user props, returns state and render function for a MenuGroupHeader.
|
5
5
|
*/
|
6
6
|
|
7
|
-
export function
|
7
|
+
export function useMenuGroupHeader_unstable(props, ref) {
|
8
8
|
const {
|
9
9
|
headerId: id
|
10
|
-
} =
|
10
|
+
} = useMenuGroupContext_unstable();
|
11
11
|
return {
|
12
|
+
components: {
|
13
|
+
root: 'div'
|
14
|
+
},
|
12
15
|
root: getNativeElementProps('div', {
|
13
16
|
ref,
|
14
17
|
id,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroupHeader/useMenuGroupHeader.ts"],"names":[],"mappings":"AACA,SAAS,4BAAT,QAA6C,iCAA7C;AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;AAEG;;AACH,OAAM,SAAU,2BAAV,CACJ,KADI,EAEJ,GAFI,EAEuB;AAE3B,QAAM;AAAE,IAAA,QAAQ,EAAE;AAAZ,MAAmB,4BAA4B,EAArD;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE;AADI,KADP;AAIL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,MAAA,EAFiC;AAGjC,SAAG;AAH8B,KAAR;AAJtB,GAAP;AAUD","sourcesContent":["import * as React from 'react';\nimport { useMenuGroupContext_unstable } from '../../contexts/menuGroupContext';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { MenuGroupHeaderProps, MenuGroupHeaderState } from './MenuGroupHeader.types';\n\n/**\n * Given user props, returns state and render function for a MenuGroupHeader.\n */\nexport function useMenuGroupHeader_unstable(\n props: MenuGroupHeaderProps,\n ref: React.Ref<HTMLElement>,\n): MenuGroupHeaderState {\n const { headerId: id } = useMenuGroupContext_unstable();\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n id,\n ...props,\n }),\n };\n}\n"],"sourceRoot":"../src/"}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { MenuGroupHeaderState } from './MenuGroupHeader.types';
|
2
2
|
export declare const menuGroupHeaderClassName = "fui-MenuGroupHeader";
|
3
|
-
export declare const
|
3
|
+
export declare const useMenuGroupHeaderStyles_unstable: (state: MenuGroupHeaderState) => MenuGroupHeaderState;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { mergeClasses, __styles } from '@
|
1
|
+
import { mergeClasses, __styles } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
2
3
|
export const menuGroupHeaderClassName = 'fui-MenuGroupHeader';
|
3
4
|
|
4
5
|
const useStyles = /*#__PURE__*/__styles({
|
@@ -16,7 +17,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
16
17
|
"d": [".fy9rknc{font-size:var(--fontSizeBase200);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fjlbh76{padding-left:12px;}", ".f11qrl6u{padding-right:12px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1d2rq10{height:32px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
|
17
18
|
});
|
18
19
|
|
19
|
-
export const
|
20
|
+
export const useMenuGroupHeaderStyles_unstable = state => {
|
20
21
|
const styles = useStyles();
|
21
22
|
state.root.className = mergeClasses(menuGroupHeaderClassName, styles.root, state.root.className);
|
22
23
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/MenuGroupHeader/useMenuGroupHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,wBAAwB,GAAG,qBAAjC;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;AAaA,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAgC;AAC/E,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,wBAAD,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;AAEA,SAAO,KAAP;AACD,CALM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { MenuGroupHeaderState } from './MenuGroupHeader.types';\n\nexport const menuGroupHeaderClassName = 'fui-MenuGroupHeader';\n\nconst useStyles = makeStyles({\n root: {\n fontSize: tokens.fontSizeBase200,\n color: tokens.colorNeutralForeground3,\n paddingLeft: '12px',\n paddingRight: '12px',\n fontWeight: tokens.fontWeightSemibold,\n height: '32px',\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nexport const useMenuGroupHeaderStyles_unstable = (state: MenuGroupHeaderState) => {\n const styles = useStyles();\n state.root.className = mergeClasses(menuGroupHeaderClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { MenuItemProps } from './MenuItem.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
* Define a styled MenuItem, using the `
|
4
|
+
* Define a styled MenuItem, using the `useMenuItem_unstable` and `useMenuItemStyles_unstable` hook.
|
5
5
|
*/
|
6
6
|
export declare const MenuItem: ForwardRefComponent<MenuItemProps>;
|