@alfalab/core-components-pagination 2.0.7 → 2.0.8
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 +11 -13
- package/components/default-view/index.css +2 -2
- package/components/default-view/index.js +7 -9
- package/components/per-page-view/index.css +2 -2
- package/components/per-page-view/index.js +4 -6
- package/components/tag/index.css +8 -8
- package/components/tag/index.js +5 -7
- package/cssm/Component.js +14 -16
- package/cssm/components/default-view/index.js +8 -10
- package/cssm/components/per-page-view/index.js +4 -6
- package/cssm/components/tag/index.js +5 -7
- package/cssm/index.js +3 -5
- package/esm/Component.js +3 -3
- 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.js +1 -1
- package/esm/index.css +4 -4
- package/esm/index.js +2 -2
- package/index.css +4 -4
- package/index.js +2 -4
- package/modern/Component.js +3 -3
- 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.js +1 -1
- package/modern/index.css +4 -4
- package/modern/index.js +3 -3
- package/package.json +3 -3
package/Component.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var ChevronBackMIcon = require('@alfalab/icons-glyph/ChevronBackMIcon');
|
|
8
6
|
var ChevronForwardMIcon = require('@alfalab/icons-glyph/ChevronForwardMIcon');
|
|
9
|
-
var components_tag_index = require('./components/tag/index.js');
|
|
10
|
-
require('@alfalab/core-components-tag');
|
|
11
7
|
var components_defaultView_index = require('./components/default-view/index.js');
|
|
12
8
|
var components_perPageView_index = require('./components/per-page-view/index.js');
|
|
9
|
+
var components_tag_index = require('./components/tag/index.js');
|
|
10
|
+
require('@alfalab/core-components-tag');
|
|
13
11
|
|
|
14
|
-
function
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
13
|
|
|
16
|
-
var React__default = /*#__PURE__*/
|
|
17
|
-
var cn__default = /*#__PURE__*/
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
16
|
|
|
19
|
-
var styles = {"component":"
|
|
17
|
+
var styles = {"component":"pagination__component_11d1b","defaultView":"pagination__defaultView_11d1b"};
|
|
20
18
|
require('./index.css')
|
|
21
19
|
|
|
22
20
|
var Pagination = function (_a) {
|
|
@@ -33,11 +31,11 @@ var Pagination = function (_a) {
|
|
|
33
31
|
var shouldRenderPrevArrow = view === 'per-page' || !hideArrows || currentPageIndex > 0;
|
|
34
32
|
var shouldRenderNextArrow = view === 'per-page' || !hideArrows || currentPageIndex < pagesCount - 1;
|
|
35
33
|
var viewClassName = view === 'default' ? 'defaultView' : view;
|
|
36
|
-
return (React__default
|
|
37
|
-
shouldRenderPrevArrow && (React__default
|
|
38
|
-
view === 'default' && (React__default
|
|
39
|
-
view === 'per-page' && (React__default
|
|
40
|
-
shouldRenderNextArrow && (React__default
|
|
34
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className, styles[viewClassName]), "data-test-id": dataTestId },
|
|
35
|
+
shouldRenderPrevArrow && (React__default.default.createElement(components_tag_index.Tag, { className: styles.arrow, disabled: currentPageIndex <= 0, onClick: handlePrevPageClick, rightAddons: React__default.default.createElement(ChevronBackMIcon.ChevronBackMIcon, { width: 16, height: 16 }) })),
|
|
36
|
+
view === 'default' && (React__default.default.createElement(components_defaultView_index.DefaultView, { activePadding: activePadding, sidePadding: sidePadding, currentPageIndex: currentPageIndex, pagesCount: pagesCount, onPageChange: handlePageClick })),
|
|
37
|
+
view === 'per-page' && (React__default.default.createElement(components_perPageView_index.PerPageView, { currentPageIndex: currentPageIndex, pagesCount: pagesCount })),
|
|
38
|
+
shouldRenderNextArrow && (React__default.default.createElement(components_tag_index.Tag, { className: styles.arrow, disabled: currentPageIndex >= pagesCount - 1, onClick: handleNextPageClick, rightAddons: React__default.default.createElement(ChevronForwardMIcon.ChevronForwardMIcon, { width: 16, height: 16 }) }))));
|
|
41
39
|
};
|
|
42
40
|
|
|
43
41
|
exports.Pagination = Pagination;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 757m1 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.pagination__dots_1o58s {
|
|
14
14
|
width: 32px;
|
|
15
15
|
height: 32px;
|
|
16
16
|
text-align: center;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
|
-
require('classnames');
|
|
7
4
|
var components_tag_index = require('../tag/index.js');
|
|
5
|
+
require('classnames');
|
|
8
6
|
require('@alfalab/core-components-tag');
|
|
9
7
|
|
|
10
|
-
function
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
9
|
|
|
12
|
-
var React__default = /*#__PURE__*/
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
11
|
|
|
14
|
-
var styles = {"dots":"
|
|
12
|
+
var styles = {"dots":"pagination__dots_1o58s"};
|
|
15
13
|
require('./index.css')
|
|
16
14
|
|
|
17
15
|
/* eslint-disable react/no-array-index-key */
|
|
@@ -42,15 +40,15 @@ var DefaultView = function (_a) {
|
|
|
42
40
|
var computedIndex = currentPageIndex - maxHalfCount + elementIndex;
|
|
43
41
|
return Math.min(lastIndex - reverseElementIndex, Math.max(elementIndex, computedIndex));
|
|
44
42
|
}, [currentPageIndex, elementsCount, itemsFit, maxHalfCount, pagesCount, sidePadding]);
|
|
45
|
-
return (React__default
|
|
43
|
+
return (React__default.default.createElement(React__default.default.Fragment, null, Array(elementsCount)
|
|
46
44
|
.fill('')
|
|
47
45
|
.map(function (_, i) {
|
|
48
46
|
var pageIndex = getPageIndex(i);
|
|
49
47
|
if (pageIndex === null) {
|
|
50
|
-
return (React__default
|
|
48
|
+
return (React__default.default.createElement("div", { key: i.toString(), className: styles.dots }, "..."));
|
|
51
49
|
}
|
|
52
50
|
var active = currentPageIndex === pageIndex;
|
|
53
|
-
return (React__default
|
|
51
|
+
return (React__default.default.createElement(components_tag_index.Tag, { key: i.toString(), checked: active, disabled: active, onClick: function () { return onPageChange(pageIndex); } }, pageIndex + 1));
|
|
54
52
|
})));
|
|
55
53
|
};
|
|
56
54
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
|
|
7
|
-
function
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
6
|
|
|
9
|
-
var React__default = /*#__PURE__*/
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
8
|
|
|
11
|
-
var styles = {"component":"
|
|
9
|
+
var styles = {"component":"pagination__component_19quj"};
|
|
12
10
|
require('./index.css')
|
|
13
11
|
|
|
14
12
|
var PerPageView = function (_a) {
|
|
15
13
|
var pagesCount = _a.pagesCount, currentPageIndex = _a.currentPageIndex;
|
|
16
|
-
return (React__default
|
|
14
|
+
return (React__default.default.createElement("span", { className: styles.component },
|
|
17
15
|
currentPageIndex + 1,
|
|
18
16
|
" \u0438\u0437 ",
|
|
19
17
|
pagesCount,
|
package/components/tag/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1a09f */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-quaternary: #dbdee1;
|
|
4
4
|
--color-light-bg-secondary-inverted: #233549;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--border-radius-m: 8px;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye {
|
|
22
22
|
color: var(--color-light-text-secondary);
|
|
23
23
|
border-radius: var(--border-radius-m);
|
|
24
24
|
border: none;
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
height: 32px;
|
|
30
30
|
padding: 0
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:disabled:not(.pagination__checked_uf5ye) {
|
|
33
33
|
opacity: 0.3;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:hover:not(:disabled) {
|
|
36
36
|
background-color: var(--color-light-bg-tertiary);
|
|
37
37
|
color: var(--color-light-text-primary);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:active:not(:disabled) {
|
|
40
40
|
background-color: var(--color-light-bg-quaternary);
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye {
|
|
43
43
|
cursor: default;
|
|
44
44
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
45
45
|
color: var(--color-light-text-primary-inverted);
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:hover:not(:disabled) {
|
|
48
48
|
color: var(--color-light-text-primary-inverted);
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:active:not(:disabled) {
|
|
51
51
|
color: var(--color-light-text-primary);
|
|
52
52
|
}
|
package/components/tag/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var coreComponentsTag = require('@alfalab/core-components-tag');
|
|
8
6
|
|
|
9
|
-
function
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
8
|
|
|
11
|
-
var React__default = /*#__PURE__*/
|
|
12
|
-
var cn__default = /*#__PURE__*/
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
11
|
|
|
14
12
|
/******************************************************************************
|
|
15
13
|
Copyright (c) Microsoft Corporation.
|
|
@@ -50,13 +48,13 @@ function __rest(s, e) {
|
|
|
50
48
|
return t;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
var styles = {"tag":"
|
|
51
|
+
var styles = {"tag":"pagination__tag_uf5ye","checked":"pagination__checked_uf5ye"};
|
|
54
52
|
require('./index.css')
|
|
55
53
|
|
|
56
54
|
var Tag = function (_a) {
|
|
57
55
|
var _b;
|
|
58
56
|
var className = _a.className, checked = _a.checked, restProps = __rest(_a, ["className", "checked"]);
|
|
59
|
-
return (React__default
|
|
57
|
+
return (React__default.default.createElement(coreComponentsTag.Tag, __assign({}, restProps, { checked: checked, size: 'xxs', className: cn__default.default(className, styles.tag, (_b = {}, _b[styles.checked] = checked, _b)) })));
|
|
60
58
|
};
|
|
61
59
|
|
|
62
60
|
exports.Tag = Tag;
|
package/cssm/Component.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var ChevronBackMIcon = require('@alfalab/icons-glyph/ChevronBackMIcon');
|
|
8
6
|
var ChevronForwardMIcon = require('@alfalab/icons-glyph/ChevronForwardMIcon');
|
|
9
|
-
var components_tag_index = require('./components/tag/index.js');
|
|
10
|
-
require('@alfalab/core-components-tag/cssm');
|
|
11
|
-
require('./components/tag/index.module.css');
|
|
12
|
-
require('./components/default-view/index.module.css');
|
|
13
7
|
var components_defaultView_index = require('./components/default-view/index.js');
|
|
14
|
-
require('./components/per-page-view/index.module.css');
|
|
15
8
|
var components_perPageView_index = require('./components/per-page-view/index.js');
|
|
9
|
+
var components_tag_index = require('./components/tag/index.js');
|
|
16
10
|
var styles = require('./index.module.css');
|
|
11
|
+
require('./components/default-view/index.module.css');
|
|
12
|
+
require('./components/per-page-view/index.module.css');
|
|
13
|
+
require('@alfalab/core-components-tag/cssm');
|
|
14
|
+
require('./components/tag/index.module.css');
|
|
17
15
|
|
|
18
|
-
function
|
|
16
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
19
17
|
|
|
20
|
-
var React__default = /*#__PURE__*/
|
|
21
|
-
var cn__default = /*#__PURE__*/
|
|
22
|
-
var styles__default = /*#__PURE__*/
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
20
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
23
21
|
|
|
24
22
|
var Pagination = function (_a) {
|
|
25
23
|
var _b = _a.currentPageIndex, currentPageIndex = _b === void 0 ? 0 : _b, pagesCount = _a.pagesCount, className = _a.className, _c = _a.sidePadding, sidePadding = _c === void 0 ? 1 : _c, _d = _a.activePadding, activePadding = _d === void 0 ? 2 : _d, _e = _a.hideArrows, hideArrows = _e === void 0 ? true : _e, _f = _a.view, view = _f === void 0 ? 'default' : _f, _g = _a.onPageChange, onPageChange = _g === void 0 ? function () { return null; } : _g, dataTestId = _a.dataTestId;
|
|
@@ -35,11 +33,11 @@ var Pagination = function (_a) {
|
|
|
35
33
|
var shouldRenderPrevArrow = view === 'per-page' || !hideArrows || currentPageIndex > 0;
|
|
36
34
|
var shouldRenderNextArrow = view === 'per-page' || !hideArrows || currentPageIndex < pagesCount - 1;
|
|
37
35
|
var viewClassName = view === 'default' ? 'defaultView' : view;
|
|
38
|
-
return (React__default
|
|
39
|
-
shouldRenderPrevArrow && (React__default
|
|
40
|
-
view === 'default' && (React__default
|
|
41
|
-
view === 'per-page' && (React__default
|
|
42
|
-
shouldRenderNextArrow && (React__default
|
|
36
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.component, className, styles__default.default[viewClassName]), "data-test-id": dataTestId },
|
|
37
|
+
shouldRenderPrevArrow && (React__default.default.createElement(components_tag_index.Tag, { className: styles__default.default.arrow, disabled: currentPageIndex <= 0, onClick: handlePrevPageClick, rightAddons: React__default.default.createElement(ChevronBackMIcon.ChevronBackMIcon, { width: 16, height: 16 }) })),
|
|
38
|
+
view === 'default' && (React__default.default.createElement(components_defaultView_index.DefaultView, { activePadding: activePadding, sidePadding: sidePadding, currentPageIndex: currentPageIndex, pagesCount: pagesCount, onPageChange: handlePageClick })),
|
|
39
|
+
view === 'per-page' && (React__default.default.createElement(components_perPageView_index.PerPageView, { currentPageIndex: currentPageIndex, pagesCount: pagesCount })),
|
|
40
|
+
shouldRenderNextArrow && (React__default.default.createElement(components_tag_index.Tag, { className: styles__default.default.arrow, disabled: currentPageIndex >= pagesCount - 1, onClick: handleNextPageClick, rightAddons: React__default.default.createElement(ChevronForwardMIcon.ChevronForwardMIcon, { width: 16, height: 16 }) }))));
|
|
43
41
|
};
|
|
44
42
|
|
|
45
43
|
exports.Pagination = Pagination;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
|
-
require('classnames');
|
|
7
4
|
var components_tag_index = require('../tag/index.js');
|
|
5
|
+
var styles = require('./index.module.css');
|
|
6
|
+
require('classnames');
|
|
8
7
|
require('@alfalab/core-components-tag/cssm');
|
|
9
8
|
require('../tag/index.module.css');
|
|
10
|
-
var styles = require('./index.module.css');
|
|
11
9
|
|
|
12
|
-
function
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
11
|
|
|
14
|
-
var React__default = /*#__PURE__*/
|
|
15
|
-
var styles__default = /*#__PURE__*/
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
16
14
|
|
|
17
15
|
/* eslint-disable react/no-array-index-key */
|
|
18
16
|
var DefaultView = function (_a) {
|
|
@@ -42,15 +40,15 @@ var DefaultView = function (_a) {
|
|
|
42
40
|
var computedIndex = currentPageIndex - maxHalfCount + elementIndex;
|
|
43
41
|
return Math.min(lastIndex - reverseElementIndex, Math.max(elementIndex, computedIndex));
|
|
44
42
|
}, [currentPageIndex, elementsCount, itemsFit, maxHalfCount, pagesCount, sidePadding]);
|
|
45
|
-
return (React__default
|
|
43
|
+
return (React__default.default.createElement(React__default.default.Fragment, null, Array(elementsCount)
|
|
46
44
|
.fill('')
|
|
47
45
|
.map(function (_, i) {
|
|
48
46
|
var pageIndex = getPageIndex(i);
|
|
49
47
|
if (pageIndex === null) {
|
|
50
|
-
return (React__default
|
|
48
|
+
return (React__default.default.createElement("div", { key: i.toString(), className: styles__default.default.dots }, "..."));
|
|
51
49
|
}
|
|
52
50
|
var active = currentPageIndex === pageIndex;
|
|
53
|
-
return (React__default
|
|
51
|
+
return (React__default.default.createElement(components_tag_index.Tag, { key: i.toString(), checked: active, disabled: active, onClick: function () { return onPageChange(pageIndex); } }, pageIndex + 1));
|
|
54
52
|
})));
|
|
55
53
|
};
|
|
56
54
|
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var styles = require('./index.module.css');
|
|
7
5
|
|
|
8
|
-
function
|
|
6
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
9
7
|
|
|
10
|
-
var React__default = /*#__PURE__*/
|
|
11
|
-
var styles__default = /*#__PURE__*/
|
|
8
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
9
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
12
10
|
|
|
13
11
|
var PerPageView = function (_a) {
|
|
14
12
|
var pagesCount = _a.pagesCount, currentPageIndex = _a.currentPageIndex;
|
|
15
|
-
return (React__default
|
|
13
|
+
return (React__default.default.createElement("span", { className: styles__default.default.component },
|
|
16
14
|
currentPageIndex + 1,
|
|
17
15
|
" \u0438\u0437 ",
|
|
18
16
|
pagesCount,
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var React = require('react');
|
|
6
4
|
var cn = require('classnames');
|
|
7
5
|
var coreComponentsTag = require('@alfalab/core-components-tag/cssm');
|
|
8
6
|
var styles = require('./index.module.css');
|
|
9
7
|
|
|
10
|
-
function
|
|
8
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
9
|
|
|
12
|
-
var React__default = /*#__PURE__*/
|
|
13
|
-
var cn__default = /*#__PURE__*/
|
|
14
|
-
var styles__default = /*#__PURE__*/
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
15
13
|
|
|
16
14
|
/******************************************************************************
|
|
17
15
|
Copyright (c) Microsoft Corporation.
|
|
@@ -55,7 +53,7 @@ function __rest(s, e) {
|
|
|
55
53
|
var Tag = function (_a) {
|
|
56
54
|
var _b;
|
|
57
55
|
var className = _a.className, checked = _a.checked, restProps = __rest(_a, ["className", "checked"]);
|
|
58
|
-
return (React__default
|
|
56
|
+
return (React__default.default.createElement(coreComponentsTag.Tag, __assign({}, restProps, { checked: checked, size: 'xxs', className: cn__default.default(className, styles__default.default.tag, (_b = {}, _b[styles__default.default.checked] = checked, _b)) })));
|
|
59
57
|
};
|
|
60
58
|
|
|
61
59
|
exports.Tag = Tag;
|
package/cssm/index.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
6
|
require('@alfalab/icons-glyph/ChevronBackMIcon');
|
|
8
7
|
require('@alfalab/icons-glyph/ChevronForwardMIcon');
|
|
8
|
+
require('./components/default-view/index.js');
|
|
9
9
|
require('./components/tag/index.js');
|
|
10
10
|
require('@alfalab/core-components-tag/cssm');
|
|
11
11
|
require('./components/tag/index.module.css');
|
|
12
12
|
require('./components/default-view/index.module.css');
|
|
13
|
-
require('./components/default-view/index.js');
|
|
14
|
-
require('./components/per-page-view/index.module.css');
|
|
15
13
|
require('./components/per-page-view/index.js');
|
|
14
|
+
require('./components/per-page-view/index.module.css');
|
|
16
15
|
require('./index.module.css');
|
|
17
|
-
var Component = require('./Component.js');
|
|
18
16
|
|
|
19
17
|
|
|
20
18
|
|
package/esm/Component.js
CHANGED
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronBackMIcon } from '@alfalab/icons-glyph/ChevronBackMIcon';
|
|
4
4
|
import { ChevronForwardMIcon } from '@alfalab/icons-glyph/ChevronForwardMIcon';
|
|
5
|
-
import { Tag } from './components/tag/index.js';
|
|
6
|
-
import '@alfalab/core-components-tag/esm';
|
|
7
5
|
import { DefaultView } from './components/default-view/index.js';
|
|
8
6
|
import { PerPageView } from './components/per-page-view/index.js';
|
|
7
|
+
import { Tag } from './components/tag/index.js';
|
|
8
|
+
import '@alfalab/core-components-tag/esm';
|
|
9
9
|
|
|
10
|
-
var styles = {"component":"
|
|
10
|
+
var styles = {"component":"pagination__component_11d1b","defaultView":"pagination__defaultView_11d1b"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
var Pagination = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 757m1 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.pagination__dots_1o58s {
|
|
14
14
|
width: 32px;
|
|
15
15
|
height: 32px;
|
|
16
16
|
text-align: center;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import 'classnames';
|
|
3
2
|
import { Tag } from '../tag/index.js';
|
|
3
|
+
import 'classnames';
|
|
4
4
|
import '@alfalab/core-components-tag/esm';
|
|
5
5
|
|
|
6
|
-
var styles = {"dots":"
|
|
6
|
+
var styles = {"dots":"pagination__dots_1o58s"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
/* eslint-disable react/no-array-index-key */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1a09f */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-quaternary: #dbdee1;
|
|
4
4
|
--color-light-bg-secondary-inverted: #233549;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--border-radius-m: 8px;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye {
|
|
22
22
|
color: var(--color-light-text-secondary);
|
|
23
23
|
border-radius: var(--border-radius-m);
|
|
24
24
|
border: none;
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
height: 32px;
|
|
30
30
|
padding: 0
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:disabled:not(.pagination__checked_uf5ye) {
|
|
33
33
|
opacity: 0.3;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:hover:not(:disabled) {
|
|
36
36
|
background-color: var(--color-light-bg-tertiary);
|
|
37
37
|
color: var(--color-light-text-primary);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:active:not(:disabled) {
|
|
40
40
|
background-color: var(--color-light-bg-quaternary);
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye {
|
|
43
43
|
cursor: default;
|
|
44
44
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
45
45
|
color: var(--color-light-text-primary-inverted);
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:hover:not(:disabled) {
|
|
48
48
|
color: var(--color-light-text-primary-inverted);
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:active:not(:disabled) {
|
|
51
51
|
color: var(--color-light-text-primary);
|
|
52
52
|
}
|
|
@@ -41,7 +41,7 @@ function __rest(s, e) {
|
|
|
41
41
|
return t;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
var styles = {"tag":"
|
|
44
|
+
var styles = {"tag":"pagination__tag_uf5ye","checked":"pagination__checked_uf5ye"};
|
|
45
45
|
require('./index.css')
|
|
46
46
|
|
|
47
47
|
var Tag = function (_a) {
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ci74 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-xs: 8px;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.pagination__component_11d1b {
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
line-height: 20px;
|
|
19
19
|
font-weight: 400;
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
font-feature-settings: "tnum";
|
|
25
25
|
font-variant-numeric: tabular-nums;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.pagination__defaultView_11d1b > * {
|
|
28
28
|
margin-right: var(--gap-xs)
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.pagination__defaultView_11d1b > *:last-child {
|
|
31
31
|
margin-right: 0;
|
|
32
32
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export { Pagination } from './Component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
3
4
|
import '@alfalab/icons-glyph/ChevronBackMIcon';
|
|
4
5
|
import '@alfalab/icons-glyph/ChevronForwardMIcon';
|
|
6
|
+
import './components/default-view/index.js';
|
|
5
7
|
import './components/tag/index.js';
|
|
6
8
|
import '@alfalab/core-components-tag/esm';
|
|
7
|
-
import './components/default-view/index.js';
|
|
8
9
|
import './components/per-page-view/index.js';
|
|
9
|
-
export { Pagination } from './Component.js';
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ci74 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-xs: 8px;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.pagination__component_11d1b {
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
line-height: 20px;
|
|
19
19
|
font-weight: 400;
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
font-feature-settings: "tnum";
|
|
25
25
|
font-variant-numeric: tabular-nums;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.pagination__defaultView_11d1b > * {
|
|
28
28
|
margin-right: var(--gap-xs)
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.pagination__defaultView_11d1b > *:last-child {
|
|
31
31
|
margin-right: 0;
|
|
32
32
|
}
|
package/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var Component = require('./Component.js');
|
|
5
4
|
require('react');
|
|
6
5
|
require('classnames');
|
|
7
6
|
require('@alfalab/icons-glyph/ChevronBackMIcon');
|
|
8
7
|
require('@alfalab/icons-glyph/ChevronForwardMIcon');
|
|
8
|
+
require('./components/default-view/index.js');
|
|
9
9
|
require('./components/tag/index.js');
|
|
10
10
|
require('@alfalab/core-components-tag');
|
|
11
|
-
require('./components/default-view/index.js');
|
|
12
11
|
require('./components/per-page-view/index.js');
|
|
13
|
-
var Component = require('./Component.js');
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
|
package/modern/Component.js
CHANGED
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronBackMIcon } from '@alfalab/icons-glyph/ChevronBackMIcon';
|
|
4
4
|
import { ChevronForwardMIcon } from '@alfalab/icons-glyph/ChevronForwardMIcon';
|
|
5
|
-
import '@alfalab/core-components-tag/modern';
|
|
6
|
-
import { Tag } from './components/tag/index.js';
|
|
7
5
|
import { DefaultView } from './components/default-view/index.js';
|
|
8
6
|
import { PerPageView } from './components/per-page-view/index.js';
|
|
7
|
+
import { Tag } from './components/tag/index.js';
|
|
8
|
+
import '@alfalab/core-components-tag/modern';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const styles = {"component":"pagination__component_11d1b","defaultView":"pagination__defaultView_11d1b"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Pagination = ({ currentPageIndex = 0, pagesCount, className, sidePadding = 1, activePadding = 2, hideArrows = true, view = 'default', onPageChange = () => null, dataTestId, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 757m1 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
4
4
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.pagination__dots_1o58s {
|
|
14
14
|
width: 32px;
|
|
15
15
|
height: 32px;
|
|
16
16
|
text-align: center;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
+
import { Tag } from '../tag/index.js';
|
|
2
3
|
import 'classnames';
|
|
3
4
|
import '@alfalab/core-components-tag/modern';
|
|
4
|
-
import { Tag } from '../tag/index.js';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const styles = {"dots":"pagination__dots_1o58s"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
/* eslint-disable react/no-array-index-key */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const styles = {"component":"pagination__component_19quj"};
|
|
4
4
|
require('./index.css')
|
|
5
5
|
|
|
6
6
|
const PerPageView = ({ pagesCount, currentPageIndex }) => (React.createElement("span", { className: styles.component },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1a09f */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-quaternary: #dbdee1;
|
|
4
4
|
--color-light-bg-secondary-inverted: #233549;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--border-radius-m: 8px;
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye {
|
|
22
22
|
color: var(--color-light-text-secondary);
|
|
23
23
|
border-radius: var(--border-radius-m);
|
|
24
24
|
border: none;
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
height: 32px;
|
|
30
30
|
padding: 0
|
|
31
31
|
}
|
|
32
|
-
.
|
|
32
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:disabled:not(.pagination__checked_uf5ye) {
|
|
33
33
|
opacity: 0.3;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:hover:not(:disabled) {
|
|
36
36
|
background-color: var(--color-light-bg-tertiary);
|
|
37
37
|
color: var(--color-light-text-primary);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye:active:not(:disabled) {
|
|
40
40
|
background-color: var(--color-light-bg-quaternary);
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye {
|
|
43
43
|
cursor: default;
|
|
44
44
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
45
45
|
color: var(--color-light-text-primary-inverted);
|
|
46
46
|
}
|
|
47
|
-
.
|
|
47
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:hover:not(:disabled) {
|
|
48
48
|
color: var(--color-light-text-primary-inverted);
|
|
49
49
|
}
|
|
50
|
-
.
|
|
50
|
+
.pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:active:not(:disabled) {
|
|
51
51
|
color: var(--color-light-text-primary);
|
|
52
52
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Tag as Tag$1 } from '@alfalab/core-components-tag/modern';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const styles = {"tag":"pagination__tag_uf5ye","checked":"pagination__checked_uf5ye"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Tag = ({ className, checked, ...restProps }) => (React.createElement(Tag$1, { ...restProps, checked: checked, size: 'xxs', className: cn(className, styles.tag, { [styles.checked]: checked }) }));
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1ci74 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
--gap-xs: 8px;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.pagination__component_11d1b {
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
line-height: 20px;
|
|
19
19
|
font-weight: 400;
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
font-feature-settings: "tnum";
|
|
25
25
|
font-variant-numeric: tabular-nums;
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.pagination__defaultView_11d1b > * {
|
|
28
28
|
margin-right: var(--gap-xs)
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.pagination__defaultView_11d1b > *:last-child {
|
|
31
31
|
margin-right: 0;
|
|
32
32
|
}
|
package/modern/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export { Pagination } from './Component.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'classnames';
|
|
3
4
|
import '@alfalab/icons-glyph/ChevronBackMIcon';
|
|
4
5
|
import '@alfalab/icons-glyph/ChevronForwardMIcon';
|
|
5
|
-
import '@alfalab/core-components-tag/modern';
|
|
6
|
-
import './components/tag/index.js';
|
|
7
6
|
import './components/default-view/index.js';
|
|
7
|
+
import './components/tag/index.js';
|
|
8
|
+
import '@alfalab/core-components-tag/modern';
|
|
8
9
|
import './components/per-page-view/index.js';
|
|
9
|
-
export { Pagination } from './Component.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-pagination",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-button": "^7.0.
|
|
19
|
-
"@alfalab/core-components-tag": "^5.0.
|
|
18
|
+
"@alfalab/core-components-button": "^7.0.2",
|
|
19
|
+
"@alfalab/core-components-tag": "^5.0.3",
|
|
20
20
|
"classnames": "^2.3.1"
|
|
21
21
|
}
|
|
22
22
|
}
|