@availity/mui-button 1.1.2 → 1.1.3

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,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.1.3](https://github.com/Availity/element/compare/@availity/mui-button@1.1.2...@availity/mui-button@1.1.3) (2025-04-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **mui-button:** add buttongroup export ([c2bccd0](https://github.com/Availity/element/commit/c2bccd0727ce55bde320f3c6f921ca2a6df60f2e))
11
+
5
12
  ## [1.1.2](https://github.com/Availity/element/compare/@availity/mui-button@1.1.1...@availity/mui-button@1.1.2) (2025-04-14)
6
13
 
7
14
  ## [1.1.1](https://github.com/Availity/element/compare/@availity/mui-button@1.1.0...@availity/mui-button@1.1.1) (2025-04-11)
package/dist/index.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { ButtonGroupProps as ButtonGroupProps$1 } from '@mui/material/ButtonGroup';
3
5
  import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
4
6
  import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab/LoadingButton';
5
7
 
@@ -18,6 +20,14 @@ type ButtonProps = {
18
20
  } & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
19
21
  declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
20
22
 
23
+ declare module '@mui/material/ButtonGroup' {
24
+ interface ButtonGroupPropsColorOverrides {
25
+ tertiary: true;
26
+ }
27
+ }
28
+ type ButtonGroupProps = Omit<ButtonGroupProps$1, 'color' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'variant'>;
29
+ declare const ButtonGroup: (props: ButtonGroupProps) => react_jsx_runtime.JSX.Element;
30
+
21
31
  type IconButtonProps = {
22
32
  /**
23
33
  * Text for tooltip and aria-label
@@ -46,4 +56,4 @@ type LoadingButtonProps = {
46
56
  } & Omit<LoadingButtonProps$1, 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef' | 'loadingIndicator' | 'loadingPosition'>;
47
57
  declare const LoadingButton: react.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
48
58
 
49
- export { Button, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
59
+ export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { ButtonGroupProps as ButtonGroupProps$1 } from '@mui/material/ButtonGroup';
3
5
  import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
4
6
  import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab/LoadingButton';
5
7
 
@@ -18,6 +20,14 @@ type ButtonProps = {
18
20
  } & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
19
21
  declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
20
22
 
23
+ declare module '@mui/material/ButtonGroup' {
24
+ interface ButtonGroupPropsColorOverrides {
25
+ tertiary: true;
26
+ }
27
+ }
28
+ type ButtonGroupProps = Omit<ButtonGroupProps$1, 'color' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'variant'>;
29
+ declare const ButtonGroup: (props: ButtonGroupProps) => react_jsx_runtime.JSX.Element;
30
+
21
31
  type IconButtonProps = {
22
32
  /**
23
33
  * Text for tooltip and aria-label
@@ -46,4 +56,4 @@ type LoadingButtonProps = {
46
56
  } & Omit<LoadingButtonProps$1, 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef' | 'loadingIndicator' | 'loadingPosition'>;
47
57
  declare const LoadingButton: react.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
48
58
 
49
- export { Button, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
59
+ export { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
package/dist/index.js CHANGED
@@ -60,6 +60,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
60
60
  var index_exports = {};
61
61
  __export(index_exports, {
62
62
  Button: () => Button,
63
+ ButtonGroup: () => ButtonGroup,
63
64
  IconButton: () => IconButton,
64
65
  LoadingButton: () => LoadingButton
65
66
  });
@@ -78,11 +79,23 @@ var Button = (0, import_react.forwardRef)((props, ref) => {
78
79
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, __spreadProps(__spreadValues(__spreadValues({}, props), overrideProps), { ref }));
79
80
  });
80
81
 
82
+ // src/lib/ButtonGroup.tsx
83
+ var import_ButtonGroup = __toESM(require("@mui/material/ButtonGroup"));
84
+ var import_jsx_runtime2 = require("react/jsx-runtime");
85
+ var overrideProps2 = {
86
+ disableElevation: true,
87
+ disableFocusRipple: true,
88
+ disableRipple: true
89
+ };
90
+ var ButtonGroup = (props) => {
91
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ButtonGroup.default, __spreadProps(__spreadValues(__spreadValues({}, props), overrideProps2), { variant: "contained", color: "tertiary" }));
92
+ };
93
+
81
94
  // src/lib/IconButton.tsx
82
95
  var import_react2 = require("react");
83
96
  var import_IconButton = __toESM(require("@mui/material/IconButton"));
84
97
  var import_Tooltip = __toESM(require("@mui/material/Tooltip"));
85
- var import_jsx_runtime2 = require("react/jsx-runtime");
98
+ var import_jsx_runtime3 = require("react/jsx-runtime");
86
99
  var outlinedStyles = {
87
100
  borderRadius: ".25rem",
88
101
  border: 1
@@ -90,21 +103,21 @@ var outlinedStyles = {
90
103
  var IconButton = (0, import_react2.forwardRef)((props, ref) => {
91
104
  const _a = props, { title, variant = "text", sx, size = "medium" } = _a, rest = __objRest(_a, ["title", "variant", "sx", "size"]);
92
105
  const styles = __spreadValues(__spreadValues({}, sx), variant === "outlined" && outlinedStyles);
93
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Tooltip.default, { title, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_IconButton.default, __spreadProps(__spreadValues({ "aria-label": title, sx: __spreadValues({}, styles) }, rest), { ref, size })) });
106
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Tooltip.default, { title, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_IconButton.default, __spreadProps(__spreadValues({ "aria-label": title, sx: __spreadValues({}, styles) }, rest), { ref, size })) });
94
107
  });
95
108
 
96
109
  // src/lib/LoadingButton.tsx
97
110
  var import_react3 = require("react");
98
111
  var import_LoadingButton = __toESM(require("@mui/lab/LoadingButton"));
99
112
  var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
100
- var import_jsx_runtime3 = require("react/jsx-runtime");
101
- var LoadingIndicator = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_CircularProgress.default, { color: "inherit", size: 16, "aria-label": "loading" });
113
+ var import_jsx_runtime4 = require("react/jsx-runtime");
114
+ var LoadingIndicator = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_CircularProgress.default, { color: "inherit", size: 16, "aria-label": "loading" });
102
115
  var LoadingButton = (0, import_react3.forwardRef)((props, ref) => {
103
116
  const _a = props, { children, loading } = _a, rest = __objRest(_a, ["children", "loading"]);
104
117
  const loadingPosition = rest.startIcon ? "start" : "end";
105
118
  const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: "0 .7rem" };
106
- const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: loading ? { padding: "0 .7rem" } : {} });
107
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
119
+ const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: loading ? { padding: "0 .7rem" } : {} });
120
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
108
121
  import_LoadingButton.default,
109
122
  __spreadProps(__spreadValues({
110
123
  endIcon,
@@ -114,13 +127,14 @@ var LoadingButton = (0, import_react3.forwardRef)((props, ref) => {
114
127
  loadingIndicator: LoadingIndicator
115
128
  }, rest), {
116
129
  ref,
117
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: nonLoadingStyling, children })
130
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: nonLoadingStyling, children })
118
131
  })
119
132
  );
120
133
  });
121
134
  // Annotate the CommonJS export names for ESM import in node:
122
135
  0 && (module.exports = {
123
136
  Button,
137
+ ButtonGroup,
124
138
  IconButton,
125
139
  LoadingButton
126
140
  });
package/dist/index.mjs CHANGED
@@ -43,11 +43,23 @@ var Button = forwardRef((props, ref) => {
43
43
  return /* @__PURE__ */ jsx(MUIButton, __spreadProps(__spreadValues(__spreadValues({}, props), overrideProps), { ref }));
44
44
  });
