@cleartrip/ct-design-bottomsheet 1.1.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.
- package/dist/BottomSheet.d.ts +5 -0
- package/dist/BottomSheet.d.ts.map +1 -0
- package/dist/BottomSheetHeader/BottomSheetHeader.d.ts +11 -0
- package/dist/BottomSheetHeader/BottomSheetHeader.d.ts.map +1 -0
- package/dist/ct-design-bottomsheet.browser.cjs.js +2 -0
- package/dist/ct-design-bottomsheet.browser.cjs.js.map +1 -0
- package/dist/ct-design-bottomsheet.browser.esm.js +2 -0
- package/dist/ct-design-bottomsheet.browser.esm.js.map +1 -0
- package/dist/ct-design-bottomsheet.cjs.js +97 -0
- package/dist/ct-design-bottomsheet.cjs.js.map +1 -0
- package/dist/ct-design-bottomsheet.esm.js +94 -0
- package/dist/ct-design-bottomsheet.esm.js.map +1 -0
- package/dist/ct-design-bottomsheet.umd.js +657 -0
- package/dist/ct-design-bottomsheet.umd.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/style.d.ts +8 -0
- package/dist/style.d.ts.map +1 -0
- package/dist/type.d.ts +43 -0
- package/dist/type.d.ts.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IBottomSheetComponentProps } from './type';
|
|
2
|
+
export declare const slideDirection: Record<string, 'up' | 'down'>;
|
|
3
|
+
export declare const BottomSheet: ({ direction, children, header, onClose, isOpen, transitionDuration: timeout, overlayCloseIcon, allowedBackdropClose, showBorderRadius, styleConfig, disableOutSideClick, }: IBottomSheetComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
export default BottomSheet;
|
|
5
|
+
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../packages/components/Bottomsheet/src/BottomSheet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAKpD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAGxD,CAAC;AASF,eAAO,MAAM,WAAW,+KAYrB,0BAA0B,mDAuG5B,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IBottomSheetHeaderProps } from '../type';
|
|
2
|
+
export declare const enum CLOSE_ICON_TYPE {
|
|
3
|
+
CROSS = "CROSS",
|
|
4
|
+
BACK = "BACK"
|
|
5
|
+
}
|
|
6
|
+
declare const BottomSheetHeader: {
|
|
7
|
+
(props: IBottomSheetHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
defaultProps: {};
|
|
9
|
+
};
|
|
10
|
+
export default BottomSheetHeader;
|
|
11
|
+
//# sourceMappingURL=BottomSheetHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetHeader.d.ts","sourceRoot":"","sources":["../../packages/components/Bottomsheet/src/BottomSheetHeader/BottomSheetHeader.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAG7D,0BAAkB,eAAe;IAC/B,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,QAAA,MAAM,iBAAiB;YAAW,uBAAuB;;CAoCxD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e,i=require("tslib"),r=require("react/jsx-runtime"),o=require("@cleartrip/ct-design-container"),t=require("@cleartrip/ct-design-outside-click-handler"),s=require("@cleartrip/ct-design-overlay"),n=require("@cleartrip/ct-design-portal"),d=require("@cleartrip/ct-design-transition"),a=require("react"),l=require("@cleartrip/ct-design-icons"),c=require("@cleartrip/ct-design-theme");exports.DIRECTION=void 0,(e=exports.DIRECTION||(exports.DIRECTION={})).DOWN="down",e.UP="up";var u;!function(e){e.CROSS="CROSS",e.BACK="BACK"}(u||(u={}));var p=function(e){var t=e.handleClose,s=e.styleConfig,n=e.isBack,d=e.children,a=e.showBorderRadius,u=void 0===a||a,p=e.direction,h=void 0===p?exports.DIRECTION.DOWN:p,v=c.useTheme(),g=(s||{}).headerContainer,x=function(e){var r=e.theme,o=e.isLeft,t=e.isTop,s=void 0===t||t;return i.__assign({position:"absolute",right:o?"unset":"10px",backgroundColor:"white",height:r.size[8],width:r.size[8],display:"flex",alignItems:"center",padding:r.spacing[1],borderRadius:r.border.radius["50P"],cursor:"pointer",justifyContent:"center"},s?{top:"-44px"}:{bottom:"-44px"})}({theme:v,isLeft:n,isTop:h===exports.DIRECTION.DOWN}),C=function(e){return void 0===e&&(e=!1),e?r.jsx(l.ModalBack,{}):r.jsx(l.Cross,{height:24,width:24,crossColor:v.color.background.primary})}(n);return r.jsxs(o.Container,i.__assign({className:null==g?void 0:g.className,css:i.__assign(i.__assign({backgroundColor:v.color.background.neutral,zIndex:v.zIndex.bottomSheet},u&&h===exports.DIRECTION.DOWN&&{borderTopLeftRadius:v.border.radius[16],borderTopRightRadius:v.border.radius[16],overflow:"hidden"}),null==g?void 0:g.css)},{children:[r.jsx(o.Container,i.__assign({css:i.__assign({},x),onClick:t},{children:C})),d]}))};p.defaultProps={};var h={up:"down",down:"up"},v=function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--mvh","".concat(e,"px"))};exports.BottomSheet=function(e){var l=e.direction,u=void 0===l?"down":l,g=e.children,x=e.header,C=e.onClose,m=e.isOpen,f=void 0!==m&&m,b=e.transitionDuration,w=void 0===b?200:b,_=e.overlayCloseIcon,O=e.allowedBackdropClose,I=void 0===O||O,R=e.showBorderRadius,y=void 0===R||R,k=e.styleConfig,E=void 0===k?{}:k,N=e.disableOutSideClick,T=void 0!==N&&N,D=a.useState(f),j=D[0],B=D[1],S=c.useTheme();a.useEffect((function(){return v(),window.addEventListener("resize",v),function(){window.removeEventListener("resize",v)}}),[]);var q=_||{},z=q.show,L=void 0!==z&&z,P=q.isBack,W=void 0!==P&&P,H=E||{},A=H.bottomSheetContainer,K=H.overlayWrapper;return a.useEffect((function(){f&&B(!0)}),[f]),j?r.jsx(n.Portal,{children:r.jsx(s.Overlay,i.__assign({blur:!0,customOverlayWrapperClass:null==K?void 0:K.className,css:i.__assign({position:"fixed",bottom:0,justifyContent:"center",zIndex:S.zIndex.bottomSheet,alignItems:"".concat("down"===u?"flex-end":"flex-start")},null==K?void 0:K.css)},{children:r.jsx(t.OutsideClickHandler,i.__assign({disabled:T,onOutsideClick:function(e){T||(e.preventDefault(),I&&C&&C({isClosedByOutSideClick:!0}))},wrapperProps:{style:{width:"100%"}}},{children:r.jsx(d.Transition,i.__assign({type:"slide",slideDirection:h[u],timeout:w,mountOnEnter:!0,unmountOnExit:!0,appear:!0,in:f,onExited:function(){B(!1)}},{children:r.jsxs(o.Container,i.__assign({className:null==A?void 0:A.className,css:i.__assign({position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",background:"white",borderTopLeftRadius:16,borderTopRightRadius:16,maxHeight:"calc(var(--mvh) * 92)",boxShadow:S.elevation.bottomE2},null==A?void 0:A.css)},{children:[L&&r.jsx(p,{direction:u,showBorderRadius:y,handleClose:C,isBack:W,children:x}),g]}))}))}))}))}):null},exports.BottomSheetHeader=p;
|
|
2
|
+
//# sourceMappingURL=ct-design-bottomsheet.browser.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ct-design-bottomsheet.browser.cjs.js","sources":["../packages/components/Bottomsheet/src/type.ts","../packages/components/Bottomsheet/src/style.ts","../packages/components/Bottomsheet/src/BottomSheetHeader/BottomSheetHeader.tsx","../packages/components/Bottomsheet/src/BottomSheet.tsx"],"sourcesContent":[null,null,null,null],"names":["DIRECTION","CLOSE_ICON_TYPE","BottomSheetHeader","props","handleClose","styleConfig","isBack","children","_a","showBorderRadius","_b","direction","DOWN","theme","useTheme","headerContainer","closeButtonStyles","isLeft","isTop","__assign","position","right","backgroundColor","height","size","width","display","alignItems","padding","spacing","borderRadius","border","radius","cursor","justifyContent","top","bottom","getCloseButtonStyle","CloseIcon","_jsx","jsx","ModalBack","Cross","crossColor","color","background","primary","getCloseIcon","_jsxs","jsxs","Container","className","css","neutral","zIndex","bottomSheet","borderTopLeftRadius","borderTopRightRadius","overflow","onClick","defaultProps","slideDirection","up","down","handleWindowResize","vh","window","innerHeight","document","documentElement","style","setProperty","concat","header","onClose","_c","isOpen","_d","transitionDuration","timeout","overlayCloseIcon","_e","allowedBackdropClose","_f","_g","_h","disableOutSideClick","_j","useState","isVisible","setIsVisible","useEffect","addEventListener","removeEventListener","_k","_l","show","_m","_o","bottomSheetContainer","overlayWrapper","Portal","Overlay","blur","customOverlayWrapperClass","OutsideClickHandler","disabled","onOutsideClick","event","preventDefault","isClosedByOutSideClick","wrapperProps","Transition","type","mountOnEnter","unmountOnExit","appear","in","onExited","flexDirection","maxHeight","boxShadow","elevation","bottomE2"],"mappings":"iBA+EkBA,2XAAAA,QAGjBA,eAAA,GAHiBA,EAAAA,QAASA,YAATA,kBAGjB,CAAA,IAFC,KAAA,OACAA,EAAA,GAAA,KC9EK,ICIWC,GAAlB,SAAkBA,GAChBA,EAAA,MAAA,QACAA,EAAA,KAAA,MACD,CAHD,CAAkBA,IAAAA,EAGjB,CAAA,IAEK,IAAAC,EAAoB,SAACC,GACjB,IAAAC,EAAoGD,EAAzFC,YAAEC,EAAuFF,EAA5EE,YAAEC,EAA0EH,SAAlEI,EAAkEJ,EAAKI,SAA7DC,EAAwDL,EAAjCM,iBAAvBA,OAAmB,IAAAD,KAAME,EAA+BP,EAAKQ,UAApCA,OAAS,IAAAD,EAAGV,QAAAA,UAAUY,OAC7FC,EAAQC,EAAAA,WAENC,GAAoBV,GAAe,CAAA,mBAErCW,EDf2B,SAACR,OAClCK,EAAKL,EAAAK,MACLI,EAAMT,EAAAS,OACNP,UAAAQ,OAAQ,I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gBjD,UAC3CC,IACEjC,EAAAA,SAAA,CAAAC,SAAU,QACVgB,OAAQ,EACRF,eAAgB,SAChBoB,OAAQzC,EAAMyC,OAAOC,YACrB5B,WAAY,GAAG6C,OAAc,SAAd7D,EAAuB,WAAa,eAChDyF,eAAAA,EAAgBhD,MAAG,CAAA7C,SAGxBgC,EAAAA,IAACkE,EAAmBA,gCAClBC,SAAUpB,EACVqB,eAlCqB,SAACC,GAC1BtB,IACJsB,EAAMC,iBACF3B,GAAwBR,GAC1BA,EAAQ,CAAEoC,wBAAwB,IAEtC,EA6BUC,aAAc,CAAEzC,MAAO,CAAE7C,MAAO,UAAU,CAAAlB,SAE1CgC,MAACyE,EAAAA,WAAU7F,EAAAA,SAAA,CACT8F,KAAK,QACLpD,eAAgBA,EAAelD,GAC/BoE,QAASA,EACTmC,cAAY,EACZC,eAAa,EACbC,QACA,EAAAC,GAAIzC,EACJ0C,SAtCS,WACnB5B,GAAa,EACf,GAoCkC,CAAAnF,SAEtByC,OAACE,EAAAA,UACC/B,EAAAA,SAAA,CAAAgC,UAAWgD,aAAoB,EAApBA,EAAsBhD,UACjCC,IACEjC,EAAAA,SAAA,CAAAC,SAAU,WACVK,MAAO,OACPF,OAAQ,OACRG,QAAS,OACT6F,cAAe,SACf1E,WAAY,QACZW,oBAAqB,GACrBC,qBAAsB,GACtB+D,UAAW,wBACXC,UAAW5G,EAAM6G,UAAUC,UACxBxB,aAAA,EAAAA,EAAsB/C,MAG1B,CAAA7C,SAAA,CAAAyF,GACCzD,EAAAC,IAACtC,EAAiB,CAChBS,UAAWA,EACXF,iBAAkBA,EAClBL,YAAasE,EACbpE,OAAQA,EACRC,SAAUkE,IAGblE,iBAQR,IACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as o,jsx as i}from"react/jsx-runtime";import{Container as r}from"@cleartrip/ct-design-container";import{OutsideClickHandler as t}from"@cleartrip/ct-design-outside-click-handler";import{Overlay as n}from"@cleartrip/ct-design-overlay";import{Portal as d}from"@cleartrip/ct-design-portal";import{Transition as s}from"@cleartrip/ct-design-transition";import{useState as a,useEffect as l}from"react";import{ModalBack as c,Cross as u}from"@cleartrip/ct-design-icons";import{useTheme as p}from"@cleartrip/ct-design-theme";var m;!function(e){e.DOWN="down",e.UP="up"}(m||(m={}));var h;!function(e){e.CROSS="CROSS",e.BACK="BACK"}(h||(h={}));var v=function(t){var n=t.handleClose,d=t.styleConfig,s=t.isBack,a=t.children,l=t.showBorderRadius,h=void 0===l||l,v=t.direction,f=void 0===v?m.DOWN:v,g=p(),b=(d||{}).headerContainer,w=function(o){var i=o.theme,r=o.isLeft,t=o.isTop,n=void 0===t||t;return e({position:"absolute",right:r?"unset":"10px",backgroundColor:"white",height:i.size[8],width:i.size[8],display:"flex",alignItems:"center",padding:i.spacing[1],borderRadius:i.border.radius["50P"],cursor:"pointer",justifyContent:"center"},n?{top:"-44px"}:{bottom:"-44px"})}({theme:g,isLeft:s,isTop:f===m.DOWN}),C=function(e){return void 0===e&&(e=!1),e?i(c,{}):i(u,{height:24,width:24,crossColor:g.color.background.primary})}(s);return o(r,e({className:null==b?void 0:b.className,css:e(e({backgroundColor:g.color.background.neutral,zIndex:g.zIndex.bottomSheet},h&&f===m.DOWN&&{borderTopLeftRadius:g.border.radius[16],borderTopRightRadius:g.border.radius[16],overflow:"hidden"}),null==b?void 0:b.css)},{children:[i(r,e({css:e({},w),onClick:n},{children:C})),a]}))};v.defaultProps={};var f={up:"down",down:"up"},g=function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--mvh","".concat(e,"px"))},b=function(c){var u=c.direction,m=void 0===u?"down":u,h=c.children,b=c.header,w=c.onClose,C=c.isOpen,x=void 0!==C&&C,y=c.transitionDuration,k=void 0===y?200:y,O=c.overlayCloseIcon,R=c.allowedBackdropClose,B=void 0===R||R,S=c.showBorderRadius,N=void 0===S||S,z=c.styleConfig,D=void 0===z?{}:z,E=c.disableOutSideClick,I=void 0!==E&&E,L=a(x),T=L[0],W=L[1],P=p();l((function(){return g(),window.addEventListener("resize",g),function(){window.removeEventListener("resize",g)}}),[]);var j=O||{},A=j.show,H=void 0!==A&&A,K=j.isBack,U=void 0!==K&&K,q=D||{},F=q.bottomSheetContainer,G=q.overlayWrapper;return l((function(){x&&W(!0)}),[x]),T?i(d,{children:i(n,e({blur:!0,customOverlayWrapperClass:null==G?void 0:G.className,css:e({position:"fixed",bottom:0,justifyContent:"center",zIndex:P.zIndex.bottomSheet,alignItems:"".concat("down"===m?"flex-end":"flex-start")},null==G?void 0:G.css)},{children:i(t,e({disabled:I,onOutsideClick:function(e){I||(e.preventDefault(),B&&w&&w({isClosedByOutSideClick:!0}))},wrapperProps:{style:{width:"100%"}}},{children:i(s,e({type:"slide",slideDirection:f[m],timeout:k,mountOnEnter:!0,unmountOnExit:!0,appear:!0,in:x,onExited:function(){W(!1)}},{children:o(r,e({className:null==F?void 0:F.className,css:e({position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",background:"white",borderTopLeftRadius:16,borderTopRightRadius:16,maxHeight:"calc(var(--mvh) * 92)",boxShadow:P.elevation.bottomE2},null==F?void 0:F.css)},{children:[H&&i(v,{direction:m,showBorderRadius:N,handleClose:w,isBack:U,children:b}),h]}))}))}))}))}):null};export{b as BottomSheet,v as BottomSheetHeader,m as DIRECTION};
|
|
2
|
+
//# sourceMappingURL=ct-design-bottomsheet.browser.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ct-design-bottomsheet.browser.esm.js","sources":["../packages/components/Bottomsheet/src/type.ts","../packages/components/Bottomsheet/src/style.ts","../packages/components/Bottomsheet/src/BottomSheetHeader/BottomSheetHeader.tsx","../packages/components/Bottomsheet/src/BottomSheet.tsx"],"sourcesContent":[null,null,null,null],"names":["DIRECTION","CLOSE_ICON_TYPE","BottomSheetHeader","props","handleClose","styleConfig","isBack","children","_a","showBorderRadius","_b","direction","DOWN","theme","useTheme","headerContainer","closeButtonStyles","isLeft","isTop","__assign","position","right","backgroundColor","height","size","width","display","alignItems","padding","spacing","borderRadius","border","radius","cursor","justifyContent","top","bottom","getCloseButtonStyle","CloseIcon","_jsx","ModalBack","Cross","crossColor","color","background","primary","getCloseIcon","_jsxs","Container","className","css","neutral","zIndex","bottomSheet","borderTopLeftRadius","borderTopRightRadius","overflow","onClick","defaultProps","slideDirection","up","down","handleWindowResize","vh","window","innerHeight","document","documentElement","style","setProperty","concat","BottomSheet","header","onClose","_c","isOpen","_d","transitionDuration","timeout","overlayCloseIcon","_e","allowedBackdropClose","_f","_g","_h","disableOutSideClick","_j","useState","isVisible","setIsVisible","useEffect","addEventListener","removeEventListener","_k","_l","show","_m","_o","bottomSheetContainer","overlayWrapper","Portal","Overlay","blur","customOverlayWrapperClass","OutsideClickHandler","disabled","onOutsideClick","event","preventDefault","isClosedByOutSideClick","wrapperProps","Transition","type","mountOnEnter","unmountOnExit","appear","in","onExited","flexDirection","maxHeight","boxShadow","elevation","bottomE2"],"mappings":"ojBA+EkBA,GAAlB,SAAkBA,GAChBA,EAAA,KAAA,OACAA,EAAA,GAAA,IACD,CAHD,CAAkBA,IAAAA,EAGjB,CAAA,IC/EM,ICIWC,GAAlB,SAAkBA,GAChBA,EAAA,MAAA,QACAA,EAAA,KAAA,MACD,CAHD,CAAkBA,IAAAA,EAGjB,CAAA,IAEK,IAAAC,EAAoB,SAACC,GACjB,IAAAC,EAAoGD,EAAzFC,YAAEC,EAAuFF,EAA5EE,YAAEC,EAA0EH,SAAlEI,EAAkEJ,EAAKI,SAA7DC,EAAwDL,EAAjCM,iBAAvBA,OAAmB,IAAAD,KAAME,EAA+BP,EAAKQ,UAApCA,OAAS,IAAAD,EAAGV,EAAUY,OAC7FC,EAAQC,IAENC,GAAoBV,GAAe,CAAA,mBAErCW,EDf2B,SAACR,OAClCK,EAAKL,EAAAK,MACLI,EAAMT,EAAAS,OACNP,UAAAQ,OAAQ,IAAAR,GAAIA,EAKG,OAAAS,EAAA,CACfC,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MAAG,CAAA3C,SAGxBgC,EAACiE,KACCC,SAAUpB,EACVqB,eAlCqB,SAACC,GAC1BtB,IACJsB,EAAMC,iBACF3B,GAAwBR,GAC1BA,EAAQ,CAAEoC,wBAAwB,IAEtC,EA6BUC,aAAc,CAAE1C,MAAO,CAAE3C,MAAO,UAAU,CAAAlB,SAE1CgC,EAACwE,EAAU5F,EAAA,CACT6F,KAAK,QACLrD,eAAgBA,EAAehD,GAC/BmE,QAASA,EACTmC,cAAY,EACZC,eAAa,EACbC,QACA,EAAAC,GAAIzC,EACJ0C,SAtCS,WACnB5B,GAAa,EACf,GAoCkC,CAAAlF,SAEtBwC,EAACC,EACC7B,EAAA,CAAA8B,UAAWiD,aAAoB,EAApBA,EAAsBjD,UACjCC,IACE/B,EAAA,CAAAC,SAAU,WACVK,MAAO,OACPF,OAAQ,OACRG,QAAS,OACT4F,cAAe,SACf1E,WAAY,QACZU,oBAAqB,GACrBC,qBAAsB,GACtBgE,UAAW,wBACXC,UAAW3G,EAAM4G,UAAUC,UACxBxB,aAAA,EAAAA,EAAsBhD,MAG1B,CAAA3C,SAAA,CAAAwF,GACCxD,EAACrC,EAAiB,CAChBS,UAAWA,EACXF,iBAAkBA,EAClBL,YAAaqE,EACbnE,OAAQA,EACRC,SAAUiE,IAGbjE,iBAQR,IACT"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var ctDesignContainer = require('@cleartrip/ct-design-container');
|
|
6
|
+
var ctDesignOutsideClickHandler = require('@cleartrip/ct-design-outside-click-handler');
|
|
7
|
+
var ctDesignOverlay = require('@cleartrip/ct-design-overlay');
|
|
8
|
+
var ctDesignPortal = require('@cleartrip/ct-design-portal');
|
|
9
|
+
var ctDesignTransition = require('@cleartrip/ct-design-transition');
|
|
10
|
+
var react = require('react');
|
|
11
|
+
var ctDesignIcons = require('@cleartrip/ct-design-icons');
|
|
12
|
+
var ctDesignTheme = require('@cleartrip/ct-design-theme');
|
|
13
|
+
|
|
14
|
+
exports.DIRECTION = void 0;
|
|
15
|
+
(function (DIRECTION) {
|
|
16
|
+
DIRECTION["DOWN"] = "down";
|
|
17
|
+
DIRECTION["UP"] = "up";
|
|
18
|
+
})(exports.DIRECTION || (exports.DIRECTION = {}));
|
|
19
|
+
|
|
20
|
+
var getCloseButtonStyle = function (_a) {
|
|
21
|
+
var theme = _a.theme, isLeft = _a.isLeft, _b = _a.isTop, isTop = _b === void 0 ? true : _b;
|
|
22
|
+
return (tslib.__assign({ position: 'absolute', right: isLeft ? 'unset' : '10px', backgroundColor: 'white', height: theme.size[8], width: theme.size[8], display: 'flex', alignItems: 'center', padding: theme.spacing[1], borderRadius: theme.border.radius['50P'], cursor: 'pointer', justifyContent: 'center' }, (isTop ? { top: '-44px' } : { bottom: '-44px' })));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var CLOSE_ICON_TYPE;
|
|
26
|
+
(function (CLOSE_ICON_TYPE) {
|
|
27
|
+
CLOSE_ICON_TYPE["CROSS"] = "CROSS";
|
|
28
|
+
CLOSE_ICON_TYPE["BACK"] = "BACK";
|
|
29
|
+
})(CLOSE_ICON_TYPE || (CLOSE_ICON_TYPE = {}));
|
|
30
|
+
var BottomSheetHeader = function (props) {
|
|
31
|
+
var handleClose = props.handleClose, styleConfig = props.styleConfig, isBack = props.isBack, children = props.children, _a = props.showBorderRadius, showBorderRadius = _a === void 0 ? true : _a, _b = props.direction, direction = _b === void 0 ? exports.DIRECTION.DOWN : _b;
|
|
32
|
+
var theme = ctDesignTheme.useTheme();
|
|
33
|
+
var headerContainer = (styleConfig || {}).headerContainer;
|
|
34
|
+
var closeButtonStyles = getCloseButtonStyle({ theme: theme, isLeft: isBack, isTop: direction === exports.DIRECTION.DOWN });
|
|
35
|
+
var getCloseIcon = function (isBack) {
|
|
36
|
+
if (isBack === void 0) { isBack = false; }
|
|
37
|
+
if (isBack) {
|
|
38
|
+
return jsxRuntime.jsx(ctDesignIcons.ModalBack, {});
|
|
39
|
+
}
|
|
40
|
+
return jsxRuntime.jsx(ctDesignIcons.Cross, { height: 24, width: 24, crossColor: theme.color.background.primary });
|
|
41
|
+
};
|
|
42
|
+
var CloseIcon = getCloseIcon(isBack);
|
|
43
|
+
return (jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({ className: headerContainer === null || headerContainer === void 0 ? void 0 : headerContainer.className, css: tslib.__assign(tslib.__assign({ backgroundColor: theme.color.background.neutral, zIndex: theme.zIndex.bottomSheet }, (showBorderRadius &&
|
|
44
|
+
direction === exports.DIRECTION.DOWN && {
|
|
45
|
+
borderTopLeftRadius: theme.border.radius[16],
|
|
46
|
+
borderTopRightRadius: theme.border.radius[16],
|
|
47
|
+
overflow: 'hidden',
|
|
48
|
+
})), headerContainer === null || headerContainer === void 0 ? void 0 : headerContainer.css) }, { children: [jsxRuntime.jsx(ctDesignContainer.Container, tslib.__assign({ css: tslib.__assign({}, closeButtonStyles), onClick: handleClose }, { children: CloseIcon })), children] })));
|
|
49
|
+
};
|
|
50
|
+
BottomSheetHeader.defaultProps = {};
|
|
51
|
+
|
|
52
|
+
var slideDirection = {
|
|
53
|
+
up: 'down',
|
|
54
|
+
down: 'up',
|
|
55
|
+
};
|
|
56
|
+
var handleWindowResize = function () {
|
|
57
|
+
var vh = window.innerHeight * 0.01;
|
|
58
|
+
document.documentElement.style.setProperty('--mvh', "".concat(vh, "px"));
|
|
59
|
+
};
|
|
60
|
+
var BottomSheet = function (_a) {
|
|
61
|
+
var _b = _a.direction, direction = _b === void 0 ? 'down' : _b, children = _a.children, header = _a.header, onClose = _a.onClose, _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, _d = _a.transitionDuration, timeout = _d === void 0 ? 200 : _d, overlayCloseIcon = _a.overlayCloseIcon, _e = _a.allowedBackdropClose, allowedBackdropClose = _e === void 0 ? true : _e, _f = _a.showBorderRadius, showBorderRadius = _f === void 0 ? true : _f, _g = _a.styleConfig, styleConfig = _g === void 0 ? {} : _g, _h = _a.disableOutSideClick, disableOutSideClick = _h === void 0 ? false : _h;
|
|
62
|
+
var _j = react.useState(isOpen), isVisible = _j[0], setIsVisible = _j[1];
|
|
63
|
+
var theme = ctDesignTheme.useTheme();
|
|
64
|
+
react.useEffect(function () {
|
|
65
|
+
handleWindowResize();
|
|
66
|
+
window.addEventListener('resize', handleWindowResize);
|
|
67
|
+
return function () {
|
|
68
|
+
window.removeEventListener('resize', handleWindowResize);
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var _k = overlayCloseIcon || {}, _l = _k.show, show = _l === void 0 ? false : _l, _m = _k.isBack, isBack = _m === void 0 ? false : _m;
|
|
72
|
+
var _o = styleConfig || {}, bottomSheetContainer = _o.bottomSheetContainer, overlayWrapper = _o.overlayWrapper;
|
|
73
|
+
var handleCloseBottomSheet = function (event) {
|
|
74
|
+
if (disableOutSideClick)
|
|
75
|
+
return;
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
if (allowedBackdropClose && onClose) {
|
|
78
|
+
onClose({ isClosedByOutSideClick: true });
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var handleExited = function () {
|
|
82
|
+
setIsVisible(false);
|
|
83
|
+
};
|
|
84
|
+
react.useEffect(function () {
|
|
85
|
+
if (isOpen) {
|
|
86
|
+
setIsVisible(true);
|
|
87
|
+
}
|
|
88
|
+
}, [isOpen]);
|
|
89
|
+
if (isVisible) {
|
|
90
|
+
return (jsxRuntime.jsx(ctDesignPortal.Portal, { children: jsxRuntime.jsx(ctDesignOverlay.Overlay, tslib.__assign({ blur: true, customOverlayWrapperClass: overlayWrapper === null || overlayWrapper === void 0 ? void 0 : overlayWrapper.className, css: tslib.__assign({ position: 'fixed', bottom: 0, justifyContent: 'center', zIndex: theme.zIndex.bottomSheet, alignItems: "".concat(direction === 'down' ? 'flex-end' : 'flex-start') }, overlayWrapper === null || overlayWrapper === void 0 ? void 0 : overlayWrapper.css) }, { children: jsxRuntime.jsx(ctDesignOutsideClickHandler.OutsideClickHandler, tslib.__assign({ disabled: disableOutSideClick, onOutsideClick: handleCloseBottomSheet, wrapperProps: { style: { width: '100%' } } }, { children: jsxRuntime.jsx(ctDesignTransition.Transition, tslib.__assign({ type: 'slide', slideDirection: slideDirection[direction], timeout: timeout, mountOnEnter: true, unmountOnExit: true, appear: true, in: isOpen, onExited: handleExited }, { children: jsxRuntime.jsxs(ctDesignContainer.Container, tslib.__assign({ className: bottomSheetContainer === null || bottomSheetContainer === void 0 ? void 0 : bottomSheetContainer.className, css: tslib.__assign({ position: 'relative', width: '100%', height: '100%', display: 'flex', flexDirection: 'column', background: 'white', borderTopLeftRadius: 16, borderTopRightRadius: 16, maxHeight: 'calc(var(--mvh) * 92)', boxShadow: theme.elevation.bottomE2 }, bottomSheetContainer === null || bottomSheetContainer === void 0 ? void 0 : bottomSheetContainer.css) }, { children: [show && (jsxRuntime.jsx(BottomSheetHeader, { direction: direction, showBorderRadius: showBorderRadius, handleClose: onClose, isBack: isBack, children: header })), children] })) })) })) })) }));
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
exports.BottomSheet = BottomSheet;
|
|
96
|
+
exports.BottomSheetHeader = BottomSheetHeader;
|
|
97
|
+
//# sourceMappingURL=ct-design-bottomsheet.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ct-design-bottomsheet.cjs.js","sources":["../packages/components/Bottomsheet/src/type.ts","../packages/components/Bottomsheet/src/style.ts","../packages/components/Bottomsheet/src/BottomSheetHeader/BottomSheetHeader.tsx","../packages/components/Bottomsheet/src/BottomSheet.tsx"],"sourcesContent":[null,null,null,null],"names":["DIRECTION","__assign","useTheme","_jsx","ModalBack","Cross","_jsxs","Container","useState","useEffect","Portal","Overlay","OutsideClickHandler","Transition"],"mappings":";;;;;;;;;;;;;AA+EkBA,2BAGjB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uBAAuB,EAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAA,EAChC,oBAAoB,KAAA,IAAA,IAApB,oBAAoB,KAApB,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,oBAAoB,CAAE,GAAG,CAG7B,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,IAAI,KACHE,cAAA,CAAC,iBAAiB,EAAA,EAChB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,CAAA,CACH,EACA,QAAQ,CACC,EAAA,CAAA,CAAA,EAAA,CAAA,CACD,EACO,CAAA,CAAA,EAAA,CAAA,CACd,EACH,CAAA,EACT;AACH,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACd;;;;;"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { __assign } from 'tslib';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Container } from '@cleartrip/ct-design-container';
|
|
4
|
+
import { OutsideClickHandler } from '@cleartrip/ct-design-outside-click-handler';
|
|
5
|
+
import { Overlay } from '@cleartrip/ct-design-overlay';
|
|
6
|
+
import { Portal } from '@cleartrip/ct-design-portal';
|
|
7
|
+
import { Transition } from '@cleartrip/ct-design-transition';
|
|
8
|
+
import { useState, useEffect } from 'react';
|
|
9
|
+
import { ModalBack, Cross } from '@cleartrip/ct-design-icons';
|
|
10
|
+
import { useTheme } from '@cleartrip/ct-design-theme';
|
|
11
|
+
|
|
12
|
+
var DIRECTION;
|
|
13
|
+
(function (DIRECTION) {
|
|
14
|
+
DIRECTION["DOWN"] = "down";
|
|
15
|
+
DIRECTION["UP"] = "up";
|
|
16
|
+
})(DIRECTION || (DIRECTION = {}));
|
|
17
|
+
|
|
18
|
+
var getCloseButtonStyle = function (_a) {
|
|
19
|
+
var theme = _a.theme, isLeft = _a.isLeft, _b = _a.isTop, isTop = _b === void 0 ? true : _b;
|
|
20
|
+
return (__assign({ position: 'absolute', right: isLeft ? 'unset' : '10px', backgroundColor: 'white', height: theme.size[8], width: theme.size[8], display: 'flex', alignItems: 'center', padding: theme.spacing[1], borderRadius: theme.border.radius['50P'], cursor: 'pointer', justifyContent: 'center' }, (isTop ? { top: '-44px' } : { bottom: '-44px' })));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var CLOSE_ICON_TYPE;
|
|
24
|
+
(function (CLOSE_ICON_TYPE) {
|
|
25
|
+
CLOSE_ICON_TYPE["CROSS"] = "CROSS";
|
|
26
|
+
CLOSE_ICON_TYPE["BACK"] = "BACK";
|
|
27
|
+
})(CLOSE_ICON_TYPE || (CLOSE_ICON_TYPE = {}));
|
|
28
|
+
var BottomSheetHeader = function (props) {
|
|
29
|
+
var handleClose = props.handleClose, styleConfig = props.styleConfig, isBack = props.isBack, children = props.children, _a = props.showBorderRadius, showBorderRadius = _a === void 0 ? true : _a, _b = props.direction, direction = _b === void 0 ? DIRECTION.DOWN : _b;
|
|
30
|
+
var theme = useTheme();
|
|
31
|
+
var headerContainer = (styleConfig || {}).headerContainer;
|
|
32
|
+
var closeButtonStyles = getCloseButtonStyle({ theme: theme, isLeft: isBack, isTop: direction === DIRECTION.DOWN });
|
|
33
|
+
var getCloseIcon = function (isBack) {
|
|
34
|
+
if (isBack === void 0) { isBack = false; }
|
|
35
|
+
if (isBack) {
|
|
36
|
+
return jsx(ModalBack, {});
|
|
37
|
+
}
|
|
38
|
+
return jsx(Cross, { height: 24, width: 24, crossColor: theme.color.background.primary });
|
|
39
|
+
};
|
|
40
|
+
var CloseIcon = getCloseIcon(isBack);
|
|
41
|
+
return (jsxs(Container, __assign({ className: headerContainer === null || headerContainer === void 0 ? void 0 : headerContainer.className, css: __assign(__assign({ backgroundColor: theme.color.background.neutral, zIndex: theme.zIndex.bottomSheet }, (showBorderRadius &&
|
|
42
|
+
direction === DIRECTION.DOWN && {
|
|
43
|
+
borderTopLeftRadius: theme.border.radius[16],
|
|
44
|
+
borderTopRightRadius: theme.border.radius[16],
|
|
45
|
+
overflow: 'hidden',
|
|
46
|
+
})), headerContainer === null || headerContainer === void 0 ? void 0 : headerContainer.css) }, { children: [jsx(Container, __assign({ css: __assign({}, closeButtonStyles), onClick: handleClose }, { children: CloseIcon })), children] })));
|
|
47
|
+
};
|
|
48
|
+
BottomSheetHeader.defaultProps = {};
|
|
49
|
+
|
|
50
|
+
var slideDirection = {
|
|
51
|
+
up: 'down',
|
|
52
|
+
down: 'up',
|
|
53
|
+
};
|
|
54
|
+
var handleWindowResize = function () {
|
|
55
|
+
var vh = window.innerHeight * 0.01;
|
|
56
|
+
document.documentElement.style.setProperty('--mvh', "".concat(vh, "px"));
|
|
57
|
+
};
|
|
58
|
+
var BottomSheet = function (_a) {
|
|
59
|
+
var _b = _a.direction, direction = _b === void 0 ? 'down' : _b, children = _a.children, header = _a.header, onClose = _a.onClose, _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, _d = _a.transitionDuration, timeout = _d === void 0 ? 200 : _d, overlayCloseIcon = _a.overlayCloseIcon, _e = _a.allowedBackdropClose, allowedBackdropClose = _e === void 0 ? true : _e, _f = _a.showBorderRadius, showBorderRadius = _f === void 0 ? true : _f, _g = _a.styleConfig, styleConfig = _g === void 0 ? {} : _g, _h = _a.disableOutSideClick, disableOutSideClick = _h === void 0 ? false : _h;
|
|
60
|
+
var _j = useState(isOpen), isVisible = _j[0], setIsVisible = _j[1];
|
|
61
|
+
var theme = useTheme();
|
|
62
|
+
useEffect(function () {
|
|
63
|
+
handleWindowResize();
|
|
64
|
+
window.addEventListener('resize', handleWindowResize);
|
|
65
|
+
return function () {
|
|
66
|
+
window.removeEventListener('resize', handleWindowResize);
|
|
67
|
+
};
|
|
68
|
+
}, []);
|
|
69
|
+
var _k = overlayCloseIcon || {}, _l = _k.show, show = _l === void 0 ? false : _l, _m = _k.isBack, isBack = _m === void 0 ? false : _m;
|
|
70
|
+
var _o = styleConfig || {}, bottomSheetContainer = _o.bottomSheetContainer, overlayWrapper = _o.overlayWrapper;
|
|
71
|
+
var handleCloseBottomSheet = function (event) {
|
|
72
|
+
if (disableOutSideClick)
|
|
73
|
+
return;
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
if (allowedBackdropClose && onClose) {
|
|
76
|
+
onClose({ isClosedByOutSideClick: true });
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var handleExited = function () {
|
|
80
|
+
setIsVisible(false);
|
|
81
|
+
};
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
if (isOpen) {
|
|
84
|
+
setIsVisible(true);
|
|
85
|
+
}
|
|
86
|
+
}, [isOpen]);
|
|
87
|
+
if (isVisible) {
|
|
88
|
+
return (jsx(Portal, { children: jsx(Overlay, __assign({ blur: true, customOverlayWrapperClass: overlayWrapper === null || overlayWrapper === void 0 ? void 0 : overlayWrapper.className, css: __assign({ position: 'fixed', bottom: 0, justifyContent: 'center', zIndex: theme.zIndex.bottomSheet, alignItems: "".concat(direction === 'down' ? 'flex-end' : 'flex-start') }, overlayWrapper === null || overlayWrapper === void 0 ? void 0 : overlayWrapper.css) }, { children: jsx(OutsideClickHandler, __assign({ disabled: disableOutSideClick, onOutsideClick: handleCloseBottomSheet, wrapperProps: { style: { width: '100%' } } }, { children: jsx(Transition, __assign({ type: 'slide', slideDirection: slideDirection[direction], timeout: timeout, mountOnEnter: true, unmountOnExit: true, appear: true, in: isOpen, onExited: handleExited }, { children: jsxs(Container, __assign({ className: bottomSheetContainer === null || bottomSheetContainer === void 0 ? void 0 : bottomSheetContainer.className, css: __assign({ position: 'relative', width: '100%', height: '100%', display: 'flex', flexDirection: 'column', background: 'white', borderTopLeftRadius: 16, borderTopRightRadius: 16, maxHeight: 'calc(var(--mvh) * 92)', boxShadow: theme.elevation.bottomE2 }, bottomSheetContainer === null || bottomSheetContainer === void 0 ? void 0 : bottomSheetContainer.css) }, { children: [show && (jsx(BottomSheetHeader, { direction: direction, showBorderRadius: showBorderRadius, handleClose: onClose, isBack: isBack, children: header })), children] })) })) })) })) }));
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { BottomSheet, BottomSheetHeader, DIRECTION };
|
|
94
|
+
//# sourceMappingURL=ct-design-bottomsheet.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ct-design-bottomsheet.esm.js","sources":["../packages/components/Bottomsheet/src/type.ts","../packages/components/Bottomsheet/src/style.ts","../packages/components/Bottomsheet/src/BottomSheetHeader/BottomSheetHeader.tsx","../packages/components/Bottomsheet/src/BottomSheet.tsx"],"sourcesContent":[null,null,null,null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;IA+EkB,UAGjB;AAHD,CAAA,UAAkB,SAAS,EAAA;AACzB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,SAAA,CAAA,IAAA,CAAA,GAAA,IAAS,CAAA;AACX,CAAC,EAHiB,SAAS,KAAT,SAAS,GAG1B,EAAA,CAAA,CAAA;;AC/EM,IAAM,mBAAmB,GAAG,UAAC,EAQnC,EAAA;QAPC,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,aAAY,EAAZ,KAAK,GAAG,EAAA,KAAA,KAAA,CAAA,GAAA,IAAI,GAAA,EAAA,CAAA;IAKG,QAAA,QAAA,CAAA,EACf,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAChC,eAAe,EAAE,OAAO,EACxB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EACrB,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,QAAQ,EACpB,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,E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QAAQ,EAAE,YAAY,EAAA,EAAA,EAAA,QAAA,EAEtBC,IAAC,CAAA,SAAS,EACR,QAAA,CAAA,EAAA,SAAS,EAAE,oBAAoB,KAAA,IAAA,IAApB,oBAAoB,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAApB,oBAAoB,CAAE,SAAS,EAC1C,GAAG,EACD,QAAA,CAAA,EAAA,QAAQ,EAAE,UAAU,EACpB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,UAAU,EAAE,OAAO,EACnB,mBAAmB,EAAE,EAAE,EACvB,oBAAoB,EAAE,EAAE,EACxB,SAAS,EAAE,uBAAuB,EAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAA,EAChC,oBAAoB,KAAA,IAAA,IAApB,oBAAoB,KAApB,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,oBAAoB,CAAE,GAAG,CAG7B,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,IAAI,KACHD,GAAA,CAAC,iBAAiB,EAAA,EAChB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,CAAA,CACH,EACA,QAAQ,CACC,EAAA,CAAA,CAAA,EAAA,CAAA,CACD,EACO,CAAA,CAAA,EAAA,CAAA,CACd,EACH,CAAA,EACT;AACH,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACd;;;;"}
|
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('@cleartrip/ct-design-container'), require('@cleartrip/ct-design-outside-click-handler'), require('@cleartrip/ct-design-overlay'), require('@cleartrip/ct-design-portal'), require('@cleartrip/ct-design-transition'), require('react'), require('@cleartrip/ct-design-icons'), require('styled-components')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', '@cleartrip/ct-design-container', '@cleartrip/ct-design-outside-click-handler', '@cleartrip/ct-design-overlay', '@cleartrip/ct-design-portal', '@cleartrip/ct-design-transition', 'react', '@cleartrip/ct-design-icons', 'styled-components'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CTDesignSystemBottomsheet = {}, global.jsxRuntime, global.ctDesignContainer, global.ctDesignOutsideClickHandler, global.ctDesignOverlay, global.ctDesignPortal, global.ctDesignTransition, global.React, global.ctDesignIcons));
|
|
5
|
+
})(this, (function (exports, jsxRuntime, ctDesignContainer, ctDesignOutsideClickHandler, ctDesignOverlay, ctDesignPortal, ctDesignTransition, react, ctDesignIcons) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/******************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
22
|
+
|
|
23
|
+
var __assign = function () {
|
|
24
|
+
__assign = Object.assign || function __assign(t) {
|
|
25
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
26
|
+
s = arguments[i];
|
|
27
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
28
|
+
}
|
|
29
|
+
return t;
|
|
30
|
+
};
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
34
|
+
var e = new Error(message);
|
|
35
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var border = {
|
|
39
|
+
radius: {
|
|
40
|
+
0: '0px',
|
|
41
|
+
2: '2px',
|
|
42
|
+
4: '4px',
|
|
43
|
+
6: '6px',
|
|
44
|
+
8: '8px',
|
|
45
|
+
12: '12px',
|
|
46
|
+
16: '16px',
|
|
47
|
+
30: '30px',
|
|
48
|
+
32: '32px',
|
|
49
|
+
'50P': '50%'
|
|
50
|
+
},
|
|
51
|
+
width: {
|
|
52
|
+
none: '0px',
|
|
53
|
+
sm: '1px',
|
|
54
|
+
md: '1.5px',
|
|
55
|
+
lg: '2px'
|
|
56
|
+
},
|
|
57
|
+
style: {
|
|
58
|
+
solid: 'solid',
|
|
59
|
+
dotted: 'dotted'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var colors = {
|
|
63
|
+
alert: '#DF9641',
|
|
64
|
+
alertBg: '#FCF7F0',
|
|
65
|
+
alertText: '#DF9641',
|
|
66
|
+
bgPrimary: '#ED6521',
|
|
67
|
+
bgPrimaryHover: '#CE4501',
|
|
68
|
+
blue100: '#ECF3FF',
|
|
69
|
+
bluePrimary500: '#2A55E5',
|
|
70
|
+
blueSecondary: '#F0F5FF',
|
|
71
|
+
brand: '#FF4F17',
|
|
72
|
+
brandBg: '#FEF3ED',
|
|
73
|
+
brandText: '#FF4F17',
|
|
74
|
+
curacao250: '#9FE3EA',
|
|
75
|
+
disabled100: '#E6E6E6',
|
|
76
|
+
disabled250: '#DDDDDD',
|
|
77
|
+
disabledLight: '#EFEFEF',
|
|
78
|
+
disabledText: '#B3B3B3',
|
|
79
|
+
highlightBg: 'rgba(255, 255, 255, 0.2)',
|
|
80
|
+
line: '#E7E7E7',
|
|
81
|
+
lineDarkNeutral300: '#E0E0E0',
|
|
82
|
+
link2: '#3366CC',
|
|
83
|
+
link2Hover: '#1A469D',
|
|
84
|
+
link: '#0F6BFF',
|
|
85
|
+
linkBg: '#EFF3FB',
|
|
86
|
+
linkText: '#0F6BFF',
|
|
87
|
+
margarita100: '#F2FAF0',
|
|
88
|
+
margarita250: '#C0E6B6',
|
|
89
|
+
margarita750: '#3A742C',
|
|
90
|
+
neutral100: '#FFFFFF',
|
|
91
|
+
neutral300: '#F3F3F3',
|
|
92
|
+
neutral350: '#DBDBDB',
|
|
93
|
+
neutral400: '#CAC9C9',
|
|
94
|
+
neutral500: '#B3B3B3',
|
|
95
|
+
neutral700: '#808080',
|
|
96
|
+
neutral900: '#1A1A1A',
|
|
97
|
+
orange100: '#FFF1EC',
|
|
98
|
+
orange250: '#FFB8A5',
|
|
99
|
+
pinaColada250: '#FEE3A0',
|
|
100
|
+
primaryNeutral900: '#212121',
|
|
101
|
+
shadow: '#1a1a1a14',
|
|
102
|
+
success500: '#11A670',
|
|
103
|
+
success600: '#0DA86D',
|
|
104
|
+
success: '#11A670',
|
|
105
|
+
successBg: '#ECF8F4',
|
|
106
|
+
successText: '#11A670',
|
|
107
|
+
warning: '#C83232',
|
|
108
|
+
warningBg: '#FBEFEF',
|
|
109
|
+
warningText: '#C83232',
|
|
110
|
+
yellowSecondary: '#FFC200',
|
|
111
|
+
purple100: '#350041',
|
|
112
|
+
purple250: '#130016',
|
|
113
|
+
gray100: '#2E3042',
|
|
114
|
+
gray250: '#1A1C23',
|
|
115
|
+
aqua100: '#082395',
|
|
116
|
+
aqua250: '#081C82',
|
|
117
|
+
black: '#1A1A1A',
|
|
118
|
+
grapetini900: '#5f1ab6'
|
|
119
|
+
};
|
|
120
|
+
var elevation = {
|
|
121
|
+
bottomE1: '0px 1px 0px #E7E7E7',
|
|
122
|
+
bottomE2: '0px 4px 16px rgba(26, 26, 26, 0.08)',
|
|
123
|
+
bottomE3: '0px 8px 24px rgba(26, 26, 26, 0.1)',
|
|
124
|
+
bottomE4: '0px 10px 32px rgba(26, 26, 26, 0.2)',
|
|
125
|
+
topE1: '0px -1px 0px #E7E7E7',
|
|
126
|
+
topE2: '0px -4px 16px rgba(26, 26, 26, 0.08)',
|
|
127
|
+
topE3: '0px -8px 24px rgba(26, 26, 26, 0.1)',
|
|
128
|
+
topE4: '0px -10px 32px rgba(26, 26, 26, 0.2)',
|
|
129
|
+
modalBlurLight: 'rgb(0 0 0 / 20%) 0px 11px 15px -7px',
|
|
130
|
+
modalBlurMedium: 'rgb(0 0 0 / 14%) 0px 24px 38px 3px',
|
|
131
|
+
modalBlurHeavy: 'rgb(0 0 0 / 12%) 0px 9px 22px 18px'
|
|
132
|
+
};
|
|
133
|
+
var size = {
|
|
134
|
+
0: '0px',
|
|
135
|
+
1: '4px',
|
|
136
|
+
2: '8px',
|
|
137
|
+
'2.5': '10px',
|
|
138
|
+
3: '12px',
|
|
139
|
+
4: '16px',
|
|
140
|
+
5: '20px',
|
|
141
|
+
6: '24px',
|
|
142
|
+
7: '28px',
|
|
143
|
+
8: '32px',
|
|
144
|
+
9: '36px',
|
|
145
|
+
10: '40px',
|
|
146
|
+
11: '44px',
|
|
147
|
+
12: '48px',
|
|
148
|
+
13: '52px',
|
|
149
|
+
14: '56px',
|
|
150
|
+
15: '60px',
|
|
151
|
+
50: '200px'
|
|
152
|
+
};
|
|
153
|
+
var spacing = {
|
|
154
|
+
0: '0px',
|
|
155
|
+
1: '4px',
|
|
156
|
+
2: '8px',
|
|
157
|
+
3: '12px',
|
|
158
|
+
4: '16px',
|
|
159
|
+
5: '20px',
|
|
160
|
+
6: '24px',
|
|
161
|
+
7: '28px',
|
|
162
|
+
8: '32px',
|
|
163
|
+
9: '36px',
|
|
164
|
+
10: '40px',
|
|
165
|
+
11: '44px',
|
|
166
|
+
12: '48px',
|
|
167
|
+
13: '52px',
|
|
168
|
+
14: '56px'
|
|
169
|
+
};
|
|
170
|
+
var typography = {
|
|
171
|
+
weight: {
|
|
172
|
+
bold: 700,
|
|
173
|
+
semibold: 600,
|
|
174
|
+
medium: 500,
|
|
175
|
+
normal: 400
|
|
176
|
+
},
|
|
177
|
+
size: {
|
|
178
|
+
10: '10px',
|
|
179
|
+
12: '12px',
|
|
180
|
+
14: '14px',
|
|
181
|
+
16: '16px',
|
|
182
|
+
20: '20px',
|
|
183
|
+
24: '24px',
|
|
184
|
+
32: '32px',
|
|
185
|
+
40: '40px',
|
|
186
|
+
48: '48px'
|
|
187
|
+
},
|
|
188
|
+
lineHeight: {
|
|
189
|
+
12: '12px',
|
|
190
|
+
14: '14px',
|
|
191
|
+
16: '16px',
|
|
192
|
+
18: '18px',
|
|
193
|
+
20: '20px',
|
|
194
|
+
22: '22px',
|
|
195
|
+
24: '24px',
|
|
196
|
+
28: '28px',
|
|
197
|
+
32: '32px',
|
|
198
|
+
40: '40px',
|
|
199
|
+
48: '48px',
|
|
200
|
+
56: '56px'
|
|
201
|
+
},
|
|
202
|
+
letterSpacing: {
|
|
203
|
+
nPoint75: '-0.75px',
|
|
204
|
+
nPoint5: '-0.5px',
|
|
205
|
+
nPoint4: '-0.4px',
|
|
206
|
+
nPoint25: '-0.25px',
|
|
207
|
+
zero: '0px',
|
|
208
|
+
point4: '0.4px',
|
|
209
|
+
point5: '0.5px',
|
|
210
|
+
point75: '0.75px'
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
var duration = {
|
|
215
|
+
shortest: 150,
|
|
216
|
+
shorter: 200,
|
|
217
|
+
short: 250,
|
|
218
|
+
standard: 300,
|
|
219
|
+
complex: 375,
|
|
220
|
+
enteringScreen: 225,
|
|
221
|
+
leavingScreen: 195
|
|
222
|
+
};
|
|
223
|
+
var easing = {
|
|
224
|
+
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
225
|
+
easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
|
|
226
|
+
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
227
|
+
sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
|
|
228
|
+
};
|
|
229
|
+
function getAutoHeightDuration(height) {
|
|
230
|
+
if (!height) {
|
|
231
|
+
return 0;
|
|
232
|
+
}
|
|
233
|
+
var constant = height / 36;
|
|
234
|
+
return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
|
|
235
|
+
}
|
|
236
|
+
var create = function (props, options) {
|
|
237
|
+
if (props === void 0) {
|
|
238
|
+
props = ['all'];
|
|
239
|
+
}
|
|
240
|
+
if (options === void 0) {
|
|
241
|
+
options = {};
|
|
242
|
+
}
|
|
243
|
+
var _a = options.duration,
|
|
244
|
+
durationOption = _a === void 0 ? duration.standard : _a,
|
|
245
|
+
_b = options.easing,
|
|
246
|
+
easingOption = _b === void 0 ? easing.easeInOut : _b,
|
|
247
|
+
_c = options.delay,
|
|
248
|
+
delay = _c === void 0 ? 0 : _c;
|
|
249
|
+
return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {
|
|
250
|
+
return "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : "".concat(durationOption, "ms"), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : "".concat(delay, "ms"));
|
|
251
|
+
}).join(',');
|
|
252
|
+
};
|
|
253
|
+
var hover$2 = function (key) {
|
|
254
|
+
var _a;
|
|
255
|
+
var bg = (_a = {}, _a[colors.neutral100] = colors.neutral100, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral100] = colors.neutral100, _a[colors.brand] = colors.bgPrimaryHover, _a[colors.neutral100] = colors.neutral100, _a[colors.disabledText] = colors.disabledText, _a[colors.neutral300] = colors.neutral300, _a[colors.neutral100] = colors.neutral100, _a[colors.link2] = colors.link2Hover, _a[colors.neutral100] = colors.neutral100, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral100] = colors.neutral100, _a[colors.disabledText] = colors.disabledText, _a[colors.neutral300] = colors.neutral300, _a);
|
|
256
|
+
return bg[key];
|
|
257
|
+
};
|
|
258
|
+
var zIndex = {
|
|
259
|
+
drawer: 1200,
|
|
260
|
+
modal: 1300,
|
|
261
|
+
popOver: 1300,
|
|
262
|
+
tooltip: 1500,
|
|
263
|
+
sideNav: 100,
|
|
264
|
+
toolbar: 50,
|
|
265
|
+
bottomSheet: 100
|
|
266
|
+
};
|
|
267
|
+
var counter$1 = {
|
|
268
|
+
enabled: {
|
|
269
|
+
stroke: colors.neutral900
|
|
270
|
+
},
|
|
271
|
+
disabled: {
|
|
272
|
+
stroke: colors.neutral500
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
var BaseTheme = {
|
|
276
|
+
color: {
|
|
277
|
+
text: {
|
|
278
|
+
primary: colors.neutral900,
|
|
279
|
+
secondary: colors.brandText,
|
|
280
|
+
tertiary: colors.neutral500,
|
|
281
|
+
heading: colors.neutral900,
|
|
282
|
+
subHeading: colors.neutral700,
|
|
283
|
+
disabled: colors.disabledText,
|
|
284
|
+
success: colors.successText,
|
|
285
|
+
alert: colors.alertText,
|
|
286
|
+
warning: colors.warningText,
|
|
287
|
+
link: colors.linkText,
|
|
288
|
+
brand: colors.brandText,
|
|
289
|
+
neutral: colors.neutral100,
|
|
290
|
+
link2: colors.link2,
|
|
291
|
+
margarita: colors.margarita750,
|
|
292
|
+
primary2: colors.grapetini900
|
|
293
|
+
},
|
|
294
|
+
button: {
|
|
295
|
+
outlinedPrimaryLabel: colors.neutral900,
|
|
296
|
+
outlinedPrimaryBorder: colors.neutral900,
|
|
297
|
+
outlinedPrimaryBg: colors.neutral100,
|
|
298
|
+
outlinedSecondaryLabel: colors.brand,
|
|
299
|
+
outlinedSecondaryBorder: colors.brand,
|
|
300
|
+
outlinedSecondaryBg: colors.neutral100,
|
|
301
|
+
outlinedTertiaryLabel: colors.link,
|
|
302
|
+
outlinedTertiaryBorder: colors.link,
|
|
303
|
+
outlinedTertiaryBg: colors.neutral100,
|
|
304
|
+
outlinedDisabledLabel: colors.disabledText,
|
|
305
|
+
outlinedDisabledBg: colors.neutral300,
|
|
306
|
+
containedPrimaryLabel: colors.neutral100,
|
|
307
|
+
containedPrimaryBg: colors.neutral900,
|
|
308
|
+
containedSecondaryLabel: colors.neutral100,
|
|
309
|
+
containedSecondaryBg: colors.brand,
|
|
310
|
+
containedTertiaryLabel: colors.neutral100,
|
|
311
|
+
containedTertiaryBg: colors.link,
|
|
312
|
+
containedDisabledLabel: colors.disabledText,
|
|
313
|
+
containedDisabledBg: colors.neutral300,
|
|
314
|
+
containedNeutralLabel: colors.neutral900,
|
|
315
|
+
containedNeutralBg: colors.neutral100,
|
|
316
|
+
hover: hover$2
|
|
317
|
+
},
|
|
318
|
+
chip: {
|
|
319
|
+
nonSelectedPrimaryLabel: colors.neutral900,
|
|
320
|
+
disabledPrimaryLabel: colors.disabledText,
|
|
321
|
+
selectedPrimaryLabel: colors.neutral900,
|
|
322
|
+
selectedPrimaryBorder: colors.neutral900,
|
|
323
|
+
selectedPrimaryBg: colors.neutral300
|
|
324
|
+
},
|
|
325
|
+
dropdown: {
|
|
326
|
+
shadow: colors.shadow
|
|
327
|
+
},
|
|
328
|
+
tab: {
|
|
329
|
+
nonSelectedPrimaryLabel: colors.neutral700,
|
|
330
|
+
selectedPrimaryLabel: colors.neutral900
|
|
331
|
+
},
|
|
332
|
+
sidenav: {
|
|
333
|
+
primaryBg: colors.neutral900,
|
|
334
|
+
selectedTabBg: colors.highlightBg
|
|
335
|
+
},
|
|
336
|
+
tooltip: {
|
|
337
|
+
primaryBg: colors.neutral900
|
|
338
|
+
},
|
|
339
|
+
background: {
|
|
340
|
+
primary: colors.neutral900,
|
|
341
|
+
secondary: colors.brand,
|
|
342
|
+
tertiary: colors.link,
|
|
343
|
+
brand: colors.brand,
|
|
344
|
+
brandLightBg: colors.brandBg,
|
|
345
|
+
link: colors.link,
|
|
346
|
+
link2: colors.link2,
|
|
347
|
+
linkLightBg: colors.linkBg,
|
|
348
|
+
success: colors.success,
|
|
349
|
+
successLightBg: colors.successBg,
|
|
350
|
+
alert: colors.alert,
|
|
351
|
+
alertLightBg: colors.alertBg,
|
|
352
|
+
warning: colors.warning,
|
|
353
|
+
warningLightBg: colors.warningBg,
|
|
354
|
+
neutral: colors.neutral100,
|
|
355
|
+
disabled: colors.neutral300,
|
|
356
|
+
disabledSecondaryLight: colors.neutral350,
|
|
357
|
+
disabledSecondary: colors.neutral400,
|
|
358
|
+
disabledDark: colors.disabled100,
|
|
359
|
+
defaultDark: colors.neutral700,
|
|
360
|
+
defaultDarkest: colors.neutral900
|
|
361
|
+
},
|
|
362
|
+
border: {
|
|
363
|
+
primary: colors.neutral900,
|
|
364
|
+
secondary: colors.brand,
|
|
365
|
+
tertiary: colors.link,
|
|
366
|
+
brand: colors.brand,
|
|
367
|
+
neutral: colors.neutral900,
|
|
368
|
+
link: colors.link,
|
|
369
|
+
default: colors.line,
|
|
370
|
+
defaultDark: colors.neutral700,
|
|
371
|
+
disabled: colors.neutral500,
|
|
372
|
+
disabledDark: colors.disabled100,
|
|
373
|
+
warning: colors.warning
|
|
374
|
+
},
|
|
375
|
+
spinner: {
|
|
376
|
+
primary: colors.neutral700,
|
|
377
|
+
primaryBg: colors.alertBg
|
|
378
|
+
},
|
|
379
|
+
shimmer: {
|
|
380
|
+
disabledLight: colors.disabledLight,
|
|
381
|
+
disabledDark: colors.disabled250
|
|
382
|
+
},
|
|
383
|
+
coupon: {
|
|
384
|
+
primaryBg: colors.blue100
|
|
385
|
+
},
|
|
386
|
+
alert: {
|
|
387
|
+
success: colors.successBg,
|
|
388
|
+
warning: colors.alertBg,
|
|
389
|
+
info: colors.blue100,
|
|
390
|
+
error: colors.orange100,
|
|
391
|
+
neutral: colors.neutral100
|
|
392
|
+
},
|
|
393
|
+
badge: {
|
|
394
|
+
curacao: colors.curacao250,
|
|
395
|
+
pinaColada: colors.pinaColada250,
|
|
396
|
+
margarita250: colors.margarita250,
|
|
397
|
+
default: colors.neutral300,
|
|
398
|
+
green: colors.successBg,
|
|
399
|
+
margarita100: colors.margarita100,
|
|
400
|
+
yellow: colors.alertBg,
|
|
401
|
+
orange100: colors.orange100,
|
|
402
|
+
orange250: colors.orange250,
|
|
403
|
+
red: colors.warningBg,
|
|
404
|
+
green500: colors.success500,
|
|
405
|
+
green600: colors.success600,
|
|
406
|
+
purple100: colors.purple100,
|
|
407
|
+
purple250: colors.purple250,
|
|
408
|
+
gray100: colors.gray100,
|
|
409
|
+
gray250: colors.gray250,
|
|
410
|
+
aqua100: colors.aqua100,
|
|
411
|
+
aqua250: colors.aqua250,
|
|
412
|
+
black: colors.black,
|
|
413
|
+
link: colors.link,
|
|
414
|
+
blue100: colors.blue100,
|
|
415
|
+
neutral100: colors.neutral100
|
|
416
|
+
},
|
|
417
|
+
counter: counter$1,
|
|
418
|
+
calendar: {
|
|
419
|
+
accent: colors.neutral900,
|
|
420
|
+
background: colors.neutral300,
|
|
421
|
+
selected: colors.neutral900
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
elevation: __assign({}, elevation),
|
|
425
|
+
border: __assign({}, border),
|
|
426
|
+
spacing: __assign({}, spacing),
|
|
427
|
+
typography: __assign({}, typography),
|
|
428
|
+
size: __assign({}, size),
|
|
429
|
+
transitions: {
|
|
430
|
+
duration: duration,
|
|
431
|
+
easing: easing,
|
|
432
|
+
create: create,
|
|
433
|
+
getAutoHeightDuration: getAutoHeightDuration
|
|
434
|
+
},
|
|
435
|
+
zIndex: zIndex
|
|
436
|
+
};
|
|
437
|
+
var B2CTheme = __assign({}, BaseTheme);
|
|
438
|
+
var hover$1 = function (key) {
|
|
439
|
+
var _a;
|
|
440
|
+
var bg = (_a = {}, _a[colors.neutral100] = colors.neutral100, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral100] = colors.neutral100, _a[colors.brand] = colors.bgPrimaryHover, _a[colors.neutral100] = colors.neutral100, _a[colors.disabledText] = colors.disabledText, _a[colors.neutral300] = colors.neutral300, _a[colors.neutral100] = colors.neutral100, _a[colors.link2] = colors.link2Hover, _a[colors.neutral100] = colors.neutral100, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral100] = colors.neutral100, _a[colors.disabledText] = colors.disabledText, _a[colors.neutral300] = colors.neutral300, _a);
|
|
441
|
+
return bg[key];
|
|
442
|
+
};
|
|
443
|
+
__assign(__assign({}, BaseTheme), {
|
|
444
|
+
color: __assign(__assign({}, BaseTheme.color), {
|
|
445
|
+
text: __assign(__assign({}, BaseTheme.color.text), {
|
|
446
|
+
secondary: colors.link2,
|
|
447
|
+
tertiary: colors.neutral500
|
|
448
|
+
}),
|
|
449
|
+
button: __assign(__assign({}, BaseTheme.color.button), {
|
|
450
|
+
outlinedPrimaryLabel: colors.link2,
|
|
451
|
+
outlinedPrimaryBorder: colors.link2,
|
|
452
|
+
outlinedPrimaryBg: colors.neutral100,
|
|
453
|
+
outlinedSecondaryLabel: colors.neutral900,
|
|
454
|
+
outlinedSecondaryBorder: colors.neutral900,
|
|
455
|
+
outlinedSecondaryBg: colors.neutral100,
|
|
456
|
+
outlinedTertiaryLabel: colors.brand,
|
|
457
|
+
outlinedTertiaryBorder: colors.brand,
|
|
458
|
+
outlinedTertiaryBg: colors.neutral100,
|
|
459
|
+
outlinedDisabledLabel: colors.disabledText,
|
|
460
|
+
outlinedDisabledBg: colors.neutral300,
|
|
461
|
+
containedPrimaryLabel: colors.neutral100,
|
|
462
|
+
containedPrimaryBg: colors.link2,
|
|
463
|
+
containedSecondaryLabel: colors.neutral100,
|
|
464
|
+
containedSecondaryBg: colors.neutral900,
|
|
465
|
+
containedTertiaryLabel: colors.neutral100,
|
|
466
|
+
containedTertiaryBg: colors.brand,
|
|
467
|
+
containedDisabledLabel: colors.disabledText,
|
|
468
|
+
containedDisabledBg: colors.neutral300,
|
|
469
|
+
hover: hover$1
|
|
470
|
+
}),
|
|
471
|
+
chip: __assign(__assign({}, BaseTheme.color.chip), {
|
|
472
|
+
selectedPrimaryLabel: colors.link2,
|
|
473
|
+
selectedPrimaryBorder: colors.link2,
|
|
474
|
+
selectedPrimaryBg: colors.linkBg
|
|
475
|
+
}),
|
|
476
|
+
tab: __assign(__assign({}, BaseTheme.color.tab), {
|
|
477
|
+
nonSelectedPrimaryLabel: colors.neutral900,
|
|
478
|
+
selectedPrimaryLabel: colors.link2
|
|
479
|
+
}),
|
|
480
|
+
background: __assign(__assign({}, BaseTheme.color.background), {
|
|
481
|
+
primary: colors.link2,
|
|
482
|
+
secondary: colors.neutral900,
|
|
483
|
+
tertiary: colors.brand
|
|
484
|
+
}),
|
|
485
|
+
border: __assign(__assign({}, BaseTheme.color.border), {
|
|
486
|
+
primary: colors.link2,
|
|
487
|
+
secondary: colors.neutral900,
|
|
488
|
+
tertiary: colors.brand
|
|
489
|
+
}),
|
|
490
|
+
spinner: {
|
|
491
|
+
primary: colors.link2,
|
|
492
|
+
primaryBg: colors.alertBg
|
|
493
|
+
},
|
|
494
|
+
calendar: {
|
|
495
|
+
accent: '',
|
|
496
|
+
background: '',
|
|
497
|
+
selected: colors.link2
|
|
498
|
+
}
|
|
499
|
+
})
|
|
500
|
+
});
|
|
501
|
+
var hover = function (key) {
|
|
502
|
+
var _a;
|
|
503
|
+
var bg = (_a = {}, _a[colors.neutral100] = colors.neutral100, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral100] = colors.neutral100, _a[colors.brand] = colors.bgPrimaryHover, _a[colors.neutral100] = colors.neutral100, _a[colors.disabledText] = colors.disabledText, _a[colors.neutral300] = colors.neutral300, _a[colors.neutral100] = colors.neutral100, _a[colors.link2] = colors.link2Hover, _a[colors.neutral100] = colors.neutral100, _a[colors.neutral900] = colors.neutral900, _a[colors.neutral100] = colors.neutral100, _a[colors.disabledText] = colors.disabledText, _a[colors.neutral300] = colors.neutral300, _a);
|
|
504
|
+
return bg[key];
|
|
505
|
+
};
|
|
506
|
+
var counter = {
|
|
507
|
+
enabled: {
|
|
508
|
+
stroke: colors.bluePrimary500
|
|
509
|
+
},
|
|
510
|
+
disabled: {
|
|
511
|
+
stroke: colors.neutral500
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
__assign(__assign({}, BaseTheme), {
|
|
515
|
+
color: __assign(__assign({}, BaseTheme.color), {
|
|
516
|
+
text: __assign(__assign({}, BaseTheme.color.text), {
|
|
517
|
+
link: colors.bluePrimary500
|
|
518
|
+
}),
|
|
519
|
+
button: __assign(__assign({}, BaseTheme.color.button), {
|
|
520
|
+
outlinedPrimaryLabel: colors.primaryNeutral900,
|
|
521
|
+
outlinedPrimaryBg: colors.neutral100,
|
|
522
|
+
containedPrimaryLabel: colors.neutral100,
|
|
523
|
+
containedPrimaryBg: colors.bluePrimary500,
|
|
524
|
+
containedSecondaryLabel: colors.primaryNeutral900,
|
|
525
|
+
containedSecondaryBg: colors.yellowSecondary,
|
|
526
|
+
hover: hover
|
|
527
|
+
}),
|
|
528
|
+
chip: __assign(__assign({}, BaseTheme.color.chip), {
|
|
529
|
+
selectedPrimaryLabel: colors.link2,
|
|
530
|
+
selectedPrimaryBorder: colors.link2,
|
|
531
|
+
selectedPrimaryBg: colors.linkBg,
|
|
532
|
+
nonSelectedPrimaryLabel: colors.neutral900
|
|
533
|
+
}),
|
|
534
|
+
tab: __assign(__assign({}, BaseTheme.color.tab), {
|
|
535
|
+
nonSelectedPrimaryLabel: colors.neutral900,
|
|
536
|
+
selectedPrimaryLabel: colors.bluePrimary500
|
|
537
|
+
}),
|
|
538
|
+
background: __assign(__assign({}, BaseTheme.color.background), {
|
|
539
|
+
primary: colors.bluePrimary500,
|
|
540
|
+
secondary: colors.neutral900,
|
|
541
|
+
tertiary: colors.brand,
|
|
542
|
+
linkLightBg: colors.blueSecondary
|
|
543
|
+
}),
|
|
544
|
+
border: __assign(__assign({}, BaseTheme.color.border), {
|
|
545
|
+
primary: colors.bluePrimary500,
|
|
546
|
+
brand: colors.bluePrimary500
|
|
547
|
+
}),
|
|
548
|
+
spinner: {
|
|
549
|
+
primary: colors.link2,
|
|
550
|
+
primaryBg: colors.alertBg
|
|
551
|
+
},
|
|
552
|
+
counter: counter,
|
|
553
|
+
calendar: {
|
|
554
|
+
accent: colors.bluePrimary500,
|
|
555
|
+
background: colors.blueSecondary,
|
|
556
|
+
selected: colors.bluePrimary500
|
|
557
|
+
}
|
|
558
|
+
})
|
|
559
|
+
});
|
|
560
|
+
var ThemeContext = react.createContext({
|
|
561
|
+
theme: B2CTheme,
|
|
562
|
+
platform: 'mobile'
|
|
563
|
+
});
|
|
564
|
+
var useTheme = function () {
|
|
565
|
+
var themeContext = react.useContext(ThemeContext);
|
|
566
|
+
var theme = (themeContext || {
|
|
567
|
+
theme: B2CTheme
|
|
568
|
+
}).theme;
|
|
569
|
+
return theme;
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
exports.DIRECTION = void 0;
|
|
573
|
+
(function (DIRECTION) {
|
|
574
|
+
DIRECTION["DOWN"] = "down";
|
|
575
|
+
DIRECTION["UP"] = "up";
|
|
576
|
+
})(exports.DIRECTION || (exports.DIRECTION = {}));
|
|
577
|
+
|
|
578
|
+
var getCloseButtonStyle = function (_a) {
|
|
579
|
+
var theme = _a.theme, isLeft = _a.isLeft, _b = _a.isTop, isTop = _b === void 0 ? true : _b;
|
|
580
|
+
return (__assign({ position: 'absolute', right: isLeft ? 'unset' : '10px', backgroundColor: 'white', height: theme.size[8], width: theme.size[8], display: 'flex', alignItems: 'center', padding: theme.spacing[1], borderRadius: theme.border.radius['50P'], cursor: 'pointer', justifyContent: 'center' }, (isTop ? { top: '-44px' } : { bottom: '-44px' })));
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
var CLOSE_ICON_TYPE;
|
|
584
|
+
(function (CLOSE_ICON_TYPE) {
|
|
585
|
+
CLOSE_ICON_TYPE["CROSS"] = "CROSS";
|
|
586
|
+
CLOSE_ICON_TYPE["BACK"] = "BACK";
|
|
587
|
+
})(CLOSE_ICON_TYPE || (CLOSE_ICON_TYPE = {}));
|
|
588
|
+
var BottomSheetHeader = function (props) {
|
|
589
|
+
var handleClose = props.handleClose, styleConfig = props.styleConfig, isBack = props.isBack, children = props.children, _a = props.showBorderRadius, showBorderRadius = _a === void 0 ? true : _a, _b = props.direction, direction = _b === void 0 ? exports.DIRECTION.DOWN : _b;
|
|
590
|
+
var theme = useTheme();
|
|
591
|
+
var headerContainer = (styleConfig || {}).headerContainer;
|
|
592
|
+
var closeButtonStyles = getCloseButtonStyle({ theme: theme, isLeft: isBack, isTop: direction === exports.DIRECTION.DOWN });
|
|
593
|
+
var getCloseIcon = function (isBack) {
|
|
594
|
+
if (isBack === void 0) { isBack = false; }
|
|
595
|
+
if (isBack) {
|
|
596
|
+
return jsxRuntime.jsx(ctDesignIcons.ModalBack, {});
|
|
597
|
+
}
|
|
598
|
+
return jsxRuntime.jsx(ctDesignIcons.Cross, { height: 24, width: 24, crossColor: theme.color.background.primary });
|
|
599
|
+
};
|
|
600
|
+
var CloseIcon = getCloseIcon(isBack);
|
|
601
|
+
return (jsxRuntime.jsxs(ctDesignContainer.Container, __assign({ className: headerContainer === null || headerContainer === void 0 ? void 0 : headerContainer.className, css: __assign(__assign({ backgroundColor: theme.color.background.neutral, zIndex: theme.zIndex.bottomSheet }, (showBorderRadius &&
|
|
602
|
+
direction === exports.DIRECTION.DOWN && {
|
|
603
|
+
borderTopLeftRadius: theme.border.radius[16],
|
|
604
|
+
borderTopRightRadius: theme.border.radius[16],
|
|
605
|
+
overflow: 'hidden',
|
|
606
|
+
})), headerContainer === null || headerContainer === void 0 ? void 0 : headerContainer.css) }, { children: [jsxRuntime.jsx(ctDesignContainer.Container, __assign({ css: __assign({}, closeButtonStyles), onClick: handleClose }, { children: CloseIcon })), children] })));
|
|
607
|
+
};
|
|
608
|
+
BottomSheetHeader.defaultProps = {};
|
|
609
|
+
|
|
610
|
+
var slideDirection = {
|
|
611
|
+
up: 'down',
|
|
612
|
+
down: 'up',
|
|
613
|
+
};
|
|
614
|
+
var handleWindowResize = function () {
|
|
615
|
+
var vh = window.innerHeight * 0.01;
|
|
616
|
+
document.documentElement.style.setProperty('--mvh', "".concat(vh, "px"));
|
|
617
|
+
};
|
|
618
|
+
var BottomSheet = function (_a) {
|
|
619
|
+
var _b = _a.direction, direction = _b === void 0 ? 'down' : _b, children = _a.children, header = _a.header, onClose = _a.onClose, _c = _a.isOpen, isOpen = _c === void 0 ? false : _c, _d = _a.transitionDuration, timeout = _d === void 0 ? 200 : _d, overlayCloseIcon = _a.overlayCloseIcon, _e = _a.allowedBackdropClose, allowedBackdropClose = _e === void 0 ? true : _e, _f = _a.showBorderRadius, showBorderRadius = _f === void 0 ? true : _f, _g = _a.styleConfig, styleConfig = _g === void 0 ? {} : _g, _h = _a.disableOutSideClick, disableOutSideClick = _h === void 0 ? false : _h;
|
|
620
|
+
var _j = react.useState(isOpen), isVisible = _j[0], setIsVisible = _j[1];
|
|
621
|
+
var theme = useTheme();
|
|
622
|
+
react.useEffect(function () {
|
|
623
|
+
handleWindowResize();
|
|
624
|
+
window.addEventListener('resize', handleWindowResize);
|
|
625
|
+
return function () {
|
|
626
|
+
window.removeEventListener('resize', handleWindowResize);
|
|
627
|
+
};
|
|
628
|
+
}, []);
|
|
629
|
+
var _k = overlayCloseIcon || {}, _l = _k.show, show = _l === void 0 ? false : _l, _m = _k.isBack, isBack = _m === void 0 ? false : _m;
|
|
630
|
+
var _o = styleConfig || {}, bottomSheetContainer = _o.bottomSheetContainer, overlayWrapper = _o.overlayWrapper;
|
|
631
|
+
var handleCloseBottomSheet = function (event) {
|
|
632
|
+
if (disableOutSideClick)
|
|
633
|
+
return;
|
|
634
|
+
event.preventDefault();
|
|
635
|
+
if (allowedBackdropClose && onClose) {
|
|
636
|
+
onClose({ isClosedByOutSideClick: true });
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
var handleExited = function () {
|
|
640
|
+
setIsVisible(false);
|
|
641
|
+
};
|
|
642
|
+
react.useEffect(function () {
|
|
643
|
+
if (isOpen) {
|
|
644
|
+
setIsVisible(true);
|
|
645
|
+
}
|
|
646
|
+
}, [isOpen]);
|
|
647
|
+
if (isVisible) {
|
|
648
|
+
return (jsxRuntime.jsx(ctDesignPortal.Portal, { children: jsxRuntime.jsx(ctDesignOverlay.Overlay, __assign({ blur: true, customOverlayWrapperClass: overlayWrapper === null || overlayWrapper === void 0 ? void 0 : overlayWrapper.className, css: __assign({ position: 'fixed', bottom: 0, justifyContent: 'center', zIndex: theme.zIndex.bottomSheet, alignItems: "".concat(direction === 'down' ? 'flex-end' : 'flex-start') }, overlayWrapper === null || overlayWrapper === void 0 ? void 0 : overlayWrapper.css) }, { children: jsxRuntime.jsx(ctDesignOutsideClickHandler.OutsideClickHandler, __assign({ disabled: disableOutSideClick, onOutsideClick: handleCloseBottomSheet, wrapperProps: { style: { width: '100%' } } }, { children: jsxRuntime.jsx(ctDesignTransition.Transition, __assign({ type: 'slide', slideDirection: slideDirection[direction], timeout: timeout, mountOnEnter: true, unmountOnExit: true, appear: true, in: isOpen, onExited: handleExited }, { children: jsxRuntime.jsxs(ctDesignContainer.Container, __assign({ className: bottomSheetContainer === null || bottomSheetContainer === void 0 ? void 0 : bottomSheetContainer.className, css: __assign({ position: 'relative', width: '100%', height: '100%', display: 'flex', flexDirection: 'column', background: 'white', borderTopLeftRadius: 16, borderTopRightRadius: 16, maxHeight: 'calc(var(--mvh) * 92)', boxShadow: theme.elevation.bottomE2 }, bottomSheetContainer === null || bottomSheetContainer === void 0 ? void 0 : bottomSheetContainer.css) }, { children: [show && (jsxRuntime.jsx(BottomSheetHeader, { direction: direction, showBorderRadius: showBorderRadius, handleClose: onClose, isBack: isBack, children: header })), children] })) })) })) })) }));
|
|
649
|
+
}
|
|
650
|
+
return null;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
exports.BottomSheet = BottomSheet;
|
|
654
|
+
exports.BottomSheetHeader = BottomSheetHeader;
|
|
655
|
+
|
|
656
|
+
}));
|
|
657
|
+
//# sourceMappingURL=ct-design-bottomsheet.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ct-design-bottomsheet.umd.js","sources":["../../../../node_modules/.pnpm/@rollup+plugin-typescript@9.0.2_rollup@3.29.4_tslib@2.6.2_typescript@4.9.5/node_modules/tslib/tslib.es6.js","../../../core/tokens/dist/ct-design-tokens.esm.js","../../../core/theme/dist/ct-design-theme.esm.js","../packages/components/Bottomsheet/src/type.ts","../packages/components/Bottomsheet/src/style.ts","../packages/components/Bottomsheet/src/BottomSheetHeader/BottomSheetHeader.tsx","../packages/components/Bottomsheet/src/BottomSheet.tsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","var border = {\n radius: {\n 0: '0px',\n 2: '2px',\n 4: '4px',\n 6: '6px',\n 8: '8px',\n 12: '12px',\n 16: '16px',\n 30: '30px',\n 32: '32px',\n '50P': '50%',\n },\n width: {\n none: '0px',\n sm: '1px',\n md: '1.5px',\n lg: '2px',\n },\n style: {\n solid: 'solid',\n dotted: 'dotted',\n },\n};\n\nvar colors = {\n alert: '#DF9641',\n alertBg: '#FCF7F0',\n alertText: '#DF9641',\n bgPrimary: '#ED6521',\n bgPrimaryHover: '#CE4501',\n blue100: '#ECF3FF',\n bluePrimary500: '#2A55E5',\n blueSecondary: '#F0F5FF',\n brand: '#FF4F17',\n brandBg: '#FEF3ED',\n brandText: '#FF4F17',\n curacao250: '#9FE3EA',\n disabled100: '#E6E6E6',\n disabled250: '#DDDDDD',\n disabledLight: '#EFEFEF',\n disabledText: '#B3B3B3',\n highlightBg: 'rgba(255, 255, 255, 0.2)',\n line: '#E7E7E7',\n lineDarkNeutral300: '#E0E0E0',\n link2: '#3366CC',\n link2Hover: '#1A469D',\n link: '#0F6BFF',\n linkBg: '#EFF3FB',\n linkText: '#0F6BFF',\n margarita100: '#F2FAF0',\n margarita250: '#C0E6B6',\n margarita750: '#3A742C',\n neutral100: '#FFFFFF',\n neutral300: '#F3F3F3',\n neutral350: '#DBDBDB',\n neutral400: '#CAC9C9',\n neutral500: '#B3B3B3',\n neutral700: '#808080',\n neutral900: '#1A1A1A',\n orange100: '#FFF1EC',\n orange250: '#FFB8A5',\n pinaColada250: '#FEE3A0',\n primaryNeutral900: '#212121',\n shadow: '#1a1a1a14',\n success500: '#11A670',\n success600: '#0DA86D',\n success: '#11A670',\n successBg: '#ECF8F4',\n successText: '#11A670',\n warning: '#C83232',\n warningBg: '#FBEFEF',\n warningText: '#C83232',\n yellowSecondary: '#FFC200',\n purple100: '#350041',\n purple250: '#130016',\n gray100: '#2E3042',\n gray250: '#1A1C23',\n aqua100: '#082395',\n aqua250: '#081C82',\n black: '#1A1A1A',\n grapetini900: '#5f1ab6',\n};\n\nvar elevation = {\n bottomE1: '0px 1px 0px #E7E7E7',\n bottomE2: '0px 4px 16px rgba(26, 26, 26, 0.08)',\n bottomE3: '0px 8px 24px rgba(26, 26, 26, 0.1)',\n bottomE4: '0px 10px 32px rgba(26, 26, 26, 0.2)',\n topE1: '0px -1px 0px #E7E7E7',\n topE2: '0px -4px 16px rgba(26, 26, 26, 0.08)',\n topE3: '0px -8px 24px rgba(26, 26, 26, 0.1)',\n topE4: '0px -10px 32px rgba(26, 26, 26, 0.2)',\n modalBlurLight: 'rgb(0 0 0 / 20%) 0px 11px 15px -7px',\n modalBlurMedium: 'rgb(0 0 0 / 14%) 0px 24px 38px 3px',\n modalBlurHeavy: 'rgb(0 0 0 / 12%) 0px 9px 22px 18px',\n};\n\nvar size = {\n 0: '0px',\n 1: '4px',\n 2: '8px',\n '2.5': '10px',\n 3: '12px',\n 4: '16px',\n 5: '20px',\n 6: '24px',\n 7: '28px',\n 8: '32px',\n 9: '36px',\n 10: '40px',\n 11: '44px',\n 12: '48px',\n 13: '52px',\n 14: '56px',\n 15: '60px',\n 50: '200px',\n};\n\nvar spacing = {\n 0: '0px',\n 1: '4px',\n 2: '8px',\n 3: '12px',\n 4: '16px',\n 5: '20px',\n 6: '24px',\n 7: '28px',\n 8: '32px',\n 9: '36px',\n 10: '40px',\n 11: '44px',\n 12: '48px',\n 13: '52px',\n 14: '56px',\n};\n\nvar typography = {\n weight: {\n bold: 700,\n semibold: 600,\n medium: 500,\n normal: 400,\n },\n size: {\n 10: '10px',\n 12: '12px',\n 14: '14px',\n 16: '16px',\n 20: '20px',\n 24: '24px',\n 32: '32px',\n 40: '40px',\n 48: '48px',\n },\n lineHeight: {\n 12: '12px',\n 14: '14px',\n 16: '16px',\n 18: '18px',\n 20: '20px',\n 22: '22px',\n 24: '24px',\n 28: '28px',\n 32: '32px',\n 40: '40px',\n 48: '48px',\n 56: '56px',\n },\n letterSpacing: {\n nPoint75: '-0.75px',\n nPoint5: '-0.5px',\n nPoint4: '-0.4px',\n nPoint25: '-0.25px',\n zero: '0px',\n point4: '0.4px',\n point5: '0.5px',\n point75: '0.75px',\n },\n};\n\nexport { border, colors, elevation, size, spacing, typography };\n//# sourceMappingURL=ct-design-tokens.esm.js.map\n","import { __assign } from 'tslib';\nimport { colors, elevation, border, spacing, typography, size } from '@cleartrip/ct-design-tokens';\nimport { ThemeProvider as ThemeProvider$1 } from 'styled-components';\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { createContext, useContext } from 'react';\n\nvar duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n standard: 300,\n complex: 375,\n enteringScreen: 225,\n leavingScreen: 195,\n};\nvar easing = {\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)',\n};\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n var constant = height / 36;\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n}\nvar create = function (props, options) {\n if (props === void 0) { props = ['all']; }\n if (options === void 0) { options = {}; }\n var _a = options.duration, durationOption = _a === void 0 ? duration.standard : _a, _b = options.easing, easingOption = _b === void 0 ? easing.easeInOut : _b, _c = options.delay, delay = _c === void 0 ? 0 : _c;\n return (Array.isArray(props) ? props : [props])\n .map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : \"\".concat(durationOption, \"ms\"), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : \"\".concat(delay, \"ms\"));\n })\n .join(',');\n};\nvar hover$2 = function (key) {\n var _a;\n var bg = (_a = {},\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.brand] = colors.bgPrimaryHover,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.disabledText] = colors.disabledText,\n _a[colors.neutral300] = colors.neutral300,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.link2] = colors.link2Hover,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.disabledText] = colors.disabledText,\n _a[colors.neutral300] = colors.neutral300,\n _a);\n return bg[key];\n};\nvar zIndex = {\n drawer: 1200,\n modal: 1300,\n popOver: 1300,\n tooltip: 1500,\n sideNav: 100,\n toolbar: 50,\n bottomSheet: 100,\n};\nvar counter$1 = {\n enabled: {\n stroke: colors.neutral900,\n },\n disabled: {\n stroke: colors.neutral500,\n },\n};\nvar BaseTheme = {\n color: {\n text: {\n primary: colors.neutral900,\n secondary: colors.brandText,\n tertiary: colors.neutral500,\n heading: colors.neutral900,\n subHeading: colors.neutral700,\n disabled: colors.disabledText,\n success: colors.successText,\n alert: colors.alertText,\n warning: colors.warningText,\n link: colors.linkText,\n brand: colors.brandText,\n neutral: colors.neutral100,\n link2: colors.link2,\n margarita: colors.margarita750,\n primary2: colors.grapetini900,\n },\n button: {\n outlinedPrimaryLabel: colors.neutral900,\n outlinedPrimaryBorder: colors.neutral900,\n outlinedPrimaryBg: colors.neutral100,\n outlinedSecondaryLabel: colors.brand,\n outlinedSecondaryBorder: colors.brand,\n outlinedSecondaryBg: colors.neutral100,\n outlinedTertiaryLabel: colors.link,\n outlinedTertiaryBorder: colors.link,\n outlinedTertiaryBg: colors.neutral100,\n outlinedDisabledLabel: colors.disabledText,\n outlinedDisabledBg: colors.neutral300,\n containedPrimaryLabel: colors.neutral100,\n containedPrimaryBg: colors.neutral900,\n containedSecondaryLabel: colors.neutral100,\n containedSecondaryBg: colors.brand,\n containedTertiaryLabel: colors.neutral100,\n containedTertiaryBg: colors.link,\n containedDisabledLabel: colors.disabledText,\n containedDisabledBg: colors.neutral300,\n containedNeutralLabel: colors.neutral900,\n containedNeutralBg: colors.neutral100,\n hover: hover$2,\n },\n chip: {\n nonSelectedPrimaryLabel: colors.neutral900,\n disabledPrimaryLabel: colors.disabledText,\n selectedPrimaryLabel: colors.neutral900,\n selectedPrimaryBorder: colors.neutral900,\n selectedPrimaryBg: colors.neutral300,\n },\n dropdown: {\n shadow: colors.shadow,\n },\n tab: {\n nonSelectedPrimaryLabel: colors.neutral700,\n selectedPrimaryLabel: colors.neutral900,\n },\n sidenav: {\n primaryBg: colors.neutral900,\n selectedTabBg: colors.highlightBg,\n },\n tooltip: {\n primaryBg: colors.neutral900,\n },\n background: {\n primary: colors.neutral900,\n secondary: colors.brand,\n tertiary: colors.link,\n brand: colors.brand,\n brandLightBg: colors.brandBg,\n link: colors.link,\n link2: colors.link2,\n linkLightBg: colors.linkBg,\n success: colors.success,\n successLightBg: colors.successBg,\n alert: colors.alert,\n alertLightBg: colors.alertBg,\n warning: colors.warning,\n warningLightBg: colors.warningBg,\n neutral: colors.neutral100,\n disabled: colors.neutral300,\n disabledSecondaryLight: colors.neutral350,\n disabledSecondary: colors.neutral400,\n disabledDark: colors.disabled100,\n defaultDark: colors.neutral700,\n defaultDarkest: colors.neutral900,\n },\n border: {\n primary: colors.neutral900,\n secondary: colors.brand,\n tertiary: colors.link,\n brand: colors.brand,\n neutral: colors.neutral900,\n link: colors.link,\n default: colors.line,\n defaultDark: colors.neutral700,\n disabled: colors.neutral500,\n disabledDark: colors.disabled100,\n warning: colors.warning,\n },\n spinner: {\n primary: colors.neutral700,\n primaryBg: colors.alertBg,\n },\n shimmer: {\n disabledLight: colors.disabledLight,\n disabledDark: colors.disabled250,\n },\n coupon: {\n primaryBg: colors.blue100,\n },\n alert: {\n success: colors.successBg,\n warning: colors.alertBg,\n info: colors.blue100,\n error: colors.orange100,\n neutral: colors.neutral100,\n },\n badge: {\n curacao: colors.curacao250,\n pinaColada: colors.pinaColada250,\n margarita250: colors.margarita250,\n default: colors.neutral300,\n green: colors.successBg,\n margarita100: colors.margarita100,\n yellow: colors.alertBg,\n orange100: colors.orange100,\n orange250: colors.orange250,\n red: colors.warningBg,\n green500: colors.success500,\n green600: colors.success600,\n purple100: colors.purple100,\n purple250: colors.purple250,\n gray100: colors.gray100,\n gray250: colors.gray250,\n aqua100: colors.aqua100,\n aqua250: colors.aqua250,\n black: colors.black,\n link: colors.link,\n blue100: colors.blue100,\n neutral100: colors.neutral100,\n },\n counter: counter$1,\n calendar: {\n accent: colors.neutral900,\n background: colors.neutral300,\n selected: colors.neutral900,\n },\n },\n elevation: __assign({}, elevation),\n border: __assign({}, border),\n spacing: __assign({}, spacing),\n typography: __assign({}, typography),\n size: __assign({}, size),\n transitions: {\n duration: duration,\n easing: easing,\n create: create,\n getAutoHeightDuration: getAutoHeightDuration,\n },\n zIndex: zIndex,\n};\n\nvar B2CTheme = __assign({}, BaseTheme);\n\nvar hover$1 = function (key) {\n var _a;\n var bg = (_a = {},\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.brand] = colors.bgPrimaryHover,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.disabledText] = colors.disabledText,\n _a[colors.neutral300] = colors.neutral300,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.link2] = colors.link2Hover,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.disabledText] = colors.disabledText,\n _a[colors.neutral300] = colors.neutral300,\n _a);\n return bg[key];\n};\nvar B2BTheme = __assign(__assign({}, BaseTheme), { color: __assign(__assign({}, BaseTheme.color), { text: __assign(__assign({}, BaseTheme.color.text), { secondary: colors.link2, tertiary: colors.neutral500 }), button: __assign(__assign({}, BaseTheme.color.button), { outlinedPrimaryLabel: colors.link2, outlinedPrimaryBorder: colors.link2, outlinedPrimaryBg: colors.neutral100, outlinedSecondaryLabel: colors.neutral900, outlinedSecondaryBorder: colors.neutral900, outlinedSecondaryBg: colors.neutral100, outlinedTertiaryLabel: colors.brand, outlinedTertiaryBorder: colors.brand, outlinedTertiaryBg: colors.neutral100, outlinedDisabledLabel: colors.disabledText, outlinedDisabledBg: colors.neutral300, containedPrimaryLabel: colors.neutral100, containedPrimaryBg: colors.link2, containedSecondaryLabel: colors.neutral100, containedSecondaryBg: colors.neutral900, containedTertiaryLabel: colors.neutral100, containedTertiaryBg: colors.brand, containedDisabledLabel: colors.disabledText, containedDisabledBg: colors.neutral300, hover: hover$1 }), chip: __assign(__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: colors.link2, selectedPrimaryBorder: colors.link2, selectedPrimaryBg: colors.linkBg }), tab: __assign(__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: colors.neutral900, selectedPrimaryLabel: colors.link2 }), background: __assign(__assign({}, BaseTheme.color.background), { primary: colors.link2, secondary: colors.neutral900, tertiary: colors.brand }), border: __assign(__assign({}, BaseTheme.color.border), { primary: colors.link2, secondary: colors.neutral900, tertiary: colors.brand }), spinner: {\n primary: colors.link2,\n primaryBg: colors.alertBg,\n }, calendar: {\n accent: '',\n background: '',\n selected: colors.link2,\n } }) });\n\nvar hover = function (key) {\n var _a;\n var bg = (_a = {},\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.brand] = colors.bgPrimaryHover,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.disabledText] = colors.disabledText,\n _a[colors.neutral300] = colors.neutral300,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.link2] = colors.link2Hover,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.neutral900] = colors.neutral900,\n _a[colors.neutral100] = colors.neutral100,\n _a[colors.disabledText] = colors.disabledText,\n _a[colors.neutral300] = colors.neutral300,\n _a);\n return bg[key];\n};\nvar counter = {\n enabled: {\n stroke: colors.bluePrimary500,\n },\n disabled: {\n stroke: colors.neutral500,\n },\n};\nvar FKTheme = __assign(__assign({}, BaseTheme), { color: __assign(__assign({}, BaseTheme.color), { text: __assign(__assign({}, BaseTheme.color.text), { link: colors.bluePrimary500 }), button: __assign(__assign({}, BaseTheme.color.button), { outlinedPrimaryLabel: colors.primaryNeutral900, outlinedPrimaryBg: colors.neutral100, containedPrimaryLabel: colors.neutral100, containedPrimaryBg: colors.bluePrimary500, containedSecondaryLabel: colors.primaryNeutral900, containedSecondaryBg: colors.yellowSecondary, hover: hover }), chip: __assign(__assign({}, BaseTheme.color.chip), { selectedPrimaryLabel: colors.link2, selectedPrimaryBorder: colors.link2, selectedPrimaryBg: colors.linkBg, nonSelectedPrimaryLabel: colors.neutral900 }), tab: __assign(__assign({}, BaseTheme.color.tab), { nonSelectedPrimaryLabel: colors.neutral900, selectedPrimaryLabel: colors.bluePrimary500 }), background: __assign(__assign({}, BaseTheme.color.background), { primary: colors.bluePrimary500, secondary: colors.neutral900, tertiary: colors.brand, linkLightBg: colors.blueSecondary }), border: __assign(__assign({}, BaseTheme.color.border), { primary: colors.bluePrimary500, brand: colors.bluePrimary500 }), spinner: {\n primary: colors.link2,\n primaryBg: colors.alertBg,\n }, counter: counter, calendar: {\n accent: colors.bluePrimary500,\n background: colors.blueSecondary,\n selected: colors.bluePrimary500,\n } }) });\n\nvar getTheme = function (themeType) {\n switch (themeType) {\n case 'B2C': {\n return B2CTheme;\n }\n case 'B2B': {\n return B2BTheme;\n }\n case 'FK': {\n return FKTheme;\n }\n default: {\n return B2CTheme;\n }\n }\n};\n\nvar ThemeContext = createContext({\n theme: B2CTheme,\n platform: 'mobile',\n});\nvar ThemeProvider = function (_a) {\n var children = _a.children, _b = _a.theme, themeType = _b === void 0 ? 'B2C' : _b, _c = _a.platform, platform = _c === void 0 ? 'mobile' : _c;\n var theme = getTheme(themeType);\n return (jsx(ThemeContext.Provider, __assign({ value: { theme: theme, platform: platform } }, { children: jsx(ThemeProvider$1, __assign({ theme: theme }, { children: jsx(Fragment, { children: children }) })) })));\n};\nThemeProvider.defaultProps = {\n children: null,\n};\n\nvar useTheme = function () {\n var themeContext = useContext(ThemeContext);\n var theme = (themeContext || { theme: B2CTheme }).theme;\n return theme;\n};\n\nvar useThemeContext = function () {\n return useContext(ThemeContext);\n};\n\nexport { B2BTheme, B2CTheme, BaseTheme, FKTheme, ThemeContext, ThemeProvider, useTheme, useThemeContext };\n//# sourceMappingURL=ct-design-theme.esm.js.map\n",null,null,null,null],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","SuppressedError","error","suppressed","message","e","Error","name","border","radius","width","none","sm","md","lg","style","solid","dotted","duration","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","easing","easeInOut","easeOut","easeIn","sharp","getAutoHeightDuration","height","constant","Math","round","pow","create","props","options","_a","durationOption","_b","easingOption","_c","delay","Array","isArray","map","animatedProp","concat","join","hover$2","key","bg","colors","neutral100","neutral900","brand","bgPrimaryHover","disabledText","neutral300","link2","link2Hover","zIndex","drawer","modal","popOver","tooltip","sideNav","toolbar","bottomSheet","counter$1","enabled","stroke","disabled","neutral500","BaseTheme","color","text","primary","secondary","brandText","tertiary","heading","subHeading","neutral700","success","successText","alert","alertText","warning","warningText","link","linkText","neutral","margarita","margarita750","primary2","grapetini900","button","outlinedPrimaryLabel","outlinedPrimaryBorder","outlinedPrimaryBg","outlinedSecondaryLabel","outlinedSecondaryBorder","outlinedSecondaryBg","outlinedTertiaryLabel","outlinedTertiaryBorder","outlinedTertiaryBg","outlinedDisabledLabel","outlinedDisabledBg","containedPrimaryLabel","containedPrimaryBg","containedSecondaryLabel","containedSecondaryBg","containedTertiaryLabel","containedTertiaryBg","containedDisabledLabel","containedDisabledBg","containedNeutralLabel","containedNeutralBg","hover","chip","nonSelectedPrimaryLabel","disabledPrimaryLabel","selectedPrimaryLabel","selectedPrimaryBorder","selectedPrimaryBg","dropdown","shadow","tab","sidenav","primaryBg","selectedTabBg","highlightBg","background","brandLightBg","brandBg","linkLightBg","linkBg","successLightBg","successBg","alertLightBg","alertBg","warningLightBg","warningBg","disabledSecondaryLight","neutral350","disabledSecondary","neutral400","disabledDark","disabled100","defaultDark","defaultDarkest","default","line","spinner","shimmer","disabledLight","disabled250","coupon","blue100","info","orange100","badge","curacao","curacao250","pinaColada","pinaColada250","margarita250","green","margarita100","yellow","orange250","red","green500","success500","green600","success600","purple100","purple250","gray100","gray250","aqua100","aqua250","black","counter","calendar","accent","selected","elevation","spacing","typography","size","transitions","DIRECTION","_jsx","ModalBack","Cross","_jsxs","Container","useState","useEffect","Portal","Overlay","OutsideClickHandler","Transition"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../packages/components/Bottomsheet/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AACrF,cAAc,QAAQ,CAAC"}
|
package/dist/style.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { Theme } from '@cleartrip/ct-design-theme';
|
|
3
|
+
export declare const getCloseButtonStyle: ({ theme, isLeft, isTop, }: {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
isLeft: boolean;
|
|
6
|
+
isTop: any;
|
|
7
|
+
}) => CSSObject;
|
|
8
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../packages/components/Bottomsheet/src/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD,eAAO,MAAM,mBAAmB;WAKvB,KAAK;YACJ,OAAO;;MAEb,SAaF,CAAC"}
|
package/dist/type.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { BaseStyleConfigProps } from '@cleartrip/ct-design-types';
|
|
3
|
+
export interface IBottomSheetComponentProps {
|
|
4
|
+
direction: 'up' | 'down';
|
|
5
|
+
children?: ReactNode | ReactElement | null;
|
|
6
|
+
header?: ReactNode;
|
|
7
|
+
transitionDuration?: number;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
overlayCloseIcon?: {
|
|
10
|
+
isBack?: boolean;
|
|
11
|
+
show?: boolean;
|
|
12
|
+
};
|
|
13
|
+
onClose: (params?: {
|
|
14
|
+
e?: Event;
|
|
15
|
+
isClosedByOutSideClick?: boolean;
|
|
16
|
+
}) => void;
|
|
17
|
+
allowedBackdropClose?: boolean;
|
|
18
|
+
showBorderRadius?: boolean;
|
|
19
|
+
styleConfig?: IBotttomSheetStyleConfig;
|
|
20
|
+
disableOutSideClick?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface IBotttomSheetStyleConfig {
|
|
23
|
+
bottomSheetContainer?: BaseStyleConfigProps;
|
|
24
|
+
overlayWrapper?: BaseStyleConfigProps;
|
|
25
|
+
}
|
|
26
|
+
export interface IBottomSheetHeaderProps {
|
|
27
|
+
id?: string;
|
|
28
|
+
handleClose: () => void;
|
|
29
|
+
styleConfig?: IBottomSheetHeaderStyleConfig;
|
|
30
|
+
closeIcon?: ReactNode;
|
|
31
|
+
isBack: boolean;
|
|
32
|
+
children?: ReactNode | ReactElement | null;
|
|
33
|
+
showBorderRadius?: boolean;
|
|
34
|
+
direction?: 'down' | 'up';
|
|
35
|
+
}
|
|
36
|
+
export interface IBottomSheetHeaderStyleConfig {
|
|
37
|
+
headerContainer?: BaseStyleConfigProps;
|
|
38
|
+
}
|
|
39
|
+
export declare const enum DIRECTION {
|
|
40
|
+
DOWN = "down",
|
|
41
|
+
UP = "up"
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../packages/components/Bottomsheet/src/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAKlE,MAAM,WAAW,0BAA0B;IAEzC,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IAEzB,QAAQ,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,IAAI,CAAC;IAE3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
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Bottomsheet component",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/ct-design-bottomsheet.cjs.js",
|
|
7
|
+
"jsnext:main": "dist/ct-design-bottomsheet.esm.js",
|
|
8
|
+
"module": "dist/ct-design-bottomsheet.esm.js",
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"browser": {
|
|
11
|
+
"./dist/ct-design-bottomsheet.esm.js": "./dist/ct-design-bottomsheet.browser.esm.js",
|
|
12
|
+
"./dist/ct-design-bottomsheet.cjs.js": "./dist/ct-design-bottomsheet.browser.cjs.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@cleartrip/ct-design-container": "3.2.0",
|
|
19
|
+
"@cleartrip/ct-design-outside-click-handler": "3.2.0",
|
|
20
|
+
"@cleartrip/ct-design-overlay": "3.2.0",
|
|
21
|
+
"@cleartrip/ct-design-icons": "20.0.0",
|
|
22
|
+
"@cleartrip/ct-design-portal": "3.2.0",
|
|
23
|
+
"@cleartrip/ct-design-conditional-wrap": "3.2.0",
|
|
24
|
+
"@cleartrip/ct-design-transition": "3.2.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@cleartrip/ct-design-theme": "3.2.0",
|
|
28
|
+
"@cleartrip/ct-design-button": "3.2.0",
|
|
29
|
+
"@cleartrip/ct-design-types": "3.2.0",
|
|
30
|
+
"@cleartrip/ct-design-styles": "3.2.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": ">=16.8.0",
|
|
34
|
+
"react-dom": ">=16.8.0",
|
|
35
|
+
"styled-components": "^5.3.6"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"author": "Cleartrip",
|
|
41
|
+
"license": "ISC",
|
|
42
|
+
"scripts": {
|
|
43
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
44
|
+
"watch-package": "rollup -c -w",
|
|
45
|
+
"build-package": "rollup -c",
|
|
46
|
+
"build-package:clean": "rm -rf dist && rollup -c"
|
|
47
|
+
}
|
|
48
|
+
}
|