Theme Builder: accordion panels across the full config surface, vertical-tab nav, reflective gallery

This commit is contained in:
2026-06-21 17:14:58 +03:00
parent 318a0919c6
commit d76a7a5014
24 changed files with 2420 additions and 845 deletions
+30
View File
@@ -155,4 +155,34 @@ describe('THEME_PREVIEW_SPECS', () => {
);
expect(colors.some((c) => c?.scale?.domainMid !== undefined)).toBe(true);
});
it('uses bare marks so config controls are not shadowed in the preview', () => {
// A visual mark property hard-coded in a card overrides the same key in the
// injected config, making the matching Marks control a no-op in the gallery.
// Mark styling belongs in the config (a theme), never inline here.
const SHADOWING = [
'size',
'filled',
'point',
'innerRadius',
'outerRadius',
'cornerRadius',
'cornerRadiusEnd',
'opacity',
'interpolate',
'shape',
'strokeWidth',
'padAngle',
'discreteBandSize',
'continuousBandSize',
];
for (const card of THEME_PREVIEW_SPECS) {
const mark: unknown = card.spec.mark;
if (mark && typeof mark === 'object') {
for (const key of SHADOWING) {
expect(mark, `${card.id} hard-codes mark.${key}`).not.toHaveProperty(key);
}
}
}
});
});