@availity/mui-button 0.5.1 → 0.6.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 +12 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
- package/src/lib/Button.tsx +4 -0
- package/src/lib/IconButton.tsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.6.1](https://github.com/Availity/element/compare/@availity/mui-button@0.6.0...@availity/mui-button@0.6.1) (2024-01-12)
|
|
6
|
+
|
|
7
|
+
## [0.6.0](https://github.com/Availity/element/compare/@availity/mui-button@0.5.1...@availity/mui-button@0.6.0) (2023-12-04)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **mui-button:** set the default size to large ([dd37957](https://github.com/Availity/element/commit/dd379571d15e43be3b37e00d00553f9f5b6b5b3a))
|
|
13
|
+
|
|
5
14
|
## [0.5.1](https://github.com/Availity/element/compare/@availity/mui-button@0.5.0...@availity/mui-button@0.5.1) (2023-11-16)
|
|
6
15
|
|
|
7
16
|
### Dependency Updates
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
- `mui-layout` updated to version `0.1.3`
|
|
19
|
+
- `mui-icon` updated to version `0.7.3`
|
|
20
|
+
|
|
11
21
|
## [0.5.0](https://github.com/Availity/element/compare/@availity/mui-button@0.4.5...@availity/mui-button@0.5.0) (2023-11-08)
|
|
12
22
|
|
|
13
23
|
### Features
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ type ButtonProps = {
|
|
|
11
11
|
/** The color of the component.
|
|
12
12
|
* @default secondary */
|
|
13
13
|
color?: 'primary' | 'secondary' | 'tertiary';
|
|
14
|
-
|
|
14
|
+
/** The size of the component.
|
|
15
|
+
* @default large */
|
|
16
|
+
size?: 'small' | 'medium' | 'large';
|
|
17
|
+
} & Omit<ButtonProps$1, 'color' | 'component' | 'variant' | 'disableElevation' | 'disableFocusRipple' | 'disableTouchRipple' | 'centerRipple' | 'disableRipple' | 'focusRipple' | 'size' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
15
18
|
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>>;
|
|
16
19
|
|
|
17
20
|
type IconButtonProps = {
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ var outlinedStyles = {
|
|
|
58
58
|
border: 1
|
|
59
59
|
};
|
|
60
60
|
var IconButton = (0, import_react2.forwardRef)((props, ref) => {
|
|
61
|
-
const { title, variant = "text", sx, ...rest } = props;
|
|
61
|
+
const { title, variant = "text", sx, size = "medium", ...rest } = props;
|
|
62
62
|
const styles = {
|
|
63
63
|
...sx,
|
|
64
64
|
...variant === "outlined" && outlinedStyles
|
|
@@ -69,7 +69,8 @@ var IconButton = (0, import_react2.forwardRef)((props, ref) => {
|
|
|
69
69
|
"aria-label": title,
|
|
70
70
|
sx: { ...styles },
|
|
71
71
|
...rest,
|
|
72
|
-
ref
|
|
72
|
+
ref,
|
|
73
|
+
size
|
|
73
74
|
})
|
|
74
75
|
});
|
|
75
76
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ var outlinedStyles = {
|
|
|
24
24
|
border: 1
|
|
25
25
|
};
|
|
26
26
|
var IconButton = forwardRef2((props, ref) => {
|
|
27
|
-
const { title, variant = "text", sx, ...rest } = props;
|
|
27
|
+
const { title, variant = "text", sx, size = "medium", ...rest } = props;
|
|
28
28
|
const styles = {
|
|
29
29
|
...sx,
|
|
30
30
|
...variant === "outlined" && outlinedStyles
|
|
@@ -35,7 +35,8 @@ var IconButton = forwardRef2((props, ref) => {
|
|
|
35
35
|
"aria-label": title,
|
|
36
36
|
sx: { ...styles },
|
|
37
37
|
...rest,
|
|
38
|
-
ref
|
|
38
|
+
ref,
|
|
39
|
+
size
|
|
39
40
|
})
|
|
40
41
|
});
|
|
41
42
|
});
|
package/package.json
CHANGED
package/src/lib/Button.tsx
CHANGED
|
@@ -12,6 +12,9 @@ export type ButtonProps = {
|
|
|
12
12
|
/** The color of the component.
|
|
13
13
|
* @default secondary */
|
|
14
14
|
color?: 'primary' | 'secondary' | 'tertiary';
|
|
15
|
+
/** The size of the component.
|
|
16
|
+
* @default large */
|
|
17
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
18
|
} & Omit<
|
|
16
19
|
MUIButtonProps,
|
|
17
20
|
| 'color'
|
|
@@ -23,6 +26,7 @@ export type ButtonProps = {
|
|
|
23
26
|
| 'centerRipple'
|
|
24
27
|
| 'disableRipple'
|
|
25
28
|
| 'focusRipple'
|
|
29
|
+
| 'size'
|
|
26
30
|
| 'TouchRippleProps'
|
|
27
31
|
| 'touchRippleRef'
|
|
28
32
|
>;
|
package/src/lib/IconButton.tsx
CHANGED
|
@@ -38,14 +38,14 @@ const outlinedStyles = {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>((props, ref) => {
|
|
41
|
-
const { title, variant = 'text', sx, ...rest } = props;
|
|
41
|
+
const { title, variant = 'text', sx, size = 'medium', ...rest } = props;
|
|
42
42
|
const styles = {
|
|
43
43
|
...sx,
|
|
44
44
|
...(variant === 'outlined' && outlinedStyles),
|
|
45
45
|
};
|
|
46
46
|
return (
|
|
47
47
|
<Tooltip title={title}>
|
|
48
|
-
<MuiIconButton aria-label={title} sx={{ ...styles }} {...rest} ref={ref} />
|
|
48
|
+
<MuiIconButton aria-label={title} sx={{ ...styles }} {...rest} ref={ref} size={size} />
|
|
49
49
|
</Tooltip>
|
|
50
50
|
);
|
|
51
51
|
});
|