From 5c379948f2e7935f040e3199a3ba51e5d86582ab Mon Sep 17 00:00:00 2001 From: atomiks Date: Tue, 24 Dec 2024 16:53:32 +1100 Subject: [PATCH] Remove unused imports --- packages/react/src/menu/popup/MenuPopup.tsx | 3 --- packages/react/src/popover/popup/PopoverPopup.tsx | 3 --- packages/react/src/preview-card/popup/PreviewCardPopup.tsx | 3 --- packages/react/src/select/popup/SelectPopup.tsx | 3 --- packages/react/src/tooltip/popup/TooltipPopup.tsx | 3 --- 5 files changed, 15 deletions(-) diff --git a/packages/react/src/menu/popup/MenuPopup.tsx b/packages/react/src/menu/popup/MenuPopup.tsx index c7886d9760..00e093d482 100644 --- a/packages/react/src/menu/popup/MenuPopup.tsx +++ b/packages/react/src/menu/popup/MenuPopup.tsx @@ -14,7 +14,6 @@ import type { TransitionStatus } from '../../utils/useTransitionStatus'; import { popupStateMapping as baseMapping } from '../../utils/popupStateMapping'; import { mergeReactProps } from '../../utils/mergeReactProps'; import { transitionStatusMapping } from '../../utils/styleHookMapping'; -import { useThrowIfPortalIsMissing } from '../portal/MenuPortalContext'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, @@ -39,8 +38,6 @@ const MenuPopup = React.forwardRef(function MenuPopup( const { events: menuEvents } = useFloatingTree()!; - useThrowIfPortalIsMissing(); - useMenuPopup({ setOpen, menuEvents, diff --git a/packages/react/src/popover/popup/PopoverPopup.tsx b/packages/react/src/popover/popup/PopoverPopup.tsx index 51dd611e68..5dec881b1c 100644 --- a/packages/react/src/popover/popup/PopoverPopup.tsx +++ b/packages/react/src/popover/popup/PopoverPopup.tsx @@ -16,7 +16,6 @@ import { InteractionType } from '../../utils/useEnhancedClickHandler'; import { refType } from '../../utils/proptypes'; import { mergeReactProps } from '../../utils/mergeReactProps'; import { transitionStatusMapping } from '../../utils/styleHookMapping'; -import { useThrowIfPortalIsMissing } from '../portal/PopoverPortalContext'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, @@ -48,8 +47,6 @@ const PopoverPopup = React.forwardRef(function PopoverPopup( } = usePopoverRootContext(); const positioner = usePopoverPositionerContext(); - useThrowIfPortalIsMissing(); - const { getPopupProps, resolvedInitialFocus } = usePopoverPopup({ getProps: getRootPopupProps, titleId, diff --git a/packages/react/src/preview-card/popup/PreviewCardPopup.tsx b/packages/react/src/preview-card/popup/PreviewCardPopup.tsx index 13316ebcd4..7f39e66324 100644 --- a/packages/react/src/preview-card/popup/PreviewCardPopup.tsx +++ b/packages/react/src/preview-card/popup/PreviewCardPopup.tsx @@ -13,7 +13,6 @@ import { popupStateMapping as baseMapping } from '../../utils/popupStateMapping' import type { TransitionStatus } from '../../utils/useTransitionStatus'; import { mergeReactProps } from '../../utils/mergeReactProps'; import { transitionStatusMapping } from '../../utils/styleHookMapping'; -import { useThrowIfPortalIsMissing } from '../portal/PreviewCardPortalContext'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, @@ -35,8 +34,6 @@ const PreviewCardPopup = React.forwardRef(function PreviewCardPopup( const { open, transitionStatus, getRootPopupProps, popupRef } = usePreviewCardRootContext(); const { side, align } = usePreviewCardPositionerContext(); - useThrowIfPortalIsMissing(); - const { getPopupProps } = usePreviewCardPopup({ getProps: getRootPopupProps, }); diff --git a/packages/react/src/select/popup/SelectPopup.tsx b/packages/react/src/select/popup/SelectPopup.tsx index 00fd6a7799..a7c9caec9e 100644 --- a/packages/react/src/select/popup/SelectPopup.tsx +++ b/packages/react/src/select/popup/SelectPopup.tsx @@ -14,7 +14,6 @@ import type { TransitionStatus } from '../../utils/useTransitionStatus'; import { useSelectPositionerContext } from '../positioner/SelectPositionerContext'; import { mergeReactProps } from '../../utils/mergeReactProps'; import { transitionStatusMapping } from '../../utils/styleHookMapping'; -import { useThrowIfPortalIsMissing } from '../portal/SelectPortalContext'; const customStyleHookMapping: CustomStyleHookMapping = { ...popupStateMapping, @@ -36,8 +35,6 @@ const SelectPopup = React.forwardRef(function SelectPopup( const { id, open, popupRef, transitionStatus, alignItemToTrigger, mounted, modal } = useSelectRootContext(); - useThrowIfPortalIsMissing(); - const positioner = useSelectPositionerContext(); const { getPopupProps } = useSelectPopup(); diff --git a/packages/react/src/tooltip/popup/TooltipPopup.tsx b/packages/react/src/tooltip/popup/TooltipPopup.tsx index e63898b6bf..e0e3951462 100644 --- a/packages/react/src/tooltip/popup/TooltipPopup.tsx +++ b/packages/react/src/tooltip/popup/TooltipPopup.tsx @@ -12,7 +12,6 @@ import { popupStateMapping as baseMapping } from '../../utils/popupStateMapping' import type { TransitionStatus } from '../../utils/useTransitionStatus'; import { mergeReactProps } from '../../utils/mergeReactProps'; import { transitionStatusMapping } from '../../utils/styleHookMapping'; -import { useThrowIfPortalIsMissing } from '../portal/TooltipPortalContext'; const customStyleHookMapping: CustomStyleHookMapping = { ...baseMapping, @@ -35,8 +34,6 @@ const TooltipPopup = React.forwardRef(function TooltipPopup( useTooltipRootContext(); const { side, align } = useTooltipPositionerContext(); - useThrowIfPortalIsMissing(); - const state: TooltipPopup.State = React.useMemo( () => ({ open,