@dxc-technology/halstack-react 0.0.0-ee92231 → 0.0.0-efa7c74

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 (92) hide show
  1. package/alert/Alert.stories.tsx +170 -0
  2. package/alert/types.d.ts +1 -1
  3. package/box/Box.d.ts +1 -1
  4. package/box/Box.js +2 -5
  5. package/box/types.d.ts +0 -4
  6. package/button/Button.d.ts +1 -1
  7. package/button/Button.js +4 -2
  8. package/button/Button.stories.tsx +216 -233
  9. package/button/types.d.ts +2 -2
  10. package/card/Card.js +4 -5
  11. package/card/Card.stories.tsx +201 -0
  12. package/card/ice-cream.jpg +0 -0
  13. package/card/types.d.ts +4 -6
  14. package/checkbox/types.d.ts +1 -1
  15. package/chip/Chip.stories.tsx +121 -0
  16. package/common/variables.js +13 -5
  17. package/date-input/DateInput.stories.tsx +138 -0
  18. package/dialog/Dialog.stories.tsx +212 -0
  19. package/file-input/FileInput.d.ts +4 -0
  20. package/file-input/FileInput.js +7 -28
  21. package/file-input/FileItem.d.ts +14 -0
  22. package/file-input/FileItem.js +4 -15
  23. package/file-input/types.d.ts +87 -0
  24. package/file-input/types.js +5 -0
  25. package/footer/types.d.ts +1 -1
  26. package/header/Header.stories.tsx +162 -0
  27. package/header/types.d.ts +4 -2
  28. package/heading/Heading.d.ts +4 -0
  29. package/heading/Heading.js +6 -23
  30. package/heading/Heading.stories.tsx +53 -0
  31. package/heading/types.d.ts +33 -0
  32. package/heading/types.js +5 -0
  33. package/link/Link.js +2 -2
  34. package/link/Link.stories.tsx +146 -0
  35. package/number-input/NumberInput.d.ts +4 -0
  36. package/number-input/NumberInput.js +2 -44
  37. package/number-input/{NumberInput.stories.jsx → NumberInput.stories.tsx} +0 -0
  38. package/number-input/NumberInputContext.d.ts +4 -0
  39. package/number-input/NumberInputContext.js +5 -2
  40. package/number-input/numberInputContextTypes.d.ts +19 -0
  41. package/number-input/numberInputContextTypes.js +5 -0
  42. package/number-input/types.d.ts +117 -0
  43. package/number-input/types.js +5 -0
  44. package/package.json +1 -1
  45. package/password-input/types.d.ts +13 -8
  46. package/radio/types.d.ts +2 -2
  47. package/resultsetTable/ResultsetTable.d.ts +4 -0
  48. package/resultsetTable/ResultsetTable.js +0 -25
  49. package/resultsetTable/types.d.ts +63 -0
  50. package/resultsetTable/types.js +5 -0
  51. package/select/Select.stories.tsx +572 -0
  52. package/sidenav/Sidenav.d.ts +9 -0
  53. package/sidenav/Sidenav.js +4 -13
  54. package/sidenav/Sidenav.stories.tsx +165 -0
  55. package/sidenav/types.d.ts +50 -0
  56. package/sidenav/types.js +5 -0
  57. package/slider/Slider.d.ts +1 -1
  58. package/slider/Slider.js +41 -30
  59. package/slider/Slider.stories.tsx +177 -0
  60. package/slider/types.d.ts +2 -7
  61. package/table/Table.js +1 -1
  62. package/tabs/Tabs.js +3 -1
  63. package/tabs/Tabs.stories.tsx +121 -0
  64. package/tabs/types.d.ts +2 -3
  65. package/tag/Tag.d.ts +4 -0
  66. package/tag/Tag.js +3 -24
  67. package/tag/{Tag.stories.jsx → Tag.stories.tsx} +0 -0
  68. package/tag/types.d.ts +60 -0
  69. package/tag/types.js +5 -0
  70. package/text-input/TextInput.d.ts +4 -0
  71. package/text-input/TextInput.js +4 -44
  72. package/text-input/types.d.ts +157 -0
  73. package/text-input/types.js +5 -0
  74. package/toggle-group/ToggleGroup.d.ts +4 -0
  75. package/toggle-group/ToggleGroup.js +5 -31
  76. package/toggle-group/ToggleGroup.stories.tsx +178 -0
  77. package/toggle-group/types.d.ts +84 -0
  78. package/toggle-group/types.js +5 -0
  79. package/wizard/Wizard.d.ts +4 -0
  80. package/wizard/Wizard.js +11 -51
  81. package/wizard/Wizard.stories.jsx +224 -0
  82. package/wizard/types.d.ts +64 -0
  83. package/wizard/types.js +5 -0
  84. package/file-input/index.d.ts +0 -81
  85. package/heading/index.d.ts +0 -17
  86. package/number-input/index.d.ts +0 -113
  87. package/resultsetTable/index.d.ts +0 -19
  88. package/sidenav/index.d.ts +0 -13
  89. package/tag/index.d.ts +0 -24
  90. package/text-input/index.d.ts +0 -135
  91. package/toggle-group/index.d.ts +0 -21
  92. package/wizard/index.d.ts +0 -18
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, 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,8 +19,6 @@ 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"));
@@ -249,26 +245,5 @@ var DxcResultsetTableContainer = _styledComponents["default"].div(_templateObjec
249
245
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
250
246
  });
251
247
 
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
248
  var _default = DxcResultsetTable;
274
249
  exports["default"] = _default;
@@ -0,0 +1,63 @@
1
+ /// <reference types="react" />
2
+ declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
+ declare type Margin = {
4
+ top?: Space;
5
+ bottom?: Space;
6
+ left?: Space;
7
+ right?: Space;
8
+ };
9
+ declare type Column = {
10
+ /**
11
+ * Column display value.
12
+ */
13
+ displayValue: React.ReactNode;
14
+ /**
15
+ * Boolean value to indicate whether the column is sortable or not.
16
+ */
17
+ isSortable?: boolean;
18
+ };
19
+ declare type Row = {
20
+ /**
21
+ * Value to be displayed in the cell.
22
+ */
23
+ displayValue: React.ReactNode;
24
+ /**
25
+ * Value to be used when sorting the table by that
26
+ * column. If not indicated displayValue will be used for sorting.
27
+ */
28
+ sortValue?: string;
29
+ };
30
+ declare type Props = {
31
+ /**
32
+ * An array of objects representing the columns of the table.
33
+ */
34
+ columns: [Column, ...Column[]];
35
+ /**
36
+ * An array of objects representing the rows of the table, you will have
37
+ * as many objects as columns in the table.
38
+ */
39
+ rows: [Row, ...Row[]];
40
+ /**
41
+ * Number of items per page.
42
+ */
43
+ itemsPerPage?: number;
44
+ /**
45
+ * An array of numbers representing the items per page options.
46
+ */
47
+ itemsPerPageOptions?: number[];
48
+ /**
49
+ * This function will be called when the user selects an item per page
50
+ * option. The value selected will be passed as a parameter.
51
+ */
52
+ itemsPerPageFunction?: (newValue: number) => void;
53
+ /**
54
+ * Size of the margin to be applied to the component. You can pass an object with 'top',
55
+ * 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
56
+ */
57
+ margin?: Space | Margin;
58
+ /**
59
+ * Value of the tabindex attribute given to the sortable icon.
60
+ */
61
+ tabIndex?: number;
62
+ };
63
+ export default Props;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });