@alfalab/core-components-table 2.3.10 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/{Component-1a4fbd11.d.ts → Component-72308007.d.ts} +1 -1
  2. package/Component-72dda473.d.ts +53 -0
  3. package/{modern/component-1a4fbd11.d.ts → component-72308007.d.ts} +1 -1
  4. package/components/pagination/Component.d.ts +4 -0
  5. package/components/pagination/Component.js +4 -4
  6. package/components/pagination/index.css +10 -8
  7. package/components/pagination/select-field/index.css +4 -4
  8. package/components/pagination/select-field/index.js +1 -1
  9. package/components/table/Component.js +1 -1
  10. package/components/table/index.css +7 -7
  11. package/components/tbody/Component.js +1 -1
  12. package/components/tbody/index.css +2 -2
  13. package/components/tcell/Component.js +1 -1
  14. package/components/tcell/index.css +6 -6
  15. package/components/texpandable-row/Component.js +1 -1
  16. package/components/texpandable-row/index.css +5 -5
  17. package/components/thead/Component.js +1 -1
  18. package/components/thead/index.css +6 -6
  19. package/components/thead-cell/Component.js +1 -1
  20. package/components/thead-cell/index.css +9 -9
  21. package/components/trow/Component.js +1 -1
  22. package/components/trow/index.css +8 -8
  23. package/components/tsortable-head-cell/Component.js +1 -1
  24. package/components/tsortable-head-cell/index.css +8 -8
  25. package/{esm/Component-1a4fbd11.d.ts → cssm/Component-72308007.d.ts} +1 -1
  26. package/cssm/Component-72dda473.d.ts +53 -0
  27. package/{component-1a4fbd11.d.ts → cssm/component-72308007.d.ts} +1 -1
  28. package/cssm/components/pagination/Component.d.ts +4 -0
  29. package/cssm/components/pagination/Component.js +3 -3
  30. package/cssm/components/pagination/index.module.css +3 -1
  31. package/cssm/index-72308007.d.ts +54 -0
  32. package/cssm/index-c44170fe.d.ts +2 -20
  33. package/cssm/index-c76d6398.d.ts +2 -2
  34. package/cssm/index-ebda875c.d.ts +2 -2
  35. package/cssm/index-f12ee135.d.ts +2 -2
  36. package/cssm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  37. package/cssm/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  38. package/{cssm/Component-1a4fbd11.d.ts → esm/Component-72308007.d.ts} +1 -1
  39. package/esm/Component-72dda473.d.ts +53 -0
  40. package/esm/{component-1a4fbd11.d.ts → component-72308007.d.ts} +1 -1
  41. package/esm/components/pagination/Component.d.ts +4 -0
  42. package/esm/components/pagination/Component.js +4 -4
  43. package/esm/components/pagination/index.css +10 -8
  44. package/esm/components/pagination/select-field/index.css +4 -4
  45. package/esm/components/pagination/select-field/index.js +1 -1
  46. package/esm/components/table/Component.js +1 -1
  47. package/esm/components/table/index.css +7 -7
  48. package/esm/components/tbody/Component.js +1 -1
  49. package/esm/components/tbody/index.css +2 -2
  50. package/esm/components/tcell/Component.js +1 -1
  51. package/esm/components/tcell/index.css +6 -6
  52. package/esm/components/texpandable-row/Component.js +1 -1
  53. package/esm/components/texpandable-row/index.css +5 -5
  54. package/esm/components/thead/Component.js +1 -1
  55. package/esm/components/thead/index.css +6 -6
  56. package/esm/components/thead-cell/Component.js +1 -1
  57. package/esm/components/thead-cell/index.css +9 -9
  58. package/esm/components/trow/Component.js +1 -1
  59. package/esm/components/trow/index.css +8 -8
  60. package/esm/components/tsortable-head-cell/Component.js +1 -1
  61. package/esm/components/tsortable-head-cell/index.css +8 -8
  62. package/esm/index-72308007.d.ts +54 -0
  63. package/esm/index-c44170fe.d.ts +2 -20
  64. package/esm/index-c76d6398.d.ts +2 -2
  65. package/esm/index-ebda875c.d.ts +2 -2
  66. package/esm/index-f12ee135.d.ts +2 -2
  67. package/esm/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  68. package/esm/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  69. package/index-72308007.d.ts +54 -0
  70. package/index-c44170fe.d.ts +2 -20
  71. package/index-c76d6398.d.ts +2 -2
  72. package/index-ebda875c.d.ts +2 -2
  73. package/index-f12ee135.d.ts +2 -2
  74. package/modern/{Component-1a4fbd11.d.ts → Component-72308007.d.ts} +1 -1
  75. package/modern/Component-72dda473.d.ts +53 -0
  76. package/{cssm/component-1a4fbd11.d.ts → modern/component-72308007.d.ts} +1 -1
  77. package/modern/components/pagination/Component.d.ts +4 -0
  78. package/modern/components/pagination/Component.js +4 -4
  79. package/modern/components/pagination/index.css +10 -8
  80. package/modern/components/pagination/select-field/index.css +4 -4
  81. package/modern/components/pagination/select-field/index.js +1 -1
  82. package/modern/components/table/Component.js +1 -1
  83. package/modern/components/table/index.css +7 -7
  84. package/modern/components/tbody/Component.js +1 -1
  85. package/modern/components/tbody/index.css +2 -2
  86. package/modern/components/tcell/Component.js +1 -1
  87. package/modern/components/tcell/index.css +6 -6
  88. package/modern/components/texpandable-row/Component.js +1 -1
  89. package/modern/components/texpandable-row/index.css +5 -5
  90. package/modern/components/thead/Component.js +1 -1
  91. package/modern/components/thead/index.css +6 -6
  92. package/modern/components/thead-cell/Component.js +1 -1
  93. package/modern/components/thead-cell/index.css +9 -9
  94. package/modern/components/trow/Component.js +1 -1
  95. package/modern/components/trow/index.css +8 -8
  96. package/modern/components/tsortable-head-cell/Component.js +1 -1
  97. package/modern/components/tsortable-head-cell/index.css +8 -8
  98. package/modern/index-72308007.d.ts +54 -0
  99. package/modern/index-c44170fe.d.ts +2 -20
  100. package/modern/index-c76d6398.d.ts +2 -2
  101. package/modern/index-ebda875c.d.ts +2 -2
  102. package/modern/index-f12ee135.d.ts +2 -2
  103. package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  104. package/modern/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  105. package/package.json +3 -3
  106. package/src/components/pagination/Component.tsx +21 -11
  107. package/src/components/pagination/index.module.css +4 -0
  108. package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
  109. package/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
  110. package/cssm/index-1a4fbd11.d.ts +0 -22
  111. package/esm/index-1a4fbd11.d.ts +0 -22
  112. package/index-1a4fbd11.d.ts +0 -22
  113. package/modern/index-1a4fbd11.d.ts +0 -22
  114. /package/cssm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  115. /package/esm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  116. /package/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  117. /package/modern/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
