@dxc-technology/halstack-react 0.0.0-878c09d → 0.0.0-8c3739a

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 (124) hide show
  1. package/README.md +1 -1
  2. package/babel.config.js +6 -2
  3. package/dist/BackgroundColorContext.js +46 -0
  4. package/dist/ThemeContext.js +235 -2
  5. package/dist/accordion/Accordion.js +152 -67
  6. package/dist/accordion-group/AccordionGroup.js +37 -10
  7. package/dist/alert/Alert.js +183 -84
  8. package/dist/alert/index.d.ts +51 -0
  9. package/dist/badge/Badge.js +23 -18
  10. package/dist/box/Box.js +31 -23
  11. package/dist/button/Button.js +61 -25
  12. package/dist/card/Card.js +72 -35
  13. package/dist/checkbox/Checkbox.js +98 -38
  14. package/dist/chip/Chip.js +97 -40
  15. package/dist/common/RequiredComponent.js +2 -8
  16. package/dist/common/utils.js +2 -22
  17. package/dist/common/variables.js +1439 -303
  18. package/dist/date/Date.js +69 -49
  19. package/dist/date-input/DateInput.js +400 -0
  20. package/dist/date-input/index.d.ts +95 -0
  21. package/dist/dialog/Dialog.js +58 -37
  22. package/dist/dropdown/Dropdown.js +176 -81
  23. package/dist/file-input/FileInput.js +644 -0
  24. package/dist/file-input/FileItem.js +280 -0
  25. package/dist/file-input/index.d.ts +81 -0
  26. package/dist/footer/Footer.js +74 -50
  27. package/dist/footer/dxc_logo.svg +15 -0
  28. package/dist/header/Header.js +93 -63
  29. package/dist/header/dxc_logo_black.svg +8 -0
  30. package/dist/heading/Heading.js +81 -16
  31. package/dist/input-text/InputText.js +250 -113
  32. package/dist/layout/ApplicationLayout.js +14 -18
  33. package/dist/link/Link.js +86 -41
  34. package/dist/main.d.ts +8 -0
  35. package/dist/main.js +74 -2
  36. package/dist/new-select/NewSelect.js +836 -0
  37. package/dist/new-select/index.d.ts +53 -0
  38. package/dist/new-textarea/NewTextarea.js +369 -0
  39. package/dist/new-textarea/index.d.ts +117 -0
  40. package/dist/number-input/NumberInput.js +136 -0
  41. package/dist/number-input/NumberInputContext.js +16 -0
  42. package/dist/number-input/index.d.ts +113 -0
  43. package/dist/paginator/Paginator.js +113 -56
  44. package/dist/password-input/PasswordInput.js +198 -0
  45. package/dist/password-input/index.d.ts +94 -0
  46. package/dist/progress-bar/ProgressBar.js +95 -38
  47. package/dist/radio/Radio.js +31 -17
  48. package/dist/resultsetTable/ResultsetTable.js +82 -65
  49. package/dist/select/Select.js +226 -150
  50. package/dist/sidenav/Sidenav.js +66 -15
  51. package/dist/slider/Slider.js +197 -69
  52. package/dist/spinner/Spinner.js +247 -59
  53. package/dist/switch/Switch.js +50 -27
  54. package/dist/table/Table.js +51 -24
  55. package/dist/tabs/Tabs.js +95 -43
  56. package/dist/tag/Tag.js +68 -35
  57. package/dist/text-input/TextInput.js +971 -0
  58. package/dist/text-input/index.d.ts +135 -0
  59. package/dist/textarea/Textarea.js +77 -40
  60. package/dist/toggle/Toggle.js +16 -19
  61. package/dist/toggle-group/ToggleGroup.js +142 -41
  62. package/dist/upload/Upload.js +13 -8
  63. package/dist/upload/buttons-upload/ButtonsUpload.js +31 -14
  64. package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -28
  65. package/dist/upload/file-upload/FileToUpload.js +50 -24
  66. package/dist/upload/files-upload/FilesToUpload.js +16 -16
  67. package/dist/upload/transaction/Transaction.js +44 -24
  68. package/dist/upload/transactions/Transactions.js +38 -20
  69. package/dist/useTheme.js +22 -0
  70. package/dist/wizard/Wizard.js +127 -47
  71. package/dist/wizard/invalid_icon.svg +4 -5
  72. package/dist/wizard/valid_icon.svg +4 -5
  73. package/package.json +8 -2
  74. package/test/AccordionGroup.test.js +16 -0
  75. package/test/Date.test.js +13 -13
  76. package/test/DateInput.test.js +242 -0
  77. package/test/Dropdown.test.js +15 -0
  78. package/test/FileInput.test.js +201 -0
  79. package/test/InputText.test.js +25 -17
  80. package/test/Link.test.js +3 -2
  81. package/test/NewTextarea.test.js +195 -0
  82. package/test/NumberInput.test.js +259 -0
  83. package/test/Paginator.test.js +40 -57
  84. package/test/PasswordInput.test.js +83 -0
  85. package/test/ResultsetTable.test.js +33 -8
  86. package/test/Select.test.js +44 -24
  87. package/test/Spinner.test.js +5 -0
  88. package/test/TextInput.test.js +732 -0
  89. package/test/ToggleGroup.test.js +5 -1
  90. package/dist/accordion/Accordion.stories.js +0 -207
  91. package/dist/accordion/readme.md +0 -96
  92. package/dist/accordion-group/AccordionGroup.stories.js +0 -207
  93. package/dist/accordion-group/readme.md +0 -70
  94. package/dist/alert/Alert.stories.js +0 -158
  95. package/dist/alert/close.svg +0 -4
  96. package/dist/alert/error.svg +0 -4
  97. package/dist/alert/info.svg +0 -4
  98. package/dist/alert/readme.md +0 -43
  99. package/dist/alert/success.svg +0 -4
  100. package/dist/alert/warning.svg +0 -4
  101. package/dist/button/Button.stories.js +0 -224
  102. package/dist/button/readme.md +0 -93
  103. package/dist/common/services/example-service.js +0 -10
  104. package/dist/common/services/example-service.test.js +0 -12
  105. package/dist/date/calendar.svg +0 -1
  106. package/dist/date/calendar_dark.svg +0 -1
  107. package/dist/dialog/Dialog.stories.js +0 -217
  108. package/dist/dialog/readme.md +0 -32
  109. package/dist/dropdown/Dropdown.stories.js +0 -249
  110. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  111. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  112. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  113. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  114. package/dist/dropdown/readme.md +0 -69
  115. package/dist/footer/Footer.stories.js +0 -94
  116. package/dist/footer/dxc_logo_wht.png +0 -0
  117. package/dist/header/dxc_logo_black.png +0 -0
  118. package/dist/header/dxc_logo_blk_rgb.svg +0 -6
  119. package/dist/header/dxc_logo_white.png +0 -0
  120. package/dist/input-text/InputText.stories.js +0 -209
  121. package/dist/select/Select.stories.js +0 -235
  122. package/dist/select/readme.md +0 -72
  123. package/dist/slider/Slider.stories.js +0 -241
  124. package/dist/toggle-group/readme.md +0 -82
