@dxc-technology/halstack-react 0.0.0-ee92231 → 0.0.0-eefd559
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackgroundColorContext.d.ts +10 -0
- package/BackgroundColorContext.js +1 -4
- package/ThemeContext.d.ts +15 -0
- package/ThemeContext.js +5 -8
- package/V3Select/V3Select.js +2 -2
- package/V3Textarea/V3Textarea.js +2 -2
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +11 -22
- package/accordion/Accordion.stories.tsx +307 -0
- package/accordion/types.d.ts +4 -8
- package/accordion-group/AccordionGroup.js +2 -2
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/types.d.ts +4 -8
- package/alert/Alert.js +2 -2
- package/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +1 -1
- package/badge/Badge.js +1 -1
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +84 -0
- package/bleed/Bleed.stories.tsx +342 -0
- package/bleed/types.d.ts +13 -0
- package/bleed/types.js +5 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +4 -7
- package/box/types.d.ts +0 -4
- package/button/Button.d.ts +1 -1
- package/button/Button.js +13 -19
- package/button/Button.stories.tsx +222 -241
- package/button/types.d.ts +5 -9
- package/card/Card.js +5 -6
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +4 -6
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/types.d.ts +2 -2
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +16 -76
- package/chip/Chip.stories.tsx +119 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- package/common/variables.js +70 -28
- package/date/Date.js +1 -1
- package/date-input/DateInput.js +10 -13
- package/date-input/DateInput.stories.tsx +138 -0
- package/dialog/Dialog.js +4 -3
- package/dialog/Dialog.stories.tsx +212 -0
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +13 -35
- package/dropdown/Dropdown.stories.tsx +249 -0
- package/dropdown/types.d.ts +6 -15
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +167 -109
- package/file-input/FileInput.stories.tsx +507 -0
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +12 -21
- package/file-input/types.d.ts +112 -0
- package/file-input/types.js +5 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +28 -36
- package/footer/{Footer.stories.jsx → Footer.stories.tsx} +1 -22
- package/footer/Icons.d.ts +2 -0
- package/footer/Icons.js +3 -3
- package/footer/types.d.ts +22 -18
- package/header/Header.js +2 -2
- package/header/Header.stories.tsx +162 -0
- package/header/Icons.d.ts +2 -0
- package/header/types.d.ts +4 -2
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +7 -24
- package/heading/Heading.stories.tsx +54 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/input-text/InputText.js +2 -2
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +84 -0
- package/inset/Inset.stories.tsx +229 -0
- package/inset/types.d.ts +13 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +10 -0
- package/layout/ApplicationLayout.js +9 -19
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.js +3 -3
- package/link/Link.stories.tsx +146 -0
- package/list/List.d.ts +4 -0
- package/list/List.js +47 -0
- package/list/List.stories.tsx +95 -0
- package/list/types.d.ts +7 -0
- package/list/types.js +5 -0
- package/main.d.ts +7 -3
- package/main.js +34 -2
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +5 -50
- package/number-input/{NumberInput.stories.jsx → NumberInput.stories.tsx} +0 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +4 -2
- package/paginator/Paginator.js +2 -8
- package/password-input/PasswordInput.js +19 -18
- package/password-input/PasswordInput.stories.tsx +3 -3
- package/password-input/types.d.ts +17 -10
- package/progress-bar/ProgressBar.js +4 -4
- package/radio/Radio.js +2 -2
- package/radio/types.d.ts +2 -2
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +140 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +273 -0
- package/radio-group/RadioGroup.stories.tsx +79 -0
- package/radio-group/RadioGroup.test.js +248 -0
- package/radio-group/types.d.ts +36 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +5 -28
- package/resultsetTable/ResultsetTable.stories.tsx +275 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/row/Row.d.ts +3 -0
- package/row/Row.js +127 -0
- package/row/Row.stories.tsx +237 -0
- package/row/types.d.ts +10 -0
- package/row/types.js +5 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +20 -22
- package/select/Select.stories.tsx +572 -0
- package/select/types.d.ts +170 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +6 -15
- package/sidenav/Sidenav.stories.tsx +182 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +1 -1
- package/slider/Slider.js +43 -32
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +2 -7
- package/spinner/Spinner.js +2 -2
- package/spinner/Spinner.stories.jsx +1 -0
- package/stack/Stack.d.ts +3 -0
- package/stack/Stack.js +97 -0
- package/stack/Stack.stories.tsx +164 -0
- package/stack/types.d.ts +9 -0
- package/stack/types.js +5 -0
- package/switch/Switch.js +2 -2
- package/switch/Switch.stories.tsx +1 -1
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +2 -1
- package/tabs/Tabs.js +11 -9
- package/tabs/Tabs.stories.tsx +120 -0
- package/tabs/types.d.ts +25 -18
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +9 -35
- package/tag/{Tag.stories.jsx → Tag.stories.tsx} +15 -22
- package/tag/types.d.ts +69 -0
- package/tag/types.js +5 -0
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +54 -85
- package/text-input/TextInput.stories.tsx +456 -0
- package/text-input/types.d.ts +159 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +27 -60
- package/textarea/Textarea.stories.jsx +4 -3
- package/textarea/types.d.ts +130 -0
- package/textarea/types.js +5 -0
- package/toggle/Toggle.js +1 -1
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +16 -45
- package/toggle-group/ToggleGroup.stories.tsx +173 -0
- package/toggle-group/types.d.ts +97 -0
- package/toggle-group/types.js +5 -0
- package/upload/buttons-upload/ButtonsUpload.js +2 -2
- package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
- package/upload/file-upload/FileToUpload.js +1 -1
- package/upload/files-upload/FilesToUpload.js +1 -1
- package/upload/transaction/Transaction.js +2 -2
- package/upload/transactions/Transactions.js +1 -1
- package/useTheme.d.ts +2 -0
- package/useTheme.js +1 -1
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +69 -59
- package/wizard/Wizard.stories.tsx +224 -0
- package/wizard/types.d.ts +60 -0
- package/wizard/types.js +5 -0
- package/chip/index.d.ts +0 -22
- package/file-input/index.d.ts +0 -81
- package/heading/index.d.ts +0 -17
- package/number-input/index.d.ts +0 -113
- package/resultsetTable/index.d.ts +0 -19
- package/select/index.d.ts +0 -131
- package/sidenav/index.d.ts +0 -13
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/textarea/index.d.ts +0 -117
- package/toggle-group/index.d.ts +0 -21
- package/wizard/Icons.js +0 -65
- package/wizard/index.d.ts +0 -18
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcWizard from "./Wizard";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
import { userEvent, within } from "@storybook/testing-library";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Wizard",
|
|
9
|
+
component: DxcWizard,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const favoriteSVG = () => {
|
|
13
|
+
return (
|
|
14
|
+
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
15
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
16
|
+
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const largeIcon = () => {
|
|
22
|
+
return (
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="currentColor">
|
|
24
|
+
<path d="M0 0h24v24H0z" fill="none" />
|
|
25
|
+
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
|
|
26
|
+
</svg>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const stepWithLabel = [
|
|
31
|
+
{
|
|
32
|
+
label: "First step",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: "Second step",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "Third step",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: "Forth step",
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const stepWithLabelDescription = [
|
|
46
|
+
{
|
|
47
|
+
label: "First step",
|
|
48
|
+
description: "Description",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: "Second step",
|
|
52
|
+
description: "Description",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "Third step",
|
|
56
|
+
description: "Description",
|
|
57
|
+
valid: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "Forth step",
|
|
61
|
+
description: "Description",
|
|
62
|
+
valid: false,
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
const stepWithLongDescription = [
|
|
67
|
+
{
|
|
68
|
+
label: "First step",
|
|
69
|
+
description:
|
|
70
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: "Second step",
|
|
74
|
+
description:
|
|
75
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: "Third step",
|
|
79
|
+
description:
|
|
80
|
+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ",
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
const stepDisabled = [
|
|
85
|
+
{
|
|
86
|
+
label: "First step",
|
|
87
|
+
description: "Description",
|
|
88
|
+
disabled: true,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "Second step",
|
|
92
|
+
description: "Description",
|
|
93
|
+
icon: favoriteSVG,
|
|
94
|
+
disabled: true,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: "Third step",
|
|
98
|
+
description: "Description",
|
|
99
|
+
disabled: true,
|
|
100
|
+
valid: true,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: "Forth step",
|
|
104
|
+
description: "Description",
|
|
105
|
+
valid: false,
|
|
106
|
+
disabled: true,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
const stepIcons = [
|
|
111
|
+
{
|
|
112
|
+
label: "First step",
|
|
113
|
+
icon: favoriteSVG,
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: "Second step",
|
|
117
|
+
icon: favoriteSVG,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label: "Third step",
|
|
121
|
+
icon: favoriteSVG,
|
|
122
|
+
},
|
|
123
|
+
];
|
|
124
|
+
|
|
125
|
+
const stepLargeIcons = [
|
|
126
|
+
{
|
|
127
|
+
label: "First step",
|
|
128
|
+
icon: largeIcon,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: "Second step",
|
|
132
|
+
icon: largeIcon,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
label: "Third step",
|
|
136
|
+
icon: largeIcon,
|
|
137
|
+
},
|
|
138
|
+
];
|
|
139
|
+
|
|
140
|
+
export const Chromatic = () => (
|
|
141
|
+
<>
|
|
142
|
+
<ExampleContainer>
|
|
143
|
+
<Title title="Current step in the third step, labels and description" theme="light" level={4} />
|
|
144
|
+
<DxcWizard currentStep={2} steps={stepWithLabelDescription}></DxcWizard>
|
|
145
|
+
<Title title="With long description in horizontal" theme="light" level={4} />
|
|
146
|
+
<DxcWizard steps={stepWithLongDescription}></DxcWizard>
|
|
147
|
+
<Title title="With long description in vertical" theme="light" level={4} />
|
|
148
|
+
<DxcWizard mode="vertical" steps={stepWithLongDescription}></DxcWizard>
|
|
149
|
+
<Title title="Disabled steps" theme="light" level={4} />
|
|
150
|
+
<DxcWizard steps={stepDisabled}></DxcWizard>
|
|
151
|
+
<Title title="With icons" theme="light" level={4} />
|
|
152
|
+
<DxcWizard steps={stepIcons}></DxcWizard>
|
|
153
|
+
<Title title="With large icons" theme="light" level={4} />
|
|
154
|
+
<DxcWizard steps={stepLargeIcons}></DxcWizard>
|
|
155
|
+
</ExampleContainer>
|
|
156
|
+
<Title title="Margins horizontal" theme="light" level={2} />
|
|
157
|
+
<ExampleContainer>
|
|
158
|
+
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
159
|
+
<DxcWizard margin="xxsmall" steps={stepWithLabel}></DxcWizard>
|
|
160
|
+
</ExampleContainer>
|
|
161
|
+
<ExampleContainer>
|
|
162
|
+
<Title title="Xsmall margin" theme="light" level={4} />
|
|
163
|
+
<DxcWizard margin="xsmall" steps={stepWithLabel}></DxcWizard>
|
|
164
|
+
</ExampleContainer>
|
|
165
|
+
<ExampleContainer>
|
|
166
|
+
<Title title="Small margin" theme="light" level={4} />
|
|
167
|
+
<DxcWizard margin="small" steps={stepWithLabel}></DxcWizard>
|
|
168
|
+
</ExampleContainer>
|
|
169
|
+
<ExampleContainer>
|
|
170
|
+
<Title title="Medium margin" theme="light" level={4} />
|
|
171
|
+
<DxcWizard margin="medium" steps={stepWithLabel}></DxcWizard>
|
|
172
|
+
</ExampleContainer>
|
|
173
|
+
<ExampleContainer>
|
|
174
|
+
<Title title="Large margin" theme="light" level={4} />
|
|
175
|
+
<DxcWizard margin="large" steps={stepWithLabel}></DxcWizard>
|
|
176
|
+
</ExampleContainer>
|
|
177
|
+
<ExampleContainer>
|
|
178
|
+
<Title title="Xlarge margin" theme="light" level={4} />
|
|
179
|
+
<DxcWizard margin="xlarge" steps={stepWithLabel}></DxcWizard>
|
|
180
|
+
</ExampleContainer>
|
|
181
|
+
<ExampleContainer>
|
|
182
|
+
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
183
|
+
<DxcWizard margin="xxlarge" steps={stepWithLabel}></DxcWizard>
|
|
184
|
+
</ExampleContainer>
|
|
185
|
+
<Title title="Margins vertical" theme="light" level={2} />
|
|
186
|
+
<ExampleContainer>
|
|
187
|
+
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
188
|
+
<DxcWizard mode="vertical" margin="xxsmall" steps={stepWithLabelDescription}></DxcWizard>
|
|
189
|
+
</ExampleContainer>
|
|
190
|
+
<ExampleContainer>
|
|
191
|
+
<Title title="Xsmall margin" theme="light" level={4} />
|
|
192
|
+
<DxcWizard mode="vertical" margin="xsmall" steps={stepWithLabel}></DxcWizard>
|
|
193
|
+
</ExampleContainer>
|
|
194
|
+
<ExampleContainer>
|
|
195
|
+
<Title title="Small margin" theme="light" level={4} />
|
|
196
|
+
<DxcWizard mode="vertical" margin="small" steps={stepWithLabel}></DxcWizard>
|
|
197
|
+
</ExampleContainer>
|
|
198
|
+
<ExampleContainer>
|
|
199
|
+
<Title title="Medium margin" theme="light" level={4} />
|
|
200
|
+
<DxcWizard mode="vertical" margin="medium" steps={stepWithLabel}></DxcWizard>
|
|
201
|
+
</ExampleContainer>
|
|
202
|
+
<ExampleContainer>
|
|
203
|
+
<Title title="Large margin" theme="light" level={4} />
|
|
204
|
+
<DxcWizard mode="vertical" margin="large" steps={stepWithLabel}></DxcWizard>
|
|
205
|
+
</ExampleContainer>
|
|
206
|
+
<ExampleContainer>
|
|
207
|
+
<Title title="Xlarge margin" theme="light" level={4} />
|
|
208
|
+
<DxcWizard mode="vertical" margin="xlarge" steps={stepWithLabel}></DxcWizard>
|
|
209
|
+
</ExampleContainer>
|
|
210
|
+
<ExampleContainer>
|
|
211
|
+
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
212
|
+
<DxcWizard mode="vertical" margin="xxlarge" steps={stepWithLabel}></DxcWizard>
|
|
213
|
+
</ExampleContainer>
|
|
214
|
+
</>
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
const WizardSelected = () => <DxcWizard steps={stepWithLabel}></DxcWizard>;
|
|
218
|
+
|
|
219
|
+
export const WizardStepActived = WizardSelected.bind({});
|
|
220
|
+
WizardStepActived.play = async ({ canvasElement }) => {
|
|
221
|
+
const canvas = within(canvasElement);
|
|
222
|
+
const option = canvas.getByText("Third step");
|
|
223
|
+
await userEvent.click(option);
|
|
224
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
+
declare type Margin = {
|
|
4
|
+
top?: Space;
|
|
5
|
+
bottom?: Space;
|
|
6
|
+
left?: Space;
|
|
7
|
+
right?: Space;
|
|
8
|
+
};
|
|
9
|
+
declare type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
10
|
+
declare type Step = {
|
|
11
|
+
/**
|
|
12
|
+
* Step label.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Description that will be placed next to the step.
|
|
17
|
+
*/
|
|
18
|
+
description?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Element or path used as the icon displayed in the step.
|
|
21
|
+
*/
|
|
22
|
+
icon?: string | SVG;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the step is disabled or not.
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the step is valid or not.
|
|
29
|
+
*/
|
|
30
|
+
valid?: boolean;
|
|
31
|
+
};
|
|
32
|
+
declare type Props = {
|
|
33
|
+
/**
|
|
34
|
+
* The wizard can be showed in horizontal or vertical.
|
|
35
|
+
*/
|
|
36
|
+
mode?: "horizontal" | "vertical";
|
|
37
|
+
/**
|
|
38
|
+
* Defines which step is marked as the current. The numeration starts in 0.
|
|
39
|
+
*/
|
|
40
|
+
currentStep?: number;
|
|
41
|
+
/**
|
|
42
|
+
* This function will be called when the user clicks a step. The step
|
|
43
|
+
* number will be passed as a parameter.
|
|
44
|
+
*/
|
|
45
|
+
onStepClick?: (newCurrentStep: number) => void;
|
|
46
|
+
/**
|
|
47
|
+
* An array of objects representing the steps.
|
|
48
|
+
*/
|
|
49
|
+
steps: Step[];
|
|
50
|
+
/**
|
|
51
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
52
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
53
|
+
*/
|
|
54
|
+
margin?: Space | Margin;
|
|
55
|
+
/**
|
|
56
|
+
* Value of the tabindex attribute that is given to all the steps.
|
|
57
|
+
*/
|
|
58
|
+
tabIndex?: number;
|
|
59
|
+
};
|
|
60
|
+
export default Props;
|
package/wizard/types.js
ADDED
package/chip/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
label?: string;
|
|
11
|
-
suffixIcon?: any;
|
|
12
|
-
preffixIcon?: any;
|
|
13
|
-
suffixIconSrc?: string;
|
|
14
|
-
onClickSuffix?: void;
|
|
15
|
-
prefixIconSrc?: string;
|
|
16
|
-
onClickPrefix?: void;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
margin?: Space | Margin;
|
|
19
|
-
tabIndex?: number;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default function DxcChip(props: Props): JSX.Element;
|
package/file-input/index.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
type Size = "small" | "medium" | "large" | "fillParent";
|
|
2
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
type Margin = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
type FileData = {
|
|
10
|
-
error?: string;
|
|
11
|
-
file?: File;
|
|
12
|
-
preview?: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type Props = {
|
|
16
|
-
/**
|
|
17
|
-
* Name attribute of the file input element.
|
|
18
|
-
*/
|
|
19
|
-
name?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Text to be placed above the file input.
|
|
22
|
-
*/
|
|
23
|
-
label?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Uses one of the available file input modes:
|
|
26
|
-
* 'file': Files are selected by clicking the button and selecting it through the file explorer.
|
|
27
|
-
* 'filedrop': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
|
|
28
|
-
* 'dropzone': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
|
|
29
|
-
* The drag and drop area of this mode is bigger than the one of the filedrop mode.
|
|
30
|
-
*/
|
|
31
|
-
mode?: "file" | "filedrop" | "dropzone";
|
|
32
|
-
/**
|
|
33
|
-
* Helper text to be placed above the file input.
|
|
34
|
-
*/
|
|
35
|
-
helperText?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Defines the file types accepted by the component. It is not possible to select a file with a non valid type.
|
|
38
|
-
*/
|
|
39
|
-
accept?: string;
|
|
40
|
-
/**
|
|
41
|
-
* An array of FileData representing the selected files.
|
|
42
|
-
*/
|
|
43
|
-
value?: FileData[];
|
|
44
|
-
/**
|
|
45
|
-
* Minimum file size allowed (in bytes). If the file size does not comply the minSize, an error will be passed to the FileData.
|
|
46
|
-
*/
|
|
47
|
-
minSize?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Maximum file size allowed (in bytes). If the file size does not comply the maxSize, an error will be passed to the FileData.
|
|
50
|
-
*/
|
|
51
|
-
maxSize?: number;
|
|
52
|
-
/**
|
|
53
|
-
* If true and if the file is an image, a preview of it will be shown. If it is not an image, an icon refering to the file's type will be shown.
|
|
54
|
-
* If mode is not multiple and there is one file already selected, the file will be replaced by the last selected one.
|
|
55
|
-
*/
|
|
56
|
-
showPreview?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* If true, more than one file can be selected. If false, only one file can be selected.
|
|
59
|
-
*/
|
|
60
|
-
multiple?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* If true, the component will be disabled.
|
|
63
|
-
*/
|
|
64
|
-
disabled?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* This function will be called when the user selects or drops a file. The list of files will be sent as a parameter.
|
|
67
|
-
* In this function, the files can be updated or returned as they come. These files must be passed to the value in order to be shown.
|
|
68
|
-
*/
|
|
69
|
-
callbackFile?: (files: FileData[]) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
72
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
73
|
-
*/
|
|
74
|
-
margin?: Space | Margin;
|
|
75
|
-
/**
|
|
76
|
-
* Value of the tabindex attribute.
|
|
77
|
-
*/
|
|
78
|
-
tabIndex?: number;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default function DxcFileInput(props: Props): JSX.Element;
|
package/heading/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
level?: 1 | 2 | 3 | 4 | 5;
|
|
11
|
-
text?: string;
|
|
12
|
-
as?: "h1" | "h2" | "h3" | "h4" | "h5";
|
|
13
|
-
weight?: "light" | "normal" | "bold";
|
|
14
|
-
margin?: Space | Margin;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default function DxcHeading(props: Props): JSX.Element;
|
package/number-input/index.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
type Size = "small" | "medium" | "large" | "fillParent";
|
|
2
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
3
|
-
type Margin = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
9
|
-
type Props = {
|
|
10
|
-
/**
|
|
11
|
-
* Text to be placed above the number.
|
|
12
|
-
*/
|
|
13
|
-
label?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Name attribute of the input element.
|
|
16
|
-
*/
|
|
17
|
-
name?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Value of the input element. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
|
|
20
|
-
*/
|
|
21
|
-
value?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Helper text to be placed above the number.
|
|
24
|
-
*/
|
|
25
|
-
helperText?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Text to be put as placeholder of the number.
|
|
28
|
-
*/
|
|
29
|
-
placeholder?: string;
|
|
30
|
-
/**
|
|
31
|
-
* If true, the component will be disabled.
|
|
32
|
-
*/
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* If true, the number will be optional, showing '(Optional)'
|
|
36
|
-
* next to the label. Otherwise, the field will be considered required
|
|
37
|
-
* and an error will be passed as a parameter to the OnBlur and onChange
|
|
38
|
-
* functions when it has not been filled.
|
|
39
|
-
*/
|
|
40
|
-
optional?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Prefix to be placed before the number value.
|
|
43
|
-
*/
|
|
44
|
-
prefix?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Suffix to be placed after the number value.
|
|
47
|
-
*/
|
|
48
|
-
suffix?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Minimum value allowed by the number input. If the typed value by the user is
|
|
51
|
-
* lower than min, the onBlur and onChange functions will be called with
|
|
52
|
-
* the current value and an internal error informing that the current
|
|
53
|
-
* value is not correct. If a valid state is reached, the error parameter
|
|
54
|
-
* will be null in both events.
|
|
55
|
-
*/
|
|
56
|
-
min?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Maximum value allowed by the number input. If the typed value by the user
|
|
59
|
-
* surpasses max, the onBlur and onChange functions will be called with
|
|
60
|
-
* the current value and an internal error informing that the current
|
|
61
|
-
* value is not correct. If a valid state is reached, the error parameter
|
|
62
|
-
* will be null in both events.
|
|
63
|
-
*/
|
|
64
|
-
max?: number;
|
|
65
|
-
/**
|
|
66
|
-
* The step interval to use when using the up and down arrows to adjust the value.
|
|
67
|
-
*/
|
|
68
|
-
step?: number;
|
|
69
|
-
/**
|
|
70
|
-
* This function will be called when the user types within the input
|
|
71
|
-
* element of the component. An object including the current value and
|
|
72
|
-
* the error (if the value entered is not valid) will be passed to this
|
|
73
|
-
* function. If there is no error, error will be null.
|
|
74
|
-
*/
|
|
75
|
-
onChange?: (val: { value: string; error: string }) => void;
|
|
76
|
-
/**
|
|
77
|
-
* This function will be called when the input element loses the focus.
|
|
78
|
-
* An object including the input value and the error (if the value
|
|
79
|
-
* entered is not valid) will be passed to this function. If there is no error,
|
|
80
|
-
* error will be null.
|
|
81
|
-
*/
|
|
82
|
-
onBlur?: (val: { value: string; error: string }) => void;
|
|
83
|
-
/**
|
|
84
|
-
* If it is defined, the component will change its appearance, showing
|
|
85
|
-
* the error below the input component. If it is not defined, the error
|
|
86
|
-
* messages will be managed internally, but never displayed on its own.
|
|
87
|
-
*/
|
|
88
|
-
error?: string;
|
|
89
|
-
/**
|
|
90
|
-
* HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
|
|
91
|
-
* Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
|
|
92
|
-
*/
|
|
93
|
-
autocomplete?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
96
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
97
|
-
*/
|
|
98
|
-
margin?: Space | Margin;
|
|
99
|
-
/**
|
|
100
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
101
|
-
*/
|
|
102
|
-
size?: Size;
|
|
103
|
-
/**
|
|
104
|
-
* Value of the tabindex attribute.
|
|
105
|
-
*/
|
|
106
|
-
tabIndex?: number;
|
|
107
|
-
/**
|
|
108
|
-
* Reference to the component.
|
|
109
|
-
*/
|
|
110
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export default function DxcNumberInput(props: Props): JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
columns?: any;
|
|
11
|
-
rows?: any;
|
|
12
|
-
itemsPerPage?: number;
|
|
13
|
-
itemsPerPageOptions?: number[];
|
|
14
|
-
itemsPerPageFunction?: void,
|
|
15
|
-
margin?: Space | Margin;
|
|
16
|
-
tabIndex?: number;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export default function DxcResultsetTable(props: Props): JSX.Element;
|
package/select/index.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
9
|
-
|
|
10
|
-
type OptionGroup = {
|
|
11
|
-
/**
|
|
12
|
-
* Label of the group to be shown in the select's listbox.
|
|
13
|
-
*/
|
|
14
|
-
label: string;
|
|
15
|
-
/**
|
|
16
|
-
* List of the grouped options.
|
|
17
|
-
*/
|
|
18
|
-
options: Option[];
|
|
19
|
-
};
|
|
20
|
-
type Option = {
|
|
21
|
-
/**
|
|
22
|
-
* Element used as the icon that will be placed before the option label.
|
|
23
|
-
* It can be a url of an image or an inline SVG. If the url option
|
|
24
|
-
* is the chosen one, take into account that the component's
|
|
25
|
-
* color styling tokens will not be applied to the image.
|
|
26
|
-
*/
|
|
27
|
-
icon?: string | SVG;
|
|
28
|
-
/**
|
|
29
|
-
* Label of the option to be shown in the select's listbox.
|
|
30
|
-
*/
|
|
31
|
-
label: string;
|
|
32
|
-
/**
|
|
33
|
-
* Value of the option. It should be unique and
|
|
34
|
-
* not an empty string, which is reserved to the empty option added
|
|
35
|
-
* by optional prop.
|
|
36
|
-
*/
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type Props = {
|
|
41
|
-
/**
|
|
42
|
-
* Text to be placed above the select.
|
|
43
|
-
*/
|
|
44
|
-
label?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Name attribute of the input element. This attribute will allow users
|
|
47
|
-
* to find the component's value during the submit event. In this event,
|
|
48
|
-
* the component's value will always be a regular string, for both single
|
|
49
|
-
* and multiple selection modes, been in the first one a single option
|
|
50
|
-
* value and in the multiple variant more than one option value,
|
|
51
|
-
* separated by commas.
|
|
52
|
-
*/
|
|
53
|
-
name?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Value of the select. If undefined, the component will be uncontrolled
|
|
56
|
-
* and the value will be managed internally by the component.
|
|
57
|
-
*/
|
|
58
|
-
value?: string | string[];
|
|
59
|
-
/**
|
|
60
|
-
* An array of objects representing the selectable options.
|
|
61
|
-
*/
|
|
62
|
-
options?: Option[] | OptionGroup[];
|
|
63
|
-
/**
|
|
64
|
-
* Helper text to be placed above the select.
|
|
65
|
-
*/
|
|
66
|
-
helperText?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Text to be put as placeholder of the select.
|
|
69
|
-
*/
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
/**
|
|
72
|
-
* If true, the component will be disabled.
|
|
73
|
-
*/
|
|
74
|
-
disabled?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* If true, the select will be optional, showing '(Optional)'
|
|
77
|
-
* next to the label and adding a default first option with an empty string as value,
|
|
78
|
-
* been the placeholder (if defined) its label. Otherwise, the field will be
|
|
79
|
-
* considered required and an error will be passed as a parameter to the
|
|
80
|
-
* OnBlur and onChange functions if an option wasn't selected.
|
|
81
|
-
*/
|
|
82
|
-
optional?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* If true, enables search functionality.
|
|
85
|
-
*/
|
|
86
|
-
searchable?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* If true, the select component will support multiple selected options.
|
|
89
|
-
* In that case, value will be an array of strings with each selected
|
|
90
|
-
* option value.
|
|
91
|
-
*/
|
|
92
|
-
multiple?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* This function will be called when the user selects an option.
|
|
95
|
-
* An object including the current value and the error (if the value entered is not valid)
|
|
96
|
-
* will be passed to this function. If there is no error, error will be null.
|
|
97
|
-
*/
|
|
98
|
-
onChange?: (value: string | string[]) => void;
|
|
99
|
-
/**
|
|
100
|
-
* This function will be called when the select loses the focus. An
|
|
101
|
-
* object including the value (or values) and the error (if the value
|
|
102
|
-
* selected is not valid) will be passed to this function. If there is no error,
|
|
103
|
-
* error will be null.
|
|
104
|
-
*/
|
|
105
|
-
onBlur?: (val: { value: string | string[]; error: string }) => void;
|
|
106
|
-
/**
|
|
107
|
-
* If it is defined, the component will change its appearance, showing
|
|
108
|
-
* the error below the select component. If it is not defined, the error
|
|
109
|
-
* messages will be managed internally, but never displayed on its own.
|
|
110
|
-
*/
|
|
111
|
-
error?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
114
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
115
|
-
*/
|
|
116
|
-
margin?: Space | Margin;
|
|
117
|
-
/**
|
|
118
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
119
|
-
*/
|
|
120
|
-
size?: "small" | "medium" | "large" | "fillParent";
|
|
121
|
-
/**
|
|
122
|
-
* Value of the tabindex attribute.
|
|
123
|
-
*/
|
|
124
|
-
tabIndex?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Reference to the component.
|
|
127
|
-
*/
|
|
128
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export default function DxcSelect(props: Props): JSX.Element;
|
package/sidenav/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Padding = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
padding?: Space | Padding;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default function DxcSidenav(props: Props): JSX.Element;
|