@alfalab/core-components-notification-manager 6.0.0 → 6.1.0-snapshot-92b8690
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/dynamic-mixins/component.d.ts +69 -0
- package/dynamic-mixins/component.js +43 -0
- package/dynamic-mixins/component.js.map +1 -0
- package/dynamic-mixins/components/index.d.ts +1 -0
- package/dynamic-mixins/components/index.js +10 -0
- package/dynamic-mixins/components/index.js.map +1 -0
- package/dynamic-mixins/components/notification/component.d.ts +12 -0
- package/dynamic-mixins/components/notification/component.js +33 -0
- package/dynamic-mixins/components/notification/component.js.map +1 -0
- package/dynamic-mixins/components/notification/index.d.ts +1 -0
- package/dynamic-mixins/components/notification/index.js +10 -0
- package/dynamic-mixins/components/notification/index.js.map +1 -0
- package/dynamic-mixins/index.css +46 -0
- package/dynamic-mixins/index.d.ts +1 -0
- package/dynamic-mixins/index.js +10 -0
- package/dynamic-mixins/index.js.map +1 -0
- package/dynamic-mixins/index.module.css.js +8 -0
- package/dynamic-mixins/index.module.css.js.map +1 -0
- package/esm/index.css +10 -10
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/index.css +10 -10
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/index.css +10 -10
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/moderncssm/index.module.css +2 -0
- package/package.json +7 -7
- package/src/index.module.css +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { PortalProps } from '@alfalab/core-components-portal';
|
|
3
|
+
import { NotificationElement } from './components';
|
|
4
|
+
export declare type NotificationManagerProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
|
+
/**
|
|
6
|
+
* Массив нотификаций.
|
|
7
|
+
* В нотификации обязательно передавайте id.
|
|
8
|
+
*/
|
|
9
|
+
notifications: NotificationElement[];
|
|
10
|
+
/**
|
|
11
|
+
* Дополнительный класс (native prop)
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
16
|
+
*/
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* z-index компонента
|
|
20
|
+
*/
|
|
21
|
+
zIndex?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Отступ от верхнего края
|
|
24
|
+
*/
|
|
25
|
+
offset?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Удаление нотификации
|
|
28
|
+
*/
|
|
29
|
+
onRemoveNotification: (id: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Нода, компонент или функция возвращающая их
|
|
32
|
+
*
|
|
33
|
+
* Контейнер к которому будут добавляться порталы
|
|
34
|
+
*/
|
|
35
|
+
container?: PortalProps['getPortalContainer'];
|
|
36
|
+
};
|
|
37
|
+
export declare const NotificationManager: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
38
|
+
/**
|
|
39
|
+
* Массив нотификаций.
|
|
40
|
+
* В нотификации обязательно передавайте id.
|
|
41
|
+
*/
|
|
42
|
+
notifications: NotificationElement[];
|
|
43
|
+
/**
|
|
44
|
+
* Дополнительный класс (native prop)
|
|
45
|
+
*/
|
|
46
|
+
className?: string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
49
|
+
*/
|
|
50
|
+
dataTestId?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* z-index компонента
|
|
53
|
+
*/
|
|
54
|
+
zIndex?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Отступ от верхнего края
|
|
57
|
+
*/
|
|
58
|
+
offset?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Удаление нотификации
|
|
61
|
+
*/
|
|
62
|
+
onRemoveNotification: (id: string) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Нода, компонент или функция возвращающая их
|
|
65
|
+
*
|
|
66
|
+
* Контейнер к которому будут добавляться порталы
|
|
67
|
+
*/
|
|
68
|
+
container?: PortalProps['getPortalContainer'];
|
|
69
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var reactTransitionGroup = require('react-transition-group');
|
|
8
|
+
var cn = require('classnames');
|
|
9
|
+
var dynamicMixins$2 = require('@alfalab/core-components-portal/dynamic-mixins');
|
|
10
|
+
var dynamicMixins$1 = require('@alfalab/core-components-stack/dynamic-mixins');
|
|
11
|
+
var dynamicMixins = require('@alfalab/core-components-stack-context/dynamic-mixins');
|
|
12
|
+
var component = require('./components/notification/component.js');
|
|
13
|
+
var index_module = require('./index.module.css.js');
|
|
14
|
+
|
|
15
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
|
+
|
|
20
|
+
var CSS_TRANSITION_CLASS_NAMES = {
|
|
21
|
+
enter: index_module.enter,
|
|
22
|
+
enterActive: index_module.enterActive,
|
|
23
|
+
};
|
|
24
|
+
var TIMEOUT = {
|
|
25
|
+
exit: 0,
|
|
26
|
+
enter: 400,
|
|
27
|
+
};
|
|
28
|
+
var NotificationManager = React.forwardRef(function (_a, ref) {
|
|
29
|
+
var notifications = _a.notifications, className = _a.className, dataTestId = _a.dataTestId, _b = _a.zIndex, zIndex = _b === void 0 ? dynamicMixins.stackingOrder.TOAST : _b, _c = _a.style, style = _c === void 0 ? {} : _c, offset = _a.offset, onRemoveNotification = _a.onRemoveNotification, container = _a.container, restProps = tslib.__rest(_a, ["notifications", "className", "dataTestId", "zIndex", "style", "offset", "onRemoveNotification", "container"]);
|
|
30
|
+
return (React__default.default.createElement(dynamicMixins$1.Stack, { value: zIndex }, function (computedZIndex) { return (React__default.default.createElement(dynamicMixins$2.Portal, { getPortalContainer: container },
|
|
31
|
+
React__default.default.createElement("div", tslib.__assign({ className: cn__default.default(index_module.component, className), ref: ref, "data-test-id": dataTestId, style: tslib.__assign({ zIndex: computedZIndex, top: offset }, style) }, restProps),
|
|
32
|
+
React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element, index) {
|
|
33
|
+
var _a;
|
|
34
|
+
return (React__default.default.createElement(reactTransitionGroup.CSSTransition, { key: element.props.id, timeout: TIMEOUT, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
|
|
35
|
+
React__default.default.createElement(component.Notification, { element: element, className: cn__default.default(index_module.notification, (_a = {},
|
|
36
|
+
_a[index_module.withoutMargin] = offset && index === 0,
|
|
37
|
+
_a)), onRemoveNotification: onRemoveNotification })));
|
|
38
|
+
}))))); }));
|
|
39
|
+
});
|
|
40
|
+
NotificationManager.displayName = 'NotificationManager';
|
|
41
|
+
|
|
42
|
+
exports.NotificationManager = NotificationManager;
|
|
43
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\nimport cn from 'classnames';\n\nimport { Portal, PortalProps } from '@alfalab/core-components-portal';\nimport { Stack } from '@alfalab/core-components-stack';\nimport { stackingOrder } from '@alfalab/core-components-stack-context';\n\nimport { Notification, NotificationElement } from './components';\n\nimport styles from './index.module.css';\n\nexport type NotificationManagerProps = HTMLAttributes<HTMLDivElement> & {\n /**\n * Массив нотификаций.\n * В нотификации обязательно передавайте id.\n */\n notifications: NotificationElement[];\n\n /**\n * Дополнительный класс (native prop)\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * z-index компонента\n */\n zIndex?: number;\n\n /**\n * Отступ от верхнего края\n */\n offset?: number;\n\n /**\n * Удаление нотификации\n */\n onRemoveNotification: (id: string) => void;\n\n /**\n * Нода, компонент или функция возвращающая их\n *\n * Контейнер к которому будут добавляться порталы\n */\n container?: PortalProps['getPortalContainer'];\n};\n\nconst CSS_TRANSITION_CLASS_NAMES = {\n enter: styles.enter,\n enterActive: styles.enterActive,\n};\n\nconst TIMEOUT = {\n exit: 0,\n enter: 400,\n};\n\nexport const NotificationManager = forwardRef<HTMLDivElement, NotificationManagerProps>(\n (\n {\n notifications,\n className,\n dataTestId,\n zIndex = stackingOrder.TOAST,\n style = {},\n offset,\n onRemoveNotification,\n container,\n ...restProps\n },\n ref,\n ) => (\n <Stack value={zIndex}>\n {(computedZIndex) => (\n <Portal getPortalContainer={container}>\n <div\n className={cn(styles.component, className)}\n ref={ref}\n data-test-id={dataTestId}\n style={{\n zIndex: computedZIndex,\n top: offset,\n ...style,\n }}\n {...restProps}\n >\n <TransitionGroup>\n {notifications.map((element, index) => (\n <CSSTransition\n key={element.props.id}\n timeout={TIMEOUT}\n classNames={CSS_TRANSITION_CLASS_NAMES}\n unmountOnExit={true}\n >\n <Notification\n element={element}\n className={cn(styles.notification, {\n [styles.withoutMargin]: offset && index === 0,\n })}\n onRemoveNotification={onRemoveNotification}\n />\n </CSSTransition>\n ))}\n </TransitionGroup>\n </div>\n </Portal>\n )}\n </Stack>\n ),\n);\n\nNotificationManager.displayName = 'NotificationManager';\n"],"names":["styles","forwardRef","stackingOrder","__rest","React","Stack","Portal","__assign","cn","TransitionGroup","CSSTransition","Notification"],"mappings":";;;;;;;;;;;;;;;;;;;AAoDA,IAAM,0BAA0B,GAAG;IAC/B,KAAK,EAAEA,YAAM,CAAC,KAAK;IACnB,WAAW,EAAEA,YAAM,CAAC,WAAW;CAClC;AAED,IAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC;AACP,IAAA,KAAK,EAAE,GAAG;CACb;IAEY,mBAAmB,GAAGC,gBAAU,CACzC,UACI,EAUC,EACD,GAAG,EAAA;AAVC,IAAA,IAAA,aAAa,GAAA,EAAA,CAAA,aAAA,EACb,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,EAAA,GAAA,EAAA,CAAA,MAA4B,EAA5B,MAAM,GAAA,EAAA,KAAA,MAAA,GAAGC,2BAAa,CAAC,KAAK,GAAA,EAAA,EAC5B,EAAU,GAAA,EAAA,CAAA,KAAA,EAAV,KAAK,GAAG,EAAA,KAAA,MAAA,GAAA,EAAE,GAAA,EAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EACpB,SAAS,GAAA,EAAA,CAAA,SAAA,EACN,SAAS,GAAAC,YAAA,CAAA,EAAA,EAThB,8GAUC,CADe;AAGf,IAAA,QACDC,sBAAC,CAAA,aAAA,CAAAC,qBAAK,IAAC,KAAK,EAAE,MAAM,EACf,EAAA,UAAC,cAAc,EAAA,EAAK,QACjBD,sBAAA,CAAA,aAAA,CAACE,sBAAM,EAAC,EAAA,kBAAkB,EAAE,SAAS,EAAA;AACjC,QAAAF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAG,cAAA,CAAA,EACI,SAAS,EAAEC,mBAAE,CAACR,YAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAC1C,GAAG,EAAE,GAAG,EACM,cAAA,EAAA,UAAU,EACxB,KAAK,EACDO,cAAA,CAAA,EAAA,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,MAAM,EACR,EAAA,KAAK,KAER,SAAS,CAAA;YAEbH,sBAAC,CAAA,aAAA,CAAAK,oCAAe,QACX,aAAa,CAAC,GAAG,CAAC,UAAC,OAAO,EAAE,KAAK,EAAA;;gBAAK,QACnCL,qCAACM,kCAAa,EAAA,EACV,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,0BAA0B,EACtC,aAAa,EAAE,IAAI,EAAA;AAEnB,oBAAAN,sBAAA,CAAA,aAAA,CAACO,sBAAY,EAAA,EACT,OAAO,EAAE,OAAO,EAChB,SAAS,EAAEH,mBAAE,CAACR,YAAM,CAAC,YAAY,GAAA,EAAA,GAAA,EAAA;4BAC7B,EAAC,CAAAA,YAAM,CAAC,aAAa,CAAA,GAAG,MAAM,IAAI,KAAK,KAAK,CAAC;AAC/C,4BAAA,EAAA,EAAA,EACF,oBAAoB,EAAE,oBAAoB,EAAA,CAC5C,CACU;aACnB,CAAC,CACY,CAChB,CACD,EAhCQ,EAiCpB,CACG;AACX,CAAA;AAGL,mBAAmB,CAAC,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './notification';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
|
+
import { NotificationProps as CoreNotificationProps } from '@alfalab/core-components-notification';
|
|
3
|
+
export declare type NotificationElement = ReactElement<CoreNotificationProps & {
|
|
4
|
+
id: string;
|
|
5
|
+
}>;
|
|
6
|
+
declare type NotificationProps = {
|
|
7
|
+
element: NotificationElement;
|
|
8
|
+
className: string;
|
|
9
|
+
onRemoveNotification: (id: string) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const Notification: FC<NotificationProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var cn = require('classnames');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
12
|
+
|
|
13
|
+
var Notification = function (_a) {
|
|
14
|
+
var element = _a.element, className = _a.className, onRemoveNotification = _a.onRemoveNotification;
|
|
15
|
+
var _b = element.props, onClose = _b.onClose, onCloseTimeout = _b.onCloseTimeout;
|
|
16
|
+
var handleClose = React.useCallback(function () {
|
|
17
|
+
if (onClose) {
|
|
18
|
+
onClose();
|
|
19
|
+
}
|
|
20
|
+
onRemoveNotification(element.props.id);
|
|
21
|
+
}, [onClose, onRemoveNotification, element.props.id]);
|
|
22
|
+
var handleCloseTimeout = React.useCallback(function () {
|
|
23
|
+
if (onCloseTimeout) {
|
|
24
|
+
onCloseTimeout();
|
|
25
|
+
}
|
|
26
|
+
onRemoveNotification(element.props.id);
|
|
27
|
+
}, [element.props.id, onCloseTimeout, onRemoveNotification]);
|
|
28
|
+
var notificationProps = React.useMemo(function () { return (tslib.__assign(tslib.__assign({}, element.props), { visible: true, className: cn__default.default(className, element.props.className), usePortal: false, offset: 0, onClose: handleClose, onCloseTimeout: handleCloseTimeout })); }, [element, handleClose, handleCloseTimeout, className]);
|
|
29
|
+
return React.cloneElement(element, notificationProps);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.Notification = Notification;
|
|
33
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/notification/component.tsx"],"sourcesContent":["import { cloneElement, FC, ReactElement, useCallback, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { NotificationProps as CoreNotificationProps } from '@alfalab/core-components-notification';\n\nexport type NotificationElement = ReactElement<CoreNotificationProps & { id: string }>;\n\ntype NotificationProps = {\n element: NotificationElement;\n className: string;\n onRemoveNotification: (id: string) => void;\n};\n\nexport const Notification: FC<NotificationProps> = ({\n element,\n className,\n onRemoveNotification,\n}) => {\n const { onClose, onCloseTimeout } = element.props;\n\n const handleClose = useCallback(() => {\n if (onClose) {\n onClose();\n }\n\n onRemoveNotification(element.props.id);\n }, [onClose, onRemoveNotification, element.props.id]);\n\n const handleCloseTimeout = useCallback(() => {\n if (onCloseTimeout) {\n onCloseTimeout();\n }\n\n onRemoveNotification(element.props.id);\n }, [element.props.id, onCloseTimeout, onRemoveNotification]);\n\n const notificationProps = useMemo<CoreNotificationProps>(\n () => ({\n ...element.props,\n visible: true,\n className: cn(className, element.props.className),\n usePortal: false,\n offset: 0,\n onClose: handleClose,\n onCloseTimeout: handleCloseTimeout,\n }),\n [element, handleClose, handleCloseTimeout, className],\n );\n\n return cloneElement(element, notificationProps);\n};\n"],"names":["useCallback","useMemo","__assign","cn","cloneElement"],"mappings":";;;;;;;;;;;;AAaO,IAAM,YAAY,GAA0B,UAAC,EAInD,EAAA;AAHG,IAAA,IAAA,OAAO,aAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,oBAAoB,GAAA,EAAA,CAAA,oBAAA;IAEd,IAAA,EAAA,GAA8B,OAAO,CAAC,KAAK,EAAzC,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,cAAc,GAAA,EAAA,CAAA,cAAkB;IAEjD,IAAM,WAAW,GAAGA,iBAAW,CAAC,YAAA;AAC5B,QAAA,IAAI,OAAO,EAAE;AACT,YAAA,OAAO,EAAE;AACZ;AAED,QAAA,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1C,KAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAErD,IAAM,kBAAkB,GAAGA,iBAAW,CAAC,YAAA;AACnC,QAAA,IAAI,cAAc,EAAE;AAChB,YAAA,cAAc,EAAE;AACnB;AAED,QAAA,oBAAoB,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1C,KAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,cAAc,EAAE,oBAAoB,CAAC,CAAC;IAE5D,IAAM,iBAAiB,GAAGC,aAAO,CAC7B,YAAA,EAAM,QAAAC,cAAA,CAAAA,cAAA,CAAA,EAAA,EACC,OAAO,CAAC,KAAK,CAAA,EAAA,EAChB,OAAO,EAAE,IAAI,EACb,SAAS,EAAEC,mBAAE,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EACjD,SAAS,EAAE,KAAK,EAChB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,kBAAkB,EACpC,CAAA,EAAA,EAAA,EACF,CAAC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,CAAC,CACxD;AAED,IAAA,OAAOC,kBAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC;AACnD;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--gap-s: 12px;
|
|
3
|
+
--gap-xl: 24px;
|
|
4
|
+
--gap-4xl: 48px;
|
|
5
|
+
--gap-0: 0px;
|
|
6
|
+
--gap-12: var(--gap-s);
|
|
7
|
+
--gap-24: var(--gap-xl);
|
|
8
|
+
--gap-48: var(--gap-4xl);
|
|
9
|
+
} .notification-manager__component_19gii {
|
|
10
|
+
position: fixed;
|
|
11
|
+
top: var(--gap-0);
|
|
12
|
+
right: var(--gap-12);
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
16
|
+
width: calc(100vw - var(--gap-24));
|
|
17
|
+
margin-top: var(--gap-12);
|
|
18
|
+
will-change: transform
|
|
19
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__withoutMargin_19gii {
|
|
20
|
+
margin-top: var(--gap-0);
|
|
21
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__notification_19gii {
|
|
22
|
+
position: static;
|
|
23
|
+
} .notification-manager__enter_19gii {
|
|
24
|
+
visibility: hidden;
|
|
25
|
+
transform: translate(0, -500px);
|
|
26
|
+
} .notification-manager__enterActive_19gii {
|
|
27
|
+
visibility: visible;
|
|
28
|
+
transform: translate(0);
|
|
29
|
+
transition: transform 0.4s ease-out;
|
|
30
|
+
} @media (min-width: 600px) {
|
|
31
|
+
.notification-manager__component_19gii {
|
|
32
|
+
right: var(--gap-48);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
36
|
+
width: auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.notification-manager__enter_19gii {
|
|
40
|
+
transform: translate(100%, 0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.notification-manager__enterActive_19gii {
|
|
44
|
+
transform: translate(0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('./index.css');
|
|
4
|
+
|
|
5
|
+
var styles = {"component":"notification-manager__component_19gii","notification":"notification-manager__notification_19gii","withoutMargin":"notification-manager__withoutMargin_19gii","enter":"notification-manager__enter_19gii","enterActive":"notification-manager__enterActive_19gii"};
|
|
6
|
+
|
|
7
|
+
module.exports = styles;
|
|
8
|
+
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
package/esm/index.css
CHANGED
|
@@ -6,41 +6,41 @@
|
|
|
6
6
|
--gap-12: var(--gap-s);
|
|
7
7
|
--gap-24: var(--gap-xl);
|
|
8
8
|
--gap-48: var(--gap-4xl);
|
|
9
|
-
} .notification-
|
|
9
|
+
} .notification-manager__component_19gii {
|
|
10
10
|
position: fixed;
|
|
11
11
|
top: var(--gap-0);
|
|
12
12
|
right: var(--gap-12);
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
|
-
} .notification-
|
|
15
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
16
16
|
width: calc(100vw - var(--gap-24));
|
|
17
17
|
margin-top: var(--gap-12);
|
|
18
18
|
will-change: transform
|
|
19
|
-
} .notification-
|
|
19
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__withoutMargin_19gii {
|
|
20
20
|
margin-top: var(--gap-0);
|
|
21
|
-
} .notification-
|
|
21
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__notification_19gii {
|
|
22
22
|
position: static;
|
|
23
|
-
} .notification-
|
|
23
|
+
} .notification-manager__enter_19gii {
|
|
24
24
|
visibility: hidden;
|
|
25
25
|
transform: translate(0, -500px);
|
|
26
|
-
} .notification-
|
|
26
|
+
} .notification-manager__enterActive_19gii {
|
|
27
27
|
visibility: visible;
|
|
28
28
|
transform: translate(0);
|
|
29
29
|
transition: transform 0.4s ease-out;
|
|
30
30
|
} @media (min-width: 600px) {
|
|
31
|
-
.notification-
|
|
31
|
+
.notification-manager__component_19gii {
|
|
32
32
|
right: var(--gap-48);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.notification-
|
|
35
|
+
.notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
36
36
|
width: auto;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.notification-
|
|
39
|
+
.notification-manager__enter_19gii {
|
|
40
40
|
transform: translate(100%, 0);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.notification-
|
|
43
|
+
.notification-manager__enterActive_19gii {
|
|
44
44
|
transform: translate(0);
|
|
45
45
|
}
|
|
46
46
|
}
|
package/esm/index.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"component":"notification-
|
|
3
|
+
var styles = {"component":"notification-manager__component_19gii","notification":"notification-manager__notification_19gii","withoutMargin":"notification-manager__withoutMargin_19gii","enter":"notification-manager__enter_19gii","enterActive":"notification-manager__enterActive_19gii"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
package/index.css
CHANGED
|
@@ -6,41 +6,41 @@
|
|
|
6
6
|
--gap-12: var(--gap-s);
|
|
7
7
|
--gap-24: var(--gap-xl);
|
|
8
8
|
--gap-48: var(--gap-4xl);
|
|
9
|
-
} .notification-
|
|
9
|
+
} .notification-manager__component_19gii {
|
|
10
10
|
position: fixed;
|
|
11
11
|
top: var(--gap-0);
|
|
12
12
|
right: var(--gap-12);
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
|
-
} .notification-
|
|
15
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
16
16
|
width: calc(100vw - var(--gap-24));
|
|
17
17
|
margin-top: var(--gap-12);
|
|
18
18
|
will-change: transform
|
|
19
|
-
} .notification-
|
|
19
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__withoutMargin_19gii {
|
|
20
20
|
margin-top: var(--gap-0);
|
|
21
|
-
} .notification-
|
|
21
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__notification_19gii {
|
|
22
22
|
position: static;
|
|
23
|
-
} .notification-
|
|
23
|
+
} .notification-manager__enter_19gii {
|
|
24
24
|
visibility: hidden;
|
|
25
25
|
transform: translate(0, -500px);
|
|
26
|
-
} .notification-
|
|
26
|
+
} .notification-manager__enterActive_19gii {
|
|
27
27
|
visibility: visible;
|
|
28
28
|
transform: translate(0);
|
|
29
29
|
transition: transform 0.4s ease-out;
|
|
30
30
|
} @media (min-width: 600px) {
|
|
31
|
-
.notification-
|
|
31
|
+
.notification-manager__component_19gii {
|
|
32
32
|
right: var(--gap-48);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.notification-
|
|
35
|
+
.notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
36
36
|
width: auto;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.notification-
|
|
39
|
+
.notification-manager__enter_19gii {
|
|
40
40
|
transform: translate(100%, 0);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.notification-
|
|
43
|
+
.notification-manager__enterActive_19gii {
|
|
44
44
|
transform: translate(0);
|
|
45
45
|
}
|
|
46
46
|
}
|
package/index.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"notification-
|
|
5
|
+
var styles = {"component":"notification-manager__component_19gii","notification":"notification-manager__notification_19gii","withoutMargin":"notification-manager__withoutMargin_19gii","enter":"notification-manager__enter_19gii","enterActive":"notification-manager__enterActive_19gii"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
package/index.module.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
package/modern/index.css
CHANGED
|
@@ -6,41 +6,41 @@
|
|
|
6
6
|
--gap-12: var(--gap-s);
|
|
7
7
|
--gap-24: var(--gap-xl);
|
|
8
8
|
--gap-48: var(--gap-4xl);
|
|
9
|
-
} .notification-
|
|
9
|
+
} .notification-manager__component_19gii {
|
|
10
10
|
position: fixed;
|
|
11
11
|
top: var(--gap-0);
|
|
12
12
|
right: var(--gap-12);
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
|
-
} .notification-
|
|
15
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
16
16
|
width: calc(100vw - var(--gap-24));
|
|
17
17
|
margin-top: var(--gap-12);
|
|
18
18
|
will-change: transform
|
|
19
|
-
} .notification-
|
|
19
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__withoutMargin_19gii {
|
|
20
20
|
margin-top: var(--gap-0);
|
|
21
|
-
} .notification-
|
|
21
|
+
} .notification-manager__component_19gii .notification-manager__notification_19gii.notification-manager__notification_19gii {
|
|
22
22
|
position: static;
|
|
23
|
-
} .notification-
|
|
23
|
+
} .notification-manager__enter_19gii {
|
|
24
24
|
visibility: hidden;
|
|
25
25
|
transform: translate(0, -500px);
|
|
26
|
-
} .notification-
|
|
26
|
+
} .notification-manager__enterActive_19gii {
|
|
27
27
|
visibility: visible;
|
|
28
28
|
transform: translate(0);
|
|
29
29
|
transition: transform 0.4s ease-out;
|
|
30
30
|
} @media (min-width: 600px) {
|
|
31
|
-
.notification-
|
|
31
|
+
.notification-manager__component_19gii {
|
|
32
32
|
right: var(--gap-48);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.notification-
|
|
35
|
+
.notification-manager__component_19gii .notification-manager__notification_19gii {
|
|
36
36
|
width: auto;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
.notification-
|
|
39
|
+
.notification-manager__enter_19gii {
|
|
40
40
|
transform: translate(100%, 0);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
.notification-
|
|
43
|
+
.notification-manager__enterActive_19gii {
|
|
44
44
|
transform: translate(0);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"component":"notification-
|
|
3
|
+
const styles = {"component":"notification-manager__component_19gii","notification":"notification-manager__notification_19gii","withoutMargin":"notification-manager__withoutMargin_19gii","enter":"notification-manager__enter_19gii","enterActive":"notification-manager__enterActive_19gii"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-dynamic-mixins-index.css';\n\n.component {\n position: fixed;\n top: var(--gap-0);\n right: var(--gap-12);\n display: flex;\n flex-direction: column;\n}\n\n.component .notification {\n width: calc(100vw - var(--gap-24));\n margin-top: var(--gap-12);\n will-change: transform;\n\n &.withoutMargin {\n margin-top: var(--gap-0);\n }\n}\n\n.component .notification.notification {\n position: static;\n}\n\n.enter {\n visibility: hidden;\n transform: translate(0, -500px);\n}\n\n.enterActive {\n visibility: visible;\n transform: translate(0);\n transition: transform 0.4s ease-out;\n}\n\n@media (--tablet-s) {\n .component {\n right: var(--gap-48);\n }\n\n .component .notification {\n width: auto;\n }\n\n .enter {\n transform: translate(100%, 0);\n }\n\n .enterActive {\n transform: translate(0);\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,WAAW,CAAC,uCAAuC,CAAC,cAAc,CAAC,0CAA0C,CAAC,eAAe,CAAC,2CAA2C,CAAC,OAAO,CAAC,mCAAmC,CAAC,aAAa,CAAC,yCAAyC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-notification-manager",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0-snapshot-92b8690",
|
|
4
4
|
"description": "Notification manager",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"main": "index.js",
|
|
11
11
|
"module": "./esm/index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@alfalab/core-components-notification": "
|
|
14
|
-
"@alfalab/core-components-portal": "
|
|
15
|
-
"@alfalab/core-components-stack": "
|
|
13
|
+
"@alfalab/core-components-notification": "8.1.0-snapshot-92b8690",
|
|
14
|
+
"@alfalab/core-components-portal": "4.1.0-snapshot-92b8690",
|
|
15
|
+
"@alfalab/core-components-stack": "6.1.0-snapshot-92b8690",
|
|
16
16
|
"classnames": "^2.5.1",
|
|
17
17
|
"react-transition-group": "^4.4.5",
|
|
18
18
|
"tslib": "^2.4.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@alfalab/core-components-stack-context": "
|
|
21
|
+
"@alfalab/core-components-stack-context": "1.1.0-snapshot-92b8690",
|
|
22
22
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0",
|
|
23
23
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
24
24
|
},
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"access": "public",
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
|
-
"themesVersion": "14.
|
|
30
|
-
"varsVersion": "10.
|
|
29
|
+
"themesVersion": "14.1.0-snapshot-92b8690",
|
|
30
|
+
"varsVersion": "10.1.0-snapshot-92b8690"
|
|
31
31
|
}
|
package/src/index.module.css
CHANGED