@atlaskit/pagination 14.7.0 → 14.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/pagination
2
2
 
3
+ ## 14.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#98707](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98707)
8
+ [`7cce9cbf2f08`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7cce9cbf2f08) -
9
+ Internal changes to how text is rendered. There is no expected visual change.
10
+
3
11
  ## 14.7.0
4
12
 
5
13
  ### Minor Changes
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = renderEllipsis;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
10
9
  var _primitives = require("@atlaskit/primitives");
11
10
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
12
11
  var containerStyles = (0, _primitives.xcss)({
@@ -24,8 +23,7 @@ function renderEllipsis(_ref) {
24
23
  key: key,
25
24
  xcss: containerStyles,
26
25
  paddingInline: "space.100"
27
- }, /*#__PURE__*/_react.default.createElement(_text.default, {
28
- testId: "".concat(testId, "-text"),
29
- verticalAlign: "middle"
26
+ }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
27
+ testId: testId && "".concat(testId, "-text")
30
28
  }, /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, null, "Skipped pages from ", from, " to ", to), "\u2026"));
31
29
  }
@@ -34,7 +34,7 @@ var collapseRange = function collapseRange(pages, current, _ref, testId) {
34
34
  var _pageCount = max - 2;
35
35
  return [].concat((0, _toConsumableArray2.default)(getPageComponents(0, 1)), [ellipsis({
36
36
  key: 'ellipsis-1',
37
- testId: "".concat(testId, "-ellipsis"),
37
+ testId: testId && "".concat(testId, "-ellipsis"),
38
38
  from: 2,
39
39
  to: total - _pageCount
40
40
  })], (0, _toConsumableArray2.default)(getPageComponents(total - _pageCount)));
@@ -43,7 +43,7 @@ var collapseRange = function collapseRange(pages, current, _ref, testId) {
43
43
  var _pageCount2 = max - 2;
44
44
  return [].concat((0, _toConsumableArray2.default)(getPageComponents(0, _pageCount2)), [ellipsis({
45
45
  key: 'ellipsis-1',
46
- testId: "".concat(testId, "-ellipsis"),
46
+ testId: testId && "".concat(testId, "-ellipsis"),
47
47
  from: _pageCount2 + 1,
48
48
  to: total - 1
49
49
  })], (0, _toConsumableArray2.default)(getPageComponents(total - 1)));
@@ -52,12 +52,12 @@ var collapseRange = function collapseRange(pages, current, _ref, testId) {
52
52
  var pageCount = max - 4;
53
53
  return [].concat((0, _toConsumableArray2.default)(getPageComponents(0, 1)), [ellipsis({
54
54
  key: 'ellipsis-1',
55
- testId: "".concat(testId, "-ellipsis"),
55
+ testId: testId && "".concat(testId, "-ellipsis"),
56
56
  from: 2,
57
57
  to: current - Math.floor(pageCount / 2)
58
58
  })], (0, _toConsumableArray2.default)(getPageComponents(current - Math.floor(pageCount / 2), current + pageCount - 1)), [ellipsis({
59
59
  key: 'ellipsis-2',
60
- testId: "".concat(testId, "-ellipsis"),
60
+ testId: testId && "".concat(testId, "-ellipsis"),
61
61
  from: current + 3,
62
62
  to: total - 1
63
63
  })], (0, _toConsumableArray2.default)(getPageComponents(total - 1)));
@@ -27,7 +27,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
27
27
  var analyticsAttributes = {
28
28
  componentName: 'pagination',
29
29
  packageName: "@atlaskit/pagination",
30
- packageVersion: "14.7.0"
30
+ packageVersion: "14.7.1"
31
31
  };
32
32
  var paginationMenuStyles = (0, _primitives.xcss)({
33
33
  padding: 'space.0',
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import Text from '@atlaskit/ds-explorations/text';
3
- import { Box, xcss } from '@atlaskit/primitives';
2
+ import { Box, Text, xcss } from '@atlaskit/primitives';
4
3
  import VisuallyHidden from '@atlaskit/visually-hidden';
5
4
  const containerStyles = xcss({
6
5
  display: 'flex',
@@ -19,7 +18,6 @@ export default function renderEllipsis({
19
18
  xcss: containerStyles,
20
19
  paddingInline: "space.100"
21
20
  }, /*#__PURE__*/React.createElement(Text, {
22
- testId: `${testId}-text`,
23
- verticalAlign: "middle"
21
+ testId: testId && `${testId}-text`
24
22
  }, /*#__PURE__*/React.createElement(VisuallyHidden, null, "Skipped pages from ", from, " to ", to), "\u2026"));
25
23
  }
@@ -24,7 +24,7 @@ const collapseRange = (pages, current, {
24
24
  const pageCount = max - 2;
25
25
  return [...getPageComponents(0, 1), ellipsis({
26
26
  key: 'ellipsis-1',
27
- testId: `${testId}-ellipsis`,
27
+ testId: testId && `${testId}-ellipsis`,
28
28
  from: 2,
29
29
  to: total - pageCount
30
30
  }), ...getPageComponents(total - pageCount)];
@@ -33,7 +33,7 @@ const collapseRange = (pages, current, {
33
33
  const pageCount = max - 2;
34
34
  return [...getPageComponents(0, pageCount), ellipsis({
35
35
  key: 'ellipsis-1',
36
- testId: `${testId}-ellipsis`,
36
+ testId: testId && `${testId}-ellipsis`,
37
37
  from: pageCount + 1,
38
38
  to: total - 1
39
39
  }), ...getPageComponents(total - 1)];
@@ -42,12 +42,12 @@ const collapseRange = (pages, current, {
42
42
  const pageCount = max - 4;
43
43
  return [...getPageComponents(0, 1), ellipsis({
44
44
  key: 'ellipsis-1',
45
- testId: `${testId}-ellipsis`,
45
+ testId: testId && `${testId}-ellipsis`,
46
46
  from: 2,
47
47
  to: current - Math.floor(pageCount / 2)
48
48
  }), ...getPageComponents(current - Math.floor(pageCount / 2), current + pageCount - 1), ellipsis({
49
49
  key: 'ellipsis-2',
50
- testId: `${testId}-ellipsis`,
50
+ testId: testId && `${testId}-ellipsis`,
51
51
  from: current + 3,
52
52
  to: total - 1
53
53
  }), ...getPageComponents(total - 1)];
@@ -13,7 +13,7 @@ import collapseRange from './internal/utils/collapse-range';
13
13
  const analyticsAttributes = {
14
14
  componentName: 'pagination',
15
15
  packageName: "@atlaskit/pagination",
16
- packageVersion: "14.7.0"
16
+ packageVersion: "14.7.1"
17
17
  };
18
18
  const paginationMenuStyles = xcss({
19
19
  padding: 'space.0',
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import Text from '@atlaskit/ds-explorations/text';
3
- import { Box, xcss } from '@atlaskit/primitives';
2
+ import { Box, Text, xcss } from '@atlaskit/primitives';
4
3
  import VisuallyHidden from '@atlaskit/visually-hidden';
5
4
  var containerStyles = xcss({
6
5
  display: 'flex',
@@ -18,7 +17,6 @@ export default function renderEllipsis(_ref) {
18
17
  xcss: containerStyles,
19
18
  paddingInline: "space.100"
20
19
  }, /*#__PURE__*/React.createElement(Text, {
21
- testId: "".concat(testId, "-text"),
22
- verticalAlign: "middle"
20
+ testId: testId && "".concat(testId, "-text")
23
21
  }, /*#__PURE__*/React.createElement(VisuallyHidden, null, "Skipped pages from ", from, " to ", to), "\u2026"));
24
22
  }
@@ -28,7 +28,7 @@ var collapseRange = function collapseRange(pages, current, _ref, testId) {
28
28
  var _pageCount = max - 2;
29
29
  return [].concat(_toConsumableArray(getPageComponents(0, 1)), [ellipsis({
30
30
  key: 'ellipsis-1',
31
- testId: "".concat(testId, "-ellipsis"),
31
+ testId: testId && "".concat(testId, "-ellipsis"),
32
32
  from: 2,
33
33
  to: total - _pageCount
34
34
  })], _toConsumableArray(getPageComponents(total - _pageCount)));
@@ -37,7 +37,7 @@ var collapseRange = function collapseRange(pages, current, _ref, testId) {
37
37
  var _pageCount2 = max - 2;
38
38
  return [].concat(_toConsumableArray(getPageComponents(0, _pageCount2)), [ellipsis({
39
39
  key: 'ellipsis-1',
40
- testId: "".concat(testId, "-ellipsis"),
40
+ testId: testId && "".concat(testId, "-ellipsis"),
41
41
  from: _pageCount2 + 1,
42
42
  to: total - 1
43
43
  })], _toConsumableArray(getPageComponents(total - 1)));
@@ -46,12 +46,12 @@ var collapseRange = function collapseRange(pages, current, _ref, testId) {
46
46
  var pageCount = max - 4;
47
47
  return [].concat(_toConsumableArray(getPageComponents(0, 1)), [ellipsis({
48
48
  key: 'ellipsis-1',
49
- testId: "".concat(testId, "-ellipsis"),
49
+ testId: testId && "".concat(testId, "-ellipsis"),
50
50
  from: 2,
51
51
  to: current - Math.floor(pageCount / 2)
52
52
  })], _toConsumableArray(getPageComponents(current - Math.floor(pageCount / 2), current + pageCount - 1)), [ellipsis({
53
53
  key: 'ellipsis-2',
54
- testId: "".concat(testId, "-ellipsis"),
54
+ testId: testId && "".concat(testId, "-ellipsis"),
55
55
  from: current + 3,
56
56
  to: total - 1
57
57
  })], _toConsumableArray(getPageComponents(total - 1)));
@@ -17,7 +17,7 @@ import collapseRange from './internal/utils/collapse-range';
17
17
  var analyticsAttributes = {
18
18
  componentName: 'pagination',
19
19
  packageName: "@atlaskit/pagination",
20
- packageVersion: "14.7.0"
20
+ packageVersion: "14.7.1"
21
21
  };
22
22
  var paginationMenuStyles = xcss({
23
23
  padding: 'space.0',
@@ -3,7 +3,7 @@ declare const collapseRange: <T>(pages: Array<T>, current: number, { max, ellips
3
3
  max: number;
4
4
  ellipsis: (arg: {
5
5
  key: string;
6
- testId: string;
6
+ testId?: string | undefined;
7
7
  from: number;
8
8
  to: number;
9
9
  }) => ReactElement;
@@ -3,7 +3,7 @@ declare const collapseRange: <T>(pages: Array<T>, current: number, { max, ellips
3
3
  max: number;
4
4
  ellipsis: (arg: {
5
5
  key: string;
6
- testId: string;
6
+ testId?: string | undefined;
7
7
  from: number;
8
8
  to: number;
9
9
  }) => ReactElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/pagination",
3
- "version": "14.7.0",
3
+ "version": "14.7.1",
4
4
  "description": "Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,10 +43,9 @@
43
43
  "@atlaskit/analytics-next": "^9.3.0",
44
44
  "@atlaskit/button": "^17.14.0",
45
45
  "@atlaskit/codemod-utils": "^4.2.0",
46
- "@atlaskit/ds-explorations": "^3.5.0",
47
46
  "@atlaskit/ds-lib": "^2.3.0",
48
- "@atlaskit/icon": "^22.1.0",
49
- "@atlaskit/primitives": "^6.1.0",
47
+ "@atlaskit/icon": "^22.2.0",
48
+ "@atlaskit/primitives": "^6.2.0",
50
49
  "@atlaskit/visually-hidden": "^1.3.0",
51
50
  "@babel/runtime": "^7.0.0",
52
51
  "memoize-one": "^6.0.0"