release: WRNexusJS 0.6.0

This commit is contained in:
2026-08-01 01:09:58 +05:30
parent 3e565e8d03
commit 687d345882
502 changed files with 33038 additions and 11358 deletions
@@ -35,7 +35,7 @@ page FileInputDetail {
<span class="showcase-eyebrow">Forms component</span>
<h1>File Input</h1>
<p>Theme-aware, responsive file input component.</p>
<div class="detail-badges"><span>21 props</span><span>0 slots</span><span>7 events</span><span>Theme ready</span><span>Responsive</span></div>
<div class="detail-badges"><span>21 props</span><span>0 slots</span><span>7 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>
@@ -54,7 +54,7 @@ page FileInputDetail {
/&gt;</code></pre>
</section>
<div class="playground-status" data-playground-status aria-live="polite"></div>
<div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect <code>event.detail</code>.</span></div>
<div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect the typed <code>payload</code>.</span></div>
</div>
<form class="playground-controls" data-playground-form>
<header><div><span>Component props</span><strong>21 controls</strong></div><button type="reset"><span class="icon-[lucide--rotate-ccw] size-4" aria-hidden="true"></span>Reset</button></header>
@@ -134,47 +134,49 @@ page FileInputDetail {
</section>
</div>
</article></div></section>
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component events</span><h2>Respond to every public interaction</h2><p>Use declarative <code>@event</code> handlers in <code>.wrn</code> files or subscribe to the bubbling browser events from JavaScript.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@input</code><span>Fires as the editable value changes.</span></div><div><code>@change</code><span>Fires when the component's committed value or selection changes.</span></div><div><code>@focus</code><span>Fires when the interactive control receives focus.</span></div><div><code>@blur</code><span>Fires when focus leaves the interactive control.</span></div><div><code>@select</code><span>Fires when an item, option, card, or result is selected.</span></div><div><code>@clear</code><span>Fires after the current value or selection is cleared.</span></div><div><code>@invalid</code><span>Fires when the component emits the invalid event.</span></div></div><div class="detail-event-examples"><section class="demo-code"><header><span><span class="icon-[lucide--braces] size-4" aria-hidden="true"></span>Declarative handlers</span><small>.wrn</small></header><pre><code>&lt;FileInput
@input='console.log(event.detail)'
@change='console.log(event.detail)'
@focus='console.log(event.detail)'
@blur='console.log(event.detail)'
@select='console.log(event.detail)'
@clear='console.log(event.detail)'
@invalid='console.log(event.detail)'
/&gt;</code></pre></section><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Browser listeners</span><small>.js</small></header><pre><code>const component = document.querySelector("[data-ui-component=\"FileInput\"], [data-component=\"FileInput\"]")
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component outputs</span><h2>Receive every typed component output</h2><p>Use declarative output handlers in <code>.wrn</code> files or register a direct output handler from JavaScript. The canonical API exposes <code>payload</code> and does not require <code>event.detail</code>.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@input</code><span>Fires as the editable value changes.</span></div><div><code>@change</code><span>Fires when the component's committed value or selection changes.</span></div><div><code>@focus</code><span>Fires when the interactive control receives focus.</span></div><div><code>@blur</code><span>Fires when focus leaves the interactive control.</span></div><div><code>@select</code><span>Fires when an item, option, card, or result is selected.</span></div><div><code>@clear</code><span>Fires after the current value or selection is cleared.</span></div><div><code>@invalid</code><span>Fires when the component emits the invalid event.</span></div></div><div class="detail-event-examples"><section class="demo-code"><header><span><span class="icon-[lucide--braces] size-4" aria-hidden="true"></span>Declarative handlers</span><small>.wrn</small></header><pre><code>&lt;FileInput
@input='console.log(payload)'
@change='console.log(payload)'
@focus='console.log(payload)'
@blur='console.log(payload)'
@select='console.log(payload)'
@clear='console.log(payload)'
@invalid='console.log(payload)'
/&gt;</code></pre></section><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Direct output handlers</span><small>.js</small></header><pre><code>import &#123; registerOutputHandler &#125; from "@wrnexus/csr/outputs"
component?.addEventListener("input", (event) =&gt; &#123;
console.log("input", event.detail)
const component = document.querySelector("[data-ui-component=\"FileInput\"], [data-component=\"FileInput\"]")
if (component) registerOutputHandler(component, "input", (payload) =&gt; &#123;
console.log("input", payload)
&#125;)
component?.addEventListener("change", (event) =&gt; &#123;
console.log("change", event.detail)
if (component) registerOutputHandler(component, "change", (payload) =&gt; &#123;
console.log("change", payload)
&#125;)
component?.addEventListener("focus", (event) =&gt; &#123;
console.log("focus", event.detail)
if (component) registerOutputHandler(component, "focus", (payload) =&gt; &#123;
console.log("focus", payload)
&#125;)
component?.addEventListener("blur", (event) =&gt; &#123;
console.log("blur", event.detail)
if (component) registerOutputHandler(component, "blur", (payload) =&gt; &#123;
console.log("blur", payload)
&#125;)
component?.addEventListener("select", (event) =&gt; &#123;
console.log("select", event.detail)
if (component) registerOutputHandler(component, "select", (payload) =&gt; &#123;
console.log("select", payload)
&#125;)
component?.addEventListener("clear", (event) =&gt; &#123;
console.log("clear", event.detail)
if (component) registerOutputHandler(component, "clear", (payload) =&gt; &#123;
console.log("clear", payload)
&#125;)
component?.addEventListener("invalid", (event) =&gt; &#123;
console.log("invalid", event.detail)
if (component) registerOutputHandler(component, "invalid", (payload) =&gt; &#123;
console.log("invalid", payload)
&#125;)</code></pre></section></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>id</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>name</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>label</code></td><td>string</td><td><code>"File"</code></td><td>No</td></tr><tr><td><code>hiddenLabel</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>placeholder</code></td><td>string</td><td><code>"Choose a file"</code></td><td>No</td></tr><tr><td><code>value</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>icon</code></td><td>string</td><td><code>"icon-[lucide--upload]"</code></td><td>No</td></tr><tr><td><code>iconPosition</code></td><td>string</td><td><code>"start"</code></td><td>No</td></tr><tr><td><code>accept</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>multiple</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>helperText</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>cornerHint</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>error</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>inline</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>variant</code></td><td>string</td><td><code>"normal"</code></td><td>No</td></tr><tr><td><code>readonly</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>disabled</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>required</code></td><td>boolean</td><td><code>false</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="#file-input-demo-1">Production default</a><a href="#file-input-demo-2">Compact application</a><a href="#file-input-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="#file-input-demo-1">Production default</a><a href="#file-input-demo-2">Compact application</a><a href="#file-input-demo-3">Rich configuration</a><a href="#events">Outputs</a><a href="#api">Props API</a></div>
</aside>
</div>
<nav class="detail-pagination">