@uiw/react-overlay
Advanced tools
Comparing version 5.0.0-bate-1 to 5.0.0-bate-10
147
cjs/index.js
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -41,21 +39,11 @@ value: true | ||
exports["default"] = Overlay; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _reactTransitionGroup = require("react-transition-group"); | ||
var _reactPortal = _interopRequireDefault(require("@uiw/react-portal")); | ||
var _utils = require("@uiw/utils"); | ||
var _style = require("./style"); | ||
Object.keys(_style).forEach(function (key) { | ||
@@ -72,66 +60,60 @@ if (key === "default" || key === "__esModule") return; | ||
}); | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _excluded = ["className", "style", "isOpen", "prefixCls", "usePortal", "maskClosable", "backdropProps", "portalProps", "hasBackdrop", "unmountOnExit", "timeout", "transitionName", "onOpening", "onOpened", "onClosing", "onClosed", "onClose", "onEnter", "onExiting", "onEntering", "onEntered", "onExit", "children", "dialogProps"]; | ||
function Overlay(props) { | ||
var className = props.className, | ||
style = props.style, | ||
_props$isOpen = props.isOpen, | ||
_ = _props$isOpen === void 0 ? false : _props$isOpen, | ||
_props$prefixCls = props.prefixCls, | ||
prefixCls = _props$prefixCls === void 0 ? 'w-overlay' : _props$prefixCls, | ||
_props$usePortal = props.usePortal, | ||
usePortal = _props$usePortal === void 0 ? true : _props$usePortal, | ||
_props$maskClosable = props.maskClosable, | ||
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable, | ||
_props$backdropProps = props.backdropProps, | ||
backdropProps = _props$backdropProps === void 0 ? {} : _props$backdropProps, | ||
_props$portalProps = props.portalProps, | ||
portalProps = _props$portalProps === void 0 ? {} : _props$portalProps, | ||
_props$hasBackdrop = props.hasBackdrop, | ||
hasBackdrop = _props$hasBackdrop === void 0 ? true : _props$hasBackdrop, | ||
_props$unmountOnExit = props.unmountOnExit, | ||
unmountOnExit = _props$unmountOnExit === void 0 ? true : _props$unmountOnExit, | ||
_props$timeout = props.timeout, | ||
timeout = _props$timeout === void 0 ? 300 : _props$timeout, | ||
_props$transitionName = props.transitionName, | ||
transitionName = _props$transitionName === void 0 ? 'w-overlay' : _props$transitionName, | ||
_props$onOpening = props.onOpening, | ||
onOpening = _props$onOpening === void 0 ? _utils.noop : _props$onOpening, | ||
_props$onOpened = props.onOpened, | ||
onOpened = _props$onOpened === void 0 ? _utils.noop : _props$onOpened, | ||
_props$onClosing = props.onClosing, | ||
onClosing = _props$onClosing === void 0 ? _utils.noop : _props$onClosing, | ||
_props$onClosed = props.onClosed, | ||
onClosed = _props$onClosed === void 0 ? _utils.noop : _props$onClosed, | ||
_props$onClose = props.onClose, | ||
onClose = _props$onClose === void 0 ? _utils.noop : _props$onClose, | ||
_props$onEnter = props.onEnter, | ||
_onEnter = _props$onEnter === void 0 ? _utils.noop : _props$onEnter, | ||
_props$onExiting = props.onExiting, | ||
_onExiting = _props$onExiting === void 0 ? _utils.noop : _props$onExiting, | ||
_props$onEntering = props.onEntering, | ||
_onEntering = _props$onEntering === void 0 ? _utils.noop : _props$onEntering, | ||
_props$onEntered = props.onEntered, | ||
_onEntered = _props$onEntered === void 0 ? _utils.noop : _props$onEntered, | ||
_props$onExit = props.onExit, | ||
onExit = _props$onExit === void 0 ? _utils.noop : _props$onExit, | ||
children = props.children, | ||
_props$dialogProps = props.dialogProps, | ||
dialogProps = _props$dialogProps === void 0 ? {} : _props$dialogProps, | ||
otherProps = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
style = props.style, | ||
_props$isOpen = props.isOpen, | ||
_ = _props$isOpen === void 0 ? false : _props$isOpen, | ||
_props$prefixCls = props.prefixCls, | ||
prefixCls = _props$prefixCls === void 0 ? 'w-overlay' : _props$prefixCls, | ||
_props$usePortal = props.usePortal, | ||
usePortal = _props$usePortal === void 0 ? true : _props$usePortal, | ||
_props$maskClosable = props.maskClosable, | ||
maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable, | ||
_props$backdropProps = props.backdropProps, | ||
backdropProps = _props$backdropProps === void 0 ? {} : _props$backdropProps, | ||
_props$portalProps = props.portalProps, | ||
portalProps = _props$portalProps === void 0 ? {} : _props$portalProps, | ||
_props$hasBackdrop = props.hasBackdrop, | ||
hasBackdrop = _props$hasBackdrop === void 0 ? true : _props$hasBackdrop, | ||
_props$unmountOnExit = props.unmountOnExit, | ||
unmountOnExit = _props$unmountOnExit === void 0 ? true : _props$unmountOnExit, | ||
_props$timeout = props.timeout, | ||
timeout = _props$timeout === void 0 ? 300 : _props$timeout, | ||
_props$transitionName = props.transitionName, | ||
transitionName = _props$transitionName === void 0 ? 'w-overlay' : _props$transitionName, | ||
_props$onOpening = props.onOpening, | ||
onOpening = _props$onOpening === void 0 ? _utils.noop : _props$onOpening, | ||
_props$onOpened = props.onOpened, | ||
onOpened = _props$onOpened === void 0 ? _utils.noop : _props$onOpened, | ||
_props$onClosing = props.onClosing, | ||
onClosing = _props$onClosing === void 0 ? _utils.noop : _props$onClosing, | ||
_props$onClosed = props.onClosed, | ||
onClosed = _props$onClosed === void 0 ? _utils.noop : _props$onClosed, | ||
_props$onClose = props.onClose, | ||
onClose = _props$onClose === void 0 ? _utils.noop : _props$onClose, | ||
_props$onEnter = props.onEnter, | ||
_onEnter = _props$onEnter === void 0 ? _utils.noop : _props$onEnter, | ||
_props$onExiting = props.onExiting, | ||
_onExiting = _props$onExiting === void 0 ? _utils.noop : _props$onExiting, | ||
_props$onEntering = props.onEntering, | ||
_onEntering = _props$onEntering === void 0 ? _utils.noop : _props$onEntering, | ||
_props$onEntered = props.onEntered, | ||
_onEntered = _props$onEntered === void 0 ? _utils.noop : _props$onEntered, | ||
_props$onExit = props.onExit, | ||
onExit = _props$onExit === void 0 ? _utils.noop : _props$onExit, | ||
children = props.children, | ||
_props$dialogProps = props.dialogProps, | ||
dialogProps = _props$dialogProps === void 0 ? {} : _props$dialogProps, | ||
otherProps = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
var _useState = (0, _react.useState)(), | ||
_useState2 = (0, _slicedToArray2["default"])(_useState, 2), | ||
isOpen = _useState2[0], | ||
setIsOpen = _useState2[1]; // const [isOpen, setIsOpen] = useState(props.isOpen || false); | ||
_useState2 = (0, _slicedToArray2["default"])(_useState, 2), | ||
isOpen = _useState2[0], | ||
setIsOpen = _useState2[1]; | ||
// const [isOpen, setIsOpen] = useState(props.isOpen || false); | ||
var _useState3 = (0, _react.useState)(false), | ||
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2), | ||
visible = _useState4[0], | ||
setVisible = _useState4[1]; | ||
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2), | ||
visible = _useState4[0], | ||
setVisible = _useState4[1]; | ||
var container = (0, _react.useRef)(null); | ||
@@ -143,3 +125,2 @@ var overlay = (0, _react.useRef)(null); | ||
} | ||
if (isOpen !== props.isOpen && !props.isOpen) { | ||
@@ -167,3 +148,2 @@ overlayWillClose(); | ||
})); | ||
function handleClosed(node) { | ||
@@ -173,3 +153,2 @@ setVisible(false); | ||
} | ||
function handleBackdropMouseDown(e) { | ||
@@ -179,3 +158,2 @@ if (e.target !== container.current && usePortal) { | ||
} | ||
if (maskClosable && hasBackdrop) { | ||
@@ -186,6 +164,4 @@ overlayWillClose(); | ||
} | ||
backdropProps && backdropProps.onMouseDown && backdropProps.onMouseDown(e); | ||
} | ||
function overlayWillOpen() { | ||
@@ -196,18 +172,17 @@ if (hasBackdrop && usePortal) { | ||
} | ||
function overlayWillClose() { | ||
if (hasBackdrop && usePortal) { | ||
document.body.classList.remove("".concat(prefixCls, "-open")); | ||
} // if (unmountOnExit) { | ||
} | ||
// if (unmountOnExit) { | ||
// setVisible(false) | ||
// } | ||
} | ||
var _useState5 = (0, _react.useState)(undefined), | ||
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2), | ||
trans = _useState6[0], | ||
transSet = _useState6[1]; | ||
var TransitionGroupComp = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition // as={CSSTransition} | ||
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2), | ||
trans = _useState6[0], | ||
transSet = _useState6[1]; | ||
var TransitionGroupComp = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.CSSTransition | ||
// as={CSSTransition} | ||
, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({ | ||
@@ -224,3 +199,2 @@ classNames: transitionName, | ||
onOpening(overlay.current, isAppearing); | ||
_onEntering(overlay.current); | ||
@@ -230,3 +204,2 @@ }, | ||
onOpened(overlay.current, isAppearing); | ||
_onEntered(overlay.current); | ||
@@ -237,3 +210,2 @@ }, | ||
onClosing(overlay.current); | ||
_onExiting(overlay.current); | ||
@@ -276,3 +248,2 @@ }, | ||
})); | ||
if (visible && usePortal) { | ||
@@ -279,0 +250,0 @@ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactPortal["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _objectSpread2["default"])({}, portalProps)), {}, { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"]; | ||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"]; | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,13 +9,7 @@ value: true | ||
exports.OverlayWrap = exports.OverlayStyleTheme = exports.ContentWrap = exports.ContainerWrap = exports.BackdropWrap = void 0; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral")); | ||
var _styledComponents = _interopRequireWildcard(require("styled-components")); | ||
var _utils = require("@uiw/utils"); | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8; | ||
var OverlayStyleTheme = { | ||
@@ -27,11 +19,6 @@ backgroundColorOverlayBackdrop: 'rgba(16, 22, 26, 0.7)' | ||
exports.OverlayStyleTheme = OverlayStyleTheme; | ||
var ContentWrap = _styledComponents["default"].span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n outline: 0;\n display: inline-block;\n vertical-align: middle;\n text-align: left;\n margin: 20px 0;\n z-index: 20;\n"]))); | ||
exports.ContentWrap = ContentWrap; | ||
var ContainerWrap = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n overflow: auto;\n z-index: 99999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n &:before {\n content: ' ';\n display: inline-block;\n height: 100%;\n width: 1px;\n vertical-align: middle;\n }\n"]))); | ||
exports.ContainerWrap = ContainerWrap; | ||
var BackdropWrap = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 1;\n z-index: 20;\n background-color: ", ";\n overflow: auto;\n user-select: none;\n"])), function (props) { | ||
@@ -42,13 +29,11 @@ return (0, _utils.getThemeVariantValue)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, props), {}, { | ||
}); | ||
exports.BackdropWrap = BackdropWrap; | ||
var OverlayWrap = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (props) { | ||
return (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n left: 0;\n outline: 0;\n bottom: 0;\n z-index: 999;\n -webkit-overflow-scrolling: touch;\n text-align: center;\n height: 100%;\n width: 100%;\n display: none;\n &.open {\n z-index: 9999;\n }\n\n ", "\n\n ", "\n\n ", "\n\n &.w-overlay-enter ", " {\n opacity: 0;\n }\n &.w-overlay-enter-active ", " {\n opacity: 1;\n transition: opacity 300ms ease-in;\n }\n &.w-overlay-exit ", " {\n opacity: 1;\n }\n &.w-overlay-exit-active ", " {\n opacity: 0;\n transition: opacity 300ms ease-in;\n }\n &.w-overlay-enter ", " {\n transform: scale(0.5);\n opacity: 0;\n }\n &.w-overlay-enter-active ", " {\n opacity: 1;\n transform: translate(0);\n transition: transform 300ms ease, opacity 300ms ease;\n }\n &.w-overlay-exit ", " {\n opacity: 1;\n transform: translate(0);\n transition: transform 300ms ease, opacity 300ms ease;\n }\n &.w-overlay-exit-active ", " {\n transform: scale(0.5);\n opacity: 0;\n }\n &.w-overlay-enter,\n &.w-overlay-enter-done,\n &.w-overlay-exit {\n display: inherit;\n }\n "])), props.openClass && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n overflow: hidden;\n "]))), !props.usePortal && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n overflow: initial;\n ", " {\n position: relative;\n }\n ", " {\n position: absolute;\n }\n "])), ContainerWrap, BackdropWrap), props.isOpen && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: inherit;\n "]))), BackdropWrap, BackdropWrap, BackdropWrap, BackdropWrap, ContentWrap, ContentWrap, ContentWrap, ContentWrap); | ||
}); // BackdropWrap.defaultProps = { | ||
}); | ||
// BackdropWrap.defaultProps = { | ||
// defaultTheme: OverlayStyleTheme, | ||
// }; | ||
exports.OverlayWrap = OverlayWrap; | ||
//# sourceMappingURL=index.js.map |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["className", "style", "isOpen", "prefixCls", "usePortal", "maskClosable", "backdropProps", "portalProps", "hasBackdrop", "unmountOnExit", "timeout", "transitionName", "onOpening", "onOpened", "onClosing", "onClosed", "onClose", "onEnter", "onExiting", "onEntering", "onEntered", "onExit", "children", "dialogProps"]; | ||
/** | ||
@@ -26,33 +25,32 @@ * Overlay 组件 | ||
var { | ||
className, | ||
style, | ||
isOpen: _ = false, | ||
prefixCls = 'w-overlay', | ||
usePortal = true, | ||
maskClosable = true, | ||
backdropProps = {}, | ||
portalProps = {}, | ||
hasBackdrop = true, | ||
unmountOnExit = true, | ||
// 设置 true 销毁根节点 | ||
timeout = 300, | ||
transitionName = 'w-overlay', | ||
// onEnter = noop, | ||
onOpening = noop, | ||
onOpened = noop, | ||
onClosing = noop, | ||
onClosed = noop, | ||
onClose = noop, | ||
onEnter: _onEnter = noop, | ||
onExiting: _onExiting = noop, | ||
onEntering: _onEntering = noop, | ||
onEntered: _onEntered = noop, | ||
onExit = noop, | ||
children, | ||
dialogProps = {} | ||
} = props, | ||
otherProps = _objectWithoutPropertiesLoose(props, _excluded); | ||
var [isOpen, setIsOpen] = useState(); // const [isOpen, setIsOpen] = useState(props.isOpen || false); | ||
className, | ||
style, | ||
isOpen: _ = false, | ||
prefixCls = 'w-overlay', | ||
usePortal = true, | ||
maskClosable = true, | ||
backdropProps = {}, | ||
portalProps = {}, | ||
hasBackdrop = true, | ||
unmountOnExit = true, | ||
// 设置 true 销毁根节点 | ||
timeout = 300, | ||
transitionName = 'w-overlay', | ||
// onEnter = noop, | ||
onOpening = noop, | ||
onOpened = noop, | ||
onClosing = noop, | ||
onClosed = noop, | ||
onClose = noop, | ||
onEnter: _onEnter = noop, | ||
onExiting: _onExiting = noop, | ||
onEntering: _onEntering = noop, | ||
onEntered: _onEntered = noop, | ||
onExit = noop, | ||
children, | ||
dialogProps = {} | ||
} = props, | ||
otherProps = _objectWithoutPropertiesLoose(props, _excluded); | ||
var [isOpen, setIsOpen] = useState(); | ||
// const [isOpen, setIsOpen] = useState(props.isOpen || false); | ||
var [visible, setVisible] = useState(false); | ||
@@ -65,3 +63,2 @@ var container = useRef(null); | ||
} | ||
if (isOpen !== props.isOpen && !props.isOpen) { | ||
@@ -89,3 +86,2 @@ overlayWillClose(); | ||
})); | ||
function handleClosed(node) { | ||
@@ -95,3 +91,2 @@ setVisible(false); | ||
} | ||
function handleBackdropMouseDown(e) { | ||
@@ -101,3 +96,2 @@ if (e.target !== container.current && usePortal) { | ||
} | ||
if (maskClosable && hasBackdrop) { | ||
@@ -108,6 +102,4 @@ overlayWillClose(); | ||
} | ||
backdropProps && backdropProps.onMouseDown && backdropProps.onMouseDown(e); | ||
} | ||
function overlayWillOpen() { | ||
@@ -118,15 +110,14 @@ if (hasBackdrop && usePortal) { | ||
} | ||
function overlayWillClose() { | ||
if (hasBackdrop && usePortal) { | ||
document.body.classList.remove(prefixCls + "-open"); | ||
} // if (unmountOnExit) { | ||
} | ||
// if (unmountOnExit) { | ||
// setVisible(false) | ||
// } | ||
} | ||
var [trans, transSet] = useState(undefined); | ||
var TransitionGroupComp = /*#__PURE__*/_jsx(CSSTransition // as={CSSTransition} | ||
var TransitionGroupComp = /*#__PURE__*/_jsx(CSSTransition | ||
// as={CSSTransition} | ||
, _extends({ | ||
@@ -143,3 +134,2 @@ classNames: transitionName, | ||
onOpening(overlay.current, isAppearing); | ||
_onEntering(overlay.current); | ||
@@ -149,3 +139,2 @@ }, | ||
onOpened(overlay.current, isAppearing); | ||
_onEntered(overlay.current); | ||
@@ -156,3 +145,2 @@ }, | ||
onClosing(overlay.current); | ||
_onExiting(overlay.current); | ||
@@ -195,3 +183,2 @@ }, | ||
})); | ||
if (visible && usePortal) { | ||
@@ -198,0 +185,0 @@ return /*#__PURE__*/_jsx(Portal, _extends({}, _extends({}, portalProps), { |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose"; | ||
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8; | ||
import styled, { css } from 'styled-components'; | ||
@@ -16,5 +14,7 @@ import { getThemeVariantValue } from '@uiw/utils'; | ||
}), 'backgroundColorOverlayBackdrop')); | ||
export var OverlayWrap = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n ", "\n"])), props => css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n left: 0;\n outline: 0;\n bottom: 0;\n z-index: 999;\n -webkit-overflow-scrolling: touch;\n text-align: center;\n height: 100%;\n width: 100%;\n display: none;\n &.open {\n z-index: 9999;\n }\n\n ", "\n\n ", "\n\n ", "\n\n &.w-overlay-enter ", " {\n opacity: 0;\n }\n &.w-overlay-enter-active ", " {\n opacity: 1;\n transition: opacity 300ms ease-in;\n }\n &.w-overlay-exit ", " {\n opacity: 1;\n }\n &.w-overlay-exit-active ", " {\n opacity: 0;\n transition: opacity 300ms ease-in;\n }\n &.w-overlay-enter ", " {\n transform: scale(0.5);\n opacity: 0;\n }\n &.w-overlay-enter-active ", " {\n opacity: 1;\n transform: translate(0);\n transition: transform 300ms ease, opacity 300ms ease;\n }\n &.w-overlay-exit ", " {\n opacity: 1;\n transform: translate(0);\n transition: transform 300ms ease, opacity 300ms ease;\n }\n &.w-overlay-exit-active ", " {\n transform: scale(0.5);\n opacity: 0;\n }\n &.w-overlay-enter,\n &.w-overlay-enter-done,\n &.w-overlay-exit {\n display: inherit;\n }\n "])), props.openClass && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n "]))), !props.usePortal && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n position: absolute;\n overflow: initial;\n ", " {\n position: relative;\n }\n ", " {\n position: absolute;\n }\n "])), ContainerWrap, BackdropWrap), props.isOpen && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n display: inherit;\n "]))), BackdropWrap, BackdropWrap, BackdropWrap, BackdropWrap, ContentWrap, ContentWrap, ContentWrap, ContentWrap)); // BackdropWrap.defaultProps = { | ||
export var OverlayWrap = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n ", "\n"])), props => css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n position: fixed;\n overflow: auto;\n top: 0;\n right: 0;\n left: 0;\n outline: 0;\n bottom: 0;\n z-index: 999;\n -webkit-overflow-scrolling: touch;\n text-align: center;\n height: 100%;\n width: 100%;\n display: none;\n &.open {\n z-index: 9999;\n }\n\n ", "\n\n ", "\n\n ", "\n\n &.w-overlay-enter ", " {\n opacity: 0;\n }\n &.w-overlay-enter-active ", " {\n opacity: 1;\n transition: opacity 300ms ease-in;\n }\n &.w-overlay-exit ", " {\n opacity: 1;\n }\n &.w-overlay-exit-active ", " {\n opacity: 0;\n transition: opacity 300ms ease-in;\n }\n &.w-overlay-enter ", " {\n transform: scale(0.5);\n opacity: 0;\n }\n &.w-overlay-enter-active ", " {\n opacity: 1;\n transform: translate(0);\n transition: transform 300ms ease, opacity 300ms ease;\n }\n &.w-overlay-exit ", " {\n opacity: 1;\n transform: translate(0);\n transition: transform 300ms ease, opacity 300ms ease;\n }\n &.w-overlay-exit-active ", " {\n transform: scale(0.5);\n opacity: 0;\n }\n &.w-overlay-enter,\n &.w-overlay-enter-done,\n &.w-overlay-exit {\n display: inherit;\n }\n "])), props.openClass && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n overflow: hidden;\n "]))), !props.usePortal && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n position: absolute;\n overflow: initial;\n ", " {\n position: relative;\n }\n ", " {\n position: absolute;\n }\n "])), ContainerWrap, BackdropWrap), props.isOpen && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n display: inherit;\n "]))), BackdropWrap, BackdropWrap, BackdropWrap, BackdropWrap, ContentWrap, ContentWrap, ContentWrap, ContentWrap)); | ||
// BackdropWrap.defaultProps = { | ||
// defaultTheme: OverlayStyleTheme, | ||
// }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@uiw/react-overlay", | ||
"version": "5.0.0-bate-1", | ||
"version": "5.0.0-bate-10", | ||
"description": "Overlay component", | ||
@@ -48,6 +48,6 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/react-portal": "^5.0.0-bate-1", | ||
"@uiw/utils": "^5.0.0-bate-1", | ||
"@uiw/react-portal": "^5.0.0-bate-10", | ||
"@uiw/utils": "^5.0.0-bate-10", | ||
"react-transition-group": "~4.4.5" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
951
90631
+ Addednanoid@3.3.8(transitive)
- Removednanoid@3.3.7(transitive)
Updated@uiw/utils@^5.0.0-bate-10