@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.
Files changed (92) hide show
  1. package/component.d.ts +8 -1
  2. package/components/pagination/Component.js +1 -1
  3. package/components/pagination/index.css +13 -10
  4. package/components/pagination/select-field/index.css +7 -4
  5. package/components/pagination/select-field/index.js +1 -1
  6. package/components/table/Component.js +1 -1
  7. package/components/table/index.css +11 -8
  8. package/components/tbody/Component.js +1 -1
  9. package/components/tbody/index.css +5 -2
  10. package/components/tcell/Component.js +1 -1
  11. package/components/tcell/index.css +9 -6
  12. package/components/texpandable-row/Component.d.ts +3 -1
  13. package/components/texpandable-row/Component.js +3 -3
  14. package/components/texpandable-row/index.css +9 -6
  15. package/components/thead/Component.js +1 -1
  16. package/components/thead/index.css +10 -7
  17. package/components/thead-cell/Component.js +1 -1
  18. package/components/thead-cell/index.css +13 -10
  19. package/components/trow/Component.d.ts +22 -1
  20. package/components/trow/Component.js +5 -4
  21. package/components/trow/index.css +11 -8
  22. package/components/tsortable-head-cell/Component.js +1 -1
  23. package/components/tsortable-head-cell/index.css +12 -9
  24. package/cssm/component.d.ts +8 -1
  25. package/cssm/components/pagination/index.module.css +4 -1
  26. package/cssm/components/pagination/select-field/index.module.css +3 -0
  27. package/cssm/components/table/index.module.css +4 -1
  28. package/cssm/components/tbody/index.module.css +3 -0
  29. package/cssm/components/tcell/index.module.css +3 -0
  30. package/cssm/components/texpandable-row/Component.d.ts +3 -1
  31. package/cssm/components/texpandable-row/Component.js +2 -2
  32. package/cssm/components/texpandable-row/index.module.css +4 -1
  33. package/cssm/components/thead/index.module.css +4 -1
  34. package/cssm/components/thead-cell/index.module.css +4 -1
  35. package/cssm/components/trow/Component.d.ts +22 -1
  36. package/cssm/components/trow/Component.js +4 -3
  37. package/cssm/components/trow/index.module.css +3 -0
  38. package/cssm/components/tsortable-head-cell/index.module.css +4 -1
  39. package/esm/component.d.ts +8 -1
  40. package/esm/components/pagination/Component.js +1 -1
  41. package/esm/components/pagination/index.css +13 -10
  42. package/esm/components/pagination/select-field/index.css +7 -4
  43. package/esm/components/pagination/select-field/index.js +1 -1
  44. package/esm/components/table/Component.js +1 -1
  45. package/esm/components/table/index.css +11 -8
  46. package/esm/components/tbody/Component.js +1 -1
  47. package/esm/components/tbody/index.css +5 -2
  48. package/esm/components/tcell/Component.js +1 -1
  49. package/esm/components/tcell/index.css +9 -6
  50. package/esm/components/texpandable-row/Component.d.ts +3 -1
  51. package/esm/components/texpandable-row/Component.js +3 -3
  52. package/esm/components/texpandable-row/index.css +9 -6
  53. package/esm/components/thead/Component.js +1 -1
  54. package/esm/components/thead/index.css +10 -7
  55. package/esm/components/thead-cell/Component.js +1 -1
  56. package/esm/components/thead-cell/index.css +13 -10
  57. package/esm/components/trow/Component.d.ts +22 -1
  58. package/esm/components/trow/Component.js +6 -5
  59. package/esm/components/trow/index.css +11 -8
  60. package/esm/components/tsortable-head-cell/Component.js +1 -1
  61. package/esm/components/tsortable-head-cell/index.css +12 -9
  62. package/modern/component.d.ts +8 -1
  63. package/modern/components/pagination/Component.js +1 -1
  64. package/modern/components/pagination/index.css +13 -10
  65. package/modern/components/pagination/select-field/index.css +7 -4
  66. package/modern/components/pagination/select-field/index.js +1 -1
  67. package/modern/components/table/Component.js +1 -1
  68. package/modern/components/table/index.css +11 -8
  69. package/modern/components/tbody/Component.js +1 -1
  70. package/modern/components/tbody/index.css +5 -2
  71. package/modern/components/tcell/Component.js +1 -1
  72. package/modern/components/tcell/index.css +9 -6
  73. package/modern/components/texpandable-row/Component.d.ts +3 -1
  74. package/modern/components/texpandable-row/Component.js +3 -3
  75. package/modern/components/texpandable-row/index.css +9 -6
  76. package/modern/components/thead/Component.js +1 -1
  77. package/modern/components/thead/index.css +10 -7
  78. package/modern/components/thead-cell/Component.js +1 -1
  79. package/modern/components/thead-cell/index.css +13 -10
  80. package/modern/components/trow/Component.d.ts +22 -1
  81. package/modern/components/trow/Component.js +5 -4
  82. package/modern/components/trow/index.css +11 -8
  83. package/modern/components/tsortable-head-cell/Component.js +1 -1
  84. package/modern/components/tsortable-head-cell/index.css +12 -9
  85. package/moderncssm/component.d.ts +8 -1
  86. package/moderncssm/components/texpandable-row/Component.d.ts +3 -1
  87. package/moderncssm/components/texpandable-row/Component.js +2 -2
  88. package/moderncssm/components/trow/Component.d.ts +22 -1
  89. package/moderncssm/components/trow/Component.js +4 -3
  90. package/package.json +3 -3
  91. package/src/components/texpandable-row/Component.tsx +5 -1
  92. package/src/components/trow/Component.tsx +18 -20
@@ -1,4 +1,4 @@
1
- /* hash: 1o3q4 */
1
+ /* hash: 1448p */
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;
@@ -22,13 +22,16 @@
22
22
  --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 */
23
23
 
24
24
  /* новые значения, используйте их */
25
+
26
+ /* no-unit может приводить к проблемам в calc (#1559) */
27
+ /* stylelint-disable-next-line length-zero-no-unit */
25
28
  --gap-8: var(--gap-xs);
26
29
  --gap-12: var(--gap-s);
27
30
  --gap-16: var(--gap-m);
28
31
  --gap-24: var(--gap-xl);
29
32
  } :root {
30
33
  } :root {
31
- } /* сбрасывает синюю подсветку при нажатии */ .table__component_97k0w {
34
+ } /* сбрасывает синюю подсветку при нажатии */ .table__component_ekvg3 {
32
35
  font-size: 14px;
33
36
  line-height: 20px;
34
37
  font-weight: 400;
@@ -39,14 +42,14 @@
39
42
  border-top: 1px solid var(--color-light-neutral-400);
40
43
  vertical-align: top;
41
44
  box-sizing: border-box
42
- } .table__component_97k0w:first-child {
45
+ } .table__component_ekvg3:first-child {
43
46
  padding-left: var(--gap-16);
44
- } .table__component_97k0w:last-child {
47
+ } .table__component_ekvg3:last-child {
45
48
  padding-right: var(--gap-16);
46
- } .table__compactHorizontal_97k0w {
49
+ } .table__compactHorizontal_ekvg3 {
47
50
  padding-left: 6px;
48
51
  padding-right: 6px;
49
- } .table__compact_97k0w {
52
+ } .table__compact_ekvg3 {
50
53
  padding-top: var(--gap-8);
51
54
  padding-bottom: var(--gap-8);
52
55
 
@@ -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 };
@@ -2,10 +2,10 @@ import React, { forwardRef, useState } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { TRow } from '../trow/Component.js';
4
4
 
5
- const styles = {"row":"table__row_1s1gd","selected":"table__selected_1s1gd","expanded":"table__expanded_1s1gd","expandable":"table__expandable_1s1gd"};
5
+ const styles = {"row":"table__row_1f1x2","selected":"table__selected_1f1x2","expanded":"table__expanded_1f1x2","expandable":"table__expandable_1f1x2"};
6
6
  require('./index.css')
7
7
 
8
- const TExpandableRow = forwardRef(({ className, selected, expanded, defaultExpanded = false, onToggle = () => null, renderContent = () => null, ...restProps }, ref) => {
8
+ const TExpandableRow = forwardRef(({ className, selected, expanded, defaultExpanded = false, onToggle = () => null, renderContent = () => null, rowRef, ...restProps }, ref) => {
9
9
  const [expandedState, setExpandedState] = useState(defaultExpanded);
10
10
  const uncontrolled = expanded === undefined;
11
11
  const isExpanded = (uncontrolled ? expandedState : expanded);
@@ -19,7 +19,7 @@ const TExpandableRow = forwardRef(({ className, selected, expanded, defaultExpan
19
19
  React.createElement(TRow, { className: cn(styles.row, className, {
20
20
  [styles.selected]: selected,
21
21
  [styles.expanded]: isExpanded,
22
- }), selected: selected, onClick: handleToggle, ...restProps }),
22
+ }), selected: selected, onClick: handleToggle, ref: rowRef, ...restProps }),
23
23
  React.createElement("tr", { ref: ref, className: cn(styles.expandable, { [styles.expanded]: isExpanded }) }, renderContent(isExpanded))));
24
24
  });
