feat(theme): update Hanmac Green and Brown palette steps
Seven shared Hanmac color tokens change: - Green Default #123328 -> #164434, Dark 1 #0a221d -> #11372d, Dark 2 #071e18 -> #0b2b23, Dark 3 #020a07 -> #030e0a - Brown Default #3e3523 -> #4e422d, Dark 1 #352d1d -> #403726, Dark 3 #1d1810 -> #0d0b07 Updates primitives.css, the generated default values, themes/default.json, the verification baseline and the hard-coded Default expectations in the theme Stories and the quality-reference script. --hm-sem-on-accent is intentionally unchanged. check:theme-defaults reports generated outputs match.
This commit is contained in:
1 parent
be0661062f
commit
73ef042c55
8 files changed
+48
-48
No files matched your search
@@ -240,7 +240,7 @@ export const LiveVerification: Story = {
|
||||
}
|
||||
fillJson('{"schemaVersion":1,"tokens":{"color.state.active":"#345678"}}'); click("Import JSON")
|
||||
await waitForThemeState(() => variable("--hm-sem-state-active") === "#345678", "Designer partial import")
|
||||
assert(variable("--hm-sem-state-active") === "#345678" && variable("--hm-sem-action-primary") === "#123328" && variable("--hm-sem-stroke-input-focus") === "#266651", "Partial import replaces previous keys; unspecified roles use Default")
|
||||
assert(variable("--hm-sem-state-active") === "#345678" && variable("--hm-sem-action-primary") === "#164434" && variable("--hm-sem-stroke-input-focus") === "#266651", "Partial import replaces previous keys; unspecified roles use Default")
|
||||
for (const [index, [token, label]] of roles.entries()) {
|
||||
const value = `#3456${(120 + index).toString(16)}`
|
||||
setInput(`${label} HEX`, value)
|
||||
|
||||
@@ -50,7 +50,7 @@ async function verifyLoader(container: HTMLElement) {
|
||||
assert(checked.dataset.state === "checked" && checked.getAttribute("aria-checked") === "true" && getComputedStyle(checked).backgroundColor === "rgb(0, 127, 115)", "HTTP JSON reaches rendered Checkbox")
|
||||
assert(JSON.stringify(geometry()) === initial, "External JSON preserves component geometry")
|
||||
const resolved = resolveRuntimeTheme({ schemaVersion: 1, tokens: { "color.state.active": "#345678" } }, defaults)
|
||||
assert(resolved.tokens["color.action.primary"] === "#123328" && resolved.tokens["color.state.active"] === "#345678", "Default JSON + partial service override merge")
|
||||
assert(resolved.tokens["color.action.primary"] === "#164434" && resolved.tokens["color.state.active"] === "#345678", "Default JSON + partial service override merge")
|
||||
assert(await loadRuntimeTheme(root, "/themes/service-example.json", { defaults }), "Loader accepts separately fetched Default JSON")
|
||||
assert(variable("--hm-sem-action-primary") === "#6837a8", "Service override wins supplied Default")
|
||||
resetRuntimeTheme(root)
|
||||
|
||||
@@ -190,7 +190,7 @@ async function verifyRuntime(canvasElement: HTMLElement, keyboardFocus = false)
|
||||
applyRuntimeTheme(after, {schemaVersion:1,tokens:{"color.state.active":"#345678"}})
|
||||
assert(variable("--hm-checkbox-checked-background") === "#345678", "Scoped B overrides global A")
|
||||
assert(getComputedStyle(globalRoot).getPropertyValue("--hm-checkbox-checked-background").trim() === "#007f73", "Global A retains its own mapping")
|
||||
assert(variable("--hm-badge-default-background") === "#123328", "Explicit isolated scope falls back to HM preset")
|
||||
assert(variable("--hm-badge-default-background") === "#164434", "Explicit isolated scope falls back to HM preset")
|
||||
} finally { resetRuntimeTheme(globalRoot); resetRuntimeTheme(after) }
|
||||
after.style.setProperty("--hm-sem-state-active", "#112233", "important")
|
||||
applyRuntimeTheme(after, external); resetRuntimeTheme(after)
|
||||
|
||||
@@ -779,13 +779,13 @@
|
||||
"--hm-green-light-3": "#249473",
|
||||
"--hm-green-light-2": "#266651",
|
||||
"--hm-green-light-1": "#205241",
|
||||
"--hm-green-default": "#123328",
|
||||
"--hm-green-dark-1": "#0a221d",
|
||||
"--hm-green-dark-2": "#071e18",
|
||||
"--hm-green-default": "#164434",
|
||||
"--hm-green-dark-1": "#11372d",
|
||||
"--hm-green-dark-2": "#0b2b23",
|
||||
"--hm-brown-light-2": "#897445",
|
||||
"--hm-brown-light-1": "#604f32",
|
||||
"--hm-brown-default": "#3e3523",
|
||||
"--hm-brown-dark-1": "#352d1d",
|
||||
"--hm-brown-default": "#4e422d",
|
||||
"--hm-brown-dark-1": "#403726",
|
||||
"--hm-brown-light-4": "#ecd4a2",
|
||||
"--hm-orange-light-4": "#feba88",
|
||||
"--hm-orange-default": "#cc5200",
|
||||
|
||||
Reference in new issue
Block a user