@dxc-technology/halstack-react 0.0.0-9253572 → 0.0.0-9439a0d

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 (209) hide show
  1. package/BackgroundColorContext.js +8 -4
  2. package/ThemeContext.js +84 -88
  3. package/V3Select/V3Select.js +33 -127
  4. package/V3Textarea/V3Textarea.js +10 -14
  5. package/accordion/Accordion.d.ts +4 -0
  6. package/accordion/Accordion.js +35 -130
  7. package/accordion/types.d.ts +68 -0
  8. package/accordion/types.js +5 -0
  9. package/accordion-group/AccordionGroup.d.ts +7 -0
  10. package/accordion-group/AccordionGroup.js +65 -81
  11. package/accordion-group/types.d.ts +72 -0
  12. package/accordion-group/types.js +5 -0
  13. package/alert/Alert.d.ts +4 -0
  14. package/alert/Alert.js +38 -151
  15. package/alert/Alert.stories.tsx +170 -0
  16. package/alert/types.d.ts +49 -0
  17. package/alert/types.js +5 -0
  18. package/badge/Badge.js +9 -13
  19. package/box/Box.d.ts +4 -0
  20. package/box/Box.js +13 -43
  21. package/box/Box.stories.tsx +132 -0
  22. package/box/types.d.ts +43 -0
  23. package/box/types.js +5 -0
  24. package/button/Button.d.ts +4 -0
  25. package/button/Button.js +22 -83
  26. package/button/Button.stories.tsx +276 -0
  27. package/button/types.d.ts +57 -0
  28. package/button/types.js +5 -0
  29. package/card/Card.d.ts +4 -0
  30. package/card/Card.js +33 -123
  31. package/card/Card.stories.tsx +201 -0
  32. package/card/ice-cream.jpg +0 -0
  33. package/card/types.d.ts +69 -0
  34. package/card/types.js +5 -0
  35. package/checkbox/Checkbox.d.ts +4 -0
  36. package/checkbox/Checkbox.js +13 -59
  37. package/checkbox/Checkbox.stories.tsx +192 -0
  38. package/checkbox/types.d.ts +60 -0
  39. package/checkbox/types.js +5 -0
  40. package/chip/Chip.js +17 -61
  41. package/chip/Chip.stories.tsx +121 -0
  42. package/common/RequiredComponent.js +3 -11
  43. package/common/variables.js +33 -23
  44. package/date/Date.js +16 -22
  45. package/date-input/DateInput.d.ts +4 -0
  46. package/date-input/DateInput.js +22 -61
  47. package/date-input/DateInput.stories.tsx +138 -0
  48. package/date-input/types.d.ts +100 -0
  49. package/date-input/types.js +5 -0
  50. package/dialog/Dialog.d.ts +4 -0
  51. package/dialog/Dialog.js +20 -73
  52. package/dialog/Dialog.stories.tsx +212 -0
  53. package/dialog/types.d.ts +43 -0
  54. package/dialog/types.js +5 -0
  55. package/dropdown/Dropdown.d.ts +4 -0
  56. package/dropdown/Dropdown.js +44 -171
  57. package/dropdown/types.d.ts +89 -0
  58. package/dropdown/types.js +5 -0
  59. package/file-input/FileInput.d.ts +4 -0
  60. package/file-input/FileInput.js +55 -188
  61. package/file-input/FileItem.d.ts +14 -0
  62. package/file-input/FileItem.js +33 -138
  63. package/file-input/types.d.ts +87 -0
  64. package/file-input/types.js +5 -0
  65. package/footer/Footer.d.ts +4 -0
  66. package/footer/Footer.js +38 -193
  67. package/footer/Footer.stories.jsx +151 -0
  68. package/footer/Icons.js +13 -13
  69. package/footer/types.d.ts +61 -0
  70. package/footer/types.js +5 -0
  71. package/header/Header.d.ts +7 -0
  72. package/header/Header.js +60 -206
  73. package/header/Header.stories.tsx +162 -0
  74. package/header/Icons.js +7 -32
  75. package/header/types.d.ts +45 -0
  76. package/header/types.js +5 -0
  77. package/heading/Heading.d.ts +4 -0
  78. package/heading/Heading.js +24 -95
  79. package/heading/types.d.ts +33 -0
  80. package/heading/types.js +5 -0
  81. package/input-text/Icons.js +2 -2
  82. package/input-text/InputText.js +33 -127
  83. package/layout/ApplicationLayout.js +31 -123
  84. package/layout/Icons.js +7 -7
  85. package/link/Link.d.ts +3 -0
  86. package/link/Link.js +18 -94
  87. package/link/Link.stories.tsx +146 -0
  88. package/link/types.d.ts +74 -0
  89. package/link/types.js +5 -0
  90. package/main.d.ts +44 -40
  91. package/main.js +91 -87
  92. package/number-input/NumberInput.d.ts +4 -0
  93. package/number-input/NumberInput.js +7 -57
  94. package/number-input/NumberInput.stories.tsx +115 -0
  95. package/number-input/NumberInputContext.js +1 -1
  96. package/number-input/types.d.ts +117 -0
  97. package/number-input/types.js +5 -0
  98. package/package.json +15 -12
  99. package/paginator/Icons.js +9 -9
  100. package/paginator/Paginator.d.ts +4 -0
  101. package/paginator/Paginator.js +24 -131
  102. package/paginator/Paginator.stories.tsx +63 -0
  103. package/paginator/types.d.ts +38 -0
  104. package/paginator/types.js +5 -0
  105. package/password-input/PasswordInput.d.ts +4 -0
  106. package/password-input/PasswordInput.js +18 -59
  107. package/password-input/PasswordInput.stories.tsx +131 -0
  108. package/password-input/types.d.ts +100 -0
  109. package/password-input/types.js +5 -0
  110. package/progress-bar/ProgressBar.d.ts +4 -0
  111. package/progress-bar/ProgressBar.js +20 -92
  112. package/progress-bar/ProgressBar.stories.jsx +58 -0
  113. package/progress-bar/types.d.ts +37 -0
  114. package/progress-bar/types.js +5 -0
  115. package/radio/Radio.d.ts +4 -0
  116. package/radio/Radio.js +15 -50
  117. package/radio/Radio.stories.tsx +192 -0
  118. package/radio/types.d.ts +54 -0
  119. package/radio/types.js +5 -0
  120. package/resultsetTable/ResultsetTable.js +35 -119
  121. package/select/Select.js +161 -434
  122. package/select/Select.stories.tsx +572 -0
  123. package/select/index.d.ts +4 -4
  124. package/sidenav/Sidenav.d.ts +9 -0
  125. package/sidenav/Sidenav.js +19 -62
  126. package/sidenav/types.d.ts +50 -0
  127. package/sidenav/types.js +5 -0
  128. package/slider/Slider.d.ts +4 -0
  129. package/slider/Slider.js +71 -158
  130. package/slider/Slider.stories.tsx +177 -0
  131. package/slider/types.d.ts +78 -0
  132. package/slider/types.js +5 -0
  133. package/spinner/Spinner.d.ts +4 -0
  134. package/spinner/Spinner.js +43 -174
  135. package/spinner/Spinner.stories.jsx +102 -0
  136. package/spinner/types.d.ts +32 -0
  137. package/spinner/types.js +5 -0
  138. package/switch/Switch.d.ts +4 -0
  139. package/switch/Switch.js +26 -69
  140. package/switch/Switch.stories.tsx +160 -0
  141. package/switch/types.d.ts +58 -0
  142. package/switch/types.js +5 -0
  143. package/table/Table.d.ts +4 -0
  144. package/table/Table.js +10 -24
  145. package/table/Table.stories.jsx +276 -0
  146. package/table/types.d.ts +21 -0
  147. package/table/types.js +5 -0
  148. package/tabs/Tabs.d.ts +4 -0
  149. package/tabs/Tabs.js +29 -161
  150. package/tabs/types.d.ts +71 -0
  151. package/tabs/types.js +5 -0
  152. package/tag/Tag.d.ts +4 -0
  153. package/tag/Tag.js +37 -126
  154. package/tag/Tag.stories.tsx +145 -0
  155. package/tag/types.d.ts +60 -0
  156. package/tag/types.js +5 -0
  157. package/text-input/TextInput.js +104 -271
  158. package/text-input/index.d.ts +2 -2
  159. package/textarea/Textarea.js +20 -72
  160. package/textarea/Textarea.stories.jsx +135 -0
  161. package/toggle/Toggle.js +15 -49
  162. package/toggle-group/ToggleGroup.js +23 -107
  163. package/toggle-group/ToggleGroup.stories.tsx +178 -0
  164. package/upload/Upload.js +11 -15
  165. package/upload/buttons-upload/ButtonsUpload.js +13 -37
  166. package/upload/buttons-upload/Icons.js +7 -7
  167. package/upload/dragAndDropArea/DragAndDropArea.js +24 -128
  168. package/upload/dragAndDropArea/Icons.js +6 -6
  169. package/upload/file-upload/FileToUpload.js +16 -90
  170. package/upload/file-upload/Icons.js +13 -13
  171. package/upload/files-upload/FilesToUpload.js +12 -26
  172. package/upload/transaction/Icons.js +31 -31
  173. package/upload/transaction/Transaction.js +17 -61
  174. package/upload/transactions/Transactions.js +13 -57
  175. package/wizard/Icons.js +8 -8
  176. package/wizard/Wizard.d.ts +4 -0
  177. package/wizard/Wizard.js +32 -206
  178. package/wizard/Wizard.stories.jsx +224 -0
  179. package/wizard/types.d.ts +64 -0
  180. package/wizard/types.js +5 -0
  181. package/accordion/index.d.ts +0 -28
  182. package/accordion-group/index.d.ts +0 -16
  183. package/alert/index.d.ts +0 -51
  184. package/box/index.d.ts +0 -25
  185. package/button/Button.stories.js +0 -27
  186. package/button/index.d.ts +0 -24
  187. package/card/index.d.ts +0 -22
  188. package/checkbox/index.d.ts +0 -24
  189. package/date-input/index.d.ts +0 -95
  190. package/dialog/index.d.ts +0 -18
  191. package/dropdown/index.d.ts +0 -26
  192. package/file-input/index.d.ts +0 -81
  193. package/footer/index.d.ts +0 -25
  194. package/header/index.d.ts +0 -25
  195. package/heading/index.d.ts +0 -17
  196. package/link/index.d.ts +0 -23
  197. package/number-input/index.d.ts +0 -113
  198. package/paginator/index.d.ts +0 -20
  199. package/password-input/index.d.ts +0 -94
  200. package/progress-bar/index.d.ts +0 -18
  201. package/radio/index.d.ts +0 -23
  202. package/sidenav/index.d.ts +0 -13
  203. package/slider/index.d.ts +0 -29
  204. package/spinner/index.d.ts +0 -17
  205. package/switch/index.d.ts +0 -24
  206. package/table/index.d.ts +0 -13
  207. package/tabs/index.d.ts +0 -19
  208. package/tag/index.d.ts +0 -24
  209. package/wizard/index.d.ts +0 -18
