@rabex-kit/rabex-ui 0.2.27 → 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.
@@ -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' | 'isIcon' | 'variant'> & {
3
+ export declare type ButtonProps = Omit<MuiButtonProps, 'size' | 'color' | 'component' | 'variant'> & {
4
4
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
- isIcon?: boolean;
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" | "isIcon"> & React.RefAttributes<HTMLButtonElement>>;
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", "isIcon", "children"];
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
- // Styled button with shouldForwardProp to exclude 'isIcon' from DOM
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
- isIcon = props.isIcon,
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
- isIcon: isIcon
896
- }, rest), isIcon ? children : React__default.createElement(Typography, {
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
- isIcon: false,
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,12 +2770,14 @@ var components = {
2778
2770
  }, {
2779
2771
  props: {
2780
2772
  size: 'xs',
2781
- isIcon: true
2773
+ mode: 'icon'
2782
2774
  },
2783
2775
  style: function style(_ref11) {
2784
2776
  var theme = _ref11.theme;
2785
2777
  return {
2786
- minWidth: 'unset',
2778
+ minWidth: '24px',
2779
+ width: '24px',
2780
+ height: '24px',
2787
2781
  // padding: theme.spacing(3.5, 3.5),
2788
2782
  padding: theme.spacing(1),
2789
2783
  borderRadius: theme.spacing(1)
@@ -2792,12 +2786,14 @@ var components = {
2792
2786
  }, {
2793
2787
  props: {
2794
2788
  size: 'sm',
2795
- isIcon: true
2789
+ mode: 'icon'
2796
2790
  },
2797
2791
  style: function style(_ref12) {
2798
2792
  var theme = _ref12.theme;
2799
2793
  return {
2800
- minWidth: 'unset',
2794
+ minWidth: '32px',
2795
+ width: '32px',
2796
+ height: '32px',
2801
2797
  // padding: theme.spacing(3.5, 3.5),
2802
2798
  padding: theme.spacing(2),
2803
2799
  borderRadius: theme.spacing(2)
@@ -2806,12 +2802,14 @@ var components = {
2806
2802
  }, {
2807
2803
  props: {
2808
2804
  size: 'md',
2809
- isIcon: true
2805
+ mode: 'icon'
2810
2806
  },
2811
2807
  style: function style(_ref13) {
2812
2808
  var theme = _ref13.theme;
2813
2809
  return {
2814
- minWidth: 'unset',
2810
+ minWidth: '40px',
2811
+ width: '40px',
2812
+ height: '40px',
2815
2813
  // padding: theme.spacing(3.5, 3.5),
2816
2814
  padding: theme.spacing(2),
2817
2815
  borderRadius: theme.spacing(2)
@@ -2820,12 +2818,14 @@ var components = {
2820
2818
  }, {
2821
2819
  props: {
2822
2820
  size: 'lg',
2823
- isIcon: true
2821
+ mode: 'icon'
2824
2822
  },
2825
2823
  style: function style(_ref14) {
2826
2824
  var theme = _ref14.theme;
2827
2825
  return {
2828
- minWidth: 'unset',
2826
+ minWidth: '48px',
2827
+ width: '48px',
2828
+ height: '48px',
2829
2829
  padding: theme.spacing(3),
2830
2830
  borderRadius: theme.spacing(2)
2831
2831
  };
@@ -2833,12 +2833,14 @@ var components = {
2833
2833
  }, {
2834
2834
  props: {
2835
2835
  size: 'xl',
2836
- isIcon: true
2836
+ mode: 'icon'
2837
2837
  },
2838
2838
  style: function style(_ref15) {
2839
2839
  var theme = _ref15.theme;
2840
2840
  return {
2841
- minWidth: 'unset',
2841
+ minWidth: '56px',
2842
+ width: '56px',
2843
+ height: '56px',
2842
2844
  padding: theme.spacing(4),
2843
2845
  borderRadius: theme.spacing(2)
2844
2846
  };
@@ -2887,7 +2889,7 @@ var components = {
2887
2889
  }, {
2888
2890
  props: {
2889
2891
  size: 'medium',
2890
- isIcon: true
2892
+ mode: 'icon'
2891
2893
  },
2892
2894
  style: function style(_ref19) {
2893
2895
  var theme = _ref19.theme;
@@ -2899,7 +2901,7 @@ var components = {
2899
2901
  }, {
2900
2902
  props: {
2901
2903
  size: 'small',
2902
- isIcon: true
2904
+ mode: 'icon'
2903
2905
  },
2904
2906
  style: function style(_ref20) {
2905
2907
  var theme = _ref20.theme;
@@ -2911,7 +2913,7 @@ var components = {
2911
2913
  }, {
2912
2914
  props: {
2913
2915
  size: 'xsmall',
2914
- isIcon: true
2916
+ mode: 'icon'
2915
2917
  },
2916
2918
  style: function style(_ref21) {
2917
2919
  var theme = _ref21.theme;
@@ -5701,7 +5703,7 @@ var ModalContent = function ModalContent(_ref) {
5701
5703
  left: '-10px'
5702
5704
  }, headerSx)
5703
5705
  }, header), React__default.createElement(Button, Object.assign({
5704
- isIcon: true,
5706
+ mode: "icon",
5705
5707
  color: "secondary",
5706
5708
  variant: 'text',
5707
5709
  size: 'sm'