From ca34e2ad7b75492b1806207790e32a6edce87795 Mon Sep 17 00:00:00 2001 From: Noah Allen Date: Fri, 14 Jul 2023 15:53:15 -0700 Subject: [PATCH] Autofix typescript-eslint errors --- .../border-box-control-linked-button/component.tsx | 3 ++- .../border-box-control-linked-button/hook.ts | 3 ++- .../border-box-control-split-controls/component.tsx | 3 ++- .../border-box-control-split-controls/hook.ts | 3 ++- .../border-box-control-visualizer/component.tsx | 3 ++- .../border-box-control-visualizer/hook.ts | 3 ++- .../border-box-control/component.tsx | 3 ++- .../border-box-control/border-box-control/hook.ts | 3 ++- .../border-control-dropdown/component.tsx | 3 ++- .../border-control/border-control-dropdown/hook.ts | 3 ++- .../border-control-style-picker/component.tsx | 3 ++- .../border-control-style-picker/hook.ts | 3 ++- .../src/border-control/border-control/component.tsx | 3 ++- .../src/border-control/border-control/hook.ts | 3 ++- packages/components/src/card/card-body/component.tsx | 3 ++- packages/components/src/card/card-body/hook.ts | 3 ++- .../components/src/card/card-divider/component.tsx | 6 ++++-- packages/components/src/card/card-divider/hook.ts | 3 ++- .../components/src/card/card-footer/component.tsx | 3 ++- packages/components/src/card/card-footer/hook.ts | 3 ++- .../components/src/card/card-header/component.tsx | 3 ++- packages/components/src/card/card-header/hook.ts | 3 ++- .../components/src/card/card-media/component.tsx | 3 ++- packages/components/src/card/card-media/hook.ts | 3 ++- packages/components/src/card/card/component.tsx | 7 ++----- packages/components/src/card/card/hook.ts | 3 ++- packages/components/src/color-picker/component.tsx | 3 ++- packages/components/src/confirm-dialog/component.tsx | 7 ++----- packages/components/src/date-time/time/index.tsx | 2 +- packages/components/src/divider/component.tsx | 7 ++----- .../src/dropdown/dropdown-content-wrapper.tsx | 7 ++----- packages/components/src/elevation/component.tsx | 3 ++- packages/components/src/elevation/hook.ts | 6 ++++-- .../components/src/flex/flex-block/component.tsx | 3 ++- packages/components/src/flex/flex-block/hook.ts | 3 ++- packages/components/src/flex/flex-item/component.tsx | 3 ++- packages/components/src/flex/flex-item/hook.ts | 6 ++++-- packages/components/src/flex/flex/component.tsx | 3 ++- packages/components/src/flex/flex/hook.ts | 3 ++- packages/components/src/grid/component.tsx | 3 ++- packages/components/src/grid/hook.ts | 3 ++- packages/components/src/h-stack/component.tsx | 3 ++- packages/components/src/h-stack/hook.tsx | 7 ++----- packages/components/src/heading/component.tsx | 3 ++- packages/components/src/heading/hook.ts | 3 ++- packages/components/src/input-control/input-base.tsx | 3 ++- .../src/input-control/input-prefix-wrapper.tsx | 7 ++----- .../src/input-control/input-suffix-wrapper.tsx | 7 ++----- .../components/src/input-control/reducer/reducer.ts | 8 ++------ .../input-control/styles/input-control-styles.tsx | 3 ++- .../src/item-group/item-group/component.tsx | 3 ++- .../components/src/item-group/item-group/hook.ts | 3 ++- .../components/src/item-group/item/component.tsx | 3 ++- packages/components/src/item-group/item/hook.ts | 3 ++- .../navigator/navigator-back-button/component.tsx | 3 ++- .../src/navigator/navigator-back-button/hook.ts | 3 ++- .../src/navigator/navigator-button/component.tsx | 3 ++- .../src/navigator/navigator-button/hook.ts | 3 ++- .../src/navigator/navigator-provider/component.tsx | 7 ++----- .../src/navigator/navigator-screen/component.tsx | 11 +++++------ .../navigator-to-parent-button/component.tsx | 3 ++- packages/components/src/popover/index.tsx | 12 ++++-------- .../components/src/popover/overlay-middlewares.tsx | 3 ++- .../src/resizable-box/resize-tooltip/index.tsx | 3 ++- .../src/resizable-box/resize-tooltip/label.tsx | 3 ++- packages/components/src/scrollable/component.tsx | 3 ++- packages/components/src/scrollable/hook.ts | 3 ++- packages/components/src/spacer/component.tsx | 3 ++- packages/components/src/spacer/hook.ts | 3 ++- .../toggle-group-control-option-base/component.tsx | 7 ++----- .../toggle-group-control/component.tsx | 7 ++----- .../components/src/toolbar/toolbar-button/index.tsx | 5 ++--- packages/components/src/toolbar/toolbar/index.tsx | 6 ++---- .../src/tools-panel/tools-panel-header/component.tsx | 3 ++- .../src/tools-panel/tools-panel-header/hook.ts | 3 ++- .../src/tools-panel/tools-panel-item/component.tsx | 3 ++- .../src/tools-panel/tools-panel-item/hook.ts | 3 ++- .../src/tools-panel/tools-panel/component.tsx | 3 ++- .../components/src/tools-panel/tools-panel/hook.ts | 3 ++- packages/components/src/truncate/component.tsx | 3 ++- packages/components/src/truncate/hook.ts | 3 ++- packages/components/src/ui/shortcut/component.tsx | 7 ++----- packages/components/src/utils/hooks/use-cx.ts | 4 +++- packages/components/src/v-stack/component.tsx | 3 ++- packages/components/src/v-stack/hook.ts | 3 ++- .../components/src/visually-hidden/component.tsx | 7 ++----- .../src/higher-order/with-instance-id/index.tsx | 4 ++-- .../src/higher-order/with-safe-timeout/index.tsx | 4 ++-- packages/redux-routine/src/runtime.ts | 3 ++- .../src/__tests__/markdown.test.ts | 2 +- test/storybook-playwright/playwright.config.ts | 2 +- 91 files changed, 191 insertions(+), 166 deletions(-) diff --git a/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx b/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx index d5fe6a9eb1f761..f782fb89340200 100644 --- a/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx +++ b/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx @@ -10,7 +10,8 @@ import { __ } from '@wordpress/i18n'; import Button from '../../button'; import Tooltip from '../../tooltip'; import { View } from '../../view'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControlLinkedButton } from './hook'; import type { LinkedButtonProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts b/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts index 27ed54351aaf81..cd65758416ca13 100644 --- a/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts +++ b/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { LinkedButtonProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx b/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx index d8da0112bb7cea..922f0b39c09c97 100644 --- a/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx +++ b/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx @@ -11,7 +11,8 @@ import { useMergeRefs } from '@wordpress/compose'; import BorderBoxControlVisualizer from '../border-box-control-visualizer'; import { BorderControl } from '../../border-control'; import { Grid } from '../../grid'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControlSplitControls } from './hook'; import type { BorderControlProps } from '../../border-control/types'; diff --git a/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts b/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts index a32b116843dcdb..ff152c9bc674ad 100644 --- a/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts +++ b/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/'; import type { SplitControlsProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx b/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx index c0abb92f3803ba..d815b0b8c088e8 100644 --- a/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx +++ b/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx @@ -7,7 +7,8 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import { View } from '../../view'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControlVisualizer } from './hook'; import type { VisualizerProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts b/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts index 4e6e69e9d8452b..d7ae390dcd146d 100644 --- a/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts +++ b/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils'; import type { VisualizerProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control/component.tsx b/packages/components/src/border-box-control/border-box-control/component.tsx index c66855aa2f5e17..ad3162851c2670 100644 --- a/packages/components/src/border-box-control/border-box-control/component.tsx +++ b/packages/components/src/border-box-control/border-box-control/component.tsx @@ -14,7 +14,8 @@ import { BorderControl } from '../../border-control'; import { StyledLabel } from '../../base-control/styles/base-control-styles'; import { View } from '../../view'; import { VisuallyHidden } from '../../visually-hidden'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControl } from './hook'; import type { BorderBoxControlProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control/hook.ts b/packages/components/src/border-box-control/border-box-control/hook.ts index 1c2f8291de50d8..cf5aae4e09f725 100644 --- a/packages/components/src/border-box-control/border-box-control/hook.ts +++ b/packages/components/src/border-box-control/border-box-control/hook.ts @@ -16,7 +16,8 @@ import { isCompleteBorder, isEmptyBorder, } from '../utils'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { Border } from '../../border-control/types'; diff --git a/packages/components/src/border-control/border-control-dropdown/component.tsx b/packages/components/src/border-control/border-control-dropdown/component.tsx index c9998af094fbdc..46237ad57218bc 100644 --- a/packages/components/src/border-control/border-control-dropdown/component.tsx +++ b/packages/components/src/border-control/border-control-dropdown/component.tsx @@ -19,7 +19,8 @@ import ColorPalette from '../../color-palette'; import Dropdown from '../../dropdown'; import { HStack } from '../../h-stack'; import { VStack } from '../../v-stack'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderControlDropdown } from './hook'; import { StyledLabel } from '../../base-control/styles/base-control-styles'; import DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper'; diff --git a/packages/components/src/border-control/border-control-dropdown/hook.ts b/packages/components/src/border-control/border-control-dropdown/hook.ts index a3a789b5d55ee3..99309bb3374c58 100644 --- a/packages/components/src/border-control/border-control-dropdown/hook.ts +++ b/packages/components/src/border-control/border-control-dropdown/hook.ts @@ -8,7 +8,8 @@ import { useMemo } from '@wordpress/element'; */ import * as styles from '../styles'; import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { DropdownProps } from '../types'; diff --git a/packages/components/src/border-control/border-control-style-picker/component.tsx b/packages/components/src/border-control/border-control-style-picker/component.tsx index c61cec058be1af..66858531f62cab 100644 --- a/packages/components/src/border-control/border-control-style-picker/component.tsx +++ b/packages/components/src/border-control/border-control-style-picker/component.tsx @@ -12,7 +12,8 @@ import { StyledLabel } from '../../base-control/styles/base-control-styles'; import { View } from '../../view'; import { Flex } from '../../flex'; import { VisuallyHidden } from '../../visually-hidden'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderControlStylePicker } from './hook'; import type { LabelProps, StylePickerProps } from '../types'; diff --git a/packages/components/src/border-control/border-control-style-picker/hook.ts b/packages/components/src/border-control/border-control-style-picker/hook.ts index b8d1c27b9a7276..7a77c735b9c2c9 100644 --- a/packages/components/src/border-control/border-control-style-picker/hook.ts +++ b/packages/components/src/border-control/border-control-style-picker/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { StylePickerProps } from '../types'; diff --git a/packages/components/src/border-control/border-control/component.tsx b/packages/components/src/border-control/border-control/component.tsx index 4f291bda44d24e..617ff5dd5997c2 100644 --- a/packages/components/src/border-control/border-control/component.tsx +++ b/packages/components/src/border-control/border-control/component.tsx @@ -13,7 +13,8 @@ import { HStack } from '../../h-stack'; import { StyledLabel } from '../../base-control/styles/base-control-styles'; import { View } from '../../view'; import { VisuallyHidden } from '../../visually-hidden'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderControl } from './hook'; import type { BorderControlProps, LabelProps } from '../types'; diff --git a/packages/components/src/border-control/border-control/hook.ts b/packages/components/src/border-control/border-control/hook.ts index 77e2ede942406a..39917793de72de 100644 --- a/packages/components/src/border-control/border-control/hook.ts +++ b/packages/components/src/border-control/border-control/hook.ts @@ -8,7 +8,8 @@ import { useCallback, useMemo, useState } from '@wordpress/element'; */ import * as styles from '../styles'; import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { Border, BorderControlProps } from '../types'; diff --git a/packages/components/src/card/card-body/component.tsx b/packages/components/src/card/card-body/component.tsx index cab52cf02ad25d..f515162bbc1b76 100644 --- a/packages/components/src/card/card-body/component.tsx +++ b/packages/components/src/card/card-body/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { Scrollable } from '../../scrollable'; import { View } from '../../view'; import { useCardBody } from './hook'; diff --git a/packages/components/src/card/card-body/hook.ts b/packages/components/src/card/card-body/hook.ts index a02a6981b54e3d..1418571fb71f58 100644 --- a/packages/components/src/card/card-body/hook.ts +++ b/packages/components/src/card/card-body/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { BodyProps } from '../types'; diff --git a/packages/components/src/card/card-divider/component.tsx b/packages/components/src/card/card-divider/component.tsx index cdd52bffd5c99f..494d3451bb5ca9 100644 --- a/packages/components/src/card/card-divider/component.tsx +++ b/packages/components/src/card/card-divider/component.tsx @@ -6,8 +6,10 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; -import { Divider, DividerProps } from '../../divider'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; +import type { DividerProps } from '../../divider'; +import { Divider } from '../../divider'; import { useCardDivider } from './hook'; function UnconnectedCardDivider( diff --git a/packages/components/src/card/card-divider/hook.ts b/packages/components/src/card/card-divider/hook.ts index aa5fdbe08eecbb..969bdf0a43b71d 100644 --- a/packages/components/src/card/card-divider/hook.ts +++ b/packages/components/src/card/card-divider/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { DividerProps } from '../../divider'; diff --git a/packages/components/src/card/card-footer/component.tsx b/packages/components/src/card/card-footer/component.tsx index 576807444c3069..1507c7139cda27 100644 --- a/packages/components/src/card/card-footer/component.tsx +++ b/packages/components/src/card/card-footer/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { Flex } from '../../flex'; import { useCardFooter } from './hook'; import type { FooterProps } from '../types'; diff --git a/packages/components/src/card/card-footer/hook.ts b/packages/components/src/card/card-footer/hook.ts index 831a9c7773f778..1530faccaf15ce 100644 --- a/packages/components/src/card/card-footer/hook.ts +++ b/packages/components/src/card/card-footer/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { FooterProps } from '../types'; diff --git a/packages/components/src/card/card-header/component.tsx b/packages/components/src/card/card-header/component.tsx index a055cf0966f52e..01c7942e438f2c 100644 --- a/packages/components/src/card/card-header/component.tsx +++ b/packages/components/src/card/card-header/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { Flex } from '../../flex'; import { useCardHeader } from './hook'; import type { HeaderProps } from '../types'; diff --git a/packages/components/src/card/card-header/hook.ts b/packages/components/src/card/card-header/hook.ts index 9cf9387b62a265..4804e76262d1dd 100644 --- a/packages/components/src/card/card-header/hook.ts +++ b/packages/components/src/card/card-header/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { HeaderProps } from '../types'; diff --git a/packages/components/src/card/card-media/component.tsx b/packages/components/src/card/card-media/component.tsx index a940c2d2c8ec4e..13e453c2aedcd6 100644 --- a/packages/components/src/card/card-media/component.tsx +++ b/packages/components/src/card/card-media/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useCardMedia } from './hook'; import type { MediaProps } from '../types'; diff --git a/packages/components/src/card/card-media/hook.ts b/packages/components/src/card/card-media/hook.ts index edbedb986a4901..dfe67b8ed19731 100644 --- a/packages/components/src/card/card-media/hook.ts +++ b/packages/components/src/card/card-media/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { MediaProps } from '../types'; diff --git a/packages/components/src/card/card/component.tsx b/packages/components/src/card/card/component.tsx index 57f9c6430c0c08..e0735d29789322 100644 --- a/packages/components/src/card/card/component.tsx +++ b/packages/components/src/card/card/component.tsx @@ -12,11 +12,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { - contextConnect, - ContextSystemProvider, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, ContextSystemProvider } from '../../ui/context'; import { Elevation } from '../../elevation'; import { View } from '../../view'; import * as styles from '../styles'; diff --git a/packages/components/src/card/card/hook.ts b/packages/components/src/card/card/hook.ts index 57e928cb7f8592..eb4580941d01c3 100644 --- a/packages/components/src/card/card/hook.ts +++ b/packages/components/src/card/card/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useSurface } from '../../surface'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; diff --git a/packages/components/src/color-picker/component.tsx b/packages/components/src/color-picker/component.tsx index 852e0756b3cf16..b4183dd071bfda 100644 --- a/packages/components/src/color-picker/component.tsx +++ b/packages/components/src/color-picker/component.tsx @@ -2,7 +2,8 @@ * External dependencies */ import type { ForwardedRef } from 'react'; -import { colord, extend, Colord } from 'colord'; +import type { Colord } from 'colord'; +import { colord, extend } from 'colord'; import namesPlugin from 'colord/plugins/names'; /** diff --git a/packages/components/src/confirm-dialog/component.tsx b/packages/components/src/confirm-dialog/component.tsx index b5c6cdf45f99af..1de1c08ffbcf40 100644 --- a/packages/components/src/confirm-dialog/component.tsx +++ b/packages/components/src/confirm-dialog/component.tsx @@ -14,11 +14,8 @@ import { useCallback, useEffect, useRef, useState } from '@wordpress/element'; */ import Modal from '../modal'; import type { OwnProps, DialogInputEvent } from './types'; -import { - useContextSystem, - contextConnect, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem, contextConnect } from '../ui/context'; import { Flex } from '../flex'; import Button from '../button'; import { Text } from '../text'; diff --git a/packages/components/src/date-time/time/index.tsx b/packages/components/src/date-time/time/index.tsx index 3af6eec9cc12c8..e5772bf7ab34c0 100644 --- a/packages/components/src/date-time/time/index.tsx +++ b/packages/components/src/date-time/time/index.tsx @@ -33,9 +33,9 @@ import { HStack } from '../../h-stack'; import { Spacer } from '../../spacer'; import type { InputChangeCallback } from '../../input-control/types'; import type { InputState } from '../../input-control/reducer/state'; +import type { InputAction } from '../../input-control/reducer/actions'; import { COMMIT, - InputAction, PRESS_DOWN, PRESS_UP, } from '../../input-control/reducer/actions'; diff --git a/packages/components/src/divider/component.tsx b/packages/components/src/divider/component.tsx index ee03d9bd4dbb3e..98b4edd61d4937 100644 --- a/packages/components/src/divider/component.tsx +++ b/packages/components/src/divider/component.tsx @@ -8,11 +8,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import { DividerView } from './styles'; import type { DividerProps } from './types'; diff --git a/packages/components/src/dropdown/dropdown-content-wrapper.tsx b/packages/components/src/dropdown/dropdown-content-wrapper.tsx index 48c04a33657216..ba9a15218f6f3a 100644 --- a/packages/components/src/dropdown/dropdown-content-wrapper.tsx +++ b/packages/components/src/dropdown/dropdown-content-wrapper.tsx @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - WordPressComponentProps, - contextConnect, - useContextSystem, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import { DropdownContentWrapperDiv } from './styles'; import type { DropdownContentWrapperProps } from './types'; diff --git a/packages/components/src/elevation/component.tsx b/packages/components/src/elevation/component.tsx index bdcdd90e718b59..269929820824f3 100644 --- a/packages/components/src/elevation/component.tsx +++ b/packages/components/src/elevation/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useElevation } from './hook'; import type { ElevationProps } from './types'; diff --git a/packages/components/src/elevation/hook.ts b/packages/components/src/elevation/hook.ts index 797fe784c2e400..1aa97c9167bc93 100644 --- a/packages/components/src/elevation/hook.ts +++ b/packages/components/src/elevation/hook.ts @@ -1,7 +1,8 @@ /** * External dependencies */ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; /** * WordPress dependencies @@ -11,7 +12,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import * as styles from './styles'; import { CONFIG, reduceMotion } from '../utils'; import { useCx } from '../utils/hooks/use-cx'; diff --git a/packages/components/src/flex/flex-block/component.tsx b/packages/components/src/flex/flex-block/component.tsx index f732bbe64896cf..4d01f16e3abd94 100644 --- a/packages/components/src/flex/flex-block/component.tsx +++ b/packages/components/src/flex/flex-block/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import type { FlexBlockProps } from '../types'; import { useFlexBlock } from './hook'; diff --git a/packages/components/src/flex/flex-block/hook.ts b/packages/components/src/flex/flex-block/hook.ts index b9026e64f7c46b..1c0497ac56d0fd 100644 --- a/packages/components/src/flex/flex-block/hook.ts +++ b/packages/components/src/flex/flex-block/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useFlexItem } from '../flex-item'; import type { FlexBlockProps } from '../types'; diff --git a/packages/components/src/flex/flex-item/component.tsx b/packages/components/src/flex/flex-item/component.tsx index e4073a4b400f40..446e2b94839705 100644 --- a/packages/components/src/flex/flex-item/component.tsx +++ b/packages/components/src/flex/flex-item/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useFlexItem } from './hook'; import type { FlexItemProps } from '../types'; diff --git a/packages/components/src/flex/flex-item/hook.ts b/packages/components/src/flex/flex-item/hook.ts index 6a7b259560d1f3..db130f0b62aa0a 100644 --- a/packages/components/src/flex/flex-item/hook.ts +++ b/packages/components/src/flex/flex-item/hook.ts @@ -1,12 +1,14 @@ /** * External dependencies */ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useFlexContext } from '../context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; diff --git a/packages/components/src/flex/flex/component.tsx b/packages/components/src/flex/flex/component.tsx index 4302e9b16c7ada..8fce9ea144c704 100644 --- a/packages/components/src/flex/flex/component.tsx +++ b/packages/components/src/flex/flex/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useFlex } from './hook'; import { FlexContext } from './../context'; import { View } from '../../view'; diff --git a/packages/components/src/flex/flex/hook.ts b/packages/components/src/flex/flex/hook.ts index 552a4d99d295af..6ac032f75dc4c1 100644 --- a/packages/components/src/flex/flex/hook.ts +++ b/packages/components/src/flex/flex/hook.ts @@ -12,7 +12,8 @@ import deprecated from '@wordpress/deprecated'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useResponsiveValue } from '../../ui/utils/use-responsive-value'; import { space } from '../../ui/utils/space'; import * as styles from '../styles'; diff --git a/packages/components/src/grid/component.tsx b/packages/components/src/grid/component.tsx index 689e641774f726..3ea6db0ba85448 100644 --- a/packages/components/src/grid/component.tsx +++ b/packages/components/src/grid/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import useGrid from './hook'; import type { GridProps } from './types'; diff --git a/packages/components/src/grid/hook.ts b/packages/components/src/grid/hook.ts index be615a884fd1c1..7fd54d6c4f19eb 100644 --- a/packages/components/src/grid/hook.ts +++ b/packages/components/src/grid/hook.ts @@ -11,7 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { getAlignmentProps } from './utils'; import { useResponsiveValue } from '../ui/utils/use-responsive-value'; import CONFIG from '../utils/config-values'; diff --git a/packages/components/src/h-stack/component.tsx b/packages/components/src/h-stack/component.tsx index a6989905825b70..51b25486f0b389 100644 --- a/packages/components/src/h-stack/component.tsx +++ b/packages/components/src/h-stack/component.tsx @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useHStack } from './hook'; import type { Props } from './types'; diff --git a/packages/components/src/h-stack/hook.tsx b/packages/components/src/h-stack/hook.tsx index 2c281757c0fecd..cab7df1cad79c5 100644 --- a/packages/components/src/h-stack/hook.tsx +++ b/packages/components/src/h-stack/hook.tsx @@ -6,11 +6,8 @@ import type { ReactElement } from 'react'; /** * Internal dependencies */ -import { - hasConnectNamespace, - useContextSystem, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { hasConnectNamespace, useContextSystem } from '../ui/context'; import { FlexItem, useFlex } from '../flex'; import { getAlignmentProps } from './utils'; import { getValidChildren } from '../ui/utils/get-valid-children'; diff --git a/packages/components/src/heading/component.tsx b/packages/components/src/heading/component.tsx index 7eb48be16b8a7f..b15739f9c17b87 100644 --- a/packages/components/src/heading/component.tsx +++ b/packages/components/src/heading/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useHeading } from './hook'; import type { HeadingProps } from './types'; diff --git a/packages/components/src/heading/hook.ts b/packages/components/src/heading/hook.ts index 3a92fffca7500d..13153bc8530381 100644 --- a/packages/components/src/heading/hook.ts +++ b/packages/components/src/heading/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { useText } from '../text'; import { getHeadingFontSize } from '../ui/utils/font-size'; import { CONFIG, COLORS } from '../utils'; diff --git a/packages/components/src/input-control/input-base.tsx b/packages/components/src/input-control/input-base.tsx index bd88f72be23d76..f0a89b92772a5b 100644 --- a/packages/components/src/input-control/input-base.tsx +++ b/packages/components/src/input-control/input-base.tsx @@ -22,7 +22,8 @@ import { getSizeConfig, } from './styles/input-control-styles'; import type { InputBaseProps, LabelPosition } from './types'; -import { ContextSystemProvider, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { ContextSystemProvider } from '../ui/context'; function useUniqueId( idProp?: string ) { const instanceId = useInstanceId( InputBase ); diff --git a/packages/components/src/input-control/input-prefix-wrapper.tsx b/packages/components/src/input-control/input-prefix-wrapper.tsx index 310d51886e93dd..7f888bd9b74440 100644 --- a/packages/components/src/input-control/input-prefix-wrapper.tsx +++ b/packages/components/src/input-control/input-prefix-wrapper.tsx @@ -7,11 +7,8 @@ import type { ForwardedRef } from 'react'; * Internal dependencies */ import { Spacer } from '../spacer'; -import { - WordPressComponentProps, - contextConnect, - useContextSystem, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import type { InputControlPrefixWrapperProps } from './types'; function UnconnectedInputControlPrefixWrapper( diff --git a/packages/components/src/input-control/input-suffix-wrapper.tsx b/packages/components/src/input-control/input-suffix-wrapper.tsx index 16e7848f9c12aa..000457aefc3149 100644 --- a/packages/components/src/input-control/input-suffix-wrapper.tsx +++ b/packages/components/src/input-control/input-suffix-wrapper.tsx @@ -7,11 +7,8 @@ import type { ForwardedRef } from 'react'; * Internal dependencies */ import { Spacer } from '../spacer'; -import { - WordPressComponentProps, - contextConnect, - useContextSystem, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import type { InputControlSuffixWrapperProps } from './types'; function UnconnectedInputControlSuffixWrapper( diff --git a/packages/components/src/input-control/reducer/reducer.ts b/packages/components/src/input-control/reducer/reducer.ts index ec23db6cc281f5..8e3584d3910d74 100644 --- a/packages/components/src/input-control/reducer/reducer.ts +++ b/packages/components/src/input-control/reducer/reducer.ts @@ -11,12 +11,8 @@ import { useReducer, useLayoutEffect, useRef } from '@wordpress/element'; /** * Internal dependencies */ -import { - InputState, - StateReducer, - initialInputControlState, - initialStateReducer, -} from './state'; +import type { InputState, StateReducer } from './state'; +import { initialInputControlState, initialStateReducer } from './state'; import * as actions from './actions'; import type { InputChangeCallback } from '../types'; diff --git a/packages/components/src/input-control/styles/input-control-styles.tsx b/packages/components/src/input-control/styles/input-control-styles.tsx index 3548be6f7260c5..65359be033a191 100644 --- a/packages/components/src/input-control/styles/input-control-styles.tsx +++ b/packages/components/src/input-control/styles/input-control-styles.tsx @@ -1,7 +1,8 @@ /** * External dependencies */ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; import styled from '@emotion/styled'; import type { CSSProperties, ReactNode } from 'react'; diff --git a/packages/components/src/item-group/item-group/component.tsx b/packages/components/src/item-group/item-group/component.tsx index ec6847161f7e27..127359febd90da 100644 --- a/packages/components/src/item-group/item-group/component.tsx +++ b/packages/components/src/item-group/item-group/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useItemGroup } from './hook'; import { ItemGroupContext, useItemGroupContext } from '../context'; import { View } from '../../view'; diff --git a/packages/components/src/item-group/item-group/hook.ts b/packages/components/src/item-group/item-group/hook.ts index f8ec3740e721ca..77327b91df5a6c 100644 --- a/packages/components/src/item-group/item-group/hook.ts +++ b/packages/components/src/item-group/item-group/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; /** * Internal dependencies diff --git a/packages/components/src/item-group/item/component.tsx b/packages/components/src/item-group/item/component.tsx index 18472782989cff..ed30c9b56e0f28 100644 --- a/packages/components/src/item-group/item/component.tsx +++ b/packages/components/src/item-group/item/component.tsx @@ -8,7 +8,8 @@ import type { ForwardedRef } from 'react'; */ import type { ItemProps } from '../types'; import { useItem } from './hook'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; function UnconnectedItem( diff --git a/packages/components/src/item-group/item/hook.ts b/packages/components/src/item-group/item/hook.ts index ff97e3adae1603..d1bc632ddb7f3e 100644 --- a/packages/components/src/item-group/item/hook.ts +++ b/packages/components/src/item-group/item/hook.ts @@ -11,7 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useItemGroupContext } from '../context'; import { useCx } from '../../utils/hooks/use-cx'; diff --git a/packages/components/src/navigator/navigator-back-button/component.tsx b/packages/components/src/navigator/navigator-back-button/component.tsx index 498096edd7d465..bf005413fdf718 100644 --- a/packages/components/src/navigator/navigator-back-button/component.tsx +++ b/packages/components/src/navigator/navigator-back-button/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useNavigatorBackButton } from './hook'; import type { NavigatorBackButtonProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-back-button/hook.ts b/packages/components/src/navigator/navigator-back-button/hook.ts index 437c60731cc953..255a83997d071e 100644 --- a/packages/components/src/navigator/navigator-back-button/hook.ts +++ b/packages/components/src/navigator/navigator-back-button/hook.ts @@ -6,7 +6,8 @@ import { useCallback } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import Button from '../../button'; import useNavigator from '../use-navigator'; import type { NavigatorBackButtonHookProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-button/component.tsx b/packages/components/src/navigator/navigator-button/component.tsx index 2e446dac010c09..d591758333aa9f 100644 --- a/packages/components/src/navigator/navigator-button/component.tsx +++ b/packages/components/src/navigator/navigator-button/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useNavigatorButton } from './hook'; import type { NavigatorButtonProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-button/hook.ts b/packages/components/src/navigator/navigator-button/hook.ts index 15d52d269b60a2..9b32c07b293c53 100644 --- a/packages/components/src/navigator/navigator-button/hook.ts +++ b/packages/components/src/navigator/navigator-button/hook.ts @@ -7,7 +7,8 @@ import { escapeAttribute } from '@wordpress/escape-html'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import Button from '../../button'; import useNavigator from '../use-navigator'; import type { NavigatorButtonProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-provider/component.tsx b/packages/components/src/navigator/navigator-provider/component.tsx index 9bcffad6bc54bc..c86067f7f72ce8 100644 --- a/packages/components/src/navigator/navigator-provider/component.tsx +++ b/packages/components/src/navigator/navigator-provider/component.tsx @@ -20,11 +20,8 @@ import isShallowEqual from '@wordpress/is-shallow-equal'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import { View } from '../../view'; import { NavigatorContext } from '../context'; diff --git a/packages/components/src/navigator/navigator-screen/component.tsx b/packages/components/src/navigator/navigator-screen/component.tsx index 201f2261ed2f73..7a920bd7e2bc5f 100644 --- a/packages/components/src/navigator/navigator-screen/component.tsx +++ b/packages/components/src/navigator/navigator-screen/component.tsx @@ -3,7 +3,9 @@ */ import type { ForwardedRef } from 'react'; // eslint-disable-next-line no-restricted-imports -import { motion, MotionProps } from 'framer-motion'; +import type { MotionProps } from 'framer-motion'; +// eslint-disable-next-line no-restricted-imports +import { motion } from 'framer-motion'; import { css } from '@emotion/react'; /** @@ -24,11 +26,8 @@ import { escapeAttribute } from '@wordpress/escape-html'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import { View } from '../../view'; import { NavigatorContext } from '../context'; diff --git a/packages/components/src/navigator/navigator-to-parent-button/component.tsx b/packages/components/src/navigator/navigator-to-parent-button/component.tsx index 5dd8ab1624ae91..a717df22c74131 100644 --- a/packages/components/src/navigator/navigator-to-parent-button/component.tsx +++ b/packages/components/src/navigator/navigator-to-parent-button/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useNavigatorBackButton } from '../navigator-back-button/hook'; import type { NavigatorToParentButtonProps } from '../types'; diff --git a/packages/components/src/popover/index.tsx b/packages/components/src/popover/index.tsx index e5e7d45c9dd21e..593d51f27e8283 100644 --- a/packages/components/src/popover/index.tsx +++ b/packages/components/src/popover/index.tsx @@ -3,6 +3,7 @@ */ import type { ForwardedRef, SyntheticEvent, RefCallback } from 'react'; import classnames from 'classnames'; +import type { Middleware, MiddlewareArguments } from '@floating-ui/react-dom'; import { useFloating, flip as flipMiddleware, @@ -11,16 +12,11 @@ import { arrow, offset as offsetMiddleware, size, - Middleware, - MiddlewareArguments, } from '@floating-ui/react-dom'; // eslint-disable-next-line no-restricted-imports -import { - motion, - useReducedMotion, - HTMLMotionProps, - MotionProps, -} from 'framer-motion'; +import type { HTMLMotionProps, MotionProps } from 'framer-motion'; +// eslint-disable-next-line no-restricted-imports +import { motion, useReducedMotion } from 'framer-motion'; /** * WordPress dependencies diff --git a/packages/components/src/popover/overlay-middlewares.tsx b/packages/components/src/popover/overlay-middlewares.tsx index da138af7fa331f..83cc1cd0d21a97 100644 --- a/packages/components/src/popover/overlay-middlewares.tsx +++ b/packages/components/src/popover/overlay-middlewares.tsx @@ -1,7 +1,8 @@ /** * External dependencies */ -import { size, MiddlewareArguments } from '@floating-ui/react-dom'; +import type { MiddlewareArguments } from '@floating-ui/react-dom'; +import { size } from '@floating-ui/react-dom'; export function overlayMiddlewares() { return [ diff --git a/packages/components/src/resizable-box/resize-tooltip/index.tsx b/packages/components/src/resizable-box/resize-tooltip/index.tsx index 53969a664a8635..4daef4d65d4dfd 100644 --- a/packages/components/src/resizable-box/resize-tooltip/index.tsx +++ b/packages/components/src/resizable-box/resize-tooltip/index.tsx @@ -13,7 +13,8 @@ import { forwardRef } from '@wordpress/element'; * Internal dependencies */ import Label from './label'; -import { useResizeLabel, Axis, Position, POSITIONS } from './utils'; +import type { Axis, Position } from './utils'; +import { useResizeLabel, POSITIONS } from './utils'; import { Root } from './styles/resize-tooltip.styles'; type ResizeTooltipProps = React.ComponentProps< typeof Root > & { diff --git a/packages/components/src/resizable-box/resize-tooltip/label.tsx b/packages/components/src/resizable-box/resize-tooltip/label.tsx index 8d1c91f13c8b50..36bb0db72dd2cb 100644 --- a/packages/components/src/resizable-box/resize-tooltip/label.tsx +++ b/packages/components/src/resizable-box/resize-tooltip/label.tsx @@ -12,7 +12,8 @@ import { isRTL } from '@wordpress/i18n'; /** * Internal dependencies */ -import { Position, POSITIONS } from './utils'; +import type { Position } from './utils'; +import { POSITIONS } from './utils'; import { TooltipWrapper, Tooltip, diff --git a/packages/components/src/scrollable/component.tsx b/packages/components/src/scrollable/component.tsx index ffbcf8c697003a..902d315e9deee2 100644 --- a/packages/components/src/scrollable/component.tsx +++ b/packages/components/src/scrollable/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useScrollable } from './hook'; import type { ScrollableProps } from './types'; diff --git a/packages/components/src/scrollable/hook.ts b/packages/components/src/scrollable/hook.ts index 16e6074a1d196a..7d8002dc624dd5 100644 --- a/packages/components/src/scrollable/hook.ts +++ b/packages/components/src/scrollable/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import * as styles from './styles'; import { useCx } from '../utils/hooks/use-cx'; import type { ScrollableProps } from './types'; diff --git a/packages/components/src/spacer/component.tsx b/packages/components/src/spacer/component.tsx index cce8f0b54905e4..b4f532a0fd4787 100644 --- a/packages/components/src/spacer/component.tsx +++ b/packages/components/src/spacer/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useSpacer } from './hook'; import type { SpacerProps } from './types'; diff --git a/packages/components/src/spacer/hook.ts b/packages/components/src/spacer/hook.ts index 1ddf4dd7ae428b..e43d45cb31f531 100644 --- a/packages/components/src/spacer/hook.ts +++ b/packages/components/src/spacer/hook.ts @@ -6,7 +6,8 @@ import { css } from '@emotion/react'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { space } from '../ui/utils/space'; import { rtl, useCx } from '../utils'; import type { SpacerProps } from './types'; diff --git a/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx b/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx index c0ab8f95409f76..eb36f06022eed7 100644 --- a/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx +++ b/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx @@ -13,11 +13,8 @@ import { useInstanceId } from '@wordpress/compose'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import type { ToggleGroupControlOptionBaseProps, WithToolTipProps, diff --git a/packages/components/src/toggle-group-control/toggle-group-control/component.tsx b/packages/components/src/toggle-group-control/toggle-group-control/component.tsx index ebd4893e37fb2f..f9a65e0aacacd7 100644 --- a/packages/components/src/toggle-group-control/toggle-group-control/component.tsx +++ b/packages/components/src/toggle-group-control/toggle-group-control/component.tsx @@ -11,11 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks'; import BaseControl from '../../base-control'; import type { ToggleGroupControlProps } from '../types'; diff --git a/packages/components/src/toolbar/toolbar-button/index.tsx b/packages/components/src/toolbar/toolbar-button/index.tsx index 578867313a4294..35696d80e73eb0 100644 --- a/packages/components/src/toolbar/toolbar-button/index.tsx +++ b/packages/components/src/toolbar/toolbar-button/index.tsx @@ -2,7 +2,7 @@ * External dependencies */ import classnames from 'classnames'; -import type { ForwardedRef } from 'react'; +import type { ForwardedRef, MouseEvent as ReactMouseEvent } from 'react'; /** * WordPress dependencies @@ -18,7 +18,6 @@ import ToolbarContext from '../toolbar-context'; import ToolbarButtonContainer from './toolbar-button-container'; import type { ToolbarButtonProps } from './types'; import type { WordPressComponentProps } from '../../ui/context'; -import type React from 'react'; function UnforwardedToolbarButton( { @@ -45,7 +44,7 @@ function UnforwardedToolbarButton( shortcut={ props.shortcut } data-subscript={ props.subscript } onClick={ ( - event: React.MouseEvent< + event: ReactMouseEvent< HTMLButtonElement & HTMLAnchorElement, MouseEvent > diff --git a/packages/components/src/toolbar/toolbar/index.tsx b/packages/components/src/toolbar/toolbar/index.tsx index 275836c9385403..96e35d399df944 100644 --- a/packages/components/src/toolbar/toolbar/index.tsx +++ b/packages/components/src/toolbar/toolbar/index.tsx @@ -16,10 +16,8 @@ import deprecated from '@wordpress/deprecated'; import ToolbarGroup from '../toolbar-group'; import ToolbarContainer from './toolbar-container'; import type { ToolbarProps } from './types'; -import { - WordPressComponentProps, - ContextSystemProvider, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { ContextSystemProvider } from '../../ui/context'; const CONTEXT_SYSTEM_VALUE = { DropdownMenu: { diff --git a/packages/components/src/tools-panel/tools-panel-header/component.tsx b/packages/components/src/tools-panel/tools-panel-header/component.tsx index 281f63728f6596..a9d4fd654b8398 100644 --- a/packages/components/src/tools-panel/tools-panel-header/component.tsx +++ b/packages/components/src/tools-panel/tools-panel-header/component.tsx @@ -19,7 +19,8 @@ import MenuItem from '../../menu-item'; import { HStack } from '../../h-stack'; import { Heading } from '../../heading'; import { useToolsPanelHeader } from './hook'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { ResetLabel } from '../styles'; import type { ToolsPanelControlsGroupProps, diff --git a/packages/components/src/tools-panel/tools-panel-header/hook.ts b/packages/components/src/tools-panel/tools-panel-header/hook.ts index 6682328810e331..056258eed5d009 100644 --- a/packages/components/src/tools-panel/tools-panel-header/hook.ts +++ b/packages/components/src/tools-panel/tools-panel-header/hook.ts @@ -8,7 +8,8 @@ import { useMemo } from '@wordpress/element'; */ import * as styles from '../styles'; import { useToolsPanelContext } from '../context'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { ToolsPanelHeaderProps } from '../types'; diff --git a/packages/components/src/tools-panel/tools-panel-item/component.tsx b/packages/components/src/tools-panel/tools-panel-item/component.tsx index f66d3845ff0832..fb4d1c4fae295a 100644 --- a/packages/components/src/tools-panel/tools-panel-item/component.tsx +++ b/packages/components/src/tools-panel/tools-panel-item/component.tsx @@ -8,7 +8,8 @@ import type { ForwardedRef } from 'react'; */ import { useToolsPanelItem } from './hook'; import { View } from '../../view'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import type { ToolsPanelItemProps } from '../types'; // This wraps controls to be conditionally displayed within a tools panel. It diff --git a/packages/components/src/tools-panel/tools-panel-item/hook.ts b/packages/components/src/tools-panel/tools-panel-item/hook.ts index 9acee8ee1d52c0..bfd59e5b953aa7 100644 --- a/packages/components/src/tools-panel/tools-panel-item/hook.ts +++ b/packages/components/src/tools-panel/tools-panel-item/hook.ts @@ -9,7 +9,8 @@ import { useCallback, useEffect, useMemo } from '@wordpress/element'; */ import * as styles from '../styles'; import { useToolsPanelContext } from '../context'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { ToolsPanelItemProps } from '../types'; diff --git a/packages/components/src/tools-panel/tools-panel/component.tsx b/packages/components/src/tools-panel/tools-panel/component.tsx index c6f3a9ce5469d6..223a9f0ba27f83 100644 --- a/packages/components/src/tools-panel/tools-panel/component.tsx +++ b/packages/components/src/tools-panel/tools-panel/component.tsx @@ -10,7 +10,8 @@ import ToolsPanelHeader from '../tools-panel-header'; import { ToolsPanelContext } from '../context'; import { useToolsPanel } from './hook'; import { Grid } from '../../grid'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import type { ToolsPanelProps } from '../types'; const UnconnectedToolsPanel = ( diff --git a/packages/components/src/tools-panel/tools-panel/hook.ts b/packages/components/src/tools-panel/tools-panel/hook.ts index 35d4c06279419d..8377376a861a59 100644 --- a/packages/components/src/tools-panel/tools-panel/hook.ts +++ b/packages/components/src/tools-panel/tools-panel/hook.ts @@ -13,7 +13,8 @@ import { * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { ToolsPanelItem, diff --git a/packages/components/src/truncate/component.tsx b/packages/components/src/truncate/component.tsx index cd14fd3989e88a..dfe6cd37b3e9a3 100644 --- a/packages/components/src/truncate/component.tsx +++ b/packages/components/src/truncate/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import useTruncate from './hook'; import type { TruncateProps } from './types'; diff --git a/packages/components/src/truncate/hook.ts b/packages/components/src/truncate/hook.ts index 5fac3b83efe3b0..c6afef52c09088 100644 --- a/packages/components/src/truncate/hook.ts +++ b/packages/components/src/truncate/hook.ts @@ -11,7 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import * as styles from './styles'; import { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils'; import { useCx } from '../utils/hooks/use-cx'; diff --git a/packages/components/src/ui/shortcut/component.tsx b/packages/components/src/ui/shortcut/component.tsx index b48f8d385a3147..f6131428a2546f 100644 --- a/packages/components/src/ui/shortcut/component.tsx +++ b/packages/components/src/ui/shortcut/component.tsx @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - useContextSystem, - contextConnect, - WordPressComponentProps, -} from '../context'; +import type { WordPressComponentProps } from '../context'; +import { useContextSystem, contextConnect } from '../context'; import { View } from '../../view'; export interface ShortcutDescription { diff --git a/packages/components/src/utils/hooks/use-cx.ts b/packages/components/src/utils/hooks/use-cx.ts index 19bc0a797d1279..f12b2a3a5a6c5d 100644 --- a/packages/components/src/utils/hooks/use-cx.ts +++ b/packages/components/src/utils/hooks/use-cx.ts @@ -5,7 +5,9 @@ import { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react'; import type { SerializedStyles } from '@emotion/serialize'; import { insertStyles } from '@emotion/utils'; // eslint-disable-next-line no-restricted-imports -import { cx as innerCx, ClassNamesArg } from '@emotion/css'; +import type { ClassNamesArg } from '@emotion/css'; +// eslint-disable-next-line no-restricted-imports +import { cx as innerCx } from '@emotion/css'; /** * WordPress dependencies diff --git a/packages/components/src/v-stack/component.tsx b/packages/components/src/v-stack/component.tsx index aa24673db1677f..5c51043eba7261 100644 --- a/packages/components/src/v-stack/component.tsx +++ b/packages/components/src/v-stack/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useVStack } from './hook'; import type { VStackProps } from './types'; diff --git a/packages/components/src/v-stack/hook.ts b/packages/components/src/v-stack/hook.ts index 0196eef36130c5..f9c592e8f02851 100644 --- a/packages/components/src/v-stack/hook.ts +++ b/packages/components/src/v-stack/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { useHStack } from '../h-stack'; import type { VStackProps } from './types'; diff --git a/packages/components/src/visually-hidden/component.tsx b/packages/components/src/visually-hidden/component.tsx index ffaa7f564019b2..c5cb9c0fd00677 100644 --- a/packages/components/src/visually-hidden/component.tsx +++ b/packages/components/src/visually-hidden/component.tsx @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - useContextSystem, - contextConnect, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem, contextConnect } from '../ui/context'; import { visuallyHidden } from './styles'; import { View } from '../view'; import type { VisuallyHiddenProps } from './types'; diff --git a/packages/compose/src/higher-order/with-instance-id/index.tsx b/packages/compose/src/higher-order/with-instance-id/index.tsx index d4802f66b56d0c..f2e78e7a80cfc4 100644 --- a/packages/compose/src/higher-order/with-instance-id/index.tsx +++ b/packages/compose/src/higher-order/with-instance-id/index.tsx @@ -1,11 +1,11 @@ /** * Internal dependencies */ -import { - createHigherOrderComponent, +import type { WithInjectedProps, WithoutInjectedProps, } from '../../utils/create-higher-order-component'; +import { createHigherOrderComponent } from '../../utils/create-higher-order-component'; import useInstanceId from '../../hooks/use-instance-id'; type InstanceIdProps = { instanceId: string | number }; diff --git a/packages/compose/src/higher-order/with-safe-timeout/index.tsx b/packages/compose/src/higher-order/with-safe-timeout/index.tsx index d15b8a72d41eab..73e8faec6c1011 100644 --- a/packages/compose/src/higher-order/with-safe-timeout/index.tsx +++ b/packages/compose/src/higher-order/with-safe-timeout/index.tsx @@ -6,11 +6,11 @@ import { Component } from '@wordpress/element'; /** * Internal dependencies */ -import { - createHigherOrderComponent, +import type { WithInjectedProps, WithoutInjectedProps, } from '../../utils/create-higher-order-component'; +import { createHigherOrderComponent } from '../../utils/create-higher-order-component'; /** * We cannot use the `Window['setTimeout']` and `Window['clearTimeout']` diff --git a/packages/redux-routine/src/runtime.ts b/packages/redux-routine/src/runtime.ts index 8710bc0236f159..741a942fa01885 100644 --- a/packages/redux-routine/src/runtime.ts +++ b/packages/redux-routine/src/runtime.ts @@ -1,7 +1,8 @@ /** * External dependencies */ -import { create, Control } from 'rungen'; +import type { Control } from 'rungen'; +import { create } from 'rungen'; import isPromise from 'is-promise'; import type { Dispatch, AnyAction } from 'redux'; diff --git a/packages/report-flaky-tests/src/__tests__/markdown.test.ts b/packages/report-flaky-tests/src/__tests__/markdown.test.ts index a4a1727029a787..4a0fa73f354924 100644 --- a/packages/report-flaky-tests/src/__tests__/markdown.test.ts +++ b/packages/report-flaky-tests/src/__tests__/markdown.test.ts @@ -15,7 +15,7 @@ import { renderCommitComment, isReportComment, } from '../markdown'; -import { ReportedIssue } from '../types'; +import type { ReportedIssue } from '../types'; jest.useFakeTimers( 'modern' ).setSystemTime( new Date( '2020-05-10' ) ); diff --git a/test/storybook-playwright/playwright.config.ts b/test/storybook-playwright/playwright.config.ts index eabe9b17121f2d..091398371e902b 100644 --- a/test/storybook-playwright/playwright.config.ts +++ b/test/storybook-playwright/playwright.config.ts @@ -1,7 +1,7 @@ /** * External dependencies */ -import { PlaywrightTestConfig } from '@playwright/test'; +import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { outputDir: 'test-results/output',