@atlaskit/pagination 14.2.1 → 14.2.2

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,11 @@
1
1
  # @atlaskit/pagination
2
2
 
3
+ ## 14.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9827dcb82b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9827dcb82b8) - No-op change to introduce spacing tokens to design system components.
8
+
3
9
  ## 14.2.1
4
10
 
5
11
  ### Patch Changes
@@ -15,13 +15,12 @@ var _react2 = require("@emotion/react");
15
15
 
16
16
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
17
17
 
18
- var _constants = require("@atlaskit/theme/constants");
19
-
20
18
  /** @jsx jsx */
21
- var gridSize = (0, _constants.gridSize)();
22
19
  var navigatorStyles = (0, _react2.css)({
23
- paddingRight: gridSize / 2,
24
- paddingLeft: gridSize / 2
20
+ // TODO Delete this comment after verifying spacing token -> previous value `gridSize / 2`
21
+ paddingRight: "var(--ds-scale-050, 4px)",
22
+ // TODO Delete this comment after verifying spacing token -> previous value `gridSize / 2`
23
+ paddingLeft: "var(--ds-scale-050, 4px)"
25
24
  });
26
25
 
27
26
  function Navigator(props) {
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
10
10
  /** @jsx jsx */
11
11
  var ellipsisStyles = (0, _react.css)({
12
12
  display: 'inline-flex',
13
- padding: '0 8px',
13
+ padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-100, 8px)"),
14
14
  alignItems: 'center',
15
15
  textAlign: 'center'
16
16
  });
@@ -42,7 +42,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
42
42
  var analyticsAttributes = {
43
43
  componentName: 'pagination',
44
44
  packageName: "@atlaskit/pagination",
45
- packageVersion: "14.2.1"
45
+ packageVersion: "14.2.2"
46
46
  };
