@bsuite/theme 0.11.1 → 0.11.2

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 +1 -1
  2. package/src/css/vars.css +36 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsuite/theme",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
package/src/css/vars.css CHANGED
@@ -67,6 +67,25 @@
67
67
  --neon-electric-teal: oklch(0.600 0.130 195); /* success */
68
68
  --neon-electric-deep: oklch(0.380 0.140 270); /* secondary action */
69
69
 
70
+ /* The two words the estate uses loosely, pinned to values. Operator ruling
71
+ 2026-08-02 ("white is primary: #f8f9fa") in terms: "define --white and
72
+ --black once in the token source and reference them everywhere; never
73
+ write either literal inline." This is that definition — it did not exist
74
+ until 2026-08-13, which is why the sanctioned replacement values named in
75
+ packages/eslint-config/rules/no-hardcoded-colours.js had no token to point
76
+ at and every legacy pure-white literal got fixed by inventing a fresh
77
+ near-white instead.
78
+ CHOSEN FROM THE CONTRACT, NOT INVENTED — both are now recorded in
79
+ packages/theme/docs/d2c-theme-source-of-truth.html (L1), which is what the
80
+ palette gate reads. Mode-invariant on purpose: these name the colours, not
81
+ a surface role, so they are NOT overridden under .dark. If you want "the
82
+ page background", that is --role-bg-body and it does flip.
83
+ Note the banned endpoints are DESCRIBED here and never spelled out. C1
84
+ scans comments and counts a literal whether or not the sentence around it
85
+ says "never" — writing one to forbid it raises the ratchet. */
86
+ --white: oklch(0.982 0.002 247.8); /* the near-white, #f8f9fa */
87
+ --black: oklch(0.166 0.026 269.4); /* the near-black, #0a0e1a */
88
+
70
89
  /* ============================================================
71
90
  LAYER 2 — SURFACE PRIMITIVES (light mode)
72
91
  ============================================================ */
@@ -554,6 +573,23 @@
554
573
  --role-bg-input: oklch(0.240 0.020 260);
555
574
  --role-bg-sunken: oklch(0.145 0.022 268);
556
575
  --role-border: var(--dark-border);
576
+ /* Dark-mode `--role-border-strong` was MISSING, so `.dark` inherited the
577
+ light value from `:root` — oklch(0.880 0.008 250), i.e. #d4d8dd. Measured
578
+ against `--role-bg-panel` that is 12.88:1: a near-white hairline on navy,
579
+ in the 50 files across crm7, conduit, BSU and throughput that use
580
+ `border-strong`. Not a subtle miss — the brightest thing on the panel.
581
+
582
+ `braden.css` has carried both variants since it was written (0.900/0.840
583
+ light, 0.320/0.420 dark). Only the D2C theme was half-defined, which is
584
+ why nobody reading the corporate theme would spot it.
585
+
586
+ Value is oklch(0.52 0.02 248) from the D2C source-of-truth document, so
587
+ the palette whitelist accepts it. It sits +0.09 L above `--dark-border`
588
+ (0.428), mirroring the light pair's step, and measures 3.36:1 against
589
+ `--role-bg-panel` and 3.61:1 against `--role-bg-sunken` — clearing the
590
+ WCAG 1.4.11 non-text-contrast floor of 3:1 on both dark surfaces.
591
+ `--role-border` itself is 2.26:1, which is why "strong" has to exist. */
592
+ --role-border-strong: oklch(0.52 0.02 248);
557
593
 
558
594
  /* Role text variants rebind for the dark surface — all AAA on navy. */
559
595
  --role-primary-text: oklch(0.721 0.215 262.9); /* 7.01:1 ✓ AAA */