refactor(docs): remove card shells and format examples
This commit is contained in:
@@ -13,7 +13,13 @@ page EmptyStatecomponent {
|
||||
<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">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.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><EmptyState eyebrow="eyebrow" title="Nothing found" description="description" iconClass="icon-[lucide--inbox]" primaryLabel="primaryLabel" /></code></pre><p>Legacy mount name: <code>data-component="EmptyState"</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>""</code></td></tr><tr><td><code>eyebrow</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Optional</td><td><code>"Nothing found"</code></td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>iconClass</code></td><td><code>string</code></td><td>Optional</td><td><code>"icon-[lucide--inbox]"</code></td></tr><tr><td><code>primaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>primaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>secondaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>secondaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>""</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 {
|
||||
<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.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><EmptyState
|
||||
eyebrow="eyebrow"
|
||||
title="Nothing found"
|
||||
description="description"
|
||||
iconClass="icon-[lucide--inbox]"
|
||||
primaryLabel="primaryLabel"
|
||||
/></code></pre><p>Legacy mount name: <code>data-component="EmptyState"</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>""</code></td></tr><tr><td><code>eyebrow</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>Optional</td><td><code>"Nothing found"</code></td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>iconClass</code></td><td><code>string</code></td><td>Optional</td><td><code>"icon-[lucide--inbox]"</code></td></tr><tr><td><code>primaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>primaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>secondaryLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>secondaryHref</code></td><td><code>string</code></td><td>Optional</td><td><code>""</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 {
|
||||
props {
|
||||
class: string = ""
|
||||
eyebrow = ""
|
||||
@@ -43,23 +49,23 @@ page EmptyStatecomponent {
|
||||
class:py-8="!compact"
|
||||
class:sm:py-10="!compact"
|
||||
>
|
||||
<div
|
||||
<div
|
||||
class=" 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 "
|
||||
class:max-w-3xl="centered"
|
||||
>
|
||||
<!-- Background decoration -->
|
||||
<div
|
||||
<!-- Background decoration -->
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="pointer-events-none absolute inset-0 overflow-hidden"
|
||||
>
|
||||
<div class="absolute -right-20 -top-24 h-56 w-56 rounded-full bg-indigo-200/30 blur-3xl dark:bg-indigo-500/10"></div>
|
||||
|
||||
<div class="absolute -bottom-24 -left-20 h-56 w-56 rounded-full bg-violet-200/20 blur-3xl dark:bg-violet-500/5"></div>
|
||||
|
||||
<div class="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"></div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
<div class="absolute -right-20 -top-24 h-56 w-56 rounded-full bg-indigo-200/30 blur-3xl dark:bg-indigo-500/10">
|
||||
</div>
|
||||
<div class="absolute -bottom-24 -left-20 h-56 w-56 rounded-full bg-violet-200/20 blur-3xl dark:bg-violet-500/5">
|
||||
</div>
|
||||
<div class="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">
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="relative"
|
||||
class:px-6="compact"
|
||||
class:py-8="compact"
|
||||
@@ -72,37 +78,36 @@ page EmptyStatecomponent {
|
||||
class:lg:px-12="!compact"
|
||||
class:text-center="centered"
|
||||
>
|
||||
<div
|
||||
<div
|
||||
class=" {compact ? 'max-w-xl' : 'max-w-2xl'} {centered ? 'mx-auto' : 'mr-auto'} "
|
||||
class:max-w-xl="compact"
|
||||
class:max-w-2xl="!compact"
|
||||
>
|
||||
<!-- Icon -->
|
||||
<div
|
||||
<!-- Icon -->
|
||||
<div
|
||||
class="flex"
|
||||
class:justify-center="centered"
|
||||
>
|
||||
<span
|
||||
<span
|
||||
class="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"
|
||||
class:h-12="compact"
|
||||
class:w-12="compact"
|
||||
class:h-14="!compact"
|
||||
class:w-14="!compact"
|
||||
>
|
||||
<span class="{iconClass}" class:h-5="compact" class:w-5="compact" class:h-6="!compact" class:w-6="!compact" aria-hidden="true" ></span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Eyebrow -->
|
||||
<p
|
||||
<span class="{iconClass}" class:h-5="compact" class:w-5="compact" class:h-6="!compact" class:w-6="!compact" aria-hidden="true" >
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- Eyebrow -->
|
||||
<p
|
||||
class="mt-5 text-xs font-bold uppercase tracking-[0.18em] text-indigo-600 dark:text-indigo-400"
|
||||
class:hidden="eyebrow === ''"
|
||||
>
|
||||
{eyebrow}
|
||||
</p>
|
||||
|
||||
<!-- Title -->
|
||||
<h2
|
||||
<!-- Title -->
|
||||
<h2
|
||||
id="empty-state-title"
|
||||
class="font-bold tracking-tight text-slate-950 dark:text-white"
|
||||
class:mt-5="eyebrow === ''"
|
||||
@@ -117,9 +122,8 @@ page EmptyStatecomponent {
|
||||
>
|
||||
{title}
|
||||
</h2>
|
||||
|
||||
<!-- Description -->
|
||||
<p
|
||||
<!-- Description -->
|
||||
<p
|
||||
class="mx-auto mt-3 max-w-xl text-sm leading-6 text-slate-600 dark:text-slate-400"
|
||||
class:hidden="description === ''"
|
||||
class:sm:text-base="!compact"
|
||||
@@ -127,9 +131,8 @@ page EmptyStatecomponent {
|
||||
>
|
||||
{description}
|
||||
</p>
|
||||
|
||||
<!-- Suggestions -->
|
||||
<div
|
||||
<!-- Suggestions -->
|
||||
<div
|
||||
class="mt-6 flex flex-wrap gap-2"
|
||||
class:hidden="suggestions.length === 0"
|
||||
class:justify-center="centered"
|
||||
@@ -139,22 +142,22 @@ page EmptyStatecomponent {
|
||||
href="{suggestion.href}"
|
||||
class="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"
|
||||
>
|
||||
<span class="{suggestion.iconClass} h-3.5 w-3.5" aria-hidden="true" ></span>
|
||||
<span class="{suggestion.iconClass} h-3.5 w-3.5" aria-hidden="true" >
|
||||
</span>
|
||||
|
||||
{suggestion.label}
|
||||
</a>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div
|
||||
<!-- Actions -->
|
||||
<div
|
||||
class="flex flex-col gap-3 sm:flex-row"
|
||||
class:mt-7="suggestions.length === 0"
|
||||
class:mt-6="suggestions.length > 0"
|
||||
class:hidden="primaryLabel === '' && secondaryLabel === ''"
|
||||
class:justify-center="centered"
|
||||
>
|
||||
<a
|
||||
<a
|
||||
href="{secondaryHref}"
|
||||
class="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"
|
||||
class:hidden="secondaryLabel === ''"
|
||||
@@ -162,8 +165,7 @@ page EmptyStatecomponent {
|
||||
>
|
||||
{secondaryLabel}
|
||||
</a>
|
||||
|
||||
<a
|
||||
<a
|
||||
href="{primaryHref}"
|
||||
class="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"
|
||||
class:hidden="primaryLabel === ''"
|
||||
@@ -171,12 +173,13 @@ page EmptyStatecomponent {
|
||||
>
|
||||
{primaryLabel}
|
||||
|
||||
<span class="icon-[lucide--arrow-right] h-4 w-4 transition-transform group-hover:translate-x-1" aria-hidden="true" ></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="icon-[lucide--arrow-right] h-4 w-4 transition-transform group-hover:translate-x-1" aria-hidden="true" >
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user