@@ -0,0 +1,280 @@
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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _propTypes = _interopRequireDefault(require("prop-types"));
17
+
18
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
19
+
20
+ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
21
+
22
+ function _templateObject10() {
23
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
24
+
25
+ _templateObject10 = function _templateObject10() {
26
+ return data;
27
+ };
28
+
29
+ return data;
30
+ }
31
+
32
+ function _templateObject9() {
33
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 4px;\n margin-left: 4px;\n background-color: transparent;\n padding: 3px;\n cursor: pointer;\n svg {\n line-height: 18px;\n }\n"]);
34
+
35
+ _templateObject9 = function _templateObject9() {
36
+ return data;
37
+ };
38
+
39
+ return data;
40
+ }
41
+
42
+ function _templateObject8() {
43
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n color: #d0011b;\n"]);
44
+
45
+ _templateObject8 = function _templateObject8() {
46
+ return data;
47
+ };
48
+
49
+ return data;
50
+ }
51
+
52
+ function _templateObject7() {
53
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n width: ", ";\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
54
+
55
+ _templateObject7 = function _templateObject7() {
56
+ return data;
57
+ };
58
+
59
+ return data;
60
+ }
61
+
62
+ function _templateObject6() {
63
+ var data = (0, _taggedTemplateLiteral2["default"])([""]);
64
+
65
+ _templateObject6 = function _templateObject6() {
66
+ return data;
67
+ };
68
+
69
+ return data;
70
+ }
71
+
72
+ function _templateObject5() {
73
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 12px;\n background-color: ", ";\n width: 48px;\n height: 48px;\n border-radius: 2px;\n color: ", ";\n"]);
74
+
75
+ _templateObject5 = function _templateObject5() {
76
+ return data;
77
+ };
78
+
79
+ return data;
80
+ }
81
+
82
+ function _templateObject4() {
83
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 48px;\n height: 48px;\n object-fit: contain;\n margin-right: 12px;\n border-radius: 2px;\n"]);
84
+
85
+ _templateObject4 = function _templateObject4() {
86
+ return data;
87
+ };
88
+
89
+ return data;
90
+ }
91
+
92
+ function _templateObject3() {
93
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n align-items: center;\n"]);
94
+
95
+ _templateObject3 = function _templateObject3() {
96
+ return data;
97
+ };
98
+
99
+ return data;
100
+ }
101
+
102
+ function _templateObject2() {
103
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n"]);
104
+
105
+ _templateObject2 = function _templateObject2() {
106
+ return data;
107
+ };
108
+
109
+ return data;
110
+ }
111
+
112
+ function _templateObject() {
113
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n padding: ", ";\n background-color: ", ";\n border-radius: ", ";\n width: ", ";\n min-height: ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n display: flex;\n justify-content: center;\n"]);
114
+
115
+ _templateObject = function _templateObject() {
116
+ return data;
117
+ };
118
+
119
+ return data;
120
+ }
121
+
122
+ var deleteIcon = _react["default"].createElement("svg", {
123
+ xmlns: "http://www.w3.org/2000/svg",
124
+ width: "24",
125
+ height: "24",
126
+ viewBox: "0 0 24 24",
127
+ fill: "currentColor"
128
+ }, _react["default"].createElement("path", {
129
+ d: "M0 0h24v24H0V0z",
130
+ fill: "none"
131
+ }), _react["default"].createElement("path", {
132
+ 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 12 19 6.41z"
133
+ }));
134
+
135
+ var errorIcon = _react["default"].createElement("svg", {
136
+ xmlns: "http://www.w3.org/2000/svg",
137
+ height: "24px",
138
+ viewBox: "0 0 24 24",
139
+ width: "24px",
140
+ fill: "currentColor"
141
+ }, _react["default"].createElement("path", {
142
+ d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"
143
+ }));
144
+
145
+ var FileItem = function FileItem(_ref) {
146
+ var mode = _ref.mode,
147
+ multiple = _ref.multiple,
148
+ _ref$name = _ref.name,
149
+ name = _ref$name === void 0 ? "" : _ref$name,
150
+ _ref$error = _ref.error,
151
+ error = _ref$error === void 0 ? "" : _ref$error,
152
+ showPreview = _ref.showPreview,
153
+ preview = _ref.preview,
154
+ type = _ref.type,
155
+ numFiles = _ref.numFiles,
156
+ onDelete = _ref.onDelete;
157
+ var colorsTheme = (0, _useTheme["default"])();
158
+ var isImage = type.includes("image");
159
+
160
+ var getIconAriaLabel = function getIconAriaLabel() {
161
+ if (type.includes("video")) {
162
+ return "video";
163
+ }
164
+
165
+ if (type.includes("audio")) {
166
+ return "audio";
167
+ }
168
+
169
+ return "file";
170
+ };
171
+
172
+ return _react["default"].createElement(_styledComponents.ThemeProvider, {
173
+ theme: colorsTheme.fileInput
174
+ }, _react["default"].createElement(Container, {
175
+ mode: mode,
176
+ multiple: multiple,
177
+ error: error,
178
+ showPreview: showPreview,
179
+ numFiles: numFiles
180
+ }, showPreview && (isImage ? _react["default"].createElement(ImagePreview, {
181
+ src: preview,
182
+ alt: name
183
+ }) : _react["default"].createElement(IconPreviewContainer, {
184
+ error: error,
185
+ "aria-label": getIconAriaLabel()
186
+ }, _react["default"].createElement(IconPreview, {
187
+ error: error
188
+ }, preview))), _react["default"].createElement(FileItemContent, null, _react["default"].createElement(FileItemContainer, null, _react["default"].createElement(FileName, {
189
+ mode: mode,
190
+ multiple: multiple,
191
+ error: error,
192
+ showPreview: showPreview,
193
+ numFiles: numFiles
194
+ }, name), error && _react["default"].createElement(ErrorIcon, {
195
+ "aria-label": "Error"
196
+ }, errorIcon), _react["default"].createElement(DeleteIcon, {
197
+ onClick: function onClick() {
198
+ return onDelete(name);
199
+ },
200
+ "aria-label": "Remove ".concat(name)
201
+ }, deleteIcon)), error && (multiple || numFiles > 1) && _react["default"].createElement(ErrorMessage, null, error))));
202
+ };
203
+
204
+ var Container = _styledComponents["default"].div(_templateObject(), function (props) {
205
+ return props.showPreview ? "8px" : "8px 8px 8px 16px";
206
+ }, function (props) {
207
+ return props.error && props.theme.errorFileItemBackgroundColor;
208
+ }, function (props) {
209
+ return props.theme.fileItemBorderRadius;
210
+ }, function (props) {
211
+ return props.mode === "file" && !props.multiple && props.numFiles === 1 ? "calc(230px - 26px)" : !props.showPreview ? "calc(320px - 26px)" : props.showPreview && "calc(320px - 18px)";
212
+ }, function (props) {
213
+ return props.mode === "file" && !props.multiple && props.numFiles === 1 || !props.showPreview && !props.error ? "calc(40px - 18px)" : !props.showPreview && props.error ? "calc(59px - 18px)" : "calc(64px - 18px)";
214
+ }, function (props) {
215
+ return props.error ? props.theme.errorFileItemBorderColor : props.theme.fileItemBorderColor;
216
+ }, function (props) {
217
+ return props.theme.fileItemBorderThickness;
218
+ }, function (props) {
219
+ return props.theme.fileItemBorderStyle;
220
+ });
221
+
222
+ var FileItemContent = _styledComponents["default"].div(_templateObject2());
223
+
224
+ var FileItemContainer = _styledComponents["default"].div(_templateObject3());
225
+
226
+ var ImagePreview = _styledComponents["default"].img(_templateObject4());
227
+
228
+ var IconPreviewContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
229
+ return props.error ? props.theme.errorFileItemIconBackgroundColor : props.theme.fileItemIconBackgroundColor;
230
+ }, function (props) {
231
+ return props.error ? props.theme.errorFileItemIconColor : props.theme.fileItemIconColor;
232
+ });
233
+
234
+ var IconPreview = _styledComponents["default"].div(_templateObject6());
235
+
236
+ var FileName = _styledComponents["default"].span(_templateObject7(), function (props) {
237
+ return props.theme.fileNameFontColor;
238
+ }, function (props) {
239
+ return props.mode === "file" && !props.multiple && props.error && props.numFiles === 1 ? "calc(230px - 76px)" : props.mode === "file" && !props.multiple && !props.error && props.numFiles === 1 ? "calc(230px - 50px)" : !props.showPreview && !props.error ? "calc(320px - 52px)" : !props.showPreview && props.error ? "calc(320px - 76px)" : props.showPreview && props.error ? "calc(320px - 128px)" : props.showPreview && !props.error && "calc(320px - 102px)";
240
+ }, function (props) {
241
+ return props.theme.fileItemFontFamily;
242
+ }, function (props) {
243
+ return props.theme.fileItemFontSize;
244
+ }, function (props) {
245
+ return props.theme.fileItemFontWeight;
246
+ }, function (props) {
247
+ return props.theme.fileItemLineHeight;
248
+ });
249
+
250
+ var ErrorIcon = _styledComponents["default"].span(_templateObject8());
251
+
252
+ var DeleteIcon = _styledComponents["default"].button(_templateObject9(), function (props) {
253
+ return props.theme.fontFamily;
254
+ });
255
+
256
+ var ErrorMessage = _styledComponents["default"].span(_templateObject10(), function (props) {
257
+ return props.theme.errorMessageFontColor;
258
+ }, function (props) {
259
+ return props.theme.errorMessageFontFamily;
260
+ }, function (props) {
261
+ return props.theme.errorMessageFontSize;
262
+ }, function (props) {
263
+ return props.theme.errorMessageFontWeight;
264
+ }, function (props) {
265
+ return props.theme.errorMessageLineHeight;
266
+ });
267
+
268
+ FileItem.propTypes = {
269
+ mode: _propTypes["default"].string,
270
+ multiple: _propTypes["default"].bool,
271
+ name: _propTypes["default"].string,
272
+ type: _propTypes["default"].string,
273
+ showPreview: _propTypes["default"]["boolean"],
274
+ numFiles: _propTypes["default"].number,
275
+ preview: _propTypes["default"].string,
276
+ error: _propTypes["default"].string,
277
+ onDelete: _propTypes["default"].func
278
+ };
279
+ var _default = FileItem;
280
+ exports["default"] = _default;
@@ -0,0 +1,81 @@
1
+ type Size = "small" | "medium" | "large" | "fillParent";
2
+ type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
+ type Margin = {
4
+ top?: Space;
5
+ bottom?: Space;
6
+ left?: Space;
7
+ right?: Space;
8
+ };
9
+ type FileData = {
10
+ error?: string;
11
+ file?: File;
12
+ preview?: string;
13
+ };
14
+
15
+ type Props = {
16
+ /**
17
+ * Name attribute of the file input element.
18
+ */
19
+ name?: string;
20
+ /**
21
+ * Text to be placed above the file input.
22
+ */
23
+ label?: string;
24
+ /**
25
+ * Uses one of the available file input modes:
26
+ * 'file': Files are selected by clicking the button and selecting it through the file explorer.
27
+ * 'filedrop': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
28
+ * 'dropzone': Files can be selected by clicking the button and selecting it through the file explorer or by dropping them inside the drag and drop area.
29
+ * The drag and drop area of this mode is bigger than the one of the filedrop mode.
30
+ */
31
+ mode?: "file" | "filedrop" | "dropzone";
32
+ /**
33
+ * Helper text to be placed above the file input.
34
+ */
35
+ helperText?: string;
36
+ /**
37
+ * Defines the file types accepted by the component. It is not possible to select a file with a non valid type.
38
+ */
39
+ accept?: string;
40
+ /**
41
+ * An array of FileData representing the selected files.
42
+ */
43
+ value?: FileData[];
44
+ /**
45
+ * Minimum file size allowed (in bytes). If the file size does not comply the minSize, an error will be passed to the FileData.
46
+ */
47
+ minSize?: number;
48
+ /**
49
+ * Maximum file size allowed (in bytes). If the file size does not comply the maxSize, an error will be passed to the FileData.
50
+ */
51
+ maxSize?: number;
52
+ /**
53
+ * If true and if the file is an image, a preview of it will be shown. If it is not an image, an icon refering to the file's type will be shown.
54
+ * If mode is not multiple and there is one file already selected, the file will be replaced by the last selected one.
55
+ */
56
+ showPreview?: boolean;
57
+ /**
58
+ * If true, more than one file can be selected. If false, only one file can be selected.
59
+ */
60
+ multiple?: boolean;
61
+ /**
62
+ * If true, the component will be disabled.
63
+ */
64
+ disabled?: boolean;
65
+ /**
66
+ * This function will be called when the user selects or drops a file. The list of files will be sent as a parameter.
67
+ * In this function, the files can be updated or returned as they come. These files must be passed to the value in order to be shown.
68
+ */
69
+ callbackFile?: (files: FileData[]) => void;
70
+ /**
71
+ * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
72
+ * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
73
+ */
74
+ margin?: Space | Margin;
75
+ /**
76
+ * Value of the tabindex attribute.
77
+ */
78
+ tabIndex?: number;
79
+ };
80
+
81
+ export default function DxcTextInput(props: Props): JSX.Element;
@@ -23,26 +23,14 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
23
 
