diff --git a/.eslintrc.json b/.eslintrc.json index 4f54418f..e3111bf3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,6 @@ { "extends": [ "next/core-web-vitals", - "@redhat-cloud-services/eslint-config-redhat-cloud-services", "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:react/recommended", diff --git a/src/app/api/pr/knowledge/route.ts b/src/app/api/pr/knowledge/route.ts index 9207a5f4..c8c5249a 100644 --- a/src/app/api/pr/knowledge/route.ts +++ b/src/app/api/pr/knowledge/route.ts @@ -1,7 +1,6 @@ // src/app/api/pr/knowledge/route.ts -import { NextResponse } from 'next/server'; +import { NextRequest, NextResponse } from 'next/server'; import { getToken } from 'next-auth/jwt'; -import { NextRequest } from 'next/server'; import yaml from 'js-yaml'; import { KnowledgeYamlData, AttributionData } from '@/types'; import { GITHUB_API_URL, BASE_BRANCH } from '@/types/const'; diff --git a/src/app/api/pr/skill/route.ts b/src/app/api/pr/skill/route.ts index a641650e..00f9f772 100644 --- a/src/app/api/pr/skill/route.ts +++ b/src/app/api/pr/skill/route.ts @@ -1,7 +1,6 @@ // src/app/api/pr/skill/route.ts -import { NextResponse } from 'next/server'; +import { NextRequest, NextResponse } from 'next/server'; import { getToken } from 'next-auth/jwt'; -import { NextRequest } from 'next/server'; import yaml from 'js-yaml'; import { SkillYamlData, AttributionData } from '@/types'; import { GITHUB_API_URL, BASE_BRANCH } from '@/types/const'; diff --git a/src/app/api/upload/route.ts b/src/app/api/upload/route.ts index 83297637..12aa4dd6 100644 --- a/src/app/api/upload/route.ts +++ b/src/app/api/upload/route.ts @@ -1,7 +1,6 @@ // src/app/api/upload/route.ts -import { NextResponse } from 'next/server'; +import { NextRequest, NextResponse } from 'next/server'; import { getToken } from 'next-auth/jwt'; -import { NextRequest } from 'next/server'; const GITHUB_API_URL = 'https://api.github.com'; const TAXONOMY_DOCUMENTS_REPO = process.env.NEXT_PUBLIC_TAXONOMY_DOCUMENTS_REPO!; diff --git a/src/app/contribute/knowledge/page.tsx b/src/app/contribute/knowledge/page.tsx index 9caebe86..ea98c861 100644 --- a/src/app/contribute/knowledge/page.tsx +++ b/src/app/contribute/knowledge/page.tsx @@ -1,8 +1,8 @@ // src/app/contribute/knowledge/page.tsx 'use client'; import { AppLayout } from '@/components/AppLayout'; -import { KnowledgeFormGithub } from '@/components/Contribute/Knowledge/Github/index'; -import KnowledgeFormNative from '@/components/Contribute/Knowledge/Native/index'; +import KnowledgeFormGithub from '@/components/Contribute/Knowledge/Github'; +import KnowledgeFormNative from '@/components/Contribute/Knowledge/Native'; import { useEffect, useState } from 'react'; const KnowledgeFormPage: React.FunctionComponent = () => { diff --git a/src/app/login/devmodelogin.tsx b/src/app/login/devmodelogin.tsx index 21df3eb0..b478f2b4 100644 --- a/src/app/login/devmodelogin.tsx +++ b/src/app/login/devmodelogin.tsx @@ -1,16 +1,9 @@ // src/app/login/DevModeLogin.tsx import React, { useState } from 'react'; import { signIn } from 'next-auth/react'; -import { Grid, GridItem } from '@patternfly/react-core/dist/dynamic/layouts/Grid'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; -import { Form } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; import './githublogin.css'; +import { Button, Content, Form, FormGroup, Grid, GridItem, HelperText, HelperTextItem, TextInput } from '@patternfly/react-core'; +import { GithubIcon } from '@patternfly/react-icons'; const DevModeLogin: React.FunctionComponent = () => { const [, setShowHelperText] = useState(false); diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index 8281b487..8be4252c 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -1,14 +1,9 @@ import React, { useEffect, useState, Suspense } from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; - -import { Grid } from '@patternfly/react-core/dist/dynamic/layouts/Grid'; -import { GridItem } from '@patternfly/react-core/dist/dynamic/layouts/Grid'; -import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; import './githublogin.css'; import { signIn } from 'next-auth/react'; import { useRouter, useSearchParams } from 'next/navigation'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal'; +import { Button, Content, Grid, GridItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core'; +import { GithubIcon } from '@patternfly/react-icons'; const GithubLogin: React.FC = () => { const router = useRouter(); @@ -138,19 +133,23 @@ const GithubLogin: React.FC = () => { handleOnClose()} - actions={[ + aria-labelledby="join-ilab-modal-title" + aria-describedby="join-ilab-body-variant" + > + + +

{errorMsg}

+
+ , - ]} - > -

{errorMsg}

