import type { HTMLAttributes } from "react"; import type { PopoverProps } from "../Popover/Popover"; export type ValuesVariant = "success" | "warning" | "alert"; export type StyleVariant = ValuesVariant | "empty"; export type Value = number; export type ProgressBarWeight = "thin" | "fat"; export type SegmentedProgressBarProps = { /** The value for 100% progress. Consumer does not need to do percentage calculation. * Just pass this number and some values. The progress bar does all percentage calculations */ maxValue: number; /** The values already progressed. Possible ValuesVariants are used to display progress in a different color. * Variants are: * success => green; * warning => yellow; * alert => red */ values: Partial>; squareCorners?: boolean; weight?: ProgressBarWeight; /** Optional function to customize tooltip text for each segment. Receives an object with percentage and variant. */ getTooltipText?: (params: { percentage: number; variant: StyleVariant; }) => string; tooltipProps?: { triggerAriaLabel?: string; portalContainer?: PopoverProps["portalContainer"]; }; privateProps?: SegmentedProgressBarPrivateProps; "data-e2e-test-id"?: string; } & HTMLAttributes; export type SegmentedProgressBarPrivateProps = { monochrome?: boolean; }; export type SegmentProps = { styleVariant: ValuesVariant; percentage: number; monochrome: boolean; filledPercentage: number; squareCorners?: boolean; "data-e2e-test-id"?: string; };