ui-mathilde-web 0.3.4 → 0.3.5

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.
@@ -111,6 +111,7 @@ declare interface DateRangePickerProps {
111
111
  minData?: Date;
112
112
  maxData?: Date;
113
113
  quickRanges?: QuickRange[];
114
+ className?: string;
114
115
  }
115
116
 
116
117
  export declare const DropdownButton: ({ label, dismissOnClick, items, size, className, styles, mode, columns, onSelectionChange, selectedItems, activeChevron, icon, iconSize, }: DropdownProps) => JSX_2.Element;
@@ -274,7 +275,7 @@ declare interface QuickRange {
274
275
  };
275
276
  }
276
277
 
277
- export declare const RadioButton: ({ options, classNameRadio, classNameLabel }: RadioButtonProps) => JSX_2.Element;
278
+ export declare const RadioButton: ({ options, classNameRadio, classNameLabel, onChange }: RadioButtonProps) => JSX_2.Element;
278
279
 
279
280
  declare interface RadioButtonOption {
280
281
  id: string;
@@ -288,7 +289,7 @@ declare interface RadioButtonProps {
288
289
  label?: string;
289
290
  options: RadioButtonOption[];
290
291
  disabled?: boolean;
291
- onChange?: (value: string) => void;
292
+ onChange?: () => void;
292
293
  classNameRadio?: string;
293
294
  classNameLabel?: string;
294
295
  className?: string;
@@ -340,14 +341,40 @@ declare interface SpinnerProps {
340
341
  description?: string;
341
342
  }
342
343
 
343
- export declare const Stepper: ({ steps }: StepperProps) => JSX_2.Element;
344
+ declare interface StepDefinition {
345
+ title: string;
346
+ description?: string;
347
+ content?: React.ReactNode;
348
+ }
349
+
350
+ export declare const Stepper: ({ steps, initialStep, activeStep: controlledActiveStep, onStepChange, renderControls, onNext, onBack, onFinish, }: StepperProps) => JSX_2.Element;
344
351
 
345
352
  declare interface StepperProps {
346
- steps: {
347
- title: string;
348
- description: string;
349
- status: 'completed' | 'current' | 'pending';
350
- }[];
353
+ steps: StepDefinition[];
354
+ /** Inicializa el paso cuando el componente funciona en modo no controlado */
355
+ initialStep?: number;
356
+ /** Modo controlado: el front proporciona `activeStep` y actualiza mediante `onStepChange` */
357
+ activeStep?: number;
358
+ /** Cuando el usuario solicita cambiar de paso (controlado). El front decide si acepta o no el cambio. */
359
+ onStepChange?: (newStep: number) => void;
360
+ /** Callbacks informativos (opcionales). No cambian el comportamiento interno en modo controlado. */
361
+ onNext?: () => void;
362
+ onBack?: () => void;
363
+ onFinish?: () => void;
364
+ /**
365
+ * Render prop para controlar completamente la UI de controles (botones).
366
+ * Si se proporciona, el Stepper llamará a esta función con una colección de helpers
367
+ * (next, back, goToStep, flags) y renderizará lo que el parent devuelva.
368
+ */
369
+ renderControls?: (controls: {
370
+ activeStep: number;
371
+ stepsLength: number;
372
+ isFirst: boolean;
373
+ isLast: boolean;
374
+ next: () => void;
375
+ back: () => void;
376
+ goToStep: (n: number) => void;
377
+ }) => React.ReactNode;
351
378
  }
352
379
 
353
380
  declare interface SubMenuSection {