feat(ui): add DataTable and Toaster, drop the legacy Table, fix overlay dialogs
Quality / quality (ubuntu-latest) (push) Failing after 13m40s
Quality / quality (windows-latest) (push) Canceled after 0s

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:59:58 +05:30
co-authored by Claude Opus 5
parent 296728d51d
commit 949cf78636
151 changed files with 14350 additions and 9189 deletions
@@ -37,7 +37,7 @@ page ChartDetail {
title="Chart example"
description="A polished default chart for a modern application."
items='[
&#123;
<span>&#123;</span>
"id": "chart-0-1",
"key": "chart-0-1",
"value": "primary",
@@ -66,31 +66,31 @@ page ChartDetail {
"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": "chart-0-2",
"key": "chart-0-2",
"value": "secondary",
@@ -119,30 +119,30 @@ page ChartDetail {
"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;</code></pre>
</section>
@@ -282,7 +282,7 @@ page ChartDetail {
title="Chart example"
description="A polished default chart for a modern application."
items='[
&#123;
<span>&#123;</span>
"id": "chart-0-1",
"key": "chart-0-1",
"value": "primary",
@@ -311,31 +311,31 @@ page ChartDetail {
"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": "chart-0-2",
"key": "chart-0-2",
"value": "secondary",
@@ -364,30 +364,30 @@ page ChartDetail {
"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;</code></pre>
</section>
@@ -411,7 +411,7 @@ page ChartDetail {
title="Compact Chart"
description="A compact configuration for dashboards and dense product surfaces."
items='[
&#123;
<span>&#123;</span>
"id": "chart-1-1",
"key": "chart-1-1",
"value": "primary",
@@ -440,31 +440,31 @@ page ChartDetail {
"target": "_self",
"ariaLabel": "Open secondary 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": "chart-1-2",
"key": "chart-1-2",
"value": "secondary",
@@ -493,30 +493,30 @@ page ChartDetail {
"target": "_self",
"ariaLabel": "Open secondary 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>
]'
variant="secondary"
/&gt;</code></pre>
@@ -541,7 +541,7 @@ page ChartDetail {
title="Advanced Chart"
description="A richer configuration demonstrating additional content and hierarchy."
items='[
&#123;
<span>&#123;</span>
"id": "chart-2-1",
"key": "chart-2-1",
"value": "primary",
@@ -570,31 +570,31 @@ page ChartDetail {
"target": "_self",
"ariaLabel": "Open advanced 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",
"Unlimited"
]
&#125;,
&#123;
<span>&#125;</span>,
<span>&#123;</span>
"id": "chart-2-2",
"key": "chart-2-2",
"value": "secondary",
@@ -623,30 +623,30 @@ page ChartDetail {
"target": "_self",
"ariaLabel": "Open advanced 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",
"Unlimited"
]
&#125;
<span>&#125;</span>
]'
variant="success"
/&gt;</code></pre>
@@ -657,21 +657,21 @@ page ChartDetail {
@select='console.log(payload)'
@dataPointClick='console.log(payload)'
@legendToggle='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=\"Chart\"], [data-component=\"Chart\"]")
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, "dataPointClick", (payload) =&gt; &#123;
if (component) registerOutputHandler(component, "dataPointClick", (payload) =&gt; <span>&#123;</span>
console.log("dataPointClick", payload)
&#125;)
<span>&#125;</span>)
if (component) registerOutputHandler(component, "legendToggle", (payload) =&gt; &#123;
if (component) registerOutputHandler(component, "legendToggle", (payload) =&gt; <span>&#123;</span>
console.log("legendToggle", 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>title</code></td><td>string</td><td><code>"Chart"</code></td><td>No</td></tr><tr><td><code>description</code></td><td>string</td><td><code>""</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>variant</code></td><td>string</td><td><code>"default"</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">