Skip to content

Commit 8d623dc

Browse files
committed
Merge 9afe78e (meta#8071 with main, meta#8058 and meta#8054 landed) as a dependency
2 parents 614c134 + 654fc04 commit 8d623dc

132 files changed

Lines changed: 7726 additions & 1067 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/status-color-roles.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
'@astryxdesign/core': patch
3+
'@astryxdesign/cli': patch
4+
'@astryxdesign/richtext': patch
5+
'@astryxdesign/theme-neutral': patch
6+
'@astryxdesign/theme-butter': patch
7+
'@astryxdesign/theme-chocolate': patch
8+
'@astryxdesign/theme-gothic': patch
9+
'@astryxdesign/theme-matcha': patch
10+
'@astryxdesign/theme-stone': patch
11+
'@astryxdesign/theme-y2k': patch
12+
---
13+
14+
[feat] Status colours now have a role for each surface, and Info is a new status. For each of info, success, warning, and error: `--color-<status>` is the strong fill and `--color-on-<status>` is content on it, at 4.5:1 or more; `--color-<status>-muted` is the pale fill, with `--color-on-<status>-muted` content; and `--color-text-<status>` is readable status text on the page and cards, with `--color-icon-<status>` and `--color-border-<status>` (status icons and borders) defaulting to it. `--color-info`, `--color-on-info`, `--color-info-muted`, and the other Info roles are new and independent of the accent. Tailwind gains `bg-info`, `bg-info-muted`, `text-on-<status>`, `text-on-<status>-muted`, and `text-status-<status>` (the status text role).
15+
16+
`--color-success`, `--color-warning`, and `--color-error` and `bg-<status>` keep their meaning as the strong fills. Tailwind now projects each status by paint property: `text-`, `decoration-`, `placeholder-`, and `caret-<status>` read the status text role, and `border-`, `divide-`, `outline-`, and `ring-<status>` read the status border role, so status text and lines are readable on the page; `bg-`, `accent-`, `fill-`, `stroke-<status>`, shadow colours, and gradients keep the strong fill. for example, Core's light `text-warning` is now `#753F07` instead of `#E9AF08`, and `text-success` is `#09441F` instead of `#0D8626`. To keep the fill colour on text, use `text-[var(--color-warning)]`.
17+
18+
What changes on screen:
19+
- Core's dark Error content (`--color-on-error`) is now `#0A1317` instead of white, so text on dark-mode error fills reaches 4.5:1. Core's Info Badge uses `--color-info` (`#0064E0`) instead of the accent; in dark mode the accent was `#2694FE`.
20+
- Icon `color="info|success|warning|error"`, Stepper status glyphs, and Chat tool-call status icons use the icon roles, which are the readable text colours. For example, Core's success icon is now `#09441F` (light) instead of `#0D8626`.
21+
- Input and FileInput status borders use the border roles. Core's light warning border is now `#753F07` instead of `#E9AF08`. Butter's light success and warning input rims are now mid-ramp stops that reach 3:1.
22+
- Banner paints its built-in title, description, icon, and controls with the on-muted roles, and fills Info with `--color-info-muted`.
23+
- Status fills keep a visible boundary in forced-colors mode.
24+
- Chocolate and Matcha's `--color-on-success` and `--color-on-error` are now a dark ink instead of white, and Stone's `--color-on-success`, `--color-on-warning` and `--color-on-error` are white in light mode and near-black in dark mode instead of the status hue, so content on those fills reaches 4.5:1.
25+
- Neutral's `--color-success`, `--color-warning`, and `--color-error` are now its status fills, the colours its Badges already showed: success `#00490B` to `#198100` (dark `#A4D6A3` to `#64AF4C`), warning `#4B3900` to `#FFCE2F` (dark `#F8D36A` to `#FFCE2F`), and error `#76000C` to `#C9303A` (dark `#FFC4BE` to `#FF705D`); `--color-info` is `#0074E2` (dark `#6D9CFE`). Its Badges, StatusDots, progress fills, and Stepper badges look the same, and its `text-<status>` utilities read its status text roles.
26+
- Neutral drops its own status overrides and uses the standard roles: the accent variants of ProgressBar, StatusDot, and Stepper now paint Neutral's accent instead of blue, and Banner and the pale destructive Button use the standard overlays. Neutral no longer defines its proposed and undocumented local tokens; use the standard roles instead: `--astryx-theme-neutral-color-status-fill-success`, `-status-fill-warning`, and `-status-fill-error` → `--color-success`, `--color-warning`, `--color-error`; `-status-muted-accent` → `--color-info-muted`; `-on-tint-neutral` → `--color-neutral`; `-on-tint-overlay-hover`, `-on-tint-overlay-pressed`, `-destructive-overlay-hover`, and `-destructive-overlay-pressed` → `--color-overlay-hover` and `--color-overlay-pressed`. `--astryx-theme-neutral-color-status-fill-accent` keeps its value for Neutral extensions but is deprecated and no longer used by Neutral.
27+
- Every first-party theme sets a blue `--color-info`; Chocolate and Matcha Info Badges move from the accent to that blue (Butter keeps its own Info Badge colours).
28+
29+
Custom themes get the content and text roles they don't set: theme generation derives `--color-on-<status>` (light or dark content, whichever contrasts more), readable status text, and on-muted content from the theme's status fills. To keep a component's previous colour, set the matching role in your theme; for example, set `--color-icon-success` to your old `--color-success` value.
30+
31+
@rubyycheung

‎.changeset/uikit-motion-math.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[chore] Internal: the spring, decay, rubber-band and projection math of UIKit for touch presentations, as pure functions checked against an independent integration and against values read from UIKit. Not exported from the package entry point; no component uses it yet.
6+
7+
@vjeux

‎apps/example-nextjs-tailwind/src/app/page.tsx‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,21 @@ export default function Home() {
139139
{/* Status colors */}
140140
<Text type="label">Status colors</Text>
141141
<div className="flex gap-3">
142-
<div className="flex items-center gap-2 rounded-md bg-success/10 px-3 py-2">
142+
<div className="flex items-center gap-2 rounded-md bg-success-muted px-3 py-2">
143143
<div className="h-2 w-2 rounded-full bg-success" />
144-
<span className="text-sm font-medium text-success">
144+
<span className="text-sm font-medium text-on-success-muted">
145145
Success
146146
</span>
147147
</div>
148-
<div className="flex items-center gap-2 rounded-md bg-error/10 px-3 py-2">
148+
<div className="flex items-center gap-2 rounded-md bg-error-muted px-3 py-2">
149149
<div className="h-2 w-2 rounded-full bg-error" />
150-
<span className="text-sm font-medium text-error">Error</span>
150+
<span className="text-sm font-medium text-on-error-muted">
151+
Error
152+
</span>
151153
</div>
152-
<div className="flex items-center gap-2 rounded-md bg-warning/10 px-3 py-2">
154+
<div className="flex items-center gap-2 rounded-md bg-warning-muted px-3 py-2">
153155
<div className="h-2 w-2 rounded-full bg-warning" />
154-
<span className="text-sm font-medium text-warning">
156+
<span className="text-sm font-medium text-on-warning-muted">
155157
Warning
156158
</span>
157159
</div>

‎apps/sandbox/src/app/(raw)/pages/mobile-prototypes/primitives.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ export function BottomSheetMenu({
764764
a.variant === 'destructive' && a.icon != null ? (
765765
<span
766766
style={{
767-
color: 'var(--color-error)',
767+
color: 'var(--color-text-error)',
768768
display: 'inline-flex',
769769
}}>
770770
{a.icon}
@@ -779,7 +779,9 @@ export function BottomSheetMenu({
779779
}}
780780
label={
781781
a.variant === 'destructive' ? (
782-
<span style={{color: 'var(--color-error)'}}>{a.label}</span>
782+
<span style={{color: 'var(--color-text-error)'}}>
783+
{a.label}
784+
</span>
783785
) : (
784786
a.label
785787
)

‎apps/sandbox/src/app/(sandbox)/pages/palette-generator/page.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ function CompareResultView({
509509
style={{
510510
padding: 10,
511511
borderRadius: 8,
512-
color: 'var(--color-error)',
512+
color: 'var(--color-on-error-muted)',
513513
backgroundColor: 'var(--color-error-muted)',
514514
}}>
515515
<strong>{error.familyId}:</strong> {error.message}
@@ -781,7 +781,7 @@ function ResultView({result}: {result: PaletteGenerationResult}) {
781781
style={{
782782
padding: 10,
783783
borderRadius: 8,
784-
color: 'var(--color-error)',
784+
color: 'var(--color-on-error-muted)',
785785
backgroundColor: 'var(--color-error-muted)',
786786
}}>
787787
<strong>{error.familyId}:</strong> {error.message}

‎apps/sandbox/src/app/(sandbox)/pages/textarea-counter/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const styles = stylex.create({
4040
whiteSpace: 'nowrap',
4141
},
4242
counterError: {
43-
color: colorVars['--color-error'],
43+
color: colorVars['--color-text-error'],
4444
},
4545
counterPinned: {
4646
flexShrink: 0,

‎apps/storybook/stories/Icon.stories.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export const InheritColor: Story = {
273273
</span>
274274
<span
275275
style={{
276-
color: 'red',
276+
color: 'var(--color-text-error)',
277277
display: 'flex',
278278
alignItems: 'center',
279279
gap: '4px',

‎apps/storybook/stories/Stepper.stories.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,19 +239,19 @@ export const StatusAllStates: Story = {
239239
<Step
240240
step={1}
241241
label="Success"
242-
description="--color-success"
242+
description="--color-icon-success"
243243
status="success"
244244
/>
245245
<Step
246246
step={2}
247247
label="Warning"
248-
description="--color-warning"
248+
description="--color-icon-warning"
249249
status="warning"
250250
/>
251251
<Step
252252
step={3}
253253
label="Error"
254-
description="--color-error"
254+
description="--color-icon-error"
255255
status="error"
256256
/>
257257
<Step

0 commit comments

Comments
 (0)