@dxc-technology/halstack-react 0.0.0-f77ec3a → 0.0.0-f78eb80

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.
Files changed (185) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +6668 -0
  3. package/dist/index.d.ts +6668 -0
  4. package/dist/index.js +14564 -0
  5. package/dist/index.mjs +14507 -0
  6. package/package.json +75 -71
  7. package/babel.config.js +0 -7
  8. package/dist/BackgroundColorContext.js +0 -46
  9. package/dist/ThemeContext.js +0 -250
  10. package/dist/V3Select/V3Select.js +0 -549
  11. package/dist/V3Select/index.d.ts +0 -27
  12. package/dist/V3Textarea/V3Textarea.js +0 -264
  13. package/dist/V3Textarea/index.d.ts +0 -27
  14. package/dist/accordion/Accordion.js +0 -353
  15. package/dist/accordion/index.d.ts +0 -28
  16. package/dist/accordion-group/AccordionGroup.js +0 -186
  17. package/dist/accordion-group/index.d.ts +0 -16
  18. package/dist/alert/Alert.js +0 -403
  19. package/dist/alert/index.d.ts +0 -51
  20. package/dist/badge/Badge.js +0 -63
  21. package/dist/box/Box.js +0 -156
  22. package/dist/box/index.d.ts +0 -25
  23. package/dist/button/Button.js +0 -238
  24. package/dist/button/index.d.ts +0 -24
  25. package/dist/card/Card.js +0 -254
  26. package/dist/card/index.d.ts +0 -22
  27. package/dist/checkbox/Checkbox.js +0 -299
  28. package/dist/checkbox/index.d.ts +0 -24
  29. package/dist/chip/Chip.js +0 -265
  30. package/dist/chip/index.d.ts +0 -22
  31. package/dist/common/OpenSans.css +0 -81
  32. package/dist/common/RequiredComponent.js +0 -40
  33. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  34. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  35. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  36. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  37. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  38. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  39. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  40. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  41. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  42. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  43. package/dist/common/utils.js +0 -22
  44. package/dist/common/variables.js +0 -1574
  45. package/dist/date/Date.js +0 -379
  46. package/dist/date/index.d.ts +0 -27
  47. package/dist/date-input/DateInput.js +0 -400
  48. package/dist/date-input/index.d.ts +0 -95
  49. package/dist/dialog/Dialog.js +0 -218
  50. package/dist/dialog/index.d.ts +0 -18
  51. package/dist/dropdown/Dropdown.js +0 -544
  52. package/dist/dropdown/index.d.ts +0 -26
  53. package/dist/file-input/FileInput.js +0 -644
  54. package/dist/file-input/FileItem.js +0 -287
  55. package/dist/file-input/index.d.ts +0 -81
  56. package/dist/footer/Footer.js +0 -421
  57. package/dist/footer/Icons.js +0 -77
  58. package/dist/footer/index.d.ts +0 -25
  59. package/dist/header/Header.js +0 -470
  60. package/dist/header/Icons.js +0 -59
  61. package/dist/header/index.d.ts +0 -25
  62. package/dist/heading/Heading.js +0 -230
  63. package/dist/heading/index.d.ts +0 -17
  64. package/dist/input-text/Icons.js +0 -22
  65. package/dist/input-text/InputText.js +0 -705
  66. package/dist/input-text/index.d.ts +0 -36
  67. package/dist/layout/ApplicationLayout.js +0 -327
  68. package/dist/layout/Icons.js +0 -55
  69. package/dist/link/Link.js +0 -237
  70. package/dist/link/index.d.ts +0 -23
  71. package/dist/main.d.ts +0 -40
  72. package/dist/main.js +0 -359
  73. package/dist/number-input/NumberInput.js +0 -136
  74. package/dist/number-input/NumberInputContext.js +0 -16
  75. package/dist/number-input/index.d.ts +0 -113
  76. package/dist/paginator/Icons.js +0 -66
  77. package/dist/paginator/Paginator.js +0 -305
  78. package/dist/paginator/index.d.ts +0 -20
  79. package/dist/password-input/PasswordInput.js +0 -203
  80. package/dist/password-input/index.d.ts +0 -94
  81. package/dist/progress-bar/ProgressBar.js +0 -242
  82. package/dist/progress-bar/index.d.ts +0 -18
  83. package/dist/radio/Radio.js +0 -209
  84. package/dist/radio/index.d.ts +0 -23
  85. package/dist/resultsetTable/ResultsetTable.js +0 -358
  86. package/dist/resultsetTable/index.d.ts +0 -19
  87. package/dist/select/Select.js +0 -1096
  88. package/dist/select/index.d.ts +0 -53
  89. package/dist/sidenav/Sidenav.js +0 -179
  90. package/dist/sidenav/index.d.ts +0 -13
  91. package/dist/slider/Slider.js +0 -404
  92. package/dist/slider/index.d.ts +0 -29
  93. package/dist/spinner/Spinner.js +0 -381
  94. package/dist/spinner/index.d.ts +0 -17
  95. package/dist/stories/Button.js +0 -71
  96. package/dist/stories/Button.stories.js +0 -55
  97. package/dist/stories/Header.js +0 -67
  98. package/dist/stories/Header.stories.js +0 -31
  99. package/dist/stories/Introduction.stories.mdx +0 -211
  100. package/dist/stories/Page.js +0 -68
  101. package/dist/stories/Page.stories.js +0 -39
  102. package/dist/stories/assets/code-brackets.svg +0 -1
  103. package/dist/stories/assets/colors.svg +0 -1
  104. package/dist/stories/assets/comments.svg +0 -1
  105. package/dist/stories/assets/direction.svg +0 -1
  106. package/dist/stories/assets/flow.svg +0 -1
  107. package/dist/stories/assets/plugin.svg +0 -1
  108. package/dist/stories/assets/repo.svg +0 -1
  109. package/dist/stories/assets/stackalt.svg +0 -1
  110. package/dist/stories/button.css +0 -30
  111. package/dist/stories/header.css +0 -26
  112. package/dist/stories/page.css +0 -69
  113. package/dist/switch/Switch.js +0 -222
  114. package/dist/switch/index.d.ts +0 -24
  115. package/dist/table/Table.js +0 -132
  116. package/dist/table/index.d.ts +0 -13
  117. package/dist/tabs/Tabs.js +0 -343
  118. package/dist/tabs/index.d.ts +0 -19
  119. package/dist/tag/Tag.js +0 -282
  120. package/dist/tag/index.d.ts +0 -24
  121. package/dist/text-input/TextInput.js +0 -974
  122. package/dist/text-input/index.d.ts +0 -135
  123. package/dist/textarea/Textarea.js +0 -369
  124. package/dist/textarea/index.d.ts +0 -117
  125. package/dist/toggle/Toggle.js +0 -220
  126. package/dist/toggle/index.d.ts +0 -21
  127. package/dist/toggle-group/ToggleGroup.js +0 -327
  128. package/dist/toggle-group/index.d.ts +0 -21
  129. package/dist/upload/Upload.js +0 -205
  130. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
  131. package/dist/upload/buttons-upload/Icons.js +0 -40
  132. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  133. package/dist/upload/dragAndDropArea/Icons.js +0 -39
  134. package/dist/upload/file-upload/FileToUpload.js +0 -189
  135. package/dist/upload/file-upload/Icons.js +0 -66
  136. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  137. package/dist/upload/index.d.ts +0 -15
  138. package/dist/upload/transaction/Icons.js +0 -160
  139. package/dist/upload/transaction/Transaction.js +0 -148
  140. package/dist/upload/transactions/Transactions.js +0 -138
  141. package/dist/useTheme.js +0 -22
  142. package/dist/wizard/Icons.js +0 -65
  143. package/dist/wizard/Wizard.js +0 -405
  144. package/dist/wizard/index.d.ts +0 -18
  145. package/test/Accordion.test.js +0 -33
  146. package/test/AccordionGroup.test.js +0 -125
  147. package/test/Alert.test.js +0 -53
  148. package/test/Box.test.js +0 -10
  149. package/test/Button.test.js +0 -18
  150. package/test/Card.test.js +0 -30
  151. package/test/Checkbox.test.js +0 -45
  152. package/test/Chip.test.js +0 -25
  153. package/test/Date.test.js +0 -395
  154. package/test/DateInput.test.js +0 -242
  155. package/test/Dialog.test.js +0 -23
  156. package/test/Dropdown.test.js +0 -145
  157. package/test/FileInput.test.js +0 -201
  158. package/test/Footer.test.js +0 -94
  159. package/test/Header.test.js +0 -34
  160. package/test/Heading.test.js +0 -83
  161. package/test/InputText.test.js +0 -239
  162. package/test/Link.test.js +0 -43
  163. package/test/NumberInput.test.js +0 -259
  164. package/test/Paginator.test.js +0 -181
  165. package/test/PasswordInput.test.js +0 -83
  166. package/test/ProgressBar.test.js +0 -35
  167. package/test/Radio.test.js +0 -37
  168. package/test/ResultsetTable.test.js +0 -330
  169. package/test/Select.test.js +0 -415
  170. package/test/Sidenav.test.js +0 -45
  171. package/test/Slider.test.js +0 -74
  172. package/test/Spinner.test.js +0 -32
  173. package/test/Switch.test.js +0 -45
  174. package/test/Table.test.js +0 -36
  175. package/test/Tabs.test.js +0 -109
  176. package/test/Tag.test.js +0 -32
  177. package/test/TextInput.test.js +0 -732
  178. package/test/Textarea.test.js +0 -193
  179. package/test/ToggleGroup.test.js +0 -85
  180. package/test/Upload.test.js +0 -60
  181. package/test/V3Select.test.js +0 -212
  182. package/test/V3TextArea.test.js +0 -51
  183. package/test/Wizard.test.js +0 -130
  184. package/test/mocks/pngMock.js +0 -1
  185. package/test/mocks/svgMock.js +0 -1
