diff --git a/src/lib/components/avatar.svelte b/src/lib/components/avatar.svelte new file mode 100644 index 0000000000..f688636bdd --- /dev/null +++ b/src/lib/components/avatar.svelte @@ -0,0 +1,14 @@ + + +{name} diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index fd1b70c23b..a21de557ae 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -13,3 +13,7 @@ export { default as DropList } from './dropList.svelte'; export { default as DropListItem } from './dropListItem.svelte'; export { default as DropListLink } from './dropListLink.svelte'; export { default as Collapsible } from './collapsible.svelte'; +export { default as Avatar } from './avatar.svelte'; +export { default as SwitchBox } from './switchBox.svelte'; +export { default as SwitchBoxes } from './switchBoxes.svelte'; +export { default as InfoSection } from './infoSection.svelte'; diff --git a/src/lib/components/infoSection.svelte b/src/lib/components/infoSection.svelte new file mode 100644 index 0000000000..8ea26d98ef --- /dev/null +++ b/src/lib/components/infoSection.svelte @@ -0,0 +1,4 @@ +
+ + +
diff --git a/src/lib/components/switchBox.svelte b/src/lib/components/switchBox.svelte new file mode 100644 index 0000000000..53ef2a1a76 --- /dev/null +++ b/src/lib/components/switchBox.svelte @@ -0,0 +1,48 @@ + + +
  • + +
  • diff --git a/src/lib/components/switchBoxes.svelte b/src/lib/components/switchBoxes.svelte new file mode 100644 index 0000000000..9bbec18f9a --- /dev/null +++ b/src/lib/components/switchBoxes.svelte @@ -0,0 +1,13 @@ + + + diff --git a/src/lib/elements/forms/inputPassword.svelte b/src/lib/elements/forms/inputPassword.svelte index 64f56a2e0a..3fa8bcc9e5 100644 --- a/src/lib/elements/forms/inputPassword.svelte +++ b/src/lib/elements/forms/inputPassword.svelte @@ -9,6 +9,7 @@ export let required = false; export let disabled = false; export let autofocus = false; + export let meter = true; let element: HTMLInputElement; @@ -33,14 +34,16 @@ class="input-text" bind:value bind:this={element} /> - 100 ? 100 : strength} - min="0" - max="100" - class="password-meter" - class:is-weak={strength !== 0 && strength <= 33} - class:is-medium={strength > 33 && strength <= 66} - class:is-strong={strength > 66 && strength <= 100} - aria-label="Password strength week" /> + {#if meter} + 100 ? 100 : strength} + min="0" + max="100" + class="password-meter" + class:is-weak={strength !== 0 && strength <= 33} + class:is-medium={strength > 33 && strength <= 66} + class:is-strong={strength > 66 && strength <= 100} + aria-label="Password strength weak" /> + {/if} diff --git a/src/lib/elements/forms/inputSearch.svelte b/src/lib/elements/forms/inputSearch.svelte index 5a89508e09..7903ae8cd9 100644 --- a/src/lib/elements/forms/inputSearch.svelte +++ b/src/lib/elements/forms/inputSearch.svelte @@ -17,7 +17,7 @@ } }); - const onKeyUp = (event: KeyboardEvent) => { + const valueChange = (event: Event) => { clearTimeout(timer); timer = setTimeout(() => { const target = event.target as HTMLInputElement; @@ -32,5 +32,5 @@ {required} type="search" class="input-text" - on:keyup={onKeyUp} + on:input={valueChange} bind:this={element} /> diff --git a/src/lib/elements/forms/inputText.svelte b/src/lib/elements/forms/inputText.svelte index 83ce788900..120f796545 100644 --- a/src/lib/elements/forms/inputText.svelte +++ b/src/lib/elements/forms/inputText.svelte @@ -9,6 +9,7 @@ export let required = false; export let disabled = false; export let autofocus = false; + export let autocomplete = true; export let maxlength: number = null; let element: HTMLInputElement; @@ -29,6 +30,7 @@ {disabled} {required} {maxlength} + autocomplete={autocomplete ? 'on' : 'off'} type="text" class="input-text" bind:value diff --git a/src/lib/layout/footer.svelte b/src/lib/layout/footer.svelte index 41d36bbd64..24579831c4 100644 --- a/src/lib/layout/footer.svelte +++ b/src/lib/layout/footer.svelte @@ -4,7 +4,7 @@