@elliemae/ds-pagination 2.2.1 → 2.3.0-alpha.4

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 +49 -35
  2. package/cjs/Pagination.js.map +7 -0
  3. package/cjs/PaginationDataTestID.js +37 -9
  4. package/cjs/PaginationDataTestID.js.map +7 -0
  5. package/cjs/hooks/usePaginationSearch.js +48 -20
  6. package/cjs/hooks/usePaginationSearch.js.map +7 -0
  7. package/cjs/index.d.js +27 -2
  8. package/cjs/index.d.js.map +7 -0
  9. package/cjs/index.js +28 -10
  10. package/cjs/index.js.map +7 -0
  11. package/cjs/parts/PageNextButton.js +52 -32
  12. package/cjs/parts/PageNextButton.js.map +7 -0
  13. package/cjs/parts/PagePrevButton.js +51 -31
  14. package/cjs/parts/PagePrevButton.js.map +7 -0
  15. package/cjs/parts/PaginationContent.js +91 -77
  16. package/cjs/parts/PaginationContent.js.map +7 -0
  17. package/cjs/parts/Paginator.js +112 -124
  18. package/cjs/parts/Paginator.js.map +7 -0
  19. package/cjs/parts/PerPageSelector.js +68 -63
  20. package/cjs/parts/PerPageSelector.js.map +7 -0
  21. package/cjs/props.js +63 -34
  22. package/cjs/props.js.map +7 -0
  23. package/cjs/styled.js +112 -47
  24. package/cjs/styled.js.map +7 -0
  25. package/esm/Pagination.js +17 -23
  26. package/esm/Pagination.js.map +7 -0
  27. package/esm/PaginationDataTestID.js +8 -5
  28. package/esm/PaginationDataTestID.js.map +7 -0
  29. package/esm/hooks/usePaginationSearch.js +16 -13
  30. package/esm/hooks/usePaginationSearch.js.map +7 -0
  31. package/esm/index.d.js +2 -1
  32. package/esm/index.d.js.map +7 -0
  33. package/esm/index.js +3 -1
  34. package/esm/index.js.map +7 -0
  35. package/esm/parts/PageNextButton.js +23 -24
  36. package/esm/parts/PageNextButton.js.map +7 -0
  37. package/esm/parts/PagePrevButton.js +22 -23
  38. package/esm/parts/PagePrevButton.js.map +7 -0
  39. package/esm/parts/PaginationContent.js +62 -68
  40. package/esm/parts/PaginationContent.js.map +7 -0
  41. package/esm/parts/Paginator.js +76 -110
  42. package/esm/parts/Paginator.js.map +7 -0
  43. package/esm/parts/PerPageSelector.js +32 -49
  44. package/esm/parts/PerPageSelector.js.map +7 -0
  45. package/esm/props.js +34 -29
  46. package/esm/props.js.map +7 -0
  47. package/esm/styled.js +83 -33
  48. package/esm/styled.js.map +7 -0
  49. package/package.json +7 -7
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/parts/PerPageSelector.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport memoize from 'memoize-one';\nimport { range, useOnElementResize } from '@elliemae/ds-utilities';\nimport { DSDropdownMenuV2 } from '@elliemae/ds-dropdownmenu';\nimport { ChevronDown } from '@elliemae/ds-icons';\nimport { DSPaginationProps } from '../index.d';\nimport { PaginationDropdownButton } from '../styled';\n\nconst generateOption = (value) => {\n if (typeof value === 'object') {\n return value;\n }\n return {\n dsId: value.toString(),\n value,\n label: value.toString(),\n type: 'single',\n };\n};\n\nconst getOptions = memoize((step, min, max) => {\n const options = range(min, max + step, step).map(generateOption);\n return min === 0 ? options.slice(1, options.length) : options;\n});\n\nconst PerPageSelector: React.ComponentType<\n Pick<\n DSPaginationProps,\n 'pageSize' | 'onPageSizeChange' | 'perPageOptions' | 'perPageStep' | 'minPerPage' | 'maxPerPage'\n >\n> = (props) => {\n const [isOpened, setIsOpened] = useState(false);\n const { pageSize, onPageSizeChange, perPageOptions, maxPerPage, perPageStep, minPerPage } = props;\n\n const options = useMemo(() => {\n if (perPageOptions) return perPageOptions.map(generateOption);\n return getOptions(perPageStep, minPerPage, maxPerPage);\n }, [maxPerPage, minPerPage, perPageOptions, perPageStep]);\n\n const actionRef = useRef<Record<string, (dsId: string) => void>>({});\n const btnRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (isOpened) {\n actionRef.current.setActiveDescendant(pageSize.toString());\n actionRef.current.scrollOptionIntoView(pageSize.toString());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpened]);\n\n const { width } = useOnElementResize(btnRef);\n\n return (\n <DSDropdownMenuV2\n isOpened={isOpened}\n options={options}\n selectedOptions={{ [pageSize.toString()]: true }}\n onOptionClick={(_, clickedOption) => {\n onPageSizeChange(clickedOption.value);\n setIsOpened(false);\n btnRef.current.focus();\n }}\n onClickOutside={() => {\n setIsOpened(false);\n btnRef.current.focus();\n }}\n customOffset={[0, 2]}\n startPlacementPreference=\"top-end\"\n actionRef={actionRef}\n minWidth={width + 25}\n maxHeight={300}\n HeaderComp={() => 'Per Page'}\n >\n <div style={{ marginLeft: '32px' }}>\n <PaginationDropdownButton\n buttonType=\"raw\"\n onClick={() => setIsOpened(true)}\n aria-pressed={isOpened}\n innerRef={btnRef}\n >\n {pageSize} / page\n <ChevronDown color={['brand-primary', '700']} />\n </PaginationDropdownButton>\n </div>\n </DSDropdownMenuV2>\n );\n};\n\nexport default PerPageSelector;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA4D;AAC5D,yBAAoB;AACpB,0BAA0C;AAC1C,6BAAiC;AACjC,sBAA4B;AAE5B,oBAAyC;AAEzC,MAAM,iBAAiB,CAAC,UAAU;AAChC,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA;AAET,SAAO;AAAA,IACL,MAAM,MAAM;AAAA,IACZ;AAAA,IACA,OAAO,MAAM;AAAA,IACb,MAAM;AAAA;AAAA;AAIV,MAAM,aAAa,gCAAQ,CAAC,MAAM,KAAK,QAAQ;AAC7C,QAAM,UAAU,+BAAM,KAAK,MAAM,MAAM,MAAM,IAAI;AACjD,SAAO,QAAQ,IAAI,QAAQ,MAAM,GAAG,QAAQ,UAAU;AAAA;AAGxD,MAAM,kBAKF,CAAC,UAAU;AACb,QAAM,CAAC,UAAU,eAAe,2BAAS;AACzC,QAAM,EAAE,UAAU,kBAAkB,gBAAgB,YAAY,aAAa,eAAe;AAE5F,QAAM,UAAU,0BAAQ,MAAM;AAC5B,QAAI;AAAgB,aAAO,eAAe,IAAI;AAC9C,WAAO,WAAW,aAAa,YAAY;AAAA,KAC1C,CAAC,YAAY,YAAY,gBAAgB;AAE5C,QAAM,YAAY,yBAA+C;AACjE,QAAM,SAAS,yBAA0B;AAEzC,8BAAU,MAAM;AACd,QAAI,UAAU;AACZ,gBAAU,QAAQ,oBAAoB,SAAS;AAC/C,gBAAU,QAAQ,qBAAqB,SAAS;AAAA;AAAA,KAGjD,CAAC;AAEJ,QAAM,EAAE,UAAU,4CAAmB;AAErC,SACE,mDAAC,yCAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA,iBAAiB,GAAG,SAAS,aAAa;AAAA,IAC1C,eAAe,CAAC,GAAG,kBAAkB;AACnC,uBAAiB,cAAc;AAC/B,kBAAY;AACZ,aAAO,QAAQ;AAAA;AAAA,IAEjB,gBAAgB,MAAM;AACpB,kBAAY;AACZ,aAAO,QAAQ;AAAA;AAAA,IAEjB,cAAc,CAAC,GAAG;AAAA,IAClB,0BAAyB;AAAA,IACzB;AAAA,IACA,UAAU,QAAQ;AAAA,IAClB,WAAW;AAAA,IACX,YAAY,MAAM;AAAA,KAElB,mDAAC,OAAD;AAAA,IAAK,OAAO,EAAE,YAAY;AAAA,KACxB,mDAAC,wCAAD;AAAA,IACE,YAAW;AAAA,IACX,SAAS,MAAM,YAAY;AAAA,IAC3B,gBAAc;AAAA,IACd,UAAU;AAAA,KAET,UAAS,WACV,mDAAC,6BAAD;AAAA,IAAa,OAAO,CAAC,iBAAiB;AAAA;AAAA;AAOhD,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
package/cjs/props.js CHANGED
@@ -1,34 +1,64 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var reactDesc = require('react-desc');
6
-
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 });
11
+ };
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 props_exports = {};
29
+ __export(props_exports, {
30
+ defaultProps: () => defaultProps,
31
+ propTypes: () => propTypes
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_react_desc = require("react-desc");
7
35
  const emptyFunc = () => null;
8
-
9
36
  const propTypes = {
10
- pageCount: reactDesc.PropTypes.number.description('How many pages are there'),
11
- pageIndex: reactDesc.PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),
12
- canPreviousPage: reactDesc.PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),
13
- canNextPage: reactDesc.PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),
14
- pageSize: reactDesc.PropTypes.number.description('The current page size').defaultValue(10),
15
- showPerPageSelector: reactDesc.PropTypes.bool.description('Whether to show the page selector').defaultValue(true),
16
- perPageOptions: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.oneOfType([reactDesc.PropTypes.number, reactDesc.PropTypes.shape({
17
- dsId: reactDesc.PropTypes.string,
18
- value: reactDesc.PropTypes.number,
19
- label: reactDesc.PropTypes.string,
20
- type: reactDesc.PropTypes.oneOf(['single'])
21
- })])).description('The available options for page size').defaultValue([10]),
22
- perPageStep: reactDesc.PropTypes.number.description('Step for the per page options').defaultValue(5),
23
- minPerPage: reactDesc.PropTypes.number.description('Step for the per page options').defaultValue(0),
24
- maxPerPage: reactDesc.PropTypes.number.description('Step for the per page options').defaultValue(100),
25
- onPageSizeChange: reactDesc.PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),
26
- onPreviousPage: reactDesc.PropTypes.func.description('Function invoked when the previous button is pressed').defaultValue(() => null),
27
- onPageChange: reactDesc.PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),
28
- onNextPage: reactDesc.PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),
29
- pageDetails: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.string).description('Details to provide for each page').defaultValue([]),
30
- pageDetailsTitle: reactDesc.PropTypes.string.description('The title of the details (usually a column of your dataset)').defaultValue(''),
31
- width: reactDesc.PropTypes.any.description('Width for the container of the pagination').defaultValue('100%')
37
+ pageCount: import_react_desc.PropTypes.number.description("How many pages are there"),
38
+ pageIndex: import_react_desc.PropTypes.number.description("Index of the current page, starting from 1").defaultValue(1),
39
+ canPreviousPage: import_react_desc.PropTypes.bool.description("Whether the previous button is disabled or not").defaultValue(true),
40
+ canNextPage: import_react_desc.PropTypes.bool.description("Whether the next button is disabled or not").defaultValue(true),
41
+ pageSize: import_react_desc.PropTypes.number.description("The current page size").defaultValue(10),
42
+ showPerPageSelector: import_react_desc.PropTypes.bool.description("Whether to show the page selector").defaultValue(true),
43
+ perPageOptions: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.oneOfType([
44
+ import_react_desc.PropTypes.number,
45
+ import_react_desc.PropTypes.shape({
46
+ dsId: import_react_desc.PropTypes.string,
47
+ value: import_react_desc.PropTypes.number,
48
+ label: import_react_desc.PropTypes.string,
49
+ type: import_react_desc.PropTypes.oneOf(["single"])
50
+ })
51
+ ])).description("The available options for page size").defaultValue([10]),
52
+ perPageStep: import_react_desc.PropTypes.number.description("Step for the per page options").defaultValue(5),
53
+ minPerPage: import_react_desc.PropTypes.number.description("Step for the per page options").defaultValue(0),
54
+ maxPerPage: import_react_desc.PropTypes.number.description("Step for the per page options").defaultValue(100),
55
+ onPageSizeChange: import_react_desc.PropTypes.func.description("Function invoked when the page size changes").defaultValue(() => null),
56
+ onPreviousPage: import_react_desc.PropTypes.func.description("Function invoked when the previous button is pressed").defaultValue(() => null),
57
+ onPageChange: import_react_desc.PropTypes.func.description("Function invoked when the page changes").defaultValue(() => null),
58
+ onNextPage: import_react_desc.PropTypes.func.description("Function invoked when next button is pressed").defaultValue(() => null),
59
+ pageDetails: import_react_desc.PropTypes.arrayOf(import_react_desc.PropTypes.string).description("Details to provide for each page").defaultValue([]),
60
+ pageDetailsTitle: import_react_desc.PropTypes.string.description("The title of the details (usually a column of your dataset)").defaultValue(""),
61
+ width: import_react_desc.PropTypes.any.description("Width for the container of the pagination").defaultValue("100%")
32
62
  };
