Repository: jhipster/jhipster-lite
Pull request #11846 (2025-02-02 14:58:17)

Repo org updated @nextui-org to @heroui
Since 2.6.12 : https://github.com/heroui-inc/heroui/releases/tag/%40heroui%2Freact%402.6.12

Related to #11794 


Patch:
diff --git a/src/main/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactory.java
index 2cbc372e5..9f455f96c 100644
--- a/src/main/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactory.java
+++ b/src/main/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactory.java
@@ -54,7 +54,7 @@ public class ReactJwtModuleFactory {
       .packageJson()
         .addDependency(packageName("react-hook-form"), REACT)
         .addDependency(packageName("axios"), REACT)
-        .addDependency(packageName("@nextui-org/react"), REACT)
+        .addDependency(packageName("@heroui/react"), REACT)
         .addDevDependency(packageName("autoprefixer"), COMMON)
         .addDevDependency(packageName("sass"), REACT)
         .addDevDependency(packageName("postcss"), COMMON)
@@ -92,13 +92,13 @@ public class ReactJwtModuleFactory {
           .add(LOGIN_FORM_MATCHER, properties.indentation().times(4) + "<LoginForm />")
           .and()
         .in(path("src/main/webapp/app/index.tsx"))
-          .add(lineBeforeText("import React from 'react';"), "import { NextUIProvider } from '@nextui-org/react';")
+          .add(lineBeforeText("import React from 'react';"), "import { HeroUIProvider } from '@heroui/react';")
           .add(regex("\\s+<HomePage />"),
                 """
 
-              \t\t<NextUIProvider>
+              \t\t<HeroUIProvider>
               \t\t\t<HomePage />
-              \t\t</NextUIProvider>\
+              \t\t</HeroUIProvider>\
               """.replace("\t", properties.indentation().spaces())
           )
           .and()
diff --git a/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache b/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache
index 2bf275fd4..28a07c9f5 100644
--- a/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache
+++ b/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginForm/index.tsx.mustache
@@ -1,4 +1,4 @@
-import { Button } from '@nextui-org/react';
+import { Button } from '@heroui/react';
 import { createContext, useCallback, useMemo, useState } from 'react';
 
 import LoginModal from '@/login/primary/loginModal';
diff --git a/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache b/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache
index 1920d6a9a..1ed667b3f 100644
--- a/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache
+++ b/src/main/resources/generator/client/react/security/jwt/src/main/webapp/app/login/primary/loginModal/index.tsx.mustache
@@ -1,4 +1,4 @@
-import { Button, Input, Modal, ModalBody, ModalContent, ModalHeader, Spacer } from '@nextui-org/react';
+import { Button, Input, Modal, ModalBody, ModalContent, ModalHeader, Spacer } from '@heroui/react';
 import { useCallback, useContext, useState } from 'react';
 import { useForm } from 'react-hook-form';
 
diff --git a/src/main/resources/generator/client/react/security/jwt/tailwind.config.js b/src/main/resources/generator/client/react/security/jwt/tailwind.config.js
index 9f3fd1a07..686bb166a 100644
--- a/src/main/resources/generator/client/react/security/jwt/tailwind.config.js
+++ b/src/main/resources/generator/client/react/security/jwt/tailwind.config.js
@@ -1,14 +1,14 @@
-const { nextui } = require('@nextui-org/react');
+const { heroui } = require('@heroui/react');
 
 module.exports = {
   content: [
     './src/main/webapp/index.html',
     './src/main/webapp/**/*.{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: {},
   },
   darkMode: 'class',
-  plugins: [nextui()],
+  plugins: [heroui()],
 };
diff --git a/src/main/resources/generator/dependencies/react/package.json b/src/main/resources/generator/dependencies/react/package.json
index 8cc165c85..6fc41aa5c 100644
--- a/src/main/resources/generator/dependencies/react/package.json
+++ b/src/main/resources/generator/dependencies/react/package.json
@@ -5,7 +5,7 @@
   "license": "Apache-2.0",
   "type": "module",
   "dependencies": {
-    "@nextui-org/react": "2.6.11",
+    "@heroui/react": "2.6.14",
     "@testing-library/dom": "10.4.0",
     "@testing-library/react": "16.2.0",
     "@tsconfig/vite-react": "3.4.0",


Test patch:
diff --git a/src/test/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactoryTest.java b/src/test/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactoryTest.java
index a9df091bc..1a0c43269 100644
--- a/src/test/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactoryTest.java
+++ b/src/test/java/tech/jhipster/lite/generator/client/react/security/jwt/domain/ReactJwtModuleFactoryTest.java
@@ -39,9 +39,9 @@ class ReactJwtModuleFactoryTest {
       .containing(
         """
           <React.StrictMode>
-            <NextUIProvider>
+            <HeroUIProvider>
               <HomePage />
-            </NextUIProvider>
+            </HeroUIProvider>
           </React.StrictMode>,
         """
       );
@@ -75,7 +75,7 @@ class ReactJwtModuleFactoryTest {
       .containing(nodeDependency("tailwindcss"))
       .containing(nodeDependency("react-hook-form"))
       .containing(nodeDependency("axios"))
-      .containing(nodeDependency("@nextui-org/react"))
+      .containing(nodeDependency("@heroui/react"))
       .containing(nodeDependency("sass"))
       .and()
       .hasPrefixedFiles(