fix(studio): render complete interactive gallery previews
This commit is contained in:
1 parent
c765d76a06
commit
9520651330
26 files changed
+5761
-39
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/design-system",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "Typed, deterministic design tokens and legacy WrNexus theme integration.",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -82,7 +82,7 @@ function recipes(angular: boolean, outlined: boolean): Record<string, ComponentR
|
||||
Select: recipe({ control: field }),
|
||||
Checkbox: recipe({ control: { borderRadius: ref("shape.control"), borderWidth: "1px" } }),
|
||||
Radio: recipe({ control: { borderWidth: "1px" } }),
|
||||
Switch: recipe({ control: { borderRadius: ref("shape.control") } }),
|
||||
Switch: recipe({ control: { borderRadius: "999px" } }),
|
||||
Card: recipe({
|
||||
panel: { ...surface, ...(angular ? { rotate: "1deg" } : {}) },
|
||||
body: { paddingInline: ref("space.panel"), paddingBlock: ref("space.panel") },
|
||||
|
||||
@@ -26,6 +26,17 @@ test("three presets compile deterministically in both modes", () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("switch track stays a pill when control corners change", () => {
|
||||
for (const original of Object.values(CORE_DESIGN_SYSTEMS)) {
|
||||
const system = structuredClone(original);
|
||||
system.tokens["shape.control"]!.value = "0";
|
||||
for (const mode of ["light", "dark"]) {
|
||||
const css = compileDesignSystem(system, { mode }).recipeCss;
|
||||
expect(css).toMatch(/\[data-wrn-owner="Switch"\][^{]*\{[^}]*border-radius:999px/);
|
||||
}
|
||||
}
|
||||
});
|
||||
test("contracts reject unknown components, parts, axes, states, versions and executable style values", () => {
|
||||
for (const recipes of [
|
||||
{ Unknown: { contractVersion: 1 } },
|
||||
|
||||
Reference in new issue
Block a user