@alfalab/core-components-table 2.3.11 → 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.
- package/Component-72308007.d.ts +1 -1
- package/Component-72dda473.d.ts +53 -0
- package/component-72308007.d.ts +1 -1
- package/components/pagination/Component.d.ts +4 -0
- package/components/pagination/Component.js +4 -4
- package/components/pagination/index.css +10 -8
- package/components/pagination/select-field/index.css +4 -4
- package/components/pagination/select-field/index.js +1 -1
- package/components/table/Component.js +1 -1
- package/components/table/index.css +7 -7
- package/components/tbody/Component.js +1 -1
- package/components/tbody/index.css +2 -2
- package/components/tcell/Component.js +1 -1
- package/components/tcell/index.css +6 -6
- package/components/texpandable-row/Component.js +1 -1
- package/components/texpandable-row/index.css +5 -5
- package/components/thead/Component.js +1 -1
- package/components/thead/index.css +6 -6
- package/components/thead-cell/Component.js +1 -1
- package/components/thead-cell/index.css +9 -9
- package/components/trow/Component.js +1 -1
- package/components/trow/index.css +8 -8
- package/components/tsortable-head-cell/Component.js +1 -1
- package/components/tsortable-head-cell/index.css +8 -8
- package/cssm/Component-72308007.d.ts +1 -1
- package/cssm/Component-72dda473.d.ts +53 -0
- package/cssm/component-72308007.d.ts +1 -1
- package/cssm/components/pagination/Component.d.ts +4 -0
- package/cssm/components/pagination/Component.js +3 -3
- package/cssm/components/pagination/index.module.css +3 -1
- package/cssm/index-72308007.d.ts +2 -2
- package/cssm/index-c44170fe.d.ts +2 -20
- package/cssm/index-c76d6398.d.ts +1 -1
- package/cssm/index-ebda875c.d.ts +2 -2
- package/cssm/index-f12ee135.d.ts +1 -1
- package/{esm/types-83e2bd9e.d.ts → cssm/types-1c79e231.d.ts} +1 -1
- package/{esm/types-e40becc7.d.ts → cssm/types-67a2d8af.d.ts} +1 -1
- package/esm/Component-72308007.d.ts +1 -1
- package/esm/Component-72dda473.d.ts +53 -0
- package/esm/component-72308007.d.ts +1 -1
- package/esm/components/pagination/Component.d.ts +4 -0
- package/esm/components/pagination/Component.js +4 -4
- package/esm/components/pagination/index.css +10 -8
- package/esm/components/pagination/select-field/index.css +4 -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 +7 -7
- package/esm/components/tbody/Component.js +1 -1
- package/esm/components/tbody/index.css +2 -2
- package/esm/components/tcell/Component.js +1 -1
- package/esm/components/tcell/index.css +6 -6
- package/esm/components/texpandable-row/Component.js +1 -1
- package/esm/components/texpandable-row/index.css +5 -5
- package/esm/components/thead/Component.js +1 -1
- package/esm/components/thead/index.css +6 -6
- package/esm/components/thead-cell/Component.js +1 -1
- package/esm/components/thead-cell/index.css +9 -9
- package/esm/components/trow/Component.js +1 -1
- package/esm/components/trow/index.css +8 -8
- package/esm/components/tsortable-head-cell/Component.js +1 -1
- package/esm/components/tsortable-head-cell/index.css +8 -8
- package/esm/index-72308007.d.ts +2 -2
- package/esm/index-c44170fe.d.ts +2 -20
- package/esm/index-c76d6398.d.ts +1 -1
- package/esm/index-ebda875c.d.ts +2 -2
- package/esm/index-f12ee135.d.ts +1 -1
- package/{cssm/types-83e2bd9e.d.ts → esm/types-1c79e231.d.ts} +1 -1
- package/{modern/types-e40becc7.d.ts → esm/types-67a2d8af.d.ts} +1 -1
- package/index-72308007.d.ts +2 -2
- package/index-c44170fe.d.ts +2 -20
- package/index-c76d6398.d.ts +1 -1
- package/index-ebda875c.d.ts +2 -2
- package/index-f12ee135.d.ts +1 -1
- package/modern/Component-72308007.d.ts +1 -1
- package/modern/Component-72dda473.d.ts +53 -0
- package/modern/component-72308007.d.ts +1 -1
- package/modern/components/pagination/Component.d.ts +4 -0
- package/modern/components/pagination/Component.js +4 -4
- package/modern/components/pagination/index.css +10 -8
- package/modern/components/pagination/select-field/index.css +4 -4
- package/modern/components/pagination/select-field/index.js +1 -1
- package/modern/components/table/Component.js +1 -1
- package/modern/components/table/index.css +7 -7
- package/modern/components/tbody/Component.js +1 -1
- package/modern/components/tbody/index.css +2 -2
- package/modern/components/tcell/Component.js +1 -1
- package/modern/components/tcell/index.css +6 -6
- package/modern/components/texpandable-row/Component.js +1 -1
- package/modern/components/texpandable-row/index.css +5 -5
- package/modern/components/thead/Component.js +1 -1
- package/modern/components/thead/index.css +6 -6
- package/modern/components/thead-cell/Component.js +1 -1
- package/modern/components/thead-cell/index.css +9 -9
- package/modern/components/trow/Component.js +1 -1
- package/modern/components/trow/index.css +8 -8
- package/modern/components/tsortable-head-cell/Component.js +1 -1
- package/modern/components/tsortable-head-cell/index.css +8 -8
- package/modern/index-72308007.d.ts +2 -2
- package/modern/index-c44170fe.d.ts +2 -20
- package/modern/index-c76d6398.d.ts +1 -1
- package/modern/index-ebda875c.d.ts +2 -2
- package/modern/index-f12ee135.d.ts +1 -1
- package/modern/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{cssm/types-e40becc7.d.ts → modern/types-67a2d8af.d.ts} +1 -1
- package/package.json +2 -2
- package/src/components/pagination/Component.tsx +21 -11
- package/src/components/pagination/index.module.css +4 -0
- package/{types-83e2bd9e.d.ts → types-1c79e231.d.ts} +1 -1
- package/{types-e40becc7.d.ts → types-67a2d8af.d.ts} +1 -1
- /package/cssm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
- /package/esm/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
- /package/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
- /package/modern/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
39
|
+
} .table__component_10gr5:first-child {
|
|
40
40
|
padding-left: var(--gap-m);
|
|
41
|
-
} .
|
|
41
|
+
} .table__component_10gr5:last-child {
|
|
42
42
|
padding-right: var(--gap-m);
|
|
43
|
-
} .
|
|
43
|
+
} .table__component_10gr5:not(.table__stickyHeader_10gr5) {
|
|
44
44
|
position: relative;
|
|
45
|
-
} .
|
|
45
|
+
} .table__sortable_10gr5 {
|
|
46
46
|
cursor: pointer;
|
|
47
|
-
} .
|
|
47
|
+
} .table__sorted_10gr5 {
|
|
48
48
|
color: var(--color-light-text-primary);
|
|
49
|
-
} .
|
|
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
|
-
} .
|
|
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":"
|
|
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:
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
26
|
+
} .table__component_1qx6c:first-child td {
|
|
27
27
|
border-top: 0;
|
|
28
|
-
} .
|
|
28
|
+
} .table__withoutBorder_1qx6c td {
|
|
29
29
|
border: none;
|
|
30
|
-
} .
|
|
30
|
+
} .table__clickable_1qx6c {
|
|
31
31
|
cursor: pointer
|
|
32
|
-
} .
|
|
32
|
+
} .table__clickable_1qx6c:hover {
|
|
33
33
|
background-color: var(--color-light-bg-secondary);
|
|
34
|
-
} .
|
|
34
|
+
} .table__selected_1qx6c {
|
|
35
35
|
background-color: #f2f8ff /* нет цвета в палитре */
|
|
36
|
-
} .
|
|
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":"
|
|
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:
|
|
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
|
-
} .
|
|
21
|
+
} .table__content_1v4bn {
|
|
22
22
|
display: flex;
|
|
23
23
|
align-items: flex-start;
|
|
24
|
-
} .
|
|
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
|
-
} .
|
|
36
|
+
} .table__icon_1v4bn:hover {
|
|
37
37
|
color: var(--color-light-graphic-primary);
|
|
38
|
-
} .
|
|
38
|
+
} .table__reverse_1v4bn {
|
|
39
39
|
flex-direction: row-reverse
|
|
40
|
-
} .
|
|
40
|
+
} .table__reverse_1v4bn .table__icon_1v4bn {
|
|
41
41
|
margin-left: 0;
|
|
42
42
|
margin-right: var(--gap-xs);
|
|
43
|
-
} .
|
|
43
|
+
} .table__sorted_1v4bn {
|
|
44
44
|
color: var(--color-light-graphic-link)
|
|
45
|
-
} .
|
|
45
|
+
} .table__sorted_1v4bn:hover {
|
|
46
46
|
color: var(--color-light-graphic-link);
|
|
47
47
|
}
|
|
@@ -3,9 +3,9 @@ import React from "react";
|
|
|
3
3
|
import { PaddingType } from "./index-72dda473";
|
|
4
4
|
/* eslint-disable no-plusplus, no-param-reassign */
|
|
5
5
|
import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
|
|
6
|
-
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
7
6
|
declare const isClient: () => boolean;
|
|
8
7
|
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
8
|
+
declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
|
|
9
9
|
declare function easeInOutQuad(x: number): number;
|
|
10
10
|
declare const easingFns: {
|
|
11
11
|
easeInOutQuad: typeof easeInOutQuad;
|
|
@@ -51,4 +51,4 @@ declare const maskUtils: {
|
|
|
51
51
|
prefixPostprocessor: typeof prefixPostprocessor;
|
|
52
52
|
caretGuard: typeof caretGuard;
|
|
53
53
|
};
|
|
54
|
-
export {
|
|
54
|
+
export { isClient, getDataTestId, createPaddingStyle, easingFns, inputUtils, fnUtils, maskUtils };
|
|
@@ -1,21 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
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
1
|
export * from "./Component-72308007";
|
|
2
|
-
export type { NavigationBarProps } from "./types-
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-table",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@alfalab/core-components-button": "^9.0.5",
|
|
19
19
|
"@alfalab/core-components-pagination": "^2.1.2",
|
|
20
|
-
"@alfalab/core-components-select": "^15.
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
)}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|