@elliemae/ds-pagination 3.4.2 → 3.4.3

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 (45) hide show
  1. package/dist/cjs/Pagination.js +6 -3
  2. package/dist/cjs/Pagination.js.map +1 -1
  3. package/dist/cjs/PaginationDataTestID.js +4 -1
  4. package/dist/cjs/PaginationDataTestID.js.map +1 -1
  5. package/dist/cjs/hooks/usePaginationSearch.js +20 -14
  6. package/dist/cjs/hooks/usePaginationSearch.js.map +1 -1
  7. package/dist/cjs/index.d.js +4 -1
  8. package/dist/cjs/index.d.js.map +1 -1
  9. package/dist/cjs/index.js +4 -1
  10. package/dist/cjs/index.js.map +1 -1
  11. package/dist/cjs/parts/PageNextButton.js +11 -7
  12. package/dist/cjs/parts/PageNextButton.js.map +1 -1
  13. package/dist/cjs/parts/PagePrevButton.js +11 -7
  14. package/dist/cjs/parts/PagePrevButton.js.map +1 -1
  15. package/dist/cjs/parts/PaginationContent.js +49 -30
  16. package/dist/cjs/parts/PaginationContent.js.map +2 -2
  17. package/dist/cjs/parts/Paginator.js +137 -84
  18. package/dist/cjs/parts/Paginator.js.map +1 -1
  19. package/dist/cjs/parts/PerPageSelector.js +26 -15
  20. package/dist/cjs/parts/PerPageSelector.js.map +2 -2
  21. package/dist/cjs/props.js +15 -10
  22. package/dist/cjs/props.js.map +1 -1
  23. package/dist/cjs/styled.js +4 -1
  24. package/dist/cjs/styled.js.map +1 -1
  25. package/dist/esm/Pagination.js +2 -2
  26. package/dist/esm/Pagination.js.map +1 -1
  27. package/dist/esm/PaginationDataTestID.js.map +1 -1
  28. package/dist/esm/hooks/usePaginationSearch.js +16 -13
  29. package/dist/esm/hooks/usePaginationSearch.js.map +1 -1
  30. package/dist/esm/index.d.js.map +1 -1
  31. package/dist/esm/index.js.map +1 -1
  32. package/dist/esm/parts/PageNextButton.js +7 -6
  33. package/dist/esm/parts/PageNextButton.js.map +1 -1
  34. package/dist/esm/parts/PagePrevButton.js +7 -6
  35. package/dist/esm/parts/PagePrevButton.js.map +1 -1
  36. package/dist/esm/parts/PaginationContent.js +45 -29
  37. package/dist/esm/parts/PaginationContent.js.map +1 -1
  38. package/dist/esm/parts/Paginator.js +133 -83
  39. package/dist/esm/parts/Paginator.js.map +1 -1
  40. package/dist/esm/parts/PerPageSelector.js +22 -14
  41. package/dist/esm/parts/PerPageSelector.js.map +1 -1
  42. package/dist/esm/props.js +11 -9
  43. package/dist/esm/props.js.map +1 -1
  44. package/dist/esm/styled.js.map +1 -1
  45. package/package.json +8 -8
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var Pagination_exports = {};
23
26
  __export(Pagination_exports, {
@@ -26,14 +29,14 @@ __export(Pagination_exports, {
26
29
  });
27
30
  module.exports = __toCommonJS(Pagination_exports);
28
31
  var React = __toESM(require("react"));
29
- var import_react = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
30
33
  var import_ds_utilities = require("@elliemae/ds-utilities");
31
34
  var import_PaginationContent = require("./parts/PaginationContent");
32
35
  var import_props = require("./props");
33
36
  const DSPagination = (props) => {
34
37
  const propsWithDefault = (0, import_ds_utilities.useMemoMergePropsWithDefault)(props, import_props.defaultProps);
35
38
  (0, import_ds_utilities.useValidateTypescriptPropTypes)(propsWithDefault, import_props.propTypes);
36
- return /* @__PURE__ */ import_react.default.createElement(import_PaginationContent.PaginationContent, {
39
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PaginationContent.PaginationContent, {
37
40
  ...propsWithDefault
38
41
  });
39
42
  };
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Pagination.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React from 'react';\nimport { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-utilities';\nimport { PaginationContent } from './parts/PaginationContent';\nimport { propTypes, defaultProps } from './props';\nimport { DSPaginationProps } from './index.d';\n\nconst DSPagination: React.ComponentType<DSPaginationProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n return <PaginationContent {...propsWithDefault} />;\n};\n\nDSPagination.propTypes = propTypes;\nDSPagination.displayName = 'DSPagination';\nconst DSPaginationWithSchema = describe(DSPagination).description('DSPagination');\nDSPaginationWithSchema.propTypes = propTypes;\n\nexport { DSPagination, DSPaginationWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,0BAAuF;AACvF,+BAAkC;AAClC,mBAAwC;AAGxC,MAAM,eAAuD,CAAC,UAAU;AACtE,QAAM,mBAAmB,sDAA6B,OAAO,yBAAY;AACzE,0DAA+B,kBAAkB,sBAAS;AAE1D,SAAO,mDAAC;AAAA,IAAmB,GAAG;AAAA,GAAkB;AAClD;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,kCAAS,YAAY,EAAE,YAAY,cAAc;AAChF,uBAAuB,YAAY;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AACA,0BAAuF;AACvF,+BAAkC;AAClC,mBAAwC;AAGxC,MAAM,eAAuD,CAAC,UAAU;AACtE,QAAM,uBAAmB,kDAA6B,OAAO,yBAAY;AACzE,0DAA+B,kBAAkB,sBAAS;AAE1D,SAAO,4CAAC;AAAA,IAAmB,GAAG;AAAA,GAAkB;AAClD;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY,EAAE,YAAY,cAAc;AAChF,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var PaginationDataTestID_exports = {};
23
26
  __export(PaginationDataTestID_exports, {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/PaginationDataTestID.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const PAGINATION_DATA_TESTID = {\n PREVIOUS_BUTTON: 'data-table-pagination-prev-button',\n NEXT_BUTTON: 'data-table-pagination-next-button',\n CONTAINER: 'data-table-pagination-container',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AACb;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AACb;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var usePaginationSearch_exports = {};
23
26
  __export(usePaginationSearch_exports, {
@@ -36,19 +39,22 @@ const usePaginationSearch = (pageCount, actionRef) => {
36
39
  actionRef.current.scrollOptionIntoView(searchValue);
37
40
  }
38
41
  }, [searchValue]);
39
- const onKeyDown = (0, import_react.useCallback)((e) => {
40
- if (e.code.startsWith("Digit")) {
41
- if (shouldResetSearchValue)
42
- setSearchValue(e.key);
43
- else
44
- setSearchValue((prevValue) => prevValue + e.key);
45
- setShouldResetSearchValue(false);
46
- clearTimeout(timeoutRef.current);
47
- timeoutRef.current = setTimeout(() => {
48
- setShouldResetSearchValue(true);
49
- }, 1e3);
50
- }
51
- }, [shouldResetSearchValue]);
42
+ const onKeyDown = (0, import_react.useCallback)(
43
+ (e) => {
44
+ if (e.code.startsWith("Digit")) {
45
+ if (shouldResetSearchValue)
46
+ setSearchValue(e.key);
47
+ else
48
+ setSearchValue((prevValue) => prevValue + e.key);
49
+ setShouldResetSearchValue(false);
50
+ clearTimeout(timeoutRef.current);
51
+ timeoutRef.current = setTimeout(() => {
52
+ setShouldResetSearchValue(true);
53
+ }, 1e3);
54
+ }
55
+ },
56
+ [shouldResetSearchValue]
57
+ );
52
58
  return onKeyDown;
53
59
  };
54
60
  //# sourceMappingURL=usePaginationSearch.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/usePaginationSearch.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { useCallback, useEffect, useRef, useState } from 'react';\n\nexport const usePaginationSearch = (\n pageCount: number,\n actionRef: React.MutableRefObject<any>,\n): React.KeyboardEventHandler => {\n const [searchValue, setSearchValue] = useState('');\n const [shouldResetSearchValue, setShouldResetSearchValue] = useState(true);\n\n const timeoutRef = useRef<NodeJS.Timeout>(null);\n\n useEffect(() => {\n if (searchValue !== '' && Number.parseInt(searchValue, 10) <= pageCount) {\n actionRef.current.setActiveDescendant(searchValue);\n actionRef.current.scrollOptionIntoView(searchValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchValue]);\n\n const onKeyDown = useCallback(\n (e) => {\n if (e.code.startsWith('Digit')) {\n if (shouldResetSearchValue) setSearchValue(e.key);\n else setSearchValue((prevValue) => prevValue + e.key);\n\n setShouldResetSearchValue(false);\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => {\n setShouldResetSearchValue(true);\n }, 1000);\n }\n },\n [shouldResetSearchValue],\n );\n\n return onKeyDown;\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyD;AAElD,MAAM,sBAAsB,CACjC,WACA,cAC+B;AAC/B,QAAM,CAAC,aAAa,kBAAkB,2BAAS,EAAE;AACjD,QAAM,CAAC,wBAAwB,6BAA6B,2BAAS,IAAI;AAEzE,QAAM,aAAa,yBAAuB,IAAI;AAE9C,8BAAU,MAAM;AACd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OAAO;AAC/B,mBAAW,UAAU,WAAW,MAAM;AACpC,oCAA0B,IAAI;AAAA,QAChC,GAAG,GAAI;AAAA,MACT;AAAA,IACF;AAAA,IACA,CAAC,sBAAsB;AAAA,EACzB;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -13,7 +13,10 @@ var __copyProps = (to, from, except, desc) => {
13
13
  }
14
14
  return to;
15
15
  };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
+ mod
19
+ ));
17
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
21
  var index_d_exports = {};
19
22
  module.exports = __toCommonJS(index_d_exports);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.d.ts", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export interface DSPaginationProps {\n pageCount: number;\n pageIndex?: number;\n canPreviousPage?: boolean;\n canNextPage?: boolean;\n pageSize?: number;\n showPerPageSelector?: boolean;\n perPageOptions?: (number | Record<string, unknown>)[];\n perPageStep?: number;\n minPerPage?: number;\n maxPerPage?: number;\n onPageSizeChange?: (pageSize: number) => void;\n onPreviousPage?: () => void;\n onNextPage?: () => void;\n onPageChange?: (page: number) => void;\n pageDetails?: string[];\n pageDetailsTitle?: string;\n width?: string | number;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
+ mod
20
+ ));
18
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
22
  var src_exports = {};
