@ringcentral/juno 2.12.1 → 2.12.4
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/components/Card/CardHoverActions/styles/CardHoverActionsStyle.js +2 -1
- package/components/Dialog/Dialog.js +3 -2
- package/components/PortalHost/PortalManager/PortalManager.js +1 -0
- package/es6/components/Card/CardHoverActions/styles/CardHoverActionsStyle.js +2 -1
- package/es6/components/Dialog/Dialog.js +3 -2
- package/es6/components/PortalHost/PortalManager/PortalManager.js +1 -0
- package/foundation/hooks/useEventListener/useEventListener.d.ts +2 -3
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ exports.hoverTransition = function (_a) {
|
|
|
12
12
|
});
|
|
13
13
|
};
|
|
14
14
|
exports.CardHoverActionsStyle = function () {
|
|
15
|
-
return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n "], ["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n
|
|
15
|
+
return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n ", "\n z-index: 1;\n "], ["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n ",
|
|
16
|
+
"\n z-index: 1;\n "])), foundation_1.spacing(4), exports.hoverTransition, '' /* make sure `CardHoverActions` would not be covered by `CardActionArea` */);
|
|
16
17
|
};
|
|
17
18
|
var templateObject_1;
|
|
@@ -22,7 +22,7 @@ var _RcDialog = react_1.forwardRef(function (inProps, ref) {
|
|
|
22
22
|
},
|
|
23
23
|
]);
|
|
24
24
|
}
|
|
25
|
-
var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, rest = tslib_1.__rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps"]);
|
|
25
|
+
var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, PaperPropsProp = props.PaperProps, rest = tslib_1.__rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps", "PaperProps"]);
|
|
26
26
|
var classes = react_1.useMemo(function () { return foundation_1.combineClasses(utils_1.RcDialogClasses, classesProp); }, [classesProp]);
|
|
27
27
|
var externalWindow = foundation_1.useRcPortalWindowContext().externalWindow;
|
|
28
28
|
var maxWidth = react_1.useMemo(function () {
|
|
@@ -46,8 +46,9 @@ var _RcDialog = react_1.forwardRef(function (inProps, ref) {
|
|
|
46
46
|
var TransitionProps = tslib_1.__assign(tslib_1.__assign({
|
|
47
47
|
// TODO: remove after upgrade to mui v5
|
|
48
48
|
role: 'presentation' }, TransitionPropsProp), { onExited: onExited });
|
|
49
|
+
var PaperProps = tslib_1.__assign({ 'aria-modal': true }, PaperPropsProp);
|
|
49
50
|
return (react_1.default.createElement(HasPortalParentContext_1.HasPortalParentProvider, null,
|
|
50
|
-
react_1.default.createElement(Dialog_1.default, tslib_1.__assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps }, rest),
|
|
51
|
+
react_1.default.createElement(Dialog_1.default, tslib_1.__assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps, PaperProps: PaperProps }, rest),
|
|
51
52
|
react_1.default.createElement(DialogContext_1.RcDialogContext.Provider, { value: contextValue }, children))));
|
|
52
53
|
});
|
|
53
54
|
var RcDialog = foundation_1.styled(_RcDialog)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.DialogStyle);
|
|
@@ -10,6 +10,7 @@ export var hoverTransition = function (_a) {
|
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
export var CardHoverActionsStyle = function () {
|
|
13
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n "], ["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n
|
|
13
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n ", "\n z-index: 1;\n "], ["\n position: absolute;\n right: 0;\n top: 0;\n padding: ", ";\n transition: ", ";\n ",
|
|
14
|
+
"\n z-index: 1;\n "])), spacing(4), hoverTransition, '' /* make sure `CardHoverActions` would not be covered by `CardActionArea` */);
|
|
14
15
|
};
|
|
15
16
|
var templateObject_1;
|
|
@@ -19,7 +19,7 @@ var _RcDialog = forwardRef(function (inProps, ref) {
|
|
|
19
19
|
},
|
|
20
20
|
]);
|
|
21
21
|
}
|
|
22
|
-
var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, rest = __rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps"]);
|
|
22
|
+
var classesProp = props.classes, _a = props.size, size = _a === void 0 ? 'medium' : _a, maxWidthProp = props.maxWidth, _b = props.fullWidth, fullWidth = _b === void 0 ? true : _b, childrenSize = props.childrenSize, children = props.children, TransitionPropsProp = props.TransitionProps, PaperPropsProp = props.PaperProps, rest = __rest(props, ["classes", "size", "maxWidth", "fullWidth", "childrenSize", "children", "TransitionProps", "PaperProps"]);
|
|
23
23
|
var classes = useMemo(function () { return combineClasses(RcDialogClasses, classesProp); }, [classesProp]);
|
|
24
24
|
var externalWindow = useRcPortalWindowContext().externalWindow;
|
|
25
25
|
var maxWidth = useMemo(function () {
|
|
@@ -43,8 +43,9 @@ var _RcDialog = forwardRef(function (inProps, ref) {
|
|
|
43
43
|
var TransitionProps = __assign(__assign({
|
|
44
44
|
// TODO: remove after upgrade to mui v5
|
|
45
45
|
role: 'presentation' }, TransitionPropsProp), { onExited: onExited });
|
|
46
|
+
var PaperProps = __assign({ 'aria-modal': true }, PaperPropsProp);
|
|
46
47
|
return (React.createElement(HasPortalParentProvider, null,
|
|
47
|
-
React.createElement(MuiDialog, __assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps }, rest),
|
|
48
|
+
React.createElement(MuiDialog, __assign({ ref: ref, fullWidth: fullWidth, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, maxWidth: maxWidth, fullScreen: size === 'fullScreen' ? true : undefined, classes: classes, TransitionProps: TransitionProps, PaperProps: PaperProps }, rest),
|
|
48
49
|
React.createElement(RcDialogContext.Provider, { value: contextValue }, children))));
|
|
49
50
|
});
|
|
50
51
|
var RcDialog = styled(_RcDialog)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), DialogStyle);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
2
1
|
import { RefOrElementOrCallback } from '../../utils';
|
|
3
2
|
export declare type UseEventListenerAction = {
|
|
4
3
|
listen: () => void;
|
|
@@ -12,5 +11,5 @@ export declare type UseEventListenerConfig = {
|
|
|
12
11
|
*/
|
|
13
12
|
startImmediately?: boolean;
|
|
14
13
|
};
|
|
15
|
-
export declare function useEventListener<T =
|
|
16
|
-
export declare function useEventListener<T =
|
|
14
|
+
export declare function useEventListener<T = Event>(target: RefOrElementOrCallback | EventTarget, key: string, callback: (event: T) => void, config?: UseEventListenerConfig): UseEventListenerAction;
|
|
15
|
+
export declare function useEventListener<T = Event>(target: RefOrElementOrCallback | EventTarget, key: string, callback: (event: T) => void, options?: AddEventListenerOptions | boolean, config?: UseEventListenerConfig): UseEventListenerAction;
|