From 9e26724e09502a216678cf15ea5c061386d47a54 Mon Sep 17 00:00:00 2001 From: logonoff Date: Sun, 22 Mar 2026 15:59:11 -0400 Subject: [PATCH 1/4] OCPBUGS-79315: fix treeshaking of pf/react-icons --- .../ClusterConfigurationPage.tsx | 3 +-- .../ConsoleOperatorConfig.tsx | 2 +- .../components/data-view/ConsoleDataView.tsx | 2 +- .../src/components/nav/NavHeader.tsx | 2 +- .../src/components/nav/PinnedResource.tsx | 3 +-- .../components/nodes/NodeDetailsOverview.tsx | 2 +- .../src/components/nodes/NodesPage.tsx | 2 +- .../src/components/nodes/status/CSRStatus.tsx | 2 +- .../quick-starts/QuickStartEmptyState.tsx | 3 +-- .../namespace/NamespaceDropdown.tsx | 2 +- .../volume-snapshot/volume-snapshot.tsx | 2 +- .../console-app/src/utils/perspective.tsx | 2 +- .../src/components/Tooltip/Tooltip.tsx | 4 ++-- .../actions/menu/ActionMenuToggle.tsx | 2 +- .../components/alerts/AlertSeverityIcon.tsx | 3 +-- .../catalog-view/CatalogEmptyState.tsx | 2 +- .../dashboard/activity-card/ActivityBody.tsx | 3 +-- .../dashboard/activity-card/ActivityItem.tsx | 2 +- .../inventory-card/InventoryItem.tsx | 3 +-- .../dashboard/status-card/AlertsBody.tsx | 2 +- .../dashboard/status-card/states.tsx | 2 +- .../src/components/datetime/Timestamp.tsx | 2 +- .../src/components/dynamic-form/templates.tsx | 3 +-- .../form-utils/ActionGroupWithIcons.tsx | 2 +- .../src/components/form-utils/FormFooter.tsx | 2 +- .../formik-fields/MultiTypeaheadField.tsx | 2 +- .../item-selector-field/SelectorCard.tsx | 2 +- .../KeyValueFileInputField.tsx | 3 +-- .../MultiColumnFieldFooter.tsx | 2 +- .../MultiColumnFieldRow.tsx | 2 +- .../TextColumnItemContent.tsx | 3 +-- .../GettingStartedExpandableGrid.tsx | 3 +-- .../QuickStartGettingStartedCard.tsx | 2 +- .../src/components/pod/PodRing.tsx | 4 +--- .../src/components/pod/PodRingSet.tsx | 2 +- .../pod/__tests__/PodRingSet.spec.tsx | 5 +++-- .../src/components/popover/Popover.tsx | 10 ++++----- .../components/query-browser/QueryBrowser.tsx | 2 +- .../src/components/shortcuts/Shortcut.tsx | 2 +- .../src/components/status/icons.tsx | 12 +++++----- .../src/components/status/statuses.tsx | 2 +- .../src/components/ImageVulnerabilityRow.tsx | 2 +- .../ImageVulnerabilityToggleGroup.tsx | 2 +- .../src/components/image-manifest-vuln.tsx | 2 +- .../src/components/summary.tsx | 2 +- .../packages/container-security/src/const.ts | 12 +++++----- .../dev-console/src/actions/add-resources.tsx | 16 ++++++++------ .../add/AddCardSectionEmptyState.tsx | 3 +-- .../add/__tests__/add-page-test-data.tsx | 3 +-- .../advanced-options/LifecycleHookField.tsx | 3 +-- .../components/guided-tour/GuidedTourText.tsx | 2 +- .../health-checks/HealthCheckProbe.tsx | 3 +-- .../components/hpa/HPAUtilizationField.tsx | 2 +- .../import/ImportStrategySection.tsx | 3 +-- .../import/ImportStrategySelector.tsx | 5 +---- .../import/__tests__/render-utils.spec.ts | 5 +---- .../components/import/devfile/DevfileInfo.tsx | 2 +- .../components/import/git/DockerSection.tsx | 2 +- .../src/components/import/git/SampleRepo.tsx | 2 +- .../src/components/import/render-utils.tsx | 5 +---- .../overview/MonitoringOverview.tsx | 2 +- .../__tests__/MonitoringOverview.spec.tsx | 3 ++- .../pipeline/WebhookSection.tsx | 2 +- .../CustomTaskNode.tsx | 2 +- .../pipelines-visualization/reducer.ts | 10 ++++----- .../dev-console/src/models/pipelines.ts | 2 +- .../packages/dev-console/src/utils/icons.tsx | 22 ++++++++++--------- .../dev-console/src/utils/perspective.tsx | 2 +- .../notes/HelmReleaseNotesEmptyState.tsx | 2 +- .../HelmChartVersionDropdown.tsx | 2 +- .../components/list-page/HelmReleaseList.tsx | 2 +- .../packages/helm-plugin/src/utils/icons.tsx | 2 +- .../src/components/InsightsPopup/mappers.ts | 10 +++++---- .../overview/EventPubSubExpandButton.tsx | 3 +-- .../components/test-function/RequestPane.tsx | 2 +- .../packages/knative-plugin/src/models.ts | 4 ++-- .../decorators/RevisionRouteDecorator.tsx | 2 +- .../decorators/ServiceRouteDecorator.tsx | 2 +- .../topology/components/nodes/SinkUriNode.tsx | 3 +-- .../utils/fetch-dynamic-eventsources-utils.ts | 2 +- .../baremetal-hosts/BareMetalHostDetails.tsx | 2 +- .../baremetal-hosts/BareMetalHostNICs.tsx | 3 +-- .../BareMetalHostPowerStatusIcon.tsx | 4 +--- .../baremetal-hosts/dashboard/StatusCard.tsx | 2 +- .../maintenance/MaintenanceIcon.tsx | 2 +- .../maintenance/MaintenancePopover.tsx | 3 +-- .../src/components/OLMv1Switch.tsx | 2 +- .../src/components/clusterserviceversion.tsx | 3 +-- .../src/components/descriptors/common.tsx | 3 +-- .../components/descriptors/spec/affinity.tsx | 3 +-- .../descriptors/spec/match-expressions.tsx | 3 +-- .../spec/resource-requirements.tsx | 2 +- .../components/descriptors/status/phase.tsx | 2 +- .../components/descriptors/status/pods.tsx | 4 ++-- .../operand/DEPRECATED_operand-form.tsx | 3 +-- .../operator-hub-item-details.tsx | 2 +- .../src/components/subscription.tsx | 3 +-- .../packages/shipwright-plugin/src/models.ts | 2 +- .../src/behavior/withCreateConnector.tsx | 2 +- .../graph-view/components/RegroupHint.tsx | 2 +- .../nodes/decorators/UrlDecorator.tsx | 2 +- .../components/page/LimitExceededState.tsx | 2 +- .../components/page/TopologyEmptyState.tsx | 2 +- .../components/page/TopologyPageToolbar.tsx | 4 +--- .../src/components/workload/BuildOverview.tsx | 2 +- .../workload/NetworkingOverview.tsx | 2 +- .../src/filters/NameLabelFilterDropdown.tsx | 2 +- .../src/filters/TopologyFilterBar.tsx | 2 +- .../vsphere-plugin/src/PopoverHelpButton.tsx | 2 +- .../components/VSphereOperatorStatuses.tsx | 10 +++++---- .../cloud-shell/CloudShellMastheadAction.tsx | 2 +- .../cloud-shell/CloudShellMastheadButton.tsx | 2 +- .../cloud-shell/MinimizeRestoreButton.tsx | 3 +-- frontend/public/components/alert-manager.tsx | 2 +- frontend/public/components/api-explorer.tsx | 2 +- frontend/public/components/build-pipeline.tsx | 5 +---- .../cluster-settings/cluster-operator.tsx | 5 ++--- .../cluster-settings/cluster-status.tsx | 3 +-- .../components/configmap-and-secret-data.tsx | 3 +-- .../components/custom-resource-definition.tsx | 2 +- .../cluster-dashboard/details-card.tsx | 2 +- .../cluster-setup-getting-started-card.tsx | 3 +-- ...re-admin-features-getting-started-card.tsx | 2 +- .../DeveloperFeaturesGettingStartedCard.tsx | 2 +- .../SampleGettingStartedCard.tsx | 2 +- frontend/public/components/edit-yaml.tsx | 4 +--- .../factory/Table/VirtualizedTableBody.tsx | 2 +- frontend/public/components/factory/table.tsx | 2 +- frontend/public/components/filter-toolbar.tsx | 3 +-- frontend/public/components/graphs/tooltip.tsx | 4 ++-- frontend/public/components/graphs/utils.ts | 2 +- .../components/image-stream-timeline.tsx | 3 +-- frontend/public/components/image-stream.tsx | 3 +-- .../public/components/machine-config-pool.tsx | 3 +-- frontend/public/components/machine-set.tsx | 2 +- .../components/masthead/masthead-toolbar.tsx | 5 +---- .../modals/impersonate-user-modal.tsx | 3 +-- .../public/components/modals/taints-modal.tsx | 3 +-- .../components/modals/tolerations-modal.tsx | 3 +-- .../alertmanager/alertmanager-config.tsx | 2 +- .../receiver-forms/routing-labels-editor.tsx | 4 +--- frontend/public/components/namespace.jsx | 2 +- .../components/persistent-volume-claim.tsx | 2 +- frontend/public/components/pod-connect.tsx | 2 +- frontend/public/components/pod-list.tsx | 2 +- frontend/public/components/pod-traffic.tsx | 3 +-- frontend/public/components/resource-quota.jsx | 13 ++++++----- .../components/search-filter-dropdown.tsx | 2 +- frontend/public/components/search.tsx | 3 +-- .../create-secret/OpaqueSecretForm.tsx | 2 +- .../create-secret/OpaqueSecretFormEntry.tsx | 2 +- .../PullSecretCredentialEntry.tsx | 2 +- .../PullSecretCredentialsForm.tsx | 2 +- .../sidebars/resource-sidebar-samples.tsx | 10 +++++---- frontend/public/components/start-guide.tsx | 2 +- .../public/components/template-instance.tsx | 2 +- .../public/components/utils/details-item.tsx | 2 +- .../public/components/utils/details-page.tsx | 2 +- .../components/utils/download-button.tsx | 3 +-- .../components/utils/field-level-help.tsx | 2 +- frontend/public/components/utils/kebab.tsx | 2 +- .../public/components/utils/list-input.tsx | 3 +-- .../components/utils/name-value-editor.jsx | 5 +---- frontend/public/components/utils/selector.tsx | 2 +- .../utils/single-typeahead-dropdown.tsx | 2 +- .../public/components/utils/toggle-play.tsx | 3 +-- frontend/public/components/utils/webhooks.tsx | 2 +- 167 files changed, 234 insertions(+), 289 deletions(-) diff --git a/frontend/packages/console-app/src/components/cluster-configuration/ClusterConfigurationPage.tsx b/frontend/packages/console-app/src/components/cluster-configuration/ClusterConfigurationPage.tsx index c206e379b01..f5d9608f2bf 100644 --- a/frontend/packages/console-app/src/components/cluster-configuration/ClusterConfigurationPage.tsx +++ b/frontend/packages/console-app/src/components/cluster-configuration/ClusterConfigurationPage.tsx @@ -11,8 +11,7 @@ import { TabTitleText, PageSection, } from '@patternfly/react-core'; -import { ExclamationTriangleIcon } from '@patternfly/react-icons'; -import { LockIcon } from '@patternfly/react-icons/dist/esm/icons/lock-icon'; +import { ExclamationTriangleIcon, LockIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { useParams, useNavigate } from 'react-router'; import { LoadingBox } from '@console/internal/components/utils/status-box'; diff --git a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx index 7f0d90d304c..086f65f20b5 100644 --- a/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx +++ b/frontend/packages/console-app/src/components/console-operator/ConsoleOperatorConfig.tsx @@ -2,7 +2,7 @@ import type { FC, ComponentProps } from 'react'; import { useMemo, useState, useCallback } from 'react'; import type { PluginInfoEntry } from '@openshift/dynamic-plugin-sdk'; import { Alert, Button } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import type { ISortBy, OnSort } from '@patternfly/react-table'; import { SortByDirection, Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx b/frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx index 6297d454ec9..7ee351a86d4 100644 --- a/frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx +++ b/frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx @@ -13,7 +13,7 @@ import { DataViewTable, DataViewToolbar, } from '@patternfly/react-data-view'; -import DataViewFilters from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import DataViewFilters from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import { ColumnsIcon, UndoIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { InnerScrollContainer, Tbody, Td, Tr } from '@patternfly/react-table'; diff --git a/frontend/packages/console-app/src/components/nav/NavHeader.tsx b/frontend/packages/console-app/src/components/nav/NavHeader.tsx index 14641adb0d3..c73c4919b1a 100644 --- a/frontend/packages/console-app/src/components/nav/NavHeader.tsx +++ b/frontend/packages/console-app/src/components/nav/NavHeader.tsx @@ -2,7 +2,7 @@ import type { FC, MouseEvent, Ref } from 'react'; import { useMemo, lazy, useState, useCallback, Suspense } from 'react'; import type { MenuToggleElement } from '@patternfly/react-core'; import { MenuToggle, Select, SelectList, SelectOption, Title } from '@patternfly/react-core'; -import { CogsIcon } from '@patternfly/react-icons/dist/esm/icons/cogs-icon'; +import { CogsIcon } from '@patternfly/react-icons'; import { t } from 'i18next'; import type { Perspective } from '@console/dynamic-plugin-sdk'; import { useActivePerspective } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/console-app/src/components/nav/PinnedResource.tsx b/frontend/packages/console-app/src/components/nav/PinnedResource.tsx index ef56fdc2db8..6ed7ded0942 100644 --- a/frontend/packages/console-app/src/components/nav/PinnedResource.tsx +++ b/frontend/packages/console-app/src/components/nav/PinnedResource.tsx @@ -1,7 +1,6 @@ import type { FC, MouseEvent, ReactElement } from 'react'; import { Button } from '@patternfly/react-core'; -import { GripVerticalIcon } from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { GripVerticalIcon, MinusCircleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { debounce } from 'lodash'; import { useDrag, useDrop } from 'react-dnd'; diff --git a/frontend/packages/console-app/src/components/nodes/NodeDetailsOverview.tsx b/frontend/packages/console-app/src/components/nodes/NodeDetailsOverview.tsx index 65d13e7778e..c2edc749dd2 100644 --- a/frontend/packages/console-app/src/components/nodes/NodeDetailsOverview.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodeDetailsOverview.tsx @@ -8,7 +8,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { diff --git a/frontend/packages/console-app/src/components/nodes/NodesPage.tsx b/frontend/packages/console-app/src/components/nodes/NodesPage.tsx index 2a2aefc2bfb..ce9aed14cc8 100644 --- a/frontend/packages/console-app/src/components/nodes/NodesPage.tsx +++ b/frontend/packages/console-app/src/components/nodes/NodesPage.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useMemo, useCallback, useEffect, Suspense } from 'react'; import { DataViewCheckboxFilter } from '@patternfly/react-data-view'; -import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { diff --git a/frontend/packages/console-app/src/components/nodes/status/CSRStatus.tsx b/frontend/packages/console-app/src/components/nodes/status/CSRStatus.tsx index 1b305b12eb0..651cefdeb90 100644 --- a/frontend/packages/console-app/src/components/nodes/status/CSRStatus.tsx +++ b/frontend/packages/console-app/src/components/nodes/status/CSRStatus.tsx @@ -9,7 +9,7 @@ import { SplitItem, ExpandableSection, } from '@patternfly/react-core'; -import { AddCircleOIcon } from '@patternfly/react-icons/dist/esm/icons/add-circle-o-icon'; +import { AddCircleOIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import type { CertificateSigningRequestKind, diff --git a/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx b/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx index d8f684d0c4a..0baf5f8dad8 100644 --- a/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx +++ b/frontend/packages/console-app/src/components/quick-starts/QuickStartEmptyState.tsx @@ -7,8 +7,7 @@ import { EmptyStateVariant, Skeleton, } from '@patternfly/react-core'; -import { CubesIcon } from '@patternfly/react-icons/dist/esm/icons/cubes-icon'; -import { WrenchIcon } from '@patternfly/react-icons/dist/esm/icons/wrench-icon'; +import { CubesIcon, WrenchIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { QuickStartModel } from '@console/app/src/models'; import { useAccessReview } from '@console/dynamic-plugin-sdk/src/app/components/utils/rbac'; diff --git a/frontend/packages/console-app/src/components/user-preferences/namespace/NamespaceDropdown.tsx b/frontend/packages/console-app/src/components/user-preferences/namespace/NamespaceDropdown.tsx index 42c77e953fa..c739fb5d8ac 100644 --- a/frontend/packages/console-app/src/components/user-preferences/namespace/NamespaceDropdown.tsx +++ b/frontend/packages/console-app/src/components/user-preferences/namespace/NamespaceDropdown.tsx @@ -10,7 +10,7 @@ import { MenuContent, MenuList, } from '@patternfly/react-core'; -import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; import fuzzysearch from 'fuzzysearch'; import { useTranslation } from 'react-i18next'; import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook'; diff --git a/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx b/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx index 793bc1c3c82..e82b457c8bf 100644 --- a/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx +++ b/frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useMemo, useCallback, Suspense } from 'react'; import { DataViewCheckboxFilter } from '@patternfly/react-data-view'; -import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router'; import { diff --git a/frontend/packages/console-app/src/utils/perspective.tsx b/frontend/packages/console-app/src/utils/perspective.tsx index 291b1092882..21c5654bcc0 100644 --- a/frontend/packages/console-app/src/utils/perspective.tsx +++ b/frontend/packages/console-app/src/utils/perspective.tsx @@ -1,4 +1,4 @@ -import { CogsIcon } from '@patternfly/react-icons/dist/esm/icons/cogs-icon'; +import { CogsIcon } from '@patternfly/react-icons'; import type { Perspective, ResolvedExtension } from '@console/dynamic-plugin-sdk'; import { FLAGS } from '@console/shared/src/constants/common'; diff --git a/frontend/packages/console-shared/src/components/Tooltip/Tooltip.tsx b/frontend/packages/console-shared/src/components/Tooltip/Tooltip.tsx index aa9a913e9c6..5f312c2cf21 100644 --- a/frontend/packages/console-shared/src/components/Tooltip/Tooltip.tsx +++ b/frontend/packages/console-shared/src/components/Tooltip/Tooltip.tsx @@ -5,8 +5,8 @@ * Remove this component once https://github.com/patternfly/patternfly-react/issues/5620 is fixed. */ import type { ReactNode, FC } from 'react'; -import { TooltipArrow } from '@patternfly/react-core/dist/js/components/Tooltip/TooltipArrow'; -import { TooltipContent } from '@patternfly/react-core/dist/js/components/Tooltip/TooltipContent'; +import { TooltipArrow } from '@patternfly/react-core/dist/esm/components/Tooltip/TooltipArrow'; +import { TooltipContent } from '@patternfly/react-core/dist/esm/components/Tooltip/TooltipContent'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Tooltip/tooltip'; import { Tippy } from '../popper/Tippy'; diff --git a/frontend/packages/console-shared/src/components/actions/menu/ActionMenuToggle.tsx b/frontend/packages/console-shared/src/components/actions/menu/ActionMenuToggle.tsx index ac87d49a7d1..f2892ebfbed 100644 --- a/frontend/packages/console-shared/src/components/actions/menu/ActionMenuToggle.tsx +++ b/frontend/packages/console-shared/src/components/actions/menu/ActionMenuToggle.tsx @@ -1,7 +1,7 @@ import type { RefObject, SetStateAction, FC } from 'react'; import { useEffect } from 'react'; import { MenuToggle } from '@patternfly/react-core'; -import { EllipsisVIcon } from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; +import { EllipsisVIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { ActionMenuVariant } from '../types'; diff --git a/frontend/packages/console-shared/src/components/alerts/AlertSeverityIcon.tsx b/frontend/packages/console-shared/src/components/alerts/AlertSeverityIcon.tsx index 1dea26493f7..cf77cd6b3dd 100644 --- a/frontend/packages/console-shared/src/components/alerts/AlertSeverityIcon.tsx +++ b/frontend/packages/console-shared/src/components/alerts/AlertSeverityIcon.tsx @@ -1,6 +1,5 @@ import type { FC, ReactElement } from 'react'; -import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; +import { ExclamationCircleIcon, ExclamationTriangleIcon } from '@patternfly/react-icons'; import { AlertSeverity } from '@console/dynamic-plugin-sdk'; interface AlertSeverityIconProps { diff --git a/frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogEmptyState.tsx b/frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogEmptyState.tsx index f175d806988..36405d96709 100644 --- a/frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogEmptyState.tsx +++ b/frontend/packages/console-shared/src/components/catalog/catalog-view/CatalogEmptyState.tsx @@ -7,7 +7,7 @@ import { EmptyStateActions, EmptyStateFooter, } from '@patternfly/react-core'; -import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; +import { SearchIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; type CatalogEmptyStateProps = { diff --git a/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityBody.tsx b/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityBody.tsx index 5b7d53eaed3..8c5d0cfb2b6 100644 --- a/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityBody.tsx +++ b/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityBody.tsx @@ -1,8 +1,7 @@ import type { FC, ReactNode } from 'react'; import { useRef, useEffect, useState, useCallback } from 'react'; import { Accordion, Button } from '@patternfly/react-core'; -import { PauseIcon } from '@patternfly/react-icons/dist/esm/icons/pause-icon'; -import { PlayIcon } from '@patternfly/react-icons/dist/esm/icons/play-icon'; +import { PauseIcon, PlayIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { useTranslation } from 'react-i18next'; import type { diff --git a/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityItem.tsx b/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityItem.tsx index 8ae33c29dfe..91e4b635362 100644 --- a/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityItem.tsx +++ b/frontend/packages/console-shared/src/components/dashboard/activity-card/ActivityItem.tsx @@ -1,6 +1,6 @@ import type { FC, ReactNode } from 'react'; import { Progress, ProgressSize } from '@patternfly/react-core'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; +import { InProgressIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import type { ActivityItemProps } from '@console/dynamic-plugin-sdk/src/api/internal-types'; diff --git a/frontend/packages/console-shared/src/components/dashboard/inventory-card/InventoryItem.tsx b/frontend/packages/console-shared/src/components/dashboard/inventory-card/InventoryItem.tsx index 9814f728875..40b4fae4a18 100644 --- a/frontend/packages/console-shared/src/components/dashboard/inventory-card/InventoryItem.tsx +++ b/frontend/packages/console-shared/src/components/dashboard/inventory-card/InventoryItem.tsx @@ -6,8 +6,7 @@ import { AccordionToggle, AccordionContent, } from '@patternfly/react-core'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; -import { QuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; +import { InProgressIcon, QuestionCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; import type { DashboardsInventoryItemGroup } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/console-shared/src/components/dashboard/status-card/AlertsBody.tsx b/frontend/packages/console-shared/src/components/dashboard/status-card/AlertsBody.tsx index c46eae44551..c8a4c9ea58a 100644 --- a/frontend/packages/console-shared/src/components/dashboard/status-card/AlertsBody.tsx +++ b/frontend/packages/console-shared/src/components/dashboard/status-card/AlertsBody.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { Children } from 'react'; import { EmptyState, EmptyStateVariant, EmptyStateBody } from '@patternfly/react-core'; -import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon'; +import { UnknownIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import type { AlertsBodyProps } from '@console/dynamic-plugin-sdk/src/api/internal-types'; diff --git a/frontend/packages/console-shared/src/components/dashboard/status-card/states.tsx b/frontend/packages/console-shared/src/components/dashboard/status-card/states.tsx index 5e6adba784f..d68de26da3b 100644 --- a/frontend/packages/console-shared/src/components/dashboard/status-card/states.tsx +++ b/frontend/packages/console-shared/src/components/dashboard/status-card/states.tsx @@ -1,5 +1,5 @@ import type { ReactElement } from 'react'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; +import { InProgressIcon } from '@patternfly/react-icons'; import type { TFunction } from 'i18next'; import { HealthState } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { diff --git a/frontend/packages/console-shared/src/components/datetime/Timestamp.tsx b/frontend/packages/console-shared/src/components/datetime/Timestamp.tsx index 0a689f7585c..998523e75e6 100644 --- a/frontend/packages/console-shared/src/components/datetime/Timestamp.tsx +++ b/frontend/packages/console-shared/src/components/datetime/Timestamp.tsx @@ -1,5 +1,5 @@ import { Tooltip } from '@patternfly/react-core'; -import { GlobeAmericasIcon } from '@patternfly/react-icons/dist/esm/icons/globe-americas-icon'; +import { GlobeAmericasIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { getLastLanguage } from '@console/app/src/components/user-preferences/language/getLastLanguage'; import type { TimestampProps } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/console-shared/src/components/dynamic-form/templates.tsx b/frontend/packages/console-shared/src/components/dynamic-form/templates.tsx index c1b7e3dc58d..74dd52ff163 100644 --- a/frontend/packages/console-shared/src/components/dynamic-form/templates.tsx +++ b/frontend/packages/console-shared/src/components/dynamic-form/templates.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import { useState, useEffect } from 'react'; import { Button, Alert, Divider, FormHelperText } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import type { ArrayFieldTemplateProps, FieldTemplateProps, diff --git a/frontend/packages/console-shared/src/components/form-utils/ActionGroupWithIcons.tsx b/frontend/packages/console-shared/src/components/form-utils/ActionGroupWithIcons.tsx index d15674f8c03..c19e4864d29 100644 --- a/frontend/packages/console-shared/src/components/form-utils/ActionGroupWithIcons.tsx +++ b/frontend/packages/console-shared/src/components/form-utils/ActionGroupWithIcons.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { CloseButton } from '@patternfly/react-component-groups'; import { ActionGroup, Button, ButtonVariant } from '@patternfly/react-core'; -import { CheckIcon } from '@patternfly/react-icons/dist/esm/icons/check-icon'; +import { CheckIcon } from '@patternfly/react-icons'; import type { ActionGroupWithIconsProps } from './form-utils-types'; const ActionGroupWithIcons: FC = ({ onSubmit, onClose, isDisabled }) => { diff --git a/frontend/packages/console-shared/src/components/form-utils/FormFooter.tsx b/frontend/packages/console-shared/src/components/form-utils/FormFooter.tsx index e8d1611ea18..e58cc59feed 100644 --- a/frontend/packages/console-shared/src/components/form-utils/FormFooter.tsx +++ b/frontend/packages/console-shared/src/components/form-utils/FormFooter.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { ActionGroup, Alert, Button, ButtonVariant } from '@patternfly/react-core'; -import { DownloadIcon } from '@patternfly/react-icons/dist/esm/icons/download-icon'; +import { DownloadIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { useTranslation } from 'react-i18next'; import { ButtonBar } from '@console/internal/components/utils/button-bar'; diff --git a/frontend/packages/console-shared/src/components/formik-fields/MultiTypeaheadField.tsx b/frontend/packages/console-shared/src/components/formik-fields/MultiTypeaheadField.tsx index 02931a3fa17..b362f19a94e 100644 --- a/frontend/packages/console-shared/src/components/formik-fields/MultiTypeaheadField.tsx +++ b/frontend/packages/console-shared/src/components/formik-fields/MultiTypeaheadField.tsx @@ -17,7 +17,7 @@ import { TextInputGroupUtilities, Button, } from '@patternfly/react-core'; -import { TimesIcon } from '@patternfly/react-icons/dist/esm/icons/times-icon'; +import { TimesIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useField, useFormikContext } from 'formik'; import * as _ from 'lodash'; diff --git a/frontend/packages/console-shared/src/components/formik-fields/item-selector-field/SelectorCard.tsx b/frontend/packages/console-shared/src/components/formik-fields/item-selector-field/SelectorCard.tsx index a80f7f058ef..911fc5349db 100644 --- a/frontend/packages/console-shared/src/components/formik-fields/item-selector-field/SelectorCard.tsx +++ b/frontend/packages/console-shared/src/components/formik-fields/item-selector-field/SelectorCard.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { Card, CardBody, CardTitle } from '@patternfly/react-core'; -import { StarIcon } from '@patternfly/react-icons/dist/esm/icons/star-icon'; +import { StarIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import './SelectorCard.scss'; diff --git a/frontend/packages/console-shared/src/components/formik-fields/key-value-file-input-field/KeyValueFileInputField.tsx b/frontend/packages/console-shared/src/components/formik-fields/key-value-file-input-field/KeyValueFileInputField.tsx index 0713ae4d572..eb793a27d46 100644 --- a/frontend/packages/console-shared/src/components/formik-fields/key-value-file-input-field/KeyValueFileInputField.tsx +++ b/frontend/packages/console-shared/src/components/formik-fields/key-value-file-input-field/KeyValueFileInputField.tsx @@ -10,8 +10,7 @@ import { HelperText, HelperTextItem, } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { FieldArray, useField, useFormikContext } from 'formik'; import { get, uniqueId } from 'lodash'; diff --git a/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldFooter.tsx b/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldFooter.tsx index 7ff4fa2510b..6427c83d62b 100644 --- a/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldFooter.tsx +++ b/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldFooter.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { Button, Tooltip } from '@patternfly/react-core'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { PlusCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; export interface MultiColumnFieldFooterProps { diff --git a/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldRow.tsx b/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldRow.tsx index e0080de3083..35e2b158531 100644 --- a/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldRow.tsx +++ b/frontend/packages/console-shared/src/components/formik-fields/multi-column-field/MultiColumnFieldRow.tsx @@ -2,7 +2,7 @@ import type { ReactNode, ReactElement, FC } from 'react'; import { Children, cloneElement } from 'react'; import type { gridItemSpanValueShape } from '@patternfly/react-core'; import { Tooltip, Button, ButtonVariant, ButtonType, GridItem, Grid } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { MinusCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import './MultiColumnField.scss'; diff --git a/frontend/packages/console-shared/src/components/formik-fields/text-column-field/TextColumnItemContent.tsx b/frontend/packages/console-shared/src/components/formik-fields/text-column-field/TextColumnItemContent.tsx index 94ad24d37db..b40d0bd8599 100644 --- a/frontend/packages/console-shared/src/components/formik-fields/text-column-field/TextColumnItemContent.tsx +++ b/frontend/packages/console-shared/src/components/formik-fields/text-column-field/TextColumnItemContent.tsx @@ -8,8 +8,7 @@ import { ButtonType, Tooltip, } from '@patternfly/react-core'; -import { GripVerticalIcon } from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { GripVerticalIcon, MinusCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import InputField from '../InputField'; import type { diff --git a/frontend/packages/console-shared/src/components/getting-started/GettingStartedExpandableGrid.tsx b/frontend/packages/console-shared/src/components/getting-started/GettingStartedExpandableGrid.tsx index 0feadbdbf05..560b51df32d 100644 --- a/frontend/packages/console-shared/src/components/getting-started/GettingStartedExpandableGrid.tsx +++ b/frontend/packages/console-shared/src/components/getting-started/GettingStartedExpandableGrid.tsx @@ -8,8 +8,7 @@ import { CardExpandableContent, Popover, } from '@patternfly/react-core'; -import { TimesIcon } from '@patternfly/react-icons'; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; +import { TimesIcon, OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { GettingStartedShowState } from './useGettingStartedShowState'; diff --git a/frontend/packages/console-shared/src/components/getting-started/QuickStartGettingStartedCard.tsx b/frontend/packages/console-shared/src/components/getting-started/QuickStartGettingStartedCard.tsx index e2e181c3073..10dc78a3795 100644 --- a/frontend/packages/console-shared/src/components/getting-started/QuickStartGettingStartedCard.tsx +++ b/frontend/packages/console-shared/src/components/getting-started/QuickStartGettingStartedCard.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import type { AllQuickStartStates, QuickStart } from '@patternfly/quickstarts'; import { QuickStartStatus, getQuickStartStatus } from '@patternfly/quickstarts'; -import { RouteIcon } from '@patternfly/react-icons/dist/esm/icons/route-icon'; +import { RouteIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { QuickStartsLoader } from '@console/app/src/components/quick-starts/loader/QuickStartsLoader'; import { useQuickStartContext } from '@console/shared/src/hooks/useQuickStartContext'; diff --git a/frontend/packages/console-shared/src/components/pod/PodRing.tsx b/frontend/packages/console-shared/src/components/pod/PodRing.tsx index 0f527b3d0d2..40f7fd9fe12 100644 --- a/frontend/packages/console-shared/src/components/pod/PodRing.tsx +++ b/frontend/packages/console-shared/src/components/pod/PodRing.tsx @@ -1,9 +1,7 @@ import type { FC } from 'react'; import { useState, useEffect } from 'react'; import { Button, Split, SplitItem, Bullseye } from '@patternfly/react-core'; -import { AngleDownIcon } from '@patternfly/react-icons/dist/esm/icons/angle-down-icon'; -import { AngleUpIcon } from '@patternfly/react-icons/dist/esm/icons/angle-up-icon'; -import { AutomationIcon } from '@patternfly/react-icons/dist/esm/icons/automation-icon'; +import { AngleDownIcon, AngleUpIcon, AutomationIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import type { ImpersonateKind } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/console-shared/src/components/pod/PodRingSet.tsx b/frontend/packages/console-shared/src/components/pod/PodRingSet.tsx index 59b8dec52a0..89b8a47d30a 100644 --- a/frontend/packages/console-shared/src/components/pod/PodRingSet.tsx +++ b/frontend/packages/console-shared/src/components/pod/PodRingSet.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useMemo } from 'react'; import { Split, SplitItem, Bullseye, Icon } from '@patternfly/react-core'; -import { LongArrowAltRightIcon } from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-right-icon'; +import { LongArrowAltRightIcon } from '@patternfly/react-icons'; import { t_color_gray_50 as color200 } from '@patternfly/react-tokens'; import type { PodRingSetProps } from '@console/dynamic-plugin-sdk/src/extensions/topology-types'; import { LoadingInline } from '@console/internal/components/utils/status-box'; diff --git a/frontend/packages/console-shared/src/components/pod/__tests__/PodRingSet.spec.tsx b/frontend/packages/console-shared/src/components/pod/__tests__/PodRingSet.spec.tsx index dacbabeec60..7a5a030d064 100644 --- a/frontend/packages/console-shared/src/components/pod/__tests__/PodRingSet.spec.tsx +++ b/frontend/packages/console-shared/src/components/pod/__tests__/PodRingSet.spec.tsx @@ -1,4 +1,4 @@ -import { LongArrowAltRightIcon } from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-right-icon'; +import { LongArrowAltRightIcon } from '@patternfly/react-icons'; import { DeploymentConfigModel } from '@console/internal/models'; import type { K8sResourceKind, PodKind } from '@console/internal/module/k8s'; import * as usePodsWatcherModule from '../../../hooks/usePodsWatcher'; @@ -12,7 +12,8 @@ jest.mock('../PodRing', () => ({ default: jest.fn(() => null), })); -jest.mock('@patternfly/react-icons/dist/esm/icons/long-arrow-alt-right-icon', () => ({ +jest.mock('@patternfly/react-icons', () => ({ + ...jest.requireActual('@patternfly/react-icons'), LongArrowAltRightIcon: jest.fn(() => null), })); diff --git a/frontend/packages/console-shared/src/components/popover/Popover.tsx b/frontend/packages/console-shared/src/components/popover/Popover.tsx index ff7e1339245..c1b7b188e7d 100644 --- a/frontend/packages/console-shared/src/components/popover/Popover.tsx +++ b/frontend/packages/console-shared/src/components/popover/Popover.tsx @@ -1,10 +1,10 @@ import type { ReactNode, FC } from 'react'; import { FocusTrap, TitleSizes, Title } from '@patternfly/react-core'; -import { PopoverArrow } from '@patternfly/react-core/dist/js/components/Popover/PopoverArrow'; -import { PopoverBody } from '@patternfly/react-core/dist/js/components/Popover/PopoverBody'; -import { PopoverCloseButton } from '@patternfly/react-core/dist/js/components/Popover/PopoverCloseButton'; -import { PopoverContent } from '@patternfly/react-core/dist/js/components/Popover/PopoverContent'; -import { PopoverFooter } from '@patternfly/react-core/dist/js/components/Popover/PopoverFooter'; +import { PopoverArrow } from '@patternfly/react-core/dist/esm/components/Popover/PopoverArrow'; +import { PopoverBody } from '@patternfly/react-core/dist/esm/components/Popover/PopoverBody'; +import { PopoverCloseButton } from '@patternfly/react-core/dist/esm/components/Popover/PopoverCloseButton'; +import { PopoverContent } from '@patternfly/react-core/dist/esm/components/Popover/PopoverContent'; +import { PopoverFooter } from '@patternfly/react-core/dist/esm/components/Popover/PopoverFooter'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Popover/popover'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/console-shared/src/components/query-browser/QueryBrowser.tsx b/frontend/packages/console-shared/src/components/query-browser/QueryBrowser.tsx index d1431d48328..f6c0b11686f 100644 --- a/frontend/packages/console-shared/src/components/query-browser/QueryBrowser.tsx +++ b/frontend/packages/console-shared/src/components/query-browser/QueryBrowser.tsx @@ -26,7 +26,7 @@ import { TextInput, InputGroupItem, } from '@patternfly/react-core'; -import { ChartLineIcon } from '@patternfly/react-icons/dist/esm/icons/chart-line-icon'; +import { ChartLineIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/console-shared/src/components/shortcuts/Shortcut.tsx b/frontend/packages/console-shared/src/components/shortcuts/Shortcut.tsx index c98d8845940..edae0271f44 100644 --- a/frontend/packages/console-shared/src/components/shortcuts/Shortcut.tsx +++ b/frontend/packages/console-shared/src/components/shortcuts/Shortcut.tsx @@ -1,5 +1,5 @@ import type { FC, ReactNode } from 'react'; -import { MouseIcon } from '@patternfly/react-icons/dist/esm/icons/mouse-icon'; +import { MouseIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import './Shortcut.scss'; diff --git a/frontend/packages/console-shared/src/components/status/icons.tsx b/frontend/packages/console-shared/src/components/status/icons.tsx index 49e71d03220..c177a575c0c 100644 --- a/frontend/packages/console-shared/src/components/status/icons.tsx +++ b/frontend/packages/console-shared/src/components/status/icons.tsx @@ -1,10 +1,12 @@ import type { FC } from 'react'; import { Icon } from '@patternfly/react-core'; -import { ArrowCircleUpIcon } from '@patternfly/react-icons/dist/esm/icons/arrow-circle-up-icon'; -import { ResourcesAlmostFullIcon } from '@patternfly/react-icons/dist/esm/icons/resources-almost-full-icon'; -import { ResourcesFullIcon } from '@patternfly/react-icons/dist/esm/icons/resources-full-icon'; -import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; -import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon'; +import { + ArrowCircleUpIcon, + ResourcesAlmostFullIcon, + ResourcesFullIcon, + SyncAltIcon, + UnknownIcon, +} from '@patternfly/react-icons'; import type { ColoredIconProps } from '@console/dynamic-plugin-sdk'; export { diff --git a/frontend/packages/console-shared/src/components/status/statuses.tsx b/frontend/packages/console-shared/src/components/status/statuses.tsx index 3175020d976..ea59154cdf1 100644 --- a/frontend/packages/console-shared/src/components/status/statuses.tsx +++ b/frontend/packages/console-shared/src/components/status/statuses.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { HourglassHalfIcon } from '@patternfly/react-icons/dist/esm/icons/hourglass-half-icon'; +import { HourglassHalfIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import type { StatusComponentProps } from '@console/dynamic-plugin-sdk'; import { diff --git a/frontend/packages/container-security/src/components/ImageVulnerabilityRow.tsx b/frontend/packages/container-security/src/components/ImageVulnerabilityRow.tsx index 828b8e3d2d4..bcbbaba480e 100644 --- a/frontend/packages/container-security/src/components/ImageVulnerabilityRow.tsx +++ b/frontend/packages/container-security/src/components/ImageVulnerabilityRow.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; +import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import type { RowFunctionArgs } from '@console/internal/components/factory'; import { TableData } from '@console/internal/components/factory'; diff --git a/frontend/packages/container-security/src/components/ImageVulnerabilityToggleGroup.tsx b/frontend/packages/container-security/src/components/ImageVulnerabilityToggleGroup.tsx index efb9633d80e..ab2e29033b2 100644 --- a/frontend/packages/container-security/src/components/ImageVulnerabilityToggleGroup.tsx +++ b/frontend/packages/container-security/src/components/ImageVulnerabilityToggleGroup.tsx @@ -2,7 +2,7 @@ import type { FC, MouseEvent } from 'react'; import { useMemo, useState, useCallback } from 'react'; import { ChartDonut, ChartLabel } from '@patternfly/react-charts/victory'; import { Title, ToggleGroup, ToggleGroupItem } from '@patternfly/react-core'; -import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; +import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { ConsoleEmptyState } from '@console/internal/components/utils'; diff --git a/frontend/packages/container-security/src/components/image-manifest-vuln.tsx b/frontend/packages/container-security/src/components/image-manifest-vuln.tsx index c1d78b118f8..2787b0b1aba 100644 --- a/frontend/packages/container-security/src/components/image-manifest-vuln.tsx +++ b/frontend/packages/container-security/src/components/image-manifest-vuln.tsx @@ -8,7 +8,7 @@ import { GridItem, Tooltip, } from '@patternfly/react-core'; -import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; +import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { sortable, Table as PfTable, Thead, Th, Tbody, Td, Tr } from '@patternfly/react-table'; import type { TFunction } from 'i18next'; diff --git a/frontend/packages/container-security/src/components/summary.tsx b/frontend/packages/container-security/src/components/summary.tsx index 7d326cbf01e..81e217eedc9 100644 --- a/frontend/packages/container-security/src/components/summary.tsx +++ b/frontend/packages/container-security/src/components/summary.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { ChartDonut } from '@patternfly/react-charts/victory'; import { Stack, StackItem, pluralize } from '@patternfly/react-core'; -import { ExclamationTriangleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon'; +import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; diff --git a/frontend/packages/container-security/src/const.ts b/frontend/packages/container-security/src/const.ts index e1894736d33..532f3090991 100644 --- a/frontend/packages/container-security/src/const.ts +++ b/frontend/packages/container-security/src/const.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { chart_color_black_500 as black500 } from '@patternfly/react-tokens/dist/js/chart_color_black_500'; -import { chart_color_orange_300 as orange300 } from '@patternfly/react-tokens/dist/js/chart_color_orange_300'; -import { chart_color_red_orange_100 as redorange100 } from '@patternfly/react-tokens/dist/js/chart_color_red_orange_100'; -import { chart_color_red_orange_300 as redorange300 } from '@patternfly/react-tokens/dist/js/chart_color_red_orange_300'; -import { chart_color_red_orange_400 as redorange400 } from '@patternfly/react-tokens/dist/js/chart_color_red_orange_400'; -import { chart_color_yellow_400 as yellow400 } from '@patternfly/react-tokens/dist/js/chart_color_yellow_400'; +import { chart_color_black_500 as black500 } from '@patternfly/react-tokens/dist/esm/chart_color_black_500'; +import { chart_color_orange_300 as orange300 } from '@patternfly/react-tokens/dist/esm/chart_color_orange_300'; +import { chart_color_red_orange_100 as redorange100 } from '@patternfly/react-tokens/dist/esm/chart_color_red_orange_100'; +import { chart_color_red_orange_300 as redorange300 } from '@patternfly/react-tokens/dist/esm/chart_color_red_orange_300'; +import { chart_color_red_orange_400 as redorange400 } from '@patternfly/react-tokens/dist/esm/chart_color_red_orange_400'; +import { chart_color_yellow_400 as yellow400 } from '@patternfly/react-tokens/dist/esm/chart_color_yellow_400'; /* eslint-enable @typescript-eslint/naming-convention */ import { Map as ImmutableMap } from 'immutable'; import type { ImageManifestVuln } from './types'; diff --git a/frontend/packages/dev-console/src/actions/add-resources.tsx b/frontend/packages/dev-console/src/actions/add-resources.tsx index 852bf0196f1..5954ee56301 100644 --- a/frontend/packages/dev-console/src/actions/add-resources.tsx +++ b/frontend/packages/dev-console/src/actions/add-resources.tsx @@ -1,10 +1,12 @@ -import { BoltIcon } from '@patternfly/react-icons/dist/esm/icons/bolt-icon'; -import { CatalogIcon } from '@patternfly/react-icons/dist/esm/icons/catalog-icon'; -import { DatabaseIcon } from '@patternfly/react-icons/dist/esm/icons/database-icon'; -import { FileUploadIcon } from '@patternfly/react-icons/dist/esm/icons/file-upload-icon'; -import { GitAltIcon } from '@patternfly/react-icons/dist/esm/icons/git-alt-icon'; -import { LaptopCodeIcon } from '@patternfly/react-icons/dist/esm/icons/laptop-code-icon'; -import { OsImageIcon } from '@patternfly/react-icons/dist/esm/icons/os-image-icon'; +import { + BoltIcon, + CatalogIcon, + DatabaseIcon, + FileUploadIcon, + GitAltIcon, + LaptopCodeIcon, + OsImageIcon, +} from '@patternfly/react-icons'; import i18next from 'i18next'; import type { Action } from '@console/dynamic-plugin-sdk/src'; import { ServerlessFunctionIcon } from '@console/knative-plugin/src/utils/icons'; diff --git a/frontend/packages/dev-console/src/components/add/AddCardSectionEmptyState.tsx b/frontend/packages/dev-console/src/components/add/AddCardSectionEmptyState.tsx index 4cc70c6c7cf..b636f4b719e 100644 --- a/frontend/packages/dev-console/src/components/add/AddCardSectionEmptyState.tsx +++ b/frontend/packages/dev-console/src/components/add/AddCardSectionEmptyState.tsx @@ -1,7 +1,6 @@ import type { FC, ComponentType } from 'react'; import { EmptyState, EmptyStateBody, EmptyStateVariant } from '@patternfly/react-core'; -import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import { LockIcon } from '@patternfly/react-icons/dist/esm/icons/lock-icon'; +import { ExclamationCircleIcon, LockIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; type AddCardSectionEmptyStateProps = { diff --git a/frontend/packages/dev-console/src/components/add/__tests__/add-page-test-data.tsx b/frontend/packages/dev-console/src/components/add/__tests__/add-page-test-data.tsx index f44360cf2a2..3ac4a666f33 100644 --- a/frontend/packages/dev-console/src/components/add/__tests__/add-page-test-data.tsx +++ b/frontend/packages/dev-console/src/components/add/__tests__/add-page-test-data.tsx @@ -1,5 +1,4 @@ -import { CatalogIcon } from '@patternfly/react-icons/dist/esm/icons/catalog-icon'; -import { SignOutAltIcon } from '@patternfly/react-icons/dist/esm/icons/sign-out-alt-icon'; +import { CatalogIcon, SignOutAltIcon } from '@patternfly/react-icons'; import type { AddActionGroup, ResolvedExtension, AddAction } from '@console/dynamic-plugin-sdk'; import type { LoadedExtension } from '@console/dynamic-plugin-sdk/src/types'; import { helmCatalogIconSVG } from '@console/helm-plugin/src/utils/icons'; diff --git a/frontend/packages/dev-console/src/components/deployments/deployment-strategy/advanced-options/LifecycleHookField.tsx b/frontend/packages/dev-console/src/components/deployments/deployment-strategy/advanced-options/LifecycleHookField.tsx index 309141642c7..531a90a1630 100644 --- a/frontend/packages/dev-console/src/components/deployments/deployment-strategy/advanced-options/LifecycleHookField.tsx +++ b/frontend/packages/dev-console/src/components/deployments/deployment-strategy/advanced-options/LifecycleHookField.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import { useState, useCallback } from 'react'; import { ButtonVariant, Button, Tooltip } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useField, useFormikContext } from 'formik'; import { cloneDeep } from 'lodash'; diff --git a/frontend/packages/dev-console/src/components/guided-tour/GuidedTourText.tsx b/frontend/packages/dev-console/src/components/guided-tour/GuidedTourText.tsx index 8e8d4640078..e03e4a14a7e 100644 --- a/frontend/packages/dev-console/src/components/guided-tour/GuidedTourText.tsx +++ b/frontend/packages/dev-console/src/components/guided-tour/GuidedTourText.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { PlusCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import * as semver from 'semver'; import { ExternalLink } from '@console/shared/src/components/links/ExternalLink'; diff --git a/frontend/packages/dev-console/src/components/health-checks/HealthCheckProbe.tsx b/frontend/packages/dev-console/src/components/health-checks/HealthCheckProbe.tsx index 8b9568f1010..1af52669395 100644 --- a/frontend/packages/dev-console/src/components/health-checks/HealthCheckProbe.tsx +++ b/frontend/packages/dev-console/src/components/health-checks/HealthCheckProbe.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import { useContext, useState } from 'react'; import { Button, ButtonVariant, Tooltip } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useFormikContext } from 'formik'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/dev-console/src/components/hpa/HPAUtilizationField.tsx b/frontend/packages/dev-console/src/components/hpa/HPAUtilizationField.tsx index fb9a4e9d36c..57774708f0f 100644 --- a/frontend/packages/dev-console/src/components/hpa/HPAUtilizationField.tsx +++ b/frontend/packages/dev-console/src/components/hpa/HPAUtilizationField.tsx @@ -9,7 +9,7 @@ import { HelperText, HelperTextItem, } from '@patternfly/react-core'; -import { PercentIcon } from '@patternfly/react-icons/dist/esm/icons/percent-icon'; +import { PercentIcon } from '@patternfly/react-icons'; import type { FormikErrors } from 'formik'; import { useFormikContext } from 'formik'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/dev-console/src/components/import/ImportStrategySection.tsx b/frontend/packages/dev-console/src/components/import/ImportStrategySection.tsx index 68570a59648..18dd345986a 100644 --- a/frontend/packages/dev-console/src/components/import/ImportStrategySection.tsx +++ b/frontend/packages/dev-console/src/components/import/ImportStrategySection.tsx @@ -8,8 +8,7 @@ import { SplitItem, Split, } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; -import { UndoIcon } from '@patternfly/react-icons/dist/esm/icons/undo-icon'; +import { PencilAltIcon, UndoIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useFormikContext } from 'formik'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/dev-console/src/components/import/ImportStrategySelector.tsx b/frontend/packages/dev-console/src/components/import/ImportStrategySelector.tsx index 40a6b1ea0a1..634001dd6a5 100644 --- a/frontend/packages/dev-console/src/components/import/ImportStrategySelector.tsx +++ b/frontend/packages/dev-console/src/components/import/ImportStrategySelector.tsx @@ -2,10 +2,7 @@ import type { FC, ReactNode } from 'react'; import { useCallback } from 'react'; import { FormGroup, Grid, GridItem, Tooltip } from '@patternfly/react-core'; import { Tile } from '@patternfly/react-core/deprecated'; -import { CubeIcon } from '@patternfly/react-icons/dist/esm/icons/cube-icon'; -import { GitAltIcon } from '@patternfly/react-icons/dist/esm/icons/git-alt-icon'; -import { LayerGroupIcon } from '@patternfly/react-icons/dist/esm/icons/layer-group-icon'; -import { StarIcon } from '@patternfly/react-icons/dist/esm/icons/star-icon'; +import { CubeIcon, GitAltIcon, LayerGroupIcon, StarIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useFormikContext } from 'formik'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/dev-console/src/components/import/__tests__/render-utils.spec.ts b/frontend/packages/dev-console/src/components/import/__tests__/render-utils.spec.ts index 7c4cc8239ae..ac80466c896 100644 --- a/frontend/packages/dev-console/src/components/import/__tests__/render-utils.spec.ts +++ b/frontend/packages/dev-console/src/components/import/__tests__/render-utils.spec.ts @@ -1,7 +1,4 @@ -import { BitbucketIcon } from '@patternfly/react-icons/dist/esm/icons/bitbucket-icon'; -import { GitAltIcon } from '@patternfly/react-icons/dist/esm/icons/git-alt-icon'; -import { GithubIcon } from '@patternfly/react-icons/dist/esm/icons/github-icon'; -import { GitlabIcon } from '@patternfly/react-icons/dist/esm/icons/gitlab-icon'; +import { BitbucketIcon, GitAltIcon, GithubIcon, GitlabIcon } from '@patternfly/react-icons'; import { t } from '../../../../../../__mocks__/i18next'; import CheIcon from '../CheIcon'; import { routeDecoratorIcon } from '../render-utils'; diff --git a/frontend/packages/dev-console/src/components/import/devfile/DevfileInfo.tsx b/frontend/packages/dev-console/src/components/import/devfile/DevfileInfo.tsx index 2d92604ae5f..27a9b8c6291 100644 --- a/frontend/packages/dev-console/src/components/import/devfile/DevfileInfo.tsx +++ b/frontend/packages/dev-console/src/components/import/devfile/DevfileInfo.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { Icon } from '@patternfly/react-core'; -import { LayerGroupIcon } from '@patternfly/react-icons/dist/esm/icons/layer-group-icon'; +import { LayerGroupIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { getImageForIconClass } from '@console/internal/components/catalog/catalog-item-icon'; import SecondaryHeading from '@console/shared/src/components/heading/SecondaryHeading'; diff --git a/frontend/packages/dev-console/src/components/import/git/DockerSection.tsx b/frontend/packages/dev-console/src/components/import/git/DockerSection.tsx index 4e9ac47ab76..2b8629d2a11 100644 --- a/frontend/packages/dev-console/src/components/import/git/DockerSection.tsx +++ b/frontend/packages/dev-console/src/components/import/git/DockerSection.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useState, useCallback, useMemo, useEffect } from 'react'; import { Icon, TextInputTypes, ValidatedOptions } from '@patternfly/react-core'; -import { CubeIcon } from '@patternfly/react-icons/dist/esm/icons/cube-icon'; +import { CubeIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useFormikContext } from 'formik'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/dev-console/src/components/import/git/SampleRepo.tsx b/frontend/packages/dev-console/src/components/import/git/SampleRepo.tsx index fe46c352099..8e6bde8a7c8 100644 --- a/frontend/packages/dev-console/src/components/import/git/SampleRepo.tsx +++ b/frontend/packages/dev-console/src/components/import/git/SampleRepo.tsx @@ -1,5 +1,5 @@ import { FormHelperText, Button, ButtonVariant } from '@patternfly/react-core'; -import { LevelUpAltIcon } from '@patternfly/react-icons/dist/esm/icons/level-up-alt-icon'; +import { LevelUpAltIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; export interface SampleRepoProps { diff --git a/frontend/packages/dev-console/src/components/import/render-utils.tsx b/frontend/packages/dev-console/src/components/import/render-utils.tsx index f03a593732c..4e922ccf1be 100644 --- a/frontend/packages/dev-console/src/components/import/render-utils.tsx +++ b/frontend/packages/dev-console/src/components/import/render-utils.tsx @@ -1,8 +1,5 @@ import type { ReactElement } from 'react'; -import { BitbucketIcon } from '@patternfly/react-icons/dist/esm/icons/bitbucket-icon'; -import { GitAltIcon } from '@patternfly/react-icons/dist/esm/icons/git-alt-icon'; -import { GithubIcon } from '@patternfly/react-icons/dist/esm/icons/github-icon'; -import { GitlabIcon } from '@patternfly/react-icons/dist/esm/icons/gitlab-icon'; +import { BitbucketIcon, GitAltIcon, GithubIcon, GitlabIcon } from '@patternfly/react-icons'; import type { TFunction } from 'i18next'; import { GitProvider } from '@console/git-service/src'; import CheIcon from './CheIcon'; diff --git a/frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsx b/frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsx index e134034de34..e3c1b8c91f7 100644 --- a/frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsx +++ b/frontend/packages/dev-console/src/components/monitoring/overview/MonitoringOverview.tsx @@ -11,7 +11,7 @@ import { EmptyState, EmptyStateBody, } from '@patternfly/react-core'; -import { InfoCircleIcon } from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; +import { InfoCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; import type { Alert } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/dev-console/src/components/monitoring/overview/__tests__/MonitoringOverview.spec.tsx b/frontend/packages/dev-console/src/components/monitoring/overview/__tests__/MonitoringOverview.spec.tsx index 1f5769181ec..db00b5ecb43 100644 --- a/frontend/packages/dev-console/src/components/monitoring/overview/__tests__/MonitoringOverview.spec.tsx +++ b/frontend/packages/dev-console/src/components/monitoring/overview/__tests__/MonitoringOverview.spec.tsx @@ -68,7 +68,8 @@ jest.mock('@console/internal/models', () => ({ DeploymentConfigModel: { kind: 'DeploymentConfig' }, })); -jest.mock('@patternfly/react-icons/dist/esm/icons/info-circle-icon', () => ({ +jest.mock('@patternfly/react-icons', () => ({ + ...jest.requireActual('@patternfly/react-icons'), InfoCircleIcon: () => 'InfoCircleIcon', })); diff --git a/frontend/packages/dev-console/src/components/pipeline-section/pipeline/WebhookSection.tsx b/frontend/packages/dev-console/src/components/pipeline-section/pipeline/WebhookSection.tsx index 658a8dc054b..0034ec5212b 100644 --- a/frontend/packages/dev-console/src/components/pipeline-section/pipeline/WebhookSection.tsx +++ b/frontend/packages/dev-console/src/components/pipeline-section/pipeline/WebhookSection.tsx @@ -15,7 +15,7 @@ import { HelperText, HelperTextItem, } from '@patternfly/react-core'; -import { HelpIcon } from '@patternfly/react-icons/dist/esm/icons/help-icon'; +import { HelpIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useFormikContext } from 'formik'; import * as fuzzy from 'fuzzysearch'; diff --git a/frontend/packages/dev-console/src/components/pipelines-visualization/CustomTaskNode.tsx b/frontend/packages/dev-console/src/components/pipelines-visualization/CustomTaskNode.tsx index cdb0977b548..e9648df2694 100644 --- a/frontend/packages/dev-console/src/components/pipelines-visualization/CustomTaskNode.tsx +++ b/frontend/packages/dev-console/src/components/pipelines-visualization/CustomTaskNode.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useRef, useMemo, memo } from 'react'; import { Tooltip } from '@patternfly/react-core'; -import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; +import { QuestionCircleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { t_color_gray_50 as customTaskColor } from '@patternfly/react-tokens'; import type { Node, NodeModel } from '@patternfly/react-topology'; diff --git a/frontend/packages/dev-console/src/components/pipelines-visualization/reducer.ts b/frontend/packages/dev-console/src/components/pipelines-visualization/reducer.ts index 16ed3e149dd..aa2a8dd0bc8 100644 --- a/frontend/packages/dev-console/src/components/pipelines-visualization/reducer.ts +++ b/frontend/packages/dev-console/src/components/pipelines-visualization/reducer.ts @@ -1,9 +1,9 @@ import { t_global_text_color_status_danger_default as failureColor } from '@patternfly/react-tokens'; -import { chart_color_black_400 as skippedColor } from '@patternfly/react-tokens/dist/js/chart_color_black_400'; -import { chart_color_black_500 as cancelledColor } from '@patternfly/react-tokens/dist/js/chart_color_black_500'; -import { chart_color_blue_100 as pendingColor } from '@patternfly/react-tokens/dist/js/chart_color_blue_100'; -import { chart_color_blue_300 as runningColor } from '@patternfly/react-tokens/dist/js/chart_color_blue_300'; -import { chart_color_green_400 as successColor } from '@patternfly/react-tokens/dist/js/chart_color_green_400'; +import { chart_color_black_400 as skippedColor } from '@patternfly/react-tokens/dist/esm/chart_color_black_400'; +import { chart_color_black_500 as cancelledColor } from '@patternfly/react-tokens/dist/esm/chart_color_black_500'; +import { chart_color_blue_100 as pendingColor } from '@patternfly/react-tokens/dist/esm/chart_color_blue_100'; +import { chart_color_blue_300 as runningColor } from '@patternfly/react-tokens/dist/esm/chart_color_blue_300'; +import { chart_color_green_400 as successColor } from '@patternfly/react-tokens/dist/esm/chart_color_green_400'; import type { Graph, LayoutFactory } from '@patternfly/react-topology'; import { DagreLayout, PipelineDagreLayout } from '@patternfly/react-topology'; import type { GraphLabel } from 'dagre'; diff --git a/frontend/packages/dev-console/src/models/pipelines.ts b/frontend/packages/dev-console/src/models/pipelines.ts index 6d4e0db091f..8bb175540b9 100644 --- a/frontend/packages/dev-console/src/models/pipelines.ts +++ b/frontend/packages/dev-console/src/models/pipelines.ts @@ -1,4 +1,4 @@ -import { chart_color_green_400 as tektonGroupColor } from '@patternfly/react-tokens/dist/js/chart_color_green_400'; +import { chart_color_green_400 as tektonGroupColor } from '@patternfly/react-tokens/dist/esm/chart_color_green_400'; import type { K8sModel } from '@console/dynamic-plugin-sdk/src'; const color = tektonGroupColor.value; diff --git a/frontend/packages/dev-console/src/utils/icons.tsx b/frontend/packages/dev-console/src/utils/icons.tsx index 07a1e64791d..e62a5f8d2c9 100644 --- a/frontend/packages/dev-console/src/utils/icons.tsx +++ b/frontend/packages/dev-console/src/utils/icons.tsx @@ -1,13 +1,15 @@ -import { BoltIcon } from '@patternfly/react-icons/dist/esm/icons/bolt-icon'; -import { CatalogIcon } from '@patternfly/react-icons/dist/esm/icons/catalog-icon'; -import { DatabaseIcon } from '@patternfly/react-icons/dist/esm/icons/database-icon'; -import { ExportIcon } from '@patternfly/react-icons/dist/esm/icons/export-icon'; -import { FileUploadIcon } from '@patternfly/react-icons/dist/esm/icons/file-upload-icon'; -import { GitAltIcon } from '@patternfly/react-icons/dist/esm/icons/git-alt-icon'; -import { LaptopCodeIcon } from '@patternfly/react-icons/dist/esm/icons/laptop-code-icon'; -import { OsImageIcon } from '@patternfly/react-icons/dist/esm/icons/os-image-icon'; -import { OutlinedFileCodeIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-file-code-icon'; -import { ShareSquareIcon } from '@patternfly/react-icons/dist/esm/icons/share-square-icon'; +import { + BoltIcon, + CatalogIcon, + DatabaseIcon, + ExportIcon, + FileUploadIcon, + GitAltIcon, + LaptopCodeIcon, + OsImageIcon, + OutlinedFileCodeIcon, + ShareSquareIcon, +} from '@patternfly/react-icons'; import devfileIcon from '../images/devfile.svg'; import dockerfileIcon from '../images/dockerfile.svg'; diff --git a/frontend/packages/dev-console/src/utils/perspective.tsx b/frontend/packages/dev-console/src/utils/perspective.tsx index bf6251176fd..f5b1c3f2080 100644 --- a/frontend/packages/dev-console/src/utils/perspective.tsx +++ b/frontend/packages/dev-console/src/utils/perspective.tsx @@ -1,4 +1,4 @@ -import { CodeIcon } from '@patternfly/react-icons/dist/esm/icons/code-icon'; +import { CodeIcon } from '@patternfly/react-icons'; import { shallowEqual } from 'react-redux'; import type { Perspective, ResolvedExtension } from '@console/dynamic-plugin-sdk'; import { getFlagsObject, flagPending } from '@console/internal/reducers/features'; diff --git a/frontend/packages/helm-plugin/src/components/details-page/notes/HelmReleaseNotesEmptyState.tsx b/frontend/packages/helm-plugin/src/components/details-page/notes/HelmReleaseNotesEmptyState.tsx index 250579c855c..af9deceb4d3 100644 --- a/frontend/packages/helm-plugin/src/components/details-page/notes/HelmReleaseNotesEmptyState.tsx +++ b/frontend/packages/helm-plugin/src/components/details-page/notes/HelmReleaseNotesEmptyState.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { EmptyState, EmptyStateBody, EmptyStateVariant } from '@patternfly/react-core'; -import { InfoCircleIcon } from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; +import { InfoCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; const HelmReleaseNotesEmptyState: FC = () => { diff --git a/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmChartVersionDropdown.tsx b/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmChartVersionDropdown.tsx index 79ef18f5a4f..4cfb97731fb 100644 --- a/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmChartVersionDropdown.tsx +++ b/frontend/packages/helm-plugin/src/components/forms/install-upgrade/HelmChartVersionDropdown.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useState, useEffect } from 'react'; import { GridItem } from '@patternfly/react-core'; -import { InfoCircleIcon } from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; +import { InfoCircleIcon } from '@patternfly/react-icons'; import type { FormikValues } from 'formik'; import { useFormikContext } from 'formik'; import { safeLoad } from 'js-yaml'; diff --git a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx index c38b94cbf73..83f3a25af6f 100644 --- a/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx +++ b/frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx @@ -7,7 +7,7 @@ import { EmptyStateFooter, } from '@patternfly/react-core'; import { DataViewCheckboxFilter } from '@patternfly/react-data-view'; -import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import { useTranslation } from 'react-i18next'; import { useParams, Link } from 'react-router'; import { diff --git a/frontend/packages/helm-plugin/src/utils/icons.tsx b/frontend/packages/helm-plugin/src/utils/icons.tsx index f088079da39..17f54b0b8a1 100644 --- a/frontend/packages/helm-plugin/src/utils/icons.tsx +++ b/frontend/packages/helm-plugin/src/utils/icons.tsx @@ -1,5 +1,5 @@ +import { RepositoryIcon } from '@patternfly/react-icons'; import { createIcon } from '@patternfly/react-icons/dist/esm/createIcon'; -import { RepositoryIcon } from '@patternfly/react-icons/dist/esm/icons/repository-icon'; /** This should be kept in sync with [helm.svg](../../../../public/imgs/logos/helm.svg) */ export const HelmCatalogIcon = createIcon({ diff --git a/frontend/packages/insights-plugin/src/components/InsightsPopup/mappers.ts b/frontend/packages/insights-plugin/src/components/InsightsPopup/mappers.ts index bf3917b554b..44b25c7f3b6 100644 --- a/frontend/packages/insights-plugin/src/components/InsightsPopup/mappers.ts +++ b/frontend/packages/insights-plugin/src/components/InsightsPopup/mappers.ts @@ -1,7 +1,9 @@ -import { AngleDoubleDownIcon } from '@patternfly/react-icons/dist/esm/icons/angle-double-down-icon'; -import { AngleDoubleUpIcon } from '@patternfly/react-icons/dist/esm/icons/angle-double-up-icon'; -import { CriticalRiskIcon } from '@patternfly/react-icons/dist/esm/icons/critical-risk-icon'; -import { EqualsIcon } from '@patternfly/react-icons/dist/esm/icons/equals-icon'; +import { + AngleDoubleDownIcon, + AngleDoubleUpIcon, + CriticalRiskIcon, + EqualsIcon, +} from '@patternfly/react-icons'; import { t_color_blue_10 as blue50, t_color_blue_50 as blue300, diff --git a/frontend/packages/knative-plugin/src/components/overview/EventPubSubExpandButton.tsx b/frontend/packages/knative-plugin/src/components/overview/EventPubSubExpandButton.tsx index d5b705981e2..47af51b0531 100644 --- a/frontend/packages/knative-plugin/src/components/overview/EventPubSubExpandButton.tsx +++ b/frontend/packages/knative-plugin/src/components/overview/EventPubSubExpandButton.tsx @@ -1,7 +1,6 @@ import type { FC } from 'react'; import { Button } from '@patternfly/react-core'; -import { AngleDownIcon } from '@patternfly/react-icons/dist/esm/icons/angle-down-icon'; -import { AngleRightIcon } from '@patternfly/react-icons/dist/esm/icons/angle-right-icon'; +import { AngleDownIcon, AngleRightIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import './EventPubSubExpandButton.scss'; diff --git a/frontend/packages/knative-plugin/src/components/test-function/RequestPane.tsx b/frontend/packages/knative-plugin/src/components/test-function/RequestPane.tsx index e1693d558b2..a15a3423375 100644 --- a/frontend/packages/knative-plugin/src/components/test-function/RequestPane.tsx +++ b/frontend/packages/knative-plugin/src/components/test-function/RequestPane.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useState } from 'react'; import { Button, TextInputTypes, ExpandableSection } from '@patternfly/react-core'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { PlusCircleIcon } from '@patternfly/react-icons'; import type { FormikProps, FormikValues } from 'formik/dist/types'; import { useTranslation } from 'react-i18next'; import { AsyncComponent } from '@console/internal/components/utils/async'; diff --git a/frontend/packages/knative-plugin/src/models.ts b/frontend/packages/knative-plugin/src/models.ts index f8d7611f297..3d8ec79fd43 100644 --- a/frontend/packages/knative-plugin/src/models.ts +++ b/frontend/packages/knative-plugin/src/models.ts @@ -1,5 +1,5 @@ -import { chart_color_red_orange_300 as knativeEventingColor } from '@patternfly/react-tokens/dist/js/chart_color_red_orange_300'; -import { chart_color_teal_400 as knativeServingColor } from '@patternfly/react-tokens/dist/js/chart_color_teal_400'; +import { chart_color_red_orange_300 as knativeEventingColor } from '@patternfly/react-tokens/dist/esm/chart_color_red_orange_300'; +import { chart_color_teal_400 as knativeServingColor } from '@patternfly/react-tokens/dist/esm/chart_color_teal_400'; import type { K8sKind } from '@console/internal/module/k8s'; import { KNATIVE_SERVING_APIGROUP, diff --git a/frontend/packages/knative-plugin/src/topology/components/decorators/RevisionRouteDecorator.tsx b/frontend/packages/knative-plugin/src/topology/components/decorators/RevisionRouteDecorator.tsx index c077515b9cf..3354beac22c 100644 --- a/frontend/packages/knative-plugin/src/topology/components/decorators/RevisionRouteDecorator.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/decorators/RevisionRouteDecorator.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useRef } from 'react'; import { Tooltip, TooltipPosition } from '@patternfly/react-core'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import type { Node } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; import { Decorator } from '@console/topology/src/components/graph-view'; diff --git a/frontend/packages/knative-plugin/src/topology/components/decorators/ServiceRouteDecorator.tsx b/frontend/packages/knative-plugin/src/topology/components/decorators/ServiceRouteDecorator.tsx index 82d8fcca4d8..d23365ae507 100644 --- a/frontend/packages/knative-plugin/src/topology/components/decorators/ServiceRouteDecorator.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/decorators/ServiceRouteDecorator.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useRef } from 'react'; import { Tooltip, TooltipPosition } from '@patternfly/react-core'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { Decorator } from '@console/topology/src/components/graph-view'; diff --git a/frontend/packages/knative-plugin/src/topology/components/nodes/SinkUriNode.tsx b/frontend/packages/knative-plugin/src/topology/components/nodes/SinkUriNode.tsx index f05820595f0..9ce64359b69 100644 --- a/frontend/packages/knative-plugin/src/topology/components/nodes/SinkUriNode.tsx +++ b/frontend/packages/knative-plugin/src/topology/components/nodes/SinkUriNode.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import { useRef } from 'react'; import { Tooltip, TooltipPosition } from '@patternfly/react-core'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; -import { LinkIcon } from '@patternfly/react-icons/dist/esm/icons/link-icon'; +import { ExternalLinkAltIcon, LinkIcon } from '@patternfly/react-icons'; import type { Node, WithDragNodeProps, diff --git a/frontend/packages/knative-plugin/src/utils/fetch-dynamic-eventsources-utils.ts b/frontend/packages/knative-plugin/src/utils/fetch-dynamic-eventsources-utils.ts index 4498b960ea9..642d28be50f 100644 --- a/frontend/packages/knative-plugin/src/utils/fetch-dynamic-eventsources-utils.ts +++ b/frontend/packages/knative-plugin/src/utils/fetch-dynamic-eventsources-utils.ts @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react'; -import { chart_color_red_orange_300 as knativeEventingColor } from '@patternfly/react-tokens/dist/js/chart_color_red_orange_300'; +import { chart_color_red_orange_300 as knativeEventingColor } from '@patternfly/react-tokens/dist/esm/chart_color_red_orange_300'; import * as _ from 'lodash'; import { coFetch } from '@console/internal/co-fetch'; import type { K8sKind } from '@console/internal/module/k8s'; diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx index 78d0bd9a6da..ce2ab6b65c8 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostDetails.tsx @@ -7,7 +7,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { RebootingIcon } from '@patternfly/react-icons/dist/esm/icons/rebooting-icon'; +import { RebootingIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { StatusIconAndText } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx index 9c959ac100c..b184f495aa8 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostNICs.tsx @@ -1,6 +1,5 @@ import type { FC } from 'react'; -import { OutlinedCheckSquareIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-check-square-icon'; -import { OutlinedSquareIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-square-icon'; +import { OutlinedCheckSquareIcon, OutlinedSquareIcon } from '@patternfly/react-icons'; import { sortable } from '@patternfly/react-table'; import type { TFunction } from 'i18next'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostPowerStatusIcon.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostPowerStatusIcon.tsx index 556c2a6c66a..b527b4ef447 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostPowerStatusIcon.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/BareMetalHostPowerStatusIcon.tsx @@ -1,7 +1,5 @@ import type { FC } from 'react'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; -import { OffIcon } from '@patternfly/react-icons/dist/esm/icons/off-icon'; -import { OnRunningIcon } from '@patternfly/react-icons/dist/esm/icons/on-running-icon'; +import { InProgressIcon, OffIcon, OnRunningIcon } from '@patternfly/react-icons'; import { HOST_POWER_STATUS_POWERED_OFF, HOST_POWER_STATUS_POWERED_ON } from '../../constants'; type BareMetalHostPowerStatusIconProps = { diff --git a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx index ee94b77d725..b15d887977d 100644 --- a/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx +++ b/frontend/packages/metal3-plugin/src/components/baremetal-hosts/dashboard/StatusCard.tsx @@ -8,7 +8,7 @@ import { CardHeader, CardTitle, } from '@patternfly/react-core'; -import { RebootingIcon } from '@patternfly/react-icons/dist/esm/icons/rebooting-icon'; +import { RebootingIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; diff --git a/frontend/packages/metal3-plugin/src/components/maintenance/MaintenanceIcon.tsx b/frontend/packages/metal3-plugin/src/components/maintenance/MaintenanceIcon.tsx index 883aa6ea43f..5a5af4ae319 100644 --- a/frontend/packages/metal3-plugin/src/components/maintenance/MaintenanceIcon.tsx +++ b/frontend/packages/metal3-plugin/src/components/maintenance/MaintenanceIcon.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { MaintenanceIcon } from '@patternfly/react-icons/dist/esm/icons/maintenance-icon'; +import { MaintenanceIcon } from '@patternfly/react-icons'; export const NodeMaintenanceIcon: FC = () => { return ; diff --git a/frontend/packages/metal3-plugin/src/components/maintenance/MaintenancePopover.tsx b/frontend/packages/metal3-plugin/src/components/maintenance/MaintenancePopover.tsx index 8ad7c158ad4..7560e29d9e6 100644 --- a/frontend/packages/metal3-plugin/src/components/maintenance/MaintenancePopover.tsx +++ b/frontend/packages/metal3-plugin/src/components/maintenance/MaintenancePopover.tsx @@ -1,6 +1,5 @@ import type { ReactNode, FC } from 'react'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; -import { MaintenanceIcon } from '@patternfly/react-icons/dist/esm/icons/maintenance-icon'; +import { InProgressIcon, MaintenanceIcon } from '@patternfly/react-icons'; import { PopoverStatus, StatusIconAndText } from '@console/dynamic-plugin-sdk'; import type { K8sResourceKind } from '@console/internal/module/k8s'; import { getNodeMaintenancePhase } from '../../selectors'; diff --git a/frontend/packages/operator-lifecycle-manager-v1/src/components/OLMv1Switch.tsx b/frontend/packages/operator-lifecycle-manager-v1/src/components/OLMv1Switch.tsx index 1a8d52f88fd..12dae0ac7a5 100644 --- a/frontend/packages/operator-lifecycle-manager-v1/src/components/OLMv1Switch.tsx +++ b/frontend/packages/operator-lifecycle-manager-v1/src/components/OLMv1Switch.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react'; import type { FC, FormEvent } from 'react'; import { Button, Flex, FlexItem, Label, Popover, Switch } from '@patternfly/react-core'; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; +import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { FLAG_TECH_PREVIEW } from '@console/app/src/consts'; import { useFlag } from '@console/dynamic-plugin-sdk/src/utils/flags'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx index d6675d4146d..d00ff51e334 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/clusterserviceversion.tsx @@ -16,8 +16,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { AddCircleOIcon } from '@patternfly/react-icons/dist/esm/icons/add-circle-o-icon'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { AddCircleOIcon, PencilAltIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { sortable, wrappable } from '@patternfly/react-table'; import * as _ from 'lodash'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/common.tsx b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/common.tsx index 8c5091ac73c..2738666862f 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/common.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/common.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import { useMemo, useState } from 'react'; import { Button } from '@patternfly/react-core'; -import { EyeIcon } from '@patternfly/react-icons/dist/esm/icons/eye-icon'; -import { EyeSlashIcon } from '@patternfly/react-icons/dist/esm/icons/eye-slash-icon'; +import { EyeIcon, EyeSlashIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { Trans, useTranslation } from 'react-i18next'; import { SecretValue } from '@console/internal/components/configmap-and-secret-data'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/affinity.tsx b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/affinity.tsx index 322cb018e0f..6c8fd01eb9c 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/affinity.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/affinity.tsx @@ -7,8 +7,7 @@ import { DescriptionListTerm, Tooltip, } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import type { diff --git a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/match-expressions.tsx b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/match-expressions.tsx index 3c98918feb1..01db61d9306 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/match-expressions.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/match-expressions.tsx @@ -1,7 +1,6 @@ import type { FC } from 'react'; import { Button } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { Table, Thead, Tr, Th, Td, Tbody } from '@patternfly/react-table'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/resource-requirements.tsx b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/resource-requirements.tsx index 6f470bee549..c9da6e69448 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/resource-requirements.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/spec/resource-requirements.tsx @@ -10,7 +10,7 @@ import { ModalHeader, ModalVariant, } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import * as _ from 'lodash'; import { useTranslation } from 'react-i18next'; import type { OverlayComponent } from '@console/dynamic-plugin-sdk/src/app/modal-support/OverlayProvider'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/phase.tsx b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/phase.tsx index 38e49e809bf..f2a2a67ed72 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/phase.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/phase.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { BanIcon } from '@patternfly/react-icons/dist/esm/icons/ban-icon'; +import { BanIcon } from '@patternfly/react-icons'; export const Phase: FC = ({ status }) => ( diff --git a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/pods.tsx b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/pods.tsx index 6e3fa21668f..be4e447920c 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/pods.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/descriptors/status/pods.tsx @@ -2,8 +2,8 @@ import type { FC } from 'react'; import { ChartDonut } from '@patternfly/react-charts/victory'; /* eslint-disable camelcase */ import { t_color_blue_50 as blue300 } from '@patternfly/react-tokens'; -import { chart_color_blue_100 as blue100 } from '@patternfly/react-tokens/dist/js/chart_color_blue_100'; -import { chart_color_blue_200 as blue200 } from '@patternfly/react-tokens/dist/js/chart_color_blue_200'; +import { chart_color_blue_100 as blue100 } from '@patternfly/react-tokens/dist/esm/chart_color_blue_100'; +import { chart_color_blue_200 as blue200 } from '@patternfly/react-tokens/dist/esm/chart_color_blue_200'; import * as _ from 'lodash'; /* eslint-enable camelcase */ import { useRefWidth } from '@console/internal/components/utils'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operand/DEPRECATED_operand-form.tsx b/frontend/packages/operator-lifecycle-manager/src/components/operand/DEPRECATED_operand-form.tsx index 71b8205f75b..ed72ff10368 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operand/DEPRECATED_operand-form.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/operand/DEPRECATED_operand-form.tsx @@ -19,8 +19,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import * as Immutable from 'immutable'; import type { JSONSchema6, JSONSchema6TypeName } from 'json-schema'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx index 8850a7a8eba..78545002a29 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/operator-hub/operator-hub-item-details.tsx @@ -14,7 +14,7 @@ import { StackItem, AlertVariant, } from '@patternfly/react-core'; -import { CheckCircleIcon } from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; +import { CheckCircleIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; diff --git a/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx b/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx index 7d95bf45084..2f27bb5b4a6 100644 --- a/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx +++ b/frontend/packages/operator-lifecycle-manager/src/components/subscription.tsx @@ -15,8 +15,7 @@ import { GridItem, Grid, } from '@patternfly/react-core'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { InProgressIcon, PencilAltIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { sortable } from '@patternfly/react-table'; import * as _ from 'lodash'; diff --git a/frontend/packages/shipwright-plugin/src/models.ts b/frontend/packages/shipwright-plugin/src/models.ts index 566eb69d198..1fac5f20bc4 100644 --- a/frontend/packages/shipwright-plugin/src/models.ts +++ b/frontend/packages/shipwright-plugin/src/models.ts @@ -1,4 +1,4 @@ -import { chart_color_green_400 as tektonGroupColor } from '@patternfly/react-tokens/dist/js/chart_color_green_400'; +import { chart_color_green_400 as tektonGroupColor } from '@patternfly/react-tokens/dist/esm/chart_color_green_400'; import type { K8sModel } from '@console/dynamic-plugin-sdk/src/api/common-types'; import { API_GROUP, API_VERSION_LATEST } from './const'; diff --git a/frontend/packages/topology/src/behavior/withCreateConnector.tsx b/frontend/packages/topology/src/behavior/withCreateConnector.tsx index fd9e21e2826..c2f5c01be08 100644 --- a/frontend/packages/topology/src/behavior/withCreateConnector.tsx +++ b/frontend/packages/topology/src/behavior/withCreateConnector.tsx @@ -28,7 +28,7 @@ import { useCombineRefs, useHover, } from '@patternfly/react-topology'; -import styles from '@patternfly/react-topology/dist/js/css/topology-components'; +import styles from '@patternfly/react-topology/dist/esm/css/topology-components'; import { observer } from 'mobx-react'; import type { ElementProps, diff --git a/frontend/packages/topology/src/components/graph-view/components/RegroupHint.tsx b/frontend/packages/topology/src/components/graph-view/components/RegroupHint.tsx index a9fbea896d7..ace88fa3c74 100644 --- a/frontend/packages/topology/src/components/graph-view/components/RegroupHint.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/RegroupHint.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { InfoCircleIcon } from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; +import { InfoCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { ShortcutTable, Shortcut } from '@console/shared'; diff --git a/frontend/packages/topology/src/components/graph-view/components/nodes/decorators/UrlDecorator.tsx b/frontend/packages/topology/src/components/graph-view/components/nodes/decorators/UrlDecorator.tsx index d8a2606afb3..a57e8a1984f 100644 --- a/frontend/packages/topology/src/components/graph-view/components/nodes/decorators/UrlDecorator.tsx +++ b/frontend/packages/topology/src/components/graph-view/components/nodes/decorators/UrlDecorator.tsx @@ -1,7 +1,7 @@ import type { FC } from 'react'; import { useRef } from 'react'; import { Tooltip, TooltipPosition } from '@patternfly/react-core'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import type { Node } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; import { useRoutesURL } from '../../../../../data-transforms/useRoutesURL'; diff --git a/frontend/packages/topology/src/components/page/LimitExceededState.tsx b/frontend/packages/topology/src/components/page/LimitExceededState.tsx index 883f5dba850..d561f838316 100644 --- a/frontend/packages/topology/src/components/page/LimitExceededState.tsx +++ b/frontend/packages/topology/src/components/page/LimitExceededState.tsx @@ -6,7 +6,7 @@ import { EmptyStateActions, EmptyStateFooter, } from '@patternfly/react-core'; -import { TopologyIcon } from '@patternfly/react-icons/dist/esm/icons/topology-icon'; +import { TopologyIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; diff --git a/frontend/packages/topology/src/components/page/TopologyEmptyState.tsx b/frontend/packages/topology/src/components/page/TopologyEmptyState.tsx index ce0f119f1c0..34137ddc453 100644 --- a/frontend/packages/topology/src/components/page/TopologyEmptyState.tsx +++ b/frontend/packages/topology/src/components/page/TopologyEmptyState.tsx @@ -7,7 +7,7 @@ import { EmptyStateActions, EmptyStateFooter, } from '@patternfly/react-core'; -import { TopologyIcon } from '@patternfly/react-icons/dist/esm/icons/topology-icon'; +import { TopologyIcon } from '@patternfly/react-icons'; import { Trans, useTranslation } from 'react-i18next'; import { Link } from 'react-router'; diff --git a/frontend/packages/topology/src/components/page/TopologyPageToolbar.tsx b/frontend/packages/topology/src/components/page/TopologyPageToolbar.tsx index 9a216fbd544..f54d7f58ffa 100644 --- a/frontend/packages/topology/src/components/page/TopologyPageToolbar.tsx +++ b/frontend/packages/topology/src/components/page/TopologyPageToolbar.tsx @@ -1,9 +1,7 @@ import type { FC } from 'react'; import { useContext } from 'react'; import { Tooltip, Popover, Button, Icon } from '@patternfly/react-core'; -import { ListIcon } from '@patternfly/react-icons/dist/esm/icons/list-icon'; -import { QuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; -import { TopologyIcon } from '@patternfly/react-icons/dist/esm/icons/topology-icon'; +import { ListIcon, QuestionCircleIcon, TopologyIcon } from '@patternfly/react-icons'; import { observer } from '@patternfly/react-topology'; import { useTranslation } from 'react-i18next'; import type { FileUploadContextType } from '@console/app/src/components/file-upload/file-upload-context'; diff --git a/frontend/packages/topology/src/components/workload/BuildOverview.tsx b/frontend/packages/topology/src/components/workload/BuildOverview.tsx index 5726a2adfd9..cd47a977bc4 100644 --- a/frontend/packages/topology/src/components/workload/BuildOverview.tsx +++ b/frontend/packages/topology/src/components/workload/BuildOverview.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { Button, List, ListItem } from '@patternfly/react-core'; -import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; +import { SyncAltIcon } from '@patternfly/react-icons'; import { Trans, useTranslation } from 'react-i18next'; import { Link } from 'react-router'; import { StatusIconAndText } from '@console/dynamic-plugin-sdk'; diff --git a/frontend/packages/topology/src/components/workload/NetworkingOverview.tsx b/frontend/packages/topology/src/components/workload/NetworkingOverview.tsx index 553d634b4e8..88ad2bd71ae 100644 --- a/frontend/packages/topology/src/components/workload/NetworkingOverview.tsx +++ b/frontend/packages/topology/src/components/workload/NetworkingOverview.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { List, ListItem } from '@patternfly/react-core'; -import { LongArrowAltRightIcon } from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-right-icon'; +import { LongArrowAltRightIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { ResourceLink, SidebarSectionHeading } from '@console/internal/components/utils'; import type { K8sResourceKind, RouteKind } from '@console/internal/module/k8s'; diff --git a/frontend/packages/topology/src/filters/NameLabelFilterDropdown.tsx b/frontend/packages/topology/src/filters/NameLabelFilterDropdown.tsx index a4d235f3079..e77ae81365a 100644 --- a/frontend/packages/topology/src/filters/NameLabelFilterDropdown.tsx +++ b/frontend/packages/topology/src/filters/NameLabelFilterDropdown.tsx @@ -2,7 +2,7 @@ import type { FC, Ref } from 'react'; import { useState } from 'react'; import type { MenuToggleElement } from '@patternfly/react-core'; import { Select, SelectList, SelectOption, MenuToggle } from '@patternfly/react-core'; -import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; +import { FilterIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import AutocompleteInput from '@console/internal/components/autocomplete'; import { TextFilter } from '@console/internal/components/factory/text-filter'; diff --git a/frontend/packages/topology/src/filters/TopologyFilterBar.tsx b/frontend/packages/topology/src/filters/TopologyFilterBar.tsx index 51be0be534d..e29c1ea7c14 100644 --- a/frontend/packages/topology/src/filters/TopologyFilterBar.tsx +++ b/frontend/packages/topology/src/filters/TopologyFilterBar.tsx @@ -10,7 +10,7 @@ import { Button, ToolbarFilter, } from '@patternfly/react-core'; -import { InfoCircleIcon } from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; +import { InfoCircleIcon } from '@patternfly/react-icons'; import type { Visualization } from '@patternfly/react-topology'; import { isNode } from '@patternfly/react-topology'; import { Trans, useTranslation } from 'react-i18next'; diff --git a/frontend/packages/vsphere-plugin/src/PopoverHelpButton.tsx b/frontend/packages/vsphere-plugin/src/PopoverHelpButton.tsx index 8669299b1a0..25ed012d5e5 100644 --- a/frontend/packages/vsphere-plugin/src/PopoverHelpButton.tsx +++ b/frontend/packages/vsphere-plugin/src/PopoverHelpButton.tsx @@ -1,6 +1,6 @@ import type { ReactNode, FC } from 'react'; import { Button, Popover } from '@patternfly/react-core'; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; +import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; export const PopoverHelpButton: FC<{ content: ReactNode }> = ({ content }) => { diff --git a/frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx b/frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx index 5e347f7ceec..99f1d0efeaa 100644 --- a/frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx +++ b/frontend/packages/vsphere-plugin/src/components/VSphereOperatorStatuses.tsx @@ -1,10 +1,12 @@ import type { ReactNode, FC } from 'react'; import { useState } from 'react'; import { ExpandableSection } from '@patternfly/react-core'; -import { CheckCircleIcon } from '@patternfly/react-icons/dist/esm/icons/check-circle-icon'; -import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; -import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon'; +import { + CheckCircleIcon, + ExclamationCircleIcon, + InProgressIcon, + UnknownIcon, +} from '@patternfly/react-icons'; import { t_color_green_50 as okColor, t_color_red_60 as errorColor, diff --git a/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadAction.tsx b/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadAction.tsx index 4d41228e859..2f958b6e8d3 100644 --- a/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadAction.tsx +++ b/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadAction.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { Split, SplitItem } from '@patternfly/react-core'; -import { CheckIcon } from '@patternfly/react-icons/dist/esm/icons/check-icon'; +import { CheckIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { useToggleCloudShellExpanded } from '../../redux/actions/cloud-shell-dispatchers'; import { useIsCloudShellExpanded } from '../../redux/reducers/cloud-shell-selectors'; diff --git a/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadButton.tsx b/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadButton.tsx index 5341cba8ac7..ada4d967aa7 100644 --- a/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadButton.tsx +++ b/frontend/packages/webterminal-plugin/src/components/cloud-shell/CloudShellMastheadButton.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { Button, Tooltip } from '@patternfly/react-core'; -import { TerminalIcon } from '@patternfly/react-icons/dist/esm/icons/terminal-icon'; +import { TerminalIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { useTranslation } from 'react-i18next'; import { useTelemetry } from '@console/shared/src/hooks/useTelemetry'; diff --git a/frontend/packages/webterminal-plugin/src/components/cloud-shell/MinimizeRestoreButton.tsx b/frontend/packages/webterminal-plugin/src/components/cloud-shell/MinimizeRestoreButton.tsx index a341e7e5d3f..d8df6244ec3 100644 --- a/frontend/packages/webterminal-plugin/src/components/cloud-shell/MinimizeRestoreButton.tsx +++ b/frontend/packages/webterminal-plugin/src/components/cloud-shell/MinimizeRestoreButton.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import type { ButtonProps } from '@patternfly/react-core'; import { Tooltip, Button } from '@patternfly/react-core'; -import { OutlinedWindowMinimizeIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-window-minimize-icon'; -import { OutlinedWindowRestoreIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-window-restore-icon'; +import { OutlinedWindowMinimizeIcon, OutlinedWindowRestoreIcon } from '@patternfly/react-icons'; type MinimizeRestoreButtonProps = Omit & { minimizeText: string; diff --git a/frontend/public/components/alert-manager.tsx b/frontend/public/components/alert-manager.tsx index c7956807812..5d5df7bbd58 100644 --- a/frontend/public/components/alert-manager.tsx +++ b/frontend/public/components/alert-manager.tsx @@ -10,7 +10,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import { DASH } from '@console/shared/src/constants/ui'; import PaneBody from '@console/shared/src/components/layout/PaneBody'; import { referenceForModel, K8sResourceKind, TableColumn } from '../module/k8s'; diff --git a/frontend/public/components/api-explorer.tsx b/frontend/public/components/api-explorer.tsx index ec6b98e57b1..ab8e7ba189a 100644 --- a/frontend/public/components/api-explorer.tsx +++ b/frontend/public/components/api-explorer.tsx @@ -21,7 +21,7 @@ import { Pagination, Bullseye, } from '@patternfly/react-core'; -import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; +import { FilterIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import i18next from 'i18next'; diff --git a/frontend/public/components/build-pipeline.tsx b/frontend/public/components/build-pipeline.tsx index 0b7fe1dc54c..60c2087254c 100644 --- a/frontend/public/components/build-pipeline.tsx +++ b/frontend/public/components/build-pipeline.tsx @@ -2,10 +2,7 @@ import type { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { Link } from 'react-router'; import * as _ from 'lodash'; -import { BanIcon } from '@patternfly/react-icons/dist/esm/icons/ban-icon'; -import { PendingIcon } from '@patternfly/react-icons/dist/esm/icons/pending-icon'; -import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; - +import { BanIcon, PendingIcon, SyncAltIcon } from '@patternfly/react-icons'; import { ExternalLink } from '@console/shared/src/components/links/ExternalLink'; import { resourcePath } from './utils/resource-link'; import { fromNow } from './utils/datetime'; diff --git a/frontend/public/components/cluster-settings/cluster-operator.tsx b/frontend/public/components/cluster-settings/cluster-operator.tsx index 267c7e97dc8..08e5831497a 100644 --- a/frontend/public/components/cluster-settings/cluster-operator.tsx +++ b/frontend/public/components/cluster-settings/cluster-operator.tsx @@ -11,8 +11,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; -import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon'; +import { SyncAltIcon, UnknownIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { DataViewCheckboxFilter } from '@patternfly/react-data-view'; @@ -59,7 +58,7 @@ import { ConsoleDataViewColumn, ConsoleDataViewRow, } from '@console/app/src/components/data-view/types'; -import { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import { RowProps, TableColumn } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { sortResourceByValue } from '../factory/Table/sort'; import { sorts } from '../factory/table'; diff --git a/frontend/public/components/cluster-settings/cluster-status.tsx b/frontend/public/components/cluster-settings/cluster-status.tsx index 226119bbf0d..c7ac834cb5d 100644 --- a/frontend/public/components/cluster-settings/cluster-status.tsx +++ b/frontend/public/components/cluster-settings/cluster-status.tsx @@ -3,8 +3,7 @@ import type { FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { HashLink } from '@console/shared/src/components/links/HashLink'; -import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; - +import { SyncAltIcon } from '@patternfly/react-icons'; import { BlueArrowCircleUpIcon, BlueInfoCircleIcon, diff --git a/frontend/public/components/configmap-and-secret-data.tsx b/frontend/public/components/configmap-and-secret-data.tsx index 51f60c454a7..d6cd2c02e23 100644 --- a/frontend/public/components/configmap-and-secret-data.tsx +++ b/frontend/public/components/configmap-and-secret-data.tsx @@ -2,8 +2,7 @@ import type { FC } from 'react'; import { useState, useMemo } from 'react'; import { Base64 } from 'js-base64'; import { saveAs } from 'file-saver'; -import { EyeIcon } from '@patternfly/react-icons/dist/esm/icons/eye-icon'; -import { EyeSlashIcon } from '@patternfly/react-icons/dist/esm/icons/eye-slash-icon'; +import { EyeIcon, EyeSlashIcon } from '@patternfly/react-icons'; import { Button, DescriptionList, diff --git a/frontend/public/components/custom-resource-definition.tsx b/frontend/public/components/custom-resource-definition.tsx index 5a64f71da7b..bf5e3ac98b8 100644 --- a/frontend/public/components/custom-resource-definition.tsx +++ b/frontend/public/components/custom-resource-definition.tsx @@ -11,7 +11,7 @@ import { Th, Tr, } from '@patternfly/react-table'; -import { BanIcon } from '@patternfly/react-icons/dist/esm/icons/ban-icon'; +import { BanIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { DetailsPage } from './factory/details'; diff --git a/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx b/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx index 742f74831bb..c8a55f1ec70 100644 --- a/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx +++ b/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/details-card.tsx @@ -2,7 +2,7 @@ import type { FC } from 'react'; import { useContext, useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Card, CardBody, CardHeader, CardTitle, DescriptionList } from '@patternfly/react-core'; -import { InProgressIcon } from '@patternfly/react-icons/dist/esm/icons/in-progress-icon'; +import { InProgressIcon } from '@patternfly/react-icons'; import { BlueArrowCircleUpIcon } from '@console/shared/src/components/status/icons'; import { FLAGS } from '@console/shared/src/constants/common'; import { diff --git a/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/cluster-setup-getting-started-card.tsx b/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/cluster-setup-getting-started-card.tsx index 4dde47fc6f0..3ad3d4616b5 100644 --- a/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/cluster-setup-getting-started-card.tsx +++ b/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/cluster-setup-getting-started-card.tsx @@ -1,8 +1,7 @@ import type { FC } from 'react'; import { useContext } from 'react'; import { useTranslation } from 'react-i18next'; -import { ClipboardCheckIcon } from '@patternfly/react-icons/dist/esm/icons/clipboard-check-icon'; - +import { ClipboardCheckIcon } from '@patternfly/react-icons'; import { useCanClusterUpgrade } from '@console/shared/src/hooks/useCanClusterUpgrade'; import { useTelemetry } from '@console/shared/src/hooks/useTelemetry'; diff --git a/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/explore-admin-features-getting-started-card.tsx b/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/explore-admin-features-getting-started-card.tsx index 44858130729..a6c2e62f682 100644 --- a/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/explore-admin-features-getting-started-card.tsx +++ b/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/getting-started/explore-admin-features-getting-started-card.tsx @@ -2,7 +2,7 @@ import type { FC } from 'react'; import { useMemo } from 'react'; import * as semver from 'semver'; import { useTranslation } from 'react-i18next'; -import { FlagIcon } from '@patternfly/react-icons/dist/esm/icons/flag-icon'; +import { FlagIcon } from '@patternfly/react-icons'; import { FLAGS } from '@console/shared/src/constants/common'; import { useOpenShiftVersion } from '@console/shared/src/hooks/useClusterVersion'; import { useFlag } from '@console/shared/src/hooks/useFlag'; diff --git a/frontend/public/components/dashboard/project-dashboard/getting-started/DeveloperFeaturesGettingStartedCard.tsx b/frontend/public/components/dashboard/project-dashboard/getting-started/DeveloperFeaturesGettingStartedCard.tsx index 61758402dc0..5394515ca37 100644 --- a/frontend/public/components/dashboard/project-dashboard/getting-started/DeveloperFeaturesGettingStartedCard.tsx +++ b/frontend/public/components/dashboard/project-dashboard/getting-started/DeveloperFeaturesGettingStartedCard.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { FlagIcon } from '@patternfly/react-icons/dist/esm/icons/flag-icon'; +import { FlagIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import * as semver from 'semver'; import { ALL_NAMESPACES_KEY } from '@console/shared/src/constants/common'; diff --git a/frontend/public/components/dashboard/project-dashboard/getting-started/SampleGettingStartedCard.tsx b/frontend/public/components/dashboard/project-dashboard/getting-started/SampleGettingStartedCard.tsx index 4b951cd227d..e63a572e182 100644 --- a/frontend/public/components/dashboard/project-dashboard/getting-started/SampleGettingStartedCard.tsx +++ b/frontend/public/components/dashboard/project-dashboard/getting-started/SampleGettingStartedCard.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import { CatalogIcon } from '@patternfly/react-icons/dist/esm/icons/catalog-icon'; +import { CatalogIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { CatalogItem } from '@console/dynamic-plugin-sdk'; import { ALL_NAMESPACES_KEY } from '@console/shared/src/constants/common'; diff --git a/frontend/public/components/edit-yaml.tsx b/frontend/public/components/edit-yaml.tsx index a9bcf33292c..11918bc469f 100644 --- a/frontend/public/components/edit-yaml.tsx +++ b/frontend/public/components/edit-yaml.tsx @@ -9,7 +9,7 @@ import { action } from 'typesafe-actions'; import { ActionType, getOLSCodeBlock } from '@console/internal/reducers/ols'; import { safeLoad, safeLoadAll, safeDump } from 'js-yaml'; import { ActionGroup, Alert, Button } from '@patternfly/react-core'; -import { DownloadIcon } from '@patternfly/react-icons/dist/esm/icons/download-icon'; +import { DownloadIcon, CompressIcon, ExpandIcon } from '@patternfly/react-icons'; import { Trans, useTranslation } from 'react-i18next'; import { useNavigate } from 'react-router'; import { FLAGS, ALL_NAMESPACES_KEY } from '@console/shared/src/constants/common'; @@ -61,8 +61,6 @@ import { definitionFor } from '../module/k8s/swagger'; import { ImportYAMLResults } from './import-yaml-results'; import { EditYamlSettingsModal, useEditYamlSettings } from './modals/edit-yaml-settings-modal'; import { CodeEditorControl } from '@patternfly/react-code-editor'; -import { CompressIcon } from '@patternfly/react-icons/dist/esm/icons/compress-icon'; -import { ExpandIcon } from '@patternfly/react-icons/dist/esm/icons/expand-icon'; import { ToggleSidebarButton } from '@console/shared/src/components/editor/ToggleSidebarButton'; import { RootState } from '@console/internal/redux'; import { getActiveNamespace } from '@console/internal/reducers/ui'; diff --git a/frontend/public/components/factory/Table/VirtualizedTableBody.tsx b/frontend/public/components/factory/Table/VirtualizedTableBody.tsx index 50323699925..73d7fc81d33 100644 --- a/frontend/public/components/factory/Table/VirtualizedTableBody.tsx +++ b/frontend/public/components/factory/Table/VirtualizedTableBody.tsx @@ -2,7 +2,7 @@ import type { ComponentType } from 'react'; import { memo, useMemo } from 'react'; import { CellMeasurerCache, CellMeasurer } from 'react-virtualized'; import { VirtualTableBody } from '@patternfly/react-virtualized-extension'; -import { Scroll } from '@patternfly/react-virtualized-extension/dist/js/components/Virtualized/types'; +import type { Scroll } from '@patternfly/react-virtualized-extension/dist/esm/components/Virtualized/types'; import { OnSelect } from '@patternfly/react-table'; import { K8sResourceCommon, diff --git a/frontend/public/components/factory/table.tsx b/frontend/public/components/factory/table.tsx index 87a8f6be14c..1aa13da0362 100644 --- a/frontend/public/components/factory/table.tsx +++ b/frontend/public/components/factory/table.tsx @@ -21,7 +21,7 @@ import { VirtualTableBody, WindowScroller, } from '@patternfly/react-virtualized-extension'; -import { Scroll } from '@patternfly/react-virtualized-extension/dist/js/components/Virtualized/types'; +import type { Scroll } from '@patternfly/react-virtualized-extension/dist/esm/components/Virtualized/types'; import { useNavigate } from 'react-router'; import { getMachinePhase } from '@console/shared/src/selectors/machine'; import { getMachineSetInstanceType } from '@console/shared/src/selectors/machineSet'; diff --git a/frontend/public/components/filter-toolbar.tsx b/frontend/public/components/filter-toolbar.tsx index 3a45d126fa4..ed3538b083f 100644 --- a/frontend/public/components/filter-toolbar.tsx +++ b/frontend/public/components/filter-toolbar.tsx @@ -21,8 +21,7 @@ import { ToolbarToggleGroup, Tooltip, } from '@patternfly/react-core'; -import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; -import { ColumnsIcon } from '@patternfly/react-icons/dist/esm/icons/columns-icon'; +import { FilterIcon, ColumnsIcon } from '@patternfly/react-icons'; import { RowFilterItem, ColumnLayout, diff --git a/frontend/public/components/graphs/tooltip.tsx b/frontend/public/components/graphs/tooltip.tsx index ca846cf8c01..4908cf1dfb6 100644 --- a/frontend/public/components/graphs/tooltip.tsx +++ b/frontend/public/components/graphs/tooltip.tsx @@ -21,8 +21,8 @@ import { getLegendTooltipDataProps, getLegendTooltipVisibleData, getLegendTooltipVisibleText, -} from '@patternfly/react-charts/dist/js/victory/components/ChartUtils/chart-tooltip'; -import { ChartLegendTooltipStyles } from '@patternfly/react-charts/dist/js/victory/components/ChartTheme/ChartStyles'; +} from '@patternfly/react-charts/dist/esm/victory/components/ChartUtils/chart-tooltip'; +import { ChartLegendTooltipStyles } from '@patternfly/react-charts/dist/esm/victory/components/ChartTheme/ChartStyles'; import { DataPoint } from '.'; diff --git a/frontend/public/components/graphs/utils.ts b/frontend/public/components/graphs/utils.ts index bb77908e979..5bfdd5bf867 100644 --- a/frontend/public/components/graphs/utils.ts +++ b/frontend/public/components/graphs/utils.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash'; import i18n from 'i18next'; -import { chart_color_orange_300 as requestedColor } from '@patternfly/react-tokens/dist/js/chart_color_orange_300'; +import { chart_color_orange_300 as requestedColor } from '@patternfly/react-tokens/dist/esm/chart_color_orange_300'; import { PrometheusResponse, DataPoint, PrometheusResult } from '.'; import type { Humanize } from '../utils/types'; diff --git a/frontend/public/components/image-stream-timeline.tsx b/frontend/public/components/image-stream-timeline.tsx index 388ebbf66b9..af3b9d2d556 100644 --- a/frontend/public/components/image-stream-timeline.tsx +++ b/frontend/public/components/image-stream-timeline.tsx @@ -1,7 +1,6 @@ import type { FC } from 'react'; import * as _ from 'lodash'; -import { CircleIcon } from '@patternfly/react-icons/dist/esm/icons/circle-icon'; -import { SquareIcon } from '@patternfly/react-icons/dist/esm/icons/square-icon'; +import { CircleIcon, SquareIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { K8sResourceKindReference } from '../module/k8s'; diff --git a/frontend/public/components/image-stream.tsx b/frontend/public/components/image-stream.tsx index 50ee5040fb8..d139a05ec24 100644 --- a/frontend/public/components/image-stream.tsx +++ b/frontend/public/components/image-stream.tsx @@ -14,8 +14,7 @@ import { GridItem, Popover, } from '@patternfly/react-core'; -import { QuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; - +import { QuestionCircleIcon } from '@patternfly/react-icons'; import PaneBody from '@console/shared/src/components/layout/PaneBody'; import { K8sResourceKind, diff --git a/frontend/public/components/machine-config-pool.tsx b/frontend/public/components/machine-config-pool.tsx index b04374a982e..cb8a06b4808 100644 --- a/frontend/public/components/machine-config-pool.tsx +++ b/frontend/public/components/machine-config-pool.tsx @@ -12,8 +12,7 @@ import { GridItem, Tooltip, } from '@patternfly/react-core'; -import { PauseCircleIcon } from '@patternfly/react-icons/dist/esm/icons/pause-circle-icon'; -import { SyncAltIcon } from '@patternfly/react-icons/dist/esm/icons/sync-alt-icon'; +import { PauseCircleIcon, SyncAltIcon } from '@patternfly/react-icons'; import { TableColumn } from '@console/dynamic-plugin-sdk'; import PaneBody from '@console/shared/src/components/layout/PaneBody'; diff --git a/frontend/public/components/machine-set.tsx b/frontend/public/components/machine-set.tsx index 9898b6f5c99..392eee981d3 100644 --- a/frontend/public/components/machine-set.tsx +++ b/frontend/public/components/machine-set.tsx @@ -22,7 +22,7 @@ import { Grid, GridItem, } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import LazyActionMenu from '@console/shared/src/components/actions/LazyActionMenu'; diff --git a/frontend/public/components/masthead/masthead-toolbar.tsx b/frontend/public/components/masthead/masthead-toolbar.tsx index a121a70b5af..58f1ced8b25 100644 --- a/frontend/public/components/masthead/masthead-toolbar.tsx +++ b/frontend/public/components/masthead/masthead-toolbar.tsx @@ -6,10 +6,7 @@ import { shallowEqual } from 'react-redux'; import { useConsoleSelector } from '@console/shared/src/hooks/useConsoleSelector'; import { useConsoleDispatch } from '@console/shared/src/hooks/useConsoleDispatch'; import { useNavigate } from 'react-router'; -import { BellIcon } from '@patternfly/react-icons/dist/esm/icons/bell-icon'; -import { EllipsisVIcon } from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; -import { ThIcon } from '@patternfly/react-icons/dist/esm/icons/th-icon'; -import { QuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; +import { BellIcon, EllipsisVIcon, ThIcon, QuestionCircleIcon } from '@patternfly/react-icons'; import { Dropdown, Divider, diff --git a/frontend/public/components/modals/impersonate-user-modal.tsx b/frontend/public/components/modals/impersonate-user-modal.tsx index d0ec176d44d..dfc8adee3d2 100644 --- a/frontend/public/components/modals/impersonate-user-modal.tsx +++ b/frontend/public/components/modals/impersonate-user-modal.tsx @@ -27,8 +27,7 @@ import { Flex, FlexItem, } from '@patternfly/react-core'; -import { TimesIcon } from '@patternfly/react-icons/dist/esm/icons/times-icon'; -import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon'; +import { TimesIcon, ExclamationCircleIcon } from '@patternfly/react-icons'; import { FieldLevelHelp } from '../utils/field-level-help'; import { useK8sWatchResource } from '../utils/k8s-watch-hook'; import { GroupModel } from '../../models'; diff --git a/frontend/public/components/modals/taints-modal.tsx b/frontend/public/components/modals/taints-modal.tsx index 0db69251f96..9c0f8029026 100644 --- a/frontend/public/components/modals/taints-modal.tsx +++ b/frontend/public/components/modals/taints-modal.tsx @@ -12,8 +12,7 @@ import { Tooltip, } from '@patternfly/react-core'; import { Table, Thead, Tr, Th, Td, Tbody } from '@patternfly/react-table'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { ConsoleSelect } from '@console/internal/components/utils/console-select'; diff --git a/frontend/public/components/modals/tolerations-modal.tsx b/frontend/public/components/modals/tolerations-modal.tsx index c8307e01baa..725b166bec4 100644 --- a/frontend/public/components/modals/tolerations-modal.tsx +++ b/frontend/public/components/modals/tolerations-modal.tsx @@ -12,8 +12,7 @@ import { Tooltip, } from '@patternfly/react-core'; import { Table, Thead, Tr, Th, Td, Tbody } from '@patternfly/react-table'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import { ConsoleSelect } from '@console/internal/components/utils/console-select'; import { EmptyBox } from '../utils/status-box'; diff --git a/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx b/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx index 3999a18876c..7985e42c05b 100644 --- a/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx +++ b/frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx @@ -22,7 +22,7 @@ import { GridItem, ButtonVariant, } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import { DocumentTitle } from '@console/shared/src/components/document-title/DocumentTitle'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/public/components/monitoring/receiver-forms/routing-labels-editor.tsx b/frontend/public/components/monitoring/receiver-forms/routing-labels-editor.tsx index 99490c2395c..ada250c6703 100644 --- a/frontend/public/components/monitoring/receiver-forms/routing-labels-editor.tsx +++ b/frontend/public/components/monitoring/receiver-forms/routing-labels-editor.tsx @@ -1,7 +1,6 @@ import * as _ from 'lodash'; import { Trans, useTranslation } from 'react-i18next'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { MinusCircleIcon, PlusCircleIcon, ExclamationCircleIcon } from '@patternfly/react-icons'; import { Button, Content, @@ -19,7 +18,6 @@ import { } from '@patternfly/react-core'; import { ExternalLink } from '@console/shared/src/components/links/ExternalLink'; import { DOC_URL_PROMETHEUS_MATCHERS } from '../../utils/documentation'; -import { ExclamationCircleIcon } from '@patternfly/react-icons'; const DEFAULT_RECEIVER_LABEL = 'All (default receiver)'; diff --git a/frontend/public/components/namespace.jsx b/frontend/public/components/namespace.jsx index 162741a58b9..2893817a858 100644 --- a/frontend/public/components/namespace.jsx +++ b/frontend/public/components/namespace.jsx @@ -19,7 +19,7 @@ import { useConsoleSelector } from '@console/shared/src/hooks/useConsoleSelector import { useTranslation } from 'react-i18next'; import i18next from 'i18next'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import { Link } from 'react-router'; import { Status } from '@console/shared/src/components/status/Status'; diff --git a/frontend/public/components/persistent-volume-claim.tsx b/frontend/public/components/persistent-volume-claim.tsx index 525077d7a4a..ff69ed51b92 100644 --- a/frontend/public/components/persistent-volume-claim.tsx +++ b/frontend/public/components/persistent-volume-claim.tsx @@ -16,7 +16,7 @@ import { GridItem, } from '@patternfly/react-core'; import { DataViewCheckboxFilter } from '@patternfly/react-data-view'; -import { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import { ChartDonut } from '@patternfly/react-charts/victory'; import { actionsCellProps, diff --git a/frontend/public/components/pod-connect.tsx b/frontend/public/components/pod-connect.tsx index 49c3fea2742..a79dca21bc8 100644 --- a/frontend/public/components/pod-connect.tsx +++ b/frontend/public/components/pod-connect.tsx @@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef, useState, useMemo } from 'react'; import * as _ from 'lodash'; import { Base64 } from 'js-base64'; import { useTranslation } from 'react-i18next'; -import { ExpandIcon } from '@patternfly/react-icons/dist/esm/icons/expand-icon'; +import { ExpandIcon } from '@patternfly/react-icons'; import { Button, Alert, diff --git a/frontend/public/components/pod-list.tsx b/frontend/public/components/pod-list.tsx index 93266236ff2..ddff0425213 100644 --- a/frontend/public/components/pod-list.tsx +++ b/frontend/public/components/pod-list.tsx @@ -27,7 +27,7 @@ import { useUserPreference } from '@console/shared/src/hooks/useUserPreference'; import type { TableColumnsType } from '@console/shared/src/types/tableColumn'; import { Button, Content, ContentVariants, Divider, Popover } from '@patternfly/react-core'; import { DataViewCheckboxFilter } from '@patternfly/react-data-view'; -import { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import * as _ from 'lodash'; import { useEffect, useMemo, FC, ReactNode, Suspense, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/public/components/pod-traffic.tsx b/frontend/public/components/pod-traffic.tsx index 623be341ea0..41c5fbf716f 100644 --- a/frontend/public/components/pod-traffic.tsx +++ b/frontend/public/components/pod-traffic.tsx @@ -3,8 +3,7 @@ import { useTranslation } from 'react-i18next'; import { Tooltip } from '@patternfly/react-core'; import { useK8sWatchResource } from '@console/internal/components/utils/k8s-watch-hook'; import { EndpointSliceKind } from '../module/k8s'; -import { ConnectedIcon } from '@patternfly/react-icons/dist/esm/icons/connected-icon'; -import { DisconnectedIcon } from '@patternfly/react-icons/dist/esm/icons/disconnected-icon'; +import { ConnectedIcon, DisconnectedIcon } from '@patternfly/react-icons'; import { EndPointSliceModel } from '@console/app/src/models'; import { LoadingInline } from '@console/internal/components/utils/status-box'; import Status from '@console/dynamic-plugin-sdk/src/app/components/status/Status'; diff --git a/frontend/public/components/resource-quota.jsx b/frontend/public/components/resource-quota.jsx index 57383b694eb..f504571adf7 100644 --- a/frontend/public/components/resource-quota.jsx +++ b/frontend/public/components/resource-quota.jsx @@ -2,12 +2,13 @@ import { useMemo, Suspense } from 'react'; import * as _ from 'lodash'; import { useParams } from 'react-router'; import { Table as PfTable, Thead, Tbody, Tr, Th, Td } from '@patternfly/react-table'; -import { OutlinedCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-circle-icon'; -import { ResourcesAlmostEmptyIcon } from '@patternfly/react-icons/dist/esm/icons/resources-almost-empty-icon'; -import { ResourcesAlmostFullIcon } from '@patternfly/react-icons/dist/esm/icons/resources-almost-full-icon'; -import { ResourcesFullIcon } from '@patternfly/react-icons/dist/esm/icons/resources-full-icon'; -import { UnknownIcon } from '@patternfly/react-icons/dist/esm/icons/unknown-icon'; - +import { + OutlinedCircleIcon, + ResourcesAlmostEmptyIcon, + ResourcesAlmostFullIcon, + ResourcesFullIcon, + UnknownIcon, +} from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; import AppliedClusterResourceQuotaCharts from '@console/app/src/components/resource-quota/AppliedClusterResourceQuotaCharts'; import ResourceQuotaCharts from '@console/app/src/components/resource-quota/ResourceQuotaCharts'; diff --git a/frontend/public/components/search-filter-dropdown.tsx b/frontend/public/components/search-filter-dropdown.tsx index 4e34442eeb1..309354e1efb 100644 --- a/frontend/public/components/search-filter-dropdown.tsx +++ b/frontend/public/components/search-filter-dropdown.tsx @@ -11,7 +11,7 @@ import { SelectOption, } from '@patternfly/react-core'; -import { FilterIcon } from '@patternfly/react-icons/dist/esm/icons/filter-icon'; +import { FilterIcon } from '@patternfly/react-icons'; import { TextFilter } from './factory/text-filter'; export enum searchFilterValues { diff --git a/frontend/public/components/search.tsx b/frontend/public/components/search.tsx index 7b3d4db3796..cff0a84364d 100644 --- a/frontend/public/components/search.tsx +++ b/frontend/public/components/search.tsx @@ -19,8 +19,7 @@ import { ToolbarFilter, ToolbarItem, } from '@patternfly/react-core'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { PlusCircleIcon, MinusCircleIcon } from '@patternfly/react-icons'; import { getBadgeFromType } from '@console/shared/src/components/badges/badge-factory'; import { usePinnedResources } from '@console/shared/src/hooks/usePinnedResources'; import { useTelemetry } from '@console/shared/src/hooks/useTelemetry'; diff --git a/frontend/public/components/secrets/create-secret/OpaqueSecretForm.tsx b/frontend/public/components/secrets/create-secret/OpaqueSecretForm.tsx index 5fe3f4a498f..2027041bf5f 100644 --- a/frontend/public/components/secrets/create-secret/OpaqueSecretForm.tsx +++ b/frontend/public/components/secrets/create-secret/OpaqueSecretForm.tsx @@ -2,7 +2,7 @@ import type { FC } from 'react'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Button, ActionGroup } from '@patternfly/react-core'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { PlusCircleIcon } from '@patternfly/react-icons'; import { SecretSubFormProps, OpaqueDataEntry } from './types'; import { OpaqueSecretFormEntry } from './OpaqueSecretFormEntry'; import { opaqueSecretObjectToArray, newOpaqueSecretEntry, opaqueEntriesToObject } from './utils'; diff --git a/frontend/public/components/secrets/create-secret/OpaqueSecretFormEntry.tsx b/frontend/public/components/secrets/create-secret/OpaqueSecretFormEntry.tsx index 7a8574ec957..954bf7087a9 100644 --- a/frontend/public/components/secrets/create-secret/OpaqueSecretFormEntry.tsx +++ b/frontend/public/components/secrets/create-secret/OpaqueSecretFormEntry.tsx @@ -5,7 +5,7 @@ import { Base64 } from 'js-base64'; import { TextInput, Button, FormGroup, ActionGroup, FormFieldGroup } from '@patternfly/react-core'; import { DroppableFileInput } from './DropableFileInput'; import { OpaqueSecretFormEntryProps } from './types'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { MinusCircleIcon } from '@patternfly/react-icons'; export const OpaqueSecretFormEntry: FC = ({ onChange, diff --git a/frontend/public/components/secrets/create-secret/PullSecretCredentialEntry.tsx b/frontend/public/components/secrets/create-secret/PullSecretCredentialEntry.tsx index 74ead0533d1..390b4a3b2fc 100644 --- a/frontend/public/components/secrets/create-secret/PullSecretCredentialEntry.tsx +++ b/frontend/public/components/secrets/create-secret/PullSecretCredentialEntry.tsx @@ -12,7 +12,7 @@ import { FormFieldGroup, ActionGroup, } from '@patternfly/react-core'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { MinusCircleIcon } from '@patternfly/react-icons'; export const PullSecretCredentialEntry: FC = ({ id, diff --git a/frontend/public/components/secrets/create-secret/PullSecretCredentialsForm.tsx b/frontend/public/components/secrets/create-secret/PullSecretCredentialsForm.tsx index 9ac557454cd..d9f04c5e25a 100644 --- a/frontend/public/components/secrets/create-secret/PullSecretCredentialsForm.tsx +++ b/frontend/public/components/secrets/create-secret/PullSecretCredentialsForm.tsx @@ -2,7 +2,7 @@ import type { FC } from 'react'; import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { Button, ActionGroup } from '@patternfly/react-core'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; +import { PlusCircleIcon } from '@patternfly/react-icons'; import { PullSecretCredentialEntry } from './PullSecretCredentialEntry'; import { SecretStringData, SecretType, OnSecretChange } from './types'; import { diff --git a/frontend/public/components/sidebars/resource-sidebar-samples.tsx b/frontend/public/components/sidebars/resource-sidebar-samples.tsx index 2512f66ba44..3d329888898 100644 --- a/frontend/public/components/sidebars/resource-sidebar-samples.tsx +++ b/frontend/public/components/sidebars/resource-sidebar-samples.tsx @@ -4,10 +4,12 @@ import { useState } from 'react'; import { Button, Level, LevelItem, List, ListItem, Title } from '@patternfly/react-core'; import { Language } from '@patternfly/react-code-editor'; import { BasicCodeEditor } from '@console/shared/src/components/editor/BasicCodeEditor'; -import { ChevronDownIcon } from '@patternfly/react-icons/dist/esm/icons/chevron-down-icon'; -import { ChevronRightIcon } from '@patternfly/react-icons/dist/esm/icons/chevron-right-icon'; -import { DownloadIcon } from '@patternfly/react-icons/dist/esm/icons/download-icon'; -import { PasteIcon } from '@patternfly/react-icons/dist/esm/icons/paste-icon'; +import { + ChevronDownIcon, + ChevronRightIcon, + DownloadIcon, + PasteIcon, +} from '@patternfly/react-icons'; import { Sample } from '@console/shared/src/hooks/useResourceSidebarSamples'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/public/components/start-guide.tsx b/frontend/public/components/start-guide.tsx index f250ccc806c..18d1ba1a4a9 100644 --- a/frontend/public/components/start-guide.tsx +++ b/frontend/public/components/start-guide.tsx @@ -14,7 +14,7 @@ import { ProjectModel } from '../models'; import { K8sResourceKind } from '../module/k8s/types'; import { useCreateNamespaceOrProjectModal } from '@console/shared/src/hooks/useCreateNamespaceOrProjectModal'; import { useFlag } from '@console/shared/src/hooks/useFlag'; -import { ClusterIcon } from '@patternfly/react-icons/dist/esm/icons/cluster-icon'; +import { ClusterIcon } from '@patternfly/react-icons'; import { ExternalLinkButton } from '@console/shared/src/components/links/ExternalLinkButton'; export const OpenShiftGettingStarted: FC = () => { diff --git a/frontend/public/components/template-instance.tsx b/frontend/public/components/template-instance.tsx index e870abcf7a8..36a48dc1270 100644 --- a/frontend/public/components/template-instance.tsx +++ b/frontend/public/components/template-instance.tsx @@ -45,7 +45,7 @@ import { ConsoleDataViewColumn, ConsoleDataViewRow, } from '@console/app/src/components/data-view/types'; -import { DataViewFilterOption } from '@patternfly/react-data-view/dist/cjs/DataViewFilters'; +import type { DataViewFilterOption } from '@patternfly/react-data-view/dist/esm/DataViewFilters'; import { RowProps, TableColumn } from '@console/dynamic-plugin-sdk/src/extensions/console-types'; import { sortResourceByValue } from './factory/Table/sort'; import LazyActionMenu from '@console/shared/src/components/actions/LazyActionMenu'; diff --git a/frontend/public/components/utils/details-item.tsx b/frontend/public/components/utils/details-item.tsx index 6bd7ce43518..06735554a2d 100644 --- a/frontend/public/components/utils/details-item.tsx +++ b/frontend/public/components/utils/details-item.tsx @@ -1,7 +1,7 @@ import type { FC, ReactNode, MouseEvent } from 'react'; import * as _ from 'lodash'; import { css } from '@patternfly/react-styles'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import { Breadcrumb, BreadcrumbItem, diff --git a/frontend/public/components/utils/details-page.tsx b/frontend/public/components/utils/details-page.tsx index bbe079af999..f5729071f0c 100644 --- a/frontend/public/components/utils/details-page.tsx +++ b/frontend/public/components/utils/details-page.tsx @@ -2,7 +2,7 @@ import type { ComponentType, FC, ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import * as _ from 'lodash'; import { Button, DescriptionList } from '@patternfly/react-core'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; +import { PencilAltIcon } from '@patternfly/react-icons'; import { useCanClusterUpgrade } from '@console/shared/src/hooks/useCanClusterUpgrade'; import { useAnnotationsModal } from '@console/shared/src/hooks/useAnnotationsModal'; import { useLabelsModal } from '@console/shared/src/hooks/useLabelsModal'; diff --git a/frontend/public/components/utils/download-button.tsx b/frontend/public/components/utils/download-button.tsx index 4221075af1e..a9b6504547d 100644 --- a/frontend/public/components/utils/download-button.tsx +++ b/frontend/public/components/utils/download-button.tsx @@ -2,8 +2,7 @@ import type { FC } from 'react'; import { useState } from 'react'; import { saveAs } from 'file-saver'; import { Alert, Button } from '@patternfly/react-core'; -import { DownloadIcon } from '@patternfly/react-icons/dist/esm/icons/download-icon'; - +import { DownloadIcon } from '@patternfly/react-icons'; import { coFetch } from '../../co-fetch'; export const DownloadButton: FC = (props) => { diff --git a/frontend/public/components/utils/field-level-help.tsx b/frontend/public/components/utils/field-level-help.tsx index 5b5b093de2a..90d13e34a86 100644 --- a/frontend/public/components/utils/field-level-help.tsx +++ b/frontend/public/components/utils/field-level-help.tsx @@ -1,7 +1,7 @@ import type { ReactNode } from 'react'; import { memo, Children } from 'react'; import { Button, Popover, PopoverProps } from '@patternfly/react-core'; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; +import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import { useTranslation } from 'react-i18next'; export const FieldLevelHelp = memo( diff --git a/frontend/public/components/utils/kebab.tsx b/frontend/public/components/utils/kebab.tsx index 10f644b154c..deff1bbd6a5 100644 --- a/frontend/public/components/utils/kebab.tsx +++ b/frontend/public/components/utils/kebab.tsx @@ -12,7 +12,7 @@ import { MenuToggleElement, Tooltip, } from '@patternfly/react-core'; -import { EllipsisVIcon } from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon'; +import { EllipsisVIcon } from '@patternfly/react-icons'; import { useNavigate } from 'react-router'; import { impersonateStateToProps, ImpersonateKind } from '@console/dynamic-plugin-sdk'; import { diff --git a/frontend/public/components/utils/list-input.tsx b/frontend/public/components/utils/list-input.tsx index 3803895525b..62dd2128369 100644 --- a/frontend/public/components/utils/list-input.tsx +++ b/frontend/public/components/utils/list-input.tsx @@ -3,8 +3,7 @@ import { Component } from 'react'; import * as _ from 'lodash'; import { css } from '@patternfly/react-styles'; import { Button } from '@patternfly/react-core'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; +import { PlusCircleIcon, MinusCircleIcon } from '@patternfly/react-icons'; /* eslint-disable-next-line */ import { withTranslation, WithTranslation } from 'react-i18next'; diff --git a/frontend/public/components/utils/name-value-editor.jsx b/frontend/public/components/utils/name-value-editor.jsx index 8a99708d6aa..0b0b39db3c1 100644 --- a/frontend/public/components/utils/name-value-editor.jsx +++ b/frontend/public/components/utils/name-value-editor.jsx @@ -14,10 +14,7 @@ import { GridItem, Tooltip, } from '@patternfly/react-core'; -import { GripVerticalIcon } from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon'; -import { MinusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/minus-circle-icon'; -import { PlusCircleIcon } from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon'; - +import { GripVerticalIcon, MinusCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; import { withTranslation } from 'react-i18next'; import { NameValueEditorPair, EnvFromPair, EnvType } from './types'; diff --git a/frontend/public/components/utils/selector.tsx b/frontend/public/components/utils/selector.tsx index 8caf31756c6..750783a4dc7 100644 --- a/frontend/public/components/utils/selector.tsx +++ b/frontend/public/components/utils/selector.tsx @@ -1,6 +1,6 @@ import * as _ from 'lodash'; import type { FC } from 'react'; -import { SearchIcon } from '@patternfly/react-icons/dist/esm/icons/search-icon'; +import { SearchIcon } from '@patternfly/react-icons'; import { Link } from 'react-router'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/public/components/utils/single-typeahead-dropdown.tsx b/frontend/public/components/utils/single-typeahead-dropdown.tsx index 6c2b5fa85e1..b63c56581ec 100644 --- a/frontend/public/components/utils/single-typeahead-dropdown.tsx +++ b/frontend/public/components/utils/single-typeahead-dropdown.tsx @@ -16,7 +16,7 @@ import { import * as _ from 'lodash'; import { FC, Ref, useState, useMemo, useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; -import { TimesIcon } from '@patternfly/react-icons/dist/esm/icons/times-icon'; +import { TimesIcon } from '@patternfly/react-icons'; export type SingleTypeaheadDropdownProps = { /** The items to display in the dropdown */ diff --git a/frontend/public/components/utils/toggle-play.tsx b/frontend/public/components/utils/toggle-play.tsx index 5fe9e6e447c..850da9e304f 100644 --- a/frontend/public/components/utils/toggle-play.tsx +++ b/frontend/public/components/utils/toggle-play.tsx @@ -1,7 +1,6 @@ import type { FC } from 'react'; import { Button, ButtonProps } from '@patternfly/react-core'; -import { PauseIcon } from '@patternfly/react-icons/dist/esm/icons/pause-icon'; -import { PlayIcon } from '@patternfly/react-icons/dist/esm/icons/play-icon'; +import { PauseIcon, PlayIcon } from '@patternfly/react-icons'; import { css } from '@patternfly/react-styles'; import { useTranslation } from 'react-i18next'; diff --git a/frontend/public/components/utils/webhooks.tsx b/frontend/public/components/utils/webhooks.tsx index 43b4045e8c4..a6f444a1110 100644 --- a/frontend/public/components/utils/webhooks.tsx +++ b/frontend/public/components/utils/webhooks.tsx @@ -2,7 +2,7 @@ import type { FC } from 'react'; import { useState, useEffect } from 'react'; import * as _ from 'lodash'; import { Base64 } from 'js-base64'; -import { PasteIcon } from '@patternfly/react-icons/dist/esm/icons/paste-icon'; +import { PasteIcon } from '@patternfly/react-icons'; import { Button, AlertVariant } from '@patternfly/react-core'; import { useTranslation } from 'react-i18next'; From 7de3f8cc9d549388084e505f64a43b58aa48c395 Mon Sep 17 00:00:00 2001 From: logonoff Date: Mon, 23 Mar 2026 09:42:55 -0400 Subject: [PATCH 2/4] OCPBUGS-79315: expand pf stylemock pf/react-styles has files in .mjs which import from .css. they were not being transformed by swc, so the css stylemock was not working. now swc will transform those files and the stylemock will work as intended. --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index b742134aff8..d8070eecb91 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -90,7 +90,7 @@ "transform": { "get-local-plugins\\.js$": "./scripts/jest-transform-local-plugins.js", "^.+\\.(gql|graphql)$": "./scripts/jest-transform-graphql.js", - "^.+\\.(ts|tsx|js|jsx)$": [ + "^.+\\.(ts|tsx|js|jsx|mjs)$": [ "@swc/jest", { "module": { From ce2eaf8e9c4e9585a7a4d807ed01fe2ab9c4bf6b Mon Sep 17 00:00:00 2001 From: logonoff Date: Sun, 22 Mar 2026 15:59:11 -0400 Subject: [PATCH 3/4] OCPBUGS-79315: update eslint to ban all cjs pf imports --- .../lib/config/rules/typescript.js | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/frontend/packages/eslint-plugin-console/lib/config/rules/typescript.js b/frontend/packages/eslint-plugin-console/lib/config/rules/typescript.js index a73eedd7ff1..2076c544c54 100644 --- a/frontend/packages/eslint-plugin-console/lib/config/rules/typescript.js +++ b/frontend/packages/eslint-plugin-console/lib/config/rules/typescript.js @@ -289,18 +289,41 @@ module.exports = { 'prefer-rest-params': 'error', 'prefer-spread': 'error', - // Prevent imports from @patternfly/react-icons CJS distribution + // Prevent imports from @patternfly CJS distributions (dist/js or dist/cjs). + // The import/no-restricted-paths rule does not support globs, so each package + // with a CJS distribution must be listed individually. + // TODO: change this to a glob when our eslint is no longer ancient 'import/no-restricted-paths': [ 'error', { zones: [ - { + 'react-core', + 'react-icons', + 'react-table', + 'react-charts', + 'react-code-editor', + 'react-data-view', + 'react-drag-drop', + 'react-log-viewer', + 'react-styles', + 'react-templates', + 'react-tokens', + 'react-topology', + 'react-virtualized-extension', + 'react-catalog-view-extension', + ] + .map((pkg) => ({ target: './', - from: 'node_modules/@patternfly/react-icons/dist/js', - except: ['./index.js'], - message: 'Import from the ESM entry point instead: @patternfly/react-icons', - }, - ], + from: `node_modules/@patternfly/${pkg}/dist/js`, + message: 'Import from the ESM entry point instead of the CJS dist/js path.', + })) + .concat( + ['react-component-groups', 'react-data-view', 'react-user-feedback'].map((pkg) => ({ + target: './', + from: `node_modules/@patternfly/${pkg}/dist/cjs`, + message: 'Import from the ESM entry point instead of the CJS dist/cjs path.', + })), + ), }, ], }; From 68cb4b10c2a1064416246dc338ef3e8a91e290ba Mon Sep 17 00:00:00 2001 From: logonoff Date: Thu, 26 Mar 2026 14:50:54 -0400 Subject: [PATCH 4/4] OCPBUGS-79315: Fix analyze.sh ci job Our current analyze.sh job is fragile and sometimes fails like this: ``` webpack 5.104.1 compiled with 2 warnings in 104418 ms Copying the Webpack Bundle Analyzer report to /logs/artifacts... Main vendor bundle size: 5358214.00 MiB ./analyze.sh: line 23: ((: 5358214 5358274: syntax error in expression (error token is "5358274") ``` but the prow job itself passes. this is clearly not ideal. Rather than update the bash, it's much more robust to move the checking over to webpack, so that the webpack build will fail if running `./analyze.sh`. --- analyze.sh | 13 +++---------- frontend/webpack.config.ts | 19 ++++++++++++------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/analyze.sh b/analyze.sh index 3537bdf56bc..771206f81d2 100755 --- a/analyze.sh +++ b/analyze.sh @@ -8,20 +8,13 @@ ARTIFACT_DIR=${ARTIFACT_DIR:=/tmp/artifacts} cd frontend echo "Analyzing Webpack bundles..." -yarn run analyze +ANALYZE_RC=0 +yarn run analyze || ANALYZE_RC=$? if [ -d "$ARTIFACT_DIR" ]; then echo "Copying the Webpack Bundle Analyzer report to $ARTIFACT_DIR..." cp public/dist/report.html "${ARTIFACT_DIR}" fi - -MAX_BYTES=3879731 # ~3.7 MiB -VENDORS_MAIN_BYTES=$(du -b `find public/dist -type f -name 'vendors~main-chunk*js'` | cut -f1) -DISPLAY_VALUE=$(awk "BEGIN {printf \"%.2f\n\", $VENDORS_MAIN_BYTES/1024/1024}") -MAX_DISPLAY_VALUE=$(awk "BEGIN {printf \"%.2f\n\", $MAX_BYTES/1024/1024}") - -echo "Main vendor bundle size: $DISPLAY_VALUE MiB" -if (( VENDORS_MAIN_BYTES > MAX_BYTES )); then - echo "FAILURE: Main vendor bundle is larger than the $MAX_DISPLAY_VALUE MiB limit." +if [ $ANALYZE_RC -ne 0 ]; then echo "If you haven't added a new dependency, an import might have accidentally pulled an existing dependency into the main vendor bundle." echo "If adding a large dependency, consider lazy loading the component with AsyncComponent." exit 1 diff --git a/frontend/webpack.config.ts b/frontend/webpack.config.ts index dbf428af08b..af5cceccd6c 100644 --- a/frontend/webpack.config.ts +++ b/frontend/webpack.config.ts @@ -92,6 +92,11 @@ const config: Configuration = { filename: '[name]-bundle.js', chunkFilename: '[name]-[chunkhash].js', }, + performance: { + // The maximum size of the entry point and generated files permitted by analyze.sh + maxEntrypointSize: 11207475, // ~10.69 MiB + maxAssetSize: 5945425, // ~5.67 MiB + }, devServer: { hot: HOT_RELOAD !== 'false', webSocketServer: 'sockjs', @@ -222,13 +227,7 @@ const config: Configuration = { test: /\/node_modules\//, priority: -10, enforce: true, - filename: (pathData) => { - // give a special name to initial chunk for analyze.sh - if ((pathData?.chunk as webpack.Chunk)?.isOnlyInitial()) { - return `vendors~main-chunk-[name]-[contenthash].min.js`; - } - return 'vendors~[name]-chunk-[contenthash].min.js'; - }, + filename: 'vendors~[name]-chunk-[contenthash].min.js', }, 'vendor-plugins-shared': { test(module: webpack.NormalModule) { @@ -339,6 +338,12 @@ if (ANALYZE_BUNDLE === 'true') { openAnalyzer: false, }), ); + + // Only fail the build due to excess bundle size if running analyze.sh + // This way, the other tests (frontend, e2e) can still provide feedback in CI + if (config.performance) { + config.performance.hints = 'error'; + } } /* Production settings */