feat: sync showcase with WRNexusJS 0.8.7

This commit is contained in:
2026-08-10 14:00:37 +05:30
parent 8ba1f67f98
commit 186f97de37
172 changed files with 38454 additions and 24441 deletions
+6 -3
View File
@@ -8,9 +8,12 @@ page DarkModeGuide {
<article class="page-docs guide-page">
<nav class="docs-breadcrumbs" aria-label="Breadcrumb"><a href="/docs">Docs</a><span aria-hidden="true">/</span><span>Dark mode</span></nav>
<header class="docs-intro"><span class="showcase-eyebrow">Customization</span><h1>Dark mode</h1><p>Choose light, dark, or system mode. The selection persists and updates every preview.</p></header>
<section class="guide-section"><h2>Overview</h2><p>Choose light, dark, or system mode. The selection persists and updates every preview.</p></section><section class="guide-section"><h2>Configuration</h2><p>Use the design switcher in the header to test this setting live.</p></section><section class="guide-section"><h2>Component behavior</h2><p>The setting is inherited by components, blocks, templates, and playground previews.</p></section>
<nav class="guide-next"><a href="/components/button">Explore components <span aria-hidden="true">→</span></a><a href="/blocks">Browse blocks <span aria-hidden="true">→</span></a></nav>
<section class="guide-section"><h2>Choose a default</h2><p>Set light, dark, or system in wrnexus.config.ts. System mode follows the operating-system preference until the user selects an explicit value.</p></section><section class="guide-section"><h2>Persist preference</h2><p>Use PreferenceSwitcher or your own control to update the document theme. The selected value persists and is applied before interactive components hydrate.</p></section><section class="guide-section"><h2>Author with tokens</h2><p>Use semantic --wire-* variables instead of hard-coded light colors. Tokens switch surfaces, text, borders, focus, and status colors together.</p></section><section class="guide-section"><h2>Test both modes</h2><p>Check content, overlays, charts, disabled controls, focus rings, and browser autofill in both modes. Do not treat dark mode as a simple color inversion.</p></section>
<section class="guide-section"><h2>Quick start</h2><pre><code>theme: <span>&#123;</span>
default: "system",
palette: "violet",
<span>&#125;</span></code></pre></section>
<nav class="guide-next"><a href="/components/button">Explore components <span aria-hidden="true">→</span></a><a href="/block-library">Browse blocks <span aria-hidden="true">→</span></a></nav>
</article>
}
}