@availity/mui-button 0.6.6 → 0.6.7

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,12 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.6.7](https://github.com/Availity/element/compare/@availity/mui-button@0.6.6...@availity/mui-button@0.6.7) (2024-04-19)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-layout` updated to version `0.6.6`
10
+ * `mui-icon` updated to version `0.6.6`
5
11
  ## [0.6.6](https://github.com/Availity/element/compare/@availity/mui-button@0.6.5...@availity/mui-button@0.6.6) (2024-04-15)
6
12
 
7
13
  ## [0.6.5](https://github.com/Availity/element/compare/@availity/mui-button@0.6.4...@availity/mui-button@0.6.5) (2024-04-04)
@@ -0,0 +1,49 @@
1
+ import * as react from 'react';
2
+ import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
3
+ import { IconButtonProps as IconButtonProps$1 } from '@mui/material/IconButton';
4
+ import { LoadingButtonProps as LoadingButtonProps$1 } from '@mui/lab/LoadingButton';
5
+
6
+ declare module '@mui/material/Button' {
7
+ interface ButtonPropsColorOverrides {
8
+ tertiary: true;
9
+ }
10
+ }
11
+ type ButtonProps = {
12
+ /** The color of the component.
13
+ * @default secondary */
14
+ color?: 'primary' | 'secondary' | 'tertiary';
15
+ /** The size of the component.
16
+ * @default large */
17
+ size?: 'small' | 'medium' | 'large';
18
+ } & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
19
+ declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
20
+
21
+ type IconButtonProps = {
22
+ /**
23
+ * Text for tooltip and aria-label
24
+ */
25
+ title: string;
26
+ /**
27
+ * The variant to use
28
+ * @default 'text'
29
+ */
30
+ variant?: 'outlined' | 'text';
31
+ /**
32
+ * The color of the component
33
+ * @default 'secondary'
34
+ */
35
+ color?: 'primary' | 'secondary';
36
+ size?: 'small' | 'medium';
37
+ } & Omit<IconButtonProps$1, 'aria-label' | 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef'>;
38
+ declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
39
+
40
+ type LoadingButtonProps = {
41
+ children: React.ReactNode;
42
+ /**
43
+ * The color of the component.
44
+ */
45
+ color?: 'primary' | 'secondary' | 'error';
46
+ } & Omit<LoadingButtonProps$1, 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef' | 'loadingIndicator' | 'loadingPosition'>;
47
+ declare const LoadingButton: react.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
48
+
49
+ export { Button, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ type ButtonProps = {
16
16
  * @default large */
17
17
  size?: 'small' | 'medium' | 'large';
18
18
  } & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
19
- declare const Button: react.ForwardRefExoticComponent<Pick<ButtonProps, "className" | "style" | "classes" | "action" | "children" | "disabled" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "color" | "translate" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "form" | "slot" | "title" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & react.RefAttributes<HTMLButtonElement>>;
19
+ declare const Button: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
20
20
 
21
21
  type IconButtonProps = {
22
22
  /**
@@ -35,7 +35,7 @@ type IconButtonProps = {
35
35
  color?: 'primary' | 'secondary';
36
36
  size?: 'small' | 'medium';
37
37
  } & Omit<IconButtonProps$1, 'aria-label' | 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef'>;
38
- declare const IconButton: react.ForwardRefExoticComponent<Pick<IconButtonProps, "className" | "style" | "classes" | "action" | "children" | "disabled" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "color" | "translate" | "size" | "variant" | "form" | "slot" | "title" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "edge"> & react.RefAttributes<HTMLButtonElement>>;
38
+ declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
39
39
 
40
40
  type LoadingButtonProps = {
41
41
  children: React.ReactNode;
@@ -44,6 +44,6 @@ type LoadingButtonProps = {
44
44
  */
45
45
  color?: 'primary' | 'secondary' | 'error';
46
46
  } & Omit<LoadingButtonProps$1, 'color' | 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'disableFocusRipple' | 'TouchRippleProps' | 'touchRippleRef' | 'loadingIndicator' | 'loadingPosition'>;
47
- declare const LoadingButton: react.ForwardRefExoticComponent<Pick<LoadingButtonProps, "className" | "style" | "classes" | "action" | "children" | "disabled" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "color" | "translate" | "disableElevation" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant" | "form" | "slot" | "title" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "loading"> & react.RefAttributes<HTMLButtonElement>>;
47
+ declare const LoadingButton: react.ForwardRefExoticComponent<Omit<LoadingButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
48
48
 
49
- export { Button, ButtonProps, IconButton, IconButtonProps, LoadingButton, LoadingButtonProps };
49
+ export { Button, type ButtonProps, IconButton, type IconButtonProps, LoadingButton, type LoadingButtonProps };
package/dist/index.js CHANGED
@@ -1,10 +1,39 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
9
  var __getProtoOf = Object.getPrototypeOf;
7
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
8
37
  var __export = (target, all) => {
9
38
  for (var name in all)
10
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -18,6 +47,10 @@ var __copyProps = (to, from, except, desc) => {
18
47
  return to;
19
48
  };
20
49
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
54
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
55
  mod
23
56
  ));
@@ -42,70 +75,48 @@ var overrideProps = {
42
75
  disableTouchRipple: true
43
76
  };
44
77
  var Button = (0, import_react.forwardRef)((props, ref) => {
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, {
46
- ...props,
47
- ...overrideProps,
48
- ref
49
- });
78
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Button.default, __spreadProps(__spreadValues(__spreadValues({}, props), overrideProps), { ref }));
50
79
  });
51
80
 
52
81
  // src/lib/IconButton.tsx
53
82
  var import_react2 = require("react");
54
83
  var import_IconButton = __toESM(require("@mui/material/IconButton"));
55
84
  var import_Tooltip = __toESM(require("@mui/material/Tooltip"));
56
- var import_jsx_runtime = require("react/jsx-runtime");
85
+ var import_jsx_runtime2 = require("react/jsx-runtime");
57
86
  var outlinedStyles = {
58
87
  borderRadius: ".25rem",
59
88
  border: 1
60
89
  };
61
90
  var IconButton = (0, import_react2.forwardRef)((props, ref) => {
62
- const { title, variant = "text", sx, size = "medium", ...rest } = props;
63
- const styles = {
64
- ...sx,
65
- ...variant === "outlined" && outlinedStyles
66
- };
67
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Tooltip.default, {
68
- title,
69
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_IconButton.default, {
70
- "aria-label": title,
71
- sx: { ...styles },
72
- ...rest,
73
- ref,
74
- size
75
- })
76
- });
91
+ const _a = props, { title, variant = "text", sx, size = "medium" } = _a, rest = __objRest(_a, ["title", "variant", "sx", "size"]);
92
+ 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 })) });
77
94
  });
78
95
 
79
96
  // src/lib/LoadingButton.tsx
80
97
  var import_react3 = require("react");
81
98
  var import_LoadingButton = __toESM(require("@mui/lab/LoadingButton"));
82
99
  var import_CircularProgress = __toESM(require("@mui/material/CircularProgress"));
83
- var import_jsx_runtime = require("react/jsx-runtime");
84
- var LoadingIndicator = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CircularProgress.default, {
85
- color: "inherit",
86
- size: 16,
87
- "aria-label": "loading"
88
- });
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" });
89
102
  var LoadingButton = (0, import_react3.forwardRef)((props, ref) => {
90
- const { children, loading, ...rest } = props;
103
+ const _a = props, { children, loading } = _a, rest = __objRest(_a, ["children", "loading"]);
91
104
  const loadingPosition = rest.startIcon ? "start" : "end";
92
105
  const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: "0 .7rem" };
93
- const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
94
- style: loading ? { padding: "0 .7rem" } : {}
95
- });
96
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LoadingButton.default, {
97
- endIcon,
98
- loadingPosition,
99
- loading,
100
- disableRipple: true,
101
- loadingIndicator: LoadingIndicator,
102
- ...rest,
103
- ref,
104
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
105
- style: nonLoadingStyling,
106
- children
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)(
108
+ import_LoadingButton.default,
109
+ __spreadProps(__spreadValues({
110
+ endIcon,
111
+ loadingPosition,
112
+ loading,
113
+ disableRipple: true,
114
+ loadingIndicator: LoadingIndicator
115
+ }, rest), {
116
+ ref,
117
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: nonLoadingStyling, children })
107
118
  })
108
- });
119
+ );
109
120
  });
110
121
  // Annotate the CommonJS export names for ESM import in node:
111
122
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -1,3 +1,35 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+
1
33
  // src/lib/Button.tsx
2
34
  import { forwardRef } from "react";
3
35
  import { default as MUIButton } from "@mui/material/Button";
@@ -8,11 +40,7 @@ var overrideProps = {
8
40
  disableTouchRipple: true
9
41
  };
10
42
  var Button = forwardRef((props, ref) => {
11
- return /* @__PURE__ */ jsx(MUIButton, {
12
- ...props,
13
- ...overrideProps,
14
- ref
15
- });
43
+ return /* @__PURE__ */ jsx(MUIButton, __spreadProps(__spreadValues(__spreadValues({}, props), overrideProps), { ref }));
16
44
  });
17
45
 
18
46
  // src/lib/IconButton.tsx
@@ -25,21 +53,9 @@ var outlinedStyles = {
25
53
  border: 1
26
54
  };
27
55
  var IconButton = forwardRef2((props, ref) => {
28
- const { title, variant = "text", sx, size = "medium", ...rest } = props;
29
- const styles = {
30
- ...sx,
31
- ...variant === "outlined" && outlinedStyles
32
- };
33
- return /* @__PURE__ */ jsx2(Tooltip, {
34
- title,
35
- children: /* @__PURE__ */ jsx2(MuiIconButton, {
36
- "aria-label": title,
37
- sx: { ...styles },
38
- ...rest,
39
- ref,
40
- size
41
- })
42
- });
56
+ const _a = props, { title, variant = "text", sx, size = "medium" } = _a, rest = __objRest(_a, ["title", "variant", "sx", "size"]);
57
+ 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 })) });
43
59
  });
44
60
 
45
61
  // src/lib/LoadingButton.tsx
@@ -47,31 +63,25 @@ import { forwardRef as forwardRef3 } from "react";
47
63
  import MUILoadingButton from "@mui/lab/LoadingButton";
48
64
  import CircularProgress from "@mui/material/CircularProgress";
49
65
  import { jsx as jsx3 } from "react/jsx-runtime";
50
- var LoadingIndicator = /* @__PURE__ */ jsx3(CircularProgress, {
51
- color: "inherit",
52
- size: 16,
53
- "aria-label": "loading"
54
- });
66
+ var LoadingIndicator = /* @__PURE__ */ jsx3(CircularProgress, { color: "inherit", size: 16, "aria-label": "loading" });
55
67
  var LoadingButton = forwardRef3((props, ref) => {
56
- const { children, loading, ...rest } = props;
68
+ const _a = props, { children, loading } = _a, rest = __objRest(_a, ["children", "loading"]);
57
69
  const loadingPosition = rest.startIcon ? "start" : "end";
58
70
  const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: "0 .7rem" };
59
- const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ jsx3("span", {
60
- style: loading ? { padding: "0 .7rem" } : {}
61
- });
62
- return /* @__PURE__ */ jsx3(MUILoadingButton, {
63
- endIcon,
64
- loadingPosition,
65
- loading,
66
- disableRipple: true,
67
- loadingIndicator: LoadingIndicator,
68
- ...rest,
69
- ref,
70
- children: /* @__PURE__ */ jsx3("span", {
71
- style: nonLoadingStyling,
72
- children
71
+ const endIcon = rest.startIcon ? void 0 : /* @__PURE__ */ jsx3("span", { style: loading ? { padding: "0 .7rem" } : {} });
72
+ return /* @__PURE__ */ jsx3(
73
+ MUILoadingButton,
74
+ __spreadProps(__spreadValues({
75
+ endIcon,
76
+ loadingPosition,
77
+ loading,
78
+ disableRipple: true,
79
+ loadingIndicator: LoadingIndicator
80
+ }, rest), {
81
+ ref,
82
+ children: /* @__PURE__ */ jsx3("span", { style: nonLoadingStyling, children })
73
83
  })
74
- });
84
+ );
75
85
  });
76
86
  export {
77
87
  Button,
package/jest.config.js CHANGED
@@ -4,4 +4,14 @@ module.exports = {
4
4
  ...global,
5
5
  displayName: 'button',
6
6
  coverageDirectory: '../../coverage/button',
7
+ /* TODO: Update to latest Jest snapshotFormat
8
+ * By default Nx has kept the older style of Jest Snapshot formats
9
+ * to prevent breaking of any existing tests with snapshots.
10
+ * It's recommend you update to the latest format.
11
+ * You can do this by removing snapshotFormat property
12
+ * and running tests with --update-snapshot flag.
13
+ * Example: From within the project directory, run "nx test --update-snapshot"
14
+ * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
15
+ */
16
+ snapshotFormat: { escapeString: true, printBasicPrototype: true },
7
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-button",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "Availity MUI Button Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -36,11 +36,11 @@
36
36
  "@mui/lab": "^5.0.0-alpha.147"
37
37
  },
38
38
  "devDependencies": {
39
- "@mui/material": "^5.14.12",
39
+ "@mui/material": "^5.15.15",
40
40
  "react": "18.2.0",
41
41
  "react-dom": "18.2.0",
42
- "tsup": "^5.12.7",
43
- "typescript": "^4.6.4"
42
+ "tsup": "^8.0.2",
43
+ "typescript": "^5.4.5"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@mui/material": "^5.11.9",
package/project.json CHANGED
@@ -6,10 +6,9 @@
6
6
  "tags": [],
7
7
  "targets": {
8
8
  "lint": {
9
- "executor": "@nrwl/linter:eslint",
9
+ "executor": "@nx/eslint:lint",
10
10
  "options": {
11
11
  "eslintConfig": ".eslintrc.json",
12
- "lintFilePatterns": ["packages/button/**/*.{js,ts}"],
13
12
  "silent": false,
14
13
  "fix": false,
15
14
  "cache": true,
@@ -22,20 +21,20 @@
22
21
  }
23
22
  },
24
23
  "test": {
25
- "executor": "@nrwl/jest:jest",
26
- "outputs": ["coverage/button"],
24
+ "executor": "@nx/jest:jest",
25
+ "outputs": ["{workspaceRoot}/coverage/button"],
27
26
  "options": {
28
- "jestConfig": "packages/button/jest.config.js",
29
- "passWithNoTests": true
27
+ "jestConfig": "packages/button/jest.config.js"
30
28
  }
31
29
  },
32
30
  "version": {
33
31
  "executor": "@jscutlery/semver:version",
34
32
  "options": {
35
33
  "preset": "conventional",
36
- "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
37
- "tagPrefix": "@availity/${projectName}@",
38
- "trackDeps": true
34
+ "commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
35
+ "tagPrefix": "@availity/{projectName}@",
36
+ "trackDeps": true,
37
+ "skipCommitTypes": ["docs"]
39
38
  }
40
39
  }
41
40
  }