@elliemae/ds-pagination 2.2.0-alpha.3 → 2.2.0-next.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.
Files changed (49) hide show
  1. package/cjs/Pagination.js +35 -49
  2. package/cjs/PaginationDataTestID.js +9 -37
  3. package/cjs/hooks/usePaginationSearch.js +20 -48
  4. package/cjs/index.d.js +2 -27
  5. package/cjs/index.js +10 -28
  6. package/cjs/parts/PageNextButton.js +32 -52
  7. package/cjs/parts/PagePrevButton.js +31 -51
  8. package/cjs/parts/PaginationContent.js +77 -91
  9. package/cjs/parts/Paginator.js +124 -112
  10. package/cjs/parts/PerPageSelector.js +63 -68
  11. package/cjs/props.js +34 -63
  12. package/cjs/styled.js +47 -112
  13. package/esm/Pagination.js +23 -17
  14. package/esm/PaginationDataTestID.js +5 -8
  15. package/esm/hooks/usePaginationSearch.js +13 -16
  16. package/esm/index.d.js +1 -2
  17. package/esm/index.js +1 -3
  18. package/esm/parts/PageNextButton.js +24 -23
  19. package/esm/parts/PagePrevButton.js +23 -22
  20. package/esm/parts/PaginationContent.js +68 -62
  21. package/esm/parts/Paginator.js +110 -76
  22. package/esm/parts/PerPageSelector.js +49 -32
  23. package/esm/props.js +29 -34
  24. package/esm/styled.js +33 -83
  25. package/package.json +7 -7
  26. package/cjs/Pagination.js.map +0 -7
  27. package/cjs/PaginationDataTestID.js.map +0 -7
  28. package/cjs/hooks/usePaginationSearch.js.map +0 -7
  29. package/cjs/index.d.js.map +0 -7
  30. package/cjs/index.js.map +0 -7
  31. package/cjs/parts/PageNextButton.js.map +0 -7
  32. package/cjs/parts/PagePrevButton.js.map +0 -7
  33. package/cjs/parts/PaginationContent.js.map +0 -7
  34. package/cjs/parts/Paginator.js.map +0 -7
  35. package/cjs/parts/PerPageSelector.js.map +0 -7
  36. package/cjs/props.js.map +0 -7
  37. package/cjs/styled.js.map +0 -7
  38. package/esm/Pagination.js.map +0 -7
  39. package/esm/PaginationDataTestID.js.map +0 -7
  40. package/esm/hooks/usePaginationSearch.js.map +0 -7
  41. package/esm/index.d.js.map +0 -7
  42. package/esm/index.js.map +0 -7
  43. package/esm/parts/PageNextButton.js.map +0 -7
  44. package/esm/parts/PagePrevButton.js.map +0 -7
  45. package/esm/parts/PaginationContent.js.map +0 -7
  46. package/esm/parts/Paginator.js.map +0 -7
  47. package/esm/parts/PerPageSelector.js.map +0 -7
  48. package/esm/props.js.map +0 -7
  49. package/esm/styled.js.map +0 -7
