Extends the just-landed DropdownMenu event-driven item cascade to its siblings so the framework is coherent — every menu in the family fades its items in staggered on open, same mechanism, zero new generator code (rides the container-driven preset branch shipped with DropdownMenu). - ContextMenu (own recipe): Content marks the panel `[data-stagger]` + `--motion-stagger-each: var(--motion-stagger)`; item / checkbox-item / radio-item carry `data-animation-style="fade"`. - Menubar (ONE line): soma `Menubar.Content` delegates to `DropdownMenuContent`, so its panel already carries `data-dropdown-menu-content` (→ the dropdown recipe rhythm applies) and re-uses `DropdownMenu.Item` (→ already `data-animation-style="fade"`). It only adds the `[data-stagger]` marker. Verified at runtime: ContextMenu (scrubbed opacity gradient 0.96/0.84/0.00), Menubar (panel carries `data-stagger` + `data-dropdown-menu-content`, items `name:fade-in`, structural index from `:nth-child` 0/1/2/6/7). `check` clean for the touched components. (Preview tab runs backgrounded → rAF paused; verified by scrubbing `animation.currentTime` via WAAPI rather than waiting for playback.) Deliberately NOT rolled out: select / combobox / command — live-filtered or long-scroll lists where an open cascade is questionable UX. Docs: ContextMenu README (Motion parity note), Menubar index doc, DropdownMenu README (family cross-reference), RFC §D.11.4 (rollout). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>active-uix
parent
9d40ebe9c8
commit
19ecbf44e4
@ -1,7 +1,12 @@
|
||||
<script lang="ts">
|
||||
/**
|
||||
* `data-animation-style="fade"` enrolls the item in the Content's event-driven
|
||||
* cascade (staggered fade-in on open). Override the preset, or set the
|
||||
* Content's `--motion-stagger-each: 0` for a parallel fade.
|
||||
*/
|
||||
import * as ContextMenu from '$soma/components/context-menu';
|
||||
import type { ContextMenuItemProps } from './types';
|
||||
let { children, ...rest }: ContextMenuItemProps = $props();
|
||||
</script>
|
||||
|
||||
<ContextMenu.Item {...rest}>{@render children?.()}</ContextMenu.Item>
|
||||
<ContextMenu.Item data-animation-style="fade" {...rest}>{@render children?.()}</ContextMenu.Item>
|
||||
|
||||
Loading…
Reference in new issue