33
63
  const defaultProps = {
34
64
  pageIndex: 1,
@@ -45,9 +75,8 @@ const defaultProps = {
45
75
  onNextPage: emptyFunc,
46
76
  onPageChange: emptyFunc,
47
77
  pageDetails: [],
48
- pageDetailsTitle: '',
49
- width: '100%'
78
+ pageDetailsTitle: "",
79
+ width: "100%"
50
80
  };
51
-
52
- exports.defaultProps = defaultProps;
53
- exports.propTypes = propTypes;
81
+ module.exports = __toCommonJS(props_exports);
82
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { PropTypes } from 'react-desc';\n\nconst emptyFunc = (): void => null;\n\nexport const propTypes = {\n pageCount: PropTypes.number.description('How many pages are there'),\n pageIndex: PropTypes.number.description('Index of the current page, starting from 1').defaultValue(1),\n canPreviousPage: PropTypes.bool.description('Whether the previous button is disabled or not').defaultValue(true),\n canNextPage: PropTypes.bool.description('Whether the next button is disabled or not').defaultValue(true),\n pageSize: PropTypes.number.description('The current page size').defaultValue(10),\n showPerPageSelector: PropTypes.bool.description('Whether to show the page selector').defaultValue(true),\n perPageOptions: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.shape({\n dsId: PropTypes.string,\n value: PropTypes.number,\n label: PropTypes.string,\n type: PropTypes.oneOf(['single']),\n }),\n ]),\n )\n .description('The available options for page size')\n .defaultValue([10]),\n perPageStep: PropTypes.number.description('Step for the per page options').defaultValue(5),\n minPerPage: PropTypes.number.description('Step for the per page options').defaultValue(0),\n maxPerPage: PropTypes.number.description('Step for the per page options').defaultValue(100),\n onPageSizeChange: PropTypes.func.description('Function invoked when the page size changes').defaultValue(() => null),\n onPreviousPage: PropTypes.func\n .description('Function invoked when the previous button is pressed')\n .defaultValue(() => null),\n onPageChange: PropTypes.func.description('Function invoked when the page changes').defaultValue(() => null),\n onNextPage: PropTypes.func.description('Function invoked when next button is pressed').defaultValue(() => null),\n pageDetails: PropTypes.arrayOf(PropTypes.string).description('Details to provide for each page').defaultValue([]),\n pageDetailsTitle: PropTypes.string\n .description('The title of the details (usually a column of your dataset)')\n .defaultValue(''),\n width: PropTypes.any.description('Width for the container of the pagination').defaultValue('100%'),\n};\n\nexport const defaultProps = {\n pageIndex: 1,\n canPreviousPage: true,\n canNextPage: true,\n pageSize: 10,\n showPerPageSelector: true,\n perPageOptions: [10],\n perPageStep: 5,\n minPerPage: 0,\n maxPerPage: 100,\n onPageSizeChange: emptyFunc,\n onPreviousPage: emptyFunc,\n onNextPage: emptyFunc,\n onPageChange: emptyFunc,\n pageDetails: [],\n pageDetailsTitle: '',\n width: '100%',\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAE1B,MAAM,YAAY,MAAY;AAEvB,MAAM,YAAY;AAAA,EACvB,WAAW,4BAAU,OAAO,YAAY;AAAA,EACxC,WAAW,4BAAU,OAAO,YAAY,8CAA8C,aAAa;AAAA,EACnG,iBAAiB,4BAAU,KAAK,YAAY,kDAAkD,aAAa;AAAA,EAC3G,aAAa,4BAAU,KAAK,YAAY,8CAA8C,aAAa;AAAA,EACnG,UAAU,4BAAU,OAAO,YAAY,yBAAyB,aAAa;AAAA,EAC7E,qBAAqB,4BAAU,KAAK,YAAY,qCAAqC,aAAa;AAAA,EAClG,gBAAgB,4BAAU,QACxB,4BAAU,UAAU;AAAA,IAClB,4BAAU;AAAA,IACV,4BAAU,MAAM;AAAA,MACd,MAAM,4BAAU;AAAA,MAChB,OAAO,4BAAU;AAAA,MACjB,OAAO,4BAAU;AAAA,MACjB,MAAM,4BAAU,MAAM,CAAC;AAAA;AAAA,MAI1B,YAAY,uCACZ,aAAa,CAAC;AAAA,EACjB,aAAa,4BAAU,OAAO,YAAY,iCAAiC,aAAa;AAAA,EACxF,YAAY,4BAAU,OAAO,YAAY,iCAAiC,aAAa;AAAA,EACvF,YAAY,4BAAU,OAAO,YAAY,iCAAiC,aAAa;AAAA,EACvF,kBAAkB,4BAAU,KAAK,YAAY,+CAA+C,aAAa,MAAM;AAAA,EAC/G,gBAAgB,4BAAU,KACvB,YAAY,wDACZ,aAAa,MAAM;AAAA,EACtB,cAAc,4BAAU,KAAK,YAAY,0CAA0C,aAAa,MAAM;AAAA,EACtG,YAAY,4BAAU,KAAK,YAAY,gDAAgD,aAAa,MAAM;AAAA,EAC1G,aAAa,4BAAU,QAAQ,4BAAU,QAAQ,YAAY,oCAAoC,aAAa;AAAA,EAC9G,kBAAkB,4BAAU,OACzB,YAAY,+DACZ,aAAa;AAAA,EAChB,OAAO,4BAAU,IAAI,YAAY,6CAA6C,aAAa;AAAA;AAGtF,MAAM,eAAe;AAAA,EAC1B,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,gBAAgB,CAAC;AAAA,EACjB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,OAAO;AAAA;",
6
+ "names": []
7
+ }
package/cjs/styled.js CHANGED
@@ -1,48 +1,113 @@
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}");
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 });
22
11
  };
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;
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 = require("@elliemae/ds-grid");
39
+ var import_ds_button = require("@elliemae/ds-button");
40
+ var import_styled_components = __toESM(require("styled-components"));
41
+ var import_styled_components2 = 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.Grid)`
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.Grid)`
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
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/styled.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import { Grid } from '@elliemae/ds-grid';\nimport { DSButtonV2 } from '@elliemae/ds-button';\nimport styled from 'styled-components';\nimport { space, typography, TypographyProps } from '@xstyled/styled-components';\n\nconst sizeToCss = (size) => (typeof size === 'number' && !Number.isNaN(size) ? `${size}px` : size);\n\nconst styledFocusCss = ({ theme }) => `\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 ${theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n}`;\n\nexport const PaginationContainer = styled(Grid)`\n padding: 0 ${(props) => props.theme.space.xs};\n height: 42px;\n width: ${(props) => sizeToCss(props.width) || '100%'};\n max-width: 100%;\n align-items: center;\n box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.5);\n`;\n\nexport const PaginationWrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 0 32px;\n`;\n\nexport const PaginationSeparator = styled(Grid)`\n background-color: ${(props) => props.theme.colors.neutral[300]};\n width: 1px;\n height: ${(props) => props.height || '30px'};\n`;\n\nexport const PaginationBoldText = styled.span<TypographyProps>`\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n ${typography}\n ${space}\n position: relative;\n`;\n\nexport const PaginationDropdownButton = styled(DSButtonV2)`\n height: 42px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n padding-left: 16px;\n padding-right: 16px;\n grid-gap: 8px;\n font-size: 13px;\n color: ${(props) => props.theme.colors.neutral[700]};\n cursor: pointer;\n border-radius: 0;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n :focus {\n ${styledFocusCss}\n }\n`;\n\nexport const PreviousNextPageButton = styled(DSButtonV2)`\n height: 42px;\n display: grid;\n place-items: center;\n position: relative;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 0;\n cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};\n :focus {\n ${styledFocusCss}\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,qBAAqB;AACrB,uBAA2B;AAC3B,+BAAmB;AACnB,gCAAmD;AAEnD,MAAM,YAAY,CAAC,SAAU,OAAO,SAAS,YAAY,CAAC,OAAO,MAAM,QAAQ,GAAG,WAAW;AAE7F,MAAM,iBAAiB,CAAC,EAAE,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAShB,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAKlC,MAAM,sBAAsB,sCAAO;AAAA,eAC3B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,WAEjC,CAAC,UAAU,UAAU,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAMzC,MAAM,oBAAoB,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOjC,MAAM,sBAAsB,sCAAO;AAAA,sBACpB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,YAEhD,CAAC,UAAU,MAAM,UAAU;AAAA;AAGhC,MAAM,qBAAqB,iCAAO;AAAA,iBACxB,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,IAChD;AAAA,IACA;AAAA;AAAA;AAIG,MAAM,2BAA2B,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAUpC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,iBAGhC,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA,MAE9C;AAAA;AAAA;AAIC,MAAM,yBAAyB,sCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQjC,CAAC,UAAW,MAAM,WAAW,gBAAgB;AAAA;AAAA,MAEnD;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/esm/Pagination.js CHANGED
@@ -1,27 +1,21 @@
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 => {
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) => {
19
8
  const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
20
9
  useValidateTypescriptPropTypes(propsWithDefault, propTypes);
21
- return /*#__PURE__*/jsx(PaginationContent, _objectSpread({}, propsWithDefault));
10
+ return /* @__PURE__ */ React2.createElement(PaginationContent, {
11
+ ...propsWithDefault
12
+ });
22
13
  };
23
-
24
- const DSPaginationWithSchema = describe(DSPagination).description('DSPagination');
14
+ DSPagination.propTypes = propTypes;
15
+ const DSPaginationWithSchema = describe(DSPagination).description("DSPagination");
25
16
  DSPaginationWithSchema.propTypes = propTypes;
26
-
27
- export { DSPagination, DSPaginationWithSchema };
17
+ export {
18
+ DSPagination,
19
+ DSPaginationWithSchema
20
+ };
21
+ //# sourceMappingURL=Pagination.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/Pagination.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { describe } from 'react-desc';\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;\nconst DSPaginationWithSchema = describe(DSPagination).description('DSPagination');\nDSPaginationWithSchema.propTypes = propTypes;\n\nexport { DSPagination, DSPaginationWithSchema };\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAGA,MAAM,eAAuD,CAAC,UAAU;AACtE,QAAM,mBAAmB,6BAA6B,OAAO;AAC7D,iCAA+B,kBAAkB;AAEjD,SAAO,qCAAC,mBAAD;AAAA,OAAuB;AAAA;AAAA;AAGhC,aAAa,YAAY;AACzB,MAAM,yBAAyB,SAAS,cAAc,YAAY;AAClE,uBAAuB,YAAY;",
6
+ "names": []
7
+ }
@@ -1,7 +1,10 @@
1
+ import * as React from "react";
1
2
  const PAGINATION_DATA_TESTID = {
2
- PREVIOUS_BUTTON: 'data-table-pagination-prev-button',
3
- NEXT_BUTTON: 'data-table-pagination-next-button',
4
- CONTAINER: 'data-table-pagination-container'
3
+ PREVIOUS_BUTTON: "data-table-pagination-prev-button",
4
+ NEXT_BUTTON: "data-table-pagination-next-button",
5
+ CONTAINER: "data-table-pagination-container"
5
6
  };
