@dxc-technology/halstack-react 0.0.0-0e90110 → 0.0.0-1021ecf
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.js +0 -1
- package/accordion/Accordion.stories.tsx +307 -0
- package/accordion/types.d.ts +1 -1
- package/accordion-group/types.d.ts +1 -1
- package/card/Card.stories.tsx +1 -1
- package/checkbox/types.d.ts +1 -1
- package/chip/Chip.js +4 -4
- package/chip/types.d.ts +2 -2
- package/common/variables.js +55 -21
- package/date-input/DateInput.js +9 -12
- package/dialog/Dialog.js +2 -1
- package/dropdown/Dropdown.stories.tsx +247 -0
- package/file-input/FileInput.d.ts +1 -1
- package/file-input/FileInput.js +147 -68
- package/file-input/FileInput.stories.tsx +507 -0
- package/file-input/FileItem.js +2 -2
- package/file-input/types.d.ts +32 -7
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +10 -16
- 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 +5 -9
- package/header/Icons.d.ts +2 -0
- package/heading/Heading.stories.tsx +3 -2
- package/layout/ApplicationLayout.js +2 -1
- package/layout/ApplicationLayout.stories.tsx +171 -0
- package/list/List.d.ts +8 -0
- package/list/List.js +47 -0
- package/list/List.stories.tsx +95 -0
- package/main.d.ts +5 -1
- package/main.js +32 -0
- package/number-input/NumberInput.js +3 -6
- package/package.json +4 -2
- package/paginator/Paginator.js +0 -6
- package/password-input/PasswordInput.js +12 -13
- package/password-input/PasswordInput.stories.tsx +3 -3
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +130 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +268 -0
- package/radio-group/RadioGroup.stories.tsx +79 -0
- package/radio-group/types.d.ts +36 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/ResultsetTable.js +1 -1
- package/resultsetTable/ResultsetTable.stories.tsx +277 -0
- package/resultsetTable/types.d.ts +1 -1
- package/row/Row.d.ts +11 -0
- package/row/Row.js +127 -0
- package/row/Row.stories.tsx +239 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +19 -21
- package/select/types.d.ts +170 -0
- package/select/types.js +5 -0
- package/sidenav/Sidenav.stories.tsx +18 -1
- package/spinner/Spinner.stories.jsx +1 -0
- package/stack/Stack.d.ts +10 -0
- package/stack/Stack.js +97 -0
- package/stack/Stack.stories.tsx +166 -0
- package/switch/Switch.stories.tsx +1 -1
- package/table/Table.stories.jsx +2 -1
- package/tabs/Tabs.stories.tsx +1 -0
- package/tag/Tag.stories.tsx +1 -1
- package/text/Text.d.ts +7 -0
- package/text/Text.js +30 -0
- package/text/Text.stories.tsx +19 -0
- package/text-input/TextInput.js +26 -20
- package/text-input/TextInput.stories.tsx +4 -4
- package/text-input/types.d.ts +1 -1
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +14 -46
- package/textarea/Textarea.stories.jsx +4 -3
- package/textarea/types.d.ts +130 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.js +12 -15
- package/toggle-group/ToggleGroup.stories.tsx +23 -28
- package/toggle-group/types.d.ts +38 -25
- package/wizard/Wizard.js +58 -8
- package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +0 -0
- package/wizard/types.d.ts +2 -6
- package/select/index.d.ts +0 -131
- package/textarea/index.d.ts +0 -127
- package/wizard/Icons.js +0 -65
|
@@ -17,7 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
/* eslint-disable prefer-template */
|
|
21
20
|
var BackgroundColorContext = /*#__PURE__*/_react["default"].createContext(null);
|
|
22
21
|
|
|
23
22
|
var getColorType = function getColorType(hexColor) {
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcAccordion from "./Accordion";
|
|
3
|
+
import DxcHeading from "../heading/Heading";
|
|
4
|
+
import DxcTextInput from "../text-input/TextInput";
|
|
5
|
+
import DxcButton from "../button/Button";
|
|
6
|
+
import Title from "../../.storybook/components/Title";
|
|
7
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
8
|
+
import { ThemeProvider } from "../ThemeContext";
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: "Accordion",
|
|
12
|
+
component: DxcAccordion,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const folderIcon = (
|
|
16
|
+
<svg
|
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
enable-background="new 0 0 24 24"
|
|
19
|
+
height="24px"
|
|
20
|
+
viewBox="0 0 24 24"
|
|
21
|
+
width="24px"
|
|
22
|
+
fill="currentColor"
|
|
23
|
+
>
|
|
24
|
+
<g>
|
|
25
|
+
<rect fill="none" height="24" width="24" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<path d="M20,6h-8l-2-2H4C2.9,4,2.01,4.9,2.01,6L2,18c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M16,16h2v-2h-2v-2 h2v-2h-2V8h4v10h-4V16z M16,16h-2v2H4V6h5.17l2,2H14v2h2v2h-2v2h2V16z" />
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const thumbIcon = (
|
|
34
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="currentColor">
|
|
35
|
+
<path d="M0 0h24v24H0V0z" fill="none" />
|
|
36
|
+
<path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z" />
|
|
37
|
+
</svg>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const advancedTheme = {
|
|
41
|
+
accordion: {
|
|
42
|
+
backgroundColor: "#000000",
|
|
43
|
+
assistiveTextFontColor: "#ffffff",
|
|
44
|
+
titleLabelFontColor: "#ffffff",
|
|
45
|
+
arrowColor: "#5f249f",
|
|
46
|
+
iconColor: "#5f249f",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Chromatic = () => (
|
|
51
|
+
<>
|
|
52
|
+
<Title title="Component anatomy" theme="light" level={2} />
|
|
53
|
+
<ExampleContainer>
|
|
54
|
+
<Title title="With label" theme="light" level={4} />
|
|
55
|
+
<DxcAccordion label="Accordion">
|
|
56
|
+
<div>
|
|
57
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
58
|
+
lobortis eget.
|
|
59
|
+
</div>
|
|
60
|
+
</DxcAccordion>
|
|
61
|
+
</ExampleContainer>
|
|
62
|
+
<ExampleContainer>
|
|
63
|
+
<Title title="With assistive text" theme="light" level={4} />
|
|
64
|
+
<DxcAccordion label="Accordion" assistiveText="Assistive text">
|
|
65
|
+
<div>
|
|
66
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
67
|
+
lobortis eget.
|
|
68
|
+
</div>
|
|
69
|
+
</DxcAccordion>
|
|
70
|
+
</ExampleContainer>
|
|
71
|
+
<ExampleContainer>
|
|
72
|
+
<Title title="With icon" theme="light" level={4} />
|
|
73
|
+
<DxcAccordion label="Accordion" assistiveText="Assistive text" icon={folderIcon}>
|
|
74
|
+
<div>
|
|
75
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
76
|
+
lobortis eget.
|
|
77
|
+
</div>
|
|
78
|
+
</DxcAccordion>
|
|
79
|
+
</ExampleContainer>
|
|
80
|
+
<ExampleContainer>
|
|
81
|
+
<Title title="With bigger icon 48x48" theme="light" level={4} />
|
|
82
|
+
<DxcAccordion label="Accordion" assistiveText="Assistive text" icon={thumbIcon}>
|
|
83
|
+
<div>
|
|
84
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
85
|
+
lobortis eget.
|
|
86
|
+
</div>
|
|
87
|
+
</DxcAccordion>
|
|
88
|
+
</ExampleContainer>
|
|
89
|
+
<Title title="States" theme="light" level={2} />
|
|
90
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
91
|
+
<Title title="Focused" theme="light" level={4} />
|
|
92
|
+
<DxcAccordion label="Focused">
|
|
93
|
+
<div>
|
|
94
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
95
|
+
lobortis eget.
|
|
96
|
+
</div>
|
|
97
|
+
</DxcAccordion>
|
|
98
|
+
</ExampleContainer>
|
|
99
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
100
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
101
|
+
<DxcAccordion label="Hovered">
|
|
102
|
+
<div>
|
|
103
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
104
|
+
lobortis eget.
|
|
105
|
+
</div>
|
|
106
|
+
</DxcAccordion>
|
|
107
|
+
</ExampleContainer>
|
|
108
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
109
|
+
<Title title="Active" theme="light" level={4} />
|
|
110
|
+
<DxcAccordion label="Active">
|
|
111
|
+
<div>
|
|
112
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
113
|
+
lobortis eget.
|
|
114
|
+
</div>
|
|
115
|
+
</DxcAccordion>
|
|
116
|
+
</ExampleContainer>
|
|
117
|
+
<ExampleContainer>
|
|
118
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
119
|
+
<DxcAccordion label="Disabled" assistiveText="Assistive text" icon={folderIcon} disabled>
|
|
120
|
+
<div>
|
|
121
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
122
|
+
lobortis eget.
|
|
123
|
+
</div>
|
|
124
|
+
</DxcAccordion>
|
|
125
|
+
</ExampleContainer>
|
|
126
|
+
<ExampleContainer>
|
|
127
|
+
<Title title="Background color provider over accordion content" theme="light" level={4} />
|
|
128
|
+
<ThemeProvider advancedTheme={advancedTheme}>
|
|
129
|
+
<DxcAccordion
|
|
130
|
+
label="Dark Accordion"
|
|
131
|
+
isExpanded
|
|
132
|
+
assistiveText="Assistive text"
|
|
133
|
+
icon={folderIcon}
|
|
134
|
+
padding="medium"
|
|
135
|
+
>
|
|
136
|
+
<div style={{ display: "flex", flexDirection: "column" }}>
|
|
137
|
+
<DxcTextInput
|
|
138
|
+
label="Label"
|
|
139
|
+
helperText="HelperText"
|
|
140
|
+
placeholder="Placeholder"
|
|
141
|
+
size="fillParent"
|
|
142
|
+
margin={{ bottom: "medium" }}
|
|
143
|
+
/>
|
|
144
|
+
<DxcButton label="Submit" size="medium" />
|
|
145
|
+
</div>
|
|
146
|
+
</DxcAccordion>
|
|
147
|
+
</ThemeProvider>
|
|
148
|
+
</ExampleContainer>
|
|
149
|
+
<Title title="Paddings" theme="light" level={2} />
|
|
150
|
+
<ExampleContainer>
|
|
151
|
+
<Title title="Xxsmall padding" theme="light" level={4} />
|
|
152
|
+
<DxcAccordion label="Xxsmall padding" isExpanded padding="xxsmall">
|
|
153
|
+
<div>
|
|
154
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
155
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
156
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
157
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
158
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
159
|
+
est laborum.
|
|
160
|
+
</div>
|
|
161
|
+
</DxcAccordion>
|
|
162
|
+
</ExampleContainer>
|
|
163
|
+
<ExampleContainer>
|
|
164
|
+
<Title title="Xsmall padding" theme="light" level={4} />
|
|
165
|
+
<DxcAccordion label="Xsmall padding" isExpanded padding="xsmall">
|
|
166
|
+
<div>
|
|
167
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
168
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
169
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
170
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
171
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
172
|
+
est laborum.
|
|
173
|
+
</div>
|
|
174
|
+
</DxcAccordion>
|
|
175
|
+
</ExampleContainer>
|
|
176
|
+
<ExampleContainer>
|
|
177
|
+
<Title title="Small padding" theme="light" level={4} />
|
|
178
|
+
<DxcAccordion label="Small padding" isExpanded padding="small">
|
|
179
|
+
<div>
|
|
180
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
181
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
182
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
183
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
184
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
185
|
+
est laborum.
|
|
186
|
+
</div>
|
|
187
|
+
</DxcAccordion>
|
|
188
|
+
</ExampleContainer>
|
|
189
|
+
<ExampleContainer>
|
|
190
|
+
<Title title="Medium padding" theme="light" level={4} />
|
|
191
|
+
<DxcAccordion label="Medium padding" isExpanded padding="medium">
|
|
192
|
+
<div>
|
|
193
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
194
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
195
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
196
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
197
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
198
|
+
est laborum.
|
|
199
|
+
</div>
|
|
200
|
+
</DxcAccordion>
|
|
201
|
+
</ExampleContainer>
|
|
202
|
+
<ExampleContainer>
|
|
203
|
+
<Title title="Large padding" theme="light" level={4} />
|
|
204
|
+
<DxcAccordion label="Large padding" isExpanded padding="large">
|
|
205
|
+
<div>
|
|
206
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
207
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
208
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
209
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
210
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
211
|
+
est laborum.
|
|
212
|
+
</div>
|
|
213
|
+
</DxcAccordion>
|
|
214
|
+
</ExampleContainer>
|
|
215
|
+
<ExampleContainer>
|
|
216
|
+
<Title title="Xlarge padding" theme="light" level={4} />
|
|
217
|
+
<DxcAccordion label="Xlarge padding" isExpanded padding="xlarge">
|
|
218
|
+
<div>
|
|
219
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
220
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
221
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
222
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
223
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
224
|
+
est laborum.
|
|
225
|
+
</div>
|
|
226
|
+
</DxcAccordion>
|
|
227
|
+
</ExampleContainer>
|
|
228
|
+
<ExampleContainer>
|
|
229
|
+
<Title title="Xxlarge padding" theme="light" level={4} />
|
|
230
|
+
<DxcAccordion label="Xxlarge padding" isExpanded padding="xxlarge">
|
|
231
|
+
<div>
|
|
232
|
+
<DxcHeading level={5} text="Content header" margin={{ bottom: "xxsmall" }} />
|
|
233
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
234
|
+
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
235
|
+
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
236
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
|
|
237
|
+
est laborum.
|
|
238
|
+
</div>
|
|
239
|
+
</DxcAccordion>
|
|
240
|
+
</ExampleContainer>
|
|
241
|
+
<Title title="Margins" theme="light" level={2} />
|
|
242
|
+
<ExampleContainer>
|
|
243
|
+
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
244
|
+
<DxcAccordion label="Xxsmall margin" margin="xxsmall">
|
|
245
|
+
<div>
|
|
246
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
247
|
+
lobortis eget.
|
|
248
|
+
</div>
|
|
249
|
+
</DxcAccordion>
|
|
250
|
+
</ExampleContainer>
|
|
251
|
+
<ExampleContainer>
|
|
252
|
+
<Title title="Xsmall margin" theme="light" level={4} />
|
|
253
|
+
<DxcAccordion label="Xsmall margin" margin="xsmall">
|
|
254
|
+
<div>
|
|
255
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
256
|
+
lobortis eget.
|
|
257
|
+
</div>
|
|
258
|
+
</DxcAccordion>
|
|
259
|
+
</ExampleContainer>
|
|
260
|
+
<ExampleContainer>
|
|
261
|
+
<Title title="Small margin" theme="light" level={4} />
|
|
262
|
+
<DxcAccordion label="Small margin" margin="small">
|
|
263
|
+
<div>
|
|
264
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
265
|
+
lobortis eget.
|
|
266
|
+
</div>
|
|
267
|
+
</DxcAccordion>
|
|
268
|
+
</ExampleContainer>
|
|
269
|
+
<ExampleContainer>
|
|
270
|
+
<Title title="Medium margin" theme="light" level={4} />
|
|
271
|
+
<DxcAccordion label="Medium margin" margin="medium">
|
|
272
|
+
<div>
|
|
273
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
274
|
+
lobortis eget.
|
|
275
|
+
</div>
|
|
276
|
+
</DxcAccordion>
|
|
277
|
+
</ExampleContainer>
|
|
278
|
+
<ExampleContainer>
|
|
279
|
+
<Title title="Large margin" theme="light" level={4} />
|
|
280
|
+
<DxcAccordion label="Large margin" margin="large">
|
|
281
|
+
<div>
|
|
282
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
283
|
+
lobortis eget.
|
|
284
|
+
</div>
|
|
285
|
+
</DxcAccordion>
|
|
286
|
+
</ExampleContainer>
|
|
287
|
+
<ExampleContainer>
|
|
288
|
+
<Title title="Xlarge margin" theme="light" level={4} />
|
|
289
|
+
<DxcAccordion label="Xlarge margin" margin="xlarge">
|
|
290
|
+
<div>
|
|
291
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
292
|
+
lobortis eget.
|
|
293
|
+
</div>
|
|
294
|
+
</DxcAccordion>
|
|
295
|
+
</ExampleContainer>
|
|
296
|
+
<ExampleContainer>
|
|
297
|
+
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
298
|
+
<DxcAccordion label="Xxlarge margin" margin="xxlarge">
|
|
299
|
+
<div>
|
|
300
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo
|
|
301
|
+
lobortis eget.
|
|
302
|
+
</div>
|
|
303
|
+
</DxcAccordion>
|
|
304
|
+
<hr />
|
|
305
|
+
</ExampleContainer>
|
|
306
|
+
</>
|
|
307
|
+
);
|
package/accordion/types.d.ts
CHANGED
package/card/Card.stories.tsx
CHANGED
|
@@ -174,7 +174,7 @@ const actionCard = () => (
|
|
|
174
174
|
<Title title="Focused default with action" theme="light" level={4} />
|
|
175
175
|
<DxcCard onClick={() => {}}>Focused default with action</DxcCard>
|
|
176
176
|
</ExampleContainer>
|
|
177
|
-
<ExampleContainer>
|
|
177
|
+
<ExampleContainer expanded>
|
|
178
178
|
<Title title="Hovered default with action" theme="light" level={4} />
|
|
179
179
|
<DxcCard onClick={() => {}}>Hovered default with action</DxcCard>
|
|
180
180
|
</ExampleContainer>
|
package/checkbox/types.d.ts
CHANGED
package/chip/Chip.js
CHANGED
|
@@ -54,7 +54,7 @@ var DxcChip = function DxcChip(_ref) {
|
|
|
54
54
|
mode: "prefix",
|
|
55
55
|
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
56
56
|
onClick: function onClick() {
|
|
57
|
-
return onClickPrefix && !disabled && onClickPrefix(
|
|
57
|
+
return onClickPrefix && !disabled && onClickPrefix();
|
|
58
58
|
},
|
|
59
59
|
interactuable: typeof onClickPrefix === "function" && !disabled
|
|
60
60
|
}, (0, _typeof2["default"])(prefixIcon) === "object" ? prefixIcon : /*#__PURE__*/_react["default"].createElement(prefixIcon)) : prefixIconSrc && /*#__PURE__*/_react["default"].createElement(PrefixIconContainer, {
|
|
@@ -63,7 +63,7 @@ var DxcChip = function DxcChip(_ref) {
|
|
|
63
63
|
label: label,
|
|
64
64
|
tabIndex: typeof onClickPrefix === "function" && !disabled ? tabIndex : -1,
|
|
65
65
|
onClick: function onClick() {
|
|
66
|
-
return onClickPrefix && !disabled && onClickPrefix(
|
|
66
|
+
return onClickPrefix && !disabled && onClickPrefix();
|
|
67
67
|
},
|
|
68
68
|
interactuable: typeof onClickPrefix === "function" && !disabled
|
|
69
69
|
}), label && /*#__PURE__*/_react["default"].createElement(ChipTextContainer, {
|
|
@@ -77,7 +77,7 @@ var DxcChip = function DxcChip(_ref) {
|
|
|
77
77
|
label: label,
|
|
78
78
|
tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
|
|
79
79
|
onClick: function onClick() {
|
|
80
|
-
return onClickSuffix && !disabled && onClickSuffix(
|
|
80
|
+
return onClickSuffix && !disabled && onClickSuffix();
|
|
81
81
|
},
|
|
82
82
|
interactuable: typeof onClickSuffix === "function" && !disabled
|
|
83
83
|
}, (0, _typeof2["default"])(suffixIcon) === "object" ? suffixIcon : /*#__PURE__*/_react["default"].createElement(suffixIcon)) : suffixIconSrc && /*#__PURE__*/_react["default"].createElement(SuffixIconContainer, {
|
|
@@ -86,7 +86,7 @@ var DxcChip = function DxcChip(_ref) {
|
|
|
86
86
|
label: label,
|
|
87
87
|
tabIndex: typeof onClickSuffix === "function" && !disabled ? tabIndex : -1,
|
|
88
88
|
onClick: function onClick() {
|
|
89
|
-
return onClickSuffix && !disabled && onClickSuffix(
|
|
89
|
+
return onClickSuffix && !disabled && onClickSuffix();
|
|
90
90
|
},
|
|
91
91
|
interactuable: typeof onClickSuffix === "function" && !disabled
|
|
92
92
|
})));
|
package/chip/types.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare type Props = {
|
|
|
27
27
|
/**
|
|
28
28
|
* This function will be called when the suffix is clicked.
|
|
29
29
|
*/
|
|
30
|
-
onClickSuffix?: (
|
|
30
|
+
onClickSuffix?: () => void;
|
|
31
31
|
/**
|
|
32
32
|
* @deprecated Path of the icon to be placed before the chip label.
|
|
33
33
|
*/
|
|
@@ -35,7 +35,7 @@ declare type Props = {
|
|
|
35
35
|
/**
|
|
36
36
|
* This function will be called when the prefix is clicked.
|
|
37
37
|
*/
|
|
38
|
-
onClickPrefix?: (
|
|
38
|
+
onClickPrefix?: () => void;
|
|
39
39
|
/**
|
|
40
40
|
* If true, the component will be disabled.
|
|
41
41
|
*/
|
package/common/variables.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -9,7 +7,7 @@ exports.typeface = exports.spaces = exports.responsiveSizes = exports.globalToke
|
|
|
9
7
|
|
|
10
8
|
var _Icons = require("../header/Icons");
|
|
11
9
|
|
|
12
|
-
var _Icons2 =
|
|
10
|
+
var _Icons2 = require("../footer/Icons");
|
|
13
11
|
|
|
14
12
|
var globalTokens = {
|
|
15
13
|
// Color
|
|
@@ -99,7 +97,7 @@ var globalTokens = {
|
|
|
99
97
|
type_sans: "Open Sans, sans-serif",
|
|
100
98
|
type_scale_root: "16px",
|
|
101
99
|
type_scale_08: "3.75rem",
|
|
102
|
-
type_scale_07: "
|
|
100
|
+
type_scale_07: "2.5rem",
|
|
103
101
|
type_scale_06: "2rem",
|
|
104
102
|
type_scale_05: "1.5rem",
|
|
105
103
|
type_scale_04: "1.25rem",
|
|
@@ -542,10 +540,8 @@ var componentTokens = {
|
|
|
542
540
|
fileItemBorderThickness: globalTokens.border_width_1,
|
|
543
541
|
fileItemBorderStyle: globalTokens.border_solid,
|
|
544
542
|
fileItemBorderRadius: globalTokens.border_radius_medium,
|
|
545
|
-
hoverDeleteFileItemBackgroundColor:
|
|
546
|
-
activeDeleteFileItemBackgroundColor:
|
|
547
|
-
errorHoverDeleteFileItemBackgroundColor: globalTokens.hal_red_l_95,
|
|
548
|
-
errorActiveDeleteFileItemBackgroundColor: globalTokens.hal_red_s_41,
|
|
543
|
+
hoverDeleteFileItemBackgroundColor: "#0000000d",
|
|
544
|
+
activeDeleteFileItemBackgroundColor: "#00000033",
|
|
549
545
|
focusActionBorderColor: globalTokens.hal_blue_l_50
|
|
550
546
|
},
|
|
551
547
|
footer: {
|
|
@@ -566,7 +562,7 @@ var componentTokens = {
|
|
|
566
562
|
copyrightFontStyle: globalTokens.type_normal,
|
|
567
563
|
copyrightFontWeight: globalTokens.type_regular,
|
|
568
564
|
copyrightFontColor: globalTokens.hal_white,
|
|
569
|
-
logo:
|
|
565
|
+
logo: "",
|
|
570
566
|
logoHeight: "32px",
|
|
571
567
|
logoWidth: "auto",
|
|
572
568
|
socialLinksSize: "24px",
|
|
@@ -584,8 +580,8 @@ var componentTokens = {
|
|
|
584
580
|
hamburguerTextTransform: globalTokens.type_uppercase,
|
|
585
581
|
hamburguerIconColor: globalTokens.hal_black,
|
|
586
582
|
hamburguerHoverColor: globalTokens.mediumGreyBlack,
|
|
587
|
-
logo:
|
|
588
|
-
logoResponsive:
|
|
583
|
+
logo: "",
|
|
584
|
+
logoResponsive: "",
|
|
589
585
|
logoHeight: "40px",
|
|
590
586
|
logoWidth: "auto",
|
|
591
587
|
menuBackgroundColor: globalTokens.hal_white,
|
|
@@ -609,37 +605,37 @@ var componentTokens = {
|
|
|
609
605
|
heading: {
|
|
610
606
|
level1FontColor: globalTokens.inherit,
|
|
611
607
|
level1FontFamily: globalTokens.type_sans,
|
|
612
|
-
level1FontSize: globalTokens.
|
|
608
|
+
level1FontSize: globalTokens.type_scale_07,
|
|
613
609
|
level1FontStyle: globalTokens.type_normal,
|
|
614
|
-
level1FontWeight: globalTokens.
|
|
610
|
+
level1FontWeight: globalTokens.type_semibold,
|
|
615
611
|
level1LineHeight: globalTokens.type_leading_compact_01,
|
|
616
612
|
level1LetterSpacing: globalTokens.type_spacing_tight_01,
|
|
617
613
|
level2FontColor: globalTokens.inherit,
|
|
618
614
|
level2FontFamily: globalTokens.type_sans,
|
|
619
|
-
level2FontSize: globalTokens.
|
|
615
|
+
level2FontSize: globalTokens.type_scale_05,
|
|
620
616
|
level2FontStyle: globalTokens.type_normal,
|
|
621
|
-
level2FontWeight: globalTokens.
|
|
617
|
+
level2FontWeight: globalTokens.type_semibold,
|
|
622
618
|
level2LineHeight: globalTokens.type_leading_normal,
|
|
623
619
|
level2LetterSpacing: globalTokens.type_spacing_normal,
|
|
624
620
|
level3FontColor: globalTokens.inherit,
|
|
625
621
|
level3FontFamily: globalTokens.type_sans,
|
|
626
|
-
level3FontSize: globalTokens.
|
|
622
|
+
level3FontSize: globalTokens.type_scale_04,
|
|
627
623
|
level3FontStyle: globalTokens.type_normal,
|
|
628
|
-
level3FontWeight: globalTokens.
|
|
624
|
+
level3FontWeight: globalTokens.type_semibold,
|
|
629
625
|
level3LineHeight: globalTokens.type_leading_compact_01,
|
|
630
626
|
level3LetterSpacing: globalTokens.type_spacing_wide_01,
|
|
631
627
|
level4FontColor: globalTokens.inherit,
|
|
632
628
|
level4FontFamily: globalTokens.type_sans,
|
|
633
|
-
level4FontSize: globalTokens.
|
|
629
|
+
level4FontSize: globalTokens.type_scale_03,
|
|
634
630
|
level4FontStyle: globalTokens.type_normal,
|
|
635
|
-
level4FontWeight: globalTokens.
|
|
631
|
+
level4FontWeight: globalTokens.type_semibold,
|
|
636
632
|
level4LineHeight: globalTokens.type_leading_normal,
|
|
637
633
|
level4LetterSpacing: globalTokens.type_spacing_normal,
|
|
638
634
|
level5FontColor: globalTokens.inherit,
|
|
639
635
|
level5FontFamily: globalTokens.type_sans,
|
|
640
|
-
level5FontSize: globalTokens.
|
|
636
|
+
level5FontSize: globalTokens.type_scale_02,
|
|
641
637
|
level5FontStyle: globalTokens.type_normal,
|
|
642
|
-
level5FontWeight: globalTokens.
|
|
638
|
+
level5FontWeight: globalTokens.type_semibold,
|
|
643
639
|
level5LineHeight: globalTokens.type_leading_normal,
|
|
644
640
|
level5LetterSpacing: globalTokens.type_spacing_wide_01
|
|
645
641
|
},
|
|
@@ -881,6 +877,44 @@ var componentTokens = {
|
|
|
881
877
|
fontStyle: globalTokens.type_normal,
|
|
882
878
|
fontWeight: globalTokens.type_regular
|
|
883
879
|
},
|
|
880
|
+
radioGroup: {
|
|
881
|
+
fontFamily: globalTokens.type_sans,
|
|
882
|
+
radioInputColor: globalTokens.hal_blue_l_45,
|
|
883
|
+
hoverRadioInputColor: globalTokens.hal_blue_s_35,
|
|
884
|
+
focusBorderColor: globalTokens.hal_blue_l_50,
|
|
885
|
+
activeRadioInputColor: globalTokens.hal_blue_d_20,
|
|
886
|
+
errorRadioInputColor: globalTokens.hal_red_s_41,
|
|
887
|
+
hoverErrorRadioInputColor: globalTokens.hal_red_d_30,
|
|
888
|
+
activeErrorRadioInputColor: globalTokens.hal_red_d_20,
|
|
889
|
+
readonlyRadioInputColor: globalTokens.hal_grey_l_60,
|
|
890
|
+
hoverReadonlyRadioInputColor: globalTokens.color_grey_600,
|
|
891
|
+
activeReadonlyRadioInputColor: globalTokens.hal_grey_s_40,
|
|
892
|
+
disabledRadioInputColor: globalTokens.hal_grey_l_60,
|
|
893
|
+
disabledLabelFontColor: globalTokens.hal_grey_l_60,
|
|
894
|
+
disabledHelperTextFontColor: globalTokens.hal_grey_l_60,
|
|
895
|
+
disabledRadioInputLabelFontColor: globalTokens.hal_grey_l_60,
|
|
896
|
+
errorMessageColor: globalTokens.hal_red_s_41,
|
|
897
|
+
labelFontColor: globalTokens.hal_black,
|
|
898
|
+
labelFontSize: globalTokens.type_scale_02,
|
|
899
|
+
labelFontStyle: globalTokens.type_normal,
|
|
900
|
+
labelFontWeight: globalTokens.type_semibold,
|
|
901
|
+
labelLineHeight: globalTokens.type_leading_loose_01,
|
|
902
|
+
optionalLabelFontWeight: globalTokens.type_regular,
|
|
903
|
+
helperTextFontColor: globalTokens.hal_black,
|
|
904
|
+
helperTextFontSize: globalTokens.type_scale_01,
|
|
905
|
+
helperTextFontStyle: globalTokens.type_normal,
|
|
906
|
+
helperTextFontWeight: globalTokens.type_regular,
|
|
907
|
+
helperTextLineHeight: globalTokens.type_leading_normal,
|
|
908
|
+
radioInputLabelFontColor: globalTokens.hal_black,
|
|
909
|
+
radioInputLabelFontSize: globalTokens.type_scale_02,
|
|
910
|
+
radioInputLabelFontStyle: globalTokens.type_normal,
|
|
911
|
+
radioInputLabelFontWeight: globalTokens.type_regular,
|
|
912
|
+
radioInputLabelLineHeight: globalTokens.type_leading_loose_01,
|
|
913
|
+
groupLabelMargin: globalTokens.spacing_03,
|
|
914
|
+
radioInputLabelMargin: globalTokens.spacing_03,
|
|
915
|
+
groupVerticalGutter: globalTokens.spacing_02,
|
|
916
|
+
groupHorizontalGutter: globalTokens.spacing_07
|
|
917
|
+
},
|
|
884
918
|
select: {
|
|
885
919
|
fontFamily: globalTokens.type_sans,
|
|
886
920
|
disabledColor: globalTokens.hal_grey_l_60,
|
package/date-input/DateInput.js
CHANGED
|
@@ -40,15 +40,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
40
40
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
41
|
|
|
42
42
|
var DxcDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
43
|
-
var
|
|
44
|
-
label = _ref$label === void 0 ? "" : _ref$label,
|
|
43
|
+
var label = _ref.label,
|
|
45
44
|
_ref$name = _ref.name,
|
|
46
45
|
name = _ref$name === void 0 ? "" : _ref$name,
|
|
47
46
|
value = _ref.value,
|
|
48
47
|
_ref$format = _ref.format,
|
|
49
48
|
format = _ref$format === void 0 ? "dd-MM-yyyy" : _ref$format,
|
|
50
|
-
|
|
51
|
-
helperText = _ref$helperText === void 0 ? "" : _ref$helperText,
|
|
49
|
+
helperText = _ref.helperText,
|
|
52
50
|
_ref$placeholder = _ref.placeholder,
|
|
53
51
|
placeholder = _ref$placeholder === void 0 ? false : _ref$placeholder,
|
|
54
52
|
_ref$clearable = _ref.clearable,
|
|
@@ -59,8 +57,7 @@ var DxcDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref
|
|
|
59
57
|
optional = _ref$optional === void 0 ? false : _ref$optional,
|
|
60
58
|
onChange = _ref.onChange,
|
|
61
59
|
onBlur = _ref.onBlur,
|
|
62
|
-
|
|
63
|
-
error = _ref$error === void 0 ? "" : _ref$error,
|
|
60
|
+
error = _ref.error,
|
|
64
61
|
_ref$autocomplete = _ref.autocomplete,
|
|
65
62
|
autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
|
|
66
63
|
margin = _ref.margin,
|
|
@@ -85,6 +82,7 @@ var DxcDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref
|
|
|
85
82
|
setAnchorEl = _useState6[1];
|
|
86
83
|
|
|
87
84
|
var colorsTheme = (0, _useTheme["default"])();
|
|
85
|
+
var refDate = ref || (0, _react.useRef)(null);
|
|
88
86
|
|
|
89
87
|
var handleCalendarOnKeyDown = function handleCalendarOnKeyDown(event) {
|
|
90
88
|
switch (event.keyCode) {
|
|
@@ -135,11 +133,10 @@ var DxcDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref
|
|
|
135
133
|
return (0, _moment["default"])(value !== null && value !== void 0 ? value : innerValue, format.toUpperCase(), true).format();
|
|
136
134
|
};
|
|
137
135
|
|
|
138
|
-
var openCalendar = function openCalendar(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
136
|
+
var openCalendar = function openCalendar() {
|
|
137
|
+
var dateBtn = refDate.current.getElementsByTagName("button")[0];
|
|
138
|
+
setIsOpen(!isOpen);
|
|
139
|
+
setAnchorEl(dateBtn);
|
|
143
140
|
};
|
|
144
141
|
|
|
145
142
|
var closeCalendar = function closeCalendar() {
|
|
@@ -321,7 +318,7 @@ var DxcDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref
|
|
|
321
318
|
margin: margin,
|
|
322
319
|
size: size,
|
|
323
320
|
tabIndex: tabIndex,
|
|
324
|
-
ref:
|
|
321
|
+
ref: refDate
|
|
325
322
|
}), /*#__PURE__*/_react["default"].createElement(_Popover["default"], {
|
|
326
323
|
onKeyDown: handleCalendarOnKeyDown,
|
|
327
324
|
open: isOpen,
|
package/dialog/Dialog.js
CHANGED
|
@@ -41,7 +41,8 @@ var DxcDialog = function DxcDialog(_ref) {
|
|
|
41
41
|
_ref$overlay = _ref.overlay,
|
|
42
42
|
overlay = _ref$overlay === void 0 ? true : _ref$overlay,
|
|
43
43
|
onBackgroundClick = _ref.onBackgroundClick,
|
|
44
|
-
padding = _ref.padding,
|
|
44
|
+
_ref$padding = _ref.padding,
|
|
45
|
+
padding = _ref$padding === void 0 ? "small" : _ref$padding,
|
|
45
46
|
_ref$tabIndex = _ref.tabIndex,
|
|
46
47
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
47
48
|
|