@@ -0,0 +1,61 @@
1
+ /// <reference types="react" />
2
+ declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
+ declare type Size = {
4
+ top?: Space;
5
+ bottom?: Space;
6
+ left?: Space;
7
+ right?: Space;
8
+ };
9
+ declare type SocialLink = {
10
+ logo?: ImgElement;
11
+ logoSrc?: string;
12
+ href?: string;
13
+ };
14
+ declare type BottomLink = {
15
+ text?: string;
16
+ href?: string;
17
+ };
18
+ declare type ImgElement = HTMLElement & (SVGElement | HTMLImageElement);
19
+ declare type FooterPropsType = {
20
+ /**
21
+ * An array of objects representing the links that will be rendered as
22
+ * icons at the top-right side of the footer. Each object has the
23
+ * following properties:
24
+ * - logo: Element used as the icon for the link.
25
+ * - logoSrc: The path of an icon for the link. @deprecated
26
+ * - href: URL of the page the link goes to.
27
+ */
28
+ socialLinks?: [SocialLink, ...SocialLink[]];
29
+ /**
30
+ * An array of objects representing the links that will be rendered at
31
+ * the bottom part of the footer. Each object has the following
32
+ * properties:
33
+ * - text: Text for the link.
34
+ * - href: URL of the page the link goes to.
35
+ */
36
+ bottomLinks?: [BottomLink, ...BottomLink[]];
37
+ /**
38
+ * The center section of the footer. Can be used to render custom
39
+ * content in this area.
40
+ */
41
+ children?: React.ReactNode;
42
+ /**
43
+ * The text that will be displayed as copyright disclaimer.
44
+ */
45
+ copyright?: string;
46
+ /**
47
+ * Value of the tabindex for all interactuable elements, except those
48
+ * inside the custom area.
49
+ */
50
+ tabIndex?: number;
51
+ /**
52
+ * Size of the top margin to be applied to the footer.
53
+ */
54
+ margin?: Space | Size;
55
+ /**
56
+ * Size of the padding to be applied to the custom area of the component.
57
+ * You can pass an object with properties in order to specify different padding sizes.
58
+ */
59
+ padding?: Space | Size;
60
+ };
61
+ export default FooterPropsType;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import HeaderPropsType from "./types";
3
+ declare const DxcHeader: {
4
+ ({ underlined, content, responsiveContent, onClick, margin, padding, tabIndex, }: HeaderPropsType): JSX.Element;
5
+ Dropdown: (props: any) => JSX.Element;
6
+ };
7
+ export default DxcHeader;
package/header/Header.js CHANGED
@@ -1,16 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
-
5
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
4
 
5
+ var _typeof3 = require("@babel/runtime/helpers/typeof");
6
+
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
10
  exports["default"] = void 0;
11
11
 
12
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
12
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
13
 
16
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -23,8 +21,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
21
 
24
22
  var _AppBar = _interopRequireDefault(require("@material-ui/core/AppBar"));
25
23
 
26
- var _propTypes = _interopRequireDefault(require("prop-types"));
27
-
28
24
  var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
29
25
 
30
26
  var _Icons = require("./Icons");
@@ -35,161 +31,38 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
35
31
 
36
32
  var _BackgroundColorContext = _interopRequireWildcard(require("../BackgroundColorContext.js"));
37
33
 
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
- }
34
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
35
+
36
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
+
38
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
39
+
40
+ var closeIcon = /*#__PURE__*/_react["default"].createElement("svg", {
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ height: "24",
43
+ viewBox: "0 0 24 24",
44
+ width: "24"
45
+ }, /*#__PURE__*/_react["default"].createElement("path", {
46
+ 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"
47
+ }), /*#__PURE__*/_react["default"].createElement("path", {
48
+ d: "M0 0h24v24H0z",
49
+ fill: "none"
50
+ }));
51
+
52
+ var hamburgerIcon = /*#__PURE__*/_react["default"].createElement("svg", {
53
+ xmlns: "http://www.w3.org/2000/svg",
54
+ viewBox: "0 0 24 24",
55
+ width: "24",
56
+ height: "24"
57
+ }, /*#__PURE__*/_react["default"].createElement("path", {
58
+ 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"
59
+ }));
187
60
 
