fix: use semantic colors across admin pages
Local Build and Deploy / deploy (push) Successful in 49s

This commit is contained in:
Simo committed 2026-07-12 18:50:45 +02:00
1 parent 0fe482009c
commit 84e4123f09
83 files changed
+466 -455

No files matched your search

+12 -1
View File
@@ -60,7 +60,7 @@ describe("admin theme source audit", () => {
...(source.match(PUBLIC_STRUCTURAL_TOKEN) ?? []),
...(source.match(HARDCODED_UI_PALETTE) ?? []),
];
const filtered = DATA_COLOR_ALLOWLIST.includes(normalized)
const filtered = [...DATA_COLOR_ALLOWLIST, ...GRAPHICAL_ALLOWLIST].includes(normalized)
? risky.filter((match) => match.startsWith("var("))
: risky;
if (filtered.length) violations.push(`${normalized}: ${[...new Set(filtered)].join(", ")}`);
@@ -68,4 +68,15 @@ describe("admin theme source audit", () => {
}
expect(violations).toEqual([]);
});
it("keeps every import workflow on semantic admin status and overlay colors", () => {
const violations = sourceFiles("src/app/admin/import").flatMap((file) => {
const source = readFileSync(file, "utf8");
const risky = source.match(/rgba?\([^)]*\)|(?:bg-black|text-white)(?:\/\d+)?/g) ?? [];
return risky.length
? [`${relative(process.cwd(), file).replaceAll("\\", "/")}: ${[...new Set(risky)].join(", ")}`]
: [];
});
expect(violations).toEqual([]);
});
});