zebpay-ui 0.0.4 → 0.0.5
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/esm/index.js +1 -3
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"@emotion/react/jsx-runtime";import{keyframes as r,css as o}from"@emotion/react";import*as n from"react";import{useState as i,useRef as l}from"react";var a=function(){return a=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},a.apply(this,arguments)};var d,c,_,m=r(_||(d=["\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }"],c=["\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }"],Object.defineProperty?Object.defineProperty(d,"raw",{value:c}):d.raw=c,_=d)),s=o({borderRadius:"100%",borderWidth:3,borderStyle:"solid",borderTopColor:"rgba(255,255,255,0.4)",margin:"0 auto",animation:"".concat(m," 1s linear infinite")}),g=function(t){var r=t.size,n=t.color;return e("div",{css:[s,o({height:"".concat(r,"px"),width:"".concat(r,"px"),color:n})]})},p={Zeb_Solid_White:"#FFFFFF",Zeb_Solid_BG_Blue:"#222245",Zeb_Solid_Dark_Blue:"#181837",Zeb_Solid_Bright_Blue:"#338FFF",Zeb_Solid_Light_Blue:"#C0C0EE",Zeb_Solid_Green:"#1ECAA2",Zeb_Solid_Red:"#EA6161",Zeb_Solid_Yellow:"#F9C35C",Zeb_Solid_Grey:"#C2C2DD",Zeb_Solid_Dark_Grey:"#34345A",Zeb_Solid_Black:"000000",Zeb_Solid_Light_Blue_01:"#E9EFF6",Zeb_Solid_Grey_01:"#E1E3E6",Zeb_Gradient_Blue_01:"linear-gradient(90.15deg, #5D7BFE 0.73%, #0974FF 101.92%)",Zeb_Gradient_Blue_02:"linear-gradient(180deg, #0473FF 0.54%, rgba(4, 115, 255, 0) 100%)",Zeb_Gradient_Dark_Blue:"linear-gradient(254.37deg, #4A62CA -43.42%, #1B264B 148.58%)",Zeb_Transparent_25:"rgba(12, 12, 36, 0.25)",Zeb_Transparent_Green:"rgba(30, 202, 162, 0.2)",Zeb_Transparent_Yellow:"rgba(249, 195, 92, 0.2)",Zeb_Transparent_Red:"rgba(234, 97, 97, 0.2)",Zeb_BG_Blue:"rgba(51, 143, 255, 0.2)",Zeb_BG_Light_Blue:"rgba(192, 192, 238, 0.2)",Zeb_BG_Green:"rgba(30, 202, 162, 0.08)",Zeb_BG_Red:"rgba(234, 97, 97, 0.08)",Zeb_BG_Yellow:"rgba(249, 195, 92, 0.08)",Zeb_Transparent_4:"rgba(51, 143, 255, 0.04)",Zeb_Effects_Shadow_Hover:"0px 8px 8px -4px #0C0C1D",Zeb_Effects_Shadow_W_Drawer:"-12px 0px 40px rgba(12, 12, 29, 0.48)",Zeb_Effects_Shadow_M_Drawer:"0px -12px 40px rgba(12, 12, 29, 0.48)",Zeb_Effects_Shadow_Hover_Up:"0px -2px 32px 8px rgba(12, 12, 29, 0.4)",Zeb_Effects_Shimmer:"linear-gradient(97.38deg, #34345A -40.76%, #19193A 135.88%)"},b={remConverter:function(e){return"".concat(e/16,"rem")},widthPercentage:function(e){return o({width:"".concat(e,"%")})},heightPercentage:function(e){return o({height:"".concat(e,"%")})},mr:function(e){return o({marginRight:b.remConverter(e)})},ml:function(e){return o({marginLeft:b.remConverter(e)})},mt:function(e){return o({marginTop:b.remConverter(e)})},mb:function(e){return o({marginBottom:b.remConverter(e)})}},f={H1_56_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(56),lineHeight:"86px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H2_44_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(44),lineHeight:"60px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H3_32_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(32),lineHeight:"48px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H4_28_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(28),lineHeight:"40px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H5_20_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(20),lineHeight:"normal",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H6_16_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H1_56_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(56),lineHeight:"86px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H2_44_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(44),lineHeight:"60px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H3_32_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(32),lineHeight:"48px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H4_28_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(28),lineHeight:"40px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H5_20_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(20),lineHeight:"30px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H6_16_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H1_56_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(56),lineHeight:"86px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H2_44_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(44),lineHeight:"60px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H3_32_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(32),lineHeight:"48px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H4_28_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(28),lineHeight:"40px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H5_20_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(20),lineHeight:"30px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H6_16_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},H8_12_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(12),lineHeight:"18px",letterSpacing:"0.8px",color:p.Zeb_Solid_White},B1_24_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(24),lineHeight:"40px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B2_20_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(20),lineHeight:"30px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B3_16_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(16),lineHeight:"28px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B4_14_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(14),lineHeight:"24px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B5_12_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(12),lineHeight:"18px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B6_10_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(10),lineHeight:"12px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B1_24_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(24),lineHeight:"40px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B2_20_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:b.remConverter(20),lineHeight:"30px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B3_16_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(16),lineHeight:"28px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B4_14_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(14),lineHeight:"24px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B5_12_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(12),lineHeight:"18px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},B6_10_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:b.remConverter(10),lineHeight:"12px",letterSpacing:"0.4px",color:p.Zeb_Solid_White},C1_20:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(20),lineHeight:"30px",letterSpacing:"1.6px",color:p.Zeb_Solid_White,textTransform:"uppercase"},C2_16:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:p.Zeb_Solid_White,textTransform:"uppercase"},C3_14:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(14),lineHeight:"24px",letterSpacing:"0.8px",color:p.Zeb_Solid_White,textTransform:"uppercase"},C4_12:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:b.remConverter(12),lineHeight:"18px",letterSpacing:"0.4px",color:p.Zeb_Solid_White,textTransform:"uppercase"}},h={flexJustifiedBetween:o({justifyContent:"space-between"}),flexJustifiedCenter:o({justifyContent:"center"}),flexJustifiedEnd:o({justifyContent:"flex-end"}),flexAlignCenter:o({display:"flex",alignItems:"center"}),flexAlignStart:o({display:"flex",alignItems:"flex-start"}),flexNoWrap:o({flexWrap:"nowrap"}),flexColumn:o({display:"flex",flexDirection:"column"}),textSuccess:o({color:p.Zeb_Solid_Green}),textError:o({color:p.Zeb_Solid_Red}),bgSuccess:o({background:p.Zeb_Solid_Green}),bgError:o({background:p.Zeb_Solid_Red}),textFaded:o({color:p.Zeb_Solid_Light_Blue}),textCapitalize:o({textTransform:"capitalize"}),textAlignmentCenter:o({textAlign:"center"}),textAlignmentLeft:o({textAlign:"left"}),textAlignmentRight:o({textAlign:"right"})},C=o(a(a({padding:0,backgroundColor:"transparent",boxShadow:"none",border:"none",outline:"none"},f.C3_14),{color:p.Zeb_Solid_Bright_Blue,"&.small":a(a({},f.C4_12),{color:p.Zeb_Solid_Bright_Blue})})),u=o(a(a({background:p.Zeb_Gradient_Blue_01,borderRadius:b.remConverter(8),boxShadow:"none",border:"none",outline:"none",whiteSpace:"nowrap"},f.C4_12),{"&.small":a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12))},f.C4_12),"&.medium":a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12))},f.C4_12),"&.large":a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(16))},f.C2_16),"&.full-width":{padding:"".concat(b.remConverter(8)," 0"),width:"100%"},"&:disabled":{opacity:.2}})),S=o(a(a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(16)),background:p.Zeb_Transparent_4,border:"1px solid ".concat(p.Zeb_Solid_Bright_Blue),borderRadius:"8px"},f.C2_16),{"&.small":a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12))},f.C4_12),"&.medium":a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12))},f.C4_12),"&.large":a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(16))},f.C2_16),"&.full-width":{padding:"".concat(b.remConverter(8)," 0")},"&:disabled":{borderColor:p.Zeb_Solid_Grey}})),x=o({padding:"".concat(b.remConverter(6)," 0"),background:p.Zeb_Gradient_Blue_01,boxShadow:"none",border:"none",outline:"none",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center","&.small":{width:"100%",padding:"".concat(b.remConverter(8)," 0")},"&.large":{width:"100%"},"&.full-width":{width:"100%"},"&.medium":{width:"100%"}}),v=o(a({marginLeft:b.remConverter(8)},f.C3_14)),y=o({display:"none"}),Z=o({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12)),background:p.Zeb_Transparent_4,boxShadow:"none",border:"1px solid ".concat(p.Zeb_Solid_Bright_Blue),outline:"none",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center","&.medium":{padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12))}}),W=o(a({marginLeft:b.remConverter(4)},f.C4_12)),B=o(a(a({border:"0.5px solid ".concat(p.Zeb_Solid_Light_Blue),borderRadius:"4px",padding:"".concat(b.remConverter(4)," ").concat(b.remConverter(8))},f.B5_12_semibold),{color:p.Zeb_Solid_Light_Blue,display:"flex",justifyContent:"center",flexGrow:1,textTransform:"uppercase",cursor:"pointer","&.active":a({background:p.Zeb_Solid_Dark_Blue,borderColor:p.Zeb_Solid_Bright_Blue},f.C4_12)})),w=o({opacity:.5,cursor:"not-allowed"});function H(e,t){switch(e){case"primary":return u;case"secondary":return S;case"tertiary":return[Z,W];case"link":return C;case"tab":return"small"===t?[B,y]:B;case"special":return[x,v]}}var L=function(t){var r=t.type,o=t.size,n=void 0===o?"medium":o,i=t.onClick,l=t.disabled,d=t.style,c=t.children,_=t.loading;return e("button",a({onClick:i,disabled:l,className:n,css:[H(r,n),d,l&&w]},{children:_?e(g,{size:18}):c}))},k=o({minWidth:b.remConverter(16)}),F=o(a(a({display:"flex",alignItems:"center",justifyContent:"flex-start",height:"auto",position:"relative",cursor:"pointer",marginBottom:0},f.B4_14_semibold),{"&:hover":{"input ~ .checkmark":{backgroundColor:p.Zeb_Solid_White}}})),z=o({opacity:.5,cursor:"not-allowed"}),R=o({opacity:0,cursor:"pointer",height:0,width:0}),G=o({backgroundColor:p.Zeb_Solid_White,border:"1px solid ".concat(p.Zeb_Solid_White),borderRadius:4,"&:after":{display:"block"}}),T=o({marginLeft:b.remConverter(20)});o({marginLeft:b.remConverter(20)});var E=o({position:"absolute",top:"50%",left:0,transform:"translateY(-50%)",height:b.remConverter(12),width:b.remConverter(12),backgroundColor:"transparent",border:"1px solid ".concat(p.Zeb_Solid_White),borderRadius:4,"&:after":{content:"''",position:"absolute",display:"none",left:2,top:"45%",width:4,height:8,border:"solid ".concat(p.Zeb_Solid_Dark_Blue),borderWidth:"0 2px 2px 0",transform:"rotate(45deg) translate(-50%, -50%)"}}),D=function(r){var o=r.label,n=r.value,i=r.style,l=r.checked,d=r.onChange,c=r.disabled;return t("label",a({css:[k,F,i,c?z:""]},{children:[o&&e("div",a({css:T},{children:o})),e("input",{checked:l,onChange:function(e){return d({checked:e.target.checked,value:e.target.value})},type:"checkbox",css:R,value:n,disabled:c}),e("span",{css:[E,l&&G]})]}))},A=o({borderColor:p.Zeb_Solid_Red}),j=o(a(a({},f.B4_14_regular),{color:p.Zeb_Solid_Light_Blue,marginBottom:b.remConverter(4)})),I=o({color:"".concat(p.Zeb_Solid_White,"!important")}),M=o({border:"1px solid transparent",borderRadius:8,flexWrap:"wrap",alignItems:"stretch"}),Y=o({borderColor:p.Zeb_Solid_Bright_Blue,boxShadow:p.Zeb_Effects_Shadow_Hover}),O=o(a(a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12)),background:p.Zeb_Solid_Dark_Blue,border:"none"},f.B4_14_semibold),{color:"".concat(p.Zeb_Solid_White,"!important"),height:b.remConverter(40),flex:"1 1 auto",":focus":{boxShadow:"none",outline:"none"},"::placeholder":a(a({},f.B4_14_regular),{color:"".concat(p.Zeb_Solid_Light_Blue,"!important")})})),P=o({borderRadius:b.remConverter(8)}),J=o({borderRadius:b.remConverter(0)}),U=o({borderRadius:"".concat(b.remConverter(8)," 0 0 ").concat(b.remConverter(8))}),N=o({borderRadius:"0 ".concat(b.remConverter(8)," ").concat(b.remConverter(8)," 0")}),V=o(a(a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12)),background:p.Zeb_Solid_Dark_Blue,borderRadius:"0 ".concat(b.remConverter(8)," ").concat(b.remConverter(8)," 0"),border:"none"},f.B4_14_semibold),{height:b.remConverter(40)})),X=o(a(a({padding:"".concat(b.remConverter(8)," ").concat(b.remConverter(12)),background:p.Zeb_Solid_Dark_Blue,borderRadius:"".concat(b.remConverter(8)," 0 0 ").concat(b.remConverter(8)),border:"none"},f.B4_14_semibold),{height:b.remConverter(40)})),q=o({marginLeft:"auto"}),K=function(r){var n=r.value,l=r.label,d=r.placeholder,c=r.name,_=r.appendItem,m=r.prependItem,s=r.infoText,g=r.errorText,p=r.cta,b=r.style,C=r.type,u=void 0===C?"text":C,S=r.onChange,x=i(!1),v=x[0],y=x[1];return t("div",a({css:b},{children:[e("label",a({css:[j,v?I:null,g?h.textError:null]},{children:l})),t("div",a({css:[M,h.flexAlignCenter,v?Y:null,g?A:null]},{children:[m&&e("span",a({css:X},{children:m})),e("input",{type:u,name:c,placeholder:d,onFocus:function(){y(!0)},onBlur:function(){y(!1)},css:[O,P,m&&N,_&&U,_&&m&&J],value:n,onChange:function(e){var t=e.target,r=t.value,o=t.name;S({value:r,name:o})}}),_&&e("span",a({css:V},{children:_}))]})),t("div",a({css:[h.flexAlignCenter,h.flexJustifiedBetween]},{children:[(g||s)&&e("div",a({css:[o(a({},f.B4_14_regular)),s&&h.textFaded,g&&h.textError]},{children:s||g})),p&&e("div",a({css:q},{children:e(L,a({type:"link",size:"medium",onClick:p.onClick},{children:p.label}))}))]}))]}))},Q=o({height:b.remConverter(34),width:b.remConverter(330),position:"relative"}),$=o({backgroundColor:p.Zeb_Solid_BG_Blue,borderRadius:b.remConverter(8),minWidth:b.remConverter(328),display:"flex",flexDirection:"column",padding:b.remConverter(12),position:"absolute",justifyContent:"space-between",borderColor:p.Zeb_Solid_Bright_Blue,borderWidth:b.remConverter(2),borderStyle:"solid",boxShadow:"0px 8px 8px -4px #0C0C1D",bottom:b.remConverter(42)}),ee=o(a(a({},f.B4_14_semibold),{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"})),te=o(a(a({},f.C4_12),{textAlign:"center",height:b.remConverter(34),width:b.remConverter(330)})),re=o({});var oe=function(r){var o,i=r.onClose,d=void 0===i?function(){}:i,c=r.label,_=r.buttonProps,m=void 0===_?{}:_,s=r.renderChildren,g=r.style,p=n.useState(!1),b=p[0],f=p[1],h=[o=l(null),function(){o.current&&o.current.focus()}],C=h[0],u=h[1],S=n.useCallback((function(){f(!1),d()}),[d]),x=n.useCallback((function(){b?S():f(!0)}),[b,S,f]);return n.useEffect((function(){u&&u()}),[C.current,u]),t("div",a({css:[Q,g]},{children:[b&&t("div",a({css:$,tabIndex:0,onBlur:S,ref:C},{children:[t("div",a({css:ee},{children:[e("span",{children:c}),e("span",a({onClick:S,css:re},{children:"X"}))]})),s({close:S,isOpened:b})]})),e(L,a({},m,{style:[te,m.style],onClick:x,type:m.type||"secondary"},{children:c}))]}))},ne=o(a({display:"block",position:"relative",paddingLeft:b.remConverter(20),cursor:"pointer",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none",marginBottom:0},f.B4_14_regular)),ie=o({position:"absolute",opacity:0,cursor:"pointer",":checked":{"~ span":{backgroundColor:"transparent",":after":{display:"block"}}}}),le=o({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",left:0,height:16,width:16,borderRadius:"50%",border:"1px solid ".concat(p.Zeb_Solid_White),transform:"translateY(-50%)",":after":{content:"''",display:"none",width:8,height:8,borderRadius:"50%",backgroundColor:p.Zeb_Solid_Bright_Blue}}),ae=function(r){var o=r.value,n=r.onChange,i=r.label,l=r.style,d=r.name,c=r.selected;return t("label",a({css:[ne,l]},{children:[i,e("input",{type:"radio",name:d,css:ie,value:o,onChange:function(e){return n({selected:e.target.checked,value:e.target.value})},checked:c}),e("span",{css:le})]}))},de=o({padding:"".concat(b.remConverter(12)," ").concat(b.remConverter(16)," ").concat(b.remConverter(12)," ").concat(b.remConverter(24)),border:"1px solid transparent",backdropFilter:"blur(20px)",borderRadius:"8px",maxWidth:"484px",width:"100%"}),ce=o(a(a({},f.B4_14_semibold),{display:"flex",alignItems:"center",justifyContent:"space-between"})),_e=o({display:"flex",alignItems:"center"}),me=o({marginLeft:"".concat(b.remConverter(8))}),se=o({padding:0,outline:"none",border:"none",boxShadow:"none",backgroundColor:"transparent"}),ge=o(a(a({},f.B5_12_regular),{marginTop:"".concat(b.remConverter(4))})),pe=o({background:"rgba(249, 200, 92, 0.08)",borderColor:p.Zeb_Solid_Yellow}),be=o({color:p.Zeb_Solid_Yellow}),fe=o({background:"rgba(234, 97, 97, 0.08)",borderColor:p.Zeb_Solid_Red}),he=o({color:p.Zeb_Solid_Red}),Ce=o({background:"rgba(30, 202, 162, 0.08)",borderColor:p.Zeb_Solid_Green}),ue=o({color:p.Zeb_Solid_Green}),Se=Object.freeze({__proto__:null,toastContainer:de,toastHeading:ce,toastDetails:_e,toastTitle:me,closeCta:se,toastDescription:ge,info:pe,infoToastHeading:be,error:fe,errorToastHeading:he,success:Ce,successToastHeading:ue}),xe=function(e){return"info"===e?p.Zeb_Solid_Yellow:"error"===e?p.Zeb_Solid_Red:"success"===e?p.Zeb_Solid_Green:void 0},ve=function(r){var o=r.title,n=r.description,i=r.type,l=r.onClose;return t("div",a({css:[de,Se[i]]},{children:[t("div",a({css:[ce,Se["".concat(i,"ToastHeading")]]},{children:[t("div",a({css:_e},{children:[e("svg",a({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9999 13.9866C10.8159 14.7778 9.42383 15.2 7.9998 15.2C6.09024 15.2 4.2589 14.4415 2.90864 13.0912C1.55837 11.741 0.799805 9.90961 0.799805 8.00005C0.799805 6.57602 1.22208 5.18398 2.01322 3.99995C2.80437 2.81591 3.92885 1.89307 5.24448 1.34812C6.56011 0.803169 8.00779 0.660585 9.40445 0.938398C10.8011 1.21621 12.084 1.90194 13.091 2.90888C14.0979 3.91582 14.7836 5.19874 15.0615 6.5954C15.3393 7.99206 15.1967 9.43974 14.6517 10.7554C14.1068 12.071 13.1839 13.1955 11.9999 13.9866ZM11.4656 2.81311C10.4397 2.12763 9.23361 1.76177 7.9998 1.76177C6.34614 1.76449 4.76099 2.4226 3.59167 3.59192C2.42236 4.76124 1.76424 6.34639 1.76152 8.00005C1.76152 9.23386 2.12739 10.44 2.81286 11.4659C3.49833 12.4917 4.47262 13.2913 5.61251 13.7635C6.75241 14.2356 8.00672 14.3592 9.21683 14.1185C10.4269 13.8778 11.5385 13.2836 12.4109 12.4112C13.2834 11.5387 13.8775 10.4272 14.1182 9.21708C14.3589 8.00697 14.2354 6.75266 13.7632 5.61276C13.2911 4.47286 12.4915 3.49858 11.4656 2.81311ZM7.41321 7.59992C7.41321 7.27925 7.67321 7.01325 7.99321 7.01325C8.31987 7.01325 8.57987 7.27925 8.57987 7.59992V10.5466C8.57987 10.8666 8.31987 11.1266 7.99321 11.1266C7.67321 11.1266 7.41321 10.8666 7.41321 10.5466V7.59992ZM7.41987 5.48659C7.41987 5.15992 7.67987 4.89992 8.00654 4.89992C8.32654 4.89992 8.58654 5.15992 8.58654 5.48659C8.58654 5.80592 8.32654 6.06659 7.99321 6.06659C7.67987 6.06659 7.41987 5.80592 7.41987 5.48659Z",fill:xe(i)})})),e("div",a({css:me},{children:o}))]})),e("div",{children:l&&e("button",a({css:se,onClick:l},{children:e("svg",a({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99996 0.666626C3.94996 0.666626 0.666626 3.94996 0.666626 7.99996C0.666626 12.05 3.94996 15.3333 7.99996 15.3333C12.05 15.3333 15.3333 12.05 15.3333 7.99996C15.3333 3.94996 12.05 0.666626 7.99996 0.666626ZM10.4713 6.47129C10.5927 6.34556 10.6599 6.17716 10.6584 6.00236C10.6569 5.82756 10.5868 5.66035 10.4632 5.53675C10.3396 5.41314 10.1724 5.34303 9.99756 5.34151C9.82276 5.33999 9.65436 5.40719 9.52862 5.52863L7.99996 7.05729L6.47129 5.52863C6.40979 5.46495 6.33623 5.41416 6.25489 5.37922C6.17356 5.34429 6.08608 5.32589 5.99756 5.32513C5.90904 5.32436 5.82125 5.34122 5.73932 5.37474C5.65739 5.40827 5.58296 5.45777 5.52036 5.52036C5.45777 5.58296 5.40827 5.65739 5.37474 5.73932C5.34122 5.82125 5.32436 5.90904 5.32513 5.99756C5.32589 6.08608 5.34428 6.17356 5.37922 6.2549C5.41416 6.33623 5.46495 6.40979 5.52863 6.47129L7.05729 7.99996L5.52863 9.52863C5.46495 9.59012 5.41416 9.66369 5.37922 9.74502C5.34428 9.82636 5.32589 9.91384 5.32513 10.0024C5.32436 10.0909 5.34122 10.1787 5.37474 10.2606C5.40827 10.3425 5.45777 10.417 5.52036 10.4796C5.58296 10.5422 5.65739 10.5917 5.73932 10.6252C5.82125 10.6587 5.90904 10.6756 5.99756 10.6748C6.08608 10.674 6.17356 10.6556 6.25489 10.6207C6.33623 10.5858 6.40979 10.535 6.47129 10.4713L7.99996 8.94263L9.52862 10.4713C9.65436 10.5927 9.82276 10.6599 9.99756 10.6584C10.1724 10.6569 10.3396 10.5868 10.4632 10.4632C10.5868 10.3396 10.6569 10.1724 10.6584 9.99756C10.6599 9.82276 10.5927 9.65436 10.4713 9.52863L8.94262 7.99996L10.4713 6.47129Z",fill:xe(i)})}))}))})]})),e("div",a({css:ge},{children:n}))]}))};export{L as Button,D as Checkbox,g as CircularLoader,K as Input,oe as Popper,ae as Radio,ve as Toast,p as colors,h as mixins,f as typography,b as utils};
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
3
|
-
2 9.74502C5.34428 9.82636 5.32589 9.91384 5.32513 10.0024C5.32436 10.0909 5.34122 10.1787 5.37474 10.2606C5.40827 10.3425 5.45777 10.417 5.52036 10.4796C5.58296 10.5422 5.65739 10.5917 5.73932 10.6252C5.82125 10.6587 5.90904 10.6756 5.99756 10.6748C6.08608 10.674 6.17356 10.6556 6.25489 10.6207C6.33623 10.5858 6.40979 10.535 6.47129 10.4713L7.99996 8.94263L9.52862 10.4713C9.65436 10.5927 9.82276 10.6599 9.99756 10.6584C10.1724 10.6569 10.3396 10.5868 10.4632 10.4632C10.5868 10.3396 10.6569 10.1724 10.6584 9.99756C10.6599 9.82276 10.5927 9.65436 10.4713 9.52863L8.94262 7.99996L10.4713 6.47129Z",fill:be(n)})}))}))})]})),e.jsx("div",i({css:ae},{children:o}))]}))},exports.colors=m,exports.mixins=b,exports.typography=g,exports.utils=p;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),r=require("react");function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=o(r),i=function(){return i=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};var l,a,c,s=t.keyframes(c||(l=["\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }"],a=["\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }"],Object.defineProperty?Object.defineProperty(l,"raw",{value:a}):l.raw=a,c=l)),d=t.css({borderRadius:"100%",borderWidth:3,borderStyle:"solid",borderTopColor:"rgba(255,255,255,0.4)",margin:"0 auto",animation:"".concat(s," 1s linear infinite")}),_=function(r){var o=r.size,n=r.color;return e.jsx("div",{css:[d,t.css({height:"".concat(o,"px"),width:"".concat(o,"px"),color:n})]})},m={Zeb_Solid_White:"#FFFFFF",Zeb_Solid_BG_Blue:"#222245",Zeb_Solid_Dark_Blue:"#181837",Zeb_Solid_Bright_Blue:"#338FFF",Zeb_Solid_Light_Blue:"#C0C0EE",Zeb_Solid_Green:"#1ECAA2",Zeb_Solid_Red:"#EA6161",Zeb_Solid_Yellow:"#F9C35C",Zeb_Solid_Grey:"#C2C2DD",Zeb_Solid_Dark_Grey:"#34345A",Zeb_Solid_Black:"000000",Zeb_Solid_Light_Blue_01:"#E9EFF6",Zeb_Solid_Grey_01:"#E1E3E6",Zeb_Gradient_Blue_01:"linear-gradient(90.15deg, #5D7BFE 0.73%, #0974FF 101.92%)",Zeb_Gradient_Blue_02:"linear-gradient(180deg, #0473FF 0.54%, rgba(4, 115, 255, 0) 100%)",Zeb_Gradient_Dark_Blue:"linear-gradient(254.37deg, #4A62CA -43.42%, #1B264B 148.58%)",Zeb_Transparent_25:"rgba(12, 12, 36, 0.25)",Zeb_Transparent_Green:"rgba(30, 202, 162, 0.2)",Zeb_Transparent_Yellow:"rgba(249, 195, 92, 0.2)",Zeb_Transparent_Red:"rgba(234, 97, 97, 0.2)",Zeb_BG_Blue:"rgba(51, 143, 255, 0.2)",Zeb_BG_Light_Blue:"rgba(192, 192, 238, 0.2)",Zeb_BG_Green:"rgba(30, 202, 162, 0.08)",Zeb_BG_Red:"rgba(234, 97, 97, 0.08)",Zeb_BG_Yellow:"rgba(249, 195, 92, 0.08)",Zeb_Transparent_4:"rgba(51, 143, 255, 0.04)",Zeb_Effects_Shadow_Hover:"0px 8px 8px -4px #0C0C1D",Zeb_Effects_Shadow_W_Drawer:"-12px 0px 40px rgba(12, 12, 29, 0.48)",Zeb_Effects_Shadow_M_Drawer:"0px -12px 40px rgba(12, 12, 29, 0.48)",Zeb_Effects_Shadow_Hover_Up:"0px -2px 32px 8px rgba(12, 12, 29, 0.4)",Zeb_Effects_Shimmer:"linear-gradient(97.38deg, #34345A -40.76%, #19193A 135.88%)"},p={remConverter:function(e){return"".concat(e/16,"rem")},widthPercentage:function(e){return t.css({width:"".concat(e,"%")})},heightPercentage:function(e){return t.css({height:"".concat(e,"%")})},mr:function(e){return t.css({marginRight:p.remConverter(e)})},ml:function(e){return t.css({marginLeft:p.remConverter(e)})},mt:function(e){return t.css({marginTop:p.remConverter(e)})},mb:function(e){return t.css({marginBottom:p.remConverter(e)})}},g={H1_56_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(56),lineHeight:"86px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H2_44_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(44),lineHeight:"60px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H3_32_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(32),lineHeight:"48px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H4_28_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(28),lineHeight:"40px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H5_20_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(20),lineHeight:"normal",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H6_16_bold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H1_56_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(56),lineHeight:"86px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H2_44_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(44),lineHeight:"60px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H3_32_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(32),lineHeight:"48px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H4_28_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(28),lineHeight:"40px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H5_20_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(20),lineHeight:"30px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H6_16_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H1_56_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(56),lineHeight:"86px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H2_44_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(44),lineHeight:"60px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H3_32_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(32),lineHeight:"48px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H4_28_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(28),lineHeight:"40px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H5_20_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(20),lineHeight:"30px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H6_16_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},H8_12_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(12),lineHeight:"18px",letterSpacing:"0.8px",color:m.Zeb_Solid_White},B1_24_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(24),lineHeight:"40px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B2_20_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(20),lineHeight:"30px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B3_16_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(16),lineHeight:"28px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B4_14_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(14),lineHeight:"24px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B5_12_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(12),lineHeight:"18px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B6_10_semibold:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(10),lineHeight:"12px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B1_24_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(24),lineHeight:"40px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B2_20_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:600,fontSize:p.remConverter(20),lineHeight:"30px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B3_16_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(16),lineHeight:"28px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B4_14_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(14),lineHeight:"24px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B5_12_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(12),lineHeight:"18px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},B6_10_regular:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"normal",fontSize:p.remConverter(10),lineHeight:"12px",letterSpacing:"0.4px",color:m.Zeb_Solid_White},C1_20:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(20),lineHeight:"30px",letterSpacing:"1.6px",color:m.Zeb_Solid_White,textTransform:"uppercase"},C2_16:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(16),lineHeight:"28px",letterSpacing:"0.8px",color:m.Zeb_Solid_White,textTransform:"uppercase"},C3_14:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(14),lineHeight:"24px",letterSpacing:"0.8px",color:m.Zeb_Solid_White,textTransform:"uppercase"},C4_12:{fontFamily:"Lato",fontStyle:"normal",fontWeight:"bold",fontSize:p.remConverter(12),lineHeight:"18px",letterSpacing:"0.4px",color:m.Zeb_Solid_White,textTransform:"uppercase"}},b={flexJustifiedBetween:t.css({justifyContent:"space-between"}),flexJustifiedCenter:t.css({justifyContent:"center"}),flexJustifiedEnd:t.css({justifyContent:"flex-end"}),flexAlignCenter:t.css({display:"flex",alignItems:"center"}),flexAlignStart:t.css({display:"flex",alignItems:"flex-start"}),flexNoWrap:t.css({flexWrap:"nowrap"}),flexColumn:t.css({display:"flex",flexDirection:"column"}),textSuccess:t.css({color:m.Zeb_Solid_Green}),textError:t.css({color:m.Zeb_Solid_Red}),bgSuccess:t.css({background:m.Zeb_Solid_Green}),bgError:t.css({background:m.Zeb_Solid_Red}),textFaded:t.css({color:m.Zeb_Solid_Light_Blue}),textCapitalize:t.css({textTransform:"capitalize"}),textAlignmentCenter:t.css({textAlign:"center"}),textAlignmentLeft:t.css({textAlign:"left"}),textAlignmentRight:t.css({textAlign:"right"})},f=t.css(i(i({padding:0,backgroundColor:"transparent",boxShadow:"none",border:"none",outline:"none"},g.C3_14),{color:m.Zeb_Solid_Bright_Blue,"&.small":i(i({},g.C4_12),{color:m.Zeb_Solid_Bright_Blue})})),u=t.css(i(i({background:m.Zeb_Gradient_Blue_01,borderRadius:p.remConverter(8),boxShadow:"none",border:"none",outline:"none",whiteSpace:"nowrap"},g.C4_12),{"&.small":i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12))},g.C4_12),"&.medium":i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12))},g.C4_12),"&.large":i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(16))},g.C2_16),"&.full-width":{padding:"".concat(p.remConverter(8)," 0"),width:"100%"},"&:disabled":{opacity:.2}})),h=t.css(i(i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(16)),background:m.Zeb_Transparent_4,border:"1px solid ".concat(m.Zeb_Solid_Bright_Blue),borderRadius:"8px"},g.C2_16),{"&.small":i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12))},g.C4_12),"&.medium":i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12))},g.C4_12),"&.large":i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(16))},g.C2_16),"&.full-width":{padding:"".concat(p.remConverter(8)," 0")},"&:disabled":{borderColor:m.Zeb_Solid_Grey}})),C=t.css({padding:"".concat(p.remConverter(6)," 0"),background:m.Zeb_Gradient_Blue_01,boxShadow:"none",border:"none",outline:"none",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center","&.small":{width:"100%",padding:"".concat(p.remConverter(8)," 0")},"&.large":{width:"100%"},"&.full-width":{width:"100%"},"&.medium":{width:"100%"}}),x=t.css(i({marginLeft:p.remConverter(8)},g.C3_14)),S=t.css({display:"none"}),v=t.css({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12)),background:m.Zeb_Transparent_4,boxShadow:"none",border:"1px solid ".concat(m.Zeb_Solid_Bright_Blue),outline:"none",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center","&.medium":{padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12))}}),y=t.css(i({marginLeft:p.remConverter(4)},g.C4_12)),Z=t.css(i(i({border:"0.5px solid ".concat(m.Zeb_Solid_Light_Blue),borderRadius:"4px",padding:"".concat(p.remConverter(4)," ").concat(p.remConverter(8))},g.B5_12_semibold),{color:m.Zeb_Solid_Light_Blue,display:"flex",justifyContent:"center",flexGrow:1,textTransform:"uppercase",cursor:"pointer","&.active":i({background:m.Zeb_Solid_Dark_Blue,borderColor:m.Zeb_Solid_Bright_Blue},g.C4_12)})),W=t.css({opacity:.5,cursor:"not-allowed"});function B(e,t){switch(e){case"primary":return u;case"secondary":return h;case"tertiary":return[v,y];case"link":return f;case"tab":return"small"===t?[Z,S]:Z;case"special":return[C,x]}}var w=function(t){var r=t.type,o=t.size,n=void 0===o?"medium":o,l=t.onClick,a=t.disabled,c=t.style,s=t.children,d=t.loading;return e.jsx("button",i({onClick:l,disabled:a,className:n,css:[B(r,n),c,a&&W]},{children:d?e.jsx(_,{size:18}):s}))},H=t.css({minWidth:p.remConverter(16)}),L=t.css(i(i({display:"flex",alignItems:"center",justifyContent:"flex-start",height:"auto",position:"relative",cursor:"pointer",marginBottom:0},g.B4_14_semibold),{"&:hover":{"input ~ .checkmark":{backgroundColor:m.Zeb_Solid_White}}})),j=t.css({opacity:.5,cursor:"not-allowed"}),k=t.css({opacity:0,cursor:"pointer",height:0,width:0}),F=t.css({backgroundColor:m.Zeb_Solid_White,border:"1px solid ".concat(m.Zeb_Solid_White),borderRadius:4,"&:after":{display:"block"}}),z=t.css({marginLeft:p.remConverter(20)});t.css({marginLeft:p.remConverter(20)});var R=t.css({position:"absolute",top:"50%",left:0,transform:"translateY(-50%)",height:p.remConverter(12),width:p.remConverter(12),backgroundColor:"transparent",border:"1px solid ".concat(m.Zeb_Solid_White),borderRadius:4,"&:after":{content:"''",position:"absolute",display:"none",left:2,top:"45%",width:4,height:8,border:"solid ".concat(m.Zeb_Solid_Dark_Blue),borderWidth:"0 2px 2px 0",transform:"rotate(45deg) translate(-50%, -50%)"}}),G=t.css({borderColor:m.Zeb_Solid_Red}),T=t.css(i(i({},g.B4_14_regular),{color:m.Zeb_Solid_Light_Blue,marginBottom:p.remConverter(4)})),E=t.css({color:"".concat(m.Zeb_Solid_White,"!important")}),D=t.css({border:"1px solid transparent",borderRadius:8,flexWrap:"wrap",alignItems:"stretch"}),A=t.css({borderColor:m.Zeb_Solid_Bright_Blue,boxShadow:m.Zeb_Effects_Shadow_Hover}),I=t.css(i(i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12)),background:m.Zeb_Solid_Dark_Blue,border:"none"},g.B4_14_semibold),{color:"".concat(m.Zeb_Solid_White,"!important"),height:p.remConverter(40),flex:"1 1 auto",":focus":{boxShadow:"none",outline:"none"},"::placeholder":i(i({},g.B4_14_regular),{color:"".concat(m.Zeb_Solid_Light_Blue,"!important")})})),O=t.css({borderRadius:p.remConverter(8)}),M=t.css({borderRadius:p.remConverter(0)}),P=t.css({borderRadius:"".concat(p.remConverter(8)," 0 0 ").concat(p.remConverter(8))}),Y=t.css({borderRadius:"0 ".concat(p.remConverter(8)," ").concat(p.remConverter(8)," 0")}),J=t.css(i(i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12)),background:m.Zeb_Solid_Dark_Blue,borderRadius:"0 ".concat(p.remConverter(8)," ").concat(p.remConverter(8)," 0"),border:"none"},g.B4_14_semibold),{height:p.remConverter(40)})),U=t.css(i(i({padding:"".concat(p.remConverter(8)," ").concat(p.remConverter(12)),background:m.Zeb_Solid_Dark_Blue,borderRadius:"".concat(p.remConverter(8)," 0 0 ").concat(p.remConverter(8)),border:"none"},g.B4_14_semibold),{height:p.remConverter(40)})),q=t.css({marginLeft:"auto"}),N=t.css({height:p.remConverter(34),width:p.remConverter(330),position:"relative"}),V=t.css({backgroundColor:m.Zeb_Solid_BG_Blue,borderRadius:p.remConverter(8),minWidth:p.remConverter(328),display:"flex",flexDirection:"column",padding:p.remConverter(12),position:"absolute",justifyContent:"space-between",borderColor:m.Zeb_Solid_Bright_Blue,borderWidth:p.remConverter(2),borderStyle:"solid",boxShadow:"0px 8px 8px -4px #0C0C1D",bottom:p.remConverter(42)}),X=t.css(i(i({},g.B4_14_semibold),{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"})),K=t.css(i(i({},g.C4_12),{textAlign:"center",height:p.remConverter(34),width:p.remConverter(330)})),Q=t.css({});var $=t.css(i({display:"block",position:"relative",paddingLeft:p.remConverter(20),cursor:"pointer",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none",marginBottom:0},g.B4_14_regular)),ee=t.css({position:"absolute",opacity:0,cursor:"pointer",":checked":{"~ span":{backgroundColor:"transparent",":after":{display:"block"}}}}),te=t.css({position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",left:0,height:16,width:16,borderRadius:"50%",border:"1px solid ".concat(m.Zeb_Solid_White),transform:"translateY(-50%)",":after":{content:"''",display:"none",width:8,height:8,borderRadius:"50%",backgroundColor:m.Zeb_Solid_Bright_Blue}}),re=t.css({padding:"".concat(p.remConverter(12)," ").concat(p.remConverter(16)," ").concat(p.remConverter(12)," ").concat(p.remConverter(24)),border:"1px solid transparent",backdropFilter:"blur(20px)",borderRadius:"8px",maxWidth:"484px",width:"100%"}),oe=t.css(i(i({},g.B4_14_semibold),{display:"flex",alignItems:"center",justifyContent:"space-between"})),ne=t.css({display:"flex",alignItems:"center"}),ie=t.css({marginLeft:"".concat(p.remConverter(8))}),le=t.css({padding:0,outline:"none",border:"none",boxShadow:"none",backgroundColor:"transparent"}),ae=t.css(i(i({},g.B5_12_regular),{marginTop:"".concat(p.remConverter(4))})),ce=t.css({background:"rgba(249, 200, 92, 0.08)",borderColor:m.Zeb_Solid_Yellow}),se=t.css({color:m.Zeb_Solid_Yellow}),de=t.css({background:"rgba(234, 97, 97, 0.08)",borderColor:m.Zeb_Solid_Red}),_e=t.css({color:m.Zeb_Solid_Red}),me=t.css({background:"rgba(30, 202, 162, 0.08)",borderColor:m.Zeb_Solid_Green}),pe=t.css({color:m.Zeb_Solid_Green}),ge=Object.freeze({__proto__:null,toastContainer:re,toastHeading:oe,toastDetails:ne,toastTitle:ie,closeCta:le,toastDescription:ae,info:ce,infoToastHeading:se,error:de,errorToastHeading:_e,success:me,successToastHeading:pe}),be=function(e){return"info"===e?m.Zeb_Solid_Yellow:"error"===e?m.Zeb_Solid_Red:"success"===e?m.Zeb_Solid_Green:void 0};exports.Button=w,exports.Checkbox=function(t){var r=t.label,o=t.value,n=t.style,l=t.checked,a=t.onChange,c=t.disabled;return e.jsxs("label",i({css:[H,L,n,c?j:""]},{children:[r&&e.jsx("div",i({css:z},{children:r})),e.jsx("input",{checked:l,onChange:function(e){return a({checked:e.target.checked,value:e.target.value})},type:"checkbox",css:k,value:o,disabled:c}),e.jsx("span",{css:[R,l&&F]})]}))},exports.CircularLoader=_,exports.Input=function(o){var n=o.value,l=o.label,a=o.placeholder,c=o.name,s=o.appendItem,d=o.prependItem,_=o.infoText,m=o.errorText,p=o.cta,f=o.style,u=o.type,h=void 0===u?"text":u,C=o.onChange,x=r.useState(!1),S=x[0],v=x[1];return e.jsxs("div",i({css:f},{children:[e.jsx("label",i({css:[T,S?E:null,m?b.textError:null]},{children:l})),e.jsxs("div",i({css:[D,b.flexAlignCenter,S?A:null,m?G:null]},{children:[d&&e.jsx("span",i({css:U},{children:d})),e.jsx("input",{type:h,name:c,placeholder:a,onFocus:function(){v(!0)},onBlur:function(){v(!1)},css:[I,O,d&&Y,s&&P,s&&d&&M],value:n,onChange:function(e){var t=e.target,r=t.value,o=t.name;C({value:r,name:o})}}),s&&e.jsx("span",i({css:J},{children:s}))]})),e.jsxs("div",i({css:[b.flexAlignCenter,b.flexJustifiedBetween]},{children:[(m||_)&&e.jsx("div",i({css:[t.css(i({},g.B4_14_regular)),_&&b.textFaded,m&&b.textError]},{children:_||m})),p&&e.jsx("div",i({css:q},{children:e.jsx(w,i({type:"link",size:"medium",onClick:p.onClick},{children:p.label}))}))]}))]}))},exports.Popper=function(t){var o,l=t.onClose,a=void 0===l?function(){}:l,c=t.label,s=t.buttonProps,d=void 0===s?{}:s,_=t.renderChildren,m=t.style,p=n.useState(!1),g=p[0],b=p[1],f=[o=r.useRef(null),function(){o.current&&o.current.focus()}],u=f[0],h=f[1],C=n.useCallback((function(){b(!1),a()}),[a]),x=n.useCallback((function(){g?C():b(!0)}),[g,C,b]);return n.useEffect((function(){h&&h()}),[u.current,h]),e.jsxs("div",i({css:[N,m]},{children:[g&&e.jsxs("div",i({css:V,tabIndex:0,onBlur:C,ref:u},{children:[e.jsxs("div",i({css:X},{children:[e.jsx("span",{children:c}),e.jsx("span",i({onClick:C,css:Q},{children:"X"}))]})),_({close:C,isOpened:g})]})),e.jsx(w,i({},d,{style:[K,d.style],onClick:x,type:d.type||"secondary"},{children:c}))]}))},exports.Radio=function(t){var r=t.value,o=t.onChange,n=t.label,l=t.style,a=t.name,c=t.selected;return e.jsxs("label",i({css:[$,l]},{children:[n,e.jsx("input",{type:"radio",name:a,css:ee,value:r,onChange:function(e){return o({selected:e.target.checked,value:e.target.value})},checked:c}),e.jsx("span",{css:te})]}))},exports.Toast=function(t){var r=t.title,o=t.description,n=t.type,l=t.onClose;return e.jsxs("div",i({css:[re,ge[n]]},{children:[e.jsxs("div",i({css:[oe,ge["".concat(n,"ToastHeading")]]},{children:[e.jsxs("div",i({css:ne},{children:[e.jsx("svg",i({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9999 13.9866C10.8159 14.7778 9.42383 15.2 7.9998 15.2C6.09024 15.2 4.2589 14.4415 2.90864 13.0912C1.55837 11.741 0.799805 9.90961 0.799805 8.00005C0.799805 6.57602 1.22208 5.18398 2.01322 3.99995C2.80437 2.81591 3.92885 1.89307 5.24448 1.34812C6.56011 0.803169 8.00779 0.660585 9.40445 0.938398C10.8011 1.21621 12.084 1.90194 13.091 2.90888C14.0979 3.91582 14.7836 5.19874 15.0615 6.5954C15.3393 7.99206 15.1967 9.43974 14.6517 10.7554C14.1068 12.071 13.1839 13.1955 11.9999 13.9866ZM11.4656 2.81311C10.4397 2.12763 9.23361 1.76177 7.9998 1.76177C6.34614 1.76449 4.76099 2.4226 3.59167 3.59192C2.42236 4.76124 1.76424 6.34639 1.76152 8.00005C1.76152 9.23386 2.12739 10.44 2.81286 11.4659C3.49833 12.4917 4.47262 13.2913 5.61251 13.7635C6.75241 14.2356 8.00672 14.3592 9.21683 14.1185C10.4269 13.8778 11.5385 13.2836 12.4109 12.4112C13.2834 11.5387 13.8775 10.4272 14.1182 9.21708C14.3589 8.00697 14.2354 6.75266 13.7632 5.61276C13.2911 4.47286 12.4915 3.49858 11.4656 2.81311ZM7.41321 7.59992C7.41321 7.27925 7.67321 7.01325 7.99321 7.01325C8.31987 7.01325 8.57987 7.27925 8.57987 7.59992V10.5466C8.57987 10.8666 8.31987 11.1266 7.99321 11.1266C7.67321 11.1266 7.41321 10.8666 7.41321 10.5466V7.59992ZM7.41987 5.48659C7.41987 5.15992 7.67987 4.89992 8.00654 4.89992C8.32654 4.89992 8.58654 5.15992 8.58654 5.48659C8.58654 5.80592 8.32654 6.06659 7.99321 6.06659C7.67987 6.06659 7.41987 5.80592 7.41987 5.48659Z",fill:be(n)})})),e.jsx("div",i({css:ie},{children:r}))]})),e.jsx("div",{children:l&&e.jsx("button",i({css:le,onClick:l},{children:e.jsx("svg",i({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99996 0.666626C3.94996 0.666626 0.666626 3.94996 0.666626 7.99996C0.666626 12.05 3.94996 15.3333 7.99996 15.3333C12.05 15.3333 15.3333 12.05 15.3333 7.99996C15.3333 3.94996 12.05 0.666626 7.99996 0.666626ZM10.4713 6.47129C10.5927 6.34556 10.6599 6.17716 10.6584 6.00236C10.6569 5.82756 10.5868 5.66035 10.4632 5.53675C10.3396 5.41314 10.1724 5.34303 9.99756 5.34151C9.82276 5.33999 9.65436 5.40719 9.52862 5.52863L7.99996 7.05729L6.47129 5.52863C6.40979 5.46495 6.33623 5.41416 6.25489 5.37922C6.17356 5.34429 6.08608 5.32589 5.99756 5.32513C5.90904 5.32436 5.82125 5.34122 5.73932 5.37474C5.65739 5.40827 5.58296 5.45777 5.52036 5.52036C5.45777 5.58296 5.40827 5.65739 5.37474 5.73932C5.34122 5.82125 5.32436 5.90904 5.32513 5.99756C5.32589 6.08608 5.34428 6.17356 5.37922 6.2549C5.41416 6.33623 5.46495 6.40979 5.52863 6.47129L7.05729 7.99996L5.52863 9.52863C5.46495 9.59012 5.41416 9.66369 5.37922 9.74502C5.34428 9.82636 5.32589 9.91384 5.32513 10.0024C5.32436 10.0909 5.34122 10.1787 5.37474 10.2606C5.40827 10.3425 5.45777 10.417 5.52036 10.4796C5.58296 10.5422 5.65739 10.5917 5.73932 10.6252C5.82125 10.6587 5.90904 10.6756 5.99756 10.6748C6.08608 10.674 6.17356 10.6556 6.25489 10.6207C6.33623 10.5858 6.40979 10.535 6.47129 10.4713L7.99996 8.94263L9.52862 10.4713C9.65436 10.5927 9.82276 10.6599 9.99756 10.6584C10.1724 10.6569 10.3396 10.5868 10.4632 10.4632C10.5868 10.3396 10.6569 10.1724 10.6584 9.99756C10.6599 9.82276 10.5927 9.65436 10.4713 9.52863L8.94262 7.99996L10.4713 6.47129Z",fill:be(n)})}))}))})]})),e.jsx("div",i({css:ae},{children:o}))]}))},exports.colors=m,exports.mixins=b,exports.typography=g,exports.utils=p;
|
|
4
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zebpay-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build-storybook": "build-storybook",
|
|
13
13
|
"format": "prettier --write .",
|
|
14
14
|
"lint": "eslint . --fix",
|
|
15
|
-
"build:icons": "mkdir dist/icons && fantasticon
|
|
15
|
+
"build:icons": "mkdir dist/icons && fantasticon svgs -o dist/icons",
|
|
16
16
|
"lint-staged": "lint-staged",
|
|
17
17
|
"prepare": "husky install",
|
|
18
18
|
"build": "rimraf dist && rollup -c",
|