@dxc-technology/halstack-react 0.0.0-9005464 → 0.0.0-9179a3a

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 (143) hide show
  1. package/BackgroundColorContext.d.ts +10 -0
  2. package/BackgroundColorContext.js +1 -3
  3. package/ThemeContext.d.ts +15 -0
  4. package/ThemeContext.js +5 -8
  5. package/V3Select/V3Select.js +2 -2
  6. package/V3Textarea/V3Textarea.js +2 -2
  7. package/accordion/Accordion.js +2 -2
  8. package/accordion/Accordion.stories.tsx +300 -0
  9. package/accordion/types.d.ts +1 -1
  10. package/accordion-group/AccordionGroup.js +2 -2
  11. package/accordion-group/AccordionGroup.stories.tsx +225 -0
  12. package/accordion-group/types.d.ts +1 -1
  13. package/alert/Alert.js +2 -2
  14. package/alert/types.d.ts +1 -1
  15. package/badge/Badge.js +1 -1
  16. package/box/Box.d.ts +1 -1
  17. package/box/Box.js +4 -7
  18. package/box/types.d.ts +0 -4
  19. package/button/Button.d.ts +1 -1
  20. package/button/Button.js +6 -4
  21. package/button/types.d.ts +2 -2
  22. package/card/Card.js +5 -6
  23. package/card/Card.stories.tsx +201 -0
  24. package/card/ice-cream.jpg +0 -0
  25. package/card/types.d.ts +4 -6
  26. package/checkbox/Checkbox.js +2 -2
  27. package/checkbox/types.d.ts +1 -1
  28. package/chip/Chip.d.ts +4 -0
  29. package/chip/Chip.js +5 -27
  30. package/chip/Chip.stories.tsx +121 -0
  31. package/chip/types.d.ts +53 -0
  32. package/chip/types.js +5 -0
  33. package/common/variables.js +19 -22
  34. package/date/Date.js +1 -1
  35. package/date-input/DateInput.js +4 -7
  36. package/dialog/Dialog.js +2 -2
  37. package/dialog/Dialog.stories.tsx +212 -0
  38. package/dropdown/Dropdown.js +1 -1
  39. package/dropdown/types.d.ts +1 -1
  40. package/file-input/FileInput.d.ts +4 -0
  41. package/file-input/FileInput.js +65 -76
  42. package/file-input/FileItem.d.ts +14 -0
  43. package/file-input/FileItem.js +12 -21
  44. package/file-input/types.d.ts +112 -0
  45. package/file-input/types.js +5 -0
  46. package/footer/Footer.d.ts +1 -1
  47. package/footer/Footer.js +12 -18
  48. package/footer/{Footer.stories.jsx → Footer.stories.tsx} +1 -22
  49. package/footer/Icons.d.ts +2 -0
  50. package/footer/Icons.js +3 -3
  51. package/footer/types.d.ts +22 -18
  52. package/header/Header.js +2 -2
  53. package/header/Header.stories.tsx +162 -0
  54. package/header/Icons.d.ts +2 -0
  55. package/header/types.d.ts +4 -2
  56. package/heading/Heading.d.ts +4 -0
  57. package/heading/Heading.js +7 -24
  58. package/heading/Heading.stories.tsx +53 -0
  59. package/heading/types.d.ts +33 -0
  60. package/heading/types.js +5 -0
  61. package/input-text/InputText.js +2 -2
  62. package/layout/ApplicationLayout.d.ts +10 -0
  63. package/layout/ApplicationLayout.js +8 -18
  64. package/layout/ApplicationLayout.stories.tsx +171 -0
  65. package/layout/types.d.ts +57 -0
  66. package/layout/types.js +5 -0
  67. package/link/Link.js +3 -3
  68. package/link/Link.stories.tsx +76 -0
  69. package/list/List.d.ts +7 -0
  70. package/list/List.js +37 -0
  71. package/list/List.stories.tsx +70 -0
  72. package/main.d.ts +7 -3
  73. package/main.js +34 -2
  74. package/number-input/NumberInput.js +3 -6
  75. package/number-input/NumberInputContext.d.ts +4 -0
  76. package/number-input/NumberInputContext.js +5 -2
  77. package/number-input/numberInputContextTypes.d.ts +19 -0
  78. package/number-input/numberInputContextTypes.js +5 -0
  79. package/package.json +1 -1
  80. package/paginator/Paginator.js +2 -8
  81. package/password-input/PasswordInput.js +19 -18
  82. package/password-input/types.d.ts +17 -10
  83. package/progress-bar/ProgressBar.js +2 -2
  84. package/radio/Radio.js +2 -2
  85. package/radio/types.d.ts +2 -2
  86. package/resultsetTable/ResultsetTable.d.ts +4 -0
  87. package/resultsetTable/ResultsetTable.js +4 -27
  88. package/resultsetTable/ResultsetTable.stories.tsx +276 -0
  89. package/resultsetTable/types.d.ts +67 -0
  90. package/resultsetTable/types.js +5 -0
  91. package/row/Row.d.ts +11 -0
  92. package/row/Row.js +124 -0
  93. package/row/Row.stories.tsx +223 -0
  94. package/select/Select.js +15 -17
  95. package/sidenav/Sidenav.js +2 -2
  96. package/sidenav/Sidenav.stories.tsx +165 -0
  97. package/slider/Slider.js +8 -8
  98. package/slider/Slider.stories.tsx +6 -1
  99. package/spinner/Spinner.js +2 -2
  100. package/stack/Stack.d.ts +10 -0
  101. package/stack/Stack.js +94 -0
  102. package/stack/Stack.stories.tsx +150 -0
  103. package/switch/Switch.js +2 -2
  104. package/table/Table.js +3 -3
  105. package/tabs/Tabs.js +4 -2
  106. package/tabs/Tabs.stories.tsx +121 -0
  107. package/tabs/types.d.ts +3 -4
  108. package/tag/Tag.js +1 -1
  109. package/text/Text.d.ts +7 -0
  110. package/text/Text.js +30 -0
  111. package/text/Text.stories.tsx +19 -0
  112. package/text-input/TextInput.d.ts +4 -0
  113. package/text-input/TextInput.js +42 -81
  114. package/text-input/TextInput.stories.tsx +456 -0
  115. package/text-input/types.d.ts +159 -0
  116. package/text-input/types.js +5 -0
  117. package/textarea/Textarea.d.ts +4 -0
  118. package/textarea/Textarea.js +27 -60
  119. package/textarea/types.d.ts +130 -0
  120. package/textarea/types.js +5 -0
  121. package/toggle/Toggle.js +1 -1
  122. package/toggle-group/ToggleGroup.d.ts +4 -0
  123. package/toggle-group/ToggleGroup.js +8 -34
  124. package/toggle-group/types.d.ts +84 -0
  125. package/toggle-group/types.js +5 -0
  126. package/upload/buttons-upload/ButtonsUpload.js +2 -2
  127. package/upload/dragAndDropArea/DragAndDropArea.js +2 -2
  128. package/upload/file-upload/FileToUpload.js +1 -1
  129. package/upload/files-upload/FilesToUpload.js +1 -1
  130. package/upload/transaction/Transaction.js +2 -2
  131. package/upload/transactions/Transactions.js +1 -1
  132. package/useTheme.d.ts +2 -0
  133. package/useTheme.js +1 -1
  134. package/wizard/Wizard.js +2 -2
  135. package/wizard/Wizard.stories.jsx +224 -0
  136. package/wizard/types.d.ts +1 -1
  137. package/chip/index.d.ts +0 -22
  138. package/file-input/index.d.ts +0 -81
  139. package/heading/index.d.ts +0 -17
  140. package/resultsetTable/index.d.ts +0 -19
  141. package/text-input/index.d.ts +0 -135
  142. package/textarea/index.d.ts +0 -117
  143. package/toggle-group/index.d.ts +0 -21
package/main.js CHANGED
@@ -133,6 +133,12 @@ Object.defineProperty(exports, "DxcLink", {
133
133
  return _Link["default"];
134
134
  }
135
135
  });
136
+ Object.defineProperty(exports, "DxcList", {
137
+ enumerable: true,
138
+ get: function get() {
139
+ return _List["default"];
140
+ }
141
+ });
136
142
  Object.defineProperty(exports, "DxcNumberInput", {
137
143
  enumerable: true,
138
144
  get: function get() {
@@ -169,6 +175,12 @@ Object.defineProperty(exports, "DxcResultsetTable", {
169
175
  return _ResultsetTable["default"];
170
176
  }
171
177
  });
178
+ Object.defineProperty(exports, "DxcRow", {
179
+ enumerable: true,
180
+ get: function get() {
181
+ return _Row["default"];
182
+ }
183
+ });
172
184
  Object.defineProperty(exports, "DxcSelect", {
173
185
  enumerable: true,
174
186
  get: function get() {
@@ -193,6 +205,12 @@ Object.defineProperty(exports, "DxcSpinner", {
193
205
  return _Spinner["default"];
194
206
  }
195
207
  });
208
+ Object.defineProperty(exports, "DxcStack", {
209
+ enumerable: true,
210
+ get: function get() {
211
+ return _Stack["default"];
212
+ }
213
+ });
196
214
  Object.defineProperty(exports, "DxcSwitch", {
197
215
  enumerable: true,
198
216
  get: function get() {
@@ -217,6 +235,12 @@ Object.defineProperty(exports, "DxcTag", {
217
235
  return _Tag["default"];
218
236
  }
219
237
  });
238
+ Object.defineProperty(exports, "DxcText", {
239
+ enumerable: true,
240
+ get: function get() {
241
+ return _Text["default"];
242
+ }
243
+ });
220
244
  Object.defineProperty(exports, "DxcTextInput", {
221
245
  enumerable: true,
222
246
  get: function get() {
@@ -354,9 +378,17 @@ var _Select = _interopRequireDefault(require("./select/Select"));
354
378
 
355
379
  var _FileInput = _interopRequireDefault(require("./file-input/FileInput"));
356
380
 
357
- var _ThemeContext = _interopRequireWildcard(require("./ThemeContext.js"));
381
+ var _Stack = _interopRequireDefault(require("./stack/Stack"));
382
+
383
+ var _Row = _interopRequireDefault(require("./row/Row"));
384
+
385
+ var _Text = _interopRequireDefault(require("./text/Text"));
386
+
387
+ var _List = _interopRequireDefault(require("./list/List"));
388
+
389
+ var _ThemeContext = _interopRequireWildcard(require("./ThemeContext"));
358
390
 
359
- var _BackgroundColorContext = require("./BackgroundColorContext.js");
391
+ var _BackgroundColorContext = require("./BackgroundColorContext");
360
392
 
361
393
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
362
394
 
@@ -20,13 +20,11 @@ var _NumberInputContext = _interopRequireDefault(require("./NumberInputContext")
20
20
  var _templateObject;
21
21
 
22
22
  var DxcNumberInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
23
- var _ref$label = _ref.label,
24
- label = _ref$label === void 0 ? "" : _ref$label,
23
+ var label = _ref.label,
25
24
  _ref$name = _ref.name,
26
25
  name = _ref$name === void 0 ? "" : _ref$name,
27
26
  value = _ref.value,
28
- _ref$helperText = _ref.helperText,
29
- helperText = _ref$helperText === void 0 ? "" : _ref$helperText,
27
+ helperText = _ref.helperText,
30
28
  _ref$placeholder = _ref.placeholder,
31
29
  placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
32
30
  _ref$disabled = _ref.disabled,
@@ -43,8 +41,7 @@ var DxcNumberInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, r
43
41
  step = _ref$step === void 0 ? 1 : _ref$step,
44
42
  onChange = _ref.onChange,
45
43
  onBlur = _ref.onBlur,
46
- _ref$error = _ref.error,
47
- error = _ref$error === void 0 ? "" : _ref$error,
44
+ error = _ref.error,
48
45
  _ref$autocomplete = _ref.autocomplete,
49
46
  autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
50
47
  margin = _ref.margin,
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import NumberInputContextPropsType from "./numberInputContextTypes";
3
+ declare const NumberInputContext: React.Context<NumberInputContextPropsType>;
4
+ export default NumberInputContext;
@@ -9,8 +9,11 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- /* eslint-disable prefer-template */
13
- var NumberInputContext = /*#__PURE__*/_react["default"].createContext();
12
+ var defaultState = {
13
+ stepNumber: 1
14
+ };
15
+
16
+ var NumberInputContext = /*#__PURE__*/_react["default"].createContext(defaultState);
14
17
 
15
18
  var _default = NumberInputContext;
16
19
  exports["default"] = _default;
@@ -0,0 +1,19 @@
1
+ declare type Props = {
2
+ /**
3
+ * Type of the input.
4
+ */
5
+ typeNumber?: string;
6
+ /**
7
+ * Minimum value allowed by the number input.
8
+ */
9
+ minNumber?: number;
10
+ /**
11
+ * Maximum value allowed by the number input.
12
+ */
13
+ maxNumber?: number;
14
+ /**
15
+ * The step interval to use when using the up and down arrows to adjust the value.
16
+ */
17
+ stepNumber?: number;
18
+ };
19
+ export default Props;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxc-technology/halstack-react",
3
- "version": "0.0.0-9005464",
3
+ "version": "0.0.0-9179a3a",
4
4
  "description": "DXC Halstack React components library",
5
5
  "repository": "dxc-technology/halstack-react",
6
6
  "homepage": "http://developer.dxc.com/tools/react",
@@ -15,7 +15,7 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
17
17
 
18
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
18
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
19
19
 
20
20
  var _Button = _interopRequireDefault(require("../button/Button"));
21
21
 
@@ -23,7 +23,7 @@ var _Select = _interopRequireDefault(require("../select/Select"));
23
23
 
24
24
  var _Icons = require("./Icons");
25
25
 
26
- var _BackgroundColorContext = require("../BackgroundColorContext.js");
26
+ var _BackgroundColorContext = require("../BackgroundColorContext");
27
27
 
28
28
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
29
29
 
@@ -67,9 +67,6 @@ var DxcPaginator = function DxcPaginator(_ref) {
67
67
  },
68
68
  value: itemsPerPage.toString(),
69
69
  size: "fillParent",
70
- margin: {
71
- top: "xsmall"
72
- },
73
70
  tabIndex: tabIndex
74
71
  }))), /*#__PURE__*/_react["default"].createElement(TotalItemsContainer, null, minItemsPerPage, " to ", maxItemsPerPage, " of ", totalItems), onPageChange && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
75
72
  size: "small",
@@ -109,9 +106,6 @@ var DxcPaginator = function DxcPaginator(_ref) {
109
106
  },
110
107
  value: currentPage.toString(),
111
108
  size: "fillParent",
112
- margin: {
113
- top: "xsmall"
114
- },
115
109
  tabIndex: tabIndex
116
110
  }))) || /*#__PURE__*/_react["default"].createElement(TextContainer, null, "Page: ", currentPageInternal, " of ", totalPages), onPageChange && /*#__PURE__*/_react["default"].createElement(_Button["default"], {
117
111
  size: "small",
@@ -26,21 +26,19 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
26
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(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; }
27
27
 
28
28
  var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
29
- var _ref$label = _ref.label,
30
- label = _ref$label === void 0 ? "" : _ref$label,
29
+ var label = _ref.label,
31
30
  _ref$name = _ref.name,
32
31
  name = _ref$name === void 0 ? "" : _ref$name,
33
32
  value = _ref.value,
34
- _ref$helperText = _ref.helperText,
35
- helperText = _ref$helperText === void 0 ? "" : _ref$helperText,
33
+ helperText = _ref.helperText,
36
34
  _ref$clearable = _ref.clearable,
37
35
  clearable = _ref$clearable === void 0 ? false : _ref$clearable,
38
36
  onChange = _ref.onChange,
39
37
  onBlur = _ref.onBlur,
40
- _ref$error = _ref.error,
41
- error = _ref$error === void 0 ? "" : _ref$error,
38
+ error = _ref.error,
42
39
  pattern = _ref.pattern,
43
- length = _ref.length,
40
+ minLength = _ref.minLength,
41
+ maxLength = _ref.maxLength,
44
42
  _ref$autocomplete = _ref.autocomplete,
45
43
  autocomplete = _ref$autocomplete === void 0 ? "off" : _ref$autocomplete,
46
44
  margin = _ref.margin,
@@ -59,25 +57,27 @@ var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
59
57
  var setInputType = function setInputType(type) {
60
58
  var _inputRef$current, _inputRef$current$chi;
61
59
 
62
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$chi = _inputRef$current.children[2]) === null || _inputRef$current$chi === void 0 ? void 0 : _inputRef$current$chi.children[0].setAttribute("type", type);
60
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$chi = _inputRef$current.children[label && helperText ? 2 : label || helperText ? 1 : 0]) === null || _inputRef$current$chi === void 0 ? void 0 : _inputRef$current$chi.children[0].setAttribute("type", type);
63
61
  };
64
62
 
65
63
  var setAriaAttributes = function setAriaAttributes(ariaExpanded, ariaLabel) {
64
+ var inputIndex = label && helperText ? 2 : label || helperText ? 1 : 0;
65
+
66
66
  if (error && clearable && value) {
67
67
  var _inputRef$current2, _inputRef$current2$ch, _inputRef$current2$ch2, _inputRef$current3, _inputRef$current3$ch, _inputRef$current3$ch2;
68
68
 
69
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : (_inputRef$current2$ch = _inputRef$current2.children[2]) === null || _inputRef$current2$ch === void 0 ? void 0 : (_inputRef$current2$ch2 = _inputRef$current2$ch.children[3]) === null || _inputRef$current2$ch2 === void 0 ? void 0 : _inputRef$current2$ch2.setAttribute("aria-expanded", ariaExpanded);
70
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : (_inputRef$current3$ch = _inputRef$current3.children[2]) === null || _inputRef$current3$ch === void 0 ? void 0 : (_inputRef$current3$ch2 = _inputRef$current3$ch.children[3]) === null || _inputRef$current3$ch2 === void 0 ? void 0 : _inputRef$current3$ch2.setAttribute("aria-label", ariaLabel);
69
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : (_inputRef$current2$ch = _inputRef$current2.children[inputIndex]) === null || _inputRef$current2$ch === void 0 ? void 0 : (_inputRef$current2$ch2 = _inputRef$current2$ch.children[3]) === null || _inputRef$current2$ch2 === void 0 ? void 0 : _inputRef$current2$ch2.setAttribute("aria-expanded", ariaExpanded);
70
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : (_inputRef$current3$ch = _inputRef$current3.children[inputIndex]) === null || _inputRef$current3$ch === void 0 ? void 0 : (_inputRef$current3$ch2 = _inputRef$current3$ch.children[3]) === null || _inputRef$current3$ch2 === void 0 ? void 0 : _inputRef$current3$ch2.setAttribute("aria-label", ariaLabel);
71
71
  } else if (error || clearable && !value) {
72
72
  var _inputRef$current4, _inputRef$current4$ch, _inputRef$current4$ch2, _inputRef$current5, _inputRef$current5$ch, _inputRef$current5$ch2;
73
73
 
74
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : (_inputRef$current4$ch = _inputRef$current4.children[2]) === null || _inputRef$current4$ch === void 0 ? void 0 : (_inputRef$current4$ch2 = _inputRef$current4$ch.children[2]) === null || _inputRef$current4$ch2 === void 0 ? void 0 : _inputRef$current4$ch2.setAttribute("aria-expanded", ariaExpanded);
75
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : (_inputRef$current5$ch = _inputRef$current5.children[2]) === null || _inputRef$current5$ch === void 0 ? void 0 : (_inputRef$current5$ch2 = _inputRef$current5$ch.children[2]) === null || _inputRef$current5$ch2 === void 0 ? void 0 : _inputRef$current5$ch2.setAttribute("aria-label", ariaLabel);
74
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : (_inputRef$current4$ch = _inputRef$current4.children[inputIndex]) === null || _inputRef$current4$ch === void 0 ? void 0 : (_inputRef$current4$ch2 = _inputRef$current4$ch.children[2]) === null || _inputRef$current4$ch2 === void 0 ? void 0 : _inputRef$current4$ch2.setAttribute("aria-expanded", ariaExpanded);
75
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : (_inputRef$current5$ch = _inputRef$current5.children[inputIndex]) === null || _inputRef$current5$ch === void 0 ? void 0 : (_inputRef$current5$ch2 = _inputRef$current5$ch.children[2]) === null || _inputRef$current5$ch2 === void 0 ? void 0 : _inputRef$current5$ch2.setAttribute("aria-label", ariaLabel);
76
76
  } else {
77
77
  var _inputRef$current6, _inputRef$current6$ch, _inputRef$current6$ch2, _inputRef$current7, _inputRef$current7$ch, _inputRef$current7$ch2;
78
78
 
79
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : (_inputRef$current6$ch = _inputRef$current6.children[2]) === null || _inputRef$current6$ch === void 0 ? void 0 : (_inputRef$current6$ch2 = _inputRef$current6$ch.children[1]) === null || _inputRef$current6$ch2 === void 0 ? void 0 : _inputRef$current6$ch2.setAttribute("aria-expanded", ariaExpanded);
80
- inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : (_inputRef$current7$ch = _inputRef$current7.children[2]) === null || _inputRef$current7$ch === void 0 ? void 0 : (_inputRef$current7$ch2 = _inputRef$current7$ch.children[1]) === null || _inputRef$current7$ch2 === void 0 ? void 0 : _inputRef$current7$ch2.setAttribute("aria-label", ariaLabel);
79
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : (_inputRef$current6$ch = _inputRef$current6.children[inputIndex]) === null || _inputRef$current6$ch === void 0 ? void 0 : (_inputRef$current6$ch2 = _inputRef$current6$ch.children[1]) === null || _inputRef$current6$ch2 === void 0 ? void 0 : _inputRef$current6$ch2.setAttribute("aria-expanded", ariaExpanded);
80
+ inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : (_inputRef$current7$ch = _inputRef$current7.children[inputIndex]) === null || _inputRef$current7$ch === void 0 ? void 0 : (_inputRef$current7$ch2 = _inputRef$current7$ch.children[1]) === null || _inputRef$current7$ch2 === void 0 ? void 0 : _inputRef$current7$ch2.setAttribute("aria-label", ariaLabel);
81
81
  }
82
82
  };
83
83
 
@@ -86,14 +86,14 @@ var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
86
86
  };
87
87
 
88
88
  (0, _react.useEffect)(function () {
89
- setAriaAttributes(false, "Show");
89
+ setAriaAttributes(false, "Show password");
90
90
 
91
91
  if (isPasswordVisible) {
92
92
  setInputType("text");
93
- setAriaAttributes(true, "Hide");
93
+ setAriaAttributes(true, "Hide password");
94
94
  } else {
95
95
  setInputType("password");
96
- setAriaAttributes(false, "Show");
96
+ setAriaAttributes(false, "Show password");
97
97
  }
98
98
  }, [isPasswordVisible]);
99
99
 
@@ -150,7 +150,8 @@ var DxcPasswordInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
150
150
  margin: margin,
151
151
  size: size,
152
152
  pattern: pattern,
153
- length: length,
153
+ minLength: minLength,
154
+ maxLength: maxLength,
154
155
  autocomplete: autocomplete,
155
156
  tabIndex: tabIndex
156
157
  }));
@@ -37,10 +37,10 @@ declare type Props = {
37
37
  error: string | null;
38
38
  }) => void;
39
39
  /**
40
- * This function will be called when the input element loses the focus.
41
- * An object including the input value and the error (if the value entered is
42
- * not valid) will be passed to this function. If there is no error, error will be null.
43
- */
40
+ * This function will be called when the input element loses the focus.
41
+ * An object including the input value and the error (if the value entered is
42
+ * not valid) will be passed to this function. If there is no error, error will be null.
43
+ */
44
44
  onBlur?: (val: {
45
45
  value: string;
46
46
  error: string | null;
@@ -62,18 +62,25 @@ declare type Props = {
62
62
  */
63
63
  pattern?: string;
64
64
  /**
65
- * Specifies the minimun and maximum length allowed by the password input.
65
+ * Specifies the minimun length allowed by the password input.
66
+ * This will be checked both when the input element loses the
67
+ * focus and while typing within it. If the string entered does not
68
+ * comply the minimum length, the onBlur and onChange functions will be called
69
+ * with the current value and an internal error informing that the value
70
+ * length does not comply the specified range. If a valid length is
71
+ * reached, the error parameter of both events will be null.
72
+ */
73
+ minLength?: number;
74
+ /**
75
+ * Specifies the maximum length allowed by the password input.
66
76
  * This will be checked both when the input element loses the
67
77
  * focus and while typing within it. If the string entered does not
68
- * comply the length, the onBlur and onChange functions will be called
78
+ * comply the maximum length, the onBlur and onChange functions will be called
69
79
  * with the current value and an internal error informing that the value
70
80
  * length does not comply the specified range. If a valid length is
71
81
  * reached, the error parameter of both events will be null.
72
82
  */
73
- length?: {
74
- min?: number;
75
- max?: number;
76
- };
83
+ maxLength?: number;
77
84
  /**
78
85
  * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
79
86
  * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
@@ -21,9 +21,9 @@ var _LinearProgress = _interopRequireDefault(require("@material-ui/core/LinearPr
21
21
 
22
22
  var _variables = require("../common/variables.js");
23
23
 
24
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
24
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
25
25
 
26
- var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
26
+ var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
27
27
 
28
28
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
29
29
 
package/radio/Radio.js CHANGED
@@ -27,9 +27,9 @@ var _variables = require("../common/variables.js");
27
27
 
28
28
  var _utils = require("../common/utils.js");
29
29
 
30
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
30
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
31
31
 
32
- var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext.js"));
32
+ var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
33
33
 
34
34
  var _templateObject, _templateObject2;
35
35
 
package/radio/types.d.ts CHANGED
@@ -42,8 +42,8 @@ declare type Props = {
42
42
  */
43
43
  onClick?: (val: boolean) => void;
44
44
  /**
45
- * Size of the margin to be applied to the component. You can pass an object with 'top',
46
- * 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
45
+ * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
46
+ * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
47
47
  */
48
48
  margin?: Space | Margin;
49
49
  /**
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import ResultsetTablePropsType from "./types";
3
+ declare const DxcResultsetTable: ({ columns, rows, showGoToPage, itemsPerPage, itemsPerPageOptions, itemsPerPageFunction, margin, tabIndex, }: ResultsetTablePropsType) => JSX.Element;
4
+ export default DxcResultsetTable;
@@ -9,8 +9,6 @@ Object.defineProperty(exports, "__esModule", {
9
9
  });
10
10
  exports["default"] = void 0;
11
11
 
12
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
13
 
16
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
@@ -21,15 +19,13 @@ var _react = _interopRequireWildcard(require("react"));
21
19
 
22
20
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
21
 
24
- var _propTypes = _interopRequireDefault(require("prop-types"));
25
-
26
22
  var _variables = require("../common/variables.js");
27
23
 
28
24
  var _Table = _interopRequireDefault(require("../table/Table"));
29
25
 
30
26
  var _Paginator = _interopRequireDefault(require("../paginator/Paginator"));
31
27
 
32
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
28
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
33
29
 
34
30
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
35
31
 
@@ -117,6 +113,8 @@ var BothArrows = function BothArrows() {
117
113
  var DxcResultsetTable = function DxcResultsetTable(_ref) {
118
114
  var columns = _ref.columns,
119
115
  rows = _ref.rows,
116
+ _ref$showGoToPage = _ref.showGoToPage,
117
+ showGoToPage = _ref$showGoToPage === void 0 ? true : _ref$showGoToPage,
120
118
  _ref$itemsPerPage = _ref.itemsPerPage,
121
119
  itemsPerPage = _ref$itemsPerPage === void 0 ? 5 : _ref$itemsPerPage,
122
120
  itemsPerPageOptions = _ref.itemsPerPageOptions,
@@ -205,7 +203,7 @@ var DxcResultsetTable = function DxcResultsetTable(_ref) {
205
203
  itemsPerPageOptions: itemsPerPageOptions,
206
204
  itemsPerPageFunction: itemsPerPageFunction,
207
205
  currentPage: page,
208
- showGoToPage: true,
206
+ showGoToPage: showGoToPage,
209
207
  onPageChange: goToPage,
210
208
  tabIndex: tabIndex
211
209
  }))));
@@ -249,26 +247,5 @@ var DxcResultsetTableContainer = _styledComponents["default"].div(_templateObjec
249
247
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
250
248
  });
251
249
 
252
- DxcResultsetTable.propTypes = {
253
- rows: _propTypes["default"].array,
254
- columns: _propTypes["default"].array,
255
- itemsPerPage: _propTypes["default"].number,
256
- itemsPerPageOptions: _propTypes["default"].arrayOf(_propTypes["default"].number),
257
- itemsPerPageFunction: _propTypes["default"].func,
258
- margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
259
- top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
260
- bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
261
- left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
262
- right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
263
- }), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))]),
264
- tabIndex: _propTypes["default"].number
265
- };
266
- DxcResultsetTable.defaultProps = {
267
- rows: [],
268
- columns: [],
269
- itemsPerPage: 5,
270
- itemsPerPageOptions: null,
271
- itemsPerPageFunction: null
272
- };
273
250
  var _default = DxcResultsetTable;
274
251
  exports["default"] = _default;