@dxc-technology/halstack-react 0.0.0-4dc6bb3 → 0.0.0-4dc980c

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 (60) hide show
  1. package/HalstackContext.js +7 -8
  2. package/checkbox/Checkbox.d.ts +2 -2
  3. package/checkbox/Checkbox.js +16 -15
  4. package/checkbox/Checkbox.stories.tsx +79 -59
  5. package/checkbox/types.d.ts +4 -0
  6. package/common/variables.js +19 -15
  7. package/date-input/Calendar.d.ts +4 -0
  8. package/date-input/Calendar.js +258 -0
  9. package/date-input/DateInput.js +77 -222
  10. package/date-input/DateInput.stories.tsx +30 -17
  11. package/date-input/DateInput.test.js +411 -138
  12. package/date-input/DatePicker.d.ts +4 -0
  13. package/date-input/DatePicker.js +160 -0
  14. package/date-input/YearPicker.d.ts +4 -0
  15. package/date-input/YearPicker.js +115 -0
  16. package/date-input/types.d.ts +53 -0
  17. package/dropdown/Dropdown.js +32 -29
  18. package/dropdown/Dropdown.test.js +17 -22
  19. package/file-input/FileInput.d.ts +2 -2
  20. package/file-input/FileInput.js +177 -219
  21. package/file-input/FileInput.stories.tsx +38 -10
  22. package/file-input/FileInput.test.js +53 -12
  23. package/file-input/FileItem.d.ts +4 -14
  24. package/file-input/FileItem.js +38 -63
  25. package/file-input/types.d.ts +17 -0
  26. package/flex/Flex.d.ts +1 -1
  27. package/flex/Flex.js +31 -19
  28. package/flex/types.d.ts +14 -3
  29. package/link/Link.js +1 -1
  30. package/number-input/NumberInput.test.js +42 -6
  31. package/package.json +7 -12
  32. package/paginator/Paginator.js +2 -2
  33. package/paginator/Paginator.test.js +1 -1
  34. package/quick-nav/QuickNav.js +3 -1
  35. package/quick-nav/QuickNav.stories.tsx +67 -25
  36. package/radio-group/RadioGroup.js +9 -5
  37. package/radio-group/RadioGroup.test.js +116 -59
  38. package/resultsetTable/Icons.d.ts +7 -0
  39. package/resultsetTable/Icons.js +51 -0
  40. package/resultsetTable/ResultsetTable.js +48 -107
  41. package/resultsetTable/ResultsetTable.stories.tsx +50 -25
  42. package/resultsetTable/ResultsetTable.test.js +23 -41
  43. package/resultsetTable/types.d.ts +2 -2
  44. package/select/Select.js +1 -0
  45. package/select/Select.stories.tsx +2 -5
  46. package/select/Select.test.js +267 -209
  47. package/slider/Slider.d.ts +2 -2
  48. package/slider/Slider.js +9 -8
  49. package/slider/types.d.ts +4 -0
  50. package/spinner/Spinner.js +2 -2
  51. package/switch/Switch.d.ts +3 -3
  52. package/switch/Switch.js +5 -4
  53. package/switch/types.d.ts +6 -1
  54. package/table/Table.js +1 -1
  55. package/table/Table.test.js +1 -1
  56. package/tabs/Tabs.js +3 -3
  57. package/tabs/Tabs.stories.tsx +0 -1
  58. package/text-input/TextInput.js +9 -5
  59. package/text-input/TextInput.test.js +558 -648
  60. package/common/RequiredComponent.js +0 -32
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import SliderPropsType from "./types";
3
- declare const DxcSlider: ({ label, name, defaultValue, value, helperText, minValue, maxValue, step, showLimitsValues, showInput, disabled, marks, onChange, onDragEnd, labelFormatCallback, margin, size, }: SliderPropsType) => JSX.Element;
3
+ declare const DxcSlider: React.ForwardRefExoticComponent<SliderPropsType & React.RefAttributes<HTMLDivElement>>;
4
4
  export default DxcSlider;
package/slider/Slider.js CHANGED
@@ -37,7 +37,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
37
37
 
38
38
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
39
 
