Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bsunderhus committed Sep 14, 2022
1 parent 9964ffd commit 44ab882
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 27 deletions.
4 changes: 2 additions & 2 deletions packages/react-components/react-menu/etc/react-menu.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

/// <reference types="react" />

import { ARIAButtonElement } from '@fluentui/react-aria';
import type { ARIAButtonElement } from '@fluentui/react-aria';
import { ARIAButtonResultProps } from '@fluentui/react-aria';
import { ARIAButtonSlotProps } from '@fluentui/react-aria';
import type { ARIAButtonSlotProps } from '@fluentui/react-aria';
import { ARIAButtonType } from '@fluentui/react-aria';
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +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';
import type { MenuItemProps } from './MenuItem.types';

jest.mock('../../contexts/menuContext');

describe('MenuItem', () => {
isConformant({
Component: MenuItem as React.FunctionComponent<MenuItemProps>,
isConformant<MenuItemProps>({
Component: MenuItem,
displayName: 'MenuItem',
testOptions: {
'has-static-classnames': [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ARIAButtonSlotProps } from '@fluentui/react-aria';
import type { ARIAButtonSlotProps } from '@fluentui/react-aria';
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';

export type MenuItemSlots = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { useMenuListContext_unstable } from '../../contexts/menuListContext';
import type { MenuItemState } from '../../components/index';
import { ARIAButtonElementIntersection } from '@fluentui/react-aria';
import type { ARIAButtonElementIntersection } from '@fluentui/react-aria';

export const useCharacterSearch = (state: MenuItemState, ref: React.RefObject<HTMLElement>) => {
const setFocusByFirstCharacter = useMenuListContext_unstable(context => context.setFocusByFirstCharacter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ import {
import { useMenuListContext_unstable } from '../../contexts/menuListContext';
import { useMenuContext_unstable } from '../../contexts/menuContext';
import type { MenuItemProps, MenuItemState } from './MenuItem.types';
import {
ARIAButtonElement,
ARIAButtonElementIntersection,
ARIAButtonSlotProps,
useARIAButtonShorthand,
} from '@fluentui/react-aria';
import type { ARIAButtonElement, ARIAButtonElementIntersection, ARIAButtonSlotProps } from '@fluentui/react-aria';
import { useARIAButtonShorthand } from '@fluentui/react-aria';
import { Enter, Space } from '@fluentui/keyboard-keys';

const ChevronRightIcon = bundleIcon(ChevronRightFilled, ChevronRightRegular);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
import { tokens } from '@fluentui/react-theme';
import { useCheckmarkStyles_unstable } from '../../selectable/index';
import { MenuItemCheckboxState } from '../MenuItemCheckbox/index';
import type { MenuItemCheckboxState } from '../MenuItemCheckbox/index';
import type { MenuItemSlots, MenuItemState } from './MenuItem.types';
import type { SlotClassNames } from '@fluentui/react-utilities';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +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';
import type { MenuItemCheckboxProps } from './MenuItemCheckbox.types';

jest.mock('../../contexts/menuContext');

describe('MenuItemCheckbox conformance', () => {
isConformant({
Component: MenuItemCheckbox as React.FunctionComponent<MenuItemCheckboxProps>,
isConformant<MenuItemCheckboxProps>({
Component: MenuItemCheckbox,
requiredProps: {
name: 'checkbox',
value: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Checkmark16Filled } from '@fluentui/react-icons';
import { useMenuListContext_unstable } from '../../contexts/menuListContext';
import { useMenuItem_unstable } from '../MenuItem/useMenuItem';
import type { MenuItemCheckboxProps, MenuItemCheckboxState } from './MenuItemCheckbox.types';
import { ARIAButtonElement, ARIAButtonElementIntersection } from '@fluentui/react-aria';
import type { ARIAButtonElement, ARIAButtonElementIntersection } from '@fluentui/react-aria';

/** Returns the props and state required to render the component */
export const useMenuItemCheckbox_unstable = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { SlotClassNames } from '@fluentui/react-utilities';
import { mergeClasses } from '@griffel/react';
import { useCheckmarkStyles_unstable } from '../../selectable/index';
import { MenuItemSlots } from '../index';
import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';
import type { SlotClassNames } from '@fluentui/react-utilities';
import type { MenuItemSlots } from '../index';
import type { MenuItemCheckboxState } from './MenuItemCheckbox.types';

export const menuItemCheckboxClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +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';
import type { MenuItemRadioProps } from './MenuItemRadio.types';

describe('MenuItemRadio', () => {
isConformant({
Component: MenuItemRadio as React.FunctionComponent<MenuItemRadioProps>,
isConformant<MenuItemRadioProps>({
Component: MenuItemRadio,
requiredProps: {
name: 'radio',
value: '1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Checkmark16Filled } from '@fluentui/react-icons';
import { useMenuListContext_unstable } from '../../contexts/menuListContext';
import { useMenuItem_unstable } from '../MenuItem/useMenuItem';
import type { MenuItemRadioProps, MenuItemRadioState } from './MenuItemRadio.types';
import { ARIAButtonElement, ARIAButtonElementIntersection } from '@fluentui/react-aria';
import type { ARIAButtonElement, ARIAButtonElementIntersection } from '@fluentui/react-aria';

/**
* Given user props, returns state and render function for a MenuItemRadio.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { SlotClassNames } from '@fluentui/react-utilities';
import { mergeClasses } from '@griffel/react';
import { useCheckmarkStyles_unstable } from '../../selectable/index';
import { MenuItemSlots } from '../index';
import { useMenuItemStyles_unstable } from '../MenuItem/useMenuItemStyles';
import type { SlotClassNames } from '@fluentui/react-utilities';
import type { MenuItemSlots } from '../index';
import type { MenuItemRadioState } from './MenuItemRadio.types';

export const menuItemRadioClassNames: SlotClassNames<Omit<MenuItemSlots, 'submenuIndicator'>> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +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';
import type { ARIAButtonElement } from '@fluentui/react-aria';

//----- Example Tab Data -----//

Expand Down

0 comments on commit 44ab882

Please sign in to comment.