@@ -1,470 +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 = _interopRequireWildcard(require("../BackgroundColorContext.js"));
37
-
38
- function _templateObject15() {
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
- _templateObject15 = function _templateObject15() {
42
- return data;
43
- };
44
-
45
- return data;
46
- }
47
-
48
- function _templateObject14() {
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 color: ", ";\n"]);
50
-
51
- _templateObject14 = function _templateObject14() {
52
- return data;
53
- };
54
-
55
- return data;
56
- }
57
-
58
- function _templateObject13() {
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
- _templateObject13 = function _templateObject13() {
62
- return data;
63
- };
64
-
65
- return data;
66
- }
67
-
68
- function _templateObject12() {
69
- var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n position: absolute;\n top: 23px;\n left: 20px;\n"]);
70
-
71
- _templateObject12 = function _templateObject12() {
72
- return data;
73
- };
74
-
75
- return data;
76
- }
77
-
78
- function _templateObject11() {
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
- _templateObject11 = function _templateObject11() {
82
- return data;
83
- };
84
-
85
- return data;
86
- }
87
-
88
- function _templateObject10() {
89
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"]);
90
-
91
- _templateObject10 = function _templateObject10() {
92
- return data;
93
- };
94
-
95
- return data;
96
- }
97
-
98
- function _templateObject9() {
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
- _templateObject9 = function _templateObject9() {
102
- return data;
103
- };
104
-
105
- return data;
106
- }
107
-
108
- function _templateObject8() {
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
- _templateObject8 = function _templateObject8() {
112
- return data;
113
- };
114
-
115
- return data;
116
- }
117
-
118
- function _templateObject7() {
119
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: calc(100% - 186px);\n display: flex;\n align-items: center;\n flex-grow: 1;\n color: ", ";\n\n justify-content: flex-end;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
120
-
121
- _templateObject7 = function _templateObject7() {
122
- return data;
123
- };
124
-
125
- return data;
126
- }
127
-
128
- function _templateObject6() {
129
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: calc(100% - 186px);\n display: flex;\n align-items: center;\n flex-grow: 1;\n\n justify-content: flex-end;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n"]);
130
-
131
- _templateObject6 = function _templateObject6() {
132
- return data;
133
- };
134
-
135
- return data;
136
- }
137
-
138
- function _templateObject5() {
139
- var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n vertical-align: middle;\n"]);
140
-
141
- _templateObject5 = function _templateObject5() {
142
- return data;
143
- };
144
-
145
- return data;
146
- }
147
-
148
- function _templateObject4() {
149
- var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"]);
150
-
151
- _templateObject4 = function _templateObject4() {
152
- return data;
153
- };
154
-
155
- return data;
156
- }
157
-
158
- function _templateObject3() {
159
- var data = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"]);
160
-
161
- _templateObject3 = function _templateObject3() {
162
- return data;
163
- };
164
-
165
- return data;
166
- }
167
-
168
- function _templateObject2() {
169
- 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"]);
170
-
171
- _templateObject2 = function _templateObject2() {
172
- return data;
173
- };
174
-
175
- return data;
176
- }
177
-
178
- function _templateObject() {
179
- var data = (0, _taggedTemplateLiteral2["default"])(["\n button {\n background-color: transparent;\n :hover {\n background-color: transparent;\n }\n }\n"]);
180
-
181
- _templateObject = function _templateObject() {
182
- return data;
183
- };
184
-
185
- return data;
186
- }
187
-
188
- var Dropdown = function Dropdown(props) {
189
- return _react["default"].createElement(HeaderDropdown, null, _react["default"].createElement(_Dropdown["default"], props));
190
- };
191
-
192
- var HeaderDropdown = _styledComponents["default"].div(_templateObject());
193
-
194
- var getLogoElement = function getLogoElement(themeInput) {
195
- if (!themeInput) {
196
- return _Icons.dxcLogo;
197
- }
198
-
199
- if (typeof themeInput === "string") {
200
- return _react["default"].createElement(LogoImg, {
201
- alt: "Logo",
202
- src: themeInput
203
- });
204
- }
205
-
206
- return themeInput;
207
- };
208
-
209
- var DxcHeader = function DxcHeader(_ref) {
210
- var _ref$underlined = _ref.underlined,
211
- underlined = _ref$underlined === void 0 ? false : _ref$underlined,
212
- onClick = _ref.onClick,
213
- content = _ref.content,
214
- responsiveContent = _ref.responsiveContent,
215
- margin = _ref.margin,
216
- padding = _ref.padding,
217
- _ref$tabIndex = _ref.tabIndex,
218
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
219
- var colorsTheme = (0, _useTheme["default"])();
220
- var ref = (0, _react.useRef)(null);
221
-
222
- var _useState = (0, _react.useState)(),
223
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
224
- refSize = _useState2[0],
225
- setRefSize = _useState2[1];
226
-
227
- var _useState3 = (0, _react.useState)(),
228
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
229
- isResponsive = _useState4[0],
230
- setIsResponsive = _useState4[1];
231
-
232
- var _useState5 = (0, _react.useState)(false),
233
- _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
234
- isMenuVisible = _useState6[0],
235
- setIsMenuVisible = _useState6[1];
236
-
237
- var handleResize = function handleResize(refWidth) {
238
- if (refWidth) {
239
- setRefSize(refWidth);
240
-
241
- if (refWidth <= _variables.responsiveSizes.tablet && !isResponsive) {
242
- setIsResponsive(true);
243
- } else {
244
- setIsResponsive(false);
245
- }
246
- }
247
- };
248
-
249
- var ContentContainerComponent = function ContentContainerComponent() {
250
- var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
251
- return isResponsive && _react["default"].createElement(MenuContent, {
252
- backgroundType: backgroundType
253
- }, responsiveContent(handleMenu)) || _react["default"].createElement(ContentContainer, {
254
- padding: padding,
255
- backgroundType: backgroundType
256
- }, content);
257
- };
258
-
259
- var handleMenu = function handleMenu() {
260
- if (isResponsive && !isMenuVisible) {
261
- setIsMenuVisible(!isMenuVisible);
262
- } else {
263
- setIsMenuVisible(!isMenuVisible);
264
- }
265
- };
266
-
267
- var headerLogo = (0, _react.useMemo)(function () {
268
- return getLogoElement(colorsTheme.header.logo);
269
- }, [colorsTheme.header.logo]);
270
- var headerResponsiveLogo = (0, _react.useMemo)(function () {
271
- return getLogoElement(colorsTheme.header.logoResponsive);
272
- }, [colorsTheme.header.logoResponsive]);
273
-
274
- var handleEventListener = function handleEventListener() {
275
- handleResize(ref.current.offsetWidth);
276
- };
277
-
278
- (0, _react.useEffect)(function () {
279
- if (ref.current) {
280
- window.addEventListener("resize", handleEventListener);
281
- handleResize(ref.current.offsetWidth);
282
- }
283
-
284
- return function () {
285
- window.removeEventListener("resize", handleEventListener);
286
- };
287
- }, []);
288
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
289
- theme: colorsTheme.header
290
- }, _react["default"].createElement(HeaderContainer, {
291
- $underlined: underlined,
292
- position: "static",
293
- margin: margin,
294
- ref: ref
295
- }, _react["default"].createElement(LogoAnchor, {
296
- tabIndex: typeof onClick === "function" ? tabIndex : -1,
297
- interactuable: typeof onClick === "function",
298
- onClick: onClick
299
- }, _react["default"].createElement(LogoContainer, null, headerLogo)), isResponsive && responsiveContent && _react["default"].createElement(MainContainer, null, _react["default"].createElement(ChildContainer, {
300
- padding: padding
301
- }, _react["default"].createElement(HamburguerItem, {
302
- tabIndex: tabIndex,
303
- underlined: underlined,
304
- onClick: handleMenu
305
- }, _Icons.hamburgerIcon, _react["default"].createElement(HamburguerTitle, null, "Menu"))), _react["default"].createElement("div", null, _react["default"].createElement(ResponsiveMenu, {
306
- hasVisibility: isMenuVisible,
307
- refSize: refSize
308
- }, _react["default"].createElement(ResponsiveLogoContainer, null, headerResponsiveLogo), _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
309
- color: colorsTheme.header.menuBackgroundColor
310
- }, _react["default"].createElement(ContentContainerComponent, null, responsiveContent(handleMenu))), _react["default"].createElement(CloseContainer, {
311
- tabIndex: tabIndex,
312
- onClick: handleMenu,
313
- className: "closeIcon"
314
- }, _Icons.closeIcon)), _react["default"].createElement(Overlay, {
315
- onClick: handleMenu,
316
- hasVisibility: isMenuVisible,
317
- refSize: refSize
318
- }))), !isResponsive && _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
319
- color: colorsTheme.header.backgroundColor
320
- }, _react["default"].createElement(ContentContainerComponent, null))));
321
- };
322
-
323
- DxcHeader.Dropdown = Dropdown;
324
- var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject2(), function (props) {
325
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
326
- }, function (props) {
327
- return props.theme.backgroundColor;
328
- }, function (props) {
329
- return props.$underlined && "".concat(props.theme.underlinedThickness, " ").concat(props.theme.underlinedStyle, " ").concat(props.theme.underlinedColor);
330
- }, function (props) {
331
- return props.theme.minHeight;
332
- }, function (props) {
333
- return "".concat(props.theme.paddingTop, " ").concat(props.theme.paddingRight, " ").concat(props.theme.paddingBottom, " ").concat(props.theme.paddingLeft);
334
- });
335
-
336
- var LogoAnchor = _styledComponents["default"].a(_templateObject3(), function (props) {
337
- if (!props.interactuable) {
338
- return "cursor: default; outline:none;";
339
- }
340
-
341
- return "cursor: pointer;";
342
- });
343
-
344
- var LogoImg = _styledComponents["default"].img(_templateObject4(), function (props) {
345
- return props.theme.logoHeight;
346
- }, function (props) {
347
- return props.theme.logoWidth;
348
- });
349
-
350
- var LogoContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
351
- return props.theme.logoHeight;
352
- }, function (props) {
353
- return props.theme.logoWidth;
354
- });
355
-
356
- var ChildContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
357
- return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
358
- }, function (props) {
359
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
360
- }, function (props) {
361
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
362
- }, function (props) {
363
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
364
- }, function (props) {
365
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
366
- });
367
-
368
- var ContentContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
369
- return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
370
- }, function (props) {
371
- return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
372
- }, function (props) {
373
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
374
- }, function (props) {
375
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.right ? _variables.spaces[props.padding.right] : "";
376
- }, function (props) {
377
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
378
- }, function (props) {
379
- return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
380
- });
381
-
382
- var HamburguerItem = _styledComponents["default"].div(_templateObject8(), function (props) {
383
- return props.theme.hamburguerHoverColor;
384
- }, function (props) {
385
- return props.theme.hamburguerFocusColor;
386
- }, function (props) {
387
- return props.theme.hamburguerIconColor;
388
- });
389
-
390
- var HamburguerTitle = _styledComponents["default"].span(_templateObject9(), function (props) {
391
- return props.theme.hamburguerFontFamily;
392
- }, function (props) {
393
- return props.theme.hamburguerFontStyle;
394
- }, function (props) {
395
- return props.theme.hamburguerFontSize;
396
- }, function (props) {
397
- return props.theme.hamburguerTextTransform;
398
- }, function (props) {
399
- return props.theme.hamburguerFontWeight;
400
- }, function (props) {
401
- return props.theme.hamburguerFontColor;
402
- });
403
-
404
- var MainContainer = _styledComponents["default"].div(_templateObject10());
405
-
406
- var ResponsiveMenu = _styledComponents["default"].div(_templateObject11(), function (props) {
407
- return props.theme.menuBackgroundColor;
408
- }, function (props) {
409
- return props.theme.menuZindex;
410
- }, function (props) {
411
- return props.refSize <= _variables.responsiveSizes.laptop && props.refSize > _variables.responsiveSizes.mobileLarge ? "".concat(function (props) {
412
- return props.theme.menuTabletWidth;
413
- }) : "".concat(function (props) {
414
- return props.theme.menuMobileWidth;
415
- });
416
- }, function (props) {
417
- return props.hasVisibility ? "translateX(0)" : "translateX(100vw)";
418
- }, function (props) {
419
- return props.hasVisibility ? "1" : "0.96";
420
- });
421
-
422
- var ResponsiveLogoContainer = _styledComponents["default"].div(_templateObject12(), function (props) {
423
- return props.theme.logoHeight;
424
- }, function (props) {
425
- return props.theme.logoWidth;
426
- });
427
-
428
- var CloseContainer = _styledComponents["default"].div(_templateObject13(), function (props) {
429
- return props.theme.hamburguerFocusColor;
430
- }, _variables.spaces.xxsmall);
431
-
432
- var MenuContent = _styledComponents["default"].div(_templateObject14(), function (props) {
433
- return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
434
- });
435
-
436
- var Overlay = _styledComponents["default"].div(_templateObject15(), function (props) {
437
- return props.theme.overlayColor;
438
- }, function (props) {
439
- return props.theme.overlayOpacity;
440
- }, function (props) {
441
- return props.hasVisibility ? "visible" : "hidden";
442
- }, function (props) {
443
- return props.hasVisibility ? "1" : "0";
444
- }, function (props) {
445
- return props.refSize <= _variables.responsiveSizes.mobileLarge ? "none" : "";
446
- }, function (props) {
447
- return props.theme.overlayZindex;
448
- });
449
-
450
- DxcHeader.propTypes = {
451
- underlined: _propTypes["default"].bool,
452
- onClick: _propTypes["default"].func,
453
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
454
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
455
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
456
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
457
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
458
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
459
- padding: _propTypes["default"].oneOfType([_propTypes["default"].shape({
460
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
461
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
462
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
463
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
464
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
465
- content: _propTypes["default"].object,
466
- responsiveContent: _propTypes["default"].func,
467
- tabIndex: _propTypes["default"].number
468
- };
469
- var _default = DxcHeader;
470
- exports["default"] = _default;
@@ -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;
@@ -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;