@alfalab/core-components-table 2.8.5 → 2.9.1
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 +8 -1
- package/components/pagination/Component.js +1 -1
- package/components/pagination/index.css +13 -10
- package/components/pagination/select-field/index.css +7 -4
- package/components/pagination/select-field/index.js +1 -1
- package/components/table/Component.js +1 -1
- package/components/table/index.css +11 -8
- package/components/tbody/Component.js +1 -1
- package/components/tbody/index.css +5 -2
- package/components/tcell/Component.js +1 -1
- package/components/tcell/index.css +9 -6
- package/components/texpandable-row/Component.d.ts +3 -1
- package/components/texpandable-row/Component.js +3 -3
- package/components/texpandable-row/index.css +9 -6
- package/components/thead/Component.js +1 -1
- package/components/thead/index.css +10 -7
- package/components/thead-cell/Component.js +1 -1
- package/components/thead-cell/index.css +13 -10
- package/components/trow/Component.d.ts +22 -1
- package/components/trow/Component.js +5 -4
- package/components/trow/index.css +11 -8
- package/components/tsortable-head-cell/Component.js +1 -1
- package/components/tsortable-head-cell/index.css +12 -9
- package/cssm/component.d.ts +8 -1
- package/cssm/components/pagination/index.module.css +4 -1
- package/cssm/components/pagination/select-field/index.module.css +3 -0
- package/cssm/components/table/index.module.css +4 -1
- package/cssm/components/tbody/index.module.css +3 -0
- package/cssm/components/tcell/index.module.css +3 -0
- package/cssm/components/texpandable-row/Component.d.ts +3 -1
- package/cssm/components/texpandable-row/Component.js +2 -2
- package/cssm/components/texpandable-row/index.module.css +4 -1
- package/cssm/components/thead/index.module.css +4 -1
- package/cssm/components/thead-cell/index.module.css +4 -1
- package/cssm/components/trow/Component.d.ts +22 -1
- package/cssm/components/trow/Component.js +4 -3
- package/cssm/components/trow/index.module.css +3 -0
- package/cssm/components/tsortable-head-cell/index.module.css +4 -1
- package/esm/component.d.ts +8 -1
- package/esm/components/pagination/Component.js +1 -1
- package/esm/components/pagination/index.css +13 -10
- package/esm/components/pagination/select-field/index.css +7 -4
- package/esm/components/pagination/select-field/index.js +1 -1
- package/esm/components/table/Component.js +1 -1
- package/esm/components/table/index.css +11 -8
- package/esm/components/tbody/Component.js +1 -1
- package/esm/components/tbody/index.css +5 -2
- package/esm/components/tcell/Component.js +1 -1
- package/esm/components/tcell/index.css +9 -6
- package/esm/components/texpandable-row/Component.d.ts +3 -1
- package/esm/components/texpandable-row/Component.js +3 -3
- package/esm/components/texpandable-row/index.css +9 -6
- package/esm/components/thead/Component.js +1 -1
- package/esm/components/thead/index.css +10 -7
- package/esm/components/thead-cell/Component.js +1 -1
- package/esm/components/thead-cell/index.css +13 -10
- package/esm/components/trow/Component.d.ts +22 -1
- package/esm/components/trow/Component.js +6 -5
- package/esm/components/trow/index.css +11 -8
- package/esm/components/tsortable-head-cell/Component.js +1 -1
- package/esm/components/tsortable-head-cell/index.css +12 -9
- package/modern/component.d.ts +8 -1
- package/modern/components/pagination/Component.js +1 -1
- package/modern/components/pagination/index.css +13 -10
- package/modern/components/pagination/select-field/index.css +7 -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 +11 -8
- package/modern/components/tbody/Component.js +1 -1
- package/modern/components/tbody/index.css +5 -2
- package/modern/components/tcell/Component.js +1 -1
- package/modern/components/tcell/index.css +9 -6
- package/modern/components/texpandable-row/Component.d.ts +3 -1
- package/modern/components/texpandable-row/Component.js +3 -3
- package/modern/components/texpandable-row/index.css +9 -6
- package/modern/components/thead/Component.js +1 -1
- package/modern/components/thead/index.css +10 -7
- package/modern/components/thead-cell/Component.js +1 -1
- package/modern/components/thead-cell/index.css +13 -10
- package/modern/components/trow/Component.d.ts +22 -1
- package/modern/components/trow/Component.js +5 -4
- package/modern/components/trow/index.css +11 -8
- package/modern/components/tsortable-head-cell/Component.js +1 -1
- package/modern/components/tsortable-head-cell/index.css +12 -9
- package/moderncssm/component.d.ts +8 -1
- package/moderncssm/components/texpandable-row/Component.d.ts +3 -1
- package/moderncssm/components/texpandable-row/Component.js +2 -2
- package/moderncssm/components/trow/Component.d.ts +22 -1
- package/moderncssm/components/trow/Component.js +4 -3
- package/package.json +3 -3
- package/src/components/texpandable-row/Component.tsx +5 -1
- package/src/components/trow/Component.tsx +18 -20
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 3no35 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-400: #d2d3d9; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -18,15 +18,18 @@
|
|
|
18
18
|
--gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
19
19
|
|
|
20
20
|
/* новые значения, используйте их */
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
23
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
24
|
+
--gap-0: 0px;
|
|
22
25
|
--gap-8: var(--gap-xs);
|
|
23
26
|
} :root {
|
|
24
27
|
} :root {
|
|
25
|
-
} /* сбрасывает синюю подсветку при нажатии */ .
|
|
28
|
+
} /* сбрасывает синюю подсветку при нажатии */ .table__component_10879 {
|
|
26
29
|
position: relative;
|
|
27
30
|
width: 100%;
|
|
28
31
|
box-sizing: border-box
|
|
29
|
-
} .
|
|
32
|
+
} .table__component_10879 th:not(:last-child):not(:empty):after {
|
|
30
33
|
transition: opacity 0.2s;
|
|
31
34
|
position: absolute;
|
|
32
35
|
content: '';
|
|
@@ -37,10 +40,10 @@
|
|
|
37
40
|
top: var(--gap-8);
|
|
38
41
|
bottom: var(--gap-8);
|
|
39
42
|
background-color: var(--color-light-neutral-400);
|
|
40
|
-
} .
|
|
43
|
+
} .table__component_10879 th:after {
|
|
41
44
|
opacity: 0;
|
|
42
|
-
} .
|
|
45
|
+
} .table__component_10879:hover th:after {
|
|
43
46
|
opacity: 1;
|
|
44
|
-
} .
|
|
47
|
+
} .table__row_10879 {
|
|
45
48
|
height: 72px;
|
|
46
49
|
}
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"component":"
|
|
15
|
+
var styles = {"component":"table__component_1src0","stickyHeader":"table__stickyHeader_1src0","sortable":"table__sortable_1src0","sorted":"table__sorted_1src0","compactHorizontal":"table__compactHorizontal_1src0"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var THeadCell = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: arjr1 */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-base-bg-primary: #fff;
|
|
@@ -23,14 +23,17 @@
|
|
|
23
23
|
--gap-2xl: 32px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
24
24
|
|
|
25
25
|
/* новые значения, используйте их */
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
28
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
29
|
+
--gap-0: 0px;
|
|
27
30
|
--gap-4: var(--gap-2xs);
|
|
28
31
|
--gap-12: var(--gap-s);
|
|
29
32
|
--gap-16: var(--gap-m);
|
|
30
33
|
--gap-32: var(--gap-2xl);
|
|
31
34
|
} :root {
|
|
32
35
|
} :root {
|
|
33
|
-
} /* сбрасывает синюю подсветку при нажатии */ .
|
|
36
|
+
} /* сбрасывает синюю подсветку при нажатии */ .table__component_1src0 {
|
|
34
37
|
font-size: 12px;
|
|
35
38
|
line-height: 16px;
|
|
36
39
|
font-weight: 500;
|
|
@@ -45,23 +48,23 @@
|
|
|
45
48
|
background: var(--color-light-base-bg-primary);
|
|
46
49
|
vertical-align: top;
|
|
47
50
|
box-sizing: border-box
|
|
48
|
-
} .
|
|
51
|
+
} .table__component_1src0:first-child {
|
|
49
52
|
padding-left: var(--gap-16);
|
|
50
|
-
} .
|
|
53
|
+
} .table__component_1src0:last-child {
|
|
51
54
|
padding-right: var(--gap-16);
|
|
52
|
-
} .
|
|
55
|
+
} .table__component_1src0:not(.table__stickyHeader_1src0) {
|
|
53
56
|
position: relative;
|
|
54
|
-
} .
|
|
57
|
+
} .table__sortable_1src0 {
|
|
55
58
|
cursor: pointer;
|
|
56
|
-
} .
|
|
59
|
+
} .table__sorted_1src0 {
|
|
57
60
|
color: var(--color-light-text-primary);
|
|
58
|
-
} .
|
|
61
|
+
} .table__stickyHeader_1src0 {
|
|
59
62
|
top: var(--gap-0);
|
|
60
63
|
position: sticky;
|
|
61
64
|
box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);
|
|
62
65
|
border: none;
|
|
63
66
|
z-index: 1;
|
|
64
|
-
} .
|
|
67
|
+
} .table__compactHorizontal_1src0 {
|
|
65
68
|
padding-left: 6px;
|
|
66
69
|
padding-right: 6px;
|
|
67
70
|
}
|
|
@@ -25,5 +25,26 @@ type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
|
25
25
|
*/
|
|
26
26
|
dataTestId?: string;
|
|
27
27
|
};
|
|
28
|
-
declare const TRow:
|
|
28
|
+
declare const TRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
|
|
29
|
+
/**
|
|
30
|
+
* Компоненты ячеек
|
|
31
|
+
*/
|
|
32
|
+
children: TCellElement | TCellElement[];
|
|
33
|
+
/**
|
|
34
|
+
* Дополнительный класс
|
|
35
|
+
*/
|
|
36
|
+
className?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Стиль выбранной строки
|
|
39
|
+
*/
|
|
40
|
+
selected?: boolean | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Убирает нижнюю границу
|
|
43
|
+
*/
|
|
44
|
+
withoutBorder?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
47
|
+
*/
|
|
48
|
+
dataTestId?: string | undefined;
|
|
49
|
+
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
29
50
|
export { TRowProps, TRow };
|
|
@@ -11,17 +11,18 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"component":"
|
|
14
|
+
var styles = {"component":"table__component_1o6ux","withoutBorder":"table__withoutBorder_1o6ux","clickable":"table__clickable_1o6ux","selected":"table__selected_1o6ux"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
|
-
var TRow = function (_a) {
|
|
17
|
+
var TRow = React.forwardRef(function (_a, ref) {
|
|
18
18
|
var _b;
|
|
19
19
|
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"]);
|
|
20
20
|
return (React__default.default.createElement("tr", tslib.__assign({ className: cn__default.default(styles.component, className, (_b = {},
|
|
21
21
|
_b[styles.clickable] = typeof restProps.onClick !== 'undefined',
|
|
22
22
|
_b[styles.selected] = selected,
|
|
23
23
|
_b[styles.withoutBorder] = withoutBorder,
|
|
24
|
-
_b)), "data-test-id": dataTestId }, restProps), React__default.default.Children.map(children, function (child, index) { return React__default.default.cloneElement(child, { index: index }); })));
|
|
25
|
-
};
|
|
24
|
+
_b)), "data-test-id": dataTestId, ref: ref }, restProps), React__default.default.Children.map(children, function (child, index) { return React__default.default.cloneElement(child, { index: index }); })));
|
|
25
|
+
});
|
|
26
|
+
TRow.displayName = 'TRow';
|
|
26
27
|
|
|
27
28
|
exports.TRow = TRow;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: yympg */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-base-bg-primary: #fff;
|
|
@@ -19,24 +19,27 @@
|
|
|
19
19
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
20
20
|
|
|
21
21
|
/* новые значения, используйте их */
|
|
22
|
+
|
|
23
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
24
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
22
25
|
} :root {
|
|
23
26
|
} :root {
|
|
24
|
-
} /* сбрасывает синюю подсветку при нажатии */ .
|
|
27
|
+
} /* сбрасывает синюю подсветку при нажатии */ .table__component_1o6ux {
|
|
25
28
|
padding-top: 1px;
|
|
26
29
|
width: 100%;
|
|
27
30
|
transition: background-color 0.2s;
|
|
28
31
|
box-sizing: border-box;
|
|
29
32
|
background: var(--color-light-base-bg-primary)
|
|
30
|
-
} .
|
|
33
|
+
} .table__component_1o6ux:first-child td {
|
|
31
34
|
border-top: 0;
|
|
32
|
-
} .
|
|
35
|
+
} .table__withoutBorder_1o6ux td {
|
|
33
36
|
border: none;
|
|
34
|
-
} .
|
|
37
|
+
} .table__clickable_1o6ux {
|
|
35
38
|
cursor: pointer
|
|
36
|
-
} .
|
|
39
|
+
} .table__clickable_1o6ux:hover {
|
|
37
40
|
background-color: var(--color-light-base-bg-secondary);
|
|
38
|
-
} .
|
|
41
|
+
} .table__selected_1o6ux {
|
|
39
42
|
background-color: #f2f8ff /* нет цвета в палитре */
|
|
40
|
-
} .
|
|
43
|
+
} .table__selected_1o6ux:hover {
|
|
41
44
|
background-color: var(--color-static-graphic-solitude);
|
|
42
45
|
}
|
|
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"content":"
|
|
18
|
+
var styles = {"content":"table__content_m1nch","icon":"table__icon_m1nch","reverse":"table__reverse_m1nch","sorted":"table__sorted_m1nch"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var TSortableHeadCell = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: q637a */
|
|
2
2
|
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-700: #898991;
|
|
@@ -20,14 +20,17 @@
|
|
|
20
20
|
--gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
21
21
|
|
|
22
22
|
/* новые значения, используйте их */
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
25
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
26
|
+
--gap-0: 0px;
|
|
24
27
|
--gap-8: var(--gap-xs);
|
|
25
28
|
} :root {
|
|
26
29
|
} :root {
|
|
27
|
-
} /* сбрасывает синюю подсветку при нажатии */ .
|
|
30
|
+
} /* сбрасывает синюю подсветку при нажатии */ .table__content_m1nch {
|
|
28
31
|
display: flex;
|
|
29
32
|
align-items: flex-start;
|
|
30
|
-
} .
|
|
33
|
+
} .table__icon_m1nch {
|
|
31
34
|
cursor: pointer;
|
|
32
35
|
margin-left: var(--gap-8);
|
|
33
36
|
|
|
@@ -39,15 +42,15 @@
|
|
|
39
42
|
color: var(--color-light-neutral-700);
|
|
40
43
|
transition: color 0.2s ease;
|
|
41
44
|
flex-shrink: 0
|
|
42
|
-
} .
|
|
45
|
+
} .table__icon_m1nch:hover {
|
|
43
46
|
color: var(--color-light-neutral-translucent-1300);
|
|
44
|
-
} .
|
|
47
|
+
} .table__reverse_m1nch {
|
|
45
48
|
flex-direction: row-reverse
|
|
46
|
-
} .
|
|
49
|
+
} .table__reverse_m1nch .table__icon_m1nch {
|
|
47
50
|
margin-left: var(--gap-0);
|
|
48
51
|
margin-right: var(--gap-8);
|
|
49
|
-
} .
|
|
52
|
+
} .table__sorted_m1nch {
|
|
50
53
|
color: var(--color-light-status-info)
|
|
51
|
-
} .
|
|
54
|
+
} .table__sorted_m1nch:hover {
|
|
52
55
|
color: var(--color-light-status-info);
|
|
53
56
|
}
|
package/cssm/component.d.ts
CHANGED
|
@@ -14,7 +14,13 @@ declare const Table: import("react").ForwardRefExoticComponent<import("react").T
|
|
|
14
14
|
THeadCell: ({ children, className, dataTestId, style, width, textAlign, hidden, ...restProps }: import("./components/index").THeadCellProps) => import("react").JSX.Element | null;
|
|
15
15
|
TSortableHeadCell: ({ children, className, defaultIsSortedDesc, isSortedDesc, textAlign, onSort, ...restProps }: import("./components/index").TSortableHeadCellProps) => import("react").JSX.Element;
|
|
16
16
|
TCell: ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null;
|
|
17
|
-
TRow:
|
|
17
|
+
TRow: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableRowElement> & {
|
|
18
|
+
children: import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null> | import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null>[];
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
selected?: boolean | undefined;
|
|
21
|
+
withoutBorder?: boolean | undefined;
|
|
22
|
+
dataTestId?: string | undefined;
|
|
23
|
+
} & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
18
24
|
TExpandableRow: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableRowElement> & {
|
|
19
25
|
children: import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null> | import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null>[];
|
|
20
26
|
className?: string | undefined;
|
|
@@ -26,6 +32,7 @@ declare const Table: import("react").ForwardRefExoticComponent<import("react").T
|
|
|
26
32
|
expanded?: boolean | undefined;
|
|
27
33
|
onToggle?: ((expanded: boolean) => void) | undefined;
|
|
28
34
|
renderContent: (expanded: boolean) => import("react").ReactNode;
|
|
35
|
+
rowRef?: import("react").Ref<HTMLTableRowElement> | undefined;
|
|
29
36
|
} & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
30
37
|
Pagination: import("react").FC<import("./components/index").PaginationProps>;
|
|
31
38
|
};
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
--gap-2xl: 32px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
22
22
|
|
|
23
23
|
/* новые значения, используйте их */
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
26
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
27
|
+
--gap-0: 0px;
|
|
25
28
|
--gap-4: var(--gap-2xs);
|
|
26
29
|
--gap-8: var(--gap-xs);
|
|
27
30
|
--gap-16: var(--gap-m);
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
17
17
|
|
|
18
18
|
/* новые значения, используйте их */
|
|
19
|
+
|
|
20
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
21
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
19
22
|
} :root {
|
|
20
23
|
} :root {
|
|
21
24
|
} /* сбрасывает синюю подсветку при нажатии */ .field svg {
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
--gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
21
21
|
|
|
22
22
|
/* новые значения, используйте их */
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
25
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
26
|
+
--gap-0: 0px;
|
|
24
27
|
--gap-16: var(--gap-m);
|
|
25
28
|
} :root {
|
|
26
29
|
} :root {
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
16
16
|
|
|
17
17
|
/* новые значения, используйте их */
|
|
18
|
+
|
|
19
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
20
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
18
21
|
} :root {
|
|
19
22
|
} :root {
|
|
20
23
|
} /* сбрасывает синюю подсветку при нажатии */ .component {
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
--gap-xl: 24px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
22
22
|
|
|
23
23
|
/* новые значения, используйте их */
|
|
24
|
+
|
|
25
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
26
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
24
27
|
--gap-8: var(--gap-xs);
|
|
25
28
|
--gap-12: var(--gap-s);
|
|
26
29
|
--gap-16: var(--gap-m);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ReactNode } from "react";
|
|
3
|
+
import { ReactNode, Ref } from "react";
|
|
4
4
|
import { TRowProps } from "../trow/index";
|
|
5
5
|
type TExpandableRowProps = TRowProps & {
|
|
6
6
|
defaultExpanded?: boolean;
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
onToggle?: (expanded: boolean) => void;
|
|
9
9
|
renderContent: (expanded: boolean) => ReactNode;
|
|
10
|
+
rowRef?: Ref<HTMLTableRowElement>;
|
|
10
11
|
};
|
|
11
12
|
declare const TExpandableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
|
|
12
13
|
children: React.ReactElement<import("../index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("../index").TCellProps) => React.JSX.Element | null> | React.ReactElement<import("../index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("../index").TCellProps) => React.JSX.Element | null>[];
|
|
@@ -19,5 +20,6 @@ declare const TExpandableRow: React.ForwardRefExoticComponent<React.HTMLAttribut
|
|
|
19
20
|
expanded?: boolean | undefined;
|
|
20
21
|
onToggle?: ((expanded: boolean) => void) | undefined;
|
|
21
22
|
renderContent: (expanded: boolean) => ReactNode;
|
|
23
|
+
rowRef?: React.Ref<HTMLTableRowElement> | undefined;
|
|
22
24
|
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
23
25
|
export { TExpandableRowProps, TExpandableRow };
|
|
@@ -16,7 +16,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
16
16
|
|
|
17
17
|
var TExpandableRow = React.forwardRef(function (_a, ref) {
|
|
18
18
|
var _b, _c;
|
|
19
|
-
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
|
+
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, rowRef = _a.rowRef, restProps = tslib.__rest(_a, ["className", "selected", "expanded", "defaultExpanded", "onToggle", "renderContent", "rowRef"]);
|
|
20
20
|
var _g = React.useState(defaultExpanded), expandedState = _g[0], setExpandedState = _g[1];
|
|
21
21
|
var uncontrolled = expanded === undefined;
|
|
22
22
|
var isExpanded = (uncontrolled ? expandedState : expanded);
|
|
@@ -30,7 +30,7 @@ var TExpandableRow = React.forwardRef(function (_a, ref) {
|
|
|
30
30
|
React__default.default.createElement(components_trow_Component.TRow, tslib.__assign({ className: cn__default.default(styles__default.default.row, className, (_b = {},
|
|
31
31
|
_b[styles__default.default.selected] = selected,
|
|
32
32
|
_b[styles__default.default.expanded] = isExpanded,
|
|
33
|
-
_b)), selected: selected, onClick: handleToggle }, restProps)),
|
|
33
|
+
_b)), selected: selected, onClick: handleToggle, ref: rowRef }, restProps)),
|
|
34
34
|
React__default.default.createElement("tr", { ref: ref, className: cn__default.default(styles__default.default.expandable, (_c = {}, _c[styles__default.default.expanded] = isExpanded, _c)) }, renderContent(isExpanded))));
|
|
35
35
|
});
|
|
36
36
|
TExpandableRow.displayName = 'TExpandableRow';
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
16
16
|
|
|
17
17
|
/* новые значения, используйте их */
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
20
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
21
|
+
--gap-0: 0px;
|
|
19
22
|
} :root {
|
|
20
23
|
} :root {
|
|
21
24
|
} /* сбрасывает синюю подсветку при нажатии */ .row {
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
--gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
18
18
|
|
|
19
19
|
/* новые значения, используйте их */
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
22
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
23
|
+
--gap-0: 0px;
|
|
21
24
|
--gap-8: var(--gap-xs);
|
|
22
25
|
} :root {
|
|
23
26
|
} :root {
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
--gap-2xl: 32px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
23
23
|
|
|
24
24
|
/* новые значения, используйте их */
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
27
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
28
|
+
--gap-0: 0px;
|
|
26
29
|
--gap-4: var(--gap-2xs);
|
|
27
30
|
--gap-12: var(--gap-s);
|
|
28
31
|
--gap-16: var(--gap-m);
|
|
@@ -25,5 +25,26 @@ type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
|
|
|
25
25
|
*/
|
|
26
26
|
dataTestId?: string;
|
|
27
27
|
};
|
|
28
|
-
declare const TRow:
|
|
28
|
+
declare const TRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
|
|
29
|
+
/**
|
|
30
|
+
* Компоненты ячеек
|
|
31
|
+
*/
|
|
32
|
+
children: TCellElement | TCellElement[];
|
|
33
|
+
/**
|
|
34
|
+
* Дополнительный класс
|
|
35
|
+
*/
|
|
36
|
+
className?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Стиль выбранной строки
|
|
39
|
+
*/
|
|
40
|
+
selected?: boolean | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Убирает нижнюю границу
|
|
43
|
+
*/
|
|
44
|
+
withoutBorder?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
47
|
+
*/
|
|
48
|
+
dataTestId?: string | undefined;
|
|
49
|
+
} & React.RefAttributes<HTMLTableRowElement>>;
|
|
29
50
|
export { TRowProps, TRow };
|
|
@@ -13,14 +13,15 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
15
15
|
|
|
16
|
-
var TRow = function (_a) {
|
|
16
|
+
var TRow = React.forwardRef(function (_a, ref) {
|
|
17
17
|
var _b;
|
|
18
18
|
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"]);
|
|
19
19
|
return (React__default.default.createElement("tr", tslib.__assign({ className: cn__default.default(styles__default.default.component, className, (_b = {},
|
|
20
20
|
_b[styles__default.default.clickable] = typeof restProps.onClick !== 'undefined',
|
|
21
21
|
_b[styles__default.default.selected] = selected,
|
|
22
22
|
_b[styles__default.default.withoutBorder] = withoutBorder,
|
|
23
|
-
_b)), "data-test-id": dataTestId }, restProps), React__default.default.Children.map(children, function (child, index) { return React__default.default.cloneElement(child, { index: index }); })));
|
|
24
|
-
};
|
|
23
|
+
_b)), "data-test-id": dataTestId, ref: ref }, restProps), React__default.default.Children.map(children, function (child, index) { return React__default.default.cloneElement(child, { index: index }); })));
|
|
24
|
+
});
|
|
25
|
+
TRow.displayName = 'TRow';
|
|
25
26
|
|
|
26
27
|
exports.TRow = TRow;
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
19
19
|
|
|
20
20
|
/* новые значения, используйте их */
|
|
21
|
+
|
|
22
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
23
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
21
24
|
} :root {
|
|
22
25
|
} :root {
|
|
23
26
|
} /* сбрасывает синюю подсветку при нажатии */ .component {
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
--gap-xs: 8px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
20
20
|
|
|
21
21
|
/* новые значения, используйте их */
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
24
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
25
|
+
--gap-0: 0px;
|
|
23
26
|
--gap-8: var(--gap-xs);
|
|
24
27
|
} :root {
|
|
25
28
|
} :root {
|
package/esm/component.d.ts
CHANGED
|
@@ -14,7 +14,13 @@ declare const Table: import("react").ForwardRefExoticComponent<import("react").T
|
|
|
14
14
|
THeadCell: ({ children, className, dataTestId, style, width, textAlign, hidden, ...restProps }: import("./components/index").THeadCellProps) => import("react").JSX.Element | null;
|
|
15
15
|
TSortableHeadCell: ({ children, className, defaultIsSortedDesc, isSortedDesc, textAlign, onSort, ...restProps }: import("./components/index").TSortableHeadCellProps) => import("react").JSX.Element;
|
|
16
16
|
TCell: ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null;
|
|
17
|
-
TRow:
|
|
17
|
+
TRow: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableRowElement> & {
|
|
18
|
+
children: import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null> | import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null>[];
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
selected?: boolean | undefined;
|
|
21
|
+
withoutBorder?: boolean | undefined;
|
|
22
|
+
dataTestId?: string | undefined;
|
|
23
|
+
} & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
18
24
|
TExpandableRow: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableRowElement> & {
|
|
19
25
|
children: import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null> | import("react").ReactElement<import("./components/index").TCellProps, ({ className, style, dataTestId, children, index, ...restProps }: import("./components/index").TCellProps) => import("react").JSX.Element | null>[];
|
|
20
26
|
className?: string | undefined;
|
|
@@ -26,6 +32,7 @@ declare const Table: import("react").ForwardRefExoticComponent<import("react").T
|
|
|
26
32
|
expanded?: boolean | undefined;
|
|
27
33
|
onToggle?: ((expanded: boolean) => void) | undefined;
|
|
28
34
|
renderContent: (expanded: boolean) => import("react").ReactNode;
|
|
35
|
+
rowRef?: import("react").Ref<HTMLTableRowElement> | undefined;
|
|
29
36
|
} & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
30
37
|
Pagination: import("react").FC<import("./components/index").PaginationProps>;
|
|
31
38
|
};
|
|
@@ -6,7 +6,7 @@ import { SelectDesktop } from '@alfalab/core-components-select/esm/desktop';
|
|
|
6
6
|
import { TableContext } from '../table-context/index.js';
|
|
7
7
|
import { CustomSelectField } from './select-field/index.js';
|
|
8
8
|
|
|
9
|
-
var styles = {"component":"
|
|
9
|
+
var styles = {"component":"table__component_mk1fi","pagesWrapper":"table__pagesWrapper_mk1fi","tag":"table__tag_mk1fi","tagActive":"table__tagActive_mk1fi","pagination":"table__pagination_mk1fi","menu":"table__menu_mk1fi","option":"table__option_mk1fi"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
var Pagination = function (_a) {
|