@ringcentral/juno 2.17.0 → 2.18.0

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.
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  var foundation_1 = require("../../../foundation");
5
+ var utils_1 = require("../utils");
5
6
  exports.BackdropStyle = function () {
6
- return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
7
+ return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n &.", " {\n background-color: rgba(0, 0, 0, 0.7);\n }\n "], ["\n &.", " {\n background-color: rgba(0, 0, 0, 0.7);\n }\n "])), utils_1.RcBackdropClasses.root);
7
8
  };
8
9
  var templateObject_1;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var foundation_1 = require("../../../foundation");
4
- exports.RcBackdropClasses = foundation_1.RcClasses([], 'RcBackdrop');
4
+ exports.RcBackdropClasses = foundation_1.RcClasses(['root'], 'RcBackdrop');
@@ -10,6 +10,7 @@ var utils_1 = require("./utils");
10
10
  var DialogContext_1 = require("./utils/DialogContext");
11
11
  exports.RcDialogContext = DialogContext_1.RcDialogContext;
12
12
  var HasPortalParentContext_1 = require("../PortalHost/context/HasPortalParentContext");
13
+ var Backdrop_1 = require("../Backdrop");
13
14
  var _RcDialog = react_1.forwardRef(function (inProps, ref) {
14
15
  var props = foundation_1.useThemeProps({ props: inProps, name: 'RcDialog' });
15
16
  if (process.env.NODE_ENV !== 'production') {
@@ -48,7 +49,7 @@ var _RcDialog = react_1.forwardRef(function (inProps, ref) {
48
49
  role: 'presentation' }, TransitionPropsProp), { onExited: onExited });
49
50
  var PaperProps = tslib_1.__assign({ 'aria-modal': true }, PaperPropsProp);
50
51
  return (react_1.default.createElement(HasPortalParentContext_1.HasPortalParentProvider, null,
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),
52
+ 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, BackdropComponent: Backdrop_1.RcBackdrop }, rest),
52
53
  react_1.default.createElement(DialogContext_1.RcDialogContext.Provider, { value: contextValue }, children))));
53
54
  });
54
55
  var RcDialog = foundation_1.styled(_RcDialog)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.DialogStyle);
@@ -8,6 +8,7 @@ var styles_1 = require("./styles");
8
8
  var utils_1 = require("./utils");
9
9
  var PortalHost_1 = require("../PortalHost");
10
10
  var HasPortalParentContext_1 = require("../PortalHost/context/HasPortalParentContext");
11
+ var Backdrop_1 = require("../Backdrop");
11
12
  var _RcDrawer = react_1.forwardRef(function (inProps, ref) {
12
13
  var props = foundation_1.useThemeProps({ props: inProps, name: 'RcDrawer' });
13
14
  var inlinePaper = props.inlinePaper, radius = props.radius, classesProp = props.classes, children = props.children, PaperPropsProp = props.PaperProps, onClose = props.onClose, SlidePropsProp = props.SlideProps, rest = tslib_1.__rest(props, ["inlinePaper", "radius", "classes", "children", "PaperProps", "onClose", "SlideProps"]);
@@ -31,7 +32,7 @@ var _RcDrawer = react_1.forwardRef(function (inProps, ref) {
31
32
  var managerWithID = PortalHost_1.usePortalManagerWithID();
32
33
  var SlideProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, SlidePropsProp), { onExited: onExited }), (managerWithID ? { appear: true } : {}));
33
34
  return (react_1.default.createElement(HasPortalParentContext_1.HasPortalParentProvider, null,
34
- react_1.default.createElement(Drawer_1.default, tslib_1.__assign({}, rest, { ref: ref, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, classes: classes, onClose: onClose, PaperProps: PaperProps, SlideProps: SlideProps }), children)));
35
+ react_1.default.createElement(Drawer_1.default, tslib_1.__assign({ BackdropComponent: Backdrop_1.RcBackdrop }, rest, { ref: ref, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, classes: classes, onClose: onClose, PaperProps: PaperProps, SlideProps: SlideProps }), children)));
35
36
  });
