121 lines
8.4 KiB
Plaintext
121 lines
8.4 KiB
Plaintext
page AnalyticsDashboardPreviewcomponent {
|
|
seo {
|
|
title = "AnalyticsDashboardPreview component"
|
|
description = "Reusable analytics dashboard preview 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.3.4</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">AnalyticsDashboardPreview</span></nav><section class="doc-intro"><span class="eyebrow">content component</span><h1>AnalyticsDashboardPreview</h1><p>Reusable analytics dashboard preview component.</p><div class="doc-meta"><span>@wrnexus/ui 0.3.4</span><span>8 props</span><span>1 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><AnalyticsDashboardPreview
|
|
eyebrow="eyebrow"
|
|
title="title"
|
|
description="description"
|
|
href="href"
|
|
actionLabel="Learn more"
|
|
/></code></pre><p>Legacy mount name: <code>data-component="AnalyticsDashboardPreview"</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>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>""</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>href</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>actionLabel</code></td><td><code>string</code></td><td>Optional</td><td><code>"Learn more"</code></td></tr><tr><td><code>image</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>alt</code></td><td><code>string</code></td><td>Optional</td><td><code>""</code></td></tr><tr><td><code>class</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><ul><li><code>default</code></li></ul></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/AnalyticsDashboardPreview.wrn</code></p><pre data-language="wrn"><code>component AnalyticsDashboardPreview {
|
|
props {
|
|
eyebrow = ""
|
|
title = ""
|
|
description = ""
|
|
href = ""
|
|
actionLabel = "Learn more"
|
|
image = ""
|
|
alt = ""
|
|
class = ""
|
|
}
|
|
|
|
view {
|
|
<section class="wire-analytics-preview {class}">
|
|
<div class="wire-analytics-preview__surface">
|
|
<div class="wire-analytics-preview__visual">
|
|
{#if image}
|
|
<img
|
|
src="{image}"
|
|
alt="{alt}"
|
|
class="wire-analytics-preview__image"
|
|
/>
|
|
{:else}
|
|
<div
|
|
class="wire-analytics-preview__chart"
|
|
role="img"
|
|
aria-label="Delivery trend rising over seven days"
|
|
>
|
|
<div class="wire-analytics-preview__chart-header">
|
|
<strong>Delivery trend</strong>
|
|
<span>↗ 18.4%</span>
|
|
</div>
|
|
<svg
|
|
class="wire-analytics-preview__chart-svg"
|
|
viewBox="0 0 700 250"
|
|
aria-hidden="true"
|
|
>
|
|
<defs>
|
|
<linearGradient id="wire-analytics-area" x1="0" y1="0" x2="0" y2="1">
|
|
<stop offset="0%" stop-color="currentColor" stop-opacity=".3">
|
|
</stop>
|
|
<stop offset="100%" stop-color="currentColor" stop-opacity="0">
|
|
</stop>
|
|
</linearGradient>
|
|
</defs>
|
|
<g fill="none" stroke="var(--wire-color-border,#e2e8f0)">
|
|
<path d="M20 50H680M20 115H680M20 180H680M20 230H680">
|
|
</path>
|
|
</g>
|
|
<path fill="url(#wire-analytics-area)" d="M20 210 C100 195 120 150 190 165 S310 195 370 120 S475 130 525 100 S610 90 680 32 L680 230 L20 230Z">
|
|
</path>
|
|
<path fill="none" stroke="currentColor" stroke-width="6" stroke-linecap="round" d="M20 210 C100 195 120 150 190 165 S310 195 370 120 S475 130 525 100 S610 90 680 32">
|
|
</path>
|
|
</svg>
|
|
<div class="wire-analytics-preview__days">
|
|
<span>Mon</span>
|
|
<span>Tue</span>
|
|
<span>Wed</span>
|
|
<span>Thu</span>
|
|
<span>Fri</span>
|
|
<span>Sat</span>
|
|
<span>Sun</span>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
<div class="wire-analytics-preview__content">
|
|
{#if eyebrow}
|
|
<p class="wire-analytics-preview__eyebrow">{eyebrow}</p>
|
|
{/if}
|
|
|
|
{#if title}
|
|
<h2 class="wire-analytics-preview__title">{title}</h2>
|
|
{/if}
|
|
|
|
{#if description}
|
|
<p class="wire-analytics-preview__description">{description}</p>
|
|
{/if}
|
|
|
|
<div class="wire-analytics-preview__metrics">
|
|
<slot />
|
|
</div>
|
|
|
|
{#if href}
|
|
<a href="{href}" class="wire-analytics-preview__action">
|
|
{actionLabel}<span aria-hidden="true">→</span>
|
|
</a>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
}
|
|
}
|
|
</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.3.4</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>
|
|
}
|
|
}
|