40
- var DxcSlider = function DxcSlider(_ref) {
40
+ var DxcSlider = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
41
41
  var _ref$label = _ref.label,
42
42
  label = _ref$label === void 0 ? "" : _ref$label,
43
43
  _ref$name = _ref.name,
@@ -147,7 +147,8 @@ var DxcSlider = function DxcSlider(_ref) {
147
147
  theme: colorsTheme.slider
148
148
  }, /*#__PURE__*/_react["default"].createElement(Container, {
149
149
  margin: margin,
150
- size: size
150
+ size: size,
151
+ ref: ref
151
152
  }, /*#__PURE__*/_react["default"].createElement(Label, {
152
153
  id: labelId,
153
154
  disabled: disabled,
@@ -189,7 +190,7 @@ var DxcSlider = function DxcSlider(_ref) {
189
190
  onChange: handlerInputChange,
190
191
  size: "fillParent"
191
192
  })))));
192
- };
193
+ });
193
194
 
194
195
  var sizes = {
195
196
  medium: "360px",
@@ -251,10 +252,10 @@ var HelperText = _styledComponents["default"].span(_templateObject3 || (_templat
251
252
  return props.theme.helperTextLineHeight;
252
253
  });
253
254
 
254
- var SliderInput = _styledComponents["default"].input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n min-width: 240px;\n height: ", ";\n display: inline-block;\n vertical-align: middle;\n -webkit-appearance: none;\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 5px;\n z-index: 1;\n cursor: ", ";\n &::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n margin: 0px -8px;\n }\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: none;\n height: ", ";\n width: ", ";\n border-radius: 25px;\n background: ", ";\n &:active {\n ", "\n }\n &:hover {\n ", "\n }\n }\n &::-moz-range-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n }\n &::-moz-range-thumb {\n -webkit-appearance: none;\n border: none;\n height: ", ";\n width: ", ";\n border-radius: 25px;\n background: ", ";\n &:active {\n background: ", ";\n transform: scale(1.16667);\n }\n &:hover {\n ", "\n }\n }\n &:focus {\n outline: none;\n &::-webkit-slider-thumb {\n outline: ", "\n auto 1px;\n outline-offset: 2px;\n }\n &::-moz-range-thumb {\n outline: ", "\n auto 1px;\n outline-offset: 2px;\n }\n }\n"])), function (props) {
255
+ var SliderInput = _styledComponents["default"].input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n width: 100%;\n min-width: 240px;\n height: ", ";\n display: inline-block;\n vertical-align: middle;\n -webkit-appearance: none;\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n background-size: ", ";\n border-radius: 5px;\n cursor: ", ";\n &::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n margin: 0px -8px;\n }\n\n &::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: none;\n height: ", ";\n width: ", ";\n border-radius: 25px;\n background: ", ";\n &:active {\n ", "\n }\n &:hover {\n ", "\n }\n }\n &::-moz-range-track {\n -webkit-appearance: none;\n box-shadow: none;\n border: none;\n background: transparent;\n }\n &::-moz-range-thumb {\n -webkit-appearance: none;\n border: none;\n height: ", ";\n width: ", ";\n border-radius: 25px;\n background: ", ";\n &:active {\n background: ", ";\n transform: scale(1.16667);\n }\n &:hover {\n ", "\n }\n }\n &:focus {\n outline: none;\n &::-webkit-slider-thumb {\n outline: ", "\n auto 1px;\n outline-offset: 2px;\n }\n &::-moz-range-thumb {\n outline: ", "\n auto 1px;\n outline-offset: 2px;\n }\n }\n"])), function (props) {
255
256
  return props.theme.trackLineThickness;
256
257
  }, function (props) {
257
- return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledTotalLineColorOnDark + "61" : props.theme.disabledTotalLineColor + "61" : props.backgroundType === "dark" ? props.theme.totalLineColorOnDark + "61" : props.theme.totalLineColor + "61";
258
+ return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledTotalLineColorOnDark + "61" : props.theme.disabledTotalLineColor + "61" : props.backgroundType === "dark" ? props.theme.totalLineColorOnDark + "61" : props.theme.totalLineColor;
258
259
  }, function (props) {
259
260
  return props.disabled ? props.backgroundType === "dark" ? "linear-gradient(".concat(props.theme.disabledTrackLineColorOnDark, ", ").concat(props.theme.disabledTrackLineColorOnDark, ")") : "linear-gradient(".concat(props.theme.disabledTrackLineColor, ", ").concat(props.theme.disabledTrackLineColor, ")") : props.backgroundType === "dark" ? "linear-gradient(".concat(props.theme.trackLineColorOnDark, ", ").concat(props.theme.trackLineColorOnDark, ")") : "linear-gradient(".concat(props.theme.trackLineColor, ", ").concat(props.theme.trackLineColor, ")");
260
261
  }, function (props) {
@@ -316,13 +317,13 @@ var MaxLabelContainer = (0, _styledComponents["default"])(LimitLabelContainer)(_
316
317
  return props.step === 1 ? props.theme.ceilLabelMarginLeft : "1.25rem";
317
318
  });
