From acbb9c7536be32fcce1c69bfd6054149f978229c Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Thu, 15 Dec 2022 08:36:10 +0100 Subject: feat: Small changes --- code/app/src/components/combobox.svelte | 124 +++++++++++++------------- code/app/src/components/notification.svelte | 2 +- code/app/src/routes/book/inputs/+page.svelte | 2 +- code/app/src/routes/book/toggles/+page.svelte | 10 +-- 4 files changed, 68 insertions(+), 70 deletions(-) (limited to 'code/app/src') diff --git a/code/app/src/components/combobox.svelte b/code/app/src/components/combobox.svelte index 5df3ec9..5f7f772 100644 --- a/code/app/src/components/combobox.svelte +++ b/code/app/src/components/combobox.svelte @@ -7,9 +7,9 @@
@@ -312,54 +311,53 @@ {/if}
{#if multiple === true && hasSelection}
{#each options.filter((c) => c.selected === true) as option} methods.deselect_entry(e.detail.id)} - text={option.name} + id={option.id} + removable + tabindex="-1" + on:remove={(e) => methods.deselect_entry(e.detail.id)} + text={option.name} /> {/each}
{/if}
search.do()} - on:click={search.on_input_click} - on:focus={search.on_input_focus} - on:blur={search.on_input_focusout} - autocomplete="off" + {...attributes} + type="text" + style="all: unset;" + role="combobox" + aria-controls={optionsListId} + aria-expanded={showDropdown} + bind:value={searchValue} + bind:this={searchInputNode} + on:input={() => search.do()} + on:click={search.on_input_click} + on:focus={search.on_input_focus} + on:blur={search.on_input_focusout} + autocomplete="off" /> {#if hasSelection} {:else} - - + + {/if}
@@ -370,7 +368,7 @@

{/if}
@@ -378,13 +376,13 @@ {#if searchResults.length > 0} {#each searchResults.filter((c) => !c.selected) as result}
  • {@html highlight(result, '', "")}
  • @@ -396,18 +394,18 @@ Active: "text-white bg-indigo-600", Not Active: "text-gray-900" -->
  • {option.name} {#if option.selected} - + {/if}
  • @@ -424,12 +422,12 @@ {#if showCreationHint}
    {/if} diff --git a/code/app/src/components/notification.svelte b/code/app/src/components/notification.svelte index 5b0c2f2..d78b3d3 100644 --- a/code/app/src/components/notification.svelte +++ b/code/app/src/components/notification.svelte @@ -60,7 +60,7 @@ case "subtle": icon = undefined; bgClass = "bg-white"; - ringClass = ""; + ringClass = "ring-1 ring-gray-100"; break; default: icon = undefined; diff --git a/code/app/src/routes/book/inputs/+page.svelte b/code/app/src/routes/book/inputs/+page.svelte index d5566ed..433607b 100644 --- a/code/app/src/routes/book/inputs/+page.svelte +++ b/code/app/src/routes/book/inputs/+page.svelte @@ -71,5 +71,5 @@

    Textarea

    -