diff --git a/apps/website/pages/components/wizard/code.tsx b/apps/website/pages/components/wizard/code.tsx
new file mode 100644
index 0000000000..f3430b8f11
--- /dev/null
+++ b/apps/website/pages/components/wizard/code.tsx
@@ -0,0 +1,17 @@
+import Head from "next/head";
+import type { ReactElement } from "react";
+import WizardPageLayout from "screens/components/wizard/WizardPageLayout";
+import WizardCodePage from "screens/components/wizard/code/WizardCodePage";
+
+const Code = () => (
+ <>
+
+ Wizard code — Halstack Design System
+
+
+ >
+);
+
+Code.getLayout = (page: ReactElement) => {page};
+
+export default Code;
diff --git a/apps/website/pages/components/wizard/index.tsx b/apps/website/pages/components/wizard/index.tsx
index f8f803289e..d4e5c6f311 100644
--- a/apps/website/pages/components/wizard/index.tsx
+++ b/apps/website/pages/components/wizard/index.tsx
@@ -1,21 +1,17 @@
import Head from "next/head";
import type { ReactElement } from "react";
import WizardPageLayout from "screens/components/wizard/WizardPageLayout";
-import WizardCodePage from "screens/components/wizard/code/WizardCodePage";
+import WizardOverviewPage from "screens/components/wizard/overview/WizardOverviewPage";
-const Index = () => {
- return (
- <>
-
- Wizard — Halstack Design System
-
-
- >
- );
-};
+const Index = () => (
+ <>
+
+ Wizard — Halstack Design System
+
+
+ >
+);
-Index.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
+Index.getLayout = (page: ReactElement) => {page};
export default Index;
diff --git a/apps/website/pages/components/wizard/specifications.tsx b/apps/website/pages/components/wizard/specifications.tsx
deleted file mode 100644
index 310adc86f0..0000000000
--- a/apps/website/pages/components/wizard/specifications.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import Head from "next/head";
-import type { ReactElement } from "react";
-import WizardPageLayout from "screens/components/wizard/WizardPageLayout";
-import WizardSpecsPage from "screens/components/wizard/specs/WizardSpecsPage";
-
-const Specifications = () => {
- return (
- <>
-
- Wizard Specs — Halstack Design System
-
-
- >
- );
-};
-
-Specifications.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
-
-export default Specifications;
diff --git a/apps/website/pages/components/wizard/usage.tsx b/apps/website/pages/components/wizard/usage.tsx
deleted file mode 100644
index 551fd09e34..0000000000
--- a/apps/website/pages/components/wizard/usage.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import Head from "next/head";
-import type { ReactElement } from "react";
-import WizardPageLayout from "screens/components/wizard/WizardPageLayout";
-import WizardUsagePage from "screens/components/wizard/usage/WizardUsagePage";
-
-const Usage = () => {
- return (
- <>
-
- Wizard Usage — Halstack Design System
-
-
- >
- );
-};
-
-Usage.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
-
-export default Usage;
diff --git a/apps/website/screens/components/wizard/WizardPageLayout.tsx b/apps/website/screens/components/wizard/WizardPageLayout.tsx
index fef897a481..b296958789 100644
--- a/apps/website/screens/components/wizard/WizardPageLayout.tsx
+++ b/apps/website/screens/components/wizard/WizardPageLayout.tsx
@@ -6,9 +6,8 @@ import { ReactNode } from "react";
const WizardPageHeading = ({ children }: { children: ReactNode }) => {
const tabs = [
- { label: "Code", path: "/components/wizard" },
- { label: "Usage", path: "/components/wizard/usage" },
- { label: "Specifications", path: "/components/wizard/specifications" },
+ { label: "Overview", path: "/components/wizard" },
+ { label: "Code", path: "/components/wizard/code" },
];
return (
@@ -21,7 +20,7 @@ const WizardPageHeading = ({ children }: { children: ReactNode }) => {
with several bullet points where the user need to interact with the content of each step during the
workflow.
-
+
{children}
diff --git a/apps/website/screens/components/wizard/code/WizardCodePage.tsx b/apps/website/screens/components/wizard/code/WizardCodePage.tsx
index acb4d9f9bb..e06612bbba 100644
--- a/apps/website/screens/components/wizard/code/WizardCodePage.tsx
+++ b/apps/website/screens/components/wizard/code/WizardCodePage.tsx
@@ -7,9 +7,19 @@ import Example from "@/common/example/Example";
import controlled from "./examples/controlled";
import uncontrolled from "./examples/uncontrolled";
import icons from "./examples/icons";
-import TableCode from "@/common/TableCode";
+import TableCode, { ExtendedTableCode } from "@/common/TableCode";
import StatusBadge from "@/common/StatusBadge";
+const stepsType = `{
+ label: string;
+ description?: string;
+ disabled?: boolean;
+ icon?: string |
+ (React.ReactNode &
+ React.SVGProps);
+ valid?: boolean;
+}[]`;
+
const sections = [
{
title: "Props",
@@ -24,6 +34,17 @@ const sections = [
+
+
currentStep
+
+ number
+
+
+ Defines which step is marked as the current. The numeration starts at 0. If undefined, the component will
+ be uncontrolled and the step will be managed internally by the component.
+
- Defines which step is marked as the current. The numeration starts at 0. If undefined, the component will
- be uncontrolled and the step will be managed internally by the component.
+ Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
+ 'right' properties in order to specify different margin sizes.
- Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
- 'right' properties in order to specify different margin sizes.
-
-
-
-
tabIndex
@@ -151,15 +157,13 @@ const sections = [
},
];
-const WizardCodePage = () => {
- return (
-
-
-
-
-
-
- );
-};
+const WizardCodePage = () => (
+
+
+
+
+
+
+);
export default WizardCodePage;
diff --git a/apps/website/screens/components/wizard/code/examples/controlled.ts b/apps/website/screens/components/wizard/code/examples/controlled.ts
index f8cbbba02c..8a129f92f3 100644
--- a/apps/website/screens/components/wizard/code/examples/controlled.ts
+++ b/apps/website/screens/components/wizard/code/examples/controlled.ts
@@ -19,7 +19,7 @@ const code = `() => {
},
{
label: "Policy",
- valid: true,
+ valid: false,
},
{
label: "Payment",
diff --git a/apps/website/screens/components/wizard/overview/WizardOverviewPage.tsx b/apps/website/screens/components/wizard/overview/WizardOverviewPage.tsx
new file mode 100644
index 0000000000..1e7fc62694
--- /dev/null
+++ b/apps/website/screens/components/wizard/overview/WizardOverviewPage.tsx
@@ -0,0 +1,198 @@
+import { DxcParagraph, DxcBulletedList, DxcFlex } from "@dxc-technology/halstack-react";
+import QuickNavContainer from "@/common/QuickNavContainer";
+import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
+import DocFooter from "@/common/DocFooter";
+import Example from "@/common/example/Example";
+import description from "./examples/description";
+import anatomy from "./images/wizard_anatomy.png";
+import Image from "@/common/Image";
+import vertical from "./examples/vertical";
+import horizontal from "./examples/horizontal";
+import stepNavigation from "./examples/stepNavigation";
+import linearNonLinear from "./examples/linearNonLinear";
+import validation from "./examples/validation";
+
+const sections = [
+ {
+ title: "Introduction",
+ content: (
+
+ The wizard component helps users navigate through multi-step processes in a structured and guided manner. It
+ breaks down complex workflows into manageable steps, improving clarity and reducing cognitive load.{" "}
+ Each step represents a key stage of the process, allowing users to track progress and move
+ forward or backward as needed. Wizards are commonly used in forms, onboarding flows, and setup configurations
+ where sequential input is required.
+
+ ),
+ },
+ {
+ title: "Anatomy",
+ content: (
+ <>
+
+
+
+ Step: represents an individual stage in the wizard navigation. Each step corresponds to a
+ specific section of a multi-step process, guiding the user progressively through a flow.
+
+
+ Label: a descriptive title for the step that provides users with a clear understanding of
+ the content or action required at that stage.
+
+
+ Separator: a visual connector between steps that indicates the sequence and relationship
+ between them, reinforcing the step-by-step progression.
+
+
+ Step validator: a status indicator (checkmark or error icon) that provides feedback on
+ whether the step has been successfully completed or requires attention.
+
+
+ Description: an optional text displayed alongside a step to offer additional guidance,
+ clarifications, or instructions, ensuring users understand the requirements before proceeding.
+
+
+ >
+ ),
+ },
+ {
+ title: "Key interactions and features",
+ content: (
+
+ To better understand the wizard component and its possible use cases when working with a form, it's important to
+ review its key characteristics and interactions.
+
+ ),
+ subSections: [
+ {
+ title: "Step navigation",
+ content: (
+ <>
+
+ Users progress through the wizard by clicking on steps, using navigation buttons, or interacting with the
+ interface if direct access to steps is enabled. Navigation can be controlled based on the form's
+ requirements, preventing users from skipping essential steps when necessary.
+
+
+ >
+ ),
+ },
+ {
+ title: "Linear vs. Non-Linear Flow",
+ content: (
+ <>
+
+ Wizards can follow a linear approach, where users must complete each step in sequence
+ before proceeding, or a non-linear approach, which allows free movement between steps.
+ The choice depends on the complexity of the process and whether dependencies exist between steps.
+
+
+ >
+ ),
+ },
+ {
+ title: "Step validation",
+ content: (
+ <>
+
+ There may be scenarios where the content of a step needs to be validated while the user is filling in
+ fields or performing relevant actions within each step of the wizard. In such cases, a validation mark can
+ be displayed on each step once the user progresses to the next one. This mark will indicate the validation
+ status of the content, showing either a success or error mark on the step.
+
+
+ >
+ ),
+ },
+ {
+ title: "Optional description and icons",
+ content: (
+ <>
+
+ Each step can include description or validation icons to provide context and feedback.
+
+
+ >
+ ),
+ },
+ ],
+ },
+ {
+ title: "Variants",
+ content: (
+
+ The wizard component has two variants depending on its orientation: horizontal and vertical.
+
+ ),
+ subSections: [
+ {
+ title: "Horizontal",
+ content: (
+ <>
+
+ The horizontal variant of the wizard is suitable for workflows where space is available
+ horizontally, making it ideal for tasks like multi-step forms and progress tracking. For example, setting
+ up a user account with several steps.
+
+
+ >
+ ),
+ },
+ {
+ title: "Vertical",
+ content: (
+ <>
+
+ The vertical variant works well when horizontal space is limited, often used in scenarios
+ like long forms or detailed steps in a process. An example could be an onboarding process with in-depth
+ configuration options.
+
+
+ >
+ ),
+ },
+ ],
+ },
+ {
+ title: "Best practices",
+ content: (
+
+
+ Keep steps clear and logical: ensure that each step represents a meaningful part of the
+ process, following a natural order that users can easily follow.
+
+
+ Use concise and descriptive labels: step labels should clearly indicate the purpose of each
+ step to help users understand where they are in the process.
+
+
+ Provide real-time validation: if validation is required before moving forward, display clear
+ and immediate error messages to help users correct mistakes.
+
+
+ Indicate progress visually: use clear indicators to show the user's current step, completed
+ steps, and upcoming steps to enhance orientation and usability.
+
+
+ Confirm before final submission: if the wizard leads to an irreversible action (e.g.,
+ submitting an application), provide a review step where users can check and edit their inputs.
+
+
+ Choose the right layout: use the horizontal variant for processes with a small number of
+ steps and the vertical variant for complex flows with long step descriptions.
+
+
+ ),
+ },
+];
+
+const WizardOverviewPage = () => (
+
+
+
+
+
+
+);
+
+export default WizardOverviewPage;
diff --git a/apps/website/screens/components/wizard/overview/examples/description.ts b/apps/website/screens/components/wizard/overview/examples/description.ts
new file mode 100644
index 0000000000..b20c64bbef
--- /dev/null
+++ b/apps/website/screens/components/wizard/overview/examples/description.ts
@@ -0,0 +1,34 @@
+import { DxcWizard, DxcInset } from "@dxc-technology/halstack-react";
+
+const code = `() => {
+ return (
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcWizard,
+ DxcInset,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/wizard/overview/examples/horizontal.ts b/apps/website/screens/components/wizard/overview/examples/horizontal.ts
new file mode 100644
index 0000000000..acf2d8e007
--- /dev/null
+++ b/apps/website/screens/components/wizard/overview/examples/horizontal.ts
@@ -0,0 +1,23 @@
+import { DxcWizard, DxcInset } from "@dxc-technology/halstack-react";
+
+const code = `() => {
+ return (
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcWizard,
+ DxcInset,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/wizard/overview/examples/linearNonLinear.ts b/apps/website/screens/components/wizard/overview/examples/linearNonLinear.ts
new file mode 100644
index 0000000000..3af9696e8b
--- /dev/null
+++ b/apps/website/screens/components/wizard/overview/examples/linearNonLinear.ts
@@ -0,0 +1,23 @@
+import { DxcWizard, DxcInset } from "@dxc-technology/halstack-react";
+
+const code = `() => {
+ return (
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcWizard,
+ DxcInset,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/wizard/overview/examples/stepNavigation.ts b/apps/website/screens/components/wizard/overview/examples/stepNavigation.ts
new file mode 100644
index 0000000000..7359d726d8
--- /dev/null
+++ b/apps/website/screens/components/wizard/overview/examples/stepNavigation.ts
@@ -0,0 +1,28 @@
+import { DxcWizard, DxcInset } from "@dxc-technology/halstack-react";
+
+const code = `() => {
+ return (
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcWizard,
+ DxcInset,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/wizard/usage/examples/description.ts b/apps/website/screens/components/wizard/overview/examples/validation.ts
similarity index 51%
rename from apps/website/screens/components/wizard/usage/examples/description.ts
rename to apps/website/screens/components/wizard/overview/examples/validation.ts
index 6ca9a1946d..a3c83a6dae 100644
--- a/apps/website/screens/components/wizard/usage/examples/description.ts
+++ b/apps/website/screens/components/wizard/overview/examples/validation.ts
@@ -4,23 +4,21 @@ const code = `() => {
return (
+ />
);
}`;
diff --git a/apps/website/screens/components/wizard/overview/examples/vertical.ts b/apps/website/screens/components/wizard/overview/examples/vertical.ts
new file mode 100644
index 0000000000..006cec61bb
--- /dev/null
+++ b/apps/website/screens/components/wizard/overview/examples/vertical.ts
@@ -0,0 +1,24 @@
+import { DxcWizard, DxcInset } from "@dxc-technology/halstack-react";
+
+const code = `() => {
+ return (
+
+
+
+ );
+}`;
+
+const scope = {
+ DxcWizard,
+ DxcInset,
+};
+
+export default { code, scope };
diff --git a/apps/website/screens/components/wizard/overview/images/wizard_anatomy.png b/apps/website/screens/components/wizard/overview/images/wizard_anatomy.png
new file mode 100644
index 0000000000..aca827a69c
Binary files /dev/null and b/apps/website/screens/components/wizard/overview/images/wizard_anatomy.png differ
diff --git a/apps/website/screens/components/wizard/specs/WizardSpecsPage.tsx b/apps/website/screens/components/wizard/specs/WizardSpecsPage.tsx
deleted file mode 100644
index 8ca0081969..0000000000
--- a/apps/website/screens/components/wizard/specs/WizardSpecsPage.tsx
+++ /dev/null
@@ -1,761 +0,0 @@
-import { DxcTable, DxcParagraph, DxcBulletedList, DxcFlex, DxcLink } from "@dxc-technology/halstack-react";
-import Image from "@/common/Image";
-import QuickNavContainer from "@/common/QuickNavContainer";
-import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
-import Figure from "@/common/Figure";
-import Code from "@/common/Code";
-import DocFooter from "@/common/DocFooter";
-import spacingImage from "./images/wizard_specs_spacing.png";
-import stepperImage from "./images/wizard_specs_stepper.png";
-import statesImage from "./images/wizard_states.png";
-import anatomyImage from "./images/wizard_anatomy.png";
-
-const sections = [
- {
- title: "Specifications",
- content: (
- <>
-
-
-
-
-
-
- >
- ),
- },
- {
- title: "States",
- content: (
- <>
-
- States: enabled, focus, selected,{" "}
- unvisited and disabled.
-
-
-
-
- >
- ),
- },
- {
- title: "Anatomy",
- content: (
- <>
-
-
- Step
- Label
- Separator
-
- Helper text (Optional)
-
-
- Step validator (Optional)
-
-
- >
- ),
- },
- {
- title: "Design tokens",
- subSections: [
- {
- title: "Color",
- content: (
-
-
-
-
Component token
-
Element
-
Core token
-
Value
-
-
-
-
-
- visitedStepFontColor
-
-
Step:visited text
-
- color-black
-
-
#000000
-
-
-
- selectedStepFontColor
-
-
Step:selected text
-
- color-white
-
-
#ffffff
-
-
-
- unvisitedStepFontColor
-
-
Step:unvisited text
-
- color-grey-700
-
-
#666666
-
-
-
- disabledStepFontColor
-
-
Step:disabled text
-
- color-grey-500
-
-
#999999
-
-
-
- visitedStepBackgroundColor
-
-
Step:visited
-
- color-white
-
-
#ffffff
-
-
-
- selectedStepBackgroundColor
-
-
Step:selected background
-
- color-purple-700
-
-
#5f249f
-
-
-
- unvisitedStepBackgroundColor
-
-
Step:unvisited background
-
- color-transparent
-
-
transparent
-
-
-
- disabledStepBackgroundColor
-
-
Step:disabled background
-
- color-grey-100
-
-
#f2f2f2
-
-
-
- visitedStepBorderColor
-
-
Step:visited border
-
- color-black
-
-
#000000
-
-
-
- selectedStepBorderColor
-
-
Step:selected border
-
- color-purple-700
-
-
#5f249f
-
-
-
- unvisitedStepBorderColor
-
-
Step:unvisited border
-
- color-grey-700
-
-
#666666
-
-
-
- disabledStepBorderColor
-
-
Step:disabled border
-
- color-grey-100
-
-
#f2f2f2
-
-
-
- visitedLabelFontColor
-
-
Label:visited
-
- color-black
-
-
#000000
-
-
-
- selectedLabelFontColor
-
-
Label:selected
-
- color-black
-
-
#000000
-
-
-
- disabledLabelFontColor
-
-
Label:disabled
-
- color-grey-500
-
-
#999999
-
-
-
- visitedHelperTextFontColor
-
-
Helper text:visited
-
- color-black
-
-
#000000
-
-
-
- selectedHelperTextFontColor
-
-
Helper text:selected
-
- color-black
-
-
#000000
-
-
-
- separatorColor
-
-
Separator
-
- color-grey-700
-
-
#666666
-
-
-
- focusColor
-
-
Focus outline
-
- color-blue-600
-
-
#0095ff
-
-
-
- ),
- },
- {
- title: "Margin",
- content: (
- <>
-
- Different values can be applied to each side of the component:
- top, bottom, left, right.
-
-
-
-