@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 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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
15
13
 
16
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
17
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
14
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
+ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
18
16
 
19
- var styles = {"component":"pagination__component_1qv8m","defaultView":"pagination__defaultView_1qv8m"};
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['default'].createElement("div", { className: cn__default['default'](styles.component, className, styles[viewClassName]), "data-test-id": dataTestId },
37
- 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 }) })),
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.arrow, disabled: currentPageIndex >= pagesCount - 1, onClick: handleNextPageClick, rightAddons: React__default['default'].createElement(ChevronForwardMIcon.ChevronForwardMIcon, { width: 16, height: 16 }) }))));
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: 12whr */
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
- .pagination__dots_idvec {
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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
9
 
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
13
11
 
14
- var styles = {"dots":"pagination__dots_idvec"};
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['default'].createElement(React__default['default'].Fragment, null, Array(elementsCount)
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['default'].createElement("div", { key: i.toString(), className: styles.dots }, "..."));
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['default'].createElement(components_tag_index.Tag, { key: i.toString(), checked: active, disabled: active, onClick: function () { return onPageChange(pageIndex); } }, pageIndex + 1));
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,4 +1,4 @@
1
- /* hash: aom28 */
1
+ /* hash: r2v8i */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,7 +10,7 @@
10
10
  :root {
11
11
  --gap-m: 16px;
12
12
  }
13
- .pagination__component_10y12 {
13
+ .pagination__component_19quj {
14
14
  display: block;
15
15
  margin: 0 var(--gap-m);
16
16
  }
@@ -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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
6
 
9
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
7
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
8
 
11
- var styles = {"component":"pagination__component_10y12"};
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['default'].createElement("span", { className: styles.component },
14
+ return (React__default.default.createElement("span", { className: styles.component },
17
15
  currentPageIndex + 1,
18
16
  " \u0438\u0437 ",
19
17
  pagesCount,
@@ -1,4 +1,4 @@
1
- /* hash: oclvw */
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s:disabled:not(.pagination__checked_gzn5s) {
32
+ .pagination__tag_uf5ye.pagination__tag_uf5ye:disabled:not(.pagination__checked_uf5ye) {
33
33
  opacity: 0.3;
34
34
  }
35
- .pagination__tag_gzn5s.pagination__tag_gzn5s:hover:not(:disabled) {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s:active:not(:disabled) {
39
+ .pagination__tag_uf5ye.pagination__tag_uf5ye:active:not(:disabled) {
40
40
  background-color: var(--color-light-bg-quaternary);
41
41
  }
42
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s:hover:not(:disabled) {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s:active:not(:disabled) {
50
+ .pagination__tag_uf5ye.pagination__tag_uf5ye.pagination__checked_uf5ye:active:not(:disabled) {
51
51
  color: var(--color-light-text-primary);
52
52
  }
@@ -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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
8
 
11
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
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":"pagination__tag_gzn5s","checked":"pagination__checked_gzn5s"};
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['default'].createElement(coreComponentsTag.Tag, __assign({}, restProps, { checked: checked, size: 'xxs', className: cn__default['default'](className, styles.tag, (_b = {}, _b[styles.checked] = checked, _b)) })));
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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
19
17
 
20
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
22
- var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
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['default'].createElement("div", { className: cn__default['default'](styles__default['default'].component, className, styles__default['default'][viewClassName]), "data-test-id": dataTestId },
39
- 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 }) })),
40
- view === 'default' && (React__default['default'].createElement(components_defaultView_index.DefaultView, { activePadding: activePadding, sidePadding: sidePadding, currentPageIndex: currentPageIndex, pagesCount: pagesCount, onPageChange: handlePageClick })),
41
- view === 'per-page' && (React__default['default'].createElement(components_perPageView_index.PerPageView, { currentPageIndex: currentPageIndex, pagesCount: pagesCount })),
42
- 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 }) }))));
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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
13
11
 
14
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
- var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
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['default'].createElement(React__default['default'].Fragment, null, Array(elementsCount)
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['default'].createElement("div", { key: i.toString(), className: styles__default['default'].dots }, "..."));
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['default'].createElement(components_tag_index.Tag, { key: i.toString(), checked: active, disabled: active, onClick: function () { return onPageChange(pageIndex); } }, pageIndex + 1));
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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
9
7
 
