@dxc-technology/halstack-react 0.0.0-506547 → 0.0.0-5145b03

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 (125) hide show
  1. package/README.md +1 -1
  2. package/dist/BackgroundColorContext.js +46 -0
  3. package/dist/ThemeContext.js +211 -141
  4. package/dist/V3Textarea/V3Textarea.js +264 -0
  5. package/dist/accordion/Accordion.js +131 -46
  6. package/dist/accordion-group/AccordionGroup.js +36 -9
  7. package/dist/alert/Alert.js +180 -80
  8. package/dist/alert/index.d.ts +51 -0
  9. package/dist/badge/Badge.js +28 -7
  10. package/dist/box/Box.js +29 -18
  11. package/dist/button/Button.js +60 -21
  12. package/dist/card/Card.js +72 -35
  13. package/dist/checkbox/Checkbox.js +97 -26
  14. package/dist/chip/Chip.js +93 -31
  15. package/dist/common/utils.js +2 -22
  16. package/dist/common/variables.js +1406 -203
  17. package/dist/date/Date.js +74 -52
  18. package/dist/date-input/DateInput.js +400 -0
  19. package/dist/date-input/index.d.ts +95 -0
  20. package/dist/dialog/Dialog.js +54 -31
  21. package/dist/dropdown/Dropdown.js +173 -75
  22. package/dist/file-input/FileInput.js +644 -0
  23. package/dist/file-input/FileItem.js +280 -0
  24. package/dist/file-input/index.d.ts +81 -0
  25. package/dist/footer/Footer.js +73 -44
  26. package/dist/footer/dxc_logo.svg +15 -0
  27. package/dist/header/Header.js +91 -56
  28. package/dist/header/dxc_logo_black.svg +8 -0
  29. package/dist/heading/Heading.js +81 -16
  30. package/dist/input-text/InputText.js +250 -113
  31. package/dist/layout/ApplicationLayout.js +11 -12
  32. package/dist/link/Link.js +84 -34
  33. package/dist/main.d.ts +8 -0
  34. package/dist/main.js +71 -7
  35. package/dist/new-select/NewSelect.js +836 -0
  36. package/dist/new-select/index.d.ts +53 -0
  37. package/dist/new-textarea/NewTextarea.js +369 -0
  38. package/dist/new-textarea/index.d.ts +117 -0
  39. package/dist/number-input/NumberInput.js +136 -0
  40. package/dist/number-input/NumberInputContext.js +16 -0
  41. package/dist/number-input/index.d.ts +113 -0
  42. package/dist/paginator/Paginator.js +64 -29
  43. package/dist/password-input/PasswordInput.js +198 -0
  44. package/dist/password-input/index.d.ts +94 -0
  45. package/dist/progress-bar/ProgressBar.js +91 -33
  46. package/dist/radio/Radio.js +30 -11
  47. package/dist/resultsetTable/ResultsetTable.js +79 -48
  48. package/dist/select/Select.js +225 -144
  49. package/dist/sidenav/Sidenav.js +65 -11
  50. package/dist/slider/Slider.js +198 -61
  51. package/dist/spinner/Spinner.js +246 -57
  52. package/dist/switch/Switch.js +51 -19
  53. package/dist/table/Table.js +49 -21
  54. package/dist/tabs/Tabs.js +58 -17
  55. package/dist/tag/Tag.js +68 -35
  56. package/dist/text-input/TextInput.js +971 -0
  57. package/dist/text-input/index.d.ts +135 -0
  58. package/dist/toggle/Toggle.js +16 -19
  59. package/dist/toggle-group/ToggleGroup.js +141 -37
  60. package/dist/upload/Upload.js +16 -11
  61. package/dist/upload/buttons-upload/ButtonsUpload.js +31 -14
  62. package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -28
  63. package/dist/upload/file-upload/FileToUpload.js +50 -24
  64. package/dist/upload/files-upload/FilesToUpload.js +16 -16
  65. package/dist/upload/readme.md +2 -2
  66. package/dist/upload/transaction/Transaction.js +44 -24
  67. package/dist/upload/transactions/Transactions.js +38 -20
  68. package/dist/wizard/Wizard.js +125 -42
  69. package/dist/wizard/invalid_icon.svg +4 -5
  70. package/dist/wizard/valid_icon.svg +4 -5
  71. package/package.json +6 -4
  72. package/test/AccordionGroup.test.js +16 -0
  73. package/test/Date.test.js +49 -45
  74. package/test/DateInput.test.js +242 -0
  75. package/test/Dropdown.test.js +15 -0
  76. package/test/FileInput.test.js +201 -0
  77. package/test/InputText.test.js +25 -17
  78. package/test/Link.test.js +3 -2
  79. package/test/NewTextarea.test.js +195 -0
  80. package/test/NumberInput.test.js +259 -0
  81. package/test/Paginator.test.js +1 -1
  82. package/test/PasswordInput.test.js +83 -0
  83. package/test/ResultsetTable.test.js +1 -2
  84. package/test/Select.test.js +44 -24
  85. package/test/Spinner.test.js +5 -0
  86. package/test/TextInput.test.js +732 -0
  87. package/test/ToggleGroup.test.js +5 -1
  88. package/test/Upload.test.js +5 -5
  89. package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
  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/textarea/Textarea.js +0 -224
  125. 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,24 +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
