focus-key-manager-C1rAQJ5z.mjs 661 B

12345678910111213141516171819202122
  1. import { L as ListKeyManager } from './list-key-manager-CyOIXo8P.mjs';
  2. class FocusKeyManager extends ListKeyManager {
  3. _origin = 'program';
  4. /**
  5. * Sets the focus origin that will be passed in to the items for any subsequent `focus` calls.
  6. * @param origin Focus origin to be used when focusing items.
  7. */
  8. setFocusOrigin(origin) {
  9. this._origin = origin;
  10. return this;
  11. }
  12. setActiveItem(item) {
  13. super.setActiveItem(item);
  14. if (this.activeItem) {
  15. this.activeItem.focus(this._origin);
  16. }
  17. }
  18. }
  19. export { FocusKeyManager as F };
  20. //# sourceMappingURL=focus-key-manager-C1rAQJ5z.mjs.map