188
61
  var Dropdown = function Dropdown(props) {
189
- return _react["default"].createElement(HeaderDropdown, null, _react["default"].createElement(_Dropdown["default"], props));
62
+ return /*#__PURE__*/_react["default"].createElement(HeaderDropdown, null, /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], props));
190
63
  };
191
64
 
192
- var HeaderDropdown = _styledComponents["default"].div(_templateObject());
65
+ var HeaderDropdown = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n button {\n background-color: transparent;\n :hover {\n background-color: transparent;\n }\n }\n"])));
193
66
 
194
67
  var getLogoElement = function getLogoElement(themeInput) {
195
68
  if (!themeInput) {
@@ -197,7 +70,7 @@ var getLogoElement = function getLogoElement(themeInput) {
197
70
  }
198
71
 
199
72
  if (typeof themeInput === "string") {
200
- return _react["default"].createElement(LogoImg, {
73
+ return /*#__PURE__*/_react["default"].createElement(LogoImg, {
201
74
  alt: "Logo",
202
75
  src: themeInput
203
76
  });
@@ -209,9 +82,9 @@ var getLogoElement = function getLogoElement(themeInput) {
209
82
  var DxcHeader = function DxcHeader(_ref) {
210
83
  var _ref$underlined = _ref.underlined,
211
84
  underlined = _ref$underlined === void 0 ? false : _ref$underlined,
212
- onClick = _ref.onClick,
213
85
  content = _ref.content,
214
86
  responsiveContent = _ref.responsiveContent,
87
+ onClick = _ref.onClick,
215
88
  margin = _ref.margin,
216
89
  padding = _ref.padding,
217
90
  _ref$tabIndex = _ref.tabIndex,
@@ -224,7 +97,7 @@ var DxcHeader = function DxcHeader(_ref) {
224
97
  refSize = _useState2[0],
225
98
  setRefSize = _useState2[1];
226
99
 
227
- var _useState3 = (0, _react.useState)(),
100
+ var _useState3 = (0, _react.useState)(false),
228
101
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
229
102
  isResponsive = _useState4[0],
230
103
  setIsResponsive = _useState4[1];
@@ -248,9 +121,9 @@ var DxcHeader = function DxcHeader(_ref) {
248
121
 
249
122
  var ContentContainerComponent = function ContentContainerComponent() {
250
123
  var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
251
- return isResponsive && _react["default"].createElement(MenuContent, {
124
+ return isResponsive && /*#__PURE__*/_react["default"].createElement(MenuContent, {
252
125
  backgroundType: backgroundType
253
- }, responsiveContent(handleMenu)) || _react["default"].createElement(ContentContainer, {
126
+ }, responsiveContent(handleMenu)) || /*#__PURE__*/_react["default"].createElement(ContentContainer, {
254
127
  padding: padding,
255
128
  backgroundType: backgroundType
256
129
  }, content);
@@ -285,43 +158,43 @@ var DxcHeader = function DxcHeader(_ref) {
285
158
  window.removeEventListener("resize", handleEventListener);
286
159
  };
287
160
  }, []);
288
- return _react["default"].createElement(_styledComponents.ThemeProvider, {
161
+ return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
289
162
  theme: colorsTheme.header
290
- }, _react["default"].createElement(HeaderContainer, {
163
+ }, /*#__PURE__*/_react["default"].createElement(HeaderContainer, {
291
164
  $underlined: underlined,
292
165
  position: "static",
293
166
  margin: margin,
294
167
  ref: ref
295
- }, _react["default"].createElement(LogoAnchor, {
168
+ }, /*#__PURE__*/_react["default"].createElement(LogoAnchor, {
296
169
  tabIndex: typeof onClick === "function" ? tabIndex : -1,
297
170
  interactuable: typeof onClick === "function",
298
171
  onClick: onClick
299
- }, _react["default"].createElement(LogoContainer, null, headerLogo)), isResponsive && responsiveContent && _react["default"].createElement(MainContainer, null, _react["default"].createElement(ChildContainer, {
172
+ }, /*#__PURE__*/_react["default"].createElement(LogoContainer, null, headerLogo)), isResponsive && responsiveContent && /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(ChildContainer, {
300
173
  padding: padding
301
- }, _react["default"].createElement(HamburguerItem, {
174
+ }, /*#__PURE__*/_react["default"].createElement(HamburguerItem, {
302
175
  tabIndex: tabIndex,
303
176
  underlined: underlined,
304
177
  onClick: handleMenu
305
- }, _Icons.hamburgerIcon, _react["default"].createElement(HamburguerTitle, null, "Menu"))), _react["default"].createElement("div", null, _react["default"].createElement(ResponsiveMenu, {
178
+ }, hamburgerIcon, /*#__PURE__*/_react["default"].createElement(HamburguerTitle, null, "Menu"))), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(ResponsiveMenu, {
306
179
  hasVisibility: isMenuVisible,
307
180
  refSize: refSize
308
- }, _react["default"].createElement(ResponsiveLogoContainer, null, headerResponsiveLogo), _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
181
+ }, /*#__PURE__*/_react["default"].createElement(ResponsiveLogoContainer, null, headerResponsiveLogo), /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
309
182
  color: colorsTheme.header.menuBackgroundColor
310
- }, _react["default"].createElement(ContentContainerComponent, null, responsiveContent(handleMenu))), _react["default"].createElement(CloseContainer, {
183
+ }, /*#__PURE__*/_react["default"].createElement(ContentContainerComponent, null)), /*#__PURE__*/_react["default"].createElement(CloseContainer, {
311
184
  tabIndex: tabIndex,
312
185
  onClick: handleMenu,
313
186
  className: "closeIcon"
314
- }, _Icons.closeIcon)), _react["default"].createElement(Overlay, {
187
+ }, closeIcon)), /*#__PURE__*/_react["default"].createElement(Overlay, {
315
188
  onClick: handleMenu,
316
189
  hasVisibility: isMenuVisible,
317
190
  refSize: refSize
318
- }))), !isResponsive && _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
191
+ }))), !isResponsive && /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
319
192
  color: colorsTheme.header.backgroundColor
320
- }, _react["default"].createElement(ContentContainerComponent, null))));
193
+ }, /*#__PURE__*/_react["default"].createElement(ContentContainerComponent, null))));
321
194
  };
