@up42/up-components 2.7.0 → 2.9.0
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/Container/Container.overrides.d.ts +1 -0
- package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +3 -1
- package/dist/cjs/types/components/Select/Select.d.ts +8 -2
- package/dist/cjs/types/components/Select/Select.overrides.d.ts +2 -0
- package/dist/cjs/types/global/providers/AlertProvider/AlertProvider.d.ts +35 -0
- package/dist/cjs/types/global/providers/AlertProvider/AlertStack.d.ts +2 -0
- package/dist/cjs/types/global/providers/AlertProvider/SnackbarWrapper.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/Container/Container.overrides.d.ts +1 -0
- package/dist/esm/types/components/FormSelect/FormSelect.d.ts +3 -1
- package/dist/esm/types/components/Select/Select.d.ts +8 -2
- package/dist/esm/types/components/Select/Select.overrides.d.ts +2 -0
- package/dist/esm/types/global/providers/AlertProvider/AlertProvider.d.ts +35 -0
- package/dist/esm/types/global/providers/AlertProvider/AlertStack.d.ts +2 -0
- package/dist/esm/types/global/providers/AlertProvider/SnackbarWrapper.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -1
- package/dist/index.d.ts +41 -5
- package/package.json +1 -3
- package/dist/cjs/types/global/providers/AlertProvider/SnackBarStack.d.ts +0 -2
- package/dist/esm/types/global/providers/AlertProvider/SnackBarStack.d.ts +0 -2
- /package/dist/cjs/types/global/providers/AlertProvider/{SnackBarStack.test.d.ts → AlertStack.test.d.ts} +0 -0
- /package/dist/esm/types/global/providers/AlertProvider/{SnackBarStack.test.d.ts → AlertStack.test.d.ts} +0 -0
|
@@ -19,6 +19,8 @@ export declare const FormSelect: React.ForwardRefExoticComponent<Pick<import("@m
|
|
|
19
19
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
20
20
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
21
21
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | "component" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & Pick<import("@mui/material").FilledTextFieldProps | import("@mui/material").StandardTextFieldProps | import("@mui/material").OutlinedTextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & Omit<import("@mui/material").SelectProps<string | number>, "variant"> & {
|
|
22
|
+
withBorder?: boolean | undefined;
|
|
23
|
+
} & {
|
|
22
24
|
options: Option[];
|
|
23
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "input" | "label" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "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" | "value" | "open" | "autoComplete" | "multiple" | "readOnly" | "required" | "size" | "rows" | "error" | "component" | "components" | "componentsProps" | "onClose" | "slotProps" | "slots" | "fullWidth" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "focused" | "helperText" | "inputProps" | "inputRef" | "multiline" | "maxRows" | "minRows" | "onOpen" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "renderSuffix" | "startAdornment" | "disableUnderline" | "notched" | "autoWidth" | "defaultOpen" | "displayEmpty" | "IconComponent" | "labelId" | "MenuProps" | "native" | "renderValue" | "SelectDisplayProps" | "options"> & React.RefAttributes<unknown>>;
|
|
25
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "input" | "label" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "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" | "value" | "open" | "autoComplete" | "multiple" | "readOnly" | "required" | "size" | "rows" | "error" | "component" | "components" | "componentsProps" | "onClose" | "slotProps" | "slots" | "fullWidth" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "focused" | "helperText" | "inputProps" | "inputRef" | "multiline" | "maxRows" | "minRows" | "onOpen" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "renderSuffix" | "startAdornment" | "disableUnderline" | "notched" | "autoWidth" | "defaultOpen" | "displayEmpty" | "IconComponent" | "labelId" | "MenuProps" | "native" | "renderValue" | "SelectDisplayProps" | "withBorder" | "options"> & React.RefAttributes<unknown>>;
|
|
24
26
|
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectProps as MUISelectProps } from '@mui/material';
|
|
3
3
|
import { FormBaseProps } from '@global/utils/types';
|
|
4
|
-
export declare type SelectProps<T extends unknown> = FormBaseProps & Omit<MUISelectProps<T>, 'variant'
|
|
4
|
+
export declare type SelectProps<T extends unknown> = FormBaseProps & Omit<MUISelectProps<T>, 'variant'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Determines whether to display a border around the select component.
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
withBorder?: boolean;
|
|
10
|
+
};
|
|
5
11
|
/**
|
|
6
12
|
* Documentation: https://up-components.up42.com/?path=/docs/data-entry-select--docs
|
|
7
13
|
*/
|
|
8
|
-
export declare const Select: <T extends unknown>(props: SelectProps<T>) => JSX.Element;
|
|
14
|
+
export declare const Select: <T extends unknown>({ withBorder, size, ...props }: SelectProps<T>) => JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
+
import { Fade, GrowProps, SnackbarProps as MUISnackbarProps, SlideProps } from '@mui/material';
|
|
2
3
|
import { AlertColor } from '../../../components/Alert/Alert';
|
|
3
4
|
export declare type CreateAlertProps = {
|
|
4
5
|
title?: string;
|
|
@@ -9,6 +10,36 @@ export declare type CreateAlertProps = {
|
|
|
9
10
|
*/
|
|
10
11
|
duration?: number;
|
|
11
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Props for creating a snackbar.
|
|
15
|
+
*/
|
|
16
|
+
export declare type CreateSnackbarProps = {
|
|
17
|
+
/**
|
|
18
|
+
* The message to be displayed in the snackbar.
|
|
19
|
+
*/
|
|
20
|
+
message: string | ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* The type of the snackbar. Optional.
|
|
23
|
+
*/
|
|
24
|
+
type?: AlertColor;
|
|
25
|
+
/**
|
|
26
|
+
* The duration for which the snackbar should be displayed. Optional.
|
|
27
|
+
*/
|
|
28
|
+
duration?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The number of columns the snackbar should occupy. Optional.
|
|
31
|
+
*/
|
|
32
|
+
columns?: 2 | 4 | 6 | 8;
|
|
33
|
+
/**
|
|
34
|
+
* The transition effect for the snackbar. Optional.
|
|
35
|
+
*/
|
|
36
|
+
transition?: 'slide' | 'grow' | 'fade';
|
|
37
|
+
} & MUISnackbarProps;
|
|
38
|
+
export declare const transitionComponents: {
|
|
39
|
+
slide: (props: SlideProps) => JSX.Element;
|
|
40
|
+
grow: (props: GrowProps) => JSX.Element;
|
|
41
|
+
fade: typeof Fade;
|
|
42
|
+
};
|
|
12
43
|
export declare type DisplayAlertProps = CreateAlertProps & {
|
|
13
44
|
id: string;
|
|
14
45
|
onClose?: (id: string) => void;
|
|
@@ -18,7 +49,11 @@ declare type ContextState = {
|
|
|
18
49
|
alertStack: DisplayAlertProps[];
|
|
19
50
|
removeFromStack: (id: string) => void;
|
|
20
51
|
animationTime: number;
|
|
52
|
+
createSnackbar: (props: CreateSnackbarProps) => void;
|
|
53
|
+
currentSnackbar: CreateSnackbarProps;
|
|
54
|
+
closeSnackbar: (props: CreateSnackbarProps) => void;
|
|
21
55
|
};
|
|
56
|
+
export declare const defaultSnackbarState: CreateSnackbarProps;
|
|
22
57
|
export declare const AlertProvider: ({ children }: {
|
|
23
58
|
children: ReactNode;
|
|
24
59
|
}) => JSX.Element;
|
|
@@ -55,4 +55,4 @@ export { formatFileSize } from './utils/helpers/formatFileSize';
|
|
|
55
55
|
export { useQueryParams } from './utils/hooks/useQueryParams';
|
|
56
56
|
export { useRemotePagination, type PaginatedResponse } from './utils/hooks/useRemotePagination';
|
|
57
57
|
export { useDebounce } from './utils/hooks/useDebounce';
|
|
58
|
-
export { useAlert, type CreateAlertProps } from './global/providers/AlertProvider/AlertProvider';
|
|
58
|
+
export { useAlert, type CreateAlertProps, type CreateSnackbarProps, } from './global/providers/AlertProvider/AlertProvider';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export { default as tokens } from '@up42/design-system-tokens/dist/json/tokens.json';
|
|
3
3
|
import * as _mui_material from '@mui/material';
|
|
4
|
-
import { BoxProps, TextFieldProps, AvatarProps as AvatarProps$1, GridProps, ContainerProps, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, SliderProps as SliderProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, CardProps, ModalProps, AlertProps as AlertProps$1, SxProps, Theme, IconButtonProps, SvgIconProps, BadgeProps as BadgeProps$1, ChipProps, DividerProps as DividerProps$1 } from '@mui/material';
|
|
4
|
+
import { BoxProps, TextFieldProps, AvatarProps as AvatarProps$1, GridProps, ContainerProps, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, SliderProps as SliderProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, CardProps, ModalProps, AlertProps as AlertProps$1, SxProps, Theme, IconButtonProps, SvgIconProps, BadgeProps as BadgeProps$1, ChipProps, DividerProps as DividerProps$1, SnackbarProps } from '@mui/material';
|
|
5
5
|
export * from '@mui/material';
|
|
6
6
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
7
7
|
import * as React from 'react';
|
|
@@ -270,11 +270,17 @@ declare const FormSwitch: React__default.ForwardRefExoticComponent<Pick<_mui_sys
|
|
|
270
270
|
formControlLabel?: string | undefined;
|
|
271
271
|
}, keyof _mui_material_OverridableComponent.CommonProps | "children" | "sx" | "form" | "label" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "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" | "checked" | "readOnly" | "required" | "size" | "error" | "icon" | "component" | "onFocusVisible" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "focused" | "helperText" | "inputProps" | "inputRef" | "checkedIcon" | "edge" | "formControlLabel"> & React__default.RefAttributes<unknown>>;
|
|
272
272
|
|
|
273
|
-
declare type SelectProps<T extends unknown> = FormBaseProps & Omit<SelectProps$1<T>, 'variant'
|
|
273
|
+
declare type SelectProps<T extends unknown> = FormBaseProps & Omit<SelectProps$1<T>, 'variant'> & {
|
|
274
|
+
/**
|
|
275
|
+
* Determines whether to display a border around the select component.
|
|
276
|
+
* @default true
|
|
277
|
+
*/
|
|
278
|
+
withBorder?: boolean;
|
|
279
|
+
};
|
|
274
280
|
/**
|
|
275
281
|
* Documentation: https://up-components.up42.com/?path=/docs/data-entry-select--docs
|
|
276
282
|
*/
|
|
277
|
-
declare const Select: <T extends unknown>(props: SelectProps<T>) => JSX.Element;
|
|
283
|
+
declare const Select: <T extends unknown>({ withBorder, size, ...props }: SelectProps<T>) => JSX.Element;
|
|
278
284
|
|
|
279
285
|
declare type Option = {
|
|
280
286
|
value: string | number;
|
|
@@ -294,8 +300,10 @@ declare const FormSelect: React__default.ForwardRefExoticComponent<Pick<_mui_sys
|
|
|
294
300
|
} & _mui_material_OverridableComponent.CommonProps & Omit<Pick<React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React__default.HTMLAttributes<HTMLDivElement>> & {
|
|
295
301
|
ref?: ((instance: HTMLDivElement | null) => void) | React__default.RefObject<HTMLDivElement> | null | undefined;
|
|
296
302
|
}, keyof _mui_material_OverridableComponent.CommonProps | "children" | "sx" | "ref" | "component" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & Pick<_mui_material.FilledTextFieldProps | _mui_material.StandardTextFieldProps | _mui_material.OutlinedTextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & Omit<_mui_material.SelectProps<string | number>, "variant"> & {
|
|
303
|
+
withBorder?: boolean | undefined;
|
|
304
|
+
} & {
|
|
297
305
|
options: Option[];
|
|
298
|
-
}, keyof _mui_material_OverridableComponent.CommonProps | "children" | "sx" | "input" | "label" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "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" | "value" | "open" | "autoComplete" | "multiple" | "readOnly" | "required" | "size" | "rows" | "error" | "component" | "components" | "componentsProps" | "onClose" | "slotProps" | "slots" | "fullWidth" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "focused" | "helperText" | "inputProps" | "inputRef" | "multiline" | "maxRows" | "minRows" | "onOpen" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "renderSuffix" | "startAdornment" | "disableUnderline" | "notched" | "autoWidth" | "defaultOpen" | "displayEmpty" | "IconComponent" | "labelId" | "MenuProps" | "native" | "renderValue" | "SelectDisplayProps" | "options"> & React__default.RefAttributes<unknown>>;
|
|
306
|
+
}, keyof _mui_material_OverridableComponent.CommonProps | "children" | "sx" | "input" | "label" | "slot" | "title" | "id" | "lang" | "name" | "type" | "role" | "tabIndex" | "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" | "value" | "open" | "autoComplete" | "multiple" | "readOnly" | "required" | "size" | "rows" | "error" | "component" | "components" | "componentsProps" | "onClose" | "slotProps" | "slots" | "fullWidth" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "focused" | "helperText" | "inputProps" | "inputRef" | "multiline" | "maxRows" | "minRows" | "onOpen" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "renderSuffix" | "startAdornment" | "disableUnderline" | "notched" | "autoWidth" | "defaultOpen" | "displayEmpty" | "IconComponent" | "labelId" | "MenuProps" | "native" | "renderValue" | "SelectDisplayProps" | "withBorder" | "options"> & React__default.RefAttributes<unknown>>;
|
|
299
307
|
|
|
300
308
|
declare type InputProps = Omit<TextFieldProps, 'maxRows' | 'minRows' | 'multiline' | 'rows' | 'size' | 'variant'>;
|
|
301
309
|
/**
|
|
@@ -4915,6 +4923,31 @@ declare type CreateAlertProps = {
|
|
|
4915
4923
|
*/
|
|
4916
4924
|
duration?: number;
|
|
4917
4925
|
};
|
|
4926
|
+
/**
|
|
4927
|
+
* Props for creating a snackbar.
|
|
4928
|
+
*/
|
|
4929
|
+
declare type CreateSnackbarProps = {
|
|
4930
|
+
/**
|
|
4931
|
+
* The message to be displayed in the snackbar.
|
|
4932
|
+
*/
|
|
4933
|
+
message: string | ReactNode;
|
|
4934
|
+
/**
|
|
4935
|
+
* The type of the snackbar. Optional.
|
|
4936
|
+
*/
|
|
4937
|
+
type?: AlertColor;
|
|
4938
|
+
/**
|
|
4939
|
+
* The duration for which the snackbar should be displayed. Optional.
|
|
4940
|
+
*/
|
|
4941
|
+
duration?: number;
|
|
4942
|
+
/**
|
|
4943
|
+
* The number of columns the snackbar should occupy. Optional.
|
|
4944
|
+
*/
|
|
4945
|
+
columns?: 2 | 4 | 6 | 8;
|
|
4946
|
+
/**
|
|
4947
|
+
* The transition effect for the snackbar. Optional.
|
|
4948
|
+
*/
|
|
4949
|
+
transition?: 'slide' | 'grow' | 'fade';
|
|
4950
|
+
} & SnackbarProps;
|
|
4918
4951
|
declare type DisplayAlertProps = CreateAlertProps & {
|
|
4919
4952
|
id: string;
|
|
4920
4953
|
onClose?: (id: string) => void;
|
|
@@ -4924,10 +4957,13 @@ declare type ContextState = {
|
|
|
4924
4957
|
alertStack: DisplayAlertProps[];
|
|
4925
4958
|
removeFromStack: (id: string) => void;
|
|
4926
4959
|
animationTime: number;
|
|
4960
|
+
createSnackbar: (props: CreateSnackbarProps) => void;
|
|
4961
|
+
currentSnackbar: CreateSnackbarProps;
|
|
4962
|
+
closeSnackbar: (props: CreateSnackbarProps) => void;
|
|
4927
4963
|
};
|
|
4928
4964
|
/**
|
|
4929
4965
|
* Documentation: https://up-components.up42.com/?path=/docs/feedback-alert-usealert--docs
|
|
4930
4966
|
*/
|
|
4931
4967
|
declare const useAlert: () => ContextState;
|
|
4932
4968
|
|
|
4933
|
-
export { Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CodeInline, type CodeInlineProps, CodeSnippet, type CodeSnippetItemProps, type CodeSnippetProps, ContactBox, type ContactBoxProps, ControlButton, type ControlButtonProps, CopyButton, type CopyButtonProps, type CreateAlertProps, DataGrid, type DataGridProps, type DatePickerDateType, DateTime, type DateTimeProps, Divider, type DividerProps, DocumentationPopover, type DocumentationPopoverProps, EmptyState, type EmptyStateProps, FormCheckbox, type FormCheckboxProps, FormDatePicker, type FormDatePickerProps, FormDateRangePicker, type FormDateRangePickerProps, FormInput, type FormInputProps, FormRadio, type FormRadioProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, GridContainer, type GridContainerProps, GridItem, type GridItemProps, Icon, type IconProps, Illustration, type IllustrationProps, InfoCard, type InfoCardProps, InfoModal, type InfoModalProps, InfoPopover, type InfoPopoverProps, Input, type InputProps, Link, type LinkProps, Loading, type LoadingProps, NotFound, type NotFoundProps, PageContainer, type PageContainerProps, PageHeader, type PageHeaderProps, type PaginatedResponse, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, Switch, type SwitchProps, Tab, TabGroup, type TabGroupProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableSortLabel, type TableSortLabelProps, Tabs, type TabsProps, Tag, type TagProps, Typography, type TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useDebounce, useQueryParams, useRemotePagination };
|
|
4969
|
+
export { Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CodeInline, type CodeInlineProps, CodeSnippet, type CodeSnippetItemProps, type CodeSnippetProps, ContactBox, type ContactBoxProps, ControlButton, type ControlButtonProps, CopyButton, type CopyButtonProps, type CreateAlertProps, type CreateSnackbarProps, DataGrid, type DataGridProps, type DatePickerDateType, DateTime, type DateTimeProps, Divider, type DividerProps, DocumentationPopover, type DocumentationPopoverProps, EmptyState, type EmptyStateProps, FormCheckbox, type FormCheckboxProps, FormDatePicker, type FormDatePickerProps, FormDateRangePicker, type FormDateRangePickerProps, FormInput, type FormInputProps, FormRadio, type FormRadioProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, GridContainer, type GridContainerProps, GridItem, type GridItemProps, Icon, type IconProps, Illustration, type IllustrationProps, InfoCard, type InfoCardProps, InfoModal, type InfoModalProps, InfoPopover, type InfoPopoverProps, Input, type InputProps, Link, type LinkProps, Loading, type LoadingProps, NotFound, type NotFoundProps, PageContainer, type PageContainerProps, PageHeader, type PageHeaderProps, type PaginatedResponse, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, Switch, type SwitchProps, Tab, TabGroup, type TabGroupProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableSortLabel, type TableSortLabelProps, Tabs, type TabsProps, Tag, type TagProps, Typography, type TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useDebounce, useQueryParams, useRemotePagination };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -67,8 +67,6 @@
|
|
|
67
67
|
"@types/react": "^17.0.38",
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
69
69
|
"@typescript-eslint/parser": "^5.10.0",
|
|
70
|
-
"babel-jest": "^27.4.6",
|
|
71
|
-
"babel-loader": "^8.2.3",
|
|
72
70
|
"commit-and-tag-version": "^12.4.1",
|
|
73
71
|
"eslint": "^8.7.0",
|
|
74
72
|
"eslint-config-prettier": "^8.3.0",
|
|
File without changes
|
|
File without changes
|