@angular/aria 21.2.0 → 21.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -195,26 +195,23 @@ class MenuPattern {
195
195
  }) : this.submit();
196
196
  }
197
197
  submit(item = this.inputs.activeItem()) {
198
+ if (!item || item.disabled() || item.submenu()) {
199
+ return;
200
+ }
198
201
  const root = this.root();
199
- if (item && !item.disabled()) {
200
- const isMenu = root instanceof MenuPattern;
201
- const isMenuBar = root instanceof MenuBarPattern;
202
- const isMenuTrigger = root instanceof MenuTriggerPattern;
203
- if (!item.submenu() && isMenuTrigger) {
204
- root.close({
205
- refocus: true
206
- });
207
- }
208
- if (!item.submenu() && isMenuBar) {
209
- root.close();
210
- root?.inputs.itemSelected?.(item.value());
211
- }
212
- if (!item.submenu() && isMenu) {
213
- root.inputs.activeItem()?.close({
214
- refocus: true
215
- });
216
- root?.inputs.itemSelected?.(item.value());
217
- }
202
+ if (root instanceof MenuTriggerPattern) {
203
+ root.close({
204
+ refocus: true
205
+ });
206
+ root?.inputs.menu()?.inputs.itemSelected?.(item.value());
207
+ } else if (root instanceof MenuBarPattern) {
208
+ root.close();
209
+ root?.inputs.itemSelected?.(item.value());
210
+ } else if (root instanceof MenuPattern) {
211
+ root.inputs.activeItem()?.close({
212
+ refocus: true
213
+ });
214
+ root?.inputs.itemSelected?.(item.value());
218
215
  }
219
216
  }
220
217
  collapse() {
@@ -1 +1 @@
1
- {"version":3,"file":"_menu-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/menu/menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {KeyboardEventManager} from '../behaviors/event-manager';\nimport {computed, signal, SignalLike} from '../behaviors/signal-like/signal-like';\nimport {List, ListInputs, ListItem} from '../behaviors/list/list';\n\n/** The inputs for the MenuBarPattern class. */\nexport interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V> {\n /** The menu items contained in the menu. */\n items: SignalLike<MenuItemPattern<V>[]>;\n\n /** Callback function triggered when a menu item is selected. */\n itemSelected?: (value: V) => void;\n\n /** The text direction of the menu bar. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n}\n\n/** The inputs for the MenuPattern class. */\nexport interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'values'> {\n /** The unique ID of the menu. */\n id: SignalLike<string>;\n\n /** The menu items contained in the menu. */\n items: SignalLike<MenuItemPattern<V>[]>;\n\n /** A reference to the parent menu or menu trigger. */\n parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;\n\n /** Callback function triggered when a menu item is selected. */\n itemSelected?: (value: V) => void;\n\n /** The text direction of the menu bar. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n\n /** The delay in milliseconds before expanding sub-menus on hover. */\n expansionDelay: SignalLike<number>;\n}\n\n/** The inputs for the MenuTriggerPattern class. */\nexport interface MenuTriggerInputs<V> {\n /** A reference to the menu trigger element. */\n element: SignalLike<HTMLElement | undefined>;\n\n /** A reference to the menu associated with the trigger. */\n menu: SignalLike<MenuPattern<V> | undefined>;\n\n /** The text direction of the menu bar. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n\n /** Whether the menu trigger is disabled. */\n disabled: SignalLike<boolean>;\n}\n\n/** The inputs for the MenuItemPattern class. */\nexport interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {\n /** A reference to the parent menu or menu trigger. */\n parent: SignalLike<MenuPattern<V> | MenuBarPattern<V> | undefined>;\n\n /** A reference to the submenu associated with the menu item. */\n submenu: SignalLike<MenuPattern<V> | undefined>;\n}\n\n/** The menu ui pattern class. */\nexport class MenuPattern<V> {\n /** The unique ID of the menu. */\n id: SignalLike<string>;\n\n /** The role of the menu. */\n role = () => 'menu';\n\n /** Whether the menu is disabled. */\n disabled = () => this.inputs.disabled();\n\n /** Whether the menu is visible. */\n visible = computed(() => (this.inputs.parent() ? !!this.inputs.parent()?.expanded() : true));\n\n /** Controls list behavior for the menu items. */\n listBehavior: List<MenuItemPattern<V>, V>;\n\n /** Whether the menu or any of its child elements are currently focused. */\n isFocused = signal(false);\n\n /** Whether the menu has received focus. */\n hasBeenFocused = signal(false);\n\n /** Whether the menu trigger has been hovered. */\n hasBeenHovered = signal(false);\n\n /** Timeout used to open sub-menus on hover. */\n _openTimeout: any;\n\n /** Timeout used to close sub-menus on hover out. */\n _closeTimeout: any;\n\n /** The tab index of the menu. */\n tabIndex = () => this.listBehavior.tabIndex();\n\n /** Whether the menu should be focused on mouse over. */\n shouldFocus = computed(() => {\n const root = this.root();\n\n if (root instanceof MenuTriggerPattern) {\n return true;\n }\n\n if (root instanceof MenuBarPattern || root instanceof MenuPattern) {\n return root.isFocused();\n }\n\n return false;\n });\n\n /** The key used to expand sub-menus. */\n private _expandKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The key used to collapse sub-menus. */\n private _collapseKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** Represents the space key. Does nothing when the user is actively using typeahead. */\n dynamicSpaceKey = computed(() => (this.listBehavior.isTyping() ? '' : ' '));\n\n /** The regexp used to decide if a key should trigger typeahead. */\n typeaheadRegexp = /^.$/;\n\n /** The root of the menu. */\n root: SignalLike<MenuTriggerPattern<V> | MenuBarPattern<V> | MenuPattern<V> | undefined> =\n computed(() => {\n const parent = this.inputs.parent();\n\n if (!parent) {\n return this;\n }\n\n if (parent instanceof MenuTriggerPattern) {\n return parent;\n }\n\n const grandparent = parent.inputs.parent();\n\n if (grandparent instanceof MenuBarPattern) {\n return grandparent;\n }\n\n return grandparent?.root();\n });\n\n /** Handles keyboard events for the menu. */\n keydownManager = computed(() => {\n return new KeyboardEventManager()\n .on('ArrowDown', () => this.next(), {ignoreRepeat: false})\n .on('ArrowUp', () => this.prev(), {ignoreRepeat: false})\n .on('Home', () => this.first())\n .on('End', () => this.last())\n .on('Enter', () => this.trigger())\n .on('Escape', () => this.closeAll())\n .on(this._expandKey, () => this.expand())\n .on(this._collapseKey, () => this.collapse())\n .on(this.dynamicSpaceKey, () => this.trigger())\n .on(this.typeaheadRegexp, e => this.listBehavior.search(e.key));\n });\n\n constructor(readonly inputs: MenuInputs<V>) {\n this.id = inputs.id;\n this.listBehavior = new List<MenuItemPattern<V>, V>({\n ...inputs,\n values: signal([]),\n });\n }\n\n /** Sets the default state for the menu. */\n setDefaultState() {\n if (!this.inputs.parent()) {\n this.listBehavior.goto(this.inputs.items()[0], {focusElement: false});\n }\n }\n\n /** Handles keyboard events for the menu. */\n onKeydown(event: KeyboardEvent) {\n this.keydownManager().handle(event);\n }\n\n /** Handles mouseover events for the menu. */\n onMouseOver(event: MouseEvent) {\n if (!this.visible()) {\n return;\n }\n\n this.hasBeenHovered.set(true);\n const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));\n\n if (!item) {\n return;\n }\n\n const parent = this.inputs.parent();\n const activeItem = this?.inputs.activeItem();\n\n if (parent instanceof MenuItemPattern) {\n const grandparent = parent.inputs.parent();\n if (grandparent instanceof MenuPattern) {\n grandparent._clearTimeouts();\n grandparent.listBehavior.goto(parent, {focusElement: false});\n }\n }\n\n if (activeItem && activeItem !== item) {\n this._closeItem(activeItem);\n }\n\n if (item.expanded()) {\n this._clearCloseTimeout();\n }\n\n this._openItem(item);\n this.listBehavior.goto(item, {focusElement: this.shouldFocus()});\n }\n\n /** Closes the specified menu item after a delay. */\n private _closeItem(item: MenuItemPattern<V>) {\n this._clearOpenTimeout();\n\n if (!this._closeTimeout) {\n this._closeTimeout = setTimeout(() => {\n item.close();\n this._closeTimeout = undefined;\n }, this.inputs.expansionDelay());\n }\n }\n\n /** Opens the specified menu item after a delay. */\n private _openItem(item: MenuItemPattern<V>) {\n this._clearOpenTimeout();\n\n this._openTimeout = setTimeout(() => {\n item.open();\n this._openTimeout = undefined;\n }, this.inputs.expansionDelay());\n }\n\n /** Handles mouseout events for the menu. */\n onMouseOut(event: MouseEvent) {\n this._clearOpenTimeout();\n\n if (this.isFocused()) {\n return;\n }\n\n const root = this.root();\n const parent = this.inputs.parent();\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!root || !parent || parent instanceof MenuTriggerPattern) {\n return;\n }\n\n const grandparent = parent.inputs.parent();\n\n if (!grandparent || grandparent instanceof MenuBarPattern) {\n return;\n }\n\n if (!grandparent.inputs.element()?.contains(relatedTarget)) {\n parent.close();\n }\n }\n\n /** Handles click events for the menu. */\n onClick(event: MouseEvent) {\n const relatedTarget = event.target as Node | null;\n const item = this.inputs.items().find(i => i.element()?.contains(relatedTarget));\n\n if (item) {\n item.open();\n this.listBehavior.goto(item);\n this.submit(item);\n }\n }\n\n /** Handles focusin events for the menu. */\n onFocusIn() {\n this.isFocused.set(true);\n this.hasBeenFocused.set(true);\n }\n\n /** Handles the focusout event for the menu. */\n onFocusOut(event: FocusEvent) {\n const parent = this.inputs.parent();\n const parentEl = parent?.inputs.element();\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!relatedTarget) {\n this.isFocused.set(false);\n this.inputs.parent()?.close({refocus: true});\n }\n\n if (parent instanceof MenuItemPattern) {\n const grandparent = parent.inputs.parent();\n const siblings = grandparent?.inputs.items().filter(i => i !== parent);\n const item = siblings?.find(i => i.element()?.contains(relatedTarget));\n\n if (item) {\n return;\n }\n }\n\n if (\n this.visible() &&\n !parentEl?.contains(relatedTarget) &&\n !this.inputs.element()?.contains(relatedTarget)\n ) {\n this.isFocused.set(false);\n this.inputs.parent()?.close();\n }\n }\n\n /** Focuses the previous menu item. */\n prev() {\n this.inputs.activeItem()?.close();\n this.listBehavior.prev();\n }\n\n /** Focuses the next menu item. */\n next() {\n this.inputs.activeItem()?.close();\n this.listBehavior.next();\n }\n\n /** Focuses the first menu item. */\n first() {\n this.inputs.activeItem()?.close();\n this.listBehavior.first();\n }\n\n /** Focuses the last menu item. */\n last() {\n this.inputs.activeItem()?.close();\n this.listBehavior.last();\n }\n\n /** Triggers the active menu item. */\n trigger() {\n this.inputs.activeItem()?.hasPopup()\n ? this.inputs.activeItem()?.open({first: true})\n : this.submit();\n }\n\n /** Submits the menu. */\n submit(item = this.inputs.activeItem()) {\n const root = this.root();\n\n if (item && !item.disabled()) {\n const isMenu = root instanceof MenuPattern;\n const isMenuBar = root instanceof MenuBarPattern;\n const isMenuTrigger = root instanceof MenuTriggerPattern;\n\n if (!item.submenu() && isMenuTrigger) {\n root.close({refocus: true});\n }\n\n if (!item.submenu() && isMenuBar) {\n root.close();\n root?.inputs.itemSelected?.(item.value());\n }\n\n if (!item.submenu() && isMenu) {\n root.inputs.activeItem()?.close({refocus: true});\n root?.inputs.itemSelected?.(item.value());\n }\n }\n }\n\n /** Collapses the current menu or focuses the previous item in the menubar. */\n collapse() {\n const root = this.root();\n const parent = this.inputs.parent();\n\n if (parent instanceof MenuItemPattern && !(parent.inputs.parent() instanceof MenuBarPattern)) {\n parent.close({refocus: true});\n } else if (root instanceof MenuBarPattern) {\n root.prev();\n }\n }\n\n /** Expands the current menu or focuses the next item in the menubar. */\n expand() {\n const root = this.root();\n const activeItem = this.inputs.activeItem();\n\n if (activeItem?.submenu()) {\n activeItem.open({first: true});\n } else if (root instanceof MenuBarPattern) {\n root.next();\n }\n }\n\n /** Closes the menu. */\n close() {\n this.inputs.parent()?.close();\n }\n\n /** Closes the menu and all parent menus. */\n closeAll() {\n const root = this.root();\n\n if (root instanceof MenuTriggerPattern) {\n root.close({refocus: true});\n }\n\n if (root instanceof MenuBarPattern) {\n root.close();\n }\n\n if (root instanceof MenuPattern) {\n root.inputs.activeItem()?.close({refocus: true});\n }\n }\n\n /** Clears any open or close timeouts for sub-menus. */\n _clearTimeouts() {\n this._clearOpenTimeout();\n this._clearCloseTimeout();\n }\n\n /** Clears the open timeout. */\n _clearOpenTimeout() {\n if (this._openTimeout) {\n clearTimeout(this._openTimeout);\n this._openTimeout = undefined;\n }\n }\n\n /** Clears the close timeout. */\n _clearCloseTimeout() {\n if (this._closeTimeout) {\n clearTimeout(this._closeTimeout);\n this._closeTimeout = undefined;\n }\n }\n}\n\n/** The menubar ui pattern class. */\nexport class MenuBarPattern<V> {\n /** Controls list behavior for the menu items. */\n listBehavior: List<MenuItemPattern<V>, V>;\n\n /** The tab index of the menu. */\n tabIndex = () => this.listBehavior.tabIndex();\n\n /** The key used to navigate to the next item. */\n private _nextKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The key used to navigate to the previous item. */\n private _previousKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** Represents the space key. Does nothing when the user is actively using typeahead. */\n dynamicSpaceKey = computed(() => (this.listBehavior.isTyping() ? '' : ' '));\n\n /** The regexp used to decide if a key should trigger typeahead. */\n typeaheadRegexp = /^.$/;\n\n /** Whether the menubar or any of its children are currently focused. */\n isFocused = signal(false);\n\n /** Whether the menubar has been focused. */\n hasBeenFocused = signal(false);\n\n /** Whether the menubar is disabled. */\n disabled = () => this.inputs.disabled();\n\n /** Handles keyboard events for the menu. */\n keydownManager = computed(() => {\n return new KeyboardEventManager()\n .on(this._nextKey, () => this.next(), {ignoreRepeat: false})\n .on(this._previousKey, () => this.prev(), {ignoreRepeat: false})\n .on('End', () => this.listBehavior.last())\n .on('Home', () => this.listBehavior.first())\n .on('Enter', () => this.inputs.activeItem()?.open({first: true}))\n .on('ArrowUp', () => this.inputs.activeItem()?.open({last: true}))\n .on('ArrowDown', () => this.inputs.activeItem()?.open({first: true}))\n .on(this.dynamicSpaceKey, () => this.inputs.activeItem()?.open({first: true}))\n .on(this.typeaheadRegexp, e => this.listBehavior.search(e.key));\n });\n\n constructor(readonly inputs: MenuBarInputs<V>) {\n this.listBehavior = new List<MenuItemPattern<V>, V>(inputs);\n }\n\n /** Sets the default state for the menubar. */\n setDefaultState() {\n this.inputs.activeItem.set(this.inputs.items()[0]);\n }\n\n /** Handles keyboard events for the menu. */\n onKeydown(event: KeyboardEvent) {\n this.keydownManager().handle(event);\n }\n\n /** Handles click events for the menu bar. */\n onClick(event: MouseEvent) {\n const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));\n\n if (!item) {\n return;\n }\n\n this.goto(item);\n item.expanded() ? item.close() : item.open();\n }\n\n /** Handles mouseover events for the menu bar. */\n onMouseOver(event: MouseEvent) {\n const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));\n\n if (item) {\n this.goto(item, {focusElement: this.isFocused()});\n }\n }\n\n /** Handles focusin events for the menu bar. */\n onFocusIn() {\n this.isFocused.set(true);\n this.hasBeenFocused.set(true);\n }\n\n /** Handles focusout events for the menu bar. */\n onFocusOut(event: FocusEvent) {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!this.inputs.element()?.contains(relatedTarget)) {\n this.isFocused.set(false);\n this.close();\n }\n }\n\n /** Goes to and optionally focuses the specified menu item. */\n goto(item: MenuItemPattern<V>, opts?: {focusElement?: boolean}) {\n const prevItem = this.inputs.activeItem();\n this.listBehavior.goto(item, opts);\n\n if (prevItem?.expanded()) {\n prevItem?.close();\n this.inputs.activeItem()?.open();\n }\n\n if (item === prevItem) {\n if (item.expanded() && item.submenu()?.inputs.activeItem()) {\n item.submenu()?.inputs.activeItem()?.close();\n item.submenu()?.listBehavior.unfocus();\n }\n }\n }\n\n /** Focuses the next menu item. */\n next() {\n const prevItem = this.inputs.activeItem();\n this.listBehavior.next();\n\n if (prevItem?.expanded()) {\n prevItem?.close();\n this.inputs.activeItem()?.open({first: true});\n }\n }\n\n /** Focuses the previous menu item. */\n prev() {\n const prevItem = this.inputs.activeItem();\n this.listBehavior.prev();\n\n if (prevItem?.expanded()) {\n prevItem?.close();\n this.inputs.activeItem()?.open({first: true});\n }\n }\n\n /** Closes the menubar and refocuses the root menu bar item. */\n close() {\n this.inputs.activeItem()?.close({refocus: this.isFocused()});\n }\n}\n\n/** The menu trigger ui pattern class. */\nexport class MenuTriggerPattern<V> {\n /** Whether the menu is expanded. */\n expanded = signal(false);\n\n /** Whether the menu trigger has received focus. */\n hasBeenFocused = signal(false);\n\n /** The role of the menu trigger. */\n role = () => 'button';\n\n /** Whether the menu trigger has a popup. */\n hasPopup = () => true;\n\n /** The menu associated with the trigger. */\n menu: SignalLike<MenuPattern<V> | undefined>;\n\n /** The tab index of the menu trigger. */\n tabIndex = computed(() => (this.expanded() && this.menu()?.inputs.activeItem() ? -1 : 0));\n\n /** Whether the menu trigger is disabled. */\n disabled = () => this.inputs.disabled();\n\n /** Handles keyboard events for the menu trigger. */\n keydownManager = computed(() => {\n return new KeyboardEventManager()\n .on(' ', () => this.open({first: true}))\n .on('Enter', () => this.open({first: true}))\n .on('ArrowDown', () => this.open({first: true}))\n .on('ArrowUp', () => this.open({last: true}))\n .on('Escape', () => this.close({refocus: true}));\n });\n\n constructor(readonly inputs: MenuTriggerInputs<V>) {\n this.menu = this.inputs.menu;\n }\n\n /** Handles keyboard events for the menu trigger. */\n onKeydown(event: KeyboardEvent) {\n if (!this.inputs.disabled()) {\n this.keydownManager().handle(event);\n }\n }\n\n /** Handles click events for the menu trigger. */\n onClick() {\n if (!this.inputs.disabled()) {\n this.expanded() ? this.close() : this.open({first: true});\n }\n }\n\n /** Handles focusin events for the menu trigger. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n\n /** Handles focusout events for the menu trigger. */\n onFocusOut(event: FocusEvent) {\n const element = this.inputs.element();\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (\n this.expanded() &&\n !element?.contains(relatedTarget) &&\n !this.inputs.menu()?.inputs.element()?.contains(relatedTarget)\n ) {\n this.close();\n }\n }\n\n /** Opens the menu. */\n open(opts?: {first?: boolean; last?: boolean}) {\n this.expanded.set(true);\n\n if (opts?.first) {\n this.inputs.menu()?.first();\n } else if (opts?.last) {\n this.inputs.menu()?.last();\n }\n }\n\n /** Closes the menu. */\n close(opts: {refocus?: boolean} = {}) {\n this.expanded.set(false);\n this.menu()?.listBehavior.unfocus();\n\n if (opts.refocus) {\n this.inputs.element()?.focus();\n }\n\n let menuitems = this.inputs.menu()?.inputs.items() ?? [];\n\n while (menuitems.length) {\n const menuitem = menuitems.pop();\n menuitem?._expanded.set(false);\n menuitem?.inputs.parent()?.listBehavior.unfocus();\n menuitems = menuitems.concat(menuitem?.submenu()?.inputs.items() ?? []);\n }\n }\n}\n\n/** The menu item ui pattern class. */\nexport class MenuItemPattern<V> implements ListItem<V> {\n /** The value of the menu item. */\n value: SignalLike<V>;\n\n /** The unique ID of the menu item. */\n id: SignalLike<string>;\n\n /** Whether the menu item is disabled. */\n disabled = () => this.inputs.parent()?.disabled() || this.inputs.disabled();\n\n /** The search term for the menu item. */\n searchTerm: SignalLike<string>;\n\n /** The element of the menu item. */\n element: SignalLike<HTMLElement | undefined>;\n\n /** Whether the menu item is active. */\n active = computed(() => this.inputs.parent()?.inputs.activeItem() === this);\n\n /** Whether the menu item has received focus. */\n hasBeenFocused = signal(false);\n\n /** The tab index of the menu item. */\n tabIndex = computed(() => {\n if (this.submenu() && this.submenu()?.inputs.activeItem()) {\n return -1;\n }\n return this.inputs.parent()?.listBehavior.getItemTabindex(this) ?? -1;\n });\n\n /** The position of the menu item in the menu. */\n index = computed(() => this.inputs.parent()?.inputs.items().indexOf(this) ?? -1);\n\n /** Whether the menu item is expanded. */\n expanded = computed(() => (this.submenu() ? this._expanded() : null));\n\n /** Whether the menu item is expanded. */\n _expanded = signal(false);\n\n /** The ID of the menu that the menu item controls. */\n controls = signal<string | undefined>(undefined);\n\n /** The role of the menu item. */\n role = () => 'menuitem';\n\n /** Whether the menu item has a popup. */\n hasPopup = computed(() => !!this.submenu());\n\n /** The submenu associated with the menu item. */\n submenu: SignalLike<MenuPattern<V> | undefined>;\n\n /** Whether the menu item is selectable. */\n selectable: SignalLike<boolean>;\n\n constructor(readonly inputs: MenuItemInputs<V>) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.element = inputs.element;\n this.submenu = this.inputs.submenu;\n this.searchTerm = inputs.searchTerm;\n this.selectable = computed(() => !this.submenu());\n }\n\n /** Opens the submenu. */\n open(opts?: {first?: boolean; last?: boolean}) {\n if (this.disabled()) {\n return;\n }\n\n this._expanded.set(true);\n\n if (opts?.first) {\n this.submenu()?.first();\n }\n if (opts?.last) {\n this.submenu()?.last();\n }\n }\n\n /** Closes the submenu. */\n close(opts: {refocus?: boolean} = {}) {\n this._expanded.set(false);\n\n if (opts.refocus) {\n this.inputs.parent()?.listBehavior.goto(this);\n }\n\n let menuitems = this.inputs.submenu()?.inputs.items() ?? [];\n\n while (menuitems.length) {\n const menuitem = menuitems.pop();\n menuitem?._expanded.set(false);\n menuitem?.inputs.parent()?.listBehavior.unfocus();\n menuitems = menuitems.concat(menuitem?.submenu()?.inputs.items() ?? []);\n\n const parent = menuitem?.inputs.parent();\n\n if (parent instanceof MenuPattern) {\n parent._clearTimeouts();\n }\n }\n }\n\n /** Handles focusin events for the menu item. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n}\n"],"names":["MenuPattern","inputs","id","role","disabled","visible","computed","parent","expanded","listBehavior","isFocused","signal","hasBeenFocused","hasBeenHovered","_openTimeout","_closeTimeout","tabIndex","shouldFocus","root","MenuTriggerPattern","MenuBarPattern","_expandKey","textDirection","_collapseKey","dynamicSpaceKey","isTyping","typeaheadRegexp","grandparent","keydownManager","KeyboardEventManager","on","next","ignoreRepeat","prev","first","last","trigger","closeAll","expand","collapse","e","search","key","constructor","List","values","setDefaultState","goto","items","focusElement","onKeydown","event","handle","onMouseOver","set","item","find","i","element","contains","target","activeItem","MenuItemPattern","_clearTimeouts","_closeItem","_clearCloseTimeout","_openItem","_clearOpenTimeout","setTimeout","close","undefined","expansionDelay","open","onMouseOut","relatedTarget","onClick","submit","onFocusIn","onFocusOut","parentEl","refocus","siblings","filter","hasPopup","isMenu","isMenuBar","isMenuTrigger","submenu","itemSelected","value","clearTimeout","_nextKey","_previousKey","opts","prevItem","unfocus","menu","focus","menuitems","length","menuitem","pop","_expanded","concat","searchTerm","active","getItemTabindex","index","indexOf","controls","selectable"],"mappings":";;;MAsEaA,WAAW,CAAA;EAsGDC,MAAA;EApGrBC,EAAE;EAGFC,IAAI,GAAGA,MAAM,MAAM;EAGnBC,QAAQ,GAAGA,MAAM,IAAI,CAACH,MAAM,CAACG,QAAQ,EAAE;EAGvCC,OAAO,GAAGC,QAAQ,CAAC,MAAO,IAAI,CAACL,MAAM,CAACM,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,CAACN,MAAM,CAACM,MAAM,EAAE,EAAEC,QAAQ,EAAE,GAAG,IAAK,CAAC;EAG5FC,YAAY;AAGZC,EAAAA,SAAS,GAAGC,MAAM,CAAC,KAAK,CAAC;AAGzBC,EAAAA,cAAc,GAAGD,MAAM,CAAC,KAAK,CAAC;AAG9BE,EAAAA,cAAc,GAAGF,MAAM,CAAC,KAAK,CAAC;EAG9BG,YAAY;EAGZC,aAAa;EAGbC,QAAQ,GAAGA,MAAM,IAAI,CAACP,YAAY,CAACO,QAAQ,EAAE;EAG7CC,WAAW,GAAGX,QAAQ,CAAC,MAAK;AAC1B,IAAA,MAAMY,IAAI,GAAG,IAAI,CAACA,IAAI,EAAE;IAExB,IAAIA,IAAI,YAAYC,kBAAkB,EAAE;AACtC,MAAA,OAAO,IAAI;AACb;AAEA,IAAA,IAAID,IAAI,YAAYE,cAAc,IAAIF,IAAI,YAAYlB,WAAW,EAAE;AACjE,MAAA,OAAOkB,IAAI,CAACR,SAAS,EAAE;AACzB;AAEA,IAAA,OAAO,KAAK;AACd,GAAC,CAAC;EAGMW,UAAU,GAAGf,QAAQ,CAAC,MAAK;AACjC,IAAA,OAAO,IAAI,CAACL,MAAM,CAACqB,aAAa,EAAE,KAAK,KAAK,GAAG,WAAW,GAAG,YAAY;AAC3E,GAAC,CAAC;EAGMC,YAAY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CAACoD,OAAO,EAAE,EAAEpD,IAAI,EAAE;AACxB;AACF;AAGAkC,EAAAA,KAAKA,CAACwB,OAA4B,EAAE,EAAA;AAClC,IAAA,IAAI,CAACS,SAAS,CAAChD,GAAG,CAAC,KAAK,CAAC;IAEzB,IAAIuC,IAAI,CAACb,OAAO,EAAE;AAChB,MAAA,IAAI,CAAC/E,MAAM,CAACM,MAAM,EAAE,EAAEE,YAAY,CAACsC,IAAI,CAAC,IAAI,CAAC;AAC/C;AAEA,IAAA,IAAImD,SAAS,GAAG,IAAI,CAACjG,MAAM,CAACsF,OAAO,EAAE,EAAEtF,MAAM,CAAC+C,KAAK,EAAE,IAAI,EAAE;IAE3D,OAAOkD,SAAS,CAACC,MAAM,EAAE;AACvB,MAAA,MAAMC,QAAQ,GAAGF,SAAS,CAACG,GAAG,EAAE;AAChCD,MAAAA,QAAQ,EAAEE,SAAS,CAAChD,GAAG,CAAC,KAAK,CAAC;MAC9B8C,QAAQ,EAAEnG,MAAM,CAACM,MAAM,EAAE,EAAEE,YAAY,CAACsF,OAAO,EAAE;AACjDG,MAAAA,SAAS,GAAGA,SAAS,CAACK,MAAM,CAACH,QAAQ,EAAEb,OAAO,EAAE,EAAEtF,MAAM,CAAC+C,KAAK,EAAE,IAAI,EAAE,CAAC;MAEvE,MAAMzC,MAAM,GAAG6F,QAAQ,EAAEnG,MAAM,CAACM,MAAM,EAAE;MAExC,IAAIA,MAAM,YAAYP,WAAW,EAAE;QACjCO,MAAM,CAACwD,cAAc,EAAE;AACzB;AACF;AACF;AAGAc,EAAAA,SAASA,GAAA;AACP,IAAA,IAAI,CAACjE,cAAc,CAAC0C,GAAG,CAAC,IAAI,CAAC;AAC/B;AACD;;;;"}
1
+ {"version":3,"file":"_menu-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/menu/menu.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {KeyboardEventManager} from '../behaviors/event-manager';\nimport {computed, signal, SignalLike} from '../behaviors/signal-like/signal-like';\nimport {List, ListInputs, ListItem} from '../behaviors/list/list';\n\n/** The inputs for the MenuBarPattern class. */\nexport interface MenuBarInputs<V> extends ListInputs<MenuItemPattern<V>, V> {\n /** The menu items contained in the menu. */\n items: SignalLike<MenuItemPattern<V>[]>;\n\n /** Callback function triggered when a menu item is selected. */\n itemSelected?: (value: V) => void;\n\n /** The text direction of the menu bar. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n}\n\n/** The inputs for the MenuPattern class. */\nexport interface MenuInputs<V> extends Omit<ListInputs<MenuItemPattern<V>, V>, 'values'> {\n /** The unique ID of the menu. */\n id: SignalLike<string>;\n\n /** The menu items contained in the menu. */\n items: SignalLike<MenuItemPattern<V>[]>;\n\n /** A reference to the parent menu or menu trigger. */\n parent: SignalLike<MenuTriggerPattern<V> | MenuItemPattern<V> | undefined>;\n\n /** Callback function triggered when a menu item is selected. */\n itemSelected?: (value: V) => void;\n\n /** The text direction of the menu bar. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n\n /** The delay in milliseconds before expanding sub-menus on hover. */\n expansionDelay: SignalLike<number>;\n}\n\n/** The inputs for the MenuTriggerPattern class. */\nexport interface MenuTriggerInputs<V> {\n /** A reference to the menu trigger element. */\n element: SignalLike<HTMLElement | undefined>;\n\n /** A reference to the menu associated with the trigger. */\n menu: SignalLike<MenuPattern<V> | undefined>;\n\n /** The text direction of the menu bar. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n\n /** Whether the menu trigger is disabled. */\n disabled: SignalLike<boolean>;\n}\n\n/** The inputs for the MenuItemPattern class. */\nexport interface MenuItemInputs<V> extends Omit<ListItem<V>, 'index' | 'selectable'> {\n /** A reference to the parent menu or menu trigger. */\n parent: SignalLike<MenuPattern<V> | MenuBarPattern<V> | undefined>;\n\n /** A reference to the submenu associated with the menu item. */\n submenu: SignalLike<MenuPattern<V> | undefined>;\n}\n\n/** The menu ui pattern class. */\nexport class MenuPattern<V> {\n /** The unique ID of the menu. */\n id: SignalLike<string>;\n\n /** The role of the menu. */\n role = () => 'menu';\n\n /** Whether the menu is disabled. */\n disabled = () => this.inputs.disabled();\n\n /** Whether the menu is visible. */\n visible = computed(() => (this.inputs.parent() ? !!this.inputs.parent()?.expanded() : true));\n\n /** Controls list behavior for the menu items. */\n listBehavior: List<MenuItemPattern<V>, V>;\n\n /** Whether the menu or any of its child elements are currently focused. */\n isFocused = signal(false);\n\n /** Whether the menu has received focus. */\n hasBeenFocused = signal(false);\n\n /** Whether the menu trigger has been hovered. */\n hasBeenHovered = signal(false);\n\n /** Timeout used to open sub-menus on hover. */\n _openTimeout: any;\n\n /** Timeout used to close sub-menus on hover out. */\n _closeTimeout: any;\n\n /** The tab index of the menu. */\n tabIndex = () => this.listBehavior.tabIndex();\n\n /** Whether the menu should be focused on mouse over. */\n shouldFocus = computed(() => {\n const root = this.root();\n\n if (root instanceof MenuTriggerPattern) {\n return true;\n }\n\n if (root instanceof MenuBarPattern || root instanceof MenuPattern) {\n return root.isFocused();\n }\n\n return false;\n });\n\n /** The key used to expand sub-menus. */\n private _expandKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The key used to collapse sub-menus. */\n private _collapseKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** Represents the space key. Does nothing when the user is actively using typeahead. */\n dynamicSpaceKey = computed(() => (this.listBehavior.isTyping() ? '' : ' '));\n\n /** The regexp used to decide if a key should trigger typeahead. */\n typeaheadRegexp = /^.$/;\n\n /** The root of the menu. */\n root: SignalLike<MenuTriggerPattern<V> | MenuBarPattern<V> | MenuPattern<V> | undefined> =\n computed(() => {\n const parent = this.inputs.parent();\n\n if (!parent) {\n return this;\n }\n\n if (parent instanceof MenuTriggerPattern) {\n return parent;\n }\n\n const grandparent = parent.inputs.parent();\n\n if (grandparent instanceof MenuBarPattern) {\n return grandparent;\n }\n\n return grandparent?.root();\n });\n\n /** Handles keyboard events for the menu. */\n keydownManager = computed(() => {\n return new KeyboardEventManager()\n .on('ArrowDown', () => this.next(), {ignoreRepeat: false})\n .on('ArrowUp', () => this.prev(), {ignoreRepeat: false})\n .on('Home', () => this.first())\n .on('End', () => this.last())\n .on('Enter', () => this.trigger())\n .on('Escape', () => this.closeAll())\n .on(this._expandKey, () => this.expand())\n .on(this._collapseKey, () => this.collapse())\n .on(this.dynamicSpaceKey, () => this.trigger())\n .on(this.typeaheadRegexp, e => this.listBehavior.search(e.key));\n });\n\n constructor(readonly inputs: MenuInputs<V>) {\n this.id = inputs.id;\n this.listBehavior = new List<MenuItemPattern<V>, V>({\n ...inputs,\n values: signal([]),\n });\n }\n\n /** Sets the default state for the menu. */\n setDefaultState() {\n if (!this.inputs.parent()) {\n this.listBehavior.goto(this.inputs.items()[0], {focusElement: false});\n }\n }\n\n /** Handles keyboard events for the menu. */\n onKeydown(event: KeyboardEvent) {\n this.keydownManager().handle(event);\n }\n\n /** Handles mouseover events for the menu. */\n onMouseOver(event: MouseEvent) {\n if (!this.visible()) {\n return;\n }\n\n this.hasBeenHovered.set(true);\n const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));\n\n if (!item) {\n return;\n }\n\n const parent = this.inputs.parent();\n const activeItem = this?.inputs.activeItem();\n\n if (parent instanceof MenuItemPattern) {\n const grandparent = parent.inputs.parent();\n if (grandparent instanceof MenuPattern) {\n grandparent._clearTimeouts();\n grandparent.listBehavior.goto(parent, {focusElement: false});\n }\n }\n\n if (activeItem && activeItem !== item) {\n this._closeItem(activeItem);\n }\n\n if (item.expanded()) {\n this._clearCloseTimeout();\n }\n\n this._openItem(item);\n this.listBehavior.goto(item, {focusElement: this.shouldFocus()});\n }\n\n /** Closes the specified menu item after a delay. */\n private _closeItem(item: MenuItemPattern<V>) {\n this._clearOpenTimeout();\n\n if (!this._closeTimeout) {\n this._closeTimeout = setTimeout(() => {\n item.close();\n this._closeTimeout = undefined;\n }, this.inputs.expansionDelay());\n }\n }\n\n /** Opens the specified menu item after a delay. */\n private _openItem(item: MenuItemPattern<V>) {\n this._clearOpenTimeout();\n\n this._openTimeout = setTimeout(() => {\n item.open();\n this._openTimeout = undefined;\n }, this.inputs.expansionDelay());\n }\n\n /** Handles mouseout events for the menu. */\n onMouseOut(event: MouseEvent) {\n this._clearOpenTimeout();\n\n if (this.isFocused()) {\n return;\n }\n\n const root = this.root();\n const parent = this.inputs.parent();\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!root || !parent || parent instanceof MenuTriggerPattern) {\n return;\n }\n\n const grandparent = parent.inputs.parent();\n\n if (!grandparent || grandparent instanceof MenuBarPattern) {\n return;\n }\n\n if (!grandparent.inputs.element()?.contains(relatedTarget)) {\n parent.close();\n }\n }\n\n /** Handles click events for the menu. */\n onClick(event: MouseEvent) {\n const relatedTarget = event.target as Node | null;\n const item = this.inputs.items().find(i => i.element()?.contains(relatedTarget));\n\n if (item) {\n item.open();\n this.listBehavior.goto(item);\n this.submit(item);\n }\n }\n\n /** Handles focusin events for the menu. */\n onFocusIn() {\n this.isFocused.set(true);\n this.hasBeenFocused.set(true);\n }\n\n /** Handles the focusout event for the menu. */\n onFocusOut(event: FocusEvent) {\n const parent = this.inputs.parent();\n const parentEl = parent?.inputs.element();\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!relatedTarget) {\n this.isFocused.set(false);\n this.inputs.parent()?.close({refocus: true});\n }\n\n if (parent instanceof MenuItemPattern) {\n const grandparent = parent.inputs.parent();\n const siblings = grandparent?.inputs.items().filter(i => i !== parent);\n const item = siblings?.find(i => i.element()?.contains(relatedTarget));\n\n if (item) {\n return;\n }\n }\n\n if (\n this.visible() &&\n !parentEl?.contains(relatedTarget) &&\n !this.inputs.element()?.contains(relatedTarget)\n ) {\n this.isFocused.set(false);\n this.inputs.parent()?.close();\n }\n }\n\n /** Focuses the previous menu item. */\n prev() {\n this.inputs.activeItem()?.close();\n this.listBehavior.prev();\n }\n\n /** Focuses the next menu item. */\n next() {\n this.inputs.activeItem()?.close();\n this.listBehavior.next();\n }\n\n /** Focuses the first menu item. */\n first() {\n this.inputs.activeItem()?.close();\n this.listBehavior.first();\n }\n\n /** Focuses the last menu item. */\n last() {\n this.inputs.activeItem()?.close();\n this.listBehavior.last();\n }\n\n /** Triggers the active menu item. */\n trigger() {\n this.inputs.activeItem()?.hasPopup()\n ? this.inputs.activeItem()?.open({first: true})\n : this.submit();\n }\n\n /** Submits the menu. */\n submit(item = this.inputs.activeItem()) {\n if (!item || item.disabled() || item.submenu()) {\n return;\n }\n\n const root = this.root();\n\n if (root instanceof MenuTriggerPattern) {\n root.close({refocus: true});\n root?.inputs.menu()?.inputs.itemSelected?.(item.value());\n } else if (root instanceof MenuBarPattern) {\n root.close();\n root?.inputs.itemSelected?.(item.value());\n } else if (root instanceof MenuPattern) {\n root.inputs.activeItem()?.close({refocus: true});\n root?.inputs.itemSelected?.(item.value());\n }\n }\n\n /** Collapses the current menu or focuses the previous item in the menubar. */\n collapse() {\n const root = this.root();\n const parent = this.inputs.parent();\n\n if (parent instanceof MenuItemPattern && !(parent.inputs.parent() instanceof MenuBarPattern)) {\n parent.close({refocus: true});\n } else if (root instanceof MenuBarPattern) {\n root.prev();\n }\n }\n\n /** Expands the current menu or focuses the next item in the menubar. */\n expand() {\n const root = this.root();\n const activeItem = this.inputs.activeItem();\n\n if (activeItem?.submenu()) {\n activeItem.open({first: true});\n } else if (root instanceof MenuBarPattern) {\n root.next();\n }\n }\n\n /** Closes the menu. */\n close() {\n this.inputs.parent()?.close();\n }\n\n /** Closes the menu and all parent menus. */\n closeAll() {\n const root = this.root();\n\n if (root instanceof MenuTriggerPattern) {\n root.close({refocus: true});\n }\n\n if (root instanceof MenuBarPattern) {\n root.close();\n }\n\n if (root instanceof MenuPattern) {\n root.inputs.activeItem()?.close({refocus: true});\n }\n }\n\n /** Clears any open or close timeouts for sub-menus. */\n _clearTimeouts() {\n this._clearOpenTimeout();\n this._clearCloseTimeout();\n }\n\n /** Clears the open timeout. */\n _clearOpenTimeout() {\n if (this._openTimeout) {\n clearTimeout(this._openTimeout);\n this._openTimeout = undefined;\n }\n }\n\n /** Clears the close timeout. */\n _clearCloseTimeout() {\n if (this._closeTimeout) {\n clearTimeout(this._closeTimeout);\n this._closeTimeout = undefined;\n }\n }\n}\n\n/** The menubar ui pattern class. */\nexport class MenuBarPattern<V> {\n /** Controls list behavior for the menu items. */\n listBehavior: List<MenuItemPattern<V>, V>;\n\n /** The tab index of the menu. */\n tabIndex = () => this.listBehavior.tabIndex();\n\n /** The key used to navigate to the next item. */\n private _nextKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The key used to navigate to the previous item. */\n private _previousKey = computed(() => {\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** Represents the space key. Does nothing when the user is actively using typeahead. */\n dynamicSpaceKey = computed(() => (this.listBehavior.isTyping() ? '' : ' '));\n\n /** The regexp used to decide if a key should trigger typeahead. */\n typeaheadRegexp = /^.$/;\n\n /** Whether the menubar or any of its children are currently focused. */\n isFocused = signal(false);\n\n /** Whether the menubar has been focused. */\n hasBeenFocused = signal(false);\n\n /** Whether the menubar is disabled. */\n disabled = () => this.inputs.disabled();\n\n /** Handles keyboard events for the menu. */\n keydownManager = computed(() => {\n return new KeyboardEventManager()\n .on(this._nextKey, () => this.next(), {ignoreRepeat: false})\n .on(this._previousKey, () => this.prev(), {ignoreRepeat: false})\n .on('End', () => this.listBehavior.last())\n .on('Home', () => this.listBehavior.first())\n .on('Enter', () => this.inputs.activeItem()?.open({first: true}))\n .on('ArrowUp', () => this.inputs.activeItem()?.open({last: true}))\n .on('ArrowDown', () => this.inputs.activeItem()?.open({first: true}))\n .on(this.dynamicSpaceKey, () => this.inputs.activeItem()?.open({first: true}))\n .on(this.typeaheadRegexp, e => this.listBehavior.search(e.key));\n });\n\n constructor(readonly inputs: MenuBarInputs<V>) {\n this.listBehavior = new List<MenuItemPattern<V>, V>(inputs);\n }\n\n /** Sets the default state for the menubar. */\n setDefaultState() {\n this.inputs.activeItem.set(this.inputs.items()[0]);\n }\n\n /** Handles keyboard events for the menu. */\n onKeydown(event: KeyboardEvent) {\n this.keydownManager().handle(event);\n }\n\n /** Handles click events for the menu bar. */\n onClick(event: MouseEvent) {\n const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));\n\n if (!item) {\n return;\n }\n\n this.goto(item);\n item.expanded() ? item.close() : item.open();\n }\n\n /** Handles mouseover events for the menu bar. */\n onMouseOver(event: MouseEvent) {\n const item = this.inputs.items().find(i => i.element()?.contains(event.target as Node));\n\n if (item) {\n this.goto(item, {focusElement: this.isFocused()});\n }\n }\n\n /** Handles focusin events for the menu bar. */\n onFocusIn() {\n this.isFocused.set(true);\n this.hasBeenFocused.set(true);\n }\n\n /** Handles focusout events for the menu bar. */\n onFocusOut(event: FocusEvent) {\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (!this.inputs.element()?.contains(relatedTarget)) {\n this.isFocused.set(false);\n this.close();\n }\n }\n\n /** Goes to and optionally focuses the specified menu item. */\n goto(item: MenuItemPattern<V>, opts?: {focusElement?: boolean}) {\n const prevItem = this.inputs.activeItem();\n this.listBehavior.goto(item, opts);\n\n if (prevItem?.expanded()) {\n prevItem?.close();\n this.inputs.activeItem()?.open();\n }\n\n if (item === prevItem) {\n if (item.expanded() && item.submenu()?.inputs.activeItem()) {\n item.submenu()?.inputs.activeItem()?.close();\n item.submenu()?.listBehavior.unfocus();\n }\n }\n }\n\n /** Focuses the next menu item. */\n next() {\n const prevItem = this.inputs.activeItem();\n this.listBehavior.next();\n\n if (prevItem?.expanded()) {\n prevItem?.close();\n this.inputs.activeItem()?.open({first: true});\n }\n }\n\n /** Focuses the previous menu item. */\n prev() {\n const prevItem = this.inputs.activeItem();\n this.listBehavior.prev();\n\n if (prevItem?.expanded()) {\n prevItem?.close();\n this.inputs.activeItem()?.open({first: true});\n }\n }\n\n /** Closes the menubar and refocuses the root menu bar item. */\n close() {\n this.inputs.activeItem()?.close({refocus: this.isFocused()});\n }\n}\n\n/** The menu trigger ui pattern class. */\nexport class MenuTriggerPattern<V> {\n /** Whether the menu is expanded. */\n expanded = signal(false);\n\n /** Whether the menu trigger has received focus. */\n hasBeenFocused = signal(false);\n\n /** The role of the menu trigger. */\n role = () => 'button';\n\n /** Whether the menu trigger has a popup. */\n hasPopup = () => true;\n\n /** The menu associated with the trigger. */\n menu: SignalLike<MenuPattern<V> | undefined>;\n\n /** The tab index of the menu trigger. */\n tabIndex = computed(() => (this.expanded() && this.menu()?.inputs.activeItem() ? -1 : 0));\n\n /** Whether the menu trigger is disabled. */\n disabled = () => this.inputs.disabled();\n\n /** Handles keyboard events for the menu trigger. */\n keydownManager = computed(() => {\n return new KeyboardEventManager()\n .on(' ', () => this.open({first: true}))\n .on('Enter', () => this.open({first: true}))\n .on('ArrowDown', () => this.open({first: true}))\n .on('ArrowUp', () => this.open({last: true}))\n .on('Escape', () => this.close({refocus: true}));\n });\n\n constructor(readonly inputs: MenuTriggerInputs<V>) {\n this.menu = this.inputs.menu;\n }\n\n /** Handles keyboard events for the menu trigger. */\n onKeydown(event: KeyboardEvent) {\n if (!this.inputs.disabled()) {\n this.keydownManager().handle(event);\n }\n }\n\n /** Handles click events for the menu trigger. */\n onClick() {\n if (!this.inputs.disabled()) {\n this.expanded() ? this.close() : this.open({first: true});\n }\n }\n\n /** Handles focusin events for the menu trigger. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n\n /** Handles focusout events for the menu trigger. */\n onFocusOut(event: FocusEvent) {\n const element = this.inputs.element();\n const relatedTarget = event.relatedTarget as Node | null;\n\n if (\n this.expanded() &&\n !element?.contains(relatedTarget) &&\n !this.inputs.menu()?.inputs.element()?.contains(relatedTarget)\n ) {\n this.close();\n }\n }\n\n /** Opens the menu. */\n open(opts?: {first?: boolean; last?: boolean}) {\n this.expanded.set(true);\n\n if (opts?.first) {\n this.inputs.menu()?.first();\n } else if (opts?.last) {\n this.inputs.menu()?.last();\n }\n }\n\n /** Closes the menu. */\n close(opts: {refocus?: boolean} = {}) {\n this.expanded.set(false);\n this.menu()?.listBehavior.unfocus();\n\n if (opts.refocus) {\n this.inputs.element()?.focus();\n }\n\n let menuitems = this.inputs.menu()?.inputs.items() ?? [];\n\n while (menuitems.length) {\n const menuitem = menuitems.pop();\n menuitem?._expanded.set(false);\n menuitem?.inputs.parent()?.listBehavior.unfocus();\n menuitems = menuitems.concat(menuitem?.submenu()?.inputs.items() ?? []);\n }\n }\n}\n\n/** The menu item ui pattern class. */\nexport class MenuItemPattern<V> implements ListItem<V> {\n /** The value of the menu item. */\n value: SignalLike<V>;\n\n /** The unique ID of the menu item. */\n id: SignalLike<string>;\n\n /** Whether the menu item is disabled. */\n disabled = () => this.inputs.parent()?.disabled() || this.inputs.disabled();\n\n /** The search term for the menu item. */\n searchTerm: SignalLike<string>;\n\n /** The element of the menu item. */\n element: SignalLike<HTMLElement | undefined>;\n\n /** Whether the menu item is active. */\n active = computed(() => this.inputs.parent()?.inputs.activeItem() === this);\n\n /** Whether the menu item has received focus. */\n hasBeenFocused = signal(false);\n\n /** The tab index of the menu item. */\n tabIndex = computed(() => {\n if (this.submenu() && this.submenu()?.inputs.activeItem()) {\n return -1;\n }\n return this.inputs.parent()?.listBehavior.getItemTabindex(this) ?? -1;\n });\n\n /** The position of the menu item in the menu. */\n index = computed(() => this.inputs.parent()?.inputs.items().indexOf(this) ?? -1);\n\n /** Whether the menu item is expanded. */\n expanded = computed(() => (this.submenu() ? this._expanded() : null));\n\n /** Whether the menu item is expanded. */\n _expanded = signal(false);\n\n /** The ID of the menu that the menu item controls. */\n controls = signal<string | undefined>(undefined);\n\n /** The role of the menu item. */\n role = () => 'menuitem';\n\n /** Whether the menu item has a popup. */\n hasPopup = computed(() => !!this.submenu());\n\n /** The submenu associated with the menu item. */\n submenu: SignalLike<MenuPattern<V> | undefined>;\n\n /** Whether the menu item is selectable. */\n selectable: SignalLike<boolean>;\n\n constructor(readonly inputs: MenuItemInputs<V>) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.element = inputs.element;\n this.submenu = this.inputs.submenu;\n this.searchTerm = inputs.searchTerm;\n this.selectable = computed(() => !this.submenu());\n }\n\n /** Opens the submenu. */\n open(opts?: {first?: boolean; last?: boolean}) {\n if (this.disabled()) {\n return;\n }\n\n this._expanded.set(true);\n\n if (opts?.first) {\n this.submenu()?.first();\n }\n if (opts?.last) {\n this.submenu()?.last();\n }\n }\n\n /** Closes the submenu. */\n close(opts: {refocus?: boolean} = {}) {\n this._expanded.set(false);\n\n if (opts.refocus) {\n this.inputs.parent()?.listBehavior.goto(this);\n }\n\n let menuitems = this.inputs.submenu()?.inputs.items() ?? [];\n\n while (menuitems.length) {\n const menuitem = menuitems.pop();\n menuitem?._expanded.set(false);\n menuitem?.inputs.parent()?.listBehavior.unfocus();\n menuitems = menuitems.concat(menuitem?.submenu()?.inputs.items() ?? []);\n\n const parent = menuitem?.inputs.parent();\n\n if (parent instanceof MenuPattern) {\n parent._clearTimeouts();\n }\n }\n }\n\n /** Handles focusin events for the menu item. */\n onFocusIn() {\n this.hasBeenFocused.set(true);\n }\n}\n"],"names":["MenuPattern","inputs","id","role","disabled","visible","computed","parent","expanded","listBehavior","isFocused","signal","hasBeenFocused","hasBeenHovered","_openTimeout","_closeTimeout","tabIndex","shouldFocus","root","MenuTriggerPattern","MenuBarPattern","_expandKey","textDirection","_collapseKey","dynamicSpaceKey","isTyping","typeaheadRegexp","grandparent","keydownManager","KeyboardEventManager","on","next","ignoreRepeat","prev","first","last","trigger","closeAll","expand","collapse","e","search","key","constructor","List","values","setDefaultState","goto","items","focusElement","onKeydown","event","handle","onMouseOver","set","item","find","i","element","contains","target","activeItem","MenuItemPattern","_clearTimeouts","_closeItem","_clearCloseTimeout","_openItem","_clearOpenTimeout","setTimeout","close","undefined","expansionDelay","open","onMouseOut","relatedTarget","onClick","submit","onFocusIn","onFocusOut","parentEl","refocus","siblings","filter","hasPopup","submenu","menu","itemSelected","value","clearTimeout","_nextKey","_previousKey","opts","prevItem","unfocus","focus","menuitems","length","menuitem","pop","_expanded","concat","searchTerm","active","getItemTabindex","index","indexOf","controls","selectable"],"mappings":";;;MAsEaA,WAAW,CAAA;EAsGDC,MAAA;EApGrBC,EAAE;EAGFC,IAAI,GAAGA,MAAM,MAAM;EAGnBC,QAAQ,GAAGA,MAAM,IAAI,CAACH,MAAM,CAACG,QAAQ,EAAE;EAGvCC,OAAO,GAAGC,QAAQ,CAAC,MAAO,IAAI,CAACL,MAAM,CAACM,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,CAACN,MAAM,CAACM,MAAM,EAAE,EAAEC,QAAQ,EAAE,GAAG,IAAK,CAAC;EAG5FC,YAAY;AAGZC,EAAAA,SAAS,GAAGC,MAAM,CAAC,KAAK,CAAC;AAGzBC,EAAAA,cAAc,GAAGD,MAAM,CAAC,KAAK,CAAC;AAG9BE,EAAAA,cAAc,GAAGF,MAAM,CAAC,KAAK,CAAC;EAG9BG,YAAY;EAGZC,aAAa;EAGbC,QAAQ,GAAGA,MAAM,IAAI,CAACP,YAAY,CAACO,QAAQ,EAAE;EAG7CC,WAAW,GAAGX,QAAQ,CAAC,MAAK;AAC1B,IAAA,MAAMY,IAAI,GAAG,IAAI,CAACA,IAAI,EAAE;IAExB,IAAIA,IAAI,YAAYC,kBAAkB,EAAE;AACtC,MAAA,OAAO,IAAI;AACb;AAEA,IAAA,IAAID,IAAI,YAAYE,cAAc,IAAIF,IAAI,YAAYlB,WAAW,EAAE;AACjE,MAAA,OAAOkB,IAAI,CAACR,SAAS,EAAE;AACzB;AAEA,IAAA,OAAO,KAAK;AACd,GAAC,CAAC;EAGMW,UAAU,GAAGf,QAAQ,CAAC,MAAK;AACjC,IAAA,OAAO,IAAI,CAACL,MAAM,CAACq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IAAI,EAAE;AACd,MAAA,IAAI,CAACiD,OAAO,EAAE,EAAEjD,IAAI,EAAE;AACxB;AACF;AAGAkC,EAAAA,KAAKA,CAACsB,OAA4B,EAAE,EAAA;AAClC,IAAA,IAAI,CAACQ,SAAS,CAAC7C,GAAG,CAAC,KAAK,CAAC;IAEzB,IAAIqC,IAAI,CAACX,OAAO,EAAE;AAChB,MAAA,IAAI,CAAC/E,MAAM,CAACM,MAAM,EAAE,EAAEE,YAAY,CAACsC,IAAI,CAAC,IAAI,CAAC;AAC/C;AAEA,IAAA,IAAIgD,SAAS,GAAG,IAAI,CAAC9F,MAAM,CAACmF,OAAO,EAAE,EAAEnF,MAAM,CAAC+C,KAAK,EAAE,IAAI,EAAE;IAE3D,OAAO+C,SAAS,CAACC,MAAM,EAAE;AACvB,MAAA,MAAMC,QAAQ,GAAGF,SAAS,CAACG,GAAG,EAAE;AAChCD,MAAAA,QAAQ,EAAEE,SAAS,CAAC7C,GAAG,CAAC,KAAK,CAAC;MAC9B2C,QAAQ,EAAEhG,MAAM,CAACM,MAAM,EAAE,EAAEE,YAAY,CAACoF,OAAO,EAAE;AACjDE,MAAAA,SAAS,GAAGA,SAAS,CAACK,MAAM,CAACH,QAAQ,EAAEb,OAAO,EAAE,EAAEnF,MAAM,CAAC+C,KAAK,EAAE,IAAI,EAAE,CAAC;MAEvE,MAAMzC,MAAM,GAAG0F,QAAQ,EAAEhG,MAAM,CAACM,MAAM,EAAE;MAExC,IAAIA,MAAM,YAAYP,WAAW,EAAE;QACjCO,MAAM,CAACwD,cAAc,EAAE;AACzB;AACF;AACF;AAGAc,EAAAA,SAASA,GAAA;AACP,IAAA,IAAI,CAACjE,cAAc,CAAC0C,GAAG,CAAC,IAAI,CAAC;AAC/B;AACD;;;;"}
package/fesm2022/aria.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Version } from '@angular/core';
2
2
 
3
- const VERSION = new Version('21.2.0');
3
+ const VERSION = new Version('21.2.1');
4
4
 
5
5
  export { VERSION };
6
6
  //# sourceMappingURL=aria.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"aria.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Aria package. */\nexport const VERSION = new Version('21.2.0');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"aria.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Aria package. */\nexport const VERSION = new Version('21.2.1');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/aria",
3
- "version": "21.2.0",
3
+ "version": "21.2.1",
4
4
  "description": "Angular Aria",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "homepage": "https://github.com/angular/components#readme",
14
14
  "peerDependencies": {
15
- "@angular/cdk": "21.2.0",
15
+ "@angular/cdk": "21.2.1",
16
16
  "@angular/core": "^21.0.0 || ^22.0.0"
17
17
  },
18
18
  "devDependencies": {
Binary file