20
23
  module.exports = __toCommonJS(src_exports);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './Pagination';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yBAAd;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,yBAAd;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var PageNextButton_exports = {};
23
26
  __export(PageNextButton_exports, {
@@ -25,14 +28,14 @@ __export(PageNextButton_exports, {
25
28
  });
26
29
  module.exports = __toCommonJS(PageNextButton_exports);
27
30
  var React = __toESM(require("react"));
28
- var import_react = __toESM(require("react"));
31
+ var import_jsx_runtime = require("react/jsx-runtime");
29
32
  var import_ds_icons = require("@elliemae/ds-icons");
30
33
  var import_PaginationDataTestID = require("../PaginationDataTestID");
31
34
  var import_styled = require("../styled");
32
35
  const PageNextButton = ({
33
36
  onNextPage,
34
37
  canNextPage
35
- }) => /* @__PURE__ */ import_react.default.createElement(import_styled.PreviousNextPageButton, {
38
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PreviousNextPageButton, {
36
39
  onClick: () => {
37
40
  if (canNextPage)
38
41
  onNextPage();
@@ -41,8 +44,9 @@ const PageNextButton = ({
41
44
  buttonType: "raw",
42
45
  "data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.NEXT_BUTTON,
43
46
  HeaderComp: () => "Page",
44
- "aria-label": "Go to next page"
45
- }, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ChevronRight, {
46
- color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"]
47
- }));
47
+ "aria-label": "Go to next page",
48
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronRight, {
49
+ color: canNextPage ? ["brand-primary", "700"] : ["neutral", "500"]
50
+ })
51
+ });
48
52
  //# sourceMappingURL=PageNextButton.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/PageNextButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { ChevronRight } from '@elliemae/ds-icons';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID';\nimport { PreviousNextPageButton } from '../styled';\nimport { DSPaginationProps } from '../index.d';\n\nexport const PageNextButton: React.ComponentType<Required<Pick<DSPaginationProps, 'onNextPage' | 'canNextPage'>>> = ({\n onNextPage,\n canNextPage,\n}) => (\n <PreviousNextPageButton\n onClick={() => {\n if (canNextPage) onNextPage();\n }}\n disabled={!canNextPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.NEXT_BUTTON}\n HeaderComp={() => 'Page'}\n aria-label=\"Go to next page\"\n >\n <ChevronRight color={canNextPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,sBAA6B;AAC7B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAAuG,CAAC;AAAA,EACnH;AAAA,EACA;AAAA,MAEA,mDAAC;AAAA,EACC,SAAS,MAAM;AACb,QAAI;AAAa,iBAAW;AAAA,EAC9B;AAAA,EACA,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,mDAAuB;AAAA,EACpC,YAAY,MAAM;AAAA,EAClB,cAAW;AAAA,GAEX,mDAAC;AAAA,EAAa,OAAO,cAAc,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK;AAAA,CAAG,CACpF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,sBAA6B;AAC7B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAAuG,CAAC;AAAA,EACnH;AAAA,EACA;AACF,MACE,4CAAC;AAAA,EACC,SAAS,MAAM;AACb,QAAI;AAAa,iBAAW;AAAA,EAC9B;AAAA,EACA,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,mDAAuB;AAAA,EACpC,YAAY,MAAM;AAAA,EAClB,cAAW;AAAA,EAEX,sDAAC;AAAA,IAAa,OAAO,cAAc,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK;AAAA,GAAG;AAAA,CACpF;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var PagePrevButton_exports = {};
23
26
  __export(PagePrevButton_exports, {
@@ -25,11 +28,11 @@ __export(PagePrevButton_exports, {
25
28
  });
26
29
  module.exports = __toCommonJS(PagePrevButton_exports);
27
30
  var React = __toESM(require("react"));
28
- var import_react = __toESM(require("react"));
31
+ var import_jsx_runtime = require("react/jsx-runtime");
29
32
  var import_ds_icons = require("@elliemae/ds-icons");
30
33
  var import_PaginationDataTestID = require("../PaginationDataTestID");
31
34
  var import_styled = require("../styled");
32
- const PagePrevButton = ({ onPreviousPage, canPreviousPage }) => /* @__PURE__ */ import_react.default.createElement(import_styled.PreviousNextPageButton, {
35
+ const PagePrevButton = ({ onPreviousPage, canPreviousPage }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PreviousNextPageButton, {
33
36
  onClick: () => {
34
37
  if (canPreviousPage)
35
38
  onPreviousPage();
@@ -37,8 +40,9 @@ const PagePrevButton = ({ onPreviousPage, canPreviousPage }) => /* @__PURE__ */
37
40
  disabled: !canPreviousPage,
38
41
  buttonType: "raw",
39
42
  "data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.PREVIOUS_BUTTON,
40
- "aria-label": "Go to previous page"
41
- }, /* @__PURE__ */ import_react.default.createElement(import_ds_icons.ChevronLeft, {
42
- color: canPreviousPage ? ["brand-primary", "700"] : ["neutral", "500"]
43
- }));
43
+ "aria-label": "Go to previous page",
44
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.ChevronLeft, {
45
+ color: canPreviousPage ? ["brand-primary", "700"] : ["neutral", "500"]
46
+ })
47
+ });
44
48
  //# sourceMappingURL=PagePrevButton.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/PagePrevButton.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { ChevronLeft } from '@elliemae/ds-icons';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID';\nimport { PreviousNextPageButton } from '../styled';\nimport { DSPaginationProps } from '../index.d';\n\nexport const PagePrevButton: React.ComponentType<\n Required<Pick<DSPaginationProps, 'onPreviousPage' | 'canPreviousPage'>>\n> = ({ onPreviousPage, canPreviousPage }) => (\n <PreviousNextPageButton\n onClick={() => {\n if (canPreviousPage) onPreviousPage();\n }}\n disabled={!canPreviousPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.PREVIOUS_BUTTON}\n aria-label=\"Go to previous page\"\n >\n <ChevronLeft color={canPreviousPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,sBAA4B;AAC5B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAET,CAAC,EAAE,gBAAgB,sBACrB,mDAAC;AAAA,EACC,SAAS,MAAM;AACb,QAAI;AAAiB,qBAAe;AAAA,EACtC;AAAA,EACA,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,mDAAuB;AAAA,EACpC,cAAW;AAAA,GAEX,mDAAC;AAAA,EAAY,OAAO,kBAAkB,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK;AAAA,CAAG,CACvF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAEA,sBAA4B;AAC5B,kCAAuC;AACvC,oBAAuC;AAGhC,MAAM,iBAET,CAAC,EAAE,gBAAgB,gBAAgB,MACrC,4CAAC;AAAA,EACC,SAAS,MAAM;AACb,QAAI;AAAiB,qBAAe;AAAA,EACtC;AAAA,EACA,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,mDAAuB;AAAA,EACpC,cAAW;AAAA,EAEX,sDAAC;AAAA,IAAY,OAAO,kBAAkB,CAAC,iBAAiB,KAAK,IAAI,CAAC,WAAW,KAAK;AAAA,GAAG;AAAA,CACvF;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var PaginationContent_exports = {};
23
26
  __export(PaginationContent_exports, {
@@ -25,7 +28,7 @@ __export(PaginationContent_exports, {
25
28
  });
26
29
  module.exports = __toCommonJS(PaginationContent_exports);
27
30
  var React = __toESM(require("react"));
28
- var import_react = __toESM(require("react"));
31
+ var import_jsx_runtime = require("react/jsx-runtime");
29
32
  var import_ds_grid = require("@elliemae/ds-grid");
30
33
  var import_ds_utilities = require("@elliemae/ds-utilities");
31
34
  var import_styled = require("../styled");
@@ -55,38 +58,54 @@ const PaginationContent = (props) => {
55
58
  width
56
59
  } = props;
57
60
  const globalAttributes = (0, import_ds_utilities.useGetGlobalAttributes)(props);
58
- return /* @__PURE__ */ import_react.default.createElement(import_styled.PaginationContainer, {
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationContainer, {
59
62
  justifyContent: "center",
60
63
  alignItems: "center",
61
64
  width: width.toString(),
62
65
  "data-testid": import_PaginationDataTestID.PAGINATION_DATA_TESTID.CONTAINER,
63
66
  cols: ["minmax(auto, 80%)"],
64
- ...globalAttributes
65
- }, /* @__PURE__ */ import_react.default.createElement(import_styled.PaginationWrapper, null, showPerPageSelector && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PerPageSelector.default, {
66
- pageSize,
67
- onPageSizeChange,
68
- perPageOptions,
69
- maxPerPage,
70
- perPageStep,
71
- minPerPage
72
- }), /* @__PURE__ */ import_react.default.createElement(import_styled.PaginationSeparator, {
73
- mr: 24
74
- })), /* @__PURE__ */ import_react.default.createElement(import_ds_grid.Grid, {
75
- mr: "32px",
76
- alignItems: "center",
77
- style: { gridAutoFlow: "column" }
78
- }, /* @__PURE__ */ import_react.default.createElement(import_PagePrevButton.PagePrevButton, {
79
- canPreviousPage,
80
- onPreviousPage
81
- }), /* @__PURE__ */ import_react.default.createElement(import_Paginator.default, {
82
- pageCount,
83
- pageIndex,
84
- onPageChange,
85
- pageDetails,
86
- pageDetailsTitle
87
- }), /* @__PURE__ */ import_react.default.createElement(import_PageNextButton.PageNextButton, {
88
- canNextPage,
89
- onNextPage
90
- }))));
67
+ ...globalAttributes,
68
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styled.PaginationWrapper, {
69
+ children: [
70
+ showPerPageSelector && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
71
+ children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PerPageSelector.default, {
73
+ pageSize,
74
+ onPageSizeChange,
75
+ perPageOptions,
76
+ maxPerPage,
77
+ perPageStep,
78
+ minPerPage
79
+ }),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.PaginationSeparator, {
81
+ mr: 24
82
+ })
83
+ ]
84
+ }),
85
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ds_grid.Grid, {
86
+ mr: "32px",
87
+ alignItems: "center",
88
+ style: { gridAutoFlow: "column" },
89
+ children: [
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PagePrevButton.PagePrevButton, {
91
+ canPreviousPage,
92
+ onPreviousPage
93
+ }),
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Paginator.default, {
95
+ pageCount,
96
+ pageIndex,
97
+ onPageChange,
98
+ pageDetails,
99
+ pageDetailsTitle
100
+ }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_PageNextButton.PageNextButton, {
102
+ canNextPage,
103
+ onNextPage
104
+ })
105
+ ]
106
+ })
107
+ ]
108
+ })
109
+ });
91
110
  };