24
24
  var _propTypes = _interopRequireDefault(require("prop-types"));
25
25
 
26
- require("../common/OpenSans.css");
27
-
28
26
  var _variables = require("../common/variables.js");
29
27
 
30
- var _ThemeContext = _interopRequireDefault(require("../ThemeContext.js"));
31
-
32
- var _utils = require("../common/utils.js");
33
-
34
- function _templateObject13() {
35
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n color: ", ";\n font-size: 12px;\n"]);
28
+ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
36
29
 
37
- _templateObject13 = function _templateObject13() {
38
- return data;
39
- };
40
-
41
- return data;
42
- }
30
+ var _BackgroundColorContext = require("../BackgroundColorContext.js");
43
31
 
44
32
  function _templateObject12() {
45
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px 10px;\n color: ", ";\n"]);
33
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n"]);
46
34
 
47
35
  _templateObject12 = function _templateObject12() {
48
36
  return data;
@@ -52,7 +40,7 @@ function _templateObject12() {
52
40
  }
53
41
 
54
42
  function _templateObject11() {
55
- var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: 25px;\n width: 25px;\n color: ", ";\n }\n\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
43
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px 10px;\n color: ", ";\n"]);
56
44
 
57
45
  _templateObject11 = function _templateObject11() {
58
46
  return data;
@@ -62,7 +50,7 @@ function _templateObject11() {
62
50
  }
63
51
 
64
52
  function _templateObject10() {
65
- var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: 25px;\n width: 25px;\n fill: ", ";\n }\n"]);
53
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n color: ", ";\n }\n\n overflow: hidden;\n\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
66
54
 
67
55
  _templateObject10 = function _templateObject10() {
68
56
  return data;
@@ -72,7 +60,7 @@ function _templateObject10() {
72
60
  }
73
61
 
74
62
  function _templateObject9() {
75
- var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n margin-left: ", ";\n }\n"]);
63
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n height: ", ";\n width: ", ";\n fill: ", ";\n }\n"]);
76
64
 
77
65
  _templateObject9 = function _templateObject9() {
78
66
  return data;
@@ -82,7 +70,7 @@ function _templateObject9() {
82
70
  }
83
71
 
84
72
  function _templateObject8() {
85
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 34px;\n width: auto;\n\n img,\n svg:not(:root) {\n height: 100%;\n }\n"]);
73
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n & {\n display: inline-flex;\n margin-left: ", ";\n }\n"]);
86
74
 
87
75
  _templateObject8 = function _templateObject8() {
88
76
  return data;
@@ -92,7 +80,7 @@ function _templateObject8() {
92
80
  }
93
81
 
94
82
  function _templateObject7() {
95
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 34px;\n width: auto;\n"]);
83
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"]);
96
84
 
97
85
  _templateObject7 = function _templateObject7() {
98
86
  return data;
@@ -102,7 +90,7 @@ function _templateObject7() {
102
90
  }
103
91
 
104
92
  function _templateObject6() {
105
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: 12px;\n color: ", ";\n max-width: ", ";\n width: ", ";\n text-align: ", ";\n"]);
93
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n max-width: ", ";\n width: ", ";\n text-align: ", ";\n padding-top: ", ";\n"]);
106
94
 
107
95
  _templateObject6 = function _templateObject6() {
108
96
  return data;
@@ -112,7 +100,7 @@ function _templateObject6() {
112
100
  }
113
101
 
114
102
  function _templateObject5() {
115
- var data = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 15px;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n color: ", ";\n overflow: hidden;\n"]);
103
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n min-height: 15px;\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n overflow: hidden;\n"]);
116
104
 
117
105
  _templateObject5 = function _templateObject5() {
118
106
  return data;
@@ -122,7 +110,7 @@ function _templateObject5() {
122
110
  }
123
111
 
124
112
  function _templateObject4() {
125
- var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-top: 6px;\n border-top: 2px solid ", ";\n display: inline-flex;\n flex-wrap: wrap;\n max-width: ", ";\n width: ", ";\n & > span:last-child span {\n display: none;\n }\n margin: ", ";\n"]);
113
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n padding-top: ", ";\n display: inline-flex;\n flex-wrap: wrap;\n max-width: ", ";\n width: ", ";\n & > span:last-child span {\n display: none;\n }\n margin: ", ";\n"]);
126
114
 
127
115
  _templateObject4 = function _templateObject4() {
128
116
  return data;
@@ -132,7 +120,7 @@ function _templateObject4() {
132
120
  }
133
121
 
134
122
  function _templateObject3() {
135
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n flex-direction: ", ";\n align-items: ", ";\n"]);
123
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n flex-direction: ", ";\n align-items: ", ";\n border-top: ", ";\n"]);
136
124
 
137
125
  _templateObject3 = function _templateObject3() {
138
126
  return data;
@@ -152,7 +140,7 @@ function _templateObject2() {
152
140
  }
153
141
 
154
142
  function _templateObject() {
155
- var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: ", ";\n font-family: \"Open Sans\", sans-serif;\n background-color: ", ";\n margin-top: ", ";\n width: 100%;\n box-sizing: border-box;\n min-height: 120px;\n"]);
143
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n padding: ", ";\n background-color: ", ";\n margin-top: ", ";\n width: 100%;\n box-sizing: border-box;\n min-height: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"]);
156
144
 
157
145
  _templateObject = function _templateObject() {
158
146
  return data;
@@ -172,7 +160,9 @@ var DxcFooter = function DxcFooter(_ref) {
172
160
  logoSrc = _ref$logoSrc === void 0 ? "default" : _ref$logoSrc,
173
161
  children = _ref.children,
174
162
  padding = _ref.padding,
175
- margin = _ref.margin;
163
+ margin = _ref.margin,
164
+ _ref$tabIndex = _ref.tabIndex,
165
+ tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
176
166
  var ref = (0, _react.useRef)(null);
177
167
 
178
168
  var _useState = (0, _react.useState)(),
@@ -190,10 +180,7 @@ var DxcFooter = function DxcFooter(_ref) {
190
180
  isResponsivePhone = _useState6[0],
191
181
  setIsResponsivePhone = _useState6[1];
192
182
 
193
- var customTheme = (0, _react.useContext)(_ThemeContext["default"]);
194
- var colorsTheme = (0, _react.useMemo)(function () {
195
- return (0, _utils.getCustomTheme)(_variables.theme, (0, _utils.getCustomTheme)(_variables.defaultTheme, customTheme));
196
- }, [customTheme]);
183
+ var colorsTheme = (0, _useTheme["default"])();
197
184
 
198
185
  var handleResize = function handleResize(refWidth) {
199
186
  if (ref.current) {
@@ -225,6 +212,7 @@ var DxcFooter = function DxcFooter(_ref) {
225
212
  }, []);
226
213
  var socialLink = socialLinks.map(function (link, index) {
227
214
  return _react["default"].createElement(SocialAnchor, {
215
+ tabIndex: tabIndex,
228
216
  key: "social".concat(index).concat(link.href),
229
217
  index: index,
230
218
  href: link && link.href ? link.href : ""
@@ -236,6 +224,7 @@ var DxcFooter = function DxcFooter(_ref) {
236
224
  return _react["default"].createElement("span", {
237
225
  key: "bottom".concat(index).concat(link.text)
238
226
  }, _react["default"].createElement(BottomLink, {
227
+ tabIndex: tabIndex,
239
228
  href: link && link.href ? link.href : ""
240
229
  }, link && link.text ? link.text : ""), _react["default"].createElement(Point, {
241
230
  index: index
@@ -259,7 +248,9 @@ var DxcFooter = function DxcFooter(_ref) {
259
248
  refSize: refSize
260
249
  }, copyright))), (!isResponsiveTablet && !isResponsivePhone || isResponsiveTablet) && _react["default"].createElement("div", null, _react["default"].createElement(ChildComponents, {
261
250
  padding: padding
262
- }, children), _react["default"].createElement(FooterFooter, {
251
+ }, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
252
+ color: colorsTheme.footer.backgroundColor
253
+ }, children)), _react["default"].createElement(FooterFooter, {
263
254
  className: "footerFooter"
264
255
  }, _react["default"].createElement(BottomLinks, {
265
256
  refSize: refSize
@@ -269,11 +260,13 @@ var DxcFooter = function DxcFooter(_ref) {
269
260
  };
270
261
 
271
262
  var FooterContainer = _styledComponents["default"].footer(_templateObject(), function (props) {
272
- return props.refSize <= _variables.responsiveSizes.mobileLarge ? "20px 20px 20px 20px" : "20px 60px 20px 20px";
263
+ return props.refSize <= _variables.responsiveSizes.mobileLarge ? "20px 20px 20px 20px" : "24px 36px 24px 36px";
273
264
  }, function (props) {
274
265
  return props.theme.backgroundColor;
275
266
  }, function (props) {
276
267
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
268
+ }, function (props) {
269
+ return props.theme.height;
277
270
  });
278
271
 
279
272
  var FooterHeader = _styledComponents["default"].div(_templateObject2());
@@ -282,10 +275,12 @@ var FooterFooter = _styledComponents["default"].div(_templateObject3(), function
282
275
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "column" : "row";
283
276
  }, function (props) {
284
277
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "center" : "";
278
+ }, function (props) {
279
+ return "".concat(props.theme.bottomLinksDividerThickness, " ").concat(props.theme.bottomLinksDividerStyle, " ").concat(props.theme.bottomLinksDividerColor);
285
280
  });
286
281
 
287
282
  var BottomLinks = _styledComponents["default"].div(_templateObject4(), function (props) {
288
- return props.theme.lineColor;
283
+ return props.theme.bottomLinksDividerSpacing;
289
284
  }, function (props) {
290
285
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "60%";
291
286
  }, function (props) {
@@ -304,42 +299,70 @@ var ChildComponents = _styledComponents["default"].div(_templateObject5(), funct
304
299
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
305
300
  }, function (props) {
306
301
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
307
- }, function (props) {
308
- return props.theme.fontColor;
309
302
  });
310
303
 
311
304
  var Copyright = _styledComponents["default"].div(_templateObject6(), function (props) {
312
- return props.theme.fontColor;
305
+ return props.theme.copyrightFontFamily;
306
+ }, function (props) {
307
+ return props.theme.copyrightFontSize;
308
+ }, function (props) {
309
+ return props.theme.copyrightFontStyle;
310
+ }, function (props) {
311
+ return props.theme.copyrightFontWeight;
312
+ }, function (props) {
313
+ return props.theme.copyrightFontColor;
313
314
  }, function (props) {
314
315
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "40%";
315
316
  }, function (props) {
316
317
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "";
317
318
  }, function (props) {
318
319
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "center" : "right";
320
+ }, function (props) {
321
+ return props.theme.bottomLinksDividerSpacing;
319
322
  });
320
323
 
321
- var LogoIcon = _styledComponents["default"].img(_templateObject7());
322
-
323
- var LogoIconContainer = _styledComponents["default"].div(_templateObject8());
324
+ var LogoIcon = _styledComponents["default"].img(_templateObject7(), function (props) {
325
+ return props.theme.logoHeight;
326
+ }, function (props) {
327
+ return props.theme.logoWidth;
328
+ });
324
329
 
325
- var SocialAnchor = _styledComponents["default"].a(_templateObject9(), function (props) {
326
- return props.index === 0 ? "0px" : "15px";
330
+ var SocialAnchor = _styledComponents["default"].a(_templateObject8(), function (props) {
331
+ return props.index === 0 ? "0px" : props.theme.socialLinksGutter;
327
332
  });
328
333
 
329
- var SocialIcon = _styledComponents["default"].img(_templateObject10(), function (props) {
330
- return props.theme.fontColor;
334
+ var SocialIcon = _styledComponents["default"].img(_templateObject9(), function (props) {
335
+ return props.theme.socialLinksSize;
336
+ }, function (props) {
337
+ return props.theme.socialLinksSize;
338
+ }, function (props) {
339
+ return props.theme.socialLinksColor;
331
340
  });
332
341
 
333
- var SocialIconContainer = _styledComponents["default"].div(_templateObject11(), function (props) {
334
- return props.theme.fontColor;
342
+ var SocialIconContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
343
+ return props.theme.socialLinksSize;
344
+ }, function (props) {
345
+ return props.theme.socialLinksSize;
346
+ }, function (props) {
347
+ return props.theme.socialLinksColor;
335
348
  });
336
349
 
337
- var Point = _styledComponents["default"].span(_templateObject12(), function (props) {
338
- return props.theme.fontColor;
350
+ var Point = _styledComponents["default"].span(_templateObject11(), function (props) {
351
+ return props.theme.bottomLinksFontColor;
339
352
  });
340
353
 
341
- var BottomLink = _styledComponents["default"].a(_templateObject13(), function (props) {
342
- return props.theme.fontColor;
354
+ var BottomLink = _styledComponents["default"].a(_templateObject12(), function (props) {
355
+ return props.theme.bottomLinksTextDecoration;
356
+ }, function (props) {
357
+ return props.theme.bottomLinksFontColor;
358
+ }, function (props) {
359
+ return props.theme.bottomLinksFontFamily;
360
+ }, function (props) {
361
+ return props.theme.bottomLinksFontSize;
362
+ }, function (props) {
363
+ return props.theme.bottomLinksFontStyle;
364
+ }, function (props) {
365
+ return props.theme.bottomLinksFontWeight;
343
366
  });
344
367
 
345
368
  DxcFooter.propTypes = {
@@ -365,7 +388,8 @@ DxcFooter.propTypes = {
365
388
  bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
366
389
  left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
367
390
  right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
368
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
391
+ }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
392
+ tabIndex: _propTypes["default"].number
369
393
  };
370
394
  var _default = DxcFooter;
371
395
  exports["default"] = _default;
@@ -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>