import type { AsTag } from 'reka-ui'; /** * Three pulsing dots over a status message, with a secondary line that appears * only once the wait has gone on long enough to be worth explaining. * * Use it for waits the user is actively staring at — a payment being processed, * a bank redirect being prepared. For a plain indeterminate spinner with no * message, use `TSpinner`; for the legacy full-page overlay, `TLoading`. * * ## Layout is the consumer's job * * The component paints dots and centered text and nothing else — no backdrop, no * `position`, no `z-index`. Center it in a card or stretch it over a screen from * the outside. That is deliberate: the design renders identically inside a * desktop card and on a full-screen phone, so the surface belongs to whoever * mounts it. * * ## Announcements * * The root is a `role='status'` live region, so `message` is announced politely * and the dots are hidden from assistive tech. * * `hint` is deliberately announced too — "this is taking a while" is information a * screen reader user cannot get from watching the dots. Getting that *and* a * shift-free reveal takes some care: the line is in the DOM from mount so its box is * reserved, but while pending it is `aria-hidden` and `visibility: hidden`, so it is * silent and invisible. On reveal it is re-inserted as a fresh node (hence the `key`), * because a DOM insertion into a live region is the announcement trigger that * assistive tech supports most consistently — a visibility-only flip is not. * * Used bare, with no `message`, the region has nothing to announce: the dots are * decoration and hidden from assistive tech, so the loader is silent. That is fine * when something nearby already says what is happening; when it does not, pass an * `aria-label` — it falls through to the element carrying the role. */ export interface TLoadingDotsProps { /** Primary line under the dots. Also what the live region announces. */ message?: string; /** * Secondary line, revealed after `hintDelay`. Meant for reassurance on a slow * wait ("Esto puede tardar unos segundos…"), not for status that must be read * immediately — anything urgent belongs in `message`. */ hint?: string; /** * Milliseconds to wait before revealing `hint`. `0` shows it right away; * `false` never reveals it, which keeps `hint` addressable by a parent that * decides on its own when the wait became long. * @defaultValue 5000 */ hintDelay?: number | false; /** * Element the wrapper renders as. `'div'` suits a block of page; `'output'` * is worth considering when the loader reports the result of a form the user * just submitted. Every element this component renders inside the wrapper is * phrasing content, so `'output'` and other phrasing-only tags stay valid — * keep that in mind before swapping one for a block element in the slots. * @defaultValue 'div' */ as?: AsTag; } export interface TLoadingDotsSlots { /** Replaces the `message` line — for rich content such as an inline amount. */ message?: () => unknown; /** Replaces the `hint` line. Still governed by `hintDelay`. */ hint?: () => unknown; } declare const _default: typeof __VLS_export; export default _default; declare const __VLS_export: __VLS_WithSlots & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TLoadingDotsSlots>; type __VLS_WithSlots = T & { new (): { $slots: S; }; }; //# sourceMappingURL=TLoadingDots.vue.d.ts.map