@tangle-network/brand 1.10.1 → 1.10.3
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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/styles/legacy-light.css +8 -8
- package/src/styles/tokens.css +7 -7
- package/src/styles/tokens.test.ts +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.10.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4f70eb8: The dark danger fill is a rose-red tint (`#5a3b40`, was `#533f3e`) at the warning fill's weight, with a quieter border (`#7d4d53`): the brown fill read as muddy beside the amber one. It lifts 1.34:1 off the card, and its text measures 5.53:1 on it.
|
|
8
|
+
|
|
9
|
+
## 1.10.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 74fbea5: The dark warning and danger fills are low-chroma raised tints (`#4b4232`, `#533f3e`, was `#6a402c` and `#733b36`) that still lift 1.3:1 off the card, so a callout no longer outweighs the content beside it. Their text measures 5.92:1 and 5.49:1 on the fill. The dark violet fill is `#403d66` with `#c9c4ff` text (6.17:1), so a "Merged" pill reads as a raised chip rather than a dark hole on the card. The teal and orange fills are unchanged.
|
|
14
|
+
|
|
3
15
|
## 1.10.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* GENERATED by scripts/gen-compat.mjs. Do not edit.
|
|
2
2
|
* Source: tokens.css + named-themes.css
|
|
3
|
-
* SHA-256:
|
|
3
|
+
* SHA-256: 0fdc5d2db8f1ba9c33012843b867dcc50d8094eada6ebbc915d46a14d5c2b1e2
|
|
4
4
|
* Light-default compatibility; all explicit modes remain canonical.
|
|
5
5
|
*/
|
|
6
6
|
:where(:root),
|
|
@@ -121,11 +121,11 @@
|
|
|
121
121
|
--surface-success-bg: #2f5146;
|
|
122
122
|
--surface-success-border: #3c7760;
|
|
123
123
|
--surface-success-text: #5ed7a4;
|
|
124
|
-
--surface-warning-bg: #
|
|
125
|
-
--surface-warning-border: #
|
|
124
|
+
--surface-warning-bg: #4b4232;
|
|
125
|
+
--surface-warning-border: #7a6236;
|
|
126
126
|
--surface-warning-text: #f4c14f;
|
|
127
|
-
--surface-danger-bg: #
|
|
128
|
-
--surface-danger-border: #
|
|
127
|
+
--surface-danger-bg: #5a3b40;
|
|
128
|
+
--surface-danger-border: #7d4d53;
|
|
129
129
|
--surface-danger-text: #ffada9;
|
|
130
130
|
--surface-info-bg: #2d4e67;
|
|
131
131
|
--surface-info-border: #3d7292;
|
|
@@ -133,9 +133,9 @@
|
|
|
133
133
|
--surface-teal-bg: #042f2e;
|
|
134
134
|
--surface-teal-border: #134e4a;
|
|
135
135
|
--surface-teal-text: #2dd4bf;
|
|
136
|
-
--surface-violet-bg: #
|
|
137
|
-
--surface-violet-border: #
|
|
138
|
-
--surface-violet-text: #
|
|
136
|
+
--surface-violet-bg: #403d66;
|
|
137
|
+
--surface-violet-border: #5f58b8;
|
|
138
|
+
--surface-violet-text: #c9c4ff;
|
|
139
139
|
--surface-orange-bg: #431407;
|
|
140
140
|
--surface-orange-border: #7c2d12;
|
|
141
141
|
--surface-orange-text: #fb923c;
|
package/src/styles/tokens.css
CHANGED
|
@@ -197,11 +197,11 @@
|
|
|
197
197
|
--surface-success-bg: #2f5146;
|
|
198
198
|
--surface-success-border: #3c7760;
|
|
199
199
|
--surface-success-text: #5ed7a4;
|
|
200
|
-
--surface-warning-bg: #
|
|
201
|
-
--surface-warning-border: #
|
|
200
|
+
--surface-warning-bg: #4b4232;
|
|
201
|
+
--surface-warning-border: #7a6236;
|
|
202
202
|
--surface-warning-text: #f4c14f;
|
|
203
|
-
--surface-danger-bg: #
|
|
204
|
-
--surface-danger-border: #
|
|
203
|
+
--surface-danger-bg: #5a3b40;
|
|
204
|
+
--surface-danger-border: #7d4d53;
|
|
205
205
|
--surface-danger-text: #ffada9;
|
|
206
206
|
--surface-info-bg: #2d4e67;
|
|
207
207
|
--surface-info-border: #3d7292;
|
|
@@ -209,9 +209,9 @@
|
|
|
209
209
|
--surface-teal-bg: #042f2e;
|
|
210
210
|
--surface-teal-border: #134e4a;
|
|
211
211
|
--surface-teal-text: #2dd4bf;
|
|
212
|
-
--surface-violet-bg: #
|
|
213
|
-
--surface-violet-border: #
|
|
214
|
-
--surface-violet-text: #
|
|
212
|
+
--surface-violet-bg: #403d66;
|
|
213
|
+
--surface-violet-border: #5f58b8;
|
|
214
|
+
--surface-violet-text: #c9c4ff;
|
|
215
215
|
--surface-orange-bg: #431407;
|
|
216
216
|
--surface-orange-border: #7c2d12;
|
|
217
217
|
--surface-orange-text: #fb923c;
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
blockIn,
|
|
6
6
|
compositeOver,
|
|
7
7
|
contrastRatio,
|
|
8
|
+
hexIn,
|
|
8
9
|
hexRelativeLuminanceIn,
|
|
9
10
|
hslIn,
|
|
10
11
|
hslToRgb,
|
|
@@ -489,3 +490,33 @@ describe("canonical light spine", () => {
|
|
|
489
490
|
}
|
|
490
491
|
});
|
|
491
492
|
});
|
|
493
|
+
|
|
494
|
+
describe("dark status surfaces carry their tone in hue, not weight", () => {
|
|
495
|
+
// A warning or error callout sits on the card beside the content it is about.
|
|
496
|
+
// A saturated fill (the warning was a 41% brown) outweighed that content; a
|
|
497
|
+
// low-chroma raised fill keeps the lift the chip contract above asks for,
|
|
498
|
+
// while the border and the text carry the tone.
|
|
499
|
+
const saturation = ([r, g, b]: [number, number, number]) => {
|
|
500
|
+
const max = Math.max(r, g, b) / 255;
|
|
501
|
+
const min = Math.min(r, g, b) / 255;
|
|
502
|
+
const light = (max + min) / 2;
|
|
503
|
+
if (max === min) return 0;
|
|
504
|
+
return (max - min) / (light > 0.5 ? 2 - max - min : max + min);
|
|
505
|
+
};
|
|
506
|
+
for (const tone of ["warning", "danger"]) {
|
|
507
|
+
it(`${tone}: the dark fill stays under 25% saturation`, () => {
|
|
508
|
+
expect(saturation(hexIn(DARK, `surface-${tone}-bg`))).toBeLessThanOrEqual(0.25);
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
it("violet: the dark fill lifts off the card like the status chips", () => {
|
|
512
|
+
const card = hslToRgb(hslIn(DARK, "hsl-card"));
|
|
513
|
+
expect(contrastRatio(hexIn(DARK, "surface-violet-bg"), card)).toBeGreaterThanOrEqual(1.3);
|
|
514
|
+
});
|
|
515
|
+
for (const tone of ["warning", "danger", "violet"]) {
|
|
516
|
+
it(`${tone}: its text clears AA on its own dark fill`, () => {
|
|
517
|
+
expect(
|
|
518
|
+
contrastRatio(hexIn(DARK, `surface-${tone}-text`), hexIn(DARK, `surface-${tone}-bg`)),
|
|
519
|
+
).toBeGreaterThanOrEqual(4.5);
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
});
|