@cleartrip/ct-platform-drawer 1.0.0-beta.2 → 1.0.0-beta.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.
|
@@ -1,123 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var tslib = require('tslib');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var ReactDOM = require('react-dom');
|
|
6
|
-
var classnames = require('classnames');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
var ctDesignIcons = require('@cleartrip/ct-design-icons');
|
|
9
|
-
var ctPlatformUtils = require('@cleartrip/ct-platform-utils');
|
|
10
|
-
|
|
11
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
14
|
-
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
15
|
-
|
|
16
|
-
function styleInject(css, ref) {
|
|
17
|
-
if (ref === void 0) ref = {};
|
|
18
|
-
var insertAt = ref.insertAt;
|
|
19
|
-
if (!css || typeof document === 'undefined') {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
23
|
-
var style = document.createElement('style');
|
|
24
|
-
style.type = 'text/css';
|
|
25
|
-
if (insertAt === 'top') {
|
|
26
|
-
if (head.firstChild) {
|
|
27
|
-
head.insertBefore(style, head.firstChild);
|
|
28
|
-
} else {
|
|
29
|
-
head.appendChild(style);
|
|
30
|
-
}
|
|
31
|
-
} else {
|
|
32
|
-
head.appendChild(style);
|
|
33
|
-
}
|
|
34
|
-
if (style.styleSheet) {
|
|
35
|
-
style.styleSheet.cssText = css;
|
|
36
|
-
} else {
|
|
37
|
-
style.appendChild(document.createTextNode(css));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var css_248z = ".index-module_modal__container__srA-N .index-module_modal__3imuM{display:flex;flex-direction:column;height:100%;justify-content:flex-end;overflow:auto;position:fixed;transition:transform .3s ease;width:auto;z-index:1000}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_left__jAupb{left:0;top:0;transform:translateX(-105%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_right__n7i2S{right:0;top:0;transform:translateX(100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_top__3q-P0{left:0;right:0;top:0;transform:translateY(-100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_bottom__I5s6E{bottom:0;left:0;right:0;transform:translateY(100%)}.index-module_modal__container__srA-N .index-module_overlay__-8Le1{background:rgba(0,0,0,.5);height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;transition:opacity .3s ease,visibility .3s ease;visibility:hidden;width:100%;z-index:0}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_left__jAupb,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_right__n7i2S{transform:translateX(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_bottom__I5s6E,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_top__3q-P0{transform:translateY(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_overlay__-8Le1{opacity:1;pointer-events:auto;visibility:visible;z-index:999}.index-module_drawer-header__IGV4R{align-items:center;background-color:transparent;display:flex;justify-content:flex-end;padding:12px 16px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH{align-items:center;background:#fff;border:none;border-radius:40px;cursor:pointer;display:flex;justify-content:center;outline:none;padding:4px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH:hover{background:#fff}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH .index-module_close-icon__G49OX{height:24px;width:24px}";
|
|
42
|
-
var Styles = {"modal__container":"index-module_modal__container__srA-N","modal":"index-module_modal__3imuM","left":"index-module_left__jAupb","right":"index-module_right__n7i2S","top":"index-module_top__3q-P0","bottom":"index-module_bottom__I5s6E","overlay":"index-module_overlay__-8Le1","transition-end":"index-module_transition-end__ydkLj","open":"index-module_open__30JoF","drawer-header":"index-module_drawer-header__IGV4R","drawer-close-btn__container":"index-module_drawer-close-btn__container__a0chH","close-icon":"index-module_close-icon__G49OX"};
|
|
43
|
-
styleInject(css_248z);
|
|
44
|
-
|
|
45
|
-
var useMountTransition = function (isMounted, unmountDelay) {
|
|
46
|
-
var _a = react.useState(false), isTransitioning = _a[0], setIsTransitioning = _a[1];
|
|
47
|
-
react.useEffect(function () {
|
|
48
|
-
var timeoutId;
|
|
49
|
-
if (isMounted && !isTransitioning) {
|
|
50
|
-
setIsTransitioning(true);
|
|
51
|
-
}
|
|
52
|
-
else if (!isMounted && isTransitioning) {
|
|
53
|
-
timeoutId = setTimeout(function () { return setIsTransitioning(false); }, unmountDelay);
|
|
54
|
-
}
|
|
55
|
-
return function () {
|
|
56
|
-
clearTimeout(timeoutId);
|
|
57
|
-
};
|
|
58
|
-
}, [unmountDelay, isMounted, isTransitioning]);
|
|
59
|
-
return isTransitioning;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var createPortalParent = function () {
|
|
63
|
-
if (!ctPlatformUtils.isServer() && window && document) {
|
|
64
|
-
var drawerParent = document.createElement('div');
|
|
65
|
-
drawerParent.setAttribute('id', 'drawer-parent');
|
|
66
|
-
return drawerParent;
|
|
67
|
-
}
|
|
68
|
-
return null;
|
|
69
|
-
};
|
|
70
|
-
var Drawer = function (_a) {
|
|
71
|
-
var _b;
|
|
72
|
-
var isOpen = _a.isOpen, handleClose = _a.handleClose, onClose = _a.onClose, children = _a.children, _c = _a.direction, direction = _c === void 0 ? 'left' : _c, _d = _a.showClose, showClose = _d === void 0 ? false : _d, _e = _a.overlay, overlay = _e === void 0 ? true : _e;
|
|
73
|
-
var bodyRef = react.useRef(null);
|
|
74
|
-
if (!ctPlatformUtils.isServer() && window && document) {
|
|
75
|
-
bodyRef = react.useRef(document.querySelector('body'));
|
|
76
|
-
}
|
|
77
|
-
var portalParentRef = react.useRef(null);
|
|
78
|
-
if (!ctPlatformUtils.isServer() && window && document) {
|
|
79
|
-
portalParentRef = react.useRef(document.getElementById('drawer-parent') || createPortalParent());
|
|
80
|
-
}
|
|
81
|
-
var isTransitioning = useMountTransition(isOpen, 500);
|
|
82
|
-
react.useEffect(function () {
|
|
83
|
-
var _a;
|
|
84
|
-
(_a = bodyRef === null || bodyRef === void 0 ? void 0 : bodyRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(portalParentRef === null || portalParentRef === void 0 ? void 0 : portalParentRef.current);
|
|
85
|
-
var portal = portalParentRef === null || portalParentRef === void 0 ? void 0 : portalParentRef.current;
|
|
86
|
-
var bodyEl = bodyRef === null || bodyRef === void 0 ? void 0 : bodyRef.current;
|
|
87
|
-
return function () {
|
|
88
|
-
portal === null || portal === void 0 ? void 0 : portal.remove();
|
|
89
|
-
if (bodyEl) {
|
|
90
|
-
bodyEl.style.overflow = '';
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}, []);
|
|
94
|
-
react.useEffect(function () {
|
|
95
|
-
var updatePageScroll = function () {
|
|
96
|
-
if (bodyRef && bodyRef.current) {
|
|
97
|
-
if (isOpen) {
|
|
98
|
-
bodyRef.current.style.overflow = 'hidden';
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
bodyRef.current.style.overflow = '';
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
updatePageScroll();
|
|
106
|
-
}, [isOpen]);
|
|
107
|
-
if (!isTransitioning && !isOpen) {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: ReactDOM__default.default.createPortal(jsxRuntime.jsx("div", tslib.__assign({ className: "".concat(Styles['utilswrapper'], " utilswrapper ") }, { children: jsxRuntime.jsxs("div", tslib.__assign({ "aria-hidden": isOpen ? 'false' : 'true', className: classnames__default.default(Styles['modal__container'], (_b = {},
|
|
111
|
-
_b[Styles['open']] = isOpen,
|
|
112
|
-
_b[Styles['transition-end']] = isTransitioning,
|
|
113
|
-
_b)) }, { children: [jsxRuntime.jsxs("div", tslib.__assign({ className: classnames__default.default(Styles['modal'], Styles[direction]), role: 'dialog' }, { children: [showClose && (jsxRuntime.jsx("div", tslib.__assign({ className: Styles['drawer-header'] }, { children: jsxRuntime.jsx("button", tslib.__assign({ className: Styles['drawer-close-btn__container'], onClick: function (evt) {
|
|
114
|
-
handleClose(evt);
|
|
115
|
-
onClose();
|
|
116
|
-
} }, { children: jsxRuntime.jsx(ctDesignIcons.Cross, { className: Styles['close-icon'], crossColor: '#1A1A1A' }) })) }))), children] })), overlay && (jsxRuntime.jsx("div", { className: "".concat(Styles['overlay']), onClick: function (evt) {
|
|
117
|
-
handleClose(evt);
|
|
118
|
-
onClose();
|
|
119
|
-
} }))] })) })), portalParentRef === null || portalParentRef === void 0 ? void 0 : portalParentRef.current) }));
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
exports.Drawer = Drawer;
|
|
1
|
+
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),o=require("react-dom"),d=require("classnames"),i=require("react"),r=require("@cleartrip/ct-design-icons"),t=require("@cleartrip/ct-platform-utils");function _(e){return e&&e.__esModule?e:{default:e}}var l=_(o),a=_(d);var u={modal__container:"index-module_modal__container__srA-N",modal:"index-module_modal__3imuM",left:"index-module_left__jAupb",right:"index-module_right__n7i2S",top:"index-module_top__3q-P0",bottom:"index-module_bottom__I5s6E",overlay:"index-module_overlay__-8Le1","transition-end":"index-module_transition-end__ydkLj",open:"index-module_open__30JoF","drawer-header":"index-module_drawer-header__IGV4R","drawer-close-btn__container":"index-module_drawer-close-btn__container__a0chH","close-icon":"index-module_close-icon__G49OX"};!function(e,n){void 0===n&&(n={});var o=n.insertAt;if(e&&"undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&d.firstChild?d.insertBefore(i,d.firstChild):d.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".index-module_modal__container__srA-N .index-module_modal__3imuM{display:flex;flex-direction:column;height:100%;justify-content:flex-end;overflow:auto;position:fixed;transition:transform .3s ease;width:auto;z-index:1000}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_left__jAupb{left:0;top:0;transform:translateX(-105%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_right__n7i2S{right:0;top:0;transform:translateX(100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_top__3q-P0{left:0;right:0;top:0;transform:translateY(-100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_bottom__I5s6E{bottom:0;left:0;right:0;transform:translateY(100%)}.index-module_modal__container__srA-N .index-module_overlay__-8Le1{background:rgba(0,0,0,.5);height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;transition:opacity .3s ease,visibility .3s ease;visibility:hidden;width:100%;z-index:0}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_left__jAupb,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_right__n7i2S{transform:translateX(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_bottom__I5s6E,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_top__3q-P0{transform:translateY(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_overlay__-8Le1{opacity:1;pointer-events:auto;visibility:visible;z-index:999}.index-module_drawer-header__IGV4R{align-items:center;background-color:transparent;display:flex;justify-content:flex-end;padding:12px 16px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH{align-items:center;background:#fff;border:none;border-radius:40px;cursor:pointer;display:flex;justify-content:center;outline:none;padding:4px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH:hover{background:#fff}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH .index-module_close-icon__G49OX{height:24px;width:24px}");exports.Drawer=function(o){var d,_=o.isOpen,s=o.handleClose,m=o.onClose,c=o.children,x=o.direction,f=void 0===x?"left":x,p=o.showClose,h=void 0!==p&&p,v=o.overlay,y=void 0===v||v,w=i.useRef(null);!t.isServer()&&window&&document&&(w=i.useRef(document.querySelector("body")));var g=i.useRef(null);!t.isServer()&&window&&document&&(g=i.useRef(document.getElementById("drawer-parent")||function(){if(!t.isServer()&&window&&document){var e=document.createElement("div");return e.setAttribute("id","drawer-parent"),e}return null}()));var b=function(e,n){var o=i.useState(!1),d=o[0],r=o[1];return i.useEffect((function(){var o;return e&&!d?r(!0):!e&&d&&(o=setTimeout((function(){return r(!1)}),n)),function(){clearTimeout(o)}}),[n,e,d]),d}(_,500);return i.useEffect((function(){var e;null===(e=null==w?void 0:w.current)||void 0===e||e.appendChild(null==g?void 0:g.current);var n=null==g?void 0:g.current,o=null==w?void 0:w.current;return function(){null==n||n.remove(),o&&(o.style.overflow="")}}),[]),i.useEffect((function(){w&&w.current&&(w.current.style.overflow=_?"hidden":"")}),[_]),b||_?n.jsx(n.Fragment,{children:l.default.createPortal(n.jsx("div",e.__assign({className:"".concat(u.utilswrapper," utilswrapper ")},{children:n.jsxs("div",e.__assign({"aria-hidden":_?"false":"true",className:a.default(u.modal__container,(d={},d[u.open]=_,d[u["transition-end"]]=b,d))},{children:[n.jsxs("div",e.__assign({className:a.default(u.modal,u[f]),role:"dialog"},{children:[h&&n.jsx("div",e.__assign({className:u["drawer-header"]},{children:n.jsx("button",e.__assign({className:u["drawer-close-btn__container"],onClick:function(e){s(e),m()}},{children:n.jsx(r.Cross,{className:u["close-icon"],crossColor:"#1A1A1A"})}))})),c]})),y&&n.jsx("div",{className:"".concat(u.overlay),onClick:function(e){s(e),m()}})]}))})),null==g?void 0:g.current)}):null};
|
|
123
2
|
//# sourceMappingURL=ct-platform-drawer.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-drawer.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/Drawer/src/
|
|
1
|
+
{"version":3,"file":"ct-platform-drawer.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/Drawer/src/Drawer.tsx","../packages/components/Drawer/src/useMountTransition.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","_a","isOpen","handleClose","onClose","children","_c","direction","_d","showClose","_e","overlay","bodyRef","useRef","isServer","window","querySelector","portalParentRef","getElementById","drawerParent","setAttribute","createPortalParent","isTransitioning","isMounted","unmountDelay","useState","setIsTransitioning","useEffect","timeoutId","setTimeout","clearTimeout","useMountTransition","current","portal","bodyEl","remove","overflow","_jsx","_Fragment","ReactDOM","default","createPortal","jsx","__assign","className","Styles","_jsxs","jsxs","classnames","_b","role","onClick","evt","Cross","crossColor","concat"],"mappings":"izBAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAI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,CACIO,UAAW,GAAAW,OAAGV,EAAgB,SAC9BM,QAAS,SAACC,GACNjD,EAAYiD,GACZhD,GACJ,WAKhBa,aAAe,EAAfA,EAAiBe,WAtDlB,IA0Df","x_google_ignoreList":[0]}
|
|
@@ -1,116 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import ReactDOM from 'react-dom';
|
|
4
|
-
import classnames from 'classnames';
|
|
5
|
-
import { useState, useEffect, useRef } from 'react';
|
|
6
|
-
import { Cross } from '@cleartrip/ct-design-icons';
|
|
7
|
-
import { isServer } from '@cleartrip/ct-platform-utils';
|
|
8
|
-
|
|
9
|
-
function styleInject(css, ref) {
|
|
10
|
-
if (ref === void 0) ref = {};
|
|
11
|
-
var insertAt = ref.insertAt;
|
|
12
|
-
if (!css || typeof document === 'undefined') {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
16
|
-
var style = document.createElement('style');
|
|
17
|
-
style.type = 'text/css';
|
|
18
|
-
if (insertAt === 'top') {
|
|
19
|
-
if (head.firstChild) {
|
|
20
|
-
head.insertBefore(style, head.firstChild);
|
|
21
|
-
} else {
|
|
22
|
-
head.appendChild(style);
|
|
23
|
-
}
|
|
24
|
-
} else {
|
|
25
|
-
head.appendChild(style);
|
|
26
|
-
}
|
|
27
|
-
if (style.styleSheet) {
|
|
28
|
-
style.styleSheet.cssText = css;
|
|
29
|
-
} else {
|
|
30
|
-
style.appendChild(document.createTextNode(css));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var css_248z = ".index-module_modal__container__srA-N .index-module_modal__3imuM{display:flex;flex-direction:column;height:100%;justify-content:flex-end;overflow:auto;position:fixed;transition:transform .3s ease;width:auto;z-index:1000}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_left__jAupb{left:0;top:0;transform:translateX(-105%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_right__n7i2S{right:0;top:0;transform:translateX(100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_top__3q-P0{left:0;right:0;top:0;transform:translateY(-100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_bottom__I5s6E{bottom:0;left:0;right:0;transform:translateY(100%)}.index-module_modal__container__srA-N .index-module_overlay__-8Le1{background:rgba(0,0,0,.5);height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;transition:opacity .3s ease,visibility .3s ease;visibility:hidden;width:100%;z-index:0}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_left__jAupb,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_right__n7i2S{transform:translateX(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_bottom__I5s6E,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_top__3q-P0{transform:translateY(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_overlay__-8Le1{opacity:1;pointer-events:auto;visibility:visible;z-index:999}.index-module_drawer-header__IGV4R{align-items:center;background-color:transparent;display:flex;justify-content:flex-end;padding:12px 16px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH{align-items:center;background:#fff;border:none;border-radius:40px;cursor:pointer;display:flex;justify-content:center;outline:none;padding:4px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH:hover{background:#fff}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH .index-module_close-icon__G49OX{height:24px;width:24px}";
|
|
35
|
-
var Styles = {"modal__container":"index-module_modal__container__srA-N","modal":"index-module_modal__3imuM","left":"index-module_left__jAupb","right":"index-module_right__n7i2S","top":"index-module_top__3q-P0","bottom":"index-module_bottom__I5s6E","overlay":"index-module_overlay__-8Le1","transition-end":"index-module_transition-end__ydkLj","open":"index-module_open__30JoF","drawer-header":"index-module_drawer-header__IGV4R","drawer-close-btn__container":"index-module_drawer-close-btn__container__a0chH","close-icon":"index-module_close-icon__G49OX"};
|
|
36
|
-
styleInject(css_248z);
|
|
37
|
-
|
|
38
|
-
var useMountTransition = function (isMounted, unmountDelay) {
|
|
39
|
-
var _a = useState(false), isTransitioning = _a[0], setIsTransitioning = _a[1];
|
|
40
|
-
useEffect(function () {
|
|
41
|
-
var timeoutId;
|
|
42
|
-
if (isMounted && !isTransitioning) {
|
|
43
|
-
setIsTransitioning(true);
|
|
44
|
-
}
|
|
45
|
-
else if (!isMounted && isTransitioning) {
|
|
46
|
-
timeoutId = setTimeout(function () { return setIsTransitioning(false); }, unmountDelay);
|
|
47
|
-
}
|
|
48
|
-
return function () {
|
|
49
|
-
clearTimeout(timeoutId);
|
|
50
|
-
};
|
|
51
|
-
}, [unmountDelay, isMounted, isTransitioning]);
|
|
52
|
-
return isTransitioning;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
var createPortalParent = function () {
|
|
56
|
-
if (!isServer() && window && document) {
|
|
57
|
-
var drawerParent = document.createElement('div');
|
|
58
|
-
drawerParent.setAttribute('id', 'drawer-parent');
|
|
59
|
-
return drawerParent;
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
};
|
|
63
|
-
var Drawer = function (_a) {
|
|
64
|
-
var _b;
|
|
65
|
-
var isOpen = _a.isOpen, handleClose = _a.handleClose, onClose = _a.onClose, children = _a.children, _c = _a.direction, direction = _c === void 0 ? 'left' : _c, _d = _a.showClose, showClose = _d === void 0 ? false : _d, _e = _a.overlay, overlay = _e === void 0 ? true : _e;
|
|
66
|
-
var bodyRef = useRef(null);
|
|
67
|
-
if (!isServer() && window && document) {
|
|
68
|
-
bodyRef = useRef(document.querySelector('body'));
|
|
69
|
-
}
|
|
70
|
-
var portalParentRef = useRef(null);
|
|
71
|
-
if (!isServer() && window && document) {
|
|
72
|
-
portalParentRef = useRef(document.getElementById('drawer-parent') || createPortalParent());
|
|
73
|
-
}
|
|
74
|
-
var isTransitioning = useMountTransition(isOpen, 500);
|
|
75
|
-
useEffect(function () {
|
|
76
|
-
var _a;
|
|
77
|
-
(_a = bodyRef === null || bodyRef === void 0 ? void 0 : bodyRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(portalParentRef === null || portalParentRef === void 0 ? void 0 : portalParentRef.current);
|
|
78
|
-
var portal = portalParentRef === null || portalParentRef === void 0 ? void 0 : portalParentRef.current;
|
|
79
|
-
var bodyEl = bodyRef === null || bodyRef === void 0 ? void 0 : bodyRef.current;
|
|
80
|
-
return function () {
|
|
81
|
-
portal === null || portal === void 0 ? void 0 : portal.remove();
|
|
82
|
-
if (bodyEl) {
|
|
83
|
-
bodyEl.style.overflow = '';
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}, []);
|
|
87
|
-
useEffect(function () {
|
|
88
|
-
var updatePageScroll = function () {
|
|
89
|
-
if (bodyRef && bodyRef.current) {
|
|
90
|
-
if (isOpen) {
|
|
91
|
-
bodyRef.current.style.overflow = 'hidden';
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
bodyRef.current.style.overflow = '';
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
updatePageScroll();
|
|
99
|
-
}, [isOpen]);
|
|
100
|
-
if (!isTransitioning && !isOpen) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
return (jsx(Fragment, { children: ReactDOM.createPortal(jsx("div", __assign({ className: "".concat(Styles['utilswrapper'], " utilswrapper ") }, { children: jsxs("div", __assign({ "aria-hidden": isOpen ? 'false' : 'true', className: classnames(Styles['modal__container'], (_b = {},
|
|
104
|
-
_b[Styles['open']] = isOpen,
|
|
105
|
-
_b[Styles['transition-end']] = isTransitioning,
|
|
106
|
-
_b)) }, { children: [jsxs("div", __assign({ className: classnames(Styles['modal'], Styles[direction]), role: 'dialog' }, { children: [showClose && (jsx("div", __assign({ className: Styles['drawer-header'] }, { children: jsx("button", __assign({ className: Styles['drawer-close-btn__container'], onClick: function (evt) {
|
|
107
|
-
handleClose(evt);
|
|
108
|
-
onClose();
|
|
109
|
-
} }, { children: jsx(Cross, { className: Styles['close-icon'], crossColor: '#1A1A1A' }) })) }))), children] })), overlay && (jsx("div", { className: "".concat(Styles['overlay']), onClick: function (evt) {
|
|
110
|
-
handleClose(evt);
|
|
111
|
-
onClose();
|
|
112
|
-
} }))] })) })), portalParentRef === null || portalParentRef === void 0 ? void 0 : portalParentRef.current) }));
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export { Drawer };
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n,Fragment as o,jsxs as d}from"react/jsx-runtime";import i from"react-dom";import t from"classnames";import{useState as r,useEffect as _,useRef as l}from"react";import{Cross as a}from"@cleartrip/ct-design-icons";import{isServer as m}from"@cleartrip/ct-platform-utils";var u={modal__container:"index-module_modal__container__srA-N",modal:"index-module_modal__3imuM",left:"index-module_left__jAupb",right:"index-module_right__n7i2S",top:"index-module_top__3q-P0",bottom:"index-module_bottom__I5s6E",overlay:"index-module_overlay__-8Le1","transition-end":"index-module_transition-end__ydkLj",open:"index-module_open__30JoF","drawer-header":"index-module_drawer-header__IGV4R","drawer-close-btn__container":"index-module_drawer-close-btn__container__a0chH","close-icon":"index-module_close-icon__G49OX"};!function(e,n){void 0===n&&(n={});var o=n.insertAt;if(e&&"undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&d.firstChild?d.insertBefore(i,d.firstChild):d.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".index-module_modal__container__srA-N .index-module_modal__3imuM{display:flex;flex-direction:column;height:100%;justify-content:flex-end;overflow:auto;position:fixed;transition:transform .3s ease;width:auto;z-index:1000}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_left__jAupb{left:0;top:0;transform:translateX(-105%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_right__n7i2S{right:0;top:0;transform:translateX(100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_top__3q-P0{left:0;right:0;top:0;transform:translateY(-100%)}.index-module_modal__container__srA-N .index-module_modal__3imuM.index-module_bottom__I5s6E{bottom:0;left:0;right:0;transform:translateY(100%)}.index-module_modal__container__srA-N .index-module_overlay__-8Le1{background:rgba(0,0,0,.5);height:100%;left:0;opacity:0;pointer-events:none;position:fixed;top:0;transition:opacity .3s ease,visibility .3s ease;visibility:hidden;width:100%;z-index:0}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_left__jAupb,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_right__n7i2S{transform:translateX(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_bottom__I5s6E,.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_top__3q-P0{transform:translateY(0)}.index-module_modal__container__srA-N.index-module_transition-end__ydkLj.index-module_open__30JoF .index-module_overlay__-8Le1{opacity:1;pointer-events:auto;visibility:visible;z-index:999}.index-module_drawer-header__IGV4R{align-items:center;background-color:transparent;display:flex;justify-content:flex-end;padding:12px 16px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH{align-items:center;background:#fff;border:none;border-radius:40px;cursor:pointer;display:flex;justify-content:center;outline:none;padding:4px}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH:hover{background:#fff}.index-module_drawer-header__IGV4R .index-module_drawer-close-btn__container__a0chH .index-module_close-icon__G49OX{height:24px;width:24px}");var c=function(c){var s,x=c.isOpen,p=c.handleClose,f=c.onClose,h=c.children,v=c.direction,y=void 0===v?"left":v,w=c.showClose,b=void 0!==w&&w,g=c.overlay,N=void 0===g||g,A=l(null);!m()&&window&&document&&(A=l(document.querySelector("body")));var j=l(null);!m()&&window&&document&&(j=l(document.getElementById("drawer-parent")||function(){if(!m()&&window&&document){var e=document.createElement("div");return e.setAttribute("id","drawer-parent"),e}return null}()));var k=function(e,n){var o=r(!1),d=o[0],i=o[1];return _((function(){var o;return e&&!d?i(!0):!e&&d&&(o=setTimeout((function(){return i(!1)}),n)),function(){clearTimeout(o)}}),[n,e,d]),d}(x,500);return _((function(){var e;null===(e=null==A?void 0:A.current)||void 0===e||e.appendChild(null==j?void 0:j.current);var n=null==j?void 0:j.current,o=null==A?void 0:A.current;return function(){null==n||n.remove(),o&&(o.style.overflow="")}}),[]),_((function(){A&&A.current&&(A.current.style.overflow=x?"hidden":"")}),[x]),k||x?n(o,{children:i.createPortal(n("div",e({className:"".concat(u.utilswrapper," utilswrapper ")},{children:d("div",e({"aria-hidden":x?"false":"true",className:t(u.modal__container,(s={},s[u.open]=x,s[u["transition-end"]]=k,s))},{children:[d("div",e({className:t(u.modal,u[y]),role:"dialog"},{children:[b&&n("div",e({className:u["drawer-header"]},{children:n("button",e({className:u["drawer-close-btn__container"],onClick:function(e){p(e),f()}},{children:n(a,{className:u["close-icon"],crossColor:"#1A1A1A"})}))})),h]})),N&&n("div",{className:"".concat(u.overlay),onClick:function(e){p(e),f()}})]}))})),null==j?void 0:j.current)}):null};export{c as Drawer};
|
|
116
2
|
//# sourceMappingURL=ct-platform-drawer.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-drawer.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/Drawer/src/useMountTransition.tsx","../packages/components/Drawer/src/Drawer.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["
|
|
1
|
+
{"version":3,"file":"ct-platform-drawer.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/Drawer/src/useMountTransition.tsx","../packages/components/Drawer/src/Drawer.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Drawer","_a","isOpen","handleClose","onClose","children","_c","direction","_d","showClose","_e","overlay","bodyRef","useRef","isServer","window","querySelector","portalParentRef","getElementById","drawerParent","setAttribute","createPortalParent","isTransitioning","isMounted","unmountDelay","useState","setIsTransitioning","useEffect","timeoutId","setTimeout","clearTimeout","useMountTransition","current","portal","bodyEl","remove","overflow","_jsx","_Fragment","ReactDOM","createPortal","__assign","className","Styles","_jsxs","classnames","_b","role","onClick","evt","Cross","crossColor","concat"],"mappings":"g1BAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH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-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"description": "Drawer Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/ct-platform-drawer.cjs.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@cleartrip/ct-design-icons": "
|
|
13
|
+
"@cleartrip/ct-design-icons": "7.0.0",
|
|
14
14
|
"classnames": "^2.5.1",
|
|
15
15
|
"styled-components": "^5.3.11",
|
|
16
|
-
"@cleartrip/ct-platform-utils": "1.0.0-beta.
|
|
16
|
+
"@cleartrip/ct-platform-utils": "1.0.0-beta.3"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|