@bsuite/theme 0.10.5 → 0.10.6

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/css/braden.css +49 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsuite/theme",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
@@ -11,7 +11,7 @@
11
11
  "url": "https://github.com/GaryOcean428/bsuite.git",
12
12
  "directory": "packages/theme"
13
13
  },
14
- "description": "BSuite Universal theme \u2014 D2C Neon Electric + Braden Corporate baselines. Tailwind v4 preset, CSS vars (5-layer), role aliases, colourblind-safe tokens, eye-strain-safe text scale, BrandingProvider (runtime white-label). Used by BSU, CRM7, conduit, R80.3, throughput (D2C) and braden.com.au (Corporate).",
14
+ "description": "BSuite Universal theme D2C Neon Electric + Braden Corporate baselines. Tailwind v4 preset, CSS vars (5-layer), role aliases, colourblind-safe tokens, eye-strain-safe text scale, BrandingProvider (runtime white-label). Used by BSU, CRM7, conduit, R80.3, throughput (D2C) and braden.com.au (Corporate).",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/css",
@@ -24,10 +24,32 @@
24
24
  * already false twice over: the 0.7.0 separation-first contract retired purple
25
25
  * for semantics, and the Corporate contract binds error to --braden-indigo.
26
26
  *
27
- * ERROR IS INDIGO HERE, NOT RED deliberately, and for the opposite reason to
28
- * D2C. D2C's primary is blue, so error must be red to separate from it.
29
- * Corporate's primary IS red, so a red error would collide with the brand's
30
- * own primary action colour. Same rule, inverted inputs.
27
+ * ERROR IS RED HERE OPERATOR RULING 2026-08-10, superseding the indigo rule.
28
+ * Braden: "use standard error red not braden corporate red."
29
+ *
30
+ * What this overturns. 0.4.0 bound error to --braden-indigo on a
31
+ * separation-first argument: D2C's primary is blue so error must be red;
32
+ * Corporate's primary IS red so error must not be. That reasoning was sound
33
+ * and it is no longer the rule. Error now uses --error-red, the SAME standard
34
+ * error red the D2C brand uses (oklch(0.580 0.230 25)) — one error colour
35
+ * across the estate. Recognition beats palette separation: a person reads red
36
+ * as "danger" before they read it as "Braden".
37
+ *
38
+ * --error-red is NOT a Braden brand colour and must never be used as one. It
39
+ * is permitted here for the error/destructive roles only. It stays inside the
40
+ * palette whitelist because it is a value the D2C source-of-truth document
41
+ * already ships; the whitelist pools both contracts.
42
+ *
43
+ * THE COST, MEASURED, SO NOBODY REDISCOVERS IT AS A BUG:
44
+ * ΔE_oklch(error red, --braden-red) = 0.113 ← now the palette's tightest pair
45
+ * ΔE_oklch(old indigo, --braden-red) = 0.312
46
+ * The Corporate contract's previously-worst pair was 0.143. A destructive
47
+ * button and a primary button are now both red, separated by lightness (0.092)
48
+ * and chroma rather than hue, and under deuteranopia lightness is nearly all
49
+ * that survives. THEREFORE: destructive actions on Corporate must carry an
50
+ * icon or an explicit verb ("Delete"), never colour alone. The contract
51
+ * already said shape and label do more work on this brand than on D2C; after
52
+ * this ruling that is load-bearing rather than advisory.
31
53
  */
32
54
 
33
55
 
@@ -52,6 +74,12 @@
52
74
  --braden-teal-deep: oklch(0.500 0.140 220);
53
75
  --braden-aqua: oklch(0.800 0.130 198);
54
76
 
77
+ /* NOT A BRAND COLOUR. The estate's single standard error red, identical to
78
+ D2C's, bound to error/destructive only — operator ruling 2026-08-10.
79
+ Never bind this to primary, accent, a gradient stop or any decorative
80
+ surface: doing so puts a non-Braden red on a Braden page. */
81
+ --error-red: oklch(0.580 0.230 25);
82
+
55
83
  /* ============================================================
56
84
  LAYER 2 — SURFACES AND BORDERS
57
85
  ============================================================ */
@@ -109,13 +137,16 @@
109
137
 
110
138
  /* ============================================================
111
139
  LAYER 3 — SEMANTIC ROLES
112
- error = --braden-indigo: Corporate primary is RED, so error cannot be.
140
+ error = --error-red, the estate's standard error red operator ruling
141
+ 2026-08-10. It is deliberately NOT --braden-red: the brand primary and the
142
+ destructive colour must still be two different values, even now that both
143
+ are red. See the header for the measured separation and what it obliges.
113
144
  ============================================================ */
114
145
  --role-primary: var(--braden-red);
115
146
  --role-secondary: var(--braden-navy);
116
147
  --role-accent: var(--braden-gold);
117
- --role-error: var(--braden-indigo);
118
- --role-destructive: var(--braden-indigo);
148
+ --role-error: var(--error-red);
149
+ --role-destructive: var(--error-red);
119
150
  --role-warning: var(--braden-gold);
120
151
  --role-success: var(--braden-aqua);
121
152
  --role-info: var(--braden-teal-deep);
@@ -185,7 +216,10 @@
185
216
  --role-primary-text: oklch(0.566 0.170 17.6);
186
217
  --role-accent-text-base: oklch(0.544 0.092 89.9);
187
218
  --role-accent-text: var(--role-accent-text-base);
188
- --role-error-text: oklch(0.562 0.200 270);
219
+ /* Red, per the 2026-08-10 ruling. Measured on Corporate's own light
220
+ surfaces, not inherited from D2C's: 6.18:1 on --role-bg-body,
221
+ 6.44:1 on --role-bg-panel. Both ✓ AA. */
222
+ --role-error-text: oklch(0.482 0.230 25);
189
223
  --role-warning-text: oklch(0.544 0.092 89.9);
190
224
  --role-success-text: oklch(0.515 0.130 198);
191
225
  --role-info-text: oklch(0.519 0.140 220);
@@ -196,6 +230,10 @@
196
230
  --text-on-light-fill: oklch(0.980 0.006 50);
197
231
  --text-on-dark-fill: oklch(0.190 0.020 250);
198
232
  --text-on-primary: var(--text-on-light-fill);
233
+ /* On the new error red (L 0.58) this measures 4.54:1 — ✓ AA, but with no
234
+ headroom. It was 9.35:1 on the old indigo fill (L 0.40). If the error
235
+ fill is ever lightened, re-measure before shipping: a tenth of a point of
236
+ lightness drops it below AA. */
199
237
  --text-on-error: var(--text-on-light-fill);
200
238
  --text-on-accent: var(--text-on-dark-fill);
201
239
  --text-on-warning: var(--text-on-dark-fill);
@@ -289,7 +327,9 @@
289
327
  --role-primary-text: oklch(0.704 0.170 17.6);
290
328
  --role-accent-text-base: oklch(0.683 0.092 89.9);
291
329
  --role-accent-text: var(--role-accent-text-base);
292
- --role-error-text: oklch(0.711 0.200 270);
330
+ /* Red, per the 2026-08-10 ruling. 7.24:1 on --role-bg-body,
331
+ 6.51:1 on --role-bg-panel. Both ✓ AA. */
332
+ --role-error-text: oklch(0.786 0.230 25);
293
333
  --role-warning-text: oklch(0.683 0.092 89.9);
294
334
  --role-success-text: oklch(0.662 0.130 198);
295
335
  --role-info-text: oklch(0.667 0.140 220);