25
25
  TExpandableRow.displayName = 'TExpandableRow';
@@ -1,4 +1,4 @@
1
- /* hash: 1kfe6 */
1
+ /* hash: bc3wx */
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 { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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 +16,19 @@
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
- --gap-0: 0;
19
+
20
+ /* no-unit может приводить к проблемам в calc (#1559) */
21
+ /* stylelint-disable-next-line length-zero-no-unit */
22
+ --gap-0: 0px;
20
23
  } :root {
21
24
  } :root {
22
- } /* сбрасывает синюю подсветку при нажатии */ .table__row_1s1gd {
25
+ } /* сбрасывает синюю подсветку при нажатии */ .table__row_1f1x2 {
23
26
  cursor: pointer;
24
- } .table__selected_1s1gd.table__expanded_1s1gd {
27
+ } .table__selected_1f1x2.table__expanded_1f1x2 {
25
28
  background-color: inherit;
26
- } .table__expanded_1s1gd:hover {
29
+ } .table__expanded_1f1x2:hover {
27
30
  background-color: inherit;
28
- } .table__expandable_1s1gd td {
31
+ } .table__expandable_1f1x2 td {
29
32
  margin: var(--gap-0);
30
33
  padding-top: var(--gap-0);
31
34
  padding-bottom: var(--gap-0);
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- const styles = {"component":"table__component_7731s","row":"table__row_7731s"};
4
+ const styles = {"component":"table__component_10879","row":"table__row_10879"};
5
5
  require('./index.css')
6
6
 
7
7
  const THead = ({ className, rowClassName, children, dataTestId, ...restProps }) => (React.createElement("thead", { className: cn(styles.component, className), "data-test-id": dataTestId, ...restProps },
@@ -1,4 +1,4 @@
1
- /* hash: 1m5hb */
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
- --gap-0: 0;
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
- } /* сбрасывает синюю подсветку при нажатии */ .table__component_7731s {
28
+ } /* сбрасывает синюю подсветку при нажатии */ .table__component_10879 {
26
29
  position: relative;
27
30
  width: 100%;
28
31
  box-sizing: border-box
29
- } .table__component_7731s th:not(:last-child):not(:empty):after {
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
- } .table__component_7731s th:after {
43
+ } .table__component_10879 th:after {
41
44
  opacity: 0;
42
- } .table__component_7731s:hover th:after {
45
+ } .table__component_10879:hover th:after {
43
46
  opacity: 1;
44
- } .table__row_7731s {
47
+ } .table__row_10879 {
45
48
  height: 72px;
46
49
  }
@@ -2,7 +2,7 @@ import React, { useContext } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { TableContext } from '../table-context/index.js';
4
4
 
5
- const styles = {"component":"table__component_8nkro","stickyHeader":"table__stickyHeader_8nkro","sortable":"table__sortable_8nkro","sorted":"table__sorted_8nkro","compactHorizontal":"table__compactHorizontal_8nkro"};
5
+ const styles = {"component":"table__component_1src0","stickyHeader":"table__stickyHeader_1src0","sortable":"table__sortable_1src0","sorted":"table__sorted_1src0","compactHorizontal":"table__compactHorizontal_1src0"};
6
6
  require('./index.css')
7
7
 
8
8
  const THeadCell = ({ children, className, dataTestId, style, width, textAlign, hidden, ...restProps }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1rtah */
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
- --gap-0: 0;
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
- } /* сбрасывает синюю подсветку при нажатии */ .table__component_8nkro {
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
- } .table__component_8nkro:first-child {
51
+ } .table__component_1src0:first-child {
49
52
  padding-left: var(--gap-16);
50
- } .table__component_8nkro:last-child {
53
+ } .table__component_1src0:last-child {
51
54
  padding-right: var(--gap-16);
52
- } .table__component_8nkro:not(.table__stickyHeader_8nkro) {
55
+ } .table__component_1src0:not(.table__stickyHeader_1src0) {
53
56
  position: relative;
54
- } .table__sortable_8nkro {
57
+ } .table__sortable_1src0 {
55
58
  cursor: pointer;
56
- } .table__sorted_8nkro {
59
+ } .table__sorted_1src0 {
57
60
  color: var(--color-light-text-primary);
58
- } .table__stickyHeader_8nkro {
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
- } .table__compactHorizontal_8nkro {
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: ({ children, className, selected, withoutBorder, dataTestId, ...restProps }: TRowProps) => React.JSX.Element;
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 };
@@ -1,13 +1,14 @@
1
- import React from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- const styles = {"component":"table__component_1gypo","withoutBorder":"table__withoutBorder_1gypo","clickable":"table__clickable_1gypo","selected":"table__selected_1gypo"};
4
+ const styles = {"component":"table__component_1o6ux","withoutBorder":"table__withoutBorder_1o6ux","clickable":"table__clickable_1o6ux","selected":"table__selected_1o6ux"};
5
5
  require('./index.css')
6
6
 
7
- const TRow = ({ children, className, selected, withoutBorder, dataTestId, ...restProps }) => (React.createElement("tr", { className: cn(styles.component, className, {
7
+ const TRow = forwardRef(({ children, className, selected, withoutBorder, dataTestId, ...restProps }, ref) => (React.createElement("tr", { className: cn(styles.component, className, {
8
8
  [styles.clickable]: typeof restProps.onClick !== 'undefined',
9
9
  [styles.selected]: selected,
10
10
  [styles.withoutBorder]: withoutBorder,
11
- }), "data-test-id": dataTestId, ...restProps }, React.Children.map(children, (child, index) => React.cloneElement(child, { index }))));
11
+ }), "data-test-id": dataTestId, ref: ref, ...restProps }, React.Children.map(children, (child, index) => React.cloneElement(child, { index })))));
12
+ TRow.displayName = 'TRow';
12
13
 
13
14
  export { TRow };
@@ -1,4 +1,4 @@
1
- /* hash: cgzio */
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
- } /* сбрасывает синюю подсветку при нажатии */ .table__component_1gypo {
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
- } .table__component_1gypo:first-child td {
33
+ } .table__component_1o6ux:first-child td {
31
34
  border-top: 0;
32
- } .table__withoutBorder_1gypo td {
35
+ } .table__withoutBorder_1o6ux td {
33
36
  border: none;
34
- } .table__clickable_1gypo {
37
+ } .table__clickable_1o6ux {
35
38
  cursor: pointer
36
- } .table__clickable_1gypo:hover {
39
+ } .table__clickable_1o6ux:hover {
37
40
  background-color: var(--color-light-base-bg-secondary);
38
- } .table__selected_1gypo {
41
+ } .table__selected_1o6ux {
39
42
  background-color: #f2f8ff /* нет цвета в палитре */
40
- } .table__selected_1gypo:hover {
43
+ } .table__selected_1o6ux:hover {
41
44
  background-color: var(--color-static-graphic-solitude);
42
45
  }
@@ -5,7 +5,7 @@ import { SortIconAsc } from './sort-icon-asc.js';
5
5
  import { SortIconDesc } from './sort-icon-desc.js';
6
6
  import { SortIconUnset } from './sort-icon-unset.js';
7
7
 
8
- const styles = {"content":"table__content_5mio9","icon":"table__icon_5mio9","reverse":"table__reverse_5mio9","sorted":"table__sorted_5mio9"};
8
+ const styles = {"content":"table__content_m1nch","icon":"table__icon_m1nch","reverse":"table__reverse_m1nch","sorted":"table__sorted_m1nch"};
9
9
  require('./index.css')
10
10
 
11
11
  const TSortableHeadCell = ({ children, className, defaultIsSortedDesc, isSortedDesc, textAlign, onSort, ...restProps }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1g3wz */
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
- --gap-0: 0;
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
- } /* сбрасывает синюю подсветку при нажатии */ .table__content_5mio9 {
30
+ } /* сбрасывает синюю подсветку при нажатии */ .table__content_m1nch {
28
31
  display: flex;
29
32
  align-items: flex-start;
30
- } .table__icon_5mio9 {
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
- } .table__icon_5mio9:hover {
45
+ } .table__icon_m1nch:hover {
43
46
  color: var(--color-light-neutral-translucent-1300);
44
- } .table__reverse_5mio9 {
47
+ } .table__reverse_m1nch {
45
48
  flex-direction: row-reverse
46
- } .table__reverse_5mio9 .table__icon_5mio9 {
49
+ } .table__reverse_m1nch .table__icon_m1nch {
47
50
  margin-left: var(--gap-0);
48
51
  margin-right: var(--gap-8);
49
- } .table__sorted_5mio9 {
52
+ } .table__sorted_m1nch {
50
53
  color: var(--color-light-status-info)
51
- } .table__sorted_5mio9:hover {
54
+ } .table__sorted_m1nch:hover {
52
55
  color: var(--color-light-status-info);
53
56
  }
@@ -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: ({ children, className, selected, withoutBorder, dataTestId, ...restProps }: import("./components/index").TRowProps) => import("react").JSX.Element;
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
  };
