An open source design system that's fully customizable and agent ready
TypeScript
fix(theme-neutral): match StatusDot fills to filled Badge colors (#4047)
Ernest0121ab3e592a
diff --git a/.changeset/neutral-statusdot-badge-fills.md b/.changeset/neutral-statusdot-badge-fills.mdnew file mode 100644index 0000000000..dd13940041--- /dev/null+++ b/.changeset/neutral-statusdot-badge-fills.md@@ -0,0 +1,7 @@+---+'@astryxdesign/theme-neutral': patch+---++[fix] StatusDot now uses the same vivid fills as the filled Badge in the neutral theme. Previously the dots mapped to the dark text/icon stops (dark green, maroon, brown), which read muddy in light mode; success/warning/error/accent now match their badge counterparts so a dot and its badge share one status color.++@ernesttdiff --git a/packages/themes/neutral/src/neutralTheme.ts b/packages/themes/neutral/src/neutralTheme.tsindex c8aa5c15b1..4b95cde1f6 100644--- a/packages/themes/neutral/src/neutralTheme.ts+++ b/packages/themes/neutral/src/neutralTheme.ts@@ -39,19 +39,19 @@ import {neutralIconRegistry} from './icons';const neutralSyntax = defineSyntaxTheme({name: 'xds-neutral',tokens: {- keyword: ['#700084', '#efa8ff'], // purple T30/T80- string: ['#005600', '#a6d2a2'], // green (sat T30 / pastel T80)- comment: ['#737373', '#a3a3a3'], // neutral- number: ['#6e3500', '#ffb37f'], // orange- function: ['#00458c', '#a0caff'], // blue T30/T80 H=255- type: ['#700084', '#efa8ff'], // purple- variable: ['#171717', '#e5e5e5'], // near-black / near-white- operator: ['#737373', '#a3a3a3'], // neutral- constant: ['#6e3500', '#ffb37f'], // orange- tag: ['#89001a', '#ffaeaa'], // red- attribute: ['#584400', '#eec12f'], // yellow- property: ['#005348', '#83dac9'], // teal- punctuation: ['#a3a3a3', '#525252'],// neutral+ keyword: ['#700084', '#efa8ff'], // purple T30/T80+ string: ['#005600', '#a6d2a2'], // green (sat T30 / pastel T80)+ comment: ['#737373', '#a3a3a3'], // neutral+ number: ['#6e3500', '#ffb37f'], // orange+ function: ['#00458c', '#a0caff'], // blue T30/T80 H=255+ type: ['#700084', '#efa8ff'], // purple+ variable: ['#171717', '#e5e5e5'], // near-black / near-white+ operator: ['#737373', '#a3a3a3'], // neutral+ constant: ['#6e3500', '#ffb37f'], // orange+ tag: ['#89001a', '#ffaeaa'], // red+ attribute: ['#584400', '#eec12f'], // yellow+ property: ['#005348', '#83dac9'], // teal+ punctuation: ['#a3a3a3', '#525252'], // neutralbackground: ['#fafafa', '#0a0a0a'],},});@@ -127,39 +127,39 @@ export const neutralTheme = defineTheme({// All values use the OKLCH Neutral tonal palette (chroma=0).// ========================================================================='--color-background-surface': ['#ffffff', '#262626'],- '--color-background-body': ['#f1f1f1', '#1b1b1b'],- '--color-background-card': ['#ffffff', '#1b1b1b'],+ '--color-background-body': ['#f1f1f1', '#1b1b1b'],+ '--color-background-card': ['#ffffff', '#1b1b1b'],'--color-background-popover': ['#ffffff', '#1b1b1b'],- '--color-background-muted': ['#f1f1f1', '#1b1b1b'],+ '--color-background-muted': ['#f1f1f1', '#1b1b1b'],// Accent + neutral surface tints (sit alongside backgrounds)- '--color-accent': ['#262626', '#ebebeb'],+ '--color-accent': ['#262626', '#ebebeb'],'--color-accent-muted': ['#f1f1f1', '#262626'],- '--color-neutral': ['#0000000F', '#FFFFFF1A'],+ '--color-neutral': ['#0000000F', '#FFFFFF1A'],// Overlays (modal scrims, hover/pressed tints)- '--color-overlay': ['#00000080', '#000000CC'],- '--color-overlay-hover': ['#0000000D', '#FFFFFF0D'],+ '--color-overlay': ['#00000080', '#000000CC'],+ '--color-overlay-hover': ['#0000000D', '#FFFFFF0D'],'--color-overlay-pressed': ['#0000001A', '#FFFFFF1A'],// Text- '--color-text-primary': ['#171717', '#fafafa'],+ '--color-text-primary': ['#171717', '#fafafa'],'--color-text-secondary': ['#737373', '#a3a3a3'],- '--color-text-disabled': ['#a3a3a3', '#525252'],- '--color-text-accent': ['#262626', '#ebebeb'],- '--color-on-dark': '#ffffff',- '--color-on-light': '#171717',+ '--color-text-disabled': ['#a3a3a3', '#525252'],+ '--color-text-accent': ['#262626', '#ebebeb'],+ '--color-on-dark': '#ffffff',+ '--color-on-light': '#171717',// Contrast: neutral accent is near-black (L) / near-white (D)- '--color-on-accent': ['#ffffff', '#171717'],+ '--color-on-accent': ['#ffffff', '#171717'],'--color-on-success': ['#ffffff', '#171717'],- '--color-on-error': ['#ffffff', '#171717'],+ '--color-on-error': ['#ffffff', '#171717'],'--color-on-warning': '#171717',// Icon- '--color-icon-accent': ['#262626', '#ebebeb'],- '--color-icon-primary': ['#171717', '#fafafa'],+ '--color-icon-accent': ['#262626', '#ebebeb'],+ '--color-icon-primary': ['#171717', '#fafafa'],'--color-icon-secondary': ['#737373', '#a3a3a3'],- '--color-icon-disabled': ['#a3a3a3', '#525252'],+ '--color-icon-disabled': ['#a3a3a3', '#525252'],// Status / Sentiment — dark mode follows the issue #2150 rubric://@@ -372,8 +372,8 @@ export const neutralTheme = defineTheme({// =========================================================================button: {'variant:destructive': {- backgroundColor: 'var(--color-error-muted)', // locked pastel red bg- color: 'var(--color-error)', // locked T30 red — matches banner/input error text+ backgroundColor: 'var(--color-error-muted)', // locked pastel red bg+ color: 'var(--color-error)', // locked T30 red — matches banner/input error text},},@@ -482,6 +482,37 @@ export const neutralTheme = defineTheme({},},+ // =========================================================================+ // StatusDot — fill uses the SAME vivid stops as the filled semantic Badge+ // (and ProgressBar), so a dot and its badge read as one status language.+ //+ // The default component maps each variant to a raw semantic token+ // (--color-success / --color-error / --color-warning / --color-icon-+ // secondary), which in light mode are the dark T30/T40 stops meant to+ // sit as TEXT on a pastel surface — as a solid dot they read muddy+ // (dark green / maroon / brown). Redirect them to the badge fills.+ //+ // success → badge success bg (green T45 / dark-ramp T60)+ // warning → badge warning bg (yellow T85, same hex both modes)+ // error → badge error bg (red T55 / dark-ramp T60)+ // accent → badge info bg (blue T50 / dark-ramp T60) — the+ // StatusDot "accent" is the info/attention color, so it+ // pairs with the info badge rather than --color-accent+ // (near-black #262626, the darkest offender).+ //+ // `neutral` is intentionally NOT overridden: the neutral badge bg is a+ // near-invisible light gray (--color-background-gray #e5e5e5 / 10% white+ // wash), fine as a large pill but unreadable as an 8px dot. It keeps the+ // component default's visible mid-gray (--color-icon-secondary), which is+ // not among the "too dark" cases.+ // =========================================================================+ statusdot: {+ 'variant:success': {backgroundColor: 'light-dark(#198100, #64af4c)'},+ 'variant:warning': {backgroundColor: '#ffce2f'},+ 'variant:error': {backgroundColor: 'light-dark(#e33f4a, #ff705d)'},+ 'variant:accent': {backgroundColor: 'light-dark(#0074e2, #6d9cfe)'},+ },+// =========================================================================// Banner — sits on a hue-tinted surface with colored text/icon:// Light: pastel T90 bg (pulled from --color-{X}-muted / --color-background-blue)