318
319
 
319
- var SliderInputContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n width: 100%;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: -2px;\n padding-top: 1px;\n"])));
320
+ var SliderInputContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n width: 100%;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: -2px;\n padding-top: 1px;\n z-index: 0;\n"])));
320
321
 
321
322
  var MarksContainer = _styledComponents["default"].div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n position: absolute;\n pointer-events: none;\n height: 100%;\n display: flex;\n align-items: center;\n"])), function (props) {
322
323
  return props.isFirefox ? getFireFoxStyles() : getChromeStyles();
323
324
  });
324
325
 
325
- var TickMark = _styledComponents["default"].span(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n background: ", ";\n height: ", ";\n width: ", ";\n border-radius: 18px;\n left: ", ";\n ", ";\n"])), function (props) {
326
+ var TickMark = _styledComponents["default"].span(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n background: ", ";\n height: ", ";\n width: ", ";\n border-radius: 18px;\n left: ", ";\n z-index: ", ";\n"])), function (props) {
326
327
  return props.disabled ? props.backgroundType === "dark" ? props.theme.disabledTickBackgroundColorOnDark : props.theme.disabledTickBackgroundColor : props.backgroundType === "dark" ? props.theme.tickBackgroundColorOnDark : props.theme.tickBackgroundColor;
327
328
  }, function (props) {
328
329
  return props.theme.tickHeight;
@@ -331,7 +332,7 @@ var TickMark = _styledComponents["default"].span(_templateObject11 || (_template
331
332
  }, function (props) {
332
333
  return "calc(".concat(props.stepPosition, " * 100%)");
333
334
  }, function (props) {
334
- return !props.disabled ? "z-index: ".concat(props.stepPosition <= props.stepValue ? "0" : "1") : "";
335
+ return "".concat(props.stepPosition <= props.stepValue ? "-1" : "0");
335
336
  });
336
337
 
337
338
  var StyledTextInput = _styledComponents["default"].div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: ", ";\n max-width: 70px;\n"])), function (props) {
package/slider/types.d.ts CHANGED
@@ -79,4 +79,8 @@ declare type Props = {
79
79
  */
80
80
  size?: "medium" | "large" | "fillParent";
81
81
  };
82
+ /**
83
+ * Reference to the component.
84
+ */
85
+ export declare type RefType = HTMLDivElement;
82
86
  export default Props;
@@ -178,7 +178,7 @@ var BackOverlay = _styledComponents["default"].div(_templateObject3 || (_templat
178
178
  return "".concat(props.theme.overlayOpacity);
179
179
  });
180
180
 
181
- var BackgroundSpinner = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n position: absolute;\n z-index: 1;\n"])));
181
+ var BackgroundSpinner = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n position: absolute;\n"])));
182
182
 
183
183
  var SVGBackground = _styledComponents["default"].svg(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n"])));
184
184
 
@@ -190,7 +190,7 @@ var CircleBackground = _styledComponents["default"].circle(_templateObject6 || (
190
190
  return props.mode !== "small" ? "8.5px" : "2px";
191
191
  });
192
192
 
193
- var Spinner = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n position: relative;\n z-index: 2;\n"])));
193
+ var Spinner = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n position: relative;\n"])));
194
194
 
195
195
  var SVGSpinner = _styledComponents["default"].svg(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n height: inherit;\n width: inherit;\n transform: rotate(-90deg);\n top: 0;\n left: 0;\n transform-origin: center;\n overflow: visible;\n animation: ", ";\n"])), function (props) {
196
196
  return !props.isDeterminated ? "1.4s linear infinite both spinner-svg" : "";
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- import { SwitchPropsType } from "./types";
3
- declare const DxcSwitch: ({ defaultChecked, checked, value, label, labelPosition, name, disabled, optional, onChange, margin, size, tabIndex, }: SwitchPropsType) => JSX.Element;
1
+ import React from "react";
2
+ import SwitchPropsType from "./types";
3
+ declare const DxcSwitch: React.ForwardRefExoticComponent<SwitchPropsType & React.RefAttributes<HTMLDivElement>>;
4
4
  export default DxcSwitch;
package/switch/Switch.js CHANGED
@@ -37,7 +37,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
37
37
 
38
38
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
39
 
40
- var DxcSwitch = function DxcSwitch(_ref) {
40
+ var DxcSwitch = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
41
41
  var defaultChecked = _ref.defaultChecked,
42
42
  checked = _ref.checked,
43
43
  value = _ref.value,
@@ -102,7 +102,8 @@ var DxcSwitch = function DxcSwitch(_ref) {
102
102
  size: size,
103
103
  onKeyDown: handleOnKeyDown,
104
104
  disabled: disabled,
105
- onClick: !disabled ? handlerSwitchChange : undefined
105
+ onClick: !disabled ? handlerSwitchChange : undefined,
106
+ ref: ref
106
107
  }, labelPosition === "before" && label && /*#__PURE__*/_react["default"].createElement(LabelContainer, {
107
108
  id: labelId,
108
109
  labelPosition: labelPosition,
@@ -133,7 +134,7 @@ var DxcSwitch = function DxcSwitch(_ref) {
133
134
  backgroundType: backgroundType,
134
135
  label: label
135
136
  }, optional && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, translatedLabels.formFields.optionalLabel), " ", label)));
136
- };
137
+ });
137
138
 