@@ -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 };
@@ -3,7 +3,7 @@ import cn from 'classnames';
3
3
  import { TRow } from '../trow/Component.js';
4
4
  import styles from './index.module.css';
5
5
 
6
- const TExpandableRow = forwardRef(({ className, selected, expanded, defaultExpanded = false, onToggle = () => null, renderContent = () => null, ...restProps }, ref) => {
6
+ const TExpandableRow = forwardRef(({ className, selected, expanded, defaultExpanded = false, onToggle = () => null, renderContent = () => null, rowRef, ...restProps }, ref) => {
7
7
  const [expandedState, setExpandedState] = useState(defaultExpanded);
8
8
  const uncontrolled = expanded === undefined;
9
9
  const isExpanded = (uncontrolled ? expandedState : expanded);
@@ -17,7 +17,7 @@ const TExpandableRow = forwardRef(({ className, selected, expanded, defaultExpan
17
17
  React.createElement(TRow, { className: cn(styles.row, className, {
18
18
  [styles.selected]: selected,
19
19
  [styles.expanded]: isExpanded,
20
- }), selected: selected, onClick: handleToggle, ...restProps }),
20
+ }), selected: selected, onClick: handleToggle, ref: rowRef, ...restProps }),
21
21
  React.createElement("tr", { ref: ref, className: cn(styles.expandable, { [styles.expanded]: isExpanded }) }, renderContent(isExpanded))));
22
22
  });
