@nimbus-ds/components 5.11.1-rc.3 → 5.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3401,6 +3401,92 @@ export interface SidebarProperties extends SidebarSprinkle {
3401
3401
  }
3402
3402
  export type SidebarProps = SidebarProperties & HTMLAttributes<HTMLDivElement>;
3403
3403
  export declare const Sidebar: React.FC<SidebarProps> & SidebarComponents;
3404
+ /**
3405
+ * Represents the visual state of a step
3406
+ */
3407
+ export type StepState = "completed" | "started" | "pending";
3408
+ export interface StepperItemProperties {
3409
+ /**
3410
+ * The step number (0-based index) for this item.
3411
+ * This is automatically assigned by the parent Stepper component.
3412
+ */
3413
+ step: number;
3414
+ /**
3415
+ * The label text to display for this step
3416
+ */
3417
+ label?: string;
3418
+ }
3419
+ export type StepperItemProps = StepperItemProperties & HTMLAttributes<HTMLDivElement>;
3420
+ export interface StepperCardProperties {
3421
+ /**
3422
+ * The content to be rendered inside the card container
3423
+ * @TJS-type React.ReactNode
3424
+ */
3425
+ children: ReactNode;
3426
+ }
3427
+ export type StepperCardProps = StepperCardProperties;
3428
+ export interface StepperComponents {
3429
+ Item: React.FC<Omit<StepperItemProps, "step">>;
3430
+ Card: React.FC<StepperCardProps>;
3431
+ }
3432
+ export interface BaseStepperProperties {
3433
+ /**
3434
+ * The currently active step (0-based index).
3435
+ * Steps before this will be marked as completed.
3436
+ */
3437
+ activeStep: number;
3438
+ /**
3439
+ * The content of the stepper (StepperItem components).
3440
+ * Total steps will be calculated automatically based on the number of children.
3441
+ * @TJS-type React.ReactNode
3442
+ */
3443
+ children: ReactNode;
3444
+ }
3445
+ export interface ControlledStepperProperties extends BaseStepperProperties {
3446
+ /**
3447
+ * The currently selected step (0-based index).
3448
+ * This step will be visually highlighted to show user selection.
3449
+ */
3450
+ selectedStep: number;
3451
+ /**
3452
+ * Callback called when a step is selected.
3453
+ * Receives the step number (0-based index) as parameter.
3454
+ */
3455
+ onSelectStep: (step: number) => void;
3456
+ }
3457
+ /**
3458
+ * Props for the Stepper component, supporting both controlled and uncontrolled modes
3459
+ */
3460
+ export type StepperProps = (BaseStepperProperties | ControlledStepperProperties) & Omit<BoxProps, "display" | "flexWrap" | "gap">;
3461
+ export type StepperProperties = BaseStepperProperties & ControlledStepperProperties;
3462
+ export declare const Stepper: React.FC<StepperProps> & StepperComponents;
3463
+ /**
3464
+ * Context value provided by StepperContext to share state between stepper components
3465
+ */
3466
+ export interface StepperContextValue {
3467
+ /**
3468
+ * The total number of steps in the stepper
3469
+ */
3470
+ totalSteps: number;
3471
+ /**
3472
+ * The currently active step (0-based index)
3473
+ */
3474
+ activeStep: number;
3475
+ /**
3476
+ * The currently selected step (0-based index)
3477
+ */
3478
+ selectedStep?: number;
3479
+ /**
3480
+ * Callback to handle step selection
3481
+ */
3482
+ onSelect?: (step: number) => void;
3483
+ }
3484
+ /**
3485
+ * Checks if the stepper is in controlled mode.
3486
+ * @param props - The props of the stepper
3487
+ * @returns True if the stepper is controlled, false otherwise
3488
+ */
3489
+ export declare const isControlled: (props: any) => props is ControlledStepperProperties;
3404
3490
  export interface TabsButtonProperties {
3405
3491
  /**
3406
3492
  * Label of the tab button.