47
47
  var navStyles = (0, _react2.css)({
48
48
  display: 'flex'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/pagination",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -4,11 +4,11 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import React from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import Button from '@atlaskit/button/standard-button';
7
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
8
- const gridSize = getGridSize();
9
7
  const navigatorStyles = css({
10
- paddingRight: gridSize / 2,
11
- paddingLeft: gridSize / 2
8
+ // TODO Delete this comment after verifying spacing token -> previous value `gridSize / 2`
9
+ paddingRight: "var(--ds-scale-050, 4px)",
10
+ // TODO Delete this comment after verifying spacing token -> previous value `gridSize / 2`
11
+ paddingLeft: "var(--ds-scale-050, 4px)"
12
12
  });
13
13
  export default function Navigator(props) {
14
14
  return jsx(Button // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -2,7 +2,7 @@
2
2
  import { css, jsx } from '@emotion/react';
3
3
  const ellipsisStyles = css({
4
4
  display: 'inline-flex',
5
- padding: '0 8px',
5
+ padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-100, 8px)"}`,
6
6
  alignItems: 'center',
7
7
  textAlign: 'center'
8
8
  });
@@ -14,7 +14,7 @@ import collapseRange from './internal/utils/collapse-range';
14
14
  const analyticsAttributes = {
15
15
  componentName: 'pagination',
16
16
  packageName: "@atlaskit/pagination",
17
- packageVersion: "14.2.1"
17
+ packageVersion: "14.2.2"
18
18
  };
19
19
  const navStyles = css({
20
20
  display: 'flex'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/pagination",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
4
4
  "sideEffects": false
5
5
  }
@@ -4,11 +4,11 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  import React from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import Button from '@atlaskit/button/standard-button';
7
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
8
- var gridSize = getGridSize();
9
7
  var navigatorStyles = css({
10
- paddingRight: gridSize / 2,
11
- paddingLeft: gridSize / 2
8
+ // TODO Delete this comment after verifying spacing token -> previous value `gridSize / 2`
9
+ paddingRight: "var(--ds-scale-050, 4px)",
10
+ // TODO Delete this comment after verifying spacing token -> previous value `gridSize / 2`
11
+ paddingLeft: "var(--ds-scale-050, 4px)"
12
12
  });
13
13
  export default function Navigator(props) {
14
14
  return jsx(Button // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -2,7 +2,7 @@
2
2
  import { css, jsx } from '@emotion/react';
3
3
  var ellipsisStyles = css({
4
4
  display: 'inline-flex',
5
- padding: '0 8px',
5
+ padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-100, 8px)"),
6
6
  alignItems: 'center',
7
7
  textAlign: 'center'
8
8
  });
@@ -21,7 +21,7 @@ import collapseRange from './internal/utils/collapse-range';
21
21
  var analyticsAttributes = {
22
22
  componentName: 'pagination',
23
23
  packageName: "@atlaskit/pagination",
24
- packageVersion: "14.2.1"
24
+ packageVersion: "14.2.2"
25
25
  };
26
26
  var navStyles = css({
27
27
  display: 'flex'
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/pagination",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/pagination",
3
- "version": "14.2.1",
3
+ "version": "14.2.2",
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/"
@@ -16,7 +16,8 @@
16
16
  "typesVersions": {
17
17
  ">=4.0 <4.5": {
18
18
  "*": [
19
- "dist/types-ts4.0/*"
19
+ "dist/types-ts4.0/*",
20
+ "dist/types-ts4.0/index.d.ts"
20
21
  ]
21
22
  }
22
23
  },
@@ -27,6 +28,7 @@
27
28
  ".": "./src/index.tsx"
28
29
  },
29
30
  "atlassian": {
31
+ "disableProductCI": true,
30
32
  "team": "Design System Team",
31
33
  "releaseModel": "scheduled",
32
34
  "website": {
@@ -39,8 +41,8 @@
39
41
  "@atlaskit/button": "^16.3.0",
40
42
  "@atlaskit/codemod-utils": "^4.1.0",
41
43
  "@atlaskit/ds-lib": "^2.1.0",
42
- "@atlaskit/icon": "^21.10.0",
43
- "@atlaskit/theme": "^12.2.0",
44
+ "@atlaskit/icon": "^21.11.0",
45
+ "@atlaskit/tokens": "^0.10.27",
44
46
  "@babel/runtime": "^7.0.0",
45
47
  "@emotion/react": "^11.7.1",
46
48
  "memoize-one": "^6.0.0"
@@ -52,7 +54,7 @@
52
54
  "@atlaskit/docs": "*",
53
55
  "@atlaskit/ds-lib": "^2.1.0",
54
56
  "@atlaskit/dynamic-table": "^14.8.0",
55
- "@atlaskit/section-message": "^6.2.0",
57
+ "@atlaskit/section-message": "^6.3.0",
56
58
  "@atlaskit/ssr": "*",
57
59
  "@atlaskit/visual-regression": "*",
58
60
  "@atlaskit/webdriver-runner": "*",
@@ -77,6 +79,7 @@
77
79
  "dom-events": "use-bind-event-listener",
78
80
  "ui-components": "lite-mode",
79
81
  "analytics": "analytics-next",
82
+ "design-tokens": "spacing",
80
83
  "theming": "tokens",
81
84
  "deprecation": "no-deprecated-imports",
82
85
  "styling": [
package/report.api.md CHANGED
@@ -1,11 +1,14 @@
1
- ## API Report File for "@atlaskit/pagination"
1
+ ## API Report File for "@atlaskit/pagination".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  /// <reference types="react" />
7
9
 
8
10
  import type { CSSProperties } from 'react';
11
+ import { jsx } from '@emotion/react';
9
12
  import type { ReactElement } from 'react';
10
13
  import type { SyntheticEvent } from 'react';
11
14
  import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
@@ -31,55 +34,81 @@ declare function InnerPagination<T>(
31
34
  testId,
32
35
  }: PaginationPropTypes<T>,
33
36
  ref: React.Ref<HTMLDivElement>,
34
- ): JSX.Element;
37
+ ): jsx.JSX.Element;
35
38
 
36
39
  export declare interface PaginationPropTypes<T = unknown> {
37
- /** Replace the built-in Page, Previous, Next and/ or Ellipsis component */
40
+ /**
41
+ * Replace the built-in Page, Previous, Next and/ or Ellipsis component
42
+ */
38
43
  components?: {
39
44
  Page?: React.ElementType;
40
45
  Previous?: React.ElementType;
41
46
  Next?: React.ElementType;
42
47
  };
43
- /** Index of the page to be selected by default */
48
+ /**
49
+ * Index of the page to be selected by default
50
+ */
44
51
  defaultSelectedIndex?: number;
45
- /** Helper function to get text displayed on the page button. It is helpful in scenarios when page the page passed in is an object */
52
+ /**
53
+ * Helper function to get text displayed on the page button. It is helpful in scenarios when page the page passed in is an object
54
+ */
46
55
  getPageLabel?: (page: T, pageIndex: number) => number | string;
47
- /** The aria-label for the pagination wrapper */
56
+ /**
57
+ * The aria-label for the pagination wrapper
58
+ */
48
59
  label?: string;
49
- /** The aria-label for the next button */
60
+ /**
61
+ * The aria-label for the next button
62
+ */
50
63
  nextLabel?: string;
51
- /** The aria-label for the previous button */
64
+ /**
65
+ * The aria-label for the previous button
66
+ */
52
67
  previousLabel?: string;
53
- /** Style to spread on the container element */
68
+ /**
69
+ * Style to spread on the container element
70
+ */
54
71
  style?: CSSProperties;
55
- /** Maximum number of pages to be displayed in the pagination */
72
+ /**
73
+ * Maximum number of pages to be displayed in the pagination
74
+ */
56
75
  max?: number;
57
- /** The onChange handler which is called when the page is changed */
76
+ /**
77
+ * The onChange handler which is called when the page is changed
78
+ */
58
79
  onChange?: (
59
80
  event: SyntheticEvent,
60
81
  page: T,
61
82
  analyticsEvent?: UIAnalyticsEvent,
62
83
  ) => void;
63
- /** Array of the pages to display */
84
+ /**
85
+ * Array of the pages to display
86
+ */
64
87
  pages: T[];
65
- /** Index of the selected page. This will make this pagination controlled */
88
+ /**
89
+ * Index of the selected page. This will make this pagination controlled
90
+ */
66
91
  selectedIndex?: number;
67
- /** The react Node returned from the function is rendered instead of the default ellipsis node */
92
+ /**
93
+ * The react Node returned from the function is rendered instead of the default ellipsis node
94
+ */
68
95
  renderEllipsis?: (arg: { key: string }) => ReactElement;
69
- /** Additional information to be included in the `context` of analytics events */
96
+ /**
97
+ * Additional information to be included in the `context` of analytics events
98
+ */
70
99
  analyticsContext?: Record<string, any>;
71
100
  /**
72
- A `testId` prop is provided for specified elements,
73
- which is a unique string that appears as a data attribute `data-testid`
74
- in the rendered code, serving as a hook for automated tests.
75
-
76
- Will set data-testid on these elements when defined:
77
- - Pagination nav wrapper - {testId}
78
- - Page - {testId}--page-{page index}
79
- - Current page - {testId}--current-page-{page index}
80
- - Left navigator - {testId}--left-navigator
81
- - Right navigator - {testId}--right-navigator
82
- */
101
+ * A `testId` prop is provided for specified elements,
102
+ * which is a unique string that appears as a data attribute `data-testid`
103
+ * in the rendered code, serving as a hook for automated tests.
104
+ *
105
+ * Will set data-testid on these elements when defined:
106
+ * - Pagination nav wrapper - {testId}
107
+ * - Page - {testId}--page-{page index}
108
+ * - Current page - {testId}--current-page-{page index}
109
+ * - Left navigator - {testId}--left-navigator
110
+ * - Right navigator - {testId}--right-navigator
111
+ */
83
112
  testId?: string;
84
113
  }
85
114