feat(shared-ui): add focusTrap action and apply to shared Modal

Create reusable Svelte action for focus trapping in modals/dialogs.
Traps Tab/Shift+Tab within element and restores focus on destroy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-24 10:04:04 +01:00
parent 8bc52f4264
commit c27f6f88f0
4 changed files with 75 additions and 0 deletions

View file

@ -218,3 +218,6 @@ export type {
GlobalErrorHandlerOptions,
GlobalErrorHandlerTranslations,
} from './toast';
// Actions
export { focusTrap } from './actions';