322
195
 
323
196
  DxcHeader.Dropdown = Dropdown;
324
- var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject2(), function (props) {
197
+ var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject2 || (_templateObject2 = (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"])), function (props) {
325
198
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
326
199
  }, function (props) {
327
200
  return props.theme.backgroundColor;
@@ -333,7 +206,7 @@ var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_tem
333
206
  return "".concat(props.theme.paddingTop, " ").concat(props.theme.paddingRight, " ").concat(props.theme.paddingBottom, " ").concat(props.theme.paddingLeft);
334
207
  });
335
208
 
336
- var LogoAnchor = _styledComponents["default"].a(_templateObject3(), function (props) {
209
+ var LogoAnchor = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (props) {
337
210
  if (!props.interactuable) {
338
211
  return "cursor: default; outline:none;";
339
212
  }
@@ -341,19 +214,19 @@ var LogoAnchor = _styledComponents["default"].a(_templateObject3(), function (pr
341
214
  return "cursor: pointer;";
342
215
  });
343
216
 
344
- var LogoImg = _styledComponents["default"].img(_templateObject4(), function (props) {
217
+ var LogoImg = _styledComponents["default"].img(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"])), function (props) {
345
218
  return props.theme.logoHeight;
346
219
  }, function (props) {
347
220
  return props.theme.logoWidth;
348
221
  });
349
222
 
350
- var LogoContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
223
+ var LogoContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n vertical-align: middle;\n"])), function (props) {
351
224
  return props.theme.logoHeight;
352
225
  }, function (props) {
353
226
  return props.theme.logoWidth;
354
227
  });
355
228
 
356
- var ChildContainer = _styledComponents["default"].div(_templateObject6(), function (props) {
229
+ var ChildContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (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"])), function (props) {
357
230
  return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
358
231
  }, function (props) {
359
232
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
@@ -365,7 +238,7 @@ var ChildContainer = _styledComponents["default"].div(_templateObject6(), functi
365
238
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
366
239
  });
367
240
 
368
- var ContentContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
241
+ var ContentContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (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"])), function (props) {
369
242
  return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
370
243
  }, function (props) {
371
244
  return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
@@ -379,7 +252,7 @@ var ContentContainer = _styledComponents["default"].div(_templateObject7(), func
379
252
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
380
253
  });
381
254
 
382
- var HamburguerItem = _styledComponents["default"].div(_templateObject8(), function (props) {
255
+ var HamburguerItem = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (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"])), function (props) {
383
256
  return props.theme.hamburguerHoverColor;
384
257
  }, function (props) {
385
258
  return props.theme.hamburguerFocusColor;
@@ -387,7 +260,7 @@ var HamburguerItem = _styledComponents["default"].div(_templateObject8(), functi
387
260
  return props.theme.hamburguerIconColor;
388
261
  });
389
262
 
390
- var HamburguerTitle = _styledComponents["default"].span(_templateObject9(), function (props) {
263
+ var HamburguerTitle = _styledComponents["default"].span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n text-transform: ", ";\n font-weight: ", ";\n color: ", ";\n"])), function (props) {
391
264
  return props.theme.hamburguerFontFamily;
392
265
  }, function (props) {
393
266
  return props.theme.hamburguerFontStyle;
@@ -401,9 +274,9 @@ var HamburguerTitle = _styledComponents["default"].span(_templateObject9(), func
401
274
  return props.theme.hamburguerFontColor;
402
275
  });
403
276
 
404
- var MainContainer = _styledComponents["default"].div(_templateObject10());
277
+ var MainContainer = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"])));
405
278
 
406
- var ResponsiveMenu = _styledComponents["default"].div(_templateObject11(), function (props) {
279
+ var ResponsiveMenu = _styledComponents["default"].div(_templateObject11 || (_templateObject11 = (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"])), function (props) {
407
280
  return props.theme.menuBackgroundColor;
408
281
  }, function (props) {
409
282
  return props.theme.menuZindex;
@@ -419,21 +292,21 @@ var ResponsiveMenu = _styledComponents["default"].div(_templateObject11(), funct
419
292
  return props.hasVisibility ? "1" : "0.96";
420
293
  });
421
294
 
422
- var ResponsiveLogoContainer = _styledComponents["default"].div(_templateObject12(), function (props) {
295
+ var ResponsiveLogoContainer = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n position: absolute;\n top: 23px;\n left: 20px;\n"])), function (props) {
423
296
  return props.theme.logoHeight;
424
297
  }, function (props) {
425
298
  return props.theme.logoWidth;
426
299
  });
427
300
 
428
- var CloseContainer = _styledComponents["default"].div(_templateObject13(), function (props) {
301
+ var CloseContainer = _styledComponents["default"].div(_templateObject13 || (_templateObject13 = (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"])), function (props) {
429
302
  return props.theme.hamburguerFocusColor;
430
303
  }, _variables.spaces.xxsmall);
431
304
 
432
- var MenuContent = _styledComponents["default"].div(_templateObject14(), function (props) {
305
+ var MenuContent = _styledComponents["default"].div(_templateObject14 || (_templateObject14 = (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"])), function (props) {
433
306
  return props.backgroundType === "dark" ? props.theme.contentColorOnDark : props.theme.contentColor;
434
307
  });
435
308
 
436
- var Overlay = _styledComponents["default"].div(_templateObject15(), function (props) {
309
+ var Overlay = _styledComponents["default"].div(_templateObject15 || (_templateObject15 = (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"])), function (props) {
437
310
  return props.theme.overlayColor;
438
311
  }, function (props) {
439
312
  return props.theme.overlayOpacity;
@@ -447,24 +320,5 @@ var Overlay = _styledComponents["default"].div(_templateObject15(), function (pr
447
320
  return props.theme.overlayZindex;
448
321
  });
449
322
 
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
323
  var _default = DxcHeader;
470
324
  exports["default"] = _default;