@availity/mui-pagination 0.1.0 → 0.2.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 CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.2.0](https://github.com/Availity/element/compare/@availity/mui-pagination@0.1.1...@availity/mui-pagination@0.2.0) (2023-09-13)
6
+
7
+
8
+ ### Features
9
+
10
+ * **mui-pagination:** limit sizes ([77adde6](https://github.com/Availity/element/commit/77adde654bee70d006787a451f9b031e96f2a580))
11
+
12
+ ## [0.1.1](https://github.com/Availity/element/compare/@availity/mui-pagination@0.1.0...@availity/mui-pagination@0.1.1) (2023-09-11)
13
+
5
14
  ## 0.1.0 (2023-09-11)
6
15
 
7
16
 
package/dist/index.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { PaginationProps as PaginationProps$1, PaginationItemProps as PaginationItemProps$1 } from '@mui/material';
2
2
 
3
- type PaginationProps = Omit<PaginationProps$1, 'color' | 'shape' | 'renderItem'>;
3
+ type PaginationProps = {
4
+ /** The size of the component
5
+ * @default 'determined by theme' */
6
+ size?: 'medium' | 'large';
7
+ } & Omit<PaginationProps$1, 'color' | 'getItemAriaLabel' | 'renderItem' | 'shape' | 'size'>;
4
8
  declare const Pagination: ({ ...rest }: PaginationProps) => JSX.Element;
5
9
 
6
- type PaginationItemProps = Omit<PaginationItemProps$1, 'components' | 'color' | 'shape'>;
10
+ type PaginationItemProps = Omit<PaginationItemProps$1, 'components' | 'color' | 'shape' | 'size'>;
7
11
  declare const PaginationItem: (props: PaginationItemProps) => JSX.Element;
8
12
 
9
13
  export { Pagination, PaginationItem, PaginationItemProps, PaginationProps };
package/dist/index.mjs CHANGED
@@ -1,7 +1,5 @@
1
1
  // src/lib/Pagination.tsx
2
- import {
3
- Pagination as MuiPagination
4
- } from "@mui/material";
2
+ import { Pagination as MuiPagination } from "@mui/material";
5
3
 
6
4
  // src/lib/PaginationItem.tsx
7
5
  import { PaginationItem as MuiPaginationItem } from "@mui/material";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-pagination",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Availity MUI Pagination Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -11,13 +11,6 @@ const meta: Meta<typeof Pagination> = {
11
11
  args: {
12
12
  count: 10,
13
13
  },
14
- argTypes: {
15
- size: {
16
- table: {
17
- defaultValue: { summary: `determined by Theme` },
18
- },
19
- },
20
- },
21
14
  };
22
15
 
23
16
  export default meta;
@@ -33,13 +26,13 @@ export const _Variants: StoryObj<typeof Pagination> = {
33
26
  Text
34
27
  </Grid>
35
28
  <Grid item xs={10}>
36
- <Pagination variant="text" count={10} />
29
+ <Pagination variant="text" count={10} aria-label="text pagination" />
37
30
  </Grid>
38
31
  <Grid item xs={2}>
39
32
  Outlined
40
33
  </Grid>
41
34
  <Grid item xs={10}>
42
- <Pagination variant="outlined" count={10} />
35
+ <Pagination variant="outlined" count={10} aria-label="outlined pagination" />
43
36
  </Grid>
44
37
  </Grid>
45
38
  ),
@@ -54,6 +47,7 @@ export const _FirstLast: StoryObj<typeof Pagination> = {
54
47
  <Grid item xs={10}>
55
48
  <Pagination
56
49
  variant="text"
50
+ aria-label="text pagination"
57
51
  count={10}
58
52
  boundaryCount={0}
59
53
  hideNextButton
@@ -68,6 +62,7 @@ export const _FirstLast: StoryObj<typeof Pagination> = {
68
62
  <Grid item xs={10}>
69
63
  <Pagination
70
64
  variant="outlined"
65
+ aria-label="outlined pagination"
71
66
  count={10}
72
67
  boundaryCount={0}
73
68
  hideNextButton
@@ -1,11 +1,11 @@
1
- import {
2
- Pagination as MuiPagination,
3
- PaginationProps as MuiPaginationProps,
4
- PaginationPropsSizeOverrides,
5
- } from '@mui/material';
1
+ import { Pagination as MuiPagination, PaginationProps as MuiPaginationProps } from '@mui/material';
6
2
  import { PaginationItem } from './PaginationItem';
7
3
 
8
- export type PaginationProps = Omit<MuiPaginationProps, 'color' | 'shape' | 'renderItem'>;
4
+ export type PaginationProps = {
5
+ /** The size of the component
6
+ * @default 'determined by theme' */
7
+ size?: 'medium' | 'large';
8
+ } & Omit<MuiPaginationProps, 'color' | 'getItemAriaLabel' | 'renderItem' | 'shape' | 'size'>;
9
9
 
10
10
  export const Pagination = ({ ...rest }: PaginationProps): JSX.Element => {
11
11
  return <MuiPagination {...rest} renderItem={(item) => <PaginationItem {...item} />} />;
@@ -11,13 +11,6 @@ const meta: Meta<typeof PaginationItem> = {
11
11
  args: {
12
12
  type: 'next',
13
13
  },
14
- argTypes: {
15
- size: {
16
- table: {
17
- defaultValue: { summary: `determined by Theme` },
18
- },
19
- },
20
- },
21
14
  };
22
15
 
23
16
  export default meta;
@@ -1,7 +1,7 @@
1
1
  import { PaginationItem as MuiPaginationItem, PaginationItemProps as MuiPaginationItemProps } from '@mui/material';
2
2
  import { NavigateNextIcon, NavigatePreviousIcon } from '@availity/mui-icon';
3
3
 
4
- export type PaginationItemProps = Omit<MuiPaginationItemProps, 'components' | 'color' | 'shape'>;
4
+ export type PaginationItemProps = Omit<MuiPaginationItemProps, 'components' | 'color' | 'shape' | 'size'>;
5
5
 
6
6
  const slots = {
7
7
  first: () => (