fix: portal dropdown surfaces and close the review capability gaps
- Root and submenu surfaces render through the dropdown portal with the overlay z-index, so clipping/isolation ancestors no longer cut the menu; panel height is capped by the floating available height and the animation origin maps the real transform origin. - Standalone Menu is a static in-flow list: no scroll lock, no outside pointer blocking, no floating placement and no focus stealing. - Selection ownership is isolated per level: section disabled keys add to the menu list, and a nested Menu resets the section owner. - closeOnSelect resolves item > menu policy > per-mode default for selection items; actions and radio items close, checkboxes stay open. - Business keys no longer become DOM ids (instance ids + data-key), and submenu surfaces label themselves from the real trigger. - Long-press keydown runs the caller's handlers first and only opens when not cancelled; submenu panels merge caller keydown with the internal Escape. - Link items render a real anchor, aria labels land on the role=menu node, submenu panels forward placement/offset/collision props and caller attrs, and the popover provides the default Surface variant. - Wrapper parts declare real props/emits, plus the missing official capability props (disallowEmptySelection, escapeKeyBehavior, shouldFocusWrap, autoFocus, shouldCloseOnSelect, close, empty slot, isKeyboardDismissDisabled, shouldCloseOnInteractOutside, placement/offset family, scoped slots). - Ship an independent consumer fixture for browser-level verification.
This commit is contained in:
@@ -51,11 +51,16 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Similar to select popover styles */
|
||||
/* Similar to select popover styles.
|
||||
Reka publishes the floating origin and the available height as
|
||||
`--reka-...-content-*` variables on the surface, so the ported animation
|
||||
origin and the long-menu height cap map onto real values. */
|
||||
.hv-dropdown__popover {
|
||||
@apply max-w-[48svw] origin-(--trigger-anchor-point) scroll-py-1 scrollbar overflow-y-auto overscroll-contain bg-overlay p-0 text-sm md:min-w-55;
|
||||
@apply max-w-[48svw] origin-(--reka-dropdown-menu-content-transform-origin) scroll-py-1 scrollbar overflow-y-auto overscroll-contain bg-overlay p-0 text-sm md:min-w-55;
|
||||
border-radius: min(32px, var(--radius-3xl));
|
||||
box-shadow: var(--overlay-shadow);
|
||||
z-index: var(--z-index-overlay);
|
||||
max-height: var(--reka-dropdown-menu-content-available-height, none);
|
||||
|
||||
&:focus-visible:not([data-focused]),
|
||||
&[data-focus-visible="true"] {
|
||||
@@ -128,3 +133,12 @@
|
||||
@apply ms-[3%] w-[94%];
|
||||
}
|
||||
}
|
||||
|
||||
/* Standalone Menu keeps the base menu semantics but must stay in the normal
|
||||
flow: the positioning wrapper is neutralised for that surface only. */
|
||||
[data-reka-popper-content-wrapper]:has(> .hv-dropdown__popover[data-static]) {
|
||||
position: static !important;
|
||||
inset: auto !important;
|
||||
transform: none !important;
|
||||
min-width: 0 !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user