@alfalab/core-components-table 2.2.17 → 2.2.19
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/component.js +1 -1
- package/components/index.js +1 -1
- package/components/pagination/Component.js +4 -4
- package/components/pagination/index.css +8 -8
- package/components/pagination/index.js +1 -1
- package/components/pagination/select-field/index.css +4 -4
- package/components/pagination/select-field/index.js +4 -4
- package/components/table/Component.js +4 -4
- package/components/table/index.css +7 -7
- package/components/table/index.js +1 -1
- package/components/table/utils.js +1 -1
- package/components/tbody/Component.js +4 -4
- package/components/tbody/index.css +2 -2
- package/components/tbody/index.js +1 -1
- package/components/tcell/Component.js +4 -4
- package/components/tcell/index.css +6 -6
- package/components/tcell/index.js +1 -1
- package/components/texpandable-row/Component.js +4 -4
- package/components/texpandable-row/index.css +5 -5
- package/components/texpandable-row/index.js +1 -1
- package/components/thead/Component.js +4 -4
- package/components/thead/index.css +6 -6
- package/components/thead/index.js +1 -1
- package/components/thead-cell/Component.js +5 -5
- package/components/thead-cell/index.css +8 -8
- package/components/thead-cell/index.js +1 -1
- package/components/trow/Component.js +4 -4
- package/components/trow/index.css +8 -8
- package/components/trow/index.js +1 -1
- package/components/tsortable-head-cell/Component.js +4 -4
- package/components/tsortable-head-cell/index.css +9 -9
- package/components/tsortable-head-cell/index.js +1 -1
- package/components/tsortable-head-cell/sort-icon-asc.js +2 -2
- package/components/tsortable-head-cell/sort-icon-desc.js +2 -2
- package/components/tsortable-head-cell/sort-icon-unset.js +2 -2
- package/cssm/component.js +1 -1
- package/cssm/components/index.js +1 -1
- package/cssm/components/pagination/Component.js +3 -3
- package/cssm/components/pagination/index.js +1 -1
- package/cssm/components/pagination/select-field/index.js +3 -3
- package/cssm/components/table/Component.js +3 -3
- package/cssm/components/table/index.js +1 -1
- package/cssm/components/table/utils.js +1 -1
- package/cssm/components/tbody/Component.js +3 -3
- package/cssm/components/tbody/index.js +1 -1
- package/cssm/components/tcell/Component.js +3 -3
- package/cssm/components/tcell/index.js +1 -1
- package/cssm/components/texpandable-row/Component.js +3 -3
- package/cssm/components/texpandable-row/index.js +1 -1
- package/cssm/components/thead/Component.js +3 -3
- package/cssm/components/thead/index.js +1 -1
- package/cssm/components/thead-cell/Component.js +4 -4
- package/cssm/components/thead-cell/index.js +1 -1
- package/cssm/components/trow/Component.js +3 -3
- package/cssm/components/trow/index.js +1 -1
- package/cssm/components/tsortable-head-cell/Component.js +3 -3
- package/cssm/components/tsortable-head-cell/index.js +1 -1
- package/cssm/components/tsortable-head-cell/sort-icon-asc.js +2 -2
- package/cssm/components/tsortable-head-cell/sort-icon-desc.js +2 -2
- package/cssm/components/tsortable-head-cell/sort-icon-unset.js +2 -2
- package/cssm/index.js +1 -1
- package/esm/component.js +1 -1
- package/esm/components/index.js +1 -1
- package/esm/components/pagination/Component.js +2 -2
- package/esm/components/pagination/index.css +8 -8
- package/esm/components/pagination/index.js +1 -1
- package/esm/components/pagination/select-field/index.css +4 -4
- package/esm/components/pagination/select-field/index.js +2 -2
- package/esm/components/table/Component.js +2 -2
- package/esm/components/table/index.css +7 -7
- package/esm/components/table/index.js +1 -1
- package/esm/components/table/utils.js +1 -1
- package/esm/components/tbody/Component.js +2 -2
- package/esm/components/tbody/index.css +2 -2
- package/esm/components/tbody/index.js +1 -1
- package/esm/components/tcell/Component.js +2 -2
- package/esm/components/tcell/index.css +6 -6
- package/esm/components/tcell/index.js +1 -1
- package/esm/components/texpandable-row/Component.js +2 -2
- package/esm/components/texpandable-row/index.css +5 -5
- package/esm/components/texpandable-row/index.js +1 -1
- package/esm/components/thead/Component.js +2 -2
- package/esm/components/thead/index.css +6 -6
- package/esm/components/thead/index.js +1 -1
- package/esm/components/thead-cell/Component.js +2 -2
- package/esm/components/thead-cell/index.css +8 -8
- package/esm/components/thead-cell/index.js +1 -1
- package/esm/components/trow/Component.js +2 -2
- package/esm/components/trow/index.css +8 -8
- package/esm/components/trow/index.js +1 -1
- package/esm/components/tsortable-head-cell/Component.js +2 -2
- package/esm/components/tsortable-head-cell/index.css +9 -9
- package/esm/components/tsortable-head-cell/index.js +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-asc.js +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-desc.js +1 -1
- package/esm/components/tsortable-head-cell/sort-icon-unset.js +1 -1
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/modern/components/pagination/Component.js +1 -1
- package/modern/components/pagination/index.css +8 -8
- package/modern/components/pagination/select-field/index.css +4 -4
- package/modern/components/pagination/select-field/index.js +1 -1
- package/modern/components/table/Component.js +1 -1
- package/modern/components/table/index.css +7 -7
- package/modern/components/tbody/Component.js +1 -1
- package/modern/components/tbody/index.css +2 -2
- package/modern/components/tcell/Component.js +1 -1
- package/modern/components/tcell/index.css +6 -6
- package/modern/components/texpandable-row/Component.js +1 -1
- package/modern/components/texpandable-row/index.css +5 -5
- package/modern/components/thead/Component.js +1 -1
- package/modern/components/thead/index.css +6 -6
- package/modern/components/thead-cell/Component.js +1 -1
- package/modern/components/thead-cell/index.css +8 -8
- package/modern/components/trow/Component.js +1 -1
- package/modern/components/trow/index.css +8 -8
- package/modern/components/tsortable-head-cell/Component.js +1 -1
- package/modern/components/tsortable-head-cell/index.css +9 -9
- package/package.json +6 -5
- package/cssm/tslib.es6-bbd6cd2a.d.ts +0 -36
- package/cssm/tslib.es6-bbd6cd2a.js +0 -42
- package/esm/tslib.es6-0643a13a.d.ts +0 -36
- package/esm/tslib.es6-0643a13a.js +0 -40
- package/tslib.es6-3d93368e.d.ts +0 -36
- package/tslib.es6-3d93368e.js +0 -42
package/component.js
CHANGED
|
@@ -9,7 +9,7 @@ var components_tbody_Component = require('./components/tbody/Component.js');
|
|
|
9
9
|
var components_tcell_Component = require('./components/tcell/Component.js');
|
|
10
10
|
var components_trow_Component = require('./components/trow/Component.js');
|
|
11
11
|
var components_texpandableRow_Component = require('./components/texpandable-row/Component.js');
|
|
12
|
-
require('
|
|
12
|
+
require('tslib');
|
|
13
13
|
require('react');
|
|
14
14
|
require('classnames');
|
|
15
15
|
require('./components/table-context/index.js');
|
package/components/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var components_tbody_Component = require('./tbody/Component.js');
|
|
|
9
9
|
var components_tcell_Component = require('./tcell/Component.js');
|
|
10
10
|
var components_trow_Component = require('./trow/Component.js');
|
|
11
11
|
var components_texpandableRow_Component = require('./texpandable-row/Component.js');
|
|
12
|
-
require('
|
|
12
|
+
require('tslib');
|
|
13
13
|
require('react');
|
|
14
14
|
require('classnames');
|
|
15
15
|
require('./table-context/index.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsPagination = require('@alfalab/core-components-pagination');
|
|
@@ -14,11 +14,11 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"component":"
|
|
17
|
+
var styles = {"component":"table__component_bru0s","pagesWrapper":"table__pagesWrapper_bru0s","tag":"table__tag_bru0s","tagActive":"table__tagActive_bru0s","menu":"table__menu_bru0s","option":"table__option_bru0s"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var Pagination = function (_a) {
|
|
21
|
-
var _b = _a.perPage, perPage = _b === void 0 ? 25 : _b, _c = _a.possiblePerPage, possiblePerPage = _c === void 0 ? [25, 50, 100] : _c, _d = _a.onPerPageChange, onPerPageChange = _d === void 0 ? function () { return null; } : _d, pagesCount = _a.pagesCount, _e = _a.onPageChange, onPageChange = _e === void 0 ? function () { return null; } : _e, className = _a.className, dataTestId = _a.dataTestId, restPaginationProps =
|
|
21
|
+
var _b = _a.perPage, perPage = _b === void 0 ? 25 : _b, _c = _a.possiblePerPage, possiblePerPage = _c === void 0 ? [25, 50, 100] : _c, _d = _a.onPerPageChange, onPerPageChange = _d === void 0 ? function () { return null; } : _d, pagesCount = _a.pagesCount, _e = _a.onPageChange, onPageChange = _e === void 0 ? function () { return null; } : _e, className = _a.className, dataTestId = _a.dataTestId, restPaginationProps = tslib.__rest(_a, ["perPage", "possiblePerPage", "onPerPageChange", "pagesCount", "onPageChange", "className", "dataTestId"]);
|
|
22
22
|
var wrapperRef = React.useContext(components_tableContext_index.TableContext).wrapperRef;
|
|
23
23
|
var options = React.useMemo(function () {
|
|
24
24
|
return Array.from(new Set(possiblePerPage.concat(perPage)))
|
|
@@ -42,7 +42,7 @@ var Pagination = function (_a) {
|
|
|
42
42
|
}, [onPageChange, wrapperRef]);
|
|
43
43
|
return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className), "data-test-id": dataTestId },
|
|
44
44
|
React__default.default.createElement(coreComponentsSelect.Select, { options: options, selected: perPage.toString(), onChange: handlePerPageChange, preventFlip: false, size: 's', className: styles.select, optionsListClassName: styles.menu, optionClassName: styles.option, Field: components_pagination_selectField_index.CustomSelectField }),
|
|
45
|
-
pagesCount > 1 && (React__default.default.createElement(coreComponentsPagination.Pagination,
|
|
45
|
+
pagesCount > 1 && (React__default.default.createElement(coreComponentsPagination.Pagination, tslib.__assign({ pagesCount: pagesCount, onPageChange: handlePageChange }, restPaginationProps)))));
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.Pagination = Pagination;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1emuk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
--gap-2xl: 32px;
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
|
-
} .
|
|
23
|
+
} .table__component_bru0s {
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: space-between;
|
|
26
26
|
align-items: flex-start;
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
padding: var(--gap-xl) var(--gap-m) var(--gap-2xl);
|
|
29
29
|
border-top: 1px solid var(--color-light-border-primary);
|
|
30
30
|
box-sizing: border-box;
|
|
31
|
-
} .
|
|
31
|
+
} .table__pagesWrapper_bru0s {
|
|
32
32
|
display: flex;
|
|
33
|
-
} .
|
|
33
|
+
} .table__tag_bru0s.table__tag_bru0s {
|
|
34
34
|
flex-shrink: 0;
|
|
35
35
|
margin-right: var(--gap-xs);
|
|
36
36
|
padding: 0 var(--gap-xs);
|
|
37
37
|
min-width: 32px
|
|
38
|
-
} .
|
|
38
|
+
} .table__tag_bru0s.table__tag_bru0s:last-child {
|
|
39
39
|
margin-right: 0;
|
|
40
|
-
} .
|
|
40
|
+
} .table__tag_bru0s.table__tag_bru0s.table__tagActive_bru0s {
|
|
41
41
|
cursor: default;
|
|
42
|
-
} .
|
|
42
|
+
} .table__menu_bru0s {
|
|
43
43
|
margin: var(--gap-2xs) 0;
|
|
44
|
-
} .
|
|
44
|
+
} .table__option_bru0s {
|
|
45
45
|
min-width: 208px;
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1tn4x */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-specialbg-component-shade-7: rgba(10, 29, 49, 0.1351);
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .table__field_85x72 svg {
|
|
19
19
|
width: 18px;
|
|
20
20
|
height: 18px;
|
|
21
|
-
} .
|
|
22
|
-
.
|
|
21
|
+
} .table__open_85x72,
|
|
22
|
+
.table__open_85x72:hover {
|
|
23
23
|
background-color: var(--color-light-specialbg-component-shade-7);
|
|
24
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
@@ -10,15 +10,15 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"field":"
|
|
13
|
+
var styles = {"field":"table__field_85x72","open":"table__open_85x72"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var CustomSelectField = function (_a) {
|
|
17
17
|
var _b;
|
|
18
18
|
var selected = _a.selected, innerProps = _a.innerProps, Arrow = _a.Arrow, open = _a.open;
|
|
19
|
-
var ref = innerProps.ref, restInnerProps =
|
|
19
|
+
var ref = innerProps.ref, restInnerProps = tslib.__rest(innerProps, ["ref"]);
|
|
20
20
|
return (React__default.default.createElement("div", { ref: ref },
|
|
21
|
-
React__default.default.createElement(coreComponentsButton.Button,
|
|
21
|
+
React__default.default.createElement(coreComponentsButton.Button, tslib.__assign({}, restInnerProps, { size: 'xxs', view: 'link', className: cn__default.default(styles.field, (_b = {}, _b[styles.open] = open, _b)), rightAddons: Arrow }), selected === null || selected === void 0 ? void 0 : selected.content)));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
exports.CustomSelectField = CustomSelectField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
@@ -13,12 +13,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"component":"
|
|
16
|
+
var styles = {"component":"table__component_kr3ic","wrapper":"table__wrapper_kr3ic","stickyHeader":"table__stickyHeader_kr3ic","hasPagination":"table__hasPagination_kr3ic","table":"table__table_kr3ic"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Table = React.forwardRef(function (_a, ref) {
|
|
20
20
|
var _b;
|
|
21
|
-
var className = _a.className, children = _a.children, _c = _a.compactView, compactView = _c === void 0 ? false : _c, _d = _a.compactHorizontal, compactHorizontal = _d === void 0 ? false : _d, _e = _a.wrapper, wrapper = _e === void 0 ? true : _e, pagination = _a.pagination, dataTestId = _a.dataTestId, _f = _a.stickyHeader, stickyHeader = _f === void 0 ? false : _f, restProps =
|
|
21
|
+
var className = _a.className, children = _a.children, _c = _a.compactView, compactView = _c === void 0 ? false : _c, _d = _a.compactHorizontal, compactHorizontal = _d === void 0 ? false : _d, _e = _a.wrapper, wrapper = _e === void 0 ? true : _e, pagination = _a.pagination, dataTestId = _a.dataTestId, _f = _a.stickyHeader, stickyHeader = _f === void 0 ? false : _f, restProps = tslib.__rest(_a, ["className", "children", "compactView", "compactHorizontal", "wrapper", "pagination", "dataTestId", "stickyHeader"]);
|
|
22
22
|
var wrapperRef = React.useRef(null);
|
|
23
23
|
var columnsConfiguration = React.useMemo(function () {
|
|
24
24
|
return components_table_utils.findAllHeadCellsProps(children).map(function (columnProps, index) { return ({
|
|
@@ -41,7 +41,7 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
41
41
|
_b[styles.hasPagination] = !!pagination,
|
|
42
42
|
_b[styles.stickyHeader] = stickyHeader,
|
|
43
43
|
_b)), "data-test-id": dataTestId },
|
|
44
|
-
React__default.default.createElement("table",
|
|
44
|
+
React__default.default.createElement("table", tslib.__assign({ ref: ref, className: styles.table }, restProps), children),
|
|
45
45
|
pagination)));
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1whaq */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -19,24 +19,24 @@
|
|
|
19
19
|
--gap-m: 16px;
|
|
20
20
|
} :root {
|
|
21
21
|
} :root {
|
|
22
|
-
} .
|
|
22
|
+
} .table__component_kr3ic {
|
|
23
23
|
box-sizing: border-box;
|
|
24
|
-
} .
|
|
24
|
+
} .table__wrapper_kr3ic {
|
|
25
25
|
padding: 0 var(--gap-m) var(--gap-m);
|
|
26
26
|
background: var(--color-light-bg-primary);
|
|
27
27
|
box-shadow: var(--shadow-xs-hard);
|
|
28
28
|
border-radius: var(--border-radius-m);
|
|
29
29
|
overflow: auto;
|
|
30
|
-
} .
|
|
30
|
+
} .table__stickyHeader_kr3ic {
|
|
31
31
|
max-height: 100%;
|
|
32
|
-
} .
|
|
32
|
+
} .table__hasPagination_kr3ic {
|
|
33
33
|
padding-bottom: 0;
|
|
34
|
-
} .
|
|
34
|
+
} .table__table_kr3ic {
|
|
35
35
|
width: 100%;
|
|
36
36
|
border-collapse: collapse;
|
|
37
37
|
box-sizing: border-box
|
|
38
38
|
|
|
39
39
|
/* TODO: Хак для выравнивания чекбокса */
|
|
40
|
-
} .
|
|
40
|
+
} .table__table_kr3ic td:first-child label > *[class^='box'], .table__table_kr3ic th:first-child label > *[class^='box'] {
|
|
41
41
|
margin-top: 0;
|
|
42
42
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var utils = require('../../utils.js');
|
|
5
5
|
var components_thead_Component = require('../thead/Component.js');
|
|
6
|
-
require('
|
|
6
|
+
require('tslib');
|
|
7
7
|
require('classnames');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
|
|
@@ -9,12 +9,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
11
|
|
|
12
|
-
var styles = {"component":"
|
|
12
|
+
var styles = {"component":"table__component_grcuj"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var TBody = function (_a) {
|
|
16
|
-
var className = _a.className, children = _a.children, dataTestId = _a.dataTestId, restProps =
|
|
17
|
-
return (React__default.default.createElement("tbody",
|
|
16
|
+
var className = _a.className, children = _a.children, dataTestId = _a.dataTestId, restProps = tslib.__rest(_a, ["className", "children", "dataTestId"]);
|
|
17
|
+
return (React__default.default.createElement("tbody", tslib.__assign({ className: cn__default.default(styles.component, className), "data-test-id": dataTestId }, restProps), children));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
exports.TBody = TBody;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: z7k9v */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .
|
|
17
|
+
} .table__component_grcuj {
|
|
18
18
|
width: 100%;
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
@@ -10,11 +10,11 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"component":"
|
|
13
|
+
var styles = {"component":"table__component_1vblc","compactHorizontal":"table__compactHorizontal_1vblc","compact":"table__compact_1vblc"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var TCell = function (_a) {
|
|
17
|
-
var className = _a.className, style = _a.style, dataTestId = _a.dataTestId, children = _a.children, index = _a.index, restProps =
|
|
17
|
+
var className = _a.className, style = _a.style, dataTestId = _a.dataTestId, children = _a.children, index = _a.index, restProps = tslib.__rest(_a, ["className", "style", "dataTestId", "children", "index"]);
|
|
18
18
|
var _b = React.useContext(components_tableContext_index.TableContext), columnsConfiguration = _b.columnsConfiguration, compactView = _b.compactView, compactHorizontal = _b.compactHorizontal;
|
|
19
19
|
var column = index === undefined ? null : columnsConfiguration[index];
|
|
20
20
|
var width = column === null || column === void 0 ? void 0 : column.width;
|
|
@@ -22,7 +22,7 @@ var TCell = function (_a) {
|
|
|
22
22
|
var hidden = (column === null || column === void 0 ? void 0 : column.hidden) || false;
|
|
23
23
|
if (hidden)
|
|
24
24
|
return null;
|
|
25
|
-
return (React__default.default.createElement("td",
|
|
25
|
+
return (React__default.default.createElement("td", tslib.__assign({ className: cn__default.default(styles.component, className, compactView && styles.compact, compactHorizontal && styles.compactHorizontal), style: tslib.__assign(tslib.__assign({}, style), { width: width, textAlign: textAlign }), "data-test-id": dataTestId }, restProps), children));
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
exports.TCell = TCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 13ib5 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
--gap-xl: 24px;
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
|
-
} .
|
|
23
|
+
} .table__component_1vblc {
|
|
24
24
|
font-size: 14px;
|
|
25
25
|
line-height: 20px;
|
|
26
26
|
font-weight: 400;
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
border-top: 1px solid var(--color-light-border-primary);
|
|
32
32
|
vertical-align: top;
|
|
33
33
|
box-sizing: border-box
|
|
34
|
-
} .
|
|
34
|
+
} .table__component_1vblc:first-child {
|
|
35
35
|
padding-left: var(--gap-m);
|
|
36
|
-
} .
|
|
36
|
+
} .table__component_1vblc:last-child {
|
|
37
37
|
padding-right: var(--gap-m);
|
|
38
|
-
} .
|
|
38
|
+
} .table__compactHorizontal_1vblc {
|
|
39
39
|
padding-left: 6px;
|
|
40
40
|
padding-right: 6px;
|
|
41
|
-
} .
|
|
41
|
+
} .table__compact_1vblc {
|
|
42
42
|
padding-top: var(--gap-xs);
|
|
43
43
|
padding-bottom: var(--gap-xs);
|
|
44
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_trow_Component = require('../trow/Component.js');
|
|
@@ -10,12 +10,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"row":"
|
|
13
|
+
var styles = {"row":"table__row_4qjso","selected":"table__selected_4qjso","expanded":"table__expanded_4qjso","expandable":"table__expandable_4qjso"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var TExpandableRow = function (_a) {
|
|
17
17
|
var _b, _c;
|
|
18
|
-
var className = _a.className, selected = _a.selected, expanded = _a.expanded, _d = _a.defaultExpanded, defaultExpanded = _d === void 0 ? false : _d, _e = _a.onToggle, onToggle = _e === void 0 ? function () { return null; } : _e, _f = _a.renderContent, renderContent = _f === void 0 ? function () { return null; } : _f, restProps =
|
|
18
|
+
var className = _a.className, selected = _a.selected, expanded = _a.expanded, _d = _a.defaultExpanded, defaultExpanded = _d === void 0 ? false : _d, _e = _a.onToggle, onToggle = _e === void 0 ? function () { return null; } : _e, _f = _a.renderContent, renderContent = _f === void 0 ? function () { return null; } : _f, restProps = tslib.__rest(_a, ["className", "selected", "expanded", "defaultExpanded", "onToggle", "renderContent"]);
|
|
19
19
|
var _g = React.useState(defaultExpanded), expandedState = _g[0], setExpandedState = _g[1];
|
|
20
20
|
var uncontrolled = expanded === undefined;
|
|
21
21
|
var isExpanded = (uncontrolled ? expandedState : expanded);
|
|
@@ -26,7 +26,7 @@ var TExpandableRow = function (_a) {
|
|
|
26
26
|
onToggle(isExpanded);
|
|
27
27
|
};
|
|
28
28
|
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
29
|
-
React__default.default.createElement(components_trow_Component.TRow,
|
|
29
|
+
React__default.default.createElement(components_trow_Component.TRow, tslib.__assign({ className: cn__default.default(styles.row, className, (_b = {},
|
|
30
30
|
_b[styles.selected] = selected,
|
|
31
31
|
_b[styles.expanded] = isExpanded,
|
|
32
32
|
_b)), selected: selected, onClick: handleToggle }, restProps)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 57hns */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
} :root {
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
|
-
} .
|
|
17
|
+
} .table__row_4qjso {
|
|
18
18
|
cursor: pointer;
|
|
19
|
-
} .
|
|
19
|
+
} .table__selected_4qjso.table__expanded_4qjso {
|
|
20
20
|
background-color: inherit;
|
|
21
|
-
} .
|
|
21
|
+
} .table__expanded_4qjso:hover {
|
|
22
22
|
background-color: inherit;
|
|
23
|
-
} .
|
|
23
|
+
} .table__expandable_4qjso td {
|
|
24
24
|
margin: 0;
|
|
25
25
|
padding-top: 0;
|
|
26
26
|
padding-bottom: 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
|
|
@@ -9,12 +9,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
11
|
|
|
12
|
-
var styles = {"component":"
|
|
12
|
+
var styles = {"component":"table__component_15cin","row":"table__row_15cin"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var THead = function (_a) {
|
|
16
|
-
var className = _a.className, rowClassName = _a.rowClassName, children = _a.children, dataTestId = _a.dataTestId, restProps =
|
|
17
|
-
return (React__default.default.createElement("thead",
|
|
16
|
+
var className = _a.className, rowClassName = _a.rowClassName, children = _a.children, dataTestId = _a.dataTestId, restProps = tslib.__rest(_a, ["className", "rowClassName", "children", "dataTestId"]);
|
|
17
|
+
return (React__default.default.createElement("thead", tslib.__assign({ className: cn__default.default(styles.component, className), "data-test-id": dataTestId }, restProps),
|
|
18
18
|
React__default.default.createElement("tr", { className: cn__default.default(styles.row, rowClassName) }, children)));
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: uegqg */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-quaternary: #dbdee1;
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
--gap-xs: 8px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .table__component_15cin {
|
|
20
20
|
position: relative;
|
|
21
21
|
width: 100%;
|
|
22
22
|
box-sizing: border-box
|
|
23
|
-
} .
|
|
23
|
+
} .table__component_15cin th:not(:last-child):not(:empty):after {
|
|
24
24
|
transition: opacity 0.2s;
|
|
25
25
|
position: absolute;
|
|
26
26
|
content: '';
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
top: var(--gap-xs);
|
|
32
32
|
bottom: var(--gap-xs);
|
|
33
33
|
background-color: var(--color-light-graphic-quaternary);
|
|
34
|
-
} .
|
|
34
|
+
} .table__component_15cin th:after {
|
|
35
35
|
opacity: 0;
|
|
36
|
-
} .
|
|
36
|
+
} .table__component_15cin:hover th:after {
|
|
37
37
|
opacity: 1;
|
|
38
|
-
} .
|
|
38
|
+
} .table__row_15cin {
|
|
39
39
|
height: 72px;
|
|
40
40
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
@@ -10,18 +10,18 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"component":"
|
|
13
|
+
var styles = {"component":"table__component_15bjy","sortable":"table__sortable_15bjy","sorted":"table__sorted_15bjy","stickyHeader":"table__stickyHeader_15bjy","compactHorizontal":"table__compactHorizontal_15bjy"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var THeadCell = function (_a) {
|
|
17
17
|
var _b;
|
|
18
|
-
var children = _a.children, className = _a.className, dataTestId = _a.dataTestId, style = _a.style, width = _a.width, textAlign = _a.textAlign, hidden = _a.hidden, restProps =
|
|
18
|
+
var children = _a.children, className = _a.className, dataTestId = _a.dataTestId, style = _a.style, width = _a.width, textAlign = _a.textAlign, hidden = _a.hidden, restProps = tslib.__rest(_a, ["children", "className", "dataTestId", "style", "width", "textAlign", "hidden"]);
|
|
19
19
|
var _c = React.useContext(components_tableContext_index.TableContext), compactHorizontal = _c.compactHorizontal, stickyHeader = _c.stickyHeader;
|
|
20
20
|
if (hidden)
|
|
21
21
|
return null;
|
|
22
|
-
return (React__default.default.createElement("th",
|
|
22
|
+
return (React__default.default.createElement("th", tslib.__assign({ className: cn__default.default(styles.component, className, compactHorizontal && styles.compactHorizontal, (_b = {},
|
|
23
23
|
_b[styles.stickyHeader] = stickyHeader,
|
|
24
|
-
_b)), style:
|
|
24
|
+
_b)), style: tslib.__assign(tslib.__assign({}, style), { width: width, textAlign: textAlign }), "data-test-id": dataTestId }, restProps), children));
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
exports.THeadCell = THeadCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 12216 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
--gap-2xl: 32px;
|
|
22
22
|
} :root {
|
|
23
23
|
} :root {
|
|
24
|
-
} .
|
|
24
|
+
} .table__component_15bjy {
|
|
25
25
|
font-size: 12px;
|
|
26
26
|
line-height: 16px;
|
|
27
27
|
font-weight: 500;
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
background: var(--color-light-bg-primary);
|
|
38
38
|
vertical-align: top;
|
|
39
39
|
box-sizing: border-box
|
|
40
|
-
} .
|
|
40
|
+
} .table__component_15bjy:first-child {
|
|
41
41
|
padding-left: var(--gap-m);
|
|
42
|
-
} .
|
|
42
|
+
} .table__component_15bjy:last-child {
|
|
43
43
|
padding-right: var(--gap-m);
|
|
44
|
-
} .
|
|
44
|
+
} .table__sortable_15bjy {
|
|
45
45
|
cursor: pointer;
|
|
46
|
-
} .
|
|
46
|
+
} .table__sorted_15bjy {
|
|
47
47
|
color: var(--color-light-text-primary);
|
|
48
|
-
} .
|
|
48
|
+
} .table__stickyHeader_15bjy {
|
|
49
49
|
top: 0;
|
|
50
50
|
position: sticky;
|
|
51
51
|
box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);
|
|
52
52
|
border: none;
|
|
53
53
|
z-index: 1;
|
|
54
|
-
} .
|
|
54
|
+
} .table__compactHorizontal_15bjy {
|
|
55
55
|
padding-left: 6px;
|
|
56
56
|
padding-right: 6px;
|
|
57
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib = require('tslib');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
|
|
@@ -9,13 +9,13 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
11
|
|
|
12
|
-
var styles = {"component":"
|
|
12
|
+
var styles = {"component":"table__component_yen5r","withoutBorder":"table__withoutBorder_yen5r","clickable":"table__clickable_yen5r","selected":"table__selected_yen5r"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var TRow = function (_a) {
|
|
16
16
|
var _b;
|
|
17
|
-
var children = _a.children, className = _a.className, selected = _a.selected, withoutBorder = _a.withoutBorder, dataTestId = _a.dataTestId, restProps =
|
|
18
|
-
return (React__default.default.createElement("tr",
|
|
17
|
+
var children = _a.children, className = _a.className, selected = _a.selected, withoutBorder = _a.withoutBorder, dataTestId = _a.dataTestId, restProps = tslib.__rest(_a, ["children", "className", "selected", "withoutBorder", "dataTestId"]);
|
|
18
|
+
return (React__default.default.createElement("tr", tslib.__assign({ className: cn__default.default(styles.component, className, (_b = {},
|
|
19
19
|
_b[styles.clickable] = typeof restProps.onClick !== 'undefined',
|
|
20
20
|
_b[styles.selected] = selected,
|
|
21
21
|
_b[styles.withoutBorder] = withoutBorder,
|