138
139
  var sizes = {
139
140
  small: "60px",
@@ -233,7 +234,7 @@ var SwitchBase = _styledComponents["default"].label(_templateObject3 || (_templa
233
234
 
234
235
  var ValueInput = _styledComponents["default"].input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: none;\n"])));
235
236
 
236
- var SwitchTrack = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n border-radius: 15px;\n width: ", ";\n height: ", ";\n position: relative;\n cursor: ", ";\n\n &:focus-visible {\n outline: none;\n ::before {\n outline: ", ";\n outline-offset: 6px;\n }\n }\n\n /* Thumb element */\n ::before {\n content: \"\";\n transform: initial;\n position: absolute;\n width: ", ";\n height: ", ";\n border-radius: 50%;\n z-index: 1;\n box-shadow: 0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%);\n bottom: -6px;\n left: -4px;\n transform: translateX(0px);\n background-color: ", ";\n }\n\n /* Unchecked */\n background-color: ", ";\n\n /* Checked */\n &[aria-checked=\"true\"] {\n background-color: ", ";\n ::before {\n transform: translateX(", ");\n background-color: ", ";\n }\n }\n"])), function (props) {
237
+ var SwitchTrack = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n border-radius: 15px;\n width: ", ";\n height: ", ";\n position: relative;\n cursor: ", ";\n\n &:focus-visible {\n outline: none;\n ::before {\n outline: ", ";\n outline-offset: 6px;\n }\n }\n\n /* Thumb element */\n ::before {\n content: \"\";\n transform: initial;\n position: absolute;\n width: ", ";\n height: ", ";\n border-radius: 50%;\n box-shadow: 0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%);\n bottom: -6px;\n left: -4px;\n transform: translateX(0px);\n background-color: ", ";\n }\n\n /* Unchecked */\n background-color: ", ";\n\n /* Checked */\n &[aria-checked=\"true\"] {\n background-color: ", ";\n ::before {\n transform: translateX(", ");\n background-color: ", ";\n }\n }\n"])), function (props) {
237
238
  return props.theme.trackWidth;
238
239
  }, function (props) {
239
240
  return props.theme.trackHeight;
package/switch/types.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare type Margin = {
5
5
  left?: Space;
6
6
  right?: Space;
7
7
  };
8
- export declare type SwitchPropsType = {
8
+ declare type Props = {
9
9
  /**
10
10
  * Initial state of the switch, only when it is uncontrolled.
11
11
  */
@@ -59,3 +59,8 @@ export declare type SwitchPropsType = {
59
59
  */
60
60
  tabIndex?: number;
61
61
  };
62
+ /**
63
+ * Reference to the component.
64
+ */
65
+ export declare type RefType = HTMLDivElement;
66
+ export default Props;
package/table/Table.js CHANGED
@@ -66,7 +66,7 @@ var DxcTableContainer = _styledComponents["default"].div(_templateObject || (_te
66
66
  return props.theme.scrollBarTrackColor;
67
67
  });
68
68
 
69
- var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th:first-child {\n border-top-left-radius: ", ";\n }\n & th:last-child {\n border-top-right-radius: ", ";\n }\n"])), function (props) {
69
+ var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n height: 60px;\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th:first-child {\n border-top-left-radius: ", ";\n }\n & th:last-child {\n border-top-right-radius: ", ";\n }\n & td:last-child {\n padding-right: 40px;\n }\n"])), function (props) {
70
70
  return "".concat(props.theme.rowSeparatorThickness, " ").concat(props.theme.rowSeparatorStyle, " ").concat(props.theme.rowSeparatorColor);
71
71
  }, function (props) {
72
72
  return props.theme.dataBackgroundColor;
@@ -10,7 +10,7 @@ var _Table = _interopRequireDefault(require("./Table"));
10
10
 
11
11
  describe("Table component tests", function () {
12
12
  test("Table renders with correct content", function () {
13
- var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Table["default"], null, /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("th", null, "header-1"), /*#__PURE__*/_react["default"].createElement("th", null, "header-2"), /*#__PURE__*/_react["default"].createElement("th", null, "header-3")), /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, "cell-1"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-2"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-3")), /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, "cell-4"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-5"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-6")))),
13
+ var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Table["default"], null, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("th", null, "header-1"), /*#__PURE__*/_react["default"].createElement("th", null, "header-2"), /*#__PURE__*/_react["default"].createElement("th", null, "header-3"))), /*#__PURE__*/_react["default"].createElement("tbody", null, /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, "cell-1"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-2"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-3")), /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, "cell-4"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-5"), /*#__PURE__*/_react["default"].createElement("td", null, "cell-6"))))),
14
14
  getByText = _render.getByText;
