-
Notifications
You must be signed in to change notification settings - Fork 14
/
NumberInputSpecsPage.tsx
150 lines (147 loc) · 4.78 KB
/
NumberInputSpecsPage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import {
DxcParagraph,
DxcFlex,
DxcLink,
DxcBulletedList,
} from "@dxc-technology/halstack-react";
import Link from "next/link";
import Figure from "@/common/Figure";
import Code from "@/common/Code";
import DocFooter from "@/common/DocFooter";
import Image from "@/common/Image";
import QuickNavContainer from "@/common/QuickNavContainer";
import QuickNavContainerLayout from "@/common/QuickNavContainerLayout";
import numberSpecs from "./images/number_specs.png";
import numberInputSpecs from "./images/number_input_states.png";
import numberInputStates from "./images/number_action_states.png";
import numberAnatomy from "./images/number_anatomy.png";
const sections = [
{
title: "Specifications",
content: (
<>
<Figure caption="Design specifications of the number input component">
<Image
src={numberSpecs}
alt="Design specifications of the number input component"
/>
</Figure>
<DxcParagraph>
The number input <Code>color</Code>, <Code>typography</Code>,{" "}
<Code>border</Code>, <Code>spacing</Code>, <Code>width</Code> and{" "}
<Code>margin</Code> specifications are inherited from the text input,
for reference check the{" "}
<Link href="/components/text-input/specifications" passHref>
<DxcLink>text input</DxcLink>
</Link>{" "}
component documentation.
</DxcParagraph>
</>
),
},
{
title: "States",
subSections: [
{
title: "Input",
content: (
<>
<DxcParagraph>
States: <strong>enabled</strong>, <strong>hover</strong>,{" "}
<strong>focus</strong>, <strong>error</strong> and{" "}
<strong>disabled</strong>.
</DxcParagraph>
<Figure caption="Input states example">
<Image src={numberInputSpecs} alt="Input states example" />
</Figure>
</>
),
},
{
title: "Spin button",
content: (
<>
<DxcParagraph>
States: <strong>enabled</strong>, <strong>hover</strong>,{" "}
<strong>focus</strong>, <strong>active</strong> and{" "}
<strong>disabled</strong>.
</DxcParagraph>
<Figure caption="Spin button states example">
<Image src={numberInputStates} alt="Spin button states example" />
</Figure>
</>
),
},
],
},
{
title: "Anatomy",
content: (
<>
<Image
src={numberAnatomy}
alt="Anatomy of the number input component"
/>
<DxcBulletedList type="number">
<DxcBulletedList.Item>Label</DxcBulletedList.Item>
<DxcBulletedList.Item>
Helper text <em>(Optional)</em>
</DxcBulletedList.Item>
<DxcBulletedList.Item>
Suffix <em>(Optional)</em>
</DxcBulletedList.Item>
<DxcBulletedList.Item>Container</DxcBulletedList.Item>
<DxcBulletedList.Item>Spin button increase</DxcBulletedList.Item>
<DxcBulletedList.Item>Spin button decrease</DxcBulletedList.Item>
<DxcBulletedList.Item>Error indicator</DxcBulletedList.Item>
<DxcBulletedList.Item>Error message</DxcBulletedList.Item>
<DxcBulletedList.Item>Value</DxcBulletedList.Item>
</DxcBulletedList>
</>
),
},
{
title: "Accessibility",
subSections: [
{
title: "WAI-ARIA",
content: (
<DxcBulletedList>
<DxcBulletedList.Item>
WAI-ARIA Authoring practices 1.2 -{" "}
<DxcLink
href="https://www.w3.org/TR/wai-aria-practices-1.2/#spinbutton"
newWindow
>
3.21 Spinbutton
</DxcLink>
</DxcBulletedList.Item>
<DxcBulletedList.Item>
WAI-ARIA Authoring practices 1.2 -{" "}
<DxcLink
href="https://www.w3.org/TR/wai-aria-practices-1.1/examples/spinbutton/datepicker-spinbuttons.html"
newWindow
>
"Date Picker Spin Button" design pattern
</DxcLink>
</DxcBulletedList.Item>
</DxcBulletedList>
),
},
],
},
];
const NumberInputSpecsPage = () => {
return (
<DxcFlex direction="column" gap="4rem">
<QuickNavContainerLayout>
<QuickNavContainer
sections={sections}
startHeadingLevel={2}
></QuickNavContainer>
</QuickNavContainerLayout>
<DocFooter githubLink="https://github.com/dxc-technology/halstack-react/blob/master/website/screens/components/number-input/specs/NumberInputSpecsPage.tsx" />
</DxcFlex>
);
};
export default NumberInputSpecsPage;