23
23
  TExpandableRow.displayName = 'TExpandableRow';
@@ -25,5 +25,26 @@ type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
25
25
  */
26
26
  dataTestId?: string;
27
27
  };
28
- declare const TRow: ({ children, className, selected, withoutBorder, dataTestId, ...restProps }: TRowProps) => React.JSX.Element;
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 };
@@ -1,11 +1,12 @@
1
- import React from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import cn from 'classnames';
3
3
  import styles from './index.module.css';
4
4
 
5
- const TRow = ({ children, className, selected, withoutBorder, dataTestId, ...restProps }) => (React.createElement("tr", { className: cn(styles.component, className, {
5
+ const TRow = forwardRef(({ children, className, selected, withoutBorder, dataTestId, ...restProps }, ref) => (React.createElement("tr", { className: cn(styles.component, className, {
6
6
  [styles.clickable]: typeof restProps.onClick !== 'undefined',
7
7
  [styles.selected]: selected,
8
8
  [styles.withoutBorder]: withoutBorder,
9
- }), "data-test-id": dataTestId, ...restProps }, React.Children.map(children, (child, index) => React.cloneElement(child, { index }))));
9
+ }), "data-test-id": dataTestId, ref: ref, ...restProps }, React.Children.map(children, (child, index) => React.cloneElement(child, { index })))));
10
+ TRow.displayName = 'TRow';
10
11
 
11
12
  export { TRow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-table",
3
- "version": "2.8.5",
3
+ "version": "2.9.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -18,10 +18,10 @@
18
18
  "dependencies": {
19
19
  "@alfalab/core-components-button": "^11.11.3",
20
20
  "@alfalab/core-components-pagination": "^2.4.8",
21
- "@alfalab/core-components-select": "^17.20.0",
21
+ "@alfalab/core-components-select": "^17.20.2",
22
22
  "classnames": "^2.5.1",
23
23
  "tslib": "^2.4.0"
24
24
  },
25
25
  "themesVersion": "13.7.0",
26
- "varsVersion": "9.16.0"
26
+ "varsVersion": "9.17.0"
27
27
  }