36
37
  var RcDrawer = foundation_1.styled(_RcDrawer)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.DrawerStyle);
37
38
  exports.RcDrawer = RcDrawer;
@@ -1,6 +1,7 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
2
  import { css } from '../../../foundation';
3
+ import { RcBackdropClasses } from '../utils';
3
4
  export var BackdropStyle = function () {
4
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
5
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.", " {\n background-color: rgba(0, 0, 0, 0.7);\n }\n "], ["\n &.", " {\n background-color: rgba(0, 0, 0, 0.7);\n }\n "])), RcBackdropClasses.root);
5
6
  };
6
7
  var templateObject_1;
@@ -1,2 +1,2 @@
1
1
  import { RcClasses } from '../../../foundation';
2
- export var RcBackdropClasses = RcClasses([], 'RcBackdrop');
2
+ export var RcBackdropClasses = RcClasses(['root'], 'RcBackdrop');
@@ -7,6 +7,7 @@ import { DialogStyle } from './styles';
7
7
  import { RcDialogClasses } from './utils';
8
8
  import { RcDialogContext } from './utils/DialogContext';
9
9
  import { HasPortalParentProvider } from '../PortalHost/context/HasPortalParentContext';
10
+ import { RcBackdrop } from '../Backdrop';
10
11
  var _RcDialog = forwardRef(function (inProps, ref) {
11
12
  var props = useThemeProps({ props: inProps, name: 'RcDialog' });
12
13
  if (process.env.NODE_ENV !== 'production') {
@@ -45,7 +46,7 @@ var _RcDialog = forwardRef(function (inProps, ref) {
45
46
  role: 'presentation' }, TransitionPropsProp), { onExited: onExited });
46
47
  var PaperProps = __assign({ 'aria-modal': true }, PaperPropsProp);
47
48
  return (React.createElement(HasPortalParentProvider, null,
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),
49
+ 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, BackdropComponent: RcBackdrop }, rest),
49
50
  React.createElement(RcDialogContext.Provider, { value: contextValue }, children))));
50
51
  });
51
52
  var RcDialog = styled(_RcDialog)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), DialogStyle);
@@ -6,6 +6,7 @@ import { DrawerStyle } from './styles';
6
6
  import { RcDrawerClasses } from './utils';
7
7
  import { usePortalManagerWithID, useUnmountPortalHandler } from '../PortalHost';
8
8
  import { HasPortalParentProvider } from '../PortalHost/context/HasPortalParentContext';
9
+ import { RcBackdrop } from '../Backdrop';
9
10
  var _RcDrawer = forwardRef(function (inProps, ref) {
10
11
  var props = useThemeProps({ props: inProps, name: 'RcDrawer' });
11
12
  var inlinePaper = props.inlinePaper, radius = props.radius, classesProp = props.classes, children = props.children, PaperPropsProp = props.PaperProps, onClose = props.onClose, SlidePropsProp = props.SlideProps, rest = __rest(props, ["inlinePaper", "radius", "classes", "children", "PaperProps", "onClose", "SlideProps"]);
@@ -29,7 +30,7 @@ var _RcDrawer = forwardRef(function (inProps, ref) {
29
30
  var managerWithID = usePortalManagerWithID();
30
31
  var SlideProps = __assign(__assign(__assign({}, SlidePropsProp), { onExited: onExited }), (managerWithID ? { appear: true } : {}));
31
32
  return (React.createElement(HasPortalParentProvider, null,
32
- React.createElement(MuiDrawer, __assign({}, rest, { ref: ref, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, classes: classes, onClose: onClose, PaperProps: PaperProps, SlideProps: SlideProps }), children)));
33
+ React.createElement(MuiDrawer, __assign({ BackdropComponent: RcBackdrop }, rest, { ref: ref, container: externalWindow === null || externalWindow === void 0 ? void 0 : externalWindow.document.body, classes: classes, onClose: onClose, PaperProps: PaperProps, SlideProps: SlideProps }), children)));
33
34
  });
34
35
  var RcDrawer = styled(_RcDrawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), DrawerStyle);
35
36
  RcDrawer.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/juno",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "author": "RingCentral",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",