@veracity/vui 0.5.1 → 0.5.2
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/modal/modal.d.ts +2 -2
- package/modal/modal.js +6 -6
- package/package.json +1 -1
- /package/modal/{ModalBackdrop.d.ts → modalBackdrop.d.ts} +0 -0
- /package/modal/{ModalBackdrop.js → modalBackdrop.js} +0 -0
- /package/modal/{ModalContent.d.ts → modalContent.d.ts} +0 -0
- /package/modal/{ModalContent.js → modalContent.js} +0 -0
package/modal/modal.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VuiComponent } from '../core';
|
|
2
2
|
import { ModalProps } from './modal.types';
|
|
3
|
-
import ModalBackdrop from './
|
|
4
|
-
import ModalContent from './
|
|
3
|
+
import ModalBackdrop from './modalBackdrop';
|
|
4
|
+
import ModalContent from './modalContent';
|
|
5
5
|
/**
|
|
6
6
|
* Displays provided content on top of a dark backdrop element with fixed position.
|
|
7
7
|
* By default uses Portal for content and closes when clicking backdrop or pressing 'Escape'.
|
package/modal/modal.js
CHANGED
|
@@ -53,8 +53,8 @@ var portal_1 = __importDefault(require("../portal"));
|
|
|
53
53
|
var utils_1 = require("../utils");
|
|
54
54
|
var context_1 = require("./context");
|
|
55
55
|
var focusLock_1 = __importDefault(require("./focusLock"));
|
|
56
|
-
var
|
|
57
|
-
var
|
|
56
|
+
var modalBackdrop_1 = __importDefault(require("./modalBackdrop"));
|
|
57
|
+
var modalContent_1 = __importDefault(require("./modalContent"));
|
|
58
58
|
var modalManager_1 = require("./modalManager");
|
|
59
59
|
/**
|
|
60
60
|
* Displays provided content on top of a dark backdrop element with fixed position.
|
|
@@ -102,12 +102,12 @@ exports.Modal = (0, core_1.vui)(function (props, ref) {
|
|
|
102
102
|
return (react_1.default.createElement(context_1.ModalProvider, { value: context },
|
|
103
103
|
react_1.default.createElement(portal_1.default, { disablePortal: disablePortal },
|
|
104
104
|
react_1.default.createElement(box_1.default, __assign({ className: (0, utils_1.cs)('vui-modal', className), ref: (0, utils_1.mergeRefs)(ref, modalRef) }, rest, { onKeyDown: (0, utils_1.callAll)(props.onKeyDown, onKeyDown), onMouseDown: (0, utils_1.callAll)(props.onMouseDown, onMouseDown) }),
|
|
105
|
-
!hideBackdrop && react_1.default.createElement(
|
|
105
|
+
!hideBackdrop && react_1.default.createElement(modalBackdrop_1.default, null),
|
|
106
106
|
react_1.default.createElement(focusLock_1.default, { autoFocus: !disableAutoFocus, finalFocusRef: finalFocusRef, initialFocusRef: initialFocusRef, isDisabled: disableTrapFocus, returnFocus: !disableReturnFocus },
|
|
107
107
|
react_1.default.createElement(react_remove_scroll_1.RemoveScroll, { allowPinchZoom: allowPinchZoom, enabled: !disableScrollLock, forwardProps: true, removeScrollBar: !preserveScrollBar },
|
|
108
|
-
react_1.default.createElement(
|
|
108
|
+
react_1.default.createElement(modalContent_1.default, __assign({}, contentProps), (0, react_1.cloneElement)(children, childProps))))))));
|
|
109
109
|
});
|
|
110
110
|
exports.Modal.displayName = 'Modal';
|
|
111
|
-
exports.Modal.Backdrop =
|
|
112
|
-
exports.Modal.Content =
|
|
111
|
+
exports.Modal.Backdrop = modalBackdrop_1.default;
|
|
112
|
+
exports.Modal.Content = modalContent_1.default;
|
|
113
113
|
exports.default = exports.Modal;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|