import { UiElement } from '../shared/element.js'; /** * Carbon `Loading`: the 88px spinner (`small`: 16px with a grey track). With `overlay` it covers * the page (fixed, Carbon `overlay` colour), traps focus while `active` and gives focus back * afterwards — use it while a whole view is unavailable; prefer `` next to * a button. Set `active` to false to stop and hide it (the element stays in the DOM). * * Beyond Carbon: `contained` wraps an area (a card, a table) instead of the page — while active the * overlay covers just that box and its content is inert and `aria-busy`; the rest of the page stays * usable, and focus that was inside waits on the spinner, then goes back. `delay` (ms) shows it only * if the work is still going after that long and `min-duration` (ms) keeps it up at least that long * once shown, so quick work never flashes a spinner. * * State on the host for styling: `data-shown` while the spinner actually shows (`active`, after `delay`, held for * `min-duration`), where `[active]` is only the request. * * @cssstate shown - While the spinner actually shows (after `delay`, held for `min-duration`) (also `[data-shown]`) * @slot - The area `contained` covers * @csspart base - The spinner wrapper (`aria-live`) * @csspart overlay - The page overlay (`overlay`), or the area's (`contained`) * @csspart area - The covered content (`contained`) * @csspart spinner - The `` */ export declare class UiLoading extends UiElement { static hostStates: readonly string[]; static readonly styles: import("lit").CSSResult; /** On by default; `active="false"` stops it. */ active: boolean; small: boolean; /** Cover the page and trap focus while active. */ overlay: boolean; /** Accessible description; defaults to the translation ("Loading"). */ description: string; /** Cover just this element's content (the slot) instead of the page; the content is inert while active (no Carbon counterpart). */ contained: boolean; /** Milliseconds `active` must last before the spinner shows (default 0, as Carbon). */ delay: number; /** Once shown, the least milliseconds it stays (default 0). */ minDuration: number; /** Showing now: `active`, after `delay`, held for `min-duration`. */ private shown; private spin?; private readonly focusTarget; private readonly localize; private previouslyFocused; private trapping; /** Where focus moves are watched: the document, and the shadow root this element sits in (a focus move inside one never reaches the document). */ private scopes; connectedCallback(): void; disconnectedCallback(): void; protected willUpdate(changed: Map): void; protected updated(changed: Map): void; /** `contained`: focus that was in the area waits on the spinner (the area is inert), then goes back. */ private areaFocus; /** In the covered content (light DOM, across its shadow roots), not in this element's own parts. */ private inArea; private holdArea; private releaseArea; private get text(); /** Carbon: focus stays on the overlay (Tab, programmatic focus) until it goes away; modals layered above are left alone. */ private startTrap; private stopTrap; private isLayeredOnTop; private readonly onFocusIn; private readonly onKeydown; private renderSpinner; render(): import("lit-html").TemplateResult<1>; /** The area, inert and busy while shown, under its own overlay. */ private renderContained; } declare global { interface HTMLElementTagNameMap { 'ui-loading': UiLoading; } }