15
15
 
16
16
  expect(getByText("header-1")).toBeTruthy();
package/tabs/Tabs.js CHANGED
@@ -395,7 +395,7 @@ var DxcTabs = function DxcTabs(_ref) {
395
395
  }, arrowIcons.right))));
396
396
  };
397
397
 
398
- var Underline = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n left: 0;\n bottom: 0;\n width: 100%;\n position: absolute;\n height: ", ";\n background-color: ", ";\n z-index: 1;\n"])), function (props) {
398
+ var Underline = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n left: 0;\n bottom: 0;\n width: 100%;\n position: absolute;\n height: ", ";\n background-color: ", ";\n"])), function (props) {
399
399
  return props.theme.dividerThickness;
400
400
  }, function (props) {
401
401
  return props.theme.dividerColor;
@@ -441,7 +441,7 @@ var ScrollIndicator = _styledComponents["default"].button(_templateObject4 || (_
441
441
  return props.theme.unselectedFontColor;
442
442
  });
443
443
 
444
- var ActiveIndicator = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n left: ", ";\n width: ", ";\n z-index: 2;\n background-color: ", ";\n bottom: 0;\n height: ", ";\n position: absolute;\n &[aria-disabled=\"true\"] {\n background-color: ", ";\n display: none;\n }\n"])), function (props) {
444
+ var ActiveIndicator = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n left: ", ";\n width: ", ";\n background-color: ", ";\n bottom: 0;\n height: ", ";\n position: absolute;\n &[aria-disabled=\"true\"] {\n background-color: ", ";\n display: none;\n }\n"])), function (props) {
445
445
  return "".concat(props.tabLeft, "px");
446
446
  }, function (props) {
447
447
  return "".concat(props.tabWidth, "px");
@@ -453,7 +453,7 @@ var ActiveIndicator = _styledComponents["default"].span(_templateObject5 || (_te
453
453
  return props.theme.disabledFontColor;
454
454
  });
455
455
 
456
- var TabsContent = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n z-index: 1;\n flex: 1 1 auto;\n display: inline-block;\n position: relative;\n white-space: nowrap;\n overflow-x: scroll;\n ::-webkit-scrollbar {\n display: none;\n }\n"])));
456
+ var TabsContent = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex: 1 1 auto;\n display: inline-block;\n position: relative;\n white-space: nowrap;\n overflow-x: scroll;\n ::-webkit-scrollbar {\n display: none;\n }\n"])));
457
457
 
458
458
  var TabList = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n min-height: ", "px;\n"])), function (props) {
459
459
  return props.minHeightTabs;
@@ -152,7 +152,6 @@ export const Chromatic = () => (
152
152
  <ExampleContainer>
153
153
  <Title title="Xxlarge margin" theme="light" level={4} />
154
154
  <DxcTabs tabs={tabs} margin="xxlarge" />
155
- <hr />
156
155
  </ExampleContainer>
157
156
  </>
158
157
  );
@@ -509,7 +509,8 @@ var DxcTextInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, re
509
509
  backgroundType: backgroundType,
510
510
  tabIndex: tabIndex,
511
511
  title: translatedLabels.textInput.clearFieldActionTitle,
512
- "aria-label": translatedLabels.textInput.clearFieldActionTitle
512
+ "aria-label": translatedLabels.textInput.clearFieldActionTitle,
513
+ type: "button"
513
514
  }, _Icons["default"].clear), (numberInputContext === null || numberInputContext === void 0 ? void 0 : numberInputContext.typeNumber) === "number" && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Action, {
514
515
  ref: actionRef,
515
516
  disabled: disabled,
@@ -520,7 +521,8 @@ var DxcTextInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, re
520
521
  backgroundType: backgroundType,
521
522
  tabIndex: tabIndex,
522
523
  title: translatedLabels.numberInput.decrementValueTitle,
523
- "aria-label": translatedLabels.numberInput.decrementValueTitle
524
+ "aria-label": translatedLabels.numberInput.decrementValueTitle,
525
+ type: "button"
524
526
  }, _Icons["default"].decrement), /*#__PURE__*/_react["default"].createElement(Action, {
525
527
  ref: actionRef,
526
528
  disabled: disabled,
@@ -531,7 +533,8 @@ var DxcTextInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, re
531
533
  backgroundType: backgroundType,
532
534
  tabIndex: tabIndex,
533
535
  title: translatedLabels.numberInput.incrementValueTitle,
534
- "aria-label": translatedLabels.numberInput.incrementValueTitle
536
+ "aria-label": translatedLabels.numberInput.incrementValueTitle,
537
+ type: "button"
535
538
  }, _Icons["default"].increment)), action && /*#__PURE__*/_react["default"].createElement(Action, {
536
539
  ref: actionRef,
537
540
  disabled: disabled,
@@ -542,7 +545,8 @@ var DxcTextInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, re
542
545
  title: action.title,
543
546
  "aria-label": action.title,
544
547
  backgroundType: backgroundType,
545
- tabIndex: tabIndex
548
+ tabIndex: tabIndex,
549
+ type: "button"
546
550
  }, typeof action.icon === "string" ? /*#__PURE__*/_react["default"].createElement(ActionIcon, {
547
551
  src: action.icon
548
552
  }) : action.icon), suffix && /*#__PURE__*/_react["default"].createElement(Suffix, {
@@ -612,7 +616,7 @@ var InputContainer = _styledComponents["default"].div(_templateObject5 || (_temp
612
616
  }, function (props) {
613
617
  return props.disabled && "cursor: not-allowed;";
614
618
  }, function (props) {
615
- return !props.disabled && "\n &:hover {\n border-color: ".concat(props.error ? "transparent" : props.backgroundType === "dark" ? props.theme.hoverBorderColorOnDark : props.theme.hoverBorderColor, ";\n ").concat(props.error && "box-shadow: 0 0 0 2px ".concat(props.backgroundType === "dark" ? props.theme.hoverErrorBorderColorOnDark : props.theme.hoverErrorBorderColor, ";"), "\n }\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px ").concat(props.backgroundType === "dark" ? props.theme.focusBorderColorOnDark : props.theme.focusBorderColor, ";\n }\n ");
619
+ return !props.disabled && "\n &:hover {\n border-color: ".concat(props.error ? "transparent" : props.backgroundType === "dark" ? props.theme.hoverBorderColorOnDark : props.theme.hoverBorderColor, ";\n ").concat(props.error ? "box-shadow: 0 0 0 2px ".concat(props.backgroundType === "dark" ? props.theme.hoverErrorBorderColorOnDark : props.theme.hoverErrorBorderColor, ";") : "", "\n }\n &:focus-within {\n border-color: transparent;\n box-shadow: 0 0 0 2px ").concat(props.backgroundType === "dark" ? props.theme.focusBorderColorOnDark : props.theme.focusBorderColor, ";\n }\n ");
616
620
  });
617
621
 
618
622
  var Input = _styledComponents["default"].input(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n height: calc(2.5rem - 2px);\n width: 100%;\n background: none;\n border: none;\n outline: none;\n padding: 0 0.5rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n color: ", ";\n\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: 1.5em;\n ", "\n\n ::placeholder {\n color: ", ";\n }\n"])), function (props) {