diff --git a/src/lib/elements/forms/index.ts b/src/lib/elements/forms/index.ts index dd02f69649..d60fb54424 100644 --- a/src/lib/elements/forms/index.ts +++ b/src/lib/elements/forms/index.ts @@ -23,3 +23,4 @@ export { default as InputURL } from './inputURL.svelte'; export { default as InputId } from './inputId.svelte'; export { default as InputSecret } from './inputSecret.svelte'; export { default as Helper } from './helper.svelte'; +export { default as Label } from './label.svelte'; diff --git a/src/lib/elements/forms/inputCheckbox.svelte b/src/lib/elements/forms/inputCheckbox.svelte index 7e2f89ac9e..b8c601635b 100644 --- a/src/lib/elements/forms/inputCheckbox.svelte +++ b/src/lib/elements/forms/inputCheckbox.svelte @@ -1,5 +1,5 @@ -
import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let showLabel = true; @@ -48,7 +48,10 @@ - + +
import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let showLabel = true; @@ -39,12 +39,9 @@ -
import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let showLabel = true; @@ -47,7 +47,10 @@ - + +
import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let showLabel = true; @@ -41,7 +41,10 @@ - + +
import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let optionalText: string | undefined = undefined; @@ -52,12 +52,9 @@ -
import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let id: string; export let label: string; @@ -47,7 +47,10 @@ - + +
{#if showInPlainText} import { onMount } from 'svelte'; - import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let showLabel = true; @@ -46,7 +46,9 @@ - +
- import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let label: string; export let showLabel = true; @@ -40,7 +40,9 @@ bind:group bind:this={element} on:invalid={handleInvalid} /> - +
{#if error} {error} diff --git a/src/lib/elements/forms/inputSecret.svelte b/src/lib/elements/forms/inputSecret.svelte index f7244bf751..c1932133d9 100644 --- a/src/lib/elements/forms/inputSecret.svelte +++ b/src/lib/elements/forms/inputSecret.svelte @@ -1,5 +1,5 @@ - + +
{#if showInPlainText}
- import { FormItem, Helper } from '.'; + import { FormItem, Helper, Label } from '.'; export let id: string; export let label: string; @@ -41,12 +41,9 @@ -
+ {#if maxlength} + + {value?.length ?? 0} + + {maxlength} + + {/if}
{#if error} {error} diff --git a/src/lib/elements/forms/inputTextarea.svelte b/src/lib/elements/forms/inputTextarea.svelte index 8c828baf9d..7285b6f240 100644 --- a/src/lib/elements/forms/inputTextarea.svelte +++ b/src/lib/elements/forms/inputTextarea.svelte @@ -1,6 +1,6 @@ - + +