Skip to content

Commit aa2f380

Browse files
committed
🔁 Update tailwindcss to Version v4
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
1 parent bc8d858 commit aa2f380

File tree

17 files changed

+535
-470
lines changed

17 files changed

+535
-470
lines changed

interface/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Matt Solomon
3+
Copyright (c) 2023-2025 Matt Solomon
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

interface/eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const eslintConfigPrettier = require("eslint-config-prettier");
1010
/** @type {import('typescript-eslint').TSESLint.FlatConfig.ConfigArray} */
1111
module.exports = tseslint.config(
1212
{
13-
files: ["**/*.{js,ts,tsx}"],
13+
files: ["**/*.{js,mjs,ts,tsx}"],
1414
extends: [
1515
eslint.configs.recommended,
1616
...tseslint.configs.recommended,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const nextConfig =
3333
distDir: "dist",
3434
};
3535

36-
module.exports = nextConfig;
36+
export default nextConfig

interface/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,23 @@
4040
"sharp": "^0.33.5"
4141
},
4242
"devDependencies": {
43-
"@eslint/js": "^9.18.0",
43+
"@eslint/js": "^9.19.0",
4444
"@next/eslint-plugin-next": "^15.1.6",
45+
"@tailwindcss/postcss": "^4.0.0",
4546
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
46-
"@types/node": "^22.10.7",
47-
"@types/react": "^19.0.7",
47+
"@types/node": "^22.10.10",
48+
"@types/react": "^19.0.8",
4849
"@types/react-dom": "^19.0.3",
4950
"autoprefixer": "^10.4.20",
50-
"eslint": "^9.18.0",
51+
"eslint": "^9.19.0",
5152
"eslint-config-next": "^15.1.6",
5253
"eslint-plugin-react": "^7.37.4",
5354
"eslint-plugin-react-hooks": "^5.1.0",
5455
"next-seo": "^6.6.0",
5556
"postcss": "^8.5.1",
5657
"prettier": "^3.4.2",
57-
"prettier-plugin-tailwindcss": "^0.6.10",
58-
"tailwindcss": "^3.4.17",
58+
"prettier-plugin-tailwindcss": "^0.6.11",
59+
"tailwindcss": "^4.0.0",
5960
"typescript": "^5.7.3",
6061
"typescript-eslint": "^8.21.0"
6162
}

interface/postcss.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
module.exports = {
2-
plugins: {
3-
tailwindcss: {},
4-
autoprefixer: {},
5-
},
2+
plugins: ["@tailwindcss/postcss"],
63
};

interface/src/components/layout/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const Header = () => {
7373
</div>
7474
<div className="flex items-center justify-center">
7575
<div className="mx-auto h-auto w-auto rounded-full text-center">
76-
<p className="text-accent whitespace-nowrap text-xs opacity-80">
76+
<p className="text-accent text-xs whitespace-nowrap opacity-80">
7777
Deployment Address
7878
</p>
7979
<div className="flex items-center">

interface/src/components/ui/Notification.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ export const Notification = ({
6666
leaveTo="opacity-0"
6767
>
6868
<div
69-
className={`pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 ${bgColor}`}
69+
className={`ring-opacity-5 pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg ring-1 shadow-lg ring-black ${bgColor}`}
7070
>
7171
<div className="p-4">
7272
<div className="flex items-start">
73-
<div className="flex-shrink-0">
73+
<div className="shrink-0">
7474
<Icon
7575
className={`h-6 w-6 ${iconColor}`}
7676
aria-hidden="true"
@@ -84,10 +84,10 @@ export const Notification = ({
8484
{description}
8585
</p>
8686
</div>
87-
<div className="ml-4 flex flex-shrink-0">
87+
<div className="ml-4 flex shrink-0">
8888
<button
8989
type="button"
90-
className={`inline-flex rounded-md ${bgColor} ${titleTextColor} text-hover focus:outline-none`}
90+
className={`inline-flex rounded-md ${bgColor} ${titleTextColor} text-hover focus:outline-hidden`}
9191
onClick={() => {
9292
setShow(false);
9393
}}

interface/src/pages/abi.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const Abi = () => {
161161
/>
162162

163163
<TabGroup selectedIndex={selectedTab} onChange={onTabChange}>
164-
<TabList className="space-x-4 overflow-x-auto whitespace-nowrap border-b border-gray-200 dark:border-gray-700 md:flex md:justify-center md:space-x-8">
164+
<TabList className="space-x-4 overflow-x-auto border-b border-gray-200 whitespace-nowrap md:flex md:justify-center md:space-x-8 dark:border-gray-700">
165165
{tabs.map((tab) => {
166166
return (
167167
<Tab key={tab.name} className="focus:outline-0">
@@ -170,7 +170,7 @@ const Abi = () => {
170170
className={classNames(
171171
"group inline-flex items-center px-1 py-3 text-sm font-medium",
172172
selected
173-
? "text-accent border-b-2 border-b-blue-800 outline-none dark:border-b-blue-300"
173+
? "text-accent border-b-2 border-b-blue-800 outline-hidden dark:border-b-blue-300"
174174
: "text-secondary text-hover",
175175
)}
176176
>
@@ -205,7 +205,7 @@ const Abi = () => {
205205
className="relative mt-4 inline-block max-h-screen max-w-full overflow-x-auto overflow-y-auto text-sm shadow-md"
206206
>
207207
<button
208-
className="absolute right-3 top-4 z-10 mr-10 rounded-md border border-gray-500 p-1 hover:border-black focus:outline-0 dark:border-gray-400 hover:dark:border-gray-200"
208+
className="absolute top-4 right-3 z-10 mr-10 rounded-md border border-gray-500 p-1 hover:border-black focus:outline-0 dark:border-gray-400 dark:hover:border-gray-200"
209209
style={{
210210
// Blur the background behind the copy button.
211211
background: "rgba(0, 0, 0, 0.0)",
@@ -218,7 +218,7 @@ const Abi = () => {
218218
<ArrowDownTrayIcon className="h-4 w-4" />
219219
</button>
220220
<button
221-
className="absolute right-3 top-4 z-10 rounded-md border border-gray-500 p-1 hover:border-black focus:outline-0 dark:border-gray-400 hover:dark:border-gray-200"
221+
className="absolute top-4 right-3 z-10 rounded-md border border-gray-500 p-1 hover:border-black focus:outline-0 dark:border-gray-400 dark:hover:border-gray-200"
222222
style={{
223223
// Blur the background behind the copy button.
224224
background: "rgba(0, 0, 0, 0.0)",

interface/src/pages/deployments.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const Deployments = () => {
104104
<div className="mt-10 flex items-center justify-center gap-x-6">
105105
<button
106106
onClick={() => window.location.reload()}
107-
className="rounded-md bg-blue-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500"
107+
className="rounded-md bg-blue-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-blue-500"
108108
>
109109
Please try again!
110110
</button>
@@ -146,20 +146,20 @@ const Deployments = () => {
146146
);
147147

148148
const showDeploymentsDiv = () => (
149-
<div className="overflow-hidden rounded-lg shadow ring-1 ring-black ring-opacity-5">
150-
<table className="min-w-full divide-y divide-gray-300">
149+
<div className="ring-opacity-5 overflow-hidden rounded-lg ring-1 shadow-sm ring-gray-300 dark:ring-gray-700">
150+
<table className="min-w-full divide-y divide-gray-300 dark:divide-gray-700">
151151
<thead className="bg-gray-50 dark:bg-gray-700">
152152
<tr>
153153
<th
154154
scope="col"
155-
className="text-primary py-3.5 pl-4 pr-3 text-left text-sm font-semibold sm:pl-6"
155+
className="text-primary py-3.5 pr-3 pl-4 text-left text-sm font-semibold sm:pl-6"
156156
>
157157
<div
158-
className="group inline-flex cursor-pointer rounded-md p-1 hover:bg-gray-200 hover:dark:bg-gray-700"
158+
className="group inline-flex cursor-pointer rounded-md p-1 hover:bg-gray-200 dark:hover:bg-gray-700"
159159
onClick={() => onHeaderClick("name")}
160160
>
161161
Name
162-
<span className="text-primary ml-2 flex-none rounded">
162+
<span className="text-primary ml-2 flex-none rounded-sm">
163163
<ChevronDownIcon className="h-5 w-5" aria-hidden="true" />
164164
</span>
165165
</div>
@@ -169,11 +169,11 @@ const Deployments = () => {
169169
className="text-primary px-3 py-3.5 text-left text-sm font-semibold"
170170
>
171171
<div
172-
className="group inline-flex cursor-pointer rounded-md p-1 hover:bg-gray-200 hover:dark:bg-gray-700"
172+
className="group inline-flex cursor-pointer rounded-md p-1 hover:bg-gray-200 dark:hover:bg-gray-700"
173173
onClick={() => onHeaderClick("chainId")}
174174
>
175175
Chain ID
176-
<span className="text-primary ml-2 flex-none rounded">
176+
<span className="text-primary ml-2 flex-none rounded-sm">
177177
<ChevronDownIcon className="h-5 w-5" aria-hidden="true" />
178178
</span>
179179
</div>
@@ -183,16 +183,16 @@ const Deployments = () => {
183183
</th>
184184
</tr>
185185
</thead>
186-
<tbody className="cursor-pointer divide-y divide-gray-200 bg-white">
186+
<tbody className="cursor-pointer divide-y divide-gray-300 bg-white dark:divide-gray-700 dark:bg-gray-800">
187187
{filteredDeployments.map((deployment) => (
188188
<tr
189189
key={`${deployment.chainId}-${deployment.name}`}
190-
className="group dark:bg-gray-800"
190+
className="group"
191191
onClick={() =>
192192
window.open(deployment.urls[0], "_blank", "noopener,noreferrer")
193193
}
194194
>
195-
<td className="text-primary flex flex-col whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium sm:pl-6">
195+
<td className="text-primary flex flex-col py-4 pr-3 pl-4 text-sm font-medium whitespace-nowrap sm:pl-6">
196196
{deployment.name}
197197
{deployment.address && (
198198
<p className="text-secondary text-xs font-normal">
@@ -203,7 +203,7 @@ const Deployments = () => {
203203
</p>
204204
)}
205205
</td>
206-
<td className="text-secondary whitespace-nowrap px-3 py-4 text-sm">
206+
<td className="text-secondary px-3 py-4 text-sm whitespace-nowrap">
207207
{deployment.chainId}
208208
</td>
209209
<td className="relative pr-4">
@@ -233,12 +233,12 @@ const Deployments = () => {
233233
const deploymentsTableDiv = () => (
234234
<>
235235
<div className="relative mb-4">
236-
<span className="text-secondary pointer-events-none absolute right-4 top-1/2 -translate-y-1/2 transform text-xs opacity-60 dark:opacity-70">
236+
<span className="text-secondary pointer-events-none absolute top-1/2 right-4 -translate-y-1/2 transform text-xs opacity-60 dark:opacity-70">
237237
{modifierKey}K
238238
</span>
239239
<input
240240
type="text"
241-
className="block w-full rounded-md border-gray-300 px-4 py-2 shadow-sm focus:border-blue-500 focus:ring-blue-500"
241+
className="block w-full rounded-md border-gray-300 bg-white px-4 py-2 shadow-xs focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-800"
242242
placeholder="Network name or chain ID..."
243243
value={search}
244244
onChange={(e) => setSearch(e.target.value)}

interface/src/pages/index.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,34 @@ const Home = () => {
3232
return (
3333
<>
3434
<Head />
35-
<div className="mx-auto mt-6 w-full max-w-screen-lg sm:mt-20">
36-
<h1 className="text-accent mb-10 text-center text-3xl font-bold sm:text-4xl">
35+
<div className="mx-auto mt-6 w-full max-w-(--breakpoint-lg) sm:mt-20">
36+
<h1 className="text-accent mb-12 text-center text-3xl font-bold sm:text-4xl">
3737
{SITE_DESCRIPTION}
3838
</h1>
39-
<dl className="flex flex-wrap justify-center text-center sm:flex-nowrap">
40-
{cards.map((card) => (
41-
<Link
42-
key={card.id}
43-
href={card.href}
44-
rel={
45-
card.href.startsWith("http") ? "noopener noreferrer" : undefined
46-
}
47-
target={card.href.startsWith("http") ? "_blank" : undefined}
48-
className="bg-secondary m-4 w-3/4 cursor-pointer gap-y-4 rounded-xl border border-blue-800/0 p-6 shadow-md hover:border-blue-800/40 dark:border-blue-300/0 dark:shadow-lg dark:hover:border-blue-300/40 sm:w-full"
49-
>
50-
<dd className="text-primary text-2xl font-semibold tracking-tight sm:text-3xl">
51-
{card.title}
52-
</dd>
53-
<dt className="text-secondary text-base leading-7">
54-
{card.subtitle}
55-
</dt>
56-
</Link>
57-
))}
58-
</dl>
39+
<div className="mx-auto mt-12 w-full max-w-7xl">
40+
<dl className="mx-auto grid w-full grid-cols-1 gap-8 sm:grid-cols-3">
41+
{cards.map((card) => (
42+
<Link
43+
key={card.id}
44+
href={card.href}
45+
rel={
46+
card.href.startsWith("http")
47+
? "noopener noreferrer"
48+
: undefined
49+
}
50+
target={card.href.startsWith("http") ? "_blank" : undefined}
51+
className="bg-secondary flex w-full cursor-pointer flex-col items-center justify-center rounded-xl border border-blue-800/0 p-6 shadow-md hover:border-blue-800/40 dark:border-blue-300/0 dark:shadow-lg dark:hover:border-blue-300/40"
52+
>
53+
<dd className="text-primary text-center text-2xl font-semibold tracking-tight sm:text-3xl">
54+
{card.title}
55+
</dd>
56+
<dt className="text-secondary text-center text-base leading-7">
57+
{card.subtitle}
58+
</dt>
59+
</Link>
60+
))}
61+
</dl>
62+
</div>
5963
</div>
6064
</>
6165
);

0 commit comments

Comments
 (0)