@availity/mui-button 1.1.4 → 2.0.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 +23 -0
- package/dist/index.d.mts +2 -9
- package/dist/index.d.ts +2 -9
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +8 -10
- package/src/lib/Button.tsx +3 -0
- package/src/lib/LoadingButton.tsx +6 -23
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [2.0.0](https://github.com/Availity/element/compare/@availity/mui-button@1.1.5...@availity/mui-button@2.0.0) (2025-11-17)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-layout` updated to version `1.1.5`
|
|
10
|
+
* `mui-icon` updated to version `1.1.5`
|
|
11
|
+
|
|
12
|
+
### ⚠ BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
* @mui/material upgraded to v7
|
|
15
|
+
* @mui/x-* upgraded to v8
|
|
16
|
+
* react upgraded to v19
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* upgrade material and react dependencies ([51602a4](https://github.com/Availity/element/commit/51602a48c5304db6f61e2c7e772c9a3a4aa3f65c))
|
|
21
|
+
|
|
22
|
+
## [1.1.5](https://github.com/Availity/element/compare/@availity/mui-button@1.1.4...@availity/mui-button@1.1.5) (2025-10-30)
|
|
23
|
+
|
|
24
|
+
### Dependency Updates
|
|
25
|
+
|
|
26
|
+
* `mui-layout` updated to version `1.1.4`
|
|
27
|
+
* `mui-icon` updated to version `1.1.4`
|
|
5
28
|
## [1.1.4](https://github.com/Availity/element/compare/@availity/mui-button@1.1.3...@availity/mui-button@1.1.4) (2025-04-30)
|
|
6
29
|
|
|
7
30
|
### Dependency Updates
|
package/dist/index.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ButtonGroupProps as ButtonGroupProps$1 } from '@mui/material/ButtonGroup';
|
|
5
5
|
import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
|
|
6
|
-
import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab/LoadingButton';
|
|
7
6
|
|
|
8
7
|
declare module '@mui/material/Button' {
|
|
9
8
|
interface ButtonPropsColorOverrides {
|
|
@@ -17,7 +16,7 @@ type ButtonProps = {
|
|
|
17
16
|
/** The size of the component.
|
|
18
17
|
* @default large */
|
|
19
18
|
size?: 'small' | 'medium' | 'large';
|
|
20
|
-
} & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
19
|
+
} & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'loading' | 'loadingIndicator' | 'loadingPosition' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
21
20
|
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
22
21
|
|
|
23
22
|
declare module '@mui/material/ButtonGroup' {
|
|
@@ -47,13 +46,7 @@ type IconButtonProps = {
|
|
|
47
46
|
} & Omit<IconButtonProps$1, 'aria-label' | 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
48
47
|
declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
49
48
|
|
|
50
|
-
type LoadingButtonProps =
|
|
51
|
-
children: React.ReactNode;
|
|
52
|
-
/**
|
|
53
|
-
* The color of the component.
|
|
54
|
-
*/
|
|
55
|
-
color?: 'primary' | 'secondary' | 'error';
|
|
56
|
-
} & Omit<LoadingButtonProps$1, 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef' | 'loadingIndicator' | 'loadingPosition'>;
|
|
49
|
+
type LoadingButtonProps = ButtonProps & Pick<ButtonProps$1, 'loading'>;
|
|
57
50
|
declare const LoadingButton: react.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
58
51
|
|
|
59
52
|
export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ButtonGroupProps as ButtonGroupProps$1 } from '@mui/material/ButtonGroup';
|
|
5
5
|
import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
|
|
6
|
-
import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab/LoadingButton';
|
|
7
6
|
|
|
8
7
|
declare module '@mui/material/Button' {
|
|
9
8
|
interface ButtonPropsColorOverrides {
|
|
@@ -17,7 +16,7 @@ type ButtonProps = {
|
|
|
17
16
|
/** The size of the component.
|
|
18
17
|
* @default large */
|
|
19
18
|
size?: 'small' | 'medium' | 'large';
|
|
20
|
-
} & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
19
|
+
} & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'loading' | 'loadingIndicator' | 'loadingPosition' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
21
20
|
declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
22
21
|
|
|
23
22
|
declare module '@mui/material/ButtonGroup' {
|
|
@@ -47,13 +46,7 @@ type IconButtonProps = {
|
|
|
47
46
|
} & Omit<IconButtonProps$1, 'aria-label' | 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
48
47
|
declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
49
48
|
|
|
50
|
-
type LoadingButtonProps =
|
|
51
|
-
children: React.ReactNode;
|
|
52
|
-
/**
|
|
53
|
-
* The color of the component.
|
|
54
|
-
*/
|
|
55
|
-
color?: 'primary' | 'secondary' | 'error';
|
|
56
|
-
} & Omit<LoadingButtonProps$1, 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef' | 'loadingIndicator' | 'loadingPosition'>;
|
|
49
|
+
type LoadingButtonProps = ButtonProps & Pick<ButtonProps$1, 'loading'>;
|
|
57
50
|
declare const LoadingButton: react.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
58
51
|
|
|
59
52
|
export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
|
package/dist/index.js
CHANGED
|
@@ -108,17 +108,17 @@ var IconButton = (0, import_react2.forwardRef)((props, ref) => {
|
|
|
108
108
|
|
|
109
109
|
// src/lib/LoadingButton.tsx
|
|
110
110
|
var import_react3 = require("react");
|
|
111
|
-
var
|
|
111
|
+
var import_Button2 = __toESM(require("@mui/material/Button"));
|
|
112
112
|
var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
|
|
113
113
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
114
114
|
var LoadingIndicator = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_CircularProgress.default, { color: "inherit", size: 16, "aria-label": "loading" });
|
|
115
115
|
var LoadingButton = (0, import_react3.forwardRef)((props, ref) => {
|
|
116
|
-
const _a = props, { children, loading } = _a, rest = __objRest(_a, ["children", "loading"]);
|
|
116
|
+
const _a = props, { children, loading = false } = _a, rest = __objRest(_a, ["children", "loading"]);
|
|
117
117
|
const loadingPosition = rest.startIcon ? "start" : "end";
|
|
118
118
|
const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: "0 .7rem" };
|
|
119
119
|
const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: loading ? { padding: "0 .7rem" } : {} });
|
|
120
120
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
121
|
-
|
|
121
|
+
import_Button2.default,
|
|
122
122
|
__spreadProps(__spreadValues({
|
|
123
123
|
endIcon,
|
|
124
124
|
loadingPosition,
|
package/dist/index.mjs
CHANGED
|
@@ -72,17 +72,17 @@ var IconButton = forwardRef2((props, ref) => {
|
|
|
72
72
|
|
|
73
73
|
// src/lib/LoadingButton.tsx
|
|
74
74
|
import { forwardRef as forwardRef3 } from "react";
|
|
75
|
-
import
|
|
75
|
+
import MUIButton2 from "@mui/material/Button";
|
|
76
76
|
import CircularProgress from "@mui/material/CircularProgress";
|
|
77
77
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
78
78
|
var LoadingIndicator = /* @__PURE__ */ jsx4(CircularProgress, { color: "inherit", size: 16, "aria-label": "loading" });
|
|
79
79
|
var LoadingButton = forwardRef3((props, ref) => {
|
|
80
|
-
const _a = props, { children, loading } = _a, rest = __objRest(_a, ["children", "loading"]);
|
|
80
|
+
const _a = props, { children, loading = false } = _a, rest = __objRest(_a, ["children", "loading"]);
|
|
81
81
|
const loadingPosition = rest.startIcon ? "start" : "end";
|
|
82
82
|
const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: "0 .7rem" };
|
|
83
83
|
const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ jsx4("span", { style: loading ? { padding: "0 .7rem" } : {} });
|
|
84
84
|
return /* @__PURE__ */ jsx4(
|
|
85
|
-
|
|
85
|
+
MUIButton2,
|
|
86
86
|
__spreadProps(__spreadValues({
|
|
87
87
|
endIcon,
|
|
88
88
|
loadingPosition,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-button",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Availity MUI Button Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,21 +40,19 @@
|
|
|
40
40
|
"publish": "yarn npm publish --tolerate-republish --access public",
|
|
41
41
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
42
42
|
},
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@mui/lab": "6.0.0-beta.12"
|
|
45
|
-
},
|
|
46
43
|
"devDependencies": {
|
|
47
|
-
"@mui/material": "^
|
|
48
|
-
"react": "
|
|
49
|
-
"react-dom": "
|
|
44
|
+
"@mui/material": "^7.3.4",
|
|
45
|
+
"react": "19.2.0",
|
|
46
|
+
"react-dom": "19.2.0",
|
|
50
47
|
"tsup": "^8.4.0",
|
|
51
48
|
"typescript": "^5.4.5"
|
|
52
49
|
},
|
|
53
50
|
"peerDependencies": {
|
|
54
|
-
"@mui/material": "^
|
|
55
|
-
"react": ">=
|
|
51
|
+
"@mui/material": "^7.0.0",
|
|
52
|
+
"react": ">=17.0.0"
|
|
56
53
|
},
|
|
57
54
|
"publishConfig": {
|
|
58
55
|
"access": "public"
|
|
59
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"sideEffects": false
|
|
60
58
|
}
|
package/src/lib/Button.tsx
CHANGED
|
@@ -1,38 +1,21 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import MUIButton, { ButtonProps as MuiButtonProps } from '@mui/material/Button';
|
|
3
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
4
|
+
import { ButtonProps } from './Button';
|
|
4
5
|
|
|
5
|
-
export type LoadingButtonProps =
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* The color of the component.
|
|
9
|
-
*/
|
|
10
|
-
color?: 'primary' | 'secondary' | 'error';
|
|
11
|
-
} & Omit<
|
|
12
|
-
MuiLoadingButtonProps,
|
|
13
|
-
| 'color'
|
|
14
|
-
| 'centerRipple'
|
|
15
|
-
| 'disableRipple'
|
|
16
|
-
| 'disableTouchRipple'
|
|
17
|
-
| 'focusRipple'
|
|
18
|
-
| 'disableFocusRipple'
|
|
19
|
-
| 'TouchRippleProps'
|
|
20
|
-
| 'touchRippleRef'
|
|
21
|
-
| 'loadingIndicator'
|
|
22
|
-
| 'loadingPosition'
|
|
23
|
-
>;
|
|
6
|
+
export type LoadingButtonProps = ButtonProps & Pick<MuiButtonProps, 'loading'>
|
|
24
7
|
|
|
25
8
|
const LoadingIndicator = <CircularProgress color="inherit" size={16} aria-label="loading" />;
|
|
26
9
|
|
|
27
10
|
export const LoadingButton = forwardRef<HTMLButtonElement, LoadingButtonProps>((props, ref) => {
|
|
28
|
-
const { children, loading, ...rest } = props;
|
|
11
|
+
const { children, loading = false, ...rest } = props;
|
|
29
12
|
//changing default loading button behavior to add end loading icon instead of replacing contents completely with icon
|
|
30
13
|
const loadingPosition = rest.startIcon ? 'start' : 'end';
|
|
31
14
|
const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: '0 .7rem' };
|
|
32
15
|
const endIcon = rest.startIcon ? undefined : <span style={loading ? { padding: '0 .7rem' } : {}}></span>;
|
|
33
16
|
|
|
34
17
|
return (
|
|
35
|
-
<
|
|
18
|
+
<MUIButton
|
|
36
19
|
endIcon={endIcon}
|
|
37
20
|
loadingPosition={loadingPosition}
|
|
38
21
|
loading={loading}
|
|
@@ -42,6 +25,6 @@ export const LoadingButton = forwardRef<HTMLButtonElement, LoadingButtonProps>((
|
|
|
42
25
|
ref={ref}
|
|
43
26
|
>
|
|
44
27
|
<span style={nonLoadingStyling}>{children}</span>
|
|
45
|
-
</
|
|
28
|
+
</MUIButton>
|
|
46
29
|
);
|
|
47
30
|
});
|