combobox: improve compact item spacing & spinner centering

This commit is contained in:
Elijah Duffy
2025-07-15 18:44:27 -07:00
parent 652c5632da
commit 6825154f8f
2 changed files with 18 additions and 8 deletions

View File

@@ -401,7 +401,10 @@
aria-label={getLabel(item)}
aria-disabled={item.disabled}
class={[
'mb-0.5 flex min-h-10 flex-wrap items-center py-2.5 pr-1.5 pl-5',
!compact
? 'mb-0.5 min-h-10 py-2.5 pr-1.5 pl-5'
: 'mb-0.25 min-h-8 py-1.5 pr-1.5 pl-2.5',
'flex flex-wrap items-center',
'rounded-sm text-sm capitalize outline-hidden select-none',
'hover:bg-sui-accent-500/30 dark:hover:bg-sui-accent-700/30',
item.value === highlighted?.value && 'bg-sui-accent-500/80 dark:bg-sui-accent-700/80',
@@ -496,7 +499,7 @@
transition:scale
>
{#if loading}
<Spinner class="stroke-sui-accent!" size="1em" />
<Spinner class="stroke-sui-accent! -mt-0.5" size="1em" />
{:else if useHighlighted && highlighted?.icon}
{@render highlighted.icon(highlighted)}
{:else if value?.icon}