+
)} diff --git a/src/app/login/nativelogin.tsx b/src/app/login/nativelogin.tsx index 5f0c76e7..60a9ff8c 100644 --- a/src/app/login/nativelogin.tsx +++ b/src/app/login/nativelogin.tsx @@ -1,15 +1,8 @@ // src/app/login/NativeLogin.tsx import React, { useState } from 'react'; import { signIn } from 'next-auth/react'; -import { Grid, GridItem } from '@patternfly/react-core/dist/dynamic/layouts/Grid'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; -import { Form } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; import './githublogin.css'; +import { Button, Content, Form, FormGroup, Grid, GridItem, HelperText, HelperTextItem, TextInput } from '@patternfly/react-core'; const NativeLogin: React.FunctionComponent = () => { const [, setShowHelperText] = useState(false); diff --git a/src/app/playground/chat/page.tsx b/src/app/playground/chat/page.tsx index c1e667ac..97fb9fa6 100644 --- a/src/app/playground/chat/page.tsx +++ b/src/app/playground/chat/page.tsx @@ -3,23 +3,14 @@ import React, { useState, useRef, useEffect } from 'react'; import { AppLayout } from '@/components/AppLayout'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { Form } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { Breadcrumb, BreadcrumbItem, PageBreadcrumb, PageSection, Content, Title } from '@patternfly/react-core/'; -import { Select } from '@patternfly/react-core/dist/dynamic/components/Select'; -import { SelectOption, SelectList } from '@patternfly/react-core/dist/dynamic/components/Select'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/dynamic/components/MenuToggle'; -import { Spinner } from '@patternfly/react-core/dist/dynamic/components/Spinner'; -import UserIcon from '@patternfly/react-icons/dist/dynamic/icons/user-icon'; -import { Alert } from '@patternfly/react-core/dist/dynamic/components/Alert'; +import { Breadcrumb, BreadcrumbItem, PageBreadcrumb, PageSection, Content, Title, MenuToggleElement, MenuToggle, SelectOption, Select, SelectList, Button, Spinner, Form, FormGroup, TextInput, Alert } from '@patternfly/react-core/'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faBroom } from '@fortawesome/free-solid-svg-icons'; import Image from 'next/image'; import styles from './chat.module.css'; import { Endpoint, Message, Model } from '@/types'; import CopyToClipboardButton from '@/components/CopyToClipboardButton'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; +import { UserIcon } from '@patternfly/react-icons'; const ChatPage: React.FC = () => { const [question, setQuestion] = useState(''); diff --git a/src/app/playground/endpoints/page.tsx b/src/app/playground/endpoints/page.tsx index 58e32bfe..ed30743a 100644 --- a/src/app/playground/endpoints/page.tsx +++ b/src/app/playground/endpoints/page.tsx @@ -1,28 +1,11 @@ 'use client'; import React, { useState, useEffect } from 'react'; -import { Page, PageBreadcrumb, PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { - DataList, - DataListItem, - DataListItemRow, - DataListItemCells, - DataListCell, - DataListAction -} from '@patternfly/react-core/dist/dynamic/components/DataList'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { ModalVariant } from '@patternfly/react-core/dist/dynamic/components/Modal'; -import { Breadcrumb, BreadcrumbItem, Content } from '@patternfly/react-core/components/'; -import { Modal } from '@patternfly/react-core/deprecated'; -import { Form, FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; -import { InputGroup } from '@patternfly/react-core/dist/dynamic/components/InputGroup'; -import EyeIcon from '@patternfly/react-icons/dist/dynamic/icons/eye-icon'; -import EyeSlashIcon from '@patternfly/react-icons/dist/dynamic/icons/eye-slash-icon'; import { v4 as uuidv4 } from 'uuid'; import { AppLayout } from '@/components/AppLayout'; import { Endpoint } from '@/types'; +import { Breadcrumb, BreadcrumbItem, Button, Content, DataList, DataListAction, DataListCell, DataListItem, DataListItemCells, DataListItemRow, Form, FormGroup, InputGroup, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, Page, PageBreadcrumb, PageSection, TextInput, Title } from '@patternfly/react-core'; +import { EyeSlashIcon, EyeIcon } from '@patternfly/react-icons'; interface ExtendedEndpoint extends Endpoint { isApiKeyVisible?: boolean; @@ -118,7 +101,7 @@ const EndpointsPage: React.FC = () => { return isApiKeyVisible ? apiKey : '********'; }; - useEffect(() => {}, [url]); + useEffect(() => { }, [url]); return ( @@ -180,49 +163,56 @@ const EndpointsPage: React.FC = () => { {isModalOpen && ( handleModalToggle()} + aria-labelledby="endpoint-modal-title" + aria-describedby="endpoint-body-variant" + > + + + +
+ + setUrl(value)} placeholder="Enter URL" /> + + + setModelName(value)} + placeholder="Enter Model Name" + /> + + + + setApiKey(value)} + placeholder="Enter API Key" + /> + + +
+
+ , - ]} - > -
- - setUrl(value)} placeholder="Enter URL" /> - - - setModelName(value)} - placeholder="Enter Model Name" - /> - - - - setApiKey(value)} - placeholder="Enter API Key" - /> - - -
+
+ )}
diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 9276865c..457c09fe 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -1,12 +1,10 @@ import { useCallback, type Dispatch, type SetStateAction } from 'react'; -import { Content, ContentVariants } from '@patternfly/react-core/dist/dynamic/components/Content'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; import InstructLabLogo from '../../../public/updated-logo.png'; import InstructLabAboutUsBg from '../../../public/InstructLab-About-Modal-Background.svg'; import styles from './about-modal.module.css'; import { linksData } from './data/linksData'; -import { AboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; +import { AboutModal, Content, Button, ContentVariants } from '@patternfly/react-core'; +import { GithubIcon } from '@patternfly/react-icons'; const AboutInstructLab = ({ isOpen, setIsOpen }: AboutModalProps) => { const handleClose = useCallback(() => { diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 3ffc88a8..5bd033a5 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -2,30 +2,14 @@ 'use client'; import * as React from 'react'; -import { Page, PageToggleButton } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Content, ContentVariants } from '@patternfly/react-core/dist/dynamic/components/Content'; import { usePathname, useRouter } from 'next/navigation'; -import { BarsIcon } from '@patternfly/react-icons/dist/dynamic/icons/bars-icon'; -import { Brand } from '@patternfly/react-core/dist/dynamic/components/Brand'; import HelpDropdown from './HelpDropdown/HelpDropdown'; import Link from 'next/link'; -import { Masthead } from '@patternfly/react-core/dist/dynamic/components/Masthead'; -import { MastheadContent } from '@patternfly/react-core/dist/dynamic/components/Masthead'; -import { MastheadMain } from '@patternfly/react-core/dist/dynamic/components/Masthead'; -import { MastheadToggle, MastheadBrand } from '@patternfly/react-core/dist/dynamic/components/Masthead'; -import { Nav } from '@patternfly/react-core/dist/dynamic/components/Nav'; -import { NavExpandable } from '@patternfly/react-core/dist/dynamic/components/Nav'; -import { NavItem } from '@patternfly/react-core/dist/dynamic/components/Nav'; -import { NavList } from '@patternfly/react-core/dist/dynamic/components/Nav'; -import { PageSidebar } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSidebarBody } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { SkipToContent } from '@patternfly/react-core/dist/dynamic/components/SkipToContent'; -import { Spinner } from '@patternfly/react-core/dist/dynamic/components/Spinner'; -import { Bullseye } from '@patternfly/react-core/dist/dynamic/layouts/Bullseye'; import UserMenu from './UserMenu/UserMenu'; import { useSession } from 'next-auth/react'; -// import { useTheme } from '../context/ThemeContext'; import { useState } from 'react'; +import { Bullseye, Spinner, Masthead, MastheadMain, MastheadToggle, PageToggleButton, MastheadBrand, Brand, Content, ContentVariants, MastheadContent, NavItem, NavExpandable, Nav, NavList, PageSidebar, PageSidebarBody, SkipToContent, Page } from '@patternfly/react-core'; +import { BarsIcon } from '@patternfly/react-icons'; interface IAppLayout { children: React.ReactNode; diff --git a/src/components/Contribute/AuthorInformation.tsx b/src/components/Contribute/AuthorInformation.tsx index 1c384dd0..eb8f5d8b 100644 --- a/src/components/Contribute/AuthorInformation.tsx +++ b/src/components/Contribute/AuthorInformation.tsx @@ -1,12 +1,8 @@ import React, { useEffect, useState } from 'react'; -import { FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { checkSkillFormCompletion } from './Skill/validation'; import { checkKnowledgeFormCompletion } from './Knowledge/validation'; +import { ValidatedOptions, FormGroup, TextInput, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; export enum FormType { Knowledge, diff --git a/src/components/Contribute/EditKnowledge/EditKnowledge.tsx b/src/components/Contribute/EditKnowledge/EditKnowledge.tsx index 3a8a2639..394e4984 100644 --- a/src/components/Contribute/EditKnowledge/EditKnowledge.tsx +++ b/src/components/Contribute/EditKnowledge/EditKnowledge.tsx @@ -9,11 +9,10 @@ import { fetchPullRequest, fetchFileContent, fetchPullRequestFiles } from '@/uti import yaml from 'js-yaml'; import axios from 'axios'; import { KnowledgeEditFormData, KnowledgeFormData, QuestionAndAnswerPair, KnowledgeSeedExample } from '@/types'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { useEffect, useState } from 'react'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal/Modal'; import { useRouter } from 'next/navigation'; import KnowledgeFormGithub from '../Knowledge/Github'; +import { ValidatedOptions, Modal, ModalVariant } from '@patternfly/react-core'; interface EditKnowledgeClientComponentProps { prNumber: number; diff --git a/src/components/Contribute/EditSkill/EditSkill.tsx b/src/components/Contribute/EditSkill/EditSkill.tsx index 3212ae4f..09f9d2b5 100644 --- a/src/components/Contribute/EditSkill/EditSkill.tsx +++ b/src/components/Contribute/EditSkill/EditSkill.tsx @@ -4,8 +4,6 @@ import * as React from 'react'; import { useSession } from 'next-auth/react'; import { useEffect, useState } from 'react'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal/Modal'; import { useRouter } from 'next/navigation'; import SkillFormGithub, { SkillEditFormData } from '@/components/Contribute/Skill/Github'; import { fetchPullRequest, fetchFileContent, fetchPullRequestFiles } from '@/utils/github'; @@ -13,6 +11,7 @@ import yaml from 'js-yaml'; import axios from 'axios'; import { SkillYamlData, AttributionData, PullRequestFile, SkillFormData, SkillSeedExample } from '@/types'; import { SkillSchemaVersion } from '@/types/const'; +import { ValidatedOptions, Modal, ModalVariant } from '@patternfly/react-core'; interface EditSkillClientComponentProps { prNumber: number; diff --git a/src/components/Contribute/Knowledge/AttributionInformation/AttributionInformation.tsx b/src/components/Contribute/Knowledge/AttributionInformation/AttributionInformation.tsx index b606a3ce..49919d7f 100644 --- a/src/components/Contribute/Knowledge/AttributionInformation/AttributionInformation.tsx +++ b/src/components/Contribute/Knowledge/AttributionInformation/AttributionInformation.tsx @@ -1,12 +1,8 @@ import React, { useEffect } from 'react'; -import { FormFieldGroupHeader, FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { checkKnowledgeFormCompletion } from '../validation'; import { KnowledgeFormData } from '@/types'; +import { ValidatedOptions, FormFieldGroupHeader, FormGroup, TextInput, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { reset: boolean; diff --git a/src/components/Contribute/Knowledge/AutoFill.ts b/src/components/Contribute/Knowledge/AutoFill.ts index 7e05911b..e8583d25 100644 --- a/src/components/Contribute/Knowledge/AutoFill.ts +++ b/src/components/Contribute/Knowledge/AutoFill.ts @@ -1,5 +1,5 @@ import { KnowledgeFormData, KnowledgeSeedExample, QuestionAndAnswerPair } from '@/types'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; +import { ValidatedOptions } from '@patternfly/react-core'; const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ { diff --git a/src/components/Contribute/Knowledge/DownloadAttribution/DownloadAttribution.tsx b/src/components/Contribute/Knowledge/DownloadAttribution/DownloadAttribution.tsx index d61394fe..2aeb8cf5 100644 --- a/src/components/Contribute/Knowledge/DownloadAttribution/DownloadAttribution.tsx +++ b/src/components/Contribute/Knowledge/DownloadAttribution/DownloadAttribution.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/DropdownItem'; -import { Icon } from '@patternfly/react-core/dist/dynamic/components/Icon'; -import FileIcon from '@patternfly/react-icons/dist/esm/icons/file-icon'; import { KnowledgeFormData } from '@/types'; +import { DropdownItem, Icon } from '@patternfly/react-core'; +import { FileIcon } from '@patternfly/react-icons'; interface Props { knowledgeFormData: KnowledgeFormData; diff --git a/src/components/Contribute/Knowledge/DownloadDropdown/DownloadDropdown.tsx b/src/components/Contribute/Knowledge/DownloadDropdown/DownloadDropdown.tsx index 2dc99c3f..dbf5d0c0 100644 --- a/src/components/Contribute/Knowledge/DownloadDropdown/DownloadDropdown.tsx +++ b/src/components/Contribute/Knowledge/DownloadDropdown/DownloadDropdown.tsx @@ -1,12 +1,9 @@ import React from 'react'; -import { Dropdown } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { DropdownList } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { Icon } from '@patternfly/react-core/dist/dynamic/components/Icon'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/dynamic/components/MenuToggle'; import DownloadYaml from '../DownloadYaml/DownloadYaml'; import DownloadAttribution from '../DownloadAttribution/DownloadAttribution'; -import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon'; import { KnowledgeFormData } from '@/types'; +import { Dropdown, MenuToggleElement, MenuToggle, Icon, DropdownList } from '@patternfly/react-core'; +import { DownloadIcon } from '@patternfly/react-icons'; interface Props { knowledgeFormData: KnowledgeFormData; diff --git a/src/components/Contribute/Knowledge/DownloadYaml/DownloadYaml.tsx b/src/components/Contribute/Knowledge/DownloadYaml/DownloadYaml.tsx index f39b6c2a..1f57f9f8 100644 --- a/src/components/Contribute/Knowledge/DownloadYaml/DownloadYaml.tsx +++ b/src/components/Contribute/Knowledge/DownloadYaml/DownloadYaml.tsx @@ -2,9 +2,8 @@ import React from 'react'; import { KnowledgeFormData, KnowledgeYamlData } from '@/types'; import { KnowledgeSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; -import { Icon } from '@patternfly/react-core/dist/dynamic/components/Icon'; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/DropdownItem'; -import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon'; +import { DropdownItem, Icon } from '@patternfly/react-core'; +import { CodeIcon } from '@patternfly/react-icons'; interface Props { knowledgeFormData: KnowledgeFormData; diff --git a/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx b/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx index a032dfc4..daec2be9 100644 --- a/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx +++ b/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { FormFieldGroupHeader, FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; import PathService from '@/components/PathService/PathService'; +import { FormFieldGroupHeader, FormGroup } from '@patternfly/react-core'; interface Props { reset?: boolean; diff --git a/src/components/Contribute/Knowledge/Github/DocumentInformation/DocumentInformation.tsx b/src/components/Contribute/Knowledge/Github/DocumentInformation/DocumentInformation.tsx index 786c441c..c4c1e7ea 100644 --- a/src/components/Contribute/Knowledge/Github/DocumentInformation/DocumentInformation.tsx +++ b/src/components/Contribute/Knowledge/Github/DocumentInformation/DocumentInformation.tsx @@ -1,16 +1,9 @@ import React, { useEffect, useState } from 'react'; -import { FormFieldGroupHeader, FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; import { UploadFile } from '../../UploadFile'; -import { Alert, AlertActionLink, AlertActionCloseButton, AlertGroup } from '@patternfly/react-core/dist/dynamic/components/Alert'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { checkKnowledgeFormCompletion } from '../../validation'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal/Modal'; import { KnowledgeFormData } from '@/types'; +import { ValidatedOptions, FormFieldGroupHeader, FormGroup, Button, Modal, ModalVariant, TextInput, FormHelperText, HelperText, HelperTextItem, AlertGroup, Alert, AlertActionCloseButton, AlertActionLink, ModalHeader, ModalBody, ModalFooter } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { reset: boolean; @@ -241,20 +234,25 @@ const DocumentInformation: React.FC = ({ setIsModalOpen(false)} - actions={[ + aria-labelledby="file-upload-switch-modal-title" + aria-describedby="file-upload-switch-body-variant" + > + + +

{modalText}

+
+ , - ]} - > -

