migrate to heroui

This commit is contained in:
Clas Wen 2025-01-29 11:00:39 +08:00
parent d7d15a2820
commit fca8afd597
9 changed files with 2690 additions and 2641 deletions

2
.npmrc
View file

@ -1 +1 @@
public-hoist-pattern[]=*@nextui-org/* public-hoist-pattern[]=*@heroui/*

View file

@ -9,6 +9,7 @@
"astro", "astro",
"astrojs", "astrojs",
"frontmatter", "frontmatter",
"heroui",
"logto", "logto",
"Logto", "Logto",
"logtoClient", "logtoClient",

View file

@ -24,7 +24,7 @@
"@fullcalendar/react": "^6.1.15", "@fullcalendar/react": "^6.1.15",
"@headlessui/vue": "^1.7.23", "@headlessui/vue": "^1.7.23",
"@logto/browser": "^2.2.18", "@logto/browser": "^2.2.18",
"@nextui-org/react": "^2.4.8", "@heroui/react": "2.6.14",
"@stylistic/eslint-plugin": "^2.8.0", "@stylistic/eslint-plugin": "^2.8.0",
"astro": "^4.16.18", "astro": "^4.16.18",
"framer-motion": "^11.9.0", "framer-motion": "^11.9.0",

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
import { useState } from "react" import { useState } from "react"
import { Navbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenuToggle, NavbarMenu, NavbarMenuItem, Link } from "@nextui-org/react" import { Navbar, NavbarBrand, NavbarContent, NavbarItem, NavbarMenuToggle, NavbarMenu, NavbarMenuItem, Link } from "@heroui/react"
import { SITE_TITLE } from "../../consts" import { SITE_TITLE } from "../../consts"
export default function App() { export default function App() {

View file

@ -7,7 +7,7 @@ import {
Popover, Popover,
PopoverTrigger, PopoverTrigger,
PopoverContent, PopoverContent,
} from "@nextui-org/react" } from "@heroui/react"
import { activeClient } from "../../../utils/client" import { activeClient } from "../../../utils/client"
export default function JoinForm() { export default function JoinForm() {

View file

@ -5,14 +5,14 @@ import {
CardBody, CardBody,
CardFooter, CardFooter,
// PaginationItem, // PaginationItem,
} from "@nextui-org/react" } from "@heroui/react"
import { import {
activeClient, activeClient,
type GetFreshmanListResponse, type GetFreshmanListResponse,
} from "../../../utils/client" } from "../../../utils/client"
// activeClient.freshman.getFreshmanList(); // activeClient.freshman.getFreshmanList();
import { useEffect, useState } from "react" import { useEffect, useState } from "react"
// import { Pagination } from "@nextui-org/react"; // import { Pagination } from "@heroui/react";
const FreshmanList = () => { const FreshmanList = () => {
const [freshmen, setFreshmen] = useState<GetFreshmanListResponse>({ const [freshmen, setFreshmen] = useState<GetFreshmanListResponse>({
list: [], list: [],

View file

@ -1,4 +1,4 @@
import { Button, Link, Code } from "@nextui-org/react" import { Button, Link, Code } from "@heroui/react"
function QrCodeContent({ qrcode }: { qrcode: string }) { function QrCodeContent({ qrcode }: { qrcode: string }) {
return ( return (

View file

@ -1,9 +1,9 @@
import { nextui } from "@nextui-org/react" import { heroui } from "@heroui/react"
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
export default { export default {
content: [ content: [
"./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}", "./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}",
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}", "./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
], ],
theme: { theme: {
extend: { extend: {
@ -13,5 +13,5 @@ export default {
}, },
}, },
darkMode: "class", darkMode: "class",
plugins: [nextui()], plugins: [heroui()],
} }