@alfalab/core-components-notification 6.2.8 → 6.2.10
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/Component.d.ts +2 -87
- package/Component.js +1 -1
- package/cssm/Component.d.ts +2 -87
- package/esm/Component.d.ts +2 -87
- package/esm/Component.js +1 -1
- package/esm/index.css +9 -9
- package/index.css +9 -9
- package/modern/Component.d.ts +2 -87
- package/modern/Component.js +1 -1
- package/modern/index.css +9 -9
- package/package.json +2 -2
- package/Component-89f0cb07.d.ts +0 -84
- package/createPaddingStyle-72dda473.d.ts +0 -5
- package/cssm/Component-89f0cb07.d.ts +0 -84
- package/cssm/createPaddingStyle-72dda473.d.ts +0 -5
- package/cssm/index-72dda473.d.ts +0 -12
- package/cssm/typings-89f0cb07.d.ts +0 -93
- package/esm/Component-89f0cb07.d.ts +0 -84
- package/esm/createPaddingStyle-72dda473.d.ts +0 -5
- package/esm/index-72dda473.d.ts +0 -12
- package/esm/typings-89f0cb07.d.ts +0 -93
- package/index-72dda473.d.ts +0 -12
- package/modern/Component-89f0cb07.d.ts +0 -84
- package/modern/createPaddingStyle-72dda473.d.ts +0 -5
- package/modern/index-72dda473.d.ts +0 -12
- package/modern/typings-89f0cb07.d.ts +0 -93
- package/typings-89f0cb07.d.ts +0 -93
package/Component.d.ts
CHANGED
|
@@ -1,92 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { MouseEvent
|
|
4
|
-
|
|
5
|
-
negative: JSX.Element;
|
|
6
|
-
positive: JSX.Element;
|
|
7
|
-
attention: JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
type BaseToastPlateProps = HTMLAttributes<HTMLDivElement> & {
|
|
10
|
-
/**
|
|
11
|
-
* Дополнительный класс
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Дополнительный класс для заголовка
|
|
16
|
-
*/
|
|
17
|
-
titleClassName?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Дополнительный класс для контентной области
|
|
20
|
-
*/
|
|
21
|
-
contentClassName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Дополнительный класс для области с кнопкой действия
|
|
24
|
-
*/
|
|
25
|
-
actionSectionClassName?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Дочерние элементы
|
|
28
|
-
*/
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Заголовок компонента
|
|
32
|
-
*/
|
|
33
|
-
title?: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Вид бэйджа
|
|
36
|
-
*/
|
|
37
|
-
badge?: "negative" | "positive" | "attention";
|
|
38
|
-
/**
|
|
39
|
-
* Слот слева, заменяет стандартную иконку
|
|
40
|
-
*/
|
|
41
|
-
leftAddons?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Кнопка действия
|
|
44
|
-
*/
|
|
45
|
-
actionButton?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
48
|
-
*/
|
|
49
|
-
dataTestId?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Управляет отображением кнопки закрытия уведомления
|
|
52
|
-
*/
|
|
53
|
-
hasCloser?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Доп. класс враппера кнопки "закрыть".
|
|
56
|
-
*/
|
|
57
|
-
closerWrapperClassName?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Доп. класс кнопки "закрыть".
|
|
60
|
-
*/
|
|
61
|
-
closerClassName?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Растягивает компонент на ширину контейнера
|
|
64
|
-
*/
|
|
65
|
-
block?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Обработчик клика по крестику
|
|
68
|
-
*/
|
|
69
|
-
onClose?: (event?: MouseEvent<HTMLButtonElement>) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Функция, с помощью которой можно переопределить иконки в Badge
|
|
72
|
-
*/
|
|
73
|
-
getBadgeIcons?: (icons: BadgeIcons) => BadgeIcons;
|
|
74
|
-
/**
|
|
75
|
-
* Набор цветов для компонента
|
|
76
|
-
*/
|
|
77
|
-
colors?: "default" | "inverted";
|
|
78
|
-
/**
|
|
79
|
-
* Положение кнопки под заголовком компонента
|
|
80
|
-
*/
|
|
81
|
-
bottomButtonPosition?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Основные стили компонента.
|
|
84
|
-
*/
|
|
85
|
-
styles?: {
|
|
86
|
-
[key: string]: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
type ToastPlateDesktopProps = Omit<BaseToastPlateProps, "styles" | "bottomButtonPosition">;
|
|
3
|
+
import { MouseEvent } from "react";
|
|
4
|
+
import { ToastPlateDesktopProps } from "@alfalab/core-components-toast-plate/desktop";
|
|
90
5
|
type NotificationProps = ToastPlateDesktopProps & {
|
|
91
6
|
/**
|
|
92
7
|
* Управление видимостью компонента
|
package/Component.js
CHANGED
|
@@ -20,7 +20,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
|
20
20
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
21
21
|
var elementClosest__default = /*#__PURE__*/_interopDefaultCompat(elementClosest);
|
|
22
22
|
|
|
23
|
-
var styles = {"notificationComponent":"
|
|
23
|
+
var styles = {"notificationComponent":"notification__notificationComponent_zmcop","isVisible":"notification__isVisible_zmcop","isClosing":"notification__isClosing_zmcop","toastContent":"notification__toastContent_zmcop","actionSection":"notification__actionSection_zmcop"};
|
|
24
24
|
require('./index.css')
|
|
25
25
|
|
|
26
26
|
var notificationClassNameSelector = ".".concat(styles.notificationComponent);
|
package/cssm/Component.d.ts
CHANGED
|
@@ -1,92 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { MouseEvent
|
|
4
|
-
|
|
5
|
-
negative: JSX.Element;
|
|
6
|
-
positive: JSX.Element;
|
|
7
|
-
attention: JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
type BaseToastPlateProps = HTMLAttributes<HTMLDivElement> & {
|
|
10
|
-
/**
|
|
11
|
-
* Дополнительный класс
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Дополнительный класс для заголовка
|
|
16
|
-
*/
|
|
17
|
-
titleClassName?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Дополнительный класс для контентной области
|
|
20
|
-
*/
|
|
21
|
-
contentClassName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Дополнительный класс для области с кнопкой действия
|
|
24
|
-
*/
|
|
25
|
-
actionSectionClassName?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Дочерние элементы
|
|
28
|
-
*/
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Заголовок компонента
|
|
32
|
-
*/
|
|
33
|
-
title?: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Вид бэйджа
|
|
36
|
-
*/
|
|
37
|
-
badge?: "negative" | "positive" | "attention";
|
|
38
|
-
/**
|
|
39
|
-
* Слот слева, заменяет стандартную иконку
|
|
40
|
-
*/
|
|
41
|
-
leftAddons?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Кнопка действия
|
|
44
|
-
*/
|
|
45
|
-
actionButton?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
48
|
-
*/
|
|
49
|
-
dataTestId?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Управляет отображением кнопки закрытия уведомления
|
|
52
|
-
*/
|
|
53
|
-
hasCloser?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Доп. класс враппера кнопки "закрыть".
|
|
56
|
-
*/
|
|
57
|
-
closerWrapperClassName?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Доп. класс кнопки "закрыть".
|
|
60
|
-
*/
|
|
61
|
-
closerClassName?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Растягивает компонент на ширину контейнера
|
|
64
|
-
*/
|
|
65
|
-
block?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Обработчик клика по крестику
|
|
68
|
-
*/
|
|
69
|
-
onClose?: (event?: MouseEvent<HTMLButtonElement>) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Функция, с помощью которой можно переопределить иконки в Badge
|
|
72
|
-
*/
|
|
73
|
-
getBadgeIcons?: (icons: BadgeIcons) => BadgeIcons;
|
|
74
|
-
/**
|
|
75
|
-
* Набор цветов для компонента
|
|
76
|
-
*/
|
|
77
|
-
colors?: "default" | "inverted";
|
|
78
|
-
/**
|
|
79
|
-
* Положение кнопки под заголовком компонента
|
|
80
|
-
*/
|
|
81
|
-
bottomButtonPosition?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Основные стили компонента.
|
|
84
|
-
*/
|
|
85
|
-
styles?: {
|
|
86
|
-
[key: string]: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
type ToastPlateDesktopProps = Omit<BaseToastPlateProps, "styles" | "bottomButtonPosition">;
|
|
3
|
+
import { MouseEvent } from "react";
|
|
4
|
+
import { ToastPlateDesktopProps } from "@alfalab/core-components-toast-plate/desktop";
|
|
90
5
|
type NotificationProps = ToastPlateDesktopProps & {
|
|
91
6
|
/**
|
|
92
7
|
* Управление видимостью компонента
|
package/esm/Component.d.ts
CHANGED
|
@@ -1,92 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { MouseEvent
|
|
4
|
-
|
|
5
|
-
negative: JSX.Element;
|
|
6
|
-
positive: JSX.Element;
|
|
7
|
-
attention: JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
type BaseToastPlateProps = HTMLAttributes<HTMLDivElement> & {
|
|
10
|
-
/**
|
|
11
|
-
* Дополнительный класс
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Дополнительный класс для заголовка
|
|
16
|
-
*/
|
|
17
|
-
titleClassName?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Дополнительный класс для контентной области
|
|
20
|
-
*/
|
|
21
|
-
contentClassName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Дополнительный класс для области с кнопкой действия
|
|
24
|
-
*/
|
|
25
|
-
actionSectionClassName?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Дочерние элементы
|
|
28
|
-
*/
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Заголовок компонента
|
|
32
|
-
*/
|
|
33
|
-
title?: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Вид бэйджа
|
|
36
|
-
*/
|
|
37
|
-
badge?: "negative" | "positive" | "attention";
|
|
38
|
-
/**
|
|
39
|
-
* Слот слева, заменяет стандартную иконку
|
|
40
|
-
*/
|
|
41
|
-
leftAddons?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Кнопка действия
|
|
44
|
-
*/
|
|
45
|
-
actionButton?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
48
|
-
*/
|
|
49
|
-
dataTestId?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Управляет отображением кнопки закрытия уведомления
|
|
52
|
-
*/
|
|
53
|
-
hasCloser?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Доп. класс враппера кнопки "закрыть".
|
|
56
|
-
*/
|
|
57
|
-
closerWrapperClassName?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Доп. класс кнопки "закрыть".
|
|
60
|
-
*/
|
|
61
|
-
closerClassName?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Растягивает компонент на ширину контейнера
|
|
64
|
-
*/
|
|
65
|
-
block?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Обработчик клика по крестику
|
|
68
|
-
*/
|
|
69
|
-
onClose?: (event?: MouseEvent<HTMLButtonElement>) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Функция, с помощью которой можно переопределить иконки в Badge
|
|
72
|
-
*/
|
|
73
|
-
getBadgeIcons?: (icons: BadgeIcons) => BadgeIcons;
|
|
74
|
-
/**
|
|
75
|
-
* Набор цветов для компонента
|
|
76
|
-
*/
|
|
77
|
-
colors?: "default" | "inverted";
|
|
78
|
-
/**
|
|
79
|
-
* Положение кнопки под заголовком компонента
|
|
80
|
-
*/
|
|
81
|
-
bottomButtonPosition?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Основные стили компонента.
|
|
84
|
-
*/
|
|
85
|
-
styles?: {
|
|
86
|
-
[key: string]: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
type ToastPlateDesktopProps = Omit<BaseToastPlateProps, "styles" | "bottomButtonPosition">;
|
|
3
|
+
import { MouseEvent } from "react";
|
|
4
|
+
import { ToastPlateDesktopProps } from "@alfalab/core-components-toast-plate/desktop";
|
|
90
5
|
type NotificationProps = ToastPlateDesktopProps & {
|
|
91
6
|
/**
|
|
92
7
|
* Управление видимостью компонента
|
package/esm/Component.js
CHANGED
|
@@ -9,7 +9,7 @@ import { stackingOrder, Stack } from '@alfalab/core-components-stack/esm';
|
|
|
9
9
|
import { ToastPlateDesktop } from '@alfalab/core-components-toast-plate/esm/desktop';
|
|
10
10
|
import { useClickOutside } from './utils/index.js';
|
|
11
11
|
|
|
12
|
-
var styles = {"notificationComponent":"
|
|
12
|
+
var styles = {"notificationComponent":"notification__notificationComponent_zmcop","isVisible":"notification__isVisible_zmcop","isClosing":"notification__isClosing_zmcop","toastContent":"notification__toastContent_zmcop","actionSection":"notification__actionSection_zmcop"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var notificationClassNameSelector = ".".concat(styles.notificationComponent);
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1si86 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
--notification-desktop-content-width: 278px;
|
|
24
|
-
} .
|
|
24
|
+
} .notification__notificationComponent_zmcop {
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
right: var(--gap-s);
|
|
27
27
|
transform: translate(0, -500px);
|
|
@@ -30,26 +30,26 @@
|
|
|
30
30
|
-webkit-user-select: none;
|
|
31
31
|
user-select: none;
|
|
32
32
|
transition: transform 0.4s ease-out
|
|
33
|
-
} @media screen and (min-width: 600px) { .
|
|
33
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_zmcop {
|
|
34
34
|
right: var(--gap-4xl);
|
|
35
35
|
width: auto;
|
|
36
36
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
37
37
|
}
|
|
38
|
-
} .
|
|
38
|
+
} .notification__notificationComponent_zmcop.notification__isVisible_zmcop {
|
|
39
39
|
visibility: visible;
|
|
40
40
|
transform: translate(0, 0);
|
|
41
|
-
} .
|
|
41
|
+
} .notification__notificationComponent_zmcop.notification__isClosing_zmcop {
|
|
42
42
|
transition: transform 0.1s ease-out;
|
|
43
43
|
transform: translate(100vw, 0)
|
|
44
|
-
} @media screen and (min-width: 600px) { .
|
|
44
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_zmcop.notification__isClosing_zmcop {
|
|
45
45
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
46
46
|
}
|
|
47
|
-
} .
|
|
47
|
+
} .notification__notificationComponent_zmcop.notification__notificationComponent_zmcop {
|
|
48
48
|
position: fixed;
|
|
49
|
-
} @media screen and (min-width: 600px) { .
|
|
49
|
+
} @media screen and (min-width: 600px) { .notification__toastContent_zmcop {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_zmcop {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1si86 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
--notification-desktop-content-width: 278px;
|
|
24
|
-
} .
|
|
24
|
+
} .notification__notificationComponent_zmcop {
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
right: var(--gap-s);
|
|
27
27
|
transform: translate(0, -500px);
|
|
@@ -30,26 +30,26 @@
|
|
|
30
30
|
-webkit-user-select: none;
|
|
31
31
|
user-select: none;
|
|
32
32
|
transition: transform 0.4s ease-out
|
|
33
|
-
} @media screen and (min-width: 600px) { .
|
|
33
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_zmcop {
|
|
34
34
|
right: var(--gap-4xl);
|
|
35
35
|
width: auto;
|
|
36
36
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
37
37
|
}
|
|
38
|
-
} .
|
|
38
|
+
} .notification__notificationComponent_zmcop.notification__isVisible_zmcop {
|
|
39
39
|
visibility: visible;
|
|
40
40
|
transform: translate(0, 0);
|
|
41
|
-
} .
|
|
41
|
+
} .notification__notificationComponent_zmcop.notification__isClosing_zmcop {
|
|
42
42
|
transition: transform 0.1s ease-out;
|
|
43
43
|
transform: translate(100vw, 0)
|
|
44
|
-
} @media screen and (min-width: 600px) { .
|
|
44
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_zmcop.notification__isClosing_zmcop {
|
|
45
45
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
46
46
|
}
|
|
47
|
-
} .
|
|
47
|
+
} .notification__notificationComponent_zmcop.notification__notificationComponent_zmcop {
|
|
48
48
|
position: fixed;
|
|
49
|
-
} @media screen and (min-width: 600px) { .
|
|
49
|
+
} @media screen and (min-width: 600px) { .notification__toastContent_zmcop {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_zmcop {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
package/modern/Component.d.ts
CHANGED
|
@@ -1,92 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { MouseEvent
|
|
4
|
-
|
|
5
|
-
negative: JSX.Element;
|
|
6
|
-
positive: JSX.Element;
|
|
7
|
-
attention: JSX.Element;
|
|
8
|
-
};
|
|
9
|
-
type BaseToastPlateProps = HTMLAttributes<HTMLDivElement> & {
|
|
10
|
-
/**
|
|
11
|
-
* Дополнительный класс
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Дополнительный класс для заголовка
|
|
16
|
-
*/
|
|
17
|
-
titleClassName?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Дополнительный класс для контентной области
|
|
20
|
-
*/
|
|
21
|
-
contentClassName?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Дополнительный класс для области с кнопкой действия
|
|
24
|
-
*/
|
|
25
|
-
actionSectionClassName?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Дочерние элементы
|
|
28
|
-
*/
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
/**
|
|
31
|
-
* Заголовок компонента
|
|
32
|
-
*/
|
|
33
|
-
title?: ReactNode;
|
|
34
|
-
/**
|
|
35
|
-
* Вид бэйджа
|
|
36
|
-
*/
|
|
37
|
-
badge?: "negative" | "positive" | "attention";
|
|
38
|
-
/**
|
|
39
|
-
* Слот слева, заменяет стандартную иконку
|
|
40
|
-
*/
|
|
41
|
-
leftAddons?: ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Кнопка действия
|
|
44
|
-
*/
|
|
45
|
-
actionButton?: ReactNode;
|
|
46
|
-
/**
|
|
47
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
48
|
-
*/
|
|
49
|
-
dataTestId?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Управляет отображением кнопки закрытия уведомления
|
|
52
|
-
*/
|
|
53
|
-
hasCloser?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Доп. класс враппера кнопки "закрыть".
|
|
56
|
-
*/
|
|
57
|
-
closerWrapperClassName?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Доп. класс кнопки "закрыть".
|
|
60
|
-
*/
|
|
61
|
-
closerClassName?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Растягивает компонент на ширину контейнера
|
|
64
|
-
*/
|
|
65
|
-
block?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Обработчик клика по крестику
|
|
68
|
-
*/
|
|
69
|
-
onClose?: (event?: MouseEvent<HTMLButtonElement>) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Функция, с помощью которой можно переопределить иконки в Badge
|
|
72
|
-
*/
|
|
73
|
-
getBadgeIcons?: (icons: BadgeIcons) => BadgeIcons;
|
|
74
|
-
/**
|
|
75
|
-
* Набор цветов для компонента
|
|
76
|
-
*/
|
|
77
|
-
colors?: "default" | "inverted";
|
|
78
|
-
/**
|
|
79
|
-
* Положение кнопки под заголовком компонента
|
|
80
|
-
*/
|
|
81
|
-
bottomButtonPosition?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Основные стили компонента.
|
|
84
|
-
*/
|
|
85
|
-
styles?: {
|
|
86
|
-
[key: string]: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
type ToastPlateDesktopProps = Omit<BaseToastPlateProps, "styles" | "bottomButtonPosition">;
|
|
3
|
+
import { MouseEvent } from "react";
|
|
4
|
+
import { ToastPlateDesktopProps } from "@alfalab/core-components-toast-plate/desktop";
|
|
90
5
|
type NotificationProps = ToastPlateDesktopProps & {
|
|
91
6
|
/**
|
|
92
7
|
* Управление видимостью компонента
|
package/modern/Component.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Stack, stackingOrder } from '@alfalab/core-components-stack/modern';
|
|
|
8
8
|
import { ToastPlateDesktop } from '@alfalab/core-components-toast-plate/modern/desktop';
|
|
9
9
|
import { useClickOutside } from './utils/index.js';
|
|
10
10
|
|
|
11
|
-
const styles = {"notificationComponent":"
|
|
11
|
+
const styles = {"notificationComponent":"notification__notificationComponent_zmcop","isVisible":"notification__isVisible_zmcop","isClosing":"notification__isClosing_zmcop","toastContent":"notification__toastContent_zmcop","actionSection":"notification__actionSection_zmcop"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
const notificationClassNameSelector = `.${styles.notificationComponent}`;
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1si86 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
--notification-desktop-content-width: 278px;
|
|
24
|
-
} .
|
|
24
|
+
} .notification__notificationComponent_zmcop {
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
right: var(--gap-s);
|
|
27
27
|
transform: translate(0, -500px);
|
|
@@ -30,26 +30,26 @@
|
|
|
30
30
|
-webkit-user-select: none;
|
|
31
31
|
user-select: none;
|
|
32
32
|
transition: transform 0.4s ease-out
|
|
33
|
-
} @media screen and (min-width: 600px) { .
|
|
33
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_zmcop {
|
|
34
34
|
right: var(--gap-4xl);
|
|
35
35
|
width: auto;
|
|
36
36
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
37
37
|
}
|
|
38
|
-
} .
|
|
38
|
+
} .notification__notificationComponent_zmcop.notification__isVisible_zmcop {
|
|
39
39
|
visibility: visible;
|
|
40
40
|
transform: translate(0, 0);
|
|
41
|
-
} .
|
|
41
|
+
} .notification__notificationComponent_zmcop.notification__isClosing_zmcop {
|
|
42
42
|
transition: transform 0.1s ease-out;
|
|
43
43
|
transform: translate(100vw, 0)
|
|
44
|
-
} @media screen and (min-width: 600px) { .
|
|
44
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_zmcop.notification__isClosing_zmcop {
|
|
45
45
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
46
46
|
}
|
|
47
|
-
} .
|
|
47
|
+
} .notification__notificationComponent_zmcop.notification__notificationComponent_zmcop {
|
|
48
48
|
position: fixed;
|
|
49
|
-
} @media screen and (min-width: 600px) { .
|
|
49
|
+
} @media screen and (min-width: 600px) { .notification__toastContent_zmcop {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_zmcop {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-notification",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@alfalab/core-components-portal": "^3.2.0",
|
|
18
18
|
"@alfalab/core-components-stack": "^4.1.0",
|
|
19
|
-
"@alfalab/core-components-toast-plate": "^6.
|
|
19
|
+
"@alfalab/core-components-toast-plate": "^6.1.1",
|
|
20
20
|
"classnames": "^2.3.1",
|
|
21
21
|
"element-closest": "^3.0.2",
|
|
22
22
|
"react-merge-refs": "^1.1.0",
|
package/Component-89f0cb07.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
/* eslint-disable no-plusplus, no-param-reassign */
|
|
3
|
-
import { MaskitoPlugin, MaskitoPostprocessor, MaskitoPreprocessor } from "@maskito/core";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { FC } from "react";
|
|
6
|
-
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
7
|
-
declare const isClient: () => boolean;
|
|
8
|
-
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
9
|
-
declare function easeInOutQuad(x: number): number;
|
|
10
|
-
declare const easingFns: {
|
|
11
|
-
easeInOutQuad: typeof easeInOutQuad;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Возвращает true, если значение равно null или undefined
|
|
15
|
-
*/
|
|
16
|
-
declare function isNil(value: unknown): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Выбор значения между min max границами
|
|
19
|
-
*/
|
|
20
|
-
declare function clamp<T extends Date | number>(value: T, min: T, max: T): T;
|
|
21
|
-
declare function noop(): void;
|
|
22
|
-
declare const fnUtils: {
|
|
23
|
-
clamp: typeof clamp;
|
|
24
|
-
noop: typeof noop;
|
|
25
|
-
isNil: typeof isNil;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Запрещает каретке становиться за указанные границы
|
|
29
|
-
*/
|
|
30
|
-
declare function caretGuard(guard: (value: string, selection: readonly [
|
|
31
|
-
from: number,
|
|
32
|
-
to: number
|
|
33
|
-
]) => [
|
|
34
|
-
from: number,
|
|
35
|
-
to: number
|
|
36
|
-
]): MaskitoPlugin;
|
|
37
|
-
/**
|
|
38
|
-
* Запрещает удалять указанный префикс
|
|
39
|
-
*/
|
|
40
|
-
declare function prefixPostprocessor(prefix: string): MaskitoPostprocessor;
|
|
41
|
-
/**
|
|
42
|
-
* Препроцессор необходим для правильной вставки/автокомплита телефонного номера
|
|
43
|
-
*/
|
|
44
|
-
declare function insertionPhonePreprocessor(mask: Array<string | RegExp>, countryCode?: string, clearableCountryCode?: boolean): MaskitoPreprocessor;
|
|
45
|
-
declare const maskUtils: {
|
|
46
|
-
insertionPhonePreprocessor: typeof insertionPhonePreprocessor;
|
|
47
|
-
prefixPostprocessor: typeof prefixPostprocessor;
|
|
48
|
-
caretGuard: typeof caretGuard;
|
|
49
|
-
};
|
|
50
|
-
type SpinnerProps = {
|
|
51
|
-
/**
|
|
52
|
-
* Управление видимостью компонента
|
|
53
|
-
*/
|
|
54
|
-
visible?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Размер компонента
|
|
57
|
-
*/
|
|
58
|
-
size?: "xs" | "s" | "m";
|
|
59
|
-
/**
|
|
60
|
-
* Дополнительный класс
|
|
61
|
-
*/
|
|
62
|
-
className?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Идентификатор компонента в DOM
|
|
65
|
-
*/
|
|
66
|
-
id?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
69
|
-
*/
|
|
70
|
-
dataTestId?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Палитра, в контексте которой используется спиннер
|
|
73
|
-
*/
|
|
74
|
-
colors?: "default" | "inverted";
|
|
75
|
-
};
|
|
76
|
-
declare const Spinner: FC<SpinnerProps>;
|
|
77
|
-
/**
|
|
78
|
-
* Минимальное время отображения лоадера - 500мс,
|
|
79
|
-
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
80
|
-
*/
|
|
81
|
-
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
82
|
-
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
83
|
-
export { isClient, getDataTestId, easingFns, fnUtils, maskUtils, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
84
|
-
export * from "./createPaddingStyle-72dda473";
|