Files
WRNexusJSDoc/app/pages/components/empty-state.wrn
T

192 lines
14 KiB
Plaintext

page EmptyStatecomponent {
seo {
title = "EmptyState component"
description = "Reusable empty state component."
}
view {
<div class="docs-shell">
<SkipLink label="Skip to content" href="#main" class="docs-skip-link" />
<header class="topbar">
<a class="brand" href="/"><span>W</span> WRNexusJS</a>
<nav aria-label="Primary"><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></nav>
<div class="topbar-actions"><a class="preview-pill" href="/access">Private preview · v0.2.73</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">EmptyState</span></nav><section class="doc-intro"><span class="eyebrow">feedback component</span><h1>EmptyState</h1><p>Reusable empty state component.</p><div class="doc-meta"><span>@wrnexus/ui 0.2.73</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;EmptyState
eyebrow=&quot;eyebrow&quot;
title=&quot;Nothing found&quot;
description=&quot;description&quot;
iconClass=&quot;icon-[lucide--inbox]&quot;
primaryLabel=&quot;primaryLabel&quot;
/&gt;</code></pre><p>Legacy mount name: <code>data-component=&quot;EmptyState&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>eyebrow</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;Nothing found&quot;</code></td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>iconClass</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;icon-[lucide--inbox]&quot;</code></td></tr><tr><td><code>primaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>primaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>secondaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</code></td></tr><tr><td><code>secondaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>&quot;&quot;</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>true</code></td></tr><tr><td><code>suggestions</code></td><td><code>string</code></td><td>Optional</td><td><code>[]</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/EmptyState.wrn</code></p><pre data-language="wrn"><code>component EmptyState &#123;
props &#123;
class: string = &quot;&quot;
eyebrow = &quot;&quot;
title = &quot;Nothing found&quot;
description = &quot;&quot;
iconClass = &quot;icon-[lucide--inbox]&quot;
primaryLabel = &quot;&quot;
primaryHref = &quot;&quot;
secondaryLabel = &quot;&quot;
secondaryHref = &quot;&quot;
compact = false
centered = true
suggestions = []
&#125;
view &#123;
&lt;section
aria-labelledby=&quot;empty-state-title&quot;
class=&quot;w-full &#123;class&#125;&quot;
class:py-6=&quot;compact&quot;
class:sm:py-8=&quot;compact&quot;
class:py-8=&quot;!compact&quot;
class:sm:py-10=&quot;!compact&quot;
&gt;
&lt;div
class=&quot; relative mx-auto w-full overflow-hidden rounded-3xl border border-indigo-200/80 bg-linear-to-br from-indigo-50/90 via-white to-violet-50/80 shadow-xl shadow-indigo-950/5 dark:border-indigo-500/20 dark:from-indigo-500/10 dark:via-slate-900 dark:to-violet-500/10 dark:shadow-black/20 &quot;
class:max-w-3xl=&quot;centered&quot;
&gt;
&lt;!-- Background decoration --&gt;
&lt;div
aria-hidden=&quot;true&quot;
class=&quot;pointer-events-none absolute inset-0 overflow-hidden&quot;
&gt;
&lt;div class=&quot;absolute -right-20 -top-24 h-56 w-56 rounded-full bg-indigo-200/30 blur-3xl dark:bg-indigo-500/10&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;absolute -bottom-24 -left-20 h-56 w-56 rounded-full bg-violet-200/20 blur-3xl dark:bg-violet-500/5&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;absolute inset-x-0 top-0 h-px bg-linear-to-r from-transparent via-indigo-300/70 to-transparent dark:via-indigo-500/20&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div
class=&quot;relative&quot;
class:px-6=&quot;compact&quot;
class:py-8=&quot;compact&quot;
class:sm:px-8=&quot;compact&quot;
class:sm:py-9=&quot;compact&quot;
class:px-6=&quot;!compact&quot;
class:py-10=&quot;!compact&quot;
class:sm:px-10=&quot;!compact&quot;
class:sm:py-12=&quot;!compact&quot;
class:lg:px-12=&quot;!compact&quot;
class:text-center=&quot;centered&quot;
&gt;
&lt;div
class=&quot; &#123;compact ? 'max-w-xl' : 'max-w-2xl'&#125; &#123;centered ? 'mx-auto' : 'mr-auto'&#125; &quot;
class:max-w-xl=&quot;compact&quot;
class:max-w-2xl=&quot;!compact&quot;
&gt;
&lt;!-- Icon --&gt;
&lt;div
class=&quot;flex&quot;
class:justify-center=&quot;centered&quot;
&gt;
&lt;span
class=&quot;grid place-items-center rounded-2xl bg-indigo-50 text-indigo-600 ring-1 ring-inset ring-indigo-200 dark:bg-indigo-500/10 dark:text-indigo-300 dark:ring-indigo-500/20&quot;
class:h-12=&quot;compact&quot;
class:w-12=&quot;compact&quot;
class:h-14=&quot;!compact&quot;
class:w-14=&quot;!compact&quot;
&gt;
&lt;span class=&quot;&#123;iconClass&#125;&quot; class:h-5=&quot;compact&quot; class:w-5=&quot;compact&quot; class:h-6=&quot;!compact&quot; class:w-6=&quot;!compact&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;!-- Eyebrow --&gt;
&lt;p
class=&quot;mt-5 text-xs font-bold uppercase tracking-[0.18em] text-indigo-600 dark:text-indigo-400&quot;
class:hidden=&quot;eyebrow === ''&quot;
&gt;
&#123;eyebrow&#125;
&lt;/p&gt;
&lt;!-- Title --&gt;
&lt;h2
id=&quot;empty-state-title&quot;
class=&quot;font-bold tracking-tight text-slate-950 dark:text-white&quot;
class:mt-5=&quot;eyebrow === ''&quot;
class:mt-3=&quot;eyebrow !== ''&quot;
class:text-xl=&quot;compact&quot;
class:leading-tight=&quot;compact&quot;
class:sm:text-2xl=&quot;compact&quot;
class:text-2xl=&quot;!compact&quot;
class:leading-tight=&quot;!compact&quot;
class:sm:text-3xl=&quot;!compact&quot;
class:lg:text-[2rem]=&quot;!compact&quot;
&gt;
&#123;title&#125;
&lt;/h2&gt;
&lt;!-- Description --&gt;
&lt;p
class=&quot;mx-auto mt-3 max-w-xl text-sm leading-6 text-slate-600 dark:text-slate-400&quot;
class:hidden=&quot;description === ''&quot;
class:sm:text-base=&quot;!compact&quot;
class:sm:leading-7=&quot;!compact&quot;
&gt;
&#123;description&#125;
&lt;/p&gt;
&lt;!-- Suggestions --&gt;
&lt;div
class=&quot;mt-6 flex flex-wrap gap-2&quot;
class:hidden=&quot;suggestions.length === 0&quot;
class:justify-center=&quot;centered&quot;
&gt;
&#123;#each suggestions.slice(0, 4) as suggestion&#125;
&lt;a
href=&quot;&#123;suggestion.href&#125;&quot;
class=&quot;inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-3 py-2 text-xs font-semibold text-slate-600 shadow-sm transition hover:-translate-y-0.5 hover:border-indigo-300 hover:bg-indigo-50 hover:text-indigo-700 dark:border-white/10 dark:bg-white/5 dark:text-slate-300 dark:hover:border-indigo-500/30 dark:hover:bg-indigo-500/10 dark:hover:text-indigo-300&quot;
&gt;
&lt;span class=&quot;&#123;suggestion.iconClass&#125; h-3.5 w-3.5&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&#123;suggestion.label&#125;
&lt;/a&gt;
&#123;/each&#125;
&lt;/div&gt;
&lt;!-- Actions --&gt;
&lt;div
class=&quot;flex flex-col gap-3 sm:flex-row&quot;
class:mt-7=&quot;suggestions.length === 0&quot;
class:mt-6=&quot;suggestions.length &gt; 0&quot;
class:hidden=&quot;primaryLabel === '' &amp;&amp; secondaryLabel === ''&quot;
class:justify-center=&quot;centered&quot;
&gt;
&lt;a
href=&quot;&#123;secondaryHref&#125;&quot;
class=&quot;h-11 items-center justify-center 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;secondaryLabel === ''&quot;
class:inline-flex=&quot;secondaryLabel !== ''&quot;
&gt;
&#123;secondaryLabel&#125;
&lt;/a&gt;
&lt;a
href=&quot;&#123;primaryHref&#125;&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-900&quot;
class:hidden=&quot;primaryLabel === ''&quot;
class:inline-flex=&quot;primaryLabel !== ''&quot;
&gt;
&#123;primaryLabel&#125;
&lt;span class=&quot;icon-[lucide--arrow-right] h-4 w-4 transition-transform group-hover:translate-x-1&quot; aria-hidden=&quot;true&quot; &gt;
&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/section&gt;
&#125;
&#125;
</code></pre></section></article><aside class="on-this-page"><h2>On this page</h2><nav><a href="#usage">Usage</a><a href="#props">Props and attributes</a><a href="#slots">Slots</a><a href="#events">Events</a><a href="#source">Source contract</a></nav></aside></main>
<footer><div class="footer-brand"><span class="footer-mark" aria-hidden="true">W</span><p><strong>WRNexusJS 0.2.73</strong><span>Complete API documentation generated from installed package declarations.</span></p></div><nav aria-label="Footer"><a href="/packages">All packages</a><a href="/getting-started">Get started</a><a href="/security">Security</a><a href="/support">Support</a><a href="/llms.txt">AI guide</a></nav><p class="footer-meta">Private Developer Preview · Bun-native</p></footer>
<BackToTop />
</div>
}
}