Merge remote-tracking branch 'origin/main'

This commit is contained in:
copecone committed 2026-04-02 10:17:25 +09:00
commit 2d6e0995c7
1 file changed
+11 -1
+11 -1
View File
@@ -1,4 +1,4 @@
import { Component, input, output } from '@angular/core'; import { Component, input, output, HostListener } from '@angular/core';
export type PopupPosition = { export type PopupPosition = {
top?: string; top?: string;
@@ -14,6 +14,11 @@ export type PopupVariant = 'glass' | 'solid';
standalone: true, standalone: true,
templateUrl: './popup.html', templateUrl: './popup.html',
styleUrl: './popup.scss', styleUrl: './popup.scss',
host: {
'role': 'dialog',
'aria-modal': 'true',
'tabindex': '-1'
}
}) })
export class PopupComponent { export class PopupComponent {
/** /**
@@ -32,6 +37,11 @@ export class PopupComponent {
*/ */
closeRequest = output<void>(); closeRequest = output<void>();
@HostListener('document:keydown.escape')
onKeydownHandler() {
this.onClose();
}
onClose() { onClose() {
this.closeRequest.emit(); this.closeRequest.emit();
} }