@zydon/common 2.3.63 → 2.3.65

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.
@@ -3,6 +3,7 @@ import { BoxProps } from '@mui/material/Box';
3
3
  import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
4
4
  import { TooltipProps } from '@mui/material/Tooltip';
5
5
  import { Icon } from '../../types/icon.js';
6
+ import { IconProps } from '../../types/iconProps.js';
6
7
 
7
8
  interface IconButtonProps extends Omit<IconButtonProps$1, 'color'> {
8
9
  icon?: keyof typeof Icon;
@@ -11,6 +12,7 @@ interface IconButtonProps extends Omit<IconButtonProps$1, 'color'> {
11
12
  loading?: boolean;
12
13
  boxProps?: BoxProps;
13
14
  tooltipProps?: Omit<TooltipProps, 'title' | 'children'>;
15
+ iconProps?: Omit<IconProps, 'icon' | 'ref'>;
14
16
  disableTooltip?: boolean;
15
17
  children?: React.ReactNode;
16
18
  }
@@ -1,12 +1,12 @@
1
- import { a } from '../../chunk-ABO2TMZH.js';
1
+ import { a as a$1 } from '../../chunk-ABO2TMZH.js';
2
2
  import '../../chunk-63BWA6K3.js';
3
3
  import { forwardRef, useMemo } from 'react';
4
4
  import p from '@mui/material/Box';
5
- import h from '@mui/material/CircularProgress';
6
- import x from '@mui/material/IconButton';
7
- import y from '@mui/material/Tooltip';
5
+ import x from '@mui/material/CircularProgress';
6
+ import y from '@mui/material/IconButton';
7
+ import C from '@mui/material/Tooltip';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
 
10
- var l=forwardRef(({icon:t,label:i,color:e="primary",loading:r=!1,disabled:a$1=!1,boxProps:m={},tooltipProps:B={},disableTooltip:I=!1,children:n,...d},M)=>{if(!t&&!n)throw new Error("IconButton: icon or children is required");let u=useMemo(()=>t?jsx(a,{icon:t}):n,[t,n]),w=useMemo(()=>r?jsx(h,{size:20,color:"inherit"}):u,[r,u]),f=jsx(x,{ref:M,"aria-label":i,color:"inherit",disabled:r||a$1,...d,children:w});return I?jsx(p,{...m,color:e,children:f}):jsx(p,{...m,color:e,children:jsx(y,{"data-testid":"button-tooltip",...B,title:i,children:f})})});l.displayName="IconButton";var H=l;
10
+ var a=forwardRef(({icon:t,label:i,color:e="primary",loading:r=!1,disabled:B=!1,boxProps:m={},tooltipProps:I={},iconProps:u={},disableTooltip:d=!1,children:n,...M},w)=>{if(!t&&!n)throw new Error("IconButton: icon or children is required");let f=useMemo(()=>t?jsx(a$1,{icon:t,...u}):n,[t,n,u]),T=useMemo(()=>r?jsx(x,{size:20,color:"inherit"}):f,[r,f]),c=jsx(y,{ref:w,"aria-label":i,color:"inherit",disabled:r||B,...M,children:T});return d?jsx(p,{...m,color:e,children:c}):jsx(p,{...m,color:e,children:jsx(C,{"data-testid":"button-tooltip",...I,title:i,children:c})})});a.displayName="IconButton";var N=a;
11
11
 
12
- export { H as default };
12
+ export { N as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.3.63",
3
+ "version": "2.3.65",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",