@alfalab/core-components-notification 6.2.0 → 6.2.2
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-9211a437.d.ts +8 -3
- package/Component.js +1 -1
- package/createPaddingStyle-72dda473.d.ts +5 -0
- package/cssm/Component-9211a437.d.ts +8 -3
- package/cssm/createPaddingStyle-72dda473.d.ts +5 -0
- package/cssm/index-72dda473.d.ts +12 -0
- package/esm/Component-9211a437.d.ts +8 -3
- package/esm/Component.js +1 -1
- package/esm/createPaddingStyle-72dda473.d.ts +5 -0
- package/esm/index-72dda473.d.ts +12 -0
- package/esm/index.css +8 -8
- package/index-72dda473.d.ts +12 -0
- package/index.css +8 -8
- package/modern/Component-9211a437.d.ts +8 -3
- package/modern/Component.js +1 -1
- package/modern/createPaddingStyle-72dda473.d.ts +5 -0
- package/modern/index-72dda473.d.ts +12 -0
- package/modern/index.css +8 -8
- package/package.json +2 -2
package/Component-9211a437.d.ts
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
+
declare const isClient: () => boolean;
|
|
6
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
7
|
+
declare function easeInOutQuad(x: number): number;
|
|
8
|
+
declare const easingFns: {
|
|
9
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
10
|
+
};
|
|
5
11
|
type SpinnerProps = {
|
|
6
12
|
/**
|
|
7
13
|
* Управление видимостью компонента
|
|
@@ -29,12 +35,11 @@ type SpinnerProps = {
|
|
|
29
35
|
colors?: "default" | "inverted";
|
|
30
36
|
};
|
|
31
37
|
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
-
declare const isClient: () => boolean;
|
|
33
|
-
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Минимальное время отображения лоадера - 500мс,
|
|
36
40
|
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
37
41
|
*/
|
|
38
42
|
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
39
43
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
40
|
-
export {
|
|
44
|
+
export { isClient, getDataTestId, easingFns, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
45
|
+
export * from "./createPaddingStyle-72dda473";
|
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_nw17q","isVisible":"notification__isVisible_nw17q","isClosing":"notification__isClosing_nw17q","toastContent":"notification__toastContent_nw17q","actionSection":"notification__actionSection_nw17q"};
|
|
24
24
|
require('./index.css')
|
|
25
25
|
|
|
26
26
|
var notificationClassNameSelector = ".".concat(styles.notificationComponent);
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
+
declare const isClient: () => boolean;
|
|
6
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
7
|
+
declare function easeInOutQuad(x: number): number;
|
|
8
|
+
declare const easingFns: {
|
|
9
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
10
|
+
};
|
|
5
11
|
type SpinnerProps = {
|
|
6
12
|
/**
|
|
7
13
|
* Управление видимостью компонента
|
|
@@ -29,12 +35,11 @@ type SpinnerProps = {
|
|
|
29
35
|
colors?: "default" | "inverted";
|
|
30
36
|
};
|
|
31
37
|
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
-
declare const isClient: () => boolean;
|
|
33
|
-
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Минимальное время отображения лоадера - 500мс,
|
|
36
40
|
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
37
41
|
*/
|
|
38
42
|
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
39
43
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
40
|
-
export {
|
|
44
|
+
export { isClient, getDataTestId, easingFns, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
45
|
+
export * from "./createPaddingStyle-72dda473";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
2
|
+
type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
3
|
+
type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
|
|
4
|
+
type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
|
|
5
|
+
type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
|
|
6
|
+
type PaddingType = number | string | {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
12
|
+
export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType };
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
+
declare const isClient: () => boolean;
|
|
6
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
7
|
+
declare function easeInOutQuad(x: number): number;
|
|
8
|
+
declare const easingFns: {
|
|
9
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
10
|
+
};
|
|
5
11
|
type SpinnerProps = {
|
|
6
12
|
/**
|
|
7
13
|
* Управление видимостью компонента
|
|
@@ -29,12 +35,11 @@ type SpinnerProps = {
|
|
|
29
35
|
colors?: "default" | "inverted";
|
|
30
36
|
};
|
|
31
37
|
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
-
declare const isClient: () => boolean;
|
|
33
|
-
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Минимальное время отображения лоадера - 500мс,
|
|
36
40
|
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
37
41
|
*/
|
|
38
42
|
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
39
43
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
40
|
-
export {
|
|
44
|
+
export { isClient, getDataTestId, easingFns, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
45
|
+
export * from "./createPaddingStyle-72dda473";
|
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_nw17q","isVisible":"notification__isVisible_nw17q","isClosing":"notification__isClosing_nw17q","toastContent":"notification__toastContent_nw17q","actionSection":"notification__actionSection_nw17q"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var notificationClassNameSelector = ".".concat(styles.notificationComponent);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
2
|
+
type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
3
|
+
type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
|
|
4
|
+
type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
|
|
5
|
+
type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
|
|
6
|
+
type PaddingType = number | string | {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
12
|
+
export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType };
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1gple */
|
|
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_nw17q {
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
position: fixed;
|
|
27
27
|
right: var(--gap-s);
|
|
@@ -32,24 +32,24 @@
|
|
|
32
32
|
-webkit-user-select: none;
|
|
33
33
|
user-select: none;
|
|
34
34
|
transition: transform 0.4s ease-out
|
|
35
|
-
} @media screen and (min-width: 600px) { .
|
|
35
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_nw17q {
|
|
36
36
|
right: var(--gap-4xl);
|
|
37
37
|
width: auto;
|
|
38
38
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
39
39
|
}
|
|
40
|
-
} .
|
|
40
|
+
} .notification__notificationComponent_nw17q.notification__isVisible_nw17q {
|
|
41
41
|
visibility: visible;
|
|
42
42
|
transform: translate(0, 0);
|
|
43
|
-
} .
|
|
43
|
+
} .notification__notificationComponent_nw17q.notification__isClosing_nw17q {
|
|
44
44
|
transition: transform 0.1s ease-out;
|
|
45
45
|
transform: translate(100vw, 0)
|
|
46
|
-
} @media screen and (min-width: 600px) { .
|
|
46
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_nw17q.notification__isClosing_nw17q {
|
|
47
47
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
48
48
|
}
|
|
49
|
-
} @media screen and (min-width: 600px) { .
|
|
49
|
+
} @media screen and (min-width: 600px) { .notification__toastContent_nw17q {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_nw17q {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
2
|
+
type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
3
|
+
type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
|
|
4
|
+
type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
|
|
5
|
+
type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
|
|
6
|
+
type PaddingType = number | string | {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
12
|
+
export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType };
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1gple */
|
|
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_nw17q {
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
position: fixed;
|
|
27
27
|
right: var(--gap-s);
|
|
@@ -32,24 +32,24 @@
|
|
|
32
32
|
-webkit-user-select: none;
|
|
33
33
|
user-select: none;
|
|
34
34
|
transition: transform 0.4s ease-out
|
|
35
|
-
} @media screen and (min-width: 600px) { .
|
|
35
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_nw17q {
|
|
36
36
|
right: var(--gap-4xl);
|
|
37
37
|
width: auto;
|
|
38
38
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
39
39
|
}
|
|
40
|
-
} .
|
|
40
|
+
} .notification__notificationComponent_nw17q.notification__isVisible_nw17q {
|
|
41
41
|
visibility: visible;
|
|
42
42
|
transform: translate(0, 0);
|
|
43
|
-
} .
|
|
43
|
+
} .notification__notificationComponent_nw17q.notification__isClosing_nw17q {
|
|
44
44
|
transition: transform 0.1s ease-out;
|
|
45
45
|
transform: translate(100vw, 0)
|
|
46
|
-
} @media screen and (min-width: 600px) { .
|
|
46
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_nw17q.notification__isClosing_nw17q {
|
|
47
47
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
48
48
|
}
|
|
49
|
-
} @media screen and (min-width: 600px) { .
|
|
49
|
+
} @media screen and (min-width: 600px) { .notification__toastContent_nw17q {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_nw17q {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
+
declare const isClient: () => boolean;
|
|
6
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
7
|
+
declare function easeInOutQuad(x: number): number;
|
|
8
|
+
declare const easingFns: {
|
|
9
|
+
easeInOutQuad: typeof easeInOutQuad;
|
|
10
|
+
};
|
|
5
11
|
type SpinnerProps = {
|
|
6
12
|
/**
|
|
7
13
|
* Управление видимостью компонента
|
|
@@ -29,12 +35,11 @@ type SpinnerProps = {
|
|
|
29
35
|
colors?: "default" | "inverted";
|
|
30
36
|
};
|
|
31
37
|
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
-
declare const isClient: () => boolean;
|
|
33
|
-
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
34
38
|
/**
|
|
35
39
|
* Минимальное время отображения лоадера - 500мс,
|
|
36
40
|
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
37
41
|
*/
|
|
38
42
|
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
39
43
|
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
40
|
-
export {
|
|
44
|
+
export { isClient, getDataTestId, easingFns, SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|
|
45
|
+
export * from "./createPaddingStyle-72dda473";
|
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_nw17q","isVisible":"notification__isVisible_nw17q","isClosing":"notification__isClosing_nw17q","toastContent":"notification__toastContent_nw17q","actionSection":"notification__actionSection_nw17q"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
const notificationClassNameSelector = `.${styles.notificationComponent}`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
2
|
+
type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
|
|
3
|
+
type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
|
|
4
|
+
type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
|
|
5
|
+
type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
|
|
6
|
+
type PaddingType = number | string | {
|
|
7
|
+
top?: number;
|
|
8
|
+
right?: number;
|
|
9
|
+
bottom?: number;
|
|
10
|
+
left?: number;
|
|
11
|
+
};
|
|
12
|
+
export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType };
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1gple */
|
|
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_nw17q {
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
position: fixed;
|
|
27
27
|
right: var(--gap-s);
|
|
@@ -32,24 +32,24 @@
|
|
|
32
32
|
-webkit-user-select: none;
|
|
33
33
|
user-select: none;
|
|
34
34
|
transition: transform 0.4s ease-out
|
|
35
|
-
} @media screen and (min-width: 600px) { .
|
|
35
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_nw17q {
|
|
36
36
|
right: var(--gap-4xl);
|
|
37
37
|
width: auto;
|
|
38
38
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
39
39
|
}
|
|
40
|
-
} .
|
|
40
|
+
} .notification__notificationComponent_nw17q.notification__isVisible_nw17q {
|
|
41
41
|
visibility: visible;
|
|
42
42
|
transform: translate(0, 0);
|
|
43
|
-
} .
|
|
43
|
+
} .notification__notificationComponent_nw17q.notification__isClosing_nw17q {
|
|
44
44
|
transition: transform 0.1s ease-out;
|
|
45
45
|
transform: translate(100vw, 0)
|
|
46
|
-
} @media screen and (min-width: 600px) { .
|
|
46
|
+
} @media screen and (min-width: 600px) { .notification__notificationComponent_nw17q.notification__isClosing_nw17q {
|
|
47
47
|
transform: translate(calc(100% + var(--gap-4xl)), 0)
|
|
48
48
|
}
|
|
49
|
-
} @media screen and (min-width: 600px) { .
|
|
49
|
+
} @media screen and (min-width: 600px) { .notification__toastContent_nw17q {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_nw17q {
|
|
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.2",
|
|
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.0.
|
|
19
|
+
"@alfalab/core-components-toast-plate": "^6.0.2",
|
|
20
20
|
"classnames": "^2.3.1",
|
|
21
21
|
"element-closest": "^3.0.2",
|
|
22
22
|
"react-merge-refs": "^1.1.0",
|