@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.
- package/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +1 -1
- package/box/Box.d.ts +1 -1
- package/box/Box.js +2 -5
- package/box/types.d.ts +0 -4
- package/button/Button.d.ts +1 -1
- package/button/Button.js +4 -2
- package/button/Button.stories.tsx +216 -233
- package/button/types.d.ts +2 -2
- package/card/Card.js +4 -5
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +4 -6
- package/checkbox/types.d.ts +1 -1
- package/chip/Chip.stories.tsx +121 -0
- package/common/variables.js +13 -5
- package/date-input/DateInput.stories.tsx +138 -0
- package/dialog/Dialog.stories.tsx +212 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +7 -28
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +4 -15
- package/file-input/types.d.ts +87 -0
- package/file-input/types.js +5 -0
- package/footer/types.d.ts +1 -1
- package/header/Header.stories.tsx +162 -0
- package/header/types.d.ts +4 -2
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +6 -23
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/link/Link.js +2 -2
- package/link/Link.stories.tsx +146 -0
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +2 -44
- package/number-input/{NumberInput.stories.jsx → NumberInput.stories.tsx} +0 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +1 -1
- package/password-input/types.d.ts +13 -8
- package/radio/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +0 -25
- package/resultsetTable/types.d.ts +63 -0
- package/resultsetTable/types.js +5 -0
- package/select/Select.stories.tsx +572 -0
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +4 -13
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +1 -1
- package/slider/Slider.js +41 -30
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +2 -7
- package/table/Table.js +1 -1
- package/tabs/Tabs.js +3 -1
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +2 -3
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +3 -24
- package/tag/{Tag.stories.jsx → Tag.stories.tsx} +0 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +4 -44
- package/text-input/types.d.ts +157 -0
- package/text-input/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +5 -31
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -0
- package/toggle-group/types.js +5 -0
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +11 -51
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/file-input/index.d.ts +0 -81
- package/heading/index.d.ts +0 -17
- package/number-input/index.d.ts +0 -113
- package/resultsetTable/index.d.ts +0 -19
- package/sidenav/index.d.ts +0 -13
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/toggle-group/index.d.ts +0 -21
- 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
|
|
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;
|