@elliemae/ds-pagination 3.0.0-alpha.0 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Pagination.js +16 -5
- package/dist/cjs/Pagination.js.map +2 -2
- package/dist/cjs/index.d.js.map +1 -1
- package/dist/cjs/parts/PageNextButton.js.map +2 -2
- package/dist/cjs/parts/PagePrevButton.js +1 -4
- package/dist/cjs/parts/PagePrevButton.js.map +2 -2
- package/dist/cjs/parts/PaginationContent.js +69 -50
- package/dist/cjs/parts/PaginationContent.js.map +2 -2
- package/dist/cjs/parts/Paginator.js +28 -11
- package/dist/cjs/parts/Paginator.js.map +2 -2
- package/dist/cjs/parts/PerPageSelector.js +3 -3
- package/dist/cjs/parts/PerPageSelector.js.map +2 -2
- package/dist/cjs/props.js +24 -24
- package/dist/cjs/props.js.map +2 -2
- package/dist/cjs/styled.js +35 -18
- package/dist/cjs/styled.js.map +2 -2
- package/dist/esm/Pagination.js +18 -5
- package/dist/esm/Pagination.js.map +2 -2
- package/dist/esm/parts/PageNextButton.js.map +2 -2
- package/dist/esm/parts/PagePrevButton.js +1 -4
- package/dist/esm/parts/PagePrevButton.js.map +2 -2
- package/dist/esm/parts/PaginationContent.js +71 -50
- package/dist/esm/parts/PaginationContent.js.map +2 -2
- package/dist/esm/parts/Paginator.js +35 -13
- package/dist/esm/parts/Paginator.js.map +2 -2
- package/dist/esm/parts/PerPageSelector.js +3 -3
- package/dist/esm/parts/PerPageSelector.js.map +2 -2
- package/dist/esm/props.js +1 -1
- package/dist/esm/props.js.map +2 -2
- package/dist/esm/styled.js +41 -19
- package/dist/esm/styled.js.map +2 -2
- package/package.json +9 -7
- package/dist/types/Pagination.d.ts +0 -5
- package/dist/types/PaginationDataTestID.d.ts +0 -5
- package/dist/types/hooks/usePaginationSearch.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/parts/PageNextButton.d.ts +0 -3
- package/dist/types/parts/PagePrevButton.d.ts +0 -3
- package/dist/types/parts/PaginationContent.d.ts +0 -3
- package/dist/types/parts/Paginator.d.ts +0 -4
- package/dist/types/parts/PerPageSelector.d.ts +0 -4
- package/dist/types/props.d.ts +0 -75
package/dist/esm/styled.js
CHANGED
|
@@ -2,25 +2,29 @@ import * as React from "react";
|
|
|
2
2
|
import { Grid } from "@elliemae/ds-grid";
|
|
3
3
|
import { DSButtonV2 } from "@elliemae/ds-button";
|
|
4
4
|
import styled from "styled-components";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
import {
|
|
6
|
+
space,
|
|
7
|
+
typography,
|
|
8
|
+
sizing,
|
|
9
|
+
layout
|
|
10
|
+
} from "@xstyled/styled-components";
|
|
11
|
+
import { css } from "@elliemae/ds-system";
|
|
12
|
+
const styledFocusCss = css`
|
|
13
|
+
&:after {
|
|
14
|
+
display: block;
|
|
15
|
+
content: ' ';
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
right: 0;
|
|
20
|
+
bottom: 0;
|
|
21
|
+
border: 2px solid ${({ theme }) => theme.colors.brand[700]};
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
z-index: 7;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
20
26
|
const PaginationContainer = styled(Grid)`
|
|
21
|
-
padding: 0 ${(props) => props.theme.space.xs};
|
|
22
27
|
height: 42px;
|
|
23
|
-
width: ${(props) => sizeToCss(props.width) || "100%"};
|
|
24
28
|
max-width: 100%;
|
|
25
29
|
align-items: center;
|
|
26
30
|
box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.5);
|
|
@@ -29,7 +33,6 @@ const PaginationWrapper = styled.div`
|
|
|
29
33
|
display: flex;
|
|
30
34
|
justify-content: center;
|
|
31
35
|
align-items: center;
|
|
32
|
-
margin: 0 32px;
|
|
33
36
|
`;
|
|
34
37
|
const PaginationSeparator = styled(Grid)`
|
|
35
38
|
background-color: ${(props) => props.theme.colors.neutral[300]};
|
|
@@ -40,11 +43,27 @@ const PaginationBoldText = styled.span`
|
|
|
40
43
|
font-weight: ${(props) => props.theme.fontWeights.semibold};
|
|
41
44
|
${typography}
|
|
42
45
|
${space}
|
|
46
|
+
${sizing}
|
|
47
|
+
${layout}
|
|
43
48
|
position: relative;
|
|
44
49
|
`;
|
|
50
|
+
const InvisibleDetail = styled.div`
|
|
51
|
+
opacity: 0;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
text-overflow: ellipsis;
|
|
55
|
+
position: absolute;
|
|
56
|
+
`;
|
|
57
|
+
const PaginationDetail = styled.span`
|
|
58
|
+
text-align: left;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
`;
|
|
45
63
|
const PaginationDropdownButton = styled(DSButtonV2)`
|
|
46
64
|
height: 42px;
|
|
47
|
-
display:
|
|
65
|
+
display: grid;
|
|
66
|
+
grid-auto-flow: column;
|
|
48
67
|
justify-content: center;
|
|
49
68
|
align-items: center;
|
|
50
69
|
position: relative;
|
|
@@ -59,6 +78,7 @@ const PaginationDropdownButton = styled(DSButtonV2)`
|
|
|
59
78
|
:focus {
|
|
60
79
|
${styledFocusCss}
|
|
61
80
|
}
|
|
81
|
+
white-space: nowrap;
|
|
62
82
|
`;
|
|
63
83
|
const PreviousNextPageButton = styled(DSButtonV2)`
|
|
64
84
|
height: 42px;
|
|
@@ -74,8 +94,10 @@ const PreviousNextPageButton = styled(DSButtonV2)`
|
|
|
74
94
|
}
|
|
75
95
|
`;
|
|
76
96
|
export {
|
|
97
|
+
InvisibleDetail,
|
|
77
98
|
PaginationBoldText,
|
|
78
99
|
PaginationContainer,
|
|
100
|
+
PaginationDetail,
|
|
79
101
|
PaginationDropdownButton,
|
|
80
102
|
PaginationSeparator,
|
|
81
103
|
PaginationWrapper,
|
package/dist/esm/styled.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 {
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,
|
|
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 {\n space,\n typography,\n TypographyProps,\n SpaceProps,\n sizing,\n SizingProps,\n layout,\n LayoutProps,\n} from '@xstyled/styled-components';\nimport { css } from '@elliemae/ds-system';\n\nconst styledFocusCss = css`\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 }) => theme.colors.brand[700]};\n pointer-events: none;\n z-index: 7;\n }\n`;\n\nexport const PaginationContainer = styled(Grid)`\n height: 42px;\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`;\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 & SpaceProps & SizingProps & LayoutProps>`\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n ${typography}\n ${space}\n ${sizing}\n ${layout}\n position: relative;\n`;\n\nexport const InvisibleDetail = styled.div`\n opacity: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n position: absolute;\n`;\n\nexport const PaginationDetail = styled.span`\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const PaginationDropdownButton = styled(DSButtonV2)`\n height: 42px;\n display: grid;\n grid-auto-flow: column;\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 white-space: nowrap;\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AAEA,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASC,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMnD,MAAM,sBAAsB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOnC,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAMjC,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,IACA;AAAA,IACA;AAAA;AAAA;AAIG,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ/B,MAAM,mBAAmB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOhC,MAAM,2BAA2B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAWpC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA,iBAGhC,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA;AAAA,MAE9C;AAAA;AAAA;AAAA;AAKC,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQjC,CAAC,UAAW,MAAM,WAAW,gBAAgB;AAAA;AAAA,MAEnD;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-pagination",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Pagination",
|
|
6
6
|
"files": [
|
|
@@ -75,12 +75,13 @@
|
|
|
75
75
|
"indent": 4
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@elliemae/ds-button": "3.0.0-alpha.
|
|
79
|
-
"@elliemae/ds-dropdownmenu": "3.0.0-alpha.
|
|
80
|
-
"@elliemae/ds-grid": "3.0.0-alpha.
|
|
81
|
-
"@elliemae/ds-icons": "3.0.0-alpha.
|
|
82
|
-
"@elliemae/ds-props-helpers": "3.0.0-alpha.
|
|
83
|
-
"@elliemae/ds-
|
|
78
|
+
"@elliemae/ds-button": "3.0.0-alpha.1",
|
|
79
|
+
"@elliemae/ds-dropdownmenu": "3.0.0-alpha.1",
|
|
80
|
+
"@elliemae/ds-grid": "3.0.0-alpha.1",
|
|
81
|
+
"@elliemae/ds-icons": "3.0.0-alpha.1",
|
|
82
|
+
"@elliemae/ds-props-helpers": "3.0.0-alpha.1",
|
|
83
|
+
"@elliemae/ds-truncated-tooltip-text": "3.0.0-alpha.1",
|
|
84
|
+
"@elliemae/ds-utilities": "3.0.0-alpha.1",
|
|
84
85
|
"memoize-one": "~5.1.1",
|
|
85
86
|
"react-desc": "~4.1.3"
|
|
86
87
|
},
|
|
@@ -103,6 +104,7 @@
|
|
|
103
104
|
"dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
|
|
104
105
|
"test": "node ../../scripts/testing/test.mjs",
|
|
105
106
|
"lint": "node ../../scripts/lint.mjs",
|
|
107
|
+
"dts": "node ../../scripts/dts.mjs",
|
|
106
108
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
|
|
107
109
|
}
|
|
108
110
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const usePaginationSearch: (pageCount: number, actionRef: React.MutableRefObject<any>) => React.KeyboardEventHandler;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Pagination';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DSPaginationProps } from '../index.d';
|
|
3
|
-
declare const PerPageSelector: React.ComponentType<Pick<DSPaginationProps, 'pageSize' | 'onPageSizeChange' | 'perPageOptions' | 'perPageStep' | 'minPerPage' | 'maxPerPage'>>;
|
|
4
|
-
export default PerPageSelector;
|
package/dist/types/props.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../../../shared/typings/react-desc.d.ts" />
|
|
2
|
-
export declare const propTypes: {
|
|
3
|
-
pageCount: {
|
|
4
|
-
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
5
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
6
|
-
};
|
|
7
|
-
isRequired: import("react-desc").PropTypesDescValue;
|
|
8
|
-
};
|
|
9
|
-
pageIndex: {
|
|
10
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
|
-
};
|
|
12
|
-
canPreviousPage: {
|
|
13
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
|
-
};
|
|
15
|
-
canNextPage: {
|
|
16
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
|
-
};
|
|
18
|
-
pageSize: {
|
|
19
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
20
|
-
};
|
|
21
|
-
showPerPageSelector: {
|
|
22
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
|
-
};
|
|
24
|
-
perPageOptions: {
|
|
25
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
26
|
-
};
|
|
27
|
-
perPageStep: {
|
|
28
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
29
|
-
};
|
|
30
|
-
minPerPage: {
|
|
31
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
32
|
-
};
|
|
33
|
-
maxPerPage: {
|
|
34
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
35
|
-
};
|
|
36
|
-
onPageSizeChange: {
|
|
37
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
38
|
-
};
|
|
39
|
-
onPreviousPage: {
|
|
40
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
41
|
-
};
|
|
42
|
-
onPageChange: {
|
|
43
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
44
|
-
};
|
|
45
|
-
onNextPage: {
|
|
46
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
47
|
-
};
|
|
48
|
-
pageDetails: {
|
|
49
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
50
|
-
};
|
|
51
|
-
pageDetailsTitle: {
|
|
52
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
53
|
-
};
|
|
54
|
-
width: {
|
|
55
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export declare const defaultProps: {
|
|
59
|
-
pageIndex: number;
|
|
60
|
-
canPreviousPage: boolean;
|
|
61
|
-
canNextPage: boolean;
|
|
62
|
-
pageSize: number;
|
|
63
|
-
showPerPageSelector: boolean;
|
|
64
|
-
perPageOptions: number[];
|
|
65
|
-
perPageStep: number;
|
|
66
|
-
minPerPage: number;
|
|
67
|
-
maxPerPage: number;
|
|
68
|
-
onPageSizeChange: () => void;
|
|
69
|
-
onPreviousPage: () => void;
|
|
70
|
-
onNextPage: () => void;
|
|
71
|
-
onPageChange: () => void;
|
|
72
|
-
pageDetails: never[];
|
|
73
|
-
pageDetailsTitle: string;
|
|
74
|
-
width: string;
|
|
75
|
-
};
|