45
45
 
46
+ // src/lib/ButtonGroup.tsx
47
+ import { default as MUIButtonGroup } from "@mui/material/ButtonGroup";
48
+ import { jsx as jsx2 } from "react/jsx-runtime";
49
+ var overrideProps2 = {
50
+ disableElevation: true,
51
+ disableFocusRipple: true,
52
+ disableRipple: true
53
+ };
54
+ var ButtonGroup = (props) => {
55
+ return /* @__PURE__ */ jsx2(MUIButtonGroup, __spreadProps(__spreadValues(__spreadValues({}, props), overrideProps2), { variant: "contained", color: "tertiary" }));
56
+ };
57
+
46
58
  // src/lib/IconButton.tsx
47
59
  import { forwardRef as forwardRef2 } from "react";
48
60
  import { default as MuiIconButton } from "@mui/material/IconButton";
49
61
  import Tooltip from "@mui/material/Tooltip";
50
- import { jsx as jsx2 } from "react/jsx-runtime";
62
+ import { jsx as jsx3 } from "react/jsx-runtime";
51
63
  var outlinedStyles = {
52
64
  borderRadius: ".25rem",
53
65
  border: 1
@@ -55,21 +67,21 @@ var outlinedStyles = {
55
67
  var IconButton = forwardRef2((props, ref) => {
56
68
  const _a = props, { title, variant = "text", sx, size = "medium" } = _a, rest = __objRest(_a, ["title", "variant", "sx", "size"]);
57
69
  const styles = __spreadValues(__spreadValues({}, sx), variant === "outlined" && outlinedStyles);
58
- return /* @__PURE__ */ jsx2(Tooltip, { title, children: /* @__PURE__ */ jsx2(MuiIconButton, __spreadProps(__spreadValues({ "aria-label": title, sx: __spreadValues({}, styles) }, rest), { ref, size })) });
70
+ return /* @__PURE__ */ jsx3(Tooltip, { title, children: /* @__PURE__ */ jsx3(MuiIconButton, __spreadProps(__spreadValues({ "aria-label": title, sx: __spreadValues({}, styles) }, rest), { ref, size })) });
59
71
  });
60
72
 
61
73
  // src/lib/LoadingButton.tsx
62
74
  import { forwardRef as forwardRef3 } from "react";
63
75
  import MUILoadingButton from "@mui/lab/LoadingButton";
64
76
  import CircularProgress from "@mui/material/CircularProgress";
65
- import { jsx as jsx3 } from "react/jsx-runtime";
66
- var LoadingIndicator = /* @__PURE__ */ jsx3(CircularProgress, { color: "inherit", size: 16, "aria-label": "loading" });
77
+ import { jsx as jsx4 } from "react/jsx-runtime";
78
+ var LoadingIndicator = /* @__PURE__ */ jsx4(CircularProgress, { color: "inherit", size: 16, "aria-label": "loading" });
67
79
  var LoadingButton = forwardRef3((props, ref) => {
68
80
  const _a = props, { children, loading } = _a, rest = __objRest(_a, ["children", "loading"]);
69
81
  const loadingPosition = rest.startIcon ? "start" : "end";
70
82
  const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: "0 .7rem" };
71
- const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ jsx3("span", { style: loading ? { padding: "0 .7rem" } : {} });
72
- return /* @__PURE__ */ jsx3(
83
+ const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ jsx4("span", { style: loading ? { padding: "0 .7rem" } : {} });
84
+ return /* @__PURE__ */ jsx4(
73
85
  MUILoadingButton,
74
86
  __spreadProps(__spreadValues({
75
87
  endIcon,
@@ -79,12 +91,13 @@ var LoadingButton = forwardRef3((props, ref) => {
79
91
  loadingIndicator: LoadingIndicator
80
92
  }, rest), {
81
93
  ref,
82
- children: /* @__PURE__ */ jsx3("span", { style: nonLoadingStyling, children })
94
+ children: /* @__PURE__ */ jsx4("span", { style: nonLoadingStyling, children })
83
95
  })
84
96
  );
85
97
  });
86
98
  export {
87
99
  Button,
100
+ ButtonGroup,
88
101
  IconButton,
89
102
  LoadingButton
90
103
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-button",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Availity MUI Button Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './lib/Button';
2
+ export * from './lib/ButtonGroup';
2
3
  export * from './lib/IconButton';
3
4
  export * from './lib/LoadingButton';