@7365admin1/layer-common 3.2.2-staging.120 → 3.2.2-staging.121

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/utils/theme.ts CHANGED
@@ -27,28 +27,55 @@
27
27
  */
28
28
 
29
29
  /**
30
- * WHAT MOVED FROM THE DESIGN, AND WHY - the owner's decision, 2026-08-13:
31
- * "minimal darkening, keep the look".
30
+ * THE SIX LIGHT VALUES ARE BACK ON THE DESIGN - the owner's decision,
31
+ * 2026-08-14, which REVERSES the 2026-08-13 one recorded below.
32
32
  *
33
- * Measured against the design as handed over, the LIGHT theme failed AA on 27
34
- * text pairs and the DARK theme on 6. Six light values move, none by enough to
35
- * read as a different colour, and the dark theme's own palette is untouched:
33
+ * 2026-08-13 was "minimal darkening, keep the look": the light theme failed AA
34
+ * on 27 text pairs as handed over, so six values were darkened just enough to
35
+ * clear 4.5:1. 2026-08-14 is "100% design fidelity over WCAG AA" - the darker
36
+ * `--muted` in particular flattened the hierarchy the design is built on, and
37
+ * that was visible on staging. All six go back to the handoff, exactly:
36
38
  *
37
- * --muted #8b8f98 -> #6b7079 (table headers, breadcrumbs, sub-lines)
38
- * --ok #0f8a62 -> #0e7c58 (-10%)
39
- * --warn #a97a14 -> #8e6611 (-16%)
40
- * --err #cf4b4b -> #bc4444 (-9%)
41
- * --info #3b6fd4 -> #3869c9 (-5%)
42
- * --accent-text #4a6eb6 -> #476aaf (-4%)
39
+ * --muted #6b7079 -> #8b8f98
40
+ * --ok #0e7c58 -> #0f8a62
41
+ * --warn #8e6611 -> #a97a14
42
+ * --err #bc4444 -> #cf4b4b
43
+ * --info #3869c9 -> #3b6fd4
44
+ * --accent-text #476aaf -> #4a6eb6
43
45
  *
44
- * The soft chip BACKGROUNDS are left exactly as designed. The design states
45
- * them literally rather than deriving them from the foreground, so darkening a
46
- * label does not drag its chip with it - a Pending chip is the same colour it
47
- * was, its text is simply readable on it.
46
+ * WHAT THAT KNOWINGLY COSTS: 16 of the 22 light pairs a person reads are now
47
+ * below AA. `utils/theme-aa-ledger.ts` is the full list with measured ratios and
48
+ * `theme.test.ts` pins every one of them, so the failures are recorded rather
49
+ * than hidden and any later drift - in either direction - still fails the build.
50
+ * The worst, measured (WCAG 2.1, alpha composited):
51
+ *
52
+ * --muted on the page bg 2.99:1 (needs 4.5)
53
+ * --muted on a table header band 3.10:1
54
+ * --muted on the sidebar 3.13:1
55
+ * --muted on a card 3.24:1 - every table header, breadcrumb,
56
+ * KPI sub-line and empty state
57
+ * --warn on its Pending chip 3.38:1
58
+ * --ok on its chip 3.82:1
59
+ * --warn / white on warn fill 3.83:1
60
+ * --err on its chip 3.86:1
61
+ *
62
+ * Six light pairs still pass: text, text2, info as text, white on the info fill,
63
+ * accent-text as a link, and white on primary-button.
64
+ *
65
+ * The DARK theme was exact as handed over and still is, and its AA assertions
66
+ * are untouched - dark mode remains fully compliant.
67
+ *
68
+ * `--accent-strong` (#4b74c4) is NOT one of the six and does not move. It is an
69
+ * addition, not a darkening: the design puts white on `--accent` at 3.23:1, and
70
+ * `--accent` itself is still the design's exact colour everywhere it is a line,
71
+ * a fill edge or a soft background. See the note below.
72
+ *
73
+ * The soft chip BACKGROUNDS are, and always were, exactly as designed.
48
74
  *
49
75
  * `--accent-text` is `color-mix(in oklab, var(--accent) 75%, var(--text))` in
50
76
  * the design. It is resolved to a plain hex here because Vuetify needs a
51
- * concrete colour and because a test cannot measure a `color-mix()`.
77
+ * concrete colour and because a test cannot measure a `color-mix()`; the hex
78
+ * below is that mix resolved in a browser, not an approximation.
52
79
  */
53
80
 
54
81
  /**
@@ -122,22 +149,22 @@ export const PALETTE = {
122
149
  text: "#191b1f",
123
150
  /** Secondary text. 9.62:1 on a card. */
124
151
  text2: "#41454d",
125
- /** Table headers, breadcrumbs, KPI sub-lines. 4.98:1 on a card. */
126
- muted: "#6b7079",
127
- /** Completed / Paid / Available / Open. 4.58:1 on its chip. */
128
- ok: "#0e7c58",
129
- /** Pending. 4.56:1 on its chip. */
130
- warn: "#8e6611",
131
- /** In Use / Closed / Checkout. 4.55:1 on its chip. */
132
- err: "#bc4444",
133
- /** Role and info tags. 4.58:1 on its chip. */
134
- info: "#3869c9",
152
+ /** Table headers, breadcrumbs, KPI sub-lines. The design's. 3.24:1 on a card - below AA, knowingly. */
153
+ muted: "#8b8f98",
154
+ /** Completed / Paid / Available / Open. The design's. 3.82:1 on its chip - below AA, knowingly. */
155
+ ok: "#0f8a62",
156
+ /** Pending. The design's. 3.38:1 on its chip - below AA, knowingly. */
157
+ warn: "#a97a14",
158
+ /** In Use / Closed / Checkout. The design's. 3.86:1 on its chip - below AA, knowingly. */
159
+ err: "#cf4b4b",
160
+ /** Role and info tags. The design's. 4.20:1 on its chip - below AA, knowingly. */
161
+ info: "#3b6fd4",
135
162
  /** The brand accent, exactly as designed. Never carries white lettering. */
136
163
  accent: "#5b8def",
137
164
  /** The only place the accent is darkened: fills with a white label. 4.57:1. */
138
165
  accentStrong: "#4b74c4",
139
- /** Links, active nav item, active tab. 4.57:1 on `--accent-soft`. */
140
- accentText: "#476aaf",
166
+ /** Links, active nav item, active tab. The design's oklab mix, resolved. 4.29:1 on `--accent-soft` over the sidebar - below AA, knowingly. */
167
+ accentText: "#4a6eb6",
141
168
  /** Labels on the filled colours above. Light's fills carry white. */
142
169
  onFill: "#ffffff",
143
170
  },