@astryxdesign/cli 0.7.5-canary.fccd771 → 0.7.5-canary.fd0aba8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/README.md +2 -2
  3. package/api/hook/detail/detail.test.mjs +11 -0
  4. package/api/integration/pack-check.lifecycle-output.test.mjs +24 -1
  5. package/api/integration/pack-check.mjs +10 -4
  6. package/api/integration/pack-check.test.mjs +5 -1
  7. package/api/swizzle/copy/copy.mjs +1 -1
  8. package/api/template/tokenizer-showcase.test.mjs +47 -0
  9. package/api/theme/build/build.adaptation-enrollment.test.mjs +4 -0
  10. package/api/theme/build/build.icon-entry-variants.test.mjs +134 -0
  11. package/api/theme/build/build.icon-function-entries.test.mjs +499 -0
  12. package/api/theme/build/build.icon-variants.test.mjs +105 -0
  13. package/api/theme/build/build.mjs +371 -113
  14. package/api/theme/build/build.project-core.test.mjs +63 -8
  15. package/api/theme/build/build.test.mjs +77 -0
  16. package/api/theme/build/icon-imports.d.mts +12 -2
  17. package/api/theme/build/icon-imports.mjs +36 -11
  18. package/api/upgrade/_adapter.d.mts +47 -2
  19. package/api/upgrade/_adapter.mjs +58 -2
  20. package/api/upgrade/run/failure-receipt.test.mjs +212 -0
  21. package/api/upgrade/run/outcomes.test.mjs +646 -0
  22. package/api/upgrade/run/run.d.mts +36 -0
  23. package/api/upgrade/run/run.mjs +670 -44
  24. package/api/upgrade/upgrade.doc.mjs +4 -4
  25. package/api/upgrade/upgrade.mjs +19 -4
  26. package/api/upgrade/upgrade.type.d.mts +36 -1
  27. package/api/upgrade/upgrade.type.mjs +29 -4
  28. package/assets/codemods/__tests__/runner.symlinks.test.mjs +205 -0
  29. package/assets/codemods/__tests__/runner.unparseable.test.mjs +457 -0
  30. package/assets/codemods/integration-runner.mjs +8 -2
  31. package/assets/codemods/integration-runner.protection.test.mjs +53 -0
  32. package/assets/codemods/outcome.mjs +79 -0
  33. package/assets/codemods/outcome.test.mjs +40 -0
  34. package/assets/codemods/parse.mjs +94 -0
  35. package/assets/codemods/run-codemod.mjs +109 -5
  36. package/assets/codemods/runner.mjs +119 -13
  37. package/assets/codemods/transform-prop.mjs +99 -49
  38. package/assets/codemods/transform-prop.test.mjs +36 -1
  39. package/assets/codemods/transforms/next/__tests__/migrate-codeblock-tokenizer-to-language.test.mjs +130 -0
  40. package/assets/codemods/transforms/next/index.mjs +11 -1
  41. package/assets/codemods/transforms/next/migrate-codeblock-tokenizer-to-language.mjs +315 -0
  42. package/assets/codemods/transforms/v0.1.2/rename-text-color-active-to-accent.mjs +1 -1
  43. package/assets/codemods/transforms/v0.1.3/__tests__/migrate-layout-components-to-experimental.test.mjs +216 -2
  44. package/assets/codemods/transforms/v0.1.3/migrate-layout-components-to-experimental.mjs +88 -6
  45. package/assets/codemods/transforms/v0.1.5/rename-switch-label-spacing-default-to-hug.mjs +1 -1
  46. package/assets/codemods/transforms/v0.1.7/migrate-table-tableprops-to-direct-props.mjs +1 -1
  47. package/assets/codemods/transforms/v0.1.8/rename-avatar-size-scale.mjs +1 -1
  48. package/assets/codemods/transforms/v0.2.0/remove-tablist-orientation.mjs +1 -1
  49. package/assets/codemods/transforms/v0.2.1/migrate-dialog-position-to-logical.mjs +1 -1
  50. package/assets/codemods/transforms/v0.6.0/migrate-astryx-theme-selectors-to-data-attrs.mjs +4 -3
  51. package/assets/codemods/transforms/v0.7.0/__tests__/migrate-deprecated-theme-surface.test.mjs +207 -6
  52. package/assets/codemods/transforms/v0.7.0/__tests__/validate-data-token-ownership.test.mjs +143 -70
  53. package/assets/codemods/transforms/v0.7.0/migrate-deprecated-theme-surface-v0.6-data.mjs +6 -1
  54. package/assets/codemods/transforms/v0.7.0/migrate-deprecated-theme-surface.mjs +244 -42
  55. package/assets/codemods/transforms/v0.7.0/validate-data-token-ownership.mjs +23 -78
  56. package/assets/docs/README.md +13 -13
  57. package/assets/docs/author-a-theme.doc.mjs +5 -1
  58. package/assets/docs/getting-started.doc.mjs +5 -5
  59. package/assets/docs/icons.doc.mjs +82 -1
  60. package/assets/docs/motion.doc.mjs +1 -1
  61. package/assets/docs/theme.doc.dense.mjs +8 -0
  62. package/assets/docs/theme.doc.mjs +16 -0
  63. package/assets/docs/theme.doc.zh.mjs +11 -0
  64. package/assets/docs/tree/i18n-library-integration.doc.mjs +1 -1
  65. package/assets/docs/tree/styling-advanced.doc.mjs +1 -1
  66. package/assets/docs/tree/template-styles.doc.mjs +1 -1
  67. package/assets/docs/tree/tokens-color.doc.mjs +145 -1
  68. package/assets/docs/tree/tokens-ease.doc.mjs +4 -0
  69. package/assets/docs/tree/tokens.doc.mjs +1 -1
  70. package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherReviewFlow.doc.mjs +6 -4
  71. package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherReviewFlow.tsx +61 -55
  72. package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherShowcase.doc.mjs +6 -4
  73. package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherShowcase.tsx +68 -37
  74. package/assets/templates/blocks/components/CodeBlock/CodeBlockBashCommand.doc.mjs +1 -1
  75. package/assets/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx +10 -2
  76. package/assets/templates/blocks/components/Thumbnail/ThumbnailDisabled.doc.mjs +1 -1
  77. package/assets/templates/blocks/components/Tokenizer/TokenizerShowcase.tsx +13 -6
  78. package/assets/templates/pages/dashboard-alert-rail/page.tsx +3 -3
  79. package/assets/templates/pages/library/page.tsx +1 -2
  80. package/assets/templates/pages/table-comparison/page.tsx +12 -3
  81. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +3 -2
  82. package/assets/templates/themes/butter/butterTheme.ts +47 -44
  83. package/assets/templates/themes/chocolate/chocolateTheme.ts +15 -2
  84. package/assets/templates/themes/gothic/gothicTheme.ts +21 -16
  85. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +1 -1
  86. package/assets/templates/themes/matcha/matchaTheme.ts +15 -2
  87. package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +4 -4
  88. package/assets/templates/themes/neutral/neutralTheme.ts +24 -119
  89. package/assets/templates/themes/stone/stoneTheme.ts +46 -21
  90. package/assets/templates/themes/y2k/y2kTheme.ts +20 -16
  91. package/assets/theme.template.ts +19 -6
  92. package/authoring/codemod/type.ts +10 -0
  93. package/authoring/config/config.doc.mjs +1 -1
  94. package/clients/cli/commands/build-theme.adaptations.test.mjs +110 -0
  95. package/clients/cli/commands/build-theme.outside-project.test.mjs +140 -0
  96. package/clients/cli/commands/swizzle.routing.test.mjs +1 -1
  97. package/clients/cli/commands/upgrade.doc.mjs +47 -2
  98. package/clients/cli/commands/upgrade.file-protection.test.mjs +175 -0
  99. package/clients/cli/commands/upgrade.flag-help.test.mjs +37 -0
  100. package/clients/cli/commands/upgrade.integration-policy.test.mjs +103 -0
  101. package/clients/cli/commands/upgrade.mjs +9 -2
  102. package/clients/cli/commands/upgrade.outcomes.test.mjs +350 -0
  103. package/foundation/agent-docs/agent-docs.mjs +1 -0
  104. package/foundation/agent-docs/agent-docs.test.mjs +5 -0
  105. package/foundation/config/project.d.mts +1 -1
  106. package/foundation/config/project.mjs +1 -1
  107. package/foundation/debug/redact.test.mjs +1 -1
  108. package/foundation/doc-compiler/doc-loads.test.mjs +2 -6
  109. package/foundation/response/base.d.ts +7 -0
  110. package/foundation/response/error-codes.doc.mjs +3 -2
  111. package/foundation/response/error-codes.mjs +1 -1
  112. package/foundation/response/json.d.mts +10 -3
  113. package/foundation/response/json.mjs +16 -4
  114. package/foundation/response/response-types.doc.mjs +1 -1
  115. package/package.json +13 -12
