@mantine/notifications 7.13.3 → 7.13.5-alpha.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/package.json +8 -8
- package/cjs/NotificationContainer.cjs +0 -48
- package/cjs/NotificationContainer.cjs.map +0 -1
- package/cjs/Notifications.cjs +0 -144
- package/cjs/Notifications.cjs.map +0 -1
- package/cjs/Notifications.module.css.cjs +0 -7
- package/cjs/Notifications.module.css.cjs.map +0 -1
- package/cjs/get-auto-close/get-auto-close.cjs +0 -15
- package/cjs/get-auto-close/get-auto-close.cjs.map +0 -1
- package/cjs/get-grouped-notifications/get-grouped-notifications.cjs +0 -27
- package/cjs/get-grouped-notifications/get-grouped-notifications.cjs.map +0 -1
- package/cjs/get-notification-state-styles.cjs +0 -51
- package/cjs/get-notification-state-styles.cjs.map +0 -1
- package/cjs/index.cjs +0 -19
- package/cjs/index.cjs.map +0 -1
- package/cjs/notifications.store.cjs +0 -105
- package/cjs/notifications.store.cjs.map +0 -1
- package/esm/NotificationContainer.mjs +0 -46
- package/esm/NotificationContainer.mjs.map +0 -1
- package/esm/Notifications.mjs +0 -142
- package/esm/Notifications.mjs.map +0 -1
- package/esm/Notifications.module.css.mjs +0 -5
- package/esm/Notifications.module.css.mjs.map +0 -1
- package/esm/get-auto-close/get-auto-close.mjs +0 -13
- package/esm/get-auto-close/get-auto-close.mjs.map +0 -1
- package/esm/get-grouped-notifications/get-grouped-notifications.mjs +0 -24
- package/esm/get-grouped-notifications/get-grouped-notifications.mjs.map +0 -1
- package/esm/get-notification-state-styles.mjs +0 -49
- package/esm/get-notification-state-styles.mjs.map +0 -1
- package/esm/index.mjs +0 -3
- package/esm/index.mjs.map +0 -1
- package/esm/notifications.store.mjs +0 -94
- package/esm/notifications.store.mjs.map +0 -1
- package/lib/NotificationContainer.d.ts +0 -9
- package/lib/Notifications.d.ts +0 -56
- package/lib/get-auto-close/get-auto-close.d.ts +0 -1
- package/lib/get-grouped-notifications/get-grouped-notifications.d.ts +0 -4
- package/lib/get-notification-state-styles.d.ts +0 -10
- package/lib/index.d.mts +0 -4
- package/lib/index.d.ts +0 -4
- package/lib/notifications.store.d.ts +0 -43
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TransitionStatus } from 'react-transition-group';
|
|
2
|
-
import type { NotificationsProps } from './Notifications';
|
|
3
|
-
interface NotificationStateStylesProps {
|
|
4
|
-
state: TransitionStatus;
|
|
5
|
-
maxHeight: number | string;
|
|
6
|
-
position: NotificationsProps['position'];
|
|
7
|
-
transitionDuration: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function getNotificationStateStyles({ state, maxHeight, position, transitionDuration, }: NotificationStateStylesProps): React.CSSProperties;
|
|
10
|
-
export {};
|
package/lib/index.d.mts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { notifications, showNotification, hideNotification, cleanNotifications, cleanNotificationsQueue, updateNotification, updateNotificationsState, createNotificationsStore, notificationsStore, useNotifications, } from './notifications.store';
|
|
2
|
-
export { Notifications } from './Notifications';
|
|
3
|
-
export type { NotificationData, NotificationsState, NotificationsStore, } from './notifications.store';
|
|
4
|
-
export type { NotificationsCssVariables, NotificationsFactory, NotificationsProps, NotificationsStylesNames, } from './Notifications';
|
package/lib/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { notifications, showNotification, hideNotification, cleanNotifications, cleanNotificationsQueue, updateNotification, updateNotificationsState, createNotificationsStore, notificationsStore, useNotifications, } from './notifications.store';
|
|
2
|
-
export { Notifications } from './Notifications';
|
|
3
|
-
export type { NotificationData, NotificationsState, NotificationsStore, } from './notifications.store';
|
|
4
|
-
export type { NotificationsCssVariables, NotificationsFactory, NotificationsProps, NotificationsStylesNames, } from './Notifications';
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { NotificationProps } from '@mantine/core';
|
|
2
|
-
import { MantineStore } from '@mantine/store';
|
|
3
|
-
export type NotificationPosition = 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center';
|
|
4
|
-
export interface NotificationData extends Omit<NotificationProps, 'onClose'>, Record<string, any> {
|
|
5
|
-
/** Notification id, can be used to close or update notification */
|
|
6
|
-
id?: string;
|
|
7
|
-
/** Position of the notification, if not set, the position is determined based on `position` prop on Notifications component */
|
|
8
|
-
position?: NotificationPosition;
|
|
9
|
-
/** Notification message, required for all notifications */
|
|
10
|
-
message: React.ReactNode;
|
|
11
|
-
/** Determines whether notification should be closed automatically,
|
|
12
|
-
* number is auto close timeout in ms, overrides `autoClose` from `Notifications`
|
|
13
|
-
* */
|
|
14
|
-
autoClose?: boolean | number;
|
|
15
|
-
/** Called when notification closes */
|
|
16
|
-
onClose?: (props: NotificationData) => void;
|
|
17
|
-
/** Called when notification opens */
|
|
18
|
-
onOpen?: (props: NotificationData) => void;
|
|
19
|
-
}
|
|
20
|
-
export interface NotificationsState {
|
|
21
|
-
notifications: NotificationData[];
|
|
22
|
-
queue: NotificationData[];
|
|
23
|
-
defaultPosition: NotificationPosition;
|
|
24
|
-
limit: number;
|
|
25
|
-
}
|
|
26
|
-
export type NotificationsStore = MantineStore<NotificationsState>;
|
|
27
|
-
export declare const createNotificationsStore: () => MantineStore<NotificationsState>;
|
|
28
|
-
export declare const notificationsStore: MantineStore<NotificationsState>;
|
|
29
|
-
export declare const useNotifications: (store?: NotificationsStore) => NotificationsState;
|
|
30
|
-
export declare function updateNotificationsState(store: NotificationsStore, update: (notifications: NotificationData[]) => NotificationData[]): void;
|
|
31
|
-
export declare function showNotification(notification: NotificationData, store?: NotificationsStore): string;
|
|
32
|
-
export declare function hideNotification(id: string, store?: NotificationsStore): string;
|
|
33
|
-
export declare function updateNotification(notification: NotificationData, store?: NotificationsStore): string | undefined;
|
|
34
|
-
export declare function cleanNotifications(store?: NotificationsStore): void;
|
|
35
|
-
export declare function cleanNotificationsQueue(store?: NotificationsStore): void;
|
|
36
|
-
export declare const notifications: {
|
|
37
|
-
readonly show: typeof showNotification;
|
|
38
|
-
readonly hide: typeof hideNotification;
|
|
39
|
-
readonly update: typeof updateNotification;
|
|
40
|
-
readonly clean: typeof cleanNotifications;
|
|
41
|
-
readonly cleanQueue: typeof cleanNotificationsQueue;
|
|
42
|
-
readonly updateState: typeof updateNotificationsState;
|
|
43
|
-
};
|