@alfalab/core-components-table 2.1.14 → 2.2.0
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.d.ts +1 -0
- package/component.js +1 -1
- package/components/index.js +1 -1
- package/components/pagination/Component.js +2 -2
- 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 +2 -2
- package/components/table/Component.d.ts +8 -0
- package/components/table/Component.js +5 -3
- package/components/table/index.css +9 -6
- package/components/table/index.js +1 -1
- package/components/table/utils.js +1 -1
- package/components/table-context/index.d.ts +1 -0
- package/components/table-context/index.js +1 -0
- package/components/tbody/Component.js +2 -2
- package/components/tbody/index.css +2 -2
- package/components/tbody/index.js +1 -1
- package/components/tcell/Component.js +2 -2
- package/components/tcell/index.css +6 -6
- package/components/tcell/index.js +1 -1
- package/components/texpandable-row/Component.js +2 -2
- package/components/texpandable-row/index.css +5 -5
- package/components/texpandable-row/index.js +1 -1
- package/components/thead/Component.js +2 -2
- package/components/thead/index.css +6 -6
- package/components/thead/index.js +1 -1
- package/components/thead-cell/Component.js +7 -4
- package/components/thead-cell/index.css +14 -7
- package/components/thead-cell/index.js +1 -1
- package/components/trow/Component.js +2 -2
- package/components/trow/index.css +8 -10
- package/components/trow/index.js +1 -1
- package/components/tsortable-head-cell/Component.js +2 -2
- 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 +1 -1
- package/components/tsortable-head-cell/sort-icon-desc.js +1 -1
- package/components/tsortable-head-cell/sort-icon-unset.js +1 -1
- package/cssm/component.d.ts +1 -0
- package/cssm/components/table/Component.d.ts +8 -0
- package/cssm/components/table/Component.js +3 -1
- package/cssm/components/table/index.module.css +3 -0
- package/cssm/components/table-context/index.d.ts +1 -0
- package/cssm/components/table-context/index.js +1 -0
- package/cssm/components/thead-cell/Component.js +5 -2
- package/cssm/components/thead-cell/index.module.css +7 -0
- package/cssm/components/trow/index.module.css +1 -3
- package/esm/component.d.ts +1 -0
- 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.d.ts +8 -0
- package/esm/components/table/Component.js +5 -3
- package/esm/components/table/index.css +9 -6
- package/esm/components/table/index.js +1 -1
- package/esm/components/table/utils.js +1 -1
- package/esm/components/table-context/index.d.ts +1 -0
- package/esm/components/table-context/index.js +1 -0
- 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 +7 -4
- package/esm/components/thead-cell/index.css +14 -7
- package/esm/components/thead-cell/index.js +1 -1
- package/esm/components/trow/Component.js +2 -2
- package/esm/components/trow/index.css +8 -10
- 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-de554ff0.d.ts → tslib.es6-7d90e6df.d.ts} +0 -0
- package/esm/{tslib.es6-de554ff0.js → tslib.es6-7d90e6df.js} +0 -0
- package/index.js +1 -1
- package/modern/component.d.ts +1 -0
- package/modern/components/pagination/Component.js +2 -2
- 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.d.ts +8 -0
- package/modern/components/table/Component.js +4 -2
- package/modern/components/table/index.css +9 -6
- package/modern/components/table/utils.js +2 -2
- package/modern/components/table-context/index.d.ts +1 -0
- package/modern/components/table-context/index.js +1 -0
- 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 +5 -3
- package/modern/components/thead-cell/index.css +14 -7
- package/modern/components/trow/Component.js +1 -1
- package/modern/components/trow/index.css +8 -10
- package/modern/components/tsortable-head-cell/Component.js +1 -1
- package/modern/components/tsortable-head-cell/index.css +9 -9
- package/modern/components/tsortable-head-cell/sort-icon-asc.js +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-desc.js +1 -1
- package/modern/components/tsortable-head-cell/sort-icon-unset.js +1 -1
- package/package.json +2 -2
- package/send-stats.js +1 -1
- /package/{tslib.es6-88e029d7.d.ts → tslib.es6-b406adfc.d.ts} +0 -0
- /package/{tslib.es6-88e029d7.js → tslib.es6-b406adfc.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: k7qds */
|
|
2
2
|
:root {
|
|
3
3
|
--color-static-graphic-solitude: #e8f2fe;
|
|
4
4
|
}
|
|
@@ -14,30 +14,28 @@
|
|
|
14
14
|
|
|
15
15
|
/* Hard up */
|
|
16
16
|
}
|
|
17
|
-
.
|
|
17
|
+
.table__component_h0ofl {
|
|
18
18
|
padding-top: 1px;
|
|
19
19
|
width: 100%;
|
|
20
20
|
transition: background-color 0.2s;
|
|
21
21
|
box-sizing: border-box;
|
|
22
22
|
background: var(--color-light-bg-primary)
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.table__component_h0ofl:first-child td {
|
|
25
25
|
border-top: 0;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
28
|
-
td {
|
|
27
|
+
.table__withoutBorder_h0ofl td {
|
|
29
28
|
border: none;
|
|
30
29
|
}
|
|
31
|
-
|
|
32
|
-
.table__clickable_q5ojc {
|
|
30
|
+
.table__clickable_h0ofl {
|
|
33
31
|
cursor: pointer
|
|
34
32
|
}
|
|
35
|
-
.
|
|
33
|
+
.table__clickable_h0ofl:hover {
|
|
36
34
|
background-color: var(--color-light-bg-secondary);
|
|
37
35
|
}
|
|
38
|
-
.
|
|
36
|
+
.table__selected_h0ofl {
|
|
39
37
|
background-color: #f2f8ff /* нет цвета в палитре */
|
|
40
38
|
}
|
|
41
|
-
.
|
|
39
|
+
.table__selected_h0ofl:hover {
|
|
42
40
|
background-color: var(--color-static-graphic-solitude);
|
|
43
41
|
}
|
package/components/trow/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-b406adfc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
require('../table-context/index.js');
|
|
@@ -16,7 +16,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
17
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
18
18
|
|
|
19
|
-
var styles = {"component":"
|
|
19
|
+
var styles = {"component":"table__component_ougot","content":"table__content_ougot","icon":"table__icon_ougot","reverse":"table__reverse_ougot","sorted":"table__sorted_ougot"};
|
|
20
20
|
require('./index.css')
|
|
21
21
|
|
|
22
22
|
var TSortableHeadCell = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1o2eq */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-link: #007aff;
|
|
4
4
|
--color-light-graphic-primary: #0b1f35;
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
:root {
|
|
16
16
|
--gap-xs: 8px;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.table__component_ougot {
|
|
19
19
|
position: relative;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.table__content_ougot {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: flex-start;
|
|
24
24
|
}
|
|
25
|
-
.
|
|
25
|
+
.table__icon_ougot {
|
|
26
26
|
cursor: pointer;
|
|
27
27
|
margin-left: var(--gap-xs);
|
|
28
28
|
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
transition: color 0.2s ease;
|
|
36
36
|
flex-shrink: 0
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.table__icon_ougot:hover {
|
|
39
39
|
color: var(--color-light-graphic-primary);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.table__reverse_ougot {
|
|
42
42
|
flex-direction: row-reverse
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
.table__reverse_ougot .table__icon_ougot {
|
|
45
45
|
margin-left: 0;
|
|
46
46
|
margin-right: var(--gap-xs);
|
|
47
47
|
}
|
|
48
|
-
.
|
|
48
|
+
.table__sorted_ougot {
|
|
49
49
|
color: var(--color-light-graphic-link)
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
.table__sorted_ougot:hover {
|
|
52
52
|
color: var(--color-light-graphic-link);
|
|
53
53
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-b406adfc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-b406adfc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-b406adfc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/cssm/component.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ declare const Table: import("react").ForwardRefExoticComponent<import("react").T
|
|
|
7
7
|
wrapper?: boolean | undefined;
|
|
8
8
|
pagination?: import("react").ReactNode;
|
|
9
9
|
dataTestId?: string | undefined;
|
|
10
|
+
stickyHeader?: boolean | undefined;
|
|
10
11
|
} & import("react").RefAttributes<HTMLTableElement>> & {
|
|
11
12
|
TBody: import("react").FC<import("./components/index").TBodyProps>;
|
|
12
13
|
THead: import("react").FC<import("./components/index").THeadProps>;
|
|
@@ -30,6 +30,10 @@ type TableProps = TableHTMLAttributes<HTMLTableElement> & {
|
|
|
30
30
|
* Идентификатор для систем автоматизированного тестирования
|
|
31
31
|
*/
|
|
32
32
|
dataTestId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Если true то заголовок будет фиксироваться при скроле
|
|
35
|
+
*/
|
|
36
|
+
stickyHeader?: boolean;
|
|
33
37
|
};
|
|
34
38
|
declare const Table: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableElement> & {
|
|
35
39
|
/**
|
|
@@ -60,5 +64,9 @@ declare const Table: React.ForwardRefExoticComponent<React.TableHTMLAttributes<H
|
|
|
60
64
|
* Идентификатор для систем автоматизированного тестирования
|
|
61
65
|
*/
|
|
62
66
|
dataTestId?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Если true то заголовок будет фиксироваться при скроле
|
|
69
|
+
*/
|
|
70
|
+
stickyHeader?: boolean | undefined;
|
|
63
71
|
} & React.RefAttributes<HTMLTableElement>>;
|
|
64
72
|
export { TableProps, Table };
|
|
@@ -20,7 +20,7 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
|
20
20
|
|
|
21
21
|
var Table = React.forwardRef(function (_a, ref) {
|
|
22
22
|
var _b;
|
|
23
|
-
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, restProps = tslib_es6.__rest(_a, ["className", "children", "compactView", "compactHorizontal", "wrapper", "pagination", "dataTestId"]);
|
|
23
|
+
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_es6.__rest(_a, ["className", "children", "compactView", "compactHorizontal", "wrapper", "pagination", "dataTestId", "stickyHeader"]);
|
|
24
24
|
var wrapperRef = React.useRef(null);
|
|
25
25
|
var columnsConfiguration = React.useMemo(function () {
|
|
26
26
|
return components_table_utils.findAllHeadCellsProps(children).map(function (columnProps, index) { return ({
|
|
@@ -32,6 +32,7 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
32
32
|
}, [children]);
|
|
33
33
|
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
34
34
|
return (React__default['default'].createElement(components_tableContext_index.TableContext.Provider, { value: {
|
|
35
|
+
stickyHeader: stickyHeader,
|
|
35
36
|
columnsConfiguration: columnsConfiguration,
|
|
36
37
|
compactView: compactView,
|
|
37
38
|
compactHorizontal: compactHorizontal,
|
|
@@ -40,6 +41,7 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
40
41
|
React__default['default'].createElement("div", { ref: wrapperRef, className: cn__default['default'](styles__default['default'].component, className, (_b = {},
|
|
41
42
|
_b[styles__default['default'].wrapper] = wrapper,
|
|
42
43
|
_b[styles__default['default'].hasPagination] = !!pagination,
|
|
44
|
+
_b[styles__default['default'].stickyHeader] = stickyHeader,
|
|
43
45
|
_b)), "data-test-id": dataTestId },
|
|
44
46
|
React__default['default'].createElement("table", tslib_es6.__assign({ ref: ref, className: styles__default['default'].table }, restProps), children),
|
|
45
47
|
pagination)));
|
|
@@ -15,11 +15,14 @@ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
|
15
15
|
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
16
16
|
|
|
17
17
|
var THeadCell = function (_a) {
|
|
18
|
+
var _b;
|
|
18
19
|
var children = _a.children, className = _a.className, dataTestId = _a.dataTestId, style = _a.style, width = _a.width, textAlign = _a.textAlign, hidden = _a.hidden, restProps = tslib_es6.__rest(_a, ["children", "className", "dataTestId", "style", "width", "textAlign", "hidden"]);
|
|
19
|
-
var
|
|
20
|
+
var _c = React.useContext(components_tableContext_index.TableContext), compactHorizontal = _c.compactHorizontal, stickyHeader = _c.stickyHeader;
|
|
20
21
|
if (hidden)
|
|
21
22
|
return null;
|
|
22
|
-
return (React__default['default'].createElement("th", tslib_es6.__assign({ className: cn__default['default'](styles__default['default'].component, className, compactHorizontal && styles__default['default'].compactHorizontal
|
|
23
|
+
return (React__default['default'].createElement("th", tslib_es6.__assign({ className: cn__default['default'](styles__default['default'].component, className, compactHorizontal && styles__default['default'].compactHorizontal, (_b = {},
|
|
24
|
+
_b[styles__default['default'].stickyHeader] = stickyHeader,
|
|
25
|
+
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, style), { width: width, textAlign: textAlign }), "data-test-id": dataTestId }, restProps), children));
|
|
23
26
|
};
|
|
24
27
|
|
|
25
28
|
exports.THeadCell = THeadCell;
|
|
@@ -46,6 +46,13 @@
|
|
|
46
46
|
.sorted {
|
|
47
47
|
color: var(--color-light-text-primary);
|
|
48
48
|
}
|
|
49
|
+
.stickyHeader {
|
|
50
|
+
top: 0;
|
|
51
|
+
position: sticky;
|
|
52
|
+
box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);
|
|
53
|
+
border: none;
|
|
54
|
+
z-index: 1;
|
|
55
|
+
}
|
|
49
56
|
.compactHorizontal {
|
|
50
57
|
padding-left: 6px;
|
|
51
58
|
padding-right: 6px;
|
package/esm/component.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ declare const Table: import("react").ForwardRefExoticComponent<import("react").T
|
|
|
7
7
|
wrapper?: boolean | undefined;
|
|
8
8
|
pagination?: import("react").ReactNode;
|
|
9
9
|
dataTestId?: string | undefined;
|
|
10
|
+
stickyHeader?: boolean | undefined;
|
|
10
11
|
} & import("react").RefAttributes<HTMLTableElement>> & {
|
|
11
12
|
TBody: import("react").FC<import("./components/index").TBodyProps>;
|
|
12
13
|
THead: import("react").FC<import("./components/index").THeadProps>;
|
package/esm/component.js
CHANGED
package/esm/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from '../../tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-7d90e6df.js';
|
|
2
2
|
import React, { useContext, useMemo, useCallback } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { TableContext } from '../table-context/index.js';
|
|
@@ -7,7 +7,7 @@ import { Select } from '@alfalab/core-components-select/esm';
|
|
|
7
7
|
import '@alfalab/core-components-button/esm';
|
|
8
8
|
import { CustomSelectField } from './select-field/index.js';
|
|
9
9
|
|
|
10
|
-
var styles = {"component":"
|
|
10
|
+
var styles = {"component":"table__component_1mpx8","pagesWrapper":"table__pagesWrapper_1mpx8","tag":"table__tag_1mpx8","tagActive":"table__tagActive_1mpx8","menu":"table__menu_1mpx8","option":"table__option_1mpx8"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
var Pagination = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1klmf */
|
|
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_1mpx8 {
|
|
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_1mpx8 {
|
|
30
30
|
display: flex;
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.table__tag_1mpx8.table__tag_1mpx8 {
|
|
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_1mpx8.table__tag_1mpx8:last-child {
|
|
39
39
|
margin-right: 0;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.table__tag_1mpx8.table__tag_1mpx8.table__tagActive_1mpx8 {
|
|
42
42
|
cursor: default;
|
|
43
43
|
}
|
|
44
|
-
.
|
|
44
|
+
.table__menu_1mpx8 {
|
|
45
45
|
margin: var(--gap-2xs) 0;
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.table__option_1mpx8 {
|
|
48
48
|
min-width: 208px;
|
|
49
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1z08i */
|
|
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_2nqe0 svg {
|
|
14
14
|
width: 18px;
|
|
15
15
|
height: 18px;
|
|
16
16
|
}
|
|
17
|
-
.
|
|
18
|
-
.
|
|
17
|
+
.table__open_2nqe0,
|
|
18
|
+
.table__open_2nqe0:hover {
|
|
19
19
|
background-color: var(--color-light-specialbg-component-shade-7);
|
|
20
20
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from '../../../tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../../tslib.es6-7d90e6df.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { Button } from '@alfalab/core-components-button/esm';
|
|
5
5
|
|
|
6
|
-
var styles = {"field":"
|
|
6
|
+
var styles = {"field":"table__field_2nqe0","open":"table__open_2nqe0"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var CustomSelectField = function (_a) {
|
|
@@ -30,6 +30,10 @@ type TableProps = TableHTMLAttributes<HTMLTableElement> & {
|
|
|
30
30
|
* Идентификатор для систем автоматизированного тестирования
|
|
31
31
|
*/
|
|
32
32
|
dataTestId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Если true то заголовок будет фиксироваться при скроле
|
|
35
|
+
*/
|
|
36
|
+
stickyHeader?: boolean;
|
|
33
37
|
};
|
|
34
38
|
declare const Table: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableElement> & {
|
|
35
39
|
/**
|
|
@@ -60,5 +64,9 @@ declare const Table: React.ForwardRefExoticComponent<React.TableHTMLAttributes<H
|
|
|
60
64
|
* Идентификатор для систем автоматизированного тестирования
|
|
61
65
|
*/
|
|
62
66
|
dataTestId?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Если true то заголовок будет фиксироваться при скроле
|
|
69
|
+
*/
|
|
70
|
+
stickyHeader?: boolean | undefined;
|
|
63
71
|
} & React.RefAttributes<HTMLTableElement>>;
|
|
64
72
|
export { TableProps, Table };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from '../../tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-7d90e6df.js';
|
|
2
2
|
import React, { forwardRef, useRef, useMemo } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { TableContext } from '../table-context/index.js';
|
|
@@ -6,12 +6,12 @@ import '../../utils.js';
|
|
|
6
6
|
import '../thead/Component.js';
|
|
7
7
|
import { findAllHeadCellsProps } from './utils.js';
|
|
8
8
|
|
|
9
|
-
var styles = {"component":"
|
|
9
|
+
var styles = {"component":"table__component_3d4s6","wrapper":"table__wrapper_3d4s6","stickyHeader":"table__stickyHeader_3d4s6","hasPagination":"table__hasPagination_3d4s6","table":"table__table_3d4s6"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
var Table = forwardRef(function (_a, ref) {
|
|
13
13
|
var _b;
|
|
14
|
-
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, restProps = __rest(_a, ["className", "children", "compactView", "compactHorizontal", "wrapper", "pagination", "dataTestId"]);
|
|
14
|
+
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 = __rest(_a, ["className", "children", "compactView", "compactHorizontal", "wrapper", "pagination", "dataTestId", "stickyHeader"]);
|
|
15
15
|
var wrapperRef = useRef(null);
|
|
16
16
|
var columnsConfiguration = useMemo(function () {
|
|
17
17
|
return findAllHeadCellsProps(children).map(function (columnProps, index) { return ({
|
|
@@ -23,6 +23,7 @@ var Table = forwardRef(function (_a, ref) {
|
|
|
23
23
|
}, [children]);
|
|
24
24
|
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
25
25
|
return (React.createElement(TableContext.Provider, { value: {
|
|
26
|
+
stickyHeader: stickyHeader,
|
|
26
27
|
columnsConfiguration: columnsConfiguration,
|
|
27
28
|
compactView: compactView,
|
|
28
29
|
compactHorizontal: compactHorizontal,
|
|
@@ -31,6 +32,7 @@ var Table = forwardRef(function (_a, ref) {
|
|
|
31
32
|
React.createElement("div", { ref: wrapperRef, className: cn(styles.component, className, (_b = {},
|
|
32
33
|
_b[styles.wrapper] = wrapper,
|
|
33
34
|
_b[styles.hasPagination] = !!pagination,
|
|
35
|
+
_b[styles.stickyHeader] = stickyHeader,
|
|
34
36
|
_b)), "data-test-id": dataTestId },
|
|
35
37
|
React.createElement("table", __assign({ ref: ref, className: styles.table }, restProps), children),
|
|
36
38
|
pagination)));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: s5cz6 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -18,26 +18,29 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--border-radius-m: 8px;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.table__component_3d4s6 {
|
|
22
22
|
box-sizing: border-box;
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.table__wrapper_3d4s6 {
|
|
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_3d4s6 {
|
|
32
|
+
max-height: 100%;
|
|
33
|
+
}
|
|
34
|
+
.table__hasPagination_3d4s6 {
|
|
32
35
|
padding-bottom: 0;
|
|
33
36
|
}
|
|
34
|
-
.
|
|
37
|
+
.table__table_3d4s6 {
|
|
35
38
|
width: 100%;
|
|
36
39
|
border-collapse: collapse;
|
|
37
40
|
box-sizing: border-box
|
|
38
41
|
|
|
39
42
|
/* TODO: Хак для выравнивания чекбокса */
|
|
40
43
|
}
|
|
41
|
-
.
|
|
44
|
+
.table__table_3d4s6 td:first-child label > *[class^='box'], .table__table_3d4s6 th:first-child label > *[class^='box'] {
|
|
42
45
|
margin-top: 0;
|
|
43
46
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from '../../tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-7d90e6df.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"
|
|
5
|
+
var styles = {"component":"table__component_1tzol"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var TBody = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign } from '../../tslib.es6-
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-7d90e6df.js';
|
|
2
2
|
import React, { useContext } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { TableContext } from '../table-context/index.js';
|
|
5
5
|
|
|
6
|
-
var styles = {"component":"
|
|
6
|
+
var styles = {"component":"table__component_1ufju","compactHorizontal":"table__compactHorizontal_1ufju","compact":"table__compact_1ufju"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var TCell = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7ca89 */
|
|
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_1ufju {
|
|
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_1ufju:first-child {
|
|
33
33
|
padding-left: var(--gap-m);
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.table__component_1ufju:last-child {
|
|
36
36
|
padding-right: var(--gap-m);
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.table__compactHorizontal_1ufju {
|
|
39
39
|
padding-left: 6px;
|
|
40
40
|
padding-right: 6px;
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.table__compact_1ufju {
|
|
43
43
|
padding-top: var(--gap-xs);
|
|
44
44
|
padding-bottom: var(--gap-xs);
|
|
45
45
|
|