@invopop/popui 0.0.73 → 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.
@@ -100,7 +100,7 @@ function handleClick(event) {
100
100
  <div class="relative">
101
101
  {#if shortcut}
102
102
  <ShortcutWrapper>
103
- <Icon src={resolvedIcon} theme={iconTheme} class="{iconStyles} h-4 w-4 z-10" />
103
+ <Icon src={resolvedIcon} theme={iconTheme} class="{iconStyles} h-3 w-3 z-10" />
104
104
  </ShortcutWrapper>
105
105
  {:else}
106
106
  <Icon src={resolvedIcon} theme={iconTheme} class="{iconStyles} h-4 w-4 z-10" />
@@ -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>
@@ -1,6 +1,6 @@
1
1
  <div
2
- class="bg-white-5 rounded border border-white-10 inline-flex items-center justify-center"
3
- style="box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.15);"
2
+ class="h-4 w-4 bg-white-5 rounded border border-white-20 inline-flex items-center justify-center"
3
+ style="box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.25);"
4
4
  >
5
5
  <slot />
6
6
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.0.73",
4
+ "version": "0.0.75",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && npm run package",