323 lines
31 KiB
Plaintext
323 lines
31 KiB
Plaintext
// Generated by scripts/generate-showcase.mjs. Do not edit directly.
|
|
page TimePickerDetail {
|
|
layout = "showcase"
|
|
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
|
|
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
|
|
state playground_id = ctx.url.searchParams.get("pg_id") ?? "time-picker-1"
|
|
state playground_name = ctx.url.searchParams.get("pg_name") ?? "time-pickerField"
|
|
state playground_label = ctx.url.searchParams.get("pg_label") ?? "Start time"
|
|
state playground_hiddenLabel = ctx.url.searchParams.get("pg_hiddenLabel") ?? "false"
|
|
state playground_value = ctx.url.searchParams.get("pg_value") ?? ""
|
|
state playground_placeholder = ctx.url.searchParams.get("pg_placeholder") ?? "Enter time picker"
|
|
state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "normal"
|
|
state playground_icon = ctx.url.searchParams.get("pg_icon") ?? ""
|
|
state playground_iconPosition = ctx.url.searchParams.get("pg_iconPosition") ?? "start"
|
|
state playground_helperText = ctx.url.searchParams.get("pg_helperText") ?? "Helpful context for this field."
|
|
state playground_cornerHint = ctx.url.searchParams.get("pg_cornerHint") ?? ""
|
|
state playground_error = ctx.url.searchParams.get("pg_error") ?? ""
|
|
state playground_inline = ctx.url.searchParams.get("pg_inline") ?? "false"
|
|
state playground_min = ctx.url.searchParams.get("pg_min") ?? "08:00"
|
|
state playground_max = ctx.url.searchParams.get("pg_max") ?? "18:00"
|
|
state playground_step = ctx.url.searchParams.get("pg_step") ?? ""
|
|
state playground_format = ctx.url.searchParams.get("pg_format") ?? "24"
|
|
state playground_minuteStep = ctx.url.searchParams.get("pg_minuteStep") ?? "5"
|
|
state playground_hours = ctx.url.searchParams.get("pg_hours") ?? ""
|
|
state playground_minutes = ctx.url.searchParams.get("pg_minutes") ?? ""
|
|
state playground_readonly = ctx.url.searchParams.get("pg_readonly") ?? "false"
|
|
state playground_disabled = ctx.url.searchParams.get("pg_disabled") ?? "false"
|
|
state playground_required = ctx.url.searchParams.get("pg_required") ?? "false"
|
|
state playground_class = ctx.url.searchParams.get("pg_class") ?? ""
|
|
seo {
|
|
title = "Time Picker"
|
|
description = "Theme-aware, responsive time picker component."
|
|
}
|
|
view {
|
|
<nav class="docs-breadcrumbs" aria-label="Breadcrumb">
|
|
<a href="/">Components</a><span aria-hidden="true">/</span><a href="/forms">Forms</a><span aria-hidden="true">/</span><span>Time Picker</span>
|
|
</nav>
|
|
<header class="detail-hero">
|
|
<div class="detail-hero-copy">
|
|
<span class="showcase-eyebrow">Forms component</span>
|
|
<h1>Time Picker</h1>
|
|
<p>Theme-aware, responsive time picker component.</p>
|
|
<div class="detail-badges"><span>26 props</span><span>0 slots</span><span>7 events</span><span>Theme ready</span><span>Responsive</span></div>
|
|
</div>
|
|
<div class="detail-hero-icon"><span class="icon-[lucide--component] size-10" aria-hidden="true"></span></div>
|
|
</header>
|
|
<section id="playground" class="detail-section playground-section" data-playground data-playground-component="TimePicker" data-playground-public-tag="true" data-playground-has-slot="false">
|
|
<div class="detail-section-heading"><span>Interactive playground</span><h2>Configure Time Picker</h2><p>Change any prop and inspect the server-rendered component immediately.</p></div>
|
|
<div class="playground-workbench">
|
|
<div class="playground-preview">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="playground-preview-source" data-playground-preview><div data-component="TimePicker" size="{playground_size}" color="{playground_color}" id="{playground_id}" name="{playground_name}" label="{playground_label}" hiddenLabel="{playground_hiddenLabel}" value="{playground_value}" placeholder="{playground_placeholder}" variant="{playground_variant}" icon="{playground_icon}" iconPosition="{playground_iconPosition}" helperText="{playground_helperText}" cornerHint="{playground_cornerHint}" error="{playground_error}" inline="{playground_inline}" min="{playground_min}" max="{playground_max}" step="{playground_step}" format="{playground_format}" minuteStep="{playground_minuteStep}" hours="{playground_hours}" minutes="{playground_minutes}" readonly="{playground_readonly}" disabled="{playground_disabled}" required="{playground_required}" class="{playground_class}"></div></div>
|
|
<section class="playground-code" aria-label="Current component code">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component code</span><button type="button" data-playground-copy><span class="icon-[lucide--copy] size-4" aria-hidden="true"></span>Copy</button></header>
|
|
<pre><code data-playground-code><TimePicker
|
|
id="time-picker-1"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
helperText="Helpful context for this field."
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
<div class="playground-status" data-playground-status aria-live="polite"></div>
|
|
</div>
|
|
<form class="playground-controls" data-playground-form>
|
|
<header><div><span>Component props</span><strong>26 controls</strong></div><button type="reset"><span class="icon-[lucide--rotate-ccw] size-4" aria-hidden="true"></span>Reset</button></header>
|
|
<div class="playground-fields"><label class="playground-field" for="playground-time-picker-size"><span><strong>size</strong><small>string</small></span><select id="playground-time-picker-size" name="pg_size"><option value="default" selected>default</option><option value="xs">xs</option><option value="sm">sm</option><option value="md">md</option><option value="lg">lg</option><option value="xl">xl</option><option value="icon">icon</option><option value="icon-xs">icon-xs</option><option value="icon-sm">icon-sm</option><option value="icon-lg">icon-lg</option></select></label><label class="playground-field" for="playground-time-picker-color"><span><strong>color</strong><small>string</small></span><select id="playground-time-picker-color" name="pg_color"><option value="primary" selected>primary</option><option value="secondary">secondary</option><option value="success">success</option><option value="warning">warning</option><option value="danger">danger</option><option value="info">info</option></select></label><label class="playground-field" for="playground-time-picker-id"><span><strong>id</strong><small>string</small></span><input id="playground-time-picker-id" name="pg_id" type="text" value="time-picker-1" /></label><label class="playground-field" for="playground-time-picker-name"><span><strong>name</strong><small>string</small></span><input id="playground-time-picker-name" name="pg_name" type="text" value="time-pickerField" /></label><label class="playground-field" for="playground-time-picker-label"><span><strong>label</strong><small>string</small></span><input id="playground-time-picker-label" name="pg_label" type="text" value="Start time" /></label><label class="playground-toggle" for="playground-time-picker-hiddenLabel"><span><strong>hidden Label</strong><small>boolean</small></span><input id="playground-time-picker-hiddenLabel" name="pg_hiddenLabel" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-time-picker-value"><span><strong>value</strong><small>string</small></span><input id="playground-time-picker-value" name="pg_value" type="text" value="" /></label><label class="playground-field" for="playground-time-picker-placeholder"><span><strong>placeholder</strong><small>string</small></span><input id="playground-time-picker-placeholder" name="pg_placeholder" type="text" value="Enter time picker" /></label><label class="playground-field" for="playground-time-picker-variant"><span><strong>variant</strong><small>string</small></span><select id="playground-time-picker-variant" name="pg_variant"><option value="normal" selected>normal</option><option value="default">default</option><option value="outline">outline</option><option value="secondary">secondary</option><option value="ghost">ghost</option><option value="destructive">destructive</option><option value="link">link</option><option value="floating">floating</option></select></label><label class="playground-field" for="playground-time-picker-icon"><span><strong>icon</strong><small>string</small></span><input id="playground-time-picker-icon" name="pg_icon" type="text" value="" /></label><label class="playground-field" for="playground-time-picker-iconPosition"><span><strong>icon Position</strong><small>string</small></span><select id="playground-time-picker-iconPosition" name="pg_iconPosition"><option value="start" selected>start</option><option value="end">end</option></select></label><label class="playground-field" for="playground-time-picker-helperText"><span><strong>helper Text</strong><small>string</small></span><input id="playground-time-picker-helperText" name="pg_helperText" type="text" value="Helpful context for this field." /></label><label class="playground-field" for="playground-time-picker-cornerHint"><span><strong>corner Hint</strong><small>string</small></span><input id="playground-time-picker-cornerHint" name="pg_cornerHint" type="text" value="" /></label><label class="playground-field" for="playground-time-picker-error"><span><strong>error</strong><small>string</small></span><input id="playground-time-picker-error" name="pg_error" type="text" value="" /></label><label class="playground-toggle" for="playground-time-picker-inline"><span><strong>inline</strong><small>boolean</small></span><input id="playground-time-picker-inline" name="pg_inline" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-time-picker-min"><span><strong>min</strong><small>string</small></span><input id="playground-time-picker-min" name="pg_min" type="text" value="08:00" /></label><label class="playground-field" for="playground-time-picker-max"><span><strong>max</strong><small>string</small></span><input id="playground-time-picker-max" name="pg_max" type="text" value="18:00" /></label><label class="playground-field" for="playground-time-picker-step"><span><strong>step</strong><small>string</small></span><input id="playground-time-picker-step" name="pg_step" type="text" value="" /></label><label class="playground-field" for="playground-time-picker-format"><span><strong>format</strong><small>string</small></span><input id="playground-time-picker-format" name="pg_format" type="text" value="24" /></label><label class="playground-field" for="playground-time-picker-minuteStep"><span><strong>minute Step</strong><small>number</small></span><input id="playground-time-picker-minuteStep" name="pg_minuteStep" type="number" value="5" /></label><label class="playground-field" for="playground-time-picker-hours"><span><strong>hours</strong><small>string</small></span><input id="playground-time-picker-hours" name="pg_hours" type="text" value="" /></label><label class="playground-field" for="playground-time-picker-minutes"><span><strong>minutes</strong><small>string</small></span><input id="playground-time-picker-minutes" name="pg_minutes" type="text" value="" /></label><label class="playground-toggle" for="playground-time-picker-readonly"><span><strong>readonly</strong><small>boolean</small></span><input id="playground-time-picker-readonly" name="pg_readonly" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-time-picker-disabled"><span><strong>disabled</strong><small>boolean</small></span><input id="playground-time-picker-disabled" name="pg_disabled" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-time-picker-required"><span><strong>required</strong><small>boolean</small></span><input id="playground-time-picker-required" name="pg_required" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-time-picker-class"><span><strong>class</strong><small>string</small></span><input id="playground-time-picker-class" name="pg_class" type="text" value="" /></label></div>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
<div class="detail-layout">
|
|
<main class="detail-content">
|
|
<section class="detail-section"><div class="detail-section-heading"><span>Live examples</span><h2>Designed for real product surfaces</h2><p>Compare configurations and resize the browser to check responsive behavior.</p></div><div class="demo-list">
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Basic usage</span><h2>Default field</h2><p>Use a labelled field with a value, placeholder, and supporting helper text.</p></div>
|
|
<span class="demo-case-number">01</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-1" class="demo-canvas demo-canvas--1">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-1" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="normal" icon="" iconPosition="start" helperText="Helpful context for this field." cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Default field usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-1"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
helperText="Helpful context for this field."
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Appearance</span><h2>Outlined with start icon</h2><p>Combine an outlined treatment with a leading icon.</p></div>
|
|
<span class="demo-case-number">02</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-2" class="demo-canvas demo-canvas--2">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-2" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="outlined" icon="icon-[lucide--sparkles]" iconPosition="start" helperText="" cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Outlined with start icon usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-2"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
variant="outlined"
|
|
icon="icon-[lucide--sparkles]"
|
|
iconPosition="start"
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Appearance</span><h2>Floating label</h2><p>Move the label into the control while preserving an accessible field name.</p></div>
|
|
<span class="demo-case-number">03</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-3" class="demo-canvas demo-canvas--3">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-3" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="floating" icon="icon-[lucide--circle-user-round]" iconPosition="end" helperText="" cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Floating label usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-3"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
variant="floating"
|
|
icon="icon-[lucide--circle-user-round]"
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Appearance</span><h2>Pill and compact size</h2><p>Use pill styling and compact sizing in dense interfaces.</p></div>
|
|
<span class="demo-case-number">04</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-4" class="demo-canvas demo-canvas--4">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="sm" color="primary" id="time-picker-4" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="pill" icon="" iconPosition="start" helperText="" cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Pill and compact size usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
size="sm"
|
|
id="time-picker-4"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
variant="pill"
|
|
iconPosition="start"
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">States</span><h2>Read only</h2><p>Display a submitted value without allowing it to be changed.</p></div>
|
|
<span class="demo-case-number">05</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-5" class="demo-canvas demo-canvas--5">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-5" name="time-pickerField" label="Start time" value="09:30" placeholder="Enter time picker" variant="normal" icon="" iconPosition="start" helperText="" cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="true" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Read only usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-5"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
value="09:30"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
min="08:00"
|
|
max="18:00"
|
|
readonly="true"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">States</span><h2>Disabled</h2><p>Prevent interaction and communicate that the field is unavailable.</p></div>
|
|
<span class="demo-case-number">06</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-6" class="demo-canvas demo-canvas--6">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-6" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="normal" icon="" iconPosition="start" helperText="" cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="true" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Disabled usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-6"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
min="08:00"
|
|
max="18:00"
|
|
disabled="true"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Layout</span><h2>Inline helper text</h2><p>Place the label, control, and supporting text on one responsive line.</p></div>
|
|
<span class="demo-case-number">07</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-7" class="demo-canvas demo-canvas--7">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-7" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="normal" icon="" iconPosition="start" helperText="We'll never share your details." cornerHint="" error="" inline="true" min="08:00" max="18:00" readonly="false" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Inline helper text usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-7"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
helperText="We'll never share your details."
|
|
inline="true"
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Layout</span><h2>Field with corner hint</h2><p>Place optional context opposite the label and keep the control on the next line.</p></div>
|
|
<span class="demo-case-number">08</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-8" class="demo-canvas demo-canvas--8">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><div data-component="TimePicker" size="default" color="primary" id="time-picker-8" name="time-pickerField" label="Start time" value="" placeholder="Enter time picker" variant="normal" icon="" iconPosition="start" helperText="" cornerHint="Optional" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="false" required="false"></div></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Field with corner hint usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-8"
|
|
name="time-pickerField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
cornerHint="Optional"
|
|
min="08:00"
|
|
max="18:00"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article>
|
|
<article class="demo-case">
|
|
<header class="demo-case-header">
|
|
<div><span class="demo-case-eyebrow">Validation</span><h2>Validated field</h2><p>Surface validation through @wrnexus/validation-compatible error targets and accessible state.</p></div>
|
|
<span class="demo-case-number">09</span>
|
|
</header>
|
|
<div class="demo-workbench">
|
|
<div id="time-picker-demo-9" class="demo-canvas demo-canvas--9">
|
|
<div class="demo-browser-chrome"><span></span><span></span><span></span><small>Live preview</small></div>
|
|
<div class="demo-render"><form data-schema="basic-form-validation" class="demo-validation-form"><div data-component="TimePicker" size="default" color="primary" id="time-picker-9" name="validatedField" label="Start time" value="" placeholder="Enter time picker" variant="normal" icon="" iconPosition="start" helperText="" cornerHint="" error="" inline="false" min="08:00" max="18:00" readonly="false" disabled="false" required="true"></div><button type="submit" class="wire-btn wire-btn--variant-default">Validate selection</button></form></div>
|
|
</div>
|
|
<section class="demo-code" aria-label="Validated field usage">
|
|
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
|
<pre><code><TimePicker
|
|
id="time-picker-9"
|
|
name="validatedField"
|
|
label="Start time"
|
|
placeholder="Enter time picker"
|
|
iconPosition="start"
|
|
min="08:00"
|
|
max="18:00"
|
|
required="true"
|
|
/></code></pre>
|
|
</section>
|
|
</div>
|
|
</article></div></section>
|
|
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component events</span><h2>Events</h2><p>Public events declared by this component. Custom events bubble from the component root and expose state through <code>event.detail</code>.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@input</code><span>Fires immediately as the component value changes.</span></div><div><code>@change</code><span>Fires when the component value or selection changes.</span></div><div><code>@focus</code><span>Fires when the component receives focus.</span></div><div><code>@blur</code><span>Fires when focus leaves the component.</span></div><div><code>@open</code><span>Fires when the component opens.</span></div><div><code>@close</code><span>Fires when the component closes.</span></div><div><code>@invalid</code><span>Fires when the component emits the invalid event.</span></div></div><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Event listener</span><small>.js</small></header><pre><code>const component = document.querySelector('[data-wrn-events]')
|
|
|
|
component.addEventListener('input', (event) => {
|
|
console.log(event.detail)
|
|
})</code></pre></section></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>"primary"</code></td><td>No</td></tr><tr><td><code>id</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>name</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>label</code></td><td>string</td><td><code>"Time"</code></td><td>No</td></tr><tr><td><code>hiddenLabel</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>value</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>placeholder</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>variant</code></td><td>string</td><td><code>"normal"</code></td><td>No</td></tr><tr><td><code>icon</code></td><td>string</td><td><code>"icon-[lucide--clock-3]"</code></td><td>No</td></tr><tr><td><code>iconPosition</code></td><td>string</td><td><code>"end"</code></td><td>No</td></tr><tr><td><code>helperText</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>cornerHint</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>error</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>inline</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>min</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>max</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>step</code></td><td>string</td><td><code>""</code></td><td>No</td></tr><tr><td><code>format</code></td><td>string</td><td><code>"24"</code></td><td>No</td></tr><tr><td><code>minuteStep</code></td><td>number</td><td><code>5</code></td><td>No</td></tr><tr><td><code>hours</code></td><td>string</td><td><code>["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23"]</code></td><td>No</td></tr><tr><td><code>minutes</code></td><td>string</td><td><code>["00", "05", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55"]</code></td><td>No</td></tr><tr><td><code>readonly</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>disabled</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>required</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>class</code></td><td>string</td><td><code>""</code></td><td>No</td></tr></tbody></table></div></section>
|
|
</main>
|
|
<aside class="detail-aside">
|
|
<div class="detail-toc"><strong>On this page</strong><a href="#playground">Playground</a><a href="#time-picker-demo-1">Default field</a><a href="#time-picker-demo-2">Outlined with start icon</a><a href="#time-picker-demo-3">Floating label</a><a href="#time-picker-demo-4">Pill and compact size</a><a href="#time-picker-demo-5">Read only</a><a href="#time-picker-demo-6">Disabled</a><a href="#time-picker-demo-7">Inline helper text</a><a href="#time-picker-demo-8">Field with corner hint</a><a href="#time-picker-demo-9">Validated field</a><a href="#events">Events</a><a href="#api">Props API</a></div>
|
|
</aside>
|
|
</div>
|
|
<nav class="detail-pagination">
|
|
<a href="/components/textarea"><small>Previous</small><strong>← Textarea</strong></a>
|
|
<span></span>
|
|
</nav>
|
|
}
|
|
}
|