@dxc-technology/halstack-react 0.0.0-89339f9 → 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 (109) hide show
  1. package/dist/ThemeContext.js +131 -99
  2. package/dist/accordion/Accordion.js +72 -59
  3. package/dist/accordion-group/AccordionGroup.js +1 -3
  4. package/dist/alert/Alert.js +126 -111
  5. package/dist/alert/index.d.ts +51 -0
  6. package/dist/badge/Badge.js +3 -1
  7. package/dist/box/Box.js +1 -9
  8. package/dist/button/Button.js +30 -20
  9. package/dist/card/Card.js +2 -4
  10. package/dist/checkbox/Checkbox.js +30 -21
  11. package/dist/chip/Chip.js +30 -28
  12. package/dist/common/variables.js +987 -572
  13. package/dist/date/Date.js +17 -29
  14. package/dist/date-input/DateInput.js +400 -0
  15. package/dist/date-input/index.d.ts +95 -0
  16. package/dist/dialog/Dialog.js +21 -39
  17. package/dist/dropdown/Dropdown.js +123 -71
  18. package/dist/file-input/FileInput.js +644 -0
  19. package/dist/file-input/FileItem.js +280 -0
  20. package/dist/file-input/index.d.ts +81 -0
  21. package/dist/footer/Footer.js +25 -35
  22. package/dist/footer/dxc_logo.svg +15 -0
  23. package/dist/header/Header.js +14 -42
  24. package/dist/header/dxc_logo_black.svg +8 -0
  25. package/dist/heading/Heading.js +1 -5
  26. package/dist/input-text/InputText.js +96 -58
  27. package/dist/layout/ApplicationLayout.js +1 -1
  28. package/dist/link/Link.js +23 -26
  29. package/dist/main.d.ts +8 -0
  30. package/dist/main.js +57 -1
  31. package/dist/new-select/NewSelect.js +836 -0
  32. package/dist/new-select/index.d.ts +53 -0
  33. package/dist/new-textarea/NewTextarea.js +369 -0
  34. package/dist/new-textarea/index.d.ts +117 -0
  35. package/dist/number-input/NumberInput.js +136 -0
  36. package/dist/number-input/NumberInputContext.js +16 -0
  37. package/dist/number-input/index.d.ts +113 -0
  38. package/dist/paginator/Paginator.js +10 -4
  39. package/dist/password-input/PasswordInput.js +198 -0
  40. package/dist/password-input/index.d.ts +94 -0
  41. package/dist/progress-bar/ProgressBar.js +63 -27
  42. package/dist/resultsetTable/ResultsetTable.js +5 -22
  43. package/dist/select/Select.js +189 -185
  44. package/dist/sidenav/Sidenav.js +11 -15
  45. package/dist/slider/Slider.js +145 -66
  46. package/dist/spinner/Spinner.js +226 -59
  47. package/dist/switch/Switch.js +3 -3
  48. package/dist/table/Table.js +15 -5
  49. package/dist/tabs/Tabs.js +4 -8
  50. package/dist/tag/Tag.js +38 -36
  51. package/dist/text-input/TextInput.js +971 -0
  52. package/dist/text-input/index.d.ts +135 -0
  53. package/dist/textarea/Textarea.js +26 -22
  54. package/dist/toggle-group/ToggleGroup.js +130 -44
  55. package/dist/upload/buttons-upload/ButtonsUpload.js +8 -4
  56. package/dist/upload/dragAndDropArea/DragAndDropArea.js +16 -12
  57. package/dist/upload/file-upload/FileToUpload.js +4 -4
  58. package/dist/upload/transaction/Transaction.js +13 -9
  59. package/dist/upload/transactions/Transactions.js +11 -11
  60. package/dist/wizard/Wizard.js +84 -56
  61. package/dist/wizard/invalid_icon.svg +4 -5
  62. package/dist/wizard/valid_icon.svg +4 -5
  63. package/package.json +4 -2
  64. package/test/DateInput.test.js +242 -0
  65. package/test/Dropdown.test.js +15 -0
  66. package/test/FileInput.test.js +201 -0
  67. package/test/InputText.test.js +24 -16
  68. package/test/NewTextarea.test.js +195 -0
  69. package/test/NumberInput.test.js +259 -0
  70. package/test/Paginator.test.js +1 -1
  71. package/test/PasswordInput.test.js +83 -0
  72. package/test/ResultsetTable.test.js +1 -2
  73. package/test/Select.test.js +44 -24
  74. package/test/Spinner.test.js +5 -0
  75. package/test/TextInput.test.js +732 -0
  76. package/test/ToggleGroup.test.js +5 -1
  77. package/dist/accordion/Accordion.stories.js +0 -207
  78. package/dist/accordion/readme.md +0 -96
  79. package/dist/accordion-group/AccordionGroup.stories.js +0 -207
  80. package/dist/accordion-group/readme.md +0 -70
  81. package/dist/alert/Alert.stories.js +0 -158
  82. package/dist/alert/close.svg +0 -4
  83. package/dist/alert/error.svg +0 -4
  84. package/dist/alert/info.svg +0 -4
  85. package/dist/alert/readme.md +0 -43
  86. package/dist/alert/success.svg +0 -4
  87. package/dist/alert/warning.svg +0 -4
  88. package/dist/button/Button.stories.js +0 -224
  89. package/dist/button/readme.md +0 -93
  90. package/dist/date/calendar.svg +0 -1
  91. package/dist/date/calendar_dark.svg +0 -1
  92. package/dist/dialog/Dialog.stories.js +0 -217
  93. package/dist/dialog/readme.md +0 -32
  94. package/dist/dropdown/Dropdown.stories.js +0 -249
  95. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  96. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  97. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  98. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  99. package/dist/dropdown/readme.md +0 -69
  100. package/dist/footer/Footer.stories.js +0 -94
  101. package/dist/footer/dxc_logo_wht.png +0 -0
  102. package/dist/header/dxc_logo_black.png +0 -0
  103. package/dist/header/dxc_logo_blk_rgb.svg +0 -6
  104. package/dist/header/dxc_logo_white.png +0 -0
  105. package/dist/input-text/InputText.stories.js +0 -209
  106. package/dist/select/Select.stories.js +0 -235
  107. package/dist/select/readme.md +0 -72
  108. package/dist/slider/Slider.stories.js +0 -241
  109. package/dist/toggle-group/readme.md +0 -82
