Add dark mode with CSS custom property theme system

Define 13 semantic color tokens (surface, text, border, hover) with
light/dark values in themes.css. Register with Tailwind via @theme inline.
Migrate all 335 Vue files from hardcoded gray/white classes to semantic
tokens. Add theme toggle (sun/moon/system) in user avatar dropdown.
Replace @tailwindcss/forms with custom form reset using theme vars.
Add status badge and alert tokens for dark mode. Theme-aware chart
grid/labels, skeleton placeholders, and editor. Inline script in
<head> prevents flash of wrong theme on load.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Darko Gjorgjijoski
2026-04-04 02:05:00 +02:00
parent 7fbe3d85a3
commit 88adfe0e50
221 changed files with 1265 additions and 982 deletions

View File

@@ -1,4 +1,5 @@
<template>
<div class="rounded-xl border border-line-light shadow overflow-hidden bg-surface">
<!-- Tax Included -->
<div
v-if="companyStore.selectedCompanySettings.tax_included === 'YES'"
@@ -9,10 +10,10 @@
w-full
px-6
text-base
border border-b-0 border-gray-200 border-solid
border-b border-line-light
cursor-pointer
text-primary-400
bg-white
bg-surface
"
>
<BaseSwitchSection
@@ -33,7 +34,7 @@
/>
<col style="width: 15%; min-width: 120px" />
</colgroup>
<thead class="bg-white border border-gray-200 border-solid">
<thead class="bg-surface-secondary border-b border-line-light">
<tr>
<th
class="
@@ -43,8 +44,8 @@
not-italic
font-medium
leading-5
text-left text-gray-700
border-t border-b border-gray-200 border-solid
text-left text-body
"
>
<BaseContentPlaceholders v-if="isLoading">
@@ -62,8 +63,8 @@
not-italic
font-medium
leading-5
text-right text-gray-700
border-t border-b border-gray-200 border-solid
text-right text-body
"
>
<BaseContentPlaceholders v-if="isLoading">
@@ -81,8 +82,8 @@
not-italic
font-medium
leading-5
text-left text-gray-700
border-t border-b border-gray-200 border-solid
text-left text-body
"
>
<BaseContentPlaceholders v-if="isLoading">
@@ -101,8 +102,8 @@
not-italic
font-medium
leading-5
text-left text-gray-700
border-t border-b border-gray-200 border-solid
text-left text-body
"
>
<BaseContentPlaceholders v-if="isLoading">
@@ -120,8 +121,8 @@
not-italic
font-medium
leading-5
text-right text-gray-700
border-t border-b border-gray-200 border-solid
text-right text-body
"
>
<BaseContentPlaceholders v-if="isLoading">
@@ -164,7 +165,7 @@
px-6
py-3
text-base
border border-t-0 border-gray-200 border-solid
border-t border-line-light
cursor-pointer
text-primary-400
hover:bg-primary-100
@@ -174,6 +175,7 @@
<BaseIcon name="PlusCircleIcon" class="mr-2" />
{{ $t('general.add_new_item') }}
</div>
</div><!-- end rounded wrapper -->
</template>
<script setup>