@alfalab/core-components-pagination 2.0.21 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.js +2 -2
- package/components/default-view/index.css +2 -2
- package/components/default-view/index.js +2 -2
- package/components/per-page-view/index.css +2 -2
- package/components/per-page-view/index.js +1 -1
- package/components/tag/index.css +8 -8
- package/components/tag/index.d.ts +83 -2
- package/components/tag/index.js +3 -3
- package/cssm/Component.js +1 -1
- package/cssm/components/default-view/index.js +1 -1
- package/cssm/components/tag/index.d.ts +83 -2
- package/cssm/components/tag/index.js +2 -2
- package/cssm/components/tag/index.module.css +7 -7
- package/cssm/index.js +1 -1
- package/esm/Component.js +2 -2
- package/esm/components/default-view/index.css +2 -2
- package/esm/components/default-view/index.js +2 -2
- package/esm/components/per-page-view/index.css +2 -2
- package/esm/components/per-page-view/index.js +1 -1
- package/esm/components/tag/index.css +8 -8
- package/esm/components/tag/index.d.ts +83 -2
- package/esm/components/tag/index.js +3 -3
- package/esm/index.css +4 -5
- package/esm/index.js +1 -1
- package/index.css +4 -5
- package/index.js +1 -1
- package/modern/Component.js +2 -2
- package/modern/components/default-view/index.css +2 -2
- package/modern/components/default-view/index.js +2 -2
- package/modern/components/per-page-view/index.css +2 -2
- package/modern/components/per-page-view/index.js +1 -1
- package/modern/components/tag/index.css +8 -8
- package/modern/components/tag/index.d.ts +83 -2
- package/modern/components/tag/index.js +3 -3
- package/modern/index.css +4 -5
- package/modern/index.js +1 -1
- package/package.json +2 -2
- package/src/Component.tsx +127 -0
- package/src/components/default-view/index.module.css +12 -0
- package/src/components/default-view/index.tsx +88 -0
- package/src/components/per-page-view/index.module.css +6 -0
- package/src/components/per-page-view/index.tsx +13 -0
- package/src/components/tag/index.module.css +40 -0
- package/src/components/tag/index.tsx +18 -0
- package/src/index.module.css +20 -0
- package/src/index.ts +1 -0
package/Component.js
CHANGED
|
@@ -10,14 +10,14 @@ var components_defaultView_index = require('./components/default-view/index.js')
|
|
|
10
10
|
var components_perPageView_index = require('./components/per-page-view/index.js');
|
|
11
11
|
var components_tag_index = require('./components/tag/index.js');
|
|
12
12
|
require('tslib');
|
|
13
|
-
require('@alfalab/core-components-tag');
|
|
13
|
+
require('@alfalab/core-components-tag/desktop');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
16
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"component":"
|
|
20
|
+
var styles = {"component":"pagination__component_ynqhf","defaultView":"pagination__defaultView_ynqhf"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var Pagination = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 16zr9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .pagination__dots_hcm4n {
|
|
19
19
|
width: 32px;
|
|
20
20
|
height: 32px;
|
|
21
21
|
text-align: center;
|
|
@@ -6,13 +6,13 @@ var React = require('react');
|
|
|
6
6
|
var components_tag_index = require('../tag/index.js');
|
|
7
7
|
require('tslib');
|
|
8
8
|
require('classnames');
|
|
9
|
-
require('@alfalab/core-components-tag');
|
|
9
|
+
require('@alfalab/core-components-tag/desktop');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
var styles = {"dots":"
|
|
15
|
+
var styles = {"dots":"pagination__dots_hcm4n"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
/* eslint-disable react/no-array-index-key */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dfv3v */
|
|
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 */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
--gap-m: 16px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .pagination__component_12vfs {
|
|
19
19
|
display: block;
|
|
20
20
|
margin: 0 var(--gap-m);
|
|
21
21
|
}
|
|
@@ -8,7 +8,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"
|
|
11
|
+
var styles = {"component":"pagination__component_12vfs"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var PerPageView = function (_a) {
|
package/components/tag/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1whx5 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-quaternary: #dcdcdd;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
} :root {
|
|
24
|
-
} .
|
|
24
|
+
} button.pagination__tag_11495.pagination__tag_11495 {
|
|
25
25
|
color: var(--color-light-text-secondary);
|
|
26
26
|
border-radius: var(--border-radius-m);
|
|
27
27
|
border: none;
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
width: 32px;
|
|
32
32
|
height: 32px;
|
|
33
33
|
padding: 0
|
|
34
|
-
} .
|
|
34
|
+
} button.pagination__tag_11495.pagination__tag_11495:disabled:not(.pagination__checked_11495) {
|
|
35
35
|
opacity: 0.3;
|
|
36
|
-
} .
|
|
36
|
+
} button.pagination__tag_11495.pagination__tag_11495:hover:not(:disabled) {
|
|
37
37
|
background-color: var(--color-light-bg-tertiary);
|
|
38
38
|
color: var(--color-light-text-primary);
|
|
39
|
-
} .
|
|
39
|
+
} button.pagination__tag_11495.pagination__tag_11495:active:not(:disabled) {
|
|
40
40
|
background-color: var(--color-light-bg-quaternary);
|
|
41
|
-
} .
|
|
41
|
+
} button.pagination__tag_11495.pagination__tag_11495.pagination__checked_11495 {
|
|
42
42
|
cursor: default;
|
|
43
43
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
44
44
|
color: var(--color-light-text-primary-inverted);
|
|
45
|
-
} .
|
|
45
|
+
} button.pagination__tag_11495.pagination__tag_11495.pagination__checked_11495:hover:not(:disabled) {
|
|
46
46
|
color: var(--color-light-text-primary-inverted);
|
|
47
|
-
} .
|
|
47
|
+
} button.pagination__tag_11495.pagination__tag_11495.pagination__checked_11495:active:not(:disabled) {
|
|
48
48
|
color: var(--color-light-text-primary);
|
|
49
49
|
}
|
|
@@ -1,4 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FC, ButtonHTMLAttributes, ReactNode, RefObject } from "react";
|
|
4
|
+
type StyleColors = {
|
|
5
|
+
default: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
inverted: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type NativeProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
|
+
type BaseTagProps = Omit<NativeProps, "onClick"> & {
|
|
14
|
+
/**
|
|
15
|
+
* Отображение кнопки в отмеченном (зажатом) состоянии
|
|
16
|
+
*/
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Размер компонента
|
|
20
|
+
*/
|
|
21
|
+
size?: "xxs" | "xs" | "s" | "m" | "l" | "xl";
|
|
22
|
+
/**
|
|
23
|
+
* Дочерние элементы.
|
|
24
|
+
*/
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Дополнительный класс для обёртки children
|
|
28
|
+
*/
|
|
29
|
+
childrenClassName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Слот слева
|
|
32
|
+
*/
|
|
33
|
+
leftAddons?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Слот справа
|
|
36
|
+
*/
|
|
37
|
+
rightAddons?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
40
|
+
*/
|
|
41
|
+
dataTestId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Обработчик нажатия
|
|
44
|
+
*/
|
|
45
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, payload: {
|
|
46
|
+
checked: boolean;
|
|
47
|
+
name?: string;
|
|
48
|
+
}) => void;
|
|
49
|
+
/**
|
|
50
|
+
* ref на children
|
|
51
|
+
*/
|
|
52
|
+
childrenRef?: RefObject<HTMLSpanElement>;
|
|
53
|
+
/**
|
|
54
|
+
* Набор цветов для компонента
|
|
55
|
+
*/
|
|
56
|
+
colors?: "default" | "inverted";
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
59
|
+
* Используйте props shape и view
|
|
60
|
+
* Вариант тега
|
|
61
|
+
*/
|
|
62
|
+
variant?: "default" | "alt";
|
|
63
|
+
/**
|
|
64
|
+
* Форма тега
|
|
65
|
+
*/
|
|
66
|
+
shape?: "rounded" | "rectangular";
|
|
67
|
+
/**
|
|
68
|
+
* Стиль тега
|
|
69
|
+
*/
|
|
70
|
+
view?: "outlined" | "filled";
|
|
71
|
+
/**
|
|
72
|
+
* Основные стили компонента.
|
|
73
|
+
*/
|
|
74
|
+
styles?: {
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Стили компонента для default и inverted режима.
|
|
79
|
+
*/
|
|
80
|
+
colorStylesMap?: StyleColors;
|
|
81
|
+
};
|
|
82
|
+
type TagDesktopProps = Omit<BaseTagProps, "styles">;
|
|
83
|
+
type TagProps = TagDesktopProps;
|
|
3
84
|
declare const Tag: FC<TagProps>;
|
|
4
85
|
export { Tag };
|
package/components/tag/index.js
CHANGED
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
|
-
var
|
|
8
|
+
var desktop = require('@alfalab/core-components-tag/desktop');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"tag":"
|
|
15
|
+
var styles = {"tag":"pagination__tag_11495","checked":"pagination__checked_11495"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var Tag = function (_a) {
|
|
19
19
|
var _b;
|
|
20
20
|
var className = _a.className, checked = _a.checked, restProps = tslib.__rest(_a, ["className", "checked"]);
|
|
21
|
-
return (React__default.default.createElement(
|
|
21
|
+
return (React__default.default.createElement(desktop.TagDesktop, tslib.__assign({}, restProps, { checked: checked, size: 'xxs', className: cn__default.default(className, styles.tag, (_b = {}, _b[styles.checked] = checked, _b)) })));
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
exports.Tag = Tag;
|
package/cssm/Component.js
CHANGED
|
@@ -13,7 +13,7 @@ var styles = require('./index.module.css');
|
|
|
13
13
|
require('./components/default-view/index.module.css');
|
|
14
14
|
require('./components/per-page-view/index.module.css');
|
|
15
15
|
require('tslib');
|
|
16
|
-
require('@alfalab/core-components-tag/cssm');
|
|
16
|
+
require('@alfalab/core-components-tag/cssm/desktop');
|
|
17
17
|
require('./components/tag/index.module.css');
|
|
18
18
|
|
|
19
19
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -7,7 +7,7 @@ var components_tag_index = require('../tag/index.js');
|
|
|
7
7
|
var styles = require('./index.module.css');
|
|
8
8
|
require('tslib');
|
|
9
9
|
require('classnames');
|
|
10
|
-
require('@alfalab/core-components-tag/cssm');
|
|
10
|
+
require('@alfalab/core-components-tag/cssm/desktop');
|
|
11
11
|
require('../tag/index.module.css');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -1,4 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FC, ButtonHTMLAttributes, ReactNode, RefObject } from "react";
|
|
4
|
+
type StyleColors = {
|
|
5
|
+
default: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
inverted: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type NativeProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
|
+
type BaseTagProps = Omit<NativeProps, "onClick"> & {
|
|
14
|
+
/**
|
|
15
|
+
* Отображение кнопки в отмеченном (зажатом) состоянии
|
|
16
|
+
*/
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Размер компонента
|
|
20
|
+
*/
|
|
21
|
+
size?: "xxs" | "xs" | "s" | "m" | "l" | "xl";
|
|
22
|
+
/**
|
|
23
|
+
* Дочерние элементы.
|
|
24
|
+
*/
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Дополнительный класс для обёртки children
|
|
28
|
+
*/
|
|
29
|
+
childrenClassName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Слот слева
|
|
32
|
+
*/
|
|
33
|
+
leftAddons?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Слот справа
|
|
36
|
+
*/
|
|
37
|
+
rightAddons?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
40
|
+
*/
|
|
41
|
+
dataTestId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Обработчик нажатия
|
|
44
|
+
*/
|
|
45
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, payload: {
|
|
46
|
+
checked: boolean;
|
|
47
|
+
name?: string;
|
|
48
|
+
}) => void;
|
|
49
|
+
/**
|
|
50
|
+
* ref на children
|
|
51
|
+
*/
|
|
52
|
+
childrenRef?: RefObject<HTMLSpanElement>;
|
|
53
|
+
/**
|
|
54
|
+
* Набор цветов для компонента
|
|
55
|
+
*/
|
|
56
|
+
colors?: "default" | "inverted";
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
59
|
+
* Используйте props shape и view
|
|
60
|
+
* Вариант тега
|
|
61
|
+
*/
|
|
62
|
+
variant?: "default" | "alt";
|
|
63
|
+
/**
|
|
64
|
+
* Форма тега
|
|
65
|
+
*/
|
|
66
|
+
shape?: "rounded" | "rectangular";
|
|
67
|
+
/**
|
|
68
|
+
* Стиль тега
|
|
69
|
+
*/
|
|
70
|
+
view?: "outlined" | "filled";
|
|
71
|
+
/**
|
|
72
|
+
* Основные стили компонента.
|
|
73
|
+
*/
|
|
74
|
+
styles?: {
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Стили компонента для default и inverted режима.
|
|
79
|
+
*/
|
|
80
|
+
colorStylesMap?: StyleColors;
|
|
81
|
+
};
|
|
82
|
+
type TagDesktopProps = Omit<BaseTagProps, "styles">;
|
|
83
|
+
type TagProps = TagDesktopProps;
|
|
3
84
|
declare const Tag: FC<TagProps>;
|
|
4
85
|
export { Tag };
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
|
-
var
|
|
8
|
+
var desktop = require('@alfalab/core-components-tag/cssm/desktop');
|
|
9
9
|
var styles = require('./index.module.css');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -17,7 +17,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
17
17
|
var Tag = function (_a) {
|
|
18
18
|
var _b;
|
|
19
19
|
var className = _a.className, checked = _a.checked, restProps = tslib.__rest(_a, ["className", "checked"]);
|
|
20
|
-
return (React__default.default.createElement(
|
|
20
|
+
return (React__default.default.createElement(desktop.TagDesktop, tslib.__assign({}, restProps, { checked: checked, size: 'xxs', className: cn__default.default(className, styles__default.default.tag, (_b = {}, _b[styles__default.default.checked] = checked, _b)) })));
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
exports.Tag = Tag;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
} :root {
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
|
-
} .tag.tag {
|
|
23
|
+
} button.tag.tag {
|
|
24
24
|
color: var(--color-light-text-secondary);
|
|
25
25
|
border-radius: var(--border-radius-m);
|
|
26
26
|
border: none;
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
width: 32px;
|
|
31
31
|
height: 32px;
|
|
32
32
|
padding: 0
|
|
33
|
-
} .tag.tag:disabled:not(.checked) {
|
|
33
|
+
} button.tag.tag:disabled:not(.checked) {
|
|
34
34
|
opacity: 0.3;
|
|
35
|
-
} .tag.tag:hover:not(:disabled) {
|
|
35
|
+
} button.tag.tag:hover:not(:disabled) {
|
|
36
36
|
background-color: var(--color-light-bg-tertiary);
|
|
37
37
|
color: var(--color-light-text-primary);
|
|
38
|
-
} .tag.tag:active:not(:disabled) {
|
|
38
|
+
} button.tag.tag:active:not(:disabled) {
|
|
39
39
|
background-color: var(--color-light-bg-quaternary);
|
|
40
|
-
} .tag.tag.checked {
|
|
40
|
+
} button.tag.tag.checked {
|
|
41
41
|
cursor: default;
|
|
42
42
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
43
43
|
color: var(--color-light-text-primary-inverted);
|
|
44
|
-
} .tag.tag.checked:hover:not(:disabled) {
|
|
44
|
+
} button.tag.tag.checked:hover:not(:disabled) {
|
|
45
45
|
color: var(--color-light-text-primary-inverted);
|
|
46
|
-
} .tag.tag.checked:active:not(:disabled) {
|
|
46
|
+
} button.tag.tag.checked:active:not(:disabled) {
|
|
47
47
|
color: var(--color-light-text-primary);
|
|
48
48
|
}
|
package/cssm/index.js
CHANGED
|
@@ -10,7 +10,7 @@ require('@alfalab/icons-glyph/ChevronForwardMIcon');
|
|
|
10
10
|
require('./components/default-view/index.js');
|
|
11
11
|
require('./components/tag/index.js');
|
|
12
12
|
require('tslib');
|
|
13
|
-
require('@alfalab/core-components-tag/cssm');
|
|
13
|
+
require('@alfalab/core-components-tag/cssm/desktop');
|
|
14
14
|
require('./components/tag/index.module.css');
|
|
15
15
|
require('./components/default-view/index.module.css');
|
|
16
16
|
require('./components/per-page-view/index.js');
|
package/esm/Component.js
CHANGED
|
@@ -6,9 +6,9 @@ import { DefaultView } from './components/default-view/index.js';
|
|
|
6
6
|
import { PerPageView } from './components/per-page-view/index.js';
|
|
7
7
|
import { Tag } from './components/tag/index.js';
|
|
8
8
|
import 'tslib';
|
|
9
|
-
import '@alfalab/core-components-tag/esm';
|
|
9
|
+
import '@alfalab/core-components-tag/esm/desktop';
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"
|
|
11
|
+
var styles = {"component":"pagination__component_ynqhf","defaultView":"pagination__defaultView_ynqhf"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var Pagination = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 16zr9 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-secondary: rgba(60, 60, 67, 0.66); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .pagination__dots_hcm4n {
|
|
19
19
|
width: 32px;
|
|
20
20
|
height: 32px;
|
|
21
21
|
text-align: center;
|
|
@@ -2,9 +2,9 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
import { Tag } from '../tag/index.js';
|
|
3
3
|
import 'tslib';
|
|
4
4
|
import 'classnames';
|
|
5
|
-
import '@alfalab/core-components-tag/esm';
|
|
5
|
+
import '@alfalab/core-components-tag/esm/desktop';
|
|
6
6
|
|
|
7
|
-
var styles = {"dots":"
|
|
7
|
+
var styles = {"dots":"pagination__dots_hcm4n"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
/* eslint-disable react/no-array-index-key */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dfv3v */
|
|
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 */
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
--gap-m: 16px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .pagination__component_12vfs {
|
|
19
19
|
display: block;
|
|
20
20
|
margin: 0 var(--gap-m);
|
|
21
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1whx5 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-quaternary: #dcdcdd;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
} :root {
|
|
24
|
-
} .
|
|
24
|
+
} button.pagination__tag_11495.pagination__tag_11495 {
|
|
25
25
|
color: var(--color-light-text-secondary);
|
|
26
26
|
border-radius: var(--border-radius-m);
|
|
27
27
|
border: none;
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
width: 32px;
|
|
32
32
|
height: 32px;
|
|
33
33
|
padding: 0
|
|
34
|
-
} .
|
|
34
|
+
} button.pagination__tag_11495.pagination__tag_11495:disabled:not(.pagination__checked_11495) {
|
|
35
35
|
opacity: 0.3;
|
|
36
|
-
} .
|
|
36
|
+
} button.pagination__tag_11495.pagination__tag_11495:hover:not(:disabled) {
|
|
37
37
|
background-color: var(--color-light-bg-tertiary);
|
|
38
38
|
color: var(--color-light-text-primary);
|
|
39
|
-
} .
|
|
39
|
+
} button.pagination__tag_11495.pagination__tag_11495:active:not(:disabled) {
|
|
40
40
|
background-color: var(--color-light-bg-quaternary);
|
|
41
|
-
} .
|
|
41
|
+
} button.pagination__tag_11495.pagination__tag_11495.pagination__checked_11495 {
|
|
42
42
|
cursor: default;
|
|
43
43
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
44
44
|
color: var(--color-light-text-primary-inverted);
|
|
45
|
-
} .
|
|
45
|
+
} button.pagination__tag_11495.pagination__tag_11495.pagination__checked_11495:hover:not(:disabled) {
|
|
46
46
|
color: var(--color-light-text-primary-inverted);
|
|
47
|
-
} .
|
|
47
|
+
} button.pagination__tag_11495.pagination__tag_11495.pagination__checked_11495:active:not(:disabled) {
|
|
48
48
|
color: var(--color-light-text-primary);
|
|
49
49
|
}
|
|
@@ -1,4 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FC, ButtonHTMLAttributes, ReactNode, RefObject } from "react";
|
|
4
|
+
type StyleColors = {
|
|
5
|
+
default: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
inverted: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type NativeProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
|
+
type BaseTagProps = Omit<NativeProps, "onClick"> & {
|
|
14
|
+
/**
|
|
15
|
+
* Отображение кнопки в отмеченном (зажатом) состоянии
|
|
16
|
+
*/
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Размер компонента
|
|
20
|
+
*/
|
|
21
|
+
size?: "xxs" | "xs" | "s" | "m" | "l" | "xl";
|
|
22
|
+
/**
|
|
23
|
+
* Дочерние элементы.
|
|
24
|
+
*/
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Дополнительный класс для обёртки children
|
|
28
|
+
*/
|
|
29
|
+
childrenClassName?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Слот слева
|
|
32
|
+
*/
|
|
33
|
+
leftAddons?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Слот справа
|
|
36
|
+
*/
|
|
37
|
+
rightAddons?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
40
|
+
*/
|
|
41
|
+
dataTestId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Обработчик нажатия
|
|
44
|
+
*/
|
|
45
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, payload: {
|
|
46
|
+
checked: boolean;
|
|
47
|
+
name?: string;
|
|
48
|
+
}) => void;
|
|
49
|
+
/**
|
|
50
|
+
* ref на children
|
|
51
|
+
*/
|
|
52
|
+
childrenRef?: RefObject<HTMLSpanElement>;
|
|
53
|
+
/**
|
|
54
|
+
* Набор цветов для компонента
|
|
55
|
+
*/
|
|
56
|
+
colors?: "default" | "inverted";
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
59
|
+
* Используйте props shape и view
|
|
60
|
+
* Вариант тега
|
|
61
|
+
*/
|
|
62
|
+
variant?: "default" | "alt";
|
|
63
|
+
/**
|
|
64
|
+
* Форма тега
|
|
65
|
+
*/
|
|
66
|
+
shape?: "rounded" | "rectangular";
|
|
67
|
+
/**
|
|
68
|
+
* Стиль тега
|
|
69
|
+
*/
|
|
70
|
+
view?: "outlined" | "filled";
|
|
71
|
+
/**
|
|
72
|
+
* Основные стили компонента.
|
|
73
|
+
*/
|
|
74
|
+
styles?: {
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Стили компонента для default и inverted режима.
|
|
79
|
+
*/
|
|
80
|
+
colorStylesMap?: StyleColors;
|
|
81
|
+
};
|
|
82
|
+
type TagDesktopProps = Omit<BaseTagProps, "styles">;
|
|
83
|
+
type TagProps = TagDesktopProps;
|
|
3
84
|
declare const Tag: FC<TagProps>;
|
|
4
85
|
export { Tag };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
|
-
import {
|
|
4
|
+
import { TagDesktop } from '@alfalab/core-components-tag/esm/desktop';
|
|
5
5
|
|
|
6
|
-
var styles = {"tag":"
|
|
6
|
+
var styles = {"tag":"pagination__tag_11495","checked":"pagination__checked_11495"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
var Tag = function (_a) {
|
|
10
10
|
var _b;
|
|
11
11
|
var className = _a.className, checked = _a.checked, restProps = __rest(_a, ["className", "checked"]);
|
|
12
|
-
return (React.createElement(
|
|
12
|
+
return (React.createElement(TagDesktop, __assign({}, restProps, { checked: checked, size: 'xxs', className: cn(className, styles.tag, (_b = {}, _b[styles.checked] = checked, _b)) })));
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export { Tag };
|