Draw the menu item without Tailwind
<x-menu-item> renders data-md-menu-item, data-md-description and its aria-* state, with data-md-keep-open renamed from data-keep-open; menu-item.css draws SegmentedMenuTokens' 48px row, 16px sides, 12px gaps, 4/12px corners, the selected/current colours and the shared --md-menu-item-ink icon-class outranks except when disabled (ACT-11/19/27/28); a submenu's popover shares its container colour with the menu it opens from and menu.js follows the rename (plan step 36, actions). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Opus 5
parent
2f8fb2183f
commit
c040925cd4
@@ -372,7 +372,7 @@ const menu = () => ({
|
||||
|
||||
// A submenu opened in place is closed with the sheet, as a nested popover closes with
|
||||
// its menu.
|
||||
for (const submenu of list.querySelectorAll('[data-submenu]')) {
|
||||
for (const submenu of list.querySelectorAll('[data-md-submenu]')) {
|
||||
window.Alpine.$data(submenu)?.close?.()
|
||||
}
|
||||
}
|
||||
@@ -604,7 +604,7 @@ const menu = () => ({
|
||||
activate(event) {
|
||||
const item = event.target.closest(ITEMS)
|
||||
|
||||
if (!item || item.getAttribute('aria-disabled') === 'true' || item.hasAttribute('data-keep-open')) {
|
||||
if (!item || item.getAttribute('aria-disabled') === 'true' || item.hasAttribute('data-md-keep-open')) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user