@atlaskit/pagination 15.0.2 → 15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/pagination
2
2
 
3
+ ## 15.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
8
+ [`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
9
+ Update `React` from v16 to v18
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 15.0.2
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- /* render-ellipsis.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* render-ellipsis.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,10 @@
1
- ._18s8ze3t{margin:var(--ds-space-0,0)}
2
- ._1yt4ze3t{padding:var(--ds-space-0,0)}
3
- ._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
- ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
1
+
2
+ ._18zr12x7{padding-inline:var(--ds-space-075,6px)}._18u0ze3t{margin-left:var(--ds-space-0,0)}
3
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
4
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
5
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
6
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
7
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
8
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
9
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
10
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -1,4 +1,4 @@
1
- /* pagination.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* pagination.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -28,14 +28,14 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
28
28
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
29
29
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
30
30
  var styles = {
31
- paginationMenu: "_1yt4ze3t _18s8ze3t",
31
+ paginationMenu: "_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t",
32
32
  paginationMenuItem: "_1pfhze3t",
33
33
  navigatorIconWrapper: "_18zr12x7"
34
34
  };
35
35
  var analyticsAttributes = {
36
36
  componentName: 'pagination',
37
37
  packageName: "@atlaskit/pagination",
38
- packageVersion: "15.0.2"
38
+ packageVersion: "15.1.0"
39
39
  };
40
40
  function NavigatorIcon(_ref) {
41
41
  var chevronDirection = _ref.chevronDirection;
@@ -1,4 +1,4 @@
1
- /* render-ellipsis.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* render-ellipsis.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./render-ellipsis.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,10 @@
1
- ._18s8ze3t{margin:var(--ds-space-0,0)}
2
- ._1yt4ze3t{padding:var(--ds-space-0,0)}
3
- ._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
- ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
1
+
2
+ ._18zr12x7{padding-inline:var(--ds-space-075,6px)}._18u0ze3t{margin-left:var(--ds-space-0,0)}
3
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
4
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
5
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
6
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
7
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
8
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
9
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
10
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -1,4 +1,4 @@
1
- /* pagination.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* pagination.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./pagination.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, memo } from 'react';
@@ -14,14 +14,14 @@ import renderDefaultEllipsis from './internal/components/render-ellipsis';
14
14
  import { emptyObject } from './internal/constants';
15
15
  import collapseRange from './internal/utils/collapse-range';
16
16
  const styles = {
17
- paginationMenu: "_1yt4ze3t _18s8ze3t",
17
+ paginationMenu: "_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t",
18
18
  paginationMenuItem: "_1pfhze3t",
19
19
  navigatorIconWrapper: "_18zr12x7"
20
20
  };
21
21
  const analyticsAttributes = {
22
22
  componentName: 'pagination',
23
23
  packageName: "@atlaskit/pagination",
24
- packageVersion: "15.0.2"
24
+ packageVersion: "15.1.0"
25
25
  };
26
26
  function NavigatorIcon({
27
27
  chevronDirection
@@ -1,4 +1,4 @@
1
- /* render-ellipsis.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* render-ellipsis.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import "./render-ellipsis.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,10 @@
1
- ._18s8ze3t{margin:var(--ds-space-0,0)}
2
- ._1yt4ze3t{padding:var(--ds-space-0,0)}
3
- ._18zr12x7{padding-inline:var(--ds-space-075,6px)}
4
- ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
1
+
2
+ ._18zr12x7{padding-inline:var(--ds-space-075,6px)}._18u0ze3t{margin-left:var(--ds-space-0,0)}
3
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
4
+ ._19pkze3t{margin-top:var(--ds-space-0,0)}
5
+ ._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
6
+ ._2hwxze3t{margin-right:var(--ds-space-0,0)}
7
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
8
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
9
+ ._otyrze3t{margin-bottom:var(--ds-space-0,0)}
10
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
@@ -1,4 +1,4 @@
1
- /* pagination.tsx generated by @compiled/babel-plugin v0.35.0 */
1
+ /* pagination.tsx generated by @compiled/babel-plugin v0.36.0 */
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import "./pagination.compiled.css";
@@ -18,14 +18,14 @@ import renderDefaultEllipsis from './internal/components/render-ellipsis';
18
18
  import { emptyObject } from './internal/constants';
19
19
  import collapseRange from './internal/utils/collapse-range';
20
20
  var styles = {
21
- paginationMenu: "_1yt4ze3t _18s8ze3t",
21
+ paginationMenu: "_ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _19pkze3t _2hwxze3t _otyrze3t _18u0ze3t",
22
22
  paginationMenuItem: "_1pfhze3t",
23
23
  navigatorIconWrapper: "_18zr12x7"
24
24
  };
25
25
  var analyticsAttributes = {
26
26
  componentName: 'pagination',
27
27
  packageName: "@atlaskit/pagination",
28
- packageVersion: "15.0.2"
28
+ packageVersion: "15.1.0"
29
29
  };
30
30
  function NavigatorIcon(_ref) {
31
31
  var chevronDirection = _ref.chevronDirection;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/pagination",
3
- "version": "15.0.2",
3
+ "version": "15.1.0",
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/"
@@ -38,15 +38,15 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@atlaskit/analytics-next": "^10.2.0",
42
- "@atlaskit/button": "^20.3.0",
41
+ "@atlaskit/analytics-next": "^10.3.0",
42
+ "@atlaskit/button": "^20.4.0",
43
43
  "@atlaskit/codemod-utils": "^4.2.0",
44
- "@atlaskit/css": "^0.7.0",
45
- "@atlaskit/ds-lib": "^3.3.0",
46
- "@atlaskit/icon": "^23.4.0",
47
- "@atlaskit/primitives": "^13.3.0",
48
- "@atlaskit/tokens": "^3.1.0",
49
- "@atlaskit/visually-hidden": "^1.5.0",
44
+ "@atlaskit/css": "^0.8.0",
45
+ "@atlaskit/ds-lib": "^3.5.0",
46
+ "@atlaskit/icon": "^23.5.0",
47
+ "@atlaskit/primitives": "^13.4.0",
48
+ "@atlaskit/tokens": "^3.3.0",
49
+ "@atlaskit/visually-hidden": "^1.6.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "memoize-one": "^6.0.0"
52
52
  },
@@ -60,10 +60,10 @@
60
60
  "@atlaskit/ssr": "*",
61
61
  "@atlaskit/visual-regression": "*",
62
62
  "@testing-library/dom": "^10.1.0",
63
- "@testing-library/react": "^12.1.5",
63
+ "@testing-library/react": "^13.4.0",
64
64
  "exenv": "^1.2.2",
65
65
  "jscodeshift": "^0.13.0",
66
- "react-dom": "^16.8.0",
66
+ "react-dom": "^18.2.0",
67
67
  "storybook-addon-performance": "^0.17.3",
68
68
  "tiny-invariant": "^1.2.0",
69
69
  "typescript": "~5.4.2"
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
-
3
- import Pagination from '../src';
4
-
5
- export default () => <Pagination pages={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]} />;
@@ -1,61 +0,0 @@
1
- import React from 'react';
2
-
3
- import { findByText, fireEvent } from '@testing-library/dom';
4
- import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance';
5
- import invariant from 'tiny-invariant';
6
-
7
- import Pagination from '../src';
8
-
9
- const getPageElement = (
10
- container: HTMLElement,
11
- textContent: string,
12
- ): HTMLButtonElement | undefined =>
13
- Array.from(container.querySelectorAll('button')).find(
14
- (buttonElement: HTMLButtonElement) => buttonElement.textContent?.trim() === textContent,
15
- );
16
-
17
- const PaginationPerformance = () => {
18
- return <Pagination pages={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]} />;
19
- };
20
-
21
- const interactionTasks: PublicInteractionTask[] = [
22
- {
23
- name: 'onChange (when ellipsis changes)',
24
- description: 'Render pagination and change page along with ellipsis',
25
- run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
26
- const lastPageElement = getPageElement(container, '10');
27
-
28
- invariant(lastPageElement);
29
-
30
- await controls.time(async () => {
31
- fireEvent.click(lastPageElement!);
32
-
33
- await findByText(container, '9', undefined, { timeout: 20000 });
34
- });
35
- },
36
- },
37
- {
38
- name: `onChange (when ellipsis don't change)`,
39
- description: 'Render pagination and change page',
40
- run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
41
- const secondPageElement = getPageElement(container, '2');
42
-
43
- invariant(secondPageElement);
44
-
45
- await controls.time(async () => {
46
- fireEvent.click(secondPageElement!);
47
- });
48
- },
49
- },
50
- ];
51
-
52
- PaginationPerformance.story = {
53
- name: 'pagination',
54
- parameters: {
55
- performance: {
56
- interactions: interactionTasks,
57
- },
58
- },
59
- };
60
-
61
- export default PaginationPerformance;
@@ -1,61 +0,0 @@
1
- import React from 'react';
2
-
3
- import { findByText, fireEvent } from '@testing-library/dom';
4
- import { type InteractionTaskArgs, type PublicInteractionTask } from 'storybook-addon-performance';
5
- import invariant from 'tiny-invariant';
6
-
7
- import Pagination from '../src';
8
-
9
- const getPageElement = (
10
- container: HTMLElement,
11
- textContent: string,
12
- ): HTMLButtonElement | undefined =>
13
- Array.from(container.querySelectorAll('button')).find(
14
- (buttonElement: HTMLButtonElement) => buttonElement.textContent?.trim() === textContent,
15
- );
16
- const pages1000 = new Array(1000).fill(0).map((p, index) => index + 1 + p);
17
- const PaginationPerformanceWith1000Pages = () => {
18
- return <Pagination pages={pages1000} />;
19
- };
20
-
21
- const interactionTasks: PublicInteractionTask[] = [
22
- {
23
- name: 'onChange (when ellipsis changes)',
24
- description: 'Render pagination and change page along with ellipsis',
25
- run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
26
- const lastPageElement = getPageElement(container, '1000');
27
-
28
- invariant(lastPageElement);
29
-
30
- await controls.time(async () => {
31
- fireEvent.click(lastPageElement!);
32
-
33
- await findByText(container, '999', undefined, { timeout: 20000 });
34
- });
35
- },
36
- },
37
- {
38
- name: `onChange (when ellipsis don't change)`,
39
- description: 'Render pagination and change page',
40
- run: async ({ container, controls }: InteractionTaskArgs): Promise<void> => {
41
- const secondPageElement = getPageElement(container, '2');
42
-
43
- invariant(secondPageElement);
44
-
45
- await controls.time(async () => {
46
- fireEvent.click(secondPageElement!);
47
- });
48
- },
49
- },
50
- ];
51
-
52
- PaginationPerformanceWith1000Pages.story = {
53
- name: 'paginationWithLargeNumberOfPages',
54
- parameters: {
55
- performance: {
56
- interactions: interactionTasks,
57
- },
58
- },
59
- };
60
-
61
- export default PaginationPerformanceWith1000Pages;