@dxc-technology/halstack-react 0.0.0-c24450b → 0.0.0-c6243ef

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 (129) hide show
  1. package/babel.config.js +6 -2
  2. package/dist/BackgroundColorContext.js +46 -0
  3. package/dist/ThemeContext.js +235 -2
  4. package/dist/accordion/Accordion.js +170 -81
  5. package/dist/accordion-group/AccordionGroup.js +186 -0
  6. package/dist/alert/Alert.js +184 -83
  7. package/dist/alert/index.d.ts +51 -0
  8. package/dist/badge/Badge.js +63 -0
  9. package/dist/box/Box.js +31 -23
  10. package/dist/button/Button.js +82 -27
  11. package/dist/card/Card.js +72 -35
  12. package/dist/checkbox/Checkbox.js +108 -32
  13. package/dist/chip/Chip.js +129 -35
  14. package/dist/common/RequiredComponent.js +2 -8
  15. package/dist/common/utils.js +2 -22
  16. package/dist/common/variables.js +1457 -210
  17. package/dist/date/Date.js +81 -59
  18. package/dist/dialog/Dialog.js +58 -37
  19. package/dist/dropdown/Dropdown.js +229 -68
  20. package/dist/file-input/FileInput.js +644 -0
  21. package/dist/file-input/FileItem.js +280 -0
  22. package/dist/file-input/index.d.ts +81 -0
  23. package/dist/footer/Footer.js +87 -38
  24. package/dist/footer/dxc_logo.svg +15 -0
  25. package/dist/footer/readme.md +1 -1
  26. package/dist/header/Header.js +121 -72
  27. package/dist/header/dxc_logo_black.svg +8 -0
  28. package/dist/header/readme.md +1 -1
  29. package/dist/heading/Heading.js +81 -22
  30. package/dist/input-text/InputText.js +289 -101
  31. package/dist/layout/ApplicationLayout.js +331 -0
  32. package/dist/layout/facebook.svg +45 -0
  33. package/dist/layout/linkedin.svg +50 -0
  34. package/dist/layout/twitter.svg +53 -0
  35. package/dist/link/Link.js +136 -35
  36. package/dist/main.d.ts +8 -0
  37. package/dist/main.js +105 -1
  38. package/dist/new-date/NewDate.js +400 -0
  39. package/dist/new-date/index.d.ts +95 -0
  40. package/dist/new-select/NewSelect.js +836 -0
  41. package/dist/new-select/index.d.ts +53 -0
  42. package/dist/new-textarea/NewTextarea.js +369 -0
  43. package/dist/new-textarea/index.d.ts +117 -0
  44. package/dist/number/Number.js +136 -0
  45. package/dist/number/NumberContext.js +16 -0
  46. package/dist/number/index.d.ts +113 -0
  47. package/dist/paginator/Paginator.js +160 -49
  48. package/dist/password-input/PasswordInput.js +198 -0
  49. package/dist/password-input/index.d.ts +94 -0
  50. package/dist/progress-bar/ProgressBar.js +97 -44
  51. package/dist/radio/Radio.js +39 -21
  52. package/dist/resultsetTable/ResultsetTable.js +93 -69
  53. package/dist/select/Select.js +250 -143
  54. package/dist/sidenav/Sidenav.js +85 -143
  55. package/dist/slider/Slider.js +206 -70
  56. package/dist/spinner/Spinner.js +249 -64
  57. package/dist/switch/Switch.js +51 -26
  58. package/dist/table/Table.js +63 -15
  59. package/dist/tabs/Tabs.js +208 -35
  60. package/dist/tabs-for-sections/TabsForSections.js +1 -16
  61. package/dist/tag/Tag.js +100 -35
  62. package/dist/text-input/TextInput.js +971 -0
  63. package/dist/text-input/index.d.ts +135 -0
  64. package/dist/textarea/Textarea.js +81 -43
  65. package/dist/toggle/Toggle.js +16 -19
  66. package/dist/toggle-group/ToggleGroup.js +327 -0
  67. package/dist/upload/Upload.js +13 -8
  68. package/dist/upload/buttons-upload/ButtonsUpload.js +34 -20
  69. package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -31
  70. package/dist/upload/file-upload/FileToUpload.js +50 -24
  71. package/dist/upload/files-upload/FilesToUpload.js +16 -16
  72. package/dist/upload/transaction/Transaction.js +44 -24
  73. package/dist/upload/transactions/Transactions.js +38 -20
  74. package/dist/useTheme.js +22 -0
  75. package/dist/wizard/Wizard.js +142 -51
  76. package/dist/wizard/invalid_icon.svg +4 -5
  77. package/dist/wizard/valid_icon.svg +4 -5
  78. package/package.json +14 -6
  79. package/test/AccordionGroup.test.js +125 -0
  80. package/test/Date.test.js +13 -13
  81. package/test/Dropdown.test.js +19 -4
  82. package/test/FileInput.test.js +201 -0
  83. package/test/InputText.test.js +30 -26
  84. package/test/Link.test.js +25 -7
  85. package/test/NewDate.test.js +232 -0
  86. package/test/NewTextarea.test.js +195 -0
  87. package/test/Number.test.js +257 -0
  88. package/test/Paginator.test.js +72 -60
  89. package/test/PasswordInput.test.js +83 -0
  90. package/test/ResultsetTable.test.js +66 -19
  91. package/test/Select.test.js +55 -34
  92. package/test/Sidenav.test.js +22 -64
  93. package/test/Slider.test.js +17 -0
  94. package/test/Spinner.test.js +5 -0
  95. package/test/Tabs.test.js +21 -0
  96. package/test/TextInput.test.js +732 -0
  97. package/test/ToggleGroup.test.js +85 -0
  98. package/dist/accordion/Accordion.stories.js +0 -207
  99. package/dist/accordion/readme.md +0 -96
  100. package/dist/alert/Alert.stories.js +0 -158
  101. package/dist/alert/close.svg +0 -4
  102. package/dist/alert/error.svg +0 -4
  103. package/dist/alert/info.svg +0 -4
  104. package/dist/alert/readme.md +0 -43
  105. package/dist/alert/success.svg +0 -4
  106. package/dist/alert/warning.svg +0 -4
  107. package/dist/button/Button.stories.js +0 -224
  108. package/dist/button/readme.md +0 -93
  109. package/dist/common/services/example-service.js +0 -10
  110. package/dist/common/services/example-service.test.js +0 -12
  111. package/dist/date/calendar.svg +0 -1
  112. package/dist/date/calendar_dark.svg +0 -1
  113. package/dist/dialog/Dialog.stories.js +0 -217
  114. package/dist/dialog/readme.md +0 -32
  115. package/dist/dropdown/Dropdown.stories.js +0 -249
  116. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  117. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  118. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  119. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  120. package/dist/dropdown/readme.md +0 -69
  121. package/dist/footer/Footer.stories.js +0 -94
  122. package/dist/footer/dxc_logo_wht.png +0 -0
  123. package/dist/header/dxc_logo_black.png +0 -0
  124. package/dist/header/dxc_logo_white.png +0 -0
  125. package/dist/input-text/InputText.stories.js +0 -209
  126. package/dist/select/Select.stories.js +0 -235
  127. package/dist/select/readme.md +0 -72
  128. package/dist/sidenav/arrow_icon.svg +0 -3
  129. package/test/Toggle.test.js +0 -43
