groundfloor-react-ui 1.2.72 → 1.2.73
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/index.es.js +97 -95
- package/dist/index.js +22 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("prop-types"),t=require("react"),l=require("styled-components"),a=require("react-svg"),o=require("react-popper-tooltip"),r=require("react-phone-input-2"),i=require("dayjs");require("dayjs/locale/es");var n=require("react-datepicker"),c=require("react-select"),s=require("react-select/async"),d=require("react-signature-pad-wrapper"),u=require("react-data-table-component"),p=require("react-modal"),f=require("react-dom");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=m(e),g=m(t),h=m(l),y=m(r),x=m(i),v=m(n),C=m(c),A=m(s),w=m(d),S=m(u),E=m(p);function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},k.apply(this,arguments)}const V={"primary-1":"#2E56F4","primary-2":"#081348"},z={error:"#DD0000",success:"#00B904 "},M={"neutral-1":"#39424D","neutral-2":"#929EAC","neutral-3":"#BBC4CF","neutral-4":"#E2E6F5","neutral-5":"#F0F3F8"},B={"insight-purple":"#F8F2FF","insight-yellow":"#FFFAF2","error-bg":"#FCF2F2","selection-bg":"#F2F4FE"},I={"graph-1":"#2E56F4","graph-2":"#00D7F7","graph-3":"#8B2DFF","graph-4":"#FB9A00","graph-5":"#00B904"},L={"text-color":V["primary-2"],"bg-color":"#FFFFFF",black:"#000000",border:"#D4D7E3"},R={primary:{...V},ui:{...z},neutral:{...M},shade:{...B},graph:{...I},variant:{...V,...z,...M,...B,...I,...L},textColor:V["primary-2"],bgColor:"#FFFFFF",black:"#000000",border:"#D4D7E3"},W={common:{color:"blue","background-color":`${R.bgColor}`},label:{"padding-left":"6px","font-style":"normal","font-weight":"normal","font-size":"14px",display:"flex",width:"inherit","align-items":"flex-start",color:`${R.variant["neutral-2"]}`,"margin-bottom":"0","padding-bottom":"0"},"progressBar-label":{display:"block","margin-bottom":"8px","padding-bottom":"0","font-style":"normal","font-weight":"normal","font-size":"14px",color:`${R.neutral["neutral-2"]}`},spinner:{"background-color":`${R.variant["neutral-1"]}`},avatarContainer:{background:"transparent",display:"flex","align-items":"center",width:"auto",position:"relative"},avatarCircle:{"border-radius":"50%",display:"flex","align-items":"center","justify-content":"center","box-sizing":"border-box"},avatarCircleSM:{"font-weight":"600","font-size":"12px","min-width":"30px","min-height":"30px"},avatarCircleMD:{"font-weight":"400","font-size":"16px","min-width":"32px","min-height":"32px"},avatarCircleLG:{"font-weight":"400","font-size":"18px","min-width":"38px","min-height":"38px"},avatarName:{},avatarNameSM:{"margin-left":"8px","font-size":"14px"},avatarNameMD:{"margin-left":"16px","font-size":"16px"},avatarNameLG:{"margin-left":"16px","font-size":"16px"},"textbox-wrapper":{"border-radius":"4px",padding:"5.5px 7px",display:"flex","align-items":"center","line-height":".5rem",position:"relative"},"input-wrapper":{border:"0",outline:"0",margin:"0 5px",padding:"0px","font-size":"14px","flex-grow":"1","flex-shrink":"0","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},"textarea-wrapper":{border:"0",outline:"0",color:`${R.variant["primary-2"]}`,margin:"0 5px",padding:"5px","font-size":"14px","flex-grow":"1","flex-shrink":"0","line-height":"12px"},"label-text":{"font-family":"Averta","font-style":"normal","font-weight":"normal","font-size":"14px",color:`${R.variant["neutral-2"]}`,display:"flex","align-items":"center","justify-content":"center",width:"max-content","background-color":"transparent","margin-bottom":"0px","padding-bottom":"0px"},image:{"border-radius":"0%",width:"100%",height:"100%"},imageAvatar:{"border-radius":"50%","box-sizing":"border-box",position:"absolute"},imageAvatarSM:{"border-radius":"50%","box-sizing":"border-box",position:"absolute",width:"30px",height:"30px"},imageAvatarMD:{"border-radius":"50%","box-sizing":"border-box",position:"absolute",width:"32px",height:"32px"},imageAvatarLG:{"border-radius":"50%","box-sizing":"border-box",position:"absolute",width:"38px",height:"38px"},table:{table:{style:{borderRadius:"4px",paddingRight:"0px",backgroundColor:"transparent"}},checkbox:{style:{maxHeight:"28px",maxWidth:"28px"}},headRow:{style:{background:`${R.variant["neutral-5"]}`,borderLeft:`1px solid ${R.variant["neutral-5"]}`,borderRight:`1px headRowsolid ${R.variant["neutral-5"]}`,borderTop:`1px solid ${R.variant["neutral-5"]}`,borderTopLeftRadius:"4px",borderTopRightRadius:"4px",paddingLeft:"56px",borderBottom:"none",minHeight:"44px",maxHeight:"44px"}},headCells:{style:{fontSize:"14px",fontWeight:"600","&:first-of-type":{paddingLeft:"0px !important"}}},rows:{style:{background:`${R.variant.bgColor}`,"&:not(:last-of-type)":{borderBottomColor:"none"},"&:last-of-type":{borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"},borderLeft:`1px solid ${R.variant["neutral-5"]}`,borderRight:`1px solid ${R.variant["neutral-5"]}`,borderBottom:`1px solid ${R.variant["neutral-5"]}`},highlightOnHoverStyle:{backgroundColor:`${R.variant["neutral-5"]}`}}},header:{display:"flex","justify-content":"space-between","align-items":"center",position:"fixed","z-index":"1000",top:"0",right:"0",left:"0","min-height":"56px","margin-left":"48px","font-size":"16px","background-color":`${R.bgColor}`,"border-bottom":`0.5px solid ${R.variant["neutral-3"]}`},content:{"background-color":"#eef1f7",width:"100%","min-height":"100%","padding-top":"53px","box-sizing":"border-box",display:"flex","flex-direction":"column","margin-left":"70px"},"radio-outer-circle":{width:"20px",height:"20px","min-width":"20px","min-height":"20px","border-radius":"50%",display:"flex","justify-content":"center","align-items":"center"},"radio-inner-circle":{display:"flex","align-self":"center",margin:"0","border-radius":"50%"},"radio-label":{display:"block","margin-bottom":"8px","padding-bottom":0,color:`${R.variant["neutral-2"]}`},"option-text":{color:"#A9B1B8","font-size":"16px"},sidebarContainer:{"min-height":"100%",overflow:"hidden","background-color":"#2e56f4",position:"fixed",color:"white",width:"48px",transition:"width ease 400ms"},"checkBox-outer":{border:`2px solid ${R.border}`,minWidth:"20px",width:"20px",height:"20px","border-radius":"3px",cursor:"pointer","background-color":`${R.bgColor}`},"checkBox-inner":{"background-repeat":"no-repeat","background-position":"center",minWidth:"20px",width:"20px",height:"20px",color:`${R.bgColor}`,cursor:"pointer","text-align":"center","border-radius":"3px"},"check-label":{display:"block","margin-bottom":"8px","padding-bottom":"0px",color:`${R.variant["neutral-2"]}`},"checkbox-option-text":{"font-size":"16px","margin-left":"10px","background-color":`${R.bgColor}`},"toggle-switch-wrapper":{display:"inline-flex","align-items":"center",width:"fit-content"},"toggle-switch-checkbox-label":{position:"absolute",width:"51.52px",height:"20.11px","border-radius":"11.04px",cursor:"pointer"},"dropzone-parent":{height:"86px","padding-left":"8px","padding-right":"8px",display:"flex","justify-content":"center","align-items":"center","font-size":"16px","border-radius":"5.5px",color:` ${R.textColor}`},"dropzone-file-div":{width:"inherit",height:"38px",display:"flex","justify-content":"center","align-items":"center","font-size":"14px",color:`${R.textColor}`,"background-color":`${R.bgColor}`,"box-shadow":"0px 5px 15px rgba(33, 55, 71, 0.096946)","border-radius":"5.5px","margin-top":"5px"},"dropzone-text-div":{display:"flex","justify-content":"center","margin-left":"14px",color:`${R.textColor}`,"background-color":"transparent"},"dropzone-file-name":{"margin-left":"5px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",padding:"2px","font-size":"14px",color:"#494949"},"signature-parent-div":{"border-radius":"5.5px","align-content":"flex-start","justify-content":"center",width:"inherit","max-width":"532px",height:"86px",display:"block","flex-flow":"column wrap","font-size":"17px",color:`${R.textColor}`,"background-color":`${R.bgColor}`},"signature-wrapper-div":{display:"flex",flex:"auto","justify-content":"center","align-items":"center","font-size":"17px",height:"inherit",color:`${R.textColor}`,"background-color":"transparent"},"signature-input-text":{border:"0","text-align":"center",display:"block",height:"48px",width:"calc(100% - 54px)!important","background-color":`${R.bgColor}`,"font-family":"Beauty","background-clip":"padding-box",color:"#444444","font-style":"normal","font-weight":"normal","font-size":"47px","padding-left":"10px"},"modal-background":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.6)","z-index":"2000"},"modal-wrapper":{position:"fixed",display:"flex","align-items":"flex-end","justify-content":"center","flex-direction":"column",background:"white",width:"fit-content",height:"fit-content",top:"50%",left:"50%",transform:"translate(-50%, -50%)","border-radius":"5px"},"modal-close-button":{cursor:"pointer",width:"fit-content",height:"fit-content",padding:"0","padding-right":"5px","padding-top":"5px",color:`${R.textColor}`},footer:{display:"flex","margin-top":"auto",width:"100%"},drawer:{"min-height":"100%",overflow:"hidden",position:"fixed",width:"360px",transition:"transform ease 400ms",display:"flex","flex-direction":"column","background-color":"white","box-sizing":"border-box","box-shadow":"-20px 5px 37px rgba(56, 66, 100, 0.0880136)",top:"56px",right:"0px","z-index":"1001"},"drawer-close":{transform:"translateX(360px)"},"drawer-open":{transform:"translateX(0px)"},"tooltip-container":{"background-color":`${R.bgColor}`,"border-radius":"3.6px",border:`1px solid ${R.bgColor}`,"box-shadow":"0px 5px 33px rgba(56, 66, 100, 0.482627)",color:"#000",display:"flex","flex-direction":"column",padding:"0",transition:"opacity 0.3s","z-index":"9999"},"tooltip-arrow":{height:"19px",position:"absolute",width:"29px","pointer-events":"none"},"tooltip-arrow-before":{"border-style":"solid",content:"",display:"block",height:"0",margin:"auto",width:"0"},"tooltip-arrow-after":{"border-style":"solid",content:"",display:"block",height:"0",margin:"auto",position:"absolute",width:"0"},"tp-cont-bottom-arrow-before":{"border-color":`transparent transparent ${R.bgColor} transparent`,"border-width":"0 15px 19px 15px",position:"absolute",top:"-1px"},"tp-cont-bottom-arrow-after":{"border-color":`transparent transparent ${R.bgColor} transparent`,"border-width":"0 15px 19px 15px"},"tp-cont-top-arrow-before":{"border-color":`${R.bgColor} transparent transparent transparent`,"border-width":"19px 15px 0 15px",position:"absolute",top:"1px"},"tp-cont-top-arrow-after":{"border-color":`${R.bgColor} transparent transparent transparent`,"border-width":"19px 15px 0 15px"},"tp-cont-right-arrow-before":{"border-color":`transparent ${R.bgColor} transparent transparent`,"border-width":"15px 19px 15px 0"},"tp-cont-right-arrow-after":{"border-color":`transparent ${R.bgColor} transparent transparent`,"border-width":"15px 19px 15px 0",left:"6px",top:"0"},"tp-cont-left-arrow-before":{"border-color":`transparent transparent transparent ${R.bgColor}`,"border-width":"15px 0 15px 19px"},"tp-cont-left-arrow-after":{"border-color":`transparent transparent transparent ${R.bgColor}`,"border-width":"15px 0 15px 19px",left:"3px",top:"0"},"tp-cont-bottom-arrow":{left:"0","margin-top":"-19px",top:"0"},"tp-cont-top-arrow":{bottom:"0",left:"0","margin-bottom":"-19px"},"tp-cont-right-arrow":{left:"0","margin-left":"-24px"},"tp-cont-left-arrow":{"margin-right":"-24px",right:"0"},overlay:{"background-color":`${R.bgColor}`,"border-radius":"3.6px",border:`1px solid ${R.bgColor}`,"box-shadow":"0px 5px 33px rgba(56, 66, 100, 0.482627)",color:"#000",display:"flex","flex-direction":"column",padding:"0",transition:"opacity 0.3s","z-index":"9999"},"simple-overlay":{"background-color":`${R.variant["neutral-1"]}`,"border-radius":"6px",border:`1px solid ${R.variant["neutral-1"]}`,color:`${R.bgColor}`,display:"flex","flex-direction":"column",padding:"0",transition:"opacity 0.3s","z-index":"9999"},"sidebar-container":{"background-color":"#2e56f4",position:"fixed",color:"white",transition:"all ease 100ms",display:"flex","flex-direction":"column","z-index":"999999"},"sidebar-container-open":{width:"240px"},"sidebar-container-close":{width:"48px"},"sidebar-container-mobile-open":{width:"240px","z-index":"9999999"},"sidebar-container-mobile-close":{width:"0px","z-index":"1001"},"sidebar-pusher":{"min-height":"100%",overflow:"hidden","background-color":"transparent",position:"fixed",transition:"width ease 400ms"},"sidebar-pusher-open":{width:"240px"},"sidebar-pusher-close":{width:"70px"},"sidebar-pusher-mobile":{width:"0px"},"modalComp-custom-style":{content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)",zIndex:"999"}},"modalComp-modal-close":{position:"absolute",top:"15px",right:"10px",outline:"none",border:"none",background:"transparent",cursor:"pointer"},"modalComp-modal-body":{"margin-top":"20px","margin-bottom":"15px"},"modalComp-modal-footer":{"margin-top":"30px","margin-bottom":"15px",padding:"1rem 3rem 0rem 3rem","&:before":{content:"",position:"fixed",display:"inline-block",left:0,right:0,"margin-top":"-0.9rem","z-index":-1},"selectComp-label-wrapper":{paddingBottom:"10px",display:"flex",width:"25vw"}},"popOver-Content":{padding:"16px",color:"white",width:"226px",borderRadius:"3.6px"},"popOver-header":{marginBottom:"8px",fontWeight:"600"},"popOver-body":{marginBottom:"11.5px"},ColorWrapper:{borderRadius:"4.87px",padding:"8px 21px",display:"flex"},"input-color":{borderRadius:"4px !important",width:"24px !important",height:"24px !important"},toastWrapper:{backgroundColor:"#ffffff",maxWidth:"416px",borderRadius:"6px 6px 0px 0px",paddingTop:"16px",zIndex:"2000"},messageWrapper:{paddingLeft:"16px",borderLeft:"1px solid #E5E7F0",marginLeft:"16px",marginRight:"16px",fontStyle:"normal",fontWeight:"400",fontSize:"14px",lineHeight:"20px"}},T=(e,t)=>{if(e){let l={};if(e[t]){for(const a in e[t])l[a]=e[t][a],delete e.common[a];for(const t in e.common)l[t]=e.common[t]}return l}};function P(e,t){var l=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return t?"rgba("+l+", "+a+", "+o+", "+t+")":"rgb("+l+", "+a+", "+o+")"}P("#FF0000",.5);const H=h.default.div`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("prop-types"),t=require("react"),l=require("styled-components"),a=require("react-svg"),o=require("react-popper-tooltip"),r=require("react-phone-input-2"),i=require("dayjs");require("dayjs/locale/es");var n=require("react-datepicker"),c=require("react-select"),s=require("react-select/async"),d=require("react-signature-pad-wrapper"),u=require("react-data-table-component"),p=require("react-modal"),f=require("react-dom");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=m(e),g=m(t),h=m(l),y=m(r),x=m(i),v=m(n),C=m(c),A=m(s),w=m(d),S=m(u),E=m(p);function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},k.apply(this,arguments)}const V={"primary-1":"#2E56F4","primary-2":"#081348"},z={error:"#DD0000",success:"#00B904 "},M={"neutral-1":"#39424D","neutral-2":"#929EAC","neutral-3":"#BBC4CF","neutral-4":"#E2E6F5","neutral-5":"#F0F3F8"},B={"insight-purple":"#F8F2FF","insight-yellow":"#FFFAF2","error-bg":"#FCF2F2","selection-bg":"#F2F4FE"},I={"graph-1":"#2E56F4","graph-2":"#00D7F7","graph-3":"#8B2DFF","graph-4":"#FB9A00","graph-5":"#00B904"},L={"text-color":V["primary-2"],"bg-color":"#FFFFFF",black:"#000000",border:"#D4D7E3"},R={primary:{...V},ui:{...z},neutral:{...M},shade:{...B},graph:{...I},variant:{...V,...z,...M,...B,...I,...L},textColor:V["primary-2"],bgColor:"#FFFFFF",black:"#000000",border:"#D4D7E3"},W={common:{color:"blue","background-color":`${R.bgColor}`},label:{"padding-left":"6px","font-style":"normal","font-weight":"normal","font-size":"14px",display:"flex",width:"inherit","align-items":"flex-start",color:`${R.variant["neutral-2"]}`,"margin-bottom":"0","padding-bottom":"0"},"progressBar-label":{display:"block","margin-bottom":"8px","padding-bottom":"0","font-style":"normal","font-weight":"normal","font-size":"14px",color:`${R.neutral["neutral-2"]}`},spinner:{"background-color":`${R.variant["neutral-1"]}`},avatarContainer:{background:"transparent",display:"flex","align-items":"center",width:"auto",position:"relative"},avatarCircle:{"border-radius":"50%",display:"flex","align-items":"center","justify-content":"center","box-sizing":"border-box"},avatarCircleSM:{"font-weight":"600","font-size":"12px","min-width":"30px","min-height":"30px"},avatarCircleMD:{"font-weight":"400","font-size":"16px","min-width":"32px","min-height":"32px"},avatarCircleLG:{"font-weight":"400","font-size":"18px","min-width":"38px","min-height":"38px"},avatarName:{},avatarNameSM:{"margin-left":"8px","font-size":"14px"},avatarNameMD:{"margin-left":"16px","font-size":"16px"},avatarNameLG:{"margin-left":"16px","font-size":"16px"},"textbox-wrapper":{"border-radius":"4px",padding:"5.5px 7px",display:"flex","align-items":"center","line-height":".5rem",position:"relative"},"input-wrapper":{border:"0",outline:"0",margin:"0 5px",padding:"0px","font-size":"14px","flex-grow":"1","flex-shrink":"0","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},"textarea-wrapper":{border:"0",outline:"0",color:`${R.variant["primary-2"]}`,margin:"0 5px",padding:"5px","font-size":"14px","flex-grow":"1","flex-shrink":"0","line-height":"12px"},"label-text":{"font-family":"Averta","font-style":"normal","font-weight":"normal","font-size":"14px",color:`${R.variant["neutral-2"]}`,display:"flex","align-items":"center","justify-content":"center",width:"max-content","background-color":"transparent","margin-bottom":"0px","padding-bottom":"0px"},image:{"border-radius":"0%",width:"100%",height:"100%"},imageAvatar:{"border-radius":"50%","box-sizing":"border-box",position:"absolute"},imageAvatarSM:{"border-radius":"50%","box-sizing":"border-box",position:"absolute",width:"30px",height:"30px"},imageAvatarMD:{"border-radius":"50%","box-sizing":"border-box",position:"absolute",width:"32px",height:"32px"},imageAvatarLG:{"border-radius":"50%","box-sizing":"border-box",position:"absolute",width:"38px",height:"38px"},table:{table:{style:{borderRadius:"4px",paddingRight:"0px",backgroundColor:"transparent"}},checkbox:{style:{maxHeight:"28px",maxWidth:"28px"}},headRow:{style:{background:`${R.variant["neutral-5"]}`,borderLeft:`1px solid ${R.variant["neutral-5"]}`,borderRight:`1px headRowsolid ${R.variant["neutral-5"]}`,borderTop:`1px solid ${R.variant["neutral-5"]}`,borderTopLeftRadius:"4px",borderTopRightRadius:"4px",paddingLeft:"56px",borderBottom:"none",minHeight:"44px",maxHeight:"44px"}},headCells:{style:{fontSize:"14px",fontWeight:"600","&:first-of-type":{paddingLeft:"0px !important"}}},rows:{style:{background:`${R.variant.bgColor}`,"&:not(:last-of-type)":{borderBottomColor:"none"},"&:last-of-type":{borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"},borderLeft:`1px solid ${R.variant["neutral-5"]}`,borderRight:`1px solid ${R.variant["neutral-5"]}`,borderBottom:`1px solid ${R.variant["neutral-5"]}`},highlightOnHoverStyle:{backgroundColor:`${R.variant["neutral-5"]}`}}},header:{display:"flex","justify-content":"space-between","align-items":"center",position:"fixed","z-index":"1000",top:"0",right:"0",left:"0","min-height":"56px","margin-left":"48px","font-size":"16px","background-color":`${R.bgColor}`,"border-bottom":`0.5px solid ${R.variant["neutral-3"]}`},content:{"background-color":"#eef1f7",width:"100%","min-height":"100%","padding-top":"53px","box-sizing":"border-box",display:"flex","flex-direction":"column","margin-left":"70px"},"radio-outer-circle":{width:"20px",height:"20px","min-width":"20px","min-height":"20px","border-radius":"50%",display:"flex","justify-content":"center","align-items":"center"},"radio-inner-circle":{display:"flex","align-self":"center",margin:"0","border-radius":"50%"},"radio-label":{display:"block","margin-bottom":"8px","padding-bottom":0,color:`${R.variant["neutral-2"]}`},"option-text":{color:"#A9B1B8","font-size":"16px"},sidebarContainer:{"min-height":"100%",overflow:"hidden","background-color":"#2e56f4",position:"fixed",color:"white",width:"48px",transition:"width ease 400ms"},"checkBox-outer":{border:`2px solid ${R.border}`,minWidth:"20px",width:"20px",height:"20px","border-radius":"3px",cursor:"pointer","background-color":`${R.bgColor}`},"checkBox-inner":{"background-repeat":"no-repeat","background-position":"center",minWidth:"20px",width:"20px",height:"20px",color:`${R.bgColor}`,cursor:"pointer","text-align":"center","border-radius":"3px"},"check-label":{display:"block","margin-bottom":"8px","padding-bottom":"0px",color:`${R.variant["neutral-2"]}`},"toggle-switch-wrapper":{display:"inline-flex","align-items":"center",width:"fit-content"},"dropzone-parent":{height:"86px","padding-left":"8px","padding-right":"8px",display:"flex","justify-content":"center","align-items":"center","font-size":"16px","border-radius":"5.5px",color:` ${R.textColor}`},"dropzone-file-div":{width:"inherit",height:"38px",display:"flex","justify-content":"center","align-items":"center","font-size":"14px",color:`${R.textColor}`,"background-color":`${R.bgColor}`,"box-shadow":"0px 5px 15px rgba(33, 55, 71, 0.096946)","border-radius":"5.5px","margin-top":"5px"},"dropzone-text-div":{display:"flex","justify-content":"center","margin-left":"14px",color:`${R.textColor}`,"background-color":"transparent"},"dropzone-file-name":{"margin-left":"5px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",padding:"2px","font-size":"14px",color:"#494949"},"signature-parent-div":{"border-radius":"5.5px","align-content":"flex-start","justify-content":"center",width:"inherit","max-width":"532px",height:"86px",display:"block","flex-flow":"column wrap","font-size":"17px",color:`${R.textColor}`,"background-color":`${R.bgColor}`},"signature-wrapper-div":{display:"flex",flex:"auto","justify-content":"center","align-items":"center","font-size":"17px",height:"inherit",color:`${R.textColor}`,"background-color":"transparent"},"signature-input-text":{border:"0","text-align":"center",display:"block",height:"48px",width:"calc(100% - 54px)!important","background-color":`${R.bgColor}`,"font-family":"Beauty","background-clip":"padding-box",color:"#444444","font-style":"normal","font-weight":"normal","font-size":"47px","padding-left":"10px"},"modal-background":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.6)","z-index":"2000"},"modal-wrapper":{position:"fixed",display:"flex","align-items":"flex-end","justify-content":"center","flex-direction":"column",background:"white",width:"fit-content",height:"fit-content",top:"50%",left:"50%",transform:"translate(-50%, -50%)","border-radius":"5px"},"modal-close-button":{cursor:"pointer",width:"fit-content",height:"fit-content",padding:"0","padding-right":"5px","padding-top":"5px",color:`${R.textColor}`},footer:{display:"flex","margin-top":"auto",width:"100%"},drawer:{"min-height":"100%",overflow:"hidden",position:"fixed",width:"360px",transition:"transform ease 400ms",display:"flex","flex-direction":"column","background-color":"white","box-sizing":"border-box","box-shadow":"-20px 5px 37px rgba(56, 66, 100, 0.0880136)",top:"56px",right:"0px","z-index":"1001"},"drawer-close":{transform:"translateX(360px)"},"drawer-open":{transform:"translateX(0px)"},"tooltip-container":{"background-color":`${R.bgColor}`,"border-radius":"3.6px",border:`1px solid ${R.bgColor}`,"box-shadow":"0px 5px 33px rgba(56, 66, 100, 0.482627)",color:"#000",display:"flex","flex-direction":"column",padding:"0",transition:"opacity 0.3s","z-index":"9999"},"tooltip-arrow":{height:"19px",position:"absolute",width:"29px","pointer-events":"none"},"tooltip-arrow-before":{"border-style":"solid",content:"",display:"block",height:"0",margin:"auto",width:"0"},"tooltip-arrow-after":{"border-style":"solid",content:"",display:"block",height:"0",margin:"auto",position:"absolute",width:"0"},"tp-cont-bottom-arrow-before":{"border-color":`transparent transparent ${R.bgColor} transparent`,"border-width":"0 15px 19px 15px",position:"absolute",top:"-1px"},"tp-cont-bottom-arrow-after":{"border-color":`transparent transparent ${R.bgColor} transparent`,"border-width":"0 15px 19px 15px"},"tp-cont-top-arrow-before":{"border-color":`${R.bgColor} transparent transparent transparent`,"border-width":"19px 15px 0 15px",position:"absolute",top:"1px"},"tp-cont-top-arrow-after":{"border-color":`${R.bgColor} transparent transparent transparent`,"border-width":"19px 15px 0 15px"},"tp-cont-right-arrow-before":{"border-color":`transparent ${R.bgColor} transparent transparent`,"border-width":"15px 19px 15px 0"},"tp-cont-right-arrow-after":{"border-color":`transparent ${R.bgColor} transparent transparent`,"border-width":"15px 19px 15px 0",left:"6px",top:"0"},"tp-cont-left-arrow-before":{"border-color":`transparent transparent transparent ${R.bgColor}`,"border-width":"15px 0 15px 19px"},"tp-cont-left-arrow-after":{"border-color":`transparent transparent transparent ${R.bgColor}`,"border-width":"15px 0 15px 19px",left:"3px",top:"0"},"tp-cont-bottom-arrow":{left:"0","margin-top":"-19px",top:"0"},"tp-cont-top-arrow":{bottom:"0",left:"0","margin-bottom":"-19px"},"tp-cont-right-arrow":{left:"0","margin-left":"-24px"},"tp-cont-left-arrow":{"margin-right":"-24px",right:"0"},overlay:{"background-color":`${R.bgColor}`,"border-radius":"3.6px",border:`1px solid ${R.bgColor}`,"box-shadow":"0px 5px 33px rgba(56, 66, 100, 0.482627)",color:"#000",display:"flex","flex-direction":"column",padding:"0",transition:"opacity 0.3s","z-index":"9999"},"simple-overlay":{"background-color":`${R.variant["neutral-1"]}`,"border-radius":"6px",border:`1px solid ${R.variant["neutral-1"]}`,color:`${R.bgColor}`,display:"flex","flex-direction":"column",padding:"0",transition:"opacity 0.3s","z-index":"9999"},"sidebar-container":{"background-color":"#2e56f4",position:"fixed",color:"white",transition:"all ease 100ms",display:"flex","flex-direction":"column","z-index":"999999"},"sidebar-container-open":{width:"240px"},"sidebar-container-close":{width:"48px"},"sidebar-container-mobile-open":{width:"240px","z-index":"9999999"},"sidebar-container-mobile-close":{width:"0px","z-index":"1001"},"sidebar-pusher":{"min-height":"100%",overflow:"hidden","background-color":"transparent",position:"fixed",transition:"width ease 400ms"},"sidebar-pusher-open":{width:"240px"},"sidebar-pusher-close":{width:"70px"},"sidebar-pusher-mobile":{width:"0px"},"modalComp-custom-style":{content:{top:"50%",left:"50%",right:"auto",bottom:"auto",marginRight:"-50%",transform:"translate(-50%, -50%)",zIndex:"999"}},"modalComp-modal-close":{position:"absolute",top:"15px",right:"10px",outline:"none",border:"none",background:"transparent",cursor:"pointer"},"modalComp-modal-body":{"margin-top":"20px","margin-bottom":"15px"},"modalComp-modal-footer":{"margin-top":"30px","margin-bottom":"15px",padding:"1rem 3rem 0rem 3rem","&:before":{content:"",position:"fixed",display:"inline-block",left:0,right:0,"margin-top":"-0.9rem","z-index":-1},"selectComp-label-wrapper":{paddingBottom:"10px",display:"flex",width:"25vw"}},"popOver-Content":{padding:"16px",color:"white",width:"226px",borderRadius:"3.6px"},"popOver-header":{marginBottom:"8px",fontWeight:"600"},"popOver-body":{marginBottom:"11.5px"},ColorWrapper:{borderRadius:"4.87px",padding:"8px 21px",display:"flex"},"input-color":{borderRadius:"4px !important",width:"24px !important",height:"24px !important"},toastWrapper:{backgroundColor:"#ffffff",maxWidth:"416px",borderRadius:"6px 6px 0px 0px",paddingTop:"16px",zIndex:"2000"},messageWrapper:{paddingLeft:"16px",borderLeft:"1px solid #E5E7F0",marginLeft:"16px",marginRight:"16px",fontStyle:"normal",fontWeight:"400",fontSize:"14px",lineHeight:"20px"}},T=(e,t)=>{if(e){let l={};if(e[t]){for(const a in e[t])l[a]=e[t][a],delete e.common[a];for(const t in e.common)l[t]=e.common[t]}return l}};function P(e,t){var l=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);return t?"rgba("+l+", "+a+", "+o+", "+t+")":"rgb("+l+", "+a+", "+o+")"}P("#FF0000",.5);const H=h.default.div`
|
|
2
2
|
color: ${({activeTheme:e})=>e.textColor};
|
|
3
3
|
padding-top: 25px;
|
|
4
4
|
padding-bottom: 25px;
|
|
@@ -838,7 +838,7 @@ ${({customTriggerStyle:e})=>e}
|
|
|
838
838
|
// custom styles
|
|
839
839
|
${({checkBoxInnerStyle:e})=>e}
|
|
840
840
|
`;it.defaultProps={theme:R};const nt=h.default.span`
|
|
841
|
-
word-break: break-
|
|
841
|
+
word-break: break-word;
|
|
842
842
|
|
|
843
843
|
//Set the styles from the default styles object
|
|
844
844
|
${({inBuiltCss:e,type:t})=>T(e,t)}
|
|
@@ -1321,6 +1321,9 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1321
1321
|
font-size: 10px;
|
|
1322
1322
|
}
|
|
1323
1323
|
`,Pt=({defaultValue:e,onChange:a,inputType:o,onClick:r,placeHolder:i,value:n,disabled:c,startYear:s,endYearRange:d,iconProps:u,customHeaderStyle:p,timeBtnStyle:f,wrapperStyle:m,customIconContainerStyle:b,label:h,labelInline:y,labelStyle:C,required:A,errMsg:w,errMsgColor:S,isValid:E,...V})=>{const[z,M]=t.useState(e);let B=z?new Date(z):null;for(var I=[],L=d||10,W=s||(new Date).getFullYear();W<=(new Date).getFullYear()+L;W++)I.push(W);let T={};switch(o){case"date":default:T.dateFormat="dd MMM, yyyy";break;case"month":T.dateFormat="MMMM yyyy",T.showMonthYearPicker=!0;break;case"year":T.dateFormat="yyyy",T.showYearPicker=!0;break;case"datetime-local":T.dateFormat="dd MMM yyyy, hh:mm a",T.showTimeSelect=!0,T.timeFormat="hh:mm a",T.timeIntervals=15,T.timeCaption="Time";break;case"time":T.showTimeSelect=!0,T.showTimeSelectOnly=!0,T.dateFormat="hh:mm a"}const P=l.useTheme()||R,H={icon:"calender",color:"black",size:"16",...u};return g.default.createElement(Tt,k({labelInline:y,errMsgColor:S,theme:P},V),g.default.createElement("div",{style:{display:"flex"}},g.default.createElement(ot,k({customStyles:C,type:"label-text",labelInline:y,errMsg:w,text:h,style:{display:"flex",marginBottom:""+(y?"":"7px"),paddingBottom:"0px"}},V)),A&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${P.variant.error}`}},"*")),g.default.createElement(Mt,k({theme:P},V,{wrapperStyle:m,isValid:E,disabled:c}),g.default.createElement(v.default,k({selected:B,disabled:c,customInput:g.default.createElement(Bt,{value:n,onClick:r,placeholder:i,theme:P},g.default.createElement(It,k({theme:P,value:n,onClick:r,timeBtnStyle:f,disabled:c},V),g.default.createElement("div",null,n||(i||"-- : -- --")),g.default.createElement(Rt,k({theme:P},V,{customIconContainerStyle:b,className:"input-icon"}),H.icon?g.default.createElement(N,H):null))),onChange:e=>{M(e);var t=null;t="datetime-local"==o?x.default(e).format("DD MMM YYYY, hh:mm A"):"date"==o?x.default(e).format("DD MMM, YYYY"):"year"==o?x.default(e).format("YYYY"):"month"==o?x.default(e).format("MMMM YYYY"):"time"==o?x.default(e).format("hh:mm A"):x.default(e).format("DD MMM, YYYY"),a(t)},showYearDropdown:!0,yearDropdownItemNumber:5,dropdownMode:"select",placeholderText:i},T,{renderCustomHeader:({date:e,changeYear:t,decreaseMonth:l,increaseMonth:a})=>{let r=x.default(e).format("MMMM");return g.default.createElement(Lt,k({theme:P},V,{inputType:o,customHeaderStyle:p}),"year"!==o?g.default.createElement("span",{style:{paddingLeft:"10px"},onClick:l},g.default.createElement(N,{icon:"chevron-left",color:"white",size:16})):null,g.default.createElement("b",null,"year"!==o?g.default.createElement("span",{style:{paddingRight:"5px"}},r):null," ",g.default.createElement("span",{className:"calender-year"},g.default.createElement("select",{value:e.getFullYear(),onChange:({target:{value:e}})=>t(e)},I.map((e=>g.default.createElement("option",{key:e,value:e},e)))))),"year"!==o?g.default.createElement("span",{style:{paddingRight:"10px"},onClick:a},g.default.createElement(N,{icon:"chevron-right",color:"white",size:16})):null)}}))),w.length>0&&g.default.createElement("div",{className:"err-text"},w))};Pt.propTypes={defaultValue:b.default.string,onChange:b.default.func,inputType:b.default.string,onClick:b.default.func,placeHolder:b.default.string,value:b.default.string,disabled:b.default.bool,startYear:b.default.number,endYearRange:b.default.number,iconProps:b.default.object,customHeaderStyle:b.default.object,timeBtnStyle:b.default.object,wrapperStyle:b.default.object,customIconContainerStyle:b.default.object,label:b.default.string,labelStyle:b.default.object,labelInline:b.default.bool,errMsg:b.default.string,errMsgColor:b.default.string,isValid:b.default.bool},Pt.defaultProps={disabled:!1,startYear:new Date,endYearRange:10,value:"",defaultValue:"",onChange:()=>{},label:"",required:!1,labelInline:!1,errMsg:"",isValid:!0};const Ht=h.default.div`
|
|
1324
|
+
|
|
1325
|
+
cursor: ${({isDisabled:e})=>e?"not-allowed":"initial"} !important;
|
|
1326
|
+
|
|
1324
1327
|
.master-dropdown,
|
|
1325
1328
|
.new-select {
|
|
1326
1329
|
.master-dropdown__menu,
|
|
@@ -1472,7 +1475,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1472
1475
|
margin-left: 6px;
|
|
1473
1476
|
margin-top: -15.5px;
|
|
1474
1477
|
cursor: pointer;
|
|
1475
|
-
`,qt=({getValue:e,children:t,...l})=>{const a=e().length;return g.default.createElement(c.components.ValueContainer,l,t,a>1&&g.default.createElement("span",{className:"text-more-alt"},"& ",a-1," more"))},Zt=({label:e,labelStyle:t,optionArr:a,selectedValue:o,setSelectedValue:r,placeHolder:i,isClearable:n,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:f,clearSelected:m,customWrapperStyles:b,customLabelStyles:h,isRequired:y,dropdownType:x,isDisabled:v,isLoading:C,id:A,iconName:w,iconStyles:S,iconColor:E,iconSize:V,showIndicator:z,leftIcon:M,leftIconColor:B,leftIconSize:I,backgroundColor:L,placeHolderColor:T,indicatorBackgroundColor:P,inputColor:H,menuListFooter:j,customSelectStyles:F,errorMessage:q,...Z})=>{const O=l.useTheme()||R,D=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=g.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??O.primary["primary-1"]}},g.default.createElement(N,{icon:"check-icon",color:"white"})),a=g.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return g.default.createElement(c.components.Option,e,g.default.createElement("div",{style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?l:a,g.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&g.default.createElement("span",{className:"text-main-alt-value"},l)},X={control:(e,t)=>({...e,border:s?L&&s?"1px solid "+L:"1px solid "+O.border:"1px solid "+O.ui.error,minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px",height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?O.variant["neutral-5"]:L||O.bgColor}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:T||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:P||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,display:"flex",justifyContent:"space-between",fontSize:u+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:u+"px",width:"100%",minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto",maxWidth:"89%",marginRight:0}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:u+"px",color:H||"hsl(0, 0%, 20%)"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?O.neutral["neutral-5"]:O.bgColor,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...F},J={DropdownIndicator:e=>{const t=g.default.createElement(c.components.DropdownIndicator,e,g.default.createElement(Ft,null,g.default.createElement(N,{icon:w,color:E,size:V,customstyles:S})));return!0===z?t:null},ValueContainer:qt,IndicatorSeparator:()=>null,ClearIndicator:e=>g.default.createElement(c.components.ClearIndicator,e,n?g.default.createElement(Ft,{onClick:()=>{m(),e.clearValue()}},g.default.createElement(N,{icon:"cross-icon",color:"black",size:8})):null),MenuList:e=>{const{MenuListHeader:t=null,MenuListFooter:l=null}=e.selectProps.components;return g.default.createElement(c.components.MenuList,e,e.children.length&&t,e.children,e.children.length&&l)},MenuListFooter:j};let U=null;switch(x){case"multiSelect":U=g.default.createElement(Ot,k({type:"multiSelect",MultiValue:G,Option:D,value:o,CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:v,stylesComp:X,setSelectedValue:r,isLoading:C,id:A,isClearable:n},Z));break;case"asyncSingleSelect":U=g.default.createElement(Dt,k({CommonRenderedComponent:J,loadOptions:p,onInputChange:f,styles:X,placeholder:i,onChange:r,isLoading:C,isDisabled:v,id:A,value:o,isClearable:n},Z));break;case"asyncMultiSelect":U=g.default.createElement(Dt,k({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:D,onChange:r,placeholder:i,styles:X,isDisabled:v,isLoading:C,loadOptions:p,onInputChange:f,id:A,isClearable:n},Z));break;default:U=g.default.createElement(Ot,k({type:"singleSelect",value:{value:o?o.value:"",label:o?o.label:""},CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:v,stylesComp:X,setSelectedValue:r,isLoading:C,id:A,isClearable:n},Z))}return g.default.createElement(Ht,{style:b,backgroundColor:L,isValid:s,fontSize:u,theme:O},e&&g.default.createElement(jt,{inBuiltCss:W,labelWrapperStyle:"selectComp-label-wrapper",style:h},g.default.createElement(ot,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),y&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${O.ui.error}`}},"*")),U,!s&&q)},Ot=({type:e,Option:t,value:l,CommonRenderedComponent:a,MultiValue:o,optionArr:r,placeHolder:i,isDisabled:n,stylesComp:c,setSelectedValue:s,isLoading:d,id:u,isClearable:p,...f})=>{let m={...a};return"multiSelect"===e&&(m.MultiValue=o,m.Option=t),g.default.createElement(C.default,k({className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",components:m,options:r,placeholder:i,isDisabled:n,value:l,styles:c,onChange:s,isLoading:d,id:u,isClearable:p,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1},f))},Dt=({CommonRenderedComponent:e,MultiValue:t,Option:l,type:a,id:o,styles:r,...i})=>{let n={...e};return"asyncMultiSelect"===a&&(n.MultiValue=t,n.Option=l),g.default.createElement(A.default,k({className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",components:n,isMulti:"asyncMultiSelect"===a,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==a,isSearchable:!0,styles:r,menuShouldScrollIntoView:!1},i))};Zt.propTypes={label:b.default.string,labelStyle:b.default.object,optionArr:b.default.array,selectedValue:b.default.object,setSelectedValue:b.default.func,placeHolder:b.default.string,fontSize:b.default.number,clearSelected:b.default.func,loadOptions:b.default.func,onInputChange:b.default.func,customWrapperStyles:b.default.object,customLabelStyles:b.default.object,isRequired:b.default.bool,dropdownType:b.default.string,isDisabled:b.default.bool,isLoading:b.default.bool,isValid:b.default.bool,height:b.default.number,isClearable:b.default.bool,id:b.default.string,iconName:b.default.string,iconColor:b.default.string,iconSize:b.default.number,leftIcon:b.default.string,leftIconColor:b.default.string,leftIconSize:b.default.number,showIndicator:b.default.bool,backgroundColor:b.default.string,placeHolderColor:b.default.string,inputColor:b.default.string,menuListFooter:b.default.any,customSelectStyles:b.default.object},Zt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:{},customLabelStyles:{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Gt=h.default.div`
|
|
1478
|
+
`,qt=({getValue:e,children:t,...l})=>{const a=e().length;return g.default.createElement(c.components.ValueContainer,l,t,a>1&&g.default.createElement("span",{className:"text-more-alt"},"& ",a-1," more"))},Zt=({label:e,labelStyle:t,optionArr:a,selectedValue:o,setSelectedValue:r,placeHolder:i,isClearable:n,isValid:s,height:d,fontSize:u,loadOptions:p,onInputChange:f,clearSelected:m,customWrapperStyles:b,customLabelStyles:h,isRequired:y,dropdownType:x,isDisabled:v,isLoading:C,id:A,iconName:w,iconStyles:S,iconColor:E,iconSize:V,showIndicator:z,leftIcon:M,leftIconColor:B,leftIconSize:I,backgroundColor:L,placeHolderColor:T,indicatorBackgroundColor:P,inputColor:H,menuListFooter:j,customSelectStyles:F,errorMessage:q,...Z})=>{const O=l.useTheme()||R,D=e=>{const t={width:"15px",height:"15px",borderRadius:"2px",padding:"4px",fontSize:"8px",lineHeight:"10px",minWidth:"15px",minHeight:"15px"},l=g.default.createElement("div",{style:{...t,backgroundColor:e?.data?.color??O.primary["primary-1"]}},g.default.createElement(N,{icon:"check-icon",color:"white"})),a=g.default.createElement("div",{style:{...t,backgroundColor:"#e0e7ff"}});return g.default.createElement(c.components.Option,e,g.default.createElement("div",{style:{display:"flex",justifyContent:"flex-start",alignItems:"center",width:"100%"}},e.isSelected?l:a,g.default.createElement("div",{className:"text-main-alt",style:{marginLeft:"10px"}},e.label)))},G=({index:e,...t})=>{const l=t?.data?.label||"Select";return!e&&g.default.createElement("span",{className:"text-main-alt-value"},l)},X={control:(e,t)=>({...e,border:s?L&&s?"1px solid "+L:"1px solid "+O.border:"1px solid "+O.ui.error,minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px",height:`${d}px`,minHeight:`${d}px`,boxShadow:(t.isSelected||t.isFocused)&&"none",backgroundColor:t.isDisabled?O.variant["neutral-5"]:L||O.bgColor}),placeholder:e=>({...e,fontSize:u+"px",marginLeft:"0px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:"auto",maxWidth:"89%",marginRight:"0px",color:T||"hsl(0, 0%, 50%)"}),dropdownIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"2px",backgroundColor:P||"transparent",borderBottomLeftRadius:"0",borderBottomRightRadius:"4.32px",borderTopLeftRadius:0,borderTopRightRadius:"4.32px",position:"relative",top:"-1px",right:"-1px"}),clearIndicator:e=>({...e,height:`${d}px`,display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"0px"}),valueContainer:e=>({...e,display:"flex",justifyContent:"space-between",fontSize:u+"px",marginTop:"-4px"}),indicatorsContainer:e=>({...e,padding:0}),menu:e=>({...e,border:"none",marginTop:"1px",borderTopRightRadius:"0px",borderTopLeftRadius:"0px",outline:"none",boxShadow:"0px 6px 20px rgba(56, 66, 100, 0.15)",borderRadius:"4.32px",fontSize:u+"px",width:"100%",minWidth:"singleSelect"===x||"asyncSingleSelect"===x?"120px":"185px"}),singleValue:e=>({...e,fontSize:u+"px",marginLeft:"0px",width:"auto",maxWidth:"89%",marginRight:0}),multiValue:e=>({...e,marginLeft:"0px",width:"auto"}),input:e=>({...e,fontSize:u+"px",color:H||"hsl(0, 0%, 20%)"}),option:(e,t)=>({...e,backgroundColor:t.isSelected||t.isFocused?O.neutral["neutral-5"]:O.bgColor,padding:"10px",cursor:t.isDisabled?"not-allowed":"pointer",color:"#081348",opacity:t.isDisabled?.6:1,width:"inherit",boxSizing:"initial"}),menuPortal:e=>({...e,zIndex:99999999}),...F},J={DropdownIndicator:e=>{const t=g.default.createElement(c.components.DropdownIndicator,e,g.default.createElement(Ft,null,g.default.createElement(N,{icon:w,color:E,size:V,customstyles:S})));return!0===z?t:null},ValueContainer:qt,IndicatorSeparator:()=>null,ClearIndicator:e=>g.default.createElement(c.components.ClearIndicator,e,n?g.default.createElement(Ft,{onClick:()=>{m(),e.clearValue()}},g.default.createElement(N,{icon:"cross-icon",color:"black",size:8})):null),MenuList:e=>{const{MenuListHeader:t=null,MenuListFooter:l=null}=e.selectProps.components;return g.default.createElement(c.components.MenuList,e,e.children.length&&t,e.children,e.children.length&&l)},MenuListFooter:j};let U=null;switch(x){case"multiSelect":U=g.default.createElement(Ot,k({type:"multiSelect",MultiValue:G,Option:D,value:o,CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:v,stylesComp:X,setSelectedValue:r,isLoading:C,id:A,isClearable:n},Z));break;case"asyncSingleSelect":U=g.default.createElement(Dt,k({CommonRenderedComponent:J,loadOptions:p,onInputChange:f,styles:X,placeholder:i,onChange:r,isLoading:C,isDisabled:v,id:A,value:o,isClearable:n},Z));break;case"asyncMultiSelect":U=g.default.createElement(Dt,k({type:"asyncMultiSelect",CommonRenderedComponent:J,MultiValue:G,Option:D,onChange:r,placeholder:i,styles:X,isDisabled:v,isLoading:C,loadOptions:p,onInputChange:f,id:A,isClearable:n},Z));break;default:U=g.default.createElement(Ot,k({type:"singleSelect",value:{value:o?o.value:"",label:o?o.label:""},CommonRenderedComponent:J,optionArr:a,placeHolder:i,isDisabled:v,stylesComp:X,setSelectedValue:r,isLoading:C,id:A,isClearable:n},Z))}return g.default.createElement(Ht,{style:b,backgroundColor:L,isValid:s,fontSize:u,theme:O,isDisabled:v},e&&g.default.createElement(jt,{inBuiltCss:W,labelWrapperStyle:"selectComp-label-wrapper",style:h},g.default.createElement(ot,{customStyles:t,type:"label-text",text:e,style:{marginBottom:"8px",paddingBottom:"0px"}}),y&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${O.ui.error}`}},"*")),U,!s&&q)},Ot=({type:e,Option:t,value:l,CommonRenderedComponent:a,MultiValue:o,optionArr:r,placeHolder:i,isDisabled:n,stylesComp:c,setSelectedValue:s,isLoading:d,id:u,isClearable:p,...f})=>{let m={...a};return"multiSelect"===e&&(m.MultiValue=o,m.Option=t),g.default.createElement(C.default,k({className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",components:m,options:r,placeholder:i,isDisabled:n,value:l,styles:c,onChange:s,isLoading:d,id:u,isClearable:p,isMulti:"multiSelect"===e,hideSelectedOptions:!1,closeMenuOnSelect:"multiSelect"!==e,menuShouldScrollIntoView:!1},f))},Dt=({CommonRenderedComponent:e,MultiValue:t,Option:l,type:a,id:o,styles:r,...i})=>{let n={...e};return"asyncMultiSelect"===a&&(n.MultiValue=t,n.Option=l),g.default.createElement(A.default,k({className:"select-manage-page",classNamePrefix:"new-select",name:"select-dropdown",components:n,isMulti:"asyncMultiSelect"===a,defaultOptions:!0,hideSelectedOptions:!1,closeMenuOnSelect:"asyncMultiSelect"!==a,isSearchable:!0,styles:r,menuShouldScrollIntoView:!1},i))};Zt.propTypes={label:b.default.string,labelStyle:b.default.object,optionArr:b.default.array,selectedValue:b.default.object,setSelectedValue:b.default.func,placeHolder:b.default.string,fontSize:b.default.number,clearSelected:b.default.func,loadOptions:b.default.func,onInputChange:b.default.func,customWrapperStyles:b.default.object,customLabelStyles:b.default.object,isRequired:b.default.bool,dropdownType:b.default.string,isDisabled:b.default.bool,isLoading:b.default.bool,isValid:b.default.bool,height:b.default.number,isClearable:b.default.bool,id:b.default.string,iconName:b.default.string,iconColor:b.default.string,iconSize:b.default.number,leftIcon:b.default.string,leftIconColor:b.default.string,leftIconSize:b.default.number,showIndicator:b.default.bool,backgroundColor:b.default.string,placeHolderColor:b.default.string,inputColor:b.default.string,menuListFooter:b.default.any,customSelectStyles:b.default.object},Zt.defaultProps={label:"",labelStyle:{},optionArr:[],selectedValue:{},setSelectedValue:void 0,placeHolder:"Select an option",isValid:!0,isClearable:!1,height:31,fontSize:14,loadOptions:()=>{},onInputChange:()=>{},clearSelected:()=>{},customWrapperStyles:{},customLabelStyles:{},isRequired:!1,dropdownType:"singleSelect",isDisabled:!1,isLoading:!1,id:"",iconName:"triangle-down",iconColor:"black",iconSize:8,leftIcon:"",leftIconColor:"black",leftIconSize:10,showIndicator:!0,customSelectStyles:{}};const Gt=h.default.div`
|
|
1476
1479
|
//Set the styles from the default styles object
|
|
1477
1480
|
${({inBuiltCss:e,defaultStyles:t})=>T(e,t)}
|
|
1478
1481
|
|
|
@@ -1510,7 +1513,6 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1510
1513
|
// custom styles
|
|
1511
1514
|
${({customFileNameStyles:e})=>e}
|
|
1512
1515
|
`;const Yt=h.default.div`
|
|
1513
|
-
cursor: pointer;
|
|
1514
1516
|
padding-left: 1px;
|
|
1515
1517
|
margin-left: auto;
|
|
1516
1518
|
margin-right: 10px;
|
|
@@ -1532,7 +1534,7 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1532
1534
|
align-items: center;
|
|
1533
1535
|
margin: 20px 0px;
|
|
1534
1536
|
font-size: 14px;
|
|
1535
|
-
`;const Kt=({label:e,labelStyle:a,labelInline:o,required:r,message:i,fileArr:n,setFileArr:c,deleteFile:s,customDropzoneStyles:d,customFileStyles:u,customTextStyles:p,customFileNameStyles:f,backgroundColor:m,singleFile:b,messageSize:h,showSupportedFormats:y,file_extensions:x,maxFilesAmount:v,minFilesAmount:C,fileSizeLimit:A,fileSizeNamingConvention:w,errorMessages:S,suggesionMessage:E,MessagelabelStyle:V,dropValid:z,setDropValid:M,dropzoneContent:B,dropIcon:I,iconColor:L,id:T,customTooltipContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j,...F})=>{const q=l.useTheme()||R,[Z,O]=t.useState(!1),D=t.createRef(),[G,X]=t.useState(z),[J,U]=t.useState("");let Y;var Q=x;let K=Q.map((e=>e.toLowerCase()));K=[...new Set(K)];var $=!1,_=y?"All file formats cannot be used with the files you provided.":"",ee="";1==b&&(C=1,v=1);var te="Please upload (min."+C+" to max."+v+")files",le=e=>{ee="";let t=[];var l=0,a=n.length;if(a+e.length<C||a+e.length>v){var o=`Please upload (minimum ${C} to maximum ${v} files)`;ee=S?.amount,ee=void 0!==ee?ee:o}for(const e of n)e.size&&(l+=e.size);if(""==ee)for(const[a,n]of Object.entries(e)){$=!0,n.name,l+=n.size;var r=n.name.split(".");r=r[r.length-1],$=Q.includes(r.toLowerCase());var i=1024;("MB"===w||"GB"===w||"TB"===w)&&(i*=1024);var c=Math.round(l/i);if(!1===$&&(ee=S?.format,ee=ee||_),c>A&&$){$=!1;o="The file(s) must be under "+A+" "+w;ee=S?.size,ee=void 0!==ee?ee:o}$&&(Y=URL.createObjectURL(n),n.path=Y,t.push(n))}return ee.length>0?(M(!1),X(z),U(ee)):(M(!0),X(z),U("")),t};function ae(e){e.preventDefault(),e.stopPropagation()}function oe(e,t){let l=[...n,...e];return t||(l=l.filter(((e,t,l)=>t===l.findIndex((t=>t.place===e.place&&t.name===e.name))))),c(l),O(!1),l}function re(e,t){if(e instanceof File){const t=n.findIndex((t=>t.name===e.name));let l=n[t].path;URL.revokeObjectURL(l);const a=n.filter((t=>t.name!==e.name));c(a)}else!function(e,t){const l=n.filter((t=>t.name!==e.name));c(l),s(e)}(e)}const ie=g.default.createElement("div",null,K.map(((e,t)=>g.default.createElement("span",null,e,t<K.length-1?", ":""))));return g.default.createElement("div",null,g.default.createElement("div",{style:{display:"flex",width:"inherit"}},g.default.createElement(ot,k({customStyles:a,type:"label-text",labelInline:o,text:e,style:{display:"flex",marginBottom:`${o?0:"8px"}`,paddingBottom:"0px"}},F)),r&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${q.variant.error}`}},"*")),g.default.createElement(Gt,{theme:q,inBuiltCss:W,defaultStyles:"dropzone-parent",backgroundColor:m,customDropzoneStyles:z?d:{},onDragLeave:function(e){ae(e),O(!1)},onDragOver:function(e){ae(e),O(!0)},onDrop:function(e){ae(e);const{files:t}=e.dataTransfer;var l=le(t);O(!0),F.onFilesAdded(oe(l,b))},onClick:function(){D.current.click()},hover:Z,dropValid:z,fileArr:n},g.default.createElement(Jt,k({ref:D,valid:G,dropValid:z,type:"file",id:T,multiple:!b,onChange:function(e){let{files:t}=e.target;O(!1);var l=le(t);l&&F.onFilesAdded(oe(l,b))},onClick:e=>e.target.value=null},F)),z?g.default.createElement(g.default.Fragment,null,I?g.default.createElement(N,{icon:I,color:Z?q.bgColor:L,size:24}):g.default.createElement(N,{icon:"file-upload",color:Z?q.bgColor:q.primary["primary-1"],size:24})):null,g.default.createElement(Ut,{dropValid:z,valid:G,hover:Z,backgroundColor:m,customTextStyles:p,inBuiltCss:W,defaultStyles:"dropzone-text-div"},z?g.default.createElement(g.default.Fragment,null,B?g.default.createElement("div",{style:{color:Z?q.bgColor:null}},B):g.default.createElement("div",null,g.default.createElement("span",{style:{color:Z?q.bgColor:q.primary["primary-1"]}},"Choose a file"," "),g.default.createElement("span",{style:{color:Z?q.bgColor:q.neutral["neutral-2"]}},"or"," "),g.default.createElement("span",{style:{color:Z?q.bgColor:q.textColor}},"drag ",b?"it":"them"," here"))):g.default.createElement("div",null,g.default.createElement("span",{style:{color:q.variant.error}},"Try again!!"," "),g.default.createElement("span",{style:{color:q.textColor}},J||i)))),J===_||S.format?g.default.createElement("div",{style:{display:"flex"}},g.default.createElement(ot,k({themeColor:R,customStyles:V,type:"label-text",labelInline:o,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},F)),g.default.createElement(Ke,{contentTrigger:g.default.createElement("span",{style:{cursor:"pointer"}},"Click here to view the supported file types"),headerTooltip:"",contentTooltip:ie,footerTooltip:"",popperOptionsP:{placement:"right"},settings:{closeOnOutsideClick:!0,trigger:"click"},customTriggerStyle:{marginTop:"8px",marginLeft:"4px",textDecoration:"underline",color:q.variant["primary-1"]},customBodyStyle:{wordWrap:"break-word"},customContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j})):"The file size is not uploaded"===J?g.default.createElement(ot,k({themeColor:R,customStyles:V,type:"label-text",labelInline:o,text:te,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},F)):"",n?.map(((e,t)=>g.default.createElement(Xt,{inBuiltCss:W,defaultStyles:"dropzone-file-div",key:`${e}-${t}`,customFileStyles:u},g.default.createElement(Nt,null,g.default.createElement(N,{icon:"file-icon",color:q.primary["primary-1"]})),(File,g.default.createElement("a",{style:{color:q.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer",download:e.name}," ",e.name)),g.default.createElement(Qt,null,e?.otherInfo),g.default.createElement(Yt,{key:101*Math.random()|0
|
|
1537
|
+
`;const Kt=({label:e,labelStyle:a,labelInline:o,required:r,message:i,fileArr:n,setFileArr:c,deleteFile:s,customDropzoneStyles:d,customFileStyles:u,customTextStyles:p,customFileNameStyles:f,backgroundColor:m,singleFile:b,messageSize:h,showSupportedFormats:y,file_extensions:x,maxFilesAmount:v,minFilesAmount:C,fileSizeLimit:A,fileSizeNamingConvention:w,errorMessages:S,suggesionMessage:E,MessagelabelStyle:V,dropValid:z,setDropValid:M,dropzoneContent:B,dropIcon:I,iconColor:L,id:T,customTooltipContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j,...F})=>{const q=l.useTheme()||R,[Z,O]=t.useState(!1),D=t.createRef(),[G,X]=t.useState(z),[J,U]=t.useState("");let Y;var Q=x;let K=Q.map((e=>e.toLowerCase()));K=[...new Set(K)];var $=!1,_=y?"All file formats cannot be used with the files you provided.":"",ee="";1==b&&(C=1,v=1);var te="Please upload (min."+C+" to max."+v+")files",le=e=>{ee="";let t=[];var l=0,a=n.length;if(a+e.length<C||a+e.length>v){var o=`Please upload (minimum ${C} to maximum ${v} files)`;ee=S?.amount,ee=void 0!==ee?ee:o}for(const e of n)e.size&&(l+=e.size);if(""==ee)for(const[a,n]of Object.entries(e)){$=!0,n.name,l+=n.size;var r=n.name.split(".");r=r[r.length-1],$=Q.includes(r.toLowerCase());var i=1024;("MB"===w||"GB"===w||"TB"===w)&&(i*=1024);var c=Math.round(l/i);if(!1===$&&(ee=S?.format,ee=ee||_),c>A&&$){$=!1;o="The file(s) must be under "+A+" "+w;ee=S?.size,ee=void 0!==ee?ee:o}$&&(Y=URL.createObjectURL(n),n.path=Y,t.push(n))}return ee.length>0?(M(!1),X(z),U(ee)):(M(!0),X(z),U("")),t};function ae(e){e.preventDefault(),e.stopPropagation()}function oe(e,t){let l=[...n,...e];return t||(l=l.filter(((e,t,l)=>t===l.findIndex((t=>t.place===e.place&&t.name===e.name))))),c(l),O(!1),l}function re(e,t){if(e instanceof File){const t=n.findIndex((t=>t.name===e.name));let l=n[t].path;URL.revokeObjectURL(l);const a=n.filter((t=>t.name!==e.name));c(a)}else!function(e,t){const l=n.filter((t=>t.name!==e.name));c(l),s(e)}(e)}const ie=g.default.createElement("div",null,K.map(((e,t)=>g.default.createElement("span",null,e,t<K.length-1?", ":""))));return g.default.createElement("div",null,g.default.createElement("div",{style:{display:"flex",width:"inherit"}},g.default.createElement(ot,k({customStyles:a,type:"label-text",labelInline:o,text:e,style:{display:"flex",marginBottom:`${o?0:"8px"}`,paddingBottom:"0px"}},F)),r&&g.default.createElement("div",{style:{marginLeft:"4px",color:`${q.variant.error}`}},"*")),g.default.createElement(Gt,{theme:q,inBuiltCss:W,defaultStyles:"dropzone-parent",backgroundColor:m,customDropzoneStyles:z?d:{},onDragLeave:function(e){ae(e),O(!1)},onDragOver:function(e){ae(e),O(!0)},onDrop:function(e){ae(e);const{files:t}=e.dataTransfer;var l=le(t);O(!0),F.onFilesAdded(oe(l,b))},onClick:function(){D.current.click()},hover:Z,dropValid:z,fileArr:n},g.default.createElement(Jt,k({ref:D,valid:G,dropValid:z,type:"file",id:T,multiple:!b,onChange:function(e){let{files:t}=e.target;O(!1);var l=le(t);l&&F.onFilesAdded(oe(l,b))},onClick:e=>e.target.value=null},F)),z?g.default.createElement(g.default.Fragment,null,I?g.default.createElement(N,{icon:I,color:Z?q.bgColor:L,size:24}):g.default.createElement(N,{icon:"file-upload",color:Z?q.bgColor:q.primary["primary-1"],size:24})):null,g.default.createElement(Ut,{dropValid:z,valid:G,hover:Z,backgroundColor:m,customTextStyles:p,inBuiltCss:W,defaultStyles:"dropzone-text-div"},z?g.default.createElement(g.default.Fragment,null,B?g.default.createElement("div",{style:{color:Z?q.bgColor:null}},B):g.default.createElement("div",null,g.default.createElement("span",{style:{color:Z?q.bgColor:q.primary["primary-1"]}},"Choose a file"," "),g.default.createElement("span",{style:{color:Z?q.bgColor:q.neutral["neutral-2"]}},"or"," "),g.default.createElement("span",{style:{color:Z?q.bgColor:q.textColor}},"drag ",b?"it":"them"," here"))):g.default.createElement("div",null,g.default.createElement("span",{style:{color:q.variant.error}},"Try again!!"," "),g.default.createElement("span",{style:{color:q.textColor}},J||i)))),J===_||S.format?g.default.createElement("div",{style:{display:"flex"}},g.default.createElement(ot,k({themeColor:R,customStyles:V,type:"label-text",labelInline:o,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},F)),g.default.createElement(Ke,{contentTrigger:g.default.createElement("span",{style:{cursor:"pointer"}},"Click here to view the supported file types"),headerTooltip:"",contentTooltip:ie,footerTooltip:"",popperOptionsP:{placement:"right"},settings:{closeOnOutsideClick:!0,trigger:"click"},customTriggerStyle:{marginTop:"8px",marginLeft:"4px",textDecoration:"underline",color:q.variant["primary-1"]},customBodyStyle:{wordWrap:"break-word"},customContentStyle:P,customStylesTPArightBefore:H,customStylesTPArightAfter:j})):"The file size is not uploaded"===J?g.default.createElement(ot,k({themeColor:R,customStyles:V,type:"label-text",labelInline:o,text:te,style:{display:"flex",paddingTop:"10px",paddingBottom:`${o?0:"16.64px"}`}},F)):"",n?.map(((e,t)=>g.default.createElement(Xt,{inBuiltCss:W,defaultStyles:"dropzone-file-div",key:`${e}-${t}`,customFileStyles:u},g.default.createElement(Nt,null,g.default.createElement(N,{icon:"file-icon",color:q.primary["primary-1"]})),(File,g.default.createElement("a",{style:{color:q.variant["primary-1"],marginLeft:"5px"},href:e?.path,target:"_blank",rel:"noreferrer",download:e.name}," ",e.name)),g.default.createElement(Qt,null,e?.otherInfo),g.default.createElement(Yt,{key:101*Math.random()|0},g.default.createElement("div",{style:{marginRight:"7px"}},g.default.createElement(N,{icon:`${!(e instanceof File)&&"cloud-icon"}`,color:q.primary["primary-1"]})),g.default.createElement(N,{icon:"cross-icon",color:q.neutral["neutral-2"],size:13,onClick:()=>re(e),customstyles:{cursor:"pointer"}}))))))};Kt.propTypes={onFilesAdded:b.default.func,dropValid:b.default.bool,setDropValid:b.default.func,message:b.default.string,fileArr:b.default.array,setFileArr:b.default.func,customDropzoneStyles:b.default.object,customFileStyles:b.default.object,customTextStyles:b.default.object,customFileNameStyles:b.default.object,backgroundColor:b.default.string,messageSize:b.default.number,maxFilesAmount:b.default.number,minFilesAmount:b.default.number,fileSizeLimit:b.default.number,fileSizeNamingConvention:b.default.string,showSupportedFormats:b.default.bool,file_extensions:b.default.array,errorMessages:b.default.object,suggesionMessage:b.default.any,MessagelabelStyle:b.default.object,id:b.default.string,dropzoneContent:b.default.any,dropIcon:b.default.string,iconColor:b.default.string,singleFile:b.default.bool,customTooltipContentStyle:b.default.object,customStylesTPArightBefore:b.default.object,customStylesTPArightAfter:b.default.object},Kt.defaultProps={onFilesAdded:()=>null,dropValid:!0,message:"",fileArr:[],setFileArr:()=>{},customDropzoneStyles:{},customFileStyles:{},customTextStyles:{},customFileNameStyles:{},messageSize:100,additionalText:"",maxFilesAmount:5,minFilesAmount:1,fileSizeLimit:10,fileSizeNamingConvention:"MB",showSupportedFormats:!0,file_extensions:["doc","docx","jpg","JPG","pdf","png","xlsx","xlsr","xls"],errorMessages:{},MessagelabelStyle:{},suggesionMessage:"doc, docx, jpg, pdf, png, xlsx, xlsr, xls (Max 10MB)",id:"",iconColor:"black"};const $t=l.css`
|
|
1536
1538
|
pointer-events: none;
|
|
1537
1539
|
`,_t=h.default.input`
|
|
1538
1540
|
background-color: transparent;
|
|
@@ -1998,13 +2000,13 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
1998
2000
|
${({inBuiltCss:e,defaultCheckBoxWrapperStyle:t})=>T(e,t)}
|
|
1999
2001
|
`,_l=h.default.label`
|
|
2000
2002
|
position: absolute;
|
|
2001
|
-
width: 51.52px;
|
|
2002
|
-
height: 20.11px;
|
|
2003
|
-
border-radius: 11.04px;
|
|
2003
|
+
width: ${({labelPosition:e})=>"inside"===e?"51.52px":"45px"};
|
|
2004
|
+
height: ${({labelPosition:e})=>"inside"===e?"20.11px":"22px"};
|
|
2005
|
+
border-radius: ${({labelPosition:e})=>"inside"===e?"11.04px":"31px"};
|
|
2004
2006
|
cursor: pointer;
|
|
2005
2007
|
background-color: ${({checked:e,theme:t,isDisabled:l})=>l?t.neutral["neutral-3"]:e?t.primary["primary-1"]:e?void 0:t.neutral["neutral-2"]};
|
|
2006
2008
|
margin-bottom: 0px !important;
|
|
2007
|
-
|
|
2009
|
+
margin-left: ${({labelPosition:e})=>"left"===e?"40px":0};
|
|
2008
2010
|
// custom styles
|
|
2009
2011
|
${({customToggleBoxStyle:e})=>e}
|
|
2010
2012
|
|
|
@@ -2012,12 +2014,12 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
2012
2014
|
content: '';
|
|
2013
2015
|
display: block;
|
|
2014
2016
|
border-radius: 50%;
|
|
2015
|
-
width:
|
|
2016
|
-
height:
|
|
2017
|
-
margin-top:
|
|
2017
|
+
width: ${({labelPosition:e})=>"inside"===e?"14.55px":"16px"};
|
|
2018
|
+
height: ${({labelPosition:e})=>"inside"===e?"14.37px":"16px"};
|
|
2019
|
+
margin-top: 3px;
|
|
2018
2020
|
background-color: ${({theme:e})=>e.bgColor};
|
|
2019
2021
|
transition: 0.2s;
|
|
2020
|
-
margin-left: ${({checked:e})=>e?"4px":"calc(100% - 18px)"};
|
|
2022
|
+
margin-left: ${({checked:e,labelPosition:t})=>e?"4px":"inside"===t?"calc(100% - 18px)":"calc(100% - 20px)"};
|
|
2021
2023
|
|
|
2022
2024
|
// custom styles
|
|
2023
2025
|
${({customSwitchStyle:e})=>e}
|
|
@@ -2026,23 +2028,23 @@ cursor: ${({disabled:e})=>e?"not-allowed":"text"};
|
|
|
2026
2028
|
opacity: 0;
|
|
2027
2029
|
z-index: 1;
|
|
2028
2030
|
border-radius: 11.04px;
|
|
2029
|
-
width: ${({customToggleBoxStyle:e})=>e.width
|
|
2031
|
+
width: ${({customToggleBoxStyle:e,labelPosition:t})=>e.width?e.width:"51.52px"} ;
|
|
2030
2032
|
height: 20.11px;
|
|
2031
2033
|
cursor: ${({isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
2032
|
-
margin: 0;
|
|
2034
|
+
margin: ${({labelPosition:e})=>"inside"===e?0:"right"===e?"0 8px 0 0":"0 0 0 8px"};
|
|
2033
2035
|
|
|
2034
2036
|
// custom styles
|
|
2035
2037
|
|
|
2036
2038
|
|
|
2037
2039
|
`,ta=h.default.span`
|
|
2038
|
-
color: ${({theme:e})=>e.neutral["neutral-5"]};
|
|
2039
|
-
font-size: 10px;
|
|
2040
|
-
position: absolute;
|
|
2040
|
+
color: ${({theme:e,labelPosition:t})=>"inside"===t?e.neutral["neutral-5"]:e.textColor};
|
|
2041
|
+
font-size: ${({labelPosition:e})=>"inside"===e?"10px":"16px"};
|
|
2042
|
+
position: ${({labelPosition:e})=>"inside"===e?"absolute":"initial"};
|
|
2041
2043
|
left: ${({checked:e})=>e?"36px":"22px"};
|
|
2042
|
-
|
|
2044
|
+
margin-right:${({labelPosition:e})=>"inside"===e?0:"8px"};
|
|
2043
2045
|
// custom styles
|
|
2044
2046
|
${({optionStyle:e})=>e};
|
|
2045
|
-
`,la=({checked:e,customSwitchStyle:t,customToggleBoxStyle:a,onClick:o,optionStyle:r,id:i,isDisabled:n,trueLabel:c,falseLabel:s,...
|
|
2047
|
+
`,la=({checked:e,customSwitchStyle:t,customToggleBoxStyle:a,onClick:o,optionStyle:r,id:i,isDisabled:n,trueLabel:c,falseLabel:s,labelPosition:d,...u})=>{const p=l.useTheme()||R;return g.default.createElement($l,k({inBuiltCss:W,defaultCheckBoxWrapperStyle:"toggle-switch-wrapper"},u),"left"===d&&g.default.createElement(ta,{optionStyle:r,inBuiltCss:W,theme:p,checked:e,labelPosition:d},e?c:s),g.default.createElement(ea,k({},u,{id:i,inBuiltCss:W,onClick:()=>{o(!e)},isChecked:e,disabled:n,isDisabled:n,customToggleBoxStyle:a,labelPosition:d})),g.default.createElement(_l,k({},u,{htmlFor:i,customToggleBoxStyle:a,customSwitchStyle:t,inBuiltCss:W,checked:e,theme:p,isDisabled:n,labelPosition:d})),("right"===d||"inside"===d)&&g.default.createElement(ta,{optionStyle:r,inBuiltCss:W,theme:p,checked:e,labelPosition:d},e?c:s))};la.propTypes={customToggleBoxStyle:b.default.object,customSwitchStyle:b.default.object,checked:b.default.bool,id:b.default.string,isDisabled:b.default.bool,trueLabel:b.default.string,falseLabel:b.default.string,labelPosition:b.default.oneOf(["left","right","inside"])},la.defaultProps={checked:!1,customSwitchStyle:{},customToggleBoxStyle:{},id:"",isDisabled:!1,trueLabel:"Yes",falseLabel:"NO",labelPosition:"right"};const aa=h.default.div`
|
|
2046
2048
|
background-color: ${({theme:e})=>e.bgColor};
|
|
2047
2049
|
padding: 24px 8px;
|
|
2048
2050
|
${({commentWrapperStyle:e})=>e};
|