@dxc-technology/halstack-react 0.0.0-d5ae9d7 → 0.0.0-d618bea
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 -3
- 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 +2 -2
- package/accordion/Accordion.js +2 -2
- package/accordion/types.d.ts +1 -1
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +59 -73
- package/accordion-group/AccordionGroup.stories.tsx +225 -0
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- 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/box/Box.d.ts +4 -0
- package/box/Box.js +6 -32
- package/box/Box.stories.tsx +132 -0
- package/box/types.d.ts +43 -0
- package/box/types.js +5 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +9 -12
- package/button/Button.stories.tsx +217 -234
- package/button/types.d.ts +11 -11
- package/card/Card.d.ts +4 -0
- package/card/Card.js +17 -53
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +67 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Checkbox.stories.tsx +192 -0
- package/checkbox/types.d.ts +3 -4
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +1 -23
- package/chip/Chip.stories.tsx +121 -0
- package/chip/types.d.ts +53 -0
- package/chip/types.js +5 -0
- package/common/variables.js +45 -38
- package/date/Date.js +1 -1
- package/date-input/DateInput.js +4 -7
- package/date-input/DateInput.stories.tsx +138 -0
- package/dialog/Dialog.d.ts +4 -0
- package/dialog/Dialog.js +6 -25
- package/dialog/Dialog.stories.tsx +212 -0
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +8 -41
- package/dropdown/types.d.ts +89 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +65 -76
- 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 +4 -0
- package/footer/Footer.js +11 -42
- package/footer/Footer.stories.tsx +151 -0
- package/footer/types.d.ts +65 -0
- package/footer/types.js +5 -0
- package/header/Header.d.ts +7 -0
- package/header/Header.js +28 -30
- package/header/Header.stories.tsx +162 -0
- package/header/Icons.js +2 -27
- package/header/types.d.ts +47 -0
- package/header/types.js +5 -0
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +7 -24
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/input-text/InputText.js +2 -2
- package/layout/ApplicationLayout.d.ts +10 -0
- package/layout/ApplicationLayout.js +8 -18
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/layout/types.d.ts +57 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +3 -0
- package/link/Link.js +4 -26
- package/link/Link.stories.tsx +146 -0
- package/link/types.d.ts +74 -0
- package/link/types.js +5 -0
- package/list/List.d.ts +7 -0
- package/list/List.js +37 -0
- package/list/List.stories.tsx +70 -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.tsx +115 -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 +1 -1
- package/paginator/Paginator.js +2 -8
- package/paginator/Paginator.stories.tsx +63 -0
- package/password-input/PasswordInput.d.ts +4 -0
- package/password-input/PasswordInput.js +19 -55
- package/password-input/{PasswordInput.stories.jsx → PasswordInput.stories.tsx} +1 -1
- package/password-input/types.d.ts +107 -0
- package/password-input/types.js +5 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +5 -23
- package/progress-bar/ProgressBar.stories.jsx +58 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/radio/Radio.js +2 -2
- package/radio/Radio.stories.tsx +192 -0
- package/radio/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +4 -27
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/row/Row.d.ts +11 -0
- package/row/Row.js +124 -0
- package/row/Row.stories.tsx +223 -0
- package/select/Select.js +15 -17
- package/select/Select.stories.tsx +572 -0
- package/select/index.d.ts +4 -4
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +6 -15
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +61 -84
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +78 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.d.ts +4 -0
- package/spinner/Spinner.js +8 -25
- package/spinner/Spinner.stories.jsx +102 -0
- package/spinner/types.d.ts +32 -0
- package/spinner/types.js +5 -0
- package/stack/Stack.d.ts +10 -0
- package/stack/Stack.js +94 -0
- package/stack/Stack.stories.tsx +150 -0
- package/switch/Switch.js +4 -4
- package/switch/Switch.stories.tsx +160 -0
- package/table/Table.d.ts +4 -0
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +276 -0
- package/table/types.d.ts +21 -0
- package/table/types.js +5 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +9 -55
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +70 -0
- package/tabs/types.js +5 -0
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +21 -36
- package/tag/Tag.stories.tsx +145 -0
- package/tag/types.d.ts +60 -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 +42 -81
- 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.js +29 -32
- package/textarea/Textarea.stories.jsx +135 -0
- package/textarea/index.d.ts +18 -8
- package/toggle/Toggle.js +1 -1
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +8 -34
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -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 +13 -53
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/accordion-group/index.d.ts +0 -16
- package/box/index.d.ts +0 -25
- package/card/index.d.ts +0 -22
- package/chip/index.d.ts +0 -22
- package/dialog/index.d.ts +0 -18
- package/dropdown/index.d.ts +0 -26
- package/file-input/index.d.ts +0 -81
- package/footer/index.d.ts +0 -25
- package/header/index.d.ts +0 -25
- package/heading/index.d.ts +0 -17
- package/link/index.d.ts +0 -23
- package/number-input/index.d.ts +0 -113
- package/password-input/index.d.ts +0 -94
- package/progress-bar/index.d.ts +0 -18
- package/resultsetTable/index.d.ts +0 -19
- package/sidenav/index.d.ts +0 -13
- package/slider/index.d.ts +0 -29
- package/spinner/index.d.ts +0 -17
- package/table/index.d.ts +0 -13
- package/tabs/index.d.ts +0 -19
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/toggle-group/index.d.ts +0 -21
- 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,64 @@
|
|
|
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 used as the icon to be displayed in the step.
|
|
21
|
+
*/
|
|
22
|
+
icon?: SVG;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated URL of the icon to be displayed in the step.
|
|
25
|
+
*/
|
|
26
|
+
iconSrc?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the step is disabled or not.
|
|
29
|
+
*/
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the step is valid or not.
|
|
33
|
+
*/
|
|
34
|
+
valid?: boolean;
|
|
35
|
+
};
|
|
36
|
+
declare type Props = {
|
|
37
|
+
/**
|
|
38
|
+
* The wizard can be showed in horizontal or vertical.
|
|
39
|
+
*/
|
|
40
|
+
mode?: "horizontal" | "vertical";
|
|
41
|
+
/**
|
|
42
|
+
* Defines which step is marked as the current. The numeration starts in 0.
|
|
43
|
+
*/
|
|
44
|
+
currentStep?: number;
|
|
45
|
+
/**
|
|
46
|
+
* This function will be called when the user clicks a step. The step
|
|
47
|
+
* number will be passed as a parameter.
|
|
48
|
+
*/
|
|
49
|
+
onStepClick?: (newCurrentStep: number) => void;
|
|
50
|
+
/**
|
|
51
|
+
* An array of objects representing the steps.
|
|
52
|
+
*/
|
|
53
|
+
steps: Step[];
|
|
54
|
+
/**
|
|
55
|
+
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
56
|
+
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
57
|
+
*/
|
|
58
|
+
margin?: Space | Margin;
|
|
59
|
+
/**
|
|
60
|
+
* Value of the tabindex attribute that is given to all the steps.
|
|
61
|
+
*/
|
|
62
|
+
tabIndex?: number;
|
|
63
|
+
};
|
|
64
|
+
export default Props;
|
package/wizard/types.js
ADDED
|
@@ -1,16 +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
|
-
disabled?: boolean;
|
|
11
|
-
onActiveChange?: void;
|
|
12
|
-
indexActive?: number;
|
|
13
|
-
margin?: Space | Margin;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default function DxcAccordionGroup(props: Props): JSX.Element;
|
package/box/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
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 Padding = {
|
|
10
|
-
top?: Space;
|
|
11
|
-
bottom?: Space;
|
|
12
|
-
left?: Space;
|
|
13
|
-
right?: Space;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type Props = {
|
|
18
|
-
shadowDepth?: 0 | 1 | 2;
|
|
19
|
-
margin?: Space | Margin;
|
|
20
|
-
padging?: Space | Padding;
|
|
21
|
-
display: string;
|
|
22
|
-
size: Size;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default function DxcBox(props: Props): JSX.Element;
|
package/card/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
|
-
imageSrc?: string;
|
|
11
|
-
margin?: Space | Margin;
|
|
12
|
-
contentPadding?: any;
|
|
13
|
-
linkHref?: string;
|
|
14
|
-
onClick?: void;
|
|
15
|
-
imageBgColor?: string;
|
|
16
|
-
imagePadding?: any;
|
|
17
|
-
imagePosition?: "before" | "after";
|
|
18
|
-
outlined?: boolean;
|
|
19
|
-
imageCover?: boolean;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default function DxcCard(props: Props): JSX.Element;
|
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/dialog/index.d.ts
DELETED
|
@@ -1,18 +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
|
-
isCloseVisible?: boolean;
|
|
11
|
-
onCloseClick?: void;
|
|
12
|
-
overlay?: boolean;
|
|
13
|
-
onBackgroundClick?: void;
|
|
14
|
-
padding?: Padding,
|
|
15
|
-
tabIndex?: number;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default function DxcDialog(props: Props): JSX.Element;
|
package/dropdown/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
type Size = "small" | "medium" | "large" | "fillParent" | "fitContent";
|
|
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
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
options?: any;
|
|
12
|
-
optionsIconPosition?: "before" | "after";
|
|
13
|
-
icon?: any;
|
|
14
|
-
iconSrc?: string;
|
|
15
|
-
iconPosition?: "before" | "after";
|
|
16
|
-
label?: string;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
caretHidden?: boolean;
|
|
19
|
-
onSelectOption?: void;
|
|
20
|
-
expandOnHover?: boolean;
|
|
21
|
-
margin?: Space | Margin;
|
|
22
|
-
size?: Size;
|
|
23
|
-
tabIndex?: number;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default function DxcDropdown(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/footer/index.d.ts
DELETED
|
@@ -1,25 +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 Padding = {
|
|
9
|
-
top?: Space;
|
|
10
|
-
bottom?: Space;
|
|
11
|
-
left?: Space;
|
|
12
|
-
right?: Space;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type Props = {
|
|
16
|
-
socialLinks?: any;
|
|
17
|
-
bottomLinks?: any;
|
|
18
|
-
copyright?: string;
|
|
19
|
-
padding?: Space | Padding;
|
|
20
|
-
margin?: Space | Margin;
|
|
21
|
-
tabIndex?: number;
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default function DxcFooter(props: Props): JSX.Element;
|
package/header/index.d.ts
DELETED
|
@@ -1,25 +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 Padding = {
|
|
9
|
-
top?: Space;
|
|
10
|
-
bottom?: Space;
|
|
11
|
-
left?: Space;
|
|
12
|
-
right?: Space;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type Props = {
|
|
16
|
-
underlined?: boolean;
|
|
17
|
-
onClick?: void;
|
|
18
|
-
content?: any;
|
|
19
|
-
responsiveContent?: any;
|
|
20
|
-
margin?: Space | Margin;
|
|
21
|
-
padding?: Space | Padding;
|
|
22
|
-
tabIndex?: number;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default function DxcHeader(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/link/index.d.ts
DELETED
|
@@ -1,23 +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
|
-
inheritColor?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
iconSrc?: string;
|
|
13
|
-
icon?: any;
|
|
14
|
-
iconPosition?: "before" | "after";
|
|
15
|
-
href?: string;
|
|
16
|
-
newWindow?: boolean;
|
|
17
|
-
onClick?: void;
|
|
18
|
-
text?: string;
|
|
19
|
-
margin?: Space | Margin;
|
|
20
|
-
tabIndex?: number;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default function DxcLink(props: Props): JSX.Element;
|