Skip to content

Commit dedc478

Browse files
committed
Upgrade Tailwind to v4
1 parent 75005cd commit dedc478

26 files changed

+121
-73
lines changed

bun.lockb

4.07 KB
Binary file not shown.

web/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@
2828
"zod": "^3.21.4"
2929
},
3030
"eslintConfig": {
31-
"extends": ["react-app"]
31+
"extends": [
32+
"react-app"
33+
]
3234
},
3335
"devDependencies": {
3436
"@babel/core": "^7.21.8",
3537
"@babel/preset-typescript": "^7.21.5",
3638
"@graphql-codegen/cli": "^4.0.0",
3739
"@graphql-codegen/typescript": "^4.0.0",
3840
"@graphql-codegen/typescript-operations": "^4.0.0",
41+
"@tailwindcss/postcss": "^4.1.13",
3942
"@types/lodash": "^4.14.194",
4043
"@types/node": "^20.2.3",
4144
"@types/web": "^0.0.99",
@@ -45,7 +48,7 @@
4548
"eslint-plugin-solid": "^0.12.1",
4649
"nodemon": "^2.0.22",
4750
"postcss": "^8.4.23",
48-
"tailwindcss": "^3.3.2",
51+
"tailwindcss": "^4.1.13",
4952
"typescript": "latest"
5053
},
5154
"module": "index.ts",

web/postcss-plugin.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import autoprefixer from 'autoprefixer';
2-
import { BunPlugin } from "bun";
3-
import postcss from 'postcss';
4-
import tailwindcss from 'tailwindcss';
5-
import tailwindConfig from './tailwind.config';
1+
import autoprefixer from "autoprefixer"
2+
import { BunPlugin } from "bun"
3+
import postcss from "postcss"
4+
import tailwindcss from "@tailwindcss/postcss"
5+
import tailwindConfig from "./tailwind.config"
66

77
/**
88
* @type {BunPlugin}
@@ -18,11 +18,11 @@ export const postcssPlugin = {
1818

1919
return {
2020
contents: result.css,
21-
loader: "file",
22-
};
21+
loader: "file"
22+
}
2323
} catch (e) {
2424
console.error(e)
2525
}
26-
});
27-
},
28-
};
26+
})
27+
}
28+
}

web/src/components/Cell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const DefaultLoader = () => (
1212
</div>
1313
)
1414
const DefaultFailure: Component<{ error: any }> = (props) => (
15-
<div class="rounded bg-red-100 p-4 text-red-700">{props.error.message}</div>
15+
<div class="rounded-sm bg-red-100 p-4 text-red-700">{props.error.message}</div>
1616
)
1717

1818
export const Cell: <Data, Variables, OtherProps = never>(props: {

web/src/components/InnerPageWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const InnerPageWrapper: Component<{
2424
</PageHeader>
2525
<div
2626
classList={{
27-
"p-4 shadow-sm lg:rounded lg:p-6 bg-white": props.contentBackground !== false
27+
"p-4 shadow-xs lg:rounded-sm lg:p-6 bg-white": props.contentBackground !== false
2828
}}
2929
>
3030
{props.children}

web/src/components/MainNavigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { fixAssetPath } from "../utils/fixAssetPath"
1212

1313
const MainNavigation: Component = () => {
1414
return (
15-
<div class="z-navbar fixed bottom-0 left-0 right-0 top-auto bg-white pb-[env(safe-area-inset-bottom)] shadow md:bottom-auto md:top-0 md:pb-0 md:pl-4">
15+
<div class="z-navbar fixed bottom-0 left-0 right-0 top-auto bg-white pb-[env(safe-area-inset-bottom)] shadow-sm md:bottom-auto md:top-0 md:pb-0 md:pl-4">
1616
<div class="flex items-center md:mx-auto md:max-w-5xl md:px-2">
1717
<Link href="/" class="mr-4 hidden md:block">
1818
<img class="w-24" src={fixAssetPath(logoImage)} />

web/src/components/accounts/AccountsList.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ const AccountsList: Component<{
3838
const defaultAccountId = () => props.currentUser?.currentUser?.defaultAccount?.id
3939

4040
return (
41-
<div class="flex flex-col gap-px bg-gray-100 shadow-sm">
41+
<div class="shadow-xs flex flex-col gap-px bg-gray-100">
4242
<For each={props.data.accounts}>
4343
{(account) => (
44-
<div class="flex items-center bg-white px-4 py-2 shadow-sm">
44+
<div class="shadow-xs flex items-center bg-white px-4 py-2">
4545
<div class="mr-4 min-w-0 flex-1">
4646
<h3 class="mb-1 truncate leading-none">{account.name}</h3>
4747
<p class="text-xs leading-tight text-gray-600">{account.currency.code}</p>
@@ -50,10 +50,11 @@ const AccountsList: Component<{
5050
size="sm"
5151
variant="ghost"
5252
colorScheme={account.id === defaultAccountId() ? "primary" : "neutral"}
53-
class="ml-auto mr-2"
53+
class="ml-auto mr-2 gap-2 text-xs"
5454
title={"Set default to " + account.name}
5555
onClick={() => setDefaultAccount({ id: account.id })}
5656
>
57+
{account.id === defaultAccountId() && "Default "}
5758
<IconAsterisk />
5859
</Button>
5960
<LinkButton

web/src/components/base/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface InputCustomProps {
1212
}
1313

1414
export const inputClasses = (props: InputCustomProps) =>
15-
`border rounded border-gray-200 ring-0 ring-indigo-200 transition focus:border-indigo-400 focus:outline-0 focus:ring focus-within:border-indigo-400 focus-within:outline-0 focus-within:ring disabled:pointer-events-none disabled:opacity-50 ${
15+
`border rounded border-gray-200 ring-0 ring-indigo-200 transition focus:border-indigo-400 focus:outline-0 focus:ring-3 focus-within:border-indigo-400 focus-within:outline-0 focus-within:ring-3 disabled:pointer-events-none disabled:opacity-50 ${
1616
// eslint-disable-next-line solid/reactivity
1717
INPUT_SIZES[props.size || "md"]
1818
}`

web/src/components/base/InputGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const InputGroupInput = (allProps: InputProps) => {
2727

2828
return (
2929
<input
30-
class={`my-[-1px] h-10 flex-1 bg-transparent px-4 outline-0 ${props.class}`}
30+
class={`-my-px h-10 flex-1 bg-transparent px-4 outline-0 ${props.class}`}
3131
{...elementProps}
3232
/>
3333
)

web/src/components/budgets/BudgetGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const BudgetGroup: Component<BudgetGroupProps> = (props) => {
4747
<IconListSearch />
4848
</LinkButton>
4949
</h2>
50-
<div class="bg-white pl-6 pr-4 pt-4 shadow-sm lg:mb-6 lg:ml-4">
50+
<div class="bg-white pl-6 pr-4 pt-4 shadow-xs lg:mb-6 lg:ml-4">
5151
<Show when={!props.items.length}>
5252
<div class="pb-4">No transactions</div>
5353
</Show>

0 commit comments

Comments
 (0)