53e6dedf3bfbc7abbdc45d8219f51249.json 35.5 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/createSuper\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport RcDrawer from 'rc-drawer';\nimport getScrollBarSize from \"rc-util/es/getScrollBarSize\";\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport { ConfigContext } from '../config-provider';\nimport { tuple } from '../_util/type';\nvar DrawerContext = /*#__PURE__*/React.createContext(null);\nvar PlacementTypes = tuple('top', 'right', 'bottom', 'left');\nvar defaultPushState = {\n  distance: 180\n};\n\nvar Drawer = /*#__PURE__*/function (_React$Component) {\n  _inherits(Drawer, _React$Component);\n\n  var _super = _createSuper(Drawer);\n\n  function Drawer() {\n    var _this;\n\n    _classCallCheck(this, Drawer);\n\n    _this = _super.apply(this, arguments);\n    _this.state = {\n      push: false\n    };\n\n    _this.push = function () {\n      if (_this.props.push) {\n        _this.setState({\n          push: true\n        });\n      }\n    };\n\n    _this.pull = function () {\n      if (_this.props.push) {\n        _this.setState({\n          push: false\n        });\n      }\n    };\n\n    _this.onDestroyTransitionEnd = function () {\n      var isDestroyOnClose = _this.getDestroyOnClose();\n\n      if (!isDestroyOnClose) {\n        return;\n      }\n\n      if (!_this.props.visible) {\n        _this.destroyClose = true;\n\n        _this.forceUpdate();\n      }\n    };\n\n    _this.getDestroyOnClose = function () {\n      return _this.props.destroyOnClose && !_this.props.visible;\n    };\n\n    _this.getPushDistance = function () {\n      var push = _this.props.push;\n      var distance;\n\n      if (typeof push === 'boolean') {\n        distance = push ? defaultPushState.distance : 0;\n      } else {\n        distance = push.distance;\n      }\n\n      return parseFloat(String(distance || 0));\n    }; // get drawer push width or height\n\n\n    _this.getPushTransform = function (placement) {\n      var distance = _this.getPushDistance();\n\n      if (placement === 'left' || placement === 'right') {\n        return \"translateX(\".concat(placement === 'left' ? distance : -distance, \"px)\");\n      }\n\n      if (placement === 'top' || placement === 'bottom') {\n        return \"translateY(\".concat(placement === 'top' ? distance : -distance, \"px)\");\n      }\n    };\n\n    _this.getRcDrawerStyle = function () {\n      var _this$props = _this.props,\n          zIndex = _this$props.zIndex,\n          placement = _this$props.placement,\n          mask = _this$props.mask,\n          style = _this$props.style;\n      var push = _this.state.push; // 当无 mask 时,将 width 应用到外层容器上\n      // 解决 https://github.com/ant-design/ant-design/issues/12401 的问题\n\n      var offsetStyle = mask ? {} : _this.getOffsetStyle();\n      return _extends(_extends({\n        zIndex: zIndex,\n        transform: push ? _this.getPushTransform(placement) : undefined\n      }, offsetStyle), style);\n    }; // render drawer body dom\n\n\n    _this.renderBody = function () {\n      var _this$props2 = _this.props,\n          bodyStyle = _this$props2.bodyStyle,\n          drawerStyle = _this$props2.drawerStyle,\n          prefixCls = _this$props2.prefixCls,\n          visible = _this$props2.visible;\n\n      if (_this.destroyClose && !visible) {\n        return null;\n      }\n\n      _this.destroyClose = false;\n      var containerStyle = {};\n\n      var isDestroyOnClose = _this.getDestroyOnClose();\n\n      if (isDestroyOnClose) {\n        // Increase the opacity transition, delete children after closing.\n        containerStyle.opacity = 0;\n        containerStyle.transition = 'opacity .3s';\n      }\n\n      return /*#__PURE__*/React.createElement(\"div\", {\n        className: \"\".concat(prefixCls, \"-wrapper-body\"),\n        style: _extends(_extends({}, containerStyle), drawerStyle),\n        onTransitionEnd: _this.onDestroyTransitionEnd\n      }, _this.renderHeader(), /*#__PURE__*/React.createElement(\"div\", {\n        className: \"\".concat(prefixCls, \"-body\"),\n        style: bodyStyle\n      }, _this.props.children), _this.renderFooter());\n    }; // render Provider for Multi-level drawer\n\n\n    _this.renderProvider = function (value) {\n      _this.parentDrawer = value;\n\n      var _a = _this.props,\n          prefixCls = _a.prefixCls,\n          placement = _a.placement,\n          className = _a.className,\n          mask = _a.mask,\n          direction = _a.direction,\n          visible = _a.visible,\n          rest = __rest(_a, [\"prefixCls\", \"placement\", \"className\", \"mask\", \"direction\", \"visible\"]);\n\n      var drawerClassName = classNames(_defineProperty({\n        'no-mask': !mask\n      }, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), className);\n      var offsetStyle = mask ? _this.getOffsetStyle() : {};\n      return /*#__PURE__*/React.createElement(DrawerContext.Provider, {\n        value: _assertThisInitialized(_this)\n      }, /*#__PURE__*/React.createElement(RcDrawer, _extends({\n        handler: false\n      }, omit(rest, ['zIndex', 'closable', 'closeIcon', 'destroyOnClose', 'drawerStyle', 'headerStyle', 'bodyStyle', 'footerStyle', 'footer', 'title', 'push', 'visible', 'width', 'height']), offsetStyle, {\n        prefixCls: prefixCls,\n        open: visible,\n        showMask: mask,\n        placement: placement,\n        style: _this.getRcDrawerStyle(),\n        className: drawerClassName\n      }), _this.renderBody()));\n    };\n\n    return _this;\n  }\n\n  _createClass(Drawer, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      // fix: delete drawer in child and re-render, no push started.\n      // <Drawer>{show && <Drawer />}</Drawer>\n      var visible = this.props.visible;\n\n      if (visible && this.parentDrawer) {\n        this.parentDrawer.push();\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(preProps) {\n      var visible = this.props.visible;\n\n      if (preProps.visible !== visible && this.parentDrawer) {\n        if (visible) {\n          this.parentDrawer.push();\n        } else {\n          this.parentDrawer.pull();\n        }\n      }\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      // unmount drawer in child, clear push.\n      if (this.parentDrawer) {\n        this.parentDrawer.pull();\n        this.parentDrawer = null;\n      }\n    }\n  }, {\n    key: \"getOffsetStyle\",\n    value: function getOffsetStyle() {\n      var _this$props3 = this.props,\n          placement = _this$props3.placement,\n          width = _this$props3.width,\n          height = _this$props3.height,\n          visible = _this$props3.visible,\n          mask = _this$props3.mask; // https://github.com/ant-design/ant-design/issues/24287\n\n      if (!visible && !mask) {\n        return {};\n      }\n\n      var offsetStyle = {};\n\n      if (placement === 'left' || placement === 'right') {\n        offsetStyle.width = width;\n      } else {\n        offsetStyle.height = height;\n      }\n\n      return offsetStyle;\n    }\n  }, {\n    key: \"renderHeader\",\n    value: function renderHeader() {\n      var _this$props4 = this.props,\n          title = _this$props4.title,\n          prefixCls = _this$props4.prefixCls,\n          closable = _this$props4.closable,\n          headerStyle = _this$props4.headerStyle;\n\n      if (!title && !closable) {\n        return null;\n      }\n\n      var headerClassName = title ? \"\".concat(prefixCls, \"-header\") : \"\".concat(prefixCls, \"-header-no-title\");\n      return /*#__PURE__*/React.createElement(\"div\", {\n        className: headerClassName,\n        style: headerStyle\n      }, title && /*#__PURE__*/React.createElement(\"div\", {\n        className: \"\".concat(prefixCls, \"-title\")\n      }, title), closable && this.renderCloseIcon());\n    }\n  }, {\n    key: \"renderFooter\",\n    value: function renderFooter() {\n      var _this$props5 = this.props,\n          footer = _this$props5.footer,\n          footerStyle = _this$props5.footerStyle,\n          prefixCls = _this$props5.prefixCls;\n\n      if (!footer) {\n        return null;\n      }\n\n      var footerClassName = \"\".concat(prefixCls, \"-footer\");\n      return /*#__PURE__*/React.createElement(\"div\", {\n        className: footerClassName,\n        style: footerStyle\n      }, footer);\n    }\n  }, {\n    key: \"renderCloseIcon\",\n    value: function renderCloseIcon() {\n      var _this$props6 = this.props,\n          closable = _this$props6.closable,\n          _this$props6$closeIco = _this$props6.closeIcon,\n          closeIcon = _this$props6$closeIco === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined, null) : _this$props6$closeIco,\n          prefixCls = _this$props6.prefixCls,\n          onClose = _this$props6.onClose;\n      return closable && /*#__PURE__*/React.createElement(\"button\", {\n        type: \"button\",\n        onClick: onClose,\n        \"aria-label\": \"Close\",\n        className: \"\".concat(prefixCls, \"-close\"),\n        style: {\n          '--scroll-bar': \"\".concat(getScrollBarSize(), \"px\")\n        }\n      }, closeIcon);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(DrawerContext.Consumer, null, this.renderProvider);\n    }\n  }]);\n\n  return Drawer;\n}(React.Component);\n\nDrawer.defaultProps = {\n  width: 256,\n  height: 256,\n  closable: true,\n  placement: 'right',\n  maskClosable: true,\n  mask: true,\n  level: null,\n  keyboard: true,\n  push: defaultPushState\n};\n\nvar DrawerWrapper = function DrawerWrapper(props) {\n  var customizePrefixCls = props.prefixCls,\n      customizeGetContainer = props.getContainer;\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPopupContainer = _React$useContext.getPopupContainer,\n      getPrefixCls = _React$useContext.getPrefixCls,\n      direction = _React$useContext.direction;\n\n  var prefixCls = getPrefixCls('drawer', customizePrefixCls);\n  var getContainer = // 有可能为 false,所以不能直接判断\n  customizeGetContainer === undefined && getPopupContainer ? function () {\n    return getPopupContainer(document.body);\n  } : customizeGetContainer;\n  return /*#__PURE__*/React.createElement(Drawer, _extends({}, props, {\n    prefixCls: prefixCls,\n    getContainer: getContainer,\n    direction: direction\n  }));\n};\n\nDrawerWrapper.displayName = 'DrawerWrapper';\nexport default DrawerWrapper;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/drawer/index.js"],"names":["_defineProperty","_extends","_classCallCheck","_createClass","_assertThisInitialized","_inherits","_createSuper","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","RcDrawer","getScrollBarSize","CloseOutlined","classNames","omit","ConfigContext","tuple","DrawerContext","createContext","PlacementTypes","defaultPushState","distance","Drawer","_React$Component","_super","_this","apply","arguments","state","push","props","setState","pull","onDestroyTransitionEnd","isDestroyOnClose","getDestroyOnClose","visible","destroyClose","forceUpdate","destroyOnClose","getPushDistance","parseFloat","String","getPushTransform","placement","concat","getRcDrawerStyle","_this$props","zIndex","mask","style","offsetStyle","getOffsetStyle","transform","undefined","renderBody","_this$props2","bodyStyle","drawerStyle","prefixCls","containerStyle","opacity","transition","createElement","className","onTransitionEnd","renderHeader","children","renderFooter","renderProvider","value","parentDrawer","_a","direction","rest","drawerClassName","Provider","handler","open","showMask","key","componentDidMount","componentDidUpdate","preProps","componentWillUnmount","_this$props3","width","height","_this$props4","title","closable","headerStyle","headerClassName","renderCloseIcon","_this$props5","footer","footerStyle","footerClassName","_this$props6","_this$props6$closeIco","closeIcon","onClose","type","onClick","render","Consumer","Component","defaultProps","maskClosable","level","keyboard","DrawerWrapper","customizePrefixCls","customizeGetContainer","getContainer","_React$useContext","useContext","getPopupContainer","getPrefixCls","document","body","displayName"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAOC,QAAP,MAAqB,gCAArB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;AACA,OAAOC,YAAP,MAAyB,oCAAzB;AACA,OAAOC,sBAAP,MAAmC,8CAAnC;AACA,OAAOC,SAAP,MAAsB,iCAAtB;AACA,OAAOC,YAAP,MAAyB,oCAAzB;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CA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AOA,iBAAiB,CAACE,QAAQ,CAACC,IAAV,CAAxB;AACD,GAFD,GAEIP,qBAHJ;AAIA,SAAO,aAAaxG,KAAK,CAACsD,aAAN,CAAoBzC,MAApB,EAA4BjC,QAAQ,CAAC,EAAD,EAAKyC,KAAL,EAAY;AAClE6B,IAAAA,SAAS,EAAEA,SADuD;AAElEuD,IAAAA,YAAY,EAAEA,YAFoD;AAGlEzC,IAAAA,SAAS,EAAEA;AAHuD,GAAZ,CAApC,CAApB;AAKD,CAnBD;;AAqBAsC,aAAa,CAACU,WAAd,GAA4B,eAA5B;AACA,eAAeV,aAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/createSuper\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport RcDrawer from 'rc-drawer';\nimport getScrollBarSize from \"rc-util/es/getScrollBarSize\";\nimport CloseOutlined from '@ant-design/icons/CloseOutlined';\nimport classNames from 'classnames';\nimport omit from 'omit.js';\nimport { ConfigContext } from '../config-provider';\nimport { tuple } from '../_util/type';\nvar DrawerContext = /*#__PURE__*/React.createContext(null);\nvar PlacementTypes = tuple('top', 'right', 'bottom', 'left');\nvar defaultPushState = {\n  distance: 180\n};\n\nvar Drawer = /*#__PURE__*/function (_React$Component) {\n  _inherits(Drawer, _React$Component);\n\n  var _super = _createSuper(Drawer);\n\n  function Drawer() {\n    var _this;\n\n    _classCallCheck(this, Drawer);\n\n    _this = _super.apply(this, arguments);\n    _this.state = {\n      push: false\n    };\n\n    _this.push = function () {\n      if (_this.props.push) {\n        _this.setState({\n          push: true\n        });\n      }\n    };\n\n    _this.pull = function () {\n      if (_this.props.push) {\n        _this.setState({\n          push: false\n        });\n      }\n    };\n\n    _this.onDestroyTransitionEnd = function () {\n      var isDestroyOnClose = _this.getDestroyOnClose();\n\n      if (!isDestroyOnClose) {\n        return;\n      }\n\n      if (!_this.props.visible) {\n        _this.destroyClose = true;\n\n        _this.forceUpdate();\n      }\n    };\n\n    _this.getDestroyOnClose = function () {\n      return _this.props.destroyOnClose && !_this.props.visible;\n    };\n\n    _this.getPushDistance = function () {\n      var push = _this.props.push;\n      var distance;\n\n      if (typeof push === 'boolean') {\n        distance = push ? defaultPushState.distance : 0;\n      } else {\n        distance = push.distance;\n      }\n\n      return parseFloat(String(distance || 0));\n    }; // get drawer push width or height\n\n\n    _this.getPushTransform = function (placement) {\n      var distance = _this.getPushDistance();\n\n      if (placement === 'left' || placement === 'right') {\n        return \"translateX(\".concat(placement === 'left' ? distance : -distance, \"px)\");\n      }\n\n      if (placement === 'top' || placement === 'bottom') {\n        return \"translateY(\".concat(placement === 'top' ? distance : -distance, \"px)\");\n      }\n    };\n\n    _this.getRcDrawerStyle = function () {\n      var _this$props = _this.props,\n          zIndex = _this$props.zIndex,\n          placement = _this$props.placement,\n          mask = _this$props.mask,\n          style = _this$props.style;\n      var push = _this.state.push; // 当无 mask 时,将 width 应用到外层容器上\n      // 解决 https://github.com/ant-design/ant-design/issues/12401 的问题\n\n      var offsetStyle = mask ? {} : _this.getOffsetStyle();\n      return _extends(_extends({\n        zIndex: zIndex,\n        transform: push ? _this.getPushTransform(placement) : undefined\n      }, offsetStyle), style);\n    }; // render drawer body dom\n\n\n    _this.renderBody = function () {\n      var _this$props2 = _this.props,\n          bodyStyle = _this$props2.bodyStyle,\n          drawerStyle = _this$props2.drawerStyle,\n          prefixCls = _this$props2.prefixCls,\n          visible = _this$props2.visible;\n\n      if (_this.destroyClose && !visible) {\n        return null;\n      }\n\n      _this.destroyClose = false;\n      var containerStyle = {};\n\n      var isDestroyOnClose = _this.getDestroyOnClose();\n\n      if (isDestroyOnClose) {\n        // Increase the opacity transition, delete children after closing.\n        containerStyle.opacity = 0;\n        containerStyle.transition = 'opacity .3s';\n      }\n\n      return /*#__PURE__*/React.createElement(\"div\", {\n        className: \"\".concat(prefixCls, \"-wrapper-body\"),\n        style: _extends(_extends({}, containerStyle), drawerStyle),\n        onTransitionEnd: _this.onDestroyTransitionEnd\n      }, _this.renderHeader(), /*#__PURE__*/React.createElement(\"div\", {\n        className: \"\".concat(prefixCls, \"-body\"),\n        style: bodyStyle\n      }, _this.props.children), _this.renderFooter());\n    }; // render Provider for Multi-level drawer\n\n\n    _this.renderProvider = function (value) {\n      _this.parentDrawer = value;\n\n      var _a = _this.props,\n          prefixCls = _a.prefixCls,\n          placement = _a.placement,\n          className = _a.className,\n          mask = _a.mask,\n          direction = _a.direction,\n          visible = _a.visible,\n          rest = __rest(_a, [\"prefixCls\", \"placement\", \"className\", \"mask\", \"direction\", \"visible\"]);\n\n      var drawerClassName = classNames(_defineProperty({\n        'no-mask': !mask\n      }, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), className);\n      var offsetStyle = mask ? _this.getOffsetStyle() : {};\n      return /*#__PURE__*/React.createElement(DrawerContext.Provider, {\n        value: _assertThisInitialized(_this)\n      }, /*#__PURE__*/React.createElement(RcDrawer, _extends({\n        handler: false\n      }, omit(rest, ['zIndex', 'closable', 'closeIcon', 'destroyOnClose', 'drawerStyle', 'headerStyle', 'bodyStyle', 'footerStyle', 'footer', 'title', 'push', 'visible', 'width', 'height']), offsetStyle, {\n        prefixCls: prefixCls,\n        open: visible,\n        showMask: mask,\n        placement: placement,\n        style: _this.getRcDrawerStyle(),\n        className: drawerClassName\n      }), _this.renderBody()));\n    };\n\n    return _this;\n  }\n\n  _createClass(Drawer, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      // fix: delete drawer in child and re-render, no push started.\n      // <Drawer>{show && <Drawer />}</Drawer>\n      var visible = this.props.visible;\n\n      if (visible && this.parentDrawer) {\n        this.parentDrawer.push();\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(preProps) {\n      var visible = this.props.visible;\n\n      if (preProps.visible !== visible && this.parentDrawer) {\n        if (visible) {\n          this.parentDrawer.push();\n        } else {\n          this.parentDrawer.pull();\n        }\n      }\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      // unmount drawer in child, clear push.\n      if (this.parentDrawer) {\n        this.parentDrawer.pull();\n        this.parentDrawer = null;\n      }\n    }\n  }, {\n    key: \"getOffsetStyle\",\n    value: function getOffsetStyle() {\n      var _this$props3 = this.props,\n          placement = _this$props3.placement,\n          width = _this$props3.width,\n          height = _this$props3.height,\n          visible = _this$props3.visible,\n          mask = _this$props3.mask; // https://github.com/ant-design/ant-design/issues/24287\n\n      if (!visible && !mask) {\n        return {};\n      }\n\n      var offsetStyle = {};\n\n      if (placement === 'left' || placement === 'right') {\n        offsetStyle.width = width;\n      } else {\n        offsetStyle.height = height;\n      }\n\n      return offsetStyle;\n    }\n  }, {\n    key: \"renderHeader\",\n    value: function renderHeader() {\n      var _this$props4 = this.props,\n          title = _this$props4.title,\n          prefixCls = _this$props4.prefixCls,\n          closable = _this$props4.closable,\n          headerStyle = _this$props4.headerStyle;\n\n      if (!title && !closable) {\n        return null;\n      }\n\n      var headerClassName = title ? \"\".concat(prefixCls, \"-header\") : \"\".concat(prefixCls, \"-header-no-title\");\n      return /*#__PURE__*/React.createElement(\"div\", {\n        className: headerClassName,\n        style: headerStyle\n      }, title && /*#__PURE__*/React.createElement(\"div\", {\n        className: \"\".concat(prefixCls, \"-title\")\n      }, title), closable && this.renderCloseIcon());\n    }\n  }, {\n    key: \"renderFooter\",\n    value: function renderFooter() {\n      var _this$props5 = this.props,\n          footer = _this$props5.footer,\n          footerStyle = _this$props5.footerStyle,\n          prefixCls = _this$props5.prefixCls;\n\n      if (!footer) {\n        return null;\n      }\n\n      var footerClassName = \"\".concat(prefixCls, \"-footer\");\n      return /*#__PURE__*/React.createElement(\"div\", {\n        className: footerClassName,\n        style: footerStyle\n      }, footer);\n    }\n  }, {\n    key: \"renderCloseIcon\",\n    value: function renderCloseIcon() {\n      var _this$props6 = this.props,\n          closable = _this$props6.closable,\n          _this$props6$closeIco = _this$props6.closeIcon,\n          closeIcon = _this$props6$closeIco === void 0 ? /*#__PURE__*/React.createElement(CloseOutlined, null) : _this$props6$closeIco,\n          prefixCls = _this$props6.prefixCls,\n          onClose = _this$props6.onClose;\n      return closable && /*#__PURE__*/React.createElement(\"button\", {\n        type: \"button\",\n        onClick: onClose,\n        \"aria-label\": \"Close\",\n        className: \"\".concat(prefixCls, \"-close\"),\n        style: {\n          '--scroll-bar': \"\".concat(getScrollBarSize(), \"px\")\n        }\n      }, closeIcon);\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return /*#__PURE__*/React.createElement(DrawerContext.Consumer, null, this.renderProvider);\n    }\n  }]);\n\n  return Drawer;\n}(React.Component);\n\nDrawer.defaultProps = {\n  width: 256,\n  height: 256,\n  closable: true,\n  placement: 'right',\n  maskClosable: true,\n  mask: true,\n  level: null,\n  keyboard: true,\n  push: defaultPushState\n};\n\nvar DrawerWrapper = function DrawerWrapper(props) {\n  var customizePrefixCls = props.prefixCls,\n      customizeGetContainer = props.getContainer;\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPopupContainer = _React$useContext.getPopupContainer,\n      getPrefixCls = _React$useContext.getPrefixCls,\n      direction = _React$useContext.direction;\n\n  var prefixCls = getPrefixCls('drawer', customizePrefixCls);\n  var getContainer = // 有可能为 false,所以不能直接判断\n  customizeGetContainer === undefined && getPopupContainer ? function () {\n    return getPopupContainer(document.body);\n  } : customizeGetContainer;\n  return /*#__PURE__*/React.createElement(Drawer, _extends({}, props, {\n    prefixCls: prefixCls,\n    getContainer: getContainer,\n    direction: direction\n  }));\n};\n\nDrawerWrapper.displayName = 'DrawerWrapper';\nexport default DrawerWrapper;"]},"metadata":{},"sourceType":"module"}