@dxc-technology/halstack-react 0.0.0-e628009 → 0.0.0-e690193
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/README.md +27 -47
- package/dist/index.d.mts +3923 -0
- package/dist/index.d.ts +3923 -0
- package/dist/index.js +14133 -0
- package/dist/index.mjs +14045 -0
- package/package.json +92 -68
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -248
- package/dist/V3Textarea/V3Textarea.js +0 -264
- package/dist/accordion/Accordion.js +0 -353
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/alert/Alert.js +0 -403
- package/dist/alert/index.d.ts +0 -51
- package/dist/badge/Badge.js +0 -63
- package/dist/box/Box.js +0 -156
- package/dist/button/Button.js +0 -238
- package/dist/card/Card.js +0 -254
- package/dist/checkbox/Checkbox.js +0 -300
- package/dist/chip/Chip.js +0 -265
- package/dist/common/OpenSans.css +0 -81
- package/dist/common/RequiredComponent.js +0 -40
- package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Light.ttf +0 -0
- package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/dist/common/utils.js +0 -22
- package/dist/common/variables.js +0 -1569
- package/dist/date/Date.js +0 -379
- package/dist/date-input/DateInput.js +0 -400
- package/dist/date-input/index.d.ts +0 -95
- package/dist/dialog/Dialog.js +0 -218
- package/dist/dropdown/Dropdown.js +0 -544
- package/dist/file-input/FileInput.js +0 -644
- package/dist/file-input/FileItem.js +0 -280
- package/dist/file-input/index.d.ts +0 -81
- package/dist/footer/Footer.js +0 -421
- package/dist/footer/Icons.js +0 -77
- package/dist/header/Header.js +0 -434
- package/dist/header/Icons.js +0 -59
- package/dist/heading/Heading.js +0 -230
- package/dist/input-text/Icons.js +0 -22
- package/dist/input-text/InputText.js +0 -705
- package/dist/layout/ApplicationLayout.js +0 -327
- package/dist/layout/Icons.js +0 -55
- package/dist/link/Link.js +0 -237
- package/dist/main.d.ts +0 -8
- package/dist/main.js +0 -367
- package/dist/new-select/NewSelect.js +0 -836
- package/dist/new-select/index.d.ts +0 -53
- package/dist/number-input/NumberInput.js +0 -136
- package/dist/number-input/NumberInputContext.js +0 -16
- package/dist/number-input/index.d.ts +0 -113
- package/dist/paginator/Icons.js +0 -66
- package/dist/paginator/Paginator.js +0 -283
- package/dist/password-input/PasswordInput.js +0 -198
- package/dist/password-input/index.d.ts +0 -94
- package/dist/progress-bar/ProgressBar.js +0 -242
- package/dist/radio/Radio.js +0 -209
- package/dist/resultsetTable/ResultsetTable.js +0 -358
- package/dist/select/Select.js +0 -549
- package/dist/sidenav/Sidenav.js +0 -179
- package/dist/slider/Slider.js +0 -404
- package/dist/spinner/Spinner.js +0 -381
- package/dist/switch/Switch.js +0 -222
- package/dist/table/Table.js +0 -132
- package/dist/tabs/Tabs.js +0 -343
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tag/Tag.js +0 -282
- package/dist/text-input/TextInput.js +0 -971
- package/dist/text-input/index.d.ts +0 -135
- package/dist/textarea/Textarea.js +0 -369
- package/dist/textarea/index.d.ts +0 -117
- package/dist/toggle/Toggle.js +0 -220
- package/dist/toggle-group/ToggleGroup.js +0 -327
- package/dist/upload/Upload.js +0 -205
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/dist/upload/buttons-upload/Icons.js +0 -40
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
- package/dist/upload/dragAndDropArea/Icons.js +0 -39
- package/dist/upload/file-upload/FileToUpload.js +0 -189
- package/dist/upload/file-upload/Icons.js +0 -66
- package/dist/upload/files-upload/FilesToUpload.js +0 -123
- package/dist/upload/transaction/Icons.js +0 -160
- package/dist/upload/transaction/Transaction.js +0 -148
- package/dist/upload/transactions/Transactions.js +0 -138
- package/dist/useTheme.js +0 -22
- package/dist/wizard/Icons.js +0 -65
- package/dist/wizard/Wizard.js +0 -405
- package/test/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -397
- package/test/DateInput.test.js +0 -242
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -145
- package/test/FileInput.test.js +0 -201
- package/test/Footer.test.js +0 -94
- package/test/Header.test.js +0 -34
- package/test/Heading.test.js +0 -83
- package/test/InputText.test.js +0 -248
- package/test/Link.test.js +0 -43
- package/test/NumberInput.test.js +0 -259
- package/test/Paginator.test.js +0 -177
- package/test/PasswordInput.test.js +0 -83
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -329
- package/test/Select.test.js +0 -212
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -74
- package/test/Spinner.test.js +0 -32
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -109
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextInput.test.js +0 -732
- package/test/Textarea.test.js +0 -193
- package/test/ToggleGroup.test.js +0 -85
- package/test/Upload.test.js +0 -60
- package/test/V3TextArea.test.js +0 -51
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
package/dist/header/Header.js
DELETED
|
@@ -1,434 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
-
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
23
|
-
|
|
24
|
-
var _AppBar = _interopRequireDefault(require("@material-ui/core/AppBar"));
|
|
25
|
-
|
|
26
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
|
-
var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
|
|
29
|
-
|
|
30
|
-
var _Icons = require("./Icons");
|
|
31
|
-
|
|
32
|
-
var _variables = require("../common/variables.js");
|
|
33
|
-
|
|
34
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
35
|
-
|
|
36
|
-
var _BackgroundColorContext = require("../BackgroundColorContext.js");
|
|
37
|
-
|
|
38
|
-
function _templateObject14() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: ", ";\n opacity: ", " !important;\n visibility: ", ";\n opacity: ", ";\n display: ", ";\n transition: opacity 0.2s 0.2s ease-in-out;\n z-index: ", ";\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject14 = function _templateObject14() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject13() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 100%;\n margin-top: 40px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject13 = function _templateObject13() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject12() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n cursor: pointer;\n :focus {\n outline: ", " auto 1px;\n }\n position: fixed;\n top: 23px;\n right: 20px;\n width: 24px;\n height: 24px;\n padding: ", ";\n"]);
|
|
60
|
-
|
|
61
|
-
_templateObject12 = function _templateObject12() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _templateObject11() {
|
|
69
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n position: absolute;\n top: 23px;\n left: 20px;\n"]);
|
|
70
|
-
|
|
71
|
-
_templateObject11 = function _templateObject11() {
|
|
72
|
-
return data;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _templateObject10() {
|
|
79
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: space-evenly;\n background-color: ", ";\n position: fixed;\n top: 0;\n right: 0;\n z-index: ", ";\n width: ", ";\n height: 100vh;\n padding: 20px;\n transform: ", ";\n opacity: ", ";\n transition-property: transform, opacity;\n transition-duration: 0.6s;\n transition-timing-function: ease-in-out;\n box-sizing: border-box;\n"]);
|
|
80
|
-
|
|
81
|
-
_templateObject10 = function _templateObject10() {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _templateObject9() {
|
|
89
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"]);
|
|
90
|
-
|
|
91
|
-
_templateObject9 = function _templateObject9() {
|
|
92
|
-
return data;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
return data;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _templateObject8() {
|
|
99
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n text-transform: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
|
|
100
|
-
|
|
101
|
-
_templateObject8 = function _templateObject8() {
|
|
102
|
-
return data;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
return data;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _templateObject7() {
|
|
109
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 54px;\n cursor: pointer;\n :hover {\n background-color: ", ";\n }\n &:focus {\n outline: ", " auto 1px;\n }\n & > svg {\n fill: ", ";\n }\n"]);
|
|
110
|
-
|
|
111
|
-
_templateObject7 = function _templateObject7() {
|
|
112
|
-
return data;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return data;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function _templateObject6() {
|
|
119
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n width: calc(100% - 186px);\n display: flex;\n align-items: center;\n flex-grow: 1;\n justify-content: flex-end;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
|
|
120
|
-
|
|
121
|
-
_templateObject6 = function _templateObject6() {
|
|
122
|
-
return data;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
return data;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function _templateObject5() {
|
|
129
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n vertical-align: middle;\n"]);
|
|
130
|
-
|
|
131
|
-
_templateObject5 = function _templateObject5() {
|
|
132
|
-
return data;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
return data;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function _templateObject4() {
|
|
139
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"]);
|
|
140
|
-
|
|
141
|
-
_templateObject4 = function _templateObject4() {
|
|
142
|
-
return data;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
return data;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function _templateObject3() {
|
|
149
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"]);
|
|
150
|
-
|
|
151
|
-
_templateObject3 = function _templateObject3() {
|
|
152
|
-
return data;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
return data;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function _templateObject2() {
|
|
159
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-bottom: ", ";\n\n &.MuiAppBar-colorPrimary {\n background-color: ", ";\n border-bottom: ", ";\n\n &.MuiPaper-elevation4 {\n box-shadow: none;\n }\n .ChildComponents {\n display: flex;\n align-items: center;\n }\n }\n & {\n min-height: ", ";\n }\n &.MuiAppBar-root {\n flex-direction: row;\n align-items: center;\n padding: ", ";\n justify-content: space-between;\n }\n"]);
|
|
160
|
-
|
|
161
|
-
_templateObject2 = function _templateObject2() {
|
|
162
|
-
return data;
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
return data;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function _templateObject() {
|
|
169
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n button {\n background-color: transparent;\n :hover {\n background-color: transparent;\n }\n }\n"]);
|
|
170
|
-
|
|
171
|
-
_templateObject = function _templateObject() {
|
|
172
|
-
return data;
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
return data;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
var Dropdown = function Dropdown(props) {
|
|
179
|
-
return _react["default"].createElement(HeaderDropdown, null, _react["default"].createElement(_Dropdown["default"], props));
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
var HeaderDropdown = _styledComponents["default"].div(_templateObject());
|
|
183
|
-
|
|
184
|
-
var getLogoElement = function getLogoElement(themeInput) {
|
|
185
|
-
if (!themeInput) {
|
|
186
|
-
return _Icons.dxcLogo;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (typeof themeInput === "string") {
|
|
190
|
-
return _react["default"].createElement(LogoImg, {
|
|
191
|
-
alt: "Logo",
|
|
192
|
-
src: themeInput
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return themeInput;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
var DxcHeader = function DxcHeader(_ref) {
|
|
200
|
-
var _ref$underlined = _ref.underlined,
|
|
201
|
-
underlined = _ref$underlined === void 0 ? false : _ref$underlined,
|
|
202
|
-
onClick = _ref.onClick,
|
|
203
|
-
content = _ref.content,
|
|
204
|
-
responsiveContent = _ref.responsiveContent,
|
|
205
|
-
margin = _ref.margin,
|
|
206
|
-
padding = _ref.padding,
|
|
207
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
208
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
209
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
210
|
-
var ref = (0, _react.useRef)(null);
|
|
211
|
-
|
|
212
|
-
var _useState = (0, _react.useState)(),
|
|
213
|
-
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
214
|
-
refSize = _useState2[0],
|
|
215
|
-
setRefSize = _useState2[1];
|
|
216
|
-
|
|
217
|
-
var _useState3 = (0, _react.useState)(),
|
|
218
|
-
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
219
|
-
isResponsive = _useState4[0],
|
|
220
|
-
setIsResponsive = _useState4[1];
|
|
221
|
-
|
|
222
|
-
var _useState5 = (0, _react.useState)(false),
|
|
223
|
-
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
224
|
-
isMenuVisible = _useState6[0],
|
|
225
|
-
setIsMenuVisible = _useState6[1];
|
|
226
|
-
|
|
227
|
-
var handleResize = function handleResize(refWidth) {
|
|
228
|
-
if (refWidth) {
|
|
229
|
-
setRefSize(refWidth);
|
|
230
|
-
|
|
231
|
-
if (refWidth <= _variables.responsiveSizes.tablet && !isResponsive) {
|
|
232
|
-
setIsResponsive(true);
|
|
233
|
-
} else {
|
|
234
|
-
setIsResponsive(false);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
|
|
239
|
-
var handleMenu = function handleMenu() {
|
|
240
|
-
if (isResponsive && !isMenuVisible) {
|
|
241
|
-
setIsMenuVisible(!isMenuVisible);
|
|
242
|
-
} else {
|
|
243
|
-
setIsMenuVisible(!isMenuVisible);
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
var headerLogo = (0, _react.useMemo)(function () {
|
|
248
|
-
return getLogoElement(colorsTheme.header.logo);
|
|
249
|
-
}, [colorsTheme.header.logo]);
|
|
250
|
-
var headerResponsiveLogo = (0, _react.useMemo)(function () {
|
|
251
|
-
return getLogoElement(colorsTheme.header.logoResponsive);
|
|
252
|
-
}, [colorsTheme.header.logoResponsive]);
|
|
253
|
-
|
|
254
|
-
var handleEventListener = function handleEventListener() {
|
|
255
|
-
handleResize(ref.current.offsetWidth);
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
(0, _react.useEffect)(function () {
|
|
259
|
-
if (ref.current) {
|
|
260
|
-
window.addEventListener("resize", handleEventListener);
|
|
261
|
-
handleResize(ref.current.offsetWidth);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
return function () {
|
|
265
|
-
window.removeEventListener("resize", handleEventListener);
|
|
266
|
-
};
|
|
267
|
-
}, []);
|
|
268
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
269
|
-
theme: colorsTheme.header
|
|
270
|
-
}, _react["default"].createElement(HeaderContainer, {
|
|
271
|
-
$underlined: underlined,
|
|
272
|
-
position: "static",
|
|
273
|
-
margin: margin,
|
|
274
|
-
ref: ref
|
|
275
|
-
}, _react["default"].createElement(LogoAnchor, {
|
|
276
|
-
tabIndex: typeof onClick === "function" ? tabIndex : -1,
|
|
277
|
-
interactuable: typeof onClick === "function",
|
|
278
|
-
onClick: onClick
|
|
279
|
-
}, _react["default"].createElement(LogoContainer, null, headerLogo)), isResponsive && responsiveContent && _react["default"].createElement(MainContainer, null, _react["default"].createElement(ChildContainer, {
|
|
280
|
-
padding: padding
|
|
281
|
-
}, _react["default"].createElement(HamburguerItem, {
|
|
282
|
-
tabIndex: tabIndex,
|
|
283
|
-
underlined: underlined,
|
|
284
|
-
onClick: handleMenu
|
|
285
|
-
}, _Icons.hamburgerIcon, _react["default"].createElement(HamburguerTitle, null, "Menu"))), _react["default"].createElement("div", null, _react["default"].createElement(ResponsiveMenu, {
|
|
286
|
-
hasVisibility: isMenuVisible,
|
|
287
|
-
refSize: refSize
|
|
288
|
-
}, _react["default"].createElement(ResponsiveLogoContainer, null, headerResponsiveLogo), _react["default"].createElement(MenuContent, null, responsiveContent(handleMenu)), _react["default"].createElement(CloseContainer, {
|
|
289
|
-
tabIndex: tabIndex,
|
|
290
|
-
onClick: handleMenu,
|
|
291
|
-
className: "closeIcon"
|
|
292
|
-
}, _Icons.closeIcon)), _react["default"].createElement(Overlay, {
|
|
293
|
-
onClick: handleMenu,
|
|
294
|
-
hasVisibility: isMenuVisible,
|
|
295
|
-
refSize: refSize
|
|
296
|
-
}))), !isResponsive && _react["default"].createElement(ChildContainer, {
|
|
297
|
-
padding: padding
|
|
298
|
-
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
299
|
-
color: colorsTheme.header.backgroundColor
|
|
300
|
-
}, content))));
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
DxcHeader.Dropdown = Dropdown;
|
|
304
|
-
var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject2(), function (props) {
|
|
305
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
306
|
-
}, function (props) {
|
|
307
|
-
return props.theme.backgroundColor;
|
|
308
|
-
}, function (props) {
|
|
309
|
-
return props.$underlined && "".concat(props.theme.underlinedThickness, " ").concat(props.theme.underlinedStyle, " ").concat(props.theme.underlinedColor);
|
|
310
|
-
}, function (props) {
|
|
311
|
-
return props.theme.minHeight;
|
|
312
|
-
}, function (props) {
|
|
313
|
-
return "".concat(props.theme.paddingTop, " ").concat(props.theme.paddingRight, " ").concat(props.theme.paddingBottom, " ").concat(props.theme.paddingLeft);
|
|
314
|
-
});
|
|
315
|
-
|
|
316
|
-
var LogoAnchor = _styledComponents["default"].a(_templateObject3(), function (props) {
|
|
317
|
-
if (!props.interactuable) {
|
|
318
|
-
return "cursor: default; outline:none;";
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
return "cursor: pointer;";
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
var LogoImg = _styledComponents["default"].img(_templateObject4(), function (props) {
|
|
325
|
-
return props.theme.logoHeight;
|
|
326
|
-
}, function (props) {
|
|
327
|
-
return props.theme.logoWidth;
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
var LogoContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
331
|
-
return props.theme.logoHeight;
|
|
332
|
-
}, function (props) {
|
|
333
|
-
return props.theme.logoWidth;
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
var ChildContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
|
|
337
|
-
return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
|
|
338
|
-
}, function (props) {
|
|
339
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
|
|
340
|
-
}, function (props) {
|
|
341
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
|
|
342
|
-
}, function (props) {
|
|
343
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
|
|
344
|
-
}, function (props) {
|
|
345
|
-
return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
var HamburguerItem = _styledComponents["default"].div(_templateObject7(), function (props) {
|
|
349
|
-
return props.theme.hamburguerHoverColor;
|
|
350
|
-
}, function (props) {
|
|
351
|
-
return props.theme.hamburguerFocusColor;
|
|
352
|
-
}, function (props) {
|
|
353
|
-
return props.theme.hamburguerIconColor;
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
var HamburguerTitle = _styledComponents["default"].span(_templateObject8(), function (props) {
|
|
357
|
-
return props.theme.hamburguerFontFamily;
|
|
358
|
-
}, function (props) {
|
|
359
|
-
return props.theme.hamburguerFontStyle;
|
|
360
|
-
}, function (props) {
|
|
361
|
-
return props.theme.hamburguerFontSize;
|
|
362
|
-
}, function (props) {
|
|
363
|
-
return props.theme.hamburguerTextTransform;
|
|
364
|
-
}, function (props) {
|
|
365
|
-
return props.theme.hamburguerFontWeight;
|
|
366
|
-
}, function (props) {
|
|
367
|
-
return props.theme.hamburguerFontColor;
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
var MainContainer = _styledComponents["default"].div(_templateObject9());
|
|
371
|
-
|
|
372
|
-
var ResponsiveMenu = _styledComponents["default"].div(_templateObject10(), function (props) {
|
|
373
|
-
return props.theme.menuBackgroundColor;
|
|
374
|
-
}, function (props) {
|
|
375
|
-
return props.theme.menuZindex;
|
|
376
|
-
}, function (props) {
|
|
377
|
-
return props.refSize <= _variables.responsiveSizes.laptop && props.refSize > _variables.responsiveSizes.mobileLarge ? "".concat(function (props) {
|
|
378
|
-
return props.theme.menuTabletWidth;
|
|
379
|
-
}) : "".concat(function (props) {
|
|
380
|
-
return props.theme.menuMobileWidth;
|
|
381
|
-
});
|
|
382
|
-
}, function (props) {
|
|
383
|
-
return props.hasVisibility ? "translateX(0)" : "translateX(100vw)";
|
|
384
|
-
}, function (props) {
|
|
385
|
-
return props.hasVisibility ? "1" : "0.96";
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
var ResponsiveLogoContainer = _styledComponents["default"].div(_templateObject11(), function (props) {
|
|
389
|
-
return props.theme.logoHeight;
|
|
390
|
-
}, function (props) {
|
|
391
|
-
return props.theme.logoWidth;
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
var CloseContainer = _styledComponents["default"].div(_templateObject12(), function (props) {
|
|
395
|
-
return props.theme.hamburguerFocusColor;
|
|
396
|
-
}, _variables.spaces.xxsmall);
|
|
397
|
-
|
|
398
|
-
var MenuContent = _styledComponents["default"].div(_templateObject13());
|
|
399
|
-
|
|
400
|
-
var Overlay = _styledComponents["default"].div(_templateObject14(), function (props) {
|
|
401
|
-
return props.theme.overlayColor;
|
|
402
|
-
}, function (props) {
|
|
403
|
-
return props.theme.overlayOpacity;
|
|
404
|
-
}, function (props) {
|
|
405
|
-
return props.hasVisibility ? "visible" : "hidden";
|
|
406
|
-
}, function (props) {
|
|
407
|
-
return props.hasVisibility ? "1" : "0";
|
|
408
|
-
}, function (props) {
|
|
409
|
-
return props.refSize <= _variables.responsiveSizes.mobileLarge ? "none" : "";
|
|
410
|
-
}, function (props) {
|
|
411
|
-
return props.theme.overlayZindex;
|
|
412
|
-
});
|
|
413
|
-
|
|
414
|
-
DxcHeader.propTypes = {
|
|
415
|
-
underlined: _propTypes["default"].bool,
|
|
416
|
-
onClick: _propTypes["default"].func,
|
|
417
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
418
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
419
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
420
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
421
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
422
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
423
|
-
padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
424
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
425
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
426
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
427
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
428
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
|
|
429
|
-
content: _propTypes["default"].object,
|
|
430
|
-
responsiveContent: _propTypes["default"].func,
|
|
431
|
-
tabIndex: _propTypes["default"].number
|
|
432
|
-
};
|
|
433
|
-
var _default = DxcHeader;
|
|
434
|
-
exports["default"] = _default;
|
package/dist/header/Icons.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.hamburgerIcon = exports.closeIcon = exports.dxcLogo = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var dxcLogo = _react["default"].createElement("svg", {
|
|
13
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
-
width: "73",
|
|
15
|
-
height: "40",
|
|
16
|
-
viewBox: "0 0 73 40"
|
|
17
|
-
}, _react["default"].createElement("title", null, "DXC Logo"), _react["default"].createElement("g", {
|
|
18
|
-
id: "g10",
|
|
19
|
-
transform: "translate(0)"
|
|
20
|
-
}, _react["default"].createElement("g", {
|
|
21
|
-
id: "g12"
|
|
22
|
-
}, _react["default"].createElement("path", {
|
|
23
|
-
id: "path14",
|
|
24
|
-
d: "M91.613-28.177v2.514H90.231V-28.15l-2.415-3.82h1.616l1.5,2.532,1.526-2.532h1.571ZM83.9-25.555A3.15,3.15,0,0,1,80.6-28.8v-.018a3.231,3.231,0,0,1,3.294-3.262,3.442,3.442,0,0,1,2.469.865l-.87,1.054a2.311,2.311,0,0,0-1.643-.64,1.891,1.891,0,0,0-1.8,1.964v.018a1.886,1.886,0,0,0,1.9,2,2.2,2.2,0,0,0,1.3-.378v-.9H83.858v-1.2h2.729v2.738A4.071,4.071,0,0,1,83.9-25.555Zm-6.416-3.261a1.913,1.913,0,0,0-1.9-1.982A1.883,1.883,0,0,0,73.7-28.835v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,77.486-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018A3.255,3.255,0,0,1,75.6-32.078a3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,75.583-25.555Zm-9.173-.108V-31.97h1.382v5.045h3.133v1.261Zm-3.433-3.153a1.913,1.913,0,0,0-1.9-1.982,1.883,1.883,0,0,0-1.886,1.964v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,62.978-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018a3.255,3.255,0,0,1,3.348-3.262,3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,61.075-25.555Zm-6.508-.108-3.043-4.009v4.009H50.159V-31.97h1.275l2.944,3.883V-31.97h1.364v6.306Zm-8.246,0v-2.531h-2.55v2.531H42.389V-31.97h1.382v2.5h2.55v-2.5H47.7v6.306Zm-8.432.108A3.178,3.178,0,0,1,34.666-28.8v-.018a3.2,3.2,0,0,1,3.276-3.262,3.237,3.237,0,0,1,2.478.973l-.88,1.018a2.315,2.315,0,0,0-1.606-.712,1.866,1.866,0,0,0-1.822,1.964v.018a1.87,1.87,0,0,0,1.822,1.982,2.265,2.265,0,0,0,1.651-.739l.88.891A3.206,3.206,0,0,1,37.889-25.555Zm-9.805-.108V-31.97h4.739v1.235H29.458v1.279h2.962v1.234H29.458V-26.9h3.411v1.234ZM24.322-30.69v5.027H22.939V-30.69H21.028v-1.28h5.206v1.28H24.322",
|
|
25
|
-
transform: "translate(-21.028 65.555)",
|
|
26
|
-
fill: "#100f0d"
|
|
27
|
-
}), _react["default"].createElement("path", {
|
|
28
|
-
id: "path16",
|
|
29
|
-
d: "M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978",
|
|
30
|
-
transform: "translate(-21.049 88.739)",
|
|
31
|
-
fill: "#100f0d"
|
|
32
|
-
}))));
|
|
33
|
-
|
|
34
|
-
exports.dxcLogo = dxcLogo;
|
|
35
|
-
|
|
36
|
-
var closeIcon = _react["default"].createElement("svg", {
|
|
37
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
-
height: "24",
|
|
39
|
-
viewBox: "0 0 24 24",
|
|
40
|
-
width: "24"
|
|
41
|
-
}, _react["default"].createElement("path", {
|
|
42
|
-
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
43
|
-
}), _react["default"].createElement("path", {
|
|
44
|
-
d: "M0 0h24v24H0z",
|
|
45
|
-
fill: "none"
|
|
46
|
-
}));
|
|
47
|
-
|
|
48
|
-
exports.closeIcon = closeIcon;
|
|
49
|
-
|
|
50
|
-
var hamburgerIcon = _react["default"].createElement("svg", {
|
|
51
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
52
|
-
viewBox: "0 0 24 24",
|
|
53
|
-
width: "24",
|
|
54
|
-
height: "24"
|
|
55
|
-
}, _react["default"].createElement("path", {
|
|
56
|
-
d: "M3,8H21a1,1,0,0,0,0-2H3A1,1,0,0,0,3,8Zm18,8H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Zm0-5H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Z"
|
|
57
|
-
}));
|
|
58
|
-
|
|
59
|
-
exports.hamburgerIcon = hamburgerIcon;
|