UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

82 lines (74 loc) 3.15 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ComponentPropsWithRef, PropsWithChildren, ReactNode, ComponentPropsWithoutRef } from 'react'; import * as class_variance_authority_types from 'class-variance-authority/types'; import { VariantProps } from 'class-variance-authority'; declare const stepIndicatorVariant: (props?: ({ size?: "sm" | "md" | "lg" | null | undefined; intent?: "main" | "basic" | "support" | "neutral" | "info" | "accent" | "danger" | "alert" | "success" | null | undefined; design?: "outline" | "tinted" | null | undefined; state?: "complete" | "incomplete" | "active" | null | undefined; } & class_variance_authority_types.ClassProp) | undefined) => string; type StepIndicatorVariantProps = VariantProps<typeof stepIndicatorVariant>; interface ProgressTrackerProps extends ComponentPropsWithRef<'div'>, Pick<StepIndicatorVariantProps, 'size' | 'intent' | 'design'> { /** * The orientation of the progress tracker * @default 'horizontal" */ orientation?: 'horizontal' | 'vertical'; /** * The index of the current step. * @default 0 */ stepIndex?: number; /** * Event handler called when clicking on a step. */ onStepClick?: (stepIndex: number) => void; /** * Sets the component as interactive or not. * @default false */ readOnly?: boolean; } declare const ProgressTracker$1: { ({ stepIndex, onStepClick, readOnly, intent, size, design, orientation, children, className, ref, ...rest }: PropsWithChildren<ProgressTrackerProps>): react_jsx_runtime.JSX.Element; displayName: string; }; type ProgressTrackerStepProps = ComponentPropsWithRef<'li'> & ({ disabled?: boolean; children: ReactNode; } | { disabled?: boolean; 'aria-label': string; }); declare const ProgressTrackerStep: { ({ disabled, children, "aria-label": ariaLabel, className, ref, ...rest }: ProgressTrackerStepProps): react_jsx_runtime.JSX.Element; displayName: string; }; type ProgressTrackerStepIndicatorProps = ComponentPropsWithoutRef<'span'> & { /** * The content to be rendered when step status is complete (checkmark icon by default) */ complete?: ReactNode; /** * The content to be rendered when step status is incomplete (step index by default) */ incomplete?: ReactNode; }; declare const ProgressTrackerStepIndicator: { ({ complete, incomplete, className, }: ProgressTrackerStepIndicatorProps): react_jsx_runtime.JSX.Element; displayName: string; }; type ProgressTrackerStepLabelProps = ComponentPropsWithoutRef<'span'> & { children: ReactNode; }; declare const ProgressTrackerStepLabel: { ({ className, children, }: ProgressTrackerStepLabelProps): react_jsx_runtime.JSX.Element; displayName: string; }; declare const ProgressTracker: typeof ProgressTracker$1 & { Step: typeof ProgressTrackerStep; StepLabel: typeof ProgressTrackerStepLabel; StepIndicator: typeof ProgressTrackerStepIndicator; }; export { ProgressTracker, type ProgressTrackerProps, type ProgressTrackerStepIndicatorProps, type ProgressTrackerStepProps };