diff --git a/app/assets/tailwind/sure-design-system/_generated.css b/app/assets/tailwind/sure-design-system/_generated.css index bb473b187..dc4e8f855 100644 --- a/app/assets/tailwind/sure-design-system/_generated.css +++ b/app/assets/tailwind/sure-design-system/_generated.css @@ -302,70 +302,6 @@ @apply bg-surface-inset animate-pulse; } -@utility fg-gray { - @apply text-gray-500; - - @variant theme-dark { - @apply text-gray-400; - } -} - -@utility fg-contrast { - @apply text-gray-400; - - @variant theme-dark { - @apply text-gray-500; - } -} - -@utility fg-inverse { - @apply text-white; - - @variant theme-dark { - @apply text-gray-900; - } -} - -@utility fg-primary { - @apply text-gray-900; - - @variant theme-dark { - @apply text-white; - } -} - -@utility fg-primary-variant { - @apply text-gray-800; - - @variant theme-dark { - @apply text-gray-50; - } -} - -@utility fg-secondary { - @apply text-gray-50; - - @variant theme-dark { - @apply text-gray-400; - } -} - -@utility fg-secondary-variant { - @apply text-gray-100; - - @variant theme-dark { - @apply text-gray-500; - } -} - -@utility fg-subdued { - @apply text-gray-400; - - @variant theme-dark { - @apply text-gray-500; - } -} - @utility text-primary { @apply text-gray-900; @@ -498,6 +434,14 @@ } } +@utility border-inverse { + @apply border-alpha-white-200; + + @variant theme-dark { + @apply border-alpha-black-300; + } +} + @utility button-bg-primary { @apply bg-gray-900; @@ -558,7 +502,7 @@ @apply bg-gray-50; @variant theme-dark { - @apply bg-gray-800 fg-inverse; + @apply bg-gray-800 text-inverse; } } diff --git a/app/components/DS/buttonish.rb b/app/components/DS/buttonish.rb index 0c68d1dbe..e85169191 100644 --- a/app/components/DS/buttonish.rb +++ b/app/components/DS/buttonish.rb @@ -2,11 +2,11 @@ class DS::Buttonish < DesignSystemComponent VARIANTS = { primary: { container_classes: "text-inverse bg-inverse hover:bg-inverse-hover disabled:bg-gray-500 theme-dark:disabled:bg-gray-400", - icon_classes: "fg-inverse" + icon_classes: "text-inverse" }, secondary: { container_classes: "text-primary bg-gray-200 theme-dark:bg-gray-700 hover:bg-gray-300 theme-dark:hover:bg-gray-600 disabled:bg-gray-200 theme-dark:disabled:bg-gray-600", - icon_classes: "fg-primary" + 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", @@ -14,23 +14,23 @@ class DS::Buttonish < DesignSystemComponent }, outline: { container_classes: "text-primary border border-secondary bg-transparent hover:bg-surface-hover", - icon_classes: "fg-gray" + icon_classes: "text-secondary" }, outline_destructive: { container_classes: "text-destructive border border-secondary bg-transparent hover:bg-gray-100 theme-dark:hover:bg-gray-700", - icon_classes: "fg-gray" + icon_classes: "text-secondary" }, ghost: { container_classes: "text-primary bg-transparent hover:bg-gray-100 theme-dark:hover:bg-gray-700", - icon_classes: "fg-gray" + icon_classes: "text-secondary" }, icon: { container_classes: "hover:bg-gray-100 theme-dark:hover:bg-gray-700", - icon_classes: "fg-gray" + icon_classes: "text-secondary" }, icon_inverse: { container_classes: "bg-inverse hover:bg-inverse-hover", - icon_classes: "fg-inverse" + icon_classes: "text-inverse" } }.freeze diff --git a/app/components/DS/dialog.html.erb b/app/components/DS/dialog.html.erb index 307303970..e6892b1ce 100644 --- a/app/components/DS/dialog.html.erb +++ b/app/components/DS/dialog.html.erb @@ -1,5 +1,5 @@ <%= wrapper_element do %> - <%= tag.dialog class: "w-full h-full bg-transparent theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] #{(drawer? || responsive?) ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> + <%= tag.dialog class: "w-full h-full bg-transparent text-primary theme-dark:backdrop:bg-alpha-black-900 backdrop:bg-overlay pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] #{(drawer? || responsive?) ? "lg:p-3" : "lg:p-1"}", **merged_opts do %> <%= tag.div class: dialog_outer_classes do %> <%= tag.div class: dialog_inner_classes, data: { DS__dialog_target: "content" } do %>
<%= invitation.email %>
diff --git a/app/views/shared/_money_field.html.erb b/app/views/shared/_money_field.html.erb index c4f34f542..21c773da8 100644 --- a/app/views/shared/_money_field.html.erb +++ b/app/views/shared/_money_field.html.erb @@ -22,7 +22,7 @@<%= s[:var] %>
<% if s[:dark_raw] %> diff --git a/test/components/previews/design_tokens_preview/text.html.erb b/test/components/previews/design_tokens_preview/text.html.erb index e46d27a2e..8425e280e 100644 --- a/test/components/previews/design_tokens_preview/text.html.erb +++ b/test/components/previews/design_tokens_preview/text.html.erb @@ -3,59 +3,34 @@ meta = "text-xs text-secondary font-mono" light_ctx = "rounded p-3 bg-surface" dark_ctx = "rounded p-3 bg-gray-900" - - render_group = ->(items) { - capture do - content_tag(:div, class: "grid gap-3 grid-cols-1 lg:grid-cols-2") do - safe_join(items.map do |u| - content_tag(:div, class: card) do - safe_join([ - content_tag(:div, class: "grid grid-cols-2 gap-2") do - safe_join([ - content_tag(:div, class: light_ctx) do - content_tag(:p, "Quick brown fox", class: "text-sm font-medium #{u[:name]}") - end, - content_tag(:div, class: dark_ctx) do - content_tag(:p, "Quick brown fox", class: "text-sm font-medium #{u[:name]}") - end - ]) - end, - content_tag(:div, class: "space-y-0.5") do - safe_join([ - content_tag(:p, u[:name], class: "text-xs font-medium text-primary"), - content_tag(:p, u[:light_resolved] || u[:light_value], class: "#{meta} truncate"), - (u[:dark_value] ? content_tag(:p, "dark: #{u[:dark_resolved] || u[:dark_value]}", class: "#{meta} truncate text-subdued") : nil) - ].compact) - end - ]) - end - end) - end - end - } %> -
- Each example renders the literal class on a light and a dark surface so utilities meant for inverse contexts show their intended state.
+ text-* utilities. Each example renders the literal class on a light and a dark surface so utilities meant for inverse contexts show their intended state.
text-* (canonical, ~2,000 uses across the codebase)fg-* (legacy — prefer text-*)
- Older namespace, ~40 uses left in the codebase. Most are 1:1 duplicates of a text-* equivalent. Tracked for migration; no new code should reference these.
-
Quick brown fox
+Quick brown fox
+<%= u[:name] %>
+ + <% if u[:dark_value] %> + + <% end %> +