package/cjs/styled.js CHANGED
@@ -1,113 +1,48 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var Grid = require('@elliemae/ds-grid');
6
+ var dsButton = require('@elliemae/ds-button');
7
+ var styled = require('styled-components');
8
+ var styledComponents = require('@xstyled/styled-components');
9
+
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ var Grid__default = /*#__PURE__*/_interopDefaultLegacy(Grid);
13
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
14
+
15
+ const sizeToCss = size => typeof size === 'number' && !Number.isNaN(size) ? "".concat(size, "px") : size;
16
+
17
+ const styledFocusCss = _ref => {
18
+ let {
19
+ theme
20
+ } = _ref;
21
+ return "\n&:after {\n display: block;\n content: ' ';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border: 2px solid ".concat(theme.colors.brand[700], ";\n pointer-events: none;\n z-index: 7;\n}");
11
22
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
- }
18
- return target;
19
- };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
- var styled_exports = {};
29
- __export(styled_exports, {
30
- PaginationBoldText: () => PaginationBoldText,
31
- PaginationContainer: () => PaginationContainer,
32
- PaginationDropdownButton: () => PaginationDropdownButton,
33
- PaginationSeparator: () => PaginationSeparator,
34
- PaginationWrapper: () => PaginationWrapper,
35
- PreviousNextPageButton: () => PreviousNextPageButton
36
- });
37
- var React = __toESM(require("react"));
38
- var import_ds_grid = __toESM(require("@elliemae/ds-grid"));
39
- var import_ds_button = __toESM(require("@elliemae/ds-button"));
40
- var import_styled_components = __toESM(require("styled-components"));
41
- var import_styled_components2 = __toESM(require("@xstyled/styled-components"));
42
- const sizeToCss = (size) => typeof size === "number" && !Number.isNaN(size) ? `${size}px` : size;
43
- const styledFocusCss = ({ theme }) => `
44
- &:after {
45
- display: block;
46
- content: ' ';
47
- position: absolute;
48
- top: 0;
49
- left: 0;
50
- right: 0;
51
- bottom: 0;
52
- border: 2px solid ${theme.colors.brand[700]};
53
- pointer-events: none;
54
- z-index: 7;
55
- }`;
56
- const PaginationContainer = (0, import_styled_components.default)(import_ds_grid.default)`
57
- padding: 0 ${(props) => props.theme.space.xs};
58
- height: 42px;
59
- width: ${(props) => sizeToCss(props.width) || "100%"};
60
- max-width: 100%;
61
- align-items: center;
62
- box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.5);
63
- `;
64
- const PaginationWrapper = import_styled_components.default.div`
65
- display: flex;
66
- justify-content: center;
67
- align-items: center;
68
- margin: 0 32px;
69
- `;
70
- const PaginationSeparator = (0, import_styled_components.default)(import_ds_grid.default)`
71
- background-color: ${(props) => props.theme.colors.neutral[300]};
72
- width: 1px;
73
- height: ${(props) => props.height || "30px"};
74
- `;
75
- const PaginationBoldText = import_styled_components.default.span`
76
- font-weight: ${(props) => props.theme.fontWeights.semibold};
77
- ${import_styled_components2.typography}
78
- ${import_styled_components2.space}
79
- position: relative;
80
- `;
81
- const PaginationDropdownButton = (0, import_styled_components.default)(import_ds_button.DSButtonV2)`
82
- height: 42px;
83
- display: flex;
84
- justify-content: center;
85
- align-items: center;
86
- position: relative;
87
- padding-left: 16px;
88
- padding-right: 16px;
89
- grid-gap: 8px;
90
- font-size: 13px;
91
- color: ${(props) => props.theme.colors.neutral[700]};
92
- cursor: pointer;
93
- border-radius: 0;
94
- font-weight: ${(props) => props.theme.fontWeights.regular};
95
- :focus {
96
- ${styledFocusCss}
97
- }
98
- `;
99
- const PreviousNextPageButton = (0, import_styled_components.default)(import_ds_button.DSButtonV2)`
100
- height: 42px;
101
- display: grid;
102
- place-items: center;
103
- position: relative;
104
- padding-left: 8px;
105
- padding-right: 8px;
106
- border-radius: 0;
107
- cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
108
- :focus {
109
- ${styledFocusCss}
110
- }
111
- `;
112
- module.exports = __toCommonJS(styled_exports);
113
- //# sourceMappingURL=styled.js.map
23
+
24
+ const PaginationContainer = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
25
+ componentId: "sc-mxz59e-0"
26
+ })(["padding:0 ", ";height:42px;width:", ";max-width:100%;align-items:center;box-shadow:0 -1px 3px 0 rgba(0,0,0,0.5);"], props => props.theme.space.xs, props => sizeToCss(props.width) || '100%');
27
+ const PaginationWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
28
+ componentId: "sc-mxz59e-1"
29
+ })(["display:flex;justify-content:center;align-items:center;margin:0 32px;"]);
30
+ const PaginationSeparator = /*#__PURE__*/styled__default["default"](Grid__default["default"]).withConfig({
31
+ componentId: "sc-mxz59e-2"
32
+ })(["background-color:", ";width:1px;height:", ";"], props => props.theme.colors.neutral[300], props => props.height || '30px');
33
+ const PaginationBoldText = /*#__PURE__*/styled__default["default"].span.withConfig({
34
+ componentId: "sc-mxz59e-3"
35
+ })(["font-weight:", ";", " ", " position:relative;"], props => props.theme.fontWeights.semibold, styledComponents.typography, styledComponents.space);
36
+ const PaginationDropdownButton = /*#__PURE__*/styled__default["default"](dsButton.DSButtonV2).withConfig({
37
+ componentId: "sc-mxz59e-4"
38
+ })(["height:42px;display:flex;justify-content:center;align-items:center;position:relative;padding-left:16px;padding-right:16px;grid-gap:8px;font-size:13px;color:", ";cursor:pointer;border-radius:0;font-weight:", ";:focus{", "}"], props => props.theme.colors.neutral[700], props => props.theme.fontWeights.regular, styledFocusCss);
39
+ const PreviousNextPageButton = /*#__PURE__*/styled__default["default"](dsButton.DSButtonV2).withConfig({
40
+ componentId: "sc-mxz59e-5"
41
+ })(["height:42px;display:grid;place-items:center;position:relative;padding-left:8px;padding-right:8px;border-radius:0;cursor:", ";:focus{", "}"], props => props.disabled ? 'not-allowed' : 'pointer', styledFocusCss);
42
+
43
+ exports.PaginationBoldText = PaginationBoldText;
44
+ exports.PaginationContainer = PaginationContainer;
45
+ exports.PaginationDropdownButton = PaginationDropdownButton;
46
+ exports.PaginationSeparator = PaginationSeparator;
47
+ exports.PaginationWrapper = PaginationWrapper;
48
+ exports.PreviousNextPageButton = PreviousNextPageButton;
package/esm/Pagination.js CHANGED
@@ -1,21 +1,27 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
4
- import { describe } from "react-desc";
5
- import { PaginationContent } from "./parts/PaginationContent";
6
- import { propTypes, defaultProps } from "./props";
7
- const DSPagination = (props) => {
1
+ import 'core-js/modules/esnext.async-iterator.filter.js';
2
+ import 'core-js/modules/esnext.iterator.constructor.js';
3
+ import 'core-js/modules/esnext.iterator.filter.js';
4
+ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
+ import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
+ import 'react';
8
+ import { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
9
+ import { describe } from 'react-desc';
10
+ import { PaginationContent } from './parts/PaginationContent.js';
11
+ import { propTypes, defaultProps } from './props.js';
12
+ import { jsx } from 'react/jsx-runtime';
13
+
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
+
16
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
+
18
+ const DSPagination = props => {
8
19
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
9
20
  useValidateTypescriptPropTypes(propsWithDefault, propTypes);
10
- return /* @__PURE__ */ React2.createElement(PaginationContent, {
11
- ...propsWithDefault
12
- });
21
+ return /*#__PURE__*/jsx(PaginationContent, _objectSpread({}, propsWithDefault));
13
22
  };
14
- DSPagination.propTypes = propTypes;
15
- const DSPaginationWithSchema = describe(DSPagination).description("DSPagination");
23
+
24
+ const DSPaginationWithSchema = describe(DSPagination).description('DSPagination');
16
25
  DSPaginationWithSchema.propTypes = propTypes;
17
- export {
18
- DSPagination,
19
- DSPaginationWithSchema
20
- };
21
- //# sourceMappingURL=Pagination.js.map
26
+
27
+ export { DSPagination, DSPaginationWithSchema };
@@ -1,10 +1,7 @@
1
- import * as React from "react";
2
1
  const PAGINATION_DATA_TESTID = {
3
- PREVIOUS_BUTTON: "data-table-pagination-prev-button",
4
- NEXT_BUTTON: "data-table-pagination-next-button",
5
- CONTAINER: "data-table-pagination-container"
2
+ PREVIOUS_BUTTON: 'data-table-pagination-prev-button',
3
+ NEXT_BUTTON: 'data-table-pagination-next-button',
4
+ CONTAINER: 'data-table-pagination-container'
6
5
  };
7
- export {
8
- PAGINATION_DATA_TESTID
9
- };
10
- //# sourceMappingURL=PaginationDataTestID.js.map
6
+
7
+ export { PAGINATION_DATA_TESTID };
@@ -1,31 +1,28 @@
1
- import * as React from "react";
2
- import { useCallback, useEffect, useRef, useState } from "react";
1
+ import 'core-js/modules/web.dom-collections.iterator.js';
2
+ import { useState, useRef, useEffect, useCallback } from 'react';
3
+
3
4
  const usePaginationSearch = (pageCount, actionRef) => {
4
- const [searchValue, setSearchValue] = useState("");
5
+ const [searchValue, setSearchValue] = useState('');
5
6
  const [shouldResetSearchValue, setShouldResetSearchValue] = useState(true);
6
7
  const timeoutRef = useRef(null);
7
8
  useEffect(() => {
8
- if (searchValue !== "" && Number.parseInt(searchValue, 10) <= pageCount) {
9
+ if (searchValue !== '' && Number.parseInt(searchValue, 10) <= pageCount) {
9
10
  actionRef.current.setActiveDescendant(searchValue);
10
11
  actionRef.current.scrollOptionIntoView(searchValue);
11
- }
12
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
13
+
12
14
  }, [searchValue]);
13
- const onKeyDown = useCallback((e) => {
14
- if (e.code.startsWith("Digit")) {
15
- if (shouldResetSearchValue)
16
- setSearchValue(e.key);
17
- else
18
- setSearchValue((prevValue) => prevValue + e.key);
15
+ const onKeyDown = useCallback(e => {
16
+ if (e.code.startsWith('Digit')) {
17
+ if (shouldResetSearchValue) setSearchValue(e.key);else setSearchValue(prevValue => prevValue + e.key);
19
18
  setShouldResetSearchValue(false);
20
19
  clearTimeout(timeoutRef.current);
21
20
  timeoutRef.current = setTimeout(() => {
22
21
  setShouldResetSearchValue(true);
23
- }, 1e3);
22
+ }, 1000);
24
23
  }
25
24
  }, [shouldResetSearchValue]);
26
25
  return onKeyDown;
27
26
  };
28
- export {
29
- usePaginationSearch
30
- };
31
- //# sourceMappingURL=usePaginationSearch.js.map
27
+
28
+ export { usePaginationSearch };
package/esm/index.d.js CHANGED
@@ -1,2 +1 @@
1
- import * as React from "react";
2
- //# sourceMappingURL=index.d.js.map
1
+
package/esm/index.js CHANGED
@@ -1,3 +1 @@
1
- import * as React from "react";
2
- export * from "./Pagination";
3
- //# sourceMappingURL=index.js.map
1
+ export { DSPagination, DSPaginationWithSchema } from './Pagination.js';
@@ -1,24 +1,25 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { ChevronRight } from "@elliemae/ds-icons";
4
- import { PAGINATION_DATA_TESTID } from "../PaginationDataTestID";
5
- import { PreviousNextPageButton } from "../styled";
6
- const PageNextButton = ({
7
- onNextPage,
8
- canNextPage
9
- }) => /* @__PURE__ */ React2.createElement(PreviousNextPageButton, {
10
- onClick: () => {
11
- if (canNextPage)
12
- onNextPage();
13
- },
14
- disabled: !canNextPage,
15
- buttonType: "raw",
16
- "data-testid": PAGINATION_DATA_TESTID.NEXT_BUTTON,
17
- HeaderComp: () => "Page"
18
- }, /* @__PURE__ */ React2.createElement(ChevronRight, {
19
- color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"]
20
- }));
21
- export {
22
- PageNextButton
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { ChevronRight } from '@elliemae/ds-icons';
4
+ import { PAGINATION_DATA_TESTID } from '../PaginationDataTestID.js';
5
+ import { PreviousNextPageButton } from '../styled.js';
6
+
7
+ const PageNextButton = _ref => {
8
+ let {
9
+ onNextPage,
10
+ canNextPage
11
+ } = _ref;
12
+ return /*#__PURE__*/_jsx(PreviousNextPageButton, {
13
+ onClick: () => {
14
+ if (canNextPage) onNextPage();
15
+ },
16
+ disabled: !canNextPage,
17
+ buttonType: "raw",
18
+ "data-testid": PAGINATION_DATA_TESTID.NEXT_BUTTON,
19
+ HeaderComp: () => 'Page'
20
+ }, void 0, /*#__PURE__*/_jsx(ChevronRight, {
21
+ color: canNextPage ? ['brand-primary', '700'] : ['neutral', '500']
22
+ }));
23
23
  };
24
- //# sourceMappingURL=PageNextButton.js.map
24
+
25
+ export { PageNextButton };
@@ -1,23 +1,24 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import { ChevronLeft } from "@elliemae/ds-icons";
4
- import { PAGINATION_DATA_TESTID } from "../PaginationDataTestID";
5
- import { PreviousNextPageButton } from "../styled";
6
- const PagePrevButton = ({
7
- onPreviousPage,
8
- canPreviousPage
9
- }) => /* @__PURE__ */ React2.createElement(PreviousNextPageButton, {
10
- onClick: () => {
11
- if (canPreviousPage)
12
- onPreviousPage();
13
- },
14
- disabled: !canPreviousPage,
15
- buttonType: "raw",
16
- "data-testid": PAGINATION_DATA_TESTID.PREVIOUS_BUTTON
17
- }, /* @__PURE__ */ React2.createElement(ChevronLeft, {
18
- color: canPreviousPage ? ["brand-primary", "700"] : ["neutral", "500"]
19
- }));
20
- export {
21
- PagePrevButton
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import { ChevronLeft } from '@elliemae/ds-icons';
4
+ import { PAGINATION_DATA_TESTID } from '../PaginationDataTestID.js';
5
+ import { PreviousNextPageButton } from '../styled.js';
6
+
7
+ const PagePrevButton = _ref => {
8
+ let {
9
+ onPreviousPage,
10
+ canPreviousPage
11
+ } = _ref;
12
+ return /*#__PURE__*/_jsx(PreviousNextPageButton, {
13
+ onClick: () => {
14
+ if (canPreviousPage) onPreviousPage();
15
+ },
16
+ disabled: !canPreviousPage,
17
+ buttonType: "raw",
18
+ "data-testid": PAGINATION_DATA_TESTID.PREVIOUS_BUTTON
19
+ }, void 0, /*#__PURE__*/_jsx(ChevronLeft, {
20
+ color: canPreviousPage ? ['brand-primary', '700'] : ['neutral', '500']
21
+ }));
22
22
  };
23
- //# sourceMappingURL=PagePrevButton.js.map
23
+
24
+ export { PagePrevButton };
@@ -1,63 +1,69 @@
1
- import * as React from "react";
2
- import React2 from "react";
3
- import Grid from "@elliemae/ds-grid";
4
- import { PaginationContainer, PaginationSeparator, PaginationWrapper } from "../styled";
5
- import PerPageSelector from "./PerPageSelector";
6
- import Paginator from "./Paginator";
7
- import { PAGINATION_DATA_TESTID } from "../PaginationDataTestID";
8
- import { PagePrevButton } from "./PagePrevButton";
9
- import { PageNextButton } from "./PageNextButton";
10
- const PaginationContent = ({
11
- pageIndex,
12
- pageSize,
13
- canPreviousPage,
14
- canNextPage,
15
- onPageSizeChange,
16
- onNextPage,
17
- onPreviousPage,
18
- onPageChange,
19
- pageCount,
20
- showPerPageSelector,
21
- pageDetails,
22
- pageDetailsTitle,
23
- perPageOptions,
24
- maxPerPage,
25
- perPageStep,
26
- minPerPage,
27
- width
28
- }) => /* @__PURE__ */ React2.createElement(PaginationContainer, {
29
- justifyContent: "center",
30
- alignItems: "center",
31
- width,
32
- "data-testid": PAGINATION_DATA_TESTID.CONTAINER
33
- }, /* @__PURE__ */ React2.createElement(PaginationWrapper, null, showPerPageSelector && /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(PerPageSelector, {
34
- pageSize,
35
- onPageSizeChange,
36
- perPageOptions,
37
- maxPerPage,
38
- perPageStep,
39
- minPerPage
40
- }), /* @__PURE__ */ React2.createElement(PaginationSeparator, {
41
- mr: 24
42
- })), /* @__PURE__ */ React2.createElement(Grid, {
43
- cols: ["auto", "auto", "auto", "auto", "auto"],
44
- mr: "32px",
45
- alignItems: "center"
46
- }, /* @__PURE__ */ React2.createElement(PagePrevButton, {
47
- canPreviousPage,
48
- onPreviousPage
49
- }), /* @__PURE__ */ React2.createElement(Paginator, {
50
- pageCount,
51
- pageIndex,
52
- onNextPage,
53
- onPageChange,
54
- pageDetails,
55
- pageDetailsTitle
56
- }), /* @__PURE__ */ React2.createElement(PageNextButton, {
57
- canNextPage,
58
- onNextPage
59
- }))));
60
- export {
61
- PaginationContent
1
+ import _jsx from '@babel/runtime/helpers/esm/jsx';
2
+ import 'react';
3
+ import Grid from '@elliemae/ds-grid';
4
+ import { PaginationContainer, PaginationWrapper, PaginationSeparator } from '../styled.js';
5
+ import PerPageSelector from './PerPageSelector.js';
6
+ import Paginator from './Paginator.js';
7
+ import { PAGINATION_DATA_TESTID } from '../PaginationDataTestID.js';
8
+ import { PagePrevButton } from './PagePrevButton.js';
9
+ import { PageNextButton } from './PageNextButton.js';
10
+ import { jsxs, Fragment } from 'react/jsx-runtime';
11
+
12
+ var _PaginationSeparator;
13
+ const PaginationContent = _ref => {
14
+ let {
15
+ pageIndex,
16
+ pageSize,
17
+ canPreviousPage,
18
+ canNextPage,
19
+ onPageSizeChange,
20
+ onNextPage,
21
+ onPreviousPage,
22
+ onPageChange,
23
+ pageCount,
24
+ showPerPageSelector,
25
+ pageDetails,
26
+ pageDetailsTitle,
27
+ perPageOptions,
28
+ maxPerPage,
29
+ perPageStep,
30
+ minPerPage,
31
+ width
32
+ } = _ref;
33
+ return /*#__PURE__*/_jsx(PaginationContainer, {
34
+ justifyContent: "center",
35
+ alignItems: "center",
36
+ width: width,
37
+ "data-testid": PAGINATION_DATA_TESTID.CONTAINER
38
+ }, void 0, /*#__PURE__*/_jsx(PaginationWrapper, {}, void 0, showPerPageSelector && /*#__PURE__*/jsxs(Fragment, {
39
+ children: [/*#__PURE__*/_jsx(PerPageSelector, {
40
+ pageSize: pageSize,
41
+ onPageSizeChange: onPageSizeChange,
42
+ perPageOptions: perPageOptions,
43
+ maxPerPage: maxPerPage,
44
+ perPageStep: perPageStep,
45
+ minPerPage: minPerPage
46
+ }), _PaginationSeparator || (_PaginationSeparator = /*#__PURE__*/_jsx(PaginationSeparator, {
47
+ mr: 24
48
+ }))]
49
+ }), /*#__PURE__*/_jsx(Grid, {
50
+ cols: ['auto', 'auto', 'auto', 'auto', 'auto'],
51
+ mr: "32px",
52
+ alignItems: "center"
53
+ }, void 0, /*#__PURE__*/_jsx(PagePrevButton, {
54
+ canPreviousPage: canPreviousPage,
55
+ onPreviousPage: onPreviousPage
56
+ }), /*#__PURE__*/_jsx(Paginator, {
57
+ pageCount: pageCount,
58
+ pageIndex: pageIndex,
59
+ onNextPage: onNextPage,
60
+ onPageChange: onPageChange,
61
+ pageDetails: pageDetails,
62
+ pageDetailsTitle: pageDetailsTitle
63
+ }), /*#__PURE__*/_jsx(PageNextButton, {
64
+ canNextPage: canNextPage,
65
+ onNextPage: onNextPage
66
+ }))));
62
67
  };
63
- //# sourceMappingURL=PaginationContent.js.map
68
+
69
+ export { PaginationContent };