@sc4rfurryx/proteusjs
Version:
The Modern Web Development Framework for Accessible, Responsive, and High-Performance Applications. Intelligent container queries, fluid typography, WCAG compliance, and performance optimization.
37 lines (35 loc) • 1.05 kB
TypeScript
/**
* @sc4rfurryx/proteusjs/a11y-primitives
* Lightweight accessibility patterns
*
* @version 2.0.0
* @author sc4rfurry
* @license MIT
*/
interface Controller {
destroy(): void;
}
interface DialogOptions {
modal?: boolean;
restoreFocus?: boolean;
}
interface TooltipOptions {
delay?: number;
placement?: 'top' | 'bottom' | 'left' | 'right';
}
interface FocusTrapController {
activate(): void;
deactivate(): void;
}
declare function dialog(root: Element | string, opts?: DialogOptions): Controller;
declare function tooltip(trigger: Element, content: HTMLElement, opts?: TooltipOptions): Controller;
declare function focusTrap(container: Element): FocusTrapController;
declare function menu(container: Element): Controller;
declare const _default: {
dialog: typeof dialog;
tooltip: typeof tooltip;
focusTrap: typeof focusTrap;
menu: typeof menu;
};
export { _default as default, dialog, focusTrap, menu, tooltip };
export type { Controller, DialogOptions, FocusTrapController, TooltipOptions };