diff --git a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx index 06e4bc4bf0a..d1730953034 100644 --- a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx +++ b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx @@ -2,19 +2,17 @@ import * as React from 'react'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/CodeEditor/code-editor'; import fileUploadStyles from '@patternfly/react-styles/css/components/FileUpload/file-upload'; +import { Button, ButtonVariant } from '@patternfly/react-core/dist/esm/components/Button'; import { - Button, - ButtonVariant, EmptyState, - EmptyStateBody, EmptyStateActions, - EmptyStateVariant, + EmptyStateBody, EmptyStateFooter, - getResizeObserver, - Popover, - PopoverProps, - TooltipPosition -} from '@patternfly/react-core'; + EmptyStateVariant +} from '@patternfly/react-core/dist/esm/components/EmptyState'; +import { Popover, PopoverProps } from '@patternfly/react-core/dist/esm/components/Popover'; +import { TooltipPosition } from '@patternfly/react-core/dist/esm/components/Tooltip'; +import { getResizeObserver } from '@patternfly/react-core/dist/esm/helpers/resizeObserver'; import Editor, { EditorProps, Monaco } from '@monaco-editor/react'; import type { editor } from 'monaco-editor'; import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon'; diff --git a/packages/react-code-editor/src/components/CodeEditor/CodeEditorControl.tsx b/packages/react-code-editor/src/components/CodeEditor/CodeEditorControl.tsx index f07c9eca00a..d6fff968d92 100644 --- a/packages/react-code-editor/src/components/CodeEditor/CodeEditorControl.tsx +++ b/packages/react-code-editor/src/components/CodeEditor/CodeEditorControl.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; -import { Button, ButtonProps, Tooltip } from '@patternfly/react-core'; +import { Button, ButtonProps } from '@patternfly/react-core/dist/esm/components/Button'; +import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip'; import { CodeEditorContext } from './CodeEditorUtils'; /** Allows customizing the code editor controls by passing this sub-component into the diff --git a/packages/react-docs/patternfly-docs/pages/icons.js b/packages/react-docs/patternfly-docs/pages/icons.js index 1a03ff9df71..f245fbf2fba 100644 --- a/packages/react-docs/patternfly-docs/pages/icons.js +++ b/packages/react-docs/patternfly-docs/pages/icons.js @@ -1,5 +1,8 @@ import React from 'react'; -import { Tooltip, Grid, GridItem, PageSection, Content } from '@patternfly/react-core'; +import { Content } from '@patternfly/react-core/dist/esm/components/Content'; +import { Grid, GridItem } from '@patternfly/react-core/dist/esm/layouts/Grid'; +import { PageSection } from '@patternfly/react-core/dist/esm/components/Page/PageSection'; +import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip'; import spacerMd from '@patternfly/react-tokens/dist/esm/t_global_spacer_md'; import labelFontSize from '@patternfly/react-tokens/dist/esm/t_global_font_size_sm'; import * as IconsModule from '@patternfly/react-icons/dist/esm'; diff --git a/packages/react-docs/patternfly-docs/pages/index.js b/packages/react-docs/patternfly-docs/pages/index.js index 426faebea86..5b90aa5cf28 100644 --- a/packages/react-docs/patternfly-docs/pages/index.js +++ b/packages/react-docs/patternfly-docs/pages/index.js @@ -1,5 +1,6 @@ import React from 'react'; -import { Title, PageSection } from '@patternfly/react-core'; +import { PageSection } from '@patternfly/react-core/dist/esm/components/Page/PageSection'; +import { Title } from '@patternfly/react-core/dist/esm/components/Title'; // https://philipwalton.github.io/solved-by-flexbox/demos/vertical-centering/ const centerStyle = { diff --git a/packages/react-drag-drop/src/components/DragDrop/DragButton.tsx b/packages/react-drag-drop/src/components/DragDrop/DragButton.tsx index def72dd2215..c416afa2433 100644 --- a/packages/react-drag-drop/src/components/DragDrop/DragButton.tsx +++ b/packages/react-drag-drop/src/components/DragDrop/DragButton.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { css } from '@patternfly/react-styles'; -import { Button } from '@patternfly/react-core'; +import { Button } from '@patternfly/react-core/dist/esm/components/Button'; import dragButtonStyles from '@patternfly/react-styles/css/components/DataList/data-list'; import GripVerticalIcon from '@patternfly/react-icons/dist/esm/icons/grip-vertical-icon'; diff --git a/packages/react-drag-drop/src/components/DragDrop/DragDropContainer.tsx b/packages/react-drag-drop/src/components/DragDrop/DragDropContainer.tsx index 323ef5a689e..3ae9cb28f30 100644 --- a/packages/react-drag-drop/src/components/DragDrop/DragDropContainer.tsx +++ b/packages/react-drag-drop/src/components/DragDrop/DragDropContainer.tsx @@ -25,7 +25,8 @@ import { Draggable } from './Draggable'; import { DraggableDataListItem } from './DraggableDataListItem'; import { DraggableDualListSelectorListItem } from './DraggableDualListSelectorListItem'; import styles from '@patternfly/react-styles/css/components/DragDrop/drag-drop'; -import { DataList, canUseDOM } from '@patternfly/react-core'; +import { DataList } from '@patternfly/react-core/dist/esm/components/DataList/DataList'; +import { canUseDOM } from '@patternfly/react-core/dist/esm/helpers/util'; export type DragDropContainerDragStartEvent = DragStartEvent; export type DragDropContainerDragOverEvent = DragOverEvent; diff --git a/packages/react-drag-drop/src/components/DragDrop/DraggableDataListItem.tsx b/packages/react-drag-drop/src/components/DragDrop/DraggableDataListItem.tsx index cbe83c945c2..b2549d8b8a9 100644 --- a/packages/react-drag-drop/src/components/DragDrop/DraggableDataListItem.tsx +++ b/packages/react-drag-drop/src/components/DragDrop/DraggableDataListItem.tsx @@ -5,7 +5,8 @@ import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/DataList/data-list'; import dragStyles from '@patternfly/react-styles/css/components/DragDrop/drag-drop'; import { DragButton } from './DragButton'; -import { DataListItemRow, DataListControl } from '@patternfly/react-core'; +import { DataListItemRow } from '@patternfly/react-core/dist/esm/components/DataList/DataListItemRow'; +import { DataListControl } from '@patternfly/react-core/dist/esm/components/DataList/DataListControl'; export interface DraggableDataListItemObject { id?: string; diff --git a/packages/react-integration/demo-app-ts/src/App.tsx b/packages/react-integration/demo-app-ts/src/App.tsx index 1ea75b47018..efe9ee9ee1b 100755 --- a/packages/react-integration/demo-app-ts/src/App.tsx +++ b/packages/react-integration/demo-app-ts/src/App.tsx @@ -1,28 +1,26 @@ import React from 'react'; import { BrowserRouter as Router, Route, Link, Switch } from 'react-router-dom'; +import { Avatar } from '@patternfly/react-core/dist/esm/components/Avatar'; +import { Brand } from '@patternfly/react-core/dist/esm/components/Brand'; import { - Avatar, - Brand, Masthead, MastheadLogo, MastheadBrand, MastheadContent, MastheadMain, - MastheadToggle, - Nav, - NavItem, - NavList, + MastheadToggle +} from '@patternfly/react-core/dist/esm/components/Masthead'; +import { Nav, NavList, NavItem } from '@patternfly/react-core/dist/esm/components/Nav'; +import { Page, PageSection, PageSidebar, PageSidebarBody, - PageToggleButton, - Radio, - SkipToContent, - Toolbar, - ToolbarGroup, - ToolbarItem -} from '@patternfly/react-core'; + PageToggleButton +} from '@patternfly/react-core/dist/esm/components/Page'; +import { Radio } from '@patternfly/react-core/dist/esm/components/Radio'; +import { SkipToContent } from '@patternfly/react-core/dist/esm/components/SkipToContent'; +import { Toolbar, ToolbarGroup, ToolbarItem } from '@patternfly/react-core/dist/esm/components/Toolbar'; import imgBrand from './assets/images/imgBrand.svg'; import imgAvatar from './assets/images/imgAvatar.svg'; import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon'; diff --git a/packages/react-table/src/components/Table/SortColumn.tsx b/packages/react-table/src/components/Table/SortColumn.tsx index 5dd45a1b3b8..f9d4db45d17 100644 --- a/packages/react-table/src/components/Table/SortColumn.tsx +++ b/packages/react-table/src/components/Table/SortColumn.tsx @@ -6,8 +6,9 @@ import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Table/table'; import { TableText } from './TableText'; +import { ActionList, ActionListItem } from '@patternfly/react-core/dist/esm/components/ActionList'; +import { Button } from '@patternfly/react-core/dist/esm/components/Button'; import { TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip'; -import { ActionList, ActionListItem, Button } from '@patternfly/react-core'; import { FavoriteButtonProps } from './base/types'; export enum SortByDirection { diff --git a/packages/react-table/src/components/Table/Table.tsx b/packages/react-table/src/components/Table/Table.tsx index 13942db0f2b..6563c2afbd7 100644 --- a/packages/react-table/src/components/Table/Table.tsx +++ b/packages/react-table/src/components/Table/Table.tsx @@ -5,7 +5,9 @@ import stylesTreeView from '@patternfly/react-styles/css/components/Table/table- import { css } from '@patternfly/react-styles'; import { toCamel } from './utils'; import { IVisibility } from './utils/decorators/classNames'; -import { useOUIAProps, OUIAProps, handleArrows, setTabIndex, KeyTypes } from '@patternfly/react-core'; +import { handleArrows, setTabIndex } from '@patternfly/react-core/dist/esm/helpers/KeyboardHandler'; +import { KeyTypes } from '@patternfly/react-core/dist/esm/helpers/constants'; +import { useOUIAProps, OUIAProps } from '@patternfly/react-core/dist/esm/helpers/OUIA/ouia'; import { TableGridBreakpoint, TableVariant } from './TableTypes'; export interface BaseCellProps { diff --git a/packages/react-table/src/components/Table/base/types.tsx b/packages/react-table/src/components/Table/base/types.tsx index d153e33dc66..b3673337fcc 100644 --- a/packages/react-table/src/components/Table/base/types.tsx +++ b/packages/react-table/src/components/Table/base/types.tsx @@ -6,7 +6,10 @@ */ import * as React from 'react'; -import { ButtonProps, PopoverProps, SelectProps, TooltipProps } from '@patternfly/react-core'; +import { ButtonProps } from '@patternfly/react-core/dist/esm/components/Button'; +import { PopoverProps } from '@patternfly/react-core/dist/esm/components/Popover'; +import { SelectProps } from '@patternfly/react-core/dist/esm/components/Select'; +import { TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip'; import { Table } from '../Table'; import { Thead } from '../Thead'; import { Tbody } from '../Tbody'; diff --git a/packages/react-table/src/deprecated/components/Table/Table.tsx b/packages/react-table/src/deprecated/components/Table/Table.tsx index f80630b3971..d74833c0353 100644 --- a/packages/react-table/src/deprecated/components/Table/Table.tsx +++ b/packages/react-table/src/deprecated/components/Table/Table.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { OUIAProps, getDefaultOUIAId } from '@patternfly/react-core'; +import { OUIAProps, getDefaultOUIAId } from '@patternfly/react-core/dist/esm/helpers/OUIA/ouia'; import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inline-edit'; import { css } from '@patternfly/react-styles'; import { Provider } from '../../../components/Table/base/provider'; diff --git a/packages/react-templates/src/components/Select/CheckboxSelect.tsx b/packages/react-templates/src/components/Select/CheckboxSelect.tsx index 847a2b669af..40fa535808b 100644 --- a/packages/react-templates/src/components/Select/CheckboxSelect.tsx +++ b/packages/react-templates/src/components/Select/CheckboxSelect.tsx @@ -1,15 +1,13 @@ import React from 'react'; +import { Badge } from '@patternfly/react-core/dist/esm/components/Badge'; +import { MenuToggle, MenuToggleElement, MenuToggleProps } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { - Badge, - MenuToggle, - MenuToggleElement, - MenuToggleProps, Select, SelectList, SelectOption, SelectOptionProps, SelectProps -} from '@patternfly/react-core'; +} from '@patternfly/react-core/dist/esm/components/Select'; export interface CheckboxSelectOption extends Omit { /** Content of the select option. */ diff --git a/packages/react-templates/src/components/Select/MultiTypeaheadSelect.tsx b/packages/react-templates/src/components/Select/MultiTypeaheadSelect.tsx index 5193cd70f66..f40d4ba97ec 100644 --- a/packages/react-templates/src/components/Select/MultiTypeaheadSelect.tsx +++ b/packages/react-templates/src/components/Select/MultiTypeaheadSelect.tsx @@ -1,20 +1,19 @@ import React from 'react'; +import { Button } from '@patternfly/react-core/dist/esm/components/Button'; +import { Label, LabelGroup } from '@patternfly/react-core/dist/esm/components/Label'; +import { MenuToggle, MenuToggleElement, MenuToggleProps } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { Select, - SelectOption, SelectList, + SelectOption, SelectOptionProps, - MenuToggle, - MenuToggleElement, + SelectProps +} from '@patternfly/react-core/dist/esm/components/Select'; +import { TextInputGroup, TextInputGroupMain, - TextInputGroupUtilities, - Button, - MenuToggleProps, - SelectProps, - Label, - LabelGroup -} from '@patternfly/react-core'; + TextInputGroupUtilities +} from '@patternfly/react-core/dist/esm/components/TextInputGroup'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; export interface MultiTypeaheadSelectOption extends Omit { diff --git a/packages/react-templates/src/components/Select/TypeaheadSelect.tsx b/packages/react-templates/src/components/Select/TypeaheadSelect.tsx index 4f5b3c6bed8..20750ab415b 100644 --- a/packages/react-templates/src/components/Select/TypeaheadSelect.tsx +++ b/packages/react-templates/src/components/Select/TypeaheadSelect.tsx @@ -1,18 +1,18 @@ import React from 'react'; +import { Button } from '@patternfly/react-core/dist/esm/components/Button'; +import { MenuToggle, MenuToggleElement, MenuToggleProps } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { Select, - SelectOption, SelectList, + SelectOption, SelectOptionProps, - MenuToggle, - MenuToggleElement, + SelectProps +} from '@patternfly/react-core/dist/esm/components/Select'; +import { TextInputGroup, TextInputGroupMain, - TextInputGroupUtilities, - Button, - MenuToggleProps, - SelectProps -} from '@patternfly/react-core'; + TextInputGroupUtilities +} from '@patternfly/react-core/dist/esm/components/TextInputGroup'; import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon'; export interface TypeaheadSelectOption extends Omit {