@alfalab/core-components-notification-manager 5.3.8 → 5.3.9

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
@@ -15,20 +15,22 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
16
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
17
17
 
18
- var styles = {"component":"notification-manager__component_1rzni","notification":"notification-manager__notification_1rzni","enter":"notification-manager__enter_1rzni","enterActive":"notification-manager__enterActive_1rzni","exit":"notification-manager__exit_1rzni","exitActive":"notification-manager__exitActive_1rzni"};
18
+ var styles = {"component":"notification-manager__component_74pwl","notification":"notification-manager__notification_74pwl","enter":"notification-manager__enter_74pwl","enterActive":"notification-manager__enterActive_74pwl"};
19
19
  require('./index.css')
20
20
 
21
21
  var CSS_TRANSITION_CLASS_NAMES = {
22
22
  enter: styles.enter,
23
23
  enterActive: styles.enterActive,
24
- exit: styles.exit,
25
- exitActive: styles.exitActive,
24
+ };
25
+ var TIMEOUT = {
26
+ exit: 0,
27
+ enter: 400,
26
28
  };
27
29
  var NotificationManager = React.forwardRef(function (_a, ref) {
28
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, onRemoveNotification = _a.onRemoveNotification, container = _a.container, restProps = tslib.__rest(_a, ["notifications", "className", "dataTestId", "zIndex", "style", "onRemoveNotification", "container"]);
29
31
  return (React__default.default.createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) { return (React__default.default.createElement(coreComponentsPortal.Portal, { getPortalContainer: container },
30
32
  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 }, style) }, restProps),
31
- React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element) { return (React__default.default.createElement(reactTransitionGroup.CSSTransition, { key: element.props.id, timeout: 400, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
33
+ React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element) { return (React__default.default.createElement(reactTransitionGroup.CSSTransition, { key: element.props.id, timeout: TIMEOUT, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
32
34
  React__default.default.createElement(components_notification_component.Notification, { element: element, className: styles.notification, onRemoveNotification: onRemoveNotification }))); }))))); }));
33
35
  });
34
36
 
package/cssm/component.js CHANGED
@@ -20,14 +20,16 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
20
20
  var CSS_TRANSITION_CLASS_NAMES = {
21
21
  enter: styles__default.default.enter,
22
22
  enterActive: styles__default.default.enterActive,
23
- exit: styles__default.default.exit,
24
- exitActive: styles__default.default.exitActive,
23
+ };
24
+ var TIMEOUT = {
25
+ exit: 0,
26
+ enter: 400,
25
27
  };
26
28
  var NotificationManager = React.forwardRef(function (_a, ref) {
27
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, onRemoveNotification = _a.onRemoveNotification, container = _a.container, restProps = tslib.__rest(_a, ["notifications", "className", "dataTestId", "zIndex", "style", "onRemoveNotification", "container"]);
28
30
  return (React__default.default.createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) { return (React__default.default.createElement(coreComponentsPortal.Portal, { getPortalContainer: container },
29
31
  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 }, style) }, restProps),
30
- React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element) { return (React__default.default.createElement(reactTransitionGroup.CSSTransition, { key: element.props.id, timeout: 400, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
32
+ React__default.default.createElement(reactTransitionGroup.TransitionGroup, null, notifications.map(function (element) { return (React__default.default.createElement(reactTransitionGroup.CSSTransition, { key: element.props.id, timeout: TIMEOUT, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
31
33
  React__default.default.createElement(components_notification_component.Notification, { element: element, className: styles__default.default.notification, onRemoveNotification: onRemoveNotification }))); }))))); }));
32
34
  });
33
35
 
@@ -13,12 +13,15 @@
13
13
  }
14
14
 
15
15
  .component .notification {
16
- position: static;
17
16
  width: calc(100vw - var(--gap-xl));
18
17
  margin-top: var(--gap-s);
19
18
  will-change: transform;
20
19
  }
21
20
 
21
+ .component .notification.notification {
22
+ position: static;
23
+ }
24
+
22
25
  .enter {
23
26
  visibility: hidden;
24
27
  transform: translate(0, -500px);
@@ -30,16 +33,6 @@
30
33
  transition: transform 0.4s ease-out;
31
34
  }
32
35
 
