From 590b9b13f28153edcfed8bebcf9a1969377f35eb Mon Sep 17 00:00:00 2001 From: ernstmul Date: Fri, 25 Oct 2024 11:22:07 +0200 Subject: [PATCH 1/4] WIP combobox based on select component --- v2/pink-sb/src/lib/Combobox.svelte | 41 ++++++++++++ v2/pink-sb/src/lib/input/Select.svelte | 66 +++++++++---------- v2/pink-sb/src/lib/input/types.ts | 21 ++++++ .../src/stories/Combobox.stories.svelte | 65 ++++++++++++++++++ 4 files changed, 159 insertions(+), 34 deletions(-) create mode 100644 v2/pink-sb/src/lib/Combobox.svelte create mode 100644 v2/pink-sb/src/stories/Combobox.stories.svelte diff --git a/v2/pink-sb/src/lib/Combobox.svelte b/v2/pink-sb/src/lib/Combobox.svelte new file mode 100644 index 0000000000..7ba1cfe024 --- /dev/null +++ b/v2/pink-sb/src/lib/Combobox.svelte @@ -0,0 +1,41 @@ + + +
+ {:else} - - {#if $selectedLabel} - {#if selectedLeadingHtml} - {@html selectedLeadingHtml} + + {#if $selectedLabel} + {#if selectedLeadingHtml} + {@html selectedLeadingHtml} + {/if} + {$selectedLabel} + {:else} + {placeholder} {/if} - {$selectedLabel} - {:else} - {placeholder} - {/if} - - {/if} + + {/if} - +
{#if $open}