refactor(docs): remove card shells and format examples

This commit is contained in:
2026-07-19 23:38:50 +05:30
parent 65366d48b6
commit 7013019e99
904 changed files with 35527 additions and 4439 deletions
+43 -45
View File
@@ -13,7 +13,13 @@ page Paginationcomponent {
<div class="topbar-actions"><a class="preview-pill" href="/access">Private preview · v0.2.65</a><button data-wire-theme-toggle class="theme-button" aria-label="Toggle color theme" title="Toggle color theme">◐</button></div>
</header>
<div class="mobile-doc-nav"><details><summary>Browse documentation</summary><nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/components">Components</a><a href="/language">Language</a><a href="/architecture">Architecture</a><a href="/tutorial">Tutorial</a><a href="/guides/project-structure">Guides</a><a href="/examples">Examples</a><a href="/search">Search</a></nav></details></div>
<main class="portal-main docs-layout component-detail-page"><article id="main" class="documentation prose standalone"><nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span>/</span><a href="/components">Components</a><span>/</span><span aria-current="page">Pagination</span></nav><section class="doc-intro"><span class="eyebrow">core component</span><h1>Pagination</h1><p>Reusable pagination component.</p><div class="doc-meta"><span>@wrnexus/ui 0.2.65</span><span>12 props</span><span>0 slots</span><span>0 events</span></div></section><section id="usage"><h2>Usage</h2><p>Components are auto-discovered. Use the component directly in any <code>.wrn</code> view:</p><pre data-language="wrn"><code>&lt;Pagination currentPage=&quot;1&quot; totalPages=&quot;1&quot; previousHref=&quot;previousHref&quot; nextHref=&quot;nextHref&quot; pages=&quot;[]&quot; /&gt;</code></pre><p>Legacy mount name: <code>data-component=&quot;Pagination&quot;</code>.</p></section><section id="props"><h2>Props and attributes</h2><div class="table-wrap"><table><thead><tr><th>Prop</th><th>Type</th><th>Requirement</th><th>Default</th></tr></thead><tbody><tr><td><code>class</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>currentPage</code></td><td><code>number</code></td><td>Optional</td><td><code>1</code></td></tr><tr><td><code>totalPages</code></td><td><code>number</code></td><td>Optional</td><td><code>1</code></td></tr><tr><td><code>previousHref</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>nextHref</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>pages</code></td><td><code>string</code></td><td>Optional</td><td><code>[]</code></td></tr><tr><td><code>showNumbers</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>showSummary</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>totalItems</code></td><td><code>number</code></td><td>Optional</td><td><code>0</code></td></tr><tr><td><code>pageSize</code></td><td><code>number</code></td><td>Optional</td><td><code>10</code></td></tr><tr><td><code>compact</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>centered</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr></tbody></table></div></section><section id="slots"><h2>Slots</h2><p>This component does not declare a slot.</p></section><section id="events"><h2>Events</h2><p>This component does not declare a custom event.</p></section><section id="source"><h2>Source contract</h2><p>Installed source: <code>components/Pagination.wrn</code></p><pre data-language="wrn"><code>component Pagination &#123;
<main class="portal-main docs-layout component-detail-page"><article id="main" class="documentation prose standalone"><nav class="breadcrumbs" aria-label="Breadcrumb"><a href="/">Home</a><span>/</span><a href="/components">Components</a><span>/</span><span aria-current="page">Pagination</span></nav><section class="doc-intro"><span class="eyebrow">core component</span><h1>Pagination</h1><p>Reusable pagination component.</p><div class="doc-meta"><span>@wrnexus/ui 0.2.65</span><span>12 props</span><span>0 slots</span><span>0 events</span></div></section><section id="usage"><h2>Usage</h2><p>Components are auto-discovered. Use the component directly in any <code>.wrn</code> view:</p><pre data-language="wrn"><code>&lt;Pagination
currentPage=&quot;1&quot;
totalPages=&quot;1&quot;
previousHref=&quot;previousHref&quot;
nextHref=&quot;nextHref&quot;
pages=&quot;[]&quot;
/&gt;</code></pre><p>Legacy mount name: <code>data-component=&quot;Pagination&quot;</code>.</p></section><section id="props"><h2>Props and attributes</h2><div class="table-wrap"><table><thead><tr><th>Prop</th><th>Type</th><th>Requirement</th><th>Default</th></tr></thead><tbody><tr><td><code>class</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>currentPage</code></td><td><code>number</code></td><td>Optional</td><td><code>1</code></td></tr><tr><td><code>totalPages</code></td><td><code>number</code></td><td>Optional</td><td><code>1</code></td></tr><tr><td><code>previousHref</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>nextHref</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>pages</code></td><td><code>string</code></td><td>Optional</td><td><code>[]</code></td></tr><tr><td><code>showNumbers</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>showSummary</code></td><td><code>boolean</code></td><td>Optional</td><td><code>true</code></td></tr><tr><td><code>totalItems</code></td><td><code>number</code></td><td>Optional</td><td><code>0</code></td></tr><tr><td><code>pageSize</code></td><td><code>number</code></td><td>Optional</td><td><code>10</code></td></tr><tr><td><code>compact</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr><tr><td><code>centered</code></td><td><code>boolean</code></td><td>Optional</td><td><code>false</code></td></tr></tbody></table></div></section><section id="slots"><h2>Slots</h2><p>This component does not declare a slot.</p></section><section id="events"><h2>Events</h2><p>This component does not declare a custom event.</p></section><section id="source"><h2>Source contract</h2><p>Installed source: <code>components/Pagination.wrn</code></p><pre data-language="wrn"><code>component Pagination &#123;
props &#123;
class: string = &quot;&quot;
currentPage = 1
@@ -40,8 +46,8 @@ page Paginationcomponent {
class=&quot;w-full &#123;class&#125;&quot;
class:hidden=&quot;totalPages &lt;= 1&quot;
&gt;
&lt;!-- Result summary --&gt;
&lt;div
&lt;!-- Result summary --&gt;
&lt;div
class=&quot;mb-4 text-sm text-slate-500 dark:text-slate-400&quot;
class:hidden=&quot;!showSummary || totalItems &lt;= 0&quot;
class:text-center=&quot;centered&quot;
@@ -66,56 +72,52 @@ page Paginationcomponent {
results
&lt;/div&gt;
&lt;div
&lt;div
class=&quot;flex flex-col gap-4 sm:flex-row sm:items-center&quot;
class:sm:justify-center=&quot;centered&quot;
class:sm:justify-between=&quot;!centered&quot;
&gt;
&lt;!-- Previous --&gt;
&lt;a
&lt;!-- Previous --&gt;
&lt;a
href=&quot;&#123;previousHref&#125;&quot;
aria-label=&quot;Go to previous page&quot;
class=&quot;group h-11 items-center justify-center gap-2 rounded-xl border border-slate-200 bg-white px-4 text-sm font-semibold text-slate-700 shadow-sm transition hover:-translate-y-0.5 hover:border-indigo-300 hover:bg-slate-50 hover:text-indigo-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 dark:border-white/10 dark:bg-white/5 dark:text-slate-200 dark:hover:border-indigo-500/30 dark:hover:bg-white/10 dark:hover:text-indigo-300&quot;
class:hidden=&quot;previousHref === ''&quot;
class:inline-flex=&quot;previousHref !== ''&quot;
&gt;
&lt;span class=&quot;icon-[lucide--arrow-left] h-4 w-4 transition-transform group-hover:-translate-x-0.5&quot; aria-hidden=&quot;true&quot; &gt;&lt;/span&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
&lt;span class=&quot;icon-[lucide--arrow-left] h-4 w-4 transition-transform group-hover:-translate-x-0.5&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
Previous
&lt;/span&gt;
&lt;/a&gt;
&lt;span
&lt;/a&gt;
&lt;span
aria-disabled=&quot;true&quot;
class=&quot;h-11 cursor-not-allowed items-center justify-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-4 text-sm font-semibold text-slate-400 dark:border-white/10 dark:bg-white/[0.03] dark:text-slate-600&quot;
class:hidden=&quot;previousHref !== ''&quot;
class:inline-flex=&quot;previousHref === ''&quot;
&gt;
&lt;span class=&quot;icon-[lucide--arrow-left] h-4 w-4&quot; aria-hidden=&quot;true&quot; &gt;&lt;/span&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
&lt;span class=&quot;icon-[lucide--arrow-left] h-4 w-4&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
Previous
&lt;/span&gt;
&lt;/span&gt;
&lt;!-- Numbered pages --&gt;
&lt;div
&lt;/span&gt;
&lt;!-- Numbered pages --&gt;
&lt;div
class=&quot;flex flex-wrap items-center justify-center gap-1.5&quot;
class:hidden=&quot;!showNumbers&quot;
&gt;
&#123;#each pages as page&#125;
&lt;!-- Ellipsis --&gt;
&lt;span
&lt;span
class=&quot;grid h-10 w-10 place-items-center text-sm font-semibold text-slate-400&quot;
class:hidden=&quot;!page.ellipsis&quot;
&gt;
&lt;/span&gt;
&lt;!-- Page link --&gt;
&lt;a
&lt;!-- Page link --&gt;
&lt;a
href=&quot;&#123;page.href&#125;&quot;
aria-label=&quot;Go to page &#123;page.number&#125;&quot;
class=&quot;h-10 min-w-10 items-center justify-center rounded-xl px-3 text-sm font-semibold transition focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500&quot;
@@ -137,9 +139,8 @@ page Paginationcomponent {
&gt;
&#123;page.number&#125;
&lt;/a&gt;
&lt;!-- Current page --&gt;
&lt;span
&lt;!-- Current page --&gt;
&lt;span
aria-current=&quot;page&quot;
aria-label=&quot;Current page, page &#123;page.number&#125;&quot;
class=&quot;h-10 min-w-10 items-center justify-center rounded-xl bg-indigo-600 px-3 text-sm font-bold text-white shadow-lg shadow-indigo-600/20&quot;
@@ -150,9 +151,8 @@ page Paginationcomponent {
&lt;/span&gt;
&#123;/each&#125;
&lt;/div&gt;
&lt;!-- Mobile page counter --&gt;
&lt;div
&lt;!-- Mobile page counter --&gt;
&lt;div
class=&quot;flex items-center justify-center rounded-xl border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm font-medium text-slate-500 dark:border-white/10 dark:bg-white/5 dark:text-slate-400&quot;
class:hidden=&quot;showNumbers&quot;
&gt;
@@ -167,36 +167,34 @@ page Paginationcomponent {
&lt;span class=&quot;ml-1 font-bold text-slate-950 dark:text-white&quot;&gt;
&#123;totalPages&#125;
&lt;/span&gt;
&lt;/div&gt;
&lt;!-- Next --&gt;
&lt;a
&lt;/div&gt;
&lt;!-- Next --&gt;
&lt;a
href=&quot;&#123;nextHref&#125;&quot;
aria-label=&quot;Go to next page&quot;
class=&quot;group h-11 items-center justify-center gap-2 rounded-xl bg-indigo-600 px-4 text-sm font-bold text-white shadow-lg shadow-indigo-600/20 transition hover:-translate-y-0.5 hover:bg-indigo-500 hover:shadow-xl focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-slate-950&quot;
class:hidden=&quot;nextHref === ''&quot;
class:inline-flex=&quot;nextHref !== ''&quot;
&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
Next
&lt;/span&gt;
&lt;span class=&quot;icon-[lucide--arrow-right] h-4 w-4 transition-transform group-hover:translate-x-0.5&quot; aria-hidden=&quot;true&quot; &gt;&lt;/span&gt;
&lt;/a&gt;
&lt;span
&lt;span class=&quot;icon-[lucide--arrow-right] h-4 w-4 transition-transform group-hover:translate-x-0.5&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&lt;/a&gt;
&lt;span
aria-disabled=&quot;true&quot;
class=&quot;h-11 cursor-not-allowed items-center justify-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-4 text-sm font-semibold text-slate-400 dark:border-white/10 dark:bg-white/[0.03] dark:text-slate-600&quot;
class:hidden=&quot;nextHref !== ''&quot;
class:inline-flex=&quot;nextHref === ''&quot;
&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
&lt;span class:hidden=&quot;compact&quot;&gt;
Next
&lt;/span&gt;
&lt;span class=&quot;icon-[lucide--arrow-right] h-4 w-4&quot; aria-hidden=&quot;true&quot; &gt;&lt;/span&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;span class=&quot;icon-[lucide--arrow-right] h-4 w-4&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;/nav&gt;
&#125;
&#125;