@rabex-kit/rabex-ui 0.2.28 → 0.2.29
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/dist/Button/index.d.ts +3 -3
- package/dist/LoadingButton/index.d.ts +0 -1
- package/dist/rabex-ui.cjs.development.js +22 -25
- package/dist/rabex-ui.cjs.development.js.map +1 -1
- package/dist/rabex-ui.cjs.production.min.js +1 -1
- package/dist/rabex-ui.cjs.production.min.js.map +1 -1
- package/dist/rabex-ui.esm.js +22 -25
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/Button/index.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ButtonProps as MuiButtonProps } from '@mui/material';
|
3
|
-
export declare type ButtonProps = Omit<MuiButtonProps, 'size' | 'color' | 'component' | '
|
3
|
+
export declare type ButtonProps = Omit<MuiButtonProps, 'size' | 'color' | 'component' | 'variant'> & {
|
4
4
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
5
|
-
|
5
|
+
mode?: 'icon' | 'button';
|
6
6
|
color?: 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
7
7
|
variant?: 'contained' | 'containedSecondary' | 'outlined' | 'text';
|
8
8
|
component?: React.ElementType;
|
9
9
|
};
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "form" | "slot" | "style" | "title" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "translate" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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" | "
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "form" | "slot" | "style" | "title" | "className" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "translate" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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" | "mode"> & React.RefAttributes<HTMLButtonElement>>;
|
11
11
|
export default Button;
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
2
2
|
import { LoadingButtonProps as MuiLoadingButtonProps } from '@mui/lab';
|
3
3
|
export declare type LoadingButtonProps = Omit<MuiLoadingButtonProps, 'size' | 'color'> & {
|
4
4
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
5
|
-
isIcon?: boolean;
|
6
5
|
color?: 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
7
6
|
};
|
8
7
|
/**
|
@@ -832,7 +832,7 @@ var Breadcrumbs = function Breadcrumbs(props) {
|
|
832
832
|
return React__default.createElement(MuiBreadcrumbs, Object.assign({}, props));
|
833
833
|
};
|
834
834
|
|
835
|
-
var _excluded$2 = ["size", "
|
835
|
+
var _excluded$2 = ["size", "mode", "children"];
|
836
836
|
var typographySizes = {
|
837
837
|
xs: {
|
838
838
|
variant: 'smallButton',
|
@@ -862,12 +862,7 @@ var iconSizes = {
|
|
862
862
|
lg: 24,
|
863
863
|
xl: 24
|
864
864
|
};
|
865
|
-
|
866
|
-
var StyledButton = /*#__PURE__*/styled(MuiButton, {
|
867
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
868
|
-
return prop !== 'isIcon';
|
869
|
-
}
|
870
|
-
})(function (_ref) {
|
865
|
+
var StyledButton = /*#__PURE__*/styled(MuiButton, {})(function (_ref) {
|
871
866
|
var size = _ref.size;
|
872
867
|
return {
|
873
868
|
display: 'flex',
|
@@ -886,14 +881,15 @@ var StyledButton = /*#__PURE__*/styled(MuiButton, {
|
|
886
881
|
var Button = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
887
882
|
var _props$size = props.size,
|
888
883
|
size = _props$size === void 0 ? 'md' : _props$size,
|
889
|
-
|
884
|
+
_props$mode = props.mode,
|
885
|
+
mode = _props$mode === void 0 ? 'button' : _props$mode,
|
890
886
|
children = props.children,
|
891
887
|
rest = _objectWithoutPropertiesLoose(props, _excluded$2);
|
892
888
|
return React__default.createElement(StyledButton, Object.assign({
|
893
889
|
ref: ref,
|
894
890
|
size: size,
|
895
|
-
|
896
|
-
}, rest),
|
891
|
+
mode: mode
|
892
|
+
}, rest), mode === 'icon' ? children : React__default.createElement(Typography, {
|
897
893
|
variant: typographySizes[size].variant,
|
898
894
|
weight: typographySizes[size].weight
|
899
895
|
}, children));
|
@@ -902,7 +898,7 @@ Button.defaultProps = {
|
|
902
898
|
variant: 'contained',
|
903
899
|
size: 'md',
|
904
900
|
color: 'primary',
|
905
|
-
|
901
|
+
mode: 'button',
|
906
902
|
disableRipple: true,
|
907
903
|
disableElevation: true,
|
908
904
|
disableFocusRipple: true
|
@@ -1710,10 +1706,7 @@ var ListSubHeader = function ListSubHeader(props) {
|
|
1710
1706
|
* @returns
|
1711
1707
|
*/
|
1712
1708
|
var LoadingButton = /*#__PURE__*/styled(MuiLoadingButton, {
|
1713
|
-
name: 'MuiLoadingButton'
|
1714
|
-
shouldForwardProp: function shouldForwardProp(prop) {
|
1715
|
-
return !['isIcon'].includes(prop);
|
1716
|
-
}
|
1709
|
+
name: 'MuiLoadingButton'
|
1717
1710
|
})(function () {
|
1718
1711
|
return {};
|
1719
1712
|
});
|
@@ -1721,7 +1714,6 @@ LoadingButton.defaultProps = {
|
|
1721
1714
|
variant: 'contained',
|
1722
1715
|
size: 'md',
|
1723
1716
|
color: 'primary',
|
1724
|
-
isIcon: false,
|
1725
1717
|
disableRipple: true,
|
1726
1718
|
disableElevation: true,
|
1727
1719
|
disableFocusRipple: true
|
@@ -2778,11 +2770,12 @@ var components = {
|
|
2778
2770
|
}, {
|
2779
2771
|
props: {
|
2780
2772
|
size: 'xs',
|
2781
|
-
|
2773
|
+
mode: 'icon'
|
2782
2774
|
},
|
2783
2775
|
style: function style(_ref11) {
|
2784
2776
|
var theme = _ref11.theme;
|
2785
2777
|
return {
|
2778
|
+
minWidth: '24px',
|
2786
2779
|
width: '24px',
|
2787
2780
|
height: '24px',
|
2788
2781
|
// padding: theme.spacing(3.5, 3.5),
|
@@ -2793,11 +2786,12 @@ var components = {
|
|
2793
2786
|
}, {
|
2794
2787
|
props: {
|
2795
2788
|
size: 'sm',
|
2796
|
-
|
2789
|
+
mode: 'icon'
|
2797
2790
|
},
|
2798
2791
|
style: function style(_ref12) {
|
2799
2792
|
var theme = _ref12.theme;
|
2800
2793
|
return {
|
2794
|
+
minWidth: '32px',
|
2801
2795
|
width: '32px',
|
2802
2796
|
height: '32px',
|
2803
2797
|
// padding: theme.spacing(3.5, 3.5),
|
@@ -2808,11 +2802,12 @@ var components = {
|
|
2808
2802
|
}, {
|
2809
2803
|
props: {
|
2810
2804
|
size: 'md',
|
2811
|
-
|
2805
|
+
mode: 'icon'
|
2812
2806
|
},
|
2813
2807
|
style: function style(_ref13) {
|
2814
2808
|
var theme = _ref13.theme;
|
2815
2809
|
return {
|
2810
|
+
minWidth: '40px',
|
2816
2811
|
width: '40px',
|
2817
2812
|
height: '40px',
|
2818
2813
|
// padding: theme.spacing(3.5, 3.5),
|
@@ -2823,11 +2818,12 @@ var components = {
|
|
2823
2818
|
}, {
|
2824
2819
|
props: {
|
2825
2820
|
size: 'lg',
|
2826
|
-
|
2821
|
+
mode: 'icon'
|
2827
2822
|
},
|
2828
2823
|
style: function style(_ref14) {
|
2829
2824
|
var theme = _ref14.theme;
|
2830
2825
|
return {
|
2826
|
+
minWidth: '48px',
|
2831
2827
|
width: '48px',
|
2832
2828
|
height: '48px',
|
2833
2829
|
padding: theme.spacing(3),
|
@@ -2837,11 +2833,12 @@ var components = {
|
|
2837
2833
|
}, {
|
2838
2834
|
props: {
|
2839
2835
|
size: 'xl',
|
2840
|
-
|
2836
|
+
mode: 'icon'
|
2841
2837
|
},
|
2842
2838
|
style: function style(_ref15) {
|
2843
2839
|
var theme = _ref15.theme;
|
2844
2840
|
return {
|
2841
|
+
minWidth: '56px',
|
2845
2842
|
width: '56px',
|
2846
2843
|
height: '56px',
|
2847
2844
|
padding: theme.spacing(4),
|
@@ -2892,7 +2889,7 @@ var components = {
|
|
2892
2889
|
}, {
|
2893
2890
|
props: {
|
2894
2891
|
size: 'medium',
|
2895
|
-
|
2892
|
+
mode: 'icon'
|
2896
2893
|
},
|
2897
2894
|
style: function style(_ref19) {
|
2898
2895
|
var theme = _ref19.theme;
|
@@ -2904,7 +2901,7 @@ var components = {
|
|
2904
2901
|
}, {
|
2905
2902
|
props: {
|
2906
2903
|
size: 'small',
|
2907
|
-
|
2904
|
+
mode: 'icon'
|
2908
2905
|
},
|
2909
2906
|
style: function style(_ref20) {
|
2910
2907
|
var theme = _ref20.theme;
|
@@ -2916,7 +2913,7 @@ var components = {
|
|
2916
2913
|
}, {
|
2917
2914
|
props: {
|
2918
2915
|
size: 'xsmall',
|
2919
|
-
|
2916
|
+
mode: 'icon'
|
2920
2917
|
},
|
2921
2918
|
style: function style(_ref21) {
|
2922
2919
|
var theme = _ref21.theme;
|
@@ -5706,7 +5703,7 @@ var ModalContent = function ModalContent(_ref) {
|
|
5706
5703
|
left: '-10px'
|
5707
5704
|
}, headerSx)
|
5708
5705
|
}, header), React__default.createElement(Button, Object.assign({
|
5709
|
-
|
5706
|
+
mode: "icon",
|
5710
5707
|
color: "secondary",
|
5711
5708
|
variant: 'text',
|
5712
5709
|
size: 'sm'
|