Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,262 changes: 392 additions & 1,870 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"name": "envelope-zero-frontend",
"dependencies": {
"@envelope-zero/ynap-parsers": "1.17.34",
"@eslint/compat": "1.2.8",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.23.0",
"@headlessui/react": "2.2.0",
"@heroicons/react": "2.2.0",
"@tailwindcss/forms": "0.5.10",
"@tailwindcss/vite": "4.1.2",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.3.0",
"@testing-library/user-event": "14.6.1",
Expand All @@ -16,12 +20,12 @@
"@typescript-eslint/eslint-plugin": "8.29.0",
"@typescript-eslint/parser": "8.29.0",
"@vitejs/plugin-react": "4.3.4",
"autoprefixer": "10.4.21",
"buffer": "6.0.3",
"cypress": "14.2.1",
"eslint": "9.23.0",
"eslint-config-prettier": "10.1.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.5",
"flowbite": "3.1.2",
"flowbite-react": "0.11.7",
Expand All @@ -30,6 +34,7 @@
"js-big-decimal": "2.2.0",
"postcss": "8.5.3",
"prettier": "3.5.3",
"prettier-plugin-tailwindcss": "0.6.11",
"react": "19.1.0",
"react-device-detect": "2.2.3",
"react-dom": "19.1.0",
Expand All @@ -39,7 +44,7 @@
"sass": "1.86.3",
"sortablejs": "1.15.6",
"stream-browserify": "3.0.0",
"tailwindcss": "3.4.17",
"tailwindcss": "4.1.2",
"typescript": "5.8.2",
"vite": "6.2.5",
"vite-plugin-eslint": "1.8.1",
Expand All @@ -56,12 +61,7 @@
"workbox-range-requests": "7.3.0",
"workbox-routing": "7.3.0",
"workbox-strategies": "7.3.0",
"workbox-streams": "7.3.0",
"@eslint/compat": "1.2.8",
"@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.23.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"prettier-plugin-tailwindcss": "0.6.11"
"workbox-streams": "7.3.0"
},
"scripts": {
"start": "vite --open",
Expand Down
6 changes: 0 additions & 6 deletions postcss.config.js

This file was deleted.

28 changes: 12 additions & 16 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
.dark {
color-scheme: dark;
Expand All @@ -28,19 +24,19 @@
}

h1 {
@apply text-xl font-black leading-6 tracking-wide text-gray-900 dark:text-gray-100;
@apply text-xl leading-6 font-black tracking-wide text-gray-900 dark:text-gray-100;
}

h2 {
@apply text-lg font-bold leading-6 text-gray-900 dark:text-gray-100;
@apply text-lg leading-6 font-bold text-gray-900 dark:text-gray-100;
}

h3 {
@apply text-lg font-medium leading-6 text-gray-900 dark:text-gray-100;
@apply text-lg leading-6 font-medium text-gray-900 dark:text-gray-100;
}

.header {
@apply fixed left-0 right-0 top-[1.625rem] z-10 m-auto flex items-center justify-center text-center lg:relative lg:top-0 lg:h-12;
@apply fixed top-[1.625rem] right-0 left-0 z-10 m-auto flex items-center justify-center text-center lg:relative lg:top-0 lg:h-12;
@media (max-width: 1023px) {
width: calc(100% - 9rem);
}
Expand All @@ -51,7 +47,7 @@
}

.header--action {
@apply fixed right-6 flex gap-x-2 text-red-800 dark:text-red-600 lg:absolute lg:right-0;
@apply fixed right-6 flex gap-x-2 text-red-800 lg:absolute lg:right-0 dark:text-red-600;

.header--action__secondary {
@apply text-gray-600 dark:text-gray-400;
Expand All @@ -68,7 +64,7 @@
}

.icon {
@apply h-6 w-6 flex-shrink-0;
@apply h-6 w-6 shrink-0;
}

.icon-red {
Expand All @@ -88,11 +84,11 @@
}

.box {
@apply rounded-md bg-gray-100 shadow-sm dark:bg-slate-700;
@apply rounded-md bg-gray-100 shadow-xs dark:bg-slate-700;
}

.card {
@apply rounded-lg bg-white p-4 shadow-lg dark:bg-slate-800 md:p-8;
@apply rounded-lg bg-white p-4 shadow-lg md:p-8 dark:bg-slate-800;
}

.error {
Expand All @@ -104,11 +100,11 @@
}

.btn-primary {
@apply full-centered w-full min-w-32 rounded-md bg-blue-800 px-4 py-3 text-sm font-bold text-white shadow-sm hover:bg-blue-900 dark:hover:bg-blue-700 md:w-auto;
@apply full-centered w-full min-w-32 rounded-md bg-blue-800 px-4 py-3 text-sm font-bold text-white shadow-xs hover:bg-blue-900 md:w-auto dark:hover:bg-blue-700;
}

.btn-secondary {
@apply full-centered w-full min-w-32 rounded-md border border-blue-800 px-4 py-2 text-sm font-medium text-blue-800 shadow-sm hover:bg-gray-50 hover:text-blue-900 dark:border-gray-300 dark:text-gray-300 dark:hover:bg-slate-700 dark:hover:text-gray-200 md:w-auto;
@apply full-centered w-full min-w-32 rounded-md border border-blue-800 px-4 py-2 text-sm font-medium text-blue-800 shadow-xs hover:bg-gray-50 hover:text-blue-900 md:w-auto dark:border-gray-300 dark:text-gray-300 dark:hover:bg-slate-700 dark:hover:text-gray-200;
}

.btn-secondary-red {
Expand All @@ -127,15 +123,15 @@
}

.form-field--label {
@apply block text-sm font-medium leading-6 text-gray-900 dark:text-gray-300;
@apply block text-sm leading-6 font-medium text-gray-900 dark:text-gray-300;
}

.input--outer {
@apply relative mt-2;
}

.input {
@apply block w-full min-w-0 flex-1 rounded-md border-gray-300 placeholder:text-gray-400 focus:border-transparent focus:outline-transparent focus:ring-2 focus:ring-inset focus:ring-blue-800 dark:border-slate-700 dark:bg-slate-700 dark:text-gray-100 dark:focus:bg-slate-700 dark:focus:ring-blue-700 sm:text-sm;
@apply block w-full min-w-0 flex-1 rounded-md border-gray-300 placeholder:text-gray-400 focus:border-transparent focus:ring-2 focus:ring-blue-800 focus:outline-transparent focus:ring-inset sm:text-sm dark:border-slate-700 dark:bg-slate-700 dark:text-gray-100 dark:focus:bg-slate-700 dark:focus:ring-blue-700;
}

.dashboard {
Expand Down
6 changes: 3 additions & 3 deletions src/components/AccountForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const AccountForm = ({ budget, type }: Props) => {
<>
<div className="relative col-span-full flex items-start">
<div
className="col-span-2 mt-px flex justify-end pr-2 pt-2 sm:block"
className="col-span-2 mt-px flex justify-end pt-2 pr-2 sm:block"
onClick={e => {
e.preventDefault()
updateValue('onBudget', !account.onBudget)
Expand All @@ -146,15 +146,15 @@ const AccountForm = ({ budget, type }: Props) => {
account.onBudget
? 'bg-lime-600 dark:bg-lime-500'
: 'bg-gray-200 dark:bg-slate-700'
} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2`}
} relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus-within:ring-2 focus-within:ring-offset-2 focus-within:outline-hidden`}
>
<span
aria-hidden="true"
className={`${
account?.onBudget
? 'translate-x-5'
: 'translate-x-0'
} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out`}
} pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out`}
></span>
<input
type="checkbox"
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountListSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const AccountListSwitch = ({ selected }: Props) => {
const { t }: Translation = useTranslation()

return (
<div className="card mb-6 flex p-1 shadow-sm dark:text-gray-100">
<div className="card mb-6 flex p-1 shadow-xs dark:text-gray-100">
<Link to="/own-accounts" className={tabClasses(selected === 'internal')}>
{t('accounts.internalAccounts')}
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AllocationInputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const AllocationInputs = ({
>
<InputCurrency currency={budget.currency} />
</FormField>
<p className="text-sm uppercase text-gray-500 dark:text-gray-400">
<p className="text-sm text-gray-500 uppercase dark:text-gray-400">
{' '}
– {t('or')} –{' '}
</p>
Expand Down
12 changes: 6 additions & 6 deletions src/components/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@ const Autocomplete = <T extends ArchivableResource>({
placeholder={t('select')}
autoComplete="off"
/>
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none">
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-hidden">
<ChevronUpDownIcon
className="h-5 w-5 text-gray-400"
aria-hidden="true"
/>
</Combobox.Button>

<Combobox.Options className="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-slate-800 sm:text-sm">
<Combobox.Options className="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black focus:outline-hidden sm:text-sm dark:bg-slate-800">
{emptyOption && query.length === 0 ? (
<Combobox.Option
value={null}
className={({ active }) =>
classNames(
'relative cursor-default select-none py-2 pl-3 pr-9',
'relative cursor-default py-2 pr-9 pl-3 select-none',
active
? 'bg-sky-600 text-white'
: 'text-gray-900 dark:text-gray-300'
Expand All @@ -117,7 +117,7 @@ const Autocomplete = <T extends ArchivableResource>({
{filteredGroups.map((group, i) => (
<div key={i}>
{filteredGroups.length > 1 ? (
<div className="relative bg-gray-200 py-2 pl-3 pr-9 text-gray-800 dark:bg-slate-700 dark:text-gray-200">
<div className="relative bg-gray-200 py-2 pr-9 pl-3 text-gray-800 dark:bg-slate-700 dark:text-gray-200">
{group.title}
</div>
) : null}
Expand All @@ -128,7 +128,7 @@ const Autocomplete = <T extends ArchivableResource>({
value={item}
className={({ active }) =>
classNames(
'relative cursor-default select-none py-2 pl-3 pr-9',
'relative cursor-default py-2 pr-9 pl-3 select-none',
active
? 'bg-sky-600 text-white'
: 'text-gray-900 dark:text-gray-300'
Expand Down Expand Up @@ -179,7 +179,7 @@ const Autocomplete = <T extends ArchivableResource>({
value={{ name: query }}
className={({ active }) =>
classNames(
'relative cursor-default select-none border-t py-2 pl-3 pr-9 dark:border-gray-900',
'relative cursor-default border-t py-2 pr-9 pl-3 select-none dark:border-gray-900',
active
? 'bg-sky-600 text-white'
: 'text-gray-900 dark:text-gray-300'
Expand Down
2 changes: 1 addition & 1 deletion src/components/BudgetSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const BudgetSwitch = (props: BudgetSwitchProps) => {
)}
</div>
<Link
className="flex-shrink-0"
className="shrink-0"
to={`/budgets/${budget.id}`}
title={t('edit')}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CategoryEnvelopes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const CategoryEnvelopes = ({
/>
) : null}
</span>
<ChevronRightIcon className="mr-3 h-6 flex-shrink-0" />
<ChevronRightIcon className="mr-3 h-6 shrink-0" />
</Link>
))}
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/CategoryMonth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CategoryMonth = ({
<th
colSpan={4}
scope="colgroup"
className="text-ellipsis px-4 py-2 text-left text-sm font-bold text-gray-900 dark:text-gray-300 sm:px-6"
className="px-4 py-2 text-left text-sm font-bold text-ellipsis text-gray-900 sm:px-6 dark:text-gray-300"
>
<span
className={`flex items-center ${!category.name ? 'italic' : ''}`}
Expand Down Expand Up @@ -85,13 +85,13 @@ const CategoryMonth = ({
))
) : (
<tr className="cursor-pointer bg-gray-50 dark:bg-slate-700">
<td className="overflow-hidden text-ellipsis whitespace-nowrap pb-2 pl-10 pr-1 text-sm font-medium italic text-gray-500 dark:text-gray-400 sm:pl-12">
<td className="overflow-hidden pr-1 pb-2 pl-10 text-sm font-medium text-ellipsis whitespace-nowrap text-gray-500 italic sm:pl-12 dark:text-gray-400">
{t('envelopes.envelopesWithCount', {
count: envelopes.length,
})}
</td>
<td
className={`hidden whitespace-nowrap px-1 pb-2 text-right text-sm md:table-cell ${
className={`hidden px-1 pb-2 text-right text-sm whitespace-nowrap md:table-cell ${
Number(allocation) < 0
? 'negative'
: 'text-gray-500 dark:text-gray-400'
Expand All @@ -102,7 +102,7 @@ const CategoryMonth = ({
})}
</td>
<td
className={`hidden whitespace-nowrap px-1 pb-2 text-right text-sm md:table-cell ${
className={`hidden px-1 pb-2 text-right text-sm whitespace-nowrap md:table-cell ${
Number(spent) > 0
? 'positive'
: 'text-gray-500 dark:text-gray-400'
Expand All @@ -111,7 +111,7 @@ const CategoryMonth = ({
{formatMoney(spent, budget.currency)}
</td>
<td
className={`whitespace-nowrap pb-2 pl-1 pr-4 text-right text-sm sm:pr-6 ${
className={`pr-4 pb-2 pl-1 text-right text-sm whitespace-nowrap sm:pr-6 ${
Number(balance) < 0
? 'negative'
: 'text-gray-500 dark:text-gray-400'
Expand Down
18 changes: 9 additions & 9 deletions src/components/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const Dashboard = ({ budget }: DashboardProps) => {
<Error error={error} />
<div className="card my-4 w-full p-0 text-center text-gray-500 md:mb-8">
<div className="py-4 md:py-8">
<div className="font-medium uppercase text-gray-500 dark:text-gray-400">
<div className="font-medium text-gray-500 uppercase dark:text-gray-400">
{t('dashboard.available')}
</div>
<div
Expand All @@ -94,27 +94,27 @@ const Dashboard = ({ budget }: DashboardProps) => {
<div className="card -mx-4 -my-2 px-0 py-2 sm:-mx-6 lg:-mx-8">
<div className="inline-block w-full align-middle">
<table className="w-full table-fixed">
<thead className="bg-white uppercase dark:bg-slate-800 md:sticky md:top-0">
<thead className="bg-white uppercase md:sticky md:top-0 dark:bg-slate-800">
<tr>
<th
scope="col"
className="w-2/3 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-300 sm:pl-6 md:w-1/2"
className="w-2/3 py-3.5 pr-3 pl-4 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:w-1/2 dark:text-gray-300"
></th>
<th
scope="col"
className="hidden w-1/6 px-3 pt-3.5 text-right text-sm font-semibold text-gray-900 dark:text-gray-300 md:table-cell"
className="hidden w-1/6 px-3 pt-3.5 text-right text-sm font-semibold text-gray-900 md:table-cell dark:text-gray-300"
>
{t('dashboard.allocation')}
</th>
<th
scope="col"
className="hidden w-1/6 px-3 pt-3.5 text-right text-sm font-semibold text-gray-900 dark:text-gray-300 md:table-cell"
className="hidden w-1/6 px-3 pt-3.5 text-right text-sm font-semibold text-gray-900 md:table-cell dark:text-gray-300"
>
{t('dashboard.spent')}
</th>
<th
scope="col"
className="w-1/3 pl-3 pr-4 pt-3.5 text-right text-sm font-semibold text-gray-900 dark:text-gray-300 sm:pr-6 md:w-1/6"
className="w-1/3 pt-3.5 pr-4 pl-3 text-right text-sm font-semibold text-gray-900 sm:pr-6 md:w-1/6 dark:text-gray-300"
>
{t('dashboard.balance')}
</th>
Expand All @@ -124,7 +124,7 @@ const Dashboard = ({ budget }: DashboardProps) => {
<tr>
<td></td>
<td
className={`hidden whitespace-nowrap px-3 pb-3 text-right text-sm font-semibold md:table-cell ${
className={`hidden px-3 pb-3 text-right text-sm font-semibold whitespace-nowrap md:table-cell ${
Number(budgetMonth.allocation) < 0
? 'negative'
: 'text-gray-500 dark:text-gray-400'
Expand All @@ -139,7 +139,7 @@ const Dashboard = ({ budget }: DashboardProps) => {
)}
</td>
<td
className={`hidden whitespace-nowrap px-3 pb-3 text-right text-sm font-semibold md:table-cell ${
className={`hidden px-3 pb-3 text-right text-sm font-semibold whitespace-nowrap md:table-cell ${
Number(budgetMonth.spent) > 0
? 'positive'
: 'text-gray-500 dark:text-gray-400'
Expand All @@ -148,7 +148,7 @@ const Dashboard = ({ budget }: DashboardProps) => {
{formatMoney(budgetMonth.spent, budget.currency)}
</td>
<td
className={`whitespace-nowrap pb-3 pl-3 pr-4 text-right text-sm font-semibold sm:pr-6 ${
className={`pr-4 pb-3 pl-3 text-right text-sm font-semibold whitespace-nowrap sm:pr-6 ${
Number(budgetMonth.balance) < 0
? 'negative'
: 'text-gray-500 dark:text-gray-400'
Expand Down
2 changes: 1 addition & 1 deletion src/components/EnvelopeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const EnvelopeForm = ({ budget }: Props) => {
</Link>
)}
<div className="card">
<FormFields className="grid-cols-2 gap-x-4 space-y-6 md:grid md:gap-y-6 md:space-y-0">
<FormFields className="grid-cols-2 space-y-6 gap-x-4 md:grid md:space-y-0 md:gap-y-6">
<FormField
type="text"
name="name"
Expand Down
Loading
Loading