asma-core-ui 4.0.0-2 → 4.0.0-3
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/asma-core-ui.es.js +7 -7
- package/dist/src/components/feedback/snack-bar/SnackbarProvider.d.ts +32 -0
- package/dist/src/components/feedback/snack-bar/StyledAlertSnackbar.d.ts +11 -0
- package/dist/src/components/feedback/snack-bar/StyledSnackbar.d.ts +2 -0
- package/dist/src/components/feedback/snack-bar/components/StyledInfoSnackbar.d.ts +12 -0
- package/dist/src/components/feedback/snack-bar/components/processMessageError.d.ts +3 -0
- package/dist/src/components/feedback/snack-bar/components/processMessageInfo.d.ts +3 -0
- package/dist/src/components/feedback/snack-bar/components/types.d.ts +10 -0
- package/dist/src/components/feedback/snack-bar/components-styled/InfoMessages.d.ts +2 -0
- package/dist/src/components/feedback/snack-bar/index.d.ts +6 -0
- package/dist/src/components/feedback/snack-bar/message.d.ts +17 -0
- package/dist/src/components/feedback/snack-bar/processAlertSnackBar.d.ts +1 -0
- package/dist/src/components/feedback/snack-bar/processInfoSnackbar.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AlertColor } from '@mui/material';
|
|
2
|
+
import { type SnackbarProviderProps } from 'notistack';
|
|
3
|
+
/**
|
|
4
|
+
* @ignore
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const SnackbarProvider: (props: SnackbarProviderProps) => JSX.Element;
|
|
8
|
+
declare module 'notistack' {
|
|
9
|
+
interface VariantOverrides {
|
|
10
|
+
alert: {
|
|
11
|
+
/**
|
|
12
|
+
* The className to apply to the alert.
|
|
13
|
+
*/
|
|
14
|
+
alertClassName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The variant to use.
|
|
17
|
+
* @default 'standard'
|
|
18
|
+
*/
|
|
19
|
+
alertVariant?: 'standard' | 'filled' | 'outlined';
|
|
20
|
+
/**
|
|
21
|
+
* The severity of the alert. This defines the color and icon used.
|
|
22
|
+
* @default 'success'
|
|
23
|
+
*/
|
|
24
|
+
severity?: AlertColor;
|
|
25
|
+
/**
|
|
26
|
+
* If true, the alert is closable.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
closeButton?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AlertColor } from '@mui/material';
|
|
3
|
+
import { type CustomContentProps } from 'notistack';
|
|
4
|
+
interface StyledAlertSnackbarProps extends CustomContentProps {
|
|
5
|
+
severity?: AlertColor;
|
|
6
|
+
alertClassName?: string;
|
|
7
|
+
alertVariant?: 'standard' | 'filled' | 'outlined';
|
|
8
|
+
closeButton?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const StyledAlertSnackbar: import("react").ForwardRefExoticComponent<StyledAlertSnackbarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AlertColor } from '@mui/material';
|
|
3
|
+
import { type CustomContentProps } from 'notistack';
|
|
4
|
+
interface StyledInfoSnackbarProps extends CustomContentProps {
|
|
5
|
+
severity?: AlertColor;
|
|
6
|
+
alertClassName?: string;
|
|
7
|
+
alertVariant?: 'standard' | 'filled' | 'outlined';
|
|
8
|
+
closeButton?: boolean;
|
|
9
|
+
type?: 'loading';
|
|
10
|
+
}
|
|
11
|
+
export declare const StyledInfoSnackbar: import("react").ForwardRefExoticComponent<StyledInfoSnackbarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AlertColor } from '@mui/material';
|
|
2
|
+
import type { SnackbarProviderProps } from 'notistack';
|
|
3
|
+
export type MessageProps = SnackbarProviderProps & {
|
|
4
|
+
severity?: AlertColor;
|
|
5
|
+
persist?: boolean;
|
|
6
|
+
closeButton?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
type?: 'loading';
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MessageProps } from './components/types';
|
|
3
|
+
/**
|
|
4
|
+
* Important props:
|
|
5
|
+
* @param id - string. To control the message
|
|
6
|
+
* @remarks use callBack function to close the message manually. Providing ID as a param is important in this case.
|
|
7
|
+
* Without ID, callback fil force close all active notifications
|
|
8
|
+
* @param closeButton - true | false
|
|
9
|
+
* @param persist - true | false
|
|
10
|
+
* @param autoHideDuration - number
|
|
11
|
+
* @moreProps https://notistack.com/api-reference#mutual-props
|
|
12
|
+
*/
|
|
13
|
+
export declare const message: {
|
|
14
|
+
info: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
|
|
15
|
+
error: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
|
|
16
|
+
loading: (messageInfo: string | ReactNode, options?: MessageProps) => (() => void);
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function processAlertSnackBar(message: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function processInfoSnackbar(message: string): void;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './components/icons';
|
|
|
6
6
|
export * from './components/data-display/typography';
|
|
7
7
|
export * from './components/feedback/dialog';
|
|
8
8
|
export * from './components/feedback/alert';
|
|
9
|
+
export * from './components/feedback/snack-bar';
|
|
9
10
|
export * from './components/inputs/button';
|
|
10
11
|
export * from './components/inputs/checkbox';
|
|
11
12
|
export * from './components/inputs/input-field';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "4.0.0-
|
|
6
|
+
"version": "4.0.0-3",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/**/*",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@iconify/react": "^4.1.1",
|
|
45
45
|
"@mui/material": "^5.13.7",
|
|
46
46
|
"@tanstack/react-table": "^8.10.0",
|
|
47
|
-
"asma-core-ui": "^3.0.53",
|
|
48
47
|
"clsx": "^1.2.1",
|
|
49
48
|
"date-fns": "^2.30.0",
|
|
50
49
|
"lodash-es": "^4.17.21",
|
|
51
50
|
"material-ui-popup-state": "^5.0.10",
|
|
52
51
|
"node": "18.17.0",
|
|
52
|
+
"notistack": "^3.0.1",
|
|
53
53
|
"react": "^18.2.0",
|
|
54
54
|
"react-day-picker": "^8.8.2",
|
|
55
55
|
"react-dom": "^18.2.0",
|