Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward pointerenter events on Menu items #403

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/flat-chefs-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"bits-ui": minor
---

Forward `pointerenter` events from `Menu` items
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-checkbox-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
on:m-pointerdown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
on:m-pointerdown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</svelte:element>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-radio-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
on:m-pointerdown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-sub-trigger.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
on:m-keydown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type ItemEvents<T extends Element = HTMLDivElement> = {
pointerdown: CustomEventHandler<PointerEvent, T>;
pointerleave: CustomEventHandler<PointerEvent, T>;
pointermove: CustomEventHandler<PointerEvent, T>;
pointerenter: CustomEventHandler<PointerEvent, T>;
};

type CheckboxItemEvents = ItemEvents;
Expand Down
Loading