diff --git a/app/assets/tailwind/sure-design-system/_generated.css b/app/assets/tailwind/sure-design-system/_generated.css index 79ae54d43..355025e3b 100644 --- a/app/assets/tailwind/sure-design-system/_generated.css +++ b/app/assets/tailwind/sure-design-system/_generated.css @@ -25,7 +25,7 @@ --color-container-inset: var(--color-gray-50); --color-container-inset-hover: var(--color-gray-100); --color-nav-indicator: var(--color-black); - --color-toggle-track: var(--color-gray-100); + --color-toggle-track: var(--color-gray-300); --color-destructive-subtle: var(--color-red-200); --color-gray-25: #FAFAFA; --color-gray-50: #F7F7F7; @@ -294,7 +294,7 @@ @apply text-gray-400; @variant theme-dark { - @apply text-gray-500; + @apply text-gray-400; } } @@ -342,7 +342,7 @@ @apply border-alpha-black-300; @variant theme-dark { - @apply border-alpha-white-400; + @apply border-alpha-white-500; } } @@ -350,7 +350,7 @@ @apply border-alpha-black-200; @variant theme-dark { - @apply border-alpha-white-300; + @apply border-alpha-white-400; } } @@ -362,7 +362,7 @@ @apply border-alpha-black-50; @variant theme-dark { - @apply border-alpha-white-100; + @apply border-alpha-white-200; } } @@ -375,7 +375,7 @@ } @utility border-destructive { - @apply border-red-500; + @apply border-red-600; @variant theme-dark { @apply border-red-400; @@ -447,7 +447,7 @@ } @utility button-bg-destructive { - @apply bg-red-500; + @apply bg-red-600; @variant theme-dark { @apply bg-red-400; @@ -455,7 +455,7 @@ } @utility button-bg-destructive-hover { - @apply bg-red-600; + @apply bg-red-700; @variant theme-dark { @apply bg-red-500; diff --git a/app/assets/tailwind/sure-design-system/components.css b/app/assets/tailwind/sure-design-system/components.css index 7d814388f..21a133c06 100644 --- a/app/assets/tailwind/sure-design-system/components.css +++ b/app/assets/tailwind/sure-design-system/components.css @@ -109,18 +109,27 @@ @variant theme-dark { &[type='checkbox'] { - @apply ring-gray-900 checked:text-white; - background-color: var(--color-gray-100); + @apply ring-gray-900 border-alpha-white-300; + background-color: transparent; } &[type='checkbox']:disabled { - @apply cursor-not-allowed opacity-80; - background-color: var(--color-gray-600); + @apply cursor-not-allowed opacity-80 border-transparent; + background-color: var(--color-gray-700); + } + + &[type='checkbox']:checked, + &[type='checkbox']:indeterminate { + @apply border-transparent; + background-color: var(--color-gray-100); } &[type='checkbox']:checked { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23808080' 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-100); + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23171717' 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"); + } + + &[type='checkbox']:indeterminate { + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23171717' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='3.5' y='7' width='9' height='2' rx='1'/%3e%3c/svg%3e"); } } } diff --git a/app/components/DS/buttonish.rb b/app/components/DS/buttonish.rb index d7fa580a6..653151f95 100644 --- a/app/components/DS/buttonish.rb +++ b/app/components/DS/buttonish.rb @@ -9,7 +9,7 @@ class DS::Buttonish < DesignSystemComponent icon_classes: "text-primary" }, destructive: { - container_classes: "text-inverse bg-red-500 theme-dark:bg-red-400 hover:bg-red-600 theme-dark:hover:bg-red-500 disabled:bg-red-200 theme-dark:disabled:bg-red-600", + container_classes: "text-inverse bg-red-600 theme-dark:bg-red-400 hover:bg-red-700 theme-dark:hover:bg-red-500 disabled:bg-red-200 theme-dark:disabled:bg-red-600", icon_classes: "text-inverse" }, outline: { diff --git a/app/components/DS/pill.rb b/app/components/DS/pill.rb index b04ef61d6..c45bf056c 100644 --- a/app/components/DS/pill.rb +++ b/app/components/DS/pill.rb @@ -93,8 +93,13 @@ class DS::Pill < DesignSystemComponent p = palette case style when :filled + # Filled = solid / high-emphasis. The tone-500 fill fails white-label AA on + # the brighter tones (amber 2.4:1, green 2.6:1, red 4.0:1) and glares on dark + # surfaces. Deepen to tone-700 — every `fill` is a `*-500`, so derive -700 — + # so the white label clears AA on every tone in both themes. + strong_fill = p[:fill].sub("-500)", "-700)") <<~CSS.strip.gsub(/\s+/, " ") - background-color: #{p[:fill]}; + background-color: #{strong_fill}; color: var(--color-white); border-color: transparent; CSS diff --git a/app/components/DS/toggle.rb b/app/components/DS/toggle.rb index e45b69051..b1a47da4a 100644 --- a/app/components/DS/toggle.rb +++ b/app/components/DS/toggle.rb @@ -24,7 +24,7 @@ class DS::Toggle < DesignSystemComponent # `prefers-reduced-motion`; reduced-motion users get a snap. "motion-safe:transition-colors motion-safe:duration-300", "after:content-[''] after:block after:bg-white after:absolute after:rounded-full", - "after:top-0.5 after:left-0.5 after:w-4 after:h-4", + "after:top-0.5 after:left-0.5 after:w-4 after:h-4 after:shadow-sm", "motion-safe:after:transition-transform motion-safe:after:duration-300 motion-safe:after:ease-in-out", "peer-checked:bg-success peer-checked:after:translate-x-4", # Focus ring driven from the sr-only input via `peer-focus-visible:`. diff --git a/app/views/budget_categories/_budget_category.html.erb b/app/views/budget_categories/_budget_category.html.erb index 6b55b971e..647f2e91b 100644 --- a/app/views/budget_categories/_budget_category.html.erb +++ b/app/views/budget_categories/_budget_category.html.erb @@ -38,7 +38,7 @@ <%# Progress Bar %>