@alfalab/core-components-notification 6.1.14 → 6.1.16
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 +6 -44
- package/cssm/Component.js +5 -43
- package/cssm/index.js +1 -0
- package/esm/Component.js +2 -40
- package/esm/index.css +8 -8
- package/esm/index.js +1 -0
- package/index.css +8 -8
- package/index.js +1 -0
- package/modern/Component.js +1 -1
- package/modern/index.css +8 -8
- package/package.json +6 -5
package/Component.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var tslib = require('tslib');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var mergeRefs = require('react-merge-refs');
|
|
5
6
|
var reactSwipeable = require('react-swipeable');
|
|
@@ -17,51 +18,12 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
|
17
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
19
|
var elementClosest__default = /*#__PURE__*/_interopDefaultCompat(elementClosest);
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
Copyright (c) Microsoft Corporation.
|
|
22
|
-
|
|
23
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
24
|
-
purpose with or without fee is hereby granted.
|
|
25
|
-
|
|
26
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
27
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
28
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
29
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
30
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
31
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
32
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
33
|
-
***************************************************************************** */
|
|
34
|
-
var __assign = function () {
|
|
35
|
-
__assign = Object.assign || function __assign(t) {
|
|
36
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
37
|
-
s = arguments[i];
|
|
38
|
-
for (var p in s)
|
|
39
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
40
|
-
t[p] = s[p];
|
|
41
|
-
}
|
|
42
|
-
return t;
|
|
43
|
-
};
|
|
44
|
-
return __assign.apply(this, arguments);
|
|
45
|
-
};
|
|
46
|
-
function __rest(s, e) {
|
|
47
|
-
var t = {};
|
|
48
|
-
for (var p in s)
|
|
49
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
var styles = {"notificationComponent":"notification__notificationComponent_1h6xk","isVisible":"notification__isVisible_1h6xk","isClosing":"notification__isClosing_1h6xk","toastContent":"notification__toastContent_1h6xk","actionSection":"notification__actionSection_1h6xk"};
|
|
21
|
+
var styles = {"notificationComponent":"notification__notificationComponent_rkhyt","isVisible":"notification__isVisible_rkhyt","isClosing":"notification__isClosing_rkhyt","toastContent":"notification__toastContent_rkhyt","actionSection":"notification__actionSection_rkhyt"};
|
|
60
22
|
require('./index.css')
|
|
61
23
|
|
|
62
24
|
var notificationClassNameSelector = ".".concat(styles.notificationComponent);
|
|
63
25
|
var Notification = React.forwardRef(function (_a, ref) {
|
|
64
|
-
var className = _a.className, actionSectionClassName = _a.actionSectionClassName, children = _a.children, visible = _a.visible, _b = _a.offset, offset = _b === void 0 ? 108 : _b, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, _d = _a.autoCloseDelay, autoCloseDelay = _d === void 0 ? 5000 : _d, _e = _a.usePortal, usePortal = _e === void 0 ? true : _e, _f = _a.zIndex, zIndex = _f === void 0 ? coreComponentsStack.stackingOrder.TOAST : _f, style = _a.style, onClose = _a.onClose, onCloseTimeout = _a.onCloseTimeout, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onClickOutside = _a.onClickOutside, restProps = __rest(_a, ["className", "actionSectionClassName", "children", "visible", "offset", "hasCloser", "autoCloseDelay", "usePortal", "zIndex", "style", "onClose", "onCloseTimeout", "onMouseEnter", "onMouseLeave", "onClickOutside"]);
|
|
26
|
+
var className = _a.className, actionSectionClassName = _a.actionSectionClassName, children = _a.children, visible = _a.visible, _b = _a.offset, offset = _b === void 0 ? 108 : _b, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, _d = _a.autoCloseDelay, autoCloseDelay = _d === void 0 ? 5000 : _d, _e = _a.usePortal, usePortal = _e === void 0 ? true : _e, _f = _a.zIndex, zIndex = _f === void 0 ? coreComponentsStack.stackingOrder.TOAST : _f, style = _a.style, onClose = _a.onClose, onCloseTimeout = _a.onCloseTimeout, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onClickOutside = _a.onClickOutside, restProps = tslib.__rest(_a, ["className", "actionSectionClassName", "children", "visible", "offset", "hasCloser", "autoCloseDelay", "usePortal", "zIndex", "style", "onClose", "onCloseTimeout", "onMouseEnter", "onMouseLeave", "onClickOutside"]);
|
|
65
27
|
var notificationRef = React.useRef(null);
|
|
66
28
|
var autoCloseTimeoutRef = React.useRef(0);
|
|
67
29
|
var closeTimeoutRef = React.useRef(0);
|
|
@@ -133,11 +95,11 @@ var Notification = React.forwardRef(function (_a, ref) {
|
|
|
133
95
|
return (React__default.default.createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) {
|
|
134
96
|
var _a;
|
|
135
97
|
return (React__default.default.createElement(Wrapper, null,
|
|
136
|
-
React__default.default.createElement("div", __assign({}, swipeableHandlers),
|
|
137
|
-
React__default.default.createElement(coreComponentsToastPlate.ToastPlate, __assign({ className: cn__default.default(styles.notificationComponent, (_a = {},
|
|
98
|
+
React__default.default.createElement("div", tslib.__assign({}, swipeableHandlers),
|
|
99
|
+
React__default.default.createElement(coreComponentsToastPlate.ToastPlate, tslib.__assign({ className: cn__default.default(styles.notificationComponent, (_a = {},
|
|
138
100
|
_a[styles.isVisible] = visible,
|
|
139
101
|
_a[styles.isClosing] = isClosing,
|
|
140
|
-
_a), className), contentClassName: styles.toastContent, actionSectionClassName: cn__default.default(actionSectionClassName, styles.actionSection), style: __assign({ top: offset, zIndex: computedZIndex }, style), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: mergeRefs__default.default([ref, notificationRef]), role: visible ? 'alert' : undefined, hasCloser: hasCloser, onClose: onClose }, restProps), children))));
|
|
102
|
+
_a), className), contentClassName: styles.toastContent, actionSectionClassName: cn__default.default(actionSectionClassName, styles.actionSection), style: tslib.__assign({ top: offset, zIndex: computedZIndex }, style), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: mergeRefs__default.default([ref, notificationRef]), role: visible ? 'alert' : undefined, hasCloser: hasCloser, onClose: onClose }, restProps), children))));
|
|
141
103
|
}));
|
|
142
104
|
});
|
|
143
105
|
|
package/cssm/Component.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var tslib = require('tslib');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var mergeRefs = require('react-merge-refs');
|
|
5
6
|
var reactSwipeable = require('react-swipeable');
|
|
@@ -19,48 +20,9 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
19
20
|
var elementClosest__default = /*#__PURE__*/_interopDefaultCompat(elementClosest);
|
|
20
21
|
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
21
22
|
|
|
22
|
-
/******************************************************************************
|
|
23
|
-
Copyright (c) Microsoft Corporation.
|
|
24
|
-
|
|
25
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
26
|
-
purpose with or without fee is hereby granted.
|
|
27
|
-
|
|
28
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
29
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
30
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
31
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
32
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
33
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
34
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
35
|
-
***************************************************************************** */
|
|
36
|
-
var __assign = function () {
|
|
37
|
-
__assign = Object.assign || function __assign(t) {
|
|
38
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39
|
-
s = arguments[i];
|
|
40
|
-
for (var p in s)
|
|
41
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
42
|
-
t[p] = s[p];
|
|
43
|
-
}
|
|
44
|
-
return t;
|
|
45
|
-
};
|
|
46
|
-
return __assign.apply(this, arguments);
|
|
47
|
-
};
|
|
48
|
-
function __rest(s, e) {
|
|
49
|
-
var t = {};
|
|
50
|
-
for (var p in s)
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
-
t[p] = s[p];
|
|
53
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
-
t[p[i]] = s[p[i]];
|
|
57
|
-
}
|
|
58
|
-
return t;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
23
|
var notificationClassNameSelector = ".".concat(styles__default.default.notificationComponent);
|
|
62
24
|
var Notification = React.forwardRef(function (_a, ref) {
|
|
63
|
-
var className = _a.className, actionSectionClassName = _a.actionSectionClassName, children = _a.children, visible = _a.visible, _b = _a.offset, offset = _b === void 0 ? 108 : _b, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, _d = _a.autoCloseDelay, autoCloseDelay = _d === void 0 ? 5000 : _d, _e = _a.usePortal, usePortal = _e === void 0 ? true : _e, _f = _a.zIndex, zIndex = _f === void 0 ? coreComponentsStack.stackingOrder.TOAST : _f, style = _a.style, onClose = _a.onClose, onCloseTimeout = _a.onCloseTimeout, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onClickOutside = _a.onClickOutside, restProps = __rest(_a, ["className", "actionSectionClassName", "children", "visible", "offset", "hasCloser", "autoCloseDelay", "usePortal", "zIndex", "style", "onClose", "onCloseTimeout", "onMouseEnter", "onMouseLeave", "onClickOutside"]);
|
|
25
|
+
var className = _a.className, actionSectionClassName = _a.actionSectionClassName, children = _a.children, visible = _a.visible, _b = _a.offset, offset = _b === void 0 ? 108 : _b, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, _d = _a.autoCloseDelay, autoCloseDelay = _d === void 0 ? 5000 : _d, _e = _a.usePortal, usePortal = _e === void 0 ? true : _e, _f = _a.zIndex, zIndex = _f === void 0 ? coreComponentsStack.stackingOrder.TOAST : _f, style = _a.style, onClose = _a.onClose, onCloseTimeout = _a.onCloseTimeout, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onClickOutside = _a.onClickOutside, restProps = tslib.__rest(_a, ["className", "actionSectionClassName", "children", "visible", "offset", "hasCloser", "autoCloseDelay", "usePortal", "zIndex", "style", "onClose", "onCloseTimeout", "onMouseEnter", "onMouseLeave", "onClickOutside"]);
|
|
64
26
|
var notificationRef = React.useRef(null);
|
|
65
27
|
var autoCloseTimeoutRef = React.useRef(0);
|
|
66
28
|
var closeTimeoutRef = React.useRef(0);
|
|
@@ -132,11 +94,11 @@ var Notification = React.forwardRef(function (_a, ref) {
|
|
|
132
94
|
return (React__default.default.createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) {
|
|
133
95
|
var _a;
|
|
134
96
|
return (React__default.default.createElement(Wrapper, null,
|
|
135
|
-
React__default.default.createElement("div", __assign({}, swipeableHandlers),
|
|
136
|
-
React__default.default.createElement(coreComponentsToastPlate.ToastPlate, __assign({ className: cn__default.default(styles__default.default.notificationComponent, (_a = {},
|
|
97
|
+
React__default.default.createElement("div", tslib.__assign({}, swipeableHandlers),
|
|
98
|
+
React__default.default.createElement(coreComponentsToastPlate.ToastPlate, tslib.__assign({ className: cn__default.default(styles__default.default.notificationComponent, (_a = {},
|
|
137
99
|
_a[styles__default.default.isVisible] = visible,
|
|
138
100
|
_a[styles__default.default.isClosing] = isClosing,
|
|
139
|
-
_a), className), contentClassName: styles__default.default.toastContent, actionSectionClassName: cn__default.default(actionSectionClassName, styles__default.default.actionSection), style: __assign({ top: offset, zIndex: computedZIndex }, style), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: mergeRefs__default.default([ref, notificationRef]), role: visible ? 'alert' : undefined, hasCloser: hasCloser, onClose: onClose }, restProps), children))));
|
|
101
|
+
_a), className), contentClassName: styles__default.default.toastContent, actionSectionClassName: cn__default.default(actionSectionClassName, styles__default.default.actionSection), style: tslib.__assign({ top: offset, zIndex: computedZIndex }, style), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: mergeRefs__default.default([ref, notificationRef]), role: visible ? 'alert' : undefined, hasCloser: hasCloser, onClose: onClose }, restProps), children))));
|
|
140
102
|
}));
|
|
141
103
|
});
|
|
142
104
|
|
package/cssm/index.js
CHANGED
package/esm/Component.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
1
2
|
import React, { forwardRef, useRef, useState, useCallback, useEffect, Fragment } from 'react';
|
|
2
3
|
import mergeRefs from 'react-merge-refs';
|
|
3
4
|
import { useSwipeable } from 'react-swipeable';
|
|
@@ -8,46 +9,7 @@ import { stackingOrder, Stack } from '@alfalab/core-components-stack/esm';
|
|
|
8
9
|
import { ToastPlate } from '@alfalab/core-components-toast-plate/esm';
|
|
9
10
|
import { useClickOutside } from './utils/index.js';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
Copyright (c) Microsoft Corporation.
|
|
13
|
-
|
|
14
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
15
|
-
purpose with or without fee is hereby granted.
|
|
16
|
-
|
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
18
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
19
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
20
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
21
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
-
***************************************************************************** */
|
|
25
|
-
var __assign = function () {
|
|
26
|
-
__assign = Object.assign || function __assign(t) {
|
|
27
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
28
|
-
s = arguments[i];
|
|
29
|
-
for (var p in s)
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
}
|
|
33
|
-
return t;
|
|
34
|
-
};
|
|
35
|
-
return __assign.apply(this, arguments);
|
|
36
|
-
};
|
|
37
|
-
function __rest(s, e) {
|
|
38
|
-
var t = {};
|
|
39
|
-
for (var p in s)
|
|
40
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
41
|
-
t[p] = s[p];
|
|
42
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
43
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
44
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
45
|
-
t[p[i]] = s[p[i]];
|
|
46
|
-
}
|
|
47
|
-
return t;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
var styles = {"notificationComponent":"notification__notificationComponent_1h6xk","isVisible":"notification__isVisible_1h6xk","isClosing":"notification__isClosing_1h6xk","toastContent":"notification__toastContent_1h6xk","actionSection":"notification__actionSection_1h6xk"};
|
|
12
|
+
var styles = {"notificationComponent":"notification__notificationComponent_rkhyt","isVisible":"notification__isVisible_rkhyt","isClosing":"notification__isClosing_rkhyt","toastContent":"notification__toastContent_rkhyt","actionSection":"notification__actionSection_rkhyt"};
|
|
51
13
|
require('./index.css')
|
|
52
14
|
|
|
53
15
|
var notificationClassNameSelector = ".".concat(styles.notificationComponent);
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 246ut */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
--notification-desktop-content-width: 278px;
|
|
24
|
-
} .
|
|
24
|
+
} .notification__notificationComponent_rkhyt {
|
|
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_rkhyt {
|
|
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_rkhyt.notification__isVisible_rkhyt {
|
|
41
41
|
visibility: visible;
|
|
42
42
|
transform: translate(0, 0);
|
|
43
|
-
} .
|
|
43
|
+
} .notification__notificationComponent_rkhyt.notification__isClosing_rkhyt {
|
|
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_rkhyt.notification__isClosing_rkhyt {
|
|
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_rkhyt {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_rkhyt {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
package/esm/index.js
CHANGED
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 246ut */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
--notification-desktop-content-width: 278px;
|
|
24
|
-
} .
|
|
24
|
+
} .notification__notificationComponent_rkhyt {
|
|
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_rkhyt {
|
|
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_rkhyt.notification__isVisible_rkhyt {
|
|
41
41
|
visibility: visible;
|
|
42
42
|
transform: translate(0, 0);
|
|
43
|
-
} .
|
|
43
|
+
} .notification__notificationComponent_rkhyt.notification__isClosing_rkhyt {
|
|
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_rkhyt.notification__isClosing_rkhyt {
|
|
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_rkhyt {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_rkhyt {
|
|
53
53
|
min-width: 104px;
|
|
54
54
|
min-height: 48px;
|
|
55
55
|
padding: 0 var(--gap-xs);
|
package/index.js
CHANGED
package/modern/Component.js
CHANGED
|
@@ -8,7 +8,7 @@ import { Stack, stackingOrder } from '@alfalab/core-components-stack/modern';
|
|
|
8
8
|
import { ToastPlate } from '@alfalab/core-components-toast-plate/modern';
|
|
9
9
|
import { useClickOutside } from './utils/index.js';
|
|
10
10
|
|
|
11
|
-
const styles = {"notificationComponent":"
|
|
11
|
+
const styles = {"notificationComponent":"notification__notificationComponent_rkhyt","isVisible":"notification__isVisible_rkhyt","isClosing":"notification__isClosing_rkhyt","toastContent":"notification__toastContent_rkhyt","actionSection":"notification__actionSection_rkhyt"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
const notificationClassNameSelector = `.${styles.notificationComponent}`;
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 246ut */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
} :root {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
} :root {
|
|
22
22
|
} :root {
|
|
23
23
|
--notification-desktop-content-width: 278px;
|
|
24
|
-
} .
|
|
24
|
+
} .notification__notificationComponent_rkhyt {
|
|
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_rkhyt {
|
|
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_rkhyt.notification__isVisible_rkhyt {
|
|
41
41
|
visibility: visible;
|
|
42
42
|
transform: translate(0, 0);
|
|
43
|
-
} .
|
|
43
|
+
} .notification__notificationComponent_rkhyt.notification__isClosing_rkhyt {
|
|
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_rkhyt.notification__isClosing_rkhyt {
|
|
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_rkhyt {
|
|
50
50
|
width: var(--notification-desktop-content-width)
|
|
51
51
|
}
|
|
52
|
-
} .
|
|
52
|
+
} .notification__actionSection_rkhyt {
|
|
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.1.
|
|
3
|
+
"version": "6.1.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,12 +17,13 @@
|
|
|
17
17
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@alfalab/core-components-portal": "^3.1.
|
|
21
|
-
"@alfalab/core-components-stack": "^4.0.
|
|
22
|
-
"@alfalab/core-components-toast-plate": "^5.1.
|
|
20
|
+
"@alfalab/core-components-portal": "^3.1.3",
|
|
21
|
+
"@alfalab/core-components-stack": "^4.0.3",
|
|
22
|
+
"@alfalab/core-components-toast-plate": "^5.1.14",
|
|
23
23
|
"classnames": "^2.3.1",
|
|
24
24
|
"element-closest": "^3.0.2",
|
|
25
25
|
"react-merge-refs": "^1.1.0",
|
|
26
|
-
"react-swipeable": "^5.5.1"
|
|
26
|
+
"react-swipeable": "^5.5.1",
|
|
27
|
+
"tslib": "^2.4.0"
|
|
27
28
|
}
|
|
28
29
|
}
|