diff --git a/app/assets/tailwind/maybe-design-system.css b/app/assets/tailwind/maybe-design-system.css index 72e52292..fc7a67ac 100644 --- a/app/assets/tailwind/maybe-design-system.css +++ b/app/assets/tailwind/maybe-design-system.css @@ -498,14 +498,15 @@ details>summary::-webkit-details-marker { @apply hidden; } - + details>summary { @apply list-none; } input[type='radio'] { - @apply border-gray-300 text-indigo-600 focus:ring-indigo-600; /* Default light mode */ - + @apply border-gray-300 text-indigo-600 focus:ring-indigo-600; + /* Default light mode */ + @variant theme-dark { /* Dark mode radio button base and checked styles */ @apply border-gray-600 bg-gray-700 checked:bg-blue-500 focus:ring-blue-500 focus:ring-offset-gray-800; @@ -531,32 +532,49 @@ @apply disabled:button-bg-disabled disabled:hover:button-bg-disabled; } } - + .btn--secondary { @apply button-bg-secondary text-primary; @apply hover:button-bg-secondary-hover; @variant theme-dark { - @apply button-bg-secondary text-white; - @apply hover:button-bg-secondary-hover; + @apply text-white; + background-color: var(--color-gray-700); + &:hover { + background-color: var(--color-gray-800); + } } } - + .btn--outline { @apply border border-alpha-black-200 text-primary disabled:button-bg-disabled disabled:hover:button-bg-disabled disabled:text-gray-400; - @apply hover:button-bg-outline-hover; + + &:hover { + background-color: var(--color-gray-100); + } @variant theme-dark { @apply border-alpha-white-300 text-white disabled:button-bg-disabled disabled:hover:button-bg-disabled disabled:text-gray-600; - @apply hover:button-bg-outline-hover; + + &:hover { + background-color: var(--color-gray-800); + } } } - + .btn--ghost { - @apply border border-transparent hover:button-bg-ghost-hover; + @apply border border-transparent text-primary; + + &:hover { + background-color: var(--color-gray-100) + } @variant theme-dark { - @apply hover:fg-inverse hover:button-bg-ghost-hover; + @apply fg-primary; + + &:hover { + background-color: var(--color-gray-900); + } } } @@ -581,7 +599,7 @@ @apply flex flex-col gap-1 relative px-3 py-2 rounded-md border bg-container border-secondary shadow-xs w-full; @apply focus-within:border-secondary focus-within:shadow-none focus-within:ring-4 focus-within:ring-alpha-black-200; @apply transition-all duration-300; - + @variant theme-dark { @apply focus-within:ring-alpha-white-300; } @@ -589,22 +607,22 @@ /* Add styles for multiple select within form fields */ select[multiple] { @apply py-2 pr-2 space-y-0.5 overflow-y-auto; - + option { @apply py-2 rounded-md; } - + option:checked { @apply after:content-['\2713'] bg-container-inset after:text-gray-500 after:ml-2; } - + option:active, option:focus { @apply bg-container-inset; } } } - + .form-field__label { @apply block text-xs text-secondary peer-disabled:text-subdued; } @@ -616,16 +634,26 @@ @apply disabled:text-subdued; @apply text-ellipsis overflow-hidden whitespace-nowrap; @apply transition-opacity duration-300; - + @apply placeholder:text-subdued; + &select { @apply pr-8; } + + @variant theme-dark { + &::-webkit-calendar-picker-indicator { + filter: invert(1); + cursor: pointer; + } + } + + } - + .form-field__radio { @apply text-primary; } - + .form-field__submit { @apply cursor-pointer rounded-lg bg-surface p-3 text-center text-white hover:bg-surface-hover; } @@ -642,21 +670,37 @@ &[type='checkbox'] { @apply border-alpha-black-200 checked:bg-gray-900 checked:ring-gray-900 focus:ring-gray-900 focus-visible:ring-gray-900 checked:hover:bg-gray-500; } - + &[type='checkbox']:disabled { @apply cursor-not-allowed opacity-80 bg-gray-50 border-gray-200 checked:bg-gray-400 checked:ring-gray-400; } - } + + @variant theme-dark { + &[type='checkbox'] { + @apply ring-gray-900 checked:text-white; + background-color: var(--color-gray-600); + } + &[type='checkbox']:disabled { + @apply cursor-not-allowed opacity-80 ring-gray-600; + } + + &[type='checkbox']:checked { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); + background-color: var(--color-gray-600); + } + } + } + .checkbox--dark { &[type='checkbox'] { @apply ring-gray-900 checked:text-white; } - + &[type='checkbox']:disabled { @apply cursor-not-allowed opacity-80 ring-gray-600; } - + &[type='checkbox']:checked { background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='111827' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); } @@ -669,35 +713,52 @@ @apply after:transition-transform after:duration-300 after:ease-in-out; @apply peer-checked:bg-green-600 peer-checked:after:translate-x-4; @apply transition-colors duration-300; + + @variant theme-dark { + background-color: var(--color-gray-700); + } } /* Tooltips */ .tooltip { @apply hidden absolute; } + + .qrcode svg path { + fill: var(--color-black); + @variant theme-dark { + fill: var(--color-white); + } + + } } @layer utilities { + /* Specific override for strong tags in prose under dark mode */ .prose:where([data-theme=dark], [data-theme=dark] *) strong { - color: theme(colors.white) !important; + color: theme(colors.white) !important; } } /* Button Backgrounds */ @utility button-bg-primary { - @apply bg-gray-900; /* Maps to fg-primary light */ + @apply bg-gray-900; + /* Maps to fg-primary light */ @variant theme-dark { - @apply bg-white; /* Maps to fg-primary dark */ + @apply bg-white; + /* Maps to fg-primary dark */ } } @utility button-bg-primary-hover { - @apply bg-gray-800; /* Maps to fg-primary-variant light */ + @apply bg-gray-800; + /* Maps to fg-primary-variant light */ @variant theme-dark { - @apply bg-gray-50; /* Maps to fg-primary-variant dark */ + @apply bg-gray-50; + /* Maps to fg-primary-variant dark */ } } @@ -788,4 +849,4 @@ @variant theme-dark { @apply bg-white; } -} \ No newline at end of file +} diff --git a/app/helpers/forms_helper.rb b/app/helpers/forms_helper.rb index 53336757..52b3bb5f 100644 --- a/app/helpers/forms_helper.rb +++ b/app/helpers/forms_helper.rb @@ -30,7 +30,7 @@ end private def radio_tab_contents(label:, icon:, class: nil) - tag.div(class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm md:text-normal text-subdued group-has-checked:bg-container group-has-checked:text-gray-800 group-has-checked:shadow-sm") do + tag.div(class: "flex px-4 py-1 rounded-lg items-center space-x-2 justify-center text-sm md:text-normal text-subdued group-has-checked:bg-surface group-has-checked:text-primary group-has-checked:shadow-sm") do concat lucide_icon(icon, class: "w-5 h-5") concat tag.span(label, class: "group-has-checked:font-semibold") end diff --git a/app/views/accounts/_account_type.html.erb b/app/views/accounts/_account_type.html.erb index 4ff07990..63622859 100644 --- a/app/views/accounts/_account_type.html.erb +++ b/app/views/accounts/_account_type.html.erb @@ -1,7 +1,7 @@ <%# locals: (accountable:) %> <%= link_to new_polymorphic_path(accountable, step: "method_select", return_to: params[:return_to]), - class: "flex items-center gap-4 w-full text-center focus:outline-hidden focus:bg-alpha-black-25 hover:bg-alpha-black-25 border border-transparent block px-2 rounded-lg p-2" do %> + class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-contrast hover:fg-primary focus:fg-primary border border-transparent block px-2 rounded-lg p-2" do %> <%= lucide_icon(accountable.icon, style: "color: #{accountable.color}", class: "w-5 h-5") %> diff --git a/app/views/accounts/index.html.erb b/app/views/accounts/index.html.erb index d8c9b821..fcdca138 100644 --- a/app/views/accounts/index.html.erb +++ b/app/views/accounts/index.html.erb @@ -15,7 +15,7 @@ class: "btn btn--primary flex items-center justify-center gap-1 w-9 h-9 md:w-auto md:h-auto rounded-full md:rounded-lg" do %>
- <%= lucide_icon("plus")%> + <%= lucide_icon("plus") %>
<% end %> diff --git a/app/views/accounts/new.html.erb b/app/views/accounts/new.html.erb index bd9b9d1f..0bde1bd8 100644 --- a/app/views/accounts/new.html.erb +++ b/app/views/accounts/new.html.erb @@ -24,7 +24,7 @@ <% unless params[:return_to].present? %> <%= button_to imports_path(import: { type: "AccountImport" }), data: { turbo_frame: :_top }, - class: "flex items-center gap-4 w-full text-center focus:outline-hidden focus:bg-alpha-black-25 hover:bg-alpha-black-25 border border-transparent block px-2 rounded-lg p-2" do %> + class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-contrast hover:fg-primary focus:fg-primary border border-transparent block px-2 rounded-lg p-2" do %> <%= lucide_icon("download", style: "color: #F79009", class: "w-5 h-5") %> diff --git a/app/views/accounts/new/_container.html.erb b/app/views/accounts/new/_container.html.erb index 892e1a3b..d83d2e8c 100644 --- a/app/views/accounts/new/_container.html.erb +++ b/app/views/accounts/new/_container.html.erb @@ -15,7 +15,7 @@ -
+
diff --git a/app/views/accounts/new/_method_selector.html.erb b/app/views/accounts/new/_method_selector.html.erb index e4115d9e..07a70074 100644 --- a/app/views/accounts/new/_method_selector.html.erb +++ b/app/views/accounts/new/_method_selector.html.erb @@ -2,7 +2,7 @@ <%= render layout: "accounts/new/container", locals: { title: t(".title"), back_path: new_account_path } do %>
- <%= link_to path, class: "flex items-center gap-4 w-full text-center focus:outline-hidden focus:bg-gray-50 border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-gray-50 rounded-lg p-2" do %> + <%= link_to path, class: "flex items-center gap-4 w-full text-center focus:outline-hidden focus:bg-surface border border-transparent focus:border focus:border-gray-200 px-2 hover:bg-surface rounded-lg p-2" do %> <%= lucide_icon("keyboard", class: "text-secondary w-5 h-5") %> diff --git a/app/views/accounts/show/_activity.html.erb b/app/views/accounts/show/_activity.html.erb index 50687519..3e9805bc 100644 --- a/app/views/accounts/show/_activity.html.erb +++ b/app/views/accounts/show/_activity.html.erb @@ -37,7 +37,7 @@ data: { controller: "auto-submit-form" } do |form| %>
-
+
<%= lucide_icon("search", class: "w-5 h-5 text-secondary") %> <%= hidden_field_tag :account_id, @account.id %> <%= form.search_field :search, diff --git a/app/views/budgets/_actuals_summary.html.erb b/app/views/budgets/_actuals_summary.html.erb index 40da0743..784f2020 100644 --- a/app/views/budgets/_actuals_summary.html.erb +++ b/app/views/budgets/_actuals_summary.html.erb @@ -1,7 +1,7 @@ <%# locals: (budget:) %>
-
+

Income

diff --git a/app/views/budgets/_budget_nav.html.erb b/app/views/budgets/_budget_nav.html.erb index 559d1a51..5ad87caa 100644 --- a/app/views/budgets/_budget_nav.html.erb +++ b/app/views/budgets/_budget_nav.html.erb @@ -16,7 +16,7 @@ step[:is_complete] ? "text-green-600" : "text-secondary" end %> <% step_class = if is_current - "bg-primary text-white" + "bg-primary text-primary" else step[:is_complete] ? "bg-green-600/10 border-alpha-black-25" : "bg-container-inset" end %> @@ -31,7 +31,7 @@
<% end %> -
+
<% end %> diff --git a/app/views/budgets/_budgeted_summary.html.erb b/app/views/budgets/_budgeted_summary.html.erb index ce55db5d..41400860 100644 --- a/app/views/budgets/_budgeted_summary.html.erb +++ b/app/views/budgets/_budgeted_summary.html.erb @@ -1,7 +1,7 @@ <%# locals: (budget:) %>
-
+

Expected income

diff --git a/app/views/categories/_form.html.erb b/app/views/categories/_form.html.erb index 1fb8c237..54605e1b 100644 --- a/app/views/categories/_form.html.erb +++ b/app/views/categories/_form.html.erb @@ -30,7 +30,7 @@ diff --git a/app/views/layouts/auth.html.erb b/app/views/layouts/auth.html.erb index 85adc63a..42930812 100644 --- a/app/views/layouts/auth.html.erb +++ b/app/views/layouts/auth.html.erb @@ -13,11 +13,11 @@ <% if (controller_name == "sessions" && action_name == "new") || (controller_name == "registrations" && action_name == "new") %>
- <%= link_to new_session_path, + <%= link_to new_session_path, class: "w-1/2 px-2 py-1 rounded-md text-sm text-center font-medium #{current_page?(new_session_path) ? 'bg-surface shadow-sm text-primary' : 'text-secondary'}" do %> <%= t("layouts.auth.sign_in") %> <% end %> - <%= link_to new_registration_path, + <%= link_to new_registration_path, class: "w-1/2 px-2 py-1 rounded-md text-sm text-center font-medium #{!current_page?(new_session_path) ? 'bg-surface shadow-sm text-primary' : 'text-secondary'}" do %> <%= t("layouts.auth.sign_up") %> <% end %> diff --git a/app/views/layouts/imports.html.erb b/app/views/layouts/imports.html.erb index c8b63348..8acf9c6c 100644 --- a/app/views/layouts/imports.html.erb +++ b/app/views/layouts/imports.html.erb @@ -1,5 +1,5 @@ <%= render "layouts/shared/htmldoc" do %> -
+
<%= link_to content_for(:previous_path) || imports_path do %> <%= lucide_icon "arrow-left", class: "w-5 h-5 text-secondary" %> diff --git a/app/views/layouts/shared/_head.html.erb b/app/views/layouts/shared/_head.html.erb index 2d0ee351..c3b74447 100644 --- a/app/views/layouts/shared/_head.html.erb +++ b/app/views/layouts/shared/_head.html.erb @@ -12,7 +12,7 @@ <%= javascript_importmap_tags %> <%= turbo_refreshes_with method: :morph, scroll: :preserve %> - + diff --git a/app/views/layouts/wizard.html.erb b/app/views/layouts/wizard.html.erb index d5a652f6..a188fe60 100644 --- a/app/views/layouts/wizard.html.erb +++ b/app/views/layouts/wizard.html.erb @@ -1,5 +1,5 @@ <%= render "layouts/shared/htmldoc" do %> -
+
<%= link_to content_for(:previous_path) || root_path do %> <%= lucide_icon "arrow-left", class: "w-5 h-5 text-secondary" %> diff --git a/app/views/messages/_chat_form.html.erb b/app/views/messages/_chat_form.html.erb index f2a36b63..10c35e5a 100644 --- a/app/views/messages/_chat_form.html.erb +++ b/app/views/messages/_chat_form.html.erb @@ -32,4 +32,4 @@ <% end %>

AI responses are informational only and are not financial advice.

-
\ No newline at end of file +
diff --git a/app/views/mfa/new.html.erb b/app/views/mfa/new.html.erb index fdf753c0..0726bf1b 100644 --- a/app/views/mfa/new.html.erb +++ b/app/views/mfa/new.html.erb @@ -11,7 +11,7 @@

<%= t(".page_title") %>

<%= settings_section title: t(".scan_title"), subtitle: t(".scan_description") do %>
-
+
<%= generate_mfa_qr_code(Current.user.provisioning_uri) %>
@@ -26,7 +26,7 @@ readonly autocomplete="off" value="<%= Current.user.otp_secret %>" - class="text-sm bg-gray-50 px-2 py-1 rounded border border-gray-200 w-96 font-mono"> + class="text-sm bg-container px-2 py-1 rounded border border-secondary w-96 font-mono">
- +
- +
<%= lucide_icon "check", class: "w-4 h-4" %> @@ -90,8 +90,6 @@
- - <%= form.submit t(".submit") %> <% end %> diff --git a/app/views/rule/actions/_action.html.erb b/app/views/rule/actions/_action.html.erb index 359eec33..84bc8b1c 100644 --- a/app/views/rule/actions/_action.html.erb +++ b/app/views/rule/actions/_action.html.erb @@ -12,7 +12,7 @@ <%= form.select :action_type, rule.action_executors.map { |executor| [ executor.label, executor.key ] }, {}, data: { action: "rule--actions#handleActionTypeChange" } %>
- <%= tag.div class: class_names("min-w-1/2 flex items-center gap-2", "hidden" => !needs_value), + <%= tag.div class: class_names("min-w-1/2 flex items-center gap-2", "hidden" => !needs_value), data: { rule__actions_target: "actionValue" } do %> to <%= form.select :value, action.options || [], {}, disabled: !needs_value %> diff --git a/app/views/rule/conditions/_condition_group.html.erb b/app/views/rule/conditions/_condition_group.html.erb index 3da50432..e00df533 100644 --- a/app/views/rule/conditions/_condition_group.html.erb +++ b/app/views/rule/conditions/_condition_group.html.erb @@ -3,7 +3,7 @@ <% condition = form.object %> <% rule = condition.rule %> -
  • +
  • <%= form.hidden_field :condition_type, value: "compound" %> diff --git a/app/views/rules/_category_rule_cta.html.erb b/app/views/rules/_category_rule_cta.html.erb index 2035a4f0..54f2b752 100644 --- a/app/views/rules/_category_rule_cta.html.erb +++ b/app/views/rules/_category_rule_cta.html.erb @@ -17,4 +17,4 @@ <%= tag.a "Create rule", href: new_rule_path(resource_type: "transaction", action_type: "set_transaction_category", action_value: cta[:category_id]), class: "btn btn--primary", data: { turbo_frame: "modal" } %> <% end %> <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/rules/_form.html.erb b/app/views/rules/_form.html.erb index ce0aaf3a..5a03eff6 100644 --- a/app/views/rules/_form.html.erb +++ b/app/views/rules/_form.html.erb @@ -10,7 +10,7 @@ <% end %>
    -

    If <%= rule.resource_type %>

    +

    If <%= rule.resource_type %>

    <%# Condition template, used by Stimulus controller to add new conditions dynamically %>