@rabex-kit/rabex-ui 0.1.4 → 0.1.6
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 +1 -1
- package/dist/rabex-ui.cjs.development.js +9 -19
- 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 +9 -19
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/Button/index.d.ts
CHANGED
@@ -7,5 +7,5 @@ export declare type ButtonProps = Omit<MuiButtonProps, 'size' | 'color' | 'compo
|
|
7
7
|
variant?: 'contained' | 'containedSecondary' | 'outlined' | 'text';
|
8
8
|
component?: React.ElementType;
|
9
9
|
};
|
10
|
-
declare const Button: React.
|
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>>;
|
11
11
|
export default Button;
|
@@ -813,7 +813,6 @@ var typographySizes = {
|
|
813
813
|
weight: 'semiBold'
|
814
814
|
}
|
815
815
|
};
|
816
|
-
// Define icon sizes for different button sizes
|
817
816
|
var iconSizes = {
|
818
817
|
xs: 16,
|
819
818
|
sm: 16,
|
@@ -821,22 +820,12 @@ var iconSizes = {
|
|
821
820
|
lg: 24,
|
822
821
|
xl: 24
|
823
822
|
};
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
*
|
831
|
-
* ```typescript
|
832
|
-
* import { Button } from '@rabex-kit/core';
|
833
|
-
* ```
|
834
|
-
*
|
835
|
-
*
|
836
|
-
* @param props
|
837
|
-
* @returns
|
838
|
-
*/
|
839
|
-
var StyledButton = /*#__PURE__*/styled(MuiButton)(function (_ref) {
|
823
|
+
// Styled button with shouldForwardProp to exclude 'isIcon' from DOM
|
824
|
+
var StyledButton = /*#__PURE__*/styled(MuiButton, {
|
825
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
826
|
+
return prop !== 'isIcon';
|
827
|
+
}
|
828
|
+
})(function (_ref) {
|
840
829
|
var size = _ref.size;
|
841
830
|
return {
|
842
831
|
display: 'flex',
|
@@ -852,20 +841,21 @@ var StyledButton = /*#__PURE__*/styled(MuiButton)(function (_ref) {
|
|
852
841
|
}
|
853
842
|
};
|
854
843
|
});
|
855
|
-
var Button = function
|
844
|
+
var Button = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
856
845
|
var _props$size = props.size,
|
857
846
|
size = _props$size === void 0 ? 'md' : _props$size,
|
858
847
|
isIcon = props.isIcon,
|
859
848
|
children = props.children,
|
860
849
|
rest = _objectWithoutPropertiesLoose(props, _excluded$2);
|
861
850
|
return React__default.createElement(StyledButton, Object.assign({
|
851
|
+
ref: ref,
|
862
852
|
size: size,
|
863
853
|
isIcon: isIcon
|
864
854
|
}, rest), isIcon ? children : React__default.createElement(Typography, {
|
865
855
|
variant: typographySizes[size].variant,
|
866
856
|
weight: typographySizes[size].weight
|
867
857
|
}, children));
|
868
|
-
};
|
858
|
+
});
|
869
859
|
Button.defaultProps = {
|
870
860
|
variant: 'contained',
|
871
861
|
size: 'md',
|