|
| 1 | +import { DxcParagraph, DxcBulletedList, DxcFlex, DxcTable } from "@dxc-technology/halstack-react"; |
| 2 | +import QuickNavContainer from "@/common/QuickNavContainer"; |
| 3 | +import QuickNavContainerLayout from "@/common/QuickNavContainerLayout"; |
| 4 | +import DocFooter from "@/common/DocFooter"; |
| 5 | +import Example from "@/common/example/Example"; |
| 6 | +import HeaderDescriptionCell from "@/common/HeaderDescriptionCell"; |
| 7 | +import variants from "./example/variants"; |
| 8 | +import anatomy from "./images/status_light_anatomy.png"; |
| 9 | +import Image from "@/common/Image"; |
| 10 | + |
| 11 | +const sections = [ |
| 12 | + { |
| 13 | + title: "Introduction", |
| 14 | + content: ( |
| 15 | + <DxcParagraph> |
| 16 | + Being a <strong>non-clickable UI element</strong>, the status light is used to provide a quick, at-a-glance |
| 17 | + indication of system states, alerts, or conditions within an interface. Designed for clarity and instant |
| 18 | + recognition, it seamlessly integrates into various layouts without adding cognitive load. Status lights follow a |
| 19 | + consistent color-coded system to ensure users can easily interpret their meaning. They are often used alongside |
| 20 | + other components, such as tables, accordions, or dashboards, to enhance visibility and provide contextual |
| 21 | + awareness. |
| 22 | + </DxcParagraph> |
| 23 | + ), |
| 24 | + }, |
| 25 | + { |
| 26 | + title: "Anatomy", |
| 27 | + content: ( |
| 28 | + <> |
| 29 | + <Image src={anatomy} alt="Status light's anatomy" /> |
| 30 | + <DxcBulletedList type="number"> |
| 31 | + <DxcBulletedList.Item> |
| 32 | + <strong>Status light:</strong> the core visual element of a status light, designed as dot for clarity and |
| 33 | + easy recognition. |
| 34 | + </DxcBulletedList.Item> |
| 35 | + <DxcBulletedList.Item> |
| 36 | + <strong>Label:</strong> a short text description alongside the status light to provide additional context. |
| 37 | + </DxcBulletedList.Item> |
| 38 | + </DxcBulletedList> |
| 39 | + </> |
| 40 | + ), |
| 41 | + }, |
| 42 | + { |
| 43 | + title: "Variants", |
| 44 | + content: ( |
| 45 | + <> |
| 46 | + <DxcParagraph> |
| 47 | + The status light component is available in five semantic variants, each represented by a distinct color. These |
| 48 | + colors ensure clear communication of different states. |
| 49 | + </DxcParagraph> |
| 50 | + <DxcParagraph> |
| 51 | + Additionally, the component comes in three different sizes, allowing for flexibility across various layouts |
| 52 | + and screen sizes while maintaining readability and visual consistency. |
| 53 | + </DxcParagraph> |
| 54 | + <Example example={variants} /> |
| 55 | + <DxcTable> |
| 56 | + <thead> |
| 57 | + <tr> |
| 58 | + <th>Variant</th> |
| 59 | + <HeaderDescriptionCell>Description</HeaderDescriptionCell> |
| 60 | + </tr> |
| 61 | + </thead> |
| 62 | + <tbody> |
| 63 | + <tr> |
| 64 | + <td> |
| 65 | + <strong>Default</strong> |
| 66 | + </td> |
| 67 | + <td>For neutral statuses, like archived, draft, paused...</td> |
| 68 | + </tr> |
| 69 | + <tr> |
| 70 | + <td> |
| 71 | + <strong>Info</strong> |
| 72 | + </td> |
| 73 | + <td>For live statuses, like active, in use, uploaded...</td> |
| 74 | + </tr> |
| 75 | + <tr> |
| 76 | + <td> |
| 77 | + <strong>Success</strong> |
| 78 | + </td> |
| 79 | + <td>For positive statuses, like finished, approved, completed...</td> |
| 80 | + </tr> |
| 81 | + <tr> |
| 82 | + <td> |
| 83 | + <strong>Warning</strong> |
| 84 | + </td> |
| 85 | + <td>For pending or critical statuses, like scheduled, in progress, processing...</td> |
| 86 | + </tr> |
| 87 | + <tr> |
| 88 | + <td> |
| 89 | + <strong>Error</strong> |
| 90 | + </td> |
| 91 | + <td>For negative statuses, like incomplete, rejected, failed...</td> |
| 92 | + </tr> |
| 93 | + </tbody> |
| 94 | + </DxcTable> |
| 95 | + </> |
| 96 | + ), |
| 97 | + }, |
| 98 | + { |
| 99 | + title: "Best practices", |
| 100 | + content: ( |
| 101 | + <DxcBulletedList> |
| 102 | + <DxcBulletedList.Item> |
| 103 | + <strong>Ensure semantic accuracy:</strong> always match each status light color with the correct meaning to |
| 104 | + maintain clarity and avoid misinterpretation. |
| 105 | + </DxcBulletedList.Item> |
| 106 | + <DxcBulletedList.Item> |
| 107 | + <strong>Optimize for different screen sizes:</strong> Select the appropriate size to ensure visibility and |
| 108 | + legibility across various layouts. |
| 109 | + </DxcBulletedList.Item> |
| 110 | + <DxcBulletedList.Item> |
| 111 | + <strong>Use clear and concise labels:</strong> Keep them brief and ensure they accurately describe the current |
| 112 | + state. |
| 113 | + </DxcBulletedList.Item> |
| 114 | + <DxcBulletedList.Item> |
| 115 | + <strong>Combine with badges carefully:</strong> status lights and semantic badges can only be used together if |
| 116 | + one of them does not use a semantic color or if their semantic colors do not contradict each other. This |
| 117 | + prevents misinterpretation and maintains clarity in data visualizations such as tables, charts, or grids. |
| 118 | + </DxcBulletedList.Item> |
| 119 | + <DxcBulletedList.Item> |
| 120 | + <strong>Use strategically:</strong> overusing status lights in interfaces with high cognitive load can |
| 121 | + overwhelm users and disrupt readability. Use them only where they add real value. |
| 122 | + </DxcBulletedList.Item> |
| 123 | + </DxcBulletedList> |
| 124 | + ), |
| 125 | + }, |
| 126 | +]; |
| 127 | + |
| 128 | +const StatusLightOverviewPage = () => ( |
| 129 | + <DxcFlex direction="column" gap="4rem"> |
| 130 | + <QuickNavContainerLayout> |
| 131 | + <QuickNavContainer sections={sections} startHeadingLevel={2} /> |
| 132 | + </QuickNavContainerLayout> |
| 133 | + <DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/apps/website/screens/components/status-light/overview/StatusLightOverviewPage.tsx" /> |
| 134 | + </DxcFlex> |
| 135 | +); |
| 136 | + |
| 137 | +export default StatusLightOverviewPage; |
0 commit comments