@up42/up-components 1.0.5 → 1.1.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/dist/cjs/index.js +2 -2
- package/dist/cjs/types/components/Button/Button.d.ts +4 -2
- package/dist/cjs/types/components/Button/Button.overrides.d.ts +0 -10
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/Button/Button.d.ts +4 -2
- package/dist/esm/types/components/Button/Button.overrides.d.ts +0 -10
- package/dist/index.d.ts +12 -10
- package/package.json +4 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
3
3
|
import { MUIGlobalOmit } from '@global/utils/types';
|
|
4
|
-
export declare type ButtonProps = MUIGlobalOmit<Omit<MUIButtonProps, 'size'>, {
|
|
4
|
+
export declare type ButtonProps = MUIGlobalOmit<Omit<MUIButtonProps, 'size' | 'color'>, {
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
size?: 'default' | 'slim';
|
|
7
|
+
color?: 'critical' | MUIButtonProps['color'];
|
|
7
8
|
}>;
|
|
8
9
|
/**
|
|
9
10
|
* Documentation: https://up-components.up42.com/?path=/docs/data-entry-button--docs
|
|
@@ -11,4 +12,5 @@ export declare type ButtonProps = MUIGlobalOmit<Omit<MUIButtonProps, 'size'>, {
|
|
|
11
12
|
export declare const Button: React.ForwardRefExoticComponent<Pick<{
|
|
12
13
|
loading?: boolean | undefined;
|
|
13
14
|
size?: "default" | "slim" | undefined;
|
|
14
|
-
|
|
15
|
+
color?: 'critical' | MUIButtonProps['color'];
|
|
16
|
+
} & Omit<Omit<MUIButtonProps<"button", {}>, "color" | "size">, "classes" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple">, "className" | "style" | "children" | "color" | "sx" | "form" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "href" | "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" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "loading" | "size" | "variant" | "onFocusVisible" | "endIcon" | "fullWidth" | "startIcon"> & React.RefAttributes<unknown>>;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
2
2
|
import { ButtonBaseProps, ButtonProps } from '@mui/material';
|
|
3
|
-
/**
|
|
4
|
-
* Variants could be created to align with the design system: 'Filled', 'Outline', 'Ghost'
|
|
5
|
-
* @see https://mui.com/material-ui/customization/theme-components/#creating-new-component-variants
|
|
6
|
-
* variants: [
|
|
7
|
-
* {
|
|
8
|
-
* props: { variant: 'filled' },
|
|
9
|
-
* style: {},
|
|
10
|
-
* },
|
|
11
|
-
* ],
|
|
12
|
-
*/
|
|
13
3
|
export declare const MuiButton: OverridesStyleRules & {
|
|
14
4
|
defaultProps: ButtonProps;
|
|
15
5
|
};
|