@
Quality / quality (ubuntu-latest) (push) Failing after 12m30s
Quality / quality (windows-latest) (push) Canceled after 0s

feat(ui): add DataTable and Toaster, drop the legacy Table, fix overlay dialogs

DataTable replaces the 20-line Table scaffold entirely: columns, sorting,
filtering, pagination, selection, bulk actions, comparison layout, sticky
first column, custom HTML cells, and a remote source driven by a `request`
output rather than a function prop (props travel as HTML attributes, so a
function arrives as its own source text).

Toaster replaces the hand-rolled status div: tone icons, actions, hover
pause/resume and a progress bar.

Overlays audit -- Modal and Drawer declared aria-modal="true" but nothing
ever moved focus into the panel, so the @keydown handler on their root
never ran and closeOnEscape did nothing. Focus, focus restore, a Tab trap
and a body scroll lock now live in the reactive runtime, shared by both.

ContextMenu placed pointer menus by subtracting a guessed 340x420 from the
viewport, which pushed every menu that was not that size away from the
pointer; it now positions at the pointer and lets the anchored clamp pull
it back once it can be measured.

The reactive runtime size budget moves 150k -> 175k to cover anchored
overlays, dialog behaviour, the toaster and the DataTable client half.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@
This commit is contained in:
2026-08-07 14:57:17 +05:30
parent 296728d51d
commit cc98bccd6c
151 changed files with 14350 additions and 9189 deletions
@@ -37,7 +37,7 @@ page FooterDetail {
<pre><code data-playground-code>&lt;Footer
label="Footer"
items='[
&#123;
<span>&#123;</span>
"id": "footer-0-1",
"key": "footer-0-1",
"value": "primary",
@@ -66,31 +66,31 @@ page FooterDetail {
"target": "_self",
"ariaLabel": "Open primary workflow 1",
"items": [
&#123;
<span>&#123;</span>
"label": "Nested option A",
"value": "nested-a"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Nested option B",
"value": "nested-b"
&#125;
<span>&#125;</span>
],
"links": [
&#123;
<span>&#123;</span>
"label": "Documentation",
"href": "#documentation"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "API reference",
"href": "#api-reference"
&#125;
<span>&#125;</span>
],
"values": [
"Included",
"Standard"
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"id": "footer-0-2",
"key": "footer-0-2",
"value": "secondary",
@@ -119,30 +119,30 @@ page FooterDetail {
"target": "_self",
"ariaLabel": "Open primary workflow 2",
"items": [
&#123;
<span>&#123;</span>
"label": "Nested option A",
"value": "nested-a"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Nested option B",
"value": "nested-b"
&#125;
<span>&#125;</span>
],
"links": [
&#123;
<span>&#123;</span>
"label": "Documentation",
"href": "#documentation"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "API reference",
"href": "#api-reference"
&#125;
<span>&#125;</span>
],
"values": [
"Included",
"Standard"
]
&#125;
<span>&#125;</span>
]'&gt;
&lt;div data-slot="pre-footer"&gt;
&lt;div class="showcase-slot"&gt;pre-footer slot&lt;/div&gt;
@@ -258,77 +258,77 @@ page FooterDetail {
<pre><code>&lt;Footer
label="Footer"
items='[
&#123;
<span>&#123;</span>
"type": "header",
"label": "Product",
"description": "Build consistent interfaces with WRNexusJS.",
"items": [
&#123;
<span>&#123;</span>
"label": "Components",
"href": "/base"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Themes",
"href": "/themes"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Examples",
"href": "/blocks"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Developers",
"items": [
&#123;
<span>&#123;</span>
"label": "Documentation",
"href": "/docs"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Installation",
"href": "/installation"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Framework guides",
"href": "/framework-guides"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Resources",
"items": [
&#123;
<span>&#123;</span>
"label": "Accessibility",
"href": "/accessibility"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Design tokens",
"href": "/colors"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Typography",
"href": "/fonts"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Company",
"items": [
&#123;
<span>&#123;</span>
"label": "WorkRoot",
"href": "https://workroot.in",
"external": true
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "WRNexusJS",
"href": "https://wrnexusjs.dev",
"external": true
&#125;
<span>&#125;</span>
]
&#125;
<span>&#125;</span>
]'
columns="4"
maxWidth="wide"
@@ -366,61 +366,61 @@ page FooterDetail {
size="compact"
label="Compact example"
items='[
&#123;
<span>&#123;</span>
"type": "header",
"label": "Product",
"description": "Build consistent interfaces with WRNexusJS.",
"items": [
&#123;
<span>&#123;</span>
"label": "Components",
"href": "/base"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Themes",
"href": "/themes"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Examples",
"href": "/blocks"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Developers",
"items": [
&#123;
<span>&#123;</span>
"label": "Documentation",
"href": "/docs"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Installation",
"href": "/installation"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Framework guides",
"href": "/framework-guides"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Resources",
"items": [
&#123;
<span>&#123;</span>
"label": "Accessibility",
"href": "/accessibility"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Design tokens",
"href": "/colors"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Typography",
"href": "/fonts"
&#125;
<span>&#125;</span>
]
&#125;
<span>&#125;</span>
]'
copyright="WRNexusJS component showcase"&gt;
&lt;div data-slot="pre-footer"&gt;
@@ -456,77 +456,77 @@ page FooterDetail {
size="spacious"
label="Advanced example"
items='[
&#123;
<span>&#123;</span>
"type": "header",
"label": "Product",
"description": "Build consistent interfaces with WRNexusJS.",
"items": [
&#123;
<span>&#123;</span>
"label": "Components",
"href": "/base"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Themes",
"href": "/themes"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Examples",
"href": "/blocks"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Developers",
"items": [
&#123;
<span>&#123;</span>
"label": "Documentation",
"href": "/docs"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Installation",
"href": "/installation"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Framework guides",
"href": "/framework-guides"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Resources",
"items": [
&#123;
<span>&#123;</span>
"label": "Accessibility",
"href": "/accessibility"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Design tokens",
"href": "/colors"
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "Typography",
"href": "/fonts"
&#125;
<span>&#125;</span>
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"type": "header",
"label": "Company",
"items": [
&#123;
<span>&#123;</span>
"label": "WorkRoot",
"href": "https://workroot.in",
"external": true
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"label": "WRNexusJS",
"href": "https://wrnexusjs.dev",
"external": true
&#125;
<span>&#125;</span>
]
&#125;
<span>&#125;</span>
]'
columns="4"
maxWidth="full"
@@ -550,17 +550,17 @@ page FooterDetail {
<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>@select</code><span>Fires when an item, option, card, or result is selected.</span></div><div><code>@action</code><span>Fires when the component's primary or item action is activated.</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;Footer
@select='console.log(payload)'
@action='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"
/&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 <span>&#123;</span> registerOutputHandler <span>&#125;</span> from "@wrnexus/csr/outputs"
const component = document.querySelector("[data-ui-component=\"Footer\"], [data-component=\"Footer\"]")
if (component) registerOutputHandler(component, "select", (payload) =&gt; &#123;
if (component) registerOutputHandler(component, "select", (payload) =&gt; <span>&#123;</span>
console.log("select", payload)
&#125;)
<span>&#125;</span>)
if (component) registerOutputHandler(component, "action", (payload) =&gt; &#123;
if (component) registerOutputHandler(component, "action", (payload) =&gt; <span>&#123;</span>
console.log("action", payload)
&#125;)</code></pre></section></div></div></section>
<span>&#125;</span>)</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>label</code></td><td>string</td><td><code>"Footer navigation"</code></td><td>No</td></tr><tr><td><code>items</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>columns</code></td><td>number</td><td><code>3</code></td><td>No</td></tr><tr><td><code>maxWidth</code></td><td>string</td><td><code>"compact"</code></td><td>No</td></tr><tr><td><code>copyright</code></td><td>string</td><td><code>""</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">