From 59ddb12c1a7123d676bbae1e69958647d97cbe68 Mon Sep 17 00:00:00 2001 From: Bernardo Sunderhus Date: Fri, 9 Sep 2022 09:59:24 +0000 Subject: [PATCH] chore: updates dependencies --- apps/public-docsite-v9/src/shims/MenuShim.tsx | 3 ++- .../react-menu/src/components/MenuItem/MenuItem.test.tsx | 3 ++- .../src/components/MenuItemCheckbox/MenuItemCheckbox.test.tsx | 3 ++- .../src/components/MenuItemRadio/MenuItemRadio.test.tsx | 3 ++- .../react-overflow/src/stories/Overflow/utils.stories.tsx | 3 ++- .../src/stories/Tabs/TabListWithOverflow.stories.tsx | 3 ++- .../src/stories/Toolbar/ToolbarOverflow.stories.tsx | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/public-docsite-v9/src/shims/MenuShim.tsx b/apps/public-docsite-v9/src/shims/MenuShim.tsx index 64f2a6272955a9..f7aaec192ef3f7 100644 --- a/apps/public-docsite-v9/src/shims/MenuShim.tsx +++ b/apps/public-docsite-v9/src/shims/MenuShim.tsx @@ -15,6 +15,7 @@ import { MenuItemCheckbox, MenuItemCheckboxProps, MenuProps, + MenuDividerProps, } from '@fluentui/react-components'; export const shimMenuProps = (props: IContextualMenuProps): Partial => { @@ -54,7 +55,7 @@ const shimMenuHeaderProps = (props: IContextualMenuItem): MenuGroupHeaderProps = export const MenuItemShim = (props: IContextualMenuItem) => { if (props.itemType === ContextualMenuItemType.Divider) { const shimProps = shimMenuItemProps(props); - return ; + return ; } if (props.itemType === ContextualMenuItemType.Section) { diff --git a/packages/react-components/react-menu/src/components/MenuItem/MenuItem.test.tsx b/packages/react-components/react-menu/src/components/MenuItem/MenuItem.test.tsx index ed5ce32d663759..7cd059dfbccab7 100644 --- a/packages/react-components/react-menu/src/components/MenuItem/MenuItem.test.tsx +++ b/packages/react-components/react-menu/src/components/MenuItem/MenuItem.test.tsx @@ -7,12 +7,13 @@ import { isConformant } from '../../common/isConformant'; import { MenuTriggerContextProvider } from '../../contexts/menuTriggerContext'; import { MenuListProvider } from '../../contexts/menuListContext'; import { mockUseMenuContext } from '../../common/mockUseMenuContext'; +import { MenuItemProps } from './MenuItem.types'; jest.mock('../../contexts/menuContext'); describe('MenuItem', () => { isConformant({ - Component: MenuItem, + Component: MenuItem as React.FunctionComponent, displayName: 'MenuItem', testOptions: { 'has-static-classnames': [ diff --git a/packages/react-components/react-menu/src/components/MenuItemCheckbox/MenuItemCheckbox.test.tsx b/packages/react-components/react-menu/src/components/MenuItemCheckbox/MenuItemCheckbox.test.tsx index bf02772003f98d..7383da8c52c7bc 100644 --- a/packages/react-components/react-menu/src/components/MenuItemCheckbox/MenuItemCheckbox.test.tsx +++ b/packages/react-components/react-menu/src/components/MenuItemCheckbox/MenuItemCheckbox.test.tsx @@ -7,12 +7,13 @@ import { MenuItemCheckbox } from './MenuItemCheckbox'; import { MenuListProvider } from '../../contexts/menuListContext'; import { mockUseMenuContext } from '../../common/mockUseMenuContext'; import type { MenuListContextValue } from '../../contexts/menuListContext'; +import { MenuItemCheckboxProps } from './MenuItemCheckbox.types'; jest.mock('../../contexts/menuContext'); describe('MenuItemCheckbox conformance', () => { isConformant({ - Component: MenuItemCheckbox, + Component: MenuItemCheckbox as React.FunctionComponent, requiredProps: { name: 'checkbox', value: '1', diff --git a/packages/react-components/react-menu/src/components/MenuItemRadio/MenuItemRadio.test.tsx b/packages/react-components/react-menu/src/components/MenuItemRadio/MenuItemRadio.test.tsx index accb416c5a2e0b..62b99b6dc6dca9 100644 --- a/packages/react-components/react-menu/src/components/MenuItemRadio/MenuItemRadio.test.tsx +++ b/packages/react-components/react-menu/src/components/MenuItemRadio/MenuItemRadio.test.tsx @@ -6,10 +6,11 @@ import { MenuItemRadio } from './MenuItemRadio'; import { isConformant } from '../../common/isConformant'; import { MenuListProvider } from '../../contexts/menuListContext'; import type { MenuListContextValue } from '../../contexts/menuListContext'; +import { MenuItemRadioProps } from './MenuItemRadio.types'; describe('MenuItemRadio', () => { isConformant({ - Component: MenuItemRadio, + Component: MenuItemRadio as React.FunctionComponent, requiredProps: { name: 'radio', value: '1', diff --git a/packages/react-components/react-overflow/src/stories/Overflow/utils.stories.tsx b/packages/react-components/react-overflow/src/stories/Overflow/utils.stories.tsx index d139f8ef1209b3..19d7439f794da0 100644 --- a/packages/react-components/react-overflow/src/stories/Overflow/utils.stories.tsx +++ b/packages/react-components/react-overflow/src/stories/Overflow/utils.stories.tsx @@ -84,7 +84,8 @@ export const TestOverflowMenuItem: React.FC = props = return null; } - return Item {id}; + // As an union between button props and div props may be conflicting, casting is required + return Item {id}; }; export const TestOverflowMenuDivider: React.FC<{ diff --git a/packages/react-components/react-tabs/src/stories/Tabs/TabListWithOverflow.stories.tsx b/packages/react-components/react-tabs/src/stories/Tabs/TabListWithOverflow.stories.tsx index b072106985ffc9..0ad4b34ea1d537 100644 --- a/packages/react-components/react-tabs/src/stories/Tabs/TabListWithOverflow.stories.tsx +++ b/packages/react-components/react-tabs/src/stories/Tabs/TabListWithOverflow.stories.tsx @@ -27,6 +27,7 @@ import { MoreHorizontalRegular, } from '@fluentui/react-icons'; import { useIsOverflowItemVisible, useOverflowMenu, Overflow, OverflowItem } from '@fluentui/react-overflow'; +import { ARIAButtonElement } from '@fluentui/react-aria/src/index'; //----- Example Tab Data -----// @@ -88,7 +89,7 @@ const tabs: ExampleTab[] = [ type OverflowMenuItemProps = { tab: ExampleTab; - onClick: React.MouseEventHandler; + onClick: React.MouseEventHandler>; }; /** diff --git a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx index 68e2a45b532927..922622d6775ecd 100644 --- a/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx +++ b/packages/react-components/react-toolbar/src/stories/Toolbar/ToolbarOverflow.stories.tsx @@ -41,7 +41,7 @@ export const ToolbarOverflowMenuItem: React.FC = p return }> Italic; } - return Item {id}; + return Item {id}; }; export const ToolbarMenuOverflowDivider: React.FC<{