@@ -0,0 +1,15 @@
1
+ <svg id="g10" xmlns="http://www.w3.org/2000/svg" width="280.781" height="32" viewBox="0 0 280.781 32">
2
+ <g id="g12">
3
+ <path id="path14" d="M171.5-54.124v12.539h-3.6V-54.124h-4.973v-3.191h13.54v3.191H171.5" transform="translate(-68.528 65.45)" fill="#fff"/>
4
+ <path id="path16" d="M189.96-41.585V-57.315h12.326v3.079h-8.753v3.191h7.7v3.078h-7.7v3.3h8.87v3.078H189.96" transform="translate(-77.56 65.45)" fill="#fff"/>
5
+ <path id="path18" d="M223.558-41.438a8.1,8.1,0,0,1-8.382-8.1v-.045a8.161,8.161,0,0,1,8.522-8.146,8.6,8.6,0,0,1,6.444,2.431l-2.289,2.543a6.133,6.133,0,0,0-4.178-1.778,4.743,4.743,0,0,0-4.738,4.905v.045a4.752,4.752,0,0,0,4.738,4.95,6,6,0,0,0,4.295-1.845l2.288,2.228a8.491,8.491,0,0,1-6.7,2.813" transform="translate(-86.019 65.583)" fill="#fff"/>
6
+ <path id="path20" d="M254.988-41.585V-47.9h-6.63v6.315h-3.6V-57.315h3.6v6.225h6.63v-6.225h3.594v15.731h-3.594" transform="translate(-95.903 65.45)" fill="#fff"/>
7
+ <path id="path22" d="M285.991-41.585l-7.914-10v10h-3.549V-57.315h3.316l7.657,9.685v-9.685h3.549v15.731h-3.058" transform="translate(-105.869 65.45)" fill="#fff"/>
8
+ <path id="path24" d="M317.2-49.583a4.869,4.869,0,0,0-4.949-4.95,4.793,4.793,0,0,0-4.9,4.905v.045a4.869,4.869,0,0,0,4.949,4.95,4.793,4.793,0,0,0,4.9-4.905Zm-4.949,8.145c-5.043,0-8.661-3.623-8.661-8.1v-.045c0-4.478,3.666-8.146,8.708-8.146s8.66,3.623,8.66,8.1v.045c0,4.477-3.664,8.145-8.708,8.145" transform="translate(-115.631 65.583)" fill="#fff"/>
9
+ <path id="path26" d="M336.786-41.585V-57.315h3.6v12.584h8.148v3.146H336.786" transform="translate(-126.654 65.45)" fill="#fff"/>
10
+ <path id="path28" d="M372.78-49.583a4.87,4.87,0,0,0-4.949-4.95,4.794,4.794,0,0,0-4.9,4.905v.045a4.869,4.869,0,0,0,4.949,4.95,4.794,4.794,0,0,0,4.9-4.905Zm-4.949,8.145c-5.043,0-8.662-3.623-8.662-8.1v-.045c0-4.478,3.666-8.146,8.708-8.146s8.661,3.623,8.661,8.1v.045c0,4.477-3.666,8.145-8.708,8.145" transform="translate(-135.016 65.583)" fill="#fff"/>
11
+ <path id="path30" d="M399.735-41.438c-5.09,0-8.592-3.443-8.592-8.1v-.045a8.243,8.243,0,0,1,8.568-8.146,9.18,9.18,0,0,1,6.42,2.16l-2.265,2.634a6.141,6.141,0,0,0-4.272-1.6,4.807,4.807,0,0,0-4.692,4.905v.045a4.8,4.8,0,0,0,4.949,4.995,5.89,5.89,0,0,0,3.384-.945v-2.25h-3.618v-2.992h7.1v6.841a10.837,10.837,0,0,1-6.98,2.5" transform="translate(-145.284 65.583)" fill="#fff"/>
12
+ <path id="path32" d="M428.664-47.855v6.27h-3.6v-6.2l-6.28-9.528h4.2L426.89-51l3.968-6.315h4.085l-6.28,9.46" transform="translate(-154.162 65.45)" fill="#fff"/>
13
+ <path id="path34" d="M84.218-55.737a10.063,10.063,0,0,1,2.589-4.4,9.792,9.792,0,0,1,6.985-2.77h11.328V-69.3H93.792a17.041,17.041,0,0,0-11.8,4.759,16.344,16.344,0,0,0-3.547,5.115,13.247,13.247,0,0,0-1.122,3.688Zm0,4.877a10.065,10.065,0,0,0,2.589,4.4,9.793,9.793,0,0,0,6.985,2.77h11.328V-37.3H93.792a17.042,17.042,0,0,1-11.8-4.759,16.339,16.339,0,0,1-3.547-5.114,13.251,13.251,0,0,1-1.122-3.688ZM63.1-47.98,54.45-37.3H45.873l12.957-16-12.957-16H54.45L63.1-58.619l8.65-10.68h8.578l-12.957,16,12.957,16H71.749ZM48.875-55.737a13.212,13.212,0,0,0-1.122-3.688,16.359,16.359,0,0,0-3.546-5.115,17.043,17.043,0,0,0-11.8-4.759H21.08v6.393H32.408a9.79,9.79,0,0,1,6.985,2.77,10.072,10.072,0,0,1,2.59,4.4Zm0,4.877a13.215,13.215,0,0,1-1.122,3.688,16.353,16.353,0,0,1-3.546,5.114,17.044,17.044,0,0,1-11.8,4.759H21.08v-6.393H32.408a9.791,9.791,0,0,0,6.985-2.77,10.074,10.074,0,0,0,2.59-4.4h6.892" transform="translate(-21.08 69.298)" fill="#fff"/>
14
+ </g>
15
+ </svg>
@@ -11,7 +11,7 @@
11
11
  <tr>
