From bca4843885db300d42b626c6a9c5e75e9f2eeb1e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 17 Sep 2025 22:10:38 -0700 Subject: [PATCH] Refactored Select component --- src/lib/components/ui/Select.svelte | 355 +++++++++++++++++++ src/lib/components/ui/select/Select.svelte | 383 --------------------- 2 files changed, 355 insertions(+), 383 deletions(-) create mode 100644 src/lib/components/ui/Select.svelte delete mode 100644 src/lib/components/ui/select/Select.svelte diff --git a/src/lib/components/ui/Select.svelte b/src/lib/components/ui/Select.svelte new file mode 100644 index 00000000..1d147195 --- /dev/null +++ b/src/lib/components/ui/Select.svelte @@ -0,0 +1,355 @@ + + + + +{#if hasWrapper} +
+ {#if label} + + {label} + {#if required} + * + {/if} + + {/if} + + + + {#if selected?.image} + {selected.label} + {/if} + {selected?.label || placeholder} + + + + + + {#each options as option} + + {#if option.image} + {option.label} + {/if} + {option.label} + + + + + {/each} + + + + + {#if error} + {error} + {/if} +
+{:else} + + + {#if selected?.image} + {selected.label} + {/if} + {selected?.label || placeholder} + + + + + + {#each options as option} + + {#if option.image} + {option.label} + {/if} + {option.label} + + + + + {/each} + + + +{/if} + + diff --git a/src/lib/components/ui/select/Select.svelte b/src/lib/components/ui/select/Select.svelte deleted file mode 100644 index e4f8fe02..00000000 --- a/src/lib/components/ui/select/Select.svelte +++ /dev/null @@ -1,383 +0,0 @@ - - - - - {#if selected?.image} - {selected.label} - {/if} - {selected?.label || placeholder} - - - - - - -
- -
- - - {#each options as option} - - {#if option.image} - {option.label} - {/if} - {option.label} - - - - - {/each} - - -
- -
-
-
- - \ No newline at end of file