From c795ac97598dfb6fd4b0e1ec6fc582dd3ed30206 Mon Sep 17 00:00:00 2001 From: Alex Page Date: Mon, 13 Mar 2023 20:08:25 +1100 Subject: [PATCH] npx react-codemod update-react-imports polaris-react/src --- .../AccountConnection/AccountConnection.stories.tsx | 2 +- .../components/AccountConnection/AccountConnection.tsx | 2 +- .../AccountConnection/tests/AccountConnection.test.tsx | 1 - .../src/components/ActionList/ActionList.stories.tsx | 2 +- polaris-react/src/components/ActionList/ActionList.tsx | 2 +- .../src/components/ActionList/components/Item/Item.tsx | 2 +- .../ActionList/components/Item/tests/Item.test.tsx | 1 - .../ActionList/components/Section/Section.tsx | 2 -- .../components/Section/tests/Section.test.tsx | 1 - .../components/ActionList/tests/ActionList.test.tsx | 1 - polaris-react/src/components/ActionMenu/ActionMenu.tsx | 2 -- .../ActionMenu/components/Actions/Actions.tsx | 2 +- .../components/Actions/tests/Actions.test.tsx | 2 +- .../ActionMenu/components/MenuGroup/MenuGroup.tsx | 2 +- .../components/MenuGroup/tests/MenuGroup.test.tsx | 1 - .../components/RollupActions/RollupActions.tsx | 1 - .../RollupActions/tests/RollupActions.test.tsx | 1 - .../components/SecondaryAction/SecondaryAction.tsx | 3 ++- .../components/ActionMenu/tests/ActionMenu.test.tsx | 1 - .../components/AfterInitialMount/AfterInitialMount.tsx | 2 +- .../AfterInitialMount/test/AfterInitialMount.test.tsx | 2 +- .../src/components/AppProvider/AppProvider.stories.tsx | 2 +- .../src/components/AppProvider/AppProvider.tsx | 3 ++- .../components/AppProvider/tests/AppProvider.test.tsx | 3 ++- .../components/Autocomplete/Autocomplete.stories.tsx | 2 +- .../src/components/Autocomplete/Autocomplete.tsx | 3 ++- .../components/MappedAction/MappedAction.tsx | 3 ++- .../MappedAction/tests/MappedAction.test.tsx | 1 - .../components/MappedOption/MappedOption.tsx | 2 +- .../MappedOption/tests/MappedOption.test.tsx | 1 - .../Autocomplete/tests/Autocomplete.test.tsx | 1 - polaris-react/src/components/Avatar/Avatar.stories.tsx | 2 +- polaris-react/src/components/Avatar/Avatar.tsx | 2 +- .../src/components/Avatar/tests/Avatar-ssr.test.tsx | 1 - .../src/components/Avatar/tests/Avatar.test.tsx | 1 - polaris-react/src/components/Backdrop/Backdrop.tsx | 2 +- .../src/components/Backdrop/tests/Backdrop.test.tsx | 1 - polaris-react/src/components/Badge/Badge.stories.tsx | 1 - polaris-react/src/components/Badge/Badge.tsx | 2 +- .../src/components/Badge/components/Pip/Pip.tsx | 2 -- .../src/components/Badge/tests/Badge.test.tsx | 1 - polaris-react/src/components/Banner/Banner.stories.tsx | 2 +- polaris-react/src/components/Banner/Banner.tsx | 9 ++------- .../src/components/Banner/tests/Banner.test.tsx | 3 ++- polaris-react/src/components/Bleed/Bleed.stories.tsx | 1 - polaris-react/src/components/Bleed/Bleed.tsx | 2 +- .../src/components/Bleed/tests/Bleed.test.tsx | 2 +- polaris-react/src/components/Box/Box.stories.tsx | 1 - polaris-react/src/components/Box/Box.tsx | 3 ++- polaris-react/src/components/Box/tests/Box.test.tsx | 2 +- .../src/components/Breadcrumbs/Breadcrumbs.tsx | 1 - .../components/Breadcrumbs/tests/Breadcrumbs.test.tsx | 1 - .../src/components/BulkActions/BulkActions.tsx | 2 +- .../components/BulkActionButton/BulkActionButton.tsx | 2 +- .../components/BulkActionMenu/BulkActionMenu.tsx | 2 -- .../BulkActionMenu/tests/BulkActionMenu.test.tsx | 1 - .../hooks/tests/use-is-bulk-actions-sticky.test.tsx | 1 - .../components/BulkActions/tests/BulkActions.test.tsx | 1 - polaris-react/src/components/Button/Button.stories.tsx | 2 +- polaris-react/src/components/Button/Button.tsx | 3 ++- .../src/components/Button/tests/Button.test.tsx | 1 - polaris-react/src/components/Button/utils.tsx | 2 +- .../src/components/ButtonGroup/ButtonGroup.stories.tsx | 1 - .../src/components/ButtonGroup/ButtonGroup.tsx | 2 +- .../components/ButtonGroup/components/Item/Item.tsx | 2 +- .../ButtonGroup/components/Item/tests/Item.test.tsx | 1 - .../components/ButtonGroup/tests/ButtonGroup.test.tsx | 1 - .../src/components/CalloutCard/CalloutCard.stories.tsx | 1 - .../src/components/CalloutCard/CalloutCard.tsx | 2 +- .../components/CalloutCard/tests/CalloutCard.test.tsx | 1 - polaris-react/src/components/Card/Card.stories.tsx | 1 - polaris-react/src/components/Card/Card.tsx | 2 +- polaris-react/src/components/Card/tests/Card.test.tsx | 1 - .../src/components/CheckableButton/CheckableButton.tsx | 2 +- .../CheckableButton/tests/CheckableButton.test.tsx | 1 - .../src/components/Checkbox/Checkbox.stories.tsx | 2 +- polaris-react/src/components/Checkbox/Checkbox.tsx | 9 ++------- .../src/components/Checkbox/tests/Checkbox.test.tsx | 2 +- polaris-react/src/components/Choice/Choice.tsx | 2 +- .../src/components/Choice/tests/Choice.test.tsx | 1 - .../src/components/ChoiceList/ChoiceList.stories.tsx | 2 +- polaris-react/src/components/ChoiceList/ChoiceList.tsx | 3 ++- .../components/ChoiceList/tests/ChoiceList.test.tsx | 1 - .../src/components/Collapsible/Collapsible.stories.tsx | 2 +- .../src/components/Collapsible/Collapsible.tsx | 3 ++- .../components/Collapsible/tests/Collapsible.test.tsx | 1 - .../src/components/ColorPicker/ColorPicker.stories.tsx | 2 +- .../src/components/ColorPicker/ColorPicker.tsx | 3 ++- .../ColorPicker/components/AlphaPicker/AlphaPicker.tsx | 2 +- .../components/AlphaPicker/tests/AlphaPicker.test.tsx | 1 - .../ColorPicker/components/HuePicker/HuePicker.tsx | 2 +- .../components/HuePicker/tests/HuePicker.test.tsx | 1 - .../ColorPicker/components/Slidable/Slidable.tsx | 3 ++- .../components/Slidable/tests/Slidable.test.tsx | 1 - .../ColorPicker/tests/ColorPicker-ssr.test.tsx | 1 - .../components/ColorPicker/tests/ColorPicker.test.tsx | 1 - .../src/components/Columns/Columns.stories.tsx | 1 - polaris-react/src/components/Columns/Columns.tsx | 2 +- .../src/components/Columns/tests/Columns.test.tsx | 2 +- .../src/components/Combobox/Combobox.stories.tsx | 2 +- polaris-react/src/components/Combobox/Combobox.tsx | 3 ++- .../Combobox/components/TextField/TextField.tsx | 3 ++- .../components/TextField/tests/TextField.test.tsx | 1 - .../src/components/Combobox/tests/Combobox.test.tsx | 1 - polaris-react/src/components/Connected/Connected.tsx | 2 +- .../src/components/Connected/components/Item/Item.tsx | 2 +- .../src/components/Connected/tests/Connected.test.tsx | 1 - .../ContextualSaveBar/ContextualSaveBar.stories.tsx | 1 - .../ContextualSaveBar/tests/ContextualSaveBar.test.tsx | 1 - .../src/components/DataTable/DataTable.stories.tsx | 2 +- polaris-react/src/components/DataTable/DataTable.tsx | 8 ++------ .../src/components/DataTable/components/Cell/Cell.tsx | 3 ++- .../DataTable/components/Cell/tests/Cell.test.tsx | 2 +- .../DataTable/components/Navigation/Navigation.tsx | 1 - .../components/Navigation/tests/Navigation.test.tsx | 1 - .../src/components/DataTable/tests/DataTable.test.tsx | 1 - .../src/components/DatePicker/DatePicker.stories.tsx | 2 +- polaris-react/src/components/DatePicker/DatePicker.tsx | 3 ++- .../src/components/DatePicker/components/Day/Day.tsx | 2 +- .../DatePicker/components/Day/tests/Day.test.tsx | 2 +- .../components/DatePicker/components/Month/Month.tsx | 2 +- .../DatePicker/components/Month/tests/Month.test.tsx | 1 - .../DatePicker/components/Weekday/Weekday.tsx | 2 +- .../components/Weekday/tests/Weekday.test.tsx | 1 - .../components/DatePicker/tests/DatePicker.test.tsx | 1 - .../DescriptionList/DescriptionList.stories.tsx | 1 - .../src/components/DescriptionList/DescriptionList.tsx | 2 +- .../DescriptionList/tests/DescriptionList.test.tsx | 1 - .../src/components/Divider/Divider.stories.tsx | 1 - polaris-react/src/components/Divider/Divider.tsx | 2 +- .../src/components/Divider/tests/Divider.test.tsx | 2 +- .../src/components/DropZone/DropZone.stories.tsx | 2 +- polaris-react/src/components/DropZone/DropZone.tsx | 4 +++- .../DropZone/components/FileUpload/FileUpload.tsx | 2 +- .../components/FileUpload/tests/FileUpload.test.tsx | 1 - .../src/components/DropZone/tests/DropZone.test.tsx | 1 - .../components/EmptySearchResult/EmptySearchResult.tsx | 2 -- .../EmptySearchResult/tests/EmptySearchResult.test.tsx | 1 - .../src/components/EmptyState/EmptyState.stories.tsx | 1 - polaris-react/src/components/EmptyState/EmptyState.tsx | 3 ++- .../components/EmptyState/tests/EmptyState.test.tsx | 1 - .../EphemeralPresenceManager.tsx | 3 ++- .../tests/EphemeralPresenceManager.test.tsx | 1 - .../EventListener/tests/EventListener.test.tsx | 1 - .../components/ExceptionList/ExceptionList.stories.tsx | 1 - .../src/components/ExceptionList/ExceptionList.tsx | 3 ++- .../ExceptionList/tests/ExceptionList.test.tsx | 1 - .../src/components/Filters/Filters.stories.tsx | 2 +- polaris-react/src/components/Filters/Filters.tsx | 3 ++- .../ConnectedFilterControl/ConnectedFilterControl.tsx | 3 ++- .../ConnectedFilterControl/components/Item/Item.tsx | 2 +- .../components/Item/tests/Item.test.tsx | 1 - .../tests/ConnectedFilterControl.test.tsx | 1 - .../Filters/components/TagsWrapper/TagsWrapper.tsx | 2 +- .../components/TagsWrapper/tests/TagsWrapper.test.tsx | 1 - .../src/components/Filters/tests/Filters.test.tsx | 1 - polaris-react/src/components/Focus/Focus.tsx | 3 ++- .../src/components/Focus/tests/Focus.test.tsx | 2 +- .../src/components/FocusManager/FocusManager.tsx | 3 ++- .../FocusManager/tests/FocusManager.test.tsx | 2 +- .../src/components/FooterHelp/FooterHelp.stories.tsx | 1 - polaris-react/src/components/FooterHelp/FooterHelp.tsx | 2 +- .../components/FooterHelp/tests/FooterHelp.test.tsx | 1 - polaris-react/src/components/Form/Form.stories.tsx | 2 +- polaris-react/src/components/Form/Form.tsx | 3 ++- polaris-react/src/components/Form/tests/Form.test.tsx | 1 - .../src/components/FormLayout/FormLayout.stories.tsx | 1 - polaris-react/src/components/FormLayout/FormLayout.tsx | 3 ++- .../components/FormLayout/components/Group/Group.tsx | 3 ++- .../FormLayout/components/Group/tests/Group.test.tsx | 1 - .../src/components/FormLayout/components/Item/Item.tsx | 2 +- .../FormLayout/components/Item/tests/Item.test.tsx | 1 - .../components/FormLayout/tests/FormLayout.test.tsx | 1 - polaris-react/src/components/Frame/Frame.stories.tsx | 2 +- polaris-react/src/components/Frame/Frame.tsx | 3 ++- .../Frame/components/CSSAnimation/CSSAnimation.tsx | 3 ++- .../components/ContextualSaveBar/ContextualSaveBar.tsx | 2 +- .../DiscardConfirmationModal.tsx | 2 -- .../tests/DiscardConfirmationModal.test.tsx | 1 - .../ContextualSaveBar/tests/ContextualSaveBar.test.tsx | 1 - .../components/Frame/components/Loading/Loading.tsx | 2 +- .../Frame/components/Loading/tests/Loading.test.tsx | 1 - .../src/components/Frame/components/Toast/Toast.tsx | 2 +- .../Frame/components/Toast/tests/Toast.test.tsx | 1 - .../Frame/components/ToastManager/ToastManager.tsx | 3 ++- .../ToastManager/tests/ToastManager.test.tsx | 1 - .../src/components/Frame/tests/Frame.test.tsx | 2 +- .../components/FullscreenBar/FullscreenBar.stories.tsx | 2 +- .../src/components/FullscreenBar/FullscreenBar.tsx | 2 +- .../FullscreenBar/tests/FullscreenBar.test.tsx | 1 - polaris-react/src/components/Grid/Grid.stories.tsx | 1 - polaris-react/src/components/Grid/Grid.tsx | 3 ++- .../src/components/Grid/components/Cell/Cell.tsx | 2 +- .../Grid/components/Cell/tests/Cell.test.tsx | 2 +- polaris-react/src/components/Grid/tests/Grid.test.tsx | 2 +- polaris-react/src/components/Icon/Icon.stories.tsx | 1 - polaris-react/src/components/Icon/Icon.tsx | 2 -- polaris-react/src/components/Icon/tests/Icon.test.tsx | 1 - polaris-react/src/components/Image/Image.tsx | 3 ++- .../src/components/Image/tests/Image.test.tsx | 1 - .../src/components/IndexProvider/IndexProvider.tsx | 2 +- .../IndexProvider/tests/IndexProvider.test.tsx | 1 - .../src/components/IndexTable/IndexTable.stories.tsx | 2 +- polaris-react/src/components/IndexTable/IndexTable.tsx | 3 ++- .../src/components/IndexTable/components/Cell/Cell.tsx | 2 +- .../IndexTable/components/Cell/tests/Cell.test.tsx | 2 +- .../IndexTable/components/Checkbox/Checkbox.tsx | 10 +--------- .../components/Checkbox/tests/Checkbox.test.tsx | 2 +- .../src/components/IndexTable/components/Row/Row.tsx | 3 ++- .../IndexTable/components/Row/tests/Row.test.tsx | 3 ++- .../components/ScrollContainer/ScrollContainer.tsx | 3 ++- .../ScrollContainer/tests/ScrollContainer.test.tsx | 6 +++--- .../components/IndexTable/tests/IndexTable.test.tsx | 1 - polaris-react/src/components/Indicator/Indicator.tsx | 2 -- .../src/components/Indicator/tests/Indicator.test.tsx | 1 - polaris-react/src/components/Inline/Inline.stories.tsx | 1 - polaris-react/src/components/Inline/Inline.tsx | 2 +- .../src/components/Inline/tests/Inline.test.tsx | 2 +- polaris-react/src/components/InlineCode/InlineCode.tsx | 2 +- .../components/InlineCode/tests/InlineCode.test.tsx | 1 - .../src/components/InlineError/InlineError.stories.tsx | 1 - .../src/components/InlineError/InlineError.tsx | 1 - .../components/InlineError/tests/InlineError.test.tsx | 1 - .../src/components/KeyboardKey/KeyboardKey.stories.tsx | 1 - .../src/components/KeyboardKey/KeyboardKey.tsx | 2 -- .../components/KeyboardKey/tests/KeyboardKey.test.tsx | 1 - .../KeypressListener/tests/KeypressListener.test.tsx | 1 - polaris-react/src/components/Label/Label.tsx | 2 +- .../src/components/Label/tests/Label.test.tsx | 1 - polaris-react/src/components/Labelled/Labelled.tsx | 2 +- .../src/components/Labelled/tests/Labelled.test.tsx | 1 - polaris-react/src/components/Layout/Layout.stories.tsx | 1 - polaris-react/src/components/Layout/Layout.tsx | 2 +- .../components/AnnotatedSection/AnnotatedSection.tsx | 2 +- .../components/Layout/components/Section/Section.tsx | 2 +- .../src/components/Layout/tests/Layout.test.tsx | 1 - .../src/components/LegacyCard/LegacyCard.stories.tsx | 1 - polaris-react/src/components/LegacyCard/LegacyCard.tsx | 2 +- .../components/LegacyCard/components/Header/Header.tsx | 3 ++- .../LegacyCard/components/Header/tests/Header.test.tsx | 1 - .../LegacyCard/components/Section/Section.tsx | 2 +- .../components/Section/tests/Section.test.tsx | 1 - .../LegacyCard/components/Subsection/Subsection.tsx | 2 +- .../components/Subsection/tests/Subsection.test.tsx | 1 - .../components/LegacyCard/tests/LegacyCard.test.tsx | 1 - .../src/components/LegacyStack/LegacyStack.stories.tsx | 1 - .../src/components/LegacyStack/LegacyStack.tsx | 3 ++- .../components/LegacyStack/components/Item/Item.tsx | 2 +- .../components/LegacyStack/tests/LegacyStack.test.tsx | 1 - polaris-react/src/components/Link/Link.stories.tsx | 1 - polaris-react/src/components/Link/Link.tsx | 2 +- polaris-react/src/components/Link/tests/Link.test.tsx | 1 - polaris-react/src/components/List/List.stories.tsx | 1 - polaris-react/src/components/List/List.tsx | 2 +- .../src/components/List/components/Item/Item.tsx | 2 +- .../List/components/Item/tests/Item.test.tsx | 1 - polaris-react/src/components/List/tests/List.test.tsx | 1 - .../src/components/Listbox/Listbox.stories.tsx | 2 +- polaris-react/src/components/Listbox/Listbox.tsx | 4 +++- .../components/Listbox/components/Action/Action.tsx | 2 -- .../Listbox/components/Action/tests/Action.test.tsx | 1 - .../components/Listbox/components/Header/Header.tsx | 2 +- .../Listbox/components/Header/tests/Header.test.tsx | 1 - .../components/Listbox/components/Loading/Loading.tsx | 3 ++- .../Listbox/components/Loading/tests/Loading.test.tsx | 1 - .../components/Listbox/components/Option/Option.tsx | 3 ++- .../Listbox/components/Option/tests/Option.test.tsx | 2 +- .../components/Listbox/components/Section/Section.tsx | 2 +- .../Listbox/components/Section/tests/Section.test.tsx | 1 - .../Listbox/components/TextOption/TextOption.tsx | 3 ++- .../components/TextOption/tests/TextOption.test.tsx | 1 - .../src/components/Listbox/tests/Listbox.test.tsx | 1 - .../src/components/Loading/Loading.stories.tsx | 1 - .../src/components/Loading/tests/Loading.test.tsx | 1 - .../src/components/MediaCard/MediaCard.stories.tsx | 1 - polaris-react/src/components/MediaCard/MediaCard.tsx | 2 +- .../src/components/MediaCard/tests/MediaCard.test.tsx | 1 - .../MediaQueryProvider/MediaQueryProvider.tsx | 3 ++- .../tests/MediaQueryProvider.test.tsx | 1 - .../components/MessageIndicator/MessageIndicator.tsx | 2 +- .../MessageIndicator/tests/MessageIndicator.test.tsx | 1 - polaris-react/src/components/Modal/Modal.stories.tsx | 2 +- polaris-react/src/components/Modal/Modal.tsx | 3 ++- .../Modal/components/CloseButton/CloseButton.tsx | 1 - .../src/components/Modal/components/Dialog/Dialog.tsx | 3 ++- .../Modal/components/Dialog/tests/Dialog.test.tsx | 1 - .../src/components/Modal/components/Footer/Footer.tsx | 2 +- .../src/components/Modal/components/Header/Header.tsx | 2 +- .../components/Modal/components/Section/Section.tsx | 2 +- .../src/components/Modal/tests/Modal.test.tsx | 3 ++- .../src/components/Navigation/Navigation.stories.tsx | 1 - polaris-react/src/components/Navigation/Navigation.tsx | 3 ++- .../src/components/Navigation/components/Item/Item.tsx | 10 +--------- .../components/Item/components/Secondary/Secondary.tsx | 3 ++- .../Item/components/Secondary/tests/Secondary.test.tsx | 1 - .../Navigation/components/Item/tests/Item.test.tsx | 2 +- .../Navigation/components/Section/Section.tsx | 2 +- .../components/Section/tests/Section.test.tsx | 2 +- .../components/Navigation/tests/Navigation.test.tsx | 2 +- .../src/components/OptionList/OptionList.stories.tsx | 2 +- polaris-react/src/components/OptionList/OptionList.tsx | 2 +- .../OptionList/components/Checkbox/Checkbox.tsx | 2 +- .../components/Checkbox/tests/Checkbox.test.tsx | 1 - .../components/OptionList/components/Option/Option.tsx | 3 ++- .../OptionList/components/Option/tests/Option.test.tsx | 1 - .../components/OptionList/tests/OptionList.test.tsx | 1 - polaris-react/src/components/Page/Page.stories.tsx | 1 - polaris-react/src/components/Page/Page.tsx | 2 +- .../src/components/Page/components/Header/Header.tsx | 2 +- .../Page/components/Header/components/Title/Title.tsx | 2 +- .../Header/components/Title/tests/Title.test.tsx | 1 - .../Page/components/Header/tests/Header.test.tsx | 1 - polaris-react/src/components/Page/tests/Page.test.tsx | 2 +- .../src/components/PageActions/PageActions.stories.tsx | 1 - .../src/components/PageActions/PageActions.tsx | 2 +- .../components/PageActions/tests/PageActions.test.tsx | 1 - .../src/components/Pagination/Pagination.stories.tsx | 1 - polaris-react/src/components/Pagination/Pagination.tsx | 3 ++- .../components/Pagination/tests/Pagination.test.tsx | 1 - .../PolarisTestProvider/PolarisTestProvider.tsx | 3 ++- .../tests/PolarisTestProvider.test.tsx | 2 +- .../src/components/Popover/Popover.stories.tsx | 3 ++- polaris-react/src/components/Popover/Popover.tsx | 4 +++- .../src/components/Popover/components/Pane/Pane.tsx | 2 +- .../Popover/components/Pane/tests/Pane.test.tsx | 1 - .../components/PopoverOverlay/PopoverOverlay.tsx | 3 ++- .../PopoverOverlay/tests/PopoverOverlay.test.tsx | 4 ++-- .../components/Popover/components/Section/Section.tsx | 2 +- .../Popover/components/Section/tests/Section.test.tsx | 1 - .../src/components/Popover/tests/Popover.test.tsx | 3 ++- polaris-react/src/components/Portal/Portal.tsx | 3 ++- .../src/components/Portal/tests/Portal.test.tsx | 1 - .../src/components/PortalsManager/PortalsManager.tsx | 3 ++- .../components/PortalsContainer/PortalsContainer.tsx | 2 +- .../PortalsManager/tests/PortalsManager.test.tsx | 1 - .../components/PositionedOverlay/PositionedOverlay.tsx | 3 ++- .../PositionedOverlay/tests/PositionedOverlay.test.tsx | 2 +- .../src/components/ProgressBar/ProgressBar.stories.tsx | 1 - .../src/components/ProgressBar/ProgressBar.tsx | 3 ++- .../components/ProgressBar/tests/ProgressBar.test.tsx | 2 +- .../src/components/RadioButton/RadioButton.stories.tsx | 2 +- .../src/components/RadioButton/RadioButton.tsx | 3 ++- .../components/RadioButton/tests/RadioButton.test.tsx | 1 - .../src/components/RangeSlider/RangeSlider.stories.tsx | 2 +- .../src/components/RangeSlider/RangeSlider.tsx | 2 +- .../RangeSlider/components/DualThumb/DualThumb.tsx | 3 ++- .../components/DualThumb/tests/DualThumb.test.tsx | 1 - .../RangeSlider/components/SingleThumb/SingleThumb.tsx | 2 +- .../components/SingleThumb/tests/SingleThumb.test.tsx | 1 - .../components/RangeSlider/tests/RangeSlider.test.tsx | 1 - .../components/ResourceItem/ResourceItem.stories.tsx | 2 +- .../src/components/ResourceItem/ResourceItem.tsx | 3 ++- .../ResourceItem/tests/ResourceItem.test.tsx | 2 +- .../components/ResourceList/ResourceList.stories.tsx | 2 +- .../src/components/ResourceList/ResourceList.tsx | 10 ++-------- .../ResourceList/tests/ResourceList.test.tsx | 1 - .../components/ScrollLock/tests/ScrollLock.test.tsx | 2 +- .../src/components/Scrollable/Scrollable.stories.tsx | 2 +- polaris-react/src/components/Scrollable/Scrollable.tsx | 10 ++-------- .../Scrollable/components/ScrollTo/ScrollTo.tsx | 2 +- .../components/ScrollTo/tests/ScrollTo.test.tsx | 1 - .../components/Scrollable/tests/Scrollable.test.tsx | 2 +- polaris-react/src/components/Select/Select.stories.tsx | 2 +- polaris-react/src/components/Select/Select.tsx | 3 ++- .../src/components/Select/tests/Select.test.tsx | 1 - .../components/SelectAllActions/SelectAllActions.tsx | 2 +- .../SelectAllActions/tests/SelectAllActions.test.tsx | 1 - .../src/components/SettingAction/SettingAction.tsx | 2 +- .../components/SettingToggle/SettingToggle.stories.tsx | 2 +- .../src/components/SettingToggle/SettingToggle.tsx | 3 ++- .../SettingToggle/tests/SettingToggle.test.tsx | 2 +- polaris-react/src/components/Sheet/Sheet.stories.tsx | 3 ++- polaris-react/src/components/Sheet/Sheet.tsx | 3 ++- .../src/components/Sheet/tests/Sheet.test.tsx | 2 +- .../SkeletonBodyText/SkeletonBodyText.stories.tsx | 1 - .../components/SkeletonBodyText/SkeletonBodyText.tsx | 2 -- .../SkeletonBodyText/tests/SkeletonBodyText.test.tsx | 1 - .../SkeletonDisplayText.stories.tsx | 1 - .../SkeletonDisplayText/SkeletonDisplayText.tsx | 2 -- .../tests/SkeletonDisplayText.test.tsx | 1 - .../components/SkeletonPage/SkeletonPage.stories.tsx | 1 - .../src/components/SkeletonPage/SkeletonPage.tsx | 2 +- .../SkeletonPage/tests/SkeletonPage.test.tsx | 1 - .../components/SkeletonTabs/SkeletonTabs.stories.tsx | 1 - .../src/components/SkeletonTabs/SkeletonTabs.tsx | 2 -- .../SkeletonThumbnail/SkeletonThumbnail.stories.tsx | 1 - .../components/SkeletonThumbnail/SkeletonThumbnail.tsx | 2 -- .../SkeletonThumbnail/tests/SkeletonThumbnail.test.tsx | 1 - .../src/components/Spinner/Spinner.stories.tsx | 2 +- polaris-react/src/components/Spinner/Spinner.tsx | 2 -- .../src/components/Spinner/tests/Spinner.test.tsx | 1 - polaris-react/src/components/Stack/Stack.stories.tsx | 1 - polaris-react/src/components/Stack/Stack.tsx | 3 ++- .../src/components/Stack/tests/Stack.test.tsx | 2 +- polaris-react/src/components/Sticky/Sticky.tsx | 3 ++- .../src/components/Sticky/tests/Sticky.test.tsx | 1 - polaris-react/src/components/Tabs/Tabs.stories.tsx | 2 +- polaris-react/src/components/Tabs/Tabs.tsx | 3 ++- .../src/components/Tabs/components/Item/Item.tsx | 3 ++- .../Tabs/components/Item/tests/Item.test.tsx | 1 - .../src/components/Tabs/components/List/List.tsx | 2 +- .../Tabs/components/List/tests/List.test.tsx | 1 - .../src/components/Tabs/components/Panel/Panel.tsx | 2 +- .../Tabs/components/Panel/tests/Panel.test.tsx | 1 - .../src/components/Tabs/components/Tab/Tab.tsx | 3 ++- .../components/Tabs/components/Tab/tests/Tab.test.tsx | 1 - .../Tabs/components/TabMeasurer/TabMeasurer.tsx | 3 ++- .../components/TabMeasurer/tests/TabMeasurer.test.tsx | 1 - polaris-react/src/components/Tabs/tests/Tabs.test.tsx | 2 +- polaris-react/src/components/Tag/Tag.stories.tsx | 2 +- polaris-react/src/components/Tag/Tag.tsx | 2 +- polaris-react/src/components/Tag/tests/Tag.test.tsx | 1 - polaris-react/src/components/Text/Text.stories.tsx | 1 - polaris-react/src/components/Text/Text.tsx | 2 +- polaris-react/src/components/Text/tests/Text.test.tsx | 1 - .../components/TextContainer/TextContainer.stories.tsx | 1 - .../src/components/TextContainer/TextContainer.tsx | 2 +- .../src/components/TextField/TextField.stories.tsx | 2 +- polaris-react/src/components/TextField/TextField.tsx | 10 ++-------- .../TextField/components/Resizer/Resizer.tsx | 2 +- .../components/Resizer/tests/Resizer.test.tsx | 1 - .../TextField/components/Spinner/Spinner.tsx | 2 +- .../components/Spinner/tests/Spinner.test.tsx | 1 - .../src/components/TextField/tests/TextField.test.tsx | 1 - .../src/components/Thumbnail/Thumbnail.stories.tsx | 1 - polaris-react/src/components/Thumbnail/Thumbnail.tsx | 2 +- .../src/components/Thumbnail/tests/Thumbnail.test.tsx | 1 - polaris-react/src/components/Toast/Toast.stories.tsx | 2 +- .../src/components/Toast/tests/Toast.test.tsx | 1 - .../src/components/Tooltip/Tooltip.stories.tsx | 1 - polaris-react/src/components/Tooltip/Tooltip.tsx | 3 ++- .../components/TooltipOverlay/TooltipOverlay.tsx | 2 +- .../TooltipOverlay/tests/TooltipOverlay.test.tsx | 1 - .../src/components/Tooltip/tests/Tooltip.test.tsx | 2 +- polaris-react/src/components/TopBar/TopBar.stories.tsx | 2 +- polaris-react/src/components/TopBar/TopBar.tsx | 2 +- .../src/components/TopBar/components/Menu/Menu.tsx | 2 +- .../components/Menu/components/Message/Message.tsx | 2 -- .../Menu/components/Message/tests/Message.test.tsx | 1 - .../TopBar/components/Menu/tests/Menu.test.tsx | 1 - .../src/components/TopBar/components/Search/Search.tsx | 2 +- .../TopBar/components/Search/tests/Search.test.tsx | 1 - .../SearchDismissOverlay/SearchDismissOverlay.tsx | 3 ++- .../tests/SearchDismissOverlay.test.tsx | 1 - .../TopBar/components/SearchField/SearchField.tsx | 3 ++- .../components/SearchField/tests/SearchField.test.tsx | 1 - .../components/TopBar/components/UserMenu/UserMenu.tsx | 2 -- .../TopBar/components/UserMenu/tests/UserMenu.test.tsx | 1 - .../src/components/TopBar/tests/TopBar.test.tsx | 1 - polaris-react/src/components/TrapFocus/TrapFocus.tsx | 3 ++- .../src/components/TrapFocus/tests/TrapFocus.test.tsx | 1 - polaris-react/src/components/Truncate/Truncate.tsx | 2 +- .../src/components/Truncate/tests/Truncate.test.tsx | 1 - .../src/components/UnstyledButton/UnstyledButton.tsx | 2 +- .../UnstyledButton/tests/UnstyledButton.test.tsx | 1 - polaris-react/src/components/UnstyledButton/utils.tsx | 2 -- .../src/components/UnstyledLink/UnstyledLink.tsx | 2 +- .../UnstyledLink/tests/UnstyledLink.test.tsx | 1 - .../VideoThumbnail/VideoThumbnail.stories.tsx | 1 - .../src/components/VideoThumbnail/VideoThumbnail.tsx | 1 - .../VideoThumbnail/tests/VideoThumbnail.test.tsx | 1 - .../src/utilities/combobox/tests/hook.test.tsx | 1 - polaris-react/src/utilities/components.tsx | 3 ++- .../src/utilities/features/tests/hooks.test.tsx | 1 - .../src/utilities/focus-manager/tests/hooks.test.tsx | 1 - polaris-react/src/utilities/frame/tests/hooks.test.tsx | 2 +- polaris-react/src/utilities/i18n/tests/hooks.test.tsx | 2 +- .../src/utilities/index-provider/tests/hooks.test.tsx | 1 - .../tests/hooks-useContainerScroll.test.tsx | 1 - .../index-table/tests/hooks-useRowHovered.test.tsx | 1 - .../index-table/tests/hooks-useRowSelected.test.tsx | 1 - polaris-react/src/utilities/link/tests/hooks.test.tsx | 2 +- .../src/utilities/media-query/tests/hooks.test.tsx | 2 +- .../src/utilities/portals/tests/hooks.test.tsx | 2 +- .../utilities/scroll-lock-manager/tests/hooks.test.tsx | 2 +- .../src/utilities/sticky-manager/tests/hooks.test.tsx | 2 +- .../src/utilities/tests/is-input-focused.test.tsx | 1 - .../src/utilities/tests/use-breakpoints-ssr.test.tsx | 1 - .../src/utilities/tests/use-breakpoints.test.tsx | 1 - .../utilities/tests/use-component-did-mount.test.tsx | 1 - .../utilities/tests/use-disable-interaction.test.tsx | 1 - .../src/utilities/tests/use-event-listener.test.tsx | 2 +- .../utilities/tests/use-index-resource-state.test.tsx | 1 - .../tests/use-is-after-initial-mount.test.tsx | 1 - .../src/utilities/tests/use-is-mounted-ref.test.tsx | 2 +- .../src/utilities/tests/use-lazy-ref.test.tsx | 2 +- 486 files changed, 349 insertions(+), 561 deletions(-) diff --git a/polaris-react/src/components/AccountConnection/AccountConnection.stories.tsx b/polaris-react/src/components/AccountConnection/AccountConnection.stories.tsx index 3a739793182..ea3f669d9b1 100644 --- a/polaris-react/src/components/AccountConnection/AccountConnection.stories.tsx +++ b/polaris-react/src/components/AccountConnection/AccountConnection.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {AccountConnection, Link} from '@shopify/polaris'; diff --git a/polaris-react/src/components/AccountConnection/AccountConnection.tsx b/polaris-react/src/components/AccountConnection/AccountConnection.tsx index 64790a4a107..6b90cc52a11 100644 --- a/polaris-react/src/components/AccountConnection/AccountConnection.tsx +++ b/polaris-react/src/components/AccountConnection/AccountConnection.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {Action} from '../../types'; import {Avatar} from '../Avatar'; diff --git a/polaris-react/src/components/AccountConnection/tests/AccountConnection.test.tsx b/polaris-react/src/components/AccountConnection/tests/AccountConnection.test.tsx index aac5109963c..f7591d9b7e4 100644 --- a/polaris-react/src/components/AccountConnection/tests/AccountConnection.test.tsx +++ b/polaris-react/src/components/AccountConnection/tests/AccountConnection.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {matchMedia} from '@shopify/jest-dom-mocks'; diff --git a/polaris-react/src/components/ActionList/ActionList.stories.tsx b/polaris-react/src/components/ActionList/ActionList.stories.tsx index f6900faeef7..437778e1c24 100644 --- a/polaris-react/src/components/ActionList/ActionList.stories.tsx +++ b/polaris-react/src/components/ActionList/ActionList.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { ActionList, diff --git a/polaris-react/src/components/ActionList/ActionList.tsx b/polaris-react/src/components/ActionList/ActionList.tsx index 7ec14e87b69..9c3cfb9c469 100644 --- a/polaris-react/src/components/ActionList/ActionList.tsx +++ b/polaris-react/src/components/ActionList/ActionList.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import { useRef } from 'react'; import { wrapFocusNextFocusableMenuItem, diff --git a/polaris-react/src/components/ActionList/components/Item/Item.tsx b/polaris-react/src/components/ActionList/components/Item/Item.tsx index 1f13460adf8..544e10a5b90 100644 --- a/polaris-react/src/components/ActionList/components/Item/Item.tsx +++ b/polaris-react/src/components/ActionList/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import type {ActionListItemDescriptor} from '../../../../types'; diff --git a/polaris-react/src/components/ActionList/components/Item/tests/Item.test.tsx b/polaris-react/src/components/ActionList/components/Item/tests/Item.test.tsx index 5494718b75d..bea01b66f60 100644 --- a/polaris-react/src/components/ActionList/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/ActionList/components/Item/tests/Item.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Item} from '../Item'; diff --git a/polaris-react/src/components/ActionList/components/Section/Section.tsx b/polaris-react/src/components/ActionList/components/Section/Section.tsx index 921d6b83681..3d84749c035 100644 --- a/polaris-react/src/components/ActionList/components/Section/Section.tsx +++ b/polaris-react/src/components/ActionList/components/Section/Section.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {Item} from '../Item'; import {Box} from '../../../Box'; import {Text} from '../../../Text'; diff --git a/polaris-react/src/components/ActionList/components/Section/tests/Section.test.tsx b/polaris-react/src/components/ActionList/components/Section/tests/Section.test.tsx index 90e03ec68d6..f2259961398 100644 --- a/polaris-react/src/components/ActionList/components/Section/tests/Section.test.tsx +++ b/polaris-react/src/components/ActionList/components/Section/tests/Section.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Item} from '../../Item'; diff --git a/polaris-react/src/components/ActionList/tests/ActionList.test.tsx b/polaris-react/src/components/ActionList/tests/ActionList.test.tsx index 14ed6e9cab5..d82dceb53c3 100644 --- a/polaris-react/src/components/ActionList/tests/ActionList.test.tsx +++ b/polaris-react/src/components/ActionList/tests/ActionList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {ImportMinor, ExportMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/ActionMenu/ActionMenu.tsx b/polaris-react/src/components/ActionMenu/ActionMenu.tsx index b09fb002bdd..a60263ad00c 100644 --- a/polaris-react/src/components/ActionMenu/ActionMenu.tsx +++ b/polaris-react/src/components/ActionMenu/ActionMenu.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames} from '../../utilities/css'; import type { ActionListSection, diff --git a/polaris-react/src/components/ActionMenu/components/Actions/Actions.tsx b/polaris-react/src/components/ActionMenu/components/Actions/Actions.tsx index 5f7c44b4873..32679e6566e 100644 --- a/polaris-react/src/components/ActionMenu/components/Actions/Actions.tsx +++ b/polaris-react/src/components/ActionMenu/components/Actions/Actions.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useRef, useState} from 'react'; +import { useCallback, useMemo, useRef, useState } from 'react'; import type { ActionListItemDescriptor, diff --git a/polaris-react/src/components/ActionMenu/components/Actions/tests/Actions.test.tsx b/polaris-react/src/components/ActionMenu/components/Actions/tests/Actions.test.tsx index 6559b07eeb9..0c9b6b6d4f7 100644 --- a/polaris-react/src/components/ActionMenu/components/Actions/tests/Actions.test.tsx +++ b/polaris-react/src/components/ActionMenu/components/Actions/tests/Actions.test.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import {mountWithApp} from 'tests/utilities'; import {ActionMenuProps, ActionMenu} from '../../..'; diff --git a/polaris-react/src/components/ActionMenu/components/MenuGroup/MenuGroup.tsx b/polaris-react/src/components/ActionMenu/components/MenuGroup/MenuGroup.tsx index 5052ed6e5f4..ff1dbadfc47 100644 --- a/polaris-react/src/components/ActionMenu/components/MenuGroup/MenuGroup.tsx +++ b/polaris-react/src/components/ActionMenu/components/MenuGroup/MenuGroup.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react'; +import { useCallback } from 'react'; import type {ActionListSection, MenuGroupDescriptor} from '../../../../types'; import {ActionList} from '../../../ActionList'; diff --git a/polaris-react/src/components/ActionMenu/components/MenuGroup/tests/MenuGroup.test.tsx b/polaris-react/src/components/ActionMenu/components/MenuGroup/tests/MenuGroup.test.tsx index c47e257866f..9be726c024b 100644 --- a/polaris-react/src/components/ActionMenu/components/MenuGroup/tests/MenuGroup.test.tsx +++ b/polaris-react/src/components/ActionMenu/components/MenuGroup/tests/MenuGroup.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {ActionList} from '../../../../ActionList'; diff --git a/polaris-react/src/components/ActionMenu/components/RollupActions/RollupActions.tsx b/polaris-react/src/components/ActionMenu/components/RollupActions/RollupActions.tsx index b89e6ce59ad..8091d1aeb87 100644 --- a/polaris-react/src/components/ActionMenu/components/RollupActions/RollupActions.tsx +++ b/polaris-react/src/components/ActionMenu/components/RollupActions/RollupActions.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {HorizontalDotsMinor} from '@shopify/polaris-icons'; import type { diff --git a/polaris-react/src/components/ActionMenu/components/RollupActions/tests/RollupActions.test.tsx b/polaris-react/src/components/ActionMenu/components/RollupActions/tests/RollupActions.test.tsx index 5979230dcdc..e4335b7f26f 100644 --- a/polaris-react/src/components/ActionMenu/components/RollupActions/tests/RollupActions.test.tsx +++ b/polaris-react/src/components/ActionMenu/components/RollupActions/tests/RollupActions.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {HorizontalDotsMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx b/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx index d3c0c33527c..723c0ff5c23 100644 --- a/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx +++ b/polaris-react/src/components/ActionMenu/components/SecondaryAction/SecondaryAction.tsx @@ -1,4 +1,5 @@ -import React, {useEffect, useRef} from 'react'; +import { useEffect, useRef } from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {Tooltip} from '../../../Tooltip'; diff --git a/polaris-react/src/components/ActionMenu/tests/ActionMenu.test.tsx b/polaris-react/src/components/ActionMenu/tests/ActionMenu.test.tsx index 8ff14bcc0c3..6461e3ca8a4 100644 --- a/polaris-react/src/components/ActionMenu/tests/ActionMenu.test.tsx +++ b/polaris-react/src/components/ActionMenu/tests/ActionMenu.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import type { diff --git a/polaris-react/src/components/AfterInitialMount/AfterInitialMount.tsx b/polaris-react/src/components/AfterInitialMount/AfterInitialMount.tsx index 63b7707006f..6e279bd0908 100644 --- a/polaris-react/src/components/AfterInitialMount/AfterInitialMount.tsx +++ b/polaris-react/src/components/AfterInitialMount/AfterInitialMount.tsx @@ -1,4 +1,4 @@ -import React, {ReactNode, useEffect} from 'react'; +import { ReactNode, useEffect } from 'react'; import {useIsAfterInitialMount} from '../../utilities/use-is-after-initial-mount'; diff --git a/polaris-react/src/components/AfterInitialMount/test/AfterInitialMount.test.tsx b/polaris-react/src/components/AfterInitialMount/test/AfterInitialMount.test.tsx index 22a25cf7014..0334bb8eb0b 100644 --- a/polaris-react/src/components/AfterInitialMount/test/AfterInitialMount.test.tsx +++ b/polaris-react/src/components/AfterInitialMount/test/AfterInitialMount.test.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import { useEffect } from 'react'; import {mountWithApp} from 'tests/utilities'; import {AfterInitialMount} from '../AfterInitialMount'; diff --git a/polaris-react/src/components/AppProvider/AppProvider.stories.tsx b/polaris-react/src/components/AppProvider/AppProvider.stories.tsx index 39b1f25388d..635ca6ac838 100644 --- a/polaris-react/src/components/AppProvider/AppProvider.stories.tsx +++ b/polaris-react/src/components/AppProvider/AppProvider.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { AppProvider, diff --git a/polaris-react/src/components/AppProvider/AppProvider.tsx b/polaris-react/src/components/AppProvider/AppProvider.tsx index 9413dc94fb0..8e45324e6fb 100644 --- a/polaris-react/src/components/AppProvider/AppProvider.tsx +++ b/polaris-react/src/components/AppProvider/AppProvider.tsx @@ -1,4 +1,5 @@ -import React, {Component} from 'react'; +import { Component } from 'react'; +import * as React from 'react'; import {EphemeralPresenceManager} from '../EphemeralPresenceManager'; import {MediaQueryProvider} from '../MediaQueryProvider'; diff --git a/polaris-react/src/components/AppProvider/tests/AppProvider.test.tsx b/polaris-react/src/components/AppProvider/tests/AppProvider.test.tsx index 015400b696c..356c393edd8 100644 --- a/polaris-react/src/components/AppProvider/tests/AppProvider.test.tsx +++ b/polaris-react/src/components/AppProvider/tests/AppProvider.test.tsx @@ -1,4 +1,5 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; +import * as React from 'react'; import {matchMedia} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Autocomplete/Autocomplete.stories.tsx b/polaris-react/src/components/Autocomplete/Autocomplete.stories.tsx index a51fc0ab604..c03f7b6cc20 100644 --- a/polaris-react/src/components/Autocomplete/Autocomplete.stories.tsx +++ b/polaris-react/src/components/Autocomplete/Autocomplete.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useState} from 'react'; +import { useCallback, useMemo, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Autocomplete, diff --git a/polaris-react/src/components/Autocomplete/Autocomplete.tsx b/polaris-react/src/components/Autocomplete/Autocomplete.tsx index a28e05ac408..e9e2bf8223c 100644 --- a/polaris-react/src/components/Autocomplete/Autocomplete.tsx +++ b/polaris-react/src/components/Autocomplete/Autocomplete.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, useCallback} from 'react'; +import { useMemo, useCallback } from 'react'; +import * as React from 'react'; import type { ActionListItemDescriptor, diff --git a/polaris-react/src/components/Autocomplete/components/MappedAction/MappedAction.tsx b/polaris-react/src/components/Autocomplete/components/MappedAction/MappedAction.tsx index 34fdbe6f5c7..1bcb09dc3a1 100644 --- a/polaris-react/src/components/Autocomplete/components/MappedAction/MappedAction.tsx +++ b/polaris-react/src/components/Autocomplete/components/MappedAction/MappedAction.tsx @@ -1,4 +1,5 @@ -import React, {useMemo} from 'react'; +import { useMemo } from 'react'; +import * as React from 'react'; import type {ActionListItemDescriptor} from '../../../../types'; import {Badge} from '../../../Badge'; diff --git a/polaris-react/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx b/polaris-react/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx index a279e646688..cd6161aed1a 100644 --- a/polaris-react/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx +++ b/polaris-react/src/components/Autocomplete/components/MappedAction/tests/MappedAction.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithListboxProvider} from 'tests/utilities/listbox'; import {Listbox} from '../../../../Listbox'; diff --git a/polaris-react/src/components/Autocomplete/components/MappedOption/MappedOption.tsx b/polaris-react/src/components/Autocomplete/components/MappedOption/MappedOption.tsx index be95bdd3b47..55a611a4359 100644 --- a/polaris-react/src/components/Autocomplete/components/MappedOption/MappedOption.tsx +++ b/polaris-react/src/components/Autocomplete/components/MappedOption/MappedOption.tsx @@ -1,4 +1,4 @@ -import React, {memo} from 'react'; +import { memo } from 'react'; import type {OptionDescriptor, ArrayElement} from '../../../../types'; import {Listbox} from '../../../Listbox'; diff --git a/polaris-react/src/components/Autocomplete/components/MappedOption/tests/MappedOption.test.tsx b/polaris-react/src/components/Autocomplete/components/MappedOption/tests/MappedOption.test.tsx index 3b7a1ca8373..1864d7835bc 100644 --- a/polaris-react/src/components/Autocomplete/components/MappedOption/tests/MappedOption.test.tsx +++ b/polaris-react/src/components/Autocomplete/components/MappedOption/tests/MappedOption.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithListboxProvider} from 'tests/utilities/listbox'; import {Listbox} from '../../../../Listbox'; diff --git a/polaris-react/src/components/Autocomplete/tests/Autocomplete.test.tsx b/polaris-react/src/components/Autocomplete/tests/Autocomplete.test.tsx index e80c2f8323c..d406ce2269b 100644 --- a/polaris-react/src/components/Autocomplete/tests/Autocomplete.test.tsx +++ b/polaris-react/src/components/Autocomplete/tests/Autocomplete.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp, ReactTestingElement, CustomRoot} from 'tests/utilities'; import {TextField} from '../../TextField'; diff --git a/polaris-react/src/components/Avatar/Avatar.stories.tsx b/polaris-react/src/components/Avatar/Avatar.stories.tsx index cbc0d7dc052..ae1cffcea30 100644 --- a/polaris-react/src/components/Avatar/Avatar.stories.tsx +++ b/polaris-react/src/components/Avatar/Avatar.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { ActionList, diff --git a/polaris-react/src/components/Avatar/Avatar.tsx b/polaris-react/src/components/Avatar/Avatar.tsx index 535d8fa65cd..2fb1640cb01 100644 --- a/polaris-react/src/components/Avatar/Avatar.tsx +++ b/polaris-react/src/components/Avatar/Avatar.tsx @@ -1,4 +1,4 @@ -import React, {useState, useCallback, useEffect} from 'react'; +import { useState, useCallback, useEffect } from 'react'; import {classNames, variationName} from '../../utilities/css'; import {useI18n} from '../../utilities/i18n'; diff --git a/polaris-react/src/components/Avatar/tests/Avatar-ssr.test.tsx b/polaris-react/src/components/Avatar/tests/Avatar-ssr.test.tsx index 08404ff39de..98cd551f2f5 100644 --- a/polaris-react/src/components/Avatar/tests/Avatar-ssr.test.tsx +++ b/polaris-react/src/components/Avatar/tests/Avatar-ssr.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Image} from '../../Image'; diff --git a/polaris-react/src/components/Avatar/tests/Avatar.test.tsx b/polaris-react/src/components/Avatar/tests/Avatar.test.tsx index 1487bf253c5..a7a9b09c6a7 100644 --- a/polaris-react/src/components/Avatar/tests/Avatar.test.tsx +++ b/polaris-react/src/components/Avatar/tests/Avatar.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Image} from '../../Image'; diff --git a/polaris-react/src/components/Backdrop/Backdrop.tsx b/polaris-react/src/components/Backdrop/Backdrop.tsx index 10c2539ca97..e6eef7a2542 100644 --- a/polaris-react/src/components/Backdrop/Backdrop.tsx +++ b/polaris-react/src/components/Backdrop/Backdrop.tsx @@ -1,4 +1,4 @@ -import React, {Dispatch, SetStateAction} from 'react'; +import { Dispatch, SetStateAction } from 'react'; import {classNames} from '../../utilities/css'; import {ScrollLock} from '../ScrollLock'; diff --git a/polaris-react/src/components/Backdrop/tests/Backdrop.test.tsx b/polaris-react/src/components/Backdrop/tests/Backdrop.test.tsx index 1ef6edb749f..70a81b6e5ba 100644 --- a/polaris-react/src/components/Backdrop/tests/Backdrop.test.tsx +++ b/polaris-react/src/components/Backdrop/tests/Backdrop.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Backdrop} from '..'; diff --git a/polaris-react/src/components/Badge/Badge.stories.tsx b/polaris-react/src/components/Badge/Badge.stories.tsx index 76c86d77eb0..cf47eae035c 100644 --- a/polaris-react/src/components/Badge/Badge.stories.tsx +++ b/polaris-react/src/components/Badge/Badge.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Badge} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Badge/Badge.tsx b/polaris-react/src/components/Badge/Badge.tsx index 1fb8ae0112c..d0db82da20c 100644 --- a/polaris-react/src/components/Badge/Badge.tsx +++ b/polaris-react/src/components/Badge/Badge.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {classNames, variationName} from '../../utilities/css'; import {useI18n} from '../../utilities/i18n'; diff --git a/polaris-react/src/components/Badge/components/Pip/Pip.tsx b/polaris-react/src/components/Badge/components/Pip/Pip.tsx index 3faa53632fd..5b161390034 100644 --- a/polaris-react/src/components/Badge/components/Pip/Pip.tsx +++ b/polaris-react/src/components/Badge/components/Pip/Pip.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames, variationName} from '../../../../utilities/css'; import type {Progress, Status} from '../../types'; import {Text} from '../../../Text'; diff --git a/polaris-react/src/components/Badge/tests/Badge.test.tsx b/polaris-react/src/components/Badge/tests/Badge.test.tsx index fdd52dcc868..d0b2f7a0cf7 100644 --- a/polaris-react/src/components/Badge/tests/Badge.test.tsx +++ b/polaris-react/src/components/Badge/tests/Badge.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {GlobeMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Banner/Banner.stories.tsx b/polaris-react/src/components/Banner/Banner.stories.tsx index d7f6a2c59c2..a444eada99b 100644 --- a/polaris-react/src/components/Banner/Banner.stories.tsx +++ b/polaris-react/src/components/Banner/Banner.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useRef, useState} from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Stack, diff --git a/polaris-react/src/components/Banner/Banner.tsx b/polaris-react/src/components/Banner/Banner.tsx index af73e6b690a..caeb14331d9 100644 --- a/polaris-react/src/components/Banner/Banner.tsx +++ b/polaris-react/src/components/Banner/Banner.tsx @@ -1,10 +1,5 @@ -import React, { - forwardRef, - useRef, - useState, - useContext, - useImperativeHandle, -} from 'react'; +import { forwardRef, useRef, useState, useContext, useImperativeHandle } from 'react'; +import * as React from 'react'; import { CancelSmallMinor, CircleTickMajor, diff --git a/polaris-react/src/components/Banner/tests/Banner.test.tsx b/polaris-react/src/components/Banner/tests/Banner.test.tsx index a9fcc3708dc..ae4e83f05aa 100644 --- a/polaris-react/src/components/Banner/tests/Banner.test.tsx +++ b/polaris-react/src/components/Banner/tests/Banner.test.tsx @@ -1,4 +1,5 @@ -import React, {useEffect, useRef} from 'react'; +import { useEffect, useRef } from 'react'; +import * as React from 'react'; import { CirclePlusMinor, CircleTickMajor, diff --git a/polaris-react/src/components/Bleed/Bleed.stories.tsx b/polaris-react/src/components/Bleed/Bleed.stories.tsx index f6cf944c83d..278a2009c6c 100644 --- a/polaris-react/src/components/Bleed/Bleed.stories.tsx +++ b/polaris-react/src/components/Bleed/Bleed.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Card, Bleed, Box, Divider, LegacyStack, Text} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Bleed/Bleed.tsx b/polaris-react/src/components/Bleed/Bleed.tsx index 97928ae449a..59052b08a80 100644 --- a/polaris-react/src/components/Bleed/Bleed.tsx +++ b/polaris-react/src/components/Bleed/Bleed.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {SpacingSpaceScale} from '@shopify/polaris-tokens'; import { diff --git a/polaris-react/src/components/Bleed/tests/Bleed.test.tsx b/polaris-react/src/components/Bleed/tests/Bleed.test.tsx index 78eb350cc6d..4ab13704253 100644 --- a/polaris-react/src/components/Bleed/tests/Bleed.test.tsx +++ b/polaris-react/src/components/Bleed/tests/Bleed.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Bleed} from '../Bleed'; diff --git a/polaris-react/src/components/Box/Box.stories.tsx b/polaris-react/src/components/Box/Box.stories.tsx index 79a3432e349..baab180d74e 100644 --- a/polaris-react/src/components/Box/Box.stories.tsx +++ b/polaris-react/src/components/Box/Box.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Stack, Box, Icon} from '@shopify/polaris'; import {PaintBrushMajor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Box/Box.tsx b/polaris-react/src/components/Box/Box.tsx index 50f8d039b83..cb3505ca229 100644 --- a/polaris-react/src/components/Box/Box.tsx +++ b/polaris-react/src/components/Box/Box.tsx @@ -1,4 +1,5 @@ -import React, {createElement, forwardRef} from 'react'; +import { createElement, forwardRef } from 'react'; +import * as React from 'react'; import type { ColorsActionTokenAlias, ColorsBackdropTokenAlias, diff --git a/polaris-react/src/components/Box/tests/Box.test.tsx b/polaris-react/src/components/Box/tests/Box.test.tsx index 4d6b90efea9..51d9d643f01 100644 --- a/polaris-react/src/components/Box/tests/Box.test.tsx +++ b/polaris-react/src/components/Box/tests/Box.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import type {ColorsTokenName, ShapeTokenName} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/Breadcrumbs/Breadcrumbs.tsx b/polaris-react/src/components/Breadcrumbs/Breadcrumbs.tsx index 39f68a2673e..fceb3afc3fc 100644 --- a/polaris-react/src/components/Breadcrumbs/Breadcrumbs.tsx +++ b/polaris-react/src/components/Breadcrumbs/Breadcrumbs.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {ArrowLeftMinor} from '@shopify/polaris-icons'; import {Icon} from '../Icon'; diff --git a/polaris-react/src/components/Breadcrumbs/tests/Breadcrumbs.test.tsx b/polaris-react/src/components/Breadcrumbs/tests/Breadcrumbs.test.tsx index 766af44ee64..c593cc03bf3 100644 --- a/polaris-react/src/components/Breadcrumbs/tests/Breadcrumbs.test.tsx +++ b/polaris-react/src/components/Breadcrumbs/tests/Breadcrumbs.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import type {CallbackAction, LinkAction} from '../../../types'; diff --git a/polaris-react/src/components/BulkActions/BulkActions.tsx b/polaris-react/src/components/BulkActions/BulkActions.tsx index 40aaaff048a..6841d5eb70d 100644 --- a/polaris-react/src/components/BulkActions/BulkActions.tsx +++ b/polaris-react/src/components/BulkActions/BulkActions.tsx @@ -1,4 +1,4 @@ -import React, {PureComponent, createRef} from 'react'; +import { PureComponent, createRef } from 'react'; import {Transition} from 'react-transition-group'; import {debounce} from '../../utilities/debounce'; diff --git a/polaris-react/src/components/BulkActions/components/BulkActionButton/BulkActionButton.tsx b/polaris-react/src/components/BulkActions/components/BulkActionButton/BulkActionButton.tsx index 84b06366a59..c818ccab340 100644 --- a/polaris-react/src/components/BulkActions/components/BulkActionButton/BulkActionButton.tsx +++ b/polaris-react/src/components/BulkActions/components/BulkActionButton/BulkActionButton.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import { useRef } from 'react'; import {HorizontalDotsMinor} from '@shopify/polaris-icons'; import type {DisableableAction} from '../../../../types'; diff --git a/polaris-react/src/components/BulkActions/components/BulkActionMenu/BulkActionMenu.tsx b/polaris-react/src/components/BulkActions/components/BulkActionMenu/BulkActionMenu.tsx index be7d26ea790..aca8f0690fe 100644 --- a/polaris-react/src/components/BulkActions/components/BulkActionMenu/BulkActionMenu.tsx +++ b/polaris-react/src/components/BulkActions/components/BulkActionMenu/BulkActionMenu.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {Popover} from '../../../Popover'; import {ActionList} from '../../../ActionList'; import {BulkActionButton} from '../BulkActionButton'; diff --git a/polaris-react/src/components/BulkActions/components/BulkActionMenu/tests/BulkActionMenu.test.tsx b/polaris-react/src/components/BulkActions/components/BulkActionMenu/tests/BulkActionMenu.test.tsx index 3e25e6dfe8f..573c21529aa 100644 --- a/polaris-react/src/components/BulkActions/components/BulkActionMenu/tests/BulkActionMenu.test.tsx +++ b/polaris-react/src/components/BulkActions/components/BulkActionMenu/tests/BulkActionMenu.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {ActionList} from '../../../../ActionList'; diff --git a/polaris-react/src/components/BulkActions/hooks/tests/use-is-bulk-actions-sticky.test.tsx b/polaris-react/src/components/BulkActions/hooks/tests/use-is-bulk-actions-sticky.test.tsx index 3dd29f34daa..94271fcaa65 100644 --- a/polaris-react/src/components/BulkActions/hooks/tests/use-is-bulk-actions-sticky.test.tsx +++ b/polaris-react/src/components/BulkActions/hooks/tests/use-is-bulk-actions-sticky.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {intersectionObserver} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/BulkActions/tests/BulkActions.test.tsx b/polaris-react/src/components/BulkActions/tests/BulkActions.test.tsx index ce5b8760bde..a2f26b51ba6 100644 --- a/polaris-react/src/components/BulkActions/tests/BulkActions.test.tsx +++ b/polaris-react/src/components/BulkActions/tests/BulkActions.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {Transition, CSSTransition} from 'react-transition-group'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Button/Button.stories.tsx b/polaris-react/src/components/Button/Button.stories.tsx index 2d94e69082d..11138b18654 100644 --- a/polaris-react/src/components/Button/Button.stories.tsx +++ b/polaris-react/src/components/Button/Button.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, ButtonGroup} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Button/Button.tsx b/polaris-react/src/components/Button/Button.tsx index eb1b5cc8e03..9ea62012a54 100644 --- a/polaris-react/src/components/Button/Button.tsx +++ b/polaris-react/src/components/Button/Button.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; +import * as React from 'react'; import { CaretDownMinor, CaretUpMinor, diff --git a/polaris-react/src/components/Button/tests/Button.test.tsx b/polaris-react/src/components/Button/tests/Button.test.tsx index 8bce8d030ec..f8eb99b986f 100644 --- a/polaris-react/src/components/Button/tests/Button.test.tsx +++ b/polaris-react/src/components/Button/tests/Button.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { CaretDownMinor, CaretUpMinor, diff --git a/polaris-react/src/components/Button/utils.tsx b/polaris-react/src/components/Button/utils.tsx index c4109144e75..d9d3bf703fb 100644 --- a/polaris-react/src/components/Button/utils.tsx +++ b/polaris-react/src/components/Button/utils.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {ComplexAction} from '../../types'; diff --git a/polaris-react/src/components/ButtonGroup/ButtonGroup.stories.tsx b/polaris-react/src/components/ButtonGroup/ButtonGroup.stories.tsx index a7b19723eb4..078ae77087e 100644 --- a/polaris-react/src/components/ButtonGroup/ButtonGroup.stories.tsx +++ b/polaris-react/src/components/ButtonGroup/ButtonGroup.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, ButtonGroup} from '@shopify/polaris'; diff --git a/polaris-react/src/components/ButtonGroup/ButtonGroup.tsx b/polaris-react/src/components/ButtonGroup/ButtonGroup.tsx index d8420bc443c..eccb1639ce6 100644 --- a/polaris-react/src/components/ButtonGroup/ButtonGroup.tsx +++ b/polaris-react/src/components/ButtonGroup/ButtonGroup.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import {elementChildren} from '../../utilities/components'; diff --git a/polaris-react/src/components/ButtonGroup/components/Item/Item.tsx b/polaris-react/src/components/ButtonGroup/components/Item/Item.tsx index 3f6991cae8c..5d997724bd0 100644 --- a/polaris-react/src/components/ButtonGroup/components/Item/Item.tsx +++ b/polaris-react/src/components/ButtonGroup/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {useToggle} from '../../../../utilities/use-toggle'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/ButtonGroup/components/Item/tests/Item.test.tsx b/polaris-react/src/components/ButtonGroup/components/Item/tests/Item.test.tsx index cd608c31736..b78fd3f78ab 100644 --- a/polaris-react/src/components/ButtonGroup/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/ButtonGroup/components/Item/tests/Item.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../../../Button'; diff --git a/polaris-react/src/components/ButtonGroup/tests/ButtonGroup.test.tsx b/polaris-react/src/components/ButtonGroup/tests/ButtonGroup.test.tsx index 3d7e13fe71c..5d62c619bcc 100644 --- a/polaris-react/src/components/ButtonGroup/tests/ButtonGroup.test.tsx +++ b/polaris-react/src/components/ButtonGroup/tests/ButtonGroup.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../Button'; diff --git a/polaris-react/src/components/CalloutCard/CalloutCard.stories.tsx b/polaris-react/src/components/CalloutCard/CalloutCard.stories.tsx index 299ad3a88a7..92fe17976f3 100644 --- a/polaris-react/src/components/CalloutCard/CalloutCard.stories.tsx +++ b/polaris-react/src/components/CalloutCard/CalloutCard.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Badge, CalloutCard, Text} from '@shopify/polaris'; diff --git a/polaris-react/src/components/CalloutCard/CalloutCard.tsx b/polaris-react/src/components/CalloutCard/CalloutCard.tsx index fd61626c8fd..40a4dc7050b 100644 --- a/polaris-react/src/components/CalloutCard/CalloutCard.tsx +++ b/polaris-react/src/components/CalloutCard/CalloutCard.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {CancelSmallMinor} from '@shopify/polaris-icons'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/CalloutCard/tests/CalloutCard.test.tsx b/polaris-react/src/components/CalloutCard/tests/CalloutCard.test.tsx index 8875fae19a8..c3d0472b81e 100644 --- a/polaris-react/src/components/CalloutCard/tests/CalloutCard.test.tsx +++ b/polaris-react/src/components/CalloutCard/tests/CalloutCard.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Badge} from '../../Badge'; diff --git a/polaris-react/src/components/Card/Card.stories.tsx b/polaris-react/src/components/Card/Card.stories.tsx index d804f77b5bf..49238d7135d 100644 --- a/polaris-react/src/components/Card/Card.stories.tsx +++ b/polaris-react/src/components/Card/Card.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Card, Stack, Bleed, Box, Divider, List, Text} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Card/Card.tsx b/polaris-react/src/components/Card/Card.tsx index 94e07432a64..6f9465832db 100644 --- a/polaris-react/src/components/Card/Card.tsx +++ b/polaris-react/src/components/Card/Card.tsx @@ -4,7 +4,7 @@ import type { ShapeBorderRadiusScale, SpacingSpaceScale, } from '@shopify/polaris-tokens'; -import React from 'react'; +import * as React from 'react'; import {useBreakpoints} from '../../utilities/breakpoints'; import type {ResponsiveProp} from '../../utilities/css'; diff --git a/polaris-react/src/components/Card/tests/Card.test.tsx b/polaris-react/src/components/Card/tests/Card.test.tsx index 34fca04f868..22281e4f6a7 100644 --- a/polaris-react/src/components/Card/tests/Card.test.tsx +++ b/polaris-react/src/components/Card/tests/Card.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {matchMedia} from '@shopify/jest-dom-mocks'; import {setMediaWidth} from 'tests/utilities/breakpoints'; diff --git a/polaris-react/src/components/CheckableButton/CheckableButton.tsx b/polaris-react/src/components/CheckableButton/CheckableButton.tsx index 277ec67b855..dc72f90277b 100644 --- a/polaris-react/src/components/CheckableButton/CheckableButton.tsx +++ b/polaris-react/src/components/CheckableButton/CheckableButton.tsx @@ -1,4 +1,4 @@ -import React, {useRef, useImperativeHandle, forwardRef} from 'react'; +import { useRef, useImperativeHandle, forwardRef } from 'react'; import type {CheckboxHandles} from '../../types'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/CheckableButton/tests/CheckableButton.test.tsx b/polaris-react/src/components/CheckableButton/tests/CheckableButton.test.tsx index b9b2f0bd393..7ae01f6fc54 100644 --- a/polaris-react/src/components/CheckableButton/tests/CheckableButton.test.tsx +++ b/polaris-react/src/components/CheckableButton/tests/CheckableButton.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Checkbox} from '../../Checkbox'; diff --git a/polaris-react/src/components/Checkbox/Checkbox.stories.tsx b/polaris-react/src/components/Checkbox/Checkbox.stories.tsx index 16bfcccace4..3e30010a8b6 100644 --- a/polaris-react/src/components/Checkbox/Checkbox.stories.tsx +++ b/polaris-react/src/components/Checkbox/Checkbox.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Checkbox} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Checkbox/Checkbox.tsx b/polaris-react/src/components/Checkbox/Checkbox.tsx index a8640478895..d92130c1364 100644 --- a/polaris-react/src/components/Checkbox/Checkbox.tsx +++ b/polaris-react/src/components/Checkbox/Checkbox.tsx @@ -1,10 +1,5 @@ -import React, { - forwardRef, - useRef, - useImperativeHandle, - useContext, - useId, -} from 'react'; +import { forwardRef, useRef, useImperativeHandle, useContext, useId } from 'react'; +import * as React from 'react'; import {MinusMinor, TickSmallMinor} from '@shopify/polaris-icons'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Checkbox/tests/Checkbox.test.tsx b/polaris-react/src/components/Checkbox/tests/Checkbox.test.tsx index 6f7ee36fb06..3d36ee5fee8 100644 --- a/polaris-react/src/components/Checkbox/tests/Checkbox.test.tsx +++ b/polaris-react/src/components/Checkbox/tests/Checkbox.test.tsx @@ -1,4 +1,4 @@ -import React, {AllHTMLAttributes} from 'react'; +import { AllHTMLAttributes } from 'react'; import {mountWithApp} from 'tests/utilities'; import {Checkbox} from '../Checkbox'; diff --git a/polaris-react/src/components/Choice/Choice.tsx b/polaris-react/src/components/Choice/Choice.tsx index 86a0314f534..24a8a979d2d 100644 --- a/polaris-react/src/components/Choice/Choice.tsx +++ b/polaris-react/src/components/Choice/Choice.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import type {Error} from '../../types'; diff --git a/polaris-react/src/components/Choice/tests/Choice.test.tsx b/polaris-react/src/components/Choice/tests/Choice.test.tsx index 5c108f0e9d7..dcc7853acd9 100644 --- a/polaris-react/src/components/Choice/tests/Choice.test.tsx +++ b/polaris-react/src/components/Choice/tests/Choice.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {InlineError} from '../../InlineError'; diff --git a/polaris-react/src/components/ChoiceList/ChoiceList.stories.tsx b/polaris-react/src/components/ChoiceList/ChoiceList.stories.tsx index 4b191f6bc2a..2f47d460925 100644 --- a/polaris-react/src/components/ChoiceList/ChoiceList.stories.tsx +++ b/polaris-react/src/components/ChoiceList/ChoiceList.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {ChoiceList, TextField} from '@shopify/polaris'; diff --git a/polaris-react/src/components/ChoiceList/ChoiceList.tsx b/polaris-react/src/components/ChoiceList/ChoiceList.tsx index 8b81ed2d994..243b8d1d9bc 100644 --- a/polaris-react/src/components/ChoiceList/ChoiceList.tsx +++ b/polaris-react/src/components/ChoiceList/ChoiceList.tsx @@ -1,4 +1,5 @@ -import React, {useId} from 'react'; +import { useId } from 'react'; +import * as React from 'react'; import type {Error} from '../../types'; import {Checkbox} from '../Checkbox'; diff --git a/polaris-react/src/components/ChoiceList/tests/ChoiceList.test.tsx b/polaris-react/src/components/ChoiceList/tests/ChoiceList.test.tsx index e7871884cfc..617eab31528 100644 --- a/polaris-react/src/components/ChoiceList/tests/ChoiceList.test.tsx +++ b/polaris-react/src/components/ChoiceList/tests/ChoiceList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Bleed} from '../../Bleed'; diff --git a/polaris-react/src/components/Collapsible/Collapsible.stories.tsx b/polaris-react/src/components/Collapsible/Collapsible.stories.tsx index c63358f351e..3c538999ccf 100644 --- a/polaris-react/src/components/Collapsible/Collapsible.stories.tsx +++ b/polaris-react/src/components/Collapsible/Collapsible.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Button, diff --git a/polaris-react/src/components/Collapsible/Collapsible.tsx b/polaris-react/src/components/Collapsible/Collapsible.tsx index 29befa8f15f..41869437cbe 100644 --- a/polaris-react/src/components/Collapsible/Collapsible.tsx +++ b/polaris-react/src/components/Collapsible/Collapsible.tsx @@ -1,4 +1,5 @@ -import React, {useState, useRef, useEffect, useCallback} from 'react'; +import { useState, useRef, useEffect, useCallback } from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Collapsible/tests/Collapsible.test.tsx b/polaris-react/src/components/Collapsible/tests/Collapsible.test.tsx index 5f721b3878b..37cf392a86d 100644 --- a/polaris-react/src/components/Collapsible/tests/Collapsible.test.tsx +++ b/polaris-react/src/components/Collapsible/tests/Collapsible.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {CustomRoot, mountWithApp} from 'tests/utilities'; import type {WithPolarisTestProviderOptions} from '../../PolarisTestProvider'; diff --git a/polaris-react/src/components/ColorPicker/ColorPicker.stories.tsx b/polaris-react/src/components/ColorPicker/ColorPicker.stories.tsx index 237fc4cbf54..9bb2fedd6ef 100644 --- a/polaris-react/src/components/ColorPicker/ColorPicker.stories.tsx +++ b/polaris-react/src/components/ColorPicker/ColorPicker.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useState} from 'react'; +import { useCallback, useEffect, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { ColorPicker, diff --git a/polaris-react/src/components/ColorPicker/ColorPicker.tsx b/polaris-react/src/components/ColorPicker/ColorPicker.tsx index 91f279e3c4d..198a49f82c1 100644 --- a/polaris-react/src/components/ColorPicker/ColorPicker.tsx +++ b/polaris-react/src/components/ColorPicker/ColorPicker.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; +import * as React from 'react'; import {debounce} from '../../utilities/debounce'; import {clamp} from '../../utilities/clamp'; diff --git a/polaris-react/src/components/ColorPicker/components/AlphaPicker/AlphaPicker.tsx b/polaris-react/src/components/ColorPicker/components/AlphaPicker/AlphaPicker.tsx index d5a5913a940..41e8e5f2a7f 100644 --- a/polaris-react/src/components/ColorPicker/components/AlphaPicker/AlphaPicker.tsx +++ b/polaris-react/src/components/ColorPicker/components/AlphaPicker/AlphaPicker.tsx @@ -1,4 +1,4 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; import {Slidable, SlidableProps} from '../Slidable'; import type {HSBColor} from '../../../../utilities/color-types'; diff --git a/polaris-react/src/components/ColorPicker/components/AlphaPicker/tests/AlphaPicker.test.tsx b/polaris-react/src/components/ColorPicker/components/AlphaPicker/tests/AlphaPicker.test.tsx index b1ae4399efb..00df9c5502f 100644 --- a/polaris-react/src/components/ColorPicker/components/AlphaPicker/tests/AlphaPicker.test.tsx +++ b/polaris-react/src/components/ColorPicker/components/AlphaPicker/tests/AlphaPicker.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {calculateDraggerY, alphaForDraggerY} from '../utilities'; diff --git a/polaris-react/src/components/ColorPicker/components/HuePicker/HuePicker.tsx b/polaris-react/src/components/ColorPicker/components/HuePicker/HuePicker.tsx index 042b77951ca..dd7a3aba7ce 100644 --- a/polaris-react/src/components/ColorPicker/components/HuePicker/HuePicker.tsx +++ b/polaris-react/src/components/ColorPicker/components/HuePicker/HuePicker.tsx @@ -1,4 +1,4 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; import {Slidable, SlidableProps} from '../Slidable'; import styles from '../../ColorPicker.scss'; diff --git a/polaris-react/src/components/ColorPicker/components/HuePicker/tests/HuePicker.test.tsx b/polaris-react/src/components/ColorPicker/components/HuePicker/tests/HuePicker.test.tsx index 029c02de628..b64a8142e09 100644 --- a/polaris-react/src/components/ColorPicker/components/HuePicker/tests/HuePicker.test.tsx +++ b/polaris-react/src/components/ColorPicker/components/HuePicker/tests/HuePicker.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {calculateDraggerY, hueForDraggerY} from '../utilities'; diff --git a/polaris-react/src/components/ColorPicker/components/Slidable/Slidable.tsx b/polaris-react/src/components/ColorPicker/components/Slidable/Slidable.tsx index 9ded15e08ea..964064d2055 100644 --- a/polaris-react/src/components/ColorPicker/components/Slidable/Slidable.tsx +++ b/polaris-react/src/components/ColorPicker/components/Slidable/Slidable.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; +import * as React from 'react'; import {isServer} from '../../../../utilities/target'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/ColorPicker/components/Slidable/tests/Slidable.test.tsx b/polaris-react/src/components/ColorPicker/components/Slidable/tests/Slidable.test.tsx index 190772355cb..a24ea71d83f 100644 --- a/polaris-react/src/components/ColorPicker/components/Slidable/tests/Slidable.test.tsx +++ b/polaris-react/src/components/ColorPicker/components/Slidable/tests/Slidable.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Slidable} from '../Slidable'; diff --git a/polaris-react/src/components/ColorPicker/tests/ColorPicker-ssr.test.tsx b/polaris-react/src/components/ColorPicker/tests/ColorPicker-ssr.test.tsx index 8c4ccd5658b..8770932862b 100644 --- a/polaris-react/src/components/ColorPicker/tests/ColorPicker-ssr.test.tsx +++ b/polaris-react/src/components/ColorPicker/tests/ColorPicker-ssr.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Slidable} from '../components'; diff --git a/polaris-react/src/components/ColorPicker/tests/ColorPicker.test.tsx b/polaris-react/src/components/ColorPicker/tests/ColorPicker.test.tsx index 5040d2847ad..57a090e0dc1 100644 --- a/polaris-react/src/components/ColorPicker/tests/ColorPicker.test.tsx +++ b/polaris-react/src/components/ColorPicker/tests/ColorPicker.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/Columns/Columns.stories.tsx b/polaris-react/src/components/Columns/Columns.stories.tsx index 1cf12c3880c..fc842743ca3 100644 --- a/polaris-react/src/components/Columns/Columns.stories.tsx +++ b/polaris-react/src/components/Columns/Columns.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, Columns, Page} from '@shopify/polaris'; import {ChevronLeftMinor, ChevronRightMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Columns/Columns.tsx b/polaris-react/src/components/Columns/Columns.tsx index 51e71e574d2..f5f02905667 100644 --- a/polaris-react/src/components/Columns/Columns.tsx +++ b/polaris-react/src/components/Columns/Columns.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {SpacingSpaceScale} from '@shopify/polaris-tokens'; import { diff --git a/polaris-react/src/components/Columns/tests/Columns.test.tsx b/polaris-react/src/components/Columns/tests/Columns.test.tsx index e6def4795f7..1fd292c3d87 100644 --- a/polaris-react/src/components/Columns/tests/Columns.test.tsx +++ b/polaris-react/src/components/Columns/tests/Columns.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Columns} from '..'; diff --git a/polaris-react/src/components/Combobox/Combobox.stories.tsx b/polaris-react/src/components/Combobox/Combobox.stories.tsx index 8ad74a0c6e5..2c969767a34 100644 --- a/polaris-react/src/components/Combobox/Combobox.stories.tsx +++ b/polaris-react/src/components/Combobox/Combobox.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useState} from 'react'; +import { useCallback, useMemo, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Combobox, diff --git a/polaris-react/src/components/Combobox/Combobox.tsx b/polaris-react/src/components/Combobox/Combobox.tsx index 7fc82ae142e..e1ad5089c96 100644 --- a/polaris-react/src/components/Combobox/Combobox.tsx +++ b/polaris-react/src/components/Combobox/Combobox.tsx @@ -1,4 +1,5 @@ -import React, {useState, useCallback, useMemo, Children, useRef} from 'react'; +import { useState, useCallback, useMemo, Children, useRef } from 'react'; +import * as React from 'react'; import {Popover, PopoverPublicAPI} from '../Popover'; import type {PopoverProps} from '../Popover'; diff --git a/polaris-react/src/components/Combobox/components/TextField/TextField.tsx b/polaris-react/src/components/Combobox/components/TextField/TextField.tsx index ad3fae7fdb7..1762ffa096c 100644 --- a/polaris-react/src/components/Combobox/components/TextField/TextField.tsx +++ b/polaris-react/src/components/Combobox/components/TextField/TextField.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, useId, useCallback, useEffect} from 'react'; +import { useMemo, useId, useCallback, useEffect } from 'react'; +import * as React from 'react'; import {labelID} from '../../../Label'; import {TextField as PolarisTextField} from '../../../TextField'; diff --git a/polaris-react/src/components/Combobox/components/TextField/tests/TextField.test.tsx b/polaris-react/src/components/Combobox/components/TextField/tests/TextField.test.tsx index 4b3cd1dff56..d088de02956 100644 --- a/polaris-react/src/components/Combobox/components/TextField/tests/TextField.test.tsx +++ b/polaris-react/src/components/Combobox/components/TextField/tests/TextField.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TextField as PolarisTextField} from '../../../../TextField'; diff --git a/polaris-react/src/components/Combobox/tests/Combobox.test.tsx b/polaris-react/src/components/Combobox/tests/Combobox.test.tsx index 5e5c643b695..e2c0e2cf34a 100644 --- a/polaris-react/src/components/Combobox/tests/Combobox.test.tsx +++ b/polaris-react/src/components/Combobox/tests/Combobox.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TextField} from '../../TextField'; diff --git a/polaris-react/src/components/Connected/Connected.tsx b/polaris-react/src/components/Connected/Connected.tsx index 918fcaacce1..5f825c0272c 100644 --- a/polaris-react/src/components/Connected/Connected.tsx +++ b/polaris-react/src/components/Connected/Connected.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Item} from './components'; import styles from './Connected.scss'; diff --git a/polaris-react/src/components/Connected/components/Item/Item.tsx b/polaris-react/src/components/Connected/components/Item/Item.tsx index 109dd70cd18..885cfebc14e 100644 --- a/polaris-react/src/components/Connected/components/Item/Item.tsx +++ b/polaris-react/src/components/Connected/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {useToggle} from '../../../../utilities/use-toggle'; diff --git a/polaris-react/src/components/Connected/tests/Connected.test.tsx b/polaris-react/src/components/Connected/tests/Connected.test.tsx index 61689cd4b60..a3957210ac0 100644 --- a/polaris-react/src/components/Connected/tests/Connected.test.tsx +++ b/polaris-react/src/components/Connected/tests/Connected.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Connected} from '../Connected'; diff --git a/polaris-react/src/components/ContextualSaveBar/ContextualSaveBar.stories.tsx b/polaris-react/src/components/ContextualSaveBar/ContextualSaveBar.stories.tsx index d42e8f5a927..235994a05d4 100644 --- a/polaris-react/src/components/ContextualSaveBar/ContextualSaveBar.stories.tsx +++ b/polaris-react/src/components/ContextualSaveBar/ContextualSaveBar.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {ContextualSaveBar, Frame} from '@shopify/polaris'; diff --git a/polaris-react/src/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx b/polaris-react/src/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx index d2eb83563b9..e6ba5df26ce 100644 --- a/polaris-react/src/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx +++ b/polaris-react/src/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {ContextualSaveBar} from '../ContextualSaveBar'; diff --git a/polaris-react/src/components/DataTable/DataTable.stories.tsx b/polaris-react/src/components/DataTable/DataTable.stories.tsx index 0f0558d20cf..257338b1b02 100644 --- a/polaris-react/src/components/DataTable/DataTable.stories.tsx +++ b/polaris-react/src/components/DataTable/DataTable.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {LegacyCard, DataTable, Link, Page} from '@shopify/polaris'; diff --git a/polaris-react/src/components/DataTable/DataTable.tsx b/polaris-react/src/components/DataTable/DataTable.tsx index ba3689bb8ad..b767281f0a4 100644 --- a/polaris-react/src/components/DataTable/DataTable.tsx +++ b/polaris-react/src/components/DataTable/DataTable.tsx @@ -1,9 +1,5 @@ -import React, { - PureComponent, - createRef, - ReactNode, - FocusEventHandler, -} from 'react'; +import { PureComponent, createRef, ReactNode, FocusEventHandler } from 'react'; +import * as React from 'react'; import isEqual from 'react-fast-compare'; import {debounce} from '../../utilities/debounce'; diff --git a/polaris-react/src/components/DataTable/components/Cell/Cell.tsx b/polaris-react/src/components/DataTable/components/Cell/Cell.tsx index 31c615ab8c2..46744aa8498 100644 --- a/polaris-react/src/components/DataTable/components/Cell/Cell.tsx +++ b/polaris-react/src/components/DataTable/components/Cell/Cell.tsx @@ -1,4 +1,5 @@ -import React, {FocusEventHandler, useRef} from 'react'; +import { FocusEventHandler, useRef } from 'react'; +import * as React from 'react'; import {SortAscendingMajor, SortDescendingMajor} from '@shopify/polaris-icons'; import {classNames, variationName} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/DataTable/components/Cell/tests/Cell.test.tsx b/polaris-react/src/components/DataTable/components/Cell/tests/Cell.test.tsx index 87d12c9e4f3..445b535a441 100644 --- a/polaris-react/src/components/DataTable/components/Cell/tests/Cell.test.tsx +++ b/polaris-react/src/components/DataTable/components/Cell/tests/Cell.test.tsx @@ -1,4 +1,4 @@ -import React, {ReactElement} from 'react'; +import { ReactElement } from 'react'; import {SortAscendingMajor, SortDescendingMajor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/DataTable/components/Navigation/Navigation.tsx b/polaris-react/src/components/DataTable/components/Navigation/Navigation.tsx index 29d07f1541c..1d93e6ee6e5 100644 --- a/polaris-react/src/components/DataTable/components/Navigation/Navigation.tsx +++ b/polaris-react/src/components/DataTable/components/Navigation/Navigation.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {ChevronLeftMinor, ChevronRightMinor} from '@shopify/polaris-icons'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/DataTable/components/Navigation/tests/Navigation.test.tsx b/polaris-react/src/components/DataTable/components/Navigation/tests/Navigation.test.tsx index 0b40e61f6d4..e21cf51691f 100644 --- a/polaris-react/src/components/DataTable/components/Navigation/tests/Navigation.test.tsx +++ b/polaris-react/src/components/DataTable/components/Navigation/tests/Navigation.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../../../Button'; diff --git a/polaris-react/src/components/DataTable/tests/DataTable.test.tsx b/polaris-react/src/components/DataTable/tests/DataTable.test.tsx index 56429d38546..69c243cab59 100644 --- a/polaris-react/src/components/DataTable/tests/DataTable.test.tsx +++ b/polaris-react/src/components/DataTable/tests/DataTable.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {timer} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/DatePicker/DatePicker.stories.tsx b/polaris-react/src/components/DatePicker/DatePicker.stories.tsx index 9a28d0ab406..ee873f93bed 100644 --- a/polaris-react/src/components/DatePicker/DatePicker.stories.tsx +++ b/polaris-react/src/components/DatePicker/DatePicker.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {DatePicker} from '@shopify/polaris'; diff --git a/polaris-react/src/components/DatePicker/DatePicker.tsx b/polaris-react/src/components/DatePicker/DatePicker.tsx index d1486ad2e2c..2602422e32f 100644 --- a/polaris-react/src/components/DatePicker/DatePicker.tsx +++ b/polaris-react/src/components/DatePicker/DatePicker.tsx @@ -1,4 +1,5 @@ -import React, {useState, useEffect, useCallback, useMemo} from 'react'; +import { useState, useEffect, useCallback, useMemo } from 'react'; +import * as React from 'react'; import {ArrowLeftMinor, ArrowRightMinor} from '@shopify/polaris-icons'; import {Button} from '../Button'; diff --git a/polaris-react/src/components/DatePicker/components/Day/Day.tsx b/polaris-react/src/components/DatePicker/components/Day/Day.tsx index 9061ccbff7d..f22e93db745 100644 --- a/polaris-react/src/components/DatePicker/components/Day/Day.tsx +++ b/polaris-react/src/components/DatePicker/components/Day/Day.tsx @@ -1,4 +1,4 @@ -import React, {useRef, useEffect, memo} from 'react'; +import { useRef, useEffect, memo } from 'react'; import {classNames} from '../../../../utilities/css'; import {isSameDay} from '../../../../utilities/dates'; diff --git a/polaris-react/src/components/DatePicker/components/Day/tests/Day.test.tsx b/polaris-react/src/components/DatePicker/components/Day/tests/Day.test.tsx index 3099a5b0a61..785ffc4d3e2 100644 --- a/polaris-react/src/components/DatePicker/components/Day/tests/Day.test.tsx +++ b/polaris-react/src/components/DatePicker/components/Day/tests/Day.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Day} from '../Day'; diff --git a/polaris-react/src/components/DatePicker/components/Month/Month.tsx b/polaris-react/src/components/DatePicker/components/Month/Month.tsx index 407dea48e7d..362a629acb6 100644 --- a/polaris-react/src/components/DatePicker/components/Month/Month.tsx +++ b/polaris-react/src/components/DatePicker/components/Month/Month.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo} from 'react'; +import { useCallback, useMemo } from 'react'; import {classNames} from '../../../../utilities/css'; import { diff --git a/polaris-react/src/components/DatePicker/components/Month/tests/Month.test.tsx b/polaris-react/src/components/DatePicker/components/Month/tests/Month.test.tsx index 4ac7f00ded9..bcdce98a8e3 100644 --- a/polaris-react/src/components/DatePicker/components/Month/tests/Month.test.tsx +++ b/polaris-react/src/components/DatePicker/components/Month/tests/Month.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Weekday} from '../../Weekday'; diff --git a/polaris-react/src/components/DatePicker/components/Weekday/Weekday.tsx b/polaris-react/src/components/DatePicker/components/Weekday/Weekday.tsx index 0002de28076..714d0e3e1e3 100644 --- a/polaris-react/src/components/DatePicker/components/Weekday/Weekday.tsx +++ b/polaris-react/src/components/DatePicker/components/Weekday/Weekday.tsx @@ -1,4 +1,4 @@ -import React, {memo} from 'react'; +import { memo } from 'react'; import {classNames} from '../../../../utilities/css'; import styles from '../../DatePicker.scss'; diff --git a/polaris-react/src/components/DatePicker/components/Weekday/tests/Weekday.test.tsx b/polaris-react/src/components/DatePicker/components/Weekday/tests/Weekday.test.tsx index e5eff4d3639..3cb6ddb8d48 100644 --- a/polaris-react/src/components/DatePicker/components/Weekday/tests/Weekday.test.tsx +++ b/polaris-react/src/components/DatePicker/components/Weekday/tests/Weekday.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Weekday} from '../Weekday'; diff --git a/polaris-react/src/components/DatePicker/tests/DatePicker.test.tsx b/polaris-react/src/components/DatePicker/tests/DatePicker.test.tsx index 0405ffcd878..313c9be9fea 100644 --- a/polaris-react/src/components/DatePicker/tests/DatePicker.test.tsx +++ b/polaris-react/src/components/DatePicker/tests/DatePicker.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Day, Month, Weekday} from '../components'; diff --git a/polaris-react/src/components/DescriptionList/DescriptionList.stories.tsx b/polaris-react/src/components/DescriptionList/DescriptionList.stories.tsx index 9cbb393acd7..f8649ef631e 100644 --- a/polaris-react/src/components/DescriptionList/DescriptionList.stories.tsx +++ b/polaris-react/src/components/DescriptionList/DescriptionList.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {DescriptionList} from '@shopify/polaris'; diff --git a/polaris-react/src/components/DescriptionList/DescriptionList.tsx b/polaris-react/src/components/DescriptionList/DescriptionList.tsx index 22870c626ba..2e31973943e 100644 --- a/polaris-react/src/components/DescriptionList/DescriptionList.tsx +++ b/polaris-react/src/components/DescriptionList/DescriptionList.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import {Text} from '../Text'; diff --git a/polaris-react/src/components/DescriptionList/tests/DescriptionList.test.tsx b/polaris-react/src/components/DescriptionList/tests/DescriptionList.test.tsx index d28502a3178..7526dff6af7 100644 --- a/polaris-react/src/components/DescriptionList/tests/DescriptionList.test.tsx +++ b/polaris-react/src/components/DescriptionList/tests/DescriptionList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {DescriptionList} from '../DescriptionList'; diff --git a/polaris-react/src/components/Divider/Divider.stories.tsx b/polaris-react/src/components/Divider/Divider.stories.tsx index 0f73bba5369..873da58993f 100644 --- a/polaris-react/src/components/Divider/Divider.stories.tsx +++ b/polaris-react/src/components/Divider/Divider.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Stack, Divider, Text} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Divider/Divider.tsx b/polaris-react/src/components/Divider/Divider.tsx index 9f25fb81fbb..9d9ad29642f 100644 --- a/polaris-react/src/components/Divider/Divider.tsx +++ b/polaris-react/src/components/Divider/Divider.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from './Divider.scss'; diff --git a/polaris-react/src/components/Divider/tests/Divider.test.tsx b/polaris-react/src/components/Divider/tests/Divider.test.tsx index 75d05fe49ea..c5cbbb1fffa 100644 --- a/polaris-react/src/components/Divider/tests/Divider.test.tsx +++ b/polaris-react/src/components/Divider/tests/Divider.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Divider} from '../Divider'; diff --git a/polaris-react/src/components/DropZone/DropZone.stories.tsx b/polaris-react/src/components/DropZone/DropZone.stories.tsx index e1eb3327e3b..e34a10cb1d9 100644 --- a/polaris-react/src/components/DropZone/DropZone.stories.tsx +++ b/polaris-react/src/components/DropZone/DropZone.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Banner, diff --git a/polaris-react/src/components/DropZone/DropZone.tsx b/polaris-react/src/components/DropZone/DropZone.tsx index 147b69e7405..805f1e1819f 100755 --- a/polaris-react/src/components/DropZone/DropZone.tsx +++ b/polaris-react/src/components/DropZone/DropZone.tsx @@ -1,4 +1,4 @@ -import React, { +import { useState, useRef, useCallback, @@ -7,6 +7,8 @@ import React, { useEffect, useId, } from 'react'; + +import * as React from 'react'; import {UploadMajor, CircleAlertMajor} from '@shopify/polaris-icons'; import {debounce} from '../../utilities/debounce'; diff --git a/polaris-react/src/components/DropZone/components/FileUpload/FileUpload.tsx b/polaris-react/src/components/DropZone/components/FileUpload/FileUpload.tsx index 24c98bce014..d6f66be7b21 100755 --- a/polaris-react/src/components/DropZone/components/FileUpload/FileUpload.tsx +++ b/polaris-react/src/components/DropZone/components/FileUpload/FileUpload.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {classNames} from '../../../../utilities/css'; import {capitalize} from '../../../../utilities/capitalize'; diff --git a/polaris-react/src/components/DropZone/components/FileUpload/tests/FileUpload.test.tsx b/polaris-react/src/components/DropZone/components/FileUpload/tests/FileUpload.test.tsx index dcc44bd234f..8a3723c0bf0 100755 --- a/polaris-react/src/components/DropZone/components/FileUpload/tests/FileUpload.test.tsx +++ b/polaris-react/src/components/DropZone/components/FileUpload/tests/FileUpload.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Text} from '../../../../Text'; diff --git a/polaris-react/src/components/DropZone/tests/DropZone.test.tsx b/polaris-react/src/components/DropZone/tests/DropZone.test.tsx index a2563703af3..b3f01218a5e 100755 --- a/polaris-react/src/components/DropZone/tests/DropZone.test.tsx +++ b/polaris-react/src/components/DropZone/tests/DropZone.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {act} from 'react-dom/test-utils'; import {clock} from '@shopify/jest-dom-mocks'; import {mountWithApp, CustomRoot} from 'tests/utilities'; diff --git a/polaris-react/src/components/EmptySearchResult/EmptySearchResult.tsx b/polaris-react/src/components/EmptySearchResult/EmptySearchResult.tsx index 420accb5b86..951353c2f81 100644 --- a/polaris-react/src/components/EmptySearchResult/EmptySearchResult.tsx +++ b/polaris-react/src/components/EmptySearchResult/EmptySearchResult.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {useI18n} from '../../utilities/i18n'; import {Text} from '../Text'; import {Image} from '../Image'; diff --git a/polaris-react/src/components/EmptySearchResult/tests/EmptySearchResult.test.tsx b/polaris-react/src/components/EmptySearchResult/tests/EmptySearchResult.test.tsx index a8d30b190ab..1d0beb314b1 100644 --- a/polaris-react/src/components/EmptySearchResult/tests/EmptySearchResult.test.tsx +++ b/polaris-react/src/components/EmptySearchResult/tests/EmptySearchResult.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Text} from '../../Text'; diff --git a/polaris-react/src/components/EmptyState/EmptyState.stories.tsx b/polaris-react/src/components/EmptyState/EmptyState.stories.tsx index 170c8d730d8..e3e680c693e 100644 --- a/polaris-react/src/components/EmptyState/EmptyState.stories.tsx +++ b/polaris-react/src/components/EmptyState/EmptyState.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {LegacyCard, EmptyState, Link} from '@shopify/polaris'; diff --git a/polaris-react/src/components/EmptyState/EmptyState.tsx b/polaris-react/src/components/EmptyState/EmptyState.tsx index 8f64a18d289..c6678b93b30 100644 --- a/polaris-react/src/components/EmptyState/EmptyState.tsx +++ b/polaris-react/src/components/EmptyState/EmptyState.tsx @@ -1,4 +1,5 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import {WithinContentContext} from '../../utilities/within-content-context'; diff --git a/polaris-react/src/components/EmptyState/tests/EmptyState.test.tsx b/polaris-react/src/components/EmptyState/tests/EmptyState.test.tsx index 6e616e2f21f..2607d007a5a 100644 --- a/polaris-react/src/components/EmptyState/tests/EmptyState.test.tsx +++ b/polaris-react/src/components/EmptyState/tests/EmptyState.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../Button'; diff --git a/polaris-react/src/components/EphemeralPresenceManager/EphemeralPresenceManager.tsx b/polaris-react/src/components/EphemeralPresenceManager/EphemeralPresenceManager.tsx index d091a5fcefd..b9428d1a503 100644 --- a/polaris-react/src/components/EphemeralPresenceManager/EphemeralPresenceManager.tsx +++ b/polaris-react/src/components/EphemeralPresenceManager/EphemeralPresenceManager.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, useState, useCallback, ContextType} from 'react'; +import { useMemo, useState, useCallback, ContextType } from 'react'; +import * as React from 'react'; import {EphemeralPresenceManagerContext} from '../../utilities/ephemeral-presence-manager'; import type {EphemeralPresenceKey} from '../../utilities/ephemeral-presence-manager'; diff --git a/polaris-react/src/components/EphemeralPresenceManager/tests/EphemeralPresenceManager.test.tsx b/polaris-react/src/components/EphemeralPresenceManager/tests/EphemeralPresenceManager.test.tsx index cec91d1af32..9a441e3402b 100644 --- a/polaris-react/src/components/EphemeralPresenceManager/tests/EphemeralPresenceManager.test.tsx +++ b/polaris-react/src/components/EphemeralPresenceManager/tests/EphemeralPresenceManager.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {useEphemeralPresenceManager} from '../../../utilities/ephemeral-presence-manager'; diff --git a/polaris-react/src/components/EventListener/tests/EventListener.test.tsx b/polaris-react/src/components/EventListener/tests/EventListener.test.tsx index 88d4248f2d4..e5f210929e3 100644 --- a/polaris-react/src/components/EventListener/tests/EventListener.test.tsx +++ b/polaris-react/src/components/EventListener/tests/EventListener.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/ExceptionList/ExceptionList.stories.tsx b/polaris-react/src/components/ExceptionList/ExceptionList.stories.tsx index 5386404aabe..c087493db2e 100644 --- a/polaris-react/src/components/ExceptionList/ExceptionList.stories.tsx +++ b/polaris-react/src/components/ExceptionList/ExceptionList.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {ExceptionList} from '@shopify/polaris'; import {NoteMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/ExceptionList/ExceptionList.tsx b/polaris-react/src/components/ExceptionList/ExceptionList.tsx index 78eb8d57fc2..3866e9917e0 100644 --- a/polaris-react/src/components/ExceptionList/ExceptionList.tsx +++ b/polaris-react/src/components/ExceptionList/ExceptionList.tsx @@ -1,4 +1,5 @@ -import React, {Fragment} from 'react'; +import { Fragment } from 'react'; +import * as React from 'react'; import {classNames, variationName} from '../../utilities/css'; import {Icon, IconProps} from '../Icon'; diff --git a/polaris-react/src/components/ExceptionList/tests/ExceptionList.test.tsx b/polaris-react/src/components/ExceptionList/tests/ExceptionList.test.tsx index e565006c37f..29e37591577 100644 --- a/polaris-react/src/components/ExceptionList/tests/ExceptionList.test.tsx +++ b/polaris-react/src/components/ExceptionList/tests/ExceptionList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {CirclePlusMinor, NoteMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Filters/Filters.stories.tsx b/polaris-react/src/components/Filters/Filters.stories.tsx index 86730115a44..f86ad524016 100644 --- a/polaris-react/src/components/Filters/Filters.stories.tsx +++ b/polaris-react/src/components/Filters/Filters.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Avatar, diff --git a/polaris-react/src/components/Filters/Filters.tsx b/polaris-react/src/components/Filters/Filters.tsx index bcba17bfe4b..fceb9fa98eb 100644 --- a/polaris-react/src/components/Filters/Filters.tsx +++ b/polaris-react/src/components/Filters/Filters.tsx @@ -1,4 +1,5 @@ -import React, {Component, createRef} from 'react'; +import { Component, createRef } from 'react'; +import * as React from 'react'; import { SearchMinor, ChevronUpMinor, diff --git a/polaris-react/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx b/polaris-react/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx index 0c2c186e606..7855ee85d80 100644 --- a/polaris-react/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx +++ b/polaris-react/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx @@ -1,4 +1,5 @@ -import React, {Component, createRef} from 'react'; +import { Component, createRef } from 'react'; +import * as React from 'react'; import {debounce} from '../../../../utilities/debounce'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/Item.tsx b/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/Item.tsx index 11406094383..9f411c66977 100644 --- a/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/Item.tsx +++ b/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../../../utilities/css'; import {useToggle} from '../../../../../../utilities/use-toggle'; diff --git a/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/tests/Item.test.tsx b/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/tests/Item.test.tsx index 7e5c00c33b3..bf54902b44b 100644 --- a/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/Filters/components/ConnectedFilterControl/components/Item/tests/Item.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Item} from '../Item'; diff --git a/polaris-react/src/components/Filters/components/ConnectedFilterControl/tests/ConnectedFilterControl.test.tsx b/polaris-react/src/components/Filters/components/ConnectedFilterControl/tests/ConnectedFilterControl.test.tsx index 3ddf5451ad2..711f010de91 100644 --- a/polaris-react/src/components/Filters/components/ConnectedFilterControl/tests/ConnectedFilterControl.test.tsx +++ b/polaris-react/src/components/Filters/components/ConnectedFilterControl/tests/ConnectedFilterControl.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../../../Button'; diff --git a/polaris-react/src/components/Filters/components/TagsWrapper/TagsWrapper.tsx b/polaris-react/src/components/Filters/components/TagsWrapper/TagsWrapper.tsx index 41e32308780..582a9d1cc0b 100644 --- a/polaris-react/src/components/Filters/components/TagsWrapper/TagsWrapper.tsx +++ b/polaris-react/src/components/Filters/components/TagsWrapper/TagsWrapper.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Text} from '../../../Text'; diff --git a/polaris-react/src/components/Filters/components/TagsWrapper/tests/TagsWrapper.test.tsx b/polaris-react/src/components/Filters/components/TagsWrapper/tests/TagsWrapper.test.tsx index 9bb1d8c0994..e056c6914a6 100644 --- a/polaris-react/src/components/Filters/components/TagsWrapper/tests/TagsWrapper.test.tsx +++ b/polaris-react/src/components/Filters/components/TagsWrapper/tests/TagsWrapper.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TagsWrapper} from '../TagsWrapper'; diff --git a/polaris-react/src/components/Filters/tests/Filters.test.tsx b/polaris-react/src/components/Filters/tests/Filters.test.tsx index 0d5e3436027..93a1adbae05 100644 --- a/polaris-react/src/components/Filters/tests/Filters.test.tsx +++ b/polaris-react/src/components/Filters/tests/Filters.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {matchMedia} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Focus/Focus.tsx b/polaris-react/src/components/Focus/Focus.tsx index 349565f8c1c..200ddb5b9fc 100644 --- a/polaris-react/src/components/Focus/Focus.tsx +++ b/polaris-react/src/components/Focus/Focus.tsx @@ -1,4 +1,5 @@ -import React, {memo, useEffect} from 'react'; +import { memo, useEffect } from 'react'; +import * as React from 'react'; import {focusFirstFocusableNode} from '../../utilities/focus'; diff --git a/polaris-react/src/components/Focus/tests/Focus.test.tsx b/polaris-react/src/components/Focus/tests/Focus.test.tsx index 620f9a913a3..bf21d54e21f 100644 --- a/polaris-react/src/components/Focus/tests/Focus.test.tsx +++ b/polaris-react/src/components/Focus/tests/Focus.test.tsx @@ -1,4 +1,4 @@ -import React, {useRef, useState, useEffect} from 'react'; +import { useRef, useState, useEffect } from 'react'; import {mountWithApp} from 'tests/utilities'; import {Focus, FocusProps} from '../Focus'; diff --git a/polaris-react/src/components/FocusManager/FocusManager.tsx b/polaris-react/src/components/FocusManager/FocusManager.tsx index 892b0af2b83..c4cc41ca762 100644 --- a/polaris-react/src/components/FocusManager/FocusManager.tsx +++ b/polaris-react/src/components/FocusManager/FocusManager.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, useState, useCallback, ContextType} from 'react'; +import { useMemo, useState, useCallback, ContextType } from 'react'; +import * as React from 'react'; import {FocusManagerContext} from '../../utilities/focus-manager'; diff --git a/polaris-react/src/components/FocusManager/tests/FocusManager.test.tsx b/polaris-react/src/components/FocusManager/tests/FocusManager.test.tsx index cde5449b141..3a9929da271 100644 --- a/polaris-react/src/components/FocusManager/tests/FocusManager.test.tsx +++ b/polaris-react/src/components/FocusManager/tests/FocusManager.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext, useEffect, useRef} from 'react'; +import { useContext, useEffect, useRef } from 'react'; import {mountWithApp} from 'tests/utilities'; import { diff --git a/polaris-react/src/components/FooterHelp/FooterHelp.stories.tsx b/polaris-react/src/components/FooterHelp/FooterHelp.stories.tsx index 4e3b89148b1..1c2bf221cae 100644 --- a/polaris-react/src/components/FooterHelp/FooterHelp.stories.tsx +++ b/polaris-react/src/components/FooterHelp/FooterHelp.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {FooterHelp, Link} from '@shopify/polaris'; diff --git a/polaris-react/src/components/FooterHelp/FooterHelp.tsx b/polaris-react/src/components/FooterHelp/FooterHelp.tsx index 757f818da3a..04b0c166d37 100644 --- a/polaris-react/src/components/FooterHelp/FooterHelp.tsx +++ b/polaris-react/src/components/FooterHelp/FooterHelp.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from './FooterHelp.scss'; diff --git a/polaris-react/src/components/FooterHelp/tests/FooterHelp.test.tsx b/polaris-react/src/components/FooterHelp/tests/FooterHelp.test.tsx index 1a0c27f18ca..47db2cbb393 100644 --- a/polaris-react/src/components/FooterHelp/tests/FooterHelp.test.tsx +++ b/polaris-react/src/components/FooterHelp/tests/FooterHelp.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {FooterHelp} from '../FooterHelp'; diff --git a/polaris-react/src/components/Form/Form.stories.tsx b/polaris-react/src/components/Form/Form.stories.tsx index ab957bc0417..643bce1ddef 100644 --- a/polaris-react/src/components/Form/Form.stories.tsx +++ b/polaris-react/src/components/Form/Form.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, Checkbox, Form, FormLayout, TextField} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Form/Form.tsx b/polaris-react/src/components/Form/Form.tsx index c12b01f3188..d088bc5a0c8 100644 --- a/polaris-react/src/components/Form/Form.tsx +++ b/polaris-react/src/components/Form/Form.tsx @@ -1,4 +1,5 @@ -import React, {useCallback} from 'react'; +import { useCallback } from 'react'; +import * as React from 'react'; import {Text} from '../Text'; import {useI18n} from '../../utilities/i18n'; diff --git a/polaris-react/src/components/Form/tests/Form.test.tsx b/polaris-react/src/components/Form/tests/Form.test.tsx index 74569b159f0..f7b29add454 100644 --- a/polaris-react/src/components/Form/tests/Form.test.tsx +++ b/polaris-react/src/components/Form/tests/Form.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Form} from '../Form'; diff --git a/polaris-react/src/components/FormLayout/FormLayout.stories.tsx b/polaris-react/src/components/FormLayout/FormLayout.stories.tsx index 3b942de95ad..8713be977b4 100644 --- a/polaris-react/src/components/FormLayout/FormLayout.stories.tsx +++ b/polaris-react/src/components/FormLayout/FormLayout.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {FormLayout, TextField} from '@shopify/polaris'; diff --git a/polaris-react/src/components/FormLayout/FormLayout.tsx b/polaris-react/src/components/FormLayout/FormLayout.tsx index 5a70a91aa64..7507b6cc3c9 100644 --- a/polaris-react/src/components/FormLayout/FormLayout.tsx +++ b/polaris-react/src/components/FormLayout/FormLayout.tsx @@ -1,4 +1,5 @@ -import React, {memo, Children, NamedExoticComponent} from 'react'; +import { memo, Children, NamedExoticComponent } from 'react'; +import * as React from 'react'; import {wrapWithComponent, isElementOfType} from '../../utilities/components'; diff --git a/polaris-react/src/components/FormLayout/components/Group/Group.tsx b/polaris-react/src/components/FormLayout/components/Group/Group.tsx index 603e10d5576..d45d70b8c25 100644 --- a/polaris-react/src/components/FormLayout/components/Group/Group.tsx +++ b/polaris-react/src/components/FormLayout/components/Group/Group.tsx @@ -1,4 +1,5 @@ -import React, {Children, useId} from 'react'; +import { Children, useId } from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {wrapWithComponent} from '../../../../utilities/components'; diff --git a/polaris-react/src/components/FormLayout/components/Group/tests/Group.test.tsx b/polaris-react/src/components/FormLayout/components/Group/tests/Group.test.tsx index 6961cb501b2..6a283db1886 100644 --- a/polaris-react/src/components/FormLayout/components/Group/tests/Group.test.tsx +++ b/polaris-react/src/components/FormLayout/components/Group/tests/Group.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TextField} from '../../../../TextField'; diff --git a/polaris-react/src/components/FormLayout/components/Item/Item.tsx b/polaris-react/src/components/FormLayout/components/Item/Item.tsx index 1f9a61c5793..c0b4d2a6e34 100644 --- a/polaris-react/src/components/FormLayout/components/Item/Item.tsx +++ b/polaris-react/src/components/FormLayout/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from '../../FormLayout.scss'; diff --git a/polaris-react/src/components/FormLayout/components/Item/tests/Item.test.tsx b/polaris-react/src/components/FormLayout/components/Item/tests/Item.test.tsx index abf39d90047..fe9451b674a 100644 --- a/polaris-react/src/components/FormLayout/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/FormLayout/components/Item/tests/Item.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import styles from '../../../FormLayout.scss'; diff --git a/polaris-react/src/components/FormLayout/tests/FormLayout.test.tsx b/polaris-react/src/components/FormLayout/tests/FormLayout.test.tsx index b36d06d9f46..6d601f55672 100644 --- a/polaris-react/src/components/FormLayout/tests/FormLayout.test.tsx +++ b/polaris-react/src/components/FormLayout/tests/FormLayout.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TextField} from '../../TextField'; diff --git a/polaris-react/src/components/Frame/Frame.stories.tsx b/polaris-react/src/components/Frame/Frame.stories.tsx index da3b906f177..fde70f2dedf 100644 --- a/polaris-react/src/components/Frame/Frame.stories.tsx +++ b/polaris-react/src/components/Frame/Frame.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useRef, useState} from 'react'; +import { useCallback, useRef, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { ActionList, diff --git a/polaris-react/src/components/Frame/Frame.tsx b/polaris-react/src/components/Frame/Frame.tsx index 0a9b2678ce3..217cd640c6b 100644 --- a/polaris-react/src/components/Frame/Frame.tsx +++ b/polaris-react/src/components/Frame/Frame.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent, createRef, MouseEvent} from 'react'; +import { PureComponent, createRef, MouseEvent } from 'react'; +import * as React from 'react'; import {MobileCancelMajor} from '@shopify/polaris-icons'; import {CSSTransition} from 'react-transition-group'; import {motion} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/Frame/components/CSSAnimation/CSSAnimation.tsx b/polaris-react/src/components/Frame/components/CSSAnimation/CSSAnimation.tsx index d3bb023017b..9bddbfec8fe 100644 --- a/polaris-react/src/components/Frame/components/CSSAnimation/CSSAnimation.tsx +++ b/polaris-react/src/components/Frame/components/CSSAnimation/CSSAnimation.tsx @@ -1,4 +1,5 @@ -import React, {useRef, useState, useEffect} from 'react'; +import { useRef, useState, useEffect } from 'react'; +import * as React from 'react'; import {classNames, variationName} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.tsx b/polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.tsx index a78dd7da196..8a188c93aa2 100644 --- a/polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.tsx +++ b/polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react'; +import { useCallback } from 'react'; import {Button} from '../../../Button'; import {Image} from '../../../Image'; diff --git a/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/DiscardConfirmationModal.tsx b/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/DiscardConfirmationModal.tsx index 2fd5003d1cf..5c6e327d8ac 100644 --- a/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/DiscardConfirmationModal.tsx +++ b/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/DiscardConfirmationModal.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {useI18n} from '../../../../../../utilities/i18n'; import {Modal} from '../../../../../Modal'; diff --git a/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/tests/DiscardConfirmationModal.test.tsx b/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/tests/DiscardConfirmationModal.test.tsx index c8b60925d9e..5b4691d2ee9 100644 --- a/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/tests/DiscardConfirmationModal.test.tsx +++ b/polaris-react/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/tests/DiscardConfirmationModal.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Modal} from '../../../../../../Modal'; diff --git a/polaris-react/src/components/Frame/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx b/polaris-react/src/components/Frame/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx index 6f878e48a95..a9c52e1135e 100644 --- a/polaris-react/src/components/Frame/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx +++ b/polaris-react/src/components/Frame/components/ContextualSaveBar/tests/ContextualSaveBar.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../../../Button'; diff --git a/polaris-react/src/components/Frame/components/Loading/Loading.tsx b/polaris-react/src/components/Frame/components/Loading/Loading.tsx index 068a5c67d7b..c902df94fba 100644 --- a/polaris-react/src/components/Frame/components/Loading/Loading.tsx +++ b/polaris-react/src/components/Frame/components/Loading/Loading.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useState} from 'react'; +import { useEffect, useState } from 'react'; import {useI18n} from '../../../../utilities/i18n'; import {useIsMountedRef} from '../../../../utilities/use-is-mounted-ref'; diff --git a/polaris-react/src/components/Frame/components/Loading/tests/Loading.test.tsx b/polaris-react/src/components/Frame/components/Loading/tests/Loading.test.tsx index e841c08c704..12c0ef6a953 100644 --- a/polaris-react/src/components/Frame/components/Loading/tests/Loading.test.tsx +++ b/polaris-react/src/components/Frame/components/Loading/tests/Loading.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Loading} from '../Loading'; diff --git a/polaris-react/src/components/Frame/components/Toast/Toast.tsx b/polaris-react/src/components/Frame/components/Toast/Toast.tsx index 106f9284ddf..b068a4e35e5 100644 --- a/polaris-react/src/components/Frame/components/Toast/Toast.tsx +++ b/polaris-react/src/components/Frame/components/Toast/Toast.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import { useEffect } from 'react'; import {CancelSmallMinor, AlertMinor} from '@shopify/polaris-icons'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Frame/components/Toast/tests/Toast.test.tsx b/polaris-react/src/components/Frame/components/Toast/tests/Toast.test.tsx index c8aefb19387..19b61470f5e 100644 --- a/polaris-react/src/components/Frame/components/Toast/tests/Toast.test.tsx +++ b/polaris-react/src/components/Frame/components/Toast/tests/Toast.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {timer} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Frame/components/ToastManager/ToastManager.tsx b/polaris-react/src/components/Frame/components/ToastManager/ToastManager.tsx index 6cd3f20efd6..1b888a90b17 100644 --- a/polaris-react/src/components/Frame/components/ToastManager/ToastManager.tsx +++ b/polaris-react/src/components/Frame/components/ToastManager/ToastManager.tsx @@ -1,4 +1,5 @@ -import React, {createRef, memo} from 'react'; +import { createRef, memo } from 'react'; +import * as React from 'react'; import {TransitionGroup, CSSTransition} from 'react-transition-group'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx b/polaris-react/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx index 37d1e411e61..afbc03ff2f7 100644 --- a/polaris-react/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx +++ b/polaris-react/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {timer} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Frame/tests/Frame.test.tsx b/polaris-react/src/components/Frame/tests/Frame.test.tsx index f417676188b..bb74a127125 100644 --- a/polaris-react/src/components/Frame/tests/Frame.test.tsx +++ b/polaris-react/src/components/Frame/tests/Frame.test.tsx @@ -1,4 +1,4 @@ -import React, {createRef} from 'react'; +import { createRef } from 'react'; import {CSSTransition} from 'react-transition-group'; import {animationFrame, dimension} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/FullscreenBar/FullscreenBar.stories.tsx b/polaris-react/src/components/FullscreenBar/FullscreenBar.stories.tsx index 4d386ffb777..1882e39a13d 100644 --- a/polaris-react/src/components/FullscreenBar/FullscreenBar.stories.tsx +++ b/polaris-react/src/components/FullscreenBar/FullscreenBar.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Badge, diff --git a/polaris-react/src/components/FullscreenBar/FullscreenBar.tsx b/polaris-react/src/components/FullscreenBar/FullscreenBar.tsx index 6982d57c725..fb72870ab64 100644 --- a/polaris-react/src/components/FullscreenBar/FullscreenBar.tsx +++ b/polaris-react/src/components/FullscreenBar/FullscreenBar.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {ExitMajor} from '@shopify/polaris-icons'; import {Icon} from '../Icon'; diff --git a/polaris-react/src/components/FullscreenBar/tests/FullscreenBar.test.tsx b/polaris-react/src/components/FullscreenBar/tests/FullscreenBar.test.tsx index ce43bd92f60..3c986f4f9a9 100644 --- a/polaris-react/src/components/FullscreenBar/tests/FullscreenBar.test.tsx +++ b/polaris-react/src/components/FullscreenBar/tests/FullscreenBar.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {FullscreenBar} from '../FullscreenBar'; diff --git a/polaris-react/src/components/Grid/Grid.stories.tsx b/polaris-react/src/components/Grid/Grid.stories.tsx index 055385e612d..7835afe91c4 100644 --- a/polaris-react/src/components/Grid/Grid.stories.tsx +++ b/polaris-react/src/components/Grid/Grid.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {LegacyCard, Grid, Page} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Grid/Grid.tsx b/polaris-react/src/components/Grid/Grid.tsx index 5ec683d2d96..4a7246f0ace 100644 --- a/polaris-react/src/components/Grid/Grid.tsx +++ b/polaris-react/src/components/Grid/Grid.tsx @@ -1,4 +1,5 @@ -import React, {useEffect} from 'react'; +import { useEffect } from 'react'; +import * as React from 'react'; // eslint-disable-next-line import/no-deprecated import {Cell} from './components'; diff --git a/polaris-react/src/components/Grid/components/Cell/Cell.tsx b/polaris-react/src/components/Grid/components/Cell/Cell.tsx index f2784a7a9e3..6ebdccca507 100644 --- a/polaris-react/src/components/Grid/components/Cell/Cell.tsx +++ b/polaris-react/src/components/Grid/components/Cell/Cell.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Grid/components/Cell/tests/Cell.test.tsx b/polaris-react/src/components/Grid/components/Cell/tests/Cell.test.tsx index 3f05de04cce..633a1705bfd 100644 --- a/polaris-react/src/components/Grid/components/Cell/tests/Cell.test.tsx +++ b/polaris-react/src/components/Grid/components/Cell/tests/Cell.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/Grid/tests/Grid.test.tsx b/polaris-react/src/components/Grid/tests/Grid.test.tsx index 0b27b4ec222..f3f9b7a963e 100644 --- a/polaris-react/src/components/Grid/tests/Grid.test.tsx +++ b/polaris-react/src/components/Grid/tests/Grid.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {matchMedia, timer} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Icon/Icon.stories.tsx b/polaris-react/src/components/Icon/Icon.stories.tsx index f72c5e1f4eb..e6c65c67e14 100644 --- a/polaris-react/src/components/Icon/Icon.stories.tsx +++ b/polaris-react/src/components/Icon/Icon.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Icon} from '@shopify/polaris'; import {CirclePlusMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Icon/Icon.tsx b/polaris-react/src/components/Icon/Icon.tsx index ebf16b5172a..ceec2968d64 100644 --- a/polaris-react/src/components/Icon/Icon.tsx +++ b/polaris-react/src/components/Icon/Icon.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {Text} from '../Text'; import {classNames, variationName} from '../../utilities/css'; import type {IconSource} from '../../types'; diff --git a/polaris-react/src/components/Icon/tests/Icon.test.tsx b/polaris-react/src/components/Icon/tests/Icon.test.tsx index 36837a7d227..63fafcde837 100644 --- a/polaris-react/src/components/Icon/tests/Icon.test.tsx +++ b/polaris-react/src/components/Icon/tests/Icon.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {PlusMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Image/Image.tsx b/polaris-react/src/components/Image/Image.tsx index 8b2657fbbfe..ab4c2f6eb7b 100644 --- a/polaris-react/src/components/Image/Image.tsx +++ b/polaris-react/src/components/Image/Image.tsx @@ -1,4 +1,5 @@ -import React, {useCallback} from 'react'; +import { useCallback } from 'react'; +import * as React from 'react'; interface SourceSet { source: string; diff --git a/polaris-react/src/components/Image/tests/Image.test.tsx b/polaris-react/src/components/Image/tests/Image.test.tsx index 475ca8fb2bc..b280cd0c280 100644 --- a/polaris-react/src/components/Image/tests/Image.test.tsx +++ b/polaris-react/src/components/Image/tests/Image.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Image} from '../Image'; diff --git a/polaris-react/src/components/IndexProvider/IndexProvider.tsx b/polaris-react/src/components/IndexProvider/IndexProvider.tsx index 37ab5321ce9..78bdca3ea21 100644 --- a/polaris-react/src/components/IndexProvider/IndexProvider.tsx +++ b/polaris-react/src/components/IndexProvider/IndexProvider.tsx @@ -1,4 +1,4 @@ -import React, {useMemo} from 'react'; +import { useMemo } from 'react'; import { IndexContext, diff --git a/polaris-react/src/components/IndexProvider/tests/IndexProvider.test.tsx b/polaris-react/src/components/IndexProvider/tests/IndexProvider.test.tsx index 6c2cb9781ca..4ed34fa5cf7 100644 --- a/polaris-react/src/components/IndexProvider/tests/IndexProvider.test.tsx +++ b/polaris-react/src/components/IndexProvider/tests/IndexProvider.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {IndexProvider} from '../IndexProvider'; diff --git a/polaris-react/src/components/IndexTable/IndexTable.stories.tsx b/polaris-react/src/components/IndexTable/IndexTable.stories.tsx index 933e12086bf..eeaad6a39c0 100644 --- a/polaris-react/src/components/IndexTable/IndexTable.stories.tsx +++ b/polaris-react/src/components/IndexTable/IndexTable.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Button, diff --git a/polaris-react/src/components/IndexTable/IndexTable.tsx b/polaris-react/src/components/IndexTable/IndexTable.tsx index e9c2d5d259e..10caa11522d 100644 --- a/polaris-react/src/components/IndexTable/IndexTable.tsx +++ b/polaris-react/src/components/IndexTable/IndexTable.tsx @@ -1,4 +1,5 @@ -import React, {useRef, useState, useEffect, useCallback, useMemo} from 'react'; +import { useRef, useState, useEffect, useCallback, useMemo } from 'react'; +import * as React from 'react'; import {SortAscendingMajor, SortDescendingMajor} from '@shopify/polaris-icons'; import {CSSTransition} from 'react-transition-group'; import {tokens, toPx, motion} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/IndexTable/components/Cell/Cell.tsx b/polaris-react/src/components/IndexTable/components/Cell/Cell.tsx index a3ebf8bd0c5..e0512ccdc91 100644 --- a/polaris-react/src/components/IndexTable/components/Cell/Cell.tsx +++ b/polaris-react/src/components/IndexTable/components/Cell/Cell.tsx @@ -1,4 +1,4 @@ -import React, {memo, ReactNode} from 'react'; +import { memo, ReactNode } from 'react'; import {classNames} from '../../../../utilities/css'; import styles from '../../IndexTable.scss'; diff --git a/polaris-react/src/components/IndexTable/components/Cell/tests/Cell.test.tsx b/polaris-react/src/components/IndexTable/components/Cell/tests/Cell.test.tsx index 32d420ebfa3..2d44163e30a 100644 --- a/polaris-react/src/components/IndexTable/components/Cell/tests/Cell.test.tsx +++ b/polaris-react/src/components/IndexTable/components/Cell/tests/Cell.test.tsx @@ -1,4 +1,4 @@ -import React, {ReactElement} from 'react'; +import { ReactElement } from 'react'; import {mountWithApp} from 'tests/utilities'; import {Cell} from '../Cell'; diff --git a/polaris-react/src/components/IndexTable/components/Checkbox/Checkbox.tsx b/polaris-react/src/components/IndexTable/components/Checkbox/Checkbox.tsx index d332b0921a9..50159945fac 100644 --- a/polaris-react/src/components/IndexTable/components/Checkbox/Checkbox.tsx +++ b/polaris-react/src/components/IndexTable/components/Checkbox/Checkbox.tsx @@ -1,12 +1,4 @@ -import React, { - useContext, - memo, - useEffect, - useRef, - useCallback, - Fragment, - ReactNode, -} from 'react'; +import { useContext, memo, useEffect, useRef, useCallback, Fragment, ReactNode } from 'react'; import {debounce} from '../../../../utilities/debounce'; import {useI18n} from '../../../../utilities/i18n'; diff --git a/polaris-react/src/components/IndexTable/components/Checkbox/tests/Checkbox.test.tsx b/polaris-react/src/components/IndexTable/components/Checkbox/tests/Checkbox.test.tsx index 9c4d853732a..aac069bea94 100644 --- a/polaris-react/src/components/IndexTable/components/Checkbox/tests/Checkbox.test.tsx +++ b/polaris-react/src/components/IndexTable/components/Checkbox/tests/Checkbox.test.tsx @@ -1,4 +1,4 @@ -import React, {ReactElement} from 'react'; +import { ReactElement } from 'react'; import {mountWithApp} from 'tests/utilities'; import type {Element as ElementType} from '@shopify/react-testing'; import {act} from 'react-dom/test-utils'; diff --git a/polaris-react/src/components/IndexTable/components/Row/Row.tsx b/polaris-react/src/components/IndexTable/components/Row/Row.tsx index c97795fb1f9..21933471e4c 100644 --- a/polaris-react/src/components/IndexTable/components/Row/Row.tsx +++ b/polaris-react/src/components/IndexTable/components/Row/Row.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, memo, useRef, useCallback} from 'react'; +import { useMemo, memo, useRef, useCallback } from 'react'; +import * as React from 'react'; import {useToggle} from '../../../../utilities/use-toggle'; import { diff --git a/polaris-react/src/components/IndexTable/components/Row/tests/Row.test.tsx b/polaris-react/src/components/IndexTable/components/Row/tests/Row.test.tsx index a9ac9e5c98b..af772d59ae7 100644 --- a/polaris-react/src/components/IndexTable/components/Row/tests/Row.test.tsx +++ b/polaris-react/src/components/IndexTable/components/Row/tests/Row.test.tsx @@ -1,4 +1,5 @@ -import React, {ReactElement} from 'react'; +import { ReactElement } from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import type {DeepPartial} from '@shopify/useful-types'; diff --git a/polaris-react/src/components/IndexTable/components/ScrollContainer/ScrollContainer.tsx b/polaris-react/src/components/IndexTable/components/ScrollContainer/ScrollContainer.tsx index 04d02e079a1..3f5155165ad 100644 --- a/polaris-react/src/components/IndexTable/components/ScrollContainer/ScrollContainer.tsx +++ b/polaris-react/src/components/IndexTable/components/ScrollContainer/ScrollContainer.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useEffect, useState} from 'react'; +import { useCallback, useEffect, useState } from 'react'; +import * as React from 'react'; import {debounce} from '../../../../utilities/debounce'; import { diff --git a/polaris-react/src/components/IndexTable/components/ScrollContainer/tests/ScrollContainer.test.tsx b/polaris-react/src/components/IndexTable/components/ScrollContainer/tests/ScrollContainer.test.tsx index c17635bd683..c44587d54b3 100644 --- a/polaris-react/src/components/IndexTable/components/ScrollContainer/tests/ScrollContainer.test.tsx +++ b/polaris-react/src/components/IndexTable/components/ScrollContainer/tests/ScrollContainer.test.tsx @@ -1,18 +1,18 @@ -import React from 'react'; +import { useRef, createRef } from 'react'; import {mountWithApp} from 'tests/utilities'; import {ScrollContext} from '../../../../../utilities/index-table'; import {ScrollContainer} from '../ScrollContainer'; function TestComponent() { - const containerRef = React.useRef(null); + const containerRef = useRef(null); return
Hello
; } describe('', () => { it('renders a ScrollContext provider', () => { - const ref = React.createRef(); + const ref = createRef(); const wrapper = mountWithApp( {}}> diff --git a/polaris-react/src/components/IndexTable/tests/IndexTable.test.tsx b/polaris-react/src/components/IndexTable/tests/IndexTable.test.tsx index bfe15186e2d..6818bcf68f3 100644 --- a/polaris-react/src/components/IndexTable/tests/IndexTable.test.tsx +++ b/polaris-react/src/components/IndexTable/tests/IndexTable.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SortAscendingMajor, SortDescendingMajor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Indicator/Indicator.tsx b/polaris-react/src/components/Indicator/Indicator.tsx index 47c770ed476..a774af2c4a8 100644 --- a/polaris-react/src/components/Indicator/Indicator.tsx +++ b/polaris-react/src/components/Indicator/Indicator.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames} from '../../utilities/css'; import styles from './Indicator.scss'; diff --git a/polaris-react/src/components/Indicator/tests/Indicator.test.tsx b/polaris-react/src/components/Indicator/tests/Indicator.test.tsx index 9581b7411ce..7424b93b7bc 100644 --- a/polaris-react/src/components/Indicator/tests/Indicator.test.tsx +++ b/polaris-react/src/components/Indicator/tests/Indicator.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Indicator} from '../Indicator'; diff --git a/polaris-react/src/components/Inline/Inline.stories.tsx b/polaris-react/src/components/Inline/Inline.stories.tsx index bf0dee3d02d..9369a8ee860 100644 --- a/polaris-react/src/components/Inline/Inline.stories.tsx +++ b/polaris-react/src/components/Inline/Inline.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Box, Badge, Icon, Inline, Thumbnail} from '@shopify/polaris'; import {CapitalMajor, ImageMajor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Inline/Inline.tsx b/polaris-react/src/components/Inline/Inline.tsx index 0ce91aec553..8c22dad5c61 100644 --- a/polaris-react/src/components/Inline/Inline.tsx +++ b/polaris-react/src/components/Inline/Inline.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {SpacingSpaceScale} from '@shopify/polaris-tokens'; import {getResponsiveProps} from '../../utilities/css'; diff --git a/polaris-react/src/components/Inline/tests/Inline.test.tsx b/polaris-react/src/components/Inline/tests/Inline.test.tsx index d110fc419e4..7a05654a5da 100644 --- a/polaris-react/src/components/Inline/tests/Inline.test.tsx +++ b/polaris-react/src/components/Inline/tests/Inline.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Inline} from '../Inline'; diff --git a/polaris-react/src/components/InlineCode/InlineCode.tsx b/polaris-react/src/components/InlineCode/InlineCode.tsx index 8f732347a90..9cafbf4bcd0 100644 --- a/polaris-react/src/components/InlineCode/InlineCode.tsx +++ b/polaris-react/src/components/InlineCode/InlineCode.tsx @@ -1,4 +1,4 @@ -import React, {ReactNode} from 'react'; +import { ReactNode } from 'react'; import styles from './InlineCode.scss'; diff --git a/polaris-react/src/components/InlineCode/tests/InlineCode.test.tsx b/polaris-react/src/components/InlineCode/tests/InlineCode.test.tsx index b05714416e4..a87d23d111a 100644 --- a/polaris-react/src/components/InlineCode/tests/InlineCode.test.tsx +++ b/polaris-react/src/components/InlineCode/tests/InlineCode.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {InlineCode} from '../InlineCode'; diff --git a/polaris-react/src/components/InlineError/InlineError.stories.tsx b/polaris-react/src/components/InlineError/InlineError.stories.tsx index 879db4bfb38..d43b6b325f2 100644 --- a/polaris-react/src/components/InlineError/InlineError.stories.tsx +++ b/polaris-react/src/components/InlineError/InlineError.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {InlineError} from '@shopify/polaris'; diff --git a/polaris-react/src/components/InlineError/InlineError.tsx b/polaris-react/src/components/InlineError/InlineError.tsx index af0a40bf0d6..548219efa1a 100644 --- a/polaris-react/src/components/InlineError/InlineError.tsx +++ b/polaris-react/src/components/InlineError/InlineError.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {AlertMinor} from '@shopify/polaris-icons'; import {Icon} from '../Icon'; diff --git a/polaris-react/src/components/InlineError/tests/InlineError.test.tsx b/polaris-react/src/components/InlineError/tests/InlineError.test.tsx index 5a37f921e13..e7a205aa2cc 100644 --- a/polaris-react/src/components/InlineError/tests/InlineError.test.tsx +++ b/polaris-react/src/components/InlineError/tests/InlineError.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {InlineError, errorTextID} from '../InlineError'; diff --git a/polaris-react/src/components/KeyboardKey/KeyboardKey.stories.tsx b/polaris-react/src/components/KeyboardKey/KeyboardKey.stories.tsx index d695369eb40..a2a9379bf2d 100644 --- a/polaris-react/src/components/KeyboardKey/KeyboardKey.stories.tsx +++ b/polaris-react/src/components/KeyboardKey/KeyboardKey.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {KeyboardKey} from '@shopify/polaris'; diff --git a/polaris-react/src/components/KeyboardKey/KeyboardKey.tsx b/polaris-react/src/components/KeyboardKey/KeyboardKey.tsx index 48143dde832..0a24c0b024c 100644 --- a/polaris-react/src/components/KeyboardKey/KeyboardKey.tsx +++ b/polaris-react/src/components/KeyboardKey/KeyboardKey.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames} from '../../utilities/css'; import styles from './KeyboardKey.scss'; diff --git a/polaris-react/src/components/KeyboardKey/tests/KeyboardKey.test.tsx b/polaris-react/src/components/KeyboardKey/tests/KeyboardKey.test.tsx index 3089336e782..9cbef9e6156 100644 --- a/polaris-react/src/components/KeyboardKey/tests/KeyboardKey.test.tsx +++ b/polaris-react/src/components/KeyboardKey/tests/KeyboardKey.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {KeyboardKey} from '../KeyboardKey'; diff --git a/polaris-react/src/components/KeypressListener/tests/KeypressListener.test.tsx b/polaris-react/src/components/KeypressListener/tests/KeypressListener.test.tsx index d759e60f0e4..472661a3dc8 100644 --- a/polaris-react/src/components/KeypressListener/tests/KeypressListener.test.tsx +++ b/polaris-react/src/components/KeypressListener/tests/KeypressListener.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Key} from '../../../types'; diff --git a/polaris-react/src/components/Label/Label.tsx b/polaris-react/src/components/Label/Label.tsx index 04a8c746d18..c7c108dc138 100644 --- a/polaris-react/src/components/Label/Label.tsx +++ b/polaris-react/src/components/Label/Label.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Label/tests/Label.test.tsx b/polaris-react/src/components/Label/tests/Label.test.tsx index 2b6acb04b76..f7df7eb3113 100644 --- a/polaris-react/src/components/Label/tests/Label.test.tsx +++ b/polaris-react/src/components/Label/tests/Label.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Label, labelID} from '../Label'; diff --git a/polaris-react/src/components/Labelled/Labelled.tsx b/polaris-react/src/components/Labelled/Labelled.tsx index e4a07e65b79..8f23b6968e1 100644 --- a/polaris-react/src/components/Labelled/Labelled.tsx +++ b/polaris-react/src/components/Labelled/Labelled.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import type {Action, Error} from '../../types'; diff --git a/polaris-react/src/components/Labelled/tests/Labelled.test.tsx b/polaris-react/src/components/Labelled/tests/Labelled.test.tsx index e4d28273bef..d8704895bf1 100644 --- a/polaris-react/src/components/Labelled/tests/Labelled.test.tsx +++ b/polaris-react/src/components/Labelled/tests/Labelled.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../Button'; diff --git a/polaris-react/src/components/Layout/Layout.stories.tsx b/polaris-react/src/components/Layout/Layout.stories.tsx index 87dd41a6381..db866f82d20 100644 --- a/polaris-react/src/components/Layout/Layout.stories.tsx +++ b/polaris-react/src/components/Layout/Layout.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Banner, diff --git a/polaris-react/src/components/Layout/Layout.tsx b/polaris-react/src/components/Layout/Layout.tsx index fad85a4eb10..00c12539242 100644 --- a/polaris-react/src/components/Layout/Layout.tsx +++ b/polaris-react/src/components/Layout/Layout.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {AnnotatedSection, Section} from './components'; import styles from './Layout.scss'; diff --git a/polaris-react/src/components/Layout/components/AnnotatedSection/AnnotatedSection.tsx b/polaris-react/src/components/Layout/components/AnnotatedSection/AnnotatedSection.tsx index bac092e7afe..3a84e9c485a 100644 --- a/polaris-react/src/components/Layout/components/AnnotatedSection/AnnotatedSection.tsx +++ b/polaris-react/src/components/Layout/components/AnnotatedSection/AnnotatedSection.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Box} from '../../../Box'; import {Text} from '../../../Text'; diff --git a/polaris-react/src/components/Layout/components/Section/Section.tsx b/polaris-react/src/components/Layout/components/Section/Section.tsx index 628ee1628ec..e9086dd578c 100644 --- a/polaris-react/src/components/Layout/components/Section/Section.tsx +++ b/polaris-react/src/components/Layout/components/Section/Section.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import styles from '../../Layout.scss'; diff --git a/polaris-react/src/components/Layout/tests/Layout.test.tsx b/polaris-react/src/components/Layout/tests/Layout.test.tsx index 4bb114ed4a1..c7fbaf0d532 100644 --- a/polaris-react/src/components/Layout/tests/Layout.test.tsx +++ b/polaris-react/src/components/Layout/tests/Layout.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Text} from '../../Text'; diff --git a/polaris-react/src/components/LegacyCard/LegacyCard.stories.tsx b/polaris-react/src/components/LegacyCard/LegacyCard.stories.tsx index 4663bce56b9..f5c1d9005f2 100644 --- a/polaris-react/src/components/LegacyCard/LegacyCard.stories.tsx +++ b/polaris-react/src/components/LegacyCard/LegacyCard.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import { ActionList, diff --git a/polaris-react/src/components/LegacyCard/LegacyCard.tsx b/polaris-react/src/components/LegacyCard/LegacyCard.tsx index 1901c90ccaa..ec102806157 100644 --- a/polaris-react/src/components/LegacyCard/LegacyCard.tsx +++ b/polaris-react/src/components/LegacyCard/LegacyCard.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {useI18n} from '../../utilities/i18n'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/LegacyCard/components/Header/Header.tsx b/polaris-react/src/components/LegacyCard/components/Header/Header.tsx index 617da8cf88e..36b7ff887f4 100644 --- a/polaris-react/src/components/LegacyCard/components/Header/Header.tsx +++ b/polaris-react/src/components/LegacyCard/components/Header/Header.tsx @@ -1,4 +1,5 @@ -import React, {isValidElement} from 'react'; +import { isValidElement } from 'react'; +import * as React from 'react'; import type {DisableableAction} from '../../../../types'; import {buttonsFrom} from '../../../Button'; diff --git a/polaris-react/src/components/LegacyCard/components/Header/tests/Header.test.tsx b/polaris-react/src/components/LegacyCard/components/Header/tests/Header.test.tsx index 6449674f507..5e9717a56fc 100644 --- a/polaris-react/src/components/LegacyCard/components/Header/tests/Header.test.tsx +++ b/polaris-react/src/components/LegacyCard/components/Header/tests/Header.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {buttonsFrom} from '../../../../Button'; diff --git a/polaris-react/src/components/LegacyCard/components/Section/Section.tsx b/polaris-react/src/components/LegacyCard/components/Section/Section.tsx index 0e9f7fa68ce..91f3a44063d 100644 --- a/polaris-react/src/components/LegacyCard/components/Section/Section.tsx +++ b/polaris-react/src/components/LegacyCard/components/Section/Section.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import type {ComplexAction} from '../../../../types'; diff --git a/polaris-react/src/components/LegacyCard/components/Section/tests/Section.test.tsx b/polaris-react/src/components/LegacyCard/components/Section/tests/Section.test.tsx index be63f7cdfdd..f6024b117a1 100644 --- a/polaris-react/src/components/LegacyCard/components/Section/tests/Section.test.tsx +++ b/polaris-react/src/components/LegacyCard/components/Section/tests/Section.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Badge} from '../../../../Badge'; diff --git a/polaris-react/src/components/LegacyCard/components/Subsection/Subsection.tsx b/polaris-react/src/components/LegacyCard/components/Subsection/Subsection.tsx index c72f6b5ef35..a64bfbe204e 100644 --- a/polaris-react/src/components/LegacyCard/components/Subsection/Subsection.tsx +++ b/polaris-react/src/components/LegacyCard/components/Subsection/Subsection.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from '../../LegacyCard.scss'; diff --git a/polaris-react/src/components/LegacyCard/components/Subsection/tests/Subsection.test.tsx b/polaris-react/src/components/LegacyCard/components/Subsection/tests/Subsection.test.tsx index 0aaeea43fe2..5a7c2a035e5 100644 --- a/polaris-react/src/components/LegacyCard/components/Subsection/tests/Subsection.test.tsx +++ b/polaris-react/src/components/LegacyCard/components/Subsection/tests/Subsection.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Subsection} from '../Subsection'; diff --git a/polaris-react/src/components/LegacyCard/tests/LegacyCard.test.tsx b/polaris-react/src/components/LegacyCard/tests/LegacyCard.test.tsx index e923f4b14ed..4d91676e5dc 100644 --- a/polaris-react/src/components/LegacyCard/tests/LegacyCard.test.tsx +++ b/polaris-react/src/components/LegacyCard/tests/LegacyCard.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Badge} from '../../Badge'; diff --git a/polaris-react/src/components/LegacyStack/LegacyStack.stories.tsx b/polaris-react/src/components/LegacyStack/LegacyStack.stories.tsx index f007841ac34..d903e884bae 100644 --- a/polaris-react/src/components/LegacyStack/LegacyStack.stories.tsx +++ b/polaris-react/src/components/LegacyStack/LegacyStack.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Badge, Text, LegacyStack} from '@shopify/polaris'; diff --git a/polaris-react/src/components/LegacyStack/LegacyStack.tsx b/polaris-react/src/components/LegacyStack/LegacyStack.tsx index f5a69208ea9..d1056fc207e 100644 --- a/polaris-react/src/components/LegacyStack/LegacyStack.tsx +++ b/polaris-react/src/components/LegacyStack/LegacyStack.tsx @@ -1,4 +1,5 @@ -import React, {memo, NamedExoticComponent} from 'react'; +import { memo, NamedExoticComponent } from 'react'; +import * as React from 'react'; import {classNames, variationName} from '../../utilities/css'; import {elementChildren, wrapWithComponent} from '../../utilities/components'; diff --git a/polaris-react/src/components/LegacyStack/components/Item/Item.tsx b/polaris-react/src/components/LegacyStack/components/Item/Item.tsx index 450131f7a5a..ce4b6c5435c 100644 --- a/polaris-react/src/components/LegacyStack/components/Item/Item.tsx +++ b/polaris-react/src/components/LegacyStack/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import styles from '../../LegacyStack.scss'; diff --git a/polaris-react/src/components/LegacyStack/tests/LegacyStack.test.tsx b/polaris-react/src/components/LegacyStack/tests/LegacyStack.test.tsx index 9551352e7f0..fcf3f18433b 100644 --- a/polaris-react/src/components/LegacyStack/tests/LegacyStack.test.tsx +++ b/polaris-react/src/components/LegacyStack/tests/LegacyStack.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {LegacyStack} from '../LegacyStack'; diff --git a/polaris-react/src/components/Link/Link.stories.tsx b/polaris-react/src/components/Link/Link.stories.tsx index a35fb7ad4d8..5f3cdb08a44 100644 --- a/polaris-react/src/components/Link/Link.stories.tsx +++ b/polaris-react/src/components/Link/Link.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Banner, Link} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Link/Link.tsx b/polaris-react/src/components/Link/Link.tsx index f1eb3a6b74a..05835dff437 100644 --- a/polaris-react/src/components/Link/Link.tsx +++ b/polaris-react/src/components/Link/Link.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {BannerContext} from '../../utilities/banner-context'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Link/tests/Link.test.tsx b/polaris-react/src/components/Link/tests/Link.test.tsx index 41392e52106..adc74291914 100644 --- a/polaris-react/src/components/Link/tests/Link.test.tsx +++ b/polaris-react/src/components/Link/tests/Link.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Banner} from '../../Banner'; diff --git a/polaris-react/src/components/List/List.stories.tsx b/polaris-react/src/components/List/List.stories.tsx index 0d1b2e2a0cf..c945b16d417 100644 --- a/polaris-react/src/components/List/List.stories.tsx +++ b/polaris-react/src/components/List/List.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {List} from '@shopify/polaris'; diff --git a/polaris-react/src/components/List/List.tsx b/polaris-react/src/components/List/List.tsx index 19afc52c5f0..e634c576e0b 100644 --- a/polaris-react/src/components/List/List.tsx +++ b/polaris-react/src/components/List/List.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames, variationName} from '../../utilities/css'; diff --git a/polaris-react/src/components/List/components/Item/Item.tsx b/polaris-react/src/components/List/components/Item/Item.tsx index d2ebfdb9353..1b676bc6b14 100644 --- a/polaris-react/src/components/List/components/Item/Item.tsx +++ b/polaris-react/src/components/List/components/Item/Item.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from '../../List.scss'; diff --git a/polaris-react/src/components/List/components/Item/tests/Item.test.tsx b/polaris-react/src/components/List/components/Item/tests/Item.test.tsx index a0f611eab95..5e39bdbc8b7 100644 --- a/polaris-react/src/components/List/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/List/components/Item/tests/Item.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Item} from '../Item'; diff --git a/polaris-react/src/components/List/tests/List.test.tsx b/polaris-react/src/components/List/tests/List.test.tsx index 9bff04fee95..863c1457f9a 100644 --- a/polaris-react/src/components/List/tests/List.test.tsx +++ b/polaris-react/src/components/List/tests/List.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {List} from '../List'; diff --git a/polaris-react/src/components/Listbox/Listbox.stories.tsx b/polaris-react/src/components/Listbox/Listbox.stories.tsx index 8718bcaca90..ebc3394ff75 100644 --- a/polaris-react/src/components/Listbox/Listbox.stories.tsx +++ b/polaris-react/src/components/Listbox/Listbox.stories.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react'; +import { useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { LegacyCard, diff --git a/polaris-react/src/components/Listbox/Listbox.tsx b/polaris-react/src/components/Listbox/Listbox.tsx index ae52c223705..93ed47b8075 100644 --- a/polaris-react/src/components/Listbox/Listbox.tsx +++ b/polaris-react/src/components/Listbox/Listbox.tsx @@ -1,4 +1,4 @@ -import React, { +import { useState, useRef, useEffect, @@ -9,6 +9,8 @@ import React, { Children, } from 'react'; +import * as React from 'react'; + import {debounce} from '../../utilities/debounce'; import {useToggle} from '../../utilities/use-toggle'; import {useComboboxListbox} from '../../utilities/combobox'; diff --git a/polaris-react/src/components/Listbox/components/Action/Action.tsx b/polaris-react/src/components/Listbox/components/Action/Action.tsx index ffaf5496dd4..5db65b63397 100644 --- a/polaris-react/src/components/Listbox/components/Action/Action.tsx +++ b/polaris-react/src/components/Listbox/components/Action/Action.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {Icon} from '../../../Icon'; import type {IconProps} from '../../../Icon'; import {Option, OptionProps} from '../Option'; diff --git a/polaris-react/src/components/Listbox/components/Action/tests/Action.test.tsx b/polaris-react/src/components/Listbox/components/Action/tests/Action.test.tsx index a0370452a2e..7c20b36171e 100644 --- a/polaris-react/src/components/Listbox/components/Action/tests/Action.test.tsx +++ b/polaris-react/src/components/Listbox/components/Action/tests/Action.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {CirclePlusMinor, AddMajor} from '@shopify/polaris-icons'; import {mountWithListboxProvider} from 'tests/utilities/listbox'; diff --git a/polaris-react/src/components/Listbox/components/Header/Header.tsx b/polaris-react/src/components/Listbox/components/Header/Header.tsx index 4ff346844b3..0afcb1a0e8d 100644 --- a/polaris-react/src/components/Listbox/components/Header/Header.tsx +++ b/polaris-react/src/components/Listbox/components/Header/Header.tsx @@ -1,4 +1,4 @@ -import React, {ReactNode} from 'react'; +import { ReactNode } from 'react'; import {useSection} from '../Section'; import {Box} from '../../../Box'; diff --git a/polaris-react/src/components/Listbox/components/Header/tests/Header.test.tsx b/polaris-react/src/components/Listbox/components/Header/tests/Header.test.tsx index c236df039a0..64411667bf5 100644 --- a/polaris-react/src/components/Listbox/components/Header/tests/Header.test.tsx +++ b/polaris-react/src/components/Listbox/components/Header/tests/Header.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Header} from '../Header'; diff --git a/polaris-react/src/components/Listbox/components/Loading/Loading.tsx b/polaris-react/src/components/Listbox/components/Loading/Loading.tsx index ee1f4b50261..589c28df5ab 100644 --- a/polaris-react/src/components/Listbox/components/Loading/Loading.tsx +++ b/polaris-react/src/components/Listbox/components/Loading/Loading.tsx @@ -1,4 +1,5 @@ -import React, {memo, useEffect} from 'react'; +import { memo, useEffect } from 'react'; +import * as React from 'react'; import {Spinner} from '../../../Spinner'; import {useListbox} from '../../../../utilities/listbox'; diff --git a/polaris-react/src/components/Listbox/components/Loading/tests/Loading.test.tsx b/polaris-react/src/components/Listbox/components/Loading/tests/Loading.test.tsx index 1f706d18355..85b5edb2f2b 100644 --- a/polaris-react/src/components/Listbox/components/Loading/tests/Loading.test.tsx +++ b/polaris-react/src/components/Listbox/components/Loading/tests/Loading.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {ListboxContext} from '../../../../../utilities/listbox'; diff --git a/polaris-react/src/components/Listbox/components/Option/Option.tsx b/polaris-react/src/components/Listbox/components/Option/Option.tsx index 9beaff172bb..0fbaaedf3c8 100644 --- a/polaris-react/src/components/Listbox/components/Option/Option.tsx +++ b/polaris-react/src/components/Listbox/components/Option/Option.tsx @@ -1,4 +1,5 @@ -import React, {useRef, useCallback, memo, useContext, useId} from 'react'; +import { useRef, useCallback, memo, useContext, useId } from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {useListbox} from '../../../../utilities/listbox'; diff --git a/polaris-react/src/components/Listbox/components/Option/tests/Option.test.tsx b/polaris-react/src/components/Listbox/components/Option/tests/Option.test.tsx index e5b13c89147..b3eda692222 100644 --- a/polaris-react/src/components/Listbox/components/Option/tests/Option.test.tsx +++ b/polaris-react/src/components/Listbox/components/Option/tests/Option.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mount} from 'tests/utilities'; import {mountWithListboxProvider} from 'tests/utilities/listbox'; diff --git a/polaris-react/src/components/Listbox/components/Section/Section.tsx b/polaris-react/src/components/Listbox/components/Section/Section.tsx index 0240544e246..9624b160a2c 100644 --- a/polaris-react/src/components/Listbox/components/Section/Section.tsx +++ b/polaris-react/src/components/Listbox/components/Section/Section.tsx @@ -1,4 +1,4 @@ -import React, {ReactNode, useId} from 'react'; +import { ReactNode, useId } from 'react'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Listbox/components/Section/tests/Section.test.tsx b/polaris-react/src/components/Listbox/components/Section/tests/Section.test.tsx index 40a889957ae..8880dcff10f 100644 --- a/polaris-react/src/components/Listbox/components/Section/tests/Section.test.tsx +++ b/polaris-react/src/components/Listbox/components/Section/tests/Section.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Section} from '../Section'; diff --git a/polaris-react/src/components/Listbox/components/TextOption/TextOption.tsx b/polaris-react/src/components/Listbox/components/TextOption/TextOption.tsx index ca5d4b2397c..bf051aab4ce 100644 --- a/polaris-react/src/components/Listbox/components/TextOption/TextOption.tsx +++ b/polaris-react/src/components/Listbox/components/TextOption/TextOption.tsx @@ -1,4 +1,5 @@ -import React, {memo, useContext} from 'react'; +import { memo, useContext } from 'react'; +import * as React from 'react'; import {Checkbox} from '../../../Checkbox'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx b/polaris-react/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx index 328793ea5fc..76c35621df3 100644 --- a/polaris-react/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx +++ b/polaris-react/src/components/Listbox/components/TextOption/tests/TextOption.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {TextOption} from '../TextOption'; diff --git a/polaris-react/src/components/Listbox/tests/Listbox.test.tsx b/polaris-react/src/components/Listbox/tests/Listbox.test.tsx index 88693ab4c30..59f650fed70 100644 --- a/polaris-react/src/components/Listbox/tests/Listbox.test.tsx +++ b/polaris-react/src/components/Listbox/tests/Listbox.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {animationFrame, timer} from '@shopify/jest-dom-mocks'; import { diff --git a/polaris-react/src/components/Loading/Loading.stories.tsx b/polaris-react/src/components/Loading/Loading.stories.tsx index c0b145e463e..d1f4c9e5e27 100644 --- a/polaris-react/src/components/Loading/Loading.stories.tsx +++ b/polaris-react/src/components/Loading/Loading.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Frame, Loading} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Loading/tests/Loading.test.tsx b/polaris-react/src/components/Loading/tests/Loading.test.tsx index e802c9eb106..eef3d3ac42d 100644 --- a/polaris-react/src/components/Loading/tests/Loading.test.tsx +++ b/polaris-react/src/components/Loading/tests/Loading.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Loading} from '../Loading'; diff --git a/polaris-react/src/components/MediaCard/MediaCard.stories.tsx b/polaris-react/src/components/MediaCard/MediaCard.stories.tsx index 2a4b3b6fdd3..87250e19659 100644 --- a/polaris-react/src/components/MediaCard/MediaCard.stories.tsx +++ b/polaris-react/src/components/MediaCard/MediaCard.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {MediaCard, VideoThumbnail} from '@shopify/polaris'; diff --git a/polaris-react/src/components/MediaCard/MediaCard.tsx b/polaris-react/src/components/MediaCard/MediaCard.tsx index a37e04cb6ca..89b5098f3cc 100644 --- a/polaris-react/src/components/MediaCard/MediaCard.tsx +++ b/polaris-react/src/components/MediaCard/MediaCard.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {HorizontalDotsMinor} from '@shopify/polaris-icons'; import {useToggle} from '../../utilities/use-toggle'; diff --git a/polaris-react/src/components/MediaCard/tests/MediaCard.test.tsx b/polaris-react/src/components/MediaCard/tests/MediaCard.test.tsx index b27f9cc35dc..535cef727e2 100644 --- a/polaris-react/src/components/MediaCard/tests/MediaCard.test.tsx +++ b/polaris-react/src/components/MediaCard/tests/MediaCard.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Text} from '../../Text'; diff --git a/polaris-react/src/components/MediaQueryProvider/MediaQueryProvider.tsx b/polaris-react/src/components/MediaQueryProvider/MediaQueryProvider.tsx index c63e554019d..8925b36300c 100644 --- a/polaris-react/src/components/MediaQueryProvider/MediaQueryProvider.tsx +++ b/polaris-react/src/components/MediaQueryProvider/MediaQueryProvider.tsx @@ -1,4 +1,5 @@ -import React, {useEffect, useState, useCallback, useMemo} from 'react'; +import { useEffect, useState, useCallback, useMemo } from 'react'; +import * as React from 'react'; import {debounce} from '../../utilities/debounce'; import {MediaQueryContext} from '../../utilities/media-query'; diff --git a/polaris-react/src/components/MediaQueryProvider/tests/MediaQueryProvider.test.tsx b/polaris-react/src/components/MediaQueryProvider/tests/MediaQueryProvider.test.tsx index 23ed7d790ca..4af05eb343a 100644 --- a/polaris-react/src/components/MediaQueryProvider/tests/MediaQueryProvider.test.tsx +++ b/polaris-react/src/components/MediaQueryProvider/tests/MediaQueryProvider.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {matchMedia} from '@shopify/jest-dom-mocks'; import {act} from 'react-dom/test-utils'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/MessageIndicator/MessageIndicator.tsx b/polaris-react/src/components/MessageIndicator/MessageIndicator.tsx index e621eee512e..286093e9a66 100644 --- a/polaris-react/src/components/MessageIndicator/MessageIndicator.tsx +++ b/polaris-react/src/components/MessageIndicator/MessageIndicator.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from './MessageIndicator.scss'; diff --git a/polaris-react/src/components/MessageIndicator/tests/MessageIndicator.test.tsx b/polaris-react/src/components/MessageIndicator/tests/MessageIndicator.test.tsx index d431b6c2f48..681c92eb496 100644 --- a/polaris-react/src/components/MessageIndicator/tests/MessageIndicator.test.tsx +++ b/polaris-react/src/components/MessageIndicator/tests/MessageIndicator.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {MessageIndicator} from '../MessageIndicator'; diff --git a/polaris-react/src/components/Modal/Modal.stories.tsx b/polaris-react/src/components/Modal/Modal.stories.tsx index 2b732b9baea..0cf8875d1bd 100644 --- a/polaris-react/src/components/Modal/Modal.stories.tsx +++ b/polaris-react/src/components/Modal/Modal.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useRef, useState} from 'react'; +import { useCallback, useRef, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Banner, diff --git a/polaris-react/src/components/Modal/Modal.tsx b/polaris-react/src/components/Modal/Modal.tsx index 04f27f3829c..67fb8cfb804 100644 --- a/polaris-react/src/components/Modal/Modal.tsx +++ b/polaris-react/src/components/Modal/Modal.tsx @@ -1,4 +1,5 @@ -import React, {useState, useCallback, useRef, useId} from 'react'; +import { useState, useCallback, useRef, useId } from 'react'; +import * as React from 'react'; import {TransitionGroup} from 'react-transition-group'; import {focusFirstFocusableNode} from '../../utilities/focus'; diff --git a/polaris-react/src/components/Modal/components/CloseButton/CloseButton.tsx b/polaris-react/src/components/Modal/components/CloseButton/CloseButton.tsx index 176f52ef244..ce14449284b 100644 --- a/polaris-react/src/components/Modal/components/CloseButton/CloseButton.tsx +++ b/polaris-react/src/components/Modal/components/CloseButton/CloseButton.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {MobileCancelMajor} from '@shopify/polaris-icons'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Modal/components/Dialog/Dialog.tsx b/polaris-react/src/components/Modal/components/Dialog/Dialog.tsx index ae4706dd863..7e59276560d 100644 --- a/polaris-react/src/components/Modal/components/Dialog/Dialog.tsx +++ b/polaris-react/src/components/Modal/components/Dialog/Dialog.tsx @@ -1,4 +1,5 @@ -import React, {useRef, useEffect, SetStateAction, Dispatch} from 'react'; +import { useRef, useEffect, SetStateAction, Dispatch } from 'react'; +import * as React from 'react'; import {Transition, CSSTransition} from 'react-transition-group'; import {motion} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/Modal/components/Dialog/tests/Dialog.test.tsx b/polaris-react/src/components/Modal/components/Dialog/tests/Dialog.test.tsx index 04a6233ba0b..e16fa6cc5b0 100644 --- a/polaris-react/src/components/Modal/components/Dialog/tests/Dialog.test.tsx +++ b/polaris-react/src/components/Modal/components/Dialog/tests/Dialog.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {animationFrame} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Modal/components/Footer/Footer.tsx b/polaris-react/src/components/Modal/components/Footer/Footer.tsx index 7a282cd4c86..62977e06cf2 100644 --- a/polaris-react/src/components/Modal/components/Footer/Footer.tsx +++ b/polaris-react/src/components/Modal/components/Footer/Footer.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {ComplexAction} from '../../../../types'; import {buttonsFrom} from '../../../Button'; diff --git a/polaris-react/src/components/Modal/components/Header/Header.tsx b/polaris-react/src/components/Modal/components/Header/Header.tsx index 7a2dadb58d9..f0e190043d6 100644 --- a/polaris-react/src/components/Modal/components/Header/Header.tsx +++ b/polaris-react/src/components/Modal/components/Header/Header.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Box} from '../../../Box'; import {CloseButton} from '../CloseButton'; diff --git a/polaris-react/src/components/Modal/components/Section/Section.tsx b/polaris-react/src/components/Modal/components/Section/Section.tsx index 032159fbbf6..4e04f05d55c 100644 --- a/polaris-react/src/components/Modal/components/Section/Section.tsx +++ b/polaris-react/src/components/Modal/components/Section/Section.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Box} from '../../../Box'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Modal/tests/Modal.test.tsx b/polaris-react/src/components/Modal/tests/Modal.test.tsx index 12c5dee78c3..881c371b10f 100644 --- a/polaris-react/src/components/Modal/tests/Modal.test.tsx +++ b/polaris-react/src/components/Modal/tests/Modal.test.tsx @@ -1,4 +1,5 @@ -import React, {useRef} from 'react'; +import { useRef } from 'react'; +import * as React from 'react'; import {animationFrame} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Navigation/Navigation.stories.tsx b/polaris-react/src/components/Navigation/Navigation.stories.tsx index d2bc4488c23..8aef24a351c 100644 --- a/polaris-react/src/components/Navigation/Navigation.stories.tsx +++ b/polaris-react/src/components/Navigation/Navigation.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Frame, Navigation, Text} from '@shopify/polaris'; import { diff --git a/polaris-react/src/components/Navigation/Navigation.tsx b/polaris-react/src/components/Navigation/Navigation.tsx index df8afc527a2..d2dda456961 100644 --- a/polaris-react/src/components/Navigation/Navigation.tsx +++ b/polaris-react/src/components/Navigation/Navigation.tsx @@ -1,4 +1,5 @@ -import React, {useMemo} from 'react'; +import { useMemo } from 'react'; +import * as React from 'react'; import {Scrollable} from '../Scrollable'; import {WithinContentContext} from '../../utilities/within-content-context'; diff --git a/polaris-react/src/components/Navigation/components/Item/Item.tsx b/polaris-react/src/components/Navigation/components/Item/Item.tsx index 730048a65eb..1e0db016e4d 100644 --- a/polaris-react/src/components/Navigation/components/Item/Item.tsx +++ b/polaris-react/src/components/Navigation/components/Item/Item.tsx @@ -1,12 +1,4 @@ -import React, { - useEffect, - useContext, - useState, - MouseEvent, - ReactNode, - useRef, - useId, -} from 'react'; +import { useEffect, useContext, useState, MouseEvent, ReactNode, useRef, useId } from 'react'; import {useIsomorphicLayoutEffect} from '../../../../utilities/use-isomorphic-layout-effect'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Navigation/components/Item/components/Secondary/Secondary.tsx b/polaris-react/src/components/Navigation/components/Item/components/Secondary/Secondary.tsx index 58e59d0f254..747db2dd2d8 100644 --- a/polaris-react/src/components/Navigation/components/Item/components/Secondary/Secondary.tsx +++ b/polaris-react/src/components/Navigation/components/Item/components/Secondary/Secondary.tsx @@ -1,4 +1,5 @@ -import React, {useId} from 'react'; +import { useId } from 'react'; +import * as React from 'react'; import {Collapsible} from '../../../../../Collapsible'; import styles from '../../../../Navigation.scss'; diff --git a/polaris-react/src/components/Navigation/components/Item/components/Secondary/tests/Secondary.test.tsx b/polaris-react/src/components/Navigation/components/Item/components/Secondary/tests/Secondary.test.tsx index 15e4c454dc9..86cfb1ea56a 100644 --- a/polaris-react/src/components/Navigation/components/Item/components/Secondary/tests/Secondary.test.tsx +++ b/polaris-react/src/components/Navigation/components/Item/components/Secondary/tests/Secondary.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Collapsible} from '../../../../../../Collapsible'; diff --git a/polaris-react/src/components/Navigation/components/Item/tests/Item.test.tsx b/polaris-react/src/components/Navigation/components/Item/tests/Item.test.tsx index 97bc027491d..e7f865de3ab 100644 --- a/polaris-react/src/components/Navigation/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/Navigation/components/Item/tests/Item.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {PlusMinor} from '@shopify/polaris-icons'; import {matchMedia} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Navigation/components/Section/Section.tsx b/polaris-react/src/components/Navigation/components/Section/Section.tsx index 4ff6cd90894..8d30eecd891 100644 --- a/polaris-react/src/components/Navigation/components/Section/Section.tsx +++ b/polaris-react/src/components/Navigation/components/Section/Section.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useRef, useState, useId} from 'react'; +import { useEffect, useRef, useState, useId } from 'react'; import {HorizontalDotsMinor} from '@shopify/polaris-icons'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/Navigation/components/Section/tests/Section.test.tsx b/polaris-react/src/components/Navigation/components/Section/tests/Section.test.tsx index bb023bac343..fc9510f4e4b 100644 --- a/polaris-react/src/components/Navigation/components/Section/tests/Section.test.tsx +++ b/polaris-react/src/components/Navigation/components/Section/tests/Section.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {matchMedia, animationFrame} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Navigation/tests/Navigation.test.tsx b/polaris-react/src/components/Navigation/tests/Navigation.test.tsx index ff14ee1ad7c..fa4ea0be4ce 100644 --- a/polaris-react/src/components/Navigation/tests/Navigation.test.tsx +++ b/polaris-react/src/components/Navigation/tests/Navigation.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Navigation} from '../Navigation'; diff --git a/polaris-react/src/components/OptionList/OptionList.stories.tsx b/polaris-react/src/components/OptionList/OptionList.stories.tsx index eb9f8d5bf3e..7a51c9d8744 100644 --- a/polaris-react/src/components/OptionList/OptionList.stories.tsx +++ b/polaris-react/src/components/OptionList/OptionList.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, LegacyCard, OptionList, Popover} from '@shopify/polaris'; diff --git a/polaris-react/src/components/OptionList/OptionList.tsx b/polaris-react/src/components/OptionList/OptionList.tsx index 804b5dbe92b..86e73630533 100644 --- a/polaris-react/src/components/OptionList/OptionList.tsx +++ b/polaris-react/src/components/OptionList/OptionList.tsx @@ -1,4 +1,4 @@ -import React, {useState, useCallback, useId} from 'react'; +import { useState, useCallback, useId } from 'react'; import type { Descriptor, diff --git a/polaris-react/src/components/OptionList/components/Checkbox/Checkbox.tsx b/polaris-react/src/components/OptionList/components/Checkbox/Checkbox.tsx index 4ae49230ffc..65564666db3 100644 --- a/polaris-react/src/components/OptionList/components/Checkbox/Checkbox.tsx +++ b/polaris-react/src/components/OptionList/components/Checkbox/Checkbox.tsx @@ -1,4 +1,4 @@ -import React, {useId} from 'react'; +import { useId } from 'react'; import {TickSmallMinor} from '@shopify/polaris-icons'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/OptionList/components/Checkbox/tests/Checkbox.test.tsx b/polaris-react/src/components/OptionList/components/Checkbox/tests/Checkbox.test.tsx index 93d22c8c264..a757f9121c7 100644 --- a/polaris-react/src/components/OptionList/components/Checkbox/tests/Checkbox.test.tsx +++ b/polaris-react/src/components/OptionList/components/Checkbox/tests/Checkbox.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Checkbox, CheckboxProps} from '../Checkbox'; diff --git a/polaris-react/src/components/OptionList/components/Option/Option.tsx b/polaris-react/src/components/OptionList/components/Option/Option.tsx index 3d2c46ffb0f..5e0087f5c68 100644 --- a/polaris-react/src/components/OptionList/components/Option/Option.tsx +++ b/polaris-react/src/components/OptionList/components/Option/Option.tsx @@ -1,4 +1,5 @@ -import React, {useCallback} from 'react'; +import { useCallback } from 'react'; +import * as React from 'react'; import {useToggle} from '../../../../utilities/use-toggle'; import type {IconProps} from '../../../Icon'; diff --git a/polaris-react/src/components/OptionList/components/Option/tests/Option.test.tsx b/polaris-react/src/components/OptionList/components/Option/tests/Option.test.tsx index 4aed7b01827..3a285e4a454 100644 --- a/polaris-react/src/components/OptionList/components/Option/tests/Option.test.tsx +++ b/polaris-react/src/components/OptionList/components/Option/tests/Option.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Checkbox} from '../../Checkbox'; diff --git a/polaris-react/src/components/OptionList/tests/OptionList.test.tsx b/polaris-react/src/components/OptionList/tests/OptionList.test.tsx index 4986cd77196..38883778e6d 100644 --- a/polaris-react/src/components/OptionList/tests/OptionList.test.tsx +++ b/polaris-react/src/components/OptionList/tests/OptionList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Option} from '../components'; diff --git a/polaris-react/src/components/Page/Page.stories.tsx b/polaris-react/src/components/Page/Page.stories.tsx index bcab622052c..3e7aba897d8 100644 --- a/polaris-react/src/components/Page/Page.stories.tsx +++ b/polaris-react/src/components/Page/Page.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Badge, diff --git a/polaris-react/src/components/Page/Page.tsx b/polaris-react/src/components/Page/Page.tsx index 2ac7b12453e..b02332ce742 100644 --- a/polaris-react/src/components/Page/Page.tsx +++ b/polaris-react/src/components/Page/Page.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import {isInterface} from '../../utilities/is-interface'; diff --git a/polaris-react/src/components/Page/components/Header/Header.tsx b/polaris-react/src/components/Page/components/Header/Header.tsx index 6b41f0942d0..fc72ba51943 100644 --- a/polaris-react/src/components/Page/components/Header/Header.tsx +++ b/polaris-react/src/components/Page/components/Header/Header.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {buttonFrom} from '../../../Button'; diff --git a/polaris-react/src/components/Page/components/Header/components/Title/Title.tsx b/polaris-react/src/components/Page/components/Header/components/Title/Title.tsx index 7f465528dc1..c58adaf52b8 100644 --- a/polaris-react/src/components/Page/components/Header/components/Title/Title.tsx +++ b/polaris-react/src/components/Page/components/Header/components/Title/Title.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../../../utilities/css'; diff --git a/polaris-react/src/components/Page/components/Header/components/Title/tests/Title.test.tsx b/polaris-react/src/components/Page/components/Header/components/Title/tests/Title.test.tsx index e31f25028fe..d21bf58e58b 100644 --- a/polaris-react/src/components/Page/components/Header/components/Title/tests/Title.test.tsx +++ b/polaris-react/src/components/Page/components/Header/components/Title/tests/Title.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Badge} from '../../../../../../Badge'; diff --git a/polaris-react/src/components/Page/components/Header/tests/Header.test.tsx b/polaris-react/src/components/Page/components/Header/tests/Header.test.tsx index 3cb77500365..d3631954877 100644 --- a/polaris-react/src/components/Page/components/Header/tests/Header.test.tsx +++ b/polaris-react/src/components/Page/components/Header/tests/Header.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {PlusMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/Page/tests/Page.test.tsx b/polaris-react/src/components/Page/tests/Page.test.tsx index 535ffe6639a..f7790d8013d 100644 --- a/polaris-react/src/components/Page/tests/Page.test.tsx +++ b/polaris-react/src/components/Page/tests/Page.test.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import {animationFrame} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/PageActions/PageActions.stories.tsx b/polaris-react/src/components/PageActions/PageActions.stories.tsx index 0b74356e2a3..696f2907766 100644 --- a/polaris-react/src/components/PageActions/PageActions.stories.tsx +++ b/polaris-react/src/components/PageActions/PageActions.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, PageActions} from '@shopify/polaris'; diff --git a/polaris-react/src/components/PageActions/PageActions.tsx b/polaris-react/src/components/PageActions/PageActions.tsx index 1cd083aca50..ca9871cf1ca 100644 --- a/polaris-react/src/components/PageActions/PageActions.tsx +++ b/polaris-react/src/components/PageActions/PageActions.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type { ComplexAction, diff --git a/polaris-react/src/components/PageActions/tests/PageActions.test.tsx b/polaris-react/src/components/PageActions/tests/PageActions.test.tsx index fe577b1e1d5..4bb58213528 100644 --- a/polaris-react/src/components/PageActions/tests/PageActions.test.tsx +++ b/polaris-react/src/components/PageActions/tests/PageActions.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {ButtonGroup} from '../../ButtonGroup'; diff --git a/polaris-react/src/components/Pagination/Pagination.stories.tsx b/polaris-react/src/components/Pagination/Pagination.stories.tsx index ae7f1efbd66..2c17d1a36cf 100644 --- a/polaris-react/src/components/Pagination/Pagination.stories.tsx +++ b/polaris-react/src/components/Pagination/Pagination.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Pagination} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Pagination/Pagination.tsx b/polaris-react/src/components/Pagination/Pagination.tsx index 6fb8850bff1..61750eda892 100644 --- a/polaris-react/src/components/Pagination/Pagination.tsx +++ b/polaris-react/src/components/Pagination/Pagination.tsx @@ -1,5 +1,6 @@ import {ChevronLeftMinor, ChevronRightMinor} from '@shopify/polaris-icons'; -import React, {createRef} from 'react'; +import { createRef } from 'react'; +import * as React from 'react'; import type {Key} from '../../types'; import {useI18n} from '../../utilities/i18n'; diff --git a/polaris-react/src/components/Pagination/tests/Pagination.test.tsx b/polaris-react/src/components/Pagination/tests/Pagination.test.tsx index 88b3b748867..13f9248ef51 100644 --- a/polaris-react/src/components/Pagination/tests/Pagination.test.tsx +++ b/polaris-react/src/components/Pagination/tests/Pagination.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import type {CustomRoot} from '@shopify/react-testing'; diff --git a/polaris-react/src/components/PolarisTestProvider/PolarisTestProvider.tsx b/polaris-react/src/components/PolarisTestProvider/PolarisTestProvider.tsx index 41b825de830..501c90b6eb4 100644 --- a/polaris-react/src/components/PolarisTestProvider/PolarisTestProvider.tsx +++ b/polaris-react/src/components/PolarisTestProvider/PolarisTestProvider.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, Fragment, StrictMode} from 'react'; +import { useMemo, Fragment, StrictMode } from 'react'; +import * as React from 'react'; import {PortalsManager} from '../PortalsManager'; import {FocusManager} from '../FocusManager'; diff --git a/polaris-react/src/components/PolarisTestProvider/tests/PolarisTestProvider.test.tsx b/polaris-react/src/components/PolarisTestProvider/tests/PolarisTestProvider.test.tsx index e63cfe3cb21..cd0df9085e9 100644 --- a/polaris-react/src/components/PolarisTestProvider/tests/PolarisTestProvider.test.tsx +++ b/polaris-react/src/components/PolarisTestProvider/tests/PolarisTestProvider.test.tsx @@ -1,4 +1,4 @@ -import React, {StrictMode} from 'react'; +import { StrictMode } from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {MediaQueryContext, useMediaQuery} from '../../../utilities/media-query'; diff --git a/polaris-react/src/components/Popover/Popover.stories.tsx b/polaris-react/src/components/Popover/Popover.stories.tsx index 56dc742ca5b..1e79fed19d5 100644 --- a/polaris-react/src/components/Popover/Popover.stories.tsx +++ b/polaris-react/src/components/Popover/Popover.stories.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; +import * as React from 'react'; import type {ComponentMeta} from '@storybook/react'; import { ActionList, diff --git a/polaris-react/src/components/Popover/Popover.tsx b/polaris-react/src/components/Popover/Popover.tsx index 6c1ff3acd7d..5b4ffdc2169 100644 --- a/polaris-react/src/components/Popover/Popover.tsx +++ b/polaris-react/src/components/Popover/Popover.tsx @@ -1,4 +1,4 @@ -import React, { +import { Children, forwardRef, useEffect, @@ -8,6 +8,8 @@ import React, { useId, useState, } from 'react'; + +import * as React from 'react'; import type {AriaAttributes} from 'react'; import { diff --git a/polaris-react/src/components/Popover/components/Pane/Pane.tsx b/polaris-react/src/components/Popover/components/Pane/Pane.tsx index 2ee7d084097..c1ec5156c42 100644 --- a/polaris-react/src/components/Popover/components/Pane/Pane.tsx +++ b/polaris-react/src/components/Popover/components/Pane/Pane.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {wrapWithComponent} from '../../../../utilities/components'; diff --git a/polaris-react/src/components/Popover/components/Pane/tests/Pane.test.tsx b/polaris-react/src/components/Popover/components/Pane/tests/Pane.test.tsx index d7425392284..9d7b5f7ecf6 100644 --- a/polaris-react/src/components/Popover/components/Pane/tests/Pane.test.tsx +++ b/polaris-react/src/components/Popover/components/Pane/tests/Pane.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Scrollable} from '../../../../Scrollable'; diff --git a/polaris-react/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx b/polaris-react/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx index 85a17335068..bdf2ad6f8ba 100644 --- a/polaris-react/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx +++ b/polaris-react/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent, Children, createRef} from 'react'; +import { PureComponent, Children, createRef } from 'react'; +import * as React from 'react'; import {motion} from '@shopify/polaris-tokens'; import {findFirstKeyboardFocusableNode} from '../../../../utilities/focus'; diff --git a/polaris-react/src/components/Popover/components/PopoverOverlay/tests/PopoverOverlay.test.tsx b/polaris-react/src/components/Popover/components/PopoverOverlay/tests/PopoverOverlay.test.tsx index 81112174401..b35e84fe6f8 100644 --- a/polaris-react/src/components/Popover/components/PopoverOverlay/tests/PopoverOverlay.test.tsx +++ b/polaris-react/src/components/Popover/components/PopoverOverlay/tests/PopoverOverlay.test.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import { useState, useRef } from 'react'; import {mountWithApp} from 'tests/utilities'; import {Key} from '../../../../../types'; @@ -350,7 +350,7 @@ describe('', () => { describe('deleting descendant elements', () => { const DeleteButton = () => { - const [show, setShow] = React.useState(true); + const [show, setShow] = useState(true); return show ? ( diff --git a/polaris-react/src/components/Popover/components/Section/Section.tsx b/polaris-react/src/components/Popover/components/Section/Section.tsx index ea14c9d0550..c32e97aeb1e 100644 --- a/polaris-react/src/components/Popover/components/Section/Section.tsx +++ b/polaris-react/src/components/Popover/components/Section/Section.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Box} from '../../../Box'; import styles from '../../Popover.scss'; diff --git a/polaris-react/src/components/Popover/components/Section/tests/Section.test.tsx b/polaris-react/src/components/Popover/components/Section/tests/Section.test.tsx index 6ef0a65d3c1..57806de321e 100644 --- a/polaris-react/src/components/Popover/components/Section/tests/Section.test.tsx +++ b/polaris-react/src/components/Popover/components/Section/tests/Section.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/Popover/tests/Popover.test.tsx b/polaris-react/src/components/Popover/tests/Popover.test.tsx index 941ebc689ed..e93a467ddf9 100644 --- a/polaris-react/src/components/Popover/tests/Popover.test.tsx +++ b/polaris-react/src/components/Popover/tests/Popover.test.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useRef, useState} from 'react'; +import { useCallback, useRef, useState } from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Portal} from '../../Portal'; diff --git a/polaris-react/src/components/Portal/Portal.tsx b/polaris-react/src/components/Portal/Portal.tsx index cb3fd0da96b..2170ba4c20b 100644 --- a/polaris-react/src/components/Portal/Portal.tsx +++ b/polaris-react/src/components/Portal/Portal.tsx @@ -1,4 +1,5 @@ -import React, {useEffect, useId} from 'react'; +import { useEffect, useId } from 'react'; +import * as React from 'react'; import {createPortal} from 'react-dom'; import {usePortalsManager} from '../../utilities/portals'; diff --git a/polaris-react/src/components/Portal/tests/Portal.test.tsx b/polaris-react/src/components/Portal/tests/Portal.test.tsx index 085c35386f2..82aa1fffc29 100644 --- a/polaris-react/src/components/Portal/tests/Portal.test.tsx +++ b/polaris-react/src/components/Portal/tests/Portal.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Portal} from '../Portal'; diff --git a/polaris-react/src/components/PortalsManager/PortalsManager.tsx b/polaris-react/src/components/PortalsManager/PortalsManager.tsx index 5764840442d..0292b7957c6 100644 --- a/polaris-react/src/components/PortalsManager/PortalsManager.tsx +++ b/polaris-react/src/components/PortalsManager/PortalsManager.tsx @@ -1,4 +1,5 @@ -import React, {useMemo, useState} from 'react'; +import { useMemo, useState } from 'react'; +import * as React from 'react'; import { PortalsManagerContext, diff --git a/polaris-react/src/components/PortalsManager/components/PortalsContainer/PortalsContainer.tsx b/polaris-react/src/components/PortalsManager/components/PortalsContainer/PortalsContainer.tsx index 326d1f5c2f7..8c87d1c6033 100644 --- a/polaris-react/src/components/PortalsManager/components/PortalsContainer/PortalsContainer.tsx +++ b/polaris-react/src/components/PortalsManager/components/PortalsContainer/PortalsContainer.tsx @@ -1,4 +1,4 @@ -import React, {forwardRef, RefObject} from 'react'; +import { forwardRef, RefObject } from 'react'; export interface PolarisContainerProps {} diff --git a/polaris-react/src/components/PortalsManager/tests/PortalsManager.test.tsx b/polaris-react/src/components/PortalsManager/tests/PortalsManager.test.tsx index fcdee28bc18..22aee8be5c9 100644 --- a/polaris-react/src/components/PortalsManager/tests/PortalsManager.test.tsx +++ b/polaris-react/src/components/PortalsManager/tests/PortalsManager.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp, mount} from 'tests/utilities'; import {usePortalsManager} from '../../../utilities/portals'; diff --git a/polaris-react/src/components/PositionedOverlay/PositionedOverlay.tsx b/polaris-react/src/components/PositionedOverlay/PositionedOverlay.tsx index 3da6fa2c6a9..0efbdeecf8e 100644 --- a/polaris-react/src/components/PositionedOverlay/PositionedOverlay.tsx +++ b/polaris-react/src/components/PositionedOverlay/PositionedOverlay.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; +import * as React from 'react'; import {classNames} from '../../utilities/css'; import {getRectForNode, Rect} from '../../utilities/geometry'; diff --git a/polaris-react/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx b/polaris-react/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx index dc2d0ca7d40..d112fcedb97 100644 --- a/polaris-react/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx +++ b/polaris-react/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import { useRef } from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/ProgressBar/ProgressBar.stories.tsx b/polaris-react/src/components/ProgressBar/ProgressBar.stories.tsx index 50154227d3f..6fd2eb5c477 100644 --- a/polaris-react/src/components/ProgressBar/ProgressBar.stories.tsx +++ b/polaris-react/src/components/ProgressBar/ProgressBar.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {ProgressBar} from '@shopify/polaris'; diff --git a/polaris-react/src/components/ProgressBar/ProgressBar.tsx b/polaris-react/src/components/ProgressBar/ProgressBar.tsx index c93b03a3736..4ecc30bcb5a 100644 --- a/polaris-react/src/components/ProgressBar/ProgressBar.tsx +++ b/polaris-react/src/components/ProgressBar/ProgressBar.tsx @@ -1,4 +1,5 @@ -import React, {useRef} from 'react'; +import { useRef } from 'react'; +import * as React from 'react'; import {CSSTransition} from 'react-transition-group'; import {motion} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/ProgressBar/tests/ProgressBar.test.tsx b/polaris-react/src/components/ProgressBar/tests/ProgressBar.test.tsx index 093a016fa60..488db3b4734 100644 --- a/polaris-react/src/components/ProgressBar/tests/ProgressBar.test.tsx +++ b/polaris-react/src/components/ProgressBar/tests/ProgressBar.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {CSSTransition} from 'react-transition-group'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/RadioButton/RadioButton.stories.tsx b/polaris-react/src/components/RadioButton/RadioButton.stories.tsx index 5fed303ebca..881d04d51f0 100644 --- a/polaris-react/src/components/RadioButton/RadioButton.stories.tsx +++ b/polaris-react/src/components/RadioButton/RadioButton.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {RadioButton, LegacyStack} from '@shopify/polaris'; diff --git a/polaris-react/src/components/RadioButton/RadioButton.tsx b/polaris-react/src/components/RadioButton/RadioButton.tsx index 70152ee84ed..0d1ce7bfa53 100644 --- a/polaris-react/src/components/RadioButton/RadioButton.tsx +++ b/polaris-react/src/components/RadioButton/RadioButton.tsx @@ -1,4 +1,5 @@ -import React, {useRef, useId} from 'react'; +import { useRef, useId } from 'react'; +import * as React from 'react'; import {useToggle} from '../../utilities/use-toggle'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/RadioButton/tests/RadioButton.test.tsx b/polaris-react/src/components/RadioButton/tests/RadioButton.test.tsx index f2a99c06289..fad43436263 100644 --- a/polaris-react/src/components/RadioButton/tests/RadioButton.test.tsx +++ b/polaris-react/src/components/RadioButton/tests/RadioButton.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {RadioButton} from '../RadioButton'; diff --git a/polaris-react/src/components/RangeSlider/RangeSlider.stories.tsx b/polaris-react/src/components/RangeSlider/RangeSlider.stories.tsx index 489e7a6569f..c6cd14a7bab 100644 --- a/polaris-react/src/components/RangeSlider/RangeSlider.stories.tsx +++ b/polaris-react/src/components/RangeSlider/RangeSlider.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { LegacyCard, diff --git a/polaris-react/src/components/RangeSlider/RangeSlider.tsx b/polaris-react/src/components/RangeSlider/RangeSlider.tsx index 5c83f4afa07..633aa7ca6cb 100644 --- a/polaris-react/src/components/RangeSlider/RangeSlider.tsx +++ b/polaris-react/src/components/RangeSlider/RangeSlider.tsx @@ -1,4 +1,4 @@ -import React, {useId} from 'react'; +import { useId } from 'react'; import type {RangeSliderProps, RangeSliderValue, DualValue} from './types'; import {SingleThumb, DualThumb} from './components'; diff --git a/polaris-react/src/components/RangeSlider/components/DualThumb/DualThumb.tsx b/polaris-react/src/components/RangeSlider/components/DualThumb/DualThumb.tsx index d192986f30c..60de8912fbc 100644 --- a/polaris-react/src/components/RangeSlider/components/DualThumb/DualThumb.tsx +++ b/polaris-react/src/components/RangeSlider/components/DualThumb/DualThumb.tsx @@ -1,4 +1,5 @@ -import React, {Component, createRef} from 'react'; +import { Component, createRef } from 'react'; +import * as React from 'react'; import {debounce} from '../../../../utilities/debounce'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/RangeSlider/components/DualThumb/tests/DualThumb.test.tsx b/polaris-react/src/components/RangeSlider/components/DualThumb/tests/DualThumb.test.tsx index 022cd3c8b72..a12dc0a075b 100644 --- a/polaris-react/src/components/RangeSlider/components/DualThumb/tests/DualThumb.test.tsx +++ b/polaris-react/src/components/RangeSlider/components/DualThumb/tests/DualThumb.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp, CustomRoot} from 'tests/utilities'; import {Key} from '../../../../../types'; diff --git a/polaris-react/src/components/RangeSlider/components/SingleThumb/SingleThumb.tsx b/polaris-react/src/components/RangeSlider/components/SingleThumb/SingleThumb.tsx index 57bd7097b58..474d6b84f2d 100644 --- a/polaris-react/src/components/RangeSlider/components/SingleThumb/SingleThumb.tsx +++ b/polaris-react/src/components/RangeSlider/components/SingleThumb/SingleThumb.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {clamp} from '../../../../utilities/clamp'; diff --git a/polaris-react/src/components/RangeSlider/components/SingleThumb/tests/SingleThumb.test.tsx b/polaris-react/src/components/RangeSlider/components/SingleThumb/tests/SingleThumb.test.tsx index 75683bebba5..5707da3229d 100644 --- a/polaris-react/src/components/RangeSlider/components/SingleThumb/tests/SingleThumb.test.tsx +++ b/polaris-react/src/components/RangeSlider/components/SingleThumb/tests/SingleThumb.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {InlineError} from '../../../../InlineError'; diff --git a/polaris-react/src/components/RangeSlider/tests/RangeSlider.test.tsx b/polaris-react/src/components/RangeSlider/tests/RangeSlider.test.tsx index b49c3b44553..922fb19a79a 100644 --- a/polaris-react/src/components/RangeSlider/tests/RangeSlider.test.tsx +++ b/polaris-react/src/components/RangeSlider/tests/RangeSlider.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {RangeSlider} from '../RangeSlider'; diff --git a/polaris-react/src/components/ResourceItem/ResourceItem.stories.tsx b/polaris-react/src/components/ResourceItem/ResourceItem.stories.tsx index 0597ae4a4bf..35034baa1f0 100644 --- a/polaris-react/src/components/ResourceItem/ResourceItem.stories.tsx +++ b/polaris-react/src/components/ResourceItem/ResourceItem.stories.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react'; +import { useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Avatar, diff --git a/polaris-react/src/components/ResourceItem/ResourceItem.tsx b/polaris-react/src/components/ResourceItem/ResourceItem.tsx index 59b19afc190..3ff8e44ae9c 100644 --- a/polaris-react/src/components/ResourceItem/ResourceItem.tsx +++ b/polaris-react/src/components/ResourceItem/ResourceItem.tsx @@ -1,4 +1,5 @@ -import React, {Component, createRef, useContext, useId} from 'react'; +import { Component, createRef, useContext, useId } from 'react'; +import * as React from 'react'; import {HorizontalDotsMinor} from '@shopify/polaris-icons'; import isEqual from 'react-fast-compare'; diff --git a/polaris-react/src/components/ResourceItem/tests/ResourceItem.test.tsx b/polaris-react/src/components/ResourceItem/tests/ResourceItem.test.tsx index 8b584bea38c..f1ac38dedcf 100644 --- a/polaris-react/src/components/ResourceItem/tests/ResourceItem.test.tsx +++ b/polaris-react/src/components/ResourceItem/tests/ResourceItem.test.tsx @@ -1,4 +1,4 @@ -import React, {AllHTMLAttributes} from 'react'; +import { AllHTMLAttributes } from 'react'; import {mountWithApp} from 'tests/utilities'; import {matchMedia} from '@shopify/jest-dom-mocks'; import {setMediaWidth} from 'tests/utilities/breakpoints'; diff --git a/polaris-react/src/components/ResourceList/ResourceList.stories.tsx b/polaris-react/src/components/ResourceList/ResourceList.stories.tsx index f985d6d718a..21befec954f 100644 --- a/polaris-react/src/components/ResourceList/ResourceList.stories.tsx +++ b/polaris-react/src/components/ResourceList/ResourceList.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Avatar, diff --git a/polaris-react/src/components/ResourceList/ResourceList.tsx b/polaris-react/src/components/ResourceList/ResourceList.tsx index b215d548422..215669b846c 100644 --- a/polaris-react/src/components/ResourceList/ResourceList.tsx +++ b/polaris-react/src/components/ResourceList/ResourceList.tsx @@ -1,11 +1,5 @@ -import React, { - useCallback, - useEffect, - useReducer, - useRef, - useState, - Children, -} from 'react'; +import { useCallback, useEffect, useReducer, useRef, useState, Children } from 'react'; +import * as React from 'react'; import {EnableSelectionMinor} from '@shopify/polaris-icons'; import {tokens, toPx} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/ResourceList/tests/ResourceList.test.tsx b/polaris-react/src/components/ResourceList/tests/ResourceList.test.tsx index af5bc874971..b766151e83c 100644 --- a/polaris-react/src/components/ResourceList/tests/ResourceList.test.tsx +++ b/polaris-react/src/components/ResourceList/tests/ResourceList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {matchMedia} from '@shopify/jest-dom-mocks'; diff --git a/polaris-react/src/components/ScrollLock/tests/ScrollLock.test.tsx b/polaris-react/src/components/ScrollLock/tests/ScrollLock.test.tsx index ea43914b60f..667c4691bf8 100644 --- a/polaris-react/src/components/ScrollLock/tests/ScrollLock.test.tsx +++ b/polaris-react/src/components/ScrollLock/tests/ScrollLock.test.tsx @@ -1,4 +1,4 @@ -import React, {useState, useCallback} from 'react'; +import { useState, useCallback } from 'react'; import {mountWithApp} from 'tests/utilities'; import {SCROLL_LOCKING_ATTRIBUTE} from '../../../utilities/scroll-lock-manager'; diff --git a/polaris-react/src/components/Scrollable/Scrollable.stories.tsx b/polaris-react/src/components/Scrollable/Scrollable.stories.tsx index 50751de6512..8df4effbc64 100644 --- a/polaris-react/src/components/Scrollable/Scrollable.stories.tsx +++ b/polaris-react/src/components/Scrollable/Scrollable.stories.tsx @@ -1,4 +1,4 @@ -import React, {ComponentRef, useRef} from 'react'; +import { ComponentRef, useRef } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, LegacyCard, Scrollable} from '@shopify/polaris'; import type {ScrollableRef} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Scrollable/Scrollable.tsx b/polaris-react/src/components/Scrollable/Scrollable.tsx index aa3a27d9ef5..9969b9448d5 100644 --- a/polaris-react/src/components/Scrollable/Scrollable.tsx +++ b/polaris-react/src/components/Scrollable/Scrollable.tsx @@ -1,11 +1,5 @@ -import React, { - useEffect, - useRef, - useState, - useCallback, - useImperativeHandle, - forwardRef, -} from 'react'; +import { useEffect, useRef, useState, useCallback, useImperativeHandle, forwardRef } from 'react'; +import * as React from 'react'; import {debounce} from '../../utilities/debounce'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Scrollable/components/ScrollTo/ScrollTo.tsx b/polaris-react/src/components/Scrollable/components/ScrollTo/ScrollTo.tsx index 41dee29250b..1f93507d832 100644 --- a/polaris-react/src/components/Scrollable/components/ScrollTo/ScrollTo.tsx +++ b/polaris-react/src/components/Scrollable/components/ScrollTo/ScrollTo.tsx @@ -1,4 +1,4 @@ -import React, {useContext, useEffect, useRef, useId} from 'react'; +import { useContext, useEffect, useRef, useId } from 'react'; import {ScrollableContext} from '../../context'; diff --git a/polaris-react/src/components/Scrollable/components/ScrollTo/tests/ScrollTo.test.tsx b/polaris-react/src/components/Scrollable/components/ScrollTo/tests/ScrollTo.test.tsx index 395022aa275..f000f62440a 100644 --- a/polaris-react/src/components/Scrollable/components/ScrollTo/tests/ScrollTo.test.tsx +++ b/polaris-react/src/components/Scrollable/components/ScrollTo/tests/ScrollTo.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {ScrollTo} from '../ScrollTo'; diff --git a/polaris-react/src/components/Scrollable/tests/Scrollable.test.tsx b/polaris-react/src/components/Scrollable/tests/Scrollable.test.tsx index c04bdc41de3..78b4b436337 100644 --- a/polaris-react/src/components/Scrollable/tests/Scrollable.test.tsx +++ b/polaris-react/src/components/Scrollable/tests/Scrollable.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Scrollable} from '../Scrollable'; diff --git a/polaris-react/src/components/Select/Select.stories.tsx b/polaris-react/src/components/Select/Select.stories.tsx index 84d37669da1..bd1433d7a63 100644 --- a/polaris-react/src/components/Select/Select.stories.tsx +++ b/polaris-react/src/components/Select/Select.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { LegacyCard, diff --git a/polaris-react/src/components/Select/Select.tsx b/polaris-react/src/components/Select/Select.tsx index 165a1898e06..c699c434ca9 100644 --- a/polaris-react/src/components/Select/Select.tsx +++ b/polaris-react/src/components/Select/Select.tsx @@ -1,4 +1,5 @@ -import React, {useId} from 'react'; +import { useId } from 'react'; +import * as React from 'react'; import {SelectMinor} from '@shopify/polaris-icons'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Select/tests/Select.test.tsx b/polaris-react/src/components/Select/tests/Select.test.tsx index abdedf3fbf9..d076fbfc0d7 100644 --- a/polaris-react/src/components/Select/tests/Select.test.tsx +++ b/polaris-react/src/components/Select/tests/Select.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {CircleTickOutlineMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/SelectAllActions/SelectAllActions.tsx b/polaris-react/src/components/SelectAllActions/SelectAllActions.tsx index 8a3dc9df87b..f535d547eac 100644 --- a/polaris-react/src/components/SelectAllActions/SelectAllActions.tsx +++ b/polaris-react/src/components/SelectAllActions/SelectAllActions.tsx @@ -1,4 +1,4 @@ -import React, {forwardRef} from 'react'; +import { forwardRef } from 'react'; import {Transition} from 'react-transition-group'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/SelectAllActions/tests/SelectAllActions.test.tsx b/polaris-react/src/components/SelectAllActions/tests/SelectAllActions.test.tsx index 9afa5713de1..c9725139f03 100644 --- a/polaris-react/src/components/SelectAllActions/tests/SelectAllActions.test.tsx +++ b/polaris-react/src/components/SelectAllActions/tests/SelectAllActions.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {Transition, CSSTransition} from 'react-transition-group'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/SettingAction/SettingAction.tsx b/polaris-react/src/components/SettingAction/SettingAction.tsx index 2c5f7cd1751..e616844cf72 100644 --- a/polaris-react/src/components/SettingAction/SettingAction.tsx +++ b/polaris-react/src/components/SettingAction/SettingAction.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from './SettingAction.scss'; diff --git a/polaris-react/src/components/SettingToggle/SettingToggle.stories.tsx b/polaris-react/src/components/SettingToggle/SettingToggle.stories.tsx index d7ba2e1ebd8..e66f0a2e7f6 100644 --- a/polaris-react/src/components/SettingToggle/SettingToggle.stories.tsx +++ b/polaris-react/src/components/SettingToggle/SettingToggle.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {SettingToggle, Text} from '@shopify/polaris'; diff --git a/polaris-react/src/components/SettingToggle/SettingToggle.tsx b/polaris-react/src/components/SettingToggle/SettingToggle.tsx index b983e710dd7..c5974218ddf 100644 --- a/polaris-react/src/components/SettingToggle/SettingToggle.tsx +++ b/polaris-react/src/components/SettingToggle/SettingToggle.tsx @@ -1,4 +1,5 @@ -import React, {useId} from 'react'; +import { useId } from 'react'; +import * as React from 'react'; import type {ComplexAction} from '../../types'; import {SettingAction} from '../SettingAction'; diff --git a/polaris-react/src/components/SettingToggle/tests/SettingToggle.test.tsx b/polaris-react/src/components/SettingToggle/tests/SettingToggle.test.tsx index 6b9ca1fde7e..3f58c927063 100644 --- a/polaris-react/src/components/SettingToggle/tests/SettingToggle.test.tsx +++ b/polaris-react/src/components/SettingToggle/tests/SettingToggle.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SettingAction} from '../../SettingAction'; diff --git a/polaris-react/src/components/Sheet/Sheet.stories.tsx b/polaris-react/src/components/Sheet/Sheet.stories.tsx index a39890bd1b8..b492f75ef51 100644 --- a/polaris-react/src/components/Sheet/Sheet.stories.tsx +++ b/polaris-react/src/components/Sheet/Sheet.stories.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; +import * as React from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Button, diff --git a/polaris-react/src/components/Sheet/Sheet.tsx b/polaris-react/src/components/Sheet/Sheet.tsx index ed50cfb1baf..d5d9729ee03 100644 --- a/polaris-react/src/components/Sheet/Sheet.tsx +++ b/polaris-react/src/components/Sheet/Sheet.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useRef, useEffect} from 'react'; +import { useCallback, useRef, useEffect } from 'react'; +import * as React from 'react'; import {CSSTransition} from 'react-transition-group'; import {motion} from '@shopify/polaris-tokens'; diff --git a/polaris-react/src/components/Sheet/tests/Sheet.test.tsx b/polaris-react/src/components/Sheet/tests/Sheet.test.tsx index bfd2df6deea..3bf75de55a6 100644 --- a/polaris-react/src/components/Sheet/tests/Sheet.test.tsx +++ b/polaris-react/src/components/Sheet/tests/Sheet.test.tsx @@ -1,5 +1,5 @@ /* eslint-disable import/no-deprecated */ -import React, {useRef} from 'react'; +import { useRef } from 'react'; import {CSSTransition} from 'react-transition-group'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.stories.tsx b/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.stories.tsx index 87be0ceede9..ff36429c313 100644 --- a/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.stories.tsx +++ b/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {SkeletonBodyText} from '@shopify/polaris'; diff --git a/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.tsx b/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.tsx index 920c80cd014..07725c5bbd3 100644 --- a/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.tsx +++ b/polaris-react/src/components/SkeletonBodyText/SkeletonBodyText.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import styles from './SkeletonBodyText.scss'; export interface SkeletonBodyTextProps { diff --git a/polaris-react/src/components/SkeletonBodyText/tests/SkeletonBodyText.test.tsx b/polaris-react/src/components/SkeletonBodyText/tests/SkeletonBodyText.test.tsx index 920b556613b..ac5cfc20d9b 100644 --- a/polaris-react/src/components/SkeletonBodyText/tests/SkeletonBodyText.test.tsx +++ b/polaris-react/src/components/SkeletonBodyText/tests/SkeletonBodyText.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SkeletonBodyText} from '../SkeletonBodyText'; diff --git a/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.stories.tsx b/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.stories.tsx index ee612ba32c6..f9889c77171 100644 --- a/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.stories.tsx +++ b/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {SkeletonDisplayText} from '@shopify/polaris'; diff --git a/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx b/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx index d8247b5215c..f6bd90a3748 100644 --- a/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx +++ b/polaris-react/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames, variationName} from '../../utilities/css'; import styles from './SkeletonDisplayText.scss'; diff --git a/polaris-react/src/components/SkeletonDisplayText/tests/SkeletonDisplayText.test.tsx b/polaris-react/src/components/SkeletonDisplayText/tests/SkeletonDisplayText.test.tsx index b5511bb9714..fe5e468a1cd 100644 --- a/polaris-react/src/components/SkeletonDisplayText/tests/SkeletonDisplayText.test.tsx +++ b/polaris-react/src/components/SkeletonDisplayText/tests/SkeletonDisplayText.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SkeletonDisplayText} from '../SkeletonDisplayText'; diff --git a/polaris-react/src/components/SkeletonPage/SkeletonPage.stories.tsx b/polaris-react/src/components/SkeletonPage/SkeletonPage.stories.tsx index fc563bca781..4f8d003867f 100644 --- a/polaris-react/src/components/SkeletonPage/SkeletonPage.stories.tsx +++ b/polaris-react/src/components/SkeletonPage/SkeletonPage.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import { LegacyCard, diff --git a/polaris-react/src/components/SkeletonPage/SkeletonPage.tsx b/polaris-react/src/components/SkeletonPage/SkeletonPage.tsx index 62532cd0176..b88ee0ac105 100644 --- a/polaris-react/src/components/SkeletonPage/SkeletonPage.tsx +++ b/polaris-react/src/components/SkeletonPage/SkeletonPage.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {useI18n} from '../../utilities/i18n'; import {SkeletonBodyText} from '../SkeletonBodyText'; diff --git a/polaris-react/src/components/SkeletonPage/tests/SkeletonPage.test.tsx b/polaris-react/src/components/SkeletonPage/tests/SkeletonPage.test.tsx index e73f46c9463..c38be9fc3c2 100644 --- a/polaris-react/src/components/SkeletonPage/tests/SkeletonPage.test.tsx +++ b/polaris-react/src/components/SkeletonPage/tests/SkeletonPage.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {LegacyCard} from '../../LegacyCard'; diff --git a/polaris-react/src/components/SkeletonTabs/SkeletonTabs.stories.tsx b/polaris-react/src/components/SkeletonTabs/SkeletonTabs.stories.tsx index e6b550f5ddd..b4b11701525 100644 --- a/polaris-react/src/components/SkeletonTabs/SkeletonTabs.stories.tsx +++ b/polaris-react/src/components/SkeletonTabs/SkeletonTabs.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {LegacyCard, SkeletonTabs} from '@shopify/polaris'; diff --git a/polaris-react/src/components/SkeletonTabs/SkeletonTabs.tsx b/polaris-react/src/components/SkeletonTabs/SkeletonTabs.tsx index 003bba0716d..c0b145f15e9 100644 --- a/polaris-react/src/components/SkeletonTabs/SkeletonTabs.tsx +++ b/polaris-react/src/components/SkeletonTabs/SkeletonTabs.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames} from '../../utilities/css'; import {SkeletonBodyText} from '../SkeletonBodyText'; diff --git a/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.stories.tsx b/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.stories.tsx index 9dda7c5183e..2df96c31091 100644 --- a/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.stories.tsx +++ b/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {SkeletonThumbnail} from '@shopify/polaris'; diff --git a/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx b/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx index 628328c2f28..052f89bbc93 100644 --- a/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx +++ b/polaris-react/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames, variationName} from '../../utilities/css'; import styles from './SkeletonThumbnail.scss'; diff --git a/polaris-react/src/components/SkeletonThumbnail/tests/SkeletonThumbnail.test.tsx b/polaris-react/src/components/SkeletonThumbnail/tests/SkeletonThumbnail.test.tsx index 87edd390062..c7ae6629357 100644 --- a/polaris-react/src/components/SkeletonThumbnail/tests/SkeletonThumbnail.test.tsx +++ b/polaris-react/src/components/SkeletonThumbnail/tests/SkeletonThumbnail.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SkeletonThumbnail} from '../SkeletonThumbnail'; diff --git a/polaris-react/src/components/Spinner/Spinner.stories.tsx b/polaris-react/src/components/Spinner/Spinner.stories.tsx index 1de9500efdf..c070863e122 100644 --- a/polaris-react/src/components/Spinner/Spinner.stories.tsx +++ b/polaris-react/src/components/Spinner/Spinner.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useRef, useState} from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Button, diff --git a/polaris-react/src/components/Spinner/Spinner.tsx b/polaris-react/src/components/Spinner/Spinner.tsx index 78cea35b28b..c7b53b2882c 100644 --- a/polaris-react/src/components/Spinner/Spinner.tsx +++ b/polaris-react/src/components/Spinner/Spinner.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {classNames, variationName} from '../../utilities/css'; import {Text} from '../Text'; import {useIsAfterInitialMount} from '../../utilities/use-is-after-initial-mount'; diff --git a/polaris-react/src/components/Spinner/tests/Spinner.test.tsx b/polaris-react/src/components/Spinner/tests/Spinner.test.tsx index d8c095f8e86..fdfb38566ed 100644 --- a/polaris-react/src/components/Spinner/tests/Spinner.test.tsx +++ b/polaris-react/src/components/Spinner/tests/Spinner.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Spinner} from '../Spinner'; diff --git a/polaris-react/src/components/Stack/Stack.stories.tsx b/polaris-react/src/components/Stack/Stack.stories.tsx index fe30438d247..731ffc87739 100644 --- a/polaris-react/src/components/Stack/Stack.stories.tsx +++ b/polaris-react/src/components/Stack/Stack.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Box, Stack} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Stack/Stack.tsx b/polaris-react/src/components/Stack/Stack.tsx index d569ab21dcf..5fd50a63df3 100644 --- a/polaris-react/src/components/Stack/Stack.tsx +++ b/polaris-react/src/components/Stack/Stack.tsx @@ -1,4 +1,5 @@ -import React, {createElement} from 'react'; +import { createElement } from 'react'; +import * as React from 'react'; import type {SpacingSpaceScale} from '@shopify/polaris-tokens'; import { diff --git a/polaris-react/src/components/Stack/tests/Stack.test.tsx b/polaris-react/src/components/Stack/tests/Stack.test.tsx index a663ba5ad27..bbc88672ceb 100644 --- a/polaris-react/src/components/Stack/tests/Stack.test.tsx +++ b/polaris-react/src/components/Stack/tests/Stack.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Stack} from '../Stack'; diff --git a/polaris-react/src/components/Sticky/Sticky.tsx b/polaris-react/src/components/Sticky/Sticky.tsx index 44418c86802..1cb216bbf9d 100644 --- a/polaris-react/src/components/Sticky/Sticky.tsx +++ b/polaris-react/src/components/Sticky/Sticky.tsx @@ -1,4 +1,5 @@ -import React, {Component} from 'react'; +import { Component } from 'react'; +import * as React from 'react'; import {getRectForNode} from '../../utilities/geometry'; import {useStickyManager} from '../../utilities/sticky-manager'; diff --git a/polaris-react/src/components/Sticky/tests/Sticky.test.tsx b/polaris-react/src/components/Sticky/tests/Sticky.test.tsx index 88d3cf9d5f5..4f7008b69db 100644 --- a/polaris-react/src/components/Sticky/tests/Sticky.test.tsx +++ b/polaris-react/src/components/Sticky/tests/Sticky.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Sticky} from '../Sticky'; diff --git a/polaris-react/src/components/Tabs/Tabs.stories.tsx b/polaris-react/src/components/Tabs/Tabs.stories.tsx index f85350c77b2..44268af96cd 100644 --- a/polaris-react/src/components/Tabs/Tabs.stories.tsx +++ b/polaris-react/src/components/Tabs/Tabs.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Badge, LegacyCard, Tabs} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Tabs/Tabs.tsx b/polaris-react/src/components/Tabs/Tabs.tsx index ad25a29f386..f406e51ea58 100644 --- a/polaris-react/src/components/Tabs/Tabs.tsx +++ b/polaris-react/src/components/Tabs/Tabs.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; +import * as React from 'react'; import {HorizontalDotsMinor, CaretDownMinor} from '@shopify/polaris-icons'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Tabs/components/Item/Item.tsx b/polaris-react/src/components/Tabs/components/Item/Item.tsx index 25f235761d7..3defedd9459 100644 --- a/polaris-react/src/components/Tabs/components/Item/Item.tsx +++ b/polaris-react/src/components/Tabs/components/Item/Item.tsx @@ -1,4 +1,5 @@ -import React, {PureComponent} from 'react'; +import { PureComponent } from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {FeaturesContext} from '../../../../utilities/features'; diff --git a/polaris-react/src/components/Tabs/components/Item/tests/Item.test.tsx b/polaris-react/src/components/Tabs/components/Item/tests/Item.test.tsx index 45f59da04ba..34ab94adb35 100644 --- a/polaris-react/src/components/Tabs/components/Item/tests/Item.test.tsx +++ b/polaris-react/src/components/Tabs/components/Item/tests/Item.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {UnstyledLink} from '../../../../UnstyledLink'; diff --git a/polaris-react/src/components/Tabs/components/List/List.tsx b/polaris-react/src/components/Tabs/components/List/List.tsx index 47fad884b0e..81cdacea701 100644 --- a/polaris-react/src/components/Tabs/components/List/List.tsx +++ b/polaris-react/src/components/Tabs/components/List/List.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {Item} from '../Item'; import type {TabDescriptor} from '../../types'; diff --git a/polaris-react/src/components/Tabs/components/List/tests/List.test.tsx b/polaris-react/src/components/Tabs/components/List/tests/List.test.tsx index 90b595680e9..5dc9a0edea6 100644 --- a/polaris-react/src/components/Tabs/components/List/tests/List.test.tsx +++ b/polaris-react/src/components/Tabs/components/List/tests/List.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {List} from '../List'; diff --git a/polaris-react/src/components/Tabs/components/Panel/Panel.tsx b/polaris-react/src/components/Tabs/components/Panel/Panel.tsx index a632c1b5998..2d93b1f3109 100644 --- a/polaris-react/src/components/Tabs/components/Panel/Panel.tsx +++ b/polaris-react/src/components/Tabs/components/Panel/Panel.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import styles from '../../Tabs.scss'; diff --git a/polaris-react/src/components/Tabs/components/Panel/tests/Panel.test.tsx b/polaris-react/src/components/Tabs/components/Panel/tests/Panel.test.tsx index affa9128cb4..0eb28ec5bb4 100644 --- a/polaris-react/src/components/Tabs/components/Panel/tests/Panel.test.tsx +++ b/polaris-react/src/components/Tabs/components/Panel/tests/Panel.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Panel} from '../Panel'; diff --git a/polaris-react/src/components/Tabs/components/Tab/Tab.tsx b/polaris-react/src/components/Tabs/components/Tab/Tab.tsx index eecee228d59..64a71da4515 100644 --- a/polaris-react/src/components/Tabs/components/Tab/Tab.tsx +++ b/polaris-react/src/components/Tabs/components/Tab/Tab.tsx @@ -1,4 +1,5 @@ -import React, {useEffect, useRef} from 'react'; +import { useEffect, useRef } from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {UnstyledLink} from '../../../UnstyledLink'; diff --git a/polaris-react/src/components/Tabs/components/Tab/tests/Tab.test.tsx b/polaris-react/src/components/Tabs/components/Tab/tests/Tab.test.tsx index 7434d8aceee..9265cec6758 100644 --- a/polaris-react/src/components/Tabs/components/Tab/tests/Tab.test.tsx +++ b/polaris-react/src/components/Tabs/components/Tab/tests/Tab.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Tab} from '../Tab'; diff --git a/polaris-react/src/components/Tabs/components/TabMeasurer/TabMeasurer.tsx b/polaris-react/src/components/Tabs/components/TabMeasurer/TabMeasurer.tsx index 98216f82341..b576dd65a6b 100644 --- a/polaris-react/src/components/Tabs/components/TabMeasurer/TabMeasurer.tsx +++ b/polaris-react/src/components/Tabs/components/TabMeasurer/TabMeasurer.tsx @@ -1,4 +1,5 @@ -import React, {memo, useEffect, useRef, useCallback} from 'react'; +import { memo, useEffect, useRef, useCallback } from 'react'; +import * as React from 'react'; // eslint-disable-next-line import/no-deprecated import {EventListener} from '../../../EventListener'; diff --git a/polaris-react/src/components/Tabs/components/TabMeasurer/tests/TabMeasurer.test.tsx b/polaris-react/src/components/Tabs/components/TabMeasurer/tests/TabMeasurer.test.tsx index 853daf30940..111361e5a86 100644 --- a/polaris-react/src/components/Tabs/components/TabMeasurer/tests/TabMeasurer.test.tsx +++ b/polaris-react/src/components/Tabs/components/TabMeasurer/tests/TabMeasurer.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TabMeasurer} from '../TabMeasurer'; diff --git a/polaris-react/src/components/Tabs/tests/Tabs.test.tsx b/polaris-react/src/components/Tabs/tests/Tabs.test.tsx index 479faa09357..14ba26c4d44 100644 --- a/polaris-react/src/components/Tabs/tests/Tabs.test.tsx +++ b/polaris-react/src/components/Tabs/tests/Tabs.test.tsx @@ -1,4 +1,4 @@ -import React, {ComponentType} from 'react'; +import { ComponentType } from 'react'; import {mountWithApp} from 'tests/utilities'; import {Tab, Panel, TabMeasurer} from '../components'; diff --git a/polaris-react/src/components/Tag/Tag.stories.tsx b/polaris-react/src/components/Tag/Tag.stories.tsx index 6c1673eec87..955f44c28ca 100644 --- a/polaris-react/src/components/Tag/Tag.stories.tsx +++ b/polaris-react/src/components/Tag/Tag.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Icon, LegacyStack, Tag} from '@shopify/polaris'; import {WandMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Tag/Tag.tsx b/polaris-react/src/components/Tag/Tag.tsx index ae4c7480e8f..0c97805611e 100644 --- a/polaris-react/src/components/Tag/Tag.tsx +++ b/polaris-react/src/components/Tag/Tag.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {CancelSmallMinor} from '@shopify/polaris-icons'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Tag/tests/Tag.test.tsx b/polaris-react/src/components/Tag/tests/Tag.test.tsx index 6c4a666e1d1..82f2a41b2a0 100644 --- a/polaris-react/src/components/Tag/tests/Tag.test.tsx +++ b/polaris-react/src/components/Tag/tests/Tag.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SearchMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Text/Text.stories.tsx b/polaris-react/src/components/Text/Text.stories.tsx index a0693a407f5..0226442e2fc 100644 --- a/polaris-react/src/components/Text/Text.stories.tsx +++ b/polaris-react/src/components/Text/Text.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {LegacyStack, Text} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Text/Text.tsx b/polaris-react/src/components/Text/Text.tsx index be29788005b..1a4d0b58634 100644 --- a/polaris-react/src/components/Text/Text.tsx +++ b/polaris-react/src/components/Text/Text.tsx @@ -1,4 +1,4 @@ -import React, {ReactNode} from 'react'; +import { ReactNode } from 'react'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/Text/tests/Text.test.tsx b/polaris-react/src/components/Text/tests/Text.test.tsx index f09c666bd41..f42cbf611f4 100644 --- a/polaris-react/src/components/Text/tests/Text.test.tsx +++ b/polaris-react/src/components/Text/tests/Text.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Text} from '../Text'; diff --git a/polaris-react/src/components/TextContainer/TextContainer.stories.tsx b/polaris-react/src/components/TextContainer/TextContainer.stories.tsx index 5af854fb1f6..06cd0160ede 100644 --- a/polaris-react/src/components/TextContainer/TextContainer.stories.tsx +++ b/polaris-react/src/components/TextContainer/TextContainer.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Text, TextContainer} from '@shopify/polaris'; diff --git a/polaris-react/src/components/TextContainer/TextContainer.tsx b/polaris-react/src/components/TextContainer/TextContainer.tsx index ef217df9ca4..0da1f1ad83a 100644 --- a/polaris-react/src/components/TextContainer/TextContainer.tsx +++ b/polaris-react/src/components/TextContainer/TextContainer.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames, variationName} from '../../utilities/css'; diff --git a/polaris-react/src/components/TextField/TextField.stories.tsx b/polaris-react/src/components/TextField/TextField.stories.tsx index 40d40a8f41a..bb94eaaafd6 100644 --- a/polaris-react/src/components/TextField/TextField.stories.tsx +++ b/polaris-react/src/components/TextField/TextField.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useMemo, useState} from 'react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import { Button, diff --git a/polaris-react/src/components/TextField/TextField.tsx b/polaris-react/src/components/TextField/TextField.tsx index e1589eccc51..c2de710935f 100644 --- a/polaris-react/src/components/TextField/TextField.tsx +++ b/polaris-react/src/components/TextField/TextField.tsx @@ -1,11 +1,5 @@ -import React, { - createElement, - useState, - useEffect, - useRef, - useCallback, - useId, -} from 'react'; +import { createElement, useState, useEffect, useRef, useCallback, useId } from 'react'; +import * as React from 'react'; import {CircleCancelMinor} from '@shopify/polaris-icons'; import {classNames, variationName} from '../../utilities/css'; diff --git a/polaris-react/src/components/TextField/components/Resizer/Resizer.tsx b/polaris-react/src/components/TextField/components/Resizer/Resizer.tsx index f3ab5ae794d..392d21abd61 100644 --- a/polaris-react/src/components/TextField/components/Resizer/Resizer.tsx +++ b/polaris-react/src/components/TextField/components/Resizer/Resizer.tsx @@ -1,4 +1,4 @@ -import React, {useRef, useEffect, useCallback} from 'react'; +import { useRef, useEffect, useCallback } from 'react'; // eslint-disable-next-line import/no-deprecated import {EventListener} from '../../../EventListener'; diff --git a/polaris-react/src/components/TextField/components/Resizer/tests/Resizer.test.tsx b/polaris-react/src/components/TextField/components/Resizer/tests/Resizer.test.tsx index 0296c8b8d94..5de16e80ccf 100644 --- a/polaris-react/src/components/TextField/components/Resizer/tests/Resizer.test.tsx +++ b/polaris-react/src/components/TextField/components/Resizer/tests/Resizer.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {animationFrame, dimension} from '@shopify/jest-dom-mocks'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/TextField/components/Spinner/Spinner.tsx b/polaris-react/src/components/TextField/components/Spinner/Spinner.tsx index ec8e38f220f..4d0822d76e2 100644 --- a/polaris-react/src/components/TextField/components/Spinner/Spinner.tsx +++ b/polaris-react/src/components/TextField/components/Spinner/Spinner.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {CaretDownMinor, CaretUpMinor} from '@shopify/polaris-icons'; import {Icon} from '../../../Icon'; diff --git a/polaris-react/src/components/TextField/components/Spinner/tests/Spinner.test.tsx b/polaris-react/src/components/TextField/components/Spinner/tests/Spinner.test.tsx index 4f02bf3357f..0827fd13a68 100644 --- a/polaris-react/src/components/TextField/components/Spinner/tests/Spinner.test.tsx +++ b/polaris-react/src/components/TextField/components/Spinner/tests/Spinner.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Spinner} from '../Spinner'; diff --git a/polaris-react/src/components/TextField/tests/TextField.test.tsx b/polaris-react/src/components/TextField/tests/TextField.test.tsx index 2a714e278a6..846fa2d1e0a 100644 --- a/polaris-react/src/components/TextField/tests/TextField.test.tsx +++ b/polaris-react/src/components/TextField/tests/TextField.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Connected} from '../../Connected'; diff --git a/polaris-react/src/components/Thumbnail/Thumbnail.stories.tsx b/polaris-react/src/components/Thumbnail/Thumbnail.stories.tsx index b878de38eb2..0c05367dd45 100644 --- a/polaris-react/src/components/Thumbnail/Thumbnail.stories.tsx +++ b/polaris-react/src/components/Thumbnail/Thumbnail.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Thumbnail} from '@shopify/polaris'; import {NoteMinor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Thumbnail/Thumbnail.tsx b/polaris-react/src/components/Thumbnail/Thumbnail.tsx index 698439f893e..b8e774108a3 100644 --- a/polaris-react/src/components/Thumbnail/Thumbnail.tsx +++ b/polaris-react/src/components/Thumbnail/Thumbnail.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames, variationName} from '../../utilities/css'; import {Image} from '../Image'; diff --git a/polaris-react/src/components/Thumbnail/tests/Thumbnail.test.tsx b/polaris-react/src/components/Thumbnail/tests/Thumbnail.test.tsx index beb712d642f..2aebbcaa9c0 100644 --- a/polaris-react/src/components/Thumbnail/tests/Thumbnail.test.tsx +++ b/polaris-react/src/components/Thumbnail/tests/Thumbnail.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {NoteMajor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/Toast/Toast.stories.tsx b/polaris-react/src/components/Toast/Toast.stories.tsx index 29b03ef2b96..95b7f4024c8 100644 --- a/polaris-react/src/components/Toast/Toast.stories.tsx +++ b/polaris-react/src/components/Toast/Toast.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {Button, ButtonGroup, Frame, Page, Toast} from '@shopify/polaris'; diff --git a/polaris-react/src/components/Toast/tests/Toast.test.tsx b/polaris-react/src/components/Toast/tests/Toast.test.tsx index 4cd476e923f..3ecd6720997 100644 --- a/polaris-react/src/components/Toast/tests/Toast.test.tsx +++ b/polaris-react/src/components/Toast/tests/Toast.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Toast} from '../Toast'; diff --git a/polaris-react/src/components/Tooltip/Tooltip.stories.tsx b/polaris-react/src/components/Tooltip/Tooltip.stories.tsx index e18ba67b38e..cf6a19ae973 100644 --- a/polaris-react/src/components/Tooltip/Tooltip.stories.tsx +++ b/polaris-react/src/components/Tooltip/Tooltip.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {QuestionMarkMinor} from '@shopify/polaris-icons'; import type {ComponentMeta} from '@storybook/react'; import { diff --git a/polaris-react/src/components/Tooltip/Tooltip.tsx b/polaris-react/src/components/Tooltip/Tooltip.tsx index 913bca1ea32..f7862f4cb6d 100644 --- a/polaris-react/src/components/Tooltip/Tooltip.tsx +++ b/polaris-react/src/components/Tooltip/Tooltip.tsx @@ -1,4 +1,5 @@ -import React, {useEffect, useState, useRef, useCallback, useId} from 'react'; +import { useEffect, useState, useRef, useCallback, useId } from 'react'; +import * as React from 'react'; import type { ShapeBorderRadiusScale, SpacingSpaceScale, diff --git a/polaris-react/src/components/Tooltip/components/TooltipOverlay/TooltipOverlay.tsx b/polaris-react/src/components/Tooltip/components/TooltipOverlay/TooltipOverlay.tsx index abb5f1da3c3..4106f72ab7c 100644 --- a/polaris-react/src/components/Tooltip/components/TooltipOverlay/TooltipOverlay.tsx +++ b/polaris-react/src/components/Tooltip/components/TooltipOverlay/TooltipOverlay.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {layer} from '../../../shared'; diff --git a/polaris-react/src/components/Tooltip/components/TooltipOverlay/tests/TooltipOverlay.test.tsx b/polaris-react/src/components/Tooltip/components/TooltipOverlay/tests/TooltipOverlay.test.tsx index f189facb2d3..55df27ea261 100644 --- a/polaris-react/src/components/Tooltip/components/TooltipOverlay/tests/TooltipOverlay.test.tsx +++ b/polaris-react/src/components/Tooltip/components/TooltipOverlay/tests/TooltipOverlay.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {TooltipOverlay} from '../TooltipOverlay'; diff --git a/polaris-react/src/components/Tooltip/tests/Tooltip.test.tsx b/polaris-react/src/components/Tooltip/tests/Tooltip.test.tsx index 6d8665f5cf0..78fef8947f9 100644 --- a/polaris-react/src/components/Tooltip/tests/Tooltip.test.tsx +++ b/polaris-react/src/components/Tooltip/tests/Tooltip.test.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Link} from '../../Link'; diff --git a/polaris-react/src/components/TopBar/TopBar.stories.tsx b/polaris-react/src/components/TopBar/TopBar.stories.tsx index b79db4a50b9..e476edc1158 100644 --- a/polaris-react/src/components/TopBar/TopBar.stories.tsx +++ b/polaris-react/src/components/TopBar/TopBar.stories.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react'; +import { useCallback, useState } from 'react'; import type {ComponentMeta} from '@storybook/react'; import {ActionList, Frame, Icon, TopBar, Text} from '@shopify/polaris'; import {ArrowLeftMinor, QuestionMarkMajor} from '@shopify/polaris-icons'; diff --git a/polaris-react/src/components/TopBar/TopBar.tsx b/polaris-react/src/components/TopBar/TopBar.tsx index 3cf1ea28ae9..e226034d8bd 100644 --- a/polaris-react/src/components/TopBar/TopBar.tsx +++ b/polaris-react/src/components/TopBar/TopBar.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {MobileHamburgerMajor} from '@shopify/polaris-icons'; import {classNames} from '../../utilities/css'; diff --git a/polaris-react/src/components/TopBar/components/Menu/Menu.tsx b/polaris-react/src/components/TopBar/components/Menu/Menu.tsx index 35b58386cce..edc6c0eaad3 100644 --- a/polaris-react/src/components/TopBar/components/Menu/Menu.tsx +++ b/polaris-react/src/components/TopBar/components/Menu/Menu.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {ActionList, ActionListProps} from '../../../ActionList'; import {Popover} from '../../../Popover'; diff --git a/polaris-react/src/components/TopBar/components/Menu/components/Message/Message.tsx b/polaris-react/src/components/TopBar/components/Menu/components/Message/Message.tsx index 2f20edb232b..e1dc21e5691 100644 --- a/polaris-react/src/components/TopBar/components/Menu/components/Message/Message.tsx +++ b/polaris-react/src/components/TopBar/components/Menu/components/Message/Message.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import {Badge, BadgeProps} from '../../../../../Badge'; import {Button} from '../../../../../Button'; import {Text} from '../../../../../Text'; diff --git a/polaris-react/src/components/TopBar/components/Menu/components/Message/tests/Message.test.tsx b/polaris-react/src/components/TopBar/components/Menu/components/Message/tests/Message.test.tsx index 42147782d7d..4098b23ac57 100644 --- a/polaris-react/src/components/TopBar/components/Menu/components/Message/tests/Message.test.tsx +++ b/polaris-react/src/components/TopBar/components/Menu/components/Message/tests/Message.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Message} from '../Message'; diff --git a/polaris-react/src/components/TopBar/components/Menu/tests/Menu.test.tsx b/polaris-react/src/components/TopBar/components/Menu/tests/Menu.test.tsx index ba6893d18a9..a39b546f51e 100644 --- a/polaris-react/src/components/TopBar/components/Menu/tests/Menu.test.tsx +++ b/polaris-react/src/components/TopBar/components/Menu/tests/Menu.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {ActionList} from '../../../../ActionList'; diff --git a/polaris-react/src/components/TopBar/components/Search/Search.tsx b/polaris-react/src/components/TopBar/components/Search/Search.tsx index 93130cff383..a65de5c7f98 100644 --- a/polaris-react/src/components/TopBar/components/Search/Search.tsx +++ b/polaris-react/src/components/TopBar/components/Search/Search.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import {classNames} from '../../../../utilities/css'; import {SearchDismissOverlay} from '../SearchDismissOverlay'; diff --git a/polaris-react/src/components/TopBar/components/Search/tests/Search.test.tsx b/polaris-react/src/components/TopBar/components/Search/tests/Search.test.tsx index 058accf902b..c48a007217c 100644 --- a/polaris-react/src/components/TopBar/components/Search/tests/Search.test.tsx +++ b/polaris-react/src/components/TopBar/components/Search/tests/Search.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Search} from '../Search'; diff --git a/polaris-react/src/components/TopBar/components/SearchDismissOverlay/SearchDismissOverlay.tsx b/polaris-react/src/components/TopBar/components/SearchDismissOverlay/SearchDismissOverlay.tsx index 05c69092cea..b8bd502e184 100644 --- a/polaris-react/src/components/TopBar/components/SearchDismissOverlay/SearchDismissOverlay.tsx +++ b/polaris-react/src/components/TopBar/components/SearchDismissOverlay/SearchDismissOverlay.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useRef} from 'react'; +import { useCallback, useRef } from 'react'; +import * as React from 'react'; import {ScrollLock} from '../../../ScrollLock'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/TopBar/components/SearchDismissOverlay/tests/SearchDismissOverlay.test.tsx b/polaris-react/src/components/TopBar/components/SearchDismissOverlay/tests/SearchDismissOverlay.test.tsx index afa3cdfa3ba..ce1ab324b41 100644 --- a/polaris-react/src/components/TopBar/components/SearchDismissOverlay/tests/SearchDismissOverlay.test.tsx +++ b/polaris-react/src/components/TopBar/components/SearchDismissOverlay/tests/SearchDismissOverlay.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {SearchDismissOverlay} from '../SearchDismissOverlay'; diff --git a/polaris-react/src/components/TopBar/components/SearchField/SearchField.tsx b/polaris-react/src/components/TopBar/components/SearchField/SearchField.tsx index b07e4e78718..ae48ad33e87 100644 --- a/polaris-react/src/components/TopBar/components/SearchField/SearchField.tsx +++ b/polaris-react/src/components/TopBar/components/SearchField/SearchField.tsx @@ -1,4 +1,5 @@ -import React, {useCallback, useEffect, useState, useRef, useId} from 'react'; +import { useCallback, useEffect, useState, useRef, useId } from 'react'; +import * as React from 'react'; import {CircleCancelMinor, SearchMinor} from '@shopify/polaris-icons'; import {classNames} from '../../../../utilities/css'; diff --git a/polaris-react/src/components/TopBar/components/SearchField/tests/SearchField.test.tsx b/polaris-react/src/components/TopBar/components/SearchField/tests/SearchField.test.tsx index fb74b82425f..7b1c566e2c0 100644 --- a/polaris-react/src/components/TopBar/components/SearchField/tests/SearchField.test.tsx +++ b/polaris-react/src/components/TopBar/components/SearchField/tests/SearchField.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {CircleCancelMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/TopBar/components/UserMenu/UserMenu.tsx b/polaris-react/src/components/TopBar/components/UserMenu/UserMenu.tsx index 45c973ebb83..dc74ed6e4da 100644 --- a/polaris-react/src/components/TopBar/components/UserMenu/UserMenu.tsx +++ b/polaris-react/src/components/TopBar/components/UserMenu/UserMenu.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import type {IconableAction} from '../../../../types'; import {Avatar, AvatarProps} from '../../../Avatar'; import {MessageIndicator} from '../../../MessageIndicator'; diff --git a/polaris-react/src/components/TopBar/components/UserMenu/tests/UserMenu.test.tsx b/polaris-react/src/components/TopBar/components/UserMenu/tests/UserMenu.test.tsx index 241beff5531..74b52168eb4 100644 --- a/polaris-react/src/components/TopBar/components/UserMenu/tests/UserMenu.test.tsx +++ b/polaris-react/src/components/TopBar/components/UserMenu/tests/UserMenu.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {ViewMinor} from '@shopify/polaris-icons'; import {mountWithApp} from 'tests/utilities'; diff --git a/polaris-react/src/components/TopBar/tests/TopBar.test.tsx b/polaris-react/src/components/TopBar/tests/TopBar.test.tsx index 45dc42b2ee7..46fcd55d640 100644 --- a/polaris-react/src/components/TopBar/tests/TopBar.test.tsx +++ b/polaris-react/src/components/TopBar/tests/TopBar.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Image} from '../../Image'; diff --git a/polaris-react/src/components/TrapFocus/TrapFocus.tsx b/polaris-react/src/components/TrapFocus/TrapFocus.tsx index f7d9f307317..80629e4b203 100644 --- a/polaris-react/src/components/TrapFocus/TrapFocus.tsx +++ b/polaris-react/src/components/TrapFocus/TrapFocus.tsx @@ -1,4 +1,5 @@ -import React, {useRef, useEffect, useState} from 'react'; +import { useRef, useEffect, useState } from 'react'; +import * as React from 'react'; import {Key} from '../../types'; // eslint-disable-next-line import/no-deprecated diff --git a/polaris-react/src/components/TrapFocus/tests/TrapFocus.test.tsx b/polaris-react/src/components/TrapFocus/tests/TrapFocus.test.tsx index 6956ecec230..624c24d407a 100644 --- a/polaris-react/src/components/TrapFocus/tests/TrapFocus.test.tsx +++ b/polaris-react/src/components/TrapFocus/tests/TrapFocus.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Button} from '../../Button'; diff --git a/polaris-react/src/components/Truncate/Truncate.tsx b/polaris-react/src/components/Truncate/Truncate.tsx index 3a8256b0b93..cfcbdc332f2 100644 --- a/polaris-react/src/components/Truncate/Truncate.tsx +++ b/polaris-react/src/components/Truncate/Truncate.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import styles from './Truncate.scss'; diff --git a/polaris-react/src/components/Truncate/tests/Truncate.test.tsx b/polaris-react/src/components/Truncate/tests/Truncate.test.tsx index 074f94b2576..1782cb8c20e 100644 --- a/polaris-react/src/components/Truncate/tests/Truncate.test.tsx +++ b/polaris-react/src/components/Truncate/tests/Truncate.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {Truncate} from '../Truncate'; diff --git a/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx b/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx index 82319b09432..f2006b2689c 100644 --- a/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx +++ b/polaris-react/src/components/UnstyledButton/UnstyledButton.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import type {BaseButton} from '../../types'; import {handleMouseUpByBlurring} from '../../utilities/focus'; diff --git a/polaris-react/src/components/UnstyledButton/tests/UnstyledButton.test.tsx b/polaris-react/src/components/UnstyledButton/tests/UnstyledButton.test.tsx index 3e6b8900946..7489094f688 100644 --- a/polaris-react/src/components/UnstyledButton/tests/UnstyledButton.test.tsx +++ b/polaris-react/src/components/UnstyledButton/tests/UnstyledButton.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {UnstyledLink} from '../../UnstyledLink'; diff --git a/polaris-react/src/components/UnstyledButton/utils.tsx b/polaris-react/src/components/UnstyledButton/utils.tsx index 552edf3766a..b0b55ee5d39 100644 --- a/polaris-react/src/components/UnstyledButton/utils.tsx +++ b/polaris-react/src/components/UnstyledButton/utils.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import type {ComplexAction} from '../../types'; import {UnstyledButton, UnstyledButtonProps} from './UnstyledButton'; diff --git a/polaris-react/src/components/UnstyledLink/UnstyledLink.tsx b/polaris-react/src/components/UnstyledLink/UnstyledLink.tsx index dde9380a528..e7de8773a62 100644 --- a/polaris-react/src/components/UnstyledLink/UnstyledLink.tsx +++ b/polaris-react/src/components/UnstyledLink/UnstyledLink.tsx @@ -1,4 +1,4 @@ -import React, {memo, forwardRef} from 'react'; +import { memo, forwardRef } from 'react'; import {unstyled} from '../shared'; import {useLink, LinkLikeComponentProps} from '../../utilities/link'; diff --git a/polaris-react/src/components/UnstyledLink/tests/UnstyledLink.test.tsx b/polaris-react/src/components/UnstyledLink/tests/UnstyledLink.test.tsx index 809ca9d0659..3f7dd82a228 100644 --- a/polaris-react/src/components/UnstyledLink/tests/UnstyledLink.test.tsx +++ b/polaris-react/src/components/UnstyledLink/tests/UnstyledLink.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {UnstyledLink} from '../UnstyledLink'; diff --git a/polaris-react/src/components/VideoThumbnail/VideoThumbnail.stories.tsx b/polaris-react/src/components/VideoThumbnail/VideoThumbnail.stories.tsx index 1e42bbf15d7..71684f71f14 100644 --- a/polaris-react/src/components/VideoThumbnail/VideoThumbnail.stories.tsx +++ b/polaris-react/src/components/VideoThumbnail/VideoThumbnail.stories.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type {ComponentMeta} from '@storybook/react'; import {MediaCard, VideoThumbnail} from '@shopify/polaris'; diff --git a/polaris-react/src/components/VideoThumbnail/VideoThumbnail.tsx b/polaris-react/src/components/VideoThumbnail/VideoThumbnail.tsx index dfe98f60a12..6576d6a4d8b 100644 --- a/polaris-react/src/components/VideoThumbnail/VideoThumbnail.tsx +++ b/polaris-react/src/components/VideoThumbnail/VideoThumbnail.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {PlayMinor} from '@shopify/polaris-icons'; import {useI18n} from '../../utilities/i18n'; diff --git a/polaris-react/src/components/VideoThumbnail/tests/VideoThumbnail.test.tsx b/polaris-react/src/components/VideoThumbnail/tests/VideoThumbnail.test.tsx index be8bfae27ba..d48a464cda9 100644 --- a/polaris-react/src/components/VideoThumbnail/tests/VideoThumbnail.test.tsx +++ b/polaris-react/src/components/VideoThumbnail/tests/VideoThumbnail.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {VideoThumbnail} from '../VideoThumbnail'; diff --git a/polaris-react/src/utilities/combobox/tests/hook.test.tsx b/polaris-react/src/utilities/combobox/tests/hook.test.tsx index 02bf229c411..739d911e617 100644 --- a/polaris-react/src/utilities/combobox/tests/hook.test.tsx +++ b/polaris-react/src/utilities/combobox/tests/hook.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import {useComboboxTextField} from '../hooks'; diff --git a/polaris-react/src/utilities/components.tsx b/polaris-react/src/utilities/components.tsx index 42d6175dfa9..24e8e112c38 100644 --- a/polaris-react/src/utilities/components.tsx +++ b/polaris-react/src/utilities/components.tsx @@ -1,4 +1,5 @@ -import React, {Children, isValidElement} from 'react'; +import { Children, isValidElement } from 'react'; +import * as React from 'react'; // Wraps `element` in `Component`, if it is not already an instance of // `Component`. If `props` is passed, those will be added as props on the diff --git a/polaris-react/src/utilities/features/tests/hooks.test.tsx b/polaris-react/src/utilities/features/tests/hooks.test.tsx index 80f0458c1ca..200e1cda734 100644 --- a/polaris-react/src/utilities/features/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/features/tests/hooks.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {useFeatures} from '../hooks'; diff --git a/polaris-react/src/utilities/focus-manager/tests/hooks.test.tsx b/polaris-react/src/utilities/focus-manager/tests/hooks.test.tsx index c5dfdeb0b5e..eeba33211ec 100644 --- a/polaris-react/src/utilities/focus-manager/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/focus-manager/tests/hooks.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {useFocusManager} from '../hooks'; diff --git a/polaris-react/src/utilities/frame/tests/hooks.test.tsx b/polaris-react/src/utilities/frame/tests/hooks.test.tsx index b24b6e5975a..88b3930e2cb 100644 --- a/polaris-react/src/utilities/frame/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/frame/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mountWithApp, mount} from 'tests/utilities'; import {useFrame} from '../hooks'; diff --git a/polaris-react/src/utilities/i18n/tests/hooks.test.tsx b/polaris-react/src/utilities/i18n/tests/hooks.test.tsx index c0d0ba9dfa7..732e9dddecc 100644 --- a/polaris-react/src/utilities/i18n/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/i18n/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {useI18n} from '../hooks'; diff --git a/polaris-react/src/utilities/index-provider/tests/hooks.test.tsx b/polaris-react/src/utilities/index-provider/tests/hooks.test.tsx index 927c7edd334..39ce677162b 100644 --- a/polaris-react/src/utilities/index-provider/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/index-provider/tests/hooks.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp, mount} from 'tests/utilities'; import { diff --git a/polaris-react/src/utilities/index-table/tests/hooks-useContainerScroll.test.tsx b/polaris-react/src/utilities/index-table/tests/hooks-useContainerScroll.test.tsx index 6f8b382bdef..1260117d626 100644 --- a/polaris-react/src/utilities/index-table/tests/hooks-useContainerScroll.test.tsx +++ b/polaris-react/src/utilities/index-table/tests/hooks-useContainerScroll.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line @shopify/strict-component-boundaries diff --git a/polaris-react/src/utilities/index-table/tests/hooks-useRowHovered.test.tsx b/polaris-react/src/utilities/index-table/tests/hooks-useRowHovered.test.tsx index 6b2e2407775..11f3af94f19 100644 --- a/polaris-react/src/utilities/index-table/tests/hooks-useRowHovered.test.tsx +++ b/polaris-react/src/utilities/index-table/tests/hooks-useRowHovered.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line @shopify/strict-component-boundaries diff --git a/polaris-react/src/utilities/index-table/tests/hooks-useRowSelected.test.tsx b/polaris-react/src/utilities/index-table/tests/hooks-useRowSelected.test.tsx index 055a3a5a132..84f9d5bdd98 100644 --- a/polaris-react/src/utilities/index-table/tests/hooks-useRowSelected.test.tsx +++ b/polaris-react/src/utilities/index-table/tests/hooks-useRowSelected.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; // eslint-disable-next-line @shopify/strict-component-boundaries diff --git a/polaris-react/src/utilities/link/tests/hooks.test.tsx b/polaris-react/src/utilities/link/tests/hooks.test.tsx index 8583b07b8a9..eccc2a8da3c 100644 --- a/polaris-react/src/utilities/link/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/link/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mountWithApp} from 'tests/utilities'; import {useLink} from '../hooks'; diff --git a/polaris-react/src/utilities/media-query/tests/hooks.test.tsx b/polaris-react/src/utilities/media-query/tests/hooks.test.tsx index 102fc567638..e5c13c55c93 100644 --- a/polaris-react/src/utilities/media-query/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/media-query/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {useMediaQuery} from '../hooks'; diff --git a/polaris-react/src/utilities/portals/tests/hooks.test.tsx b/polaris-react/src/utilities/portals/tests/hooks.test.tsx index 5521323a359..35f74106c81 100644 --- a/polaris-react/src/utilities/portals/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/portals/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {usePortalsManager} from '../hooks'; diff --git a/polaris-react/src/utilities/scroll-lock-manager/tests/hooks.test.tsx b/polaris-react/src/utilities/scroll-lock-manager/tests/hooks.test.tsx index 0976b690cbc..86b5c2739c3 100644 --- a/polaris-react/src/utilities/scroll-lock-manager/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/scroll-lock-manager/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {useScrollLockManager} from '../hooks'; diff --git a/polaris-react/src/utilities/sticky-manager/tests/hooks.test.tsx b/polaris-react/src/utilities/sticky-manager/tests/hooks.test.tsx index 18d7777a330..eac449a659a 100644 --- a/polaris-react/src/utilities/sticky-manager/tests/hooks.test.tsx +++ b/polaris-react/src/utilities/sticky-manager/tests/hooks.test.tsx @@ -1,4 +1,4 @@ -import React, {useContext} from 'react'; +import { useContext } from 'react'; import {mount, mountWithApp} from 'tests/utilities'; import {useStickyManager} from '../hooks'; diff --git a/polaris-react/src/utilities/tests/is-input-focused.test.tsx b/polaris-react/src/utilities/tests/is-input-focused.test.tsx index 30fd934f669..4db20b96d92 100644 --- a/polaris-react/src/utilities/tests/is-input-focused.test.tsx +++ b/polaris-react/src/utilities/tests/is-input-focused.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount} from 'tests/utilities'; import {isInputFocused} from '../is-input-focused'; diff --git a/polaris-react/src/utilities/tests/use-breakpoints-ssr.test.tsx b/polaris-react/src/utilities/tests/use-breakpoints-ssr.test.tsx index 98354b6de3c..2b45d9a90fb 100644 --- a/polaris-react/src/utilities/tests/use-breakpoints-ssr.test.tsx +++ b/polaris-react/src/utilities/tests/use-breakpoints-ssr.test.tsx @@ -2,7 +2,6 @@ * @jest-environment node */ -import React from 'react'; import ReactDOMServer from 'react-dom/server'; import {useBreakpoints} from '../breakpoints'; diff --git a/polaris-react/src/utilities/tests/use-breakpoints.test.tsx b/polaris-react/src/utilities/tests/use-breakpoints.test.tsx index af4fd566ff0..befdc5eeb64 100644 --- a/polaris-react/src/utilities/tests/use-breakpoints.test.tsx +++ b/polaris-react/src/utilities/tests/use-breakpoints.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount} from 'tests/utilities'; import {matchMedia} from '@shopify/jest-dom-mocks'; import { diff --git a/polaris-react/src/utilities/tests/use-component-did-mount.test.tsx b/polaris-react/src/utilities/tests/use-component-did-mount.test.tsx index 47f157b5902..8f5bd45a14d 100644 --- a/polaris-react/src/utilities/tests/use-component-did-mount.test.tsx +++ b/polaris-react/src/utilities/tests/use-component-did-mount.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount} from 'tests/utilities'; import {useComponentDidMount} from '../use-component-did-mount'; diff --git a/polaris-react/src/utilities/tests/use-disable-interaction.test.tsx b/polaris-react/src/utilities/tests/use-disable-interaction.test.tsx index be4c3a45cb1..f2e8374ea0e 100644 --- a/polaris-react/src/utilities/tests/use-disable-interaction.test.tsx +++ b/polaris-react/src/utilities/tests/use-disable-interaction.test.tsx @@ -1,5 +1,4 @@ import {mount} from '@shopify/react-testing'; -import React from 'react'; import {useDisableClick, useDisableKeyboard} from '../use-disable-interaction'; diff --git a/polaris-react/src/utilities/tests/use-event-listener.test.tsx b/polaris-react/src/utilities/tests/use-event-listener.test.tsx index 83ac58064b9..15464d1f766 100644 --- a/polaris-react/src/utilities/tests/use-event-listener.test.tsx +++ b/polaris-react/src/utilities/tests/use-event-listener.test.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import { useRef } from 'react'; import {mount} from 'tests/utilities'; import {useEventListener} from '../use-event-listener'; diff --git a/polaris-react/src/utilities/tests/use-index-resource-state.test.tsx b/polaris-react/src/utilities/tests/use-index-resource-state.test.tsx index ccbc04c489c..4899a164f6a 100644 --- a/polaris-react/src/utilities/tests/use-index-resource-state.test.tsx +++ b/polaris-react/src/utilities/tests/use-index-resource-state.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mountWithApp} from 'tests/utilities'; import { diff --git a/polaris-react/src/utilities/tests/use-is-after-initial-mount.test.tsx b/polaris-react/src/utilities/tests/use-is-after-initial-mount.test.tsx index 2b5db15c8ed..448a393dae2 100644 --- a/polaris-react/src/utilities/tests/use-is-after-initial-mount.test.tsx +++ b/polaris-react/src/utilities/tests/use-is-after-initial-mount.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import {mount} from 'tests/utilities'; import {useIsAfterInitialMount} from '../use-is-after-initial-mount'; diff --git a/polaris-react/src/utilities/tests/use-is-mounted-ref.test.tsx b/polaris-react/src/utilities/tests/use-is-mounted-ref.test.tsx index a4927f2b583..02d7854e4a3 100644 --- a/polaris-react/src/utilities/tests/use-is-mounted-ref.test.tsx +++ b/polaris-react/src/utilities/tests/use-is-mounted-ref.test.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import { useEffect } from 'react'; import {mount} from 'tests/utilities'; import {useIsMountedRef} from '../use-is-mounted-ref'; diff --git a/polaris-react/src/utilities/tests/use-lazy-ref.test.tsx b/polaris-react/src/utilities/tests/use-lazy-ref.test.tsx index 7378b1c95f2..4e7ed86d03d 100644 --- a/polaris-react/src/utilities/tests/use-lazy-ref.test.tsx +++ b/polaris-react/src/utilities/tests/use-lazy-ref.test.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useState} from 'react'; +import { useEffect, useState } from 'react'; import {mount} from 'tests/utilities'; import {useLazyRef} from '../use-lazy-ref';