@alfalab/core-components-notification-manager 5.4.6 → 5.4.7

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.js CHANGED
@@ -8,6 +8,7 @@ var reactTransitionGroup = require('react-transition-group');
8
8
  var cn = require('classnames');
9
9
  var coreComponentsPortal = require('@alfalab/core-components-portal');
10
10
  var coreComponentsStack = require('@alfalab/core-components-stack');
11
+ var stackContext = require('@alfalab/stack-context');
11
12
  var components_notification_component = require('./components/notification/component.js');
12
13
 
13
14
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -15,7 +16,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
16
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
17
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
17
18
 
18
- var styles = {"component":"notification-manager__component_1ssbc","notification":"notification-manager__notification_1ssbc","withoutMargin":"notification-manager__withoutMargin_1ssbc","enter":"notification-manager__enter_1ssbc","enterActive":"notification-manager__enterActive_1ssbc"};
19
+ var styles = {"component":"notification-manager__component_sxnjf","notification":"notification-manager__notification_sxnjf","withoutMargin":"notification-manager__withoutMargin_sxnjf","enter":"notification-manager__enter_sxnjf","enterActive":"notification-manager__enterActive_sxnjf"};
19
20
  require('./index.css')
20
21
 
21
22
  var CSS_TRANSITION_CLASS_NAMES = {
@@ -27,7 +28,7 @@ var TIMEOUT = {
27
28
  enter: 400,
28
29
  };
29
30
  var NotificationManager = React.forwardRef(function (_a, ref) {
30
- var notifications = _a.notifications, className = _a.className, dataTestId = _a.dataTestId, _b = _a.zIndex, zIndex = _b === void 0 ? coreComponentsStack.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"]);
31
+ var notifications = _a.notifications, className = _a.className, dataTestId = _a.dataTestId, _b = _a.zIndex, zIndex = _b === void 0 ? stackContext.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"]);
31
32
  return (React__default.default.createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) { return (React__default.default.createElement(coreComponentsPortal.Portal, { getPortalContainer: container },
32
33
  React__default.default.createElement("div", tslib.__assign({ className: cn__default.default(styles.component, className), ref: ref, "data-test-id": dataTestId, style: tslib.__assign({ zIndex: computedZIndex, top: offset }, style) }, restProps),
33
34
  React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element, index) {
package/cssm/component.js CHANGED
@@ -8,6 +8,7 @@ var reactTransitionGroup = require('react-transition-group');
8
8
  var cn = require('classnames');
9
9
  var coreComponentsPortal = require('@alfalab/core-components-portal/cssm');
10
10
  var coreComponentsStack = require('@alfalab/core-components-stack/cssm');
11
+ var stackContext = require('@alfalab/stack-context');
11
12
  var components_notification_component = require('./components/notification/component.js');
12
13
  var styles = require('./index.module.css');
13
14
 
@@ -26,7 +27,7 @@ var TIMEOUT = {
26
27
  enter: 400,
27
28
  };
28
29
  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 ? coreComponentsStack.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
+ var notifications = _a.notifications, className = _a.className, dataTestId = _a.dataTestId, _b = _a.zIndex, zIndex = _b === void 0 ? stackContext.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
31
  return (React__default.default.createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) { return (React__default.default.createElement(coreComponentsPortal.Portal, { getPortalContainer: container },
31
32
  React__default.default.createElement("div", tslib.__assign({ className: cn__default.default(styles__default.default.component, className), ref: ref, "data-test-id": dataTestId, style: tslib.__assign({ zIndex: computedZIndex, top: offset }, style) }, restProps),
32
33
  React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element, index) {
package/esm/component.js CHANGED
@@ -3,10 +3,11 @@ import React, { forwardRef } from 'react';
3
3
  import { TransitionGroup, CSSTransition } from 'react-transition-group';
4
4
  import cn from 'classnames';
5
5
  import { Portal } from '@alfalab/core-components-portal/esm';
6
- import { stackingOrder, Stack } from '@alfalab/core-components-stack/esm';
6
+ import { Stack } from '@alfalab/core-components-stack/esm';
7
+ import { stackingOrder } from '@alfalab/stack-context';
7
8
  import { Notification } from './components/notification/component.js';
8
9
 
9
- var styles = {"component":"notification-manager__component_1ssbc","notification":"notification-manager__notification_1ssbc","withoutMargin":"notification-manager__withoutMargin_1ssbc","enter":"notification-manager__enter_1ssbc","enterActive":"notification-manager__enterActive_1ssbc"};
10
+ var styles = {"component":"notification-manager__component_sxnjf","notification":"notification-manager__notification_sxnjf","withoutMargin":"notification-manager__withoutMargin_sxnjf","enter":"notification-manager__enter_sxnjf","enterActive":"notification-manager__enterActive_sxnjf"};
10
11
  require('./index.css')
11
12
 
12
13
  var CSS_TRANSITION_CLASS_NAMES = {
package/esm/index.css CHANGED
@@ -1,11 +1,11 @@
1
- /* hash: 6u8rp */
1
+ /* hash: ufal0 */
2
2
  :root {
3
3
  --gap-s: 12px;
4
4
  --gap-xl: 24px;
5
5
  --gap-4xl: 48px;
6
6
  }
7
7
 
8
- .notification-manager__component_1ssbc {
8
+ .notification-manager__component_sxnjf {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  right: var(--gap-s);
@@ -13,45 +13,45 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc {
16
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf {
17
17
  width: calc(100vw - var(--gap-xl));
18
18
  margin-top: var(--gap-s);
19
19
  will-change: transform
20
20
  }
21
21
 
22
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc.notification-manager__withoutMargin_1ssbc {
22
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf.notification-manager__withoutMargin_sxnjf {
23
23
  margin-top: 0;
24
24
  }
25
25
 
26
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc.notification-manager__notification_1ssbc {
26
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf.notification-manager__notification_sxnjf {
27
27
  position: static;
28
28
  }
29
29
 
30
- .notification-manager__enter_1ssbc {
30
+ .notification-manager__enter_sxnjf {
31
31
  visibility: hidden;
32
32
  transform: translate(0, -500px);
33
33
  }
34
34
 
35
- .notification-manager__enterActive_1ssbc {
35
+ .notification-manager__enterActive_sxnjf {
36
36
  visibility: visible;
37
37
  transform: translate(0);
38
38
  transition: transform 0.4s ease-out;
39
39
  }
40
40
 
41
41
  @media (min-width: 600px) {
42
- .notification-manager__component_1ssbc {
42
+ .notification-manager__component_sxnjf {
43
43
  right: var(--gap-4xl);
44
44
  }
45
45
 
46
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc {
46
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf {
47
47
  width: auto;
48
48
  }
49
49
 
50
- .notification-manager__enter_1ssbc {
50
+ .notification-manager__enter_sxnjf {
51
51
  transform: translate(100%, 0);
52
52
  }
53
53
 
54
- .notification-manager__enterActive_1ssbc {
54
+ .notification-manager__enterActive_sxnjf {
55
55
  transform: translate(0);
56
56
  }
57
57
  }
package/index.css CHANGED
@@ -1,11 +1,11 @@
1
- /* hash: 6u8rp */
1
+ /* hash: ufal0 */
2
2
  :root {
3
3
  --gap-s: 12px;
4
4
  --gap-xl: 24px;
5
5
  --gap-4xl: 48px;
6
6
  }
7
7
 
8
- .notification-manager__component_1ssbc {
8
+ .notification-manager__component_sxnjf {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  right: var(--gap-s);
@@ -13,45 +13,45 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc {
16
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf {
17
17
  width: calc(100vw - var(--gap-xl));
18
18
  margin-top: var(--gap-s);
19
19
  will-change: transform
20
20
  }
21
21
 
22
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc.notification-manager__withoutMargin_1ssbc {
22
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf.notification-manager__withoutMargin_sxnjf {
23
23
  margin-top: 0;
24
24
  }
25
25
 
26
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc.notification-manager__notification_1ssbc {
26
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf.notification-manager__notification_sxnjf {
27
27
  position: static;
28
28
  }
29
29
 
30
- .notification-manager__enter_1ssbc {
30
+ .notification-manager__enter_sxnjf {
31
31
  visibility: hidden;
32
32
  transform: translate(0, -500px);
33
33
  }
34
34
 
35
- .notification-manager__enterActive_1ssbc {
35
+ .notification-manager__enterActive_sxnjf {
36
36
  visibility: visible;
37
37
  transform: translate(0);
38
38
  transition: transform 0.4s ease-out;
39
39
  }
40
40
 
41
41
  @media (min-width: 600px) {
42
- .notification-manager__component_1ssbc {
42
+ .notification-manager__component_sxnjf {
43
43
  right: var(--gap-4xl);
44
44
  }
45
45
 
46
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc {
46
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf {
47
47
  width: auto;
48
48
  }
49
49
 
50
- .notification-manager__enter_1ssbc {
50
+ .notification-manager__enter_sxnjf {
51
51
  transform: translate(100%, 0);
52
52
  }
53
53
 
54
- .notification-manager__enterActive_1ssbc {
54
+ .notification-manager__enterActive_sxnjf {
55
55
  transform: translate(0);
56
56
  }
57
57
  }
@@ -2,10 +2,11 @@ import React, { forwardRef } from 'react';
2
2
  import { TransitionGroup, CSSTransition } from 'react-transition-group';
3
3
  import cn from 'classnames';
4
4
  import { Portal } from '@alfalab/core-components-portal/modern';
5
- import { Stack, stackingOrder } from '@alfalab/core-components-stack/modern';
5
+ import { Stack } from '@alfalab/core-components-stack/modern';
6
+ import { stackingOrder } from '@alfalab/stack-context';
6
7
  import { Notification } from './components/notification/component.js';
7
8
 
8
- const styles = {"component":"notification-manager__component_1ssbc","notification":"notification-manager__notification_1ssbc","withoutMargin":"notification-manager__withoutMargin_1ssbc","enter":"notification-manager__enter_1ssbc","enterActive":"notification-manager__enterActive_1ssbc"};
9
+ const styles = {"component":"notification-manager__component_sxnjf","notification":"notification-manager__notification_sxnjf","withoutMargin":"notification-manager__withoutMargin_sxnjf","enter":"notification-manager__enter_sxnjf","enterActive":"notification-manager__enterActive_sxnjf"};
9
10
  require('./index.css')
10
11
 
11
12
  const CSS_TRANSITION_CLASS_NAMES = {
package/modern/index.css CHANGED
@@ -1,11 +1,11 @@
1
- /* hash: 6u8rp */
1
+ /* hash: ufal0 */
2
2
  :root {
3
3
  --gap-s: 12px;
4
4
  --gap-xl: 24px;
5
5
  --gap-4xl: 48px;
6
6
  }
7
7
 
8
- .notification-manager__component_1ssbc {
8
+ .notification-manager__component_sxnjf {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  right: var(--gap-s);
@@ -13,45 +13,45 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc {
16
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf {
17
17
  width: calc(100vw - var(--gap-xl));
18
18
  margin-top: var(--gap-s);
19
19
  will-change: transform
20
20
  }
21
21
 
22
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc.notification-manager__withoutMargin_1ssbc {
22
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf.notification-manager__withoutMargin_sxnjf {
23
23
  margin-top: 0;
24
24
  }
25
25
 
26
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc.notification-manager__notification_1ssbc {
26
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf.notification-manager__notification_sxnjf {
27
27
  position: static;
28
28
  }
29
29
 
30
- .notification-manager__enter_1ssbc {
30
+ .notification-manager__enter_sxnjf {
31
31
  visibility: hidden;
32
32
  transform: translate(0, -500px);
33
33
  }
34
34
 
35
- .notification-manager__enterActive_1ssbc {
35
+ .notification-manager__enterActive_sxnjf {
36
36
  visibility: visible;
37
37
  transform: translate(0);
38
38
  transition: transform 0.4s ease-out;
39
39
  }
40
40
 
41
41
  @media (min-width: 600px) {
42
- .notification-manager__component_1ssbc {
42
+ .notification-manager__component_sxnjf {
43
43
  right: var(--gap-4xl);
44
44
  }
45
45
 
46
- .notification-manager__component_1ssbc .notification-manager__notification_1ssbc {
46
+ .notification-manager__component_sxnjf .notification-manager__notification_sxnjf {
47
47
  width: auto;
48
48
  }
49
49
 
50
- .notification-manager__enter_1ssbc {
50
+ .notification-manager__enter_sxnjf {
51
51
  transform: translate(100%, 0);
52
52
  }
53
53
 
54
- .notification-manager__enterActive_1ssbc {
54
+ .notification-manager__enterActive_sxnjf {
55
55
  transform: translate(0);
56
56
  }
57
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-notification-manager",
3
- "version": "5.4.6",
3
+ "version": "5.4.7",
4
4
  "description": "Notification manager",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,9 +14,9 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-notification": "^7.0.4",
17
+ "@alfalab/core-components-notification": "^7.0.5",
18
18
  "@alfalab/core-components-portal": "^3.3.0",
19
- "@alfalab/core-components-stack": "^4.1.0",
19
+ "@alfalab/core-components-stack": "^5.0.0",
20
20
  "classnames": "^2.3.1",
21
21
  "react-transition-group": "^4.4.5",
22
22
  "tslib": "^2.4.0"
package/src/component.tsx CHANGED
@@ -3,7 +3,8 @@ import { CSSTransition, TransitionGroup } from 'react-transition-group';
3
3
  import cn from 'classnames';
4
4
 
5
5
  import { Portal, PortalProps } from '@alfalab/core-components-portal';
6
- import { Stack, stackingOrder } from '@alfalab/core-components-stack';
6
+ import { Stack } from '@alfalab/core-components-stack';
7
+ import { stackingOrder } from '@alfalab/stack-context';
7
8
 
8
9
  import { Notification, NotificationElement } from './components';
9
10