@sondalab/ui-kit 0.3.0 → 0.5.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 -6
- package/agent/design-language.md +1 -1
- package/components.css +6 -3
- package/package.json +4 -2
- package/themes/dark.css +3 -2
- package/themes/high-contrast.css +3 -3
- package/themes/light.css +3 -3
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 requires **every** accent step (`--sl-accent-hover/active/subtle`) to be a hue-relative expression off `--sl-accent-default` — `color-mix()` (Baseline) or `oklch(from var(--sl-accent-default) …)` relative colour (dark-active only) — never a bare literal that would leak the previous hue when a product overrides only the default. The relative-colour step carries a preceding baked-literal **fallback** line (for browsers below the relative-colour floor); that fallback is the *only* legitimate bare-literal accent-step declaration, and it is always paired with a following `oklch(...)`/`var(--sl-accent-default)` line. This is **syntactically checkable** (unlike the value-level checks above): an accent-step declaration whose value is a bare hex/`rgb()` with **no** sibling relative-colour declaration for the same property 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. **How to judge:** open the product's theme layer; every accent step should read `color-mix(in srgb, var(--sl-accent-default) …)` or an `oklch(from var(--sl-accent-default) …)` (optionally preceded by its fallback literal on the same property).
|
|
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`:
|
|
@@ -14,13 +14,9 @@
|
|
|
14
14
|
"kind": "color",
|
|
15
15
|
"values": [
|
|
16
16
|
"#8b96ff",
|
|
17
|
-
"#
|
|
18
|
-
"rgba(139,150,255,0.12)",
|
|
19
|
-
"#2ee6c0",
|
|
20
|
-
"#5ad1ff",
|
|
21
|
-
"rgba(46,230,192,0.12)"
|
|
17
|
+
"#2ee6c0"
|
|
22
18
|
],
|
|
23
|
-
"why": "The
|
|
19
|
+
"why": "The two non-amber demo hues in the showcase accent switcher: spexr's indigo and introspect's cyan, both registered product accents (accent-registry.json). They appear as demo swatch content so the page can show the per-product registry (design-language.md §Decision 2), not as a second accent adopted by the showcase. Blessed by exact value — they live in a JS object with no distinctive selector. Only the hue is listed now: hover/active/subtle are no longer hardcoded (the switcher sets only the hue and they re-derive), so the previous demo step-literals are gone."
|
|
24
20
|
}
|
|
25
21
|
]
|
|
26
22
|
}
|
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 and complete:** the generator emits **every** accent step as a hue-relative expression off `--sl-accent-default`, so a product override that sets **only the hue** re-derives the whole family (the one-var contract — no step is a bare literal that could leak the previous hue). Two forms: `color-mix()` off `--sl-accent-default` for steps a straight mix reproduces (hover everywhere, subtle everywhere, light/HC active), and CSS **relative colour** — `oklch(from var(--sl-accent-default) calc(l * k) calc(c * s) h)` — for a step whose hand-tune a mix can't reach while preserving hue (dark-active, whose value carries a slight chroma/hue shift; `color-mix` in sRGB would leave it fixed and off-hue for other products). The relative-colour step also emits a preceding baked-literal declaration as a graceful fallback for browsers below the relative-colour floor (Safari 16.4 / Chrome 119 / Firefox 128); `color-mix` itself is Baseline. 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,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sondalab/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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",
|
|
7
|
-
"publishConfig": {
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
8
10
|
"type": "module",
|
|
9
11
|
"bin": {
|
|
10
12
|
"sl-audit": "./agent/sl-audit.mjs"
|
package/themes/dark.css
CHANGED
|
@@ -16,9 +16,10 @@
|
|
|
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-
|
|
21
|
+
--sl-accent-active: oklch(from var(--sl-accent-default) calc(l * 0.92) calc(c * 0.96) h);
|
|
22
|
+
--sl-accent-subtle: color-mix(in srgb, var(--sl-accent-default) 16%, transparent);
|
|
22
23
|
--sl-accent-depth: #35A0B4;
|
|
23
24
|
--sl-focus-ring: #F5A83C;
|
|
24
25
|
}
|
package/themes/high-contrast.css
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
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:
|
|
21
|
-
--sl-accent-subtle:
|
|
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
|
+
--sl-accent-subtle: color-mix(in srgb, var(--sl-accent-default) 10%, black);
|
|
22
22
|
--sl-accent-depth: #00ffff;
|
|
23
23
|
--sl-focus-ring: #ffff00;
|
|
24
24
|
}
|
package/themes/light.css
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
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:
|
|
21
|
-
--sl-accent-subtle:
|
|
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
|
+
--sl-accent-subtle: color-mix(in srgb, var(--sl-accent-default) 12%, transparent);
|
|
22
22
|
--sl-accent-depth: #14606C;
|
|
23
23
|
--sl-focus-ring: #B56A0C;
|
|
24
24
|
}
|