From 8b770c2e0957ee7ac4af0cc28e839ccee552b12e Mon Sep 17 00:00:00 2001 From: mfrances Date: Fri, 28 Feb 2025 17:26:41 -0500 Subject: [PATCH 01/16] chore(deps): Update components to use new JSX transform --- .../components/ChartLabel/ChartLabel.test.tsx | 1 - .../components/ChartLabel/ChartLabel.tsx | 5 +- .../src/components/AboutModal/AboutModal.tsx | 1 - .../components/AboutModal/AboutModalBox.tsx | 1 - .../AboutModal/AboutModalBoxBrand.tsx | 1 - .../AboutModal/AboutModalBoxCloseButton.tsx | 1 - .../AboutModal/AboutModalBoxContent.tsx | 1 - .../AboutModal/AboutModalBoxHeader.tsx | 1 - .../AboutModal/__tests__/AboutModal.test.tsx | 2 - .../__tests__/AboutModalBox.test.tsx | 1 - .../__tests__/AboutModalBoxBrand.test.tsx | 1 - .../AboutModalBoxCloseButton.test.tsx | 1 - .../__tests__/AboutModalBoxContent.test.tsx | 1 - .../__tests__/AboutModalBoxHeader.test.tsx | 1 - .../src/components/Accordion/Accordion.tsx | 1 - .../components/Accordion/AccordionContent.tsx | 11 ++-- .../components/Accordion/AccordionContext.ts | 7 +-- .../AccordionExpandableContentBody.tsx | 1 - .../components/Accordion/AccordionItem.tsx | 1 - .../components/Accordion/AccordionToggle.tsx | 4 +- .../src/components/ActionList/ActionList.tsx | 1 - .../components/ActionList/ActionListGroup.tsx | 1 - .../components/ActionList/ActionListItem.tsx | 1 - .../react-core/src/components/Alert/Alert.tsx | 21 ++++--- .../Alert/AlertActionCloseButton.tsx | 1 - .../src/components/Alert/AlertActionLink.tsx | 1 - .../src/components/Alert/AlertContext.ts | 5 +- .../src/components/Alert/AlertGroup.tsx | 6 +- .../src/components/Alert/AlertGroupInline.tsx | 4 +- .../src/components/Alert/AlertIcon.tsx | 1 - .../Alert/AlertToggleExpandButton.tsx | 4 +- .../components/Alert/__tests__/Alert.test.tsx | 9 ++- .../Alert/__tests__/AlertGroup.test.tsx | 2 - .../Alert/__tests__/AlertIcon.test.tsx | 1 - .../AlertToggleExpandButton.test.tsx | 1 - .../Generated/AlertActionLink.test.tsx | 1 - .../__tests__/Generated/AlertGroup.test.tsx | 1 - .../Generated/AlertGroupInline.test.tsx | 1 - .../__tests__/Generated/AlertIcon.test.tsx | 1 - .../src/components/Avatar/Avatar.tsx | 1 - .../Avatar/__tests__/Avatar.test.tsx | 1 - .../src/components/BackToTop/BackToTop.tsx | 12 ++-- .../src/components/Backdrop/Backdrop.tsx | 1 - .../react-core/src/components/Badge/Badge.tsx | 1 - .../components/Badge/__tests__/Badge.test.tsx | 1 - .../src/components/Banner/Banner.tsx | 1 - .../Banner/__tests__/Banner.test.tsx | 1 - .../react-core/src/components/Brand/Brand.tsx | 1 - .../components/Brand/__tests__/Brand.test.tsx | 1 - .../src/components/Breadcrumb/Breadcrumb.tsx | 8 +-- .../Breadcrumb/BreadcrumbHeading.tsx | 4 +- .../components/Breadcrumb/BreadcrumbItem.tsx | 1 - .../Breadcrumb/__tests__/Breadcrumb.test.tsx | 1 - .../__tests__/BreadcrumbHeading.test.tsx | 1 - .../__tests__/BreadcrumbItem.test.tsx | 1 - .../src/components/Button/Button.tsx | 6 +- .../react-core/src/components/Card/Card.tsx | 4 +- .../src/components/Card/CardActions.tsx | 1 - .../src/components/Card/CardBody.tsx | 1 - .../components/Card/CardExpandableContent.tsx | 1 - .../src/components/Card/CardFooter.tsx | 1 - .../src/components/Card/CardHeader.tsx | 1 - .../src/components/Card/CardHeaderMain.tsx | 1 - .../components/Card/CardSelectableActions.tsx | 1 - .../src/components/Card/CardTitle.tsx | 4 +- .../__tests__/Generated/CardActions.test.tsx | 1 - .../src/components/Checkbox/Checkbox.tsx | 4 +- .../ClipboardCopy/ClipboardCopy.tsx | 12 ++-- .../ClipboardCopy/ClipboardCopyAction.tsx | 1 - .../ClipboardCopy/ClipboardCopyButton.tsx | 4 +- .../ClipboardCopy/ClipboardCopyExpanded.tsx | 4 +- .../ClipboardCopy/ClipboardCopyToggle.tsx | 1 - .../__tests__/ClipboardCopy.test.tsx | 1 - .../__tests__/ClipboardCopyAction.test.tsx | 1 - .../__tests__/ClipboardCopyButton.test.tsx | 2 - .../__tests__/ClipboardCopyExpanded.test.tsx | 1 - .../__tests__/ClipboardCopyToggle.test.tsx | 1 - .../src/components/CodeBlock/CodeBlock.tsx | 1 - .../components/CodeBlock/CodeBlockAction.tsx | 1 - .../components/CodeBlock/CodeBlockCode.tsx | 1 - .../src/components/Content/Content.tsx | 1 - .../Content/__tests__/Content.test.tsx | 1 - .../src/components/DataList/DataList.tsx | 6 +- .../components/DataList/DataListAction.tsx | 1 - .../src/components/DataList/DataListCell.tsx | 1 - .../src/components/DataList/DataListCheck.tsx | 6 +- .../components/DataList/DataListContent.tsx | 1 - .../components/DataList/DataListControl.tsx | 1 - .../DataList/DataListDragButton.tsx | 1 - .../src/components/DataList/DataListItem.tsx | 10 ++-- .../components/DataList/DataListItemCells.tsx | 1 - .../components/DataList/DataListItemRow.tsx | 8 +-- .../src/components/DataList/DataListText.tsx | 4 +- .../components/DataList/DataListToggle.tsx | 1 - .../DataList/__tests__/DataListCheck.test.tsx | 4 +- .../Generated/DataListAction.test.tsx | 1 - .../__tests__/Generated/DataListCell.test.tsx | 1 - .../Generated/DataListCheck.test.tsx | 1 - .../Generated/DataListContent.test.tsx | 1 - .../__tests__/Generated/DataListItem.test.tsx | 1 - .../Generated/DataListItemCells.test.tsx | 1 - .../Generated/DataListItemRow.test.tsx | 1 - .../Generated/DataListToggle.test.tsx | 1 - .../src/components/DatePicker/DatePicker.tsx | 32 +++++----- .../DescriptionList/DescriptionList.tsx | 1 - .../DescriptionListDescription.tsx | 1 - .../DescriptionList/DescriptionListGroup.tsx | 1 - .../DescriptionList/DescriptionListTerm.tsx | 1 - .../DescriptionListTermHelpText.tsx | 1 - .../DescriptionListTermHelpTextButton.tsx | 4 +- .../src/components/Divider/Divider.tsx | 1 - .../Divider/__tests__/Divider.test.tsx | 1 - .../src/components/Drawer/Drawer.tsx | 8 +-- .../src/components/Drawer/DrawerActions.tsx | 1 - .../components/Drawer/DrawerCloseButton.tsx | 1 - .../src/components/Drawer/DrawerContent.tsx | 4 +- .../components/Drawer/DrawerContentBody.tsx | 1 - .../src/components/Drawer/DrawerHead.tsx | 1 - .../src/components/Drawer/DrawerMain.tsx | 1 - .../src/components/Drawer/DrawerPanelBody.tsx | 1 - .../components/Drawer/DrawerPanelContent.tsx | 37 ++++++------ .../Drawer/DrawerPanelDescription.tsx | 1 - .../src/components/Drawer/DrawerSection.tsx | 1 - .../Generated/DrawerContent.test.tsx | 1 - .../Generated/DrawerPanelContent.test.tsx | 1 - .../DualListSelector/DualListSelector.tsx | 4 +- .../DualListSelectorContext.ts | 9 ++- .../DualListSelectorControl.tsx | 6 +- .../DualListSelectorControlsWrapper.tsx | 8 +-- .../DualListSelector/DualListSelectorList.tsx | 12 ++-- .../DualListSelectorListItem.tsx | 8 +-- .../DualListSelectorListWrapper.tsx | 12 ++-- .../DualListSelector/DualListSelectorPane.tsx | 1 - .../DualListSelector/DualListSelectorTree.tsx | 1 - .../DualListSelectorTreeItem.tsx | 12 ++-- .../src/components/EmptyState/EmptyState.tsx | 1 - .../EmptyState/EmptyStateActions.tsx | 1 - .../components/EmptyState/EmptyStateBody.tsx | 1 - .../EmptyState/EmptyStateFooter.tsx | 1 - .../EmptyState/EmptyStateHeader.tsx | 1 - .../components/EmptyState/EmptyStateIcon.tsx | 1 - .../Generated/EmptyStateActions.test.tsx | 1 - .../Generated/EmptyStateBody.test.tsx | 1 - .../Generated/EmptyStateIcon.test.tsx | 1 - .../ExpandableSection/ExpandableSection.tsx | 8 +-- .../ExpandableSectionToggle.tsx | 1 - .../__tests__/ExpandableSection.test.tsx | 7 +-- .../src/components/FileUpload/FileUpload.tsx | 1 - .../components/FileUpload/FileUploadField.tsx | 1 - .../FileUpload/FileUploadHelperText.tsx | 1 - .../FileUpload/__tests__/FileUpload.test.tsx | 1 - .../__tests__/FileUploadField.test.tsx | 1 - .../__tests__/FileUploadHelperText.test.tsx | 1 - .../src/components/Form/ActionGroup.tsx | 1 - .../react-core/src/components/Form/Form.tsx | 4 +- .../src/components/Form/FormAlert.tsx | 1 - .../src/components/Form/FormFieldGroup.tsx | 1 - .../Form/FormFieldGroupExpandable.tsx | 1 - .../components/Form/FormFieldGroupHeader.tsx | 1 - .../components/Form/FormFieldGroupToggle.tsx | 1 - .../src/components/Form/FormGroup.tsx | 9 +-- .../src/components/Form/FormHelperText.tsx | 1 - .../src/components/Form/FormSection.tsx | 1 - .../Form/InternalFormFieldGroup.tsx | 1 - .../Form/__tests__/FormFieldGroup.test.tsx | 2 - .../Form/__tests__/FormSection.test.tsx | 1 - .../FormControl/FormControlIcon.tsx | 1 - .../src/components/FormSelect/FormSelect.tsx | 6 +- .../FormSelect/FormSelectOption.tsx | 2 - .../FormSelect/FormSelectOptionGroup.tsx | 2 - .../Generated/FormSelectOption.test.tsx | 1 - .../Generated/FormSelectOptionGroup.test.tsx | 1 - .../src/components/HelperText/HelperText.tsx | 1 - .../components/HelperText/HelperTextItem.tsx | 1 - .../HelperText/__tests__/HelperText.test.tsx | 1 - .../__tests__/HelperTextItem.test.tsx | 1 - .../react-core/src/components/Hint/Hint.tsx | 1 - .../src/components/Hint/HintBody.tsx | 1 - .../src/components/Hint/HintFooter.tsx | 1 - .../src/components/Hint/HintTitle.tsx | 1 - .../components/Hint/__tests__/Hint.test.tsx | 1 - .../react-core/src/components/Icon/Icon.tsx | 1 - .../components/Icon/__tests__/Icon.test.tsx | 1 - .../src/components/InputGroup/InputGroup.tsx | 6 +- .../components/InputGroup/InputGroupItem.tsx | 1 - .../components/InputGroup/InputGroupText.tsx | 1 - .../src/components/JumpLinks/JumpLinks.tsx | 30 +++++----- .../components/JumpLinks/JumpLinksItem.tsx | 4 +- .../components/JumpLinks/JumpLinksList.tsx | 1 - .../JumpLinks/__tests__/JumpLinks.test.tsx | 1 - .../react-core/src/components/Label/Label.tsx | 27 +++++---- .../src/components/Label/LabelGroup.tsx | 14 ++--- .../react-core/src/components/List/List.tsx | 1 - .../src/components/List/ListItem.tsx | 1 - .../__tests__/Generated/ListItem.test.tsx | 1 - .../src/components/LoginPage/Login.tsx | 1 - .../src/components/LoginPage/LoginFooter.tsx | 1 - .../components/LoginPage/LoginFooterItem.tsx | 5 +- .../src/components/LoginPage/LoginForm.tsx | 4 +- .../src/components/LoginPage/LoginHeader.tsx | 1 - .../components/LoginPage/LoginMainBody.tsx | 1 - .../components/LoginPage/LoginMainFooter.tsx | 1 - .../LoginPage/LoginMainFooterBandItem.tsx | 1 - .../LoginPage/LoginMainFooterLinksItem.tsx | 1 - .../components/LoginPage/LoginMainHeader.tsx | 1 - .../src/components/LoginPage/LoginPage.tsx | 10 ++-- .../__tests__/Generated/LoginFooter.test.tsx | 1 - .../__tests__/Generated/LoginHeader.test.tsx | 1 - .../LoginPage/__tests__/Login.test.tsx | 1 - .../__tests__/LoginMainBody.test.tsx | 1 - .../LoginMainFooterLinksItem.test.tsx | 1 - .../__tests__/LoginMainHeader.test.tsx | 1 - .../LoginPage/__tests__/LoginPage.test.tsx | 10 ++-- .../src/components/Masthead/Masthead.tsx | 4 +- .../src/components/Masthead/MastheadBrand.tsx | 1 - .../components/Masthead/MastheadContent.tsx | 1 - .../src/components/Masthead/MastheadLogo.tsx | 1 - .../src/components/Masthead/MastheadMain.tsx | 1 - .../components/Masthead/MastheadToggle.tsx | 1 - .../react-core/src/components/Menu/Menu.tsx | 8 +-- .../src/components/Menu/MenuContent.tsx | 6 +- .../src/components/Menu/MenuContext.ts | 7 +-- .../src/components/Menu/MenuFooter.tsx | 1 - .../src/components/Menu/MenuGroup.tsx | 4 +- .../src/components/Menu/MenuItem.tsx | 24 ++++---- .../src/components/Menu/MenuItemAction.tsx | 4 +- .../src/components/Menu/MenuList.tsx | 4 +- .../src/components/Menu/MenuSearch.tsx | 4 +- .../src/components/Menu/MenuSearchInput.tsx | 4 +- .../src/components/MenuToggle/MenuToggle.tsx | 8 +-- .../MenuToggle/MenuToggleAction.tsx | 4 +- .../MenuToggle/MenuToggleCheckbox.tsx | 4 +- .../react-core/src/components/Modal/Modal.tsx | 4 +- .../src/components/Modal/ModalBody.tsx | 1 - .../src/components/Modal/ModalBox.tsx | 1 - .../components/Modal/ModalBoxCloseButton.tsx | 1 - .../components/Modal/ModalBoxDescription.tsx | 1 - .../src/components/Modal/ModalBoxTitle.tsx | 6 +- .../src/components/Modal/ModalContent.tsx | 1 - .../src/components/Modal/ModalFooter.tsx | 1 - .../src/components/Modal/ModalHeader.tsx | 1 - .../components/Modal/__tests__/Modal.test.tsx | 11 ++-- .../Modal/__tests__/ModalBody.test.tsx | 1 - .../Modal/__tests__/ModalBox.test.tsx | 1 - .../__tests__/ModalBoxCloseButton.test.tsx | 2 - .../__tests__/ModalBoxDescription.test.tsx | 1 - .../Modal/__tests__/ModalBoxHeader.test.tsx | 1 - .../Modal/__tests__/ModalBoxTitle.test.tsx | 1 - .../Modal/__tests__/ModalContent.test.tsx | 1 - .../Modal/__tests__/ModalFooter.test.tsx | 1 - .../MultipleFileUpload/MultipleFileUpload.tsx | 4 +- .../MultipleFileUploadButton.tsx | 4 +- .../MultipleFileUploadInfo.tsx | 1 - .../MultipleFileUploadMain.tsx | 1 - .../MultipleFileUploadStatus.tsx | 8 +-- .../MultipleFileUploadStatusItem.tsx | 8 +-- .../MultipleFileUploadTitle.tsx | 1 - .../MultipleFileUploadTitleIcon.tsx | 1 - .../MultipleFileUploadTitleText.tsx | 1 - .../MultipleFileUploadTitleTextSeparator.tsx | 1 - .../__tests__/MultipleFileUpload.test.tsx | 1 - .../MultipleFileUploadButton.test.tsx | 1 - .../__tests__/MultipleFileUploadInfo.test.tsx | 1 - .../__tests__/MultipleFileUploadMain.test.tsx | 1 - .../MultipleFileUploadStatus.test.tsx | 1 - .../MultipleFileUploadStatusItem.test.tsx | 2 - .../MultipleFileUploadTitle.test.tsx | 1 - .../MultipleFileUploadTitleIcon.test.tsx | 1 - .../MultipleFileUploadTitleText.test.tsx | 1 - ...tipleFileUploadTitleTextSeparator.test.tsx | 1 - .../react-core/src/components/Nav/Nav.tsx | 8 +-- .../src/components/Nav/NavExpandable.tsx | 6 +- .../src/components/Nav/NavGroup.tsx | 1 - .../react-core/src/components/Nav/NavItem.tsx | 26 ++++----- .../src/components/Nav/NavItemSeparator.tsx | 1 - .../react-core/src/components/Nav/NavList.tsx | 12 ++-- .../Generated/NavExpandable.test.tsx | 1 - .../Nav/__tests__/Generated/NavGroup.test.tsx | 1 - .../Nav/__tests__/Generated/NavItem.test.tsx | 1 - .../src/components/Nav/__tests__/Nav.test.tsx | 7 +-- .../NotificationBadge/NotificationBadge.tsx | 1 - .../NotificationDrawer/NotificationDrawer.tsx | 5 +- .../NotificationDrawerBody.tsx | 2 - .../NotificationDrawerGroup.tsx | 9 ++- .../NotificationDrawerGroupList.tsx | 2 - .../NotificationDrawerHeader.tsx | 2 - .../NotificationDrawerList.tsx | 2 - .../NotificationDrawerListItem.tsx | 1 - .../NotificationDrawerListItemBody.tsx | 7 +-- .../NotificationDrawerListItemHeader.tsx | 13 ++--- .../components/NumberInput/NumberInput.tsx | 1 - .../components/OverflowMenu/OverflowMenu.tsx | 4 +- .../OverflowMenu/OverflowMenuContent.tsx | 1 - .../OverflowMenu/OverflowMenuContext.tsx | 4 +- .../OverflowMenu/OverflowMenuControl.tsx | 1 - .../OverflowMenu/OverflowMenuDropdownItem.tsx | 1 - .../OverflowMenu/OverflowMenuGroup.tsx | 1 - .../OverflowMenu/OverflowMenuItem.tsx | 1 - .../Generated/OverflowMenuControl.test.tsx | 1 - .../__tests__/OverflowMenu.test.tsx | 5 +- .../__tests__/OverflowMenuControl.test.tsx | 2 - .../__tests__/OverflowMenuItem.test.tsx | 2 - .../react-core/src/components/Page/Page.tsx | 8 +-- .../src/components/Page/PageBody.tsx | 1 - .../src/components/Page/PageBreadcrumb.tsx | 6 +- .../src/components/Page/PageContext.tsx | 5 +- .../src/components/Page/PageGroup.tsx | 6 +- .../src/components/Page/PageSection.tsx | 6 +- .../src/components/Page/PageSidebar.tsx | 4 +- .../src/components/Page/PageSidebarBody.tsx | 1 - .../src/components/Page/PageToggleButton.tsx | 1 - .../__tests__/Generated/PageSidebar.test.tsx | 1 - .../components/Page/__tests__/Page.test.tsx | 2 - .../Page/__tests__/PageBody.test.tsx | 1 - .../Page/__tests__/PageBreadcrumb.test.tsx | 1 - .../Page/__tests__/PageGroup.test.tsx | 1 - .../Page/__tests__/PageSection.test.tsx | 1 - .../Page/__tests__/PageSidebarBody.test.tsx | 1 - .../src/components/Pagination/Navigation.tsx | 4 +- .../src/components/Pagination/Pagination.tsx | 10 ++-- .../Pagination/PaginationOptionsMenu.tsx | 10 ++-- .../components/Pagination/ToggleTemplate.tsx | 8 +-- .../__tests__/Generated/Navigation.test.tsx | 1 - .../Generated/PaginationOptionsMenu.test.tsx | 6 +- .../Generated/ToggleTemplate.test.tsx | 1 - .../Pagination/__tests__/Pagination.test.tsx | 2 - .../__tests__/PaginationOptionsMenu.test.tsx | 1 - .../react-core/src/components/Panel/Panel.tsx | 7 +-- .../src/components/Panel/PanelFooter.tsx | 1 - .../src/components/Panel/PanelHeader.tsx | 1 - .../src/components/Panel/PanelMain.tsx | 1 - .../src/components/Panel/PanelMainBody.tsx | 1 - .../components/Panel/__tests__/Panel.test.tsx | 6 +- .../Panel/__tests__/PanelFooter.test.tsx | 1 - .../Panel/__tests__/PanelHeader.test.tsx | 1 - .../Panel/__tests__/PanelMain.test.tsx | 1 - .../Panel/__tests__/PanelMainBody.test.tsx | 1 - .../src/components/Popover/Popover.tsx | 12 ++-- .../src/components/Popover/PopoverArrow.tsx | 1 - .../src/components/Popover/PopoverBody.tsx | 1 - .../components/Popover/PopoverCloseButton.tsx | 1 - .../src/components/Popover/PopoverContent.tsx | 1 - .../src/components/Popover/PopoverContext.tsx | 5 +- .../src/components/Popover/PopoverDialog.tsx | 1 - .../src/components/Popover/PopoverFooter.tsx | 1 - .../src/components/Popover/PopoverHeader.tsx | 1 - .../components/Popover/PopoverHeaderIcon.tsx | 1 - .../components/Popover/PopoverHeaderText.tsx | 1 - .../__tests__/Generated/PopoverArrow.test.tsx | 1 - .../__tests__/Generated/PopoverBody.test.tsx | 1 - .../Generated/PopoverCloseButton.test.tsx | 1 - .../Generated/PopoverContent.test.tsx | 1 - .../Generated/PopoverDialog.test.tsx | 1 - .../Generated/PopoverFooter.test.tsx | 1 - .../Generated/PopoverHeader.test.tsx | 1 - .../Popover/__tests__/Popover.test.tsx | 6 +- .../src/components/Progress/Progress.tsx | 4 +- .../src/components/Progress/ProgressBar.tsx | 1 - .../components/Progress/ProgressContainer.tsx | 8 +-- .../Progress/ProgressHelperText.tsx | 1 - .../__tests__/Generated/ProgressBar.test.tsx | 1 - .../Generated/ProgressContainer.test.tsx | 1 - .../ProgressStepper/ProgressStep.tsx | 4 +- .../ProgressStepper/ProgressStepper.tsx | 1 - .../__tests__/ProgressStep.test.tsx | 1 - .../__tests__/ProgressStepper.test.tsx | 1 - .../react-core/src/components/Radio/Radio.tsx | 4 +- .../SearchInput/AdvancedSearchMenu.tsx | 12 ++-- .../components/SearchInput/SearchInput.tsx | 32 +++++----- .../__tests__/SearchInput.test.tsx | 7 +-- .../src/components/Sidebar/Sidebar.tsx | 1 - .../src/components/Sidebar/SidebarContent.tsx | 1 - .../src/components/Sidebar/SidebarPanel.tsx | 1 - .../Sidebar/__tests__/Sidebar.test.tsx | 1 - .../Sidebar/__tests__/SidebarContent.test.tsx | 1 - .../Sidebar/__tests__/SidebarPanel.test.tsx | 1 - .../src/components/SimpleList/SimpleList.tsx | 8 +-- .../components/SimpleList/SimpleListGroup.tsx | 1 - .../components/SimpleList/SimpleListItem.tsx | 6 +- .../Generated/SimpleListGroup.test.tsx | 1 - .../Generated/SimpleListItem.test.tsx | 1 - .../SimpleList/__tests__/SimpleList.test.tsx | 2 - .../src/components/Skeleton/Skeleton.tsx | 1 - .../SkipToContent/SkipToContent.tsx | 1 - .../__tests__/SkipToContent.test.tsx | 1 - .../src/components/Slider/Slider.tsx | 19 +++--- .../src/components/Slider/SliderStep.tsx | 1 - .../src/components/Spinner/Spinner.tsx | 1 - .../Spinner/__tests__/Spinner.test.tsx | 1 - .../src/components/Switch/Switch.tsx | 8 +-- .../Switch/__tests__/Switch.test.tsx | 2 - .../react-core/src/components/Tabs/Tab.tsx | 6 +- .../src/components/Tabs/TabAction.tsx | 4 +- .../src/components/Tabs/TabButton.tsx | 1 - .../src/components/Tabs/TabContent.tsx | 4 +- .../src/components/Tabs/TabContentBody.tsx | 1 - .../src/components/Tabs/TabTitleIcon.tsx | 1 - .../src/components/Tabs/TabTitleText.tsx | 1 - .../react-core/src/components/Tabs/Tabs.tsx | 23 ++++---- .../src/components/Tabs/TabsContext.ts | 4 +- .../__tests__/Generated/TabContent.test.tsx | 1 - .../src/components/TextArea/TextArea.tsx | 10 ++-- .../src/components/TextInput/TextInput.tsx | 9 ++- .../TextInputGroup/TextInputGroup.tsx | 6 +- .../TextInputGroup/TextInputGroupIcon.tsx | 1 - .../TextInputGroup/TextInputGroupMain.tsx | 14 ++--- .../TextInputGroupUtilities.tsx | 1 - .../src/components/TimePicker/TimePicker.tsx | 16 ++--- .../TimePicker/__tests__/TimePicker.test.tsx | 7 +-- .../src/components/Timestamp/Timestamp.tsx | 6 +- .../Timestamp/__tests__/Timestamp.test.tsx | 1 - .../react-core/src/components/Title/Title.tsx | 1 - .../components/Title/__tests__/Title.test.tsx | 1 - .../components/ToggleGroup/ToggleGroup.tsx | 8 +-- .../ToggleGroup/ToggleGroupItem.tsx | 1 - .../ToggleGroup/ToggleGroupItemElement.tsx | 1 - .../__tests__/ToggleGroup.test.tsx | 2 - .../__tests__/ToggleGroupItemElement.test.tsx | 1 - .../src/components/Toolbar/Toolbar.tsx | 6 +- .../src/components/Toolbar/ToolbarContent.tsx | 8 +-- .../Toolbar/ToolbarExpandIconWrapper.tsx | 1 - .../Toolbar/ToolbarExpandableContent.tsx | 4 +- .../src/components/Toolbar/ToolbarFilter.tsx | 14 ++--- .../src/components/Toolbar/ToolbarGroup.tsx | 6 +- .../src/components/Toolbar/ToolbarItem.tsx | 1 - .../Toolbar/ToolbarLabelGroupContent.tsx | 4 +- .../components/Toolbar/ToolbarToggleGroup.tsx | 8 +-- .../src/components/Toolbar/ToolbarUtils.tsx | 7 +-- .../ToolbarChipGroupContent.test.tsx | 1 - .../Generated/ToolbarContent.test.tsx | 1 - .../ToolbarExpandableContent.test.tsx | 1 - .../__tests__/Generated/ToolbarGroup.test.tsx | 1 - .../src/components/Tooltip/Tooltip.tsx | 12 ++-- .../src/components/Tooltip/TooltipArrow.tsx | 1 - .../src/components/Tooltip/TooltipContent.tsx | 1 - .../src/components/TreeView/TreeView.tsx | 1 - .../src/components/TreeView/TreeViewList.tsx | 6 +- .../src/components/TreeView/TreeViewRoot.tsx | 6 +- .../components/TreeView/TreeViewSearch.tsx | 1 - .../src/components/Truncate/Truncate.tsx | 28 ++++----- .../Truncate/__tests__/Truncate.test.tsx | 1 - .../src/components/Wizard/WizardHeader.tsx | 1 - .../src/components/Wizard/WizardNav.tsx | 1 - .../src/components/Wizard/WizardNavItem.tsx | 7 +-- .../src/demos/RTL/examples/PaginatedTable.jsx | 2 - .../src/demos/RTL/examples/PaginatedTable.tsx | 33 +++++------ .../examples/BackToTop/BackToTopNameDemo.tsx | 4 +- .../examples/Card/CardAggregateStatus.tsx | 6 +- .../src/demos/examples/Card/CardStatus.tsx | 1 - .../demos/examples/Card/CardStatusTabbed.tsx | 1 - .../src/deprecated/components/Chip/Chip.tsx | 6 +- .../deprecated/components/Chip/ChipGroup.tsx | 6 +- .../components/DragDrop/DragDrop.tsx | 5 +- .../components/DragDrop/Draggable.tsx | 18 +++--- .../components/DragDrop/Droppable.tsx | 6 +- .../components/DragDrop/DroppableContext.ts | 4 +- .../DualListSelector/DualListSelector.tsx | 12 ++-- .../DualListSelectorContext.ts | 8 +-- .../DualListSelectorControl.tsx | 6 +- .../DualListSelectorControlsWrapper.tsx | 8 +-- .../DualListSelector/DualListSelectorList.tsx | 4 +- .../DualListSelectorListItem.tsx | 10 ++-- .../DualListSelectorListWrapper.tsx | 12 ++-- .../DualListSelector/DualListSelectorPane.tsx | 6 +- .../DualListSelector/DualListSelectorTree.tsx | 1 - .../DualListSelectorTreeItem.tsx | 12 ++-- .../src/deprecated/components/Modal/Modal.tsx | 4 +- .../deprecated/components/Modal/ModalBox.tsx | 1 - .../components/Modal/ModalBoxBody.tsx | 1 - .../components/Modal/ModalBoxCloseButton.tsx | 1 - .../components/Modal/ModalBoxDescription.tsx | 1 - .../components/Modal/ModalBoxFooter.tsx | 1 - .../components/Modal/ModalBoxHeader.tsx | 6 +- .../components/Modal/ModalBoxTitle.tsx | 6 +- .../components/Modal/ModalContent.tsx | 1 - .../components/Modal/__tests__/Modal.test.tsx | 11 ++-- .../Modal/__tests__/ModalBox.test.tsx | 1 - .../Modal/__tests__/ModalBoxBody.test.tsx | 1 - .../__tests__/ModalBoxCloseButton.test.tsx | 2 - .../__tests__/ModalBoxDescription.test.tsx | 1 - .../Modal/__tests__/ModalBoxFooter.test.tsx | 1 - .../Modal/__tests__/ModalBoxHeader.test.tsx | 1 - .../Modal/__tests__/ModalBoxTitle.test.tsx | 1 - .../Modal/__tests__/ModalContent.test.tsx | 1 - .../src/deprecated/components/Tile/Tile.tsx | 1 - .../deprecated/components/Wizard/Wizard.tsx | 6 +- .../components/Wizard/WizardBody.tsx | 10 ++-- .../components/Wizard/WizardContext.ts | 4 +- .../components/Wizard/WizardDrawerWrapper.tsx | 2 - .../components/Wizard/WizardFooter.tsx | 1 - .../Wizard/WizardFooterInternal.tsx | 1 - .../components/Wizard/WizardHeader.tsx | 1 - .../components/Wizard/WizardNav.tsx | 1 - .../components/Wizard/WizardNavItem.tsx | 6 +- .../components/Wizard/WizardToggle.tsx | 6 +- .../__tests__/Generated/WizardBody.test.tsx | 1 - .../__tests__/Generated/WizardFooter.test.tsx | 1 - .../Generated/WizardFooterInternal.test.tsx | 1 - .../__tests__/Generated/WizardHeader.test.tsx | 1 - .../__tests__/Generated/WizardNav.test.tsx | 1 - .../Generated/WizardNavItem.test.tsx | 1 - .../__tests__/Generated/WizardToggle.test.tsx | 1 - .../__tests__/Generated/FocusTrap.test.tsx | 1 - .../src/helpers/GenerateId/GenerateId.ts | 5 +- .../GenerateId/__mocks__/GenerateId.ts | 4 +- .../src/helpers/KeyboardHandler.tsx | 6 +- .../react-core/src/helpers/Popper/Popper.tsx | 58 +++++++++---------- .../thirdparty/react-popper/usePopper.ts | 13 ++--- .../react-core/src/helpers/useInterval.ts | 9 ++- .../src/helpers/useIsomorphicLayout.ts | 4 +- .../src/layouts/Bullseye/Bullseye.tsx | 1 - packages/react-core/src/layouts/Flex/Flex.tsx | 1 - .../react-core/src/layouts/Flex/FlexItem.tsx | 1 - .../src/layouts/Flex/__tests__/Flex.test.tsx | 2 - .../__tests__/Generated/FlexItem.test.tsx | 1 - .../src/layouts/Gallery/Gallery.tsx | 1 - .../src/layouts/Gallery/GalleryItem.tsx | 2 - .../Gallery/__tests__/Gallery.test.tsx | 1 - .../__tests__/Generated/GalleryItem.test.tsx | 1 - packages/react-core/src/layouts/Grid/Grid.tsx | 1 - .../react-core/src/layouts/Grid/GridItem.tsx | 1 - .../src/layouts/Grid/__tests__/Grid.test.tsx | 1 - .../layouts/Grid/__tests__/GridItem.test.tsx | 1 - .../react-core/src/layouts/Level/Level.tsx | 1 - .../src/layouts/Level/LevelItem.tsx | 2 - .../__tests__/Generated/LevelItem.test.tsx | 1 - .../layouts/Level/__tests__/Level.test.tsx | 1 - .../react-core/src/layouts/Split/Split.tsx | 1 - .../src/layouts/Split/SplitItem.tsx | 1 - .../__tests__/Generated/SplitItem.test.tsx | 1 - .../layouts/Split/__tests__/Split.test.tsx | 1 - .../react-core/src/layouts/Stack/Stack.tsx | 1 - .../src/layouts/Stack/StackItem.tsx | 1 - .../__tests__/Generated/StackItem.test.tsx | 1 - .../layouts/Stack/__tests__/Stack.test.tsx | 1 - packages/tsconfig.base.json | 1 + 536 files changed, 729 insertions(+), 1150 deletions(-) diff --git a/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.test.tsx b/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.test.tsx index 6915a7cbf69..1f9e3f3b461 100644 --- a/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.test.tsx +++ b/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { render } from '@testing-library/react'; import { ChartLabel } from './ChartLabel'; diff --git a/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.tsx b/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.tsx index 00359976b9c..58c283ff22c 100644 --- a/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.tsx +++ b/packages/react-charts/src/victory/components/ChartLabel/ChartLabel.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import hoistNonReactStatics from 'hoist-non-react-statics'; import defaults from 'lodash/defaults'; import { @@ -54,7 +53,7 @@ export interface ChartLabelProps extends VictoryLabelProps { */ className?: string; /** - * Labels that apply to an entire data series will recieve the entire series as `data` instead of an individual datum + * Labels that apply to an entire data series will receive the entire series as `data` instead of an individual datum * prop. */ data?: any[]; @@ -111,7 +110,7 @@ export interface ChartLabelProps extends VictoryLabelProps { /** * The labelPlacement prop is used to specify the placement of labels relative to the data point they represent. * This prop may be given as “vertical”, “parallel” or “perpendicular”. This props is particularly useful in polar - * charts, where it may be desireable to position a label either parallel or perpendicular to its corresponding angle. + * charts, where it may be desirable to position a label either parallel or perpendicular to its corresponding angle. * When this prop is not set, perpendicular label placement will be used for polar charts, and vertical label * placement will be used for cartesian charts. * diff --git a/packages/react-core/src/components/AboutModal/AboutModal.tsx b/packages/react-core/src/components/AboutModal/AboutModal.tsx index 8b077697215..62c4c617a4f 100644 --- a/packages/react-core/src/components/AboutModal/AboutModal.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModal.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import backgroundImage from '@patternfly/react-tokens/dist/esm/c_about_modal_box_BackgroundImage'; import { AboutModalBoxContent } from './AboutModalBoxContent'; diff --git a/packages/react-core/src/components/AboutModal/AboutModalBox.tsx b/packages/react-core/src/components/AboutModal/AboutModalBox.tsx index 18810ca5184..d9ad123f792 100644 --- a/packages/react-core/src/components/AboutModal/AboutModalBox.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModalBox.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box'; diff --git a/packages/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx b/packages/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx index b39299dfd49..a948f7d9ab5 100644 --- a/packages/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box'; diff --git a/packages/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx b/packages/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx index 68612db3851..49de0ae2b10 100644 --- a/packages/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box'; import { Button } from '../Button'; diff --git a/packages/react-core/src/components/AboutModal/AboutModalBoxContent.tsx b/packages/react-core/src/components/AboutModal/AboutModalBoxContent.tsx index e5b029e006b..5c0dd191e74 100644 --- a/packages/react-core/src/components/AboutModal/AboutModalBoxContent.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModalBoxContent.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box'; import contentStyles from '@patternfly/react-styles/css/components/Content/content'; diff --git a/packages/react-core/src/components/AboutModal/AboutModalBoxHeader.tsx b/packages/react-core/src/components/AboutModal/AboutModalBoxHeader.tsx index 7634e34c136..4fe01e51cee 100644 --- a/packages/react-core/src/components/AboutModal/AboutModalBoxHeader.tsx +++ b/packages/react-core/src/components/AboutModal/AboutModalBoxHeader.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box'; import { Title } from '../Title'; diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx index e3804acdb91..5d1b01522b5 100644 --- a/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx +++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModal.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx index 9587eb1a531..89a6245289b 100644 --- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx +++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBox.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { render } from '@testing-library/react'; import { AboutModalBox } from '../AboutModalBox'; diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx index a764474aaab..2e6ac73621f 100644 --- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx +++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxBrand.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { render } from '@testing-library/react'; import { AboutModalBoxBrand } from '../AboutModalBoxBrand'; diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx index 817b526a15b..75c84237b15 100644 --- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx +++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxCloseButton.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { render } from '@testing-library/react'; import { AboutModalBoxCloseButton } from '../AboutModalBoxCloseButton'; diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx index 62bf982fae7..e1a8d24b687 100644 --- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx +++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxContent.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { render } from '@testing-library/react'; import { AboutModalBoxContent } from '../AboutModalBoxContent'; diff --git a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx index 5e12a89f70f..a3650189a94 100644 --- a/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx +++ b/packages/react-core/src/components/AboutModal/__tests__/AboutModalBoxHeader.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { render } from '@testing-library/react'; import { AboutModalBoxHeader } from '../AboutModalBoxHeader'; diff --git a/packages/react-core/src/components/Accordion/Accordion.tsx b/packages/react-core/src/components/Accordion/Accordion.tsx index fedc1e21ee0..53096f97c2e 100644 --- a/packages/react-core/src/components/Accordion/Accordion.tsx +++ b/packages/react-core/src/components/Accordion/Accordion.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Accordion/accordion'; import { AccordionContext } from './AccordionContext'; diff --git a/packages/react-core/src/components/Accordion/AccordionContent.tsx b/packages/react-core/src/components/Accordion/AccordionContent.tsx index f7f5b052f0a..afb495f5988 100644 --- a/packages/react-core/src/components/Accordion/AccordionContent.tsx +++ b/packages/react-core/src/components/Accordion/AccordionContent.tsx @@ -1,4 +1,5 @@ -import * as React from 'react'; +import { useContext, useEffect, useRef, useState } from 'react'; + import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Accordion/accordion'; import { AccordionContext, AccordionItemContext } from './AccordionContext'; @@ -37,11 +38,11 @@ export const AccordionContent: React.FunctionComponent = contentBodyProps, ...props }: AccordionContentProps) => { - const [hasScrollbar, setHasScrollbar] = React.useState(false); - const containerRef = React.useRef(null); - const { isExpanded } = React.useContext(AccordionItemContext); + const [hasScrollbar, setHasScrollbar] = useState(false); + const containerRef = useRef(null); + const { isExpanded } = useContext(AccordionItemContext); - React.useEffect(() => { + useEffect(() => { if (containerRef?.current && isFixed && isExpanded) { const { offsetHeight, scrollHeight } = containerRef.current; diff --git a/packages/react-core/src/components/Accordion/AccordionContext.ts b/packages/react-core/src/components/Accordion/AccordionContext.ts index e92abd418b1..c476f15898e 100644 --- a/packages/react-core/src/components/Accordion/AccordionContext.ts +++ b/packages/react-core/src/components/Accordion/AccordionContext.ts @@ -1,5 +1,4 @@ -import * as React from 'react'; - +import { createContext } from 'react'; interface AccordionContextProps { ContentContainer: React.ElementType; ToggleContainer: React.ElementType; @@ -10,5 +9,5 @@ interface AccordionItemContextProps { isExpanded?: boolean; } -export const AccordionContext = React.createContext>({}); -export const AccordionItemContext = React.createContext({} as AccordionItemContextProps); +export const AccordionContext = createContext>({}); +export const AccordionItemContext = createContext({} as AccordionItemContextProps); diff --git a/packages/react-core/src/components/Accordion/AccordionExpandableContentBody.tsx b/packages/react-core/src/components/Accordion/AccordionExpandableContentBody.tsx index 386c837bf36..ad04610d16a 100644 --- a/packages/react-core/src/components/Accordion/AccordionExpandableContentBody.tsx +++ b/packages/react-core/src/components/Accordion/AccordionExpandableContentBody.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Accordion/accordion'; diff --git a/packages/react-core/src/components/Accordion/AccordionItem.tsx b/packages/react-core/src/components/Accordion/AccordionItem.tsx index d4ca465ed9e..07c1d7ab16e 100644 --- a/packages/react-core/src/components/Accordion/AccordionItem.tsx +++ b/packages/react-core/src/components/Accordion/AccordionItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Accordion/accordion'; import { AccordionItemContext } from './AccordionContext'; diff --git a/packages/react-core/src/components/Accordion/AccordionToggle.tsx b/packages/react-core/src/components/Accordion/AccordionToggle.tsx index 1cb178e640d..64bdc846455 100644 --- a/packages/react-core/src/components/Accordion/AccordionToggle.tsx +++ b/packages/react-core/src/components/Accordion/AccordionToggle.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import { useContext } from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Accordion/accordion'; import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; @@ -29,7 +29,7 @@ export const AccordionToggle: React.FunctionComponent = ({ ); - const { isExpanded } = React.useContext(AccordionItemContext); + const { isExpanded } = useContext(AccordionItemContext); return ( diff --git a/packages/react-core/src/components/ActionList/ActionList.tsx b/packages/react-core/src/components/ActionList/ActionList.tsx index 8dd82ea57eb..08f0b57ed5c 100644 --- a/packages/react-core/src/components/ActionList/ActionList.tsx +++ b/packages/react-core/src/components/ActionList/ActionList.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/ActionList/action-list'; diff --git a/packages/react-core/src/components/ActionList/ActionListGroup.tsx b/packages/react-core/src/components/ActionList/ActionListGroup.tsx index 1e36985b9f7..8e5a22cb3b0 100644 --- a/packages/react-core/src/components/ActionList/ActionListGroup.tsx +++ b/packages/react-core/src/components/ActionList/ActionListGroup.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/ActionList/action-list'; diff --git a/packages/react-core/src/components/ActionList/ActionListItem.tsx b/packages/react-core/src/components/ActionList/ActionListItem.tsx index 2cc829848a3..d6827ff3801 100644 --- a/packages/react-core/src/components/ActionList/ActionListItem.tsx +++ b/packages/react-core/src/components/ActionList/ActionListItem.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/ActionList/action-list'; diff --git a/packages/react-core/src/components/Alert/Alert.tsx b/packages/react-core/src/components/Alert/Alert.tsx index 4ac3057fc12..f14cdee9e51 100644 --- a/packages/react-core/src/components/Alert/Alert.tsx +++ b/packages/react-core/src/components/Alert/Alert.tsx @@ -1,5 +1,4 @@ -import * as React from 'react'; -import { useState, type JSX } from 'react'; +import { Fragment, useEffect, useRef, useState, type JSX } from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Alert/alert'; import { AlertIcon } from './AlertIcon'; @@ -115,18 +114,18 @@ export const Alert: React.FunctionComponent = ({ }: AlertProps) => { const ouiaProps = useOUIAProps(Alert.displayName, ouiaId, ouiaSafe, variant); const getHeadingContent = ( - + {variantLabel} {title} - + ); - const titleRef = React.useRef(null); + const titleRef = useRef(null); const TitleComponent = component as any; - const divRef = React.useRef(undefined); + const divRef = useRef(undefined); const [isTooltipVisible, setIsTooltipVisible] = useState(false); - React.useEffect(() => { + useEffect(() => { if (!titleRef.current || !truncateTitle) { return; } @@ -142,14 +141,14 @@ export const Alert: React.FunctionComponent = ({ const [isMouseOver, setIsMouseOver] = useState(); const [containsFocus, setContainsFocus] = useState(); const dismissed = timedOut && timedOutAnimation && !isMouseOver && !containsFocus; - React.useEffect(() => { + useEffect(() => { const calculatedTimeout = timeout === true ? 8000 : Number(timeout); if (calculatedTimeout > 0) { const timer = setTimeout(() => setTimedOut(true), calculatedTimeout); return () => clearTimeout(timer); } }, [timeout]); - React.useEffect(() => { + useEffect(() => { const onDocumentFocus = () => { if (divRef.current) { if (divRef.current.contains(document.activeElement)) { @@ -165,13 +164,13 @@ export const Alert: React.FunctionComponent = ({ return () => document.removeEventListener('focus', onDocumentFocus, true); }, [containsFocus]); - React.useEffect(() => { + useEffect(() => { if (containsFocus === false || isMouseOver === false) { const timer = setTimeout(() => setTimedOutAnimation(true), timeoutAnimation); return () => clearTimeout(timer); } }, [containsFocus, isMouseOver, timeoutAnimation]); - React.useEffect(() => { + useEffect(() => { dismissed && onTimeout(); }, [dismissed, onTimeout]); diff --git a/packages/react-core/src/components/Alert/AlertActionCloseButton.tsx b/packages/react-core/src/components/Alert/AlertActionCloseButton.tsx index a42090f8918..bc9e6c81d45 100644 --- a/packages/react-core/src/components/Alert/AlertActionCloseButton.tsx +++ b/packages/react-core/src/components/Alert/AlertActionCloseButton.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Button, ButtonVariant, ButtonProps } from '../Button'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; import { AlertContext } from './AlertContext'; diff --git a/packages/react-core/src/components/Alert/AlertActionLink.tsx b/packages/react-core/src/components/Alert/AlertActionLink.tsx index b881e861fd9..14ee1169d39 100644 --- a/packages/react-core/src/components/Alert/AlertActionLink.tsx +++ b/packages/react-core/src/components/Alert/AlertActionLink.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Button, ButtonVariant, ButtonProps } from '../Button'; /** Renders buttons styled as links beneath the alert title and description when this sub-component diff --git a/packages/react-core/src/components/Alert/AlertContext.ts b/packages/react-core/src/components/Alert/AlertContext.ts index cbda82bb4a0..8dcb84c14a0 100644 --- a/packages/react-core/src/components/Alert/AlertContext.ts +++ b/packages/react-core/src/components/Alert/AlertContext.ts @@ -1,8 +1,7 @@ -import * as React from 'react'; - +import { createContext } from 'react'; interface AlertContext { title: React.ReactNode; variantLabel?: string; } -export const AlertContext = React.createContext(null); +export const AlertContext = createContext(null); diff --git a/packages/react-core/src/components/Alert/AlertGroup.tsx b/packages/react-core/src/components/Alert/AlertGroup.tsx index 12c99aa8daf..798e0313aa4 100644 --- a/packages/react-core/src/components/Alert/AlertGroup.tsx +++ b/packages/react-core/src/components/Alert/AlertGroup.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import { Component } from 'react'; import * as ReactDOM from 'react-dom'; import { canUseDOM } from '../../helpers'; import { AlertGroupInline } from './AlertGroupInline'; @@ -26,7 +26,7 @@ interface AlertGroupState { container: HTMLElement; } -class AlertGroup extends React.Component { +class AlertGroup extends Component { static displayName = 'AlertGroup'; state = { container: undefined @@ -64,7 +64,7 @@ class AlertGroup extends React.Component { overflowMessage, 'aria-label': ariaLabel, // eslint-disable-next-line @typescript-eslint/no-unused-vars - appendTo, // dont pass down to ul + appendTo, // do not pass down to ul ...props } = this.props; const alertGroup = ( diff --git a/packages/react-core/src/components/Alert/AlertGroupInline.tsx b/packages/react-core/src/components/Alert/AlertGroupInline.tsx index 3d1ab2e058d..b8c2084d992 100644 --- a/packages/react-core/src/components/Alert/AlertGroupInline.tsx +++ b/packages/react-core/src/components/Alert/AlertGroupInline.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import { Children } from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Alert/alert-group'; import { AlertGroupProps } from './AlertGroup'; @@ -20,7 +20,7 @@ export const AlertGroupInline: React.FunctionComponent = ({ className={css(styles.alertGroup, className, isToast ? styles.modifiers.toast : '')} {...rest} > - {React.Children.toArray(children).map((alert, index) => ( + {Children.toArray(children).map((alert, index) => (
  • ).props?.id || index}>{alert}
  • ))} {overflowMessage && ( diff --git a/packages/react-core/src/components/Alert/AlertIcon.tsx b/packages/react-core/src/components/Alert/AlertIcon.tsx index 04539a9c84c..e907f573fe9 100644 --- a/packages/react-core/src/components/Alert/AlertIcon.tsx +++ b/packages/react-core/src/components/Alert/AlertIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Alert/alert'; import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; diff --git a/packages/react-core/src/components/Alert/AlertToggleExpandButton.tsx b/packages/react-core/src/components/Alert/AlertToggleExpandButton.tsx index 44cc37d9c37..e43692e77f1 100644 --- a/packages/react-core/src/components/Alert/AlertToggleExpandButton.tsx +++ b/packages/react-core/src/components/Alert/AlertToggleExpandButton.tsx @@ -1,4 +1,4 @@ -import * as React from 'react'; +import { useContext } from 'react'; import { Button, ButtonProps, ButtonVariant } from '../Button'; import { AlertContext } from './AlertContext'; import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; @@ -23,7 +23,7 @@ export const AlertToggleExpandButton: React.FunctionComponent { - const { title, variantLabel: alertVariantLabel } = React.useContext(AlertContext); + const { title, variantLabel: alertVariantLabel } = useContext(AlertContext); return ( @@ -42,6 +42,6 @@ export const AboutModalBasic: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/AboutModal/examples/AboutModalComplexUserPositionedContent.tsx b/packages/react-core/src/components/AboutModal/examples/AboutModalComplexUserPositionedContent.tsx index 70a6fee69a7..45e0d9ce159 100644 --- a/packages/react-core/src/components/AboutModal/examples/AboutModalComplexUserPositionedContent.tsx +++ b/packages/react-core/src/components/AboutModal/examples/AboutModalComplexUserPositionedContent.tsx @@ -1,17 +1,17 @@ -import React from 'react'; +import { Fragment, useState } from 'react'; import { AboutModal, Alert, Button, Content } from '@patternfly/react-core'; import brandImg from '../../assets/PF-IconLogo.svg'; import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing'; export const AboutModalComplexUserPositionedContent: React.FunctionComponent = () => { - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [isModalOpen, setIsModalOpen] = useState(false); const toggleModal = (_event: React.MouseEvent | KeyboardEvent | MouseEvent) => { setIsModalOpen(!isModalOpen); }; return ( - + @@ -49,6 +49,6 @@ export const AboutModalComplexUserPositionedContent: React.FunctionComponent = ( - + ); }; diff --git a/packages/react-core/src/components/AboutModal/examples/AboutModalWithoutProductName.tsx b/packages/react-core/src/components/AboutModal/examples/AboutModalWithoutProductName.tsx index 0835aa257b2..c9073da724c 100644 --- a/packages/react-core/src/components/AboutModal/examples/AboutModalWithoutProductName.tsx +++ b/packages/react-core/src/components/AboutModal/examples/AboutModalWithoutProductName.tsx @@ -1,16 +1,16 @@ -import React from 'react'; +import { Fragment, useState } from 'react'; import { AboutModal, Button, Content } from '@patternfly/react-core'; import brandImg from '../../assets/PF-IconLogo.svg'; export const AboutModalWithoutProductName: React.FunctionComponent = () => { - const [isModalOpen, setIsModalOpen] = React.useState(false); + const [isModalOpen, setIsModalOpen] = useState(false); const toggleModal = (_event: React.MouseEvent | KeyboardEvent | MouseEvent) => { setIsModalOpen(!isModalOpen); }; return ( - + @@ -42,6 +42,6 @@ export const AboutModalWithoutProductName: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx b/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx index 4d347f5d0eb..c6260e3f8cd 100644 --- a/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx +++ b/packages/react-core/src/components/Accordion/__tests__/Accordion.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { Accordion } from '../Accordion'; diff --git a/packages/react-core/src/components/Accordion/__tests__/AccordionContent.test.tsx b/packages/react-core/src/components/Accordion/__tests__/AccordionContent.test.tsx index 2008005acf8..84f5ef02d43 100644 --- a/packages/react-core/src/components/Accordion/__tests__/AccordionContent.test.tsx +++ b/packages/react-core/src/components/Accordion/__tests__/AccordionContent.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { AccordionContent } from '../AccordionContent'; diff --git a/packages/react-core/src/components/Accordion/__tests__/AccordionExpandedContentBody.test.tsx b/packages/react-core/src/components/Accordion/__tests__/AccordionExpandedContentBody.test.tsx index 1257a00d99c..3070148b556 100644 --- a/packages/react-core/src/components/Accordion/__tests__/AccordionExpandedContentBody.test.tsx +++ b/packages/react-core/src/components/Accordion/__tests__/AccordionExpandedContentBody.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { AccordionExpandableContentBody } from '../AccordionExpandableContentBody'; diff --git a/packages/react-core/src/components/Accordion/__tests__/AccordionItem.test.tsx b/packages/react-core/src/components/Accordion/__tests__/AccordionItem.test.tsx index ec3f94b4019..f48a5cfedbe 100644 --- a/packages/react-core/src/components/Accordion/__tests__/AccordionItem.test.tsx +++ b/packages/react-core/src/components/Accordion/__tests__/AccordionItem.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { AccordionItem } from '../AccordionItem'; import styles from '@patternfly/react-styles/css/components/Accordion/accordion'; diff --git a/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx b/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx index ca45a0b2c0d..ff59083ec4f 100644 --- a/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx +++ b/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { AccordionToggle } from '../AccordionToggle'; diff --git a/packages/react-core/src/components/Accordion/examples/AccordionBordered.tsx b/packages/react-core/src/components/Accordion/examples/AccordionBordered.tsx index 448b124eccd..7cd0a01ba40 100644 --- a/packages/react-core/src/components/Accordion/examples/AccordionBordered.tsx +++ b/packages/react-core/src/components/Accordion/examples/AccordionBordered.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Accordion, AccordionItem, diff --git a/packages/react-core/src/components/Accordion/examples/AccordionDefinitionList.tsx b/packages/react-core/src/components/Accordion/examples/AccordionDefinitionList.tsx index d91573f53ce..938877aa888 100644 --- a/packages/react-core/src/components/Accordion/examples/AccordionDefinitionList.tsx +++ b/packages/react-core/src/components/Accordion/examples/AccordionDefinitionList.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core'; export const AccordionDefinitionList: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Accordion/examples/AccordionFixedWithMultipleExpandBehavior.tsx b/packages/react-core/src/components/Accordion/examples/AccordionFixedWithMultipleExpandBehavior.tsx index e0375c1056d..b4f68eba239 100644 --- a/packages/react-core/src/components/Accordion/examples/AccordionFixedWithMultipleExpandBehavior.tsx +++ b/packages/react-core/src/components/Accordion/examples/AccordionFixedWithMultipleExpandBehavior.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core'; export const AccordionFixedWithMultipleExpandBehavior: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Accordion/examples/AccordionSingleExpandBehavior.tsx b/packages/react-core/src/components/Accordion/examples/AccordionSingleExpandBehavior.tsx index 17359cc4c0d..a39ebad4578 100644 --- a/packages/react-core/src/components/Accordion/examples/AccordionSingleExpandBehavior.tsx +++ b/packages/react-core/src/components/Accordion/examples/AccordionSingleExpandBehavior.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core'; export const AccordionSingleExpandBehavior: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Accordion/examples/AccordionToggleIconAtStart.tsx b/packages/react-core/src/components/Accordion/examples/AccordionToggleIconAtStart.tsx index c347feade96..4da46e0f1d2 100644 --- a/packages/react-core/src/components/Accordion/examples/AccordionToggleIconAtStart.tsx +++ b/packages/react-core/src/components/Accordion/examples/AccordionToggleIconAtStart.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core'; export const AccordionToggleIconAtStart: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx b/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx index 6512ebdb138..c1ed3bb8d47 100644 --- a/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx +++ b/packages/react-core/src/components/ActionList/__tests__/ActionList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { ActionList } from '../ActionList'; import styles from '@patternfly/react-styles/css/components/ActionList/action-list'; diff --git a/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx b/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx index baf4d2a4515..66a2c8fcb25 100644 --- a/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx +++ b/packages/react-core/src/components/ActionList/__tests__/ActionListGroup.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { ActionListGroup } from '../ActionListGroup'; import styles from '@patternfly/react-styles/css/components/ActionList/action-list'; diff --git a/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx b/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx index 18b1949d80a..6c14466d16c 100644 --- a/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx +++ b/packages/react-core/src/components/ActionList/__tests__/ActionListItem.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { ActionListItem } from '../ActionListItem'; import styles from '@patternfly/react-styles/css/components/ActionList/action-list'; diff --git a/packages/react-core/src/components/ActionList/examples/ActionListMultipleGroups.tsx b/packages/react-core/src/components/ActionList/examples/ActionListMultipleGroups.tsx index 1ea62325003..b9f3ecec657 100644 --- a/packages/react-core/src/components/ActionList/examples/ActionListMultipleGroups.tsx +++ b/packages/react-core/src/components/ActionList/examples/ActionListMultipleGroups.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core'; export const ActionListMultipleGroups: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ActionList/examples/ActionListSingleGroup.tsx b/packages/react-core/src/components/ActionList/examples/ActionListSingleGroup.tsx index 8b9e42d6edc..9d4ca00a6dc 100644 --- a/packages/react-core/src/components/ActionList/examples/ActionListSingleGroup.tsx +++ b/packages/react-core/src/components/ActionList/examples/ActionListSingleGroup.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { ActionList, ActionListGroup, @@ -45,7 +45,7 @@ export const ActionListSingleGroup: React.FunctionComponent = () => { ); return ( - + @@ -95,6 +95,6 @@ export const ActionListSingleGroup: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/ActionList/examples/ActionListWithCancelButton.tsx b/packages/react-core/src/components/ActionList/examples/ActionListWithCancelButton.tsx index e8cc63d8763..cbcec892798 100644 --- a/packages/react-core/src/components/ActionList/examples/ActionListWithCancelButton.tsx +++ b/packages/react-core/src/components/ActionList/examples/ActionListWithCancelButton.tsx @@ -1,8 +1,8 @@ -import React from 'react'; +import { Fragment } from 'react'; import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core'; export const ActionListWithCancelButton: React.FunctionComponent = () => ( - + In modals, forms, data lists @@ -41,5 +41,5 @@ export const ActionListWithCancelButton: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/ActionList/examples/ActionListWithIcons.tsx b/packages/react-core/src/components/ActionList/examples/ActionListWithIcons.tsx index e2de3ea44b7..362a7e5b680 100644 --- a/packages/react-core/src/components/ActionList/examples/ActionListWithIcons.tsx +++ b/packages/react-core/src/components/ActionList/examples/ActionListWithIcons.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon'; diff --git a/packages/react-core/src/components/Alert/__tests__/AlertActionCloseButton.test.tsx b/packages/react-core/src/components/Alert/__tests__/AlertActionCloseButton.test.tsx index 0116fe2ac09..d0f553730ac 100644 --- a/packages/react-core/src/components/Alert/__tests__/AlertActionCloseButton.test.tsx +++ b/packages/react-core/src/components/Alert/__tests__/AlertActionCloseButton.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx b/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx index 3e22ee03c5e..b70ae2d4aea 100644 --- a/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx +++ b/packages/react-core/src/components/Alert/__tests__/AlertActionLink.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { AlertActionLink } from '../AlertActionLink'; diff --git a/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx b/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx index 5bbd710608a..fb3bad4ad4f 100644 --- a/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx +++ b/packages/react-core/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render } from '@testing-library/react'; import { AlertActionCloseButton } from '../../AlertActionCloseButton'; diff --git a/packages/react-core/src/components/Alert/examples/Alert.md b/packages/react-core/src/components/Alert/examples/Alert.md index da300a169cc..2ec0cc584bb 100644 --- a/packages/react-core/src/components/Alert/examples/Alert.md +++ b/packages/react-core/src/components/Alert/examples/Alert.md @@ -29,7 +29,6 @@ PatternFly supports several alert variants for different scenarios. Each variant | Danger | Use to indicate that a critical or blocking error has occurred | ```ts -import React from 'react'; import { Alert } from '@patternfly/react-core'; @@ -56,7 +55,6 @@ PatternFly supports several properties and variations that can be used to add ex - If there is a description passed via `children` prop, then the `component` prop should be a heading element. Headings should be ordered by their level and heading levels should not be skipped. For example, a heading of an `h2` level should not be followed directly by an `h4`. ```ts -import React from 'react'; import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core'; @@ -104,7 +102,6 @@ import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/reac Use the `timeout` property to automatically dismiss an alert after a period of time. If set to `true`, the `timeout` will be 8000 milliseconds. Provide a specific value to dismiss the alert after a different number of milliseconds. ```ts -import React from 'react'; import { Alert, AlertActionLink, AlertGroup, Button } from '@patternfly/react-core'; const AlertTimeout: React.FunctionComponent = () => { @@ -163,7 +160,6 @@ It is not recommended to use an expandable alert with a `timeout` in a [toast al See the [toast alert considerations](/components/alert/accessibility#toast-alerts) section of the alert accessibility documentation to understand the accessibility risks associated with using toast alerts. ```ts -import React from 'react'; import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core'; @@ -204,7 +200,6 @@ import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/reac Use the `truncateTitle` property to shorten a long `title`. Set `truncateTitle` equal to a number (passed in as `{n}`) to reduce the number of lines of text in the alert's `title`. Users may hover over or tab to a truncated `title` to see the full message in a tooltip. ```ts -import React from 'react'; import { Alert } from '@patternfly/react-core'; @@ -237,7 +232,6 @@ import { Alert } from '@patternfly/react-core'; Use the `customIcon` property to replace a default alert icon with a custom icon. ```ts -import React from 'react'; import { Alert } from '@patternfly/react-core'; import UsersIcon from '@patternfly/react-icons/dist/esm/icons/users-icon'; import BoxIcon from '@patternfly/react-icons/dist/esm/icons/box-icon'; @@ -259,7 +253,6 @@ import LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon'; Use inline alerts to display an alert inline with content. All alert variants may use the `isInline` property to position alerts in content-heavy areas, such as within forms, wizards, or drawers. ```ts -import React from 'react'; import { Alert } from '@patternfly/react-core'; @@ -275,7 +268,6 @@ import { Alert } from '@patternfly/react-core'; All general alert variations can use the `isInline` property to apply inline styling. ```ts -import React from 'react'; import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core'; @@ -340,7 +331,6 @@ import { Alert } from '@patternfly/react-core'; It is not recommended to use a plain inline alert with `actionClose` nor `actionLinks` because these alerts are non-dismissible and should persist until the error or action related to the alert is resolved. ```ts -import React from 'react'; import { Alert } from '@patternfly/react-core';

    Success alert description. This should tell the user more information about the alert.

    @@ -354,7 +344,6 @@ Live region alerts allow you to expose dynamic content changes in a way that can By default, `isLiveRegion`alerts are static. ```ts -import React from 'react'; import { Alert, AlertActionCloseButton } from '@patternfly/react-core'; diff --git a/packages/react-core/src/components/Alert/examples/AlertAsyncLiveRegion.tsx b/packages/react-core/src/components/Alert/examples/AlertAsyncLiveRegion.tsx index d4b7d34c32f..d80bdaa8c7d 100644 --- a/packages/react-core/src/components/Alert/examples/AlertAsyncLiveRegion.tsx +++ b/packages/react-core/src/components/Alert/examples/AlertAsyncLiveRegion.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Alert, AlertGroup, AlertVariant, ToggleGroup, ToggleGroupItem } from '@patternfly/react-core'; interface AlertInfo { @@ -36,7 +36,7 @@ export const AsyncLiveRegionAlert: React.FunctionComponent = () => { }, [isActive, alerts]); return ( - + { ))} - + ); }; diff --git a/packages/react-core/src/components/Alert/examples/AlertDynamicLiveRegion.tsx b/packages/react-core/src/components/Alert/examples/AlertDynamicLiveRegion.tsx index 4a4bcfb74c8..9d9c7536638 100644 --- a/packages/react-core/src/components/Alert/examples/AlertDynamicLiveRegion.tsx +++ b/packages/react-core/src/components/Alert/examples/AlertDynamicLiveRegion.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Alert, AlertGroup, AlertVariant, InputGroup } from '@patternfly/react-core'; import buttonStyles from '@patternfly/react-styles/css/components/Button/button'; @@ -40,7 +40,7 @@ export const DynamicLiveRegionAlert: React.FunctionComponent = () => { }; return ( - + ; diff --git a/packages/react-core/src/components/Button/examples/ButtonCallToAction.tsx b/packages/react-core/src/components/Button/examples/ButtonCallToAction.tsx index 3c3887a478e..c46056cbafc 100644 --- a/packages/react-core/src/components/Button/examples/ButtonCallToAction.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonCallToAction.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon'; diff --git a/packages/react-core/src/components/Button/examples/ButtonCustomComponent.tsx b/packages/react-core/src/components/Button/examples/ButtonCustomComponent.tsx index b99e659df41..c7b5fa9ebb9 100644 --- a/packages/react-core/src/components/Button/examples/ButtonCustomComponent.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonCustomComponent.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button } from '@patternfly/react-core'; export const ButtonCustomComponent: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Button/examples/ButtonDisabled.tsx b/packages/react-core/src/components/Button/examples/ButtonDisabled.tsx index e04c6158958..3483b7074d4 100644 --- a/packages/react-core/src/components/Button/examples/ButtonDisabled.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonDisabled.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; diff --git a/packages/react-core/src/components/Button/examples/ButtonInlineSpanLink.tsx b/packages/react-core/src/components/Button/examples/ButtonInlineSpanLink.tsx index 131607eb0c8..cd0a38d490d 100644 --- a/packages/react-core/src/components/Button/examples/ButtonInlineSpanLink.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonInlineSpanLink.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, KeyTypes } from '@patternfly/react-core'; const handleKeydown = (event: React.KeyboardEvent) => { @@ -13,7 +13,7 @@ const handleKeydown = (event: React.KeyboardEvent) => { }; export const ButtonInlineSpanLink: React.FunctionComponent = () => ( - +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pressing the Enter or Space keys on the inline link as span above demonstrates this by triggering an alert.

    -
    +
    ); diff --git a/packages/react-core/src/components/Button/examples/ButtonLinks.tsx b/packages/react-core/src/components/Button/examples/ButtonLinks.tsx index 5a6ec5a1ead..1bd930e6b61 100644 --- a/packages/react-core/src/components/Button/examples/ButtonLinks.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonLinks.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; export const ButtonLinks: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Button/examples/ButtonPlainHasNoPadding.tsx b/packages/react-core/src/components/Button/examples/ButtonPlainHasNoPadding.tsx index 4d46c396d14..c806c367e7c 100644 --- a/packages/react-core/src/components/Button/examples/ButtonPlainHasNoPadding.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonPlainHasNoPadding.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button } from '@patternfly/react-core'; import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; diff --git a/packages/react-core/src/components/Button/examples/ButtonProgress.tsx b/packages/react-core/src/components/Button/examples/ButtonProgress.tsx index 39fb0ca3f47..44b07f44e3b 100644 --- a/packages/react-core/src/components/Button/examples/ButtonProgress.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonProgress.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon'; diff --git a/packages/react-core/src/components/Button/examples/ButtonSmall.tsx b/packages/react-core/src/components/Button/examples/ButtonSmall.tsx index 2fea0b9be89..e031f4ffaed 100644 --- a/packages/react-core/src/components/Button/examples/ButtonSmall.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonSmall.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; export const ButtonSmall: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Button/examples/ButtonStateful.tsx b/packages/react-core/src/components/Button/examples/ButtonStateful.tsx index cb26da9b8f1..b6e3094f883 100644 --- a/packages/react-core/src/components/Button/examples/ButtonStateful.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonStateful.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; diff --git a/packages/react-core/src/components/Button/examples/ButtonTypes.tsx b/packages/react-core/src/components/Button/examples/ButtonTypes.tsx index fb2fd288835..c07934d7918 100644 --- a/packages/react-core/src/components/Button/examples/ButtonTypes.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonTypes.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; export const ButtonTypes: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Button/examples/ButtonVariations.tsx b/packages/react-core/src/components/Button/examples/ButtonVariations.tsx index 5f2e69de722..e765e4d302e 100644 --- a/packages/react-core/src/components/Button/examples/ButtonVariations.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonVariations.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, Flex } from '@patternfly/react-core'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; diff --git a/packages/react-core/src/components/Button/examples/ButtonWithCount.tsx b/packages/react-core/src/components/Button/examples/ButtonWithCount.tsx index 644ef31dfd2..e56340ffb5f 100644 --- a/packages/react-core/src/components/Button/examples/ButtonWithCount.tsx +++ b/packages/react-core/src/components/Button/examples/ButtonWithCount.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { BadgeCountObject, Button, Flex } from '@patternfly/react-core'; export const ButtonWithCount: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/CalendarMonth/__tests__/CalendarMonth.test.tsx b/packages/react-core/src/components/CalendarMonth/__tests__/CalendarMonth.test.tsx index f94e4af16a0..28afa2b5c62 100644 --- a/packages/react-core/src/components/CalendarMonth/__tests__/CalendarMonth.test.tsx +++ b/packages/react-core/src/components/CalendarMonth/__tests__/CalendarMonth.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { CalendarMonth } from '../CalendarMonth'; diff --git a/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthDateRange.tsx b/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthDateRange.tsx index 1bdfd79ea46..a2654d98e11 100644 --- a/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthDateRange.tsx +++ b/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthDateRange.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { CalendarMonth, Title, CalendarMonthInlineProps } from '@patternfly/react-core'; export const CalendarMonthDateRange: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx b/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx index cde7097ffa5..0e9d49a1065 100644 --- a/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx +++ b/packages/react-core/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { CalendarMonth, Title, CalendarMonthInlineProps } from '@patternfly/react-core'; export const CalendarMonthSelectableDate: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Card/__tests__/CardExpandableContent.test.tsx b/packages/react-core/src/components/Card/__tests__/CardExpandableContent.test.tsx index 72316947730..77b27e573a0 100644 --- a/packages/react-core/src/components/Card/__tests__/CardExpandableContent.test.tsx +++ b/packages/react-core/src/components/Card/__tests__/CardExpandableContent.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { CardContext } from '../Card'; import { CardExpandableContent } from '../CardExpandableContent'; import { render } from '@testing-library/react'; diff --git a/packages/react-core/src/components/Card/__tests__/CardHeader.test.tsx b/packages/react-core/src/components/Card/__tests__/CardHeader.test.tsx index 996f024b0ec..7c7d2643629 100644 --- a/packages/react-core/src/components/Card/__tests__/CardHeader.test.tsx +++ b/packages/react-core/src/components/Card/__tests__/CardHeader.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { CardHeader } from '../CardHeader'; diff --git a/packages/react-core/src/components/Card/__tests__/CardHeaderMain.test.tsx b/packages/react-core/src/components/Card/__tests__/CardHeaderMain.test.tsx index e72ed722d70..dd393d0d845 100644 --- a/packages/react-core/src/components/Card/__tests__/CardHeaderMain.test.tsx +++ b/packages/react-core/src/components/Card/__tests__/CardHeaderMain.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { CardHeaderMain } from '../CardHeaderMain'; diff --git a/packages/react-core/src/components/Card/__tests__/CardSelectableActions.test.tsx b/packages/react-core/src/components/Card/__tests__/CardSelectableActions.test.tsx index 7d591ac5ddf..3f9798629cf 100644 --- a/packages/react-core/src/components/Card/__tests__/CardSelectableActions.test.tsx +++ b/packages/react-core/src/components/Card/__tests__/CardSelectableActions.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { CardSelectableActions } from '../CardSelectableActions'; diff --git a/packages/react-core/src/components/Card/__tests__/CardTitle.test.tsx b/packages/react-core/src/components/Card/__tests__/CardTitle.test.tsx index 0aa55985b51..b198310d73f 100644 --- a/packages/react-core/src/components/Card/__tests__/CardTitle.test.tsx +++ b/packages/react-core/src/components/Card/__tests__/CardTitle.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { CardTitle } from '../CardTitle'; diff --git a/packages/react-core/src/components/Card/examples/CardBasic.tsx b/packages/react-core/src/components/Card/examples/CardBasic.tsx index f56f572ed66..142d7e9bbb2 100644 --- a/packages/react-core/src/components/Card/examples/CardBasic.tsx +++ b/packages/react-core/src/components/Card/examples/CardBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody, CardFooter } from '@patternfly/react-core'; export const CardBasic: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardClickable.tsx b/packages/react-core/src/components/Card/examples/CardClickable.tsx index 3c0ef1c1bfd..654d8736202 100644 --- a/packages/react-core/src/components/Card/examples/CardClickable.tsx +++ b/packages/react-core/src/components/Card/examples/CardClickable.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, CardTitle, CardBody, Checkbox, Gallery } from '@patternfly/react-core'; export const CardClickable: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Card/examples/CardClickableSelectable.tsx b/packages/react-core/src/components/Card/examples/CardClickableSelectable.tsx index c72516ff21f..0e2c57537ae 100644 --- a/packages/react-core/src/components/Card/examples/CardClickableSelectable.tsx +++ b/packages/react-core/src/components/Card/examples/CardClickableSelectable.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, CardTitle, CardBody, Button, Checkbox, Gallery } from '@patternfly/react-core'; export const CardClickable: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Card/examples/CardExpandable.tsx b/packages/react-core/src/components/Card/examples/CardExpandable.tsx index 7ddbd946ed3..39378dfe660 100644 --- a/packages/react-core/src/components/Card/examples/CardExpandable.tsx +++ b/packages/react-core/src/components/Card/examples/CardExpandable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Card, CardHeader, @@ -90,7 +90,7 @@ export const CardExpandable: React.FunctionComponent = () => { ); return ( - +
    { Footer - + ); }; diff --git a/packages/react-core/src/components/Card/examples/CardExpandableWithIcon.tsx b/packages/react-core/src/components/Card/examples/CardExpandableWithIcon.tsx index 7dc038535c2..fb3a227622a 100644 --- a/packages/react-core/src/components/Card/examples/CardExpandableWithIcon.tsx +++ b/packages/react-core/src/components/Card/examples/CardExpandableWithIcon.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, diff --git a/packages/react-core/src/components/Card/examples/CardHeaderInCardHead.tsx b/packages/react-core/src/components/Card/examples/CardHeaderInCardHead.tsx index ac2e7f4c062..59ce8254bcc 100644 --- a/packages/react-core/src/components/Card/examples/CardHeaderInCardHead.tsx +++ b/packages/react-core/src/components/Card/examples/CardHeaderInCardHead.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, diff --git a/packages/react-core/src/components/Card/examples/CardOnlyActionsInCardHead.tsx b/packages/react-core/src/components/Card/examples/CardOnlyActionsInCardHead.tsx index 3e97f2561e4..e955f1c5c18 100644 --- a/packages/react-core/src/components/Card/examples/CardOnlyActionsInCardHead.tsx +++ b/packages/react-core/src/components/Card/examples/CardOnlyActionsInCardHead.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox, Card, diff --git a/packages/react-core/src/components/Card/examples/CardSecondary.tsx b/packages/react-core/src/components/Card/examples/CardSecondary.tsx index 7efa4fd9c2e..451bd36ce56 100644 --- a/packages/react-core/src/components/Card/examples/CardSecondary.tsx +++ b/packages/react-core/src/components/Card/examples/CardSecondary.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody, CardFooter } from '@patternfly/react-core'; export const CardSecondary: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardSelectable.tsx b/packages/react-core/src/components/Card/examples/CardSelectable.tsx index 83aac5c128f..26c3aca9393 100644 --- a/packages/react-core/src/components/Card/examples/CardSelectable.tsx +++ b/packages/react-core/src/components/Card/examples/CardSelectable.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, CardTitle, CardBody, Checkbox, Gallery } from '@patternfly/react-core'; export const SelectableCard: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Card/examples/CardSingleSelectable.tsx b/packages/react-core/src/components/Card/examples/CardSingleSelectable.tsx index 63db53153e8..f6073dd47de 100644 --- a/packages/react-core/src/components/Card/examples/CardSingleSelectable.tsx +++ b/packages/react-core/src/components/Card/examples/CardSingleSelectable.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, CardTitle, CardBody, Gallery } from '@patternfly/react-core'; export const SingleSelectableCard: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Card/examples/CardTile.tsx b/packages/react-core/src/components/Card/examples/CardTile.tsx index 9fdbadaacea..24f0f41c0ec 100644 --- a/packages/react-core/src/components/Card/examples/CardTile.tsx +++ b/packages/react-core/src/components/Card/examples/CardTile.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, CardBody, Gallery, Flex } from '@patternfly/react-core'; import PlusIcon from '@patternfly/react-icons/dist/esm/icons/plus-icon'; diff --git a/packages/react-core/src/components/Card/examples/CardTileMulti.tsx b/packages/react-core/src/components/Card/examples/CardTileMulti.tsx index 87a453ad1d5..310e037dd1e 100644 --- a/packages/react-core/src/components/Card/examples/CardTileMulti.tsx +++ b/packages/react-core/src/components/Card/examples/CardTileMulti.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardHeader, CardBody, Gallery, Flex } from '@patternfly/react-core'; import PlusIcon from '@patternfly/react-icons/dist/esm/icons/plus-icon'; diff --git a/packages/react-core/src/components/Card/examples/CardWithBodySectionFills.tsx b/packages/react-core/src/components/Card/examples/CardWithBodySectionFills.tsx index 646df9fd57f..2706d01ef60 100644 --- a/packages/react-core/src/components/Card/examples/CardWithBodySectionFills.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithBodySectionFills.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody, CardFooter } from '@patternfly/react-core'; export const CardWithBodySectionFills: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardWithDividers.tsx b/packages/react-core/src/components/Card/examples/CardWithDividers.tsx index 4d15e87dd44..376196a6c90 100644 --- a/packages/react-core/src/components/Card/examples/CardWithDividers.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithDividers.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody, CardFooter, Divider } from '@patternfly/react-core'; export const CardWithDividers: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardWithHeadingElement.tsx b/packages/react-core/src/components/Card/examples/CardWithHeadingElement.tsx index ef4154376e3..2ff37314632 100644 --- a/packages/react-core/src/components/Card/examples/CardWithHeadingElement.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithHeadingElement.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody, CardFooter } from '@patternfly/react-core'; export const CardWithHeadingElement: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardWithImageAndActions.tsx b/packages/react-core/src/components/Card/examples/CardWithImageAndActions.tsx index 66a265be827..de361622506 100644 --- a/packages/react-core/src/components/Card/examples/CardWithImageAndActions.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithImageAndActions.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Brand, Card, diff --git a/packages/react-core/src/components/Card/examples/CardWithModifiers.tsx b/packages/react-core/src/components/Card/examples/CardWithModifiers.tsx index 7332ace1036..9b18185f07d 100644 --- a/packages/react-core/src/components/Card/examples/CardWithModifiers.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithModifiers.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Card, CardTitle, CardBody, CardFooter, Checkbox } from '@patternfly/react-core'; export const CardWithModifiers: React.FunctionComponent = () => { @@ -6,7 +6,7 @@ export const CardWithModifiers: React.FunctionComponent = () => { const [modifiers, setModifiers] = React.useState({}); return ( - +
    {mods.map((mod) => ( { Footer
    -
    + ); }; diff --git a/packages/react-core/src/components/Card/examples/CardWithMultipleBodySections.tsx b/packages/react-core/src/components/Card/examples/CardWithMultipleBodySections.tsx index 96781013019..3986a2aeb26 100644 --- a/packages/react-core/src/components/Card/examples/CardWithMultipleBodySections.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithMultipleBodySections.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody, CardFooter } from '@patternfly/react-core'; export const CardWithMultipleBodySections: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardWithNoFooter.tsx b/packages/react-core/src/components/Card/examples/CardWithNoFooter.tsx index 08fb95bc5fe..f5ee1a6634b 100644 --- a/packages/react-core/src/components/Card/examples/CardWithNoFooter.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithNoFooter.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardTitle, CardBody } from '@patternfly/react-core'; export const CardWithNoFooter: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardWithNoHeader.tsx b/packages/react-core/src/components/Card/examples/CardWithNoHeader.tsx index d817259f10d..fa99eb0902f 100644 --- a/packages/react-core/src/components/Card/examples/CardWithNoHeader.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithNoHeader.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardBody, CardFooter } from '@patternfly/react-core'; export const CardWithNoHeader: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Card/examples/CardWithOnlyBodySection.tsx b/packages/react-core/src/components/Card/examples/CardWithOnlyBodySection.tsx index 85a412e1c09..622cf9d24b7 100644 --- a/packages/react-core/src/components/Card/examples/CardWithOnlyBodySection.tsx +++ b/packages/react-core/src/components/Card/examples/CardWithOnlyBodySection.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Card, CardBody } from '@patternfly/react-core'; export const CardWithOnlyBodySection: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Checkbox/__tests__/Checkbox.test.tsx b/packages/react-core/src/components/Checkbox/__tests__/Checkbox.test.tsx index f2136c936e3..cdd5f3ab289 100644 --- a/packages/react-core/src/components/Checkbox/__tests__/Checkbox.test.tsx +++ b/packages/react-core/src/components/Checkbox/__tests__/Checkbox.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxControlled.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxControlled.tsx index 3881eaf0700..d91da501c2a 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxControlled.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxControlled.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxControlled: React.FunctionComponent = () => { @@ -42,7 +42,7 @@ export const CheckboxControlled: React.FunctionComponent = () => { }, [isChecked2, isChecked3]); return ( - + { id="controlled-check-4" name="check4" /> - + ); }; diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxDisabled.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxDisabled.tsx index 79e388cfc27..55c22ac1f33 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxDisabled.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxDisabled.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxDisabled: React.FunctionComponent = () => ( - + - + ); diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxLabelWraps.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxLabelWraps.tsx index 256d9de82b7..0560cbe48f8 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxLabelWraps.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxLabelWraps.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxLabelWraps: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxRequired.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxRequired.tsx index 48cf9afd72a..44c7cd6f0f0 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxRequired.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxRequired.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxRequired: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxReversed.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxReversed.tsx index e6d16ed5c85..6f72e13c6fe 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxReversed.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxReversed.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxReversed: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxStandaloneInput.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxStandaloneInput.tsx index c594162b8a4..7aaef07f619 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxStandaloneInput.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxStandaloneInput.tsx @@ -1,6 +1,5 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxStandaloneInput: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxUncontrolled.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxUncontrolled.tsx index fbc92cd5623..618edc5d80a 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxUncontrolled.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxUncontrolled.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxUncontrolled: React.FunctionComponent = () => ( - + - + ); diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxWithBody.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxWithBody.tsx index c660431cae7..680103124a8 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxWithBody.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxWithBody.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxWithBody: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescription.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescription.tsx index 2b7b7517357..6100ee03638 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescription.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescription.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxWithDescription: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescriptionBody.tsx b/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescriptionBody.tsx index faa13944140..47a276c7d62 100644 --- a/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescriptionBody.tsx +++ b/packages/react-core/src/components/Checkbox/examples/CheckboxWithDescriptionBody.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Checkbox } from '@patternfly/react-core'; export const CheckboxWithDescriptionBody: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopy.md b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopy.md index 4b2fef0638c..0f46fe93fef 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopy.md +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopy.md @@ -6,6 +6,7 @@ propComponents: ['ClipboardCopy', 'ClipboardCopyButton'] ouia: true --- +import { useEffect } from 'react'; import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon'; ## Examples diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx index b1a7d29316e..39dd099f746 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy } from '@patternfly/react-core'; export const ClipboardCopyBasic: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx index c81d494cb5d..7d3555589c3 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core'; export const ClipboardCopyExpanded: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx index 8eb3c1e6f58..88dc48ee5cf 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core'; const text = [ diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx index bdb80f67c1e..66ddba33b16 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy } from '@patternfly/react-core'; export const ClipboardCopyInlineCompact: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx index fa1ff0423ae..a8877535fba 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy } from '@patternfly/react-core'; export const ClipboardCopyInlineCompactCode: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx index 2adab4eafd5..a6e39fb042f 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx @@ -1,8 +1,8 @@ -import React from 'react'; +import { Fragment } from 'react'; import { ClipboardCopy } from '@patternfly/react-core'; export const ClipboardCopyInlineCompactInSentence: React.FunctionComponent = () => ( - + Basic
    Lorem ipsum{' '} @@ -32,5 +32,5 @@ export const ClipboardCopyInlineCompactInSentence: React.FunctionComponent = ()
    }{' '} Mauris luctus, libero nec dapibus ultricies, urna purus pretium mauris, ullamcorper pharetra lacus nibh vitae enim. - + ); diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx index 9714cfc9cf4..1e5fad49a2d 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { useState } from 'react'; import { ClipboardCopy, ClipboardCopyAction, Button, Tooltip } from '@patternfly/react-core'; import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon'; export const ClipboardCopyInlineCompactWithAdditionalAction: React.FunctionComponent = () => { - const [isRunning, setisRunning] = React.useState(false); + const [isRunning, setisRunning] = useState(false); const runText: string = 'Run in web terminal'; const doneRunText: string = 'Running in web terminal'; return ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx index 92a85a4c8f9..351537d8c90 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core'; export const ClipboardCopyJSONObject: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx index 1d133b97364..b2f9d4dd1ef 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy } from '@patternfly/react-core'; export const ClipboardCopyReadOnly: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx index 985919999dd..082f46cbf0a 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core'; export const ClipboardCopyReadOnlyExpanded: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx index b7963fbb3c9..ac62d4776f8 100644 --- a/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx +++ b/packages/react-core/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core'; export const ClipboardCopyReadOnlyExpandedByDefault: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/CodeBlock/__tests__/CodeBlock.test.tsx b/packages/react-core/src/components/CodeBlock/__tests__/CodeBlock.test.tsx index 9125aed8f4e..20ed69747f4 100644 --- a/packages/react-core/src/components/CodeBlock/__tests__/CodeBlock.test.tsx +++ b/packages/react-core/src/components/CodeBlock/__tests__/CodeBlock.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { CodeBlock } from '../CodeBlock'; import styles from '@patternfly/react-styles/css/components/CodeBlock/code-block'; diff --git a/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockAction.test.tsx b/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockAction.test.tsx index b51934acf9e..01ee459ef71 100644 --- a/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockAction.test.tsx +++ b/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockAction.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { CodeBlockAction } from '../CodeBlockAction'; import styles from '@patternfly/react-styles/css/components/CodeBlock/code-block'; diff --git a/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockCode.test.tsx b/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockCode.test.tsx index fce3584eb35..91a9573271c 100644 --- a/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockCode.test.tsx +++ b/packages/react-core/src/components/CodeBlock/__tests__/CodeBlockCode.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { CodeBlockCode } from '../CodeBlockCode'; import styles from '@patternfly/react-styles/css/components/CodeBlock/code-block'; diff --git a/packages/react-core/src/components/CodeBlock/examples/CodeBlock.md b/packages/react-core/src/components/CodeBlock/examples/CodeBlock.md index e14359a210e..da8e7bb5b1c 100644 --- a/packages/react-core/src/components/CodeBlock/examples/CodeBlock.md +++ b/packages/react-core/src/components/CodeBlock/examples/CodeBlock.md @@ -5,6 +5,7 @@ cssPrefix: pf-v6-c-code-block propComponents: ['CodeBlock', 'CodeBlockAction', 'CodeBlockCode'] --- +import { Fragment, useState } from 'react'; import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon'; import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon'; diff --git a/packages/react-core/src/components/CodeBlock/examples/CodeBlockBasic.tsx b/packages/react-core/src/components/CodeBlock/examples/CodeBlockBasic.tsx index 294cff82969..eb077a1d463 100644 --- a/packages/react-core/src/components/CodeBlock/examples/CodeBlockBasic.tsx +++ b/packages/react-core/src/components/CodeBlock/examples/CodeBlockBasic.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment, useState } from 'react'; import { CodeBlock, CodeBlockAction, @@ -10,8 +10,8 @@ import { import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon'; export const BasicCodeBlock: React.FunctionComponent = () => { - const [copied, setCopied] = React.useState(false); - const [isRunning, setisRunning] = React.useState(false); + const [copied, setCopied] = useState(false); + const [isRunning, setisRunning] = useState(false); const runText: string = 'Run in web terminal'; const doneRunText: string = 'Running in web terminal'; @@ -33,7 +33,7 @@ connectionConfig: url: https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs`; const actions = ( - + - + ); return ( diff --git a/packages/react-core/src/components/CodeBlock/examples/CodeBlockExpandable.tsx b/packages/react-core/src/components/CodeBlock/examples/CodeBlockExpandable.tsx index d4c9851751a..8e7fde3b03d 100644 --- a/packages/react-core/src/components/CodeBlock/examples/CodeBlockExpandable.tsx +++ b/packages/react-core/src/components/CodeBlock/examples/CodeBlockExpandable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment, useState } from 'react'; import { CodeBlock, CodeBlockAction, @@ -12,9 +12,9 @@ import { import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon'; export const ExpandableCodeBlock: React.FunctionComponent = () => { - const [isExpanded, setIsExpanded] = React.useState(false); - const [copied, setCopied] = React.useState(false); - const [isRunning, setisRunning] = React.useState(false); + const [isExpanded, setIsExpanded] = useState(false); + const [copied, setCopied] = useState(false); + const [isRunning, setisRunning] = useState(false); const runText: string = 'Run in web terminal'; const doneRunText: string = 'Running in web terminal'; @@ -48,7 +48,7 @@ connectionConfig: url: https://raw.githubusercontent.com/Azure-Samples/helm-charts/master/docs`; const actions = ( - + - + ); return ( diff --git a/packages/react-core/src/components/Content/examples/ContentBody.tsx b/packages/react-core/src/components/Content/examples/ContentBody.tsx index b94e9e2c524..b239985220e 100644 --- a/packages/react-core/src/components/Content/examples/ContentBody.tsx +++ b/packages/react-core/src/components/Content/examples/ContentBody.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentBody: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx b/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx index 7742ca50f94..0199d09df33 100644 --- a/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx +++ b/packages/react-core/src/components/Content/examples/ContentDescriptionList.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentDescriptionList: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentEditorial.tsx b/packages/react-core/src/components/Content/examples/ContentEditorial.tsx index 14c4ff825f9..c1690072ca9 100644 --- a/packages/react-core/src/components/Content/examples/ContentEditorial.tsx +++ b/packages/react-core/src/components/Content/examples/ContentEditorial.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentEditorial: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentHeadings.tsx b/packages/react-core/src/components/Content/examples/ContentHeadings.tsx index f0a6f4b3c0e..4cde33a667e 100644 --- a/packages/react-core/src/components/Content/examples/ContentHeadings.tsx +++ b/packages/react-core/src/components/Content/examples/ContentHeadings.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentHeadings: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx b/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx index 24dd49c2c5d..bdb4fd73eec 100644 --- a/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx +++ b/packages/react-core/src/components/Content/examples/ContentOrderedList.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentOrderedList: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentPlainList.tsx b/packages/react-core/src/components/Content/examples/ContentPlainList.tsx index e49e4512868..13433226326 100644 --- a/packages/react-core/src/components/Content/examples/ContentPlainList.tsx +++ b/packages/react-core/src/components/Content/examples/ContentPlainList.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentPlainList: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx b/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx index 356edfe1b0f..d3eade8d88e 100644 --- a/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx +++ b/packages/react-core/src/components/Content/examples/ContentUnorderedList.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentUnorderedList: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentVisited.tsx b/packages/react-core/src/components/Content/examples/ContentVisited.tsx index 56fe72aa1b1..82ac85ee812 100644 --- a/packages/react-core/src/components/Content/examples/ContentVisited.tsx +++ b/packages/react-core/src/components/Content/examples/ContentVisited.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentVisited: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Content/examples/ContentWrapper.tsx b/packages/react-core/src/components/Content/examples/ContentWrapper.tsx index e8ed09652c2..8e4be41b78a 100644 --- a/packages/react-core/src/components/Content/examples/ContentWrapper.tsx +++ b/packages/react-core/src/components/Content/examples/ContentWrapper.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, ContentVariants } from '@patternfly/react-core'; export const ContentWrapper: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DataList/__tests__/DataList.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataList.test.tsx index f28b8cd6f2c..bdb5b8263f4 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataList.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataList.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; @@ -40,7 +38,7 @@ test(`Renders ${styles.modifiers.compact} when isCompact = true`, () => { }); ['nowrap', 'truncate', 'breakWord'].forEach((wrap) => { - test(`Renders with class ${styles.modifiers[wrap]} when wrapModifier = ${wrap} is pased`, () => { + test(`Renders with class ${styles.modifiers[wrap]} when wrapModifier = ${wrap} is passed`, () => { render(); expect(screen.getByLabelText('list')).toHaveClass(styles.modifiers[wrap]); }); @@ -57,7 +55,7 @@ const gridBreakpointClasses = { }; ['none', 'always', 'sm', 'md', 'lg', 'xl', '2xl'].forEach((oneBreakpoint) => { - test(`Has breakpoint - ${oneBreakpoint} when gridBreakpoint is pased`, () => { + test(`Has breakpoint - ${oneBreakpoint} when gridBreakpoint is passed`, () => { render(); expect(screen.getByLabelText('list')).toHaveClass(gridBreakpointClasses[oneBreakpoint]); }); diff --git a/packages/react-core/src/components/DataList/__tests__/DataListAction.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListAction.test.tsx index 9171561fe3c..c6dbaf99c9c 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListAction.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListAction.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; diff --git a/packages/react-core/src/components/DataList/__tests__/DataListCell.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListCell.test.tsx index 6e55ada2648..36a55cbc3e6 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListCell.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListCell.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DataListCell } from '../DataListCell'; diff --git a/packages/react-core/src/components/DataList/__tests__/DataListContent.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListContent.test.tsx index 912bb48f0de..63506fb6184 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListContent.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListContent.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DataListContent } from '../DataListContent'; diff --git a/packages/react-core/src/components/DataList/__tests__/DataListItem.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListItem.test.tsx index 54f358c8e83..19b0fb2d5da 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListItem.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListItem.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DataListItem } from '../DataListItem'; diff --git a/packages/react-core/src/components/DataList/__tests__/DataListItemCells.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListItemCells.test.tsx index e8419f2b361..c8d756b1985 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListItemCells.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListItemCells.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DataListItemCells } from '../DataListItemCells'; diff --git a/packages/react-core/src/components/DataList/__tests__/DataListItemRow.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListItemRow.test.tsx index 74ec2e6fafc..e86ec190661 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListItemRow.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListItemRow.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DataListItemRow } from '../DataListItemRow'; @@ -33,7 +32,7 @@ test(`Renders with spread props`, () => { }); ['nowrap', 'truncate', 'breakWord'].forEach((wrap) => { - test(`Renders with class ${styles.modifiers[wrap]} when wrapModifier = ${wrap} is pased`, () => { + test(`Renders with class ${styles.modifiers[wrap]} when wrapModifier = ${wrap} is passed`, () => { render( test diff --git a/packages/react-core/src/components/DataList/__tests__/DataListToggle.test.tsx b/packages/react-core/src/components/DataList/__tests__/DataListToggle.test.tsx index 8f7f8b4cd9b..af677b320b3 100644 --- a/packages/react-core/src/components/DataList/__tests__/DataListToggle.test.tsx +++ b/packages/react-core/src/components/DataList/__tests__/DataListToggle.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DataListToggle } from '../DataListToggle'; diff --git a/packages/react-core/src/components/DataList/examples/DataListActions.tsx b/packages/react-core/src/components/DataList/examples/DataListActions.tsx index 2606386482e..80c15bb6ac1 100644 --- a/packages/react-core/src/components/DataList/examples/DataListActions.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListActions.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, DataList, @@ -28,7 +28,7 @@ export const DataListActions: React.FunctionComponent = () => { }; return ( - + {!isDeleted && ( @@ -111,6 +111,6 @@ export const DataListActions: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/DataList/examples/DataListBasic.tsx b/packages/react-core/src/components/DataList/examples/DataListBasic.tsx index 984511aa480..e4af45501e9 100644 --- a/packages/react-core/src/components/DataList/examples/DataListBasic.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DataList, DataListItem, DataListItemRow, DataListItemCells, DataListCell } from '@patternfly/react-core'; export const DataListBasic: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DataList/examples/DataListCheckboxes.tsx b/packages/react-core/src/components/DataList/examples/DataListCheckboxes.tsx index 54cf46b7e76..b167ac29958 100644 --- a/packages/react-core/src/components/DataList/examples/DataListCheckboxes.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListCheckboxes.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DataList, diff --git a/packages/react-core/src/components/DataList/examples/DataListClickableRows.tsx b/packages/react-core/src/components/DataList/examples/DataListClickableRows.tsx index dcd36f28a01..ee59b54c437 100644 --- a/packages/react-core/src/components/DataList/examples/DataListClickableRows.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListClickableRows.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { DataList, DataListItem, @@ -44,7 +44,7 @@ export const DataListClickableRows: React.FunctionComponent = () => { }; return ( - + { - + ); }; diff --git a/packages/react-core/src/components/DataList/examples/DataListCompact.tsx b/packages/react-core/src/components/DataList/examples/DataListCompact.tsx index 6232f30015b..23644d59371 100644 --- a/packages/react-core/src/components/DataList/examples/DataListCompact.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListCompact.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DataList, DataListItem, DataListItemRow, DataListItemCells, DataListCell } from '@patternfly/react-core'; export const DataListCompact: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DataList/examples/DataListControllingText.tsx b/packages/react-core/src/components/DataList/examples/DataListControllingText.tsx index c8ced89d5fb..01d5adc3b73 100644 --- a/packages/react-core/src/components/DataList/examples/DataListControllingText.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListControllingText.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DataList, DataListItem, diff --git a/packages/react-core/src/components/DataList/examples/DataListExpandable.tsx b/packages/react-core/src/components/DataList/examples/DataListExpandable.tsx index d483c18b613..eb99604a02d 100644 --- a/packages/react-core/src/components/DataList/examples/DataListExpandable.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListExpandable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { DataList, DataListItem, @@ -53,7 +53,7 @@ export const DataListExpandable: React.FunctionComponent = () => { setExpanded(newExpanded); }; return ( - + @@ -265,6 +265,6 @@ export const DataListExpandable: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/DataList/examples/DataListMixedExpandable.tsx b/packages/react-core/src/components/DataList/examples/DataListMixedExpandable.tsx index e3183ffc96a..57ee749de23 100644 --- a/packages/react-core/src/components/DataList/examples/DataListMixedExpandable.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListMixedExpandable.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { DataList, DataListItem, @@ -55,7 +55,7 @@ export const DataListMixedExpandable: React.FunctionComponent = () => { }; return ( - + @@ -261,6 +261,6 @@ export const DataListMixedExpandable: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/DataList/examples/DataListSmGridBreakpoint.tsx b/packages/react-core/src/components/DataList/examples/DataListSmGridBreakpoint.tsx index 55d0023dd8c..9beb45d5788 100644 --- a/packages/react-core/src/components/DataList/examples/DataListSmGridBreakpoint.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListSmGridBreakpoint.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DataList, DataListItem, DataListItemRow, DataListItemCells, DataListCell } from '@patternfly/react-core'; export const DataListSmGridBreakpoint: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx b/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx index 6d44d45ca2e..88ab4b48f33 100644 --- a/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx +++ b/packages/react-core/src/components/DataList/examples/DataListWidthModifiers.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Content, DataList, diff --git a/packages/react-core/src/components/DatePicker/__tests__/DatePicker.test.tsx b/packages/react-core/src/components/DatePicker/__tests__/DatePicker.test.tsx index bbb252c064e..9d6030c0eef 100644 --- a/packages/react-core/src/components/DatePicker/__tests__/DatePicker.test.tsx +++ b/packages/react-core/src/components/DatePicker/__tests__/DatePicker.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { screen, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerAmerican.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerAmerican.tsx index 54dba78291f..b41299b7368 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerAmerican.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerAmerican.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DatePicker } from '@patternfly/react-core'; export const DatePickerAmerican: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerBasic.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerBasic.tsx index 65e371fcc7b..3008b7dc715 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerBasic.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DatePicker } from '@patternfly/react-core'; export const DatePickerBasic: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerControlled.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerControlled.tsx index a4297e9265e..f4d5e853532 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerControlled.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerControlled.tsx @@ -1,11 +1,11 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, DatePicker, Flex, FlexItem } from '@patternfly/react-core'; export const DatePickerControlled: React.FunctionComponent = () => { const initialValue = '2020-03-17'; const [value, setValue] = React.useState(initialValue); return ( - + setValue(value)} />

    @@ -17,6 +17,6 @@ export const DatePickerControlled: React.FunctionComponent = () => { -
    + ); }; diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerControlledCalendar.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerControlledCalendar.tsx index 89291a358c7..60b1bf1c94c 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerControlledCalendar.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerControlledCalendar.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, DatePicker } from '@patternfly/react-core'; export const DatePickerControlledCalendar: React.FunctionComponent = () => { @@ -9,11 +9,11 @@ export const DatePickerControlledCalendar: React.FunctionComponent = () => { } }; return ( - +

    -
    + ); }; diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerControlledRequired.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerControlledRequired.tsx index 4ba5bf302da..3a7203e771d 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerControlledRequired.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerControlledRequired.tsx @@ -1,11 +1,11 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, DatePicker, Flex, FlexItem } from '@patternfly/react-core'; export const DatePickerControlled: React.FunctionComponent = () => { const initialValue = '2020-03-17'; const [value, setValue] = React.useState(initialValue); return ( - + { - + ); }; diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerFrench.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerFrench.tsx index 1dc033ecb19..3006e3b235a 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerFrench.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerFrench.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DatePicker, Weekday } from '@patternfly/react-core'; export const DatePickerFrench: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerHelperText.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerHelperText.tsx index 854b922c1e2..55c280074fd 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerHelperText.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerHelperText.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DatePicker, HelperText, HelperTextItem } from '@patternfly/react-core'; export const DatePickerHelperText: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerMinMax.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerMinMax.tsx index 1253f5bab56..74f565bc37a 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerMinMax.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerMinMax.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DatePicker } from '@patternfly/react-core'; export const DatePickerMinMax: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/DatePicker/examples/DatePickerRequired.tsx b/packages/react-core/src/components/DatePicker/examples/DatePickerRequired.tsx index fbeb0f1febb..8571cd817d4 100644 --- a/packages/react-core/src/components/DatePicker/examples/DatePickerRequired.tsx +++ b/packages/react-core/src/components/DatePicker/examples/DatePickerRequired.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DatePicker } from '@patternfly/react-core'; export const DatePickerRequired: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionList.test.tsx b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionList.test.tsx index 9240e271c23..1bc061785ab 100644 --- a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionList.test.tsx +++ b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionList.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DescriptionList } from '../DescriptionList'; diff --git a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListDescription.test.tsx b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListDescription.test.tsx index 65367307167..e18009a2604 100644 --- a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListDescription.test.tsx +++ b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListDescription.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DescriptionListDescription } from '../DescriptionListDescription'; diff --git a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListGroup.test.tsx b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListGroup.test.tsx index 53e84b545ff..18e07ca68b9 100644 --- a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListGroup.test.tsx +++ b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListGroup.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DescriptionListGroup } from '../DescriptionListGroup'; diff --git a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListHelpTextButton.test.tsx b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListHelpTextButton.test.tsx index bb49c585450..120279c6fda 100644 --- a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListHelpTextButton.test.tsx +++ b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListHelpTextButton.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DescriptionListTermHelpTextButton } from '../DescriptionListTermHelpTextButton'; diff --git a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTerm.test.tsx b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTerm.test.tsx index 840db5199ea..173ba1bf4c0 100644 --- a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTerm.test.tsx +++ b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTerm.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DescriptionListTerm } from '../DescriptionListTerm'; diff --git a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTermHelpText.test.tsx b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTermHelpText.test.tsx index 1bd9779d379..27acbaf3d93 100644 --- a/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTermHelpText.test.tsx +++ b/packages/react-core/src/components/DescriptionList/__tests__/DescriptionListTermHelpText.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DescriptionListTermHelpText } from '../DescriptionListTermHelpText'; diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx index 350ce0c3244..2ee115ea76d 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx index a9a7f930f60..d161edf30fa 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx index c6a6baf0967..e224b8c47af 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListBasic.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListBasic.tsx index 2e757d7c134..c7694925afa 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListBasic.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx index 4130504079d..56a14f7c0fe 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompact.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompact.tsx index b88b87a1dce..a549dfc3f81 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompact.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompact.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx index 9f830d4dc11..9d0861dd10a 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx index faafefab01b..bc1940a8c0d 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx index f7efc50cf19..01f5ca593a0 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx index 62831bc0a1b..e88cebefbe2 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx index 06e60b06979..c66e0fce3e2 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx index a06a0d48aac..63c1caf52dd 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx index 0c9a0ca430b..36b45683b7e 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, DescriptionListTerm, DescriptionListDescription, Card } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx index a54c675e8e0..70947c5e2f8 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, DescriptionListTerm, DescriptionListDescription, Card } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx index 152d4142490..d2494e5dceb 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx index 9ef28e516af..b08312c0523 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx index 28c76e77467..2c495d4594d 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx index 888cc033939..1974f1b0873 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx index 22f77d4cabd..da0e109def4 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx index a582b4dfaca..539f68c8608 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx index 3e43bf50592..76a14345afa 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx index 98d896285f9..02010a4685c 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx index e60d592fdf9..c97560a6125 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithCard.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithCard.tsx index 5e7a0c0ba80..63ad0076a42 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithCard.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx index dc673735d57..22e3962bf4f 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx index 1d44868ae6e..238990874ea 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx index 297995a4a2d..537e5a34180 100644 --- a/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx +++ b/packages/react-core/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DescriptionList, diff --git a/packages/react-core/src/components/Divider/examples/DividerInsetMedium.tsx b/packages/react-core/src/components/Divider/examples/DividerInsetMedium.tsx index 281c786b590..23ac7a522fd 100644 --- a/packages/react-core/src/components/Divider/examples/DividerInsetMedium.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerInsetMedium.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider } from '@patternfly/react-core'; export const DividerInsetMedium: React.FunctionComponent = () => ; diff --git a/packages/react-core/src/components/Divider/examples/DividerInsetVariousBreakpoints.tsx b/packages/react-core/src/components/Divider/examples/DividerInsetVariousBreakpoints.tsx index 20f43d5dedc..32a706ec99b 100644 --- a/packages/react-core/src/components/Divider/examples/DividerInsetVariousBreakpoints.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerInsetVariousBreakpoints.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider } from '@patternfly/react-core'; export const DividerInsetVariousBreakpoints: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Divider/examples/DividerOrientationVariousBreakpoints.tsx b/packages/react-core/src/components/Divider/examples/DividerOrientationVariousBreakpoints.tsx index b182293baaf..da3b18a8337 100644 --- a/packages/react-core/src/components/Divider/examples/DividerOrientationVariousBreakpoints.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerOrientationVariousBreakpoints.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider, Flex, FlexItem } from '@patternfly/react-core'; export const DividerOrientationVariousBreakpoints: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Divider/examples/DividerUsingDiv.tsx b/packages/react-core/src/components/Divider/examples/DividerUsingDiv.tsx index fc16716c5f7..2db47de38eb 100644 --- a/packages/react-core/src/components/Divider/examples/DividerUsingDiv.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerUsingDiv.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider } from '@patternfly/react-core'; export const DividerUsingDiv: React.FunctionComponent = () => ; diff --git a/packages/react-core/src/components/Divider/examples/DividerUsingHr.tsx b/packages/react-core/src/components/Divider/examples/DividerUsingHr.tsx index 8ca86bcdee6..90b2418a27b 100644 --- a/packages/react-core/src/components/Divider/examples/DividerUsingHr.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerUsingHr.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider } from '@patternfly/react-core'; export const DividerUsingHr: React.FunctionComponent = () => ; diff --git a/packages/react-core/src/components/Divider/examples/DividerUsingLi.tsx b/packages/react-core/src/components/Divider/examples/DividerUsingLi.tsx index f8e0c4269ea..0d6e4584f65 100644 --- a/packages/react-core/src/components/Divider/examples/DividerUsingLi.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerUsingLi.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider } from '@patternfly/react-core'; export const DividerUsingLi: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Divider/examples/DividerVerticalFlex.tsx b/packages/react-core/src/components/Divider/examples/DividerVerticalFlex.tsx index 57054866cde..47a40933628 100644 --- a/packages/react-core/src/components/Divider/examples/DividerVerticalFlex.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerVerticalFlex.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider, Flex, FlexItem } from '@patternfly/react-core'; export const DividerVerticalFlex: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetSmall.tsx b/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetSmall.tsx index 95e93d151c1..0ad28729feb 100644 --- a/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetSmall.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetSmall.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider, Flex, FlexItem } from '@patternfly/react-core'; export const DividerVerticalFlexInsetSmall: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetVariousBreakpoints.tsx b/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetVariousBreakpoints.tsx index c47a605b781..7f1c67baca9 100644 --- a/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetVariousBreakpoints.tsx +++ b/packages/react-core/src/components/Divider/examples/DividerVerticalFlexInsetVariousBreakpoints.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Divider, Flex, FlexItem } from '@patternfly/react-core'; export const DividerVerticalFlexInsetVariousBreakpoints: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx b/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx index c215634bb50..0896bf4d1d7 100644 --- a/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx +++ b/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx @@ -9,7 +9,6 @@ import { DrawerPanelContent, DrawerColorVariant } from '../'; -import React from 'react'; import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { KeyTypes } from '../../../helpers'; diff --git a/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx b/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx index b1cd0fe850e..fd277778bf3 100644 --- a/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +++ b/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import { DrawerPanelContent } from '../DrawerPanelContent'; import { Drawer } from '../Drawer'; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerAdditionalSectionAboveContent.tsx b/packages/react-core/src/components/Drawer/examples/DrawerAdditionalSectionAboveContent.tsx index 1c217b3f986..fe92493234a 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerAdditionalSectionAboveContent.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerAdditionalSectionAboveContent.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -44,7 +44,7 @@ export const DrawerAdditionalSectionAboveContent: React.FunctionComponent = () = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -54,6 +54,6 @@ export const DrawerAdditionalSectionAboveContent: React.FunctionComponent = () = {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerBasic.tsx b/packages/react-core/src/components/Drawer/examples/DrawerBasic.tsx index 134bfdf098d..70c818e94d8 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerBasic.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerBasic.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -47,7 +47,7 @@ export const DrawerBasic: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -56,6 +56,6 @@ export const DrawerBasic: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerBasicInline.tsx b/packages/react-core/src/components/Drawer/examples/DrawerBasicInline.tsx index b948452b7b6..dad3ed82335 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerBasicInline.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerBasicInline.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerBasicInline: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerBasicInline: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerBreakpoint.tsx b/packages/react-core/src/components/Drawer/examples/DrawerBreakpoint.tsx index 961706d8fda..f336a44c5c3 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerBreakpoint.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerBreakpoint.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerBreakpoint: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerBreakpoint: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerFocusTrap.tsx b/packages/react-core/src/components/Drawer/examples/DrawerFocusTrap.tsx index e8fde64ed44..238685e0e9b 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerFocusTrap.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerFocusTrap.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -44,7 +44,7 @@ export const DrawerFocusTrap: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -53,6 +53,6 @@ export const DrawerFocusTrap: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelEnd.tsx b/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelEnd.tsx index 721ba69ad81..c121433fd5e 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelEnd.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelEnd.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerInlinePanelEnd: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerInlinePanelEnd: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelStart.tsx b/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelStart.tsx index 0331478d321..07e294482da 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelStart.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerInlinePanelStart.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerInlinePanelStart: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerInlinePanelStart: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerModifiedContentPadding.tsx b/packages/react-core/src/components/Drawer/examples/DrawerModifiedContentPadding.tsx index d81a87a8a77..f90516ce9ce 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerModifiedContentPadding.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerModifiedContentPadding.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerModifiedContentPadding: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -54,6 +54,6 @@ export const DrawerModifiedContentPadding: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerModifiedPanelPadding.tsx b/packages/react-core/src/components/Drawer/examples/DrawerModifiedPanelPadding.tsx index 2ee41112dea..28222afc398 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerModifiedPanelPadding.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerModifiedPanelPadding.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerModifiedPanelPadding: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerModifiedPanelPadding: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerPanelBottom.tsx b/packages/react-core/src/components/Drawer/examples/DrawerPanelBottom.tsx index f52b0d72acb..c13604ed7c9 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerPanelBottom.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerPanelBottom.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerPanelBottom: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -54,6 +54,6 @@ export const DrawerPanelBottom: React.FunctionComponent = () => {
    -
    + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerPanelEnd.tsx b/packages/react-core/src/components/Drawer/examples/DrawerPanelEnd.tsx index c763fce6b22..b5123858f03 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerPanelEnd.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerPanelEnd.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerPanelEnd: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerPanelEnd: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerPanelStart.tsx b/packages/react-core/src/components/Drawer/examples/DrawerPanelStart.tsx index 3d9ab12a799..3d656b8a221 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerPanelStart.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerPanelStart.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerPanelStart: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerPanelStart: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerResizableAtEnd.tsx b/packages/react-core/src/components/Drawer/examples/DrawerResizableAtEnd.tsx index 88dec2ed23e..0a89d0dc548 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerResizableAtEnd.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerResizableAtEnd.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -48,7 +48,7 @@ export const DrawerResizableAtEnd: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -57,6 +57,6 @@ export const DrawerResizableAtEnd: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerResizableAtStart.tsx b/packages/react-core/src/components/Drawer/examples/DrawerResizableAtStart.tsx index f0b8aae5cf9..7f6be3a944c 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerResizableAtStart.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerResizableAtStart.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -43,7 +43,7 @@ export const DrawerResizableAtStart: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -52,6 +52,6 @@ export const DrawerResizableAtStart: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerResizableOnBottom.tsx b/packages/react-core/src/components/Drawer/examples/DrawerResizableOnBottom.tsx index 9f033b26924..d1b4affbd19 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerResizableOnBottom.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerResizableOnBottom.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -42,7 +42,7 @@ export const DrawerResizableOnBottom: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -53,6 +53,6 @@ export const DrawerResizableOnBottom: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerResizableOnInline.tsx b/packages/react-core/src/components/Drawer/examples/DrawerResizableOnInline.tsx index ee13637e567..94377dccdcc 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerResizableOnInline.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerResizableOnInline.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -42,7 +42,7 @@ export const DrawerResizableOnInline: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -51,6 +51,6 @@ export const DrawerResizableOnInline: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerSecondaryBackground.tsx b/packages/react-core/src/components/Drawer/examples/DrawerSecondaryBackground.tsx index 3ad6042666b..3804db7ffbd 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerSecondaryBackground.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerSecondaryBackground.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Checkbox, Drawer, @@ -63,7 +63,7 @@ export const DrawerSecondaryBackground: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerStackedContentBodyElements.tsx b/packages/react-core/src/components/Drawer/examples/DrawerStackedContentBodyElements.tsx index 6b5ae20a70e..234d0d94247 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerStackedContentBodyElements.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerStackedContentBodyElements.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -44,7 +44,7 @@ export const DrawerStackedContentBodyElements: React.FunctionComponent = () => { ); return ( - + @@ -55,6 +55,6 @@ export const DrawerStackedContentBodyElements: React.FunctionComponent = () => { content-body - + ); }; diff --git a/packages/react-core/src/components/Drawer/examples/DrawerStatic.tsx b/packages/react-core/src/components/Drawer/examples/DrawerStatic.tsx index 599e16458f1..f45ce1d66ac 100644 --- a/packages/react-core/src/components/Drawer/examples/DrawerStatic.tsx +++ b/packages/react-core/src/components/Drawer/examples/DrawerStatic.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Drawer, DrawerPanelContent, @@ -44,7 +44,7 @@ export const DrawerStatic: React.FunctionComponent = () => { 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.'; return ( - + @@ -53,6 +53,6 @@ export const DrawerStatic: React.FunctionComponent = () => { {drawerContent} - + ); }; diff --git a/packages/react-core/src/components/Dropdown/Dropdown.tsx b/packages/react-core/src/components/Dropdown/Dropdown.tsx index 0c4481624a4..9ad39d49477 100644 --- a/packages/react-core/src/components/Dropdown/Dropdown.tsx +++ b/packages/react-core/src/components/Dropdown/Dropdown.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { forwardRef, useEffect, useRef } from 'react'; import { css } from '@patternfly/react-styles'; import { Menu, MenuContent, MenuProps } from '../Menu'; import { Popper } from '../../helpers/Popper/Popper'; @@ -47,7 +47,7 @@ export interface DropdownProps extends MenuProps, OUIAProps { /** Function callback called when user selects item. */ onSelect?: (event?: React.MouseEvent, value?: string | number) => void; /** Callback to allow the dropdown component to change the open state of the menu. - * Triggered by clicking outside of the menu, or by pressing any keys specificed in onOpenChangeKeys. */ + * Triggered by clicking outside of the menu, or by pressing any keys specified in onOpenChangeKeys. */ onOpenChange?: (isOpen: boolean) => void; /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */ onOpenChangeKeys?: string[]; @@ -103,8 +103,8 @@ const DropdownBase: React.FunctionComponent = ({ focusTimeoutDelay = 0, ...props }: DropdownProps) => { - const localMenuRef = React.useRef(undefined); - const localToggleRef = React.useRef(undefined); + const localMenuRef = useRef(undefined); + const localToggleRef = useRef(undefined); const ouiaProps = useOUIAProps(Dropdown.displayName, ouiaId, ouiaSafe); const menuRef = (innerRef as React.RefObject) || localMenuRef; @@ -113,8 +113,8 @@ const DropdownBase: React.FunctionComponent = ({ ? localToggleRef : (toggle?.toggleRef as React.RefObject); - const prevIsOpen = React.useRef(isOpen); - React.useEffect(() => { + const prevIsOpen = useRef(isOpen); + useEffect(() => { // menu was opened, focus on first menu item if (prevIsOpen.current === false && isOpen === true && shouldFocusFirstItemOnOpen) { setTimeout(() => { @@ -129,7 +129,7 @@ const DropdownBase: React.FunctionComponent = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [isOpen]); - React.useEffect(() => { + useEffect(() => { const handleMenuKeys = (event: KeyboardEvent) => { // Close the menu on tab or escape if onOpenChange is provided if ( @@ -213,7 +213,7 @@ const DropdownBase: React.FunctionComponent = ({ ); }; -export const Dropdown = React.forwardRef((props: DropdownProps, ref: React.Ref) => ( +export const Dropdown = forwardRef((props: DropdownProps, ref: React.Ref) => ( )); Dropdown.displayName = 'Dropdown'; diff --git a/packages/react-core/src/components/Dropdown/DropdownGroup.tsx b/packages/react-core/src/components/Dropdown/DropdownGroup.tsx index 721e6216071..ea1f63fd98b 100644 --- a/packages/react-core/src/components/Dropdown/DropdownGroup.tsx +++ b/packages/react-core/src/components/Dropdown/DropdownGroup.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { css } from '@patternfly/react-styles'; import { MenuGroupProps, MenuGroup } from '../Menu'; diff --git a/packages/react-core/src/components/Dropdown/DropdownItem.tsx b/packages/react-core/src/components/Dropdown/DropdownItem.tsx index d6cf6e127c1..0c973f45e9e 100644 --- a/packages/react-core/src/components/Dropdown/DropdownItem.tsx +++ b/packages/react-core/src/components/Dropdown/DropdownItem.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { forwardRef } from 'react'; import { css } from '@patternfly/react-styles'; import { MenuItemProps, MenuItem } from '../Menu'; import { TooltipProps } from '../Tooltip'; @@ -65,7 +65,7 @@ const DropdownItemBase: React.FunctionComponent = ({ ); }; -export const DropdownItem = React.forwardRef( +export const DropdownItem = forwardRef( (props: DropdownItemProps, ref: React.Ref) => ( ) diff --git a/packages/react-core/src/components/Dropdown/DropdownList.tsx b/packages/react-core/src/components/Dropdown/DropdownList.tsx index e591d1ae3f0..8f9b8fac4f0 100644 --- a/packages/react-core/src/components/Dropdown/DropdownList.tsx +++ b/packages/react-core/src/components/Dropdown/DropdownList.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { css } from '@patternfly/react-styles'; import { MenuListProps, MenuList } from '../Menu'; diff --git a/packages/react-core/src/components/Dropdown/__tests__/Dropdown.test.tsx b/packages/react-core/src/components/Dropdown/__tests__/Dropdown.test.tsx index 09951f3ee11..73e6d5068d5 100644 --- a/packages/react-core/src/components/Dropdown/__tests__/Dropdown.test.tsx +++ b/packages/react-core/src/components/Dropdown/__tests__/Dropdown.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dropdown } from '../../Dropdown'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-core/src/components/Dropdown/__tests__/DropdownGroup.test.tsx b/packages/react-core/src/components/Dropdown/__tests__/DropdownGroup.test.tsx index d7dd551e3a4..789e8a86b6e 100644 --- a/packages/react-core/src/components/Dropdown/__tests__/DropdownGroup.test.tsx +++ b/packages/react-core/src/components/Dropdown/__tests__/DropdownGroup.test.tsx @@ -1,7 +1,5 @@ import { DropdownGroup } from '../../Dropdown'; import { render, screen } from '@testing-library/react'; -import React from 'react'; - jest.mock('../../Menu'); const dropdownGroupChildren =
    Dropdown Group children
    ; diff --git a/packages/react-core/src/components/Dropdown/__tests__/DropdownItem.test.tsx b/packages/react-core/src/components/Dropdown/__tests__/DropdownItem.test.tsx index a016915e514..e70b5ca8667 100644 --- a/packages/react-core/src/components/Dropdown/__tests__/DropdownItem.test.tsx +++ b/packages/react-core/src/components/Dropdown/__tests__/DropdownItem.test.tsx @@ -1,7 +1,5 @@ import { DropdownItem } from '../../Dropdown'; import { render, screen } from '@testing-library/react'; -import React from 'react'; - jest.mock('../../Menu'); const dropdownItemChildren =
    Dropdown Item children
    ; diff --git a/packages/react-core/src/components/Dropdown/__tests__/DropdownList.test.tsx b/packages/react-core/src/components/Dropdown/__tests__/DropdownList.test.tsx index ba9a61ee650..be2cdf8316a 100644 --- a/packages/react-core/src/components/Dropdown/__tests__/DropdownList.test.tsx +++ b/packages/react-core/src/components/Dropdown/__tests__/DropdownList.test.tsx @@ -1,7 +1,5 @@ import { DropdownList } from '../../Dropdown'; import { render, screen } from '@testing-library/react'; -import React from 'react'; - jest.mock('../../Menu'); const dropdownListChildren =
    Dropdown List children
    ; diff --git a/packages/react-core/src/components/Dropdown/examples/DropdownBasic.tsx b/packages/react-core/src/components/Dropdown/examples/DropdownBasic.tsx index d5948281fe2..adfbe3080e5 100644 --- a/packages/react-core/src/components/Dropdown/examples/DropdownBasic.tsx +++ b/packages/react-core/src/components/Dropdown/examples/DropdownBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dropdown, DropdownItem, DropdownList, Divider, MenuToggle, MenuToggleElement } from '@patternfly/react-core'; export const DropdownBasic: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Dropdown/examples/DropdownWithDescriptions.tsx b/packages/react-core/src/components/Dropdown/examples/DropdownWithDescriptions.tsx index 751dccbf546..3cb1f12e9d6 100644 --- a/packages/react-core/src/components/Dropdown/examples/DropdownWithDescriptions.tsx +++ b/packages/react-core/src/components/Dropdown/examples/DropdownWithDescriptions.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dropdown, DropdownItem, DropdownList, MenuToggle, MenuToggleElement } from '@patternfly/react-core'; export const DropdownWithDescriptions: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Dropdown/examples/DropdownWithGroups.tsx b/packages/react-core/src/components/Dropdown/examples/DropdownWithGroups.tsx index 5664eb5a8f3..cdd53aed518 100644 --- a/packages/react-core/src/components/Dropdown/examples/DropdownWithGroups.tsx +++ b/packages/react-core/src/components/Dropdown/examples/DropdownWithGroups.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dropdown, DropdownGroup, diff --git a/packages/react-core/src/components/Dropdown/examples/DropdownWithKebabToggle.tsx b/packages/react-core/src/components/Dropdown/examples/DropdownWithKebabToggle.tsx index 1ab5f49442b..c195359b0c2 100644 --- a/packages/react-core/src/components/Dropdown/examples/DropdownWithKebabToggle.tsx +++ b/packages/react-core/src/components/Dropdown/examples/DropdownWithKebabToggle.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dropdown, DropdownItem, DropdownList, Divider, MenuToggle, MenuToggleElement } from '@patternfly/react-core'; import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; diff --git a/packages/react-core/src/components/DualListSelector/__tests__/DualListSelector.test.tsx b/packages/react-core/src/components/DualListSelector/__tests__/DualListSelector.test.tsx index 373aa0e993d..58ab92913eb 100644 --- a/packages/react-core/src/components/DualListSelector/__tests__/DualListSelector.test.tsx +++ b/packages/react-core/src/components/DualListSelector/__tests__/DualListSelector.test.tsx @@ -1,8 +1,6 @@ import { render } from '@testing-library/react'; import { DualListSelectorPane } from '../DualListSelectorPane'; import { SearchInput } from '../../SearchInput'; -import React from 'react'; - describe('DualListSelector', () => { test('basic', () => { const { asFragment } = render(); diff --git a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasic.tsx b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasic.tsx index ec14a043dc2..0caef20aefc 100644 --- a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasic.tsx +++ b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DualListSelector, DualListSelectorPane, diff --git a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx index e395b2bc8bc..f3427044911 100644 --- a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx +++ b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, DualListSelector, diff --git a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicTooltips.tsx b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicTooltips.tsx index aac0b2f9c45..ac249fa0eaf 100644 --- a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicTooltips.tsx +++ b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorBasicTooltips.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DualListSelector, DualListSelectorPane, diff --git a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx index 5de70ac21e5..a28577bccb5 100644 --- a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +++ b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, ButtonVariant, @@ -233,7 +233,7 @@ export const DualListSelectorComplexOptionsActionsNext: React.FunctionComponent ); return ( - + setIsDisabled(!isDisabled)} /> - + ); }; diff --git a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorTree.tsx b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorTree.tsx index 9da2cda7645..6c996371bf2 100644 --- a/packages/react-core/src/components/DualListSelector/examples/DualListSelectorTree.tsx +++ b/packages/react-core/src/components/DualListSelector/examples/DualListSelectorTree.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { DualListSelector, DualListSelectorPane, diff --git a/packages/react-core/src/components/EmptyState/__tests__/EmptyState.test.tsx b/packages/react-core/src/components/EmptyState/__tests__/EmptyState.test.tsx index bbeb4cdeff2..7c5dd1933be 100644 --- a/packages/react-core/src/components/EmptyState/__tests__/EmptyState.test.tsx +++ b/packages/react-core/src/components/EmptyState/__tests__/EmptyState.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import AddressBookIcon from '@patternfly/react-icons/dist/esm/icons/address-book-icon'; diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateBasic.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateBasic.tsx index 907b6ff9d22..5d9ec5f69aa 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateBasic.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, EmptyState, EmptyStateBody, EmptyStateActions, EmptyStateFooter } from '@patternfly/react-core'; import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon'; diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx index cb09ceb73a6..df77962cc9d 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, EmptyState, diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx index ee483448546..68394ae4481 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, EmptyState, diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateLarge.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateLarge.tsx index 062f66a9845..a978914053a 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateLarge.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateLarge.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, EmptyState, diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx index ebc08c8d641..3c5e91d6161 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions } from '@patternfly/react-core'; import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon'; diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateSmall.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateSmall.tsx index eae0cc8e481..faa4bce82ba 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateSmall.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateSmall.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button, EmptyState, diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateSpinner.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateSpinner.tsx index 6acd843b291..c9e0632e839 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateSpinner.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateSpinner.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { EmptyState, Spinner } from '@patternfly/react-core'; export const EmptyStateSpinner: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyStateWithStatus.tsx b/packages/react-core/src/components/EmptyState/examples/EmptyStateWithStatus.tsx index fe4f1e716ea..81765806961 100644 --- a/packages/react-core/src/components/EmptyState/examples/EmptyStateWithStatus.tsx +++ b/packages/react-core/src/components/EmptyState/examples/EmptyStateWithStatus.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { EmptyState, EmptyStateBody, diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionBasic.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionBasic.tsx index 60246ffcaca..ff77ba98af2 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionBasic.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection } from '@patternfly/react-core'; export const ExpandableSectionBasic: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionCustomToggle.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionCustomToggle.tsx index f7a74adfdbb..7c6b5f99a83 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionCustomToggle.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionCustomToggle.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection, Badge } from '@patternfly/react-core'; import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDetached.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDetached.tsx index bcba03935c2..21d17d0e74a 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDetached.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDetached.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection, ExpandableSectionToggle, Stack, StackItem } from '@patternfly/react-core'; export const ExpandableSectionDetached: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDisclosure.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDisclosure.tsx index 9aca30644eb..2990fe52bf5 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDisclosure.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionDisclosure.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection } from '@patternfly/react-core'; export const ExpandableSectionDisclosure: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionTruncateExpansion.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionTruncateExpansion.tsx index eaa4082186a..83de90fb416 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionTruncateExpansion.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionTruncateExpansion.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection, ExpandableSectionVariant } from '@patternfly/react-core'; export const ExpandableSectionTruncateExpansion: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolled.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolled.tsx index 627940fc6d6..d8ecba22f0f 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolled.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolled.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection } from '@patternfly/react-core'; export const ExpandableSectionUncontrolled: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolledDynamicToggleText.tsx b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolledDynamicToggleText.tsx index 0883285a878..e4d9a624f72 100644 --- a/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolledDynamicToggleText.tsx +++ b/packages/react-core/src/components/ExpandableSection/examples/ExpandableSectionUncontrolledDynamicToggleText.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ExpandableSection } from '@patternfly/react-core'; export const ExpandableSectionUncontrolledDynamicToggle: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadCustomPreview.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadCustomPreview.tsx index 845ee9df96d..c0aa86c7e67 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadCustomPreview.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadCustomPreview.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUpload } from '@patternfly/react-core'; import FileUploadIcon from '@patternfly/react-icons/dist/esm/icons/file-upload-icon'; diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadCustomUpload.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadCustomUpload.tsx index a8366fae76e..27e4d3bffe8 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadCustomUpload.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadCustomUpload.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUploadField, FileUploadHelperText, HelperText, HelperTextItem, Checkbox } from '@patternfly/react-core'; export const CustomPreviewFileUpload: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleFile.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleFile.tsx index f6388a51034..d8d5fae2610 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleFile.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleFile.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUpload } from '@patternfly/react-core'; export const SimpleFileUpload: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleText.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleText.tsx index 5d9f57ad030..876d6f773ee 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleText.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadSimpleText.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUpload, DropEvent } from '@patternfly/react-core'; export const SimpleTextFileUpload: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx index 8abbea53552..18e3a368019 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUpload, DropEvent } from '@patternfly/react-core'; export const TextFileWithEditsAllowed: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx index c32904f687f..d0284856406 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUpload, DropzoneErrorCode, diff --git a/packages/react-core/src/components/FileUpload/examples/FileUploadWithHelperText.tsx b/packages/react-core/src/components/FileUpload/examples/FileUploadWithHelperText.tsx index 9757bc0b7b8..ddeb124b14e 100644 --- a/packages/react-core/src/components/FileUpload/examples/FileUploadWithHelperText.tsx +++ b/packages/react-core/src/components/FileUpload/examples/FileUploadWithHelperText.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FileUpload, FileUploadHelperText, HelperText, HelperTextItem, DropEvent } from '@patternfly/react-core'; export const FileUploadWithHelperText: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Form/FormGroupLabelHelp.tsx b/packages/react-core/src/components/Form/FormGroupLabelHelp.tsx index f8bba50758c..0f14870d671 100644 --- a/packages/react-core/src/components/Form/FormGroupLabelHelp.tsx +++ b/packages/react-core/src/components/Form/FormGroupLabelHelp.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { forwardRef, useRef } from 'react'; import { Button, ButtonProps } from '../Button'; import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; import { KeyTypes } from '../../helpers/constants'; @@ -21,7 +21,7 @@ const FormGroupLabelHelpBase: React.FunctionComponent = innerRef, ...props }) => { - const ref = React.useRef(null); + const ref = useRef(null); const buttonRef = innerRef || ref; const isMutableRef = (ref: React.Ref): ref is React.MutableRefObject => @@ -50,7 +50,7 @@ const FormGroupLabelHelpBase: React.FunctionComponent = ); }; -export const FormGroupLabelHelp = React.forwardRef((props: FormGroupLabelHelpProps, ref: React.Ref) => ( +export const FormGroupLabelHelp = forwardRef((props: FormGroupLabelHelpProps, ref: React.Ref) => ( )); diff --git a/packages/react-core/src/components/Form/__tests__/ActionGroup.test.tsx b/packages/react-core/src/components/Form/__tests__/ActionGroup.test.tsx index fa24a2fb0b8..ed595ce2017 100644 --- a/packages/react-core/src/components/Form/__tests__/ActionGroup.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/ActionGroup.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render } from '@testing-library/react'; import { ActionGroup } from '../ActionGroup'; import { Form } from '../Form'; diff --git a/packages/react-core/src/components/Form/__tests__/Form.test.tsx b/packages/react-core/src/components/Form/__tests__/Form.test.tsx index 34188e8eb98..9caf53ff004 100644 --- a/packages/react-core/src/components/Form/__tests__/Form.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/Form.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render } from '@testing-library/react'; import { Form } from '../Form'; diff --git a/packages/react-core/src/components/Form/__tests__/FormAlert.test.tsx b/packages/react-core/src/components/Form/__tests__/FormAlert.test.tsx index df0e75d2b57..86c3a418983 100644 --- a/packages/react-core/src/components/Form/__tests__/FormAlert.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/FormAlert.test.tsx @@ -1,7 +1,5 @@ import { render } from '@testing-library/react'; import { FormAlert } from '../FormAlert'; -import React from 'react'; - describe('Form Alert component', () => { test('should render form group required variant', () => { const { asFragment } = render(); diff --git a/packages/react-core/src/components/Form/__tests__/FormContext.test.tsx b/packages/react-core/src/components/Form/__tests__/FormContext.test.tsx index 647c9320466..bcf099f6488 100644 --- a/packages/react-core/src/components/Form/__tests__/FormContext.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/FormContext.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { FormContextConsumer, FormContextProvider } from '../FormContext'; diff --git a/packages/react-core/src/components/Form/__tests__/FormGroup.test.tsx b/packages/react-core/src/components/Form/__tests__/FormGroup.test.tsx index 5c3a4153340..bd5d1ce56b2 100644 --- a/packages/react-core/src/components/Form/__tests__/FormGroup.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/FormGroup.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; @@ -54,7 +52,7 @@ describe('FormGroup', () => { expect(asFragment()).toMatchSnapshot(); }); - test('should render form group with additonal label info', () => { + test('should render form group with additional label info', () => { const { asFragment } = render( Header} labelInfo="more info"> diff --git a/packages/react-core/src/components/Form/__tests__/FormHelperText.test.tsx b/packages/react-core/src/components/Form/__tests__/FormHelperText.test.tsx index 1f8c1c547de..80bed220b45 100644 --- a/packages/react-core/src/components/Form/__tests__/FormHelperText.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/FormHelperText.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { FormHelperText } from '../FormHelperText'; diff --git a/packages/react-core/src/components/Form/examples/FormBasic.tsx b/packages/react-core/src/components/Form/examples/FormBasic.tsx index a9e1b420b2e..dd575e4c973 100644 --- a/packages/react-core/src/components/Form/examples/FormBasic.tsx +++ b/packages/react-core/src/components/Form/examples/FormBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/Form/examples/FormFieldGroups.tsx b/packages/react-core/src/components/Form/examples/FormFieldGroups.tsx index 5a860605e9b..64a0a452b4d 100644 --- a/packages/react-core/src/components/Form/examples/FormFieldGroups.tsx +++ b/packages/react-core/src/components/Form/examples/FormFieldGroups.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/Form/examples/FormGrid.tsx b/packages/react-core/src/components/Form/examples/FormGrid.tsx index fd937405890..16d15562083 100644 --- a/packages/react-core/src/components/Form/examples/FormGrid.tsx +++ b/packages/react-core/src/components/Form/examples/FormGrid.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/Form/examples/FormGroupLabelInfo.tsx b/packages/react-core/src/components/Form/examples/FormGroupLabelInfo.tsx index 9491659d507..f90dc381095 100644 --- a/packages/react-core/src/components/Form/examples/FormGroupLabelInfo.tsx +++ b/packages/react-core/src/components/Form/examples/FormGroupLabelInfo.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/Form/examples/FormHorizontal.tsx b/packages/react-core/src/components/Form/examples/FormHorizontal.tsx index 6ef67f48119..80214d8e602 100644 --- a/packages/react-core/src/components/Form/examples/FormHorizontal.tsx +++ b/packages/react-core/src/components/Form/examples/FormHorizontal.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/Form/examples/FormHorizontalHelper.tsx b/packages/react-core/src/components/Form/examples/FormHorizontalHelper.tsx index 1561865e59d..e06dece189d 100644 --- a/packages/react-core/src/components/Form/examples/FormHorizontalHelper.tsx +++ b/packages/react-core/src/components/Form/examples/FormHorizontalHelper.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, Checkbox, HelperText, HelperTextItem, FormHelperText } from '@patternfly/react-core'; export const FormHorizontalFormHelperText: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Form/examples/FormHorizontalStacked.tsx b/packages/react-core/src/components/Form/examples/FormHorizontalStacked.tsx index a9b5549b8d5..115d240c975 100644 --- a/packages/react-core/src/components/Form/examples/FormHorizontalStacked.tsx +++ b/packages/react-core/src/components/Form/examples/FormHorizontalStacked.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, Checkbox } from '@patternfly/react-core'; export const FormHorizontalStacked: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/Form/examples/FormInvalid.tsx b/packages/react-core/src/components/Form/examples/FormInvalid.tsx index 23bbab072d7..81a10cee815 100644 --- a/packages/react-core/src/components/Form/examples/FormInvalid.tsx +++ b/packages/react-core/src/components/Form/examples/FormInvalid.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, TextInput, HelperText, HelperTextItem, FormHelperText } from '@patternfly/react-core'; import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; diff --git a/packages/react-core/src/components/Form/examples/FormInvalidWithFormAlert.tsx b/packages/react-core/src/components/Form/examples/FormInvalidWithFormAlert.tsx index aba3441b39e..8f4bb84a3e9 100644 --- a/packages/react-core/src/components/Form/examples/FormInvalidWithFormAlert.tsx +++ b/packages/react-core/src/components/Form/examples/FormInvalidWithFormAlert.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Alert, Form, diff --git a/packages/react-core/src/components/Form/examples/FormLimitWidth.tsx b/packages/react-core/src/components/Form/examples/FormLimitWidth.tsx index 11b10786dcc..385f3ca8633 100644 --- a/packages/react-core/src/components/Form/examples/FormLimitWidth.tsx +++ b/packages/react-core/src/components/Form/examples/FormLimitWidth.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/Form/examples/FormSections.tsx b/packages/react-core/src/components/Form/examples/FormSections.tsx index b6c195f121d..3fe5a26fb36 100644 --- a/packages/react-core/src/components/Form/examples/FormSections.tsx +++ b/packages/react-core/src/components/Form/examples/FormSections.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, FormSection, TextInput } from '@patternfly/react-core'; export const FormSections: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Form/examples/FormState.tsx b/packages/react-core/src/components/Form/examples/FormState.tsx index b3cbd9f53e5..cdd186c8c27 100644 --- a/packages/react-core/src/components/Form/examples/FormState.tsx +++ b/packages/react-core/src/components/Form/examples/FormState.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ActionGroup, Button, diff --git a/packages/react-core/src/components/Form/examples/FormValidated.tsx b/packages/react-core/src/components/Form/examples/FormValidated.tsx index 19991464371..59aa5c53e2a 100644 --- a/packages/react-core/src/components/Form/examples/FormValidated.tsx +++ b/packages/react-core/src/components/Form/examples/FormValidated.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, FormHelperText, HelperText, HelperTextItem, TextInput } from '@patternfly/react-core'; import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; diff --git a/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx b/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx index fec53d588fc..347a086492c 100644 --- a/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx +++ b/packages/react-core/src/components/FormSelect/__tests__/FormSelect.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/packages/react-core/src/components/FormSelect/examples/FormSelectBasic.tsx b/packages/react-core/src/components/FormSelect/examples/FormSelectBasic.tsx index 0f63f953c0d..cf70afb039d 100644 --- a/packages/react-core/src/components/FormSelect/examples/FormSelectBasic.tsx +++ b/packages/react-core/src/components/FormSelect/examples/FormSelectBasic.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FormSelect, FormSelectOption } from '@patternfly/react-core'; export const FormSelectBasic: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FormSelect/examples/FormSelectDisabled.tsx b/packages/react-core/src/components/FormSelect/examples/FormSelectDisabled.tsx index 913d5640d29..257a8e8cd4a 100644 --- a/packages/react-core/src/components/FormSelect/examples/FormSelectDisabled.tsx +++ b/packages/react-core/src/components/FormSelect/examples/FormSelectDisabled.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FormSelect, FormSelectOption } from '@patternfly/react-core'; export const FormSelectDisabled: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FormSelect/examples/FormSelectGrouped.tsx b/packages/react-core/src/components/FormSelect/examples/FormSelectGrouped.tsx index 238ce1836e8..9aafd8a6c5c 100644 --- a/packages/react-core/src/components/FormSelect/examples/FormSelectGrouped.tsx +++ b/packages/react-core/src/components/FormSelect/examples/FormSelectGrouped.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { FormSelect, FormSelectOption, FormSelectOptionGroup } from '@patternfly/react-core'; export const FormSelectGrouped: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/FormSelect/examples/FormSelectValidated.tsx b/packages/react-core/src/components/FormSelect/examples/FormSelectValidated.tsx index 548444aa126..0ccd5624d33 100644 --- a/packages/react-core/src/components/FormSelect/examples/FormSelectValidated.tsx +++ b/packages/react-core/src/components/FormSelect/examples/FormSelectValidated.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Form, FormGroup, diff --git a/packages/react-core/src/components/HelperText/examples/HelperTextBasic.tsx b/packages/react-core/src/components/HelperText/examples/HelperTextBasic.tsx index 0ef67cced25..fbb168c8de2 100644 --- a/packages/react-core/src/components/HelperText/examples/HelperTextBasic.tsx +++ b/packages/react-core/src/components/HelperText/examples/HelperTextBasic.tsx @@ -1,8 +1,8 @@ -import React from 'react'; +import { Fragment } from 'react'; import { HelperText, HelperTextItem } from '@patternfly/react-core'; export const HelperTextBasic: React.FunctionComponent = () => ( - + This is default helper text @@ -18,5 +18,5 @@ export const HelperTextBasic: React.FunctionComponent = () => ( This is error helper text - + ); diff --git a/packages/react-core/src/components/HelperText/examples/HelperTextMultipleItems.tsx b/packages/react-core/src/components/HelperText/examples/HelperTextMultipleItems.tsx index b8fc8b2afc8..0512e8c4e3f 100644 --- a/packages/react-core/src/components/HelperText/examples/HelperTextMultipleItems.tsx +++ b/packages/react-core/src/components/HelperText/examples/HelperTextMultipleItems.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { HelperText, HelperTextItem } from '@patternfly/react-core'; export const HelperTextMultipleItems: React.FunctionComponent = () => ( diff --git a/packages/react-core/src/components/HelperText/examples/HelperTextWithCustomIcon.tsx b/packages/react-core/src/components/HelperText/examples/HelperTextWithCustomIcon.tsx index 162f573a655..04dbb3c0a67 100644 --- a/packages/react-core/src/components/HelperText/examples/HelperTextWithCustomIcon.tsx +++ b/packages/react-core/src/components/HelperText/examples/HelperTextWithCustomIcon.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { HelperText, HelperTextItem } from '@patternfly/react-core'; import InfoIcon from '@patternfly/react-icons/dist/esm/icons/info-icon'; import QuestionIcon from '@patternfly/react-icons/dist/esm/icons/question-icon'; @@ -7,7 +7,7 @@ import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; export const HelperTextWithCustomIcon: React.FunctionComponent = () => ( - + }>This is default helper text @@ -31,5 +31,5 @@ export const HelperTextWithCustomIcon: React.FunctionComponent = () => ( This is error helper text - + ); diff --git a/packages/react-core/src/components/Hint/__tests__/HintBody.test.tsx b/packages/react-core/src/components/Hint/__tests__/HintBody.test.tsx index 8c2c72b7b78..e2a2565655e 100644 --- a/packages/react-core/src/components/Hint/__tests__/HintBody.test.tsx +++ b/packages/react-core/src/components/Hint/__tests__/HintBody.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; import styles from '@patternfly/react-styles/css/components/Hint/hint'; diff --git a/packages/react-core/src/components/Hint/__tests__/HintFooter.test.tsx b/packages/react-core/src/components/Hint/__tests__/HintFooter.test.tsx index 1e8e6daac33..855bb4f0c56 100644 --- a/packages/react-core/src/components/Hint/__tests__/HintFooter.test.tsx +++ b/packages/react-core/src/components/Hint/__tests__/HintFooter.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; import styles from '@patternfly/react-styles/css/components/Hint/hint'; diff --git a/packages/react-core/src/components/Hint/__tests__/HintTitle.test.tsx b/packages/react-core/src/components/Hint/__tests__/HintTitle.test.tsx index 62164522f20..40bbbc917ce 100644 --- a/packages/react-core/src/components/Hint/__tests__/HintTitle.test.tsx +++ b/packages/react-core/src/components/Hint/__tests__/HintTitle.test.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; import styles from '@patternfly/react-styles/css/components/Hint/hint'; diff --git a/packages/react-core/src/components/Hint/examples/HintActionsWithNoOffset.tsx b/packages/react-core/src/components/Hint/examples/HintActionsWithNoOffset.tsx index abc220e5d61..96e8259a5af 100644 --- a/packages/react-core/src/components/Hint/examples/HintActionsWithNoOffset.tsx +++ b/packages/react-core/src/components/Hint/examples/HintActionsWithNoOffset.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Hint, HintTitle, HintBody, Button, Checkbox } from '@patternfly/react-core'; export const HintActionsWithNoOffset: React.FunctionComponent = () => { diff --git a/packages/react-core/src/components/Hint/examples/HintBasicWithTitle.tsx b/packages/react-core/src/components/Hint/examples/HintBasicWithTitle.tsx index 94f7a9d6f68..1d7997114b2 100644 --- a/packages/react-core/src/components/Hint/examples/HintBasicWithTitle.tsx +++ b/packages/react-core/src/components/Hint/examples/HintBasicWithTitle.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Hint, HintTitle, diff --git a/packages/react-core/src/components/Hint/examples/HintBasicWithoutTitle.tsx b/packages/react-core/src/components/Hint/examples/HintBasicWithoutTitle.tsx index 9c2f5cf82fd..7884dc245fa 100644 --- a/packages/react-core/src/components/Hint/examples/HintBasicWithoutTitle.tsx +++ b/packages/react-core/src/components/Hint/examples/HintBasicWithoutTitle.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Hint, HintBody, @@ -70,7 +70,7 @@ export const HintBasicWithoutTitle: React.FunctionComponent = () => { ); return ( - + Welcome to the new documentation experience. @@ -90,6 +90,6 @@ export const HintBasicWithoutTitle: React.FunctionComponent = () => { - + ); }; diff --git a/packages/react-core/src/components/Icon/examples/BodyIconSizes.tsx b/packages/react-core/src/components/Icon/examples/BodyIconSizes.tsx index 97cfd0d9cad..e73b3a38326 100644 --- a/packages/react-core/src/components/Icon/examples/BodyIconSizes.tsx +++ b/packages/react-core/src/components/Icon/examples/BodyIconSizes.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; export const BodyIconSizes: React.FunctionComponent = () => ( - + {' '} @@ -13,5 +13,5 @@ export const BodyIconSizes: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/Icon/examples/HeadingIconSizes.tsx b/packages/react-core/src/components/Icon/examples/HeadingIconSizes.tsx index a7ad0d280c0..ecfd754b517 100644 --- a/packages/react-core/src/components/Icon/examples/HeadingIconSizes.tsx +++ b/packages/react-core/src/components/Icon/examples/HeadingIconSizes.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; export const HeadingIconSizes: React.FunctionComponent = () => ( - + {' '} @@ -22,5 +22,5 @@ export const HeadingIconSizes: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/Icon/examples/IconBasic.tsx b/packages/react-core/src/components/Icon/examples/IconBasic.tsx index d5b4cb9f523..fb6ad36afb6 100644 --- a/packages/react-core/src/components/Icon/examples/IconBasic.tsx +++ b/packages/react-core/src/components/Icon/examples/IconBasic.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon } from '@patternfly/react-core'; import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon'; import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; @@ -6,7 +6,7 @@ import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-ico import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon'; export const IconBasic: React.FunctionComponent = () => ( - + {' '} @@ -19,5 +19,5 @@ export const IconBasic: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/Icon/examples/IconContentSizes.tsx b/packages/react-core/src/components/Icon/examples/IconContentSizes.tsx index 5267cac37be..26b78557a58 100644 --- a/packages/react-core/src/components/Icon/examples/IconContentSizes.tsx +++ b/packages/react-core/src/components/Icon/examples/IconContentSizes.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; export const IconContentSizes: React.FunctionComponent = () => ( - + {' '} @@ -16,5 +16,5 @@ export const IconContentSizes: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/Icon/examples/IconCustomProgress.tsx b/packages/react-core/src/components/Icon/examples/IconCustomProgress.tsx index faa64ccec9d..9e319fc0191 100644 --- a/packages/react-core/src/components/Icon/examples/IconCustomProgress.tsx +++ b/packages/react-core/src/components/Icon/examples/IconCustomProgress.tsx @@ -1,11 +1,11 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon, Spinner, Checkbox } from '@patternfly/react-core'; import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; export const IconProgress: React.FunctionComponent = () => { const [isInProgress, setIsInProgress] = React.useState(false); return ( - +
    { }> - + ); }; diff --git a/packages/react-core/src/components/Icon/examples/IconInline.tsx b/packages/react-core/src/components/Icon/examples/IconInline.tsx index 19b3a273b39..db07fb69ec8 100644 --- a/packages/react-core/src/components/Icon/examples/IconInline.tsx +++ b/packages/react-core/src/components/Icon/examples/IconInline.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon, Content } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; export const IconInline: React.FunctionComponent = () => ( - +

    Heading @@ -56,5 +56,5 @@ export const IconInline: React.FunctionComponent = () => ( extra large - + ); diff --git a/packages/react-core/src/components/Icon/examples/IconProgress.tsx b/packages/react-core/src/components/Icon/examples/IconProgress.tsx index 892f4768cdc..b9889989a84 100644 --- a/packages/react-core/src/components/Icon/examples/IconProgress.tsx +++ b/packages/react-core/src/components/Icon/examples/IconProgress.tsx @@ -1,11 +1,11 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon, Checkbox } from '@patternfly/react-core'; import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; export const IconProgress: React.FunctionComponent = () => { const [isInProgress, setIsInProgress] = React.useState(false); return ( - +
    { - + ); }; diff --git a/packages/react-core/src/components/Icon/examples/IconStatus.tsx b/packages/react-core/src/components/Icon/examples/IconStatus.tsx index 3995b578695..01728bf3e47 100644 --- a/packages/react-core/src/components/Icon/examples/IconStatus.tsx +++ b/packages/react-core/src/components/Icon/examples/IconStatus.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon } from '@patternfly/react-core'; import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; @@ -7,7 +7,7 @@ import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-i import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; export const IconStatus: React.FunctionComponent = () => ( - + {' '} @@ -23,5 +23,5 @@ export const IconStatus: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/Icon/examples/StandaloneIconSizes.tsx b/packages/react-core/src/components/Icon/examples/StandaloneIconSizes.tsx index 87ab0a5375a..874c3490bf0 100644 --- a/packages/react-core/src/components/Icon/examples/StandaloneIconSizes.tsx +++ b/packages/react-core/src/components/Icon/examples/StandaloneIconSizes.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Icon } from '@patternfly/react-core'; import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; export const StandaloneIconSizes: React.FunctionComponent = () => ( - + {' '} @@ -22,5 +22,5 @@ export const StandaloneIconSizes: React.FunctionComponent = () => ( - + ); diff --git a/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx b/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx index 0c9b1534937..f6b5f0cd645 100644 --- a/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx +++ b/packages/react-core/src/components/InputGroup/__tests__/InputGroup.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { InputGroup } from '../InputGroup'; diff --git a/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx b/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx index 76405bffb9a..bfa530e10f2 100644 --- a/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx +++ b/packages/react-core/src/components/InputGroup/__tests__/InputGroupText.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen } from '@testing-library/react'; import { InputGroupText } from '../InputGroupText'; diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx index c2db8ff8e3e..79290d4a4ba 100644 --- a/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx +++ b/packages/react-core/src/components/InputGroup/examples/InputGroupBasic.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import AtIcon from '@patternfly/react-icons/dist/esm/icons/at-icon'; import { InputGroup, InputGroupText, InputGroupItem, TextInput, ValidatedOptions } from '@patternfly/react-core'; export const InputGroupBasic: React.FunctionComponent = () => ( - + @@ -33,5 +33,5 @@ export const InputGroupBasic: React.FunctionComponent = () => ( % - + ); diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx index c71847a6803..a74d789c126 100644 --- a/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx +++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithDropdown.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import { Button, InputGroup, @@ -23,7 +23,7 @@ export const InputGroupWithDropdown: React.FunctionComponent = () => { }; return ( - + { - + ); }; diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx index 20e95a97ea3..4f4927e7042 100644 --- a/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx +++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithPopover.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import { Fragment } from 'react'; import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; import { Button, InputGroup, InputGroupItem, TextInput, Popover, PopoverPosition } from '@patternfly/react-core'; @@ -6,7 +6,7 @@ export const InputGroupWithPopover: React.FunctionComponent = () => { const inputGroupRef1 = React.useRef(null); const inputGroupRef2 = React.useRef(null); return ( - + { - + ); }; diff --git a/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx b/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx index 1a3ff7bc887..432cb630edf 100644 --- a/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx +++ b/packages/react-core/src/components/InputGroup/examples/InputGroupWithSiblings.tsx @@ -1,9 +1,9 @@ -import React from 'react'; +import { Fragment } from 'react'; import DollarSignIcon from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon'; import { Button, TextArea, InputGroup, InputGroupText, InputGroupItem, TextInput } from '@patternfly/react-core'; export const InputGroupWithSiblings: React.FunctionComponent = () => ( - +