92
111
  //# sourceMappingURL=PaginationContent.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/PaginationContent.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useGetGlobalAttributes } from '@elliemae/ds-utilities';\nimport { PaginationContainer, PaginationSeparator, PaginationWrapper } from '../styled';\nimport PerPageSelector from './PerPageSelector';\nimport Paginator from './Paginator';\nimport { PAGINATION_DATA_TESTID } from '../PaginationDataTestID';\nimport { PagePrevButton } from './PagePrevButton';\nimport { PageNextButton } from './PageNextButton';\nimport { DSPaginationProps } from '../index.d';\n\nexport const PaginationContent: React.ComponentType<Required<DSPaginationProps>> = (props) => {\n const {\n pageIndex,\n pageSize,\n canPreviousPage,\n canNextPage,\n onPageSizeChange,\n onNextPage,\n onPreviousPage,\n onPageChange,\n pageCount,\n showPerPageSelector,\n pageDetails,\n pageDetailsTitle,\n perPageOptions,\n maxPerPage,\n perPageStep,\n minPerPage,\n width,\n } = props;\n\n const globalAttributes = useGetGlobalAttributes(props);\n\n return (\n <PaginationContainer\n justifyContent=\"center\"\n alignItems=\"center\"\n width={width.toString()}\n data-testid={PAGINATION_DATA_TESTID.CONTAINER}\n cols={['minmax(auto, 80%)']}\n {...globalAttributes}\n >\n <PaginationWrapper>\n {showPerPageSelector && (\n <>\n <PerPageSelector\n pageSize={pageSize}\n onPageSizeChange={onPageSizeChange}\n perPageOptions={perPageOptions}\n maxPerPage={maxPerPage}\n perPageStep={perPageStep}\n minPerPage={minPerPage}\n />\n <PaginationSeparator mr={24} />\n </>\n )}\n <Grid mr=\"32px\" alignItems=\"center\" style={{ gridAutoFlow: 'column' }}>\n <PagePrevButton canPreviousPage={canPreviousPage} onPreviousPage={onPreviousPage} />\n <Paginator\n pageCount={pageCount}\n pageIndex={pageIndex}\n onPageChange={onPageChange}\n pageDetails={pageDetails}\n pageDetailsTitle={pageDetailsTitle}\n />\n <PageNextButton canNextPage={canNextPage} onNextPage={onNextPage} />\n </Grid>\n </PaginationWrapper>\n </PaginationContainer>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,qBAAqB;AACrB,0BAAuC;AACvC,oBAA4E;AAC5E,6BAA4B;AAC5B,uBAAsB;AACtB,kCAAuC;AACvC,4BAA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