Closed
Description
We currently translate OpenChangeReason
from Floating UI, but:
- We don't consider Base UI specific reasons, like menu item click.
trigger-press
vs.click
is confusing in the Base UI API as one refers touseDismiss
hook vs. theuseClick
hook internally, butopen: false
is possible with both reasons and it's not clear why they're differentiated.
We currently either expose one of the following strings, or just skip it with undefined
, but should instead provide more useful reasons:
export type OpenChangeReason =
| 'click'
| 'hover'
| 'focus'
| 'focus-out'
| 'escape-key'
| 'outside-press'
| 'trigger-press';