@@ -3,7 +3,7 @@
3
3
  'use client';
4
4
 
5
5
  import {useState} from 'react';
6
- import {BottomSheet, BottomSheetSwitcher} from '@astryxdesign/core/BottomSheet';
6
+ import {BottomSheet} from '@astryxdesign/core/BottomSheet';
7
7
  import {Button} from '@astryxdesign/core/Button';
8
8
  import {CheckboxInput} from '@astryxdesign/core/CheckboxInput';
9
9
  import {Divider} from '@astryxdesign/core/Divider';
@@ -15,20 +15,35 @@ import {RadioList, RadioListItem} from '@astryxdesign/core/RadioList';
15
15
 
16
16
  type NotificationSheetHeight = 'hug' | 'capped';
17
17
 
18
- interface NotificationOverviewSheetProps {
18
+ /**
19
+ * Each step is a standalone sheet. Closing the open step and opening the
20
+ * next one in the same update (one `step` state value) replaces it in place.
21
+ */
22
+ interface StepSheetProps {
23
+ isOpen: boolean;
24
+ onOpenChange: (isOpen: boolean) => void;
25
+ hasScrim: boolean;
19
26
  height: NotificationSheetHeight;
27
+ }
28
+
29
+ interface NotificationOverviewSheetProps extends StepSheetProps {
20
30
  onCancel: () => void;
21
31
  onContinue: () => void;
22
32
  }
23
33
 
24
34
  function NotificationOverviewSheet({
35
+ isOpen,
36
+ onOpenChange,
37
+ hasScrim,
25
38
  height,
26
39
  onCancel,
27
40
  onContinue,
28
41
  }: NotificationOverviewSheetProps) {
29
42
  return (
30
43
  <BottomSheet
31
- sheetId="overview"
44
+ isOpen={isOpen}
45
+ onOpenChange={onOpenChange}
46
+ hasScrim={hasScrim}
32
47
  label="Set up notifications"
33
48
  height={height}>
34
49
  <Section padding={4}>
@@ -74,13 +89,15 @@ function NotificationOverviewSheet({
74
89
  );
75
90
  }
76
91
 
77
- interface NotificationFrequencySheetProps {
78
- height: NotificationSheetHeight;
92
+ interface NotificationFrequencySheetProps extends StepSheetProps {
79
93
  onBack: () => void;
80
94
  onContinue: () => void;
81
95
  }
82
96
 
83
97
  function NotificationFrequencySheet({
98
+ isOpen,
99
+ onOpenChange,
100
+ hasScrim,
84
101
  height,
85
102
  onBack,
86
103
  onContinue,
@@ -89,7 +106,9 @@ function NotificationFrequencySheet({
89
106
 
90
107
  return (
91
108
  <BottomSheet
92
- sheetId="frequency"
109
+ isOpen={isOpen}
110
+ onOpenChange={onOpenChange}
111
+ hasScrim={hasScrim}
93
112
  label="Notification frequency"
94
113
  height={height}>
95
114
  <Section padding={4}>
@@ -120,13 +139,15 @@ function NotificationFrequencySheet({
120
139
  );
121
140
  }
122
141
 
123
- interface NotificationChannelsSheetProps {
124
- height: NotificationSheetHeight;
142
+ interface NotificationChannelsSheetProps extends StepSheetProps {
125
143
  onBack: () => void;
126
144
  onFinish: () => void;
127
145
  }
128
146
 
129
147
  function NotificationChannelsSheet({
148
+ isOpen,
149
+ onOpenChange,
150
+ hasScrim,
130
151
  height,
131
152
  onBack,
132
153
  onFinish,
@@ -137,7 +158,9 @@ function NotificationChannelsSheet({
137
158
 
138
159
  return (
139
160
  <BottomSheet
140
- sheetId="channels"
161
+ isOpen={isOpen}
162
+ onOpenChange={onOpenChange}
163
+ hasScrim={hasScrim}
141
164
  label="Notification channels"
142
165
  height={height}>
143
166
  <Section padding={4}>
@@ -175,47 +198,55 @@ function NotificationChannelsSheet({
175
198
  );
176
199
  }
177
200
 
178
- interface MultiStepSwitcherExampleProps {
201
+ type Step = 'overview' | 'frequency' | 'channels' | null;
202
+
203
+ interface MultiStepExampleProps {
179
204
  height: NotificationSheetHeight;
180
205
  hasScrim?: boolean;
181
206
  }
182
207
 
183
- function MultiStepSwitcherExample({
184
- height,
185
- hasScrim = true,
186
- }: MultiStepSwitcherExampleProps) {
187
- const [activeSheet, setActiveSheet] = useState<string | null>(null);
208
+ function MultiStepExample({height, hasScrim = true}: MultiStepExampleProps) {
209
+ // One state value names the open step. Moving on closes one sheet and
210
+ // opens the next in the same update, which replaces it in place.
211
+ const [step, setStep] = useState<Step>(null);
212
+ const stepProps = (id: Step) => ({
213
+ isOpen: step === id,
214
+ onOpenChange: (isOpen: boolean) => {
215
+ // Clear the step only if it is still the open one: a step that closes
216
+ // because the person moved on must not undo the move.
217
+ if (!isOpen) {
218
+ setStep(current => (current === id ? null : current));
219
+ }
220
+ },
221
+ hasScrim,
222
+ height,
223
+ });
188
224
 
189
225
  return (
190
226
  <>
191
227
  <Button
192
228
  label="Set up notifications"
193
- onClick={() => setActiveSheet('overview')}
229
+ onClick={() => setStep('overview')}
230
+ />
231
+ <NotificationOverviewSheet
232
+ {...stepProps('overview')}
233
+ onCancel={() => setStep(null)}
234
+ onContinue={() => setStep('frequency')}
235
+ />
236
+ <NotificationFrequencySheet
237
+ {...stepProps('frequency')}
238
+ onBack={() => setStep('overview')}
239
+ onContinue={() => setStep('channels')}
240
+ />
241
+ <NotificationChannelsSheet
242
+ {...stepProps('channels')}
243
+ onBack={() => setStep('frequency')}
244
+ onFinish={() => setStep(null)}
194
245
  />
195
- <BottomSheetSwitcher
196
- activeSheet={activeSheet}
197
- onActiveSheetChange={setActiveSheet}
198
- hasScrim={hasScrim}>
199
- <NotificationOverviewSheet
200
- height={height}
201
- onCancel={() => setActiveSheet(null)}
202
- onContinue={() => setActiveSheet('frequency')}
203
- />
204
- <NotificationFrequencySheet
205
- height={height}
206
- onBack={() => setActiveSheet('overview')}
207
- onContinue={() => setActiveSheet('channels')}
208
- />
209
- <NotificationChannelsSheet
210
- height={height}
211
- onBack={() => setActiveSheet('frequency')}
212
- onFinish={() => setActiveSheet(null)}
213
- />
214
- </BottomSheetSwitcher>
215
246
  </>
216
247
  );
217
248
  }
218
249
 
219
250
  export default function BottomSheetSwitcherShowcase() {
220
- return <MultiStepSwitcherExample height="hug" />;
251
+ return <MultiStepExample height="hug" />;
221
252
  }
@@ -7,7 +7,7 @@ export const doc = {
7
7
  name: 'Code — Snippet',
8
8
  displayName: 'Code — Snippet',
9
9
  description:
10
- 'Short terminal commands with a copy button and no line numbers. Use for install instructions or one-liner commands that readers will paste directly.',
10
+ 'Short terminal commands with no header: the copy button sits in its own column beside the code, so a one-line command reads as a single row and a long line ends before the button instead of running under it. Use for install instructions or one-liner commands that readers will paste directly.',
11
11
  isReady: true,
12
12
  aspectRatio: 16 / 9,
13
13
  componentsUsed: ['CodeBlock', 'Stack'],
@@ -11,13 +11,21 @@ export default function CodeBlockBashCommand() {
11
11
  <CodeBlock
12
12
  code="npm install @astryxdesign/core"
13
13
  language="bash"
14
- hasCopyButton
14
+ hasLanguageLabel={false}
15
15
  style={{width: '100%'}}
16
16
  />
17
17
  <CodeBlock
18
18
  code="yarn add @astryxdesign/theme-neutral"
19
19
  language="bash"
20
- hasCopyButton
20
+ hasLanguageLabel={false}
21
+ style={{width: '100%'}}
22
+ />
23
+ <CodeBlock
24
+ code={
25
+ 'astryx upgrade --from 0.6.0 --apply --path apps/web/src --install-deps\nnpm run build'
26
+ }
27
+ language="bash"
28
+ hasLanguageLabel={false}
21
29
  style={{width: '100%'}}
22
30
  />
23
31
  </VStack>
@@ -6,7 +6,7 @@ export const doc = {
6
6
  exampleFor: 'Thumbnail',
7
7
  name: 'Thumbnail — Disabled',
8
8
  displayName: 'Thumbnail — Disabled',
9
- description: 'Thumbnails in the disabled state with reduced opacity. The remove button and click handler are suppressed when disabled.',
9
+ description: 'Thumbnails in the disabled state with reduced opacity. The open and remove buttons stay focusable and announced as disabled, and call nothing.',
10
10
  isReady: true,
11
11
  aspectRatio: 16 / 9,
12
12
  componentsUsed: ['Thumbnail', 'Layout', 'Text'],
@@ -6,16 +6,23 @@ import {useState} from 'react';
6
6
  import {Tokenizer} from '@astryxdesign/core/Tokenizer';
7
7
  import type {SearchableItem, SearchSource} from '@astryxdesign/core/Typeahead';
8
8
 
9
+ const tags: SearchableItem[] = [
10
+ {id: '1', label: 'Design'},
11
+ {id: '2', label: 'Engineering'},
12
+ {id: '3', label: 'Marketing'},
13
+ {id: '4', label: 'Product'},
14
+ {id: '5', label: 'Research'},
15
+ {id: '6', label: 'Sales'},
16
+ ];
17
+
9
18
  const source: SearchSource = {
10
- search: () => [],
11
- bootstrap: () => [],
19
+ search: (query: string) =>
20
+ tags.filter(tag => tag.label.toLowerCase().includes(query.toLowerCase())),
21
+ bootstrap: () => tags,
12
22
  };
13
23
 
14
24
  export default function TokenizerShowcase() {
15
- const [value, setValue] = useState<SearchableItem[]>([
16
- {id: '1', label: 'Design'},
17
- {id: '2', label: 'Engineering'},
18
- ]);
25
+ const [value, setValue] = useState<SearchableItem[]>([tags[0], tags[1]]);
19
26
  return (
20
27
  <div style={{display: 'grid', gridTemplateColumns: 'minmax(0, 400px)'}}>
21
28
  <Tokenizer
@@ -94,9 +94,9 @@ interface WindowSeries {
94
94
  }
95
95
 
96
96
  const STATUS_STROKE: Record<HealthStatus, string> = {
97
- healthy: 'var(--color-success, #0B991F)',
98
- warning: 'var(--color-warning, #B25000)',
99
- critical: 'var(--color-error, #D6002A)',
97
+ healthy: 'var(--color-text-success)',
98
+ warning: 'var(--color-text-warning)',
99
+ critical: 'var(--color-text-error)',
100
100
  };
101
101
 
102
102
  const STATUS_DOT: Record<HealthStatus, StatusDotVariant> = {
@@ -193,8 +193,7 @@ const ITEMS: LibraryItem[] = [
193
193
  {
194
194
  id: '18',
195
195
  name: 'MobileNav',
196
- description:
197
- 'Bottom tab bar for mobile viewports with icon and label slots.',
196
+ description: 'Slide-out navigation drawer for mobile viewports.',
198
197
  category: 'Navigation',
199
198
  type: 'Pattern',
200
199
  imageUrl:
@@ -969,12 +969,21 @@ function uptimeStatus(value: number): {
969
969
  status: string;
970
970
  } {
971
971
  if (value >= 99.95) {
972
- return {color: colorVars['--color-success'], status: 'Operational'};
972
+ return {
973
+ color: colorVars['--color-text-success'],
974
+ status: 'Operational',
975
+ };
973
976
  }
974
977
  if (value >= 99) {
975
- return {color: colorVars['--color-warning'], status: 'Degraded'};
978
+ return {
979
+ color: colorVars['--color-text-warning'],
980
+ status: 'Degraded',
981
+ };
976
982
  }
977
- return {color: colorVars['--color-error'], status: 'Outage'};
983
+ return {
984
+ color: colorVars['--color-text-error'],
985
+ status: 'Outage',
986
+ };
978
987
  }
979
988
 
980
989
  interface UptimeDay {
@@ -11,7 +11,7 @@ export const butterPaletteRefs = {
11
11
  dark: {25: '#52237b', 80: '#ddb9f6', 90: '#f2daff'},
12
12
  },
13
13
  green: {
14
- light: {25: '#004a05', 70: '#7bbf7a', 80: '#a2d7a0', 85: '#b6e3b4', 90: '#caeec8'},
14
+ light: {25: '#004a05', 55: '#4a984a', 70: '#7bbf7a', 80: '#a2d7a0', 85: '#b6e3b4', 90: '#caeec8'},
15
15
  dark: {15: '#013004', 20: '#063c0a', 70: '#83bc82', 80: '#a8d4a6', 90: '#cdedcc'},
16
16
  },
17
17
  neutral: {
@@ -31,7 +31,7 @@ export const butterPaletteRefs = {
31
31
  dark: {15: '#4c0700', 25: '#6f1400', 80: '#ffb09b', 85: '#ffc5b5', 90: '#ffd9cf'},
32
32
  },
33
33
  yellow: {
34
- light: {25: '#443c00', 30: '#514700', 70: '#bfae35', 80: '#dfcf5b', 85: '#f0df72', 90: '#fdee8c', 95: '#fff7c0'},
34
+ light: {25: '#443c00', 30: '#514700', 55: '#958500', 70: '#bfae35', 80: '#dfcf5b', 85: '#f0df72', 90: '#fdee8c', 95: '#fff7c0'},
35
35
  dark: {15: '#2c2600', 25: '#443c00', 70: '#bcae4e', 75: '#cdbe59', 85: '#eedf75', 90: '#fdee8c'},
36
36
  },
37
37
  teal: {
@@ -40,6 +40,7 @@ export const butterPaletteRefs = {
40
40
  },
41
41
  accent: {
42
42
  light: {35: '#194ce8', 40: '#225bff', 55: '#4d82ff'},
43
+ dark: {70: '#81a9ff'},
43
44
  },
44
45
  cyan: {
45
46
  light: {25: '#004649', 80: '#8dd2d3', 90: '#a9eff0'},
@@ -107,6 +107,25 @@ const SECONDARY_COMPLEX_SELECTOR = {
107
107
  SECONDARY_BUTTON[':hover'],
108
108
  } as const;
109
109
 
110
+ /**
111
+ * Butter's bright status rims and glyphs in input status scopes. Light mode
112
+ * uses mid-ramp stops so a rim reaches 3:1 on the field (theme-tokens INV11).
113
+ */
114
+ const INPUT_STATUS_VARS = {
115
+ 'status:success': {
116
+ '--color-border-success': lightDark(green.light[55], green.light[70]),
117
+ '--color-icon-success': lightDark(green.light[55], green.light[70]),
118
+ },
119
+ 'status:warning': {
120
+ '--color-border-warning': lightDark(yellow.light[55], yellow.light[80]),
121
+ '--color-icon-warning': lightDark(yellow.light[55], yellow.light[80]),
122
+ },
123
+ 'status:error': {
124
+ '--color-border-error': red.light[60],
125
+ '--color-icon-error': red.light[60],
126
+ },
127
+ } as const;
128
+
110
129
  export const butterTheme = defineTheme({
111
130
  name: 'butter',
112
131
 
@@ -187,6 +206,19 @@ export const butterTheme = defineTheme({
187
206
  '--color-on-error': [red.light[95], red.dark[15]],
188
207
  '--color-on-warning': [yellow.light[95], yellow.dark[15]],
189
208
 
209
+ // Info is its own blue status, independent of the accent.
210
+ '--color-info': [accent.light[40], accent.dark[70]],
211
+ '--color-info-muted': 'var(--color-background-blue)',
212
+
213
+ '--color-text-info': [accent.light[40], accent.dark[70]],
214
+ '--color-text-success': [green.light[25], green.dark[80]],
215
+ '--color-text-warning': [yellow.light[25], yellow.dark[85]],
216
+ '--color-text-error': [red.light[25], red.dark[80]],
217
+ '--color-on-info-muted': 'var(--color-text-blue)',
218
+ '--color-on-success-muted': [green.light[25], green.dark[80]],
219
+ '--color-on-warning-muted': [yellow.light[25], yellow.dark[85]],
220
+ '--color-on-error-muted': [red.light[25], red.dark[90]],
221
+
190
222
  // Icon
191
223
  '--color-icon-accent': [accent.light[40], yellow.dark[90]],
192
224
  '--color-icon-primary': [neutral.light[15], neutral.dark[90]],
@@ -410,34 +442,23 @@ export const butterTheme = defineTheme({
410
442
  },
411
443
  },
412
444
 
413
- // Banner backgrounds match the semantic badge fills.
414
- // Banner status colors — override the muted tokens locally so the
415
- // header (which reads --color-*-muted via StyleX) renders vivid fills
416
- // matching the badge palette. Scoped to the banner root, doesn't leak.
445
+ // Banner status surfaces and content use the reviewed vivid pair.
417
446
  banner: {
418
447
  'status:info': {
419
- '--color-accent-muted': accent.light[55],
420
- '--color-text-primary': neutral.light[15],
421
- '--color-text-secondary': neutral.light[15],
422
- '--color-accent': neutral.light[15],
448
+ '--color-info-muted': accent.light[55],
449
+ '--color-on-info-muted': neutral.light[15],
423
450
  },
424
451
  'status:success': {
425
452
  '--color-success-muted': green.light[70],
426
- '--color-text-primary': neutral.light[15],
427
- '--color-text-secondary': neutral.light[15],
428
- '--color-success': neutral.light[15],
453
+ '--color-on-success-muted': neutral.light[15],
429
454
  },
430
455
  'status:warning': {
431
456
  '--color-warning-muted': yellow.light[80],
432
- '--color-text-primary': neutral.light[15],
433
- '--color-text-secondary': neutral.light[15],
434
- '--color-warning': neutral.light[15],
457
+ '--color-on-warning-muted': neutral.light[15],
435
458
  },
436
459
  'status:error': {
437
460
  '--color-error-muted': red.light[60],
438
- '--color-text-primary': neutral.light[15],
439
- '--color-text-secondary': neutral.light[15],
440
- '--color-error': neutral.light[15],
461
+ '--color-on-error-muted': neutral.light[15],
441
462
  },
442
463
  },
443
464
 
@@ -561,9 +582,7 @@ export const butterTheme = defineTheme({
561
582
  paddingInline: 'var(--spacing-3)',
562
583
  borderColor: 'var(--color-border)',
563
584
  },
564
- 'status:success': {'--color-success': green.light[70]},
565
- 'status:warning': {'--color-warning': yellow.light[80]},
566
- 'status:error': {'--color-error': red.light[60]},
585
+ ...INPUT_STATUS_VARS,
567
586
  },
568
587
  'text-area': {
569
588
  base: {
@@ -571,9 +590,7 @@ export const butterTheme = defineTheme({
571
590
  paddingInline: 'var(--spacing-3)',
572
591
  borderColor: 'var(--color-border)',
573
592
  },
574
- 'status:success': {'--color-success': green.light[70]},
575
- 'status:warning': {'--color-warning': yellow.light[80]},
576
- 'status:error': {'--color-error': red.light[60]},
593
+ ...INPUT_STATUS_VARS,
577
594
  },
578
595
  'number-input': {
579
596
  base: {
@@ -581,9 +598,7 @@ export const butterTheme = defineTheme({
581
598
  paddingInline: 'var(--spacing-3)',
582
599
  borderColor: 'var(--color-border)',
583
600
  },
584
- 'status:success': {'--color-success': green.light[70]},
585
- 'status:warning': {'--color-warning': yellow.light[80]},
586
- 'status:error': {'--color-error': red.light[60]},
601
+ ...INPUT_STATUS_VARS,
587
602
  },
588
603
  'date-input': {
589
604
  base: {
@@ -591,9 +606,7 @@ export const butterTheme = defineTheme({
591
606
  paddingInline: 'var(--spacing-3)',
592
607
  borderColor: 'var(--color-border)',
593
608
  },
594
- 'status:success': {'--color-success': green.light[70]},
595
- 'status:warning': {'--color-warning': yellow.light[80]},
596
- 'status:error': {'--color-error': red.light[60]},
609
+ ...INPUT_STATUS_VARS,
597
610
  },
598
611
  'time-input': {
599
612
  base: {
@@ -601,9 +614,7 @@ export const butterTheme = defineTheme({
601
614
  paddingInline: 'var(--spacing-3)',
602
615
  borderColor: 'var(--color-border)',
603
616
  },
604
- 'status:success': {'--color-success': green.light[70]},
605
- 'status:warning': {'--color-warning': yellow.light[80]},
606
- 'status:error': {'--color-error': red.light[60]},
617
+ ...INPUT_STATUS_VARS,
607
618
  },
608
619
  selector: {
609
620
  base: {
@@ -611,9 +622,7 @@ export const butterTheme = defineTheme({
611
622
  paddingInline: 'var(--spacing-3)',
612
623
  borderColor: 'var(--color-border)',
613
624
  },
614
- 'status:success': {'--color-success': green.light[70]},
615
- 'status:warning': {'--color-warning': yellow.light[80]},
616
- 'status:error': {'--color-error': red.light[60]},
625
+ ...INPUT_STATUS_VARS,
617
626
  'variant:secondary': SECONDARY_SELECTOR,
618
627
  },
619
628
  'multi-selector': {
@@ -622,9 +631,7 @@ export const butterTheme = defineTheme({
622
631
  paddingInline: 'var(--spacing-3)',
623
632
  borderColor: 'var(--color-border)',
624
633
  },
625
- 'status:success': {'--color-success': green.light[70]},
626
- 'status:warning': {'--color-warning': yellow.light[80]},
627
- 'status:error': {'--color-error': red.light[60]},
634
+ ...INPUT_STATUS_VARS,
628
635
  'variant:secondary': SECONDARY_SELECTOR,
629
636
  },
630
637
  'complex-selector': {'variant:secondary': SECONDARY_COMPLEX_SELECTOR},
@@ -634,9 +641,7 @@ export const butterTheme = defineTheme({
634
641
  paddingInline: 'var(--spacing-3)',
635
642
  borderColor: 'var(--color-border)',
636
643
  },
637
- 'status:success': {'--color-success': green.light[70]},
638
- 'status:warning': {'--color-warning': yellow.light[80]},
639
- 'status:error': {'--color-error': red.light[60]},
644
+ ...INPUT_STATUS_VARS,
640
645
  },
641
646
  tokenizer: {
642
647
  base: {
@@ -644,9 +649,7 @@ export const butterTheme = defineTheme({
644
649
  paddingInline: 'var(--spacing-3)',
645
650
  borderColor: 'var(--color-border)',
646
651
  },
647
- 'status:success': {'--color-success': green.light[70]},
648
- 'status:warning': {'--color-warning': yellow.light[80]},
649
- 'status:error': {'--color-error': red.light[60]},
652
+ ...INPUT_STATUS_VARS,
650
653
  },
651
654
 
652
655
  // Display sizes use Sarina — the signature buttery display
@@ -120,10 +120,23 @@ export const chocolateTheme = defineTheme({
120
120
  '--color-on-dark': '#FFFCF7',
121
121
  '--color-on-light': '#4a3520',
122
122
  '--color-on-accent': ['#FFFFFF', '#4a3520'],
123
- '--color-on-success': ['#FFFFFF', '#4a3520'],
124
- '--color-on-error': ['#FFFFFF', '#4a3520'],
123
+ '--color-on-success': '#141010',
124
+ '--color-on-error': '#141010',
125
125
  '--color-on-warning': ['#4a3520', '#4a3520'],
126
126
 
127
+ // Info is its own blue status, independent of the accent.
128
+ '--color-info': ['#3a5e8c', '#7ba8d4'],
129
+ '--color-info-muted': 'var(--color-background-blue)',
130
+
131
+ '--color-text-info': ['#2e4a6e', '#8dbce0'],
132
+ '--color-text-success': ['#526f00', '#a8d43a'],
133
+ '--color-text-warning': ['#7a5500', '#ffd960'],
134
+ '--color-text-error': ['#cc0000', '#ff7a7a'],
135
+ '--color-on-info-muted': ['#2e4a6e', '#8dbce0'],
136
+ '--color-on-success-muted': ['#4d6800', '#a8d43a'],
137
+ '--color-on-warning-muted': ['#7a5500', '#ffd960'],
138
+ '--color-on-error-muted': ['#b40000', '#ff7a7a'],
139
+
127
140
  // Icon
128
141
  '--color-icon-accent': ['#8C5927', '#d4a06a'],
129
142
  '--color-icon-primary': ['#4a3520', '#EDE4D4'],
@@ -135,6 +135,19 @@ export const gothicTheme = defineTheme({
135
135
  '--color-on-error': neutral.dark[10],
136
136
  '--color-on-warning': neutral.dark[10],
137
137
 
138
+ '--color-info': blue.dark[65],
139
+ '--color-info-muted': blue.dark[75],
140
+ '--color-on-info': neutral.dark[10],
141
+
142
+ '--color-text-info': blue.dark[75],
143
+ '--color-text-success': green.dark[75],
144
+ '--color-text-warning': yellow.dark[75],
145
+ '--color-text-error': red.dark[75],
146
+ '--color-on-info-muted': blue.dark[20],
147
+ '--color-on-success-muted': green.dark[20],
148
+ '--color-on-warning-muted': yellow.dark[15],
149
+ '--color-on-error-muted': red.dark[20],
150
+
138
151
  '--color-icon-accent': neutral.dark[95],
139
152
  '--color-icon-primary': neutral.dark[95],
140
153
  '--color-icon-secondary': neutral.dark[75],
@@ -286,28 +299,20 @@ export const gothicTheme = defineTheme({
286
299
  borderRadius: 'var(--radius-element)',
287
300
  },
288
301
  'status:info': {
289
- backgroundColor: 'var(--color-background-blue)',
290
- '--color-text-primary': 'var(--color-text-blue)',
291
- '--color-text-secondary': 'var(--color-text-blue)',
292
- '--color-accent': 'var(--color-text-blue)',
302
+ '--color-info-muted': 'var(--color-background-blue)',
303
+ '--color-on-info-muted': 'var(--color-text-blue)',
293
304
  },
294
305
  'status:success': {
295
- backgroundColor: 'var(--color-background-green)',
296
- '--color-text-primary': 'var(--color-text-green)',
297
- '--color-text-secondary': 'var(--color-text-green)',
298
- '--color-success': 'var(--color-text-green)',
306
+ '--color-success-muted': 'var(--color-background-green)',
307
+ '--color-on-success-muted': 'var(--color-text-green)',
299
308
  },
300
309
  'status:warning': {
301
- backgroundColor: 'var(--color-background-yellow)',
302
- '--color-text-primary': 'var(--color-text-yellow)',
303
- '--color-text-secondary': 'var(--color-text-yellow)',
304
- '--color-warning': 'var(--color-text-yellow)',
310
+ '--color-warning-muted': 'var(--color-background-yellow)',
311
+ '--color-on-warning-muted': 'var(--color-text-yellow)',
305
312
  },
306
313
  'status:error': {
307
- backgroundColor: 'var(--color-background-red)',
308
- '--color-text-primary': 'var(--color-text-red)',
309
- '--color-text-secondary': 'var(--color-text-red)',
310
- '--color-error': 'var(--color-text-red)',
314
+ '--color-error-muted': 'var(--color-background-red)',
315
+ '--color-on-error-muted': 'var(--color-text-red)',
311
316
  },
312
317
  },
313
318
 
@@ -20,7 +20,7 @@ export const matchaPaletteRefs = {
20
20
  },
21
21
  blue: {
22
22
  light: {35: '#2e4a6e', 50: '#3a5e8c'},
23
- dark: {50: '#3a5e8c', 70: '#7ba8d4', 75: '#8dbce0'},
23
+ dark: {50: '#3a5e8c', 70: '#7ba8d4', 75: '#8dbce0', 80: '#a7c9e3'},
24
24
  },
25
25
  purple: {
26
26
  light: {35: '#553a70', 50: '#6b4a8c'},
@@ -103,10 +103,23 @@ export const matchaTheme = defineTheme({
103
103
  '--color-on-dark': neutral.light[100],
104
104
  '--color-on-light': neutral.light[20],
105
105
  '--color-on-accent': [neutral.light[100], neutral.dark[20]],
106
- '--color-on-success': [neutral.light[100], neutral.dark[20]],
107
- '--color-on-error': [neutral.light[100], neutral.dark[20]],
106
+ '--color-on-success': neutral.dark[5],
107
+ '--color-on-error': neutral.dark[5],
108
108
  '--color-on-warning': [neutral.light[20], neutral.dark[20]],
109
109
 
110
+ // Info is its own blue status, independent of the accent.
111
+ '--color-info': [blue.light[50], blue.dark[80]],
112
+ '--color-info-muted': 'var(--color-background-blue)',
113
+
114
+ '--color-text-info': [blue.light[35], blue.dark[75]],
115
+ '--color-text-success': [green.light[35], green.dark[75]],
116
+ '--color-text-warning': [yellow.light[45], yellow.dark[90]],
117
+ '--color-text-error': [red.light[35], red.dark[75]],
118
+ '--color-on-info-muted': [blue.light[35], blue.dark[75]],
119
+ '--color-on-success-muted': [green.light[35], green.dark[75]],
120
+ '--color-on-warning-muted': [yellow.light[45], yellow.dark[90]],
121
+ '--color-on-error-muted': [red.light[35], red.dark[75]],
122
+
110
123
  // Icon
111
124
  '--color-icon-accent': [neutral.light[20], neutral.dark[75]],
112
125
  '--color-icon-primary': [neutral.light[20], neutral.dark[75]],
@@ -23,15 +23,15 @@ export const neutralPaletteRefs = {
23
23
  dark: {25: '#503424', 65: '#df843f', 80: '#ffb37e'},
24
24
  },
25
25
  blue: {
26
- light: {25: '#003978', 30: '#00458c', 50: '#0074e2', 80: '#a1caff', 85: '#b9d7ff'},
26
+ light: {25: '#003978', 30: '#00458c', 45: '#0067ce', 50: '#0074e2', 80: '#a1caff', 85: '#b9d7ff'},
27
27
  dark: {25: '#253c5a', 65: '#5aa0f8', 75: '#88bcff', 80: '#a1caff'},
28
28
  },
29
29
  red: {
30
- light: {25: '#76000c', 30: '#8a0011', 55: '#de4745', 65: '#fa6762', 70: '#ff7f77', 80: '#ffaea7', 85: '#ffc4be'},
31
- dark: {25: '#5b2b28', 65: '#ee736c', 75: '#ff9890', 80: '#ffaea7', 85: '#ffc4be'},
30
+ light: {25: '#76000c', 30: '#8a0011', 45: '#c0262c', 55: '#de4745', 65: '#fa6762', 80: '#ffaea7', 85: '#ffc4be'},
31
+ dark: {25: '#5b2b28', 75: '#ff9890', 80: '#ffaea7'},
32
32
  },
33
33
  yellow: {
34
- light: {25: '#4b3900', 30: '#584400', 65: '#c29900', 75: '#e2b623', 80: '#eec448', 85: '#f8d36a'},
34
+ light: {25: '#4b3900', 30: '#584400', 45: '#836700', 65: '#c29900', 75: '#e2b623', 80: '#eec448', 85: '#f8d36a'},
35
35
  dark: {25: '#453a1c', 80: '#e3c36c', 90: '#fae19e'},
36
36
  },
37
37
  teal: {