28
  var _useTheme = _interopRequireDefault(require("../useTheme.js"));
31
29
 
32
- function _templateObject13() {
33
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n color: ", ";\n font-size: 12px;\n"]);
34
-
35
- _templateObject13 = function _templateObject13() {
36
- return data;
37
- };
38
-
39
- return data;
40
- }
30
+ var _BackgroundColorContext = require("../BackgroundColorContext.js");
41
31
 
42
32
  function _templateObject12() {
43
- 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"]);
44
34
 
45
35
  _templateObject12 = function _templateObject12() {
46
36
  return data;
@@ -50,7 +40,7 @@ function _templateObject12() {
50
40
  }
51
41
 
52
42
  function _templateObject11() {
53
- 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"]);
54
44
 
55
45
  _templateObject11 = function _templateObject11() {
56
46
  return data;
@@ -60,7 +50,7 @@ function _templateObject11() {
60
50
  }
61
51
 
62
52
  function _templateObject10() {
63
- 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"]);
64
54
 
65
55
  _templateObject10 = function _templateObject10() {
66
56
  return data;
@@ -70,7 +60,7 @@ function _templateObject10() {
70
60
  }
71
61
 
72
62
  function _templateObject9() {
73
- 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"]);
74
64
 
75
65
  _templateObject9 = function _templateObject9() {
76
66
  return data;
@@ -80,7 +70,7 @@ function _templateObject9() {
80
70
  }
81
71
 
82
72
  function _templateObject8() {
83
- 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"]);
84
74
 
85
75
  _templateObject8 = function _templateObject8() {
86
76
  return data;
@@ -90,7 +80,7 @@ function _templateObject8() {
90
80
  }
91
81
 
92
82
  function _templateObject7() {
93
- var data = (0, _taggedTemplateLiteral2["default"])(["\n height: 34px;\n width: auto;\n"]);
83
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n max-height: ", ";\n width: ", ";\n"]);
94
84
 
95
85
  _templateObject7 = function _templateObject7() {
96
86
  return data;
@@ -100,7 +90,7 @@ function _templateObject7() {
100
90
  }
101
91
 
102
92
  function _templateObject6() {
103
- 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"]);
104
94
 
105
95
  _templateObject6 = function _templateObject6() {
106
96
  return data;
@@ -110,7 +100,7 @@ function _templateObject6() {
110
100
  }
111
101
 
112
102
  function _templateObject5() {
113
- 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"]);
114
104
 
115
105
  _templateObject5 = function _templateObject5() {
116
106
  return data;
@@ -120,7 +110,7 @@ function _templateObject5() {
120
110
  }
121
111
 
122
112
  function _templateObject4() {
123
- 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"]);
124
114
 
125
115
  _templateObject4 = function _templateObject4() {
126
116
  return data;
@@ -130,7 +120,7 @@ function _templateObject4() {
130
120
  }
131
121
 
132
122
  function _templateObject3() {
133
- 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"]);
134
124
 
135
125
  _templateObject3 = function _templateObject3() {
136
126
  return data;
@@ -150,7 +140,7 @@ function _templateObject2() {
150
140
  }
151
141
 
152
142
  function _templateObject() {
153
- 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"]);
154
144
 
155
145
  _templateObject = function _templateObject() {
156
146
  return data;
@@ -170,7 +160,9 @@ var DxcFooter = function DxcFooter(_ref) {
170
160
  logoSrc = _ref$logoSrc === void 0 ? "default" : _ref$logoSrc,
171
161
  children = _ref.children,
172
162
  padding = _ref.padding,
173
- margin = _ref.margin;
163
+ margin = _ref.margin,
164
+ _ref$tabIndex = _ref.tabIndex,
165
+ tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
174
166
  var ref = (0, _react.useRef)(null);
175
167
 
176
168
  var _useState = (0, _react.useState)(),
@@ -220,6 +212,7 @@ var DxcFooter = function DxcFooter(_ref) {
220
212
  }, []);
221
213
  var socialLink = socialLinks.map(function (link, index) {
222
214
  return _react["default"].createElement(SocialAnchor, {
215
+ tabIndex: tabIndex,
223
216
  key: "social".concat(index).concat(link.href),
224
217
  index: index,
225
218
  href: link && link.href ? link.href : ""
@@ -231,6 +224,7 @@ var DxcFooter = function DxcFooter(_ref) {
231
224
  return _react["default"].createElement("span", {
232
225
  key: "bottom".concat(index).concat(link.text)
233
226
  }, _react["default"].createElement(BottomLink, {
227
+ tabIndex: tabIndex,
234
228
  href: link && link.href ? link.href : ""
235
229
  }, link && link.text ? link.text : ""), _react["default"].createElement(Point, {
236
230
  index: index
@@ -244,7 +238,7 @@ var DxcFooter = function DxcFooter(_ref) {
244
238
  ref: ref
245
239
  }, _react["default"].createElement(FooterHeader, null, _react["default"].createElement(LogoIcon, {
246
240
  logoSrc: logoSrc,
247
- src: logoSrc === "default" ? _variables.componentTokens.footer.logo : logoSrc
241
+ src: logoSrc === "default" ? colorsTheme.footer.logo : logoSrc
248
242
  }), _react["default"].createElement("div", null, socialLink)), isResponsivePhone && _react["default"].createElement("div", null, _react["default"].createElement(FooterFooter, {
249
243
  className: "footerFooter",
250
244
  refSize: refSize
@@ -254,7 +248,9 @@ var DxcFooter = function DxcFooter(_ref) {
254
248
  refSize: refSize
255
249
  }, copyright))), (!isResponsiveTablet && !isResponsivePhone || isResponsiveTablet) && _react["default"].createElement("div", null, _react["default"].createElement(ChildComponents, {
256
250
  padding: padding
257
- }, children), _react["default"].createElement(FooterFooter, {
251
+ }, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
252
+ color: colorsTheme.footer.backgroundColor
253
+ }, children)), _react["default"].createElement(FooterFooter, {
258
254
  className: "footerFooter"
259
255
  }, _react["default"].createElement(BottomLinks, {
260
256
  refSize: refSize
@@ -264,11 +260,13 @@ var DxcFooter = function DxcFooter(_ref) {
264
260
  };
265
261
 
266
262
  var FooterContainer = _styledComponents["default"].footer(_templateObject(), function (props) {
267
- 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";
268
264
  }, function (props) {
269
265
  return props.theme.backgroundColor;
270
266
  }, function (props) {
271
267
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
268
+ }, function (props) {
269
+ return props.theme.height;
272
270
  });
273
271
 
274
272
  var FooterHeader = _styledComponents["default"].div(_templateObject2());
@@ -277,10 +275,12 @@ var FooterFooter = _styledComponents["default"].div(_templateObject3(), function
277
275
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "column" : "row";
278
276
  }, function (props) {
279
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);
280
280
  });
281
281
 
282
282
  var BottomLinks = _styledComponents["default"].div(_templateObject4(), function (props) {
283
- return props.theme.lineColor;
283
+ return props.theme.bottomLinksDividerSpacing;
284
284
  }, function (props) {
285
285
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "60%";
286
286
  }, function (props) {
@@ -299,42 +299,70 @@ var ChildComponents = _styledComponents["default"].div(_templateObject5(), funct
299
299
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.bottom ? _variables.spaces[props.padding.bottom] : "";
300
300
  }, function (props) {
301
301
  return props.padding && (0, _typeof2["default"])(props.padding) === "object" && props.padding.left ? _variables.spaces[props.padding.left] : "";
302
- }, function (props) {
303
- return props.theme.fontColor;
304
302
  });
305
303
 
306
304
  var Copyright = _styledComponents["default"].div(_templateObject6(), function (props) {
307
- 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;
308
314
  }, function (props) {
309
315
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "40%";
310
316
  }, function (props) {
311
317
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "100%" : "";
312
318
  }, function (props) {
313
319
  return props.refSize <= _variables.responsiveSizes.mobileLarge ? "center" : "right";
320
+ }, function (props) {
321
+ return props.theme.bottomLinksDividerSpacing;
314
322
  });
315
323
 
316
- var LogoIcon = _styledComponents["default"].img(_templateObject7());
317
-
318
- 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
+ });
319
329
 
320
- var SocialAnchor = _styledComponents["default"].a(_templateObject9(), function (props) {
321
- return props.index === 0 ? "0px" : "15px";
330
+ var SocialAnchor = _styledComponents["default"].a(_templateObject8(), function (props) {
331
+ return props.index === 0 ? "0px" : props.theme.socialLinksGutter;
322
332
  });
323
333
 
324
- var SocialIcon = _styledComponents["default"].img(_templateObject10(), function (props) {
325
- 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;
326
340
  });
327
341
 
328
- var SocialIconContainer = _styledComponents["default"].div(_templateObject11(), function (props) {
329
- 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;
330
348
  });
331
349
 
332
- var Point = _styledComponents["default"].span(_templateObject12(), function (props) {
333
- return props.theme.fontColor;
350
+ var Point = _styledComponents["default"].span(_templateObject11(), function (props) {
351
+ return props.theme.bottomLinksFontColor;
334
352
  });
335
353
 
336
- var BottomLink = _styledComponents["default"].a(_templateObject13(), function (props) {
337
- 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;
338
366
  });
339
367
 
340
368
  DxcFooter.propTypes = {
@@ -360,7 +388,8 @@ DxcFooter.propTypes = {
360
388
  bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
361
389
  left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
362
390
  right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
363
- }), _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
364
393
  };
365
394
  var _default = DxcFooter;
366
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>