{modalText}

+
+ {!useFileUpload ? ( <> diff --git a/src/components/Contribute/Knowledge/Github/Submit/Submit.tsx b/src/components/Contribute/Knowledge/Github/Submit/Submit.tsx index 9d7416df..ea8db7dd 100644 --- a/src/components/Contribute/Knowledge/Github/Submit/Submit.tsx +++ b/src/components/Contribute/Knowledge/Github/Submit/Submit.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { ActionGroupAlertContent } from '..'; import { AttributionData, KnowledgeFormData, KnowledgeYamlData } from '@/types'; import { KnowledgeSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; import { validateFields } from '../../validation'; +import { Button } from '@patternfly/react-core'; interface Props { disableAction: boolean; diff --git a/src/components/Contribute/Knowledge/Github/Update/Update.tsx b/src/components/Contribute/Knowledge/Github/Update/Update.tsx index 8961e2b7..3c36ee25 100644 --- a/src/components/Contribute/Knowledge/Github/Update/Update.tsx +++ b/src/components/Contribute/Knowledge/Github/Update/Update.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { ActionGroupAlertContent } from '..'; import { AttributionData, KnowledgeFormData, KnowledgeYamlData, PullRequestFile } from '@/types'; import { KnowledgeSchemaVersion } from '@/types/const'; @@ -8,6 +7,7 @@ import { validateFields } from '../../validation'; import { amendCommit, getGitHubUsername, updatePullRequest } from '@/utils/github'; import { useSession } from 'next-auth/react'; import { useRouter } from 'next/navigation'; +import { Button } from '@patternfly/react-core'; const KNOWLEDGE_DIR = 'knowledge/'; interface Props { diff --git a/src/components/Contribute/Knowledge/Github/index.tsx b/src/components/Contribute/Knowledge/Github/index.tsx index 96f9b30d..9d8d0ebe 100644 --- a/src/components/Contribute/Knowledge/Github/index.tsx +++ b/src/components/Contribute/Knowledge/Github/index.tsx @@ -2,8 +2,6 @@ 'use client'; import React, { useEffect, useMemo, useState } from 'react'; import '../knowledge.css'; -import { Alert, AlertActionCloseButton, AlertGroup } from '@patternfly/react-core/dist/dynamic/components/Alert'; -import { ActionGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; import { getGitHubUsername } from '@/utils/github'; import { useSession } from 'next-auth/react'; import AuthorInformation from '@/components/Contribute/AuthorInformation'; @@ -13,30 +11,18 @@ import FilePathInformation from '@/components/Contribute/Knowledge/FilePathInfor import DocumentInformation from '@/components/Contribute/Knowledge/Github/DocumentInformation/DocumentInformation'; import AttributionInformation from '@/components/Contribute/Knowledge/AttributionInformation/AttributionInformation'; import Submit from './Submit/Submit'; -import { Breadcrumb } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { BreadcrumbItem } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { PageBreadcrumb } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageGroup } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; import KnowledgeDescriptionContent from '@/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent'; import KnowledgeSeedExample from '@/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample'; import { checkKnowledgeFormCompletion } from '@/components/Contribute/Knowledge/validation'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { DownloadDropdown } from '@/components/Contribute/Knowledge/DownloadDropdown/DownloadDropdown'; import { ViewDropdown } from '@/components/Contribute/Knowledge/ViewDropdown/ViewDropdown'; import Update from '@/components/Contribute/Knowledge/Github/Update/Update'; import { KnowledgeEditFormData, KnowledgeFormData, KnowledgeYamlData, QuestionAndAnswerPair } from '@/types'; -import { Button } from '@patternfly/react-core/dist/esm/components/Button/Button'; import { useRouter } from 'next/navigation'; import { autoFillKnowledgeFields } from '@/components/Contribute/Knowledge/AutoFill'; -import { Spinner } from '@patternfly/react-core/dist/esm/components/Spinner'; -import { Wizard, WizardStep } from '@patternfly/react-core/dist/esm/components/Wizard'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; import ReviewSubmission from '@/components/Contribute/Knowledge/ReviewSubmission'; -import { Flex } from '@patternfly/react-core/dist/esm/layouts/Flex/Flex'; -import { FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex/FlexItem'; import { YamlFileUploadModal } from '../../YamlFileUploadModal'; +import { ValidatedOptions, PageGroup, PageBreadcrumb, Breadcrumb, BreadcrumbItem, PageSection, Flex, FlexItem, Title, Button, Content, Wizard, WizardStep, AlertGroup, Alert, AlertActionCloseButton, Spinner, ActionGroup } from '@patternfly/react-core'; export interface ActionGroupAlertContent { title: string; diff --git a/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx b/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx index 349d6de7..619c451e 100644 --- a/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx @@ -1,6 +1,6 @@ +import { Button } from '@patternfly/react-core'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; const KnowledgeDescriptionContent: React.FunctionComponent = () => { return ( diff --git a/src/components/Contribute/Knowledge/KnowledgeInformation/KnowledgeInformation.tsx b/src/components/Contribute/Knowledge/KnowledgeInformation/KnowledgeInformation.tsx index 4dc0435c..fbf3a8ed 100644 --- a/src/components/Contribute/Knowledge/KnowledgeInformation/KnowledgeInformation.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeInformation/KnowledgeInformation.tsx @@ -1,13 +1,8 @@ import React, { useEffect } from 'react'; -import { FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { TextArea } from '@patternfly/react-core/dist/dynamic/components/TextArea'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { checkKnowledgeFormCompletion } from '../validation'; import { KnowledgeFormData } from '@/types'; +import { ValidatedOptions, FormGroup, TextInput, HelperText, HelperTextItem, TextArea } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { reset: boolean; diff --git a/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx b/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx index e464529d..a9f35892 100644 --- a/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx @@ -1,11 +1,7 @@ import React from 'react'; -import { FormFieldGroupHeader, FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextArea } from '@patternfly/react-core/dist/dynamic/components/TextArea'; -import { ExclamationCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; import { KnowledgeSeedExample, QuestionAndAnswerPair } from '@/types'; +import { FormGroup, TextArea, ValidatedOptions, FormHelperText, HelperText, HelperTextItem, FormFieldGroupHeader } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { seedExample: KnowledgeSeedExample; diff --git a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx index 5e984b2b..5fef8ff0 100644 --- a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx @@ -1,10 +1,9 @@ // src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx import React from 'react'; -import { Accordion, AccordionItem, AccordionContent, AccordionToggle } from '@patternfly/react-core/dist/dynamic/components/Accordion'; -import { FormFieldGroupHeader } from '@patternfly/react-core/dist/dynamic/components/Form'; import KnowledgeQuestionAnswerPairs from '../KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs'; import type { KnowledgeSeedExample } from '@/types'; -import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; +import { FormFieldGroupHeader, Accordion, AccordionItem, AccordionToggle, AccordionContent } from '@patternfly/react-core'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons'; interface Props { seedExamples: KnowledgeSeedExample[]; diff --git a/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx b/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx index 3a854a4b..ceb4ab32 100644 --- a/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx +++ b/src/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation.tsx @@ -1,16 +1,9 @@ import React, { useEffect, useState } from 'react'; -import { FormFieldGroupHeader, FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { Alert, AlertActionLink, AlertActionCloseButton, AlertGroup } from '@patternfly/react-core/dist/dynamic/components/Alert'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal/Modal'; import { UploadFile } from '@/components/Contribute/Knowledge/UploadFile'; import { checkKnowledgeFormCompletion } from '@/components/Contribute/Knowledge/validation'; import { KnowledgeFormData } from '@/types'; +import { ValidatedOptions, FormFieldGroupHeader, FormGroup, Button, Modal, ModalVariant, TextInput, FormHelperText, HelperText, HelperTextItem, AlertGroup, Alert, AlertActionCloseButton, AlertActionLink, ModalHeader, ModalBody, ModalFooter } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { reset: boolean; @@ -241,20 +234,25 @@ const DocumentInformation: React.FC = ({ setIsModalOpen(false)} - actions={[ + aria-labelledby="file-upload-switch-modal-title" + aria-describedby="file-upload-switch-body-variant" + > + + +

{modalText}

+
+ , - ]} - > -

{modalText}

+
+ {!useFileUpload ? ( <> diff --git a/src/components/Contribute/Knowledge/Native/Submit/Submit.tsx b/src/components/Contribute/Knowledge/Native/Submit/Submit.tsx index 13255701..2e840218 100644 --- a/src/components/Contribute/Knowledge/Native/Submit/Submit.tsx +++ b/src/components/Contribute/Knowledge/Native/Submit/Submit.tsx @@ -1,11 +1,11 @@ // src/components/contribute/native/Knowledge/Submit/Submit.tsx import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { ActionGroupAlertContent } from '..'; import { AttributionData, KnowledgeFormData, KnowledgeYamlData } from '@/types'; import { KnowledgeSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; import { validateFields } from '@/components/Contribute/Knowledge/validation'; +import { Button } from '@patternfly/react-core'; interface Props { disableAction: boolean; diff --git a/src/components/Contribute/Knowledge/Native/index.tsx b/src/components/Contribute/Knowledge/Native/index.tsx index 794ca0b0..5cc2052f 100644 --- a/src/components/Contribute/Knowledge/Native/index.tsx +++ b/src/components/Contribute/Knowledge/Native/index.tsx @@ -2,8 +2,6 @@ 'use client'; import React, { useEffect, useMemo, useState } from 'react'; import '../knowledge.css'; -import { Alert, AlertActionCloseButton, AlertGroup } from '@patternfly/react-core/dist/dynamic/components/Alert'; -import { ActionGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; import { getGitHubUsername } from '@/utils/github'; import { useSession } from 'next-auth/react'; import AuthorInformation from '@/components/Contribute/AuthorInformation'; @@ -13,30 +11,18 @@ import FilePathInformation from '@/components/Contribute/Knowledge/FilePathInfor import DocumentInformation from '@/components/Contribute/Knowledge/Native/DocumentInformation/DocumentInformation'; import AttributionInformation from '@/components/Contribute/Knowledge/AttributionInformation/AttributionInformation'; import Submit from './Submit/Submit'; -import { Breadcrumb } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { BreadcrumbItem } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { PageBreadcrumb } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageGroup } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; import KnowledgeDescriptionContent from '@/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent'; import KnowledgeSeedExample from '@/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample'; import { checkKnowledgeFormCompletion } from '@/components/Contribute/Knowledge/validation'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { DownloadDropdown } from '@/components/Contribute/Knowledge/DownloadDropdown/DownloadDropdown'; import { ViewDropdown } from '@/components/Contribute/Knowledge/ViewDropdown/ViewDropdown'; import Update from '@/components/Contribute/Knowledge/Github/Update/Update'; import { KnowledgeEditFormData, KnowledgeFormData, KnowledgeYamlData, QuestionAndAnswerPair } from '@/types'; -import { Button } from '@patternfly/react-core/dist/esm/components/Button/Button'; import { useRouter } from 'next/navigation'; import { autoFillKnowledgeFields } from '@/components/Contribute/Knowledge/AutoFill'; -import { Spinner } from '@patternfly/react-core/dist/esm/components/Spinner'; -import { Wizard, WizardStep } from '@patternfly/react-core/dist/esm/components/Wizard'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; import ReviewSubmission from '../ReviewSubmission'; -import { Flex } from '@patternfly/react-core/dist/esm/layouts/Flex/Flex'; -import { FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex/FlexItem'; import { YamlFileUploadModal } from '../../YamlFileUploadModal'; +import { ValidatedOptions, PageGroup, PageBreadcrumb, Breadcrumb, BreadcrumbItem, PageSection, Flex, FlexItem, Title, Button, Content, Wizard, WizardStep, AlertGroup, Alert, AlertActionCloseButton, Spinner, ActionGroup } from '@patternfly/react-core'; export interface ActionGroupAlertContent { title: string; diff --git a/src/components/Contribute/Knowledge/UploadFile.tsx b/src/components/Contribute/Knowledge/UploadFile.tsx index 73459f15..13e0a614 100644 --- a/src/components/Contribute/Knowledge/UploadFile.tsx +++ b/src/components/Contribute/Knowledge/UploadFile.tsx @@ -1,18 +1,9 @@ // src/components/Contribute/Knowledge/UploadFile.tsx 'use client'; +import { HelperText, HelperTextItem, MultipleFileUpload, MultipleFileUploadMain, Spinner, MultipleFileUploadStatus, MultipleFileUploadStatusItem, Modal, Button, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core'; +import { UploadIcon } from '@patternfly/react-icons'; import React, { useState, useEffect } from 'react'; -import { - MultipleFileUploadStatusItem, - MultipleFileUploadStatus, - MultipleFileUpload, - MultipleFileUploadMain -} from '@patternfly/react-core/dist/dynamic/components/MultipleFileUpload'; -import { Modal } from '@patternfly/react-core/dist/dynamic/deprecated/components/Modal'; -import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon'; import { FileRejection, DropEvent } from 'react-dropzone'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { HelperText, HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { Spinner } from '@patternfly/react-core/dist/esm/components/Spinner'; import './knowledge.css'; interface readFile { @@ -158,24 +149,29 @@ export const UploadFile: React.FunctionComponent<{ onFilesChange: (files: File[] )} setModalText('')} - actions={[ + aria-labelledby="unsupported-file-modal-title" + aria-describedby="unsupported-file-body-variant" + > + + +

+
+ {modalText} +
+

+ +
+ - ]} - > -

-
- {modalText} -
-

+
+ ); diff --git a/src/components/Contribute/Knowledge/ViewDropdown/ViewDropdown.tsx b/src/components/Contribute/Knowledge/ViewDropdown/ViewDropdown.tsx index 2dad0480..52c69d46 100644 --- a/src/components/Contribute/Knowledge/ViewDropdown/ViewDropdown.tsx +++ b/src/components/Contribute/Knowledge/ViewDropdown/ViewDropdown.tsx @@ -1,16 +1,10 @@ import React, { useState } from 'react'; -import { Dropdown } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { DropdownItem } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { DropdownList } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/dynamic/components/MenuToggle'; import YamlCodeModal from '@/components/YamlCodeModal'; -import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon'; import { AttributionData, KnowledgeFormData, KnowledgeYamlData } from '@/types'; import { KnowledgeSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; -import { Icon } from '@patternfly/react-core/dist/dynamic/components/Icon'; -import FileIcon from '@patternfly/react-icons/dist/dynamic/icons/file-icon'; -import EyeIcon from '@patternfly/react-icons/dist/esm/icons/eye-icon'; +import { Dropdown, MenuToggleElement, MenuToggle, Icon, DropdownList, DropdownItem } from '@patternfly/react-core'; +import { EyeIcon, CodeIcon, FileIcon } from '@patternfly/react-icons'; interface Props { knowledgeFormData: KnowledgeFormData; diff --git a/src/components/Contribute/Knowledge/validation.tsx b/src/components/Contribute/Knowledge/validation.tsx index 54d10d2c..eba684f1 100644 --- a/src/components/Contribute/Knowledge/validation.tsx +++ b/src/components/Contribute/Knowledge/validation.tsx @@ -1,5 +1,5 @@ import { KnowledgeFormData, KnowledgeSeedExample } from '@/types'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; +import { ValidatedOptions } from '@patternfly/react-core'; import { ActionGroupAlertContent } from './Github'; const validateEmail = (email: string): boolean => { diff --git a/src/components/Contribute/Skill/AttributionInformation/AttributionInformation.tsx b/src/components/Contribute/Skill/AttributionInformation/AttributionInformation.tsx index 024b9a53..4ed76fac 100644 --- a/src/components/Contribute/Skill/AttributionInformation/AttributionInformation.tsx +++ b/src/components/Contribute/Skill/AttributionInformation/AttributionInformation.tsx @@ -1,12 +1,8 @@ import React, { useEffect } from 'react'; -import { FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { checkSkillFormCompletion } from '../validation'; import { SkillFormData } from '@/types'; +import { ValidatedOptions, FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup, TextInput, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { reset: boolean; diff --git a/src/components/Contribute/Skill/AutoFill.ts b/src/components/Contribute/Skill/AutoFill.ts index 6470a338..867a6e05 100644 --- a/src/components/Contribute/Skill/AutoFill.ts +++ b/src/components/Contribute/Skill/AutoFill.ts @@ -1,5 +1,5 @@ import { SkillFormData, SkillSeedExample } from '@/types'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; +import { ValidatedOptions } from '@patternfly/react-core'; const seedExamples: SkillSeedExample[] = [ { diff --git a/src/components/Contribute/Skill/DownloadAttribution/DownloadAttribution.tsx b/src/components/Contribute/Skill/DownloadAttribution/DownloadAttribution.tsx index 330c274c..dd1397f0 100644 --- a/src/components/Contribute/Skill/DownloadAttribution/DownloadAttribution.tsx +++ b/src/components/Contribute/Skill/DownloadAttribution/DownloadAttribution.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/DropdownItem'; -import FileIcon from '@patternfly/react-icons/dist/esm/icons/file-icon'; import { SkillFormData } from '@/types'; +import { DropdownItem } from '@patternfly/react-core'; +import { FileIcon } from '@patternfly/react-icons'; interface Props { skillFormData: SkillFormData; diff --git a/src/components/Contribute/Skill/DownloadDropdown/DownloadDropdown.tsx b/src/components/Contribute/Skill/DownloadDropdown/DownloadDropdown.tsx index 6b5663a6..6acaed26 100644 --- a/src/components/Contribute/Skill/DownloadDropdown/DownloadDropdown.tsx +++ b/src/components/Contribute/Skill/DownloadDropdown/DownloadDropdown.tsx @@ -1,11 +1,9 @@ import React from 'react'; -import { Dropdown } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { DropdownList } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/dynamic/components/MenuToggle'; import DownloadYaml from '../DownloadYaml/DownloadYaml'; import DownloadAttribution from '../DownloadAttribution/DownloadAttribution'; -import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon'; import { SkillFormData } from '@/types'; +import { Dropdown, DropdownList, MenuToggle, MenuToggleElement } from '@patternfly/react-core'; +import { DownloadIcon } from '@patternfly/react-icons'; interface Props { skillFormData: SkillFormData; diff --git a/src/components/Contribute/Skill/DownloadYaml/DownloadYaml.tsx b/src/components/Contribute/Skill/DownloadYaml/DownloadYaml.tsx index 798a45c8..405f8d35 100644 --- a/src/components/Contribute/Skill/DownloadYaml/DownloadYaml.tsx +++ b/src/components/Contribute/Skill/DownloadYaml/DownloadYaml.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { SkillFormData, SkillYamlData } from '@/types'; import { dumpYaml } from '@/utils/yamlConfig'; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown/DropdownItem'; -import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon'; import { SkillSchemaVersion } from '@/types/const'; +import { DropdownItem } from '@patternfly/react-core'; +import { CodeIcon } from '@patternfly/react-icons'; interface Props { skillFormData: SkillFormData; diff --git a/src/components/Contribute/Skill/FilePathInformation/FilePathInformation.tsx b/src/components/Contribute/Skill/FilePathInformation/FilePathInformation.tsx index d0ee1097..19ef73da 100644 --- a/src/components/Contribute/Skill/FilePathInformation/FilePathInformation.tsx +++ b/src/components/Contribute/Skill/FilePathInformation/FilePathInformation.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; import PathService from '@/components/PathService/PathService'; +import { FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup } from '@patternfly/react-core'; interface Props { reset?: boolean; diff --git a/src/components/Contribute/Skill/Github/Submit/Submit.tsx b/src/components/Contribute/Skill/Github/Submit/Submit.tsx index a623d9a5..aab6e685 100644 --- a/src/components/Contribute/Skill/Github/Submit/Submit.tsx +++ b/src/components/Contribute/Skill/Github/Submit/Submit.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { ActionGroupAlertContent } from '..'; import { AttributionData, SkillFormData, SkillYamlData } from '@/types'; import { SkillSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; import { validateFields } from '../../validation'; +import { Button } from '@patternfly/react-core'; interface Props { disableAction: boolean; diff --git a/src/components/Contribute/Skill/Github/Update/Update.tsx b/src/components/Contribute/Skill/Github/Update/Update.tsx index 7e1ecdcb..16b68c84 100644 --- a/src/components/Contribute/Skill/Github/Update/Update.tsx +++ b/src/components/Contribute/Skill/Github/Update/Update.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { ActionGroupAlertContent } from '..'; import { AttributionData, SkillYamlData, PullRequestFile, SkillFormData } from '@/types'; import { SkillSchemaVersion } from '@/types/const'; @@ -8,6 +7,7 @@ import { validateFields } from '../../validation'; import { amendCommit, getGitHubUsername, updatePullRequest } from '@/utils/github'; import { useSession } from 'next-auth/react'; import { useRouter } from 'next/navigation'; +import { Button } from '@patternfly/react-core'; const SKILLS_DIR = 'compositional_skills/'; interface Props { diff --git a/src/components/Contribute/Skill/Github/index.tsx b/src/components/Contribute/Skill/Github/index.tsx index a2ab87a9..4948340b 100644 --- a/src/components/Contribute/Skill/Github/index.tsx +++ b/src/components/Contribute/Skill/Github/index.tsx @@ -2,38 +2,24 @@ 'use client'; import React, { useEffect, useState } from 'react'; import './skills.css'; -import { Alert, AlertActionCloseButton, AlertGroup } from '@patternfly/react-core/dist/dynamic/components/Alert'; -import { ActionGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { Form } from '@patternfly/react-core/dist/dynamic/components/Form'; import { getGitHubUsername } from '../../../../utils/github'; import { useSession } from 'next-auth/react'; -import AuthorInformation from '../../AuthorInformation'; -import { FormType } from '../../AuthorInformation'; import FilePathInformation from '../FilePathInformation/FilePathInformation'; import AttributionInformation from '../AttributionInformation/AttributionInformation'; import Submit from './Submit/Submit'; -import { Breadcrumb } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { BreadcrumbItem } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { PageBreadcrumb } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageGroup } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; -import { Flex, FlexItem } from '@patternfly/react-core/dist/dynamic/layouts/Flex'; import { checkSkillFormCompletion } from '../validation'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { DownloadDropdown } from '../DownloadDropdown/DownloadDropdown'; import { ViewDropdown } from '../ViewDropdown/ViewDropdown'; import Update from './Update/Update'; import { SkillYamlData, PullRequestFile, SkillFormData, SkillSeedExample } from '@/types'; -import { Button } from '@patternfly/react-core/dist/esm/components/Button/Button'; import { useRouter } from 'next/navigation'; import SkillsSeedExample from '../SkillsSeedExample/SkillsSeedExample'; import SkillsInformation from '../SkillsInformation/SkillsInformation'; import SkillsDescriptionContent from '../SkillsDescription/SkillsDescriptionContent'; import { autoFillSkillsFields } from '../AutoFill'; -import { Spinner } from '@patternfly/react-core/dist/dynamic/components/Spinner'; import { YamlFileUploadModal } from '../../YamlFileUploadModal'; +import { ValidatedOptions, PageGroup, PageBreadcrumb, Breadcrumb, BreadcrumbItem, PageSection, Flex, FlexItem, Title, Button, Content, Form, AlertGroup, Alert, AlertActionCloseButton, Spinner, ActionGroup } from '@patternfly/react-core'; +import AuthorInformation, { FormType } from '../../AuthorInformation'; export interface SkillEditFormData { isEditForm: boolean; diff --git a/src/components/Contribute/Skill/Native/Submit/Submit.tsx b/src/components/Contribute/Skill/Native/Submit/Submit.tsx index b05bbf85..4012fadd 100644 --- a/src/components/Contribute/Skill/Native/Submit/Submit.tsx +++ b/src/components/Contribute/Skill/Native/Submit/Submit.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { ActionGroupAlertContent } from '..'; import { AttributionData, SkillFormData, SkillYamlData } from '@/types'; import { SkillSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; import { validateFields } from '@/components/Contribute/Skill/validation'; +import { Button } from '@patternfly/react-core'; interface Props { disableAction: boolean; diff --git a/src/components/Contribute/Skill/Native/index.tsx b/src/components/Contribute/Skill/Native/index.tsx index a017f4fc..22eddccb 100644 --- a/src/components/Contribute/Skill/Native/index.tsx +++ b/src/components/Contribute/Skill/Native/index.tsx @@ -2,38 +2,24 @@ 'use client'; import React, { useEffect, useState } from 'react'; import './skills.css'; -import { Alert, AlertActionCloseButton, AlertGroup } from '@patternfly/react-core/dist/dynamic/components/Alert'; -import { ActionGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { Form } from '@patternfly/react-core/dist/dynamic/components/Form'; import { useSession } from 'next-auth/react'; import AuthorInformation from '@/components/Contribute/AuthorInformation'; import { FormType } from '@/components/Contribute/AuthorInformation'; import FilePathInformation from '@/components/Contribute/Skill/FilePathInformation/FilePathInformation'; import AttributionInformation from '@/components/Contribute/Skill/AttributionInformation/AttributionInformation'; import Submit from '@/components/Contribute/Skill/Native/Submit/Submit'; -import { Breadcrumb } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { BreadcrumbItem } from '@patternfly/react-core/dist/dynamic/components/Breadcrumb'; -import { PageBreadcrumb } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageGroup } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Content } from '@patternfly/react-core/dist/dynamic/components/Content'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; import { checkSkillFormCompletion } from '@/components/Contribute/Skill/validation'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { DownloadDropdown } from '@/components/Contribute/Skill/DownloadDropdown/DownloadDropdown'; import { ViewDropdown } from '@/components/Contribute/Skill/ViewDropdown/ViewDropdown'; import Update from '@/components/Contribute/Skill/Github/Update/Update'; import { PullRequestFile, SkillSeedExample, SkillFormData, SkillYamlData } from '@/types'; -import { Button } from '@patternfly/react-core/dist/esm/components/Button/Button'; import { useRouter } from 'next/navigation'; import SkillsSeedExample from '@/components/Contribute/Skill/SkillsSeedExample/SkillsSeedExample'; import SkillsInformation from '@/components/Contribute/Skill/SkillsInformation/SkillsInformation'; import SkillsDescriptionContent from '@/components/Contribute/Skill/SkillsDescription/SkillsDescriptionContent'; import { autoFillSkillsFields } from '@/components/Contribute/Skill/AutoFill'; -import { Spinner } from '@patternfly/react-core/dist/dynamic/components/Spinner'; -import { Flex } from '@patternfly/react-core/dist/esm/layouts/Flex/Flex'; -import { FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex/FlexItem'; import { YamlFileUploadModal } from '../../YamlFileUploadModal'; +import { ValidatedOptions, PageGroup, PageBreadcrumb, Breadcrumb, BreadcrumbItem, PageSection, Flex, FlexItem, Title, Button, Content, Form, AlertGroup, Alert, AlertActionCloseButton, Spinner, ActionGroup } from '@patternfly/react-core'; export interface SkillEditFormData { isEditForm: boolean; diff --git a/src/components/Contribute/Skill/SkillsDescription/SkillsDescriptionContent.tsx b/src/components/Contribute/Skill/SkillsDescription/SkillsDescriptionContent.tsx index a7fd537d..944d73c2 100644 --- a/src/components/Contribute/Skill/SkillsDescription/SkillsDescriptionContent.tsx +++ b/src/components/Contribute/Skill/SkillsDescription/SkillsDescriptionContent.tsx @@ -1,6 +1,6 @@ +import { Button } from '@patternfly/react-core'; +import { ExternalLinkAltIcon } from '@patternfly/react-icons'; import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; const SkillsDescriptionContent: React.FunctionComponent = () => { return ( diff --git a/src/components/Contribute/Skill/SkillsInformation/SkillsInformation.tsx b/src/components/Contribute/Skill/SkillsInformation/SkillsInformation.tsx index c2f5fe4e..9155223b 100644 --- a/src/components/Contribute/Skill/SkillsInformation/SkillsInformation.tsx +++ b/src/components/Contribute/Skill/SkillsInformation/SkillsInformation.tsx @@ -1,13 +1,8 @@ import React, { useEffect } from 'react'; -import { FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { TextInput } from '@patternfly/react-core/dist/dynamic/components/TextInput'; -import { TextArea } from '@patternfly/react-core/dist/dynamic/components/TextArea'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; import { checkSkillFormCompletion } from '../validation'; import { SkillFormData } from '@/types'; +import { ValidatedOptions, FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup, TextInput, HelperText, HelperTextItem, TextArea } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; interface Props { reset: boolean; diff --git a/src/components/Contribute/Skill/SkillsSeedExample/SkillsSeedExample.tsx b/src/components/Contribute/Skill/SkillsSeedExample/SkillsSeedExample.tsx index 59a95c25..19cc9278 100644 --- a/src/components/Contribute/Skill/SkillsSeedExample/SkillsSeedExample.tsx +++ b/src/components/Contribute/Skill/SkillsSeedExample/SkillsSeedExample.tsx @@ -1,11 +1,7 @@ import React from 'react'; -import { FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup, FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { TrashIcon, PlusCircleIcon, ExclamationCircleIcon, ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/'; -import { TextArea } from '@patternfly/react-core/dist/esm/components/TextArea'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; -import { HelperText, HelperTextItem } from '@patternfly/react-core/dist/esm/components/HelperText'; import { SkillSeedExample } from '@/types'; +import { FormFieldGroupExpandable, FormFieldGroupHeader, Button, FormGroup, TextArea, ValidatedOptions, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core'; +import { ExternalLinkAltIcon, TrashIcon, ExclamationCircleIcon, PlusCircleIcon } from '@patternfly/react-icons'; interface Props { seedExamples: SkillSeedExample[]; diff --git a/src/components/Contribute/Skill/ViewDropdown/ViewDropdown.tsx b/src/components/Contribute/Skill/ViewDropdown/ViewDropdown.tsx index d24b71d9..976df286 100644 --- a/src/components/Contribute/Skill/ViewDropdown/ViewDropdown.tsx +++ b/src/components/Contribute/Skill/ViewDropdown/ViewDropdown.tsx @@ -1,15 +1,10 @@ import React, { useState } from 'react'; -import { Dropdown } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { DropdownItem } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { DropdownList } from '@patternfly/react-core/dist/dynamic/components/Dropdown'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/dynamic/components/MenuToggle'; import YamlCodeModal from '@/components/YamlCodeModal'; -import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon'; import { AttributionData, SkillFormData, SkillYamlData } from '@/types'; import { SkillSchemaVersion } from '@/types/const'; import { dumpYaml } from '@/utils/yamlConfig'; -import FileIcon from '@patternfly/react-icons/dist/dynamic/icons/file-icon'; -import EyeIcon from '@patternfly/react-icons/dist/esm/icons/eye-icon'; +import { Dropdown, MenuToggleElement, MenuToggle, DropdownList, DropdownItem } from '@patternfly/react-core'; +import { EyeIcon, CodeIcon, FileIcon } from '@patternfly/react-icons'; interface Props { skillFormData: SkillFormData; diff --git a/src/components/Contribute/Skill/validation.tsx b/src/components/Contribute/Skill/validation.tsx index f612e26f..a46f2729 100644 --- a/src/components/Contribute/Skill/validation.tsx +++ b/src/components/Contribute/Skill/validation.tsx @@ -1,5 +1,5 @@ import { SkillFormData, SkillSeedExample } from '@/types'; -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; +import { ValidatedOptions } from '@patternfly/react-core'; import { ActionGroupAlertContent } from './Github'; const validateEmail = (email: string): boolean => { diff --git a/src/components/Contribute/YamlFileUpload.tsx b/src/components/Contribute/YamlFileUpload.tsx index a636395e..69686dd1 100644 --- a/src/components/Contribute/YamlFileUpload.tsx +++ b/src/components/Contribute/YamlFileUpload.tsx @@ -1,10 +1,8 @@ import React from 'react'; import yaml from 'js-yaml'; import { KnowledgeYamlData, SkillYamlData } from '@/types'; -import { MultipleFileUpload } from '@patternfly/react-core/dist/esm/components/MultipleFileUpload/MultipleFileUpload'; -import { MultipleFileUploadMain } from '@patternfly/react-core/dist/esm/components/MultipleFileUpload/MultipleFileUploadMain'; -import { DropEvent } from '@patternfly/react-core/dist/esm/helpers/typeUtils'; -import { UploadIcon } from '@patternfly/react-icons/dist/esm/icons/upload-icon'; +import { DropEvent, MultipleFileUpload, MultipleFileUploadMain } from '@patternfly/react-core'; +import { UploadIcon } from '@patternfly/react-icons'; interface readFile { fileName: string; diff --git a/src/components/Contribute/YamlFileUploadModal.tsx b/src/components/Contribute/YamlFileUploadModal.tsx index 387daa4d..aa710532 100644 --- a/src/components/Contribute/YamlFileUploadModal.tsx +++ b/src/components/Contribute/YamlFileUploadModal.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core/dist/dynamic/components/Modal'; import YamlFileUpload from './YamlFileUpload'; import { KnowledgeYamlData, SkillYamlData } from '@/types'; +import { Modal, ModalVariant, ModalHeader, ModalBody } from '@patternfly/react-core'; interface Props { isModalOpen: boolean; @@ -42,7 +42,6 @@ export const YamlFileUploadModal: React.FunctionComponent = ({ onYamlUploadSkillsFillForm={onYamlUploadSkillsFillForm} /> - ); diff --git a/src/components/CopyToClipboardButton/index.tsx b/src/components/CopyToClipboardButton/index.tsx index 59a0fb42..fd98f34a 100644 --- a/src/components/CopyToClipboardButton/index.tsx +++ b/src/components/CopyToClipboardButton/index.tsx @@ -1,9 +1,9 @@ // src/components/CopyToClipboardButton.tsx 'use client'; +import { Button } from '@patternfly/react-core'; +import { CopyIcon } from '@patternfly/react-icons'; import React from 'react'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import CopyIcon from '@patternfly/react-icons/dist/dynamic/icons/copy-icon'; interface CopyToClipboardButtonProps { text: string; diff --git a/src/components/Dashboard/Github/dashboard.tsx b/src/components/Dashboard/Github/dashboard.tsx index c0bb150f..2d64e961 100644 --- a/src/components/Dashboard/Github/dashboard.tsx +++ b/src/components/Dashboard/Github/dashboard.tsx @@ -1,35 +1,13 @@ // src/components/dashboard/github/dashboard.tsx import * as React from 'react'; import { useSession } from 'next-auth/react'; -import { Label } from '@patternfly/react-core/dist/dynamic/components/Label'; -import { PageBreadcrumb } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; -import { Card } from '@patternfly/react-core/dist/dynamic/components/Card'; -import { CardTitle } from '@patternfly/react-core/dist/dynamic/components/Card'; -import { CardBody } from '@patternfly/react-core/dist/dynamic/components/Card'; -import { Stack } from '@patternfly/react-core/dist/dynamic/layouts/Stack'; -import { StackItem } from '@patternfly/react-core/dist/dynamic/layouts/Stack'; -import { Flex } from '@patternfly/react-core/dist/dynamic/layouts/Flex'; -import { FlexItem } from '@patternfly/react-core/dist/dynamic/layouts/Flex'; -import { EmptyState } from '@patternfly/react-core/dist/dynamic/components/EmptyState'; -import { EmptyStateBody } from '@patternfly/react-core/dist/dynamic/components/EmptyState'; -import { EmptyStateFooter } from '@patternfly/react-core/dist/dynamic/components/EmptyState'; -import { EmptyStateActions } from '@patternfly/react-core/dist/dynamic/components/EmptyState'; -import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon'; import Image from 'next/image'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { useRouter } from 'next/navigation'; import { fetchPullRequests, getGitHubUsername } from '../../../utils/github'; import { PullRequest } from '../../../types'; -import { Breadcrumb, BreadcrumbItem } from '@patternfly/react-core/dist/esm/components/Breadcrumb'; -import { Content } from '@patternfly/react-core/dist/esm/components/Content'; -import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; -import { Popover } from '@patternfly/react-core/dist/esm/components/Popover'; -import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal/Modal'; import { useState } from 'react'; -import { Spinner } from '@patternfly/react-core/dist/esm/components/Spinner'; +import { PageBreadcrumb, Breadcrumb, BreadcrumbItem, PageSection, Title, Content, Popover, Button, Modal, ModalVariant, Spinner, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions, Stack, StackItem, Card, CardTitle, CardBody, Flex, FlexItem, Label } from '@patternfly/react-core'; +import { ExternalLinkAltIcon, OutlinedQuestionCircleIcon, GithubIcon } from '@patternfly/react-icons'; const InstructLabLogo: React.FC = () => InstructLab Logo; diff --git a/src/components/Dashboard/Native/dashboard.tsx b/src/components/Dashboard/Native/dashboard.tsx index 1bbce9bf..932ec00f 100644 --- a/src/components/Dashboard/Native/dashboard.tsx +++ b/src/components/Dashboard/Native/dashboard.tsx @@ -1,32 +1,10 @@ // src/components/Dashboard/Native/dashboard.tsx import * as React from 'react'; -import { Card, CardBody } from '@patternfly/react-core/dist/dynamic/components/Card'; -import { Stack, StackItem } from '@patternfly/react-core/dist/dynamic/layouts/Stack'; -import { PageBreadcrumb } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { Title } from '@patternfly/react-core/dist/dynamic/components/Title'; -import { Breadcrumb, BreadcrumbItem } from '@patternfly/react-core/dist/esm/components/Breadcrumb'; -import { Spinner } from '@patternfly/react-core/dist/esm/components/Spinner'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { Flex, FlexItem } from '@patternfly/react-core/dist/dynamic/layouts/Flex'; -import { Modal, ModalVariant } from '@patternfly/react-core/dist/esm/deprecated/components/Modal'; -import { EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions } from '@patternfly/react-core/dist/dynamic/components/EmptyState'; -import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon'; import Image from 'next/image'; import { useRouter } from 'next/navigation'; -import { TrashIcon } from '@patternfly/react-icons/dist/esm/icons/trash-icon'; -import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip/Tooltip'; -import { CatalogIcon } from '@patternfly/react-icons/dist/esm/icons/catalog-icon'; -import { AlertGroup } from '@patternfly/react-core/dist/esm/components/Alert/AlertGroup'; -import { Alert, AlertProps, AlertVariant } from '@patternfly/react-core/dist/esm/components/Alert/Alert'; -import { AlertActionCloseButton } from '@patternfly/react-core/dist/esm/components/Alert/AlertActionCloseButton'; -import { PencilAltIcon } from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon'; -import { UploadIcon } from '@patternfly/react-icons/dist/esm/icons/upload-icon'; -import { Content } from '@patternfly/react-core/dist/esm/components/Content/Content'; -import { Popover } from '@patternfly/react-core/dist/esm/components/Popover/Popover'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon'; import path from 'path'; +import { AlertProps, PageBreadcrumb, Breadcrumb, BreadcrumbItem, PageSection, Title, Content, Popover, Button, AlertGroup, Alert, AlertVariant, AlertActionCloseButton, Spinner, EmptyState, EmptyStateBody, EmptyStateFooter, EmptyStateActions, Stack, StackItem, Card, CardBody, Flex, FlexItem, Tooltip, Modal, ModalVariant, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core'; +import { ExternalLinkAltIcon, OutlinedQuestionCircleIcon, GithubIcon, CatalogIcon, PencilAltIcon, UploadIcon, TrashIcon } from '@patternfly/react-icons'; const InstructLabLogo: React.FC = () => InstructLab Logo; @@ -371,57 +349,80 @@ const DashboardNative: React.FunctionComponent = () => { title={`Changes in ${diffData?.branch} compared to main`} isOpen={isModalOpen} onClose={() => setIsModalOpen(false)} + aria-labelledby="changes-contribution-modal-title" + aria-describedby="changes-contribution-body-variant" > - {diffData?.changes.length ? ( -
    - {diffData.changes.map((change) => ( -
  • - {change.file} - {change.status} -
  • - ))} -
- ) : ( -

No differences found.

- )} + + + {diffData?.changes.length ? ( +
    + {diffData.changes.map((change) => ( +
  • + {change.file} - {change.status} +
  • + ))} +
+ ) : ( +

No differences found.

+ )} + +
+ + + +

Not yet implemented for native mode.

+
+ - ]} - > -

Not yet implemented for native mode.

+
+ setIsDeleteModalOpen(false)} - actions={[ + aria-labelledby="delete-contribution-modal-title" + aria-describedby="delete-contribution-body-variant" + > + + +

are you sure you want to delete this contribution?

+
+ , - ]} - > -

are you sure you want to delete this contribution?

+
setIsPublishModalOpen(false)} - actions={[ + aria-labelledby="publish-contribution-modal-title" + aria-describedby="publish-contribution-body-variant" + > + + +

are you sure you want to publish contribution to remote taxonomy repository present at : {taxonomyRepoDir}?

+
+ - ]} - > -

are you sure you want to publish contribution to remote taxonomy repository present at : {taxonomyRepoDir}?

+
+ ); diff --git a/src/components/GithubAccessPopup/index.tsx b/src/components/GithubAccessPopup/index.tsx index 66044980..50d57939 100644 --- a/src/components/GithubAccessPopup/index.tsx +++ b/src/components/GithubAccessPopup/index.tsx @@ -3,9 +3,7 @@ import * as React from 'react'; import { signOut } from 'next-auth/react'; -import { Modal } from '@patternfly/react-core/dist/dynamic/deprecated/components/Modal'; -import { ModalVariant } from '@patternfly/react-core/dist/dynamic/deprecated/components/Modal'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; +import { Modal, ModalVariant, Button, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core'; interface Props { onAccept: () => void; @@ -33,56 +31,63 @@ const GithubAccessPopup: React.FunctionComponent = ({ onAccept }) => { }; return ( + setIsOpen(false)} - actions={[ + aria-labelledby="github-access-warn-modal-title" + aria-describedby="github-access-warn-body-variant" + > + + +

+ To allow InstructLab UI to manage your taxonomy submissions, you must grant read and write permissions to your GitHub account. InstructLab UI + will use your account to: +
+
+

  • + {' '} + Pull PRs from the upstream{' '} + + InstructLab Taxonomy repo + {' '} + that you’ve opened to contribute skills and       knowledge. +
  • +
  • + {' '} + Fork the InstructLab Taxonomy repo to your GitHub account and create PRs from this fork, which can merge +       into the upstream Taxonomy repo. +
  • +
  • + {' '} + Fork the{' '} + + taxonomy-knowledge-docs repo + {' '} + to your GitHub account and upload knowledge-related       documents from your account. +
  • +
    + These permissions do not enable InstructLab UI to access your GitHub password. +
    +
    + To provide InstructLab UI with the permissions necessary for managing your taxonomy submissions, select accept. If you do not wish to + grant these permissions, select deny to sign out of InstructLab UI. +
    +

    + +
    + , - ]} - > -

    - To allow InstructLab UI to manage your taxonomy submissions, you must grant read and write permissions to your GitHub account. InstructLab UI - will use your account to: -
    -
    -

  • - {' '} - Pull PRs from the upstream{' '} - - InstructLab Taxonomy repo - {' '} - that you’ve opened to contribute skills and       knowledge. -
  • -
  • - {' '} - Fork the InstructLab Taxonomy repo to your GitHub account and create PRs from this fork, which can merge -       into the upstream Taxonomy repo. -
  • -
  • - {' '} - Fork the{' '} - - taxonomy-knowledge-docs repo - {' '} - to your GitHub account and upload knowledge-related       documents from your account. -
  • -
    - These permissions do not enable InstructLab UI to access your GitHub password. -
    -
    - To provide InstructLab UI with the permissions necessary for managing your taxonomy submissions, select accept. If you do not wish to - grant these permissions, select deny to sign out of InstructLab UI. -
    -

    +
    + ); }; diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 6859b95f..f728964a 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -1,9 +1,6 @@ +import { Dropdown, MenuToggleElement, MenuToggle, DropdownList, DropdownItem, Flex, FlexItem } from '@patternfly/react-core'; +import { OutlinedQuestionCircleIcon, ExternalLinkAltIcon } from '@patternfly/react-icons'; import React, { useCallback, useState } from 'react'; -import { Flex, FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex'; -import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dist/esm/components/Dropdown'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle'; -import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; -import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/outlined-question-circle-icon'; import AboutInstructLab from '../AboutModal/AboutModal'; const HelpDropdown: React.FC = () => { diff --git a/src/components/PathService/PathService.tsx b/src/components/PathService/PathService.tsx index 03aab6ab..068628b4 100644 --- a/src/components/PathService/PathService.tsx +++ b/src/components/PathService/PathService.tsx @@ -1,13 +1,7 @@ // /src/components/PathService.tsx +import { ValidatedOptions, PopperProps, List, ListItem, SearchInput, FormHelperText, HelperText, HelperTextItem, Popper } from '@patternfly/react-core'; +import { ExclamationCircleIcon } from '@patternfly/react-icons'; import React, { useState, useEffect, useRef } from 'react'; -import { SearchInput } from '@patternfly/react-core/dist/dynamic/components/SearchInput'; -import { List } from '@patternfly/react-core/dist/dynamic/components/List'; -import { ListItem } from '@patternfly/react-core/dist/dynamic/components/List'; -import { Popper, PopperProps, ValidatedOptions } from '@patternfly/react-core/dist/dynamic/helpers'; -import { FormHelperText } from '@patternfly/react-core/dist/dynamic/components/Form'; -import { HelperText } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import { HelperTextItem } from '@patternfly/react-core/dist/dynamic/components/HelperText'; -import ExclamationCircleIcon from '@patternfly/react-icons/dist/dynamic/icons/exclamation-circle-icon'; interface PathServiceProps { reset?: boolean; diff --git a/src/components/UserMenu/ThemePreference.tsx b/src/components/UserMenu/ThemePreference.tsx index c3902138..5660b3fd 100644 --- a/src/components/UserMenu/ThemePreference.tsx +++ b/src/components/UserMenu/ThemePreference.tsx @@ -1,10 +1,8 @@ import React from 'react'; -import { Content, ContentVariants } from '@patternfly/react-core/dist/dynamic/components/Content'; -import { Flex, FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex'; -import { DropdownItem } from '@patternfly/react-core/dist/esm/components/Dropdown'; import { Theme, useTheme } from '../../context/ThemeContext'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faSun, faMoon, faCheck } from '@fortawesome/free-solid-svg-icons'; +import { DropdownItem, Content, ContentVariants, Flex, FlexItem } from '@patternfly/react-core'; const ThemePreference: React.FC = () => { const { theme, setTheme } = useTheme(); diff --git a/src/components/UserMenu/UserMenu.tsx b/src/components/UserMenu/UserMenu.tsx index 7defe55f..e634947a 100644 --- a/src/components/UserMenu/UserMenu.tsx +++ b/src/components/UserMenu/UserMenu.tsx @@ -1,12 +1,8 @@ import React, { useEffect, useState } from 'react'; -import { Flex, FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex'; -import { Avatar } from '@patternfly/react-core/dist/dynamic/components/Avatar'; -import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dist/esm/components/Dropdown'; -import { Divider } from '@patternfly/react-core/dist/esm/components/Divider'; -import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle'; -import { CaretDownIcon } from '@patternfly/react-icons/dist/dynamic/icons/caret-down-icon'; import ThemePreference from './ThemePreference'; import { signOut, useSession } from 'next-auth/react'; +import { Dropdown, MenuToggleElement, MenuToggle, Flex, FlexItem, Avatar, DropdownList, Divider, DropdownItem } from '@patternfly/react-core'; +import { CaretDownIcon } from '@patternfly/react-icons'; const UserMenu: React.FC = () => { const [isOpen, setIsOpen] = useState(false); diff --git a/src/components/YamlCodeModal/index.tsx b/src/components/YamlCodeModal/index.tsx index 59703269..68199559 100644 --- a/src/components/YamlCodeModal/index.tsx +++ b/src/components/YamlCodeModal/index.tsx @@ -1,10 +1,7 @@ // src/components/YamlCodeModal/index.tsx 'use client'; +import { Modal, ModalVariant, Button, CodeBlock, CodeBlockCode, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core'; import React from 'react'; -import { Modal } from '@patternfly/react-core/components'; -import { ModalVariant } from '@patternfly/react-core/dist/dynamic/components/Modal'; -import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; -import { CodeBlock, CodeBlockCode } from '@patternfly/react-core/dist/dynamic/components/CodeBlock'; import CopyToClipboardButton from '../../components/CopyToClipboardButton'; interface YamlCodeModalProps { @@ -15,19 +12,29 @@ interface YamlCodeModalProps { export const YamlCodeModal: React.FC = ({ isModalOpen, handleModalToggle, yamlContent }) => { return ( - -
    + + + + {yamlContent} -
    -
    - - -
    + , + +
    + ); }; diff --git a/src/types/index.ts b/src/types/index.ts index a1f0ead9..67460593 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,4 +1,4 @@ -import { ValidatedOptions } from '@patternfly/react-core/dist/esm/helpers/constants'; +import { ValidatedOptions } from "@patternfly/react-core"; export interface Endpoint { id: string;