8000 Verification code input by elad2412 · Pull Request #146 · appwrite/pink · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Verification code input #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions apps/pink/src/pages/elements/input-field.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,55 @@ Dropdown is made with ```drop-list```. To hide items use the ```u-hide``` class.
</form>
</Preview>


## Verification code input

| Input Type | Type | |
| ----------------------------- | --------- | ----------------------------------------------------------------------------------------------------- |
| `verification-code-input` | character | Usualy used for code with numbers, but can use with amy type of input, limited for one char per textbox |

<Preview center>
<form class="form u-width-full-line u-max-width-500">
<ul class="form-list">
<li class="form-item">
<label class="label">Enter Code</label>
<ol class="u-flex u-gap-16">
<li><input type="text" class="verification-code-input u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input u-remove-input-number-buttons" maxlength="1" /></li>
</ol>
</li>
</ul>
</form>
</Preview>

State large for verification code input:

| Class | Type | |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| is-large | size | inrease size to 60px width & height |

<Preview center>
<form class="form u-width-full-line u-max-width-500">
<ul class="form-list">
<li class="form-item">
<label class="label">Enter Code</label>
<ol class="u-flex u-gap-16">
<li><input type="text" class="verification-code-input is-large u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input is-large u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input is-large u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input is-large u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input is-large u-remove-input-number-buttons" maxlength="1" /></li>
<li><input type="text" class="verification-code-input is-large u-remove-input-number-buttons" maxlength="1" /></li>
</ol>
</li>
</ul>
</form>
</Preview>

## States

States can be applied to all inputs fields:
Expand Down
12 changes: 12 additions & 0 deletions packages/ui/src/6-elements/form/_text-inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,16 @@ input[type="datetime-local" i]::-webkit-calendar-picker-indicator {
--tag-bg-color: var(--color-neutral-80);
--tag-text-color: var(--color-neutral-20);
}
}
.verification-code-input {
--p-input-size: var(--input-size, #{pxToRem(40)});
inline-size: var(--p-input-size);
block-size: var(--p-input-size);
font-size: pxToRem(20);
text-align: center;

&.is-large {
--input-size: #{pxToRem(60)};
font-size: pxToRem(30);
}
}
0