import { IconComponent } from '@consta/icons/Icon'; import React from 'react'; import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes'; export declare const progressStepBarPropSize: readonly ["s", "xs", "m"]; export type ProgressStepBarPropSize = (typeof progressStepBarPropSize)[number]; export declare const progressStepBarPropSizeDefault: "s"; export declare const progressStepBarPropDirection: readonly ["horizontal", "vertical"]; export type ProgressStepBarPropDirection = (typeof progressStepBarPropDirection)[number]; export declare const progressStepBarPropDirectionDefault: "horizontal"; export declare const progressStepBarPropStatus: readonly ["normal", "success", "warning", "alert"]; export type ProgressStepBarPropStatus = (typeof progressStepBarPropStatus)[number]; export declare const progressStepBarPropStatusDefault: "normal"; export declare const progressStepBarPointNumbersMap: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; export type ProgressStepBarPointNumbersMap = (typeof progressStepBarPointNumbersMap)[number]; export declare const progressStepBarPropPosition: readonly ["center", "start", "end"]; export type ProgressStepBarPropPosition = (typeof progressStepBarPropPosition)[number]; export declare const progressStepBarPropPositionDefault: ProgressStepBarPropPosition; export type ProgressStepBarPropGetItemLabel = (item: ITEM) => string | undefined; export type ProgressStepBarPropGetItemKey = (item: ITEM) => string | number; export type ProgressStepBarPropGetItemTooltipContent = (item: ITEM) => string | undefined; export type ProgressStepBarPropGetItemLineStatus = (item: ITEM) => ProgressStepBarPropStatus | undefined; export type ProgressStepBarPropGetItemPoint = (item: ITEM) => ProgressStepBarPointNumbersMap | IconComponent | undefined; export type ProgressStepBarPropGetItemProgress = (item: ITEM) => boolean | undefined; export type ProgressStepBarPropGetItemContent = (item: ITEM) => React.ReactNode | undefined; export type ProgressStepBarPropGetItemStatus = (item: ITEM) => ProgressStepBarPropStatus | undefined; export type ProgressStepBarPropGetItemOnClick = (item: ITEM) => React.EventHandler | undefined; export type ProgressStepBarItemDefault = { label?: string; tooltipContent?: string; lineStatus?: ProgressStepBarPropStatus; point?: ProgressStepBarPointNumbersMap | IconComponent; status?: ProgressStepBarPropStatus; progress?: boolean; content?: React.ReactNode; onClick?: React.EventHandler; }; export type Line = { status: ProgressStepBarPropStatus; size: number; }; export type ProgressStepBarPropOnItemClick = (item: ITEM, props: { e: React.MouseEvent; index: number; }) => void; export type ProgressStepBarProps = PropsWithHTMLAttributesAndRef<{ steps: ITEM[]; direction?: ProgressStepBarPropDirection; size?: ProgressStepBarPropSize; activeStepIndex?: number; onItemClick?: ProgressStepBarPropOnItemClick; getItemLabel?: ProgressStepBarPropGetItemLabel; getItemLineStatus?: ProgressStepBarPropGetItemLineStatus; getItemTooltipContent?: ProgressStepBarPropGetItemTooltipContent; getItemPoint?: ProgressStepBarPropGetItemPoint; getItemProgress?: ProgressStepBarPropGetItemProgress; getItemContent?: ProgressStepBarPropGetItemContent; getItemStatus?: ProgressStepBarPropGetItemStatus; getItemOnClick?: ProgressStepBarPropGetItemOnClick; }, HTMLDivElement> & (ITEM extends { label: ProgressStepBarItemDefault['label']; } ? {} : { getItemLabel: ProgressStepBarPropGetItemLabel; }); export type ProgressStepBarItemProps = { content?: React.ReactNode; label?: string; point?: ProgressStepBarPointNumbersMap | IconComponent; progress?: boolean; status?: ProgressStepBarPropStatus | 'system'; tooltipContent?: string; tooltipZIndex?: number; position?: ProgressStepBarPropPosition; direction: ProgressStepBarPropDirection; size: ProgressStepBarPropSize; onClick?: (e: React.MouseEvent) => void; pointRef?: React.RefObject; className?: string; }; export declare const cnProgressStepBar: import("@bem-react/classname").ClassNameFormatter; export declare const defaultGetItemLabel: ProgressStepBarPropGetItemLabel; export declare const defaultGetItemTooltipContent: ProgressStepBarPropGetItemTooltipContent; export declare const defaultGetItemPoint: ProgressStepBarPropGetItemPoint; export declare const defaultGetItemLineStatus: ProgressStepBarPropGetItemLineStatus; export declare const defaultGetItemProgress: ProgressStepBarPropGetItemProgress; export declare const defaultGetItemContent: ProgressStepBarPropGetItemContent; export declare const defaultGetItemStatus: ProgressStepBarPropGetItemStatus; export declare const defaultGetItemOnClick: ProgressStepBarPropGetItemOnClick; export type ProgressStepBarComponent = (props: ProgressStepBarProps) => React.ReactNode | null; export type ProgressStepBarItemComponent = (props: PropsWithHTMLAttributesAndRef) => React.ReactNode | null; export declare function withDefaultGetters(props: ProgressStepBarProps): { steps: ITEM[]; direction?: ProgressStepBarPropDirection; size?: ProgressStepBarPropSize; activeStepIndex?: number; onItemClick?: ProgressStepBarPropOnItemClick | undefined; getItemLabel?: ProgressStepBarPropGetItemLabel | undefined; getItemLineStatus?: ProgressStepBarPropGetItemLineStatus | undefined; getItemTooltipContent?: ProgressStepBarPropGetItemTooltipContent | undefined; getItemPoint?: ProgressStepBarPropGetItemPoint | undefined; getItemProgress?: ProgressStepBarPropGetItemProgress | undefined; getItemContent?: ProgressStepBarPropGetItemContent | undefined; getItemStatus?: ProgressStepBarPropGetItemStatus | undefined; getItemOnClick?: ProgressStepBarPropGetItemOnClick | undefined; } & Omit, "css" | "size" | "getItemLabel" | "getItemStatus" | "getItemProgress" | "direction" | "onItemClick" | "getItemOnClick" | "getItemContent" | "steps" | "activeStepIndex" | "getItemLineStatus" | "getItemTooltipContent" | "getItemPoint"> & React.RefAttributes & (ITEM extends { label: ProgressStepBarItemDefault["label"]; } ? {} : { getItemLabel: ProgressStepBarPropGetItemLabel; }) & { getItemLabel: ProgressStepBarPropGetItemLabel | ProgressStepBarPropGetItemLabel; getItemTooltipContent: ProgressStepBarPropGetItemTooltipContent | ProgressStepBarPropGetItemTooltipContent; getItemPoint: ProgressStepBarPropGetItemPoint | ProgressStepBarPropGetItemPoint; getItemProgress: ProgressStepBarPropGetItemProgress | ProgressStepBarPropGetItemProgress; getItemContent: ProgressStepBarPropGetItemContent | ProgressStepBarPropGetItemContent; getItemStatus: ProgressStepBarPropGetItemStatus | ProgressStepBarPropGetItemStatus; getItemLineStatus: ProgressStepBarPropGetItemLineStatus | ProgressStepBarPropGetItemLineStatus; getItemOnClick: ProgressStepBarPropGetItemOnClick | ProgressStepBarPropGetItemOnClick; }; export declare const getItemPosition: (index: number, length: number) => "center" | "start" | "end"; export declare const calculateLines: (refs: React.RefObject[], direction: ProgressStepBarPropDirection) => number[]; export declare const validateVisibleIndex: (length: number, index: number | undefined) => number | undefined;