@dxc-technology/halstack-react 0.0.0-7d46b9f → 0.0.0-7da4003

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 +6 -6
  2. package/dist/V3Textarea/V3Textarea.js +264 -0
  3. package/dist/alert/Alert.js +4 -4
  4. package/dist/button/Button.js +1 -1
  5. package/dist/common/variables.js +199 -74
  6. package/dist/date/Date.js +6 -6
  7. package/dist/{new-date/NewDate.js → date-input/DateInput.js} +36 -36
  8. package/dist/{new-date → date-input}/index.d.ts +3 -3
  9. package/dist/file-input/FileInput.js +2 -2
  10. package/dist/file-input/index.d.ts +1 -1
  11. package/dist/footer/Footer.js +44 -18
  12. package/dist/footer/Icons.js +77 -0
  13. package/dist/header/Header.js +80 -49
  14. package/dist/header/Icons.js +59 -0
  15. package/dist/input-text/Icons.js +22 -0
  16. package/dist/input-text/InputText.js +7 -9
  17. package/dist/layout/ApplicationLayout.js +4 -8
  18. package/dist/layout/Icons.js +55 -0
  19. package/dist/main.d.ts +6 -5
  20. package/dist/main.js +29 -21
  21. package/dist/new-select/NewSelect.js +836 -0
  22. package/dist/new-select/index.d.ts +53 -0
  23. package/dist/{number/Number.js → number-input/NumberInput.js} +8 -8
  24. package/dist/{number/NumberContext.js → number-input/NumberInputContext.js} +2 -2
  25. package/dist/{number → number-input}/index.d.ts +3 -3
  26. package/dist/paginator/Icons.js +66 -0
  27. package/dist/paginator/Paginator.js +5 -11
  28. package/dist/{password/Password.js → password-input/PasswordInput.js} +8 -10
  29. package/dist/{password → password-input}/index.d.ts +5 -5
  30. package/dist/slider/Slider.js +104 -19
  31. package/dist/{new-input-text/NewInputText.js → text-input/TextInput.js} +36 -32
  32. package/dist/{new-input-text → text-input}/index.d.ts +1 -1
  33. package/dist/textarea/Textarea.js +227 -122
  34. package/dist/{new-textarea → textarea}/index.d.ts +1 -1
  35. package/dist/toggle-group/ToggleGroup.js +132 -28
  36. package/dist/upload/Upload.js +3 -3
  37. package/dist/upload/buttons-upload/ButtonsUpload.js +7 -11
  38. package/dist/upload/buttons-upload/Icons.js +40 -0
  39. package/dist/upload/dragAndDropArea/DragAndDropArea.js +14 -14
  40. package/dist/upload/dragAndDropArea/Icons.js +39 -0
  41. package/dist/upload/file-upload/FileToUpload.js +26 -21
  42. package/dist/upload/file-upload/Icons.js +66 -0
  43. package/dist/upload/readme.md +2 -2
  44. package/dist/upload/transaction/Icons.js +160 -0
  45. package/dist/upload/transaction/Transaction.js +11 -38
  46. package/dist/wizard/Icons.js +65 -0
  47. package/dist/wizard/Wizard.js +3 -9
  48. package/package.json +1 -1
  49. package/test/Date.test.js +48 -44
  50. package/test/{NewDate.test.js → DateInput.test.js} +33 -23
  51. package/test/Footer.test.js +2 -7
  52. package/test/Header.test.js +5 -10
  53. package/test/InputText.test.js +24 -16
  54. package/test/{Number.test.js → NumberInput.test.js} +47 -45
  55. package/test/PasswordInput.test.js +83 -0
  56. package/test/Slider.test.js +9 -17
  57. package/test/{NewInputText.test.js → TextInput.test.js} +46 -48
  58. package/test/{NewTextarea.test.js → Textarea.test.js} +16 -18
  59. package/test/ToggleGroup.test.js +5 -1
  60. package/test/Upload.test.js +5 -5
  61. package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
  62. package/dist/footer/Footer.stories.js +0 -94
  63. package/dist/footer/dxc_logo.svg +0 -15
  64. package/dist/footer/readme.md +0 -41
  65. package/dist/header/Header.stories.js +0 -176
  66. package/dist/header/close_icon.svg +0 -1
  67. package/dist/header/dxc_logo_black.svg +0 -8
  68. package/dist/header/hamb_menu_black.svg +0 -1
  69. package/dist/header/hamb_menu_white.svg +0 -1
  70. package/dist/header/readme.md +0 -33
  71. package/dist/input-text/InputText.stories.js +0 -209
  72. package/dist/input-text/error.svg +0 -1
  73. package/dist/input-text/readme.md +0 -91
  74. package/dist/layout/facebook.svg +0 -45
  75. package/dist/layout/linkedin.svg +0 -50
  76. package/dist/layout/twitter.svg +0 -53
  77. package/dist/new-textarea/NewTextarea.js +0 -365
  78. package/dist/paginator/images/next.svg +0 -3
  79. package/dist/paginator/images/nextPage.svg +0 -3
  80. package/dist/paginator/images/previous.svg +0 -3
  81. package/dist/paginator/images/previousPage.svg +0 -3
  82. package/dist/paginator/readme.md +0 -50
  83. package/dist/password/styles.css +0 -3
  84. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  85. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  86. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  87. package/dist/slider/Slider.stories.js +0 -241
  88. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  89. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  90. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  91. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  92. package/dist/upload/file-upload/audio-icon.svg +0 -4
  93. package/dist/upload/file-upload/close.svg +0 -4
  94. package/dist/upload/file-upload/file-icon.svg +0 -4
  95. package/dist/upload/file-upload/video-icon.svg +0 -4
  96. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  97. package/dist/upload/transaction/audio-icon.svg +0 -4
  98. package/dist/upload/transaction/error-icon.svg +0 -4
  99. package/dist/upload/transaction/file-icon-err.svg +0 -4
  100. package/dist/upload/transaction/file-icon.svg +0 -4
  101. package/dist/upload/transaction/image-icon-err.svg +0 -4
  102. package/dist/upload/transaction/image-icon.svg +0 -4
  103. package/dist/upload/transaction/success-icon.svg +0 -4
  104. package/dist/upload/transaction/video-icon-err.svg +0 -4
  105. package/dist/upload/transaction/video-icon.svg +0 -4
  106. package/dist/wizard/invalid_icon.svg +0 -5
  107. package/dist/wizard/valid_icon.svg +0 -5
  108. package/dist/wizard/validation-wrong.svg +0 -6
  109. package/test/Password.test.js +0 -83
@@ -0,0 +1,53 @@
1
+ type SVG = string | (HTMLElement & SVGElement);
2
+ type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
+ type Margin = {
4
+ top?: Space;
5
+ bottom?: Space;
6
+ left?: Space;
7
+ right?: Space;
8
+ };
9
+
10
+ type OptionGroup = {
11
+ label: string;
12
+ options: Option[];
13
+ };
14
+ type Option = {
15
+ icon?: string | SVG;
16
+ label: string;
17
+ value: string;
18
+ };
19
+
20
+ type Props = {
21
+ label?: string;
22
+ name?: string;
23
+ value?: string | string[];
24
+ options?: Option[] | OptionGroup[];
25
+ helperText?: string;
26
+ placeholder?: string;
27
+ disabled?: boolean;
28
+ optional?: boolean;
29
+ searchable?: boolean;
30
+ multiple?: boolean;
31
+ onChange?: (value: string | string[]) => void;
32
+ onBlur?: (val: { value: string | string[]; error: string }) => void;
33
+ error?: string;
34
+ /**
35
+ * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
36
+ * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
37
+ */
38
+ margin?: Space | Margin;
39
+ /**
40
+ * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
41
+ */
42
+ size?: "small" | "medium" | "large" | "fillParent";
43
+ /**
44
+ * Value of the tabindex attribute.
45
+ */
46
+ tabIndex?: number;
47
+ /**
48
+ * Reference to the component.
49
+ */
50
+ ref?: React.RefObject<HTMLDivElement>;
51
+ };
52
+
53
+ export default function DxcNewSelect(props: Props): JSX.Element;
@@ -17,9 +17,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
18
  var _styledComponents = _interopRequireDefault(require("styled-components"));
19
19
 
20
- var _NewInputText = _interopRequireDefault(require("../new-input-text/NewInputText"));
20
+ var _TextInput = _interopRequireDefault(require("../text-input/TextInput"));
21
21
 
22
- var _NumberContext = _interopRequireDefault(require("./NumberContext"));
22
+ var _NumberInputContext = _interopRequireDefault(require("./NumberInputContext"));
23
23
 
24
24
  var _variables = require("../common/variables.js");
25
25
 
@@ -33,7 +33,7 @@ function _templateObject() {
33
33
  return data;
34
34
  }
35
35
 
36
- var DxcNumber = _react["default"].forwardRef(function (_ref, ref) {
36
+ var DxcNumberInput = _react["default"].forwardRef(function (_ref, ref) {
37
37
  var _ref$label = _ref.label,
38
38
  label = _ref$label === void 0 ? "" : _ref$label,
39
39
  _ref$name = _ref.name,
@@ -65,14 +65,14 @@ var DxcNumber = _react["default"].forwardRef(function (_ref, ref) {
65
65
  size = _ref$size === void 0 ? "medium" : _ref$size,
66
66
  _ref$tabIndex = _ref.tabIndex,
67
67
  tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
68
- return _react["default"].createElement(_NumberContext["default"].Provider, {
68
+ return _react["default"].createElement(_NumberInputContext["default"].Provider, {
69
69
  value: {
70
70
  typeNumber: "number",
71
71
  minNumber: min,
72
72
  maxNumber: max,
73
73
  stepNumber: step
74
74
  }
75
- }, _react["default"].createElement(NumberContainer, null, _react["default"].createElement(_NewInputText["default"], {
75
+ }, _react["default"].createElement(NumberInputContainer, null, _react["default"].createElement(_TextInput["default"], {
76
76
  label: label,
77
77
  name: name,
78
78
  value: value,
@@ -100,9 +100,9 @@ var sizes = {
100
100
  fillParent: "100%"
101
101
  };
102
102
 
103
- var NumberContainer = _styledComponents["default"].div(_templateObject());
103
+ var NumberInputContainer = _styledComponents["default"].div(_templateObject());
104
104
 
105
- DxcNumber.propTypes = {
105
+ DxcNumberInput.propTypes = {
106
106
  label: _propTypes["default"].string,
107
107
  name: _propTypes["default"].string,
108
108
  value: _propTypes["default"].string,
@@ -132,5 +132,5 @@ DxcNumber.propTypes = {
132
132
  size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
133
133
  tabIndex: _propTypes["default"].number
134
134
  };
135
- var _default = DxcNumber;
135
+ var _default = DxcNumberInput;
136
136
  exports["default"] = _default;
@@ -10,7 +10,7 @@ exports["default"] = void 0;
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  /* eslint-disable prefer-template */
13
- var NumberContext = _react["default"].createContext();
13
+ var NumberInputContext = _react["default"].createContext();
14
14
 
15
- var _default = NumberContext;
15
+ var _default = NumberInputContext;
16
16
  exports["default"] = _default;
@@ -47,7 +47,7 @@ type Props = {
47
47
  */
48
48
  suffix?: string;
49
49
  /**
50
- * Minimum value allowed by the number. If the typed value by the user is
50
+ * Minimum value allowed by the number input. If the typed value by the user is
51
51
  * lower than min, the onBlur and onChange functions will be called with
52
52
  * the current value and an internal error informing that the current
53
53
  * value is not correct. If a valid state is reached, the error parameter
@@ -55,7 +55,7 @@ type Props = {
55
55
  */
56
56
  min?: number;
57
57
  /**
58
- * Maximum value allowed by the number. If the typed value by the user
58
+ * Maximum value allowed by the number input. If the typed value by the user
59
59
  * surpasses max, the onBlur and onChange functions will be called with
60
60
  * the current value and an internal error informing that the current
61
61
  * value is not correct. If a valid state is reached, the error parameter
@@ -110,4 +110,4 @@ type Props = {
110
110
  ref?: React.RefObject<HTMLDivElement>;
111
111
  };
112
112
 
113
- export default function DxcNumber(props: Props): JSX.Element;
113
+ export default function DxcNumberInput(props: Props): JSX.Element;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.lastIcon = exports.nextIcon = exports.previousIcon = exports.firstIcon = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var firstIcon = _react["default"].createElement("svg", {
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "12.41",
15
+ height: "12",
16
+ viewBox: "0 0 12.41 12"
17
+ }, _react["default"].createElement("path", {
18
+ id: "Path_2463",
19
+ "data-name": "Path 2463",
20
+ d: "M18.41,16.59,13.82,12l4.59-4.59L17,6l-6,6,6,6ZM6,6H8V18H6Z",
21
+ transform: "translate(-6 -6)"
22
+ }));
23
+
24
+ exports.firstIcon = firstIcon;
25
+
26
+ var previousIcon = _react["default"].createElement("svg", {
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ width: "7.41",
29
+ height: "12",
30
+ viewBox: "0 0 7.41 12"
31
+ }, _react["default"].createElement("path", {
32
+ id: "Path_2459",
33
+ "data-name": "Path 2459",
34
+ d: "M15.41,7.41,14,6,8,12l6,6,1.41-1.41L10.83,12Z",
35
+ transform: "translate(-8 -6)"
36
+ }));
37
+
38
+ exports.previousIcon = previousIcon;
39
+
40
+ var nextIcon = _react["default"].createElement("svg", {
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ width: "7.41",
43
+ height: "12",
44
+ viewBox: "0 0 7.41 12"
45
+ }, _react["default"].createElement("path", {
46
+ id: "Path_2461",
47
+ "data-name": "Path 2461",
48
+ d: "M10,6,8.59,7.41,13.17,12,8.59,16.59,10,18l6-6Z",
49
+ transform: "translate(-8.59 -6)"
50
+ }));
51
+
52
+ exports.nextIcon = nextIcon;
53
+
54
+ var lastIcon = _react["default"].createElement("svg", {
55
+ xmlns: "http://www.w3.org/2000/svg",
56
+ width: "12.41",
57
+ height: "12",
58
+ viewBox: "0 0 12.41 12"
59
+ }, _react["default"].createElement("path", {
60
+ id: "Path_2465",
61
+ "data-name": "Path 2465",
62
+ d: "M5.59,7.41,10.18,12,5.59,16.59,7,18l6-6L7,6ZM16,6h2V18H16Z",
63
+ transform: "translate(-5.59 -6)"
64
+ }));
65
+
66
+ exports.lastIcon = lastIcon;
@@ -25,13 +25,7 @@ var _Button = _interopRequireDefault(require("../button/Button"));
25
25
 
26
26
  var _Select = _interopRequireDefault(require("../select/Select"));
27
27
 
28
- var _previousPage = _interopRequireDefault(require("./images/previousPage.svg"));
29
-
30
- var _previous = _interopRequireDefault(require("./images/previous.svg"));
31
-
32
- var _next = _interopRequireDefault(require("./images/next.svg"));
33
-
34
- var _nextPage = _interopRequireDefault(require("./images/nextPage.svg"));
28
+ var _Icons = require("./Icons");
35
29
 
36
30
  var _BackgroundColorContext = require("../BackgroundColorContext.js");
37
31
 
@@ -158,7 +152,7 @@ var DxcPaginator = function DxcPaginator(_ref) {
158
152
  left: "xxsmall",
159
153
  right: "xxsmall"
160
154
  },
161
- iconSrc: _previousPage["default"],
155
+ icon: _Icons.firstIcon,
162
156
  tabIndex: tabIndex,
163
157
  onClick: function onClick() {
164
158
  onPageChange(1);
@@ -171,7 +165,7 @@ var DxcPaginator = function DxcPaginator(_ref) {
171
165
  left: "xxsmall",
172
166
  right: "xxsmall"
173
167
  },
174
- iconSrc: _previous["default"],
168
+ icon: _Icons.previousIcon,
175
169
  tabIndex: tabIndex,
176
170
  onClick: function onClick() {
177
171
  onPageChange(currentPage - 1);
@@ -195,7 +189,7 @@ var DxcPaginator = function DxcPaginator(_ref) {
195
189
  left: "xxsmall",
196
190
  right: "xxsmall"
197
191
  },
198
- iconSrc: _next["default"],
192
+ icon: _Icons.nextIcon,
199
193
  tabIndex: tabIndex,
200
194
  onClick: function onClick() {
201
195
  onPageChange(currentPage + 1);
@@ -208,7 +202,7 @@ var DxcPaginator = function DxcPaginator(_ref) {
208
202
  left: "xxsmall",
209
203
  right: "xxsmall"
210
204
  },
211
- iconSrc: _nextPage["default"],
205
+ icon: _Icons.lastIcon,
212
206
  tabIndex: tabIndex,
213
207
  onClick: function onClick() {
214
208
  onPageChange(totalPages);
@@ -21,14 +21,12 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
21
21
 
22
22
  var _propTypes = _interopRequireDefault(require("prop-types"));
23
23
 
24
- var _NewInputText = _interopRequireDefault(require("../new-input-text/NewInputText"));
24
+ var _TextInput = _interopRequireDefault(require("../text-input/TextInput"));
25
25
 
26
26
  var _variables = require("../common/variables.js");
27
27
 
28
- require("./styles.css");
29
-
30
28
  function _templateObject() {
31
- var data = (0, _taggedTemplateLiteral2["default"])([""]);
29
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n & ::-ms-reveal {\n display: none;\n }\n"]);
32
30
 
33
31
  _templateObject = function _templateObject() {
34
32
  return data;
@@ -37,7 +35,7 @@ function _templateObject() {
37
35
  return data;
38
36
  }
39
37
 
40
- var DxcPassword = _react["default"].forwardRef(function (_ref, ref) {
38
+ var DxcPasswordInput = _react["default"].forwardRef(function (_ref, ref) {
41
39
  var _ref$label = _ref.label,
42
40
  label = _ref$label === void 0 ? "" : _ref$label,
43
41
  _ref$name = _ref.name,
@@ -141,9 +139,9 @@ var DxcPassword = _react["default"].forwardRef(function (_ref, ref) {
141
139
  d: "M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"
142
140
  }))
143
141
  };
144
- return _react["default"].createElement(DXCPassword, {
142
+ return _react["default"].createElement(PasswordInput, {
145
143
  ref: ref
146
- }, _react["default"].createElement(_NewInputText["default"], {
144
+ }, _react["default"].createElement(_TextInput["default"], {
147
145
  ref: inputRef,
148
146
  label: label,
149
147
  name: name,
@@ -170,9 +168,9 @@ var sizes = {
170
168
  fillParent: "100%"
171
169
  };
172
170
 
173
- var DXCPassword = _styledComponents["default"].div(_templateObject());
171
+ var PasswordInput = _styledComponents["default"].div(_templateObject());
174
172
 
175
- DxcPassword.propTypes = {
173
+ DxcPasswordInput.propTypes = {
176
174
  label: _propTypes["default"].string,
177
175
  name: _propTypes["default"].string,
178
176
  value: _propTypes["default"].string,
@@ -196,5 +194,5 @@ DxcPassword.propTypes = {
196
194
  }),
197
195
  tabIndex: _propTypes["default"].number
198
196
  };
199
- var _default = DxcPassword;
197
+ var _default = DxcPasswordInput;
200
198
  exports["default"] = _default;
@@ -25,7 +25,7 @@ type Props = {
25
25
  */
26
26
  helperText?: string;
27
27
  /**
28
- * If true, the password will have an action to clear the entered value.
28
+ * If true, the password input will have an action to clear the entered value.
29
29
  */
30
30
  clearable?: boolean;
31
31
  /**
@@ -43,13 +43,13 @@ type Props = {
43
43
  onBlur?: (val: { value: string; error: string }) => void;
44
44
  /**
45
45
  * If it is defined, the component will change its appearance, showing
46
- * the error below the password component. If it is not defined, the
46
+ * the error below the password input component. If it is not defined, the
47
47
  * error messages will be managed internally, but never displayed on its own.
48
48
  */
49
49
  error?: string;
50
50
  /**
51
51
  * Regular expression that defines the valid format allowed by the
52
- * password. This will be checked both when the input element loses the
52
+ * password input. This will be checked both when the input element loses the
53
53
  * focus and while typing within it. If the string entered does not match
54
54
  * the pattern, the onBlur and onChange functions will be called with the
55
55
  * current value and an internal error informing that this value does not
@@ -58,7 +58,7 @@ type Props = {
58
58
  */
59
59
  pattern?: string;
60
60
  /**
61
- * Specifies the minimun and maximum length allowed by the password.
61
+ * Specifies the minimun and maximum length allowed by the password input.
62
62
  * This will be checked both when the input element loses the
63
63
  * focus and while typing within it. If the string entered does not
64
64
  * comply the length, the onBlur and onChange functions will be called
@@ -91,4 +91,4 @@ type Props = {
91
91
  ref?: React.RefObject<HTMLDivElement>;
92
92
  };
93
93
 
94
- export default function DxcPassword(props: Props): JSX.Element;
94
+ export default function DxcPasswordInput(props: Props): JSX.Element;
@@ -25,7 +25,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
25
25
 
26
26
  var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
 
28
- var _InputText = _interopRequireDefault(require("../input-text/InputText"));
28
+ var _TextInput = _interopRequireDefault(require("../text-input/TextInput"));
29
29
 
30
30
  var _variables = require("../common/variables.js");
31
31
 
@@ -35,9 +35,39 @@ var _useTheme = _interopRequireDefault(require("../useTheme.js"));
35
35
 
36
36
  var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
37
37
 
38
- function _templateObject4() {
38
+ function _templateObject7() {
39
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: ", ";\n label + .MuiInput-formControl {\n margin-top: 2px;\n }\n max-width: 70px;\n"]);
40
+
41
+ _templateObject7 = function _templateObject7() {
42
+ return data;
43
+ };
44
+
45
+ return data;
46
+ }
47
+
48
+ function _templateObject6() {
39
49
  var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n margin-left: ", ";\n"]);
40
50
 
51
+ _templateObject6 = function _templateObject6() {
52
+ return data;
53
+ };
54
+
55
+ return data;
56
+ }
57
+
58
+ function _templateObject5() {
59
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n margin-right: ", ";\n"]);
60
+
61
+ _templateObject5 = function _templateObject5() {
62
+ return data;
63
+ };
64
+
65
+ return data;
66
+ }
67
+
68
+ function _templateObject4() {
69
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 48px;\n align-items: center;\n\n .MultiSlider-root {\n display: flex;\n align-items: center;\n }\n .MuiSlider-container {\n padding: 30px 24px;\n }\n .MuiSlider-root.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n }\n .Mui-disabled {\n & .MuiSlider-thumb {\n height: ", ";\n width: ", ";\n background-color: ", ";\n top: ", ";\n }\n & .MuiSlider-track {\n background-color: ", ";\n }\n & .MuiSlider-rail {\n background-color: ", ";\n }\n & > .MuiSlider-mark.MuiSlider-markActive {\n background-color: ", " !important;\n }\n & > .MuiSlider-mark {\n background-color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 18px;\n top: ", ";\n }\n }\n .MuiSlider-thumb {\n height: ", ";\n width: ", ";\n background-color: ", ";\n top: ", ";\n border-radius: 9999px;\n\n :hover,\n &.Mui-focusVisible {\n box-shadow: none;\n }\n &.MuiSlider-active {\n box-shadow: none;\n }\n :focus {\n outline: ", "\n auto 1px;\n outline-offset: 2px;\n background-color: ", ";\n }\n :hover {\n background-color: ", ";\n transform: scale(", ");\n transform-origin: center;\n height: ", ";\n width: ", ";\n top: ", ";\n }\n :active {\n background-color: ", ";\n transform: scale(", ");\n transform-origin: center;\n }\n }\n .MuiSlider-track {\n background-color: ", ";\n height: ", ";\n top: ", ";\n border-radius: 9999px;\n }\n .MuiSlider-track.MuiSlider-trackAfter {\n background-color: ", ";\n }\n .MuiSlider-rail {\n background-color: ", ";\n height: ", ";\n top: ", ";\n }\n .MuiSlider-mark.MuiSlider-markActive {\n background-color: ", ";\n }\n .MuiSlider-mark {\n background-color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 18px;\n top: ", ";\n }\n"]);
70
+
41
71
  _templateObject4 = function _templateObject4() {
42
72
  return data;
43
73
  };
@@ -46,7 +76,7 @@ function _templateObject4() {
46
76
  }
47
77
 
48
78
  function _templateObject3() {
49
- var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n letter-spacing: ", ";\n margin-right: 16px;\n"]);
79
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
50
80
 
51
81
  _templateObject3 = function _templateObject3() {
52
82
  return data;
@@ -56,7 +86,7 @@ function _templateObject3() {
56
86
  }
57
87
 
58
88
  function _templateObject2() {
59
- var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: ", ";\n\n .MultiSlider-root {\n display: flex;\n align-items: center;\n }\n .MuiSlider-container {\n padding: 30px 24px;\n }\n .MuiSlider-root.Mui-disabled {\n color: ", ";\n cursor: not-allowed;\n }\n .Mui-disabled {\n & .MuiSlider-thumb {\n height: ", ";\n width: ", ";\n background-color: ", ";\n top: ", ";\n }\n & .MuiSlider-track {\n background-color: ", ";\n }\n & .MuiSlider-rail {\n background-color: ", ";\n }\n & > .MuiSlider-mark.MuiSlider-markActive {\n background-color: ", " !important;\n }\n & > .MuiSlider-mark {\n background-color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 18px;\n top: ", ";\n }\n }\n .MuiSlider-thumb {\n height: ", ";\n width: ", ";\n background-color: ", ";\n top: ", ";\n border-radius: 9999px;\n\n :hover,\n &.Mui-focusVisible {\n box-shadow: none;\n }\n &.MuiSlider-active {\n box-shadow: none;\n }\n :focus {\n outline: ", "\n auto 1px;\n outline-offset: 2px;\n background-color: ", ";\n }\n :hover {\n background-color: ", ";\n transform: scale(", ");\n transform-origin: center;\n }\n :active {\n background-color: ", ";\n transform: scale(", ");\n transform-origin: center;\n }\n }\n .MuiSlider-track {\n background-color: ", ";\n height: ", ";\n top: ", ";\n border-radius: 9999px;\n }\n .MuiSlider-track.MuiSlider-trackAfter {\n background-color: ", ";\n }\n .MuiSlider-rail {\n background-color: ", ";\n height: ", ";\n top: ", ";\n }\n .MuiSlider-mark.MuiSlider-markActive {\n background-color: ", ";\n }\n .MuiSlider-mark {\n background-color: ", ";\n height: ", ";\n width: ", ";\n border-radius: 18px;\n top: ", ";\n }\n"]);
89
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n line-height: ", ";\n"]);
60
90
 
61
91
  _templateObject2 = function _templateObject2() {
62
92
  return data;
@@ -66,7 +96,7 @@ function _templateObject2() {
66
96
  }
67
97
 
68
98
  function _templateObject() {
69
- var data = (0, _taggedTemplateLiteral2["default"])(["\n margin-left: 32px;\n\n label + .MuiInput-formControl {\n margin-top: 2px;\n }\n"]);
99
+ var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n width: ", ";\n"]);
70
100
 
71
101
  _templateObject = function _templateObject() {
72
102
  return data;
@@ -76,7 +106,9 @@ function _templateObject() {
76
106
  }
77
107
 
78
108
  var DxcSlider = function DxcSlider(_ref) {
79
- var _ref$minValue = _ref.minValue,
109
+ var label = _ref.label,
110
+ helperText = _ref.helperText,
111
+ _ref$minValue = _ref.minValue,
80
112
  minValue = _ref$minValue === void 0 ? 0 : _ref$minValue,
81
113
  _ref$maxValue = _ref.maxValue,
82
114
  maxValue = _ref$maxValue === void 0 ? 100 : _ref$maxValue,
@@ -128,20 +160,31 @@ var DxcSlider = function DxcSlider(_ref) {
128
160
  };
129
161
 
130
162
  var handlerInputChange = function handlerInputChange(event) {
163
+ var intValue = parseInt(event.value, 10);
164
+
131
165
  if (value == null) {
132
- setInnerValue(event > maxValue ? maxValue : event);
166
+ if (!Number.isNaN(intValue)) {
167
+ setInnerValue(intValue > maxValue ? maxValue : intValue);
168
+ } else {
169
+ setInnerValue("");
170
+ }
133
171
  }
134
172
 
135
173
  if (typeof onChange === "function") {
136
- onChange(event > maxValue ? maxValue : event);
174
+ if (!Number.isNaN(intValue)) {
175
+ onChange(intValue > maxValue ? maxValue : intValue);
176
+ } else {
177
+ onChange("");
178
+ }
137
179
  }
138
180
  };
139
181
 
140
182
  return _react["default"].createElement(_styledComponents.ThemeProvider, {
141
183
  theme: colorsTheme.slider
142
- }, _react["default"].createElement(SliderContainer, {
184
+ }, _react["default"].createElement(Container, {
143
185
  margin: margin,
144
- size: size,
186
+ size: size
187
+ }, _react["default"].createElement(Label, null, label), _react["default"].createElement(HelperText, null, helperText), _react["default"].createElement(SliderContainer, {
145
188
  backgroundType: backgroundType
146
189
  }, showLimitsValues && _react["default"].createElement(MinLabelContainer, {
147
190
  backgroundType: backgroundType,
@@ -161,13 +204,13 @@ var DxcSlider = function DxcSlider(_ref) {
161
204
  backgroundType: backgroundType,
162
205
  disabled: disabled,
163
206
  step: step
164
- }, maxLabel), showInput && _react["default"].createElement(StyledTextInput, null, _react["default"].createElement(_InputText["default"], {
207
+ }, maxLabel), showInput && _react["default"].createElement(StyledTextInput, null, _react["default"].createElement(_TextInput["default"], {
165
208
  name: name,
166
209
  value: value != null && value >= 0 && value || innerValue,
167
210
  disabled: disabled,
168
211
  onChange: handlerInputChange,
169
- size: "small"
170
- }))));
212
+ size: "fillParent"
213
+ })))));
171
214
  };
172
215
 
173
216
  var sizes = {
@@ -180,9 +223,7 @@ var calculateWidth = function calculateWidth(margin, size) {
180
223
  return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
181
224
  };
182
225
 
183
- var StyledTextInput = _styledComponents["default"].div(_templateObject());
184
-
185
- var SliderContainer = _styledComponents["default"].div(_templateObject2(), function (props) {
226
+ var Container = _styledComponents["default"].div(_templateObject(), function (props) {
186
227
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
187
228
  }, function (props) {
188
229
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
@@ -194,7 +235,37 @@ var SliderContainer = _styledComponents["default"].div(_templateObject2(), funct
194
235
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
195
236
  }, function (props) {
196
237
  return calculateWidth(props.margin, props.size);
238
+ });
239
+
240
+ var Label = _styledComponents["default"].label(_templateObject2(), function (props) {
241
+ return props.theme.labelFontColor;
242
+ }, function (props) {
243
+ return props.theme.labelFontFamily;
244
+ }, function (props) {
245
+ return props.theme.labelFontSize;
246
+ }, function (props) {
247
+ return props.theme.labelFontStyle;
248
+ }, function (props) {
249
+ return props.theme.labelFontWeight;
250
+ }, function (props) {
251
+ return props.theme.labelLineHeight;
252
+ });
253
+
254
+ var HelperText = _styledComponents["default"].span(_templateObject3(), function (props) {
255
+ return props.theme.helperTextFontColor;
197
256
  }, function (props) {
257
+ return props.theme.helperTextFontFamily;
258
+ }, function (props) {
259
+ return props.theme.helperTextFontSize;
260
+ }, function (props) {
261
+ return props.theme.helperTextFontstyle;
262
+ }, function (props) {
263
+ return props.theme.helperTextFontWeight;
264
+ }, function (props) {
265
+ return props.theme.helperTextLineHeight;
266
+ });
267
+
268
+ var SliderContainer = _styledComponents["default"].div(_templateObject4(), function (props) {
198
269
  return props.backgroundType === "dark" ? props.theme.disabledThumbBackgroundColorOnDark : props.theme.disabledThumbBackgroundColor;
199
270
  }, function (props) {
200
271
  return props.theme.thumbHeight;
@@ -234,6 +305,12 @@ var SliderContainer = _styledComponents["default"].div(_templateObject2(), funct
234
305
  return props.backgroundType === "dark" ? props.theme.hoverThumbBackgroundColorOnDark : props.theme.hoverThumbBackgroundColor;
235
306
  }, function (props) {
236
307
  return props.theme.hoverThumbScale;
308
+ }, function (props) {
309
+ return props.theme.hoverThumbHeight;
310
+ }, function (props) {
311
+ return props.theme.hoverThumbWidth;
312
+ }, function (props) {
313
+ return props.theme.hoverThumbVerticalPosition;
237
314
  }, function (props) {
238
315
  return props.backgroundType === "dark" ? props.theme.activeThumbBackgroundColorOnDark : props.theme.activeThumbBackgroundColor;
239
316
  }, function (props) {
@@ -264,7 +341,7 @@ var SliderContainer = _styledComponents["default"].div(_templateObject2(), funct
264
341
  return props.theme.tickVerticalPosition;
265
342
  });
266
343
 
267
- var MinLabelContainer = _styledComponents["default"].span(_templateObject3(), function (props) {
344
+ var MinLabelContainer = _styledComponents["default"].span(_templateObject5(), function (props) {
268
345
  return props.theme.fontFamily;
269
346
  }, function (props) {
270
347
  return props.theme.fontSize;
@@ -276,9 +353,11 @@ var MinLabelContainer = _styledComponents["default"].span(_templateObject3(), fu
276
353
  return props.disabled ? props.theme.disabledFontColor : props.backgroundType === "dark" ? props.theme.fontColorOnDark : props.theme.fontColor;
277
354
  }, function (props) {
278
355
  return props.theme.fontLetterSpacing;
356
+ }, function (props) {
357
+ return props.theme.floorLabelMarginRight;
279
358
  });
280
359
 
281
- var MaxLabelContainer = _styledComponents["default"].span(_templateObject4(), function (props) {
360
+ var MaxLabelContainer = _styledComponents["default"].span(_templateObject6(), function (props) {
282
361
  return props.theme.fontFamily;
283
362
  }, function (props) {
284
363
  return props.theme.fontSize;
@@ -291,10 +370,16 @@ var MaxLabelContainer = _styledComponents["default"].span(_templateObject4(), fu
291
370
  }, function (props) {
292
371
  return props.theme.fontLetterSpacing;
293
372
  }, function (props) {
294
- return props.step === 1 ? "16px" : "20px";
373
+ return props.step === 1 ? props.theme.ceilLabelMarginLeft : "1.25rem";
374
+ });
375
+
376
+ var StyledTextInput = _styledComponents["default"].div(_templateObject7(), function (props) {
377
+ return props.theme.inputMarginLeft;
295
378
  });
296
379
 
297
380
  DxcSlider.propTypes = {
381
+ label: _propTypes["default"].string,
382
+ helperText: _propTypes["default"].string,
298
383
  size: _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(sizes))),
299
384
  minValue: _propTypes["default"].number,
300
385
  maxValue: _propTypes["default"].number,