@@ -2,7 +2,7 @@ import React, { 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_kw06h","selected":"table__selected_kw06h","expanded":"table__expanded_kw06h","expandable":"table__expandable_kw06h"};
5
+ const styles = {"row":"table__row_12cgx","selected":"table__selected_12cgx","expanded":"table__expanded_12cgx","expandable":"table__expandable_12cgx"};
6
6
  require('./index.css')
7
7
 
8
8
  const TExpandableRow = ({ className, selected, expanded, defaultExpanded = false, onToggle = () => null, renderContent = () => null, ...restProps }) => {
@@ -1,4 +1,4 @@
1
- /* hash: fz0qg */
1
+ /* hash: 111n5 */
2
2
  :root {
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 */
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 */
@@ -14,13 +14,13 @@
14
14
  } :root {
15
15
  } :root {
16
16
  } :root {
17
- } .table__row_kw06h {
17
+ } .table__row_12cgx {
18
18
  cursor: pointer;
19
- } .table__selected_kw06h.table__expanded_kw06h {
19
+ } .table__selected_12cgx.table__expanded_12cgx {
20
20
  background-color: inherit;
21
- } .table__expanded_kw06h:hover {
21
+ } .table__expanded_12cgx:hover {
22
22
  background-color: inherit;
23
- } .table__expandable_kw06h td {
23
+ } .table__expandable_12cgx td {
24
24
  margin: 0;
25
25
  padding-top: 0;
26
26
  padding-bottom: 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_1wxd9","row":"table__row_1wxd9"};
4
+ const styles = {"component":"table__component_1polh","row":"table__row_1polh"};
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: 1tbqm */
1
+ /* hash: utoeh */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-quaternary: #dcdcdd; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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,11 +16,11 @@
16
16
  --gap-xs: 8px;
17
17
  } :root {
18
18
  } :root {
19
- } .table__component_1wxd9 {
19
+ } .table__component_1polh {
20
20
  position: relative;
21
21
  width: 100%;
22
22
  box-sizing: border-box
23
- } .table__component_1wxd9 th:not(:last-child):not(:empty):after {
23
+ } .table__component_1polh th:not(:last-child):not(:empty):after {
24
24
  transition: opacity 0.2s;
25
25
  position: absolute;
26
26
  content: '';
@@ -31,10 +31,10 @@
31
31
  top: var(--gap-xs);
32
32
  bottom: var(--gap-xs);
33
33
  background-color: var(--color-light-graphic-quaternary);
34
- } .table__component_1wxd9 th:after {
34
+ } .table__component_1polh th:after {
35
35
  opacity: 0;
36
- } .table__component_1wxd9:hover th:after {
36
+ } .table__component_1polh:hover th:after {
37
37
  opacity: 1;
38
- } .table__row_1wxd9 {
38
+ } .table__row_1polh {
39
39
  height: 72px;
40
40
  }
@@ -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_14ymi","stickyHeader":"table__stickyHeader_14ymi","sortable":"table__sortable_14ymi","sorted":"table__sorted_14ymi","compactHorizontal":"table__compactHorizontal_14ymi"};
5
+ const styles = {"component":"table__component_10gr5","stickyHeader":"table__stickyHeader_10gr5","sortable":"table__sortable_10gr5","sorted":"table__sorted_10gr5","compactHorizontal":"table__compactHorizontal_10gr5"};
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: 1ezuz */
1
+ /* hash: i9hkc */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -21,7 +21,7 @@
21
21
  --gap-2xl: 32px;
22
22
  } :root {
23
23
  } :root {
24
- } .table__component_14ymi {
24
+ } .table__component_10gr5 {
25
25
  font-size: 12px;
26
26
  line-height: 16px;
27
27
  font-weight: 500;
@@ -36,23 +36,23 @@
36
36
  background: var(--color-light-bg-primary);
37
37
  vertical-align: top;
38
38
  box-sizing: border-box
39
- } .table__component_14ymi:first-child {
39
+ } .table__component_10gr5:first-child {
40
40
  padding-left: var(--gap-m);
41
- } .table__component_14ymi:last-child {
41
+ } .table__component_10gr5:last-child {
42
42
  padding-right: var(--gap-m);
43
- } .table__component_14ymi:not(.table__stickyHeader_14ymi) {
43
+ } .table__component_10gr5:not(.table__stickyHeader_10gr5) {
44
44
  position: relative;
45
- } .table__sortable_14ymi {
45
+ } .table__sortable_10gr5 {
46
46
  cursor: pointer;
47
- } .table__sorted_14ymi {
47
+ } .table__sorted_10gr5 {
48
48
  color: var(--color-light-text-primary);
49
- } .table__stickyHeader_14ymi {
49
+ } .table__stickyHeader_10gr5 {
50
50
  top: 0;
51
51
  position: sticky;
52
52
  box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);
53
53
  border: none;
54
54
  z-index: 1;
55
- } .table__compactHorizontal_14ymi {
55
+ } .table__compactHorizontal_10gr5 {
56
56
  padding-left: 6px;
57
57
  padding-right: 6px;
58
58
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
- const styles = {"component":"table__component_19nw6","withoutBorder":"table__withoutBorder_19nw6","clickable":"table__clickable_19nw6","selected":"table__selected_19nw6"};
4
+ const styles = {"component":"table__component_1qx6c","withoutBorder":"table__withoutBorder_1qx6c","clickable":"table__clickable_1qx6c","selected":"table__selected_1qx6c"};
5
5
  require('./index.css')
6
6
 
7
7
  const TRow = ({ children, className, selected, withoutBorder, dataTestId, ...restProps }) => (React.createElement("tr", { className: cn(styles.component, className, {
@@ -1,4 +1,4 @@
1
- /* hash: 16y0q */
1
+ /* hash: hkj3t */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -17,22 +17,22 @@
17
17
  } :root {
18
18
  } :root {
19
19
  } :root {
20
- } .table__component_19nw6 {
20
+ } .table__component_1qx6c {
21
21
  padding-top: 1px;
22
22
  width: 100%;
23
23
  transition: background-color 0.2s;
24
24
  box-sizing: border-box;
25
25
  background: var(--color-light-bg-primary)
26
- } .table__component_19nw6:first-child td {
26
+ } .table__component_1qx6c:first-child td {
27
27
  border-top: 0;
28
- } .table__withoutBorder_19nw6 td {
28
+ } .table__withoutBorder_1qx6c td {
29
29
  border: none;
30
- } .table__clickable_19nw6 {
30
+ } .table__clickable_1qx6c {
31
31
  cursor: pointer
32
- } .table__clickable_19nw6:hover {
32
+ } .table__clickable_1qx6c:hover {
33
33
  background-color: var(--color-light-bg-secondary);
34
- } .table__selected_19nw6 {
34
+ } .table__selected_1qx6c {
35
35
  background-color: #f2f8ff /* нет цвета в палитре */
36
- } .table__selected_19nw6:hover {
36
+ } .table__selected_1qx6c:hover {
37
37
  background-color: var(--color-static-graphic-solitude);
38
38
  }
@@ -6,7 +6,7 @@ import { SortIconDesc } from './sort-icon-desc.js';
6
6
  import { SortIconUnset } from './sort-icon-unset.js';
7
7
  import '../table-context/index.js';
8
8
 
9
- const styles = {"content":"table__content_r3p2y","icon":"table__icon_r3p2y","reverse":"table__reverse_r3p2y","sorted":"table__sorted_r3p2y"};
9
+ const styles = {"content":"table__content_1v4bn","icon":"table__icon_1v4bn","reverse":"table__reverse_1v4bn","sorted":"table__sorted_1v4bn"};
10
10
  require('./index.css')
11
11
 
12
12
  const TSortableHeadCell = ({ children, className, defaultIsSortedDesc, isSortedDesc, textAlign, onSort, ...restProps }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 5a8jp */
1
+ /* hash: ez9ux */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-graphic-link: #0072ef;
@@ -18,10 +18,10 @@
18
18
  --gap-xs: 8px;
19
19
  } :root {
20
20
  } :root {
21
- } .table__content_r3p2y {
21
+ } .table__content_1v4bn {
22
22
  display: flex;
23
23
  align-items: flex-start;
24
- } .table__icon_r3p2y {
24
+ } .table__icon_1v4bn {
25
25
  cursor: pointer;
26
26
  margin-left: var(--gap-xs);
27
27
 
@@ -33,15 +33,15 @@
33
33
  color: var(--color-light-graphic-secondary);
34
34
  transition: color 0.2s ease;
35
35
  flex-shrink: 0
36
- } .table__icon_r3p2y:hover {
36
+ } .table__icon_1v4bn:hover {
37
37
  color: var(--color-light-graphic-primary);
38
- } .table__reverse_r3p2y {
38
+ } .table__reverse_1v4bn {
39
39
  flex-direction: row-reverse
40
- } .table__reverse_r3p2y .table__icon_r3p2y {
40
+ } .table__reverse_1v4bn .table__icon_1v4bn {
41
41
  margin-left: 0;
42
42
  margin-right: var(--gap-xs);
43
- } .table__sorted_r3p2y {
43
+ } .table__sorted_1v4bn {
44
44
  color: var(--color-light-graphic-link)
45
- } .table__sorted_r3p2y:hover {
45
+ } .table__sorted_1v4bn:hover {
46
46
  color: var(--color-light-graphic-link);
47
47
  }
@@ -0,0 +1,54 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ /* eslint-disable no-plusplus, no-param-reassign */
5
+ import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
6
+ declare const isClient: () => boolean;
7
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
8
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
9
+ declare function easeInOutQuad(x: number): number;
10
+ declare const easingFns: {
11
+ easeInOutQuad: typeof easeInOutQuad;
12
+ };
13
+ declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
14
+ declare const inputUtils: {
15
+ disableUserInput: typeof disableUserInput;
16
+ };
17
+ /**
18
+ * Возвращает true, если значение равно null или undefined
19
+ */
20
+ declare function isNil(value: unknown): boolean;
21
+ /**
22
+ * Выбор значения между min max границами
23
+ */
24
+ declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
25
+ declare function noop(): void;
26
+ declare const fnUtils: {
27
+ clamp: typeof clamp;
28
+ noop: typeof noop;
29
+ isNil: typeof isNil;
30
+ };
31
+ /**
32
+ * Запрещает каретке становиться за указанные границы
33
+ */
34
+ declare function caretGuard(guard: (value: string, selection: readonly [
35
+ from: number,
36
+ to: number
37
+ ]) => [
38
+ from: number,
39
+ to: number
40
+ ]): MaskitoPlugin;
41
+ /**
42
+ * Запрещает удалять указанный префикс
43
+ */
44
+ declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
45
+ /**
46
+ * Препроцессор необходим для правильной вставки/автокомплита телефонного номера
47
+ */
48
+ declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
49
+ declare const maskUtils: {
50
+ insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
51
+ prefixPostprocessor: typeof prefixPostprocessor;
52
+ caretGuard: typeof caretGuard;
53
+ };
54
+ export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
@@ -1,21 +1,3 @@
1
1
  /// <reference types="react" />
2
- import React from "react";
3
- import { BaseInputProps } from "./index-ebda875c";
4
- type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
5
- /**
6
- * Контрольная точка, с нее начинается desktop версия
7
- * @default 1024
8
- */
9
- breakpoint?: number;
10
- /**
11
- * Значение по-умолчанию для хука useMatchMedia
12
- */
13
- defaultMatchMediaValue?: boolean | (() => boolean);
14
- };
15
- declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "colorStyles" | "FormControlComponent"> & {
16
- breakpoint?: number | undefined;
17
- defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
18
- } & React.RefAttributes<HTMLInputElement>>;
19
- type InputMobileProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles">;
20
- declare const InputMobile: React.ForwardRefExoticComponent<InputMobileProps & React.RefAttributes<HTMLInputElement>>;
21
- export { InputProps, Input, InputMobileProps, InputMobile };
2
+ export * from "./Component.responsive-785df74d";
3
+ export {};
@@ -1,2 +1,2 @@
1
- export * from "./Component-1a4fbd11";
2
- export type { NavigationBarProps } from "./types-83e2bd9e";
1
+ export * from "./Component-72308007";
2
+ export type { NavigationBarProps } from "./types-1c79e231";
@@ -66,7 +66,7 @@ type IconButtonProps = {
66
66
  * Набор цветов для компонента
67
67
  */
68
68
  colors?: "default" | "inverted";
69
- } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
69
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
70
70
  declare const IconButton: React.ForwardRefExoticComponent<{
71
71
  icon: ElementType<{
72
72
  className?: string;
@@ -77,5 +77,5 @@ declare const IconButton: React.ForwardRefExoticComponent<{
77
77
  alignIcon?: "center" | "left" | "right" | undefined;
78
78
  dataTestId?: string | undefined;
79
79
  colors?: "default" | "inverted" | undefined;
80
- } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
80
+ } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
81
81
  export { CloserProps, Closer, IconButtonProps, IconButton };
@@ -1,3 +1,3 @@
1
- export * from "./component-1a4fbd11";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-e40becc7";
1
+ export * from "./component-72308007";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-67a2d8af";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
@@ -259,7 +259,7 @@ type BottomSheetProps = {
259
259
  /**
260
260
  * Вызывается после окончания анимации притягивания
261
261
  */
262
- onMagnetizeEnd?: () => void;
262
+ onMagnetizeEnd?: (index: number) => void;
263
263
  /**
264
264
  * Вызывается при изменении положения шторки
265
265
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-table",
3
- "version": "2.3.10",
3
+ "version": "2.4.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -15,9 +15,9 @@
15
15
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@alfalab/core-components-button": "^9.0.4",
18
+ "@alfalab/core-components-button": "^9.0.5",
19
19
  "@alfalab/core-components-pagination": "^2.1.2",
20
- "@alfalab/core-components-select": "^15.1.5",
20
+ "@alfalab/core-components-select": "^15.2.0",
21
21
  "classnames": "^2.3.1",
22
22
  "tslib": "^2.4.0"
23
23
  }
@@ -30,6 +30,11 @@ export type PaginationProps = CorePaginationProps & {
30
30
  */
31
31
  onPerPageChange?: (perPage: number) => void;
32
32
 
33
+ /**
34
+ * Скрывает переключатель количества строк на страницу
35
+ */
36
+ hidePerPageSelect?: boolean;
37
+
33
38
  /**
34
39
  * Идентификатор для систем автоматизированного тестирования
35
40
  */
@@ -40,6 +45,7 @@ export const Pagination: FC<PaginationProps> = ({
40
45
  perPage = 25,
41
46
  possiblePerPage = [25, 50, 100],
42
47
  onPerPageChange = () => null,
48
+ hidePerPageSelect = false,
43
49
  pagesCount,
44
50
  onPageChange = () => null,
45
51
  className,
@@ -81,21 +87,25 @@ export const Pagination: FC<PaginationProps> = ({
81
87
 
82
88
  return (
83
89
  <div className={cn(styles.component, className)} data-test-id={dataTestId}>
84
- <SelectDesktop
85
- options={options}
86
- selected={perPage.toString()}
87
- onChange={handlePerPageChange}
88
- preventFlip={false}
89
- size='s'
90
- className={styles.select}
91
- optionsListClassName={styles.menu}
92
- optionClassName={styles.option}
93
- Field={CustomSelectField}
94
- />
90
+ {hidePerPageSelect === false && (
91
+ <SelectDesktop
92
+ options={options}
93
+ selected={perPage.toString()}
94
+ onChange={handlePerPageChange}
95
+ preventFlip={false}
96
+ size='s'
97
+ className={styles.select}
98
+ optionsListClassName={styles.menu}
99
+ optionClassName={styles.option}
100
+ Field={CustomSelectField}
101
+ />
102
+ )}
103
+
95
104
  {pagesCount > 1 && (
96
105
  <CorePagination
97
106
  pagesCount={pagesCount}
98
107
  onPageChange={handlePageChange}
108
+ className={styles.pagination}
99
109
  {...restPaginationProps}
100
110
  />
101
111
  )}
@@ -29,6 +29,10 @@
29
29
  }
30
30
  }
31
31
 
32
+ .pagination {
33
+ margin-left: auto;
34
+ }
35
+
32
36
  .menu {
33
37
  margin: var(--gap-2xs) 0;
34
38
  }
@@ -14,7 +14,7 @@ type NavigationBarProps = {
14
14
  /**
15
15
  * Подзаголовок (доступен только в мобильной версии)
16
16
  */
17
- subtitle?: string;
17
+ subtitle?: ReactNode;
18
18
  /**
19
19
  * Размер заголовка (compact доступен только в мобильной версии)
20
20
  */
@@ -259,7 +259,7 @@ type BottomSheetProps = {
259
259
  /**
260
260
  * Вызывается после окончания анимации притягивания
261
261
  */
262
- onMagnetizeEnd?: () => void;
262
+ onMagnetizeEnd?: (index: number) => void;
263
263
  /**
264
264
  * Вызывается при изменении положения шторки
265
265
  */
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
@@ -1,22 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { PaddingType } from "./index-72dda473";
4
- declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
- declare const isClient: () => boolean;
6
- declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
- declare function easeInOutQuad(x: number): number;
8
- declare const easingFns: {
9
- easeInOutQuad: typeof easeInOutQuad;
10
- };
11
- declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
- declare const inputUtils: {
13
- disableUserInput: typeof disableUserInput;
14
- };
15
- /**
16
- * Возвращает true, если значение равно null или undefined
17
- */
18
- declare function isNil(value: unknown): boolean;
19
- declare const fnUtils: {
20
- isNil: typeof isNil;
21
- };
22
- export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils, fnUtils };
File without changes