33
- .exit {
34
- opacity: 0;
35
- }
36
-
37
- .exitActive {
38
- visibility: hidden;
39
- opacity: 0;
40
- transition: opacity 0.15s ease-in-out;
41
- }
42
-
43
36
  @media (min-width: 600px) {
44
37
  .component {
45
38
  right: var(--gap-4xl);
package/esm/component.js CHANGED
@@ -6,20 +6,22 @@ import { Portal } from '@alfalab/core-components-portal/esm';
6
6
  import { stackingOrder, Stack } from '@alfalab/core-components-stack/esm';
7
7
  import { Notification } from './components/notification/component.js';
8
8
 
9
- var styles = {"component":"notification-manager__component_1rzni","notification":"notification-manager__notification_1rzni","enter":"notification-manager__enter_1rzni","enterActive":"notification-manager__enterActive_1rzni","exit":"notification-manager__exit_1rzni","exitActive":"notification-manager__exitActive_1rzni"};
9
+ var styles = {"component":"notification-manager__component_74pwl","notification":"notification-manager__notification_74pwl","enter":"notification-manager__enter_74pwl","enterActive":"notification-manager__enterActive_74pwl"};
10
10
  require('./index.css')
11
11
 
12
12
  var CSS_TRANSITION_CLASS_NAMES = {
13
13
  enter: styles.enter,
14
14
  enterActive: styles.enterActive,
15
- exit: styles.exit,
16
- exitActive: styles.exitActive,
15
+ };
16
+ var TIMEOUT = {
17
+ exit: 0,
18
+ enter: 400,
17
19
  };
18
20
  var NotificationManager = forwardRef(function (_a, ref) {
19
21
  var notifications = _a.notifications, className = _a.className, dataTestId = _a.dataTestId, _b = _a.zIndex, zIndex = _b === void 0 ? stackingOrder.TOAST : _b, _c = _a.style, style = _c === void 0 ? {} : _c, onRemoveNotification = _a.onRemoveNotification, container = _a.container, restProps = __rest(_a, ["notifications", "className", "dataTestId", "zIndex", "style", "onRemoveNotification", "container"]);
20
22
  return (React.createElement(Stack, { value: zIndex }, function (computedZIndex) { return (React.createElement(Portal, { getPortalContainer: container },
21
23
  React.createElement("div", __assign({ className: cn(styles.component, className), ref: ref, "data-test-id": dataTestId, style: __assign({ zIndex: computedZIndex }, style) }, restProps),
22
- React.createElement(TransitionGroup, null, notifications.map(function (element) { return (React.createElement(CSSTransition, { key: element.props.id, timeout: 400, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
24
+ React.createElement(TransitionGroup, null, notifications.map(function (element) { return (React.createElement(CSSTransition, { key: element.props.id, timeout: TIMEOUT, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
23
25
  React.createElement(Notification, { element: element, className: styles.notification, onRemoveNotification: onRemoveNotification }))); }))))); }));
24
26
  });
25
27
 
package/esm/index.css CHANGED
@@ -1,11 +1,11 @@
1
- /* hash: 1i1mc */
1
+ /* hash: ef6or */
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_1rzni {
8
+ .notification-manager__component_74pwl {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  right: var(--gap-s);
@@ -13,48 +13,41 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .notification-manager__component_1rzni .notification-manager__notification_1rzni {
17
- position: static;
16
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl {
18
17
  width: calc(100vw - var(--gap-xl));
19
18
  margin-top: var(--gap-s);
20
19
  will-change: transform;
21
20
  }
22
21
 
23
- .notification-manager__enter_1rzni {
22
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl.notification-manager__notification_74pwl {
23
+ position: static;
24
+ }
25
+
26
+ .notification-manager__enter_74pwl {
24
27
  visibility: hidden;
25
28
  transform: translate(0, -500px);
26
29
  }
27
30
 
28
- .notification-manager__enterActive_1rzni {
31
+ .notification-manager__enterActive_74pwl {
29
32
  visibility: visible;
30
33
  transform: translate(0);
31
34
  transition: transform 0.4s ease-out;
32
35
  }
33
36
 
34
- .notification-manager__exit_1rzni {
35
- opacity: 0;
36
- }
37
-
38
- .notification-manager__exitActive_1rzni {
39
- visibility: hidden;
40
- opacity: 0;
41
- transition: opacity 0.15s ease-in-out;
42
- }
43
-
44
37
  @media (min-width: 600px) {
45
- .notification-manager__component_1rzni {
38
+ .notification-manager__component_74pwl {
46
39
  right: var(--gap-4xl);
47
40
  }
48
41
 
49
- .notification-manager__component_1rzni .notification-manager__notification_1rzni {
42
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl {
50
43
  width: auto;
51
44
  }
52
45
 
53
- .notification-manager__enter_1rzni {
46
+ .notification-manager__enter_74pwl {
54
47
  transform: translate(100%, 0);
55
48
  }
56
49
 
57
- .notification-manager__enterActive_1rzni {
50
+ .notification-manager__enterActive_74pwl {
58
51
  transform: translate(0);
59
52
  }
60
53
  }
package/index.css CHANGED
@@ -1,11 +1,11 @@
1
- /* hash: 1i1mc */
1
+ /* hash: ef6or */
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_1rzni {
8
+ .notification-manager__component_74pwl {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  right: var(--gap-s);
@@ -13,48 +13,41 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .notification-manager__component_1rzni .notification-manager__notification_1rzni {
17
- position: static;
16
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl {
18
17
  width: calc(100vw - var(--gap-xl));
19
18
  margin-top: var(--gap-s);
20
19
  will-change: transform;
21
20
  }
22
21
 
23
- .notification-manager__enter_1rzni {
22
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl.notification-manager__notification_74pwl {
23
+ position: static;
24
+ }
25
+
26
+ .notification-manager__enter_74pwl {
24
27
  visibility: hidden;
25
28
  transform: translate(0, -500px);
26
29
  }
27
30
 
28
- .notification-manager__enterActive_1rzni {
31
+ .notification-manager__enterActive_74pwl {
29
32
  visibility: visible;
30
33
  transform: translate(0);
31
34
  transition: transform 0.4s ease-out;
32
35
  }
33
36
 
34
- .notification-manager__exit_1rzni {
35
- opacity: 0;
36
- }
37
-
38
- .notification-manager__exitActive_1rzni {
39
- visibility: hidden;
40
- opacity: 0;
41
- transition: opacity 0.15s ease-in-out;
42
- }
43
-
44
37
  @media (min-width: 600px) {
45
- .notification-manager__component_1rzni {
38
+ .notification-manager__component_74pwl {
46
39
  right: var(--gap-4xl);
47
40
  }
48
41
 
49
- .notification-manager__component_1rzni .notification-manager__notification_1rzni {
42
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl {
50
43
  width: auto;
51
44
  }
52
45
 
53
- .notification-manager__enter_1rzni {
46
+ .notification-manager__enter_74pwl {
54
47
  transform: translate(100%, 0);
55
48
  }
56
49
 
57
- .notification-manager__enterActive_1rzni {
50
+ .notification-manager__enterActive_74pwl {
58
51
  transform: translate(0);
59
52
  }
60
53
  }
@@ -5,21 +5,23 @@ import { Portal } from '@alfalab/core-components-portal/modern';
5
5
  import { Stack, stackingOrder } from '@alfalab/core-components-stack/modern';
6
6
  import { Notification } from './components/notification/component.js';
7
7
 
8
- const styles = {"component":"notification-manager__component_1rzni","notification":"notification-manager__notification_1rzni","enter":"notification-manager__enter_1rzni","enterActive":"notification-manager__enterActive_1rzni","exit":"notification-manager__exit_1rzni","exitActive":"notification-manager__exitActive_1rzni"};
8
+ const styles = {"component":"notification-manager__component_74pwl","notification":"notification-manager__notification_74pwl","enter":"notification-manager__enter_74pwl","enterActive":"notification-manager__enterActive_74pwl"};
9
9
  require('./index.css')
10
10
 
11
11
  const CSS_TRANSITION_CLASS_NAMES = {
12
12
  enter: styles.enter,
13
13
  enterActive: styles.enterActive,
14
- exit: styles.exit,
15
- exitActive: styles.exitActive,
14
+ };
15
+ const TIMEOUT = {
16
+ exit: 0,
17
+ enter: 400,
16
18
  };
17
19
  const NotificationManager = forwardRef(({ notifications, className, dataTestId, zIndex = stackingOrder.TOAST, style = {}, onRemoveNotification, container, ...restProps }, ref) => (React.createElement(Stack, { value: zIndex }, (computedZIndex) => (React.createElement(Portal, { getPortalContainer: container },
18
20
  React.createElement("div", { className: cn(styles.component, className), ref: ref, "data-test-id": dataTestId, style: {
19
21
  zIndex: computedZIndex,
20
22
  ...style,
21
23
  }, ...restProps },
22
- React.createElement(TransitionGroup, null, notifications.map((element) => (React.createElement(CSSTransition, { key: element.props.id, timeout: 400, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
24
+ React.createElement(TransitionGroup, null, notifications.map((element) => (React.createElement(CSSTransition, { key: element.props.id, timeout: TIMEOUT, classNames: CSS_TRANSITION_CLASS_NAMES, unmountOnExit: true },
23
25
  React.createElement(Notification, { element: element, className: styles.notification, onRemoveNotification: onRemoveNotification })))))))))));
24
26
 
25
27
  export { NotificationManager };
package/modern/index.css CHANGED
@@ -1,11 +1,11 @@
1
- /* hash: 1i1mc */
1
+ /* hash: ef6or */
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_1rzni {
8
+ .notification-manager__component_74pwl {
9
9
  position: fixed;
10
10
  top: 0;
11
11
  right: var(--gap-s);
@@ -13,48 +13,41 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .notification-manager__component_1rzni .notification-manager__notification_1rzni {
17
- position: static;
16
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl {
18
17
  width: calc(100vw - var(--gap-xl));
19
18
  margin-top: var(--gap-s);
20
19
  will-change: transform;
21
20
  }
22
21
 
23
- .notification-manager__enter_1rzni {
22
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl.notification-manager__notification_74pwl {
23
+ position: static;
24
+ }
25
+
26
+ .notification-manager__enter_74pwl {
24
27
  visibility: hidden;
25
28
  transform: translate(0, -500px);
26
29
  }
27
30
 
28
- .notification-manager__enterActive_1rzni {
31
+ .notification-manager__enterActive_74pwl {
29
32
  visibility: visible;
30
33
  transform: translate(0);
31
34
  transition: transform 0.4s ease-out;
32
35
  }
33
36
 
34
- .notification-manager__exit_1rzni {
35
- opacity: 0;
36
- }
37
-
38
- .notification-manager__exitActive_1rzni {
39
- visibility: hidden;
40
- opacity: 0;
41
- transition: opacity 0.15s ease-in-out;
42
- }
43
-
44
37
  @media (min-width: 600px) {
45
- .notification-manager__component_1rzni {
38
+ .notification-manager__component_74pwl {
46
39
  right: var(--gap-4xl);
47
40
  }
48
41
 
49
- .notification-manager__component_1rzni .notification-manager__notification_1rzni {
42
+ .notification-manager__component_74pwl .notification-manager__notification_74pwl {
50
43
  width: auto;
51
44
  }
52
45
 
53
- .notification-manager__enter_1rzni {
46
+ .notification-manager__enter_74pwl {
54
47
  transform: translate(100%, 0);
55
48
  }
56
49
 
57
- .notification-manager__enterActive_1rzni {
50
+ .notification-manager__enterActive_74pwl {
58
51
  transform: translate(0);
59
52
  }
60
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-notification-manager",
3
- "version": "5.3.8",
3
+ "version": "5.3.9",
4
4
  "description": "Notification manager",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-notification": "^6.2.8",
17
+ "@alfalab/core-components-notification": "^6.2.9",
18
18
  "@alfalab/core-components-portal": "^3.2.0",
19
19
  "@alfalab/core-components-stack": "^4.1.0",
20
20
  "classnames": "^2.3.1",
package/src/component.tsx CHANGED
@@ -47,8 +47,11 @@ export type NotificationManagerProps = HTMLAttributes<HTMLDivElement> & {
47
47
  const CSS_TRANSITION_CLASS_NAMES = {
48
48
  enter: styles.enter,
49
49
  enterActive: styles.enterActive,
50
- exit: styles.exit,
51
- exitActive: styles.exitActive,
50
+ };
51
+
52
+ const TIMEOUT = {
53
+ exit: 0,
54
+ enter: 400,
52
55
  };
53
56
 
54
57
  export const NotificationManager = forwardRef<HTMLDivElement, NotificationManagerProps>(
@@ -82,7 +85,7 @@ export const NotificationManager = forwardRef<HTMLDivElement, NotificationManage
82
85
  {notifications.map((element) => (
83
86
  <CSSTransition
84
87
  key={element.props.id}
85
- timeout={400}
88
+ timeout={TIMEOUT}
86
89
  classNames={CSS_TRANSITION_CLASS_NAMES}
87
90
  unmountOnExit={true}
88
91
  >
@@ -9,12 +9,15 @@
9
9
  }
10
10
 
11
11
  .component .notification {
12
- position: static;
13
12
  width: calc(100vw - var(--gap-xl));
14
13
  margin-top: var(--gap-s);
15
14
  will-change: transform;
16
15
  }
17
16
 
17
+ .component .notification.notification {
18
+ position: static;
19
+ }
20
+
18
21
  .enter {
19
22
  visibility: hidden;
20
23
  transform: translate(0, -500px);
@@ -26,16 +29,6 @@
26
29
  transition: transform 0.4s ease-out;
27
30
  }
28
31
 
29
- .exit {
30
- opacity: 0;
31
- }
32
-
33
- .exitActive {
34
- visibility: hidden;
35
- opacity: 0;
36
- transition: opacity 0.15s ease-in-out;
37
- }
38
-
39
32
  @media (--tablet-s) {
40
33
  .component {
41
34
  right: var(--gap-4xl);