@delightui/components 0.1.130 → 0.1.131
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/library.css +15 -0
- package/dist/cjs/library.js +1 -1
- package/dist/cjs/library.js.map +1 -1
- package/dist/cjs/modules/notification/index.d.ts +2 -2
- package/dist/cjs/modules/notification/types.d.ts +20 -2
- package/dist/esm/library.css +15 -0
- package/dist/esm/library.js +1 -1
- package/dist/esm/library.js.map +1 -1
- package/dist/esm/modules/notification/index.d.ts +2 -2
- package/dist/esm/modules/notification/types.d.ts +20 -2
- package/dist/index.d.ts +21 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import NotificationContainer from './NotificationContainer';
|
|
2
|
-
import { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger } from './types';
|
|
2
|
+
import { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset } from './types';
|
|
3
3
|
export * from './NotificationContext';
|
|
4
|
-
export type { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger };
|
|
4
|
+
export type { NotificationContainerProps, TriggerNotificationPayload, Notification, NotificationTrigger, NotificationPosition, NotificationOffset };
|
|
5
5
|
export default NotificationContainer;
|
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ToastNotificationStyleEnum } from '../../components/atoms/ToastNotification/ToastNotification.types';
|
|
3
|
+
/**
|
|
4
|
+
* Position options for notification container.
|
|
5
|
+
*/
|
|
6
|
+
export type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
7
|
+
/**
|
|
8
|
+
* Offset configuration for notification positioning.
|
|
9
|
+
*/
|
|
10
|
+
export type NotificationOffset = {
|
|
11
|
+
x?: number;
|
|
12
|
+
y?: number;
|
|
13
|
+
};
|
|
3
14
|
/**
|
|
4
15
|
* Represents a single notification.
|
|
5
16
|
*/
|
|
6
17
|
export type Notification = {
|
|
7
18
|
id?: number;
|
|
8
|
-
message
|
|
19
|
+
message: ReactNode;
|
|
9
20
|
duration?: number;
|
|
21
|
+
style?: ToastNotificationStyleEnum;
|
|
22
|
+
isDismissable?: boolean;
|
|
10
23
|
};
|
|
11
24
|
/**
|
|
12
25
|
* Payload for triggering a new notification.
|
|
13
26
|
*/
|
|
14
27
|
export type TriggerNotificationPayload = Notification & {
|
|
15
|
-
style
|
|
28
|
+
style: ToastNotificationStyleEnum;
|
|
29
|
+
isDismissable?: boolean;
|
|
16
30
|
};
|
|
17
31
|
/**
|
|
18
32
|
* Props for the NotificationContainer component.
|
|
19
33
|
*/
|
|
20
34
|
export type NotificationContainerProps = {
|
|
21
35
|
className?: string;
|
|
36
|
+
position?: NotificationPosition;
|
|
37
|
+
offset?: NotificationOffset;
|
|
22
38
|
};
|
|
23
39
|
export type NotificationTrigger = (payload: TriggerNotificationPayload) => void;
|
|
24
40
|
/**
|
|
@@ -35,4 +51,6 @@ export type NotificationContextValue = {
|
|
|
35
51
|
*/
|
|
36
52
|
export type NotificationProviderProps = {
|
|
37
53
|
children: ReactNode;
|
|
54
|
+
position?: NotificationPosition;
|
|
55
|
+
offset?: NotificationOffset;
|
|
38
56
|
};
|
package/dist/esm/library.css
CHANGED
|
@@ -35318,6 +35318,21 @@ span.flatpickr-weekday {
|
|
|
35318
35318
|
display: flex;
|
|
35319
35319
|
flex-direction: column;
|
|
35320
35320
|
z-index: 1000;
|
|
35321
|
+
gap: 8px;
|
|
35322
|
+
min-width: 300px;
|
|
35323
|
+
max-width: 500px;
|
|
35324
|
+
}
|
|
35325
|
+
|
|
35326
|
+
.NotificationContainer-module_top-left__DSEaN,
|
|
35327
|
+
.NotificationContainer-module_top-center__uNAv8,
|
|
35328
|
+
.NotificationContainer-module_top-right__8CJ57 {
|
|
35329
|
+
flex-direction: column;
|
|
35330
|
+
}
|
|
35331
|
+
|
|
35332
|
+
.NotificationContainer-module_bottom-left__qg8Oo,
|
|
35333
|
+
.NotificationContainer-module_bottom-center__fd5iv,
|
|
35334
|
+
.NotificationContainer-module_bottom-right__lSCdh {
|
|
35335
|
+
flex-direction: column-reverse;
|
|
35321
35336
|
}
|
|
35322
35337
|
.ToastNotification-module_toastNotification__LCpoq {
|
|
35323
35338
|
display: flex;
|