feat: sync showcase with WRNexusJS 0.8.7
This commit is contained in:
@@ -4,9 +4,9 @@ page ProgressDetail {
|
||||
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
|
||||
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
|
||||
state playground_label = ctx.url.searchParams.get("pg_label") ?? "Progress"
|
||||
state playground_value = ctx.url.searchParams.get("pg_value") ?? "36"
|
||||
state playground_max = ctx.url.searchParams.get("pg_max") ?? "100"
|
||||
state playground_showValue = ctx.url.searchParams.get("pg_showValue") ?? "true"
|
||||
state playground_value = Number(ctx.url.searchParams.get("pg_value") ?? "36")
|
||||
state playground_max = Number(ctx.url.searchParams.get("pg_max") ?? "100")
|
||||
state playground_showValue = (ctx.url.searchParams.get("pg_showValue") ?? "true") === "true"
|
||||
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
|
||||
seo {
|
||||
title = "Progress"
|
||||
@@ -21,16 +21,16 @@ page ProgressDetail {
|
||||
<span class="showcase-eyebrow">Base component</span>
|
||||
<h1>Progress</h1>
|
||||
<p>Theme-aware, responsive progress component.</p>
|
||||
<div class="detail-badges"><span>7 props</span><span>0 slots</span><span>0 events</span><span>Theme ready</span><span>Responsive</span></div>
|
||||
<div class="detail-badges"><span>7 props</span><span>0 slots</span><span>0 outputs</span><span>Theme ready</span><span>Responsive</span></div>
|
||||
</div>
|
||||
<div class="detail-hero-icon"><span class="icon-[lucide--component] size-10" aria-hidden="true"></span></div>
|
||||
</header>
|
||||
<section id="playground" class="detail-section playground-section" data-playground data-playground-component="Progress" data-playground-public-tag="true" data-playground-has-slot="false">
|
||||
<section id="playground" class="detail-section playground-section" data-playground data-playground-component="Progress" data-playground-public-tag="true" data-playground-has-slot="false" data-playground-events="">
|
||||
<div class="detail-section-heading"><span>Interactive playground</span><h2>Configure Progress</h2><p>Change any prop and inspect the server-rendered component immediately.</p></div>
|
||||
<div class="playground-workbench">
|
||||
<div class="playground-preview">
|
||||
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
||||
<div class="playground-preview-source" data-playground-preview><div data-component="Progress" size="{playground_size}" color="{playground_color}" label="{playground_label}" value="{playground_value}" max="{playground_max}" showValue="{playground_showValue}" class="{playground_class}"></div></div>
|
||||
<div class="playground-preview-source" data-playground-preview><Progress size='{playground_size}' color='{playground_color}' label='{playground_label}' value='{playground_value}' max='{playground_max}' showValue='{playground_showValue}' class='{playground_class}' /></div>
|
||||
<section class="playground-code" aria-label="Current component code">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component code</span><button type="button" data-playground-copy><span class="icon-[lucide--copy] size-4" aria-hidden="true"></span>Copy</button></header>
|
||||
<pre><code data-playground-code><Progress
|
||||
@@ -38,6 +38,7 @@ page ProgressDetail {
|
||||
/></code></pre>
|
||||
</section>
|
||||
<div class="playground-status" data-playground-status aria-live="polite"></div>
|
||||
|
||||
</div>
|
||||
<form class="playground-controls" data-playground-form>
|
||||
<header><div><span>Component props</span><strong>7 controls</strong></div><button type="reset"><span class="icon-[lucide--rotate-ccw] size-4" aria-hidden="true"></span>Reset</button></header>
|
||||
@@ -56,7 +57,8 @@ page ProgressDetail {
|
||||
<div class="demo-workbench">
|
||||
<div id="progress-demo-1" class="demo-canvas demo-canvas--1">
|
||||
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
||||
<div class="demo-render"><div data-component="Progress" size="default" label="Progress" value="36" max="100" showValue="true" class="showcase-instance showcase-instance--1"></div></div>
|
||||
|
||||
<div class="demo-render"><Progress size="default" label="Progress" value="36" max="100" showValue="true" class="showcase-instance showcase-instance--1" /></div>
|
||||
</div>
|
||||
<section class="demo-code" aria-label="Production default usage">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
||||
@@ -74,7 +76,8 @@ page ProgressDetail {
|
||||
<div class="demo-workbench">
|
||||
<div id="progress-demo-2" class="demo-canvas demo-canvas--2">
|
||||
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
||||
<div class="demo-render"><div data-component="Progress" size="sm" label="Compact example" value="60" max="100" showValue="true" class="showcase-instance showcase-instance--2"></div></div>
|
||||
|
||||
<div class="demo-render"><Progress size="sm" label="Compact example" value="60" max="100" showValue="true" class="showcase-instance showcase-instance--2" /></div>
|
||||
</div>
|
||||
<section class="demo-code" aria-label="Compact application usage">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
||||
@@ -94,7 +97,8 @@ page ProgressDetail {
|
||||
<div class="demo-workbench">
|
||||
<div id="progress-demo-3" class="demo-canvas demo-canvas--3">
|
||||
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
||||
<div class="demo-render"><div data-component="Progress" size="lg" label="Advanced example" value="84" max="100" showValue="true" class="showcase-instance showcase-instance--3"></div></div>
|
||||
|
||||
<div class="demo-render"><Progress size="lg" label="Advanced example" value="84" max="100" showValue="true" class="showcase-instance showcase-instance--3" /></div>
|
||||
</div>
|
||||
<section class="demo-code" aria-label="Rich configuration usage">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
||||
@@ -106,11 +110,11 @@ page ProgressDetail {
|
||||
</section>
|
||||
</div>
|
||||
</article></div></section>
|
||||
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component events</span><h2>Events</h2><p>Public events declared by this component. Custom events bubble from the component root and expose state through <code>event.detail</code>.</p></div><div class=""><div class="docs-empty"><span class="icon-[lucide--radio-tower] size-5" aria-hidden="true"></span>No public component events.</div></div></section>
|
||||
|
||||
<section id="api" class="detail-section"><div class="detail-section-heading"><span>Component API</span><h2>Props and configuration</h2><p>All content and behavior shown above is supplied through these props and slots.</p></div><div class="docs-table-wrap"><table class="docs-table"><thead><tr><th>Prop</th><th>Type</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td><code>size</code></td><td>string</td><td><code>"default"</code></td><td>No</td></tr><tr><td><code>color</code></td><td>string</td><td><code>"primary"</code></td><td>No</td></tr><tr><td><code>label</code></td><td>string</td><td><code>"Progress"</code></td><td>No</td></tr><tr><td><code>value</code></td><td>number</td><td><code>50</code></td><td>No</td></tr><tr><td><code>max</code></td><td>number</td><td><code>100</code></td><td>No</td></tr><tr><td><code>showValue</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr></tbody></table></div></section>
|
||||
</main>
|
||||
<aside class="detail-aside">
|
||||
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#progress-demo-1">Production default</a><a href="#progress-demo-2">Compact application</a><a href="#progress-demo-3">Rich configuration</a><a href="#events">Events</a><a href="#api">Props API</a></div>
|
||||
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#progress-demo-1">Production default</a><a href="#progress-demo-2">Compact application</a><a href="#progress-demo-3">Rich configuration</a><a href="#api">Props API</a></div>
|
||||
</aside>
|
||||
</div>
|
||||
<nav class="detail-pagination">
|
||||
|
||||
Reference in New Issue
Block a user