@invopop/popui 0.1.77 → 0.1.78

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.
@@ -15,7 +15,7 @@
15
15
  let items = $derived(
16
16
  actions.map((a) => ({
17
17
  label: a.label,
18
- value: a,
18
+ value: a.slug || a.label,
19
19
  icon: a.icon,
20
20
  separator: a.separator,
21
21
  destructive: a.destructive,
@@ -42,9 +42,11 @@
42
42
 
43
43
  <BaseDropdown bind:isOpen bind:this={actionDropdown} {trigger}>
44
44
  <DrawerContext
45
+ autofocus
45
46
  {items}
46
47
  onclick={(e) => {
47
- onclick?.(e)
48
+ const action = actions.find((a) => (a.slug || a.label) === e)
49
+ onclick?.(action)
48
50
  actionDropdown?.toggle()
49
51
  }}
50
52
  />
@@ -104,7 +104,7 @@
104
104
 
105
105
  <div class={wrapperStyles}>
106
106
  {#if isFolderItem && (highlight || active)}
107
- <div class="border-l border-white h-3 w-px absolute top-[14px] left-0 -m-px"></div>
107
+ <div class="border-l border-white h-3 w-px absolute top-3.5 left-0 -m-px"></div>
108
108
  {/if}
109
109
  <button
110
110
  use:floatingRef
@@ -147,7 +147,7 @@
147
147
  onmouseleave={handleBlur}
148
148
  class="pt-4 z-30"
149
149
  >
150
- <DrawerContext onclick={handleClickChild} {items} />
150
+ <DrawerContext autofocus onclick={handleClickChild} {items} />
151
151
  </div>
152
152
  {/if}
153
153
  {:else if open || !collapsable}
@@ -122,6 +122,7 @@
122
122
  <BaseButton icon={Sliders} variant="outline" size="md" />
123
123
  {/snippet}
124
124
  <DrawerContext
125
+ autofocus
125
126
  items={itemsWithActions}
126
127
  {groups}
127
128
  draggable
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.77",
4
+ "version": "0.1.78",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },