@dxc-technology/halstack-react 0.0.0-d4fec82 → 0.0.0-d53af68

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 (160) hide show
  1. package/README.md +46 -0
  2. package/dist/index.d.mts +3941 -0
  3. package/dist/index.d.ts +3941 -0
  4. package/dist/index.js +14233 -0
  5. package/dist/index.mjs +14145 -0
  6. package/package.json +86 -69
  7. package/BackgroundColorContext.js +0 -50
  8. package/ThemeContext.js +0 -246
  9. package/V3Select/V3Select.js +0 -455
  10. package/V3Select/index.d.ts +0 -27
  11. package/V3Textarea/V3Textarea.js +0 -260
  12. package/V3Textarea/index.d.ts +0 -27
  13. package/accordion/Accordion.d.ts +0 -4
  14. package/accordion/Accordion.js +0 -258
  15. package/accordion/types.d.ts +0 -68
  16. package/accordion/types.js +0 -5
  17. package/accordion-group/AccordionGroup.d.ts +0 -7
  18. package/accordion-group/AccordionGroup.js +0 -170
  19. package/accordion-group/types.d.ts +0 -72
  20. package/accordion-group/types.js +0 -5
  21. package/alert/Alert.d.ts +0 -4
  22. package/alert/Alert.js +0 -290
  23. package/alert/types.d.ts +0 -49
  24. package/alert/types.js +0 -5
  25. package/badge/Badge.js +0 -59
  26. package/box/Box.js +0 -152
  27. package/box/Box.stories.jsx +0 -132
  28. package/box/index.d.ts +0 -25
  29. package/button/Button.d.ts +0 -4
  30. package/button/Button.js +0 -182
  31. package/button/Button.stories.tsx +0 -293
  32. package/button/types.d.ts +0 -57
  33. package/button/types.js +0 -5
  34. package/card/Card.d.ts +0 -4
  35. package/card/Card.js +0 -165
  36. package/card/types.d.ts +0 -69
  37. package/card/types.js +0 -5
  38. package/checkbox/Checkbox.d.ts +0 -4
  39. package/checkbox/Checkbox.js +0 -253
  40. package/checkbox/types.d.ts +0 -60
  41. package/checkbox/types.js +0 -5
  42. package/chip/Chip.js +0 -221
  43. package/chip/index.d.ts +0 -22
  44. package/common/OpenSans.css +0 -81
  45. package/common/RequiredComponent.js +0 -32
  46. package/common/fonts/OpenSans-Bold.ttf +0 -0
  47. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  48. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  49. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  50. package/common/fonts/OpenSans-Italic.ttf +0 -0
  51. package/common/fonts/OpenSans-Light.ttf +0 -0
  52. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  53. package/common/fonts/OpenSans-Regular.ttf +0 -0
  54. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  55. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  56. package/common/utils.js +0 -22
  57. package/common/variables.js +0 -1569
  58. package/date/Date.js +0 -373
  59. package/date/index.d.ts +0 -27
  60. package/date-input/DateInput.d.ts +0 -4
  61. package/date-input/DateInput.js +0 -361
  62. package/date-input/types.d.ts +0 -100
  63. package/date-input/types.js +0 -5
  64. package/dialog/Dialog.js +0 -184
  65. package/dialog/index.d.ts +0 -18
  66. package/dropdown/Dropdown.d.ts +0 -4
  67. package/dropdown/Dropdown.js +0 -417
  68. package/dropdown/types.d.ts +0 -89
  69. package/dropdown/types.js +0 -5
  70. package/file-input/FileInput.js +0 -532
  71. package/file-input/FileItem.js +0 -193
  72. package/file-input/index.d.ts +0 -81
  73. package/footer/Footer.d.ts +0 -4
  74. package/footer/Footer.js +0 -266
  75. package/footer/Icons.js +0 -77
  76. package/footer/types.d.ts +0 -61
  77. package/footer/types.js +0 -5
  78. package/header/Header.js +0 -326
  79. package/header/Icons.js +0 -59
  80. package/header/index.d.ts +0 -25
  81. package/heading/Heading.js +0 -176
  82. package/heading/index.d.ts +0 -17
  83. package/input-text/Icons.js +0 -22
  84. package/input-text/InputText.js +0 -611
  85. package/input-text/index.d.ts +0 -36
  86. package/layout/ApplicationLayout.js +0 -235
  87. package/layout/Icons.js +0 -55
  88. package/link/Link.js +0 -183
  89. package/link/index.d.ts +0 -23
  90. package/main.d.ts +0 -44
  91. package/main.js +0 -363
  92. package/number-input/NumberInput.js +0 -128
  93. package/number-input/NumberInput.stories.jsx +0 -115
  94. package/number-input/NumberInputContext.js +0 -16
  95. package/number-input/index.d.ts +0 -113
  96. package/paginator/Icons.js +0 -66
  97. package/paginator/Paginator.d.ts +0 -4
  98. package/paginator/Paginator.js +0 -198
  99. package/paginator/types.d.ts +0 -38
  100. package/paginator/types.js +0 -5
  101. package/password-input/PasswordInput.js +0 -199
  102. package/password-input/PasswordInput.stories.jsx +0 -131
  103. package/password-input/index.d.ts +0 -94
  104. package/progress-bar/ProgressBar.d.ts +0 -4
  105. package/progress-bar/ProgressBar.js +0 -170
  106. package/progress-bar/types.d.ts +0 -37
  107. package/progress-bar/types.js +0 -5
  108. package/radio/Radio.d.ts +0 -4
  109. package/radio/Radio.js +0 -174
  110. package/radio/types.d.ts +0 -54
  111. package/radio/types.js +0 -5
  112. package/resultsetTable/ResultsetTable.js +0 -274
  113. package/resultsetTable/index.d.ts +0 -19
  114. package/select/Select.js +0 -865
  115. package/select/index.d.ts +0 -131
  116. package/sidenav/Sidenav.js +0 -145
  117. package/sidenav/index.d.ts +0 -13
  118. package/slider/Slider.d.ts +0 -4
  119. package/slider/Slider.js +0 -306
  120. package/slider/types.d.ts +0 -83
  121. package/slider/types.js +0 -5
  122. package/spinner/Spinner.js +0 -267
  123. package/spinner/index.d.ts +0 -17
  124. package/switch/Switch.d.ts +0 -4
  125. package/switch/Switch.js +0 -179
  126. package/switch/types.d.ts +0 -58
  127. package/switch/types.js +0 -5
  128. package/table/Table.js +0 -118
  129. package/table/index.d.ts +0 -13
  130. package/tabs/Tabs.d.ts +0 -4
  131. package/tabs/Tabs.js +0 -211
  132. package/tabs/types.d.ts +0 -71
  133. package/tabs/types.js +0 -5
  134. package/tag/Tag.js +0 -208
  135. package/tag/index.d.ts +0 -24
  136. package/text-input/TextInput.js +0 -825
  137. package/text-input/index.d.ts +0 -135
  138. package/textarea/Textarea.js +0 -317
  139. package/textarea/Textarea.stories.jsx +0 -135
  140. package/textarea/index.d.ts +0 -117
  141. package/toggle/Toggle.js +0 -186
  142. package/toggle/index.d.ts +0 -21
  143. package/toggle-group/ToggleGroup.js +0 -243
  144. package/toggle-group/index.d.ts +0 -21
  145. package/upload/Upload.js +0 -201
  146. package/upload/buttons-upload/ButtonsUpload.js +0 -111
  147. package/upload/buttons-upload/Icons.js +0 -40
  148. package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
  149. package/upload/dragAndDropArea/Icons.js +0 -39
  150. package/upload/file-upload/FileToUpload.js +0 -115
  151. package/upload/file-upload/Icons.js +0 -66
  152. package/upload/files-upload/FilesToUpload.js +0 -109
  153. package/upload/index.d.ts +0 -15
  154. package/upload/transaction/Icons.js +0 -160
  155. package/upload/transaction/Transaction.js +0 -104
  156. package/upload/transactions/Transactions.js +0 -94
  157. package/useTheme.js +0 -22
  158. package/wizard/Icons.js +0 -65
  159. package/wizard/Wizard.js +0 -271
  160. package/wizard/index.d.ts +0 -18
package/radio/types.d.ts DELETED
@@ -1,54 +0,0 @@
1
- declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
2
- declare type Margin = {
3
- top?: Space;
4
- bottom?: Space;
5
- left?: Space;
6
- right?: Space;
7
- };
8
- declare type Props = {
9
- /**
10
- * If true, the radio is selected. If undefined the component will be uncontrolled
11
- * and the value will be managed internally by the component.
12
- */
13
- checked?: boolean;
14
- /**
15
- * Will be passed to the value attribute of the html input element. When inside a
16
- * form, this value will be only submitted if the radio is checked.
17
- */
18
- value?: string;
19
- /**
20
- * Text to be placed next to the radio.
21
- */
22
- label: string;
23
- /**
24
- * Whether the label should appear after or before the radio.
25
- */
26
- labelPosition?: "before" | "after";
27
- /**
28
- * Name attribute of the input element.
29
- */
30
- name?: string;
31
- /**
32
- * If true, the component will be disabled.
33
- */
34
- disabled?: boolean;
35
- /**
36
- * If true, the radio will change its appearence, showing that the value is required.
37
- */
38
- required?: boolean;
39
- /**
40
- * This function will be called when the user clicks the radio. The new value will
41
- * be passed as a parameter.
42
- */
43
- onClick?: (val: boolean) => void;
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.
47
- */
48
- margin?: Space | Margin;
49
- /**
50
- * Size of the component.
51
- */
52
- size?: "small" | "medium" | "large" | "fillParent" | "fitContent";
53
- };
54
- export default Props;
package/radio/types.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,274 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
-
14
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
-
18
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
19
-
20
- var _react = _interopRequireWildcard(require("react"));
21
-
22
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
23
-
24
- var _propTypes = _interopRequireDefault(require("prop-types"));
25
-
26
- var _variables = require("../common/variables.js");
27
-
28
- var _Table = _interopRequireDefault(require("../table/Table"));
29
-
30
- var _Paginator = _interopRequireDefault(require("../paginator/Paginator"));
31
-
32
- var _useTheme = _interopRequireDefault(require("../useTheme.js"));
33
-
34
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
35
-
36
- 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); }
37
-
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
-
40
- function normalizeSortValue(sortValue) {
41
- return typeof sortValue === "string" ? sortValue.toUpperCase() : sortValue;
42
- }
43
-
44
- function sortArray(index, order, resultset) {
45
- return resultset.slice().sort(function (element1, element2) {
46
- var sortValueA = normalizeSortValue(element1[index].sortValue || element1[index].displayValue);
47
- var sortValueB = normalizeSortValue(element2[index].sortValue || element2[index].displayValue);
48
- var comparison = 0;
49
-
50
- if ((0, _typeof2["default"])(sortValueA) === "object") {
51
- comparison = -1;
52
- } else if ((0, _typeof2["default"])(sortValueB) === "object") {
53
- comparison = 1;
54
- } else if (sortValueA > sortValueB) {
55
- comparison = 1;
56
- } else if (sortValueA < sortValueB) {
57
- comparison = -1;
58
- }
59
-
60
- return order === "desc" ? comparison * -1 : comparison;
61
- });
62
- }
63
-
64
- var getMinItemsPerPageIndex = function getMinItemsPerPageIndex(currentPageInternal, itemsPerPage, page) {
65
- return currentPageInternal === 1 ? 0 : itemsPerPage * (page - 1);
66
- };
67
-
68
- var getMaxItemsPerPageIndex = function getMaxItemsPerPageIndex(minItemsPerPageIndex, itemsPerPage, resultset, page) {
69
- return minItemsPerPageIndex + itemsPerPage > resultset.length ? resultset.length : itemsPerPage * page - 1;
70
- };
71
-
72
- var ArrowUp = function ArrowUp() {
73
- return /*#__PURE__*/_react["default"].createElement("svg", {
74
- xmlns: "http://www.w3.org/2000/svg",
75
- height: "24",
76
- viewBox: "0 0 24 24",
77
- width: "24",
78
- fill: "currentColor"
79
- }, /*#__PURE__*/_react["default"].createElement("path", {
80
- d: "M0 0h24v24H0V0z",
81
- fill: "none"
82
- }), /*#__PURE__*/_react["default"].createElement("path", {
83
- d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"
84
- }));
85
- };
86
-
87
- var ArrowDown = function ArrowDown() {
88
- return /*#__PURE__*/_react["default"].createElement("svg", {
89
- xmlns: "http://www.w3.org/2000/svg",
90
- height: "24",
91
- viewBox: "0 0 24 24",
92
- width: "24",
93
- fill: "currentColor"
94
- }, /*#__PURE__*/_react["default"].createElement("path", {
95
- d: "M0 0h24v24H0V0z",
96
- fill: "none"
97
- }), /*#__PURE__*/_react["default"].createElement("path", {
98
- d: "M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
99
- }));
100
- };
101
-
102
- var BothArrows = function BothArrows() {
103
- return /*#__PURE__*/_react["default"].createElement("svg", {
104
- xmlns: "http://www.w3.org/2000/svg",
105
- height: "24",
106
- viewBox: "0 0 24 24",
107
- width: "24",
108
- fill: "currentColor"
109
- }, /*#__PURE__*/_react["default"].createElement("path", {
110
- d: "M0 0h24v24H0z",
111
- fill: "none"
112
- }), /*#__PURE__*/_react["default"].createElement("path", {
113
- d: "M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"
114
- }));
115
- };
116
-
117
- var DxcResultsetTable = function DxcResultsetTable(_ref) {
118
- var columns = _ref.columns,
119
- rows = _ref.rows,
120
- _ref$itemsPerPage = _ref.itemsPerPage,
121
- itemsPerPage = _ref$itemsPerPage === void 0 ? 5 : _ref$itemsPerPage,
122
- itemsPerPageOptions = _ref.itemsPerPageOptions,
123
- itemsPerPageFunction = _ref.itemsPerPageFunction,
124
- margin = _ref.margin,
125
- _ref$tabIndex = _ref.tabIndex,
126
- tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
127
- var colorsTheme = (0, _useTheme["default"])();
128
-
129
- var _useState = (0, _react.useState)(1),
130
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
131
- page = _useState2[0],
132
- changePage = _useState2[1];
133
-
134
- var _useState3 = (0, _react.useState)(""),
135
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
136
- sortColumnIndex = _useState4[0],
137
- changeSortColumnIndex = _useState4[1];
138
-
139
- var _useState5 = (0, _react.useState)("asc"),
140
- _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
141
- sortOrder = _useState6[0],
142
- changeSortOrder = _useState6[1];
143
-
144
- var minItemsPerPageIndex = (0, _react.useMemo)(function () {
145
- return getMinItemsPerPageIndex(page, itemsPerPage, page);
146
- }, [itemsPerPage, page]);
147
- var maxItemsPerPageIndex = (0, _react.useMemo)(function () {
148
- return getMaxItemsPerPageIndex(minItemsPerPageIndex, itemsPerPage, rows, page);
149
- }, [itemsPerPage, minItemsPerPageIndex, page, rows]);
150
-
151
- var goToPage = function goToPage(newPage) {
152
- changePage(newPage);
153
- };
154
-
155
- var changeSorting = function changeSorting(columnIndex) {
156
- changePage(1);
157
- changeSortColumnIndex(columnIndex);
158
- changeSortOrder(sortColumnIndex === "" || sortColumnIndex !== columnIndex ? "asc" : sortOrder === "asc" ? "desc" : "asc");
159
- };
160
-
161
- var getIconForSortableColumn = function getIconForSortableColumn(clickedColumnIndex) {
162
- return sortColumnIndex === clickedColumnIndex ? sortOrder === "asc" ? /*#__PURE__*/_react["default"].createElement(ArrowUp, null) : /*#__PURE__*/_react["default"].createElement(ArrowDown, null) : /*#__PURE__*/_react["default"].createElement(BothArrows, null);
163
- };
164
-
165
- (0, _react.useEffect)(function () {
166
- if (rows.length > 0) {
167
- changePage(1);
168
- } else {
169
- changePage(0);
170
- }
171
- }, [rows.length, itemsPerPage]);
172
- var sortedResultset = (0, _react.useMemo)(function () {
173
- return sortColumnIndex !== "" ? sortArray(sortColumnIndex, sortOrder, rows) : rows;
174
- }, [sortColumnIndex, sortOrder, rows]);
175
- var filteredResultset = (0, _react.useMemo)(function () {
176
- return sortedResultset && sortedResultset.slice(minItemsPerPageIndex, maxItemsPerPageIndex + 1);
177
- }, [sortedResultset, minItemsPerPageIndex, maxItemsPerPageIndex]);
178
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
179
- theme: colorsTheme.table
180
- }, /*#__PURE__*/_react["default"].createElement(DxcResultsetTableContainer, {
181
- margin: margin
182
- }, /*#__PURE__*/_react["default"].createElement(TableContainer, null, /*#__PURE__*/_react["default"].createElement(_Table["default"], null, /*#__PURE__*/_react["default"].createElement(HeaderRow, null, /*#__PURE__*/_react["default"].createElement("tr", null, columns.map(function (column, index) {
183
- return /*#__PURE__*/_react["default"].createElement(TableHeader, {
184
- key: "tableHeader_".concat(index)
185
- }, /*#__PURE__*/_react["default"].createElement(HeaderContainer, {
186
- key: "headerContainer_".concat(index),
187
- onClick: function onClick() {
188
- return column.isSortable && changeSorting(index);
189
- },
190
- tabIndex: column.isSortable ? tabIndex : -1
191
- }, /*#__PURE__*/_react["default"].createElement(TitleDiv, {
192
- isSortable: column.isSortable
193
- }, column.displayValue), column.isSortable && /*#__PURE__*/_react["default"].createElement(SortIcon, null, getIconForSortableColumn(index))));
194
- }))), /*#__PURE__*/_react["default"].createElement(TableRowGroup, null, filteredResultset.map(function (cells, index) {
195
- return /*#__PURE__*/_react["default"].createElement("tr", {
196
- key: "resultSetTableCell_".concat(index)
197
- }, cells.map(function (cellContent, index) {
198
- return /*#__PURE__*/_react["default"].createElement("td", {
199
- key: "resultSetTableCellContent_".concat(index)
200
- }, cellContent.displayValue);
201
- }));
202
- })))), /*#__PURE__*/_react["default"].createElement(PaginatorContainer, null, /*#__PURE__*/_react["default"].createElement(_Paginator["default"], {
203
- totalItems: rows.length,
204
- itemsPerPage: itemsPerPage,
205
- itemsPerPageOptions: itemsPerPageOptions,
206
- itemsPerPageFunction: itemsPerPageFunction,
207
- currentPage: page,
208
- showGoToPage: true,
209
- onPageChange: goToPage,
210
- tabIndex: tabIndex
211
- }))));
212
- };
213
-
214
- var TableContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n & table {\n table-layout: auto;\n }\n"])));
215
-
216
- var PaginatorContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])([""])));
217
-
218
- var TableRowGroup = _styledComponents["default"].tbody(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n > div:nth-child(1) {\n position: absolute;\n left: calc(50% - 68.5px);\n bottom: calc(50% - 68.5px - 30px);\n }\n & tr {\n height: ", ";\n }\n"])), function (props) {
219
- return props.theme.rowHeight || "70px";
220
- });
221
-
222
- var SortIcon = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n top: 409px;\n left: 390px;\n height: 14px;\n cursor: pointer;\n color: ", ";\n\n svg {\n height: 100%;\n width: 100%;\n }\n"])), function (props) {
223
- return props.theme.sortIconColor;
224
- });
225
-
226
- var TitleDiv = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n cursor: ", ";\n"])), function (props) {
227
- return props.isSortable && "pointer" || "default";
228
- });
229
-
230
- var TableHeader = _styledComponents["default"].th(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])([""])));
231
-
232
- var HeaderContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n align-items: center;\n justify-content: ", ";\n width: 100%;\n"])), function (props) {
233
- return props.theme.headerTextAlign === "center" ? "center" : props.theme.headerTextAlign === "right" ? "flex-end" : "flex-start";
234
- });
235
-
236
- var HeaderRow = _styledComponents["default"].thead(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n height: 60px;\n"])));
237
-
238
- var DxcResultsetTableContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
239
- return props.theme.fontSizeBase;
240
- }, function (props) {
241
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
242
- }, function (props) {
243
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
244
- }, function (props) {
245
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
246
- }, function (props) {
247
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
248
- }, function (props) {
249
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
250
- });
251
-
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
- var _default = DxcResultsetTable;
274
- exports["default"] = _default;
@@ -1,19 +0,0 @@
1
- type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
2
- type Margin = {
3
- top?: Space;
4
- bottom?: Space;
5
- left?: Space;
6
- right?: Space;
7
- };
8
-
9
- type Props = {
10
- columns?: any;
11
- rows?: any;
12
- itemsPerPage?: number;
13
- itemsPerPageOptions?: number[];
14
- itemsPerPageFunction?: void,
15
- margin?: Space | Margin;
16
- tabIndex?: number;
17
- };
18
-
19
- export default function DxcResultsetTable(props: Props): JSX.Element;