12
12
  <td>logoSrc: string</td>
13
13
  <td></td>
14
- <td>The path of an icon to replace the default dxc logo.</td>
14
+ <td>The path of an icon to replace the theme logo.</td>
15
15
  </tr>
16
16
  <tr>
17
17
  <td>socialLinks: object[]</td>
@@ -13,10 +13,10 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
13
13
 
14
14
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
15
15
 
16
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
-
18
16
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
19
17
 
18
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
19
+
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
 
22
22
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
@@ -25,24 +25,38 @@ var _AppBar = _interopRequireDefault(require("@material-ui/core/AppBar"));
25
25
 
26
26
  var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
 
28
- var _dxc_logo_white = _interopRequireDefault(require("./dxc_logo_white.png"));
28
+ var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
29
29
 
30
- var _dxc_logo_black = _interopRequireDefault(require("./dxc_logo_black.png"));
30
+ var _close_icon = _interopRequireDefault(require("./close_icon.svg"));
31
31
 
32
- var _hamb_menu_white = _interopRequireDefault(require("./hamb_menu_white.svg"));
32
+ var _variables = require("../common/variables.js");
33
33
 
34
- var _hamb_menu_black = _interopRequireDefault(require("./hamb_menu_black.svg"));
34
+ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
35
35
 
36
- var _close_icon = _interopRequireDefault(require("./close_icon.svg"));
36
+ var _BackgroundColorContext = require("../BackgroundColorContext.js");
37
37
 
38
- var _variables = require("../common/variables.js");
38
+ function _templateObject12() {
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
+ _templateObject12 = function _templateObject12() {
42
+ return data;
43
+ };
39
44
 
40
- var _utils = require("../common/utils.js");
45
+ return data;
46
+ }
41
47
 
42
- var _ThemeContext = _interopRequireDefault(require("../ThemeContext.js"));
48
+ function _templateObject11() {
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n cursor: pointer;\n :focus {\n outline: ", " auto 1px;\n }\n"]);
50
+
51
+ _templateObject11 = function _templateObject11() {
52
+ return data;
53
+ };
54
+
55
+ return data;
56
+ }
43
57
 
