@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
40 lines (39 loc) • 1.34 kB
TypeScript
import { KendoComponent } from '../_types/component';
export declare const LOADER_CLASSNAME = "k-loader";
export declare const LoaderAnimationMap: {
pulsing: string;
'infinite-spinner': string;
'converging-spinner': string;
};
declare const options: {
size: ("small" | "medium" | "large" | undefined)[];
themeColor: ("base" | "primary" | "secondary" | "tertiary" | undefined)[];
};
export type KendoLoaderOptions = {
size?: (typeof options.size)[number] | null;
themeColor?: (typeof options.themeColor)[number] | null;
};
export type KendoLoaderProps = KendoLoaderOptions & {
animation?: 'pulsing' | 'infinite-spinner' | 'converging-spinner';
};
/**
* Loader component - displays animated loading indicators.
*
* @accessibility
* - Uses `role="status"` to announce loading state to assistive technology
* - Uses `aria-label` to provide accessible name (default: "Loading")
* - The status role creates a live region that announces changes
*
* @example
* ```tsx
* // Basic loader with default label
* <Loader />
*
* // Custom accessible label
* <Loader aria-label="Loading user data" />
* ```
*
* @wcag 4.1.3 Status Messages - loading states announced via live region
*/
export declare const Loader: KendoComponent<KendoLoaderProps & React.HTMLAttributes<HTMLDivElement>>;
export default Loader;