mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
chore(frontend): Migrate from NextUI to HeroUI via codemod (#6635)
This commit is contained in:
parent
669e284dc5
commit
6655ec0731
@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next";
|
||||
import translations from "../../src/i18n/translation.json";
|
||||
import { UserAvatar } from "../../src/components/features/sidebar/user-avatar";
|
||||
|
||||
vi.mock("@nextui-org/react", () => ({
|
||||
vi.mock("@heroui/react", () => ({
|
||||
Tooltip: ({ content, children }: { content: string; children: React.ReactNode }) => (
|
||||
<div>
|
||||
{children}
|
||||
|
||||
3561
frontend/package-lock.json
generated
3561
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@monaco-editor/react": "^4.7.0-rc.0",
|
||||
"@nextui-org/react": "^2.6.11",
|
||||
"@heroui/react": "2.6.14",
|
||||
"@react-router/node": "^7.1.5",
|
||||
"@react-router/serve": "^7.1.5",
|
||||
"@react-types/shared": "^3.27.0",
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
Autocomplete,
|
||||
AutocompleteItem,
|
||||
AutocompleteSection,
|
||||
} from "@nextui-org/react";
|
||||
} from "@heroui/react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import posthog from "posthog-js";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Tooltip } from "@nextui-org/react";
|
||||
import { Tooltip } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import ConfirmIcon from "#/assets/confirm";
|
||||
import RejectIcon from "#/assets/reject";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Tooltip } from "@nextui-org/react";
|
||||
import { Tooltip } from "@heroui/react";
|
||||
import { AgentState } from "#/types/agent-state";
|
||||
|
||||
interface ActionButtonProps {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Button } from "@nextui-org/react";
|
||||
import { Button } from "@heroui/react";
|
||||
import React, { ReactElement } from "react";
|
||||
|
||||
export interface IconButtonProps {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Tooltip } from "@nextui-org/react";
|
||||
import { Tooltip } from "@heroui/react";
|
||||
import React, { ReactNode } from "react";
|
||||
import { cn } from "#/utils/utils";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Autocomplete, AutocompleteItem } from "@nextui-org/react";
|
||||
import { Autocomplete, AutocompleteItem } from "@heroui/react";
|
||||
|
||||
interface FormFieldsetProps {
|
||||
id: string;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Switch } from "@nextui-org/react";
|
||||
import { Switch } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
import { cn } from "#/utils/utils";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Autocomplete, AutocompleteItem } from "@nextui-org/react";
|
||||
import { Autocomplete, AutocompleteItem } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Input, Tooltip } from "@nextui-org/react";
|
||||
import { Input, Tooltip } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FaCheckCircle, FaExclamationCircle } from "react-icons/fa";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Input } from "@nextui-org/react";
|
||||
import { Input } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Switch } from "@nextui-org/react";
|
||||
import { Switch } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
import { cn } from "#/utils/utils";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Input } from "@nextui-org/react";
|
||||
import { Input } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Autocomplete, AutocompleteItem } from "@nextui-org/react";
|
||||
import { Autocomplete, AutocompleteItem } from "@heroui/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import {
|
||||
ModalContent,
|
||||
ModalFooter,
|
||||
ModalHeader,
|
||||
} from "@nextui-org/react";
|
||||
} from "@heroui/react";
|
||||
import React from "react";
|
||||
import { Action, FooterContent } from "./footer-content";
|
||||
import { HeaderContent } from "./header-content";
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Button } from "@nextui-org/react";
|
||||
import { Button } from "@heroui/react";
|
||||
import React from "react";
|
||||
|
||||
export interface Action {
|
||||
|
||||
@ -4,7 +4,7 @@ import { IoAlertCircle } from "react-icons/io5";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Editor, Monaco } from "@monaco-editor/react";
|
||||
import { editor } from "monaco-editor";
|
||||
import { Button, Select, SelectItem } from "@nextui-org/react";
|
||||
import { Button, Select, SelectItem } from "@heroui/react";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { RootState } from "#/store";
|
||||
import {
|
||||
|
||||
@ -2,7 +2,7 @@ import {
|
||||
Autocomplete,
|
||||
AutocompleteItem,
|
||||
AutocompleteSection,
|
||||
} from "@nextui-org/react";
|
||||
} from "@heroui/react";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Select, SelectItem } from "@nextui-org/react";
|
||||
import { Select, SelectItem } from "@heroui/react";
|
||||
import { I18nKey } from "#/i18n/declaration";
|
||||
|
||||
interface RuntimeSizeSelectorProps {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { useDisclosure } from "@nextui-org/react";
|
||||
import { useDisclosure } from "@heroui/react";
|
||||
import React from "react";
|
||||
import { Outlet } from "react-router";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
import { nextui } from "@nextui-org/react";
|
||||
import { heroui } from "@heroui/react";
|
||||
import typography from '@tailwindcss/typography';
|
||||
export default {
|
||||
content: [
|
||||
"./src/**/*.{js,ts,jsx,tsx}",
|
||||
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
|
||||
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
@ -19,7 +19,7 @@ export default {
|
||||
},
|
||||
darkMode: "class",
|
||||
plugins: [
|
||||
nextui({
|
||||
heroui({
|
||||
defaultTheme: "dark",
|
||||
layout: {
|
||||
radius: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user