@max-ts/components 1.2.2 → 1.3.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/lib/components/Notification/Notification.d.ts +17 -0
- package/lib/components/Notification/NotificationContainer/NotificationContainer.d.ts +8 -0
- package/lib/components/Notification/NotificationContainer/index.d.ts +1 -0
- package/lib/components/Notification/NotificationContainer/styles.d.ts +4 -0
- package/lib/components/Notification/constants.d.ts +15 -0
- package/lib/components/Notification/index.d.ts +3 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/index.mjs +4976 -4172
- package/package.json +3 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { toast } from 'sonner';
|
|
2
|
+
export declare class Notification {
|
|
3
|
+
private readonly service;
|
|
4
|
+
constructor(sonner: typeof toast);
|
|
5
|
+
message(title: string, message?: string): string | number;
|
|
6
|
+
success: (title: string) => string | number;
|
|
7
|
+
error: (title: string) => string | number;
|
|
8
|
+
info: (title: string) => string | number;
|
|
9
|
+
warning: (title: string) => string | number;
|
|
10
|
+
custom: (node: React.ReactNode) => string | number;
|
|
11
|
+
action: ({ title, buttonLabel, onClick, }: {
|
|
12
|
+
title: string;
|
|
13
|
+
buttonLabel: string;
|
|
14
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
15
|
+
}) => string | number;
|
|
16
|
+
}
|
|
17
|
+
export declare const notification: Notification;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NOTIFICATION_POSITIONS } from '../constants';
|
|
2
|
+
type NotificationsProps = {
|
|
3
|
+
position?: keyof typeof NOTIFICATION_POSITIONS;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
};
|
|
7
|
+
export declare const NotificationContainer: ({ position, ...props }: NotificationsProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NotificationContainer';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ErrorIcon: import('@emotion/styled').StyledComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
2
|
+
export declare const SuccessIcon: import('@emotion/styled').StyledComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
3
|
+
export declare const WarningIcon: import('@emotion/styled').StyledComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
4
|
+
export declare const InfoIcon: import('@emotion/styled').StyledComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, {}, {}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum NotificationVariantTypes {
|
|
2
|
+
info = "info",
|
|
3
|
+
success = "success",
|
|
4
|
+
warning = "warning",
|
|
5
|
+
error = "error"
|
|
6
|
+
}
|
|
7
|
+
export declare const NOTIFICATION_POSITIONS: {
|
|
8
|
+
readonly topRight: "top-right";
|
|
9
|
+
readonly topLeft: "top-left";
|
|
10
|
+
readonly bottomRight: "bottom-right";
|
|
11
|
+
readonly bottomLeft: "bottom-left";
|
|
12
|
+
readonly topCenter: "top-center";
|
|
13
|
+
readonly bottomCenter: "bottom-center";
|
|
14
|
+
};
|
|
15
|
+
export declare const NOTIFY_CLASSNAME = "notify";
|
|
@@ -65,6 +65,7 @@ export * from './MaskField';
|
|
|
65
65
|
export * from './Menu';
|
|
66
66
|
export * from './MenuItem';
|
|
67
67
|
export * from './MenuList';
|
|
68
|
+
export * from './Notification';
|
|
68
69
|
export * from './OutdatedReleasePlaceholder';
|
|
69
70
|
export * from './OverflowTypography';
|
|
70
71
|
export * from './PageLayout';
|