feat: sync WRNexusJS component showcase 0.5.0
This commit is contained in:
1 parent
72552f2381
commit
8ba1f67f98
104 files changed
+10238
-7893
No files matched your search
@@ -64,7 +64,7 @@ page StrongPasswordDetail {
|
||||
</div>
|
||||
<form class="playground-controls" data-playground-form>
|
||||
<header><div><span>Component props</span><strong>27 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-strong-password-size"><span><strong>size</strong><small>string</small></span><select id="playground-strong-password-size" name="pg_size"><option value="default" selected>default</option><option value="xs">xs</option><option value="sm">sm</option><option value="lg">lg</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-strong-password-color"><span><strong>color</strong><small>string</small></span><select id="playground-strong-password-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-strong-password-label"><span><strong>label</strong><small>string</small></span><input id="playground-strong-password-label" name="pg_label" type="text" value="Live strength meter" /></label><label class="playground-field" for="playground-strong-password-name"><span><strong>name</strong><small>string</small></span><input id="playground-strong-password-name" name="pg_name" type="text" value="strong-password-1" /></label><label class="playground-field" for="playground-strong-password-value"><span><strong>value</strong><small>string</small></span><input id="playground-strong-password-value" name="pg_value" type="text" value="Northstar!2026" /></label><label class="playground-field" for="playground-strong-password-placeholder"><span><strong>placeholder</strong><small>string</small></span><input id="playground-strong-password-placeholder" name="pg_placeholder" type="text" value="Create a strong password" /></label><label class="playground-field" for="playground-strong-password-autocomplete"><span><strong>autocomplete</strong><small>string</small></span><input id="playground-strong-password-autocomplete" name="pg_autocomplete" type="text" value="new-password" /></label><label class="playground-field" for="playground-strong-password-minLength"><span><strong>min Length</strong><small>number</small></span><input id="playground-strong-password-minLength" name="pg_minLength" type="number" value="8" /></label><label class="playground-field" for="playground-strong-password-specialCharactersSet"><span><strong>special Characters Set</strong><small>string</small></span><input id="playground-strong-password-specialCharactersSet" name="pg_specialCharactersSet" type="text" value="!@#$%^&*()_+-=[]{}|;:,.<>?" /></label><label class="playground-toggle" for="playground-strong-password-requireLowercase"><span><strong>require Lowercase</strong><small>boolean</small></span><input id="playground-strong-password-requireLowercase" name="pg_requireLowercase" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireUppercase"><span><strong>require Uppercase</strong><small>boolean</small></span><input id="playground-strong-password-requireUppercase" name="pg_requireUppercase" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireNumber"><span><strong>require Number</strong><small>boolean</small></span><input id="playground-strong-password-requireNumber" name="pg_requireNumber" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireSpecialCharacter"><span><strong>require Special Character</strong><small>boolean</small></span><input id="playground-strong-password-requireSpecialCharacter" name="pg_requireSpecialCharacter" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-showRequirements"><span><strong>show Requirements</strong><small>boolean</small></span><input id="playground-strong-password-showRequirements" name="pg_showRequirements" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-strong-password-presentation"><span><strong>presentation</strong><small>string</small></span><input id="playground-strong-password-presentation" name="pg_presentation" type="text" value="inline" /></label><label class="playground-field" for="playground-strong-password-hintText"><span><strong>hint Text</strong><small>string</small></span><input id="playground-strong-password-hintText" name="pg_hintText" type="text" value="" /></label><label class="playground-field" for="playground-strong-password-emptyLabeLine truncated
|
||||
<div class="playground-fields"><label class="playground-field" for="playground-strong-password-size"><span><strong>size</strong><small>string</small></span><select id="playground-strong-password-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-strong-password-color"><span><strong>color</strong><small>string</small></span><select id="playground-strong-password-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-strong-password-label"><span><strong>label</strong><small>string</small></span><input id="playground-strong-password-label" name="pg_label" type="text" value="Live strength meter" /></label><label class="playground-field" for="playground-strong-password-name"><span><strong>name</strong><small>string</small></span><input id="playground-strong-password-name" name="pg_name" type="text" value="strong-password-1" /></label><label class="playground-field" for="playground-strong-password-value"><span><strong>value</strong><small>string</small></span><input id="playground-strong-password-value" name="pg_value" type="text" value="Northstar!2026" /></label><label class="playground-field" for="playground-strong-password-placeholder"><span><strong>placeholder</strong><small>string</small></span><input id="playground-strong-password-placeholder" name="pg_placeholder" type="text" value="Create a strong password" /></label><label class="playground-field" for="playground-strong-password-autocomplete"><span><strong>autocomplete</strong><small>string</small></span><input id="playground-strong-password-autocomplete" name="pg_autocomplete" type="text" value="new-password" /></label><label class="playground-field" for="playground-strong-password-minLength"><span><strong>min Length</strong><small>number</small></span><input id="playground-strong-password-minLength" name="pg_minLength" type="number" value="8" /></label><label class="playground-field" for="playground-strong-password-specialCharactersSet"><span><strong>special Characters Set</strong><small>string</small></span><input id="playground-strong-password-specialCharactersSet" name="pg_specialCharactersSet" type="text" value="!@#$%^&*()_+-=[]{}|;:,.<>?" /></label><label class="playground-toggle" for="playground-strong-password-requireLowercase"><span><strong>require Lowercase</strong><small>boolean</small></span><input id="playground-strong-password-requireLowercase" name="pg_requireLowercase" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireUppercase"><span><strong>require Uppercase</strong><small>boolean</small></span><input id="playground-strong-password-requireUppercase" name="pg_requireUppercase" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireNumber"><span><strong>require Number</strong><small>boolean</small></span><input id="playground-strong-password-requireNumber" name="pg_requireNumber" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-requireSpecialCharacter"><span><strong>require Special Character</strong><small>boolean</small></span><input id="playground-strong-password-requireSpecialCharacter" name="pg_requireSpecialCharacter" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-strong-password-showRequirements"><span><strong>show Requirements</strong><small>boolean</small></span><input id="playground-strong-password-showRequirements" name="pg_showRequirements" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-strong-password-presentation"><span><strong>presentation</strong><small>string</small></span><input id="playground-strong-password-presentation" name="pg_presentation" type="text" value="inline" /></label><label class="playground-field" for="playground-strong-password-hintText"><span><strong>hint Text</strong><small>string</small></span><input id="playground-strong-password-hintText" name="pg_hintText" type="text" value="" /></label><label class=Line truncated
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@@ -192,14 +192,9 @@ page StrongPasswordDetail {
|
||||
</section>
|
||||
</div>
|
||||
</article></div></section>
|
||||
<section id="events" class="detail-section"><div class="detail-section-heading"><span>Component events</span><h2>Respond to every interaction</h2><p>Events are declared with <code>@event</code>, bubble from the component root, and expose their state through <code>event.detail</code>.</p></div><div class="detail-events-grid"><div class="detail-events-list"><div><code>@input</code><span>Fires as the password value changes.</span></div><div><code>@change</code><span>Fires when the password input commits a change.</span></div><div><code>@strength</code><span>Fires with the current score, percentage, and strength level.</span></div></div><section class="demo-code"><header><span><span class="icon-[lucide--radio] size-4" aria-hidden="true"></span>Event listeners</span><small>.js</small></header><pre><code>const component = document.querySelector("[data-wrn-strong-password]")
|
||||
<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>@strength</code><span>Fires when the component emits the strength 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("select", (event) => {
|
||||
console.log(event.detail.value)
|
||||
console.log(event.detail.complete)
|
||||
})
|
||||
|
||||
component.addEventListener("load", (event) => {
|
||||
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>label</code></td><td>string</td><td><code>"Password"</code></td><td>No</td></tr><tr><td><code>name</code></td><td>string</td><td><code>"password"</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>"Create a strong password"</code></td><td>No</td></tr><tr><td><code>autocomplete</code></td><td>string</td><td><code>"new-password"</code></td><td>No</td></tr><tr><td><code>minLength</code></td><td>number</td><td><code>8</code></td><td>No</td></tr><tr><td><code>specialCharactersSet</code></td><td>string</td><td><code>"!@#$%^&*()_+-=[]{}|;:,.<>?"</code></td><td>No</td></tr><tr><td><code>requireLowercase</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>requireUppercase</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>requireNumber</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>requireSpecialCharacter</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>showRequirements</code></td><td>boolean</td><td><code>true</code></td><td>No</td></tr><tr><td><code>presentation</code></td><td>string</td><td><code>"inline"</code></td><td>No</td></tr><tr><td><code>hintText</code></td><td>string</td><td><code>"Use a unique password you do not use elsewhere."</code></td><td>No</td></tr><tr><td><code>emptyLabel</code></td><td>string</td><td><code>"Enter a password"</code></td><td>No</td></tr><tr><td><code>weakLabel</code></td><td>string</td><td><code>"Weak"</code></td><td>No</td></tr><tr><td><code>fairLabel</code></td><td>string</td><td><code>"Fair"</code></td><td>No</td></tr><tr><td><code>goodLabel</code></td><td>string</td><td><code>"Good"</code></td><td>No</td></tr><tr><td><code>strongLabel</code></td><td>string</td><td><code>"Strong"</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>readonly</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>invalid</code></td><td>boolean</td><td><code>false</code></td><td>No</td></tr><tr><td><code>validationMessage</code></td><td>string</td><td><code>""</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>
|
||||
|
||||
Reference in new issue
Block a user