6
-
7
- export { PAGINATION_DATA_TESTID };
7
+ export {
8
+ PAGINATION_DATA_TESTID
9
+ };
10
+ //# sourceMappingURL=PaginationDataTestID.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/PaginationDataTestID.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAO,MAAM,yBAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AAAA;",
6
+ "names": []
7
+ }
@@ -1,28 +1,31 @@
1
- import 'core-js/modules/web.dom-collections.iterator.js';
2
- import { useState, useRef, useEffect, useCallback } from 'react';
3
-
1
+ import * as React from "react";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
4
3
  const usePaginationSearch = (pageCount, actionRef) => {
5
- const [searchValue, setSearchValue] = useState('');
4
+ const [searchValue, setSearchValue] = useState("");
6
5
  const [shouldResetSearchValue, setShouldResetSearchValue] = useState(true);
7
6
  const timeoutRef = useRef(null);
8
7
  useEffect(() => {
9
- if (searchValue !== '' && Number.parseInt(searchValue, 10) <= pageCount) {
8
+ if (searchValue !== "" && Number.parseInt(searchValue, 10) <= pageCount) {
10
9
  actionRef.current.setActiveDescendant(searchValue);
11
10
  actionRef.current.scrollOptionIntoView(searchValue);
12
- } // eslint-disable-next-line react-hooks/exhaustive-deps
13
-
11
+ }
14
12
  }, [searchValue]);
15
- const onKeyDown = useCallback(e => {
16
- if (e.code.startsWith('Digit')) {
17
- if (shouldResetSearchValue) setSearchValue(e.key);else setSearchValue(prevValue => prevValue + e.key);
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);
18
19
  setShouldResetSearchValue(false);
19
20
  clearTimeout(timeoutRef.current);
20
21
  timeoutRef.current = setTimeout(() => {
21
22
  setShouldResetSearchValue(true);
22
- }, 1000);
23
+ }, 1e3);
23
24
  }
24
25
  }, [shouldResetSearchValue]);
25
26
  return onKeyDown;
26
27
  };
27
-
28
- export { usePaginationSearch };
28
+ export {
29
+ usePaginationSearch
30
+ };
31
+ //# sourceMappingURL=usePaginationSearch.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/hooks/usePaginationSearch.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,sBAAsB,CACjC,WACA,cAC+B;AAC/B,QAAM,CAAC,aAAa,kBAAkB,SAAS;AAC/C,QAAM,CAAC,wBAAwB,6BAA6B,SAAS;AAErE,QAAM,aAAa,OAAuB;AAE1C,YAAU,MAAM;AACd,QAAI,gBAAgB,MAAM,OAAO,SAAS,aAAa,OAAO,WAAW;AACvE,gBAAU,QAAQ,oBAAoB;AACtC,gBAAU,QAAQ,qBAAqB;AAAA;AAAA,KAGxC,CAAC;AAEJ,QAAM,YAAY,YAChB,CAAC,MAAM;AACL,QAAI,EAAE,KAAK,WAAW,UAAU;AAC9B,UAAI;AAAwB,uBAAe,EAAE;AAAA;AACxC,uBAAe,CAAC,cAAc,YAAY,EAAE;AAEjD,gCAA0B;AAC1B,mBAAa,WAAW;AACxB,iBAAW,UAAU,WAAW,MAAM;AACpC,kCAA0B;AAAA,SACzB;AAAA;AAAA,KAGP,CAAC;AAGH,SAAO;AAAA;",
6
+ "names": []
7
+ }
package/esm/index.d.js CHANGED
@@ -1 +1,2 @@
1
-
1
+ import * as React from "react";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "AAAA;",
6
+ "names": []
7
+ }
package/esm/index.js CHANGED
@@ -1 +1,3 @@
1
- export { DSPagination, DSPaginationWithSchema } from './Pagination.js';
1
+ import * as React from "react";
2
+ export * from "./Pagination";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './Pagination';\n"],
5
+ "mappings": "AAAA;ACAA;",
6
+ "names": []
7
+ }
@@ -1,25 +1,24 @@
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
- }));
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
23
23
  };
24
-
25
- export { PageNextButton };
24
+ //# sourceMappingURL=PageNextButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/PageNextButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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<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 >\n <ChevronRight color={canNextPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAGO,MAAM,iBAA6F,CAAC;AAAA,EACzG;AAAA,EACA;AAAA,MAEA,qCAAC,wBAAD;AAAA,EACE,SAAS,MAAM;AACb,QAAI;AAAa;AAAA;AAAA,EAEnB,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,uBAAuB;AAAA,EACpC,YAAY,MAAM;AAAA,GAElB,qCAAC,cAAD;AAAA,EAAc,OAAO,cAAc,CAAC,iBAAiB,SAAS,CAAC,WAAW;AAAA;",
6
+ "names": []
7
+ }
@@ -1,24 +1,23 @@
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
- }));
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
22
22
  };
23
-
24
- export { PagePrevButton };
23
+ //# sourceMappingURL=PagePrevButton.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/PagePrevButton.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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<Pick<DSPaginationProps, 'onPreviousPage' | 'canPreviousPage'>> = ({\n onPreviousPage,\n canPreviousPage,\n}) => (\n <PreviousNextPageButton\n onClick={() => {\n if (canPreviousPage) onPreviousPage();\n }}\n disabled={!canPreviousPage}\n buttonType=\"raw\"\n data-testid={PAGINATION_DATA_TESTID.PREVIOUS_BUTTON}\n >\n <ChevronLeft color={canPreviousPage ? ['brand-primary', '700'] : ['neutral', '500']} />\n </PreviousNextPageButton>\n);\n"],
5
+ "mappings": "AAAA;ACCA;AACA;AACA;AACA;AAGO,MAAM,iBAAqG,CAAC;AAAA,EACjH;AAAA,EACA;AAAA,MAEA,qCAAC,wBAAD;AAAA,EACE,SAAS,MAAM;AACb,QAAI;AAAiB;AAAA;AAAA,EAEvB,UAAU,CAAC;AAAA,EACX,YAAW;AAAA,EACX,eAAa,uBAAuB;AAAA,GAEpC,qCAAC,aAAD;AAAA,EAAa,OAAO,kBAAkB,CAAC,iBAAiB,SAAS,CAAC,WAAW;AAAA;",
6
+ "names": []
7
+ }