2020-01-22 12:08:29 +00:00
|
|
|
{{yield (concat 'popover-menu-' guid)}}
|
|
|
|
{{#aria-menu keyboardAccess=keyboardAccess as |change keypress ariaLabelledBy ariaControls ariaExpanded keypressClick|}}
|
2020-01-31 14:11:46 +00:00
|
|
|
{{#toggle-button checked=ariaExpanded onchange=(queue change (action 'change')) as |click|}}
|
2020-01-22 12:08:29 +00:00
|
|
|
<button type="button" aria-haspopup="menu" onkeydown={{keypress}} onclick={{click}} id={{ariaLabelledBy}} aria-controls={{ariaControls}}>
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#yield-slot name='trigger'}}
|
|
|
|
{{yield}}
|
|
|
|
{{/yield-slot}}
|
|
|
|
</button>
|
|
|
|
{{/toggle-button}}
|
|
|
|
<div>
|
2020-01-22 12:08:29 +00:00
|
|
|
<input type="checkbox" id={{concat 'popover-menu-' guid '-'}} />
|
|
|
|
{{#each submenus as |sub|}}
|
|
|
|
<input type="checkbox" id={{concat 'popover-menu-' guid '-' sub}} />
|
|
|
|
{{/each}}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{#yield-slot name='header'}}
|
|
|
|
<div>
|
|
|
|
{{yield}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
{{/yield-slot}}
|
2020-01-22 12:08:29 +00:00
|
|
|
<ul role="menu" id={{ariaControls}} aria-labelledby={{ariaLabelledBy}} aria-expanded={{ariaExpanded}}>
|
|
|
|
{{#yield-slot name='menu' params=(block-params (concat 'popover-menu-' guid '-') send keypressClick) }}
|
2019-12-17 18:47:37 +00:00
|
|
|
{{yield}}
|
|
|
|
{{/yield-slot}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{/aria-menu}}
|