44
58
  function _templateObject10() {
45
- var data = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: ", ";\n visibility: ", ";\n opacity: ", ";\n display: ", ";\n transition: opacity 0.2s 0.2s ease-in-out;\n z-index: 1600;\n"]);
59
+ 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"]);
46
60
 
47
61
  _templateObject10 = function _templateObject10() {
48
62
  return data;
@@ -52,7 +66,7 @@ function _templateObject10() {
52
66
  }
53
67
 
54
68
  function _templateObject9() {
55
- 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"]);
69
+ 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\n & > img:first-of-type {\n position: absolute;\n top: 23px;\n left: 20px;\n }\n\n & > img:last-of-type {\n position: fixed;\n top: 23px;\n right: 20px;\n width: 24px;\n height: 24px;\n padding: ", ";\n }\n"]);
56
70
 
57
71
  _templateObject9 = function _templateObject9() {
58
72
  return data;
@@ -62,7 +76,7 @@ function _templateObject9() {
62
76
  }
63
77
 
64
78
  function _templateObject8() {
65
- 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: 2000;\n color: ", ";\n width: ", ";\n height: ", "px;\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\n & > img:first-of-type {\n position: absolute;\n top: 23px;\n left: 20px;\n }\n\n & > img:last-of-type {\n position: fixed;\n top: 23px;\n right: 20px;\n width: 24px;\n height: 24px;\n padding: ", ";\n }\n"]);
79
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"]);
66
80
 
67
81
  _templateObject8 = function _templateObject8() {
68
82
  return data;
@@ -72,7 +86,7 @@ function _templateObject8() {
72
86
  }
73
87
 
74
88
  function _templateObject7() {
75
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-grow: 1;\n"]);
89
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n text-transform: ", ";\n font-weight: ", ";\n color: ", ";\n"]);
76
90
 
77
91
  _templateObject7 = function _templateObject7() {
78
92
  return data;
@@ -82,7 +96,7 @@ function _templateObject7() {
82
96
  }
83
97
 
84
98
  function _templateObject6() {
85
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 10px;\n text-transform: uppercase;\n font-weight: 600;\n"]);
99
+ 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"]);
86
100
 
87
101
  _templateObject6 = function _templateObject6() {
88
102
  return data;
@@ -92,7 +106,7 @@ function _templateObject6() {
92
106
  }
93
107
 
94
108
  function _templateObject5() {
95
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 24px;\n height: 24px;\n"]);
109
+ 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"]);
96
110
 
97
111
  _templateObject5 = function _templateObject5() {
98
112
  return data;
@@ -102,7 +116,7 @@ function _templateObject5() {
102
116
  }
103
117
 
104
118
  function _templateObject4() {
105
- 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"]);
119
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n vertical-align: middle;\n"]);
106
120
 
107
121
  _templateObject4 = function _templateObject4() {
108
122
  return data;
@@ -112,7 +126,7 @@ function _templateObject4() {
112
126
  }
113
127
 
114
128
  function _templateObject3() {
115
- 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"]);
129
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"]);
116
130
 
117
131
  _templateObject3 = function _templateObject3() {
118
132
  return data;
@@ -122,7 +136,7 @@ function _templateObject3() {
122
136
  }
123
137
 
124
138
  function _templateObject2() {
125
- var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 32px;\n width: auto;\n vertical-align: middle;\n\n cursor: ", ";\n"]);
139
+ 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"]);
126
140
 
127
141
  _templateObject2 = function _templateObject2() {
128
142
  return data;
@@ -132,7 +146,7 @@ function _templateObject2() {
132
146
  }
133
147
 
134
148
  function _templateObject() {
135
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-bottom: ", ";\n\n &.MuiAppBar-colorPrimary {\n background-color: ", ";\n\n color: ", ";\n\n border-bottom: ", ";\n\n font-family: \"Open Sans\", sans-serif;\n\n &.MuiPaper-elevation4 {\n box-shadow: none;\n }\n .ChildComponents {\n display: flex;\n align-items: center;\n }\n }\n & {\n min-height: 64px;\n }\n &.MuiAppBar-root {\n flex-direction: row;\n align-items: center;\n padding: 0px 0px 0px 20px;\n justify-content: space-between;\n }\n"]);
149
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n button {\n background-color: transparent;\n :hover {\n background-color: transparent;\n }\n }\n"]);
136
150
 
137
151
  _templateObject = function _templateObject() {
138
152
  return data;
@@ -141,28 +155,25 @@ function _templateObject() {
141
155
  return data;
142
156
  }
143
157
 
158
+ var Dropdown = function Dropdown(props) {
159
+ return _react["default"].createElement(HeaderDropdown, null, _react["default"].createElement(_Dropdown["default"], props));
160
+ };
161
+
162
+ var HeaderDropdown = _styledComponents["default"].div(_templateObject());
163
+
144
164
  var DxcHeader = function DxcHeader(_ref) {
145
165
  var _ref$underlined = _ref.underlined,
146
166
  underlined = _ref$underlined === void 0 ? false : _ref$underlined,
147
167
  _ref$logoSrc = _ref.logoSrc,
148
168
  logoSrc = _ref$logoSrc === void 0 ? "default" : _ref$logoSrc,
149
- _ref$onClick = _ref.onClick,
150
- onClick = _ref$onClick === void 0 ? "" : _ref$onClick,
169
+ onClick = _ref.onClick,
151
170
  content = _ref.content,
152
171
  responsiveContent = _ref.responsiveContent,
153
172
  margin = _ref.margin,
154
- padding = _ref.padding;
155
- var customTheme = (0, _react.useContext)(_ThemeContext["default"]);
156
- var colorsTheme = (0, _react.useMemo)(function () {
157
- return (0, _utils.getCustomTheme)(_variables.theme, (0, _utils.getCustomTheme)(_variables.defaultTheme, customTheme));
158
- }, [customTheme]);
159
-
160
- function onClickHandle() {
161
- if (typeof onClick === "function") {
162
- onClick();
163
- }
164
- }
165
-
173
+ padding = _ref.padding,
174
+ _ref$tabIndex = _ref.tabIndex,
175
+ tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
176
+ var colorsTheme = (0, _useTheme["default"])();
166
177
  var ref = (0, _react.useRef)(null);
167
178
 
168
179
  var _useState = (0, _react.useState)(),
@@ -203,7 +214,7 @@ var DxcHeader = function DxcHeader(_ref) {
203
214
  var getLogoRendered = function getLogoRendered(intoMenu) {
204
215
  return _react["default"].createElement(LogoIcon, {
205
216
  logoSrc: logoSrc,
206
- src: intoMenu && logoSrc === "default" ? _dxc_logo_black["default"] : !intoMenu && logoSrc === "default" ? _dxc_logo_white["default"] : logoSrc
217
+ src: intoMenu && logoSrc === "default" ? colorsTheme.header.logoResponsive : !intoMenu && logoSrc === "default" ? colorsTheme.header.logo : logoSrc
207
218
  });
208
219
  };
209
220
 
@@ -222,14 +233,14 @@ var DxcHeader = function DxcHeader(_ref) {
222
233
  };
223
234
  }, []);
224
235
 
225
- var HamburgerIcon = function HamburgerIcon(_ref2) {
226
- var fill = _ref2.fill;
236
+ var HamburgerIcon = function HamburgerIcon() {
227
237
  return _react["default"].createElement("svg", {
228
238
  xmlns: "http://www.w3.org/2000/svg",
229
- viewBox: "0 0 24 24"
239
+ viewBox: "0 0 24 24",
240
+ width: "24",
241
+ height: "24"
230
242
  }, _react["default"].createElement("path", {
231
- 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",
232
- fill: fill
243
+ 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"
233
244
  }));
234
245
  };
235
246
 
@@ -240,21 +251,21 @@ var DxcHeader = function DxcHeader(_ref) {
240
251
  position: "static",
241
252
  margin: margin,
242
253
  ref: ref
243
- }, _react["default"].createElement("a", {
244
- onClick: function onClick() {
245
- return onClickHandle();
246
- }
254
+ }, _react["default"].createElement(LogoAnchor, {
255
+ tabIndex: typeof onClick === "function" ? tabIndex : -1,
256
+ interactuable: typeof onClick === "function",
257
+ onClick: onClick
247
258
  }, getLogoRendered(false)), isResponsive && responsiveContent && _react["default"].createElement(MainContainer, null, _react["default"].createElement(ChildContainer, {
248
259
  padding: padding
249
260
  }, _react["default"].createElement(HamburguerItem, {
261
+ tabIndex: tabIndex,
250
262
  underlined: underlined,
251
263
  onClick: handleMenu
252
- }, _react["default"].createElement(HamburguerIconStyled, null, _react["default"].createElement(HamburgerIcon, {
253
- fill: _variables.theme.header.hamburguerColor
254
- })), _react["default"].createElement(HamburguerTitle, null, "Menu"))), _react["default"].createElement("div", null, _react["default"].createElement(ResponsiveMenu, {
264
+ }, _react["default"].createElement(HamburgerIcon, null), _react["default"].createElement(HamburguerTitle, null, "Menu"))), _react["default"].createElement("div", null, _react["default"].createElement(ResponsiveMenu, {
255
265
  hasVisibility: isMenuVisible,
256
266
  refSize: refSize
257
- }, getLogoRendered(true), _react["default"].createElement(MenuContent, null, responsiveContent(handleMenu)), _react["default"].createElement("img", {
267
+ }, getLogoRendered(true), _react["default"].createElement(MenuContent, null, responsiveContent(handleMenu)), _react["default"].createElement(CloseContainer, {
268
+ tabIndex: tabIndex,
258
269
  onClick: handleMenu,
259
270
  src: _close_icon["default"],
260
271
  className: "closeIcon"
@@ -264,28 +275,39 @@ var DxcHeader = function DxcHeader(_ref) {
264
275
  refSize: refSize
265
276
  }))), !isResponsive && _react["default"].createElement(ChildContainer, {
266
277
  padding: padding
267
- }, content)));
278
+ }, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
279
+ color: colorsTheme.header.backgroundColor
280
+ }, content))));
268
281
  };
269
282
 
270
- var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject(), function (props) {
283
+ DxcHeader.Dropdown = Dropdown;
284
+ var HeaderContainer = (0, _styledComponents["default"])(_AppBar["default"])(_templateObject2(), function (props) {
271
285
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
272
286
  }, function (props) {
273
287
  return props.theme.backgroundColor;
274
288
  }, function (props) {
275
- return props.theme.textColor;
289
+ return props.underlined && "".concat(props.theme.underlinedThickness, " ").concat(props.theme.underlinedStyle, " ").concat(props.theme.underlinedColor);
276
290
  }, function (props) {
277
- return "2px solid ".concat(props.theme.underlinedColor);
291
+ return props.theme.minHeight;
292
+ }, function (props) {
293
+ return "".concat(props.theme.paddingTop, " ").concat(props.theme.paddingRight, " ").concat(props.theme.paddingBottom, " ").concat(props.theme.paddingLeft);
278
294
  });
279
295
 
280
- var LogoIcon = _styledComponents["default"].img(_templateObject2(), function (props) {
281
- if (props.onLogoClick === "") {
282
- return "default";
296
+ var LogoAnchor = _styledComponents["default"].a(_templateObject3(), function (props) {
297
+ if (!props.interactuable) {
298
+ return "cursor: default; outline:none;";
283
299
  } else {
284
- return "pointer";
300
+ return "cursor: pointer;";
285
301
  }
286
302
  });
287
303
 
288
- var ChildContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
304
+ var LogoIcon = _styledComponents["default"].img(_templateObject4(), function (props) {
305
+ return props.theme.logoHeight;
306
+ }, function (props) {
307
+ return props.theme.logoWidth;
308
+ });
309
+
310
+ var ChildContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
289
311
  return props.padding && (0, _typeof2["default"])(props.padding) !== "object" ? _variables.spaces[props.padding] : "0px";
290
312
  }, function (props) {
291
313
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.top ? _variables.spaces[props.padding.top] : "";
@@ -297,38 +319,64 @@ var ChildContainer = _styledComponents["default"].div(_templateObject3(), functi
297
319
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
298
320
  });
299
321
 
300
- var HamburguerItem = _styledComponents["default"].div(_templateObject4(), function (props) {
301
- return props.theme.hoverHamburguerColor;
322
+ var HamburguerItem = _styledComponents["default"].div(_templateObject6(), function (props) {
323
+ return props.theme.hamburguerHoverColor;
324
+ }, function (props) {
325
+ return props.theme.hamburguerFocusColor;
326
+ }, function (props) {
327
+ return props.theme.hamburguerIconColor;
302
328
  });
303
329
 
304
- var HamburguerIconStyled = _styledComponents["default"].div(_templateObject5());
305
-
306
- var HamburguerTitle = _styledComponents["default"].span(_templateObject6());
330
+ var HamburguerTitle = _styledComponents["default"].span(_templateObject7(), function (props) {
331
+ return props.theme.hamburguerFontFamily;
332
+ }, function (props) {
333
+ return props.theme.hamburguerFontStyle;
334
+ }, function (props) {
335
+ return props.theme.hamburguerFontSize;
336
+ }, function (props) {
337
+ return props.theme.hamburguerTextTransform;
338
+ }, function (props) {
339
+ return props.theme.hamburguerFontWeight;
340
+ }, function (props) {
341
+ return props.theme.hamburguerFontColor;
342
+ });
307
343
 
308
- var MainContainer = _styledComponents["default"].div(_templateObject7());
344
+ var MainContainer = _styledComponents["default"].div(_templateObject8());
309
345
 
310
- var ResponsiveMenu = _styledComponents["default"].div(_templateObject8(), function (props) {
311
- return props.theme.backgroundColorMenu;
346
+ var ResponsiveMenu = _styledComponents["default"].div(_templateObject9(), function (props) {
347
+ return props.theme.menuBackgroundColor;
348
+ }, function (props) {
349
+ return props.theme.menuZindex;
312
350
  }, function (props) {
313
- return props.theme.textColorMenu;
351
+ return props.refSize <= _variables.responsiveSizes.laptop && props.refSize > _variables.responsiveSizes.mobileLarge ? "".concat(function (props) {
352
+ return props.theme.menuTabletWidth;
353
+ }) : "".concat(function (props) {
354
+ return props.theme.menuMobileWidth;
355
+ });
314
356
  }, function (props) {
315
- return props.refSize <= _variables.responsiveSizes.laptop && props.refSize > _variables.responsiveSizes.mobileLarge ? "60vw" : "100vw";
316
- }, window.innerHeight, function (props) {
317
357
  return props.hasVisibility ? "translateX(0)" : "translateX(100vw)";
318
358
  }, function (props) {
319
359
  return props.hasVisibility ? "1" : "0.96";
320
360
  }, _variables.spaces.xxsmall);
321
361
 
322
- var MenuContent = _styledComponents["default"].div(_templateObject9());
362
+ var MenuContent = _styledComponents["default"].div(_templateObject10());
363
+
364
+ var CloseContainer = _styledComponents["default"].img(_templateObject11(), function (props) {
365
+ return props.theme.hamburguerFocusColor;
366
+ });
323
367
 
324
- var Overlay = _styledComponents["default"].div(_templateObject10(), function (props) {
325
- return "".concat(props.theme.overlayColor).concat(props.theme.overlayOpacity);
368
+ var Overlay = _styledComponents["default"].div(_templateObject12(), function (props) {
369
+ return props.theme.overlayColor;
370
+ }, function (props) {
371
+ return props.theme.overlayOpacity;
326
372
  }, function (props) {
327
373
  return props.hasVisibility ? "visible" : "hidden";
328
374
  }, function (props) {
329
375
  return props.hasVisibility ? "1" : "0";
330
376
  }, function (props) {
331
377
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "none" : "";
378
+ }, function (props) {
379
+ return props.theme.overlayZindex;
332
380
  });
333
381
 
334
382
  DxcHeader.propTypes = {
@@ -348,7 +396,8 @@ DxcHeader.propTypes = {
348
396
  right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
349
397
  }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
350
398
  content: _propTypes["default"].object,
351
- responsiveContent: _propTypes["default"].object
399
+ responsiveContent: _propTypes["default"].func,
400
+ tabIndex: _propTypes["default"].number
352
401
  };
353
402
  var _default = DxcHeader;
354
403
  exports["default"] = _default;
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="73" height="40" viewBox="0 0 73 40">
2
+ <g id="g10" transform="translate(0)">
3
+ <g id="g12">
4
+ <path id="path14" 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" transform="translate(-21.028 65.555)" fill="#100f0d"/>
5
+ <path id="path16" 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" transform="translate(-21.049 88.739)" fill="#100f0d"/>
6
+ </g>
7
+ </g>
8
+ </svg>
@@ -21,7 +21,7 @@
21
21
  <tr>
22
22
  <td>logoSrc: string</td>
23
23
  <td><code>'default'</code></td>
24
- <td>The path of an icon to replace the default dxc logo.</td>
24
+ <td>The path of an icon to replace the theme logo.</td>
25
25
  </tr>
26
26
  <tr>
27
27
  <td>onClick: function</td>
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
+
3
5
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
6
 
5
7
  Object.defineProperty(exports, "__esModule", {
@@ -15,16 +17,16 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
15
17
 
16
18
  var _react = _interopRequireDefault(require("react"));
17
19
 
18
- var _styledComponents = _interopRequireDefault(require("styled-components"));
20
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
19
21
 
20
22
  var _propTypes = _interopRequireDefault(require("prop-types"));
21
23
 
22
- require("../common/OpenSans.css");
23
-
24
24
  var _variables = require("../common/variables.js");
25
25
 
26
+ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
27
+
26
28
  function _templateObject6() {
27
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 20px;\n line-height: 27px;\n font-weight: ", ";\n letter-spacing: 0.26px;\n margin: 0;\n"]);
29
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
28
30
 
29
31
  _templateObject6 = function _templateObject6() {
30
32
  return data;
@@ -34,7 +36,7 @@ function _templateObject6() {
34
36
  }
35
37
 
36
38
  function _templateObject5() {
37
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 24px;\n line-height: 33px;\n font-weight: ", ";\n letter-spacing: 0px;\n margin: 0;\n"]);
39
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
38
40
 
39
41
  _templateObject5 = function _templateObject5() {
40
42
  return data;
@@ -44,7 +46,7 @@ function _templateObject5() {
44
46
  }
45
47
 
46
48
  function _templateObject4() {
47
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 34px;\n line-height: 46px;\n font-weight: ", ";\n letter-spacing: 0.24px;\n margin: 0;\n"]);
49
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
48
50
 
49
51
  _templateObject4 = function _templateObject4() {
50
52
  return data;
@@ -54,7 +56,7 @@ function _templateObject4() {
54
56
  }
55
57
 
56
58
  function _templateObject3() {
57
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 48px;\n line-height: 65px;\n font-weight: ", ";\n letter-spacing: 0px;\n margin: 0;\n"]);
59
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
58
60
 
59
61
  _templateObject3 = function _templateObject3() {
60
62
  return data;
@@ -64,7 +66,7 @@ function _templateObject3() {
64
66
  }
65
67
 
66
68
  function _templateObject2() {
67
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 60px;\n line-height: 82px;\n font-weight: ", ";\n letter-spacing: -0.53px;\n margin: 0;\n"]);
69
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
68
70
 
69
71
  _templateObject2 = function _templateObject2() {
70
72
  return data;
@@ -74,7 +76,7 @@ function _templateObject2() {
74
76
  }
75
77
 
76
78
  function _templateObject() {
77
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n font-family: \"Open Sans\", sans-serif;\n color: ", ";\n"]);
79
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
78
80
 
79
81
  _templateObject = function _templateObject() {
80
82
  return data;
@@ -86,15 +88,15 @@ function _templateObject() {
86
88
  var DxcHeading = function DxcHeading(_ref) {
87
89
  var _ref$level = _ref.level,
88
90
  level = _ref$level === void 0 ? 1 : _ref$level,
89
- _ref$theme = _ref.theme,
90
- theme = _ref$theme === void 0 ? "light" : _ref$theme,
91
91
  _ref$text = _ref.text,
92
92
  text = _ref$text === void 0 ? "" : _ref$text,
93
93
  _ref$weight = _ref.weight,
94
94
  weight = _ref$weight === void 0 ? "" : _ref$weight,
95
95
  margin = _ref.margin;
96
- return _react["default"].createElement(HeadingContainer, {
97
- brightness: theme,
96
+ var colorsTheme = (0, _useTheme["default"])();
97
+ return _react["default"].createElement(_styledComponents.ThemeProvider, {
98
+ theme: colorsTheme.heading
99
+ }, _react["default"].createElement(HeadingContainer, {
98
100
  margin: margin
99
101
  }, level === 1 ? _react["default"].createElement(HeadingLevel1, {
100
102
  weight: weight
@@ -106,7 +108,7 @@ var DxcHeading = function DxcHeading(_ref) {
106
108
  weight: weight
107
109
  }, text) : _react["default"].createElement(HeadingLevel5, {
108
110
  weight: weight
109
- }, text));
111
+ }, text)));
110
112
  };
111
113
 
112
114
  var HeadingContainer = _styledComponents["default"].div(_templateObject(), function (props) {
@@ -119,33 +121,90 @@ var HeadingContainer = _styledComponents["default"].div(_templateObject(), funct
119
121
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
120
122
  }, function (props) {
121
123
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
122
- }, function (props) {
123
- return props.brightness === "light" ? "#000000DE" : "#FFFFFF";
124
124
  });
125
125
 
126
126
  var HeadingLevel1 = _styledComponents["default"].h1(_templateObject2(), function (props) {
127
- return props.weight === "light" || props.weight === "" ? 200 : props.weight === "normal" ? 400 : 600;
127
+ return props.theme.level1FontFamily;
128
+ }, function (props) {
129
+ return props.theme.level1FontStyle;
130
+ }, function (props) {
131
+ return props.theme.level1FontSize;
132
+ }, function (props) {
133
+ return props.theme.level1LineHeight;
134
+ }, function (props) {
135
+ return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level1FontWeight;
136
+ }, function (props) {
137
+ return props.theme.level1LetterSpacing;
138
+ }, function (props) {
139
+ return props.theme.level1FontColor;
128
140
  });
129
141
 
130
142
  var HeadingLevel2 = _styledComponents["default"].h2(_templateObject3(), function (props) {
131
- return props.weight === "normal" || props.weight === "" ? 400 : props.weight === "light" ? 200 : 600;
143
+ return props.theme.level2FontFamily;
144
+ }, function (props) {
145
+ return props.theme.level2FontStyle;
146
+ }, function (props) {
147
+ return props.theme.level2FontSize;
148
+ }, function (props) {
149
+ return props.theme.level2LineHeight;
150
+ }, function (props) {
151
+ return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level2FontWeight;
152
+ }, function (props) {
153
+ return props.theme.level2LetterSpacing;
154
+ }, function (props) {
155
+ return props.theme.level2FontColor;
132
156
  });
133
157
 
134
158
  var HeadingLevel3 = _styledComponents["default"].h3(_templateObject4(), function (props) {
135
- return props.weight === "normal" || props.weight === "" ? 400 : props.weight === "light" ? 200 : 600;
159
+ return props.theme.level3FontFamily;
160
+ }, function (props) {
161
+ return props.theme.level3FontStyle;
162
+ }, function (props) {
163
+ return props.theme.level3FontSize;
164
+ }, function (props) {
165
+ return props.theme.level3LineHeight;
166
+ }, function (props) {
167
+ return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level3FontWeight;
168
+ }, function (props) {
169
+ return props.theme.level3LetterSpacing;
170
+ }, function (props) {
171
+ return props.theme.level3FontColor;
136
172
  });
137
173
 
138
174
  var HeadingLevel4 = _styledComponents["default"].h4(_templateObject5(), function (props) {
139
- return props.weight === "normal" || props.weight === "" ? 400 : props.weight === "light" ? 200 : 600;
175
+ return props.theme.level4FontFamily;
176
+ }, function (props) {
177
+ return props.theme.level4FontStyle;
178
+ }, function (props) {
179
+ return props.theme.level4FontSize;
180
+ }, function (props) {
181
+ return props.theme.level4LineHeight;
182
+ }, function (props) {
183
+ return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level4FontWeight;
184
+ }, function (props) {
185
+ return props.theme.level4LetterSpacing;
186
+ }, function (props) {
187
+ return props.theme.level4FontColor;
140
188
  });
141
189
 
142
190
  var HeadingLevel5 = _styledComponents["default"].h5(_templateObject6(), function (props) {
143
- return props.weight === "normal" || props.weight === "" ? 400 : props.weight === "light" ? 200 : 600;
191
+ return props.theme.level5FontFamily;
192
+ }, function (props) {
193
+ return props.theme.level5FontStyle;
194
+ }, function (props) {
195
+ return props.theme.level5FontSize;
196
+ }, function (props) {
197
+ return props.theme.level5LineHeight;
198
+ }, function (props) {
199
+ return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level5FontWeight;
200
+ }, function (props) {
201
+ return props.theme.level5LetterSpacing;
202
+ }, function (props) {
203
+ return props.theme.level5FontColor;
144
204
  });
145
205
 
146
206
  DxcHeading.propTypes = {
147
207
  level: _propTypes["default"].number,
148
- theme: _propTypes["default"].oneOf(["light", "dark", ""]),
149
208
  text: _propTypes["default"].string,
150
209
  weight: _propTypes["default"].oneOf(["light", "normal", "bold", ""]),
151
210
  margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({