@sondalab/ui-kit 0.3.0 → 0.4.0
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/agent/HANDOFF.md +3 -0
- package/agent/blessed/default.json +2 -1
- package/agent/design-language.md +1 -1
- package/components.css +6 -3
- package/package.json +1 -1
- package/themes/dark.css +2 -2
- package/themes/high-contrast.css +2 -2
- package/themes/light.css +2 -2
package/agent/HANDOFF.md
CHANGED
|
@@ -37,6 +37,9 @@ For elements already named eyebrow/tag, the recipe (mono + uppercase + tracking
|
|
|
37
37
|
### Font-family *(check 5 — dropped, not deferred)*
|
|
38
38
|
Evaluated and **dropped**: the only literal faces across the calibrated surfaces are introspect's IBM Plex Mono (a blessed mono substitute) and spexr's editor font (blessed). A font check would yield nothing. Just keep using `var(--sl-font-display|sans|mono)`; the only allowed substitution is a *narrower mono* where fixed pixel grids demand it (`design-language.md` L1), recorded as a blessed `font` deviation.
|
|
39
39
|
|
|
40
|
+
### Accent step derivation *(check 7 — advisory this release, mechanical next)*
|
|
41
|
+
`design-language.md` §Decision 2 now requires each accent step (`--sl-accent-hover/active/subtle`) to be a `color-mix()` off `--sl-accent-default`, not a baked literal — a literal is allowed only as an explicit per-(theme, step) token override with a reason (e.g. dark-active `#E0942A`). This is **syntactically checkable** (unlike the value-level checks above): a step declaration whose value is a bare hex/`rgb()` and is *not* a registered token override is a derivation defect. It ships **advisory** this release — judge it by eye, flag it in the migrate/author report, but the script does not yet fail on it. The mechanical check lands next release once the token-override escape-hatch list is settled. **How to judge:** open the product's theme layer; every accent step should read `color-mix(in srgb, var(--sl-accent-default) …)` or be a `sondalab.tokens.json accent.*` override carrying a `why`.
|
|
42
|
+
|
|
40
43
|
## Structural / judgement rules the script never sees
|
|
41
44
|
|
|
42
45
|
These are always yours (the `sl-ds-auditor` subagent covers them by reading `design-language.md`), scoped to the substrate's Required column in `substrate-matrix.json`:
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"kind": "color",
|
|
15
15
|
"values": [
|
|
16
|
+
"#F7B863",
|
|
16
17
|
"#8b96ff",
|
|
17
18
|
"#a3acff",
|
|
18
19
|
"rgba(139,150,255,0.12)",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"#5ad1ff",
|
|
21
22
|
"rgba(46,230,192,0.12)"
|
|
22
23
|
],
|
|
23
|
-
"why": "The showcase demonstrates the per-product accent registry (design-language.md §Decision 2): spexr's indigo and introspect's cyan (plus derived hover/subtle) appear as demo swatch content, not as a second accent adopted by the showcase. Blessed by exact value, not selector — the swatches live in a JS object with no distinctive selector."
|
|
24
|
+
"why": "The showcase demonstrates the per-product accent registry (design-language.md §Decision 2): spexr's indigo and introspect's cyan (plus derived hover/subtle) appear as demo swatch content, not as a second accent adopted by the showcase. Blessed by exact value, not selector — the swatches live in a JS object with no distinctive selector. #F7B863 is the amber demo hover, hardcoded in the same switcher object; once the dark accent hover became color-mix-derived it left the token allowlist, so it is blessed here alongside the other demo hovers (the switcher itself re-deriving is deferred to the migration)."
|
|
24
25
|
}
|
|
25
26
|
]
|
|
26
27
|
}
|
package/agent/design-language.md
CHANGED
|
@@ -44,7 +44,7 @@ Shared grammar, per-product accent. The brand default is amber (with a teal *dep
|
|
|
44
44
|
|
|
45
45
|
Machine values of this table: `packages/ui-kit/agent/accent-registry.json` (consumed by the compliance audit). The table above stays authoritative for the reasoning; `scripts/accent-registry.test.mjs` asserts product-set parity between the two.
|
|
46
46
|
|
|
47
|
-
Rule: a product picks **one** accent hue and derives hover/active/subtle from it; it never introduces a second chromatic accent. Semantic status colours (ok/warn/err) are separate from the accent and shared — but the `--sl-status-*` tokens are tuned for **on-canvas** use. On an inverted surface (a block whose background is the strongest neutral, e.g. an ink-on-paper output panel) they lose contrast; there, derive an on-ink status pair locally rather than using the canvas tokens (daos `.artifact .ok`/`.no` are a correct instance of this — kept as light-on-ink greens/reds, not swapped to the darker canvas tokens).
|
|
47
|
+
Rule: a product picks **one** accent hue and derives hover/active/subtle from it; it never introduces a second chromatic accent. **Derivation is concrete:** the generator emits each accent step as a `color-mix()` off `--sl-accent-default` (e.g. `--sl-accent-hover: color-mix(in srgb, var(--sl-accent-default) 89%, black)`), so a product override sets **only the hue** and the family re-derives. A baked step *literal* is allowed only as an explicit per-(theme, step) override in `sondalab.tokens.json` `accent.*` carrying a reason — the escape hatch for the few steps a straight mix can't reproduce (e.g. dark-active's slight hue rotation). This is enforced advisorily today (a judgement note); the audit gains a mechanical derivation check in a following release (see `packages/ui-kit/agent/HANDOFF.md`). Semantic status colours (ok/warn/err) are separate from the accent and shared — but the `--sl-status-*` tokens are tuned for **on-canvas** use. On an inverted surface (a block whose background is the strongest neutral, e.g. an ink-on-paper output panel) they lose contrast; there, derive an on-ink status pair locally rather than using the canvas tokens (daos `.artifact .ok`/`.no` are a correct instance of this — kept as light-on-ink greens/reds, not swapped to the darker canvas tokens).
|
|
48
48
|
|
|
49
49
|
## The family-resemblance layer
|
|
50
50
|
|
package/components.css
CHANGED
|
@@ -24,9 +24,12 @@
|
|
|
24
24
|
:root {
|
|
25
25
|
/* accent */
|
|
26
26
|
--slc-accent: var(--sl-accent-default, #B56A0C);
|
|
27
|
-
--slc-accent
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
/* Steps derive from --slc-accent so a bare --sl-accent-default override
|
|
28
|
+
(or a Tier-B product that maps only --slc-accent) re-derives the whole
|
|
29
|
+
family — no amber leak. The theme layer still wins when it sets the step. */
|
|
30
|
+
--slc-accent-hover: var(--sl-accent-hover, color-mix(in srgb, var(--slc-accent) 89%, black));
|
|
31
|
+
--slc-accent-active: var(--sl-accent-active, color-mix(in srgb, var(--slc-accent) 76%, black));
|
|
32
|
+
--slc-accent-subtle: var(--sl-accent-subtle, color-mix(in srgb, var(--slc-accent) 12%, transparent));
|
|
30
33
|
--slc-on-accent: var(--sl-text-on-accent, #FFFFFF);
|
|
31
34
|
/* surfaces + text */
|
|
32
35
|
--slc-surface: var(--sl-bg-surface, #F6F1E6);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sondalab/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Sondalab design tokens as CSS custom properties + the agentic core: component catalog, compliance audit (sl-audit), and author/migrate/adopt workflows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "marcellobarile",
|
package/themes/dark.css
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
--sl-status-danger: #f87171;
|
|
17
17
|
--sl-status-info: #38bdf8;
|
|
18
18
|
--sl-accent-default: #F5A83C;
|
|
19
|
-
--sl-accent-hover:
|
|
19
|
+
--sl-accent-hover: color-mix(in srgb, var(--sl-accent-default) 80%, white);
|
|
20
20
|
--sl-accent-active: #E0942A;
|
|
21
|
-
--sl-accent-subtle:
|
|
21
|
+
--sl-accent-subtle: color-mix(in srgb, var(--sl-accent-default) 16%, transparent);
|
|
22
22
|
--sl-accent-depth: #35A0B4;
|
|
23
23
|
--sl-focus-ring: #F5A83C;
|
|
24
24
|
}
|
package/themes/high-contrast.css
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--sl-status-danger: #ff5555;
|
|
17
17
|
--sl-status-info: #00ffff;
|
|
18
18
|
--sl-accent-default: #ffff00;
|
|
19
|
-
--sl-accent-hover:
|
|
20
|
-
--sl-accent-active:
|
|
19
|
+
--sl-accent-hover: color-mix(in srgb, var(--sl-accent-default) 37%, white);
|
|
20
|
+
--sl-accent-active: color-mix(in srgb, var(--sl-accent-default) 80%, black);
|
|
21
21
|
--sl-accent-subtle: #1a1a00;
|
|
22
22
|
--sl-accent-depth: #00ffff;
|
|
23
23
|
--sl-focus-ring: #ffff00;
|
package/themes/light.css
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
--sl-status-danger: #dc2626;
|
|
17
17
|
--sl-status-info: #0284c7;
|
|
18
18
|
--sl-accent-default: #B56A0C;
|
|
19
|
-
--sl-accent-hover:
|
|
20
|
-
--sl-accent-active:
|
|
19
|
+
--sl-accent-hover: color-mix(in srgb, var(--sl-accent-default) 89%, black);
|
|
20
|
+
--sl-accent-active: color-mix(in srgb, var(--sl-accent-default) 76%, black);
|
|
21
21
|
--sl-accent-subtle: rgba(197,122,22,0.12);
|
|
22
22
|
--sl-accent-depth: #14606C;
|
|
23
23
|
--sl-focus-ring: #B56A0C;
|