@availity/mui-table 1.0.0-alpha.0 → 1.0.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/CHANGELOG.md +43 -0
- package/introduction.mdx +3 -0
- package/package.json +15 -15
- package/tsconfig.spec.json +1 -1
- package/src/lib/TablePaginationCOPY.tsx +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.0.1](https://github.com/Availity/element/compare/@availity/mui-table@1.0.0...@availity/mui-table@1.0.1) (2025-03-07)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-button` updated to version `1.0.0`
|
|
10
|
+
* `mui-chip` updated to version `1.0.0`
|
|
11
|
+
* `mui-form-utils` updated to version `1.0.0`
|
|
12
|
+
* `mui-icon` updated to version `1.0.0`
|
|
13
|
+
* `mui-layout` updated to version `1.0.0`
|
|
14
|
+
* `mui-link` updated to version `1.0.0`
|
|
15
|
+
* `mui-menu` updated to version `1.0.0`
|
|
16
|
+
* `mui-paper` updated to version `1.0.0`
|
|
17
|
+
* `mui-textfield` updated to version `1.0.0`
|
|
18
|
+
* `mui-typography` updated to version `1.0.0`
|
|
19
|
+
* `mui-pagination` updated to version `1.0.0`
|
|
20
|
+
* `mui-utils` updated to version `1.0.0`
|
|
21
|
+
* `mui-transitions` updated to version `1.0.0`
|
|
22
|
+
## [1.0.0](https://github.com/Availity/element/compare/@availity/mui-table@1.0.0-alpha.0...@availity/mui-table@1.0.0) (2025-02-25)
|
|
23
|
+
|
|
24
|
+
### Dependency Updates
|
|
25
|
+
|
|
26
|
+
* `mui-button` updated to version `0.3.4`
|
|
27
|
+
* `mui-chip` updated to version `0.3.4`
|
|
28
|
+
* `mui-form-utils` updated to version `0.3.4`
|
|
29
|
+
* `mui-icon` updated to version `0.3.4`
|
|
30
|
+
* `mui-layout` updated to version `0.3.4`
|
|
31
|
+
* `mui-link` updated to version `0.3.4`
|
|
32
|
+
* `mui-menu` updated to version `0.3.4`
|
|
33
|
+
* `mui-paper` updated to version `0.3.4`
|
|
34
|
+
* `mui-textfield` updated to version `0.3.4`
|
|
35
|
+
* `mui-typography` updated to version `0.3.4`
|
|
36
|
+
* `mui-pagination` updated to version `0.3.4`
|
|
37
|
+
* `mui-utils` updated to version `0.3.4`
|
|
38
|
+
* `mui-transitions` updated to version `0.3.4`
|
|
39
|
+
|
|
40
|
+
### ⚠ BREAKING CHANGES
|
|
41
|
+
|
|
42
|
+
* upgrade to @mui/material v6
|
|
43
|
+
|
|
44
|
+
### Miscellaneous Chores
|
|
45
|
+
|
|
46
|
+
* element v1 release ([a6e3567](https://github.com/Availity/element/commit/a6e35671185b9f13d25c7a39c4488ecb8774633e))
|
|
47
|
+
|
|
5
48
|
## [1.0.0-alpha.0](https://github.com/Availity/element/compare/@availity/mui-table@0.3.4...@availity/mui-table@1.0.0-alpha.0) (2025-02-24)
|
|
6
49
|
|
|
7
50
|
|
package/introduction.mdx
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Markdown } from '@storybook/blocks';
|
|
2
2
|
import { Meta } from '@storybook/addon-docs';
|
|
3
3
|
import ReadMe from './README.md?raw';
|
|
4
|
+
import CHANGELOG from './CHANGELOG.md?raw';
|
|
4
5
|
|
|
5
6
|
<Meta title="Components/Table/Introduction" />
|
|
6
7
|
|
|
7
8
|
<Markdown>{ReadMe}</Markdown>
|
|
9
|
+
|
|
10
|
+
<Markdown>{CHANGELOG}</Markdown>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-table",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Availity MUI Table Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,22 +41,22 @@
|
|
|
41
41
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@availity/mui-form-utils": "1.0.
|
|
45
|
-
"@availity/mui-icon": "1.0.
|
|
46
|
-
"@availity/mui-pagination": "1.0.
|
|
47
|
-
"@availity/mui-utils": "1.0.
|
|
44
|
+
"@availity/mui-form-utils": "1.0.1",
|
|
45
|
+
"@availity/mui-icon": "1.0.1",
|
|
46
|
+
"@availity/mui-pagination": "1.0.1",
|
|
47
|
+
"@availity/mui-utils": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@availity/mui-button": "1.0.
|
|
51
|
-
"@availity/mui-chip": "1.0.
|
|
52
|
-
"@availity/mui-form-utils": "1.0.
|
|
53
|
-
"@availity/mui-icon": "1.0.
|
|
54
|
-
"@availity/mui-layout": "^1.0.
|
|
55
|
-
"@availity/mui-link": "1.0.
|
|
56
|
-
"@availity/mui-menu": "1.0.
|
|
57
|
-
"@availity/mui-paper": "1.0.
|
|
58
|
-
"@availity/mui-textfield": "1.0.
|
|
59
|
-
"@availity/mui-typography": "1.0.
|
|
50
|
+
"@availity/mui-button": "1.0.1",
|
|
51
|
+
"@availity/mui-chip": "1.0.1",
|
|
52
|
+
"@availity/mui-form-utils": "1.0.1",
|
|
53
|
+
"@availity/mui-icon": "1.0.1",
|
|
54
|
+
"@availity/mui-layout": "^1.0.1",
|
|
55
|
+
"@availity/mui-link": "1.0.1",
|
|
56
|
+
"@availity/mui-menu": "1.0.1",
|
|
57
|
+
"@availity/mui-paper": "1.0.1",
|
|
58
|
+
"@availity/mui-textfield": "1.0.1",
|
|
59
|
+
"@availity/mui-typography": "1.0.1",
|
|
60
60
|
"@mui/material": "^6.4.5",
|
|
61
61
|
"react": "18.2.0",
|
|
62
62
|
"react-dom": "18.2.0",
|
package/tsconfig.spec.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ElementType, forwardRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
default as MuiTablePagination,
|
|
4
|
-
TablePaginationProps as MuiTablePaginationProps,
|
|
5
|
-
} from '@mui/material/TablePagination';
|
|
6
|
-
import { TableCellBaseProps } from '@mui/material/TableCell';
|
|
7
|
-
import { Pagination, PaginationProps } from '@availity/mui-pagination';
|
|
8
|
-
import { SelectAccessibilityOverrides } from '@availity/mui-form-utils';
|
|
9
|
-
|
|
10
|
-
export type TablePaginationProps = {
|
|
11
|
-
Actions?: React.ReactNode;
|
|
12
|
-
component?: ElementType<TableCellBaseProps>;
|
|
13
|
-
/** Props applied to the `Pagination` actions element */
|
|
14
|
-
paginationProps?: PaginationProps;
|
|
15
|
-
} & Omit<
|
|
16
|
-
MuiTablePaginationProps,
|
|
17
|
-
| 'ActionsComponent'
|
|
18
|
-
| 'backIconButtonProps'
|
|
19
|
-
| 'nextIconButtonProps'
|
|
20
|
-
| 'getItemArialabel'
|
|
21
|
-
| 'labelDisplayedRows'
|
|
22
|
-
| 'labelRowsPerPage'
|
|
23
|
-
| 'SelectProps'
|
|
24
|
-
| 'showFirstButton'
|
|
25
|
-
| 'showLastButton'
|
|
26
|
-
| 'slotProps'
|
|
27
|
-
| 'slots'
|
|
28
|
-
>;
|
|
29
|
-
|
|
30
|
-
type TablePaginationActionsProps = {
|
|
31
|
-
count: number | 'Infinity';
|
|
32
|
-
page: number;
|
|
33
|
-
rowsPerPage: number;
|
|
34
|
-
onPageChange: (event: React.MouseEvent<HTMLButtonElement>, newPage: number) => void;
|
|
35
|
-
} & Pick<MuiTablePaginationProps, 'backIconButtonProps' | 'nextIconButtonProps'>;
|
|
36
|
-
|
|
37
|
-
export const TablePagination = forwardRef<unknown, TablePaginationProps>((props, ref) => {
|
|
38
|
-
const { Actions, paginationProps, ...rest } = props;
|
|
39
|
-
const [ open, setOpen ] = useState(false);
|
|
40
|
-
|
|
41
|
-
const ActionsPagination = (props: TablePaginationActionsProps): JSX.Element => {
|
|
42
|
-
const { count, page, rowsPerPage, onPageChange, backIconButtonProps, nextIconButtonProps, ...rest } = props;
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<>
|
|
46
|
-
{typeof count === 'number' && count / rowsPerPage > 1 ? (
|
|
47
|
-
<Pagination
|
|
48
|
-
{...rest}
|
|
49
|
-
{...paginationProps}
|
|
50
|
-
count={Math.ceil(Math.abs(count / rowsPerPage))}
|
|
51
|
-
page={(page as number) + 1}
|
|
52
|
-
onChange={(event: React.MouseEvent<HTMLButtonElement>, newPage) => {
|
|
53
|
-
onPageChange(event, newPage - 1);
|
|
54
|
-
}}
|
|
55
|
-
/>
|
|
56
|
-
) : null}
|
|
57
|
-
{Actions || null}
|
|
58
|
-
</>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
return <MuiTablePagination ActionsComponent={ActionsPagination} {...rest} slotProps={{select: {...SelectAccessibilityOverrides(open, setOpen)}}} ref={ref} />;
|
|
63
|
-
});
|