10
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
- var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
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['default'].createElement("span", { className: styles__default['default'].component },
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 _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
9
 
12
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
- var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
14
- var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
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['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)) })));
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
- Object.defineProperty(exports, '__esModule', { value: true });
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":"pagination__component_1qv8m","defaultView":"pagination__defaultView_1qv8m"};
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: 12whr */
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
- .pagination__dots_idvec {
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":"pagination__dots_idvec"};
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: aom28 */
1
+ /* hash: r2v8i */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,7 +10,7 @@
10
10
  :root {
11
11
  --gap-m: 16px;
12
12
  }
13
- .pagination__component_10y12 {
13
+ .pagination__component_19quj {
14
14
  display: block;
15
15
  margin: 0 var(--gap-m);
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- var styles = {"component":"pagination__component_10y12"};
3
+ var styles = {"component":"pagination__component_19quj"};
4
4
  require('./index.css')
5
5
 
6
6
  var PerPageView = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: oclvw */
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s:disabled:not(.pagination__checked_gzn5s) {
32
+ .pagination__tag_uf5ye.pagination__tag_uf5ye:disabled:not(.pagination__checked_uf5ye) {
33
33
  opacity: 0.3;
34
34
  }
35
- .pagination__tag_gzn5s.pagination__tag_gzn5s:hover:not(:disabled) {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s:active:not(:disabled) {
39
+ .pagination__tag_uf5ye.pagination__tag_uf5ye:active:not(:disabled) {
40
40
  background-color: var(--color-light-bg-quaternary);
41
41
  }
42
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s:hover:not(:disabled) {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s:active:not(:disabled) {
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":"pagination__tag_gzn5s","checked":"pagination__checked_gzn5s"};
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: w4h4e */
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
- .pagination__component_1qv8m {
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
- .pagination__defaultView_1qv8m > * {
27
+ .pagination__defaultView_11d1b > * {
28
28
  margin-right: var(--gap-xs)
29
29
  }
30
- .pagination__defaultView_1qv8m > *:last-child {
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: w4h4e */
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
- .pagination__component_1qv8m {
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
- .pagination__defaultView_1qv8m > * {
27
+ .pagination__defaultView_11d1b > * {
28
28
  margin-right: var(--gap-xs)
29
29
  }
30
- .pagination__defaultView_1qv8m > *:last-child {
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
- Object.defineProperty(exports, '__esModule', { value: true });
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
 
@@ -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
- var styles = {"component":"pagination__component_1qv8m","defaultView":"pagination__defaultView_1qv8m"};
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: 12whr */
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
- .pagination__dots_idvec {
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
- var styles = {"dots":"pagination__dots_idvec"};
6
+ const 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: aom28 */
1
+ /* hash: r2v8i */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -10,7 +10,7 @@
10
10
  :root {
11
11
  --gap-m: 16px;
12
12
  }
13
- .pagination__component_10y12 {
13
+ .pagination__component_19quj {
14
14
  display: block;
15
15
  margin: 0 var(--gap-m);
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
- var styles = {"component":"pagination__component_10y12"};
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: oclvw */
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s:disabled:not(.pagination__checked_gzn5s) {
32
+ .pagination__tag_uf5ye.pagination__tag_uf5ye:disabled:not(.pagination__checked_uf5ye) {
33
33
  opacity: 0.3;
34
34
  }
35
- .pagination__tag_gzn5s.pagination__tag_gzn5s:hover:not(:disabled) {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s:active:not(:disabled) {
39
+ .pagination__tag_uf5ye.pagination__tag_uf5ye:active:not(:disabled) {
40
40
  background-color: var(--color-light-bg-quaternary);
41
41
  }
42
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s:hover:not(:disabled) {
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
- .pagination__tag_gzn5s.pagination__tag_gzn5s.pagination__checked_gzn5s:active:not(:disabled) {
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
- var styles = {"tag":"pagination__tag_gzn5s","checked":"pagination__checked_gzn5s"};
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: w4h4e */
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
- .pagination__component_1qv8m {
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
- .pagination__defaultView_1qv8m > * {
27
+ .pagination__defaultView_11d1b > * {
28
28
  margin-right: var(--gap-xs)
29
29
  }
30
- .pagination__defaultView_1qv8m > *:last-child {
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.7",
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.1",
19
- "@alfalab/core-components-tag": "^5.0.2",
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
  }