@alfalab/core-components-table 2.2.7 → 2.2.9
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 +10 -5
- 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 +9 -4
- package/components/table/Component.js +10 -5
- package/components/table/index.css +7 -7
- package/components/table/index.js +1 -1
- package/components/table/utils.js +7 -3
- package/components/table-context/index.js +5 -1
- package/components/tbody/Component.js +8 -3
- package/components/tbody/index.css +2 -2
- package/components/tbody/index.js +1 -1
- package/components/tcell/Component.js +8 -3
- package/components/tcell/index.css +6 -6
- package/components/tcell/index.js +1 -1
- package/components/texpandable-row/Component.js +10 -5
- package/components/texpandable-row/index.css +5 -5
- package/components/texpandable-row/index.js +1 -1
- package/components/thead/Component.js +9 -4
- package/components/thead/index.css +6 -6
- package/components/thead/index.js +1 -1
- package/components/thead-cell/Component.js +8 -3
- package/components/thead-cell/index.css +8 -8
- package/components/thead-cell/index.js +1 -1
- package/components/trow/Component.js +9 -4
- package/components/trow/index.css +8 -8
- package/components/trow/index.js +1 -1
- package/components/tsortable-head-cell/Component.js +10 -5
- 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 +7 -3
- package/components/tsortable-head-cell/sort-icon-desc.js +7 -3
- package/components/tsortable-head-cell/sort-icon-unset.js +7 -3
- package/cssm/components/pagination/Component.js +9 -3
- package/cssm/components/pagination/select-field/index.js +8 -2
- package/cssm/components/table/Component.js +12 -6
- package/cssm/components/table/utils.js +6 -2
- package/cssm/components/table-context/index.js +5 -1
- package/cssm/components/tbody/Component.js +7 -1
- package/cssm/components/tcell/Component.js +7 -1
- package/cssm/components/texpandable-row/Component.js +11 -5
- package/cssm/components/thead/Component.js +8 -2
- package/cssm/components/thead-cell/Component.js +8 -2
- package/cssm/components/trow/Component.js +11 -5
- package/cssm/components/tsortable-head-cell/Component.js +10 -4
- package/cssm/components/tsortable-head-cell/sort-icon-asc.js +6 -2
- package/cssm/components/tsortable-head-cell/sort-icon-desc.js +6 -2
- package/cssm/components/tsortable-head-cell/sort-icon-unset.js +6 -2
- package/cssm/utils.js +5 -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/esm/{tslib.es6-c7b61e8d.d.ts → tslib.es6-39818cc0.d.ts} +0 -0
- package/esm/{tslib.es6-c7b61e8d.js → tslib.es6-39818cc0.js} +0 -0
- 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 +4 -4
- package/{tslib.es6-73285132.d.ts → tslib.es6-546d89c7.d.ts} +0 -0
- package/{tslib.es6-73285132.js → tslib.es6-546d89c7.js} +0 -0
- package/utils.js +5 -1
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('./tslib.es6-
|
|
12
|
+
require('./tslib.es6-546d89c7.js');
|
|
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('../tslib.es6-
|
|
12
|
+
require('../tslib.es6-546d89c7.js');
|
|
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 tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsPagination = require('@alfalab/core-components-pagination');
|
|
@@ -9,7 +9,12 @@ var components_tableContext_index = require('../table-context/index.js');
|
|
|
9
9
|
var components_pagination_selectField_index = require('./select-field/index.js');
|
|
10
10
|
require('@alfalab/core-components-button');
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
|
+
|
|
17
|
+
var styles = {"component":"table__component_rztdn","pagesWrapper":"table__pagesWrapper_rztdn","tag":"table__tag_rztdn","tagActive":"table__tagActive_rztdn","menu":"table__menu_rztdn","option":"table__option_rztdn"};
|
|
13
18
|
require('./index.css')
|
|
14
19
|
|
|
15
20
|
var Pagination = function (_a) {
|
|
@@ -35,9 +40,9 @@ var Pagination = function (_a) {
|
|
|
35
40
|
}
|
|
36
41
|
}, 0);
|
|
37
42
|
}, [onPageChange, wrapperRef]);
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
pagesCount > 1 && (
|
|
43
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className), "data-test-id": dataTestId },
|
|
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, tslib_es6.__assign({ pagesCount: pagesCount, onPageChange: handlePageChange }, restPaginationProps)))));
|
|
41
46
|
};
|
|
42
47
|
|
|
43
48
|
exports.Pagination = Pagination;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 14nb0 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--gap-xl: 24px;
|
|
18
18
|
--gap-2xl: 32px;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.table__component_rztdn {
|
|
21
21
|
display: flex;
|
|
22
22
|
justify-content: space-between;
|
|
23
23
|
align-items: flex-start;
|
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
border-top: 1px solid var(--color-light-border-primary);
|
|
27
27
|
box-sizing: border-box;
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.table__pagesWrapper_rztdn {
|
|
30
30
|
display: flex;
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.table__tag_rztdn.table__tag_rztdn {
|
|
33
33
|
flex-shrink: 0;
|
|
34
34
|
margin-right: var(--gap-xs);
|
|
35
35
|
padding: 0 var(--gap-xs);
|
|
36
36
|
min-width: 32px
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.table__tag_rztdn.table__tag_rztdn:last-child {
|
|
39
39
|
margin-right: 0;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.table__tag_rztdn.table__tag_rztdn.table__tagActive_rztdn {
|
|
42
42
|
cursor: default;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
.table__menu_rztdn {
|
|
45
45
|
margin: var(--gap-2xs) 0;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.table__option_rztdn {
|
|
48
48
|
min-width: 208px;
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: a30n2 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-specialbg-component-shade-7: rgba(10, 29, 49, 0.1351);
|
|
4
4
|
}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.table__field_16yqk svg {
|
|
14
14
|
width: 18px;
|
|
15
15
|
height: 18px;
|
|
16
16
|
}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
17
|
+
.table__open_16yqk,
|
|
18
|
+
.table__open_16yqk:hover {
|
|
19
19
|
background-color: var(--color-light-specialbg-component-shade-7);
|
|
20
20
|
}
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsButton = require('@alfalab/core-components-button');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
|
|
13
|
+
var styles = {"field":"table__field_16yqk","open":"table__open_16yqk"};
|
|
9
14
|
require('./index.css')
|
|
10
15
|
|
|
11
16
|
var CustomSelectField = function (_a) {
|
|
12
17
|
var _b;
|
|
13
18
|
var selected = _a.selected, innerProps = _a.innerProps, Arrow = _a.Arrow, open = _a.open;
|
|
14
19
|
var ref = innerProps.ref, restInnerProps = tslib_es6.__rest(innerProps, ["ref"]);
|
|
15
|
-
return (
|
|
16
|
-
|
|
20
|
+
return (React__default.default.createElement("div", { ref: ref },
|
|
21
|
+
React__default.default.createElement(coreComponentsButton.Button, tslib_es6.__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)));
|
|
17
22
|
};
|
|
18
23
|
|
|
19
24
|
exports.CustomSelectField = CustomSelectField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
@@ -8,7 +8,12 @@ var components_table_utils = require('./utils.js');
|
|
|
8
8
|
require('../../utils.js');
|
|
9
9
|
require('../thead/Component.js');
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
|
+
|
|
16
|
+
var styles = {"component":"table__component_11afe","wrapper":"table__wrapper_11afe","stickyHeader":"table__stickyHeader_11afe","hasPagination":"table__hasPagination_11afe","table":"table__table_11afe"};
|
|
12
17
|
require('./index.css')
|
|
13
18
|
|
|
14
19
|
var Table = React.forwardRef(function (_a, ref) {
|
|
@@ -24,19 +29,19 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
24
29
|
}); });
|
|
25
30
|
}, [children]);
|
|
26
31
|
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
27
|
-
return (
|
|
32
|
+
return (React__default.default.createElement(components_tableContext_index.TableContext.Provider, { value: {
|
|
28
33
|
stickyHeader: stickyHeader,
|
|
29
34
|
columnsConfiguration: columnsConfiguration,
|
|
30
35
|
compactView: compactView,
|
|
31
36
|
compactHorizontal: compactHorizontal,
|
|
32
37
|
wrapperRef: wrapperRef,
|
|
33
38
|
} },
|
|
34
|
-
|
|
39
|
+
React__default.default.createElement("div", { ref: wrapperRef, className: cn__default.default(styles.component, className, (_b = {},
|
|
35
40
|
_b[styles.wrapper] = wrapper,
|
|
36
41
|
_b[styles.hasPagination] = !!pagination,
|
|
37
42
|
_b[styles.stickyHeader] = stickyHeader,
|
|
38
43
|
_b)), "data-test-id": dataTestId },
|
|
39
|
-
|
|
44
|
+
React__default.default.createElement("table", tslib_es6.__assign({ ref: ref, className: styles.table }, restProps), children),
|
|
40
45
|
pagination)));
|
|
41
46
|
});
|
|
42
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1gzm3 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -18,29 +18,29 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--border-radius-m: 8px;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.table__component_11afe {
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.table__wrapper_11afe {
|
|
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
|
}
|
|
31
|
-
.
|
|
31
|
+
.table__stickyHeader_11afe {
|
|
32
32
|
max-height: 100%;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.table__hasPagination_11afe {
|
|
35
35
|
padding-bottom: 0;
|
|
36
36
|
}
|
|
37
|
-
.
|
|
37
|
+
.table__table_11afe {
|
|
38
38
|
width: 100%;
|
|
39
39
|
border-collapse: collapse;
|
|
40
40
|
box-sizing: border-box
|
|
41
41
|
|
|
42
42
|
/* TODO: Хак для выравнивания чекбокса */
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
.table__table_11afe td:first-child label > *[class^='box'], .table__table_11afe th:first-child label > *[class^='box'] {
|
|
45
45
|
margin-top: 0;
|
|
46
46
|
}
|
|
@@ -3,14 +3,18 @@
|
|
|
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('../../tslib.es6-
|
|
6
|
+
require('../../tslib.es6-546d89c7.js');
|
|
7
7
|
require('classnames');
|
|
8
8
|
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
|
+
|
|
9
13
|
function findAllHeadCellsProps(children) {
|
|
10
14
|
var result = [];
|
|
11
|
-
|
|
15
|
+
React__default.default.Children.forEach(children, function (child) {
|
|
12
16
|
if (utils.isChildInstanceOf(child, components_thead_Component.THead)) {
|
|
13
|
-
|
|
17
|
+
React__default.default.Children.forEach(child.props.children, function (headChild) {
|
|
14
18
|
result.push(headChild.props);
|
|
15
19
|
});
|
|
16
20
|
}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
|
+
|
|
5
9
|
var DEFAULT_TABLE_CONTEXT = {
|
|
6
10
|
columnsConfiguration: [],
|
|
7
11
|
compactView: false,
|
|
@@ -9,7 +13,7 @@ var DEFAULT_TABLE_CONTEXT = {
|
|
|
9
13
|
compactHorizontal: false,
|
|
10
14
|
wrapperRef: { current: null },
|
|
11
15
|
};
|
|
12
|
-
var TableContext =
|
|
16
|
+
var TableContext = React__default.default.createContext(DEFAULT_TABLE_CONTEXT);
|
|
13
17
|
|
|
14
18
|
exports.DEFAULT_TABLE_CONTEXT = DEFAULT_TABLE_CONTEXT;
|
|
15
19
|
exports.TableContext = TableContext;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
|
+
|
|
12
|
+
var styles = {"component":"table__component_1vxg3"};
|
|
8
13
|
require('./index.css')
|
|
9
14
|
|
|
10
15
|
var TBody = function (_a) {
|
|
11
16
|
var className = _a.className, children = _a.children, dataTestId = _a.dataTestId, restProps = tslib_es6.__rest(_a, ["className", "children", "dataTestId"]);
|
|
12
|
-
return (
|
|
17
|
+
return (React__default.default.createElement("tbody", tslib_es6.__assign({ className: cn__default.default(styles.component, className), "data-test-id": dataTestId }, restProps), children));
|
|
13
18
|
};
|
|
14
19
|
|
|
15
20
|
exports.TBody = TBody;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
|
|
13
|
+
var styles = {"component":"table__component_1gw93","compactHorizontal":"table__compactHorizontal_1gw93","compact":"table__compact_1gw93"};
|
|
9
14
|
require('./index.css')
|
|
10
15
|
|
|
11
16
|
var TCell = function (_a) {
|
|
@@ -17,7 +22,7 @@ var TCell = function (_a) {
|
|
|
17
22
|
var hidden = (column === null || column === void 0 ? void 0 : column.hidden) || false;
|
|
18
23
|
if (hidden)
|
|
19
24
|
return null;
|
|
20
|
-
return (
|
|
25
|
+
return (React__default.default.createElement("td", tslib_es6.__assign({ className: cn__default.default(styles.component, className, compactView && styles.compact, compactHorizontal && styles.compactHorizontal), style: tslib_es6.__assign(tslib_es6.__assign({}, style), { width: width, textAlign: textAlign }), "data-test-id": dataTestId }, restProps), children));
|
|
21
26
|
};
|
|
22
27
|
|
|
23
28
|
exports.TCell = TCell;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1yaem */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-primary: #dbdee1;
|
|
4
4
|
--color-light-text-primary: #0b1f35;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--gap-m: 16px;
|
|
18
18
|
--gap-xl: 24px;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.table__component_1gw93 {
|
|
21
21
|
font-size: 14px;
|
|
22
22
|
line-height: 20px;
|
|
23
23
|
font-weight: 400;
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
vertical-align: top;
|
|
30
30
|
box-sizing: border-box
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.table__component_1gw93:first-child {
|
|
33
33
|
padding-left: var(--gap-m);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.table__component_1gw93:last-child {
|
|
36
36
|
padding-right: var(--gap-m);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.table__compactHorizontal_1gw93 {
|
|
39
39
|
padding-left: 6px;
|
|
40
40
|
padding-right: 6px;
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.table__compact_1gw93 {
|
|
43
43
|
padding-top: var(--gap-xs);
|
|
44
44
|
padding-bottom: var(--gap-xs);
|
|
45
45
|
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_trow_Component = require('../trow/Component.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
|
|
13
|
+
var styles = {"row":"table__row_kq7id","selected":"table__selected_kq7id","expanded":"table__expanded_kq7id","expandable":"table__expandable_kq7id"};
|
|
9
14
|
require('./index.css')
|
|
10
15
|
|
|
11
16
|
var TExpandableRow = function (_a) {
|
|
@@ -20,12 +25,12 @@ var TExpandableRow = function (_a) {
|
|
|
20
25
|
}
|
|
21
26
|
onToggle(isExpanded);
|
|
22
27
|
};
|
|
23
|
-
return (
|
|
24
|
-
|
|
28
|
+
return (React__default.default.createElement(React__default.default.Fragment, null,
|
|
29
|
+
React__default.default.createElement(components_trow_Component.TRow, tslib_es6.__assign({ className: cn__default.default(styles.row, className, (_b = {},
|
|
25
30
|
_b[styles.selected] = selected,
|
|
26
31
|
_b[styles.expanded] = isExpanded,
|
|
27
32
|
_b)), selected: selected, onClick: handleToggle }, restProps)),
|
|
28
|
-
|
|
33
|
+
React__default.default.createElement("tr", { className: cn__default.default(styles.expandable, (_c = {}, _c[styles.expanded] = isExpanded, _c)) }, renderContent(isExpanded))));
|
|
29
34
|
};
|
|
30
35
|
|
|
31
36
|
exports.TExpandableRow = TExpandableRow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1xjhk */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
/* Hard up */
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.table__row_kq7id {
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.table__selected_kq7id.table__expanded_kq7id {
|
|
14
14
|
background-color: inherit;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.table__expanded_kq7id:hover {
|
|
17
17
|
background-color: inherit;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
.table__expandable_kq7id td {
|
|
20
20
|
margin: 0;
|
|
21
21
|
padding-top: 0;
|
|
22
22
|
padding-bottom: 0;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
|
+
|
|
12
|
+
var styles = {"component":"table__component_1qd46","row":"table__row_1qd46"};
|
|
8
13
|
require('./index.css')
|
|
9
14
|
|
|
10
15
|
var THead = function (_a) {
|
|
11
16
|
var className = _a.className, rowClassName = _a.rowClassName, children = _a.children, dataTestId = _a.dataTestId, restProps = tslib_es6.__rest(_a, ["className", "rowClassName", "children", "dataTestId"]);
|
|
12
|
-
return (
|
|
13
|
-
|
|
17
|
+
return (React__default.default.createElement("thead", tslib_es6.__assign({ className: cn__default.default(styles.component, className), "data-test-id": dataTestId }, restProps),
|
|
18
|
+
React__default.default.createElement("tr", { className: cn__default.default(styles.row, rowClassName) }, children)));
|
|
14
19
|
};
|
|
15
20
|
|
|
16
21
|
exports.THead = THead;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: br9sw */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-quaternary: #dbdee1;
|
|
4
4
|
}
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-xs: 8px;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.table__component_1qd46 {
|
|
17
17
|
position: relative;
|
|
18
18
|
width: 100%;
|
|
19
19
|
box-sizing: border-box
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.table__component_1qd46 th:not(:last-child):not(:empty):after {
|
|
22
22
|
transition: opacity 0.2s;
|
|
23
23
|
position: absolute;
|
|
24
24
|
content: '';
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
bottom: var(--gap-xs);
|
|
31
31
|
background-color: var(--color-light-graphic-quaternary);
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.table__component_1qd46 th:after {
|
|
34
34
|
opacity: 0;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.table__component_1qd46:hover th:after {
|
|
37
37
|
opacity: 1;
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.table__row_1qd46 {
|
|
40
40
|
height: 72px;
|
|
41
41
|
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-546d89c7.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var components_tableContext_index = require('../table-context/index.js');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
|
|
13
|
+
var styles = {"component":"table__component_9njtp","sortable":"table__sortable_9njtp","sorted":"table__sorted_9njtp","stickyHeader":"table__stickyHeader_9njtp","compactHorizontal":"table__compactHorizontal_9njtp"};
|
|
9
14
|
require('./index.css')
|
|
10
15
|
|
|
11
16
|
var THeadCell = function (_a) {
|
|
@@ -14,7 +19,7 @@ var THeadCell = function (_a) {
|
|
|
14
19
|
var _c = React.useContext(components_tableContext_index.TableContext), compactHorizontal = _c.compactHorizontal, stickyHeader = _c.stickyHeader;
|
|
15
20
|
if (hidden)
|
|
16
21
|
return null;
|
|
17
|
-
return (
|
|
22
|
+
return (React__default.default.createElement("th", tslib_es6.__assign({ className: cn__default.default(styles.component, className, compactHorizontal && styles.compactHorizontal, (_b = {},
|
|
18
23
|
_b[styles.stickyHeader] = stickyHeader,
|
|
19
24
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, style), { width: width, textAlign: textAlign }), "data-test-id": dataTestId }, restProps), children));
|
|
20
25
|
};
|