@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
58 lines (57 loc) • 2.81 kB
TypeScript
import type { ReactNode } from 'react';
import type { OnStepChange, StepIndex } from '../Context/types';
import type { ComponentProps } from '../../types';
export type WizardContainerProps = ComponentProps & {
id?: string;
/**
* How to show the wizard. Inherited from StepIndicator. Defaults to `strict`.
*/
mode?: 'static' | 'strict' | 'loose';
/**
* If set to `true`, the wizard will not scroll to the first step when the user navigates to a different step.
*/
omitScrollManagement?: boolean;
/**
* If set to `true`, the wizard will not set focus on the next step when the user navigates to a different step.
*/
omitFocusManagement?: boolean;
/**
* What step should show initially (defaults to `0` for the first one).
*/
initialActiveIndex?: StepIndex;
/**
* Will be called when the user navigates to a different step, with step `index` as the first argument and `previous` or `next` (or `stepListModified` when a step gets replaced) as the second argument, and as the third parameter an options object containing `totalSteps`, a `preventNavigation` function, an `id` if given on the `Wizard.Step` and a `previousStep` object containing the previous `index` (and `id` if given on the `Wizard.Step`). When an async function is provided, it will show an indicator on the submit button during the form submission. All form elements will be disabled during the submit. The indicator will be shown for a minimum of 1 second. Related Form.Handler properties: `minimumAsyncBehaviorTime` and `asyncSubmitTimeout`.
*/
onStepChange?: OnStepChange;
/**
* If set to `true`, the height animation on step change and list expansion will be omitted. Inherited from StepIndicator. Defaults to `false`.
*/
noAnimation?: boolean;
/**
* Set to `true` to have the list be expanded initially. Defaults to `false`.
*/
expandedInitially?: boolean;
/**
* Determines if all steps should be kept in the DOM. Defaults to `false`.
*/
keepInDOM?: boolean;
/**
* Whether or not to break out (using negative margins) on larger screens. Same as `outset` in [Card](/uilib/components/card/properties). But defaults to `true`.
*/
outset?: boolean;
/**
* If set to `true`, the wizard pre-render all steps so the props of each field is available in the data context.
* Defaults to `true`.
*/
prerenderFieldProps?: boolean;
/**
* Determines if and how the validation will be bypassed.
*/
validationMode?: 'bypassOnNavigation';
/**
* Contents (Step components).
*/
children: ReactNode;
};
declare function WizardContainer(props: WizardContainerProps): import("react/jsx-runtime").JSX.Element;
export default WizardContainer;