Adds the building blocks every later screen uses, so modules are built from one set of components instead of ad hoc markup: - Form components (KhForm, KhTextBox, KhNumberBox, KhDateBox, KhSelect, KhCheck, KhSwitch, KhHotlink) with Italian number and date input, inline calculation (=10*3), field messages plus a summary that focuses the field, and service errors added by field name. - Display and window components (panels, tiles, badges, chips, money, tabs with Alt+1..9, steps, dialog, side drawer and DrawerService). - KhIconToolbar that keeps one line and moves less used commands into the "..." menu, KhDocHead, and the RecordPage/DocumentPage/MasterDataPage bases with standard commands, shortcuts and save/cancel/delete flow (#27, #29). - Development-only component catalog and sample document page. - Profile: personal data, password change that ends other sessions, TOTP enable/disable and recovery codes through ProfileService (#31). Refs #27 #29 #31 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
@inherits KhInputBase<string>
|
|
|
|
@* A text field (SPEC §10.7). Mono shows codes in the code font. *@
|
|
<KhField Label="@Label" For="@InputId" Required="Required" Hint="@Hint" Messages="Messages" Span="Span">
|
|
<input id="@InputId" class="@InputClass @(Mono ? "mono" : null)" type="@Type" value="@Value" placeholder="@Placeholder"
|
|
maxlength="@MaxLength" readonly="@IsReadOnly" disabled="@Disabled" aria-required="@AriaRequired" aria-invalid="@AriaInvalid"
|
|
aria-describedby="@DescribedBy" @onchange="OnChangeAsync" @attributes="Attributes" />
|
|
</KhField>
|
|
|
|
@code {
|
|
/// <summary>The input type: <c>text</c>, <c>email</c>, <c>tel</c>, <c>url</c>, <c>password</c>.</summary>
|
|
[Parameter]
|
|
public string Type { get; set; } = "text";
|
|
|
|
/// <summary>The text shown while empty.</summary>
|
|
[Parameter]
|
|
public string? Placeholder { get; set; }
|
|
|
|
/// <summary>The longest text.</summary>
|
|
[Parameter]
|
|
public int? MaxLength { get; set; }
|
|
|
|
/// <summary>Shows the value in the code font.</summary>
|
|
[Parameter]
|
|
public bool Mono { get; set; }
|
|
|
|
private Task OnChangeAsync(ChangeEventArgs e) => SetValueAsync(e.Value as string);
|
|
}
|