@zendeskgarden/react-pagination 8.49.2 → 8.50.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/dist/index.cjs.js CHANGED
@@ -235,7 +235,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
235
235
  var COMPONENT_ID$6 = 'pagination.pagination_view';
236
236
  var StyledPagination = styled__default["default"].ul.attrs({
237
237
  'data-garden-id': COMPONENT_ID$6,
238
- 'data-garden-version': '8.49.2'
238
+ 'data-garden-version': '8.50.0'
239
239
  }).withConfig({
240
240
  displayName: "StyledPagination",
241
241
  componentId: "sc-1b7nye9-0"
@@ -273,7 +273,7 @@ var sizeStyles$2 = function sizeStyles(props) {
273
273
  };
274
274
  var StyledPageBase = styled__default["default"].li.attrs({
275
275
  'data-garden-id': COMPONENT_ID$5,
276
- 'data-garden-version': '8.49.2'
276
+ 'data-garden-version': '8.50.0'
277
277
  }).withConfig({
278
278
  displayName: "StyledPageBase",
279
279
  componentId: "sc-lw1w9j-0"
@@ -301,7 +301,7 @@ var sizeStyles$1 = function sizeStyles(props) {
301
301
  };
302
302
  var StyledPage = styled__default["default"](StyledPageBase).attrs({
303
303
  'data-garden-id': COMPONENT_ID$4,
304
- 'data-garden-version': '8.49.2'
304
+ 'data-garden-version': '8.50.0'
305
305
  }).withConfig({
306
306
  displayName: "StyledPage",
307
307
  componentId: "sc-1k0een3-0"
@@ -323,7 +323,7 @@ StyledPage.defaultProps = {
323
323
  var COMPONENT_ID$3 = 'cursor_pagination';
324
324
  var StyledCursorPagination = styled__default["default"].nav.attrs({
325
325
  'data-garden-id': COMPONENT_ID$3,
326
- 'data-garden-version': '8.49.2'
326
+ 'data-garden-version': '8.50.0'
327
327
  }).withConfig({
328
328
  displayName: "StyledCursorPagination",
329
329
  componentId: "sc-qmfecg-0"
@@ -337,7 +337,7 @@ StyledCursorPagination.defaultProps = {
337
337
  var COMPONENT_ID$2 = 'cursor_pagination.cursor';
338
338
  var StyledCursor = styled__default["default"](StyledPageBase).attrs({
339
339
  'data-garden-id': COMPONENT_ID$2,
340
- 'data-garden-version': '8.49.2',
340
+ 'data-garden-version': '8.50.0',
341
341
  as: 'button'
342
342
  }).withConfig({
343
343
  displayName: "StyledCursor",
@@ -388,7 +388,7 @@ var sizeStyles = function sizeStyles(props) {
388
388
  };
389
389
  var StyledGap = styled__default["default"](StyledPage).attrs({
390
390
  'data-garden-id': COMPONENT_ID$1,
391
- 'data-garden-version': '8.49.2'
391
+ 'data-garden-version': '8.50.0'
392
392
  }).withConfig({
393
393
  displayName: "StyledGap",
394
394
  componentId: "sc-1hqjltf-0"
@@ -404,7 +404,7 @@ StyledGap.defaultProps = {
404
404
  var COMPONENT_ID = 'pagination.navigation';
405
405
  var StyledNavigation = styled__default["default"](StyledPage).attrs({
406
406
  'data-garden-id': COMPONENT_ID,
407
- 'data-garden-version': '8.49.2'
407
+ 'data-garden-version': '8.50.0'
408
408
  }).withConfig({
409
409
  displayName: "StyledNavigation",
410
410
  componentId: "sc-184uuwe-0"
package/dist/index.esm.js CHANGED
@@ -207,7 +207,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
207
207
  var COMPONENT_ID$6 = 'pagination.pagination_view';
208
208
  var StyledPagination = styled.ul.attrs({
209
209
  'data-garden-id': COMPONENT_ID$6,
210
- 'data-garden-version': '8.49.2'
210
+ 'data-garden-version': '8.50.0'
211
211
  }).withConfig({
212
212
  displayName: "StyledPagination",
213
213
  componentId: "sc-1b7nye9-0"
@@ -245,7 +245,7 @@ var sizeStyles$2 = function sizeStyles(props) {
245
245
  };
246
246
  var StyledPageBase = styled.li.attrs({
247
247
  'data-garden-id': COMPONENT_ID$5,
248
- 'data-garden-version': '8.49.2'
248
+ 'data-garden-version': '8.50.0'
249
249
  }).withConfig({
250
250
  displayName: "StyledPageBase",
251
251
  componentId: "sc-lw1w9j-0"
@@ -273,7 +273,7 @@ var sizeStyles$1 = function sizeStyles(props) {
273
273
  };
274
274
  var StyledPage = styled(StyledPageBase).attrs({
275
275
  'data-garden-id': COMPONENT_ID$4,
276
- 'data-garden-version': '8.49.2'
276
+ 'data-garden-version': '8.50.0'
277
277
  }).withConfig({
278
278
  displayName: "StyledPage",
279
279
  componentId: "sc-1k0een3-0"
@@ -295,7 +295,7 @@ StyledPage.defaultProps = {
295
295
  var COMPONENT_ID$3 = 'cursor_pagination';
296
296
  var StyledCursorPagination = styled.nav.attrs({
297
297
  'data-garden-id': COMPONENT_ID$3,
298
- 'data-garden-version': '8.49.2'
298
+ 'data-garden-version': '8.50.0'
299
299
  }).withConfig({
300
300
  displayName: "StyledCursorPagination",
301
301
  componentId: "sc-qmfecg-0"
@@ -309,7 +309,7 @@ StyledCursorPagination.defaultProps = {
309
309
  var COMPONENT_ID$2 = 'cursor_pagination.cursor';
310
310
  var StyledCursor = styled(StyledPageBase).attrs({
311
311
  'data-garden-id': COMPONENT_ID$2,
312
- 'data-garden-version': '8.49.2',
312
+ 'data-garden-version': '8.50.0',
313
313
  as: 'button'
314
314
  }).withConfig({
315
315
  displayName: "StyledCursor",
@@ -360,7 +360,7 @@ var sizeStyles = function sizeStyles(props) {
360
360
  };
361
361
  var StyledGap = styled(StyledPage).attrs({
362
362
  'data-garden-id': COMPONENT_ID$1,
363
- 'data-garden-version': '8.49.2'
363
+ 'data-garden-version': '8.50.0'
364
364
  }).withConfig({
365
365
  displayName: "StyledGap",
366
366
  componentId: "sc-1hqjltf-0"
@@ -376,7 +376,7 @@ StyledGap.defaultProps = {
376
376
  var COMPONENT_ID = 'pagination.navigation';
377
377
  var StyledNavigation = styled(StyledPage).attrs({
378
378
  'data-garden-id': COMPONENT_ID,
379
- 'data-garden-version': '8.49.2'
379
+ 'data-garden-version': '8.50.0'
380
380
  }).withConfig({
381
381
  displayName: "StyledNavigation",
382
382
  componentId: "sc-184uuwe-0"
@@ -4,41 +4,8 @@
4
4
  * Use of this source code is governed under the Apache License, Version 2.0
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
- import React, { HTMLAttributes } from 'react';
8
- export declare type PAGE_TYPE = 'next' | 'page' | 'gap' | 'previous';
9
- export interface IPaginationProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onChange'> {
10
- /**
11
- * Sets the current page. Pages start at 1.
12
- */
13
- currentPage: number;
14
- /**
15
- * Defines the total number of pages
16
- */
17
- totalPages: number;
18
- /**
19
- * Sets the number of pages that appear between the current page and a gap indicator
20
- */
21
- pagePadding?: number;
22
- /**
23
- * Positions the leading and trailing gap indicator, based on
24
- * the current and total pages
25
- */
26
- pageGap?: number;
27
- /**
28
- * Handles page change events
29
- *
30
- * @param {any} currentPage The current page
31
- */
32
- onChange?: (currentPage: number) => void;
33
- /**
34
- * Applies localized labels, test attributes, etc. to individual pages
35
- *
36
- * @param {string} pageType The type of the page accepting the props; one of:
37
- * "previous", "gap", "page", "next"
38
- * @param {any} props Default page props to transform
39
- */
40
- transformPageProps?: (pageType: PAGE_TYPE, props: any) => any;
41
- }
7
+ import React from 'react';
8
+ import { IPaginationProps } from '../../types';
42
9
  /**
43
10
  * @extends HTMLAttributes<HTMLUListElement>
44
11
  */
@@ -5,5 +5,5 @@
5
5
  * found at http://www.apache.org/licenses/LICENSE-2.0.
6
6
  */
7
7
  export { Pagination } from './elements/Pagination/Pagination';
8
- export type { IPaginationProps, PAGE_TYPE } from './elements/Pagination/Pagination';
9
8
  export { CursorPagination } from './elements/CursorPagination/CursorPagination';
9
+ export type { IPaginationProps, PageType as PAGE_TYPE } from './types';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import { HTMLAttributes } from 'react';
8
+ export declare const PAGE_TYPE: readonly ["next", "page", "gap", "previous"];
9
+ export declare type PageType = typeof PAGE_TYPE[number];
10
+ export interface IPaginationProps extends Omit<HTMLAttributes<HTMLUListElement>, 'onChange'> {
11
+ /**
12
+ * Sets the current page. Pages start at 1.
13
+ */
14
+ currentPage: number;
15
+ /**
16
+ * Defines the total number of pages
17
+ */
18
+ totalPages: number;
19
+ /**
20
+ * Sets the number of pages that appear between the current page and a gap indicator
21
+ */
22
+ pagePadding?: number;
23
+ /**
24
+ * Positions the leading and trailing gap indicator, based on
25
+ * the current and total pages
26
+ */
27
+ pageGap?: number;
28
+ /**
29
+ * Handles page change events
30
+ *
31
+ * @param {any} currentPage The current page
32
+ */
33
+ onChange?: (currentPage: number) => void;
34
+ /**
35
+ * Applies localized labels, test attributes, etc. to individual pages
36
+ *
37
+ * @param {string} pageType The type of the page accepting the props
38
+ * @param {any} props Default page props to transform
39
+ */
40
+ transformPageProps?: (pageType: PageType, props: any) => any;
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/react-pagination",
3
- "version": "8.49.2",
3
+ "version": "8.50.0",
4
4
  "description": "Components relating to pagination in the Garden Design System",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -33,8 +33,8 @@
33
33
  "styled-components": "^4.2.0 || ^5.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@zendeskgarden/react-theming": "^8.49.2",
37
- "@zendeskgarden/svg-icons": "6.30.2"
36
+ "@zendeskgarden/react-theming": "^8.50.0",
37
+ "@zendeskgarden/svg-icons": "6.31.1"
38
38
  },
39
39
  "keywords": [
40
40
  "components",
@@ -46,5 +46,5 @@
46
46
  "access": "public"
47
47
  },
48
48
  "zendeskgarden:src": "src/index.ts",
49
- "gitHead": "fd7769285a2f4bc1169c63f4db57a85a6e793027"
49
+ "gitHead": "d5b66e1980faf0fd40818c9e74801dfa1c3550a0"
50
50
  }