@invopop/popui 0.0.74 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -32,6 +32,8 @@ $:
|
|
|
32
32
|
selectedItems = items.filter((i) => i.selected);
|
|
33
33
|
$:
|
|
34
34
|
selectedColor = !multiple && items.find((i) => i.selected)?.color;
|
|
35
|
+
$:
|
|
36
|
+
selectedIcon = !multiple && items.find((i) => i.selected)?.icon;
|
|
35
37
|
$:
|
|
36
38
|
selectedLabel = `${selectedItems[0]?.label || ""}${selectedItems.length > 1 ? " and more..." : ""}` || placeholder;
|
|
37
39
|
$:
|
|
@@ -59,12 +61,14 @@ function handleSelected(e) {
|
|
|
59
61
|
class="{styles} dropdown-select max-w-[420px] flex items-center border hover:border-neutral-300 rounded-md py-1.25 pl-2 gap-1 bg-white whitespace-nowrap"
|
|
60
62
|
slot="trigger"
|
|
61
63
|
>
|
|
62
|
-
{#if resolvedIcon && !selectedColor}
|
|
63
|
-
<Icon src={resolvedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
|
|
64
|
-
{/if}
|
|
65
64
|
{#if selectedColor}
|
|
66
65
|
<TagStatus dot status={selectedColor} />
|
|
66
|
+
{:else if selectedIcon}
|
|
67
|
+
<Icon src={selectedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
|
|
68
|
+
{:else if resolvedIcon}
|
|
69
|
+
<Icon src={resolvedIcon} {iconTheme} class="h-4 w-4 text-neutral-500 flex-shrink-0" />
|
|
67
70
|
{/if}
|
|
71
|
+
|
|
68
72
|
<span class="w-full pr-8 text-neutral-800 placeholder-neutral-800 text-base truncate">
|
|
69
73
|
{selectedLabel}
|
|
70
74
|
</span>
|