fix(ui): render polished SSR-safe component variants

This commit is contained in:
2026-07-20 15:55:38 +05:30
parent 944f83d3f4
commit 54f5309fca
260 changed files with 917 additions and 348 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ function action(name) {
disabled = false
class = ""
}
view { <span class="wire-catalog-action {class}"><a data-show="href" href="{href}" class="wire-btn wire-btn--{variant}">{label}<slot /></a><button data-show="!href" type="{type}" disabled="{disabled}" class="wire-btn wire-btn--{variant}">{label}<slot /></button></span> }
view { <span class="wire-catalog-action {class}">{#if href}<a href="{href}" class="wire-btn wire-btn--{variant}">{label}<slot /></a>{:else}<button type="{type}" disabled="{disabled}" class="wire-btn wire-btn--{variant}">{label}<slot /></button>{/if}</span> }
}`;
}
@@ -138,7 +138,7 @@ function content(name) {
alt = ""
class = ""
}
view { <article class="wire-card wire-catalog-card {class}"><img data-show="image" src="{image}" alt="{alt}" class="wire-catalog-card__image" /><span data-show="eyebrow" class="wire-eyebrow">{eyebrow}</span><h3 data-show="title">{title}</h3><p data-show="description">{description}</p><slot /><a data-show="href" href="{href}" class="wire-btn wire-btn--ghost">{actionLabel}</a></article> }
view { <article class="wire-card wire-catalog-card {class}">{#if image}<img src="{image}" alt="{alt}" class="wire-catalog-card__image" />{/if}{#if eyebrow}<span class="wire-eyebrow">{eyebrow}</span>{/if}{#if title}<h3>{title}</h3>{/if}{#if description}<p>{description}</p>{/if}<slot />{#if href}<a href="{href}" class="wire-btn wire-btn--ghost">{actionLabel}</a>{/if}</article> }
}`;
}
+1 -1
View File
@@ -107,4 +107,4 @@ for (const category of [...new Set(components.map((component) => component.categ
);
}
}
writeFileSync(join(uiRoot, "COMPONENTS.md"), `${lines.join("\n")}\n`);
writeFileSync(join(uiRoot, "COMPONENTS.md"), `${lines.join("\n").trimEnd()}\n`);