@@ -29,6 +29,8 @@ var _Button = _interopRequireDefault(require("../../button/Button"));
29
29
 
30
30
  var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
31
31
 
32
+ var _BackgroundColorContext = require("../../BackgroundColorContext.js");
33
+
32
34
  function _templateObject11() {
33
35
  var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-bottom: 10px;\n"]);
34
36
 
@@ -206,6 +208,8 @@ var DxcDragAndDropArea = function DxcDragAndDropArea(_ref) {
206
208
 
207
209
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
208
210
  theme: colorsTheme.upload
211
+ }, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
212
+ color: colorsTheme.upload.backgroundColor
209
213
  }, _react["default"].createElement(DXCDragAndDrop, {
210
214
  onDrop: handleDrop,
211
215
  onDragEnter: handleDragIn,
@@ -237,7 +241,7 @@ var DxcDragAndDropArea = function DxcDragAndDropArea(_ref) {
237
241
  style: {
238
242
  display: "none"
239
243
  }
240
- })))), dragging && _react["default"].createElement(DragAndDropContentHover, null, _react["default"].createElement(DragAndDropTextHover, null, textHover), _react["default"].createElement(DragAndDropIconHover, null))));
244
+ })))), dragging && _react["default"].createElement(DragAndDropContentHover, null, _react["default"].createElement(DragAndDropTextHover, null, textHover), _react["default"].createElement(DragAndDropIconHover, null)))));
241
245
  };
242
246
 
243
247
  DxcDragAndDropArea.propTypes = {
@@ -260,11 +264,11 @@ var DragAndDropContent = _styledComponents["default"].div(_templateObject3());
260
264
  var DragAndDropIcon = _styledComponents["default"].div(_templateObject4(), function (props) {
261
265
  return props.theme.dragAndDropIconColor;
262
266
  }, _upload_file["default"], function (props) {
263
- return "".concat(props.theme.dragAndDropIconWidth, " ").concat(props.theme.dragAndDropIconHeight);
267
+ return "".concat(props.theme.dragAndDropIconSize, " ").concat(props.theme.dragAndDropIconSize);
264
268
  }, function (props) {
265
- return props.theme.dragAndDropIconHeight;
269
+ return props.theme.dragAndDropIconSize;
266
270
  }, function (props) {
267
- return props.theme.dragAndDropIconWidth;
271
+ return props.theme.dragAndDropIconSize;
268
272
  });
269
273
 
270
274
  var DragAndDropText = _styledComponents["default"].div(_templateObject5());
@@ -288,25 +292,25 @@ var DragAndDropDescription = _styledComponents["default"].div(_templateObject7()
288
292
  }, function (props) {
289
293
  return props.theme.dragAndDropDescriptionFontWeight;
290
294
  }, function (props) {
291
- return props.theme.dragAndDropTextDescriptionFontTextTransform;
295
+ return props.theme.dragAndDropDescriptionFontTextTransform;
292
296
  }, function (props) {
293
- return props.theme.dragAndDropTextDescriptionFontColor;
297
+ return props.theme.dragAndDropDescriptionFontColor;
294
298
  });
295
299
 
296
300
  var ButtonChooseFiles = _styledComponents["default"].div(_templateObject8());
297
301
 
298
302
  var DragAndDropContentHover = _styledComponents["default"].div(_templateObject9(), function (props) {
299
- return props.theme.draggingAreaBackgroundColor;
303
+ return props.theme.draggingStateBackgroundColor;
300
304
  });
301
305
 
302
306
  var DragAndDropIconHover = _styledComponents["default"].div(_templateObject10(), function (props) {
303
307
  return props.theme.dragAndDropDraggingStateIconColor;
304
308
  }, _upload_drop["default"], function (props) {
305
- return "".concat(props.theme.dragAndDropDraggingStateIconWidth, " ").concat(props.theme.dragAndDropDraggingStateIconHeight);
309
+ return "".concat(props.theme.dragAndDropDraggingStateIconSize, " ").concat(props.theme.dragAndDropDraggingStateIconSize);
306
310
  }, function (props) {
307
- return props.theme.dragAndDropDraggingStateIconHeight;
311
+ return props.theme.dragAndDropDraggingStateIconSize;
308
312
  }, function (props) {
309
- return props.theme.dragAndDropDraggingStateIconWidth;
313
+ return props.theme.dragAndDropDraggingStateIconSize;
310
314
  });
311
315
 
312
316
  var DragAndDropTextHover = _styledComponents["default"].div(_templateObject11(), function (props) {
@@ -316,9 +320,9 @@ var DragAndDropTextHover = _styledComponents["default"].div(_templateObject11(),
316
320
  }, function (props) {
317
321
  return props.theme.dragAndDropDraggingStateFontWeight;
318
322
  }, function (props) {
319
- return props.theme.dragAndDropTextDraggingStateFontTextTransform;
323
+ return props.theme.dragAndDropDraggingStateFontTextTransform;
320
324
  }, function (props) {
321
- return props.theme.dragAndDropTextDraggingStateFontColor;
325
+ return props.theme.dragAndDropDraggingStateFontColor;
322
326
  });
323
327
 
324
328
  var _default = DxcDragAndDropArea;
@@ -137,7 +137,7 @@ var DXCFileToUpload = _styledComponents["default"].div(_templateObject(), functi
137
137
  }, function (props) {
138
138
  return props.theme.fileUnderlineColor;
139
139
  }, function (props) {
140
- return props.theme.fileHoverColor;
140
+ return props.theme.hoverFileColor;
141
141
  });
142
142
 
143
143
  var FileContent = _styledComponents["default"].div(_templateObject2());
@@ -173,11 +173,11 @@ var FileType = _styledComponents["default"].div(_templateObject6(), function (pr
173
173
  var DeleteFile = _styledComponents["default"].button(_templateObject7(), function (props) {
174
174
  return props.theme.fileDeleteIconColor;
175
175
  }, _close["default"], function (props) {
176
- return "".concat(props.theme.fileDeleteIconWidth, " ").concat(props.theme.fileDeleteIconHeight);
176
+ return "".concat(props.theme.fileDeleteIconSize, " ").concat(props.theme.fileDeleteIconSize);
177
177
  }, function (props) {
178
- return props.theme.fileDeleteIconHeight;
178
+ return props.theme.fileDeleteIconSize;
179
179
  }, function (props) {
180
- return props.theme.fileDeleteIconWidth;
180
+ return props.theme.fileDeleteIconSize;
181
181
  });
182
182
 
183
183
  var _default = DxcFileToUpload;
@@ -43,6 +43,8 @@ var _Spinner = _interopRequireDefault(require("../../spinner/Spinner"));
43
43
 
44
44
  var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
45
45
 
46
+ var _BackgroundColorContext = require("../../BackgroundColorContext.js");
47
+
46
48
  function _templateObject5() {
47
49
  var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n width: 80%;\n"]);
48
50
 
@@ -64,7 +66,7 @@ function _templateObject4() {
64
66
  }
65
67
 
66
68
  function _templateObject3() {
67
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-right: 16px;\n width: 80%;\n text-overflow: ellipsis;\n white-space: nowrap; \n overflow: hidden;\n"]);
69
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-right: 16px;\n width: 80%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"]);
68
70
 
69
71
  _templateObject3 = function _templateObject3() {
70
72
  return data;
@@ -113,11 +115,13 @@ var DxcTransaction = function DxcTransaction(_ref) {
113
115
  }, _react["default"].createElement(FileImage, {
114
116
  status: status,
115
117
  img: icon
116
- }), status === "processing" && _react["default"].createElement(Prueba, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(_Spinner["default"], {
118
+ }), status === "processing" && _react["default"].createElement(FileData, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
119
+ color: colorsTheme.upload.backgroundColor
120
+ }, _react["default"].createElement(_Spinner["default"], {
117
121
  mode: "small"
118
- })) || status === "success" && _react["default"].createElement(Prueba, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(FileStatus, {
122
+ }))) || status === "success" && _react["default"].createElement(FileData, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(FileStatus, {
119
123
  status: status
120
- })) || status === "error" && _react["default"].createElement(Prueba, null, _react["default"].createElement(_Tooltip["default"], {
124
+ })) || status === "error" && _react["default"].createElement(FileData, null, _react["default"].createElement(_Tooltip["default"], {
121
125
  title: message
122
126
  }, _react["default"].createElement(FileName, null, name)), _react["default"].createElement(FileStatus, {
123
127
  status: status
@@ -138,15 +142,15 @@ var DXCTransaction = _styledComponents["default"].div(_templateObject(), functio
138
142
  });
139
143
 
140
144
  var FileImage = _styledComponents["default"].div(_templateObject2(), function (props) {
141
- return props.status === "error" && props.theme.errorColor || props.theme.fileUploadedIconColor;
145
+ return props.status === "error" && props.theme.errorColor || props.theme.uploadedFileIconColor;
142
146
  }, function (props) {
143
147
  return props.img;
144
148
  }, function (props) {
145
- return "".concat(props.theme.fileUploadedIconWidth, " ").concat(props.theme.fileUploadedIconHeight);
149
+ return "".concat(props.theme.uploadedFileIconSize, " ").concat(props.theme.uploadedFileIconSize);
146
150
  }, function (props) {
147
- return props.theme.fileUploadedIconHeight;
151
+ return props.theme.uploadedFileIconSize;
148
152
  }, function (props) {
149
- return props.theme.fileUploadedIconWidth;
153
+ return props.theme.uploadedFileIconSize;
150
154
  });
151
155
 
152
156
  var FileName = _styledComponents["default"].div(_templateObject3(), function (props) {
@@ -165,7 +169,7 @@ var FileStatus = _styledComponents["default"].div(_templateObject4(), function (
165
169
  return props.status === "success" && "url('".concat(_successIcon["default"], "') no-repeat padding-box") || props.status === "error" && "url('".concat(_errorIcon["default"], "') no-repeat padding-box");
166
170
  });
167
171
 
168
- var Prueba = _styledComponents["default"].div(_templateObject5());
172
+ var FileData = _styledComponents["default"].div(_templateObject5());
169
173
 
170
174
  var _default = DxcTransaction;
171
175
  exports["default"] = _default;
@@ -107,31 +107,31 @@ var DXCTransactions = _styledComponents["default"].div(_templateObject(), functi
107
107
  var TransactionsText = _styledComponents["default"].span(_templateObject2());
108
108
 
109
109
  var TransactionsTitle = _styledComponents["default"].span(_templateObject3(), function (props) {
110
- return props.theme.filesUploadedTitleFontSize;
110
+ return props.theme.uploadedFilesTitleFontSize;
111
111
  }, function (props) {
112
- return props.theme.filesUploadedTitleFontStyle;
112
+ return props.theme.uploadedFilesTitleFontStyle;
113
113
  }, function (props) {
114
- return props.theme.filesUploadedTitleFontWeight;
114
+ return props.theme.uploadedFilesTitleFontWeight;
115
115
  }, function (props) {
116
- return props.theme.filesUploadedTitleFontTextTransform;
116
+ return props.theme.uploadedFilesTitleFontTextTransform;
117
117
  }, function (props) {
118
- return props.theme.filesUploadedTitleFontColor;
118
+ return props.theme.uploadedFilesTitleFontColor;
119
119
  });
120
120
 
121
121
  var TransactionsSubTitle = _styledComponents["default"].span(_templateObject4(), function (props) {
122
- return props.theme.filesUploadedSubtitleFontSize;
122
+ return props.theme.uploadedFilesSubtitleFontSize;
123
123
  }, function (props) {
124
- return props.theme.filesUploadedSubtitleFontStyle;
124
+ return props.theme.uploadedFilesSubtitleFontStyle;
125
125
  }, function (props) {
126
- return props.theme.filesUploadedSubtitleFontWeight;
126
+ return props.theme.uploadedFilesSubtitleFontWeight;
127
127
  }, function (props) {
128
- return props.theme.filesUploadedSubtitleFontTextTransform;
128
+ return props.theme.uploadedFilesSubtitleFontTextTransform;
129
129
  }, function (props) {
130
- return props.theme.filesUploadedSubtitleFontColor;
130
+ return props.theme.uploadedFilesSubtitleFontColor;
131
131
  });
132
132
 
133
133
  var TransactionsNumber = _styledComponents["default"].span(_templateObject5(), function (props) {
134
- return props.theme.filesUploadedNumberFontWeight;
134
+ return props.theme.uploadedFilesNumberFontWeight;
135
135
  });
136
136
 
137
137
  var _default = DxcTransactions;
@@ -17,7 +17,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
17
 
18
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
19
19
 
20
- var _react = _interopRequireDefault(require("react"));
20
+ var _react = _interopRequireWildcard(require("react"));
21
21
 
22
22
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
23
 
@@ -31,9 +31,19 @@ var _valid_icon = _interopRequireDefault(require("./valid_icon.svg"));
31
31
 
32
32
  var _invalid_icon = _interopRequireDefault(require("./invalid_icon.svg"));
33
33
 
34
- function _templateObject13() {
34
+ function _templateObject14() {
35
35
  var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", "\n border: ", ";\n opacity: 1;\n flex-grow: 1;\n"]);
36
36
 
37
+ _templateObject14 = function _templateObject14() {
38
+ return data;
39
+ };
40
+
41
+ return data;
42
+ }
43
+
44
+ function _templateObject13() {
45
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n text-align: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n ", ";\n margin: 0;\n"]);
46
+
37
47
  _templateObject13 = function _templateObject13() {
38
48
  return data;
39
49
  };
@@ -42,7 +52,7 @@ function _templateObject13() {
42
52
  }
43
53
 
44
54
  function _templateObject12() {
45
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-align: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n text-transform: ", ";\n ", ";\n margin: 0;\n"]);
55
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n text-align: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n ", ";\n text-transform: ", ";\n margin: 0;\n"]);
46
56
 
47
57
  _templateObject12 = function _templateObject12() {
48
58
  return data;
@@ -52,7 +62,7 @@ function _templateObject12() {
52
62
  }
53
63
 
54
64
  function _templateObject11() {
55
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-align: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n ", ";\n text-transform: ", ";\n margin: 0;\n"]);
65
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 12px;\n"]);
56
66
 
57
67
  _templateObject11 = function _templateObject11() {
58
68
  return data;
@@ -62,7 +72,7 @@ function _templateObject11() {
62
72
  }
63
73
 
64
74
  function _templateObject10() {
65
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 10px;\n"]);
75
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 18px;\n height: 18px;\n position: absolute;\n top: 22.5px;\n left: 22.5px;\n"]);
66
76
 
67
77
  _templateObject10 = function _templateObject10() {
68
78
  return data;
@@ -72,7 +82,7 @@ function _templateObject10() {
72
82
  }
73
83
 
74
84
  function _templateObject9() {
75
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 18px;\n height: 18px;\n position: absolute;\n bottom: 0px;\n right: 0px;\n"]);
85
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n opacity: 1;\n margin: 0px 0px 0px 1px;\n"]);
76
86
 
77
87
  _templateObject9 = function _templateObject9() {
78
88
  return data;
@@ -82,7 +92,7 @@ function _templateObject9() {
82
92
  }
83
93
 
84
94
  function _templateObject8() {
85
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-family: ", ";\n font-style: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n opacity: 1;\n margin: 0;\n"]);
95
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n mask: url(", ") no-repeat center;\n mask-size: ", ";\n height: ", ";\n width: ", ";\n"]);
86
96
 
87
97
  _templateObject8 = function _templateObject8() {
88
98
  return data;
@@ -122,7 +132,7 @@ function _templateObject5() {
122
132
  }
123
133
 
124
134
  function _templateObject4() {
125
- var data = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n padding-bottom: 3px;\n"]);
135
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n padding-bottom: 4px;\n"]);
126
136
 
127
137
  _templateObject4 = function _templateObject4() {
128
138
  return data;
@@ -132,7 +142,7 @@ function _templateObject4() {
132
142
  }
133
143
 
134
144
  function _templateObject3() {
135
- var data = (0, _taggedTemplateLiteral2["default"])(["\n border: none;\n background: inherit;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: ", ";\n\n padding: 0px;\n ", ";\n\n &:hover {\n ", ";\n }\n"]);
145
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n border: none;\n background: inherit;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: ", ";\n\n padding: 0px;\n ", ";\n\n &:hover {\n ", ";\n }\n &:focus {\n outline: ", " auto 1px;\n }\n"]);
136
146
 
137
147
  _templateObject3 = function _templateObject3() {
138
148
  return data;
@@ -171,10 +181,10 @@ var DxcWizard = function DxcWizard(_ref) {
171
181
  _ref$tabIndex = _ref.tabIndex,
172
182
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
173
183
 
174
- var _React$useState = _react["default"].useState(currentStep || 0),
175
- _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2),
176
- innerCurrent = _React$useState2[0],
177
- setInnerCurrentStep = _React$useState2[1];
184
+ var _useState = (0, _react.useState)(currentStep || 0),
185
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
186
+ innerCurrent = _useState2[0],
187
+ setInnerCurrentStep = _useState2[1];
178
188
 
179
189
  var renderedCurrent = currentStep == null ? innerCurrent : currentStep;
180
190
  var colorsTheme = (0, _useTheme["default"])();
@@ -190,7 +200,7 @@ var DxcWizard = function DxcWizard(_ref) {
190
200
  };
191
201
 
192
202
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
193
- theme: colorsTheme
203
+ theme: colorsTheme.wizard
194
204
  }, _react["default"].createElement(StepsContainer, {
195
205
  mode: mode,
196
206
  margin: margin
@@ -214,7 +224,10 @@ var DxcWizard = function DxcWizard(_ref) {
214
224
  disabled: step.disabled
215
225
  }, step.icon ? _react["default"].createElement(StepIconContainer, {
216
226
  disabled: step.disabled
217
- }, (0, _typeof2["default"])(step.icon) === "object" ? step.icon : _react["default"].createElement(step.icon)) : step.iconSrc ? _react["default"].createElement(Icon, {
227
+ }, (0, _typeof2["default"])(step.icon) === "object" ? step.icon.type === "img" ? _react["default"].createElement(ImgContainer, {
228
+ current: i === renderedCurrent,
229
+ img: step.icon.props.src
230
+ }) : step.icon : _react["default"].createElement(step.icon)) : step.iconSrc ? _react["default"].createElement(Icon, {
218
231
  src: step.iconSrc
219
232
  }) : _react["default"].createElement(Number, {
220
233
  disabled: step.disabled,
@@ -225,10 +238,10 @@ var DxcWizard = function DxcWizard(_ref) {
225
238
  src: _invalid_icon["default"]
226
239
  }) : ""), step.label || step.description ? _react["default"].createElement(InfoContainer, null, step.label ? _react["default"].createElement(Label, {
227
240
  disabled: step.disabled,
228
- active: i <= innerCurrent
241
+ visited: i <= innerCurrent
229
242
  }, step.label) : "", step.description ? _react["default"].createElement(Description, {
230
243
  disabled: step.disabled,
231
- active: i <= innerCurrent
244
+ visited: i <= innerCurrent
232
245
  }, step.description) : "") : ""), i === steps.length - 1 ? "" : _react["default"].createElement(StepSeparator, {
233
246
  mode: mode
234
247
  }));
@@ -240,7 +253,7 @@ var StepsContainer = _styledComponents["default"].div(_templateObject(), functio
240
253
  }, function (props) {
241
254
  return props.mode === "vertical" ? "height: 500px" : "width: 100%";
242
255
  }, function (props) {
243
- return props.theme.wizard.fontFamily;
256
+ return props.theme.fontFamily;
244
257
  }, function (props) {
245
258
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
246
259
  }, function (props) {
@@ -264,99 +277,114 @@ var StepContainer = _styledComponents["default"].div(_templateObject2(), functio
264
277
  });
265
278
 
266
279
  var Step = _styledComponents["default"].button(_templateObject3(), function (props) {
267
- return props.first ? props.mode === "vertical" ? "0 0 25px 0" : "0 25px 0 0" : props.last ? props.mode === "vertical" ? "25px 0 0 0" : "0 0 0 25px" : props.mode === "vertical" ? "25px 0" : "0 25px";
280
+ return props.first ? props.mode === "vertical" ? "0 0 24px 0" : "0 24px 0 0" : props.last ? props.mode === "vertical" ? "24px 0 0 0" : "0 0 0 24px" : props.mode === "vertical" ? "24px 0" : "0 24px";
268
281
  }, function (props) {
269
282
  return props.disabled ? "cursor: not-allowed" : "";
270
283
  }, function (props) {
271
284
  return props.disabled ? "" : "cursor: pointer";
285
+ }, function (props) {
286
+ return props.theme.focusColor;
272
287
  });
273
288
 
274
289
  var StepHeader = _styledComponents["default"].div(_templateObject4());
275
290
 
276
291
  var IconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
277
- return !props.current && !props.disabled ? "".concat(props.theme.wizard.circleSelectedWidth) : "".concat(props.theme.wizard.circleWidth);
292
+ return props.disabled ? props.theme.disabledCircleWidth : props.current ? props.theme.selectedCircleWidth : props.theme.circleWidth;
278
293
  }, function (props) {
279
- return !props.current && !props.disabled ? "".concat(props.theme.wizard.circleSelectedHeight) : "".concat(props.theme.wizard.circleHeight);
294
+ return props.disabled ? props.theme.disabledCircleHeight : props.current ? props.theme.selectedCircleHeight : props.theme.circleHeight;
280
295
  }, function (props) {
281
- return "\n ".concat(!props.current && !props.disabled ? "border: ".concat(props.theme.wizard.circleBorderThickness, " ").concat(props.theme.wizard.circleBorderStyle, " ").concat(props.theme.wizard.circleBorderColor, ";") : props.current ? "border: ".concat(props.theme.wizard.circleSelectedBorderThickness, " ").concat(props.theme.wizard.circleSelectedBorderStyle, " ").concat(props.theme.wizard.circleSelectedBorderColor, ";") : props.disabled ? "border: ".concat(props.theme.wizard.circleDisabledBorderThickness, " ").concat(props.theme.wizard.circleDisabledBorderStyle, " ").concat(props.theme.wizard.circleDisabledBorderColor, ";") : "", "\n background: ").concat(props.disabled ? "".concat(props.theme.wizard.disabledBackgroundColor) : props.current ? "".concat(props.theme.wizard.stepContainerSelectedBackgroundColor) : "".concat(props.theme.wizard.stepContainerBackgroundColor), ";\n ");
296
+ return "\n ".concat(!props.current && !props.disabled ? "border: ".concat(props.theme.circleBorderThickness, " ").concat(props.theme.circleBorderStyle, " ").concat(props.theme.circleBorderColor, ";") : props.current ? "border: ".concat(props.theme.selectedCircleBorderThickness, " ").concat(props.theme.selectedCircleBorderStyle, " ").concat(props.theme.selectedCircleBorderColor, ";") : props.disabled ? "border: ".concat(props.theme.disabledCircleBorderThickness, " ").concat(props.theme.disabledCircleBorderStyle, " ").concat(props.theme.disabledCircleBorderColor, ";") : "", "\n background: ").concat(props.disabled ? "".concat(props.theme.disabledBackgroundColor) : props.current ? "".concat(props.theme.stepContainerSelectedBackgroundColor) : "".concat(props.theme.stepContainerBackgroundColor), ";\n ");
282
297
  }, function (props) {
283
- return props.disabled ? "color: ".concat(props.theme.wizard.disabledFontColor, ";") : "color: ".concat(props.current ? props.theme.wizard.stepContainerSelectedFontColor : props.theme.wizard.stepContainerFontColor, ";");
298
+ return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.current ? props.theme.stepContainerSelectedFontColor : props.theme.stepContainerFontColor, ";");
284
299
  }, function (props) {
285
- return !props.current && !props.disabled ? props.theme.wizard.circleBorderRadius : props.current ? props.theme.wizard.circleSelectedBorderRadius : props.disabled ? props.theme.wizard.circleDisabledBorderRadius : "";
300
+ return !props.current && !props.disabled ? props.theme.circleBorderRadius : props.current ? props.theme.selectedCircleBorderRadius : props.disabled ? props.theme.disabledCircleBorderRadius : "";
286
301
  });
287
302
 
288
303
  var Icon = _styledComponents["default"].img(_templateObject6(), function (props) {
289
- return props.theme.wizard.stepContainerIconWidth;
304
+ return props.theme.stepContainerIconSize;
290
305
  }, function (props) {
291
- return props.theme.wizard.stepContainerIconHeight;
306
+ return props.theme.stepContainerIconSize;
292
307
  });
293
308
 
294
309
  var StepIconContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
295
- return props.theme.wizard.stepContainerIconWidth;
310
+ return props.theme.stepContainerIconSize;
311
+ }, function (props) {
312
+ return props.theme.stepContainerIconSize;
313
+ });
314
+
315
+ var ImgContainer = _styledComponents["default"].div(_templateObject8(), function (props) {
316
+ return props.current ? props.theme.stepContainerSelectedFontColor : props.theme.stepContainerFontColor;
317
+ }, function (_ref2) {
318
+ var img = _ref2.img;
319
+ return img;
320
+ }, function (props) {
321
+ return "".concat(props.theme.stepContainerIconSize, " ").concat(props.theme.stepContainerIconSize);
322
+ }, function (props) {
323
+ return props.theme.stepContainerIconSize;
296
324
  }, function (props) {
297
- return props.theme.wizard.stepContainerIconHeight;
325
+ return props.theme.stepContainerIconSize;
298
326
  });
299
327
 
300
- var Number = _styledComponents["default"].p(_templateObject8(), function (props) {
301
- return props.theme.wizard.stepContainerFontSize;
328
+ var Number = _styledComponents["default"].p(_templateObject9(), function (props) {
329
+ return props.theme.stepContainerFontSize;
302
330
  }, function (props) {
303
- return props.theme.wizard.stepContainerFontFamily;
331
+ return props.theme.stepContainerFontFamily;
304
332
  }, function (props) {
305
- return props.theme.wizard.stepContainerFontStyle;
333
+ return props.theme.stepContainerFontStyle;
306
334
  }, function (props) {
307
- return props.theme.wizard.stepContainerFontWeight;
335
+ return props.theme.stepContainerFontWeight;
308
336
  }, function (props) {
309
- return props.theme.wizard.stepContainerLetterSpacing;
337
+ return props.theme.stepContainerLetterSpacing;
310
338
  });
311
339
 
312
- var ValidityIcon = _styledComponents["default"].img(_templateObject9());
340
+ var ValidityIcon = _styledComponents["default"].img(_templateObject10());
313
341
 
314
- var InfoContainer = _styledComponents["default"].div(_templateObject10());
342
+ var InfoContainer = _styledComponents["default"].div(_templateObject11());
315
343
 
316
- var Label = _styledComponents["default"].p(_templateObject11(), function (props) {
317
- return props.theme.wizard.labelTextAlign;
344
+ var Label = _styledComponents["default"].p(_templateObject12(), function (props) {
345
+ return props.theme.labelTextAlign;
318
346
  }, function (props) {
319
- return props.theme.wizard.labelFontFamily;
347
+ return props.theme.labelFontFamily;
320
348
  }, function (props) {
321
- return props.theme.wizard.labelFontSize;
349
+ return props.theme.labelFontSize;
322
350
  }, function (props) {
323
- return props.theme.wizard.labelFontStyle;
351
+ return props.theme.labelFontStyle;
324
352
  }, function (props) {
325
- return props.theme.wizard.labelFontWeight;
353
+ return props.theme.labelFontWeight;
326
354
  }, function (props) {
327
- return props.theme.wizard.labelLetterSpacing;
355
+ return props.theme.labelLetterSpacing;
328
356
  }, function (props) {
329
- return props.disabled ? "color: ".concat(props.theme.wizard.disabledFontColor, ";") : "color: ".concat(props.active ? props.theme.wizard.labelActiveFontColor : props.theme.wizard.labelFontColor, ";");
357
+ return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.visited ? props.theme.visitedLabelFontColor : props.theme.labelFontColor, ";");
330
358
  }, function (props) {
331
- return props.theme.wizard.labelFontTextTransform;
359
+ return props.theme.labelFontTextTransform;
332
360
  });
333
361
 
334
- var Description = _styledComponents["default"].p(_templateObject12(), function (props) {
335
- return props.theme.wizard.descriptionTextAlign;
362
+ var Description = _styledComponents["default"].p(_templateObject13(), function (props) {
363
+ return props.theme.descriptionTextAlign;
336
364
  }, function (props) {
337
- return props.theme.wizard.descriptionFontFamily;
365
+ return props.theme.descriptionFontFamily;
338
366
  }, function (props) {
339
- return props.theme.wizard.descriptionFontSize;
367
+ return props.theme.descriptionFontSize;
340
368
  }, function (props) {
341
- return props.theme.wizard.descriptionFontStyle;
369
+ return props.theme.descriptionFontStyle;
342
370
  }, function (props) {
343
- return props.theme.wizard.descriptionFontWeight;
371
+ return props.theme.descriptionFontWeight;
344
372
  }, function (props) {
345
- return props.theme.wizard.descriptionLetterSpacing;
373
+ return props.theme.descriptionLetterSpacing;
346
374
  }, function (props) {
347
- return props.theme.wizard.descriptionFontTextTransform;
375
+ return props.theme.descriptionFontTextTransform;
348
376
  }, function (props) {
349
- return props.disabled ? "color: ".concat(props.theme.wizard.disabledFontColor, ";") : "color: ".concat(props.active ? props.theme.wizard.descriptionActiveFontColor : props.theme.wizard.descriptionFontColor, ";");
377
+ return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.visited ? props.theme.visitedDescriptionFontColor : props.theme.descriptionFontColor, ";");
350
378
  });
351
379
 
352
- var StepSeparator = _styledComponents["default"].div(_templateObject13(), function (props) {
380
+ var StepSeparator = _styledComponents["default"].div(_templateObject14(), function (props) {
353
381
  return props.mode === "horizontal" ? "" : "0";
354
382
  }, function (props) {
355
383
  return props.mode === "horizontal" ? "0" : "";
356
384
  }, function (props) {
357
385
  return props.mode === "vertical" ? "margin: 0 18px;" : "";
358
386
  }, function (props) {
359
- return "".concat(props.theme.wizard.separatorBorderStyle, " ").concat(props.theme.wizard.separatorBorderThickness, " ").concat(props.theme.wizard.separatorColor);
387
+ return "".concat(props.theme.separatorBorderStyle, " ").concat(props.theme.separatorBorderThickness, " ").concat(props.theme.separatorColor);
360
388
  });
361
389
 
362
390
  DxcWizard.propTypes = {
@@ -1,6 +1,5 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="496" height="496" viewBox="0 0 496 496">
2
- <g id="Group_2913" data-name="Group 2913" transform="translate(5286 3925)">
3
- <path id="Path_2821" data-name="Path 2821" d="M240,0C372.548,0,480,107.452,480,240S372.548,480,240,480,0,372.548,0,240,107.452,0,240,0Z" transform="translate(-5278 -3917)" fill="#f9cfcf"/>
4
- <path id="times-circle-regular" d="M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm0,448A200,200,0,1,1,456,256,199.945,199.945,0,0,1,256,456ZM357.8,193.8,295.6,256l62.2,62.2a12.011,12.011,0,0,1,0,17l-22.6,22.6a12.011,12.011,0,0,1-17,0L256,295.6l-62.2,62.2a12.011,12.011,0,0,1-17,0l-22.6-22.6a12.011,12.011,0,0,1,0-17L216.4,256l-62.2-62.2a12.011,12.011,0,0,1,0-17l22.6-22.6a12.011,12.011,0,0,1,17,0L256,216.4l62.2-62.2a12.011,12.011,0,0,1,17,0l22.6,22.6a12.011,12.011,0,0,1,0,17Z" transform="translate(-5294 -3933)" fill="#e22"/>
5
- </g>
1
+ <svg id="highlight_off_black_18dp" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
+ <path id="Path_2943" data-name="Path 2943" d="M0,0H18V18H0Z" fill="none"/>
3
+ <path id="Path_2944" data-name="Path 2944" d="M10,4a6,6,0,1,0,6,6A6.01,6.01,0,0,0,10,4Zm3,7.945L11.945,13,10,11.06,8.059,13,7,11.945,8.944,10,7,8.059,8.059,7,10,8.944,11.945,7,13,8.059,11.06,10Z" transform="translate(-1.002 -1.002)" fill="#ffe6e9"/>
4
+ <path id="Path_2945" data-name="Path 2945" d="M11.444,6.5,9.5,8.443,7.558,6.5,6.5,7.558,8.443,9.5,6.5,11.444,7.558,12.5,9.5,10.558,11.444,12.5,12.5,11.444,10.558,9.5,12.5,7.558ZM9.5,2A7.5,7.5,0,1,0,17,9.5,7.494,7.494,0,0,0,9.5,2Zm0,13.5a6,6,0,1,1,6-6A6.009,6.009,0,0,1,9.5,15.5Z" transform="translate(-0.501 -0.501)" fill="#d0011b"/>
6
5
  </svg>
@@ -1,6 +1,5 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="496" height="496" viewBox="0 0 496 496">
2
- <g id="Group_2914" data-name="Group 2914" transform="translate(4677 3925)">
3
- <path id="Path_2822" data-name="Path 2822" d="M240,0C372.548,0,480,107.452,480,240S372.548,480,240,480,0,372.548,0,240,107.452,0,240,0Z" transform="translate(-4669 -3917)" fill="#dbf1c4"/>
4
- <path id="check-circle-regular" d="M256,8C119.033,8,8,119.033,8,256S119.033,504,256,504,504,392.967,504,256,392.967,8,256,8Zm0,48A200,200,0,1,1,56,256,199.893,199.893,0,0,1,256,56M396.2,186.267l-22.536-22.718a12,12,0,0,0-16.97-.068L215.346,303.7,155.554,243.42a12,12,0,0,0-16.97-.069l-22.719,22.536a12,12,0,0,0-.068,16.971l90.781,91.516a12,12,0,0,0,16.97.068l172.589-171.2a12,12,0,0,0,.067-16.971Z" transform="translate(-4685 -3933)" fill="#7ed321"/>
5
- </g>
1
+ <svg id="check_circle_black_18dp" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
2
+ <path id="Path_2946" data-name="Path 2946" d="M0,0H18V18H0Z" fill="none"/>
3
+ <path id="Path_2947" data-name="Path 2947" d="M9.986,4a5.986,5.986,0,1,0,5.986,5.986A5.994,5.994,0,0,0,9.986,4Zm-1.5,9.727L5.5,10.734,6.551,9.679l1.938,1.93L13.42,6.679l1.055,1.063Z" transform="translate(-0.986 -0.986)" fill="#eafaef" opacity="0.999"/>
4
+ <path id="Path_2948" data-name="Path 2948" d="M9.493,2a7.493,7.493,0,1,0,7.493,7.493A7.5,7.5,0,0,0,9.493,2Zm0,13.487a5.994,5.994,0,1,1,5.994-5.994A6,6,0,0,1,9.493,15.487Zm3.439-9.306L7.994,11.119,6.054,9.186,5,10.242l3,3,5.994-5.994Z" transform="translate(-0.493 -0.493)" fill="#24a148"/>
6
5
  </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxc-technology/halstack-react",
3
- "version": "0.0.0-89339f9",
3
+ "version": "0.0.0-8c3739a",
4
4
  "description": "DXC Halstack React components library",
5
5
  "repository": "dxc-technology/halstack-react",
6
6
  "homepage": "http://developer.dxc.com/tools/react",
@@ -11,6 +11,7 @@
11
11
  "url": "https://dxc.com"
12
12
  },
13
13
  "main": "./dist/main.js",
14
+ "types": "./dist/main.d.ts",
14
15
  "peerDependencies": {
15
16
  "react": "^16.8.6",
16
17
  "react-dom": "^16.8.6",
@@ -29,7 +30,8 @@
29
30
  "moment": "2.24.0",
30
31
  "prop-types": "^15.7.2",
31
32
  "react-use-scrollspy": "^2.0.0",
32
- "rgb-hex": "^3.0.0"
33
+ "rgb-hex": "^3.0.0",
34
+ "uuid": "^8.3.2"
33
35
  },
34
36
  "scripts": {
35
37
  "test": "jest",