type Props = { /** Size preset (14 / 20 / 32 px). @default 'md' */ size?: 'sm' | 'md' | 'lg'; /** Color preset. Omit to fall through to the default (`accent`). */ color?: 'accent' | 'muted' | 'success' | 'warning' | 'danger' | 'text' | 'on-accent'; /** Screen-reader label. When set, the spinner becomes a live status region (`role="status"`); when omitted, the spinner is decorative (`aria-hidden`). */ label?: string; /** Centering mode. `absolute-center` centers within the closest positioned ancestor; `fixed-center` centers in the viewport. Omit for an inline-flex glyph at the current position. */ position?: 'absolute-center' | 'fixed-center'; /** Renders an overlay that swallows pointer input immediately, independent of `timeout`; it stays invisible until `timeout` elapses, then fades to its dim background. Pair with `position` for a full-area dimmer. */ blocking?: boolean; /** Delay in ms before the spinner becomes visible (and a `blocking` overlay dims). Prevents flicker for fast operations. @default 0 */ timeout?: number; }; /** * Spinner — indeterminate loading indicator. Single-arc circle rotating at a constant rate. Color preset (`accent` default) resolves to a semantic token; override the public CSS vars on any ancestor for global theming. Pass `label` to expose it to screen readers as a live status region. * * Convenience props for the common "load happens, show a centered spinner with optional dimmer" pattern: `position` centers it within the nearest positioned ancestor (`absolute-center`) or the viewport (`fixed-center`); `blocking` adds an overlay; `timeout` delays visibility to avoid flicker for fast operations. * * `blocking` and `timeout` are orthogonal. The overlay mounts with the component and swallows pointer input from the first millisecond regardless of `timeout`; once `timeout` elapses the spinner appears and the overlay fades to its dim background. Pointer input only — a focused control underneath still reacts to the keyboard; wrap the region in `inert` if that matters. * * For tight inline glyphs inside other kit cmps (Button loading state, async Select), use the internal `_internal/spinner` instead — that one fills its inline box and inherits `currentColor` for stroke. * * ### CSS Custom Properties * | Property | Description | Default | * |---|---|---| * | `--sc-kit--spinner--size` | Outer box size | per `size` preset | * | `--sc-kit--spinner--color` | Stroke color | `--sc-kit--color--accent` | * | `--sc-kit--spinner--color-accent` | Color for `accent` preset | `--sc-kit--color--accent` | * | `--sc-kit--spinner--color-muted` | Color for `muted` preset | `--sc-kit--color--text--muted` | * | `--sc-kit--spinner--color-success` | Color for `success` preset | `--sc-kit--color--success` | * | `--sc-kit--spinner--color-warning` | Color for `warning` preset | `--sc-kit--color--warning` | * | `--sc-kit--spinner--color-danger` | Color for `danger` preset | `--sc-kit--color--danger` | * | `--sc-kit--spinner--color-text` | Color for `text` preset | `--sc-kit--color--text--primary` | * | `--sc-kit--spinner--color-on-accent` | Color for `on-accent` preset | `--sc-kit--color--text--on-accent` | * | `--sc-kit--spinner--duration` | Rotation duration | `1.6s` | * | `--sc-kit--spinner--overlay--background` | Backdrop color the `blocking` overlay fades to once the spinner shows | `rgba(0, 0, 0, 0.3)` | * | `--sc-kit--spinner--overlay--z-index` | Backdrop stacking | `--sc-kit--z-index--popover` minus 1 | * * ### Size presets * | Class | `--sc-kit--spinner--size` | * |---|---| * | `spinner--sm` | `0.875rem` (14px) | * | `spinner--md` | `1.25rem` (20px) | * | `spinner--lg` | `2rem` (32px) | */ declare const Cmp: import("svelte").Component; type Cmp = ReturnType; export default Cmp;