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
@@ -51,7 +51,7 @@ page AlertDetail {
title="Alert example"
description="A polished default alert for a modern application."
items='[
&#123;
<span>&#123;</span>
"id": "alert-0-1",
"key": "alert-0-1",
"value": "primary",
@@ -80,31 +80,31 @@ page AlertDetail {
"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": "alert-0-2",
"key": "alert-0-2",
"value": "secondary",
@@ -133,33 +133,33 @@ page AlertDetail {
"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>
]'
actions='[
&#123;
<span>&#123;</span>
"id": "alert-0-1",
"key": "alert-0-1",
"value": "primary",
@@ -188,31 +188,31 @@ page AlertDetail {
"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": "alert-0-2",
"key": "alert-0-2",
"value": "secondary",
@@ -241,30 +241,30 @@ page AlertDetail {
"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>
]'
showIcon="true"
dismissible="true"
@@ -518,7 +518,7 @@ page AlertDetail {
title="Alert example"
description="A polished default alert for a modern application."
items='[
&#123;
<span>&#123;</span>
"id": "alert-0-1",
"key": "alert-0-1",
"value": "primary",
@@ -547,31 +547,31 @@ page AlertDetail {
"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": "alert-0-2",
"key": "alert-0-2",
"value": "secondary",
@@ -600,33 +600,33 @@ page AlertDetail {
"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>
]'
actions='[
&#123;
<span>&#123;</span>
"id": "alert-0-1",
"key": "alert-0-1",
"value": "primary",
@@ -655,31 +655,31 @@ page AlertDetail {
"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": "alert-0-2",
"key": "alert-0-2",
"value": "secondary",
@@ -708,30 +708,30 @@ page AlertDetail {
"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>
]'
showIcon="true"
dismissible="true"
@@ -763,7 +763,7 @@ page AlertDetail {
title="Compact Alert"
description="A compact configuration for dashboards and dense product surfaces."
items='[
&#123;
<span>&#123;</span>
"id": "alert-1-1",
"key": "alert-1-1",
"value": "primary",
@@ -792,31 +792,31 @@ page AlertDetail {
"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": "alert-1-2",
"key": "alert-1-2",
"value": "secondary",
@@ -845,33 +845,33 @@ page AlertDetail {
"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>
]'
actions='[
&#123;
<span>&#123;</span>
"id": "alert-1-1",
"key": "alert-1-1",
"value": "primary",
@@ -900,31 +900,31 @@ page AlertDetail {
"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": "alert-1-2",
"key": "alert-1-2",
"value": "secondary",
@@ -953,30 +953,30 @@ page AlertDetail {
"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>
]'
showIcon="true"
icon="icon-[lucide--arrow-right]"
@@ -1010,7 +1010,7 @@ page AlertDetail {
title="Advanced Alert"
description="A richer configuration demonstrating additional content and hierarchy."
items='[
&#123;
<span>&#123;</span>
"id": "alert-2-1",
"key": "alert-2-1",
"value": "primary",
@@ -1039,31 +1039,31 @@ page AlertDetail {
"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": "alert-2-2",
"key": "alert-2-2",
"value": "secondary",
@@ -1092,33 +1092,33 @@ page AlertDetail {
"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>
]'
actions='[
&#123;
<span>&#123;</span>
"id": "alert-2-1",
"key": "alert-2-1",
"value": "primary",
@@ -1147,31 +1147,31 @@ page AlertDetail {
"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": "alert-2-2",
"key": "alert-2-2",
"value": "secondary",
@@ -1200,30 +1200,30 @@ page AlertDetail {
"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>
]'
showIcon="true"
icon="icon-[lucide--trash-2]"
@@ -1240,17 +1240,17 @@ page AlertDetail {
<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>@dismiss</code><span>Fires after the announcement or feedback surface is dismissed.</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;Alert
@dismiss='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=\"Alert\"], [data-component=\"Alert\"]")
if (component) registerOutputHandler(component, "dismiss", (payload) =&gt; &#123;
if (component) registerOutputHandler(component, "dismiss", (payload) =&gt; <span>&#123;</span>
console.log("dismiss", 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>"info"</code></td><td>No</td></tr><tr><td><code>variant</code></td><td>string</td><td><code>"soft"</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>radius</code></td><td>string</td><td><code>"md"</code></td><td>No</td></tr><tr><td><code>shadow</code></td><td>string</td><td><code>"sm"</code></td><td>No</td></tr><tr><td><code>title</code></td><td>string</td><td><code>"Alert"</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>actions</code></td><td>unknown[]</td><td><code>[]</code></td><td>No</td></tr><tr><td><code>showIcon</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>icon</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>dismissible</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>dismissLabel</code></td><td>string</td><td><code>"Dismiss alert"</code></td><td>No</td></tr><tr><td><code>role</code></td><td>string</td><td><code>"alert"</code></td><td>No</td></tr><tr><td><code>live</code></td><td>string</td><td><code>"polite"</code></td><td>No</td></tr><tr><td><code>linkLabel</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>linkHref</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>actionLabel</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>actionHref</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>compact</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr></tbody></table></div></section>
</main>
<aside class="detail-aside">