diff --git a/apps/website/pages/components/dialog/code.tsx b/apps/website/pages/components/dialog/code.tsx
new file mode 100644
index 0000000000..5fb24c3fa1
--- /dev/null
+++ b/apps/website/pages/components/dialog/code.tsx
@@ -0,0 +1,17 @@
+import Head from "next/head";
+import type { ReactElement } from "react";
+import DialogPageLayout from "screens/components/dialog/DialogPageLayout";
+import DialogCodePage from "screens/components/dialog/code/DialogCodePage";
+
+const Code = () => (
+ <>
+
+ Dialog Code — Halstack Design System
+
+
+ >
+);
+
+Code.getLayout = (page: ReactElement) => {page};
+
+export default Code;
diff --git a/apps/website/pages/components/dialog/index.tsx b/apps/website/pages/components/dialog/index.tsx
index 43353cee91..b58ea3bdd4 100644
--- a/apps/website/pages/components/dialog/index.tsx
+++ b/apps/website/pages/components/dialog/index.tsx
@@ -1,7 +1,7 @@
import Head from "next/head";
import type { ReactElement } from "react";
import DialogPageLayout from "screens/components/dialog/DialogPageLayout";
-import DialogCodePage from "screens/components/dialog/code/DialogCodePage";
+import DialogOverviewPage from "screens/components/dialog/overview/DialogOverviewPage";
const Index = () => {
return (
@@ -9,13 +9,11 @@ const Index = () => {
Dialog — 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/dialog/specifications.tsx b/apps/website/pages/components/dialog/specifications.tsx
deleted file mode 100644
index 6477cbed0a..0000000000
--- a/apps/website/pages/components/dialog/specifications.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import Head from "next/head";
-import type { ReactElement } from "react";
-import DialogPageLayout from "screens/components/dialog/DialogPageLayout";
-import DialogSpecsPage from "screens/components/dialog/specs/DialogSpecsPage";
-
-const Specifications = () => {
- return (
- <>
-
- Dialog Specs — Halstack Design System
-
-
- >
- );
-};
-
-Specifications.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
-
-export default Specifications;
diff --git a/apps/website/pages/components/dialog/usage.tsx b/apps/website/pages/components/dialog/usage.tsx
deleted file mode 100644
index ecbe9fcb60..0000000000
--- a/apps/website/pages/components/dialog/usage.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import Head from "next/head";
-import type { ReactElement } from "react";
-import DialogPageLayout from "screens/components/dialog/DialogPageLayout";
-import DialogUsagePage from "screens/components/dialog/usage/DialogUsagePage";
-
-const Usage = () => {
- return (
- <>
-
- Dialog Usage — Halstack Design System
-
-
- >
- );
-};
-
-Usage.getLayout = function getLayout(page: ReactElement) {
- return {page};
-};
-
-export default Usage;
diff --git a/apps/website/screens/components/dialog/DialogPageLayout.tsx b/apps/website/screens/components/dialog/DialogPageLayout.tsx
index ef53a736fb..9e9ded478f 100644
--- a/apps/website/screens/components/dialog/DialogPageLayout.tsx
+++ b/apps/website/screens/components/dialog/DialogPageLayout.tsx
@@ -6,9 +6,8 @@ import { ReactNode } from "react";
const DialogPageHeading = ({ children }: { children: ReactNode }) => {
const tabs = [
- { label: "Code", path: "/components/dialog" },
- { label: "Usage", path: "/components/dialog/usage" },
- { label: "Specifications", path: "/components/dialog/specifications" },
+ { label: "Overview", path: "/components/dialog" },
+ { label: "Code", path: "/components/dialog/code" },
];
return (
@@ -18,10 +17,9 @@ const DialogPageHeading = ({ children }: { children: ReactNode }) => {
A modal dialog is a message box or child window that requires user interaction before returning to the
- parent window. These boxes appear on top of the open parent window that is currently displayed on the
- screen.
+ parent window.
-
+
{children}
diff --git a/apps/website/screens/components/dialog/code/DialogCodePage.tsx b/apps/website/screens/components/dialog/code/DialogCodePage.tsx
index 45f4e3bf50..4d60d479d9 100644
--- a/apps/website/screens/components/dialog/code/DialogCodePage.tsx
+++ b/apps/website/screens/components/dialog/code/DialogCodePage.tsx
@@ -24,6 +24,23 @@ const sections = [
+
+
+
+
+ children
+
+
+
+ React.ReactNode
+
+
+ Area within the dialog that can be used to render custom content. We strongly encourage users to not
+ change the tabindex of the inner components or elements. This can lead to unpredictable
+ behaviour for keyboard users, affecting the order of focus and focus locking within the dialog.
+
+
-
+
closable
@@ -35,23 +52,23 @@ const sections = [
-
onCloseClick
+
onBackgroundClick
{"() => void"}
- This function will be called when the user clicks the close button. The responsibility of hiding the
+ This function will be called when the user clicks on the background of the modal. The responsibility of hiding the
dialog lies with the user.
-
-
onBackgroundClick
+
onCloseClick
{"() => void"}
- This function will be called when the on the background of the modal. The responsibility of hiding the
+ This function will be called when the user clicks the close button. The responsibility of hiding the
dialog lies with the user.
-
@@ -66,23 +83,6 @@ const sections = [
true
-
-
-
-
- children
-
-
-
- React.ReactNode
-
-
- Area within the dialog that can be used to render custom content. We strongly encourage users to not
- change the tabindex of the inner components or elements. This can lead to unpredictable
- behaviour for keyboard users, affecting the order of focus and focus locking within the dialog.
-
-
-
-
tabIndex
@@ -135,7 +135,7 @@ const DialogCodePage = () => {
return (
-
+
diff --git a/apps/website/screens/components/dialog/overview/DialogOverviewPage.tsx b/apps/website/screens/components/dialog/overview/DialogOverviewPage.tsx
new file mode 100644
index 0000000000..ec25f5966e
--- /dev/null
+++ b/apps/website/screens/components/dialog/overview/DialogOverviewPage.tsx
@@ -0,0 +1,151 @@
+import { DxcBulletedList, DxcFlex, DxcParagraph } from "@dxc-technology/halstack-react";
+import QuickNavContainer from "@/common/QuickNavContainer";
+import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
+import DocFooter from "@/common/DocFooter";
+import Figure from "@/common/Figure";
+import Image from "@/common/Image";
+import content from "./images/dialog_content.png";
+import overlay from "./images/dialog_overlay.png";
+import anatomy from "./images/dialog_anatomy.png";
+
+const sections = [
+ {
+ title: "Introduction",
+ content: (
+
+ The dialog component is a modal window that{" "}
+ captures user attention for critical interactions, such as confirmations, alerts, or form
+ inputs. It appears above the main content and requires user action before continuing. To maintain usability,
+ dialogs should be concise, focused on a single task, and provide clear actions like confirmation or dismissal.
+
+ ),
+ },
+ {
+ title: "Anatomy",
+ content: (
+ <>
+
+
+
+ Title: displays the main heading of the dialog, providing users with a clear and immediate
+ understanding of its purpose
+
+
+ Container: the structural wrapper that holds all dialog elements, ensuring proper
+ alignment, spacing, and responsiveness.
+
+
+ Close action: an optional button, usually represented by an “X” icon, allowing users to
+ dismiss the dialog without completing an action.
+
+
+ Content: the main area where relevant information, messages, or interactive elements (e.g.,
+ forms) are displayed.
+
+
+ Actions: a set of buttons at the bottom of the dialog that guide users toward completing or
+ canceling the intended action.
+
+
+
+
+ * Please note that while these elements are not included by default in the component's configuration, they
+ are the expected components in a dialog.
+
+
+ >
+ ),
+ },
+ {
+ title: "Placing content in a dialog",
+ content: (
+ <>
+
+
+
+
+ Any content (Halstack components or custom) can be placed inside the dialog component. Dialog tasks should be
+ direct and easy to complete. However, to ensure that the component is used as intended and to prevent it from
+ becoming unusable, please consider the following aspects:
+
+
+
+ Avoid placing complex or large amounts of data, as it will increase the cognitive load and
+ users will struggle when processing information.
+
+
+ As much as possible, avoid scrolling in a dialog, as it disrupts focus and usability,
+ especially for modal interactions that require immediate attention. It can also make critical actions harder
+ to access, forcing users to scroll to find the key information or buttons. Instead, keep dialogs concise or
+ consider alternative patterns to display the information.
+
+
+ >
+ ),
+ },
+ {
+ title: "Overlay in dialogs",
+ content: (
+ <>
+
+ The overlay element helps focus the user's attention on the dialog by creating a
+ semi-transparent layer between the main application and the modal content. This visual separation reduces
+ distractions, ensures the dialog stands out, and reinforces the need for user action before returning to the
+ underlying interface. Additionally, it enhances accessibility by preventing unintended interactions with
+ background elements.
+
+
+
+
+ >
+ ),
+ },
+ {
+ title: "Best practices",
+ content: (
+ <>
+
+
+ Use dialogs for critical interactions: reserve dialogs for important decisions that require
+ user confirmation or input.
+
+
+ Ensure clarity: titles and messages should be direct, with clear descriptions of the
+ action's consequences.
+
+
+ Provide easy dismissal: always include a way to close the dialog, whether through a cancel
+ button or a close icon.
+
+
+ Maintain focus: keep the user's attention within the dialog by managing focus and
+ preventing background interactions.
+
+
+ Provide clear actions: use distinct primary and secondary buttons for confirmation and
+ cancellation.
+
+
+ Keep it focused: dialogs should be concise and address a single task to avoid overwhelming
+ users.
+
+
+ Avoid scrolling: keep content brief to prevent excessive scrolling; use alternative
+ patterns for complex interactions.
+
+
+ >
+ ),
+ },
+];
+
+const DialogOverviewPage = () => (
+
+
+
+
+
+
+);
+
+export default DialogOverviewPage;
diff --git a/apps/website/screens/components/dialog/overview/images/dialog_anatomy.png b/apps/website/screens/components/dialog/overview/images/dialog_anatomy.png
new file mode 100644
index 0000000000..1a8247ba7f
Binary files /dev/null and b/apps/website/screens/components/dialog/overview/images/dialog_anatomy.png differ
diff --git a/apps/website/screens/components/dialog/overview/images/dialog_content.png b/apps/website/screens/components/dialog/overview/images/dialog_content.png
new file mode 100644
index 0000000000..8d16455454
Binary files /dev/null and b/apps/website/screens/components/dialog/overview/images/dialog_content.png differ
diff --git a/apps/website/screens/components/dialog/overview/images/dialog_overlay.png b/apps/website/screens/components/dialog/overview/images/dialog_overlay.png
new file mode 100644
index 0000000000..66f5c47143
Binary files /dev/null and b/apps/website/screens/components/dialog/overview/images/dialog_overlay.png differ
diff --git a/apps/website/screens/components/dialog/specs/DialogSpecsPage.tsx b/apps/website/screens/components/dialog/specs/DialogSpecsPage.tsx
deleted file mode 100644
index 0ea5c60f56..0000000000
--- a/apps/website/screens/components/dialog/specs/DialogSpecsPage.tsx
+++ /dev/null
@@ -1,347 +0,0 @@
-import { DxcLink, DxcBulletedList, DxcFlex, DxcTable, DxcParagraph } from "@dxc-technology/halstack-react";
-import Image from "@/common/Image";
-import Code from "@/common/Code";
-import DocFooter from "@/common/DocFooter";
-import Figure from "@/common/Figure";
-import QuickNavContainer from "@/common/QuickNavContainer";
-import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
-import dialogAnatomyImage from "./images/dialog_anatomy.png";
-import dialogSpecsImage from "./images/dialog_specs.png";
-
-const sections = [
- {
- title: "Specifications",
- content: (
-
-
-
- ),
- },
- {
- title: "Anatomy",
- content: (
- <>
-
-
- Dialog container
- Title
- Close action
- Dialog actions
- Content
-
- >
- ),
- },
- {
- title: "Design tokens",
- subSections: [
- {
- title: "Color",
- content: (
-
-
-