@elliemae/ds-pagination 2.2.0 → 2.3.0-alpha.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.
- package/cjs/Pagination.js +49 -35
- package/cjs/Pagination.js.map +7 -0
- package/cjs/PaginationDataTestID.js +37 -9
- package/cjs/PaginationDataTestID.js.map +7 -0
- package/cjs/hooks/usePaginationSearch.js +48 -20
- package/cjs/hooks/usePaginationSearch.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +28 -10
- package/cjs/index.js.map +7 -0
- package/cjs/parts/PageNextButton.js +52 -32
- package/cjs/parts/PageNextButton.js.map +7 -0
- package/cjs/parts/PagePrevButton.js +51 -31
- package/cjs/parts/PagePrevButton.js.map +7 -0
- package/cjs/parts/PaginationContent.js +91 -77
- package/cjs/parts/PaginationContent.js.map +7 -0
- package/cjs/parts/Paginator.js +112 -124
- package/cjs/parts/Paginator.js.map +7 -0
- package/cjs/parts/PerPageSelector.js +68 -63
- package/cjs/parts/PerPageSelector.js.map +7 -0
- package/cjs/props.js +63 -34
- package/cjs/props.js.map +7 -0
- package/cjs/styled.js +112 -47
- package/cjs/styled.js.map +7 -0
- package/esm/Pagination.js +17 -23
- package/esm/Pagination.js.map +7 -0
- package/esm/PaginationDataTestID.js +8 -5
- package/esm/PaginationDataTestID.js.map +7 -0
- package/esm/hooks/usePaginationSearch.js +16 -13
- package/esm/hooks/usePaginationSearch.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +3 -1
- package/esm/index.js.map +7 -0
- package/esm/parts/PageNextButton.js +23 -24
- package/esm/parts/PageNextButton.js.map +7 -0
- package/esm/parts/PagePrevButton.js +22 -23
- package/esm/parts/PagePrevButton.js.map +7 -0
- package/esm/parts/PaginationContent.js +62 -68
- package/esm/parts/PaginationContent.js.map +7 -0
- package/esm/parts/Paginator.js +76 -110
- package/esm/parts/Paginator.js.map +7 -0
- package/esm/parts/PerPageSelector.js +32 -49
- package/esm/parts/PerPageSelector.js.map +7 -0
- package/esm/props.js +34 -29
- package/esm/props.js.map +7 -0
- package/esm/styled.js +83 -33
- package/esm/styled.js.map +7 -0
- package/package.json +7 -7
package/esm/styled.js
CHANGED
|
@@ -1,34 +1,84 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const sizeToCss = size => typeof size ===
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Grid } from "@elliemae/ds-grid";
|
|
3
|
+
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { space, typography } from "@xstyled/styled-components";
|
|
6
|
+
const sizeToCss = (size) => typeof size === "number" && !Number.isNaN(size) ? `${size}px` : size;
|
|
7
|
+
const styledFocusCss = ({ theme }) => `
|
|
8
|
+
&:after {
|
|
9
|
+
display: block;
|
|
10
|
+
content: ' ';
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
bottom: 0;
|
|
16
|
+
border: 2px solid ${theme.colors.brand[700]};
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
z-index: 7;
|
|
19
|
+
}`;
|
|
20
|
+
const PaginationContainer = styled(Grid)`
|
|
21
|
+
padding: 0 ${(props) => props.theme.space.xs};
|
|
22
|
+
height: 42px;
|
|
23
|
+
width: ${(props) => sizeToCss(props.width) || "100%"};
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
align-items: center;
|
|
26
|
+
box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.5);
|
|
27
|
+
`;
|
|
28
|
+
const PaginationWrapper = styled.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
margin: 0 32px;
|
|
33
|
+
`;
|
|
34
|
+
const PaginationSeparator = styled(Grid)`
|
|
35
|
+
background-color: ${(props) => props.theme.colors.neutral[300]};
|
|
36
|
+
width: 1px;
|
|
37
|
+
height: ${(props) => props.height || "30px"};
|
|
38
|
+
`;
|
|
39
|
+
const PaginationBoldText = styled.span`
|
|
40
|
+
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
41
|
+
${typography}
|
|
42
|
+
${space}
|
|
43
|
+
position: relative;
|
|
44
|
+
`;
|
|
45
|
+
const PaginationDropdownButton = styled(DSButtonV2)`
|
|
46
|
+
height: 42px;
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
position: relative;
|
|
51
|
+
padding-left: 16px;
|
|
52
|
+
padding-right: 16px;
|
|
53
|
+
grid-gap: 8px;
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
color: ${(props) => props.theme.colors.neutral[700]};
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
border-radius: 0;
|
|
58
|
+
font-weight: ${(props) => props.theme.fontWeights.regular};
|
|
59
|
+
:focus {
|
|
60
|
+
${styledFocusCss}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
const PreviousNextPageButton = styled(DSButtonV2)`
|
|
64
|
+
height: 42px;
|
|
65
|
+
display: grid;
|
|
66
|
+
place-items: center;
|
|
67
|
+
position: relative;
|
|
68
|
+
padding-left: 8px;
|
|
69
|
+
padding-right: 8px;
|
|
70
|
+
border-radius: 0;
|
|
71
|
+
cursor: ${(props) => props.disabled ? "not-allowed" : "pointer"};
|
|
72
|
+
:focus {
|
|
73
|
+
${styledFocusCss}
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
export {
|
|
77
|
+
PaginationBoldText,
|
|
78
|
+
PaginationContainer,
|
|
79
|
+
PaginationDropdownButton,
|
|
80
|
+
PaginationSeparator,
|
|
81
|
+
PaginationWrapper,
|
|
82
|
+
PreviousNextPageButton
|
|
13
83
|
};
|
|
14
|
-
|
|
15
|
-
const PaginationContainer = /*#__PURE__*/styled(Grid).withConfig({
|
|
16
|
-
componentId: "sc-mxz59e-0"
|
|
17
|
-
})(["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%');
|
|
18
|
-
const PaginationWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
19
|
-
componentId: "sc-mxz59e-1"
|
|
20
|
-
})(["display:flex;justify-content:center;align-items:center;margin:0 32px;"]);
|
|
21
|
-
const PaginationSeparator = /*#__PURE__*/styled(Grid).withConfig({
|
|
22
|
-
componentId: "sc-mxz59e-2"
|
|
23
|
-
})(["background-color:", ";width:1px;height:", ";"], props => props.theme.colors.neutral[300], props => props.height || '30px');
|
|
24
|
-
const PaginationBoldText = /*#__PURE__*/styled.span.withConfig({
|
|
25
|
-
componentId: "sc-mxz59e-3"
|
|
26
|
-
})(["font-weight:", ";", " ", " position:relative;"], props => props.theme.fontWeights.semibold, typography, space);
|
|
27
|
-
const PaginationDropdownButton = /*#__PURE__*/styled(DSButtonV2).withConfig({
|
|
28
|
-
componentId: "sc-mxz59e-4"
|
|
29
|
-
})(["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);
|
|
30
|
-
const PreviousNextPageButton = /*#__PURE__*/styled(DSButtonV2).withConfig({
|
|
31
|
-
componentId: "sc-mxz59e-5"
|
|
32
|
-
})(["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);
|
|
33
|
-
|
|
34
|
-
export { PaginationBoldText, PaginationContainer, PaginationDropdownButton, PaginationSeparator, PaginationWrapper, PreviousNextPageButton };
|
|
84
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/styled.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,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,OAAO;AAAA,eAC3B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,WAEjC,CAAC,UAAU,UAAU,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAMzC,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOjC,MAAM,sBAAsB,OAAO;AAAA,sBACpB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA,YAEhD,CAAC,UAAU,MAAM,UAAU;AAAA;AAGhC,MAAM,qBAAqB,OAAO;AAAA,iBACxB,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,IAChD;AAAA,IACA;AAAA;AAAA;AAIG,MAAM,2BAA2B,OAAO;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,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQjC,CAAC,UAAW,MAAM,WAAW,gBAAgB;AAAA;AAAA,MAEnD;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pagination",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Pagination",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
"build": "node ../../scripts/build/build.js"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@elliemae/ds-button": "2.
|
|
76
|
-
"@elliemae/ds-dropdownmenu": "2.
|
|
77
|
-
"@elliemae/ds-grid": "2.
|
|
78
|
-
"@elliemae/ds-icons": "2.
|
|
79
|
-
"@elliemae/ds-props-helpers": "2.
|
|
80
|
-
"@elliemae/ds-utilities": "2.
|
|
75
|
+
"@elliemae/ds-button": "2.3.0-alpha.3",
|
|
76
|
+
"@elliemae/ds-dropdownmenu": "2.3.0-alpha.3",
|
|
77
|
+
"@elliemae/ds-grid": "2.3.0-alpha.3",
|
|
78
|
+
"@elliemae/ds-icons": "2.3.0-alpha.3",
|
|
79
|
+
"@elliemae/ds-props-helpers": "2.3.0-alpha.3",
|
|
80
|
+
"@elliemae/ds-utilities": "2.3.0-alpha.3",
|
|
81
81
|
"memoize-one": "~5.1.1",
|
|
82
82
|
"react-desc": "~4.1.3"
|
|
83
83
|
},
|