@dxc-technology/halstack-react 0.0.0-f46d22a → 0.0.0-f4bae62

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 (151) hide show
  1. package/README.md +1 -1
  2. package/dist/BackgroundColorContext.js +46 -0
  3. package/dist/ThemeContext.js +211 -150
  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 +92 -32
  15. package/dist/common/utils.js +2 -22
  16. package/dist/common/variables.js +1400 -191
  17. package/dist/date/Date.js +72 -50
  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 +89 -34
  26. package/dist/footer/Icons.js +77 -0
  27. package/dist/header/Header.js +152 -86
  28. package/dist/header/Icons.js +59 -0
  29. package/dist/heading/Heading.js +81 -16
  30. package/dist/input-text/Icons.js +22 -0
  31. package/dist/input-text/InputText.js +250 -104
  32. package/dist/layout/ApplicationLayout.js +15 -20
  33. package/dist/layout/Icons.js +55 -0
  34. package/dist/link/Link.js +84 -34
  35. package/dist/main.d.ts +8 -0
  36. package/dist/main.js +71 -7
  37. package/dist/new-select/NewSelect.js +836 -0
  38. package/dist/new-select/index.d.ts +53 -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/Icons.js +66 -0
  43. package/dist/paginator/Paginator.js +67 -35
  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 +90 -34
  47. package/dist/radio/Radio.js +30 -11
  48. package/dist/resultsetTable/ResultsetTable.js +79 -48
  49. package/dist/select/Select.js +224 -147
  50. package/dist/sidenav/Sidenav.js +65 -11
  51. package/dist/slider/Slider.js +212 -65
  52. package/dist/spinner/Spinner.js +246 -57
  53. package/dist/switch/Switch.js +51 -19
  54. package/dist/table/Table.js +49 -21
  55. package/dist/tabs/Tabs.js +58 -17
  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 +246 -101
  60. package/dist/textarea/index.d.ts +117 -0
  61. package/dist/toggle/Toggle.js +16 -19
  62. package/dist/toggle-group/ToggleGroup.js +141 -37
  63. package/dist/upload/Upload.js +16 -11
  64. package/dist/upload/buttons-upload/ButtonsUpload.js +31 -14
  65. package/dist/upload/dragAndDropArea/DragAndDropArea.js +78 -28
  66. package/dist/upload/file-upload/FileToUpload.js +50 -24
  67. package/dist/upload/files-upload/FilesToUpload.js +16 -16
  68. package/dist/upload/readme.md +2 -2
  69. package/dist/upload/transaction/Transaction.js +44 -24
  70. package/dist/upload/transactions/Transactions.js +38 -20
  71. package/dist/wizard/Icons.js +65 -0
  72. package/dist/wizard/Wizard.js +125 -48
  73. package/package.json +6 -4
  74. package/test/AccordionGroup.test.js +16 -0
  75. package/test/Date.test.js +49 -45
  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/Footer.test.js +2 -7
  80. package/test/Header.test.js +5 -10
  81. package/test/InputText.test.js +25 -17
  82. package/test/Link.test.js +3 -2
  83. package/test/NumberInput.test.js +259 -0
  84. package/test/Paginator.test.js +1 -1
  85. package/test/PasswordInput.test.js +83 -0
  86. package/test/ResultsetTable.test.js +1 -2
  87. package/test/Select.test.js +44 -24
  88. package/test/Slider.test.js +9 -17
  89. package/test/Spinner.test.js +5 -0
  90. package/test/TextInput.test.js +732 -0
  91. package/test/Textarea.test.js +193 -0
  92. package/test/ToggleGroup.test.js +5 -1
  93. package/test/Upload.test.js +5 -5
  94. package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
  95. package/dist/accordion/Accordion.stories.js +0 -207
  96. package/dist/accordion/readme.md +0 -96
  97. package/dist/accordion-group/AccordionGroup.stories.js +0 -207
  98. package/dist/accordion-group/readme.md +0 -70
  99. package/dist/alert/Alert.stories.js +0 -158
  100. package/dist/alert/close.svg +0 -4
  101. package/dist/alert/error.svg +0 -4
  102. package/dist/alert/info.svg +0 -4
  103. package/dist/alert/readme.md +0 -43
  104. package/dist/alert/success.svg +0 -4
  105. package/dist/alert/warning.svg +0 -4
  106. package/dist/button/Button.stories.js +0 -224
  107. package/dist/button/readme.md +0 -93
  108. package/dist/common/services/example-service.js +0 -10
  109. package/dist/common/services/example-service.test.js +0 -12
  110. package/dist/date/calendar.svg +0 -1
  111. package/dist/date/calendar_dark.svg +0 -1
  112. package/dist/dialog/Dialog.stories.js +0 -217
  113. package/dist/dialog/readme.md +0 -32
  114. package/dist/dropdown/Dropdown.stories.js +0 -249
  115. package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
  116. package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
  117. package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
  118. package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
  119. package/dist/dropdown/readme.md +0 -69
  120. package/dist/footer/Footer.stories.js +0 -94
  121. package/dist/footer/dxc_logo_wht.png +0 -0
  122. package/dist/footer/readme.md +0 -41
  123. package/dist/header/Header.stories.js +0 -176
  124. package/dist/header/close_icon.svg +0 -1
  125. package/dist/header/dxc_logo_black.png +0 -0
  126. package/dist/header/dxc_logo_blk_rgb.svg +0 -6
  127. package/dist/header/dxc_logo_white.png +0 -0
  128. package/dist/header/hamb_menu_black.svg +0 -1
  129. package/dist/header/hamb_menu_white.svg +0 -1
  130. package/dist/header/readme.md +0 -33
  131. package/dist/input-text/InputText.stories.js +0 -209
  132. package/dist/input-text/error.svg +0 -1
  133. package/dist/input-text/readme.md +0 -91
  134. package/dist/layout/facebook.svg +0 -45
  135. package/dist/layout/linkedin.svg +0 -50
  136. package/dist/layout/twitter.svg +0 -53
  137. package/dist/paginator/images/next.svg +0 -3
  138. package/dist/paginator/images/nextPage.svg +0 -3
  139. package/dist/paginator/images/previous.svg +0 -3
  140. package/dist/paginator/images/previousPage.svg +0 -3
  141. package/dist/paginator/readme.md +0 -50
  142. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  143. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  144. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  145. package/dist/select/Select.stories.js +0 -235
  146. package/dist/select/readme.md +0 -72
  147. package/dist/slider/Slider.stories.js +0 -241
  148. package/dist/toggle-group/readme.md +0 -82
  149. package/dist/wizard/invalid_icon.svg +0 -6
  150. package/dist/wizard/valid_icon.svg +0 -6
  151. package/dist/wizard/validation-wrong.svg +0 -6
@@ -25,16 +25,22 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
25
25
 
26
26
  var _variables = require("../common/variables.js");
27
27
 
28
- var _utils = require("../common/utils.js");
29
-
30
28
  var _useTheme = _interopRequireDefault(require("../useTheme.js"));
31
29
 
32
- var _valid_icon = _interopRequireDefault(require("./valid_icon.svg"));
30
+ var _Icons = require("./Icons");
31
+
32
+ function _templateObject14() {
33
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", "\n border: ", ";\n opacity: 1;\n flex-grow: 1;\n"]);
34
+
35
+ _templateObject14 = function _templateObject14() {
36
+ return data;
37
+ };
33
38
 
34
- var _invalid_icon = _interopRequireDefault(require("./invalid_icon.svg"));
39
+ return data;
40
+ }
35
41
 
36
42
  function _templateObject13() {
37
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n ", "\n border: ", ";\n opacity: 1;\n flex-grow: 1;\n"]);
43
+ 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"]);
38
44
 
39
45
  _templateObject13 = function _templateObject13() {
40
46
  return data;
@@ -44,7 +50,7 @@ function _templateObject13() {
44
50
  }
45
51
 
46
52
  function _templateObject12() {
47
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-align: left;\n font: Lighter 12px/17px Open Sans;\n letter-spacing: 0.58px;\n color: inherit;\n margin: 0;\n"]);
53
+ 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"]);
48
54
 
49
55
  _templateObject12 = function _templateObject12() {
50
56
  return data;
@@ -54,7 +60,7 @@ function _templateObject12() {
54
60
  }
55
61
 
56
62
  function _templateObject11() {
57
- var data = (0, _taggedTemplateLiteral2["default"])(["\n text-align: left;\n font: Normal 16px/22px Open Sans;\n letter-spacing: 0.77px;\n color: inherit;\n margin: 0;\n"]);
63
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 12px;\n"]);
58
64
 
59
65
  _templateObject11 = function _templateObject11() {
60
66
  return data;
@@ -64,7 +70,7 @@ function _templateObject11() {
64
70
  }
65
71
 
66
72
  function _templateObject10() {
67
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 10px;\n color: ", ";\n"]);
73
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 18px;\n height: 18px;\n position: absolute;\n top: 22.5px;\n left: 22.5px;\n"]);
68
74
 
69
75
  _templateObject10 = function _templateObject10() {
70
76
  return data;
@@ -74,7 +80,7 @@ function _templateObject10() {
74
80
  }
75
81
 
76
82
  function _templateObject9() {
77
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 18px;\n height: 18px;\n position: absolute;\n bottom: 0px;\n right: 0px;\n"]);
83
+ 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"]);
78
84
 
79
85
  _templateObject9 = function _templateObject9() {
80
86
  return data;
@@ -84,7 +90,7 @@ function _templateObject9() {
84
90
  }
85
91
 
86
92
  function _templateObject8() {
87
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font: Normal 16px/22px Open Sans;\n letter-spacing: 0.77px;\n color: ", ";\n opacity: 1;\n margin: 0;\n"]);
93
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n mask: url(", ") no-repeat center;\n mask-size: ", ";\n height: ", ";\n width: ", ";\n"]);
88
94
 
89
95
  _templateObject8 = function _templateObject8() {
90
96
  return data;
@@ -94,7 +100,7 @@ function _templateObject8() {
94
100
  }
95
101
 
96
102
  function _templateObject7() {
97
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 19px;\n height: 19px;\n overflow: hidden;\n color: ", ";\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
103
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n overflow: hidden;\n img,\n svg {\n height: 100%;\n width: 100%;\n }\n"]);
98
104
 
99
105
  _templateObject7 = function _templateObject7() {
100
106
  return data;
@@ -104,7 +110,7 @@ function _templateObject7() {
104
110
  }
105
111
 
106
112
  function _templateObject6() {
107
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: 19px;\n height: 19px;\n"]);
113
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n"]);
108
114
 
109
115
  _templateObject6 = function _templateObject6() {
110
116
  return data;
@@ -114,7 +120,7 @@ function _templateObject6() {
114
120
  }
115
121
 
116
122
  function _templateObject5() {
117
- var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n\n ", "\n\n border-radius: 45px;\n display: flex;\n justify-content: center;\n align-items: center;\n"]);
123
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n height: ", ";\n\n ", "\n ", ";\n\n border-radius: ", ";\n display: flex;\n justify-content: center;\n align-items: center;\n"]);
118
124
 
119
125
  _templateObject5 = function _templateObject5() {
120
126
  return data;
@@ -124,7 +130,7 @@ function _templateObject5() {
124
130
  }
125
131
 
126
132
  function _templateObject4() {
127
- var data = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n padding-bottom: 3px;\n"]);
133
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-flex;\n padding-bottom: 4px;\n"]);
128
134
 
129
135
  _templateObject4 = function _templateObject4() {
130
136
  return data;
@@ -134,7 +140,7 @@ function _templateObject4() {
134
140
  }
135
141
 
136
142
  function _templateObject3() {
137
- 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 &:focus {\n outline: none;\n }\n\n &:hover {\n ", ";\n }\n"]);
143
+ 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"]);
138
144
 
139
145
  _templateObject3 = function _templateObject3() {
140
146
  return data;
@@ -154,7 +160,7 @@ function _templateObject2() {
154
160
  }
155
161
 
156
162
  function _templateObject() {
157
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-direction: ", ";\n justify-content: \"center\";\n ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
163
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n flex-direction: ", ";\n justify-content: \"center\";\n ", ";\n font-family: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
158
164
 
159
165
  _templateObject = function _templateObject() {
160
166
  return data;
@@ -169,12 +175,14 @@ var DxcWizard = function DxcWizard(_ref) {
169
175
  currentStep = _ref.currentStep,
170
176
  onStepClick = _ref.onStepClick,
171
177
  steps = _ref.steps,
172
- margin = _ref.margin;
178
+ margin = _ref.margin,
179
+ _ref$tabIndex = _ref.tabIndex,
180
+ tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
173
181
 
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];
182
+ var _useState = (0, _react.useState)(currentStep || 0),
183
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
184
+ innerCurrent = _useState2[0],
185
+ setInnerCurrentStep = _useState2[1];
178
186
 
179
187
  var renderedCurrent = currentStep == null ? innerCurrent : currentStep;
180
188
  var colorsTheme = (0, _useTheme["default"])();
@@ -190,7 +198,7 @@ var DxcWizard = function DxcWizard(_ref) {
190
198
  };
191
199
 
192
200
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
193
- theme: colorsTheme
201
+ theme: colorsTheme.wizard
194
202
  }, _react["default"].createElement(StepsContainer, {
195
203
  mode: mode,
196
204
  margin: margin
@@ -200,6 +208,7 @@ var DxcWizard = function DxcWizard(_ref) {
200
208
  mode: mode,
201
209
  lastStep: i === steps.length - 1
202
210
  }, _react["default"].createElement(Step, {
211
+ tabIndex: tabIndex,
203
212
  onClick: function onClick() {
204
213
  return handleStepClick(i);
205
214
  },
@@ -213,19 +222,21 @@ var DxcWizard = function DxcWizard(_ref) {
213
222
  disabled: step.disabled
214
223
  }, step.icon ? _react["default"].createElement(StepIconContainer, {
215
224
  disabled: step.disabled
216
- }, (0, _typeof2["default"])(step.icon) === "object" ? step.icon : _react["default"].createElement(step.icon)) : step.iconSrc ? _react["default"].createElement(Icon, {
225
+ }, (0, _typeof2["default"])(step.icon) === "object" ? step.icon.type === "img" ? _react["default"].createElement(ImgContainer, {
226
+ current: i === renderedCurrent,
227
+ img: step.icon.props.src
228
+ }) : step.icon : _react["default"].createElement(step.icon)) : step.iconSrc ? _react["default"].createElement(Icon, {
217
229
  src: step.iconSrc
218
230
  }) : _react["default"].createElement(Number, {
219
231
  disabled: step.disabled,
220
232
  current: i === renderedCurrent
221
- }, i + 1)), step.valid !== undefined ? step.valid ? _react["default"].createElement(ValidityIcon, {
222
- src: _valid_icon["default"]
223
- }) : _react["default"].createElement(ValidityIcon, {
224
- src: _invalid_icon["default"]
225
- }) : ""), step.label || step.description ? _react["default"].createElement(InfoContainer, {
226
- active: i <= innerCurrent,
227
- disabled: step.disabled
228
- }, step.label ? _react["default"].createElement(Label, null, step.label) : "", step.description ? _react["default"].createElement(Description, null, step.description) : "") : ""), i === steps.length - 1 ? "" : _react["default"].createElement(StepSeparator, {
233
+ }, i + 1)), step.valid !== undefined ? step.valid ? _react["default"].createElement(ValidityIconContainer, null, _Icons.validIcon) : _react["default"].createElement(ValidityIconContainer, null, _Icons.invalidIcon) : ""), step.label || step.description ? _react["default"].createElement(InfoContainer, null, step.label ? _react["default"].createElement(Label, {
234
+ disabled: step.disabled,
235
+ visited: i <= innerCurrent
236
+ }, step.label) : "", step.description ? _react["default"].createElement(Description, {
237
+ disabled: step.disabled,
238
+ visited: i <= innerCurrent
239
+ }, step.description) : "") : ""), i === steps.length - 1 ? "" : _react["default"].createElement(StepSeparator, {
229
240
  mode: mode
230
241
  }));
231
242
  })));
@@ -235,6 +246,8 @@ var StepsContainer = _styledComponents["default"].div(_templateObject(), functio
235
246
  return props.mode === "vertical" ? "column" : "row";
236
247
  }, function (props) {
237
248
  return props.mode === "vertical" ? "height: 500px" : "width: 100%";
249
+ }, function (props) {
250
+ return props.theme.fontFamily;
238
251
  }, function (props) {
239
252
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
240
253
  }, function (props) {
@@ -258,51 +271,114 @@ var StepContainer = _styledComponents["default"].div(_templateObject2(), functio
258
271
  });
259
272
 
260
273
  var Step = _styledComponents["default"].button(_templateObject3(), function (props) {
261
- 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";
274
+ 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";
262
275
  }, function (props) {
263
276
  return props.disabled ? "cursor: not-allowed" : "";
264
277
  }, function (props) {
265
278
  return props.disabled ? "" : "cursor: pointer";
279
+ }, function (props) {
280
+ return props.theme.focusColor;
266
281
  });
267
282
 
268
283
  var StepHeader = _styledComponents["default"].div(_templateObject4());
269
284
 
270
285
  var IconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
271
- return !props.current && !props.disabled ? "32px" : "36px";
286
+ return props.disabled ? props.theme.disabledCircleWidth : props.current ? props.theme.selectedCircleWidth : props.theme.circleWidth;
272
287
  }, function (props) {
273
- return !props.current && !props.disabled ? "32px" : "36px";
288
+ return props.disabled ? props.theme.disabledCircleHeight : props.current ? props.theme.selectedCircleHeight : props.theme.circleHeight;
274
289
  }, function (props) {
275
- return "\n ".concat(!props.current && !props.disabled ? "border: 2px solid ".concat(props.theme.wizard.borderColor, ";") : "", "\n background: ").concat(props.disabled ? "".concat(props.theme.wizard.disabledBackground) : props.current ? "".concat(props.theme.wizard.selectedBackgroundColor) : "", ";\n ").concat(props.current ? "color: ".concat(props.theme.wizard.selectedFont, ";") : "", "\n ");
290
+ 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 ");
291
+ }, function (props) {
292
+ return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.current ? props.theme.stepContainerSelectedFontColor : props.theme.stepContainerFontColor, ";");
293
+ }, function (props) {
294
+ return !props.current && !props.disabled ? props.theme.circleBorderRadius : props.current ? props.theme.selectedCircleBorderRadius : props.disabled ? props.theme.disabledCircleBorderRadius : "";
276
295
  });
277
296
 
278
- var Icon = _styledComponents["default"].img(_templateObject6());
297
+ var Icon = _styledComponents["default"].img(_templateObject6(), function (props) {
298
+ return props.theme.stepContainerIconSize;
299
+ }, function (props) {
300
+ return props.theme.stepContainerIconSize;
301
+ });
279
302
 
280
303
  var StepIconContainer = _styledComponents["default"].div(_templateObject7(), function (props) {
281
- return props.disabled ? "".concat(props.theme.wizard.disabledFont) : "".concat(props.theme.wizard.fontColor);
304
+ return props.theme.stepContainerIconSize;
305
+ }, function (props) {
306
+ return props.theme.stepContainerIconSize;
307
+ });
308
+
309
+ var ImgContainer = _styledComponents["default"].div(_templateObject8(), function (props) {
310
+ return props.current ? props.theme.stepContainerSelectedFontColor : props.theme.stepContainerFontColor;
311
+ }, function (_ref2) {
312
+ var img = _ref2.img;
313
+ return img;
314
+ }, function (props) {
315
+ return "".concat(props.theme.stepContainerIconSize, " ").concat(props.theme.stepContainerIconSize);
316
+ }, function (props) {
317
+ return props.theme.stepContainerIconSize;
318
+ }, function (props) {
319
+ return props.theme.stepContainerIconSize;
282
320
  });
283
321
 
284
- var Number = _styledComponents["default"].p(_templateObject8(), function (props) {
285
- return props.disabled ? "".concat(props.theme.wizard.disabledFont) : "".concat(props.theme.wizard.fontColor);
322
+ var Number = _styledComponents["default"].p(_templateObject9(), function (props) {
323
+ return props.theme.stepContainerFontSize;
324
+ }, function (props) {
325
+ return props.theme.stepContainerFontFamily;
326
+ }, function (props) {
327
+ return props.theme.stepContainerFontStyle;
328
+ }, function (props) {
329
+ return props.theme.stepContainerFontWeight;
330
+ }, function (props) {
331
+ return props.theme.stepContainerLetterSpacing;
286
332
  });
287
333
 
288
- var ValidityIcon = _styledComponents["default"].img(_templateObject9());
334
+ var ValidityIconContainer = _styledComponents["default"].div(_templateObject10());
289
335
 
290
- var InfoContainer = _styledComponents["default"].div(_templateObject10(), function (props) {
291
- return props.disabled ? "".concat(props.theme.wizard.disabledFont) : "".concat(props.theme.wizard.fontColor);
292
- });
336
+ var InfoContainer = _styledComponents["default"].div(_templateObject11());
293
337
 
294
- var Label = _styledComponents["default"].p(_templateObject11());
338
+ var Label = _styledComponents["default"].p(_templateObject12(), function (props) {
339
+ return props.theme.labelTextAlign;
340
+ }, function (props) {
341
+ return props.theme.labelFontFamily;
342
+ }, function (props) {
343
+ return props.theme.labelFontSize;
344
+ }, function (props) {
345
+ return props.theme.labelFontStyle;
346
+ }, function (props) {
347
+ return props.theme.labelFontWeight;
348
+ }, function (props) {
349
+ return props.theme.labelLetterSpacing;
350
+ }, function (props) {
351
+ return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.visited ? props.theme.visitedLabelFontColor : props.theme.labelFontColor, ";");
352
+ }, function (props) {
353
+ return props.theme.labelFontTextTransform;
354
+ });
295
355
 
296
- var Description = _styledComponents["default"].p(_templateObject12());
356
+ var Description = _styledComponents["default"].p(_templateObject13(), function (props) {
357
+ return props.theme.descriptionTextAlign;
358
+ }, function (props) {
359
+ return props.theme.descriptionFontFamily;
360
+ }, function (props) {
361
+ return props.theme.descriptionFontSize;
362
+ }, function (props) {
363
+ return props.theme.descriptionFontStyle;
364
+ }, function (props) {
365
+ return props.theme.descriptionFontWeight;
366
+ }, function (props) {
367
+ return props.theme.descriptionLetterSpacing;
368
+ }, function (props) {
369
+ return props.theme.descriptionFontTextTransform;
370
+ }, function (props) {
371
+ return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.visited ? props.theme.visitedDescriptionFontColor : props.theme.descriptionFontColor, ";");
372
+ });
297
373
 
298
- var StepSeparator = _styledComponents["default"].div(_templateObject13(), function (props) {
374
+ var StepSeparator = _styledComponents["default"].div(_templateObject14(), function (props) {
299
375
  return props.mode === "horizontal" ? "" : "0";
300
376
  }, function (props) {
301
377
  return props.mode === "horizontal" ? "0" : "";
302
378
  }, function (props) {
303
379
  return props.mode === "vertical" ? "margin: 0 18px;" : "";
304
380
  }, function (props) {
305
- return "solid 1px ".concat(props.theme.wizard.lineColor);
381
+ return "".concat(props.theme.separatorBorderStyle, " ").concat(props.theme.separatorBorderThickness, " ").concat(props.theme.separatorColor);
306
382
  });
307
383
 
308
384
  DxcWizard.propTypes = {
@@ -322,7 +398,8 @@ DxcWizard.propTypes = {
322
398
  bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
323
399
  left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
324
400
  right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
325
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
401
+ }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
402
+ tabIndex: _propTypes["default"].number
326
403
  };
327
404
  var _default = DxcWizard;
328
405
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxc-technology/halstack-react",
3
- "version": "0.0.0-f46d22a",
3
+ "version": "0.0.0-f4bae62",
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",
@@ -41,8 +43,8 @@
41
43
  "@babel/cli": "^7.6.2",
42
44
  "@babel/core": "^7.6.2",
43
45
  "@babel/plugin-proposal-class-properties": "^7.5.5",
44
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
45
- "@babel/plugin-proposal-optional-chaining": "^7.13.8",
46
+ "@babel/plugin-proposal-nullish-coalescing-operator": "7.13.8",
47
+ "@babel/plugin-proposal-optional-chaining": "7.13.8",
46
48
  "@babel/plugin-transform-runtime": "^7.10.1",
47
49
  "@babel/preset-env": "^7.6.2",
48
50
  "@babel/preset-react": "^7.0.0",
@@ -27,6 +27,22 @@ describe("Accordion component tests", () => {
27
27
  expect(getAllByRole("button")[1].getAttribute("aria-expanded")).toBe("false");
28
28
  });
29
29
 
30
+ test("Uncontrolled accordion group renders with only one children", () => {
31
+ const { getByText, getAllByRole } = render(
32
+ <DxcAccordionGroup>
33
+ <DxcAccordionGroup.Accordion label="Accordion1" padding="medium">
34
+ <div>
35
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit
36
+ leo lobortis eget.
37
+ </div>
38
+ </DxcAccordionGroup.Accordion>
39
+ </DxcAccordionGroup>
40
+ );
41
+
42
+ expect(getByText("Accordion1")).toBeTruthy();
43
+ expect(getAllByRole("button")[0].getAttribute("aria-expanded")).toBe("false");
44
+ });
45
+
30
46
  test("Uncontrolled accordion group calls correct function on click", () => {
31
47
  const onActiveChange = jest.fn();
32
48
  const { getByText, getAllByRole } = render(