@availity/mui-pagination 0.4.1 → 1.0.0-alpha.0
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/CHANGELOG.md +21 -0
- package/dist/index.js +4 -5
- package/dist/index.mjs +1 -2
- package/package.json +13 -6
- package/src/lib/Pagination.stories.tsx +9 -17
- package/src/lib/PaginationItem.stories.tsx +15 -19
- package/src/lib/ResourcePagination.tsx +1 -0
- /package/{introduction.stories.mdx → introduction.mdx} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.0.0-alpha.0](https://github.com/Availity/element/compare/@availity/mui-pagination@0.4.2...@availity/mui-pagination@1.0.0-alpha.0) (2025-02-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ⚠ BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
* upgraded to @mui/material v6
|
|
11
|
+
* **element:** upgraded to @mui/material v6
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **element:** upgrade to @mui/material v6 ([cb958bb](https://github.com/Availity/element/commit/cb958bba99a4f1ee6dab323f0ff54b69e6fd3493))
|
|
16
|
+
* upgrade @mui/material ([571453a](https://github.com/Availity/element/commit/571453a34b21c344594ab4c03bc497d19aba942b))
|
|
17
|
+
* upgrade to MUI v6 ([7febd6f](https://github.com/Availity/element/commit/7febd6fd4fd58e87e1c97a832cea3b4595a35d58))
|
|
18
|
+
|
|
19
|
+
## [0.4.2](https://github.com/Availity/element/compare/@availity/mui-pagination@0.4.1...@availity/mui-pagination@0.4.2) (2025-02-24)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **mui-pagination:** add react-query peer dependency ([39ae736](https://github.com/Availity/element/commit/39ae736a8a9a2a9529691f4edb841f2c774262c7))
|
|
25
|
+
|
|
5
26
|
## [0.4.1](https://github.com/Availity/element/compare/@availity/mui-pagination@0.4.0...@availity/mui-pagination@0.4.1) (2025-02-06)
|
|
6
27
|
|
|
7
28
|
|
package/dist/index.js
CHANGED
|
@@ -45,12 +45,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
45
45
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
46
|
|
|
47
47
|
// src/index.ts
|
|
48
|
-
var
|
|
49
|
-
__export(
|
|
48
|
+
var index_exports = {};
|
|
49
|
+
__export(index_exports, {
|
|
50
50
|
Pagination: () => Pagination,
|
|
51
51
|
PaginationItem: () => PaginationItem
|
|
52
52
|
});
|
|
53
|
-
module.exports = __toCommonJS(
|
|
53
|
+
module.exports = __toCommonJS(index_exports);
|
|
54
54
|
|
|
55
55
|
// src/lib/Pagination.tsx
|
|
56
56
|
var import_Pagination = __toESM(require("@mui/material/Pagination"));
|
|
@@ -84,8 +84,7 @@ var PaginationItem = (props) => {
|
|
|
84
84
|
// src/lib/Pagination.tsx
|
|
85
85
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
86
86
|
var getItemAriaLabel = (type, page) => {
|
|
87
|
-
if (type === "page")
|
|
88
|
-
return `Go to page ${page}`;
|
|
87
|
+
if (type === "page") return `Go to page ${page}`;
|
|
89
88
|
return `Go to ${type} page`;
|
|
90
89
|
};
|
|
91
90
|
var Pagination = (props) => {
|
package/dist/index.mjs
CHANGED
|
@@ -52,8 +52,7 @@ var PaginationItem = (props) => {
|
|
|
52
52
|
// src/lib/Pagination.tsx
|
|
53
53
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
54
54
|
var getItemAriaLabel = (type, page) => {
|
|
55
|
-
if (type === "page")
|
|
56
|
-
return `Go to page ${page}`;
|
|
55
|
+
if (type === "page") return `Go to page ${page}`;
|
|
57
56
|
return `Go to ${type} page`;
|
|
58
57
|
};
|
|
59
58
|
var Pagination = (props) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-pagination",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.0",
|
|
4
4
|
"description": "Availity MUI Pagination Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,18 +40,25 @@
|
|
|
40
40
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@availity/mui-icon": "0.
|
|
44
|
-
"@mui/material": "^
|
|
43
|
+
"@availity/mui-icon": "1.0.0-alpha.0",
|
|
44
|
+
"@mui/material": "^6.4.5",
|
|
45
|
+
"@tanstack/react-query": "^4.36.1",
|
|
45
46
|
"react": "18.2.0",
|
|
46
47
|
"react-dom": "18.2.0",
|
|
47
|
-
"tsup": "^8.
|
|
48
|
+
"tsup": "^8.3.6",
|
|
48
49
|
"typescript": "^5.4.5"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
|
-
"@availity/mui-icon": "0.
|
|
52
|
-
"@mui/material": "^
|
|
52
|
+
"@availity/mui-icon": "1.0.0-alpha.0",
|
|
53
|
+
"@mui/material": "^6.4.5",
|
|
54
|
+
"@tanstack/react-query": "^4.36.1",
|
|
53
55
|
"react": ">=16.3.0"
|
|
54
56
|
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"@tanstack/react-query": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
55
62
|
"publishConfig": {
|
|
56
63
|
"access": "public"
|
|
57
64
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Each exported component in the package should have its own stories file
|
|
2
2
|
|
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
-
import Grid from '@mui
|
|
4
|
+
import { Grid } from '@availity/mui-layout';
|
|
5
5
|
import { Pagination, PaginationProps } from './Pagination';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof Pagination> = {
|
|
@@ -22,16 +22,12 @@ export const _Pagination: StoryObj<typeof Pagination> = {
|
|
|
22
22
|
export const _Variants: StoryObj<typeof Pagination> = {
|
|
23
23
|
render: () => (
|
|
24
24
|
<Grid container spacing={1}>
|
|
25
|
-
<Grid
|
|
26
|
-
|
|
27
|
-
</Grid>
|
|
28
|
-
<Grid item xs={10}>
|
|
25
|
+
<Grid size={{ xs: 2 }}>Text</Grid>
|
|
26
|
+
<Grid size={{ xs: 10 }}>
|
|
29
27
|
<Pagination variant="text" count={10} aria-label="text pagination" />
|
|
30
28
|
</Grid>
|
|
31
|
-
<Grid
|
|
32
|
-
|
|
33
|
-
</Grid>
|
|
34
|
-
<Grid item xs={10}>
|
|
29
|
+
<Grid size={{ xs: 2 }}>Outlined</Grid>
|
|
30
|
+
<Grid size={{ xs: 10 }}>
|
|
35
31
|
<Pagination variant="outlined" count={10} aria-label="outlined pagination" />
|
|
36
32
|
</Grid>
|
|
37
33
|
</Grid>
|
|
@@ -41,10 +37,8 @@ export const _Variants: StoryObj<typeof Pagination> = {
|
|
|
41
37
|
export const _FirstLast: StoryObj<typeof Pagination> = {
|
|
42
38
|
render: () => (
|
|
43
39
|
<Grid container spacing={1}>
|
|
44
|
-
<Grid
|
|
45
|
-
|
|
46
|
-
</Grid>
|
|
47
|
-
<Grid item xs={10}>
|
|
40
|
+
<Grid size={{ xs: 2 }}>Text</Grid>
|
|
41
|
+
<Grid size={{ xs: 10 }}>
|
|
48
42
|
<Pagination
|
|
49
43
|
variant="text"
|
|
50
44
|
aria-label="text pagination"
|
|
@@ -56,10 +50,8 @@ export const _FirstLast: StoryObj<typeof Pagination> = {
|
|
|
56
50
|
showLastButton
|
|
57
51
|
/>
|
|
58
52
|
</Grid>
|
|
59
|
-
<Grid
|
|
60
|
-
|
|
61
|
-
</Grid>
|
|
62
|
-
<Grid item xs={10}>
|
|
53
|
+
<Grid size={{ xs: 2 }}>Outlined</Grid>
|
|
54
|
+
<Grid size={{ xs: 10 }}>
|
|
63
55
|
<Pagination
|
|
64
56
|
variant="outlined"
|
|
65
57
|
aria-label="outlined pagination"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Each exported component in the package should have its own stories file
|
|
2
2
|
|
|
3
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
-
import Grid from '@mui
|
|
4
|
+
import { Grid } from '@availity/mui-layout';
|
|
5
5
|
import { PaginationItem, PaginationItemProps } from './PaginationItem';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof PaginationItem> = {
|
|
@@ -22,46 +22,42 @@ export const _PaginationItem: StoryObj<typeof PaginationItem> = {
|
|
|
22
22
|
export const _Types: StoryObj<typeof PaginationItem> = {
|
|
23
23
|
render: () => (
|
|
24
24
|
<Grid container spacing={1}>
|
|
25
|
-
<Grid
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<Grid item xs={9}>
|
|
29
|
-
Outlined
|
|
30
|
-
</Grid>
|
|
31
|
-
<Grid item xs={3}>
|
|
25
|
+
<Grid size={{ xs: 3 }}>Text</Grid>
|
|
26
|
+
<Grid size={{ xs: 9 }}>Outlined</Grid>
|
|
27
|
+
<Grid size={{ xs: 3 }}>
|
|
32
28
|
<PaginationItem variant="text" type="page" page="1" selected />
|
|
33
29
|
</Grid>
|
|
34
|
-
<Grid
|
|
30
|
+
<Grid size={{ xs: 9 }}>
|
|
35
31
|
<PaginationItem variant="outlined" type="page" page="1" selected />
|
|
36
32
|
</Grid>
|
|
37
|
-
<Grid
|
|
33
|
+
<Grid size={{ xs: 3 }}>
|
|
38
34
|
<PaginationItem variant="text" type="page" page="1" />
|
|
39
35
|
</Grid>
|
|
40
|
-
<Grid
|
|
36
|
+
<Grid size={{ xs: 9 }}>
|
|
41
37
|
<PaginationItem variant="outlined" type="page" page="1" />
|
|
42
38
|
</Grid>
|
|
43
|
-
<Grid
|
|
39
|
+
<Grid size={{ xs: 3 }}>
|
|
44
40
|
<PaginationItem variant="text" type="first" />
|
|
45
41
|
</Grid>
|
|
46
|
-
<Grid
|
|
42
|
+
<Grid size={{ xs: 9 }}>
|
|
47
43
|
<PaginationItem variant="outlined" type="first" />
|
|
48
44
|
</Grid>
|
|
49
|
-
<Grid
|
|
45
|
+
<Grid size={{ xs: 3 }}>
|
|
50
46
|
<PaginationItem variant="text" type="previous" />
|
|
51
47
|
</Grid>
|
|
52
|
-
<Grid
|
|
48
|
+
<Grid size={{ xs: 9 }}>
|
|
53
49
|
<PaginationItem variant="outlined" type="previous" />
|
|
54
50
|
</Grid>
|
|
55
|
-
<Grid
|
|
51
|
+
<Grid size={{ xs: 3 }}>
|
|
56
52
|
<PaginationItem variant="text" type="next" />
|
|
57
53
|
</Grid>
|
|
58
|
-
<Grid
|
|
54
|
+
<Grid size={{ xs: 9 }}>
|
|
59
55
|
<PaginationItem variant="outlined" type="next" />
|
|
60
56
|
</Grid>
|
|
61
|
-
<Grid
|
|
57
|
+
<Grid size={{ xs: 3 }}>
|
|
62
58
|
<PaginationItem variant="text" type="last" />
|
|
63
59
|
</Grid>
|
|
64
|
-
<Grid
|
|
60
|
+
<Grid size={{ xs: 9 }}>
|
|
65
61
|
<PaginationItem variant="outlined" type="last" />
|
|
66
62
|
</Grid>
|
|
67
63
|
</Grid>
|
|
File without changes
|