master-components-react 1.11.0 → 1.11.1
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.
|
@@ -28,7 +28,7 @@ Check the top-level render call using <`+l+">.")}return n}}function ft(e,n){{if(
|
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,st,Oe,Nt,Oe),ht[Oe+st]=!0}}return e===C?Tt(Y):kt(Y),Y}}function bt(e,n,l){return mt(e,n,l,!0)}function Et(e,n,l){return mt(e,n,l,!1)}var Rt=Et,$t=bt;Xe.Fragment=C,Xe.jsx=Rt,Xe.jsxs=$t}()),Xe}process.env.NODE_ENV==="production"?it.exports=St():it.exports=Pt();var t=it.exports;const Dt="MainButton-module__mainButton",Wt="MainButton-module__sm",Lt="MainButton-module__onlyIcon",Ot="MainButton-module__buttonSlot",At="MainButton-module__buttonLabel",Mt="MainButton-module__md",It="MainButton-module__lg",Bt="MainButton-module__xl",Vt="MainButton-module__xl2",Ht="MainButton-module__disabled",Ye={mainButton:Dt,sm:Wt,onlyIcon:Lt,buttonSlot:Ot,buttonLabel:At,md:Mt,lg:It,xl:Bt,xl2:Vt,disabled:Ht},at=({label:i,buttonType:f="button",onClick:r,size:C="md",disabled:w,withIcons:h,iconOne:E,iconTwo:y,onlyIcon:p,buttonStyle:_,labelStyle:u,buttonSlotStyle:k})=>t.jsx("button",{type:f,style:_&&typeof _=="object"?_:{},className:`${Ye.mainButton} ${p?Ye.onlyIcon:""} ${C?Ye[C]:""} ${w?Ye.disabled:""}`,onClick:()=>{r&&typeof r=="function"&&r()},children:t.jsxs("div",{className:Ye.buttonSlot,style:k??{},children:[p||h&&E?E:"",!p&&t.jsx("span",{style:u??{},className:Ye.buttonLabel,children:i??"Button"}),h&&y?y:""]})}),qt="FormInput-module__inputWrapper",Yt="FormInput-module__inputLabel",Ut="FormInput-module__required",zt="FormInput-module__inputContainer",Kt="FormInput-module__inputContent",Gt="FormInput-module__inputTags",Jt="FormInput-module__focused",Xt="FormInput-module__error",Zt="FormInput-module__rightIcon",Qt="FormInput-module__leftIcon",er="FormInput-module__inputDropDown",tr="FormInput-module__http",rr="FormInput-module__disabled",nr="FormInput-module__sm",or="FormInput-module__md",sr="FormInput-module__withCopy",ir="FormInput-module__inputHelperText",K={inputWrapper:qt,inputLabel:Yt,required:Ut,inputContainer:zt,inputContent:Kt,inputTags:Gt,focused:Jt,error:Xt,rightIcon:Zt,leftIcon:Qt,inputDropDown:er,http:tr,disabled:rr,sm:nr,md:or,withCopy:sr,inputHelperText:ir},xt=({width:i,height:f,color:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:i??"12",height:f??"8",viewBox:"0 0 12 8",fill:"none",children:t.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:r??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),ar=({width:i,height:f,color:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:i??"20",height:f??"20",viewBox:"0 0 20 20",fill:"none",children:[t.jsx("g",{clipPath:"url(#clip0_444_26)",children:t.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:r??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_444_26",children:t.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),ct=i=>t.jsx("svg",{xmlns:i.xmlns??"http://www.w3.org/2000/svg",width:i.width??"14",height:i.height??"14",viewBox:i.viewBox??"0 0 14 14",fill:i.fill??"none",children:t.jsx("path",{d:i.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:i.stroke??"#A4A7AE",strokeWidth:i.strokeWidth??"1.66667",strokeLinecap:i.strokeLinecap??"round",strokeLinejoin:i.strokeLinejoin??"round"})}),lr="Checkbox-module__checkboxWrapper",cr="Checkbox-module__sm",ur="Checkbox-module__md",dr="Checkbox-module__checkMark",fr="Checkbox-module__checked",pr="Checkbox-module__disabled",Ue={checkboxWrapper:lr,sm:cr,md:ur,checkMark:dr,checked:fr,disabled:pr},yt=({color:i,width:f,height:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:f??"12",height:r??"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:i??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),hr=i=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...i,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:t.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),ut=({checked:i,change:f,disabled:r,required:C,multipleChecked:w,size:h,activeStyle:E,checkBoxStyle:y})=>{const p=c.useRef(null),[_,u]=c.useState(!1),k=()=>{f&&typeof f=="function"&&f(!i)},g=()=>_?E??{}:y??{};return t.jsxs("div",{style:g(),className:`${Ue.checkboxWrapper} ${Ue[h]??Ue.md} ${i?Ue.checked:Ue.unChecked} ${r?Ue.disabled:""}`,onMouseDown:()=>u(!0),onMouseUp:()=>u(!1),onMouseLeave:()=>u(!1),onClick:k,children:[t.jsx("input",{ref:p,type:"checkbox",disabled:r,checked:i,hidden:!0,readOnly:!0,required:C??!1}),i?w?t.jsx(hr,{}):t.jsx(yt,{}):""]})},mr="Tag-module__tagContainer",vr="Tag-module__onlyLabel",_r="Tag-module__sm",xr="Tag-module__md",yr="Tag-module__lg",gr="Tag-module__tagLabel",Cr="Tag-module__tagNumber",jr="Tag-module__tagClose",ze={tagContainer:mr,onlyLabel:vr,sm:_r,md:xr,lg:yr,tagLabel:gr,tagNumber:Cr,tagClose:jr},dt=({id:i,label:f,icon:r,withClose:C,withCheckbox:w,withNumber:h,number:E,checkboxProps:y,disable:p,size:_,onClose:u,tagContainerStyle:k,tagLabelStyle:g,tagNumberStyle:P,tagCloseStlye:x})=>{const D=()=>!w&&!r&&!C&&!h,G=()=>r,s=()=>{u&&typeof u=="function"&&u(i??null)};return t.jsxs("div",{style:k??{},className:`${ze.tagContainer} ${D()?ze.onlyLabel:""} ${ze[_??"md"]}`,children:[w&&t.jsx(ut,{...y}),r&&G(),f&&t.jsx("p",{style:g??{},className:ze.tagLabel,children:f??""}),h&&t.jsx("div",{style:P??{},className:ze.tagNumber,children:E??""}),C&&t.jsx("div",{style:x??{},className:ze.tagClose,onClick:s,children:t.jsx(ct,{width:(x==null?void 0:x.width)??"14",height:(x==null?void 0:x.height)??"14",color:(x==null?void 0:x.color)??"#A4A7AE"})})]})},gt=({value:i,label:f,placeholder:r,required:C,disabled:w,type:h,size:E,onChange:y,onFouce:p,onBlur:_,msg:u,readOnly:k,maxLength:g,onlyText:P,tagValues:x,onRightIconIconClick:D,onRightIconIconMouseEnter:G,onRightIconIconMouseLeave:s,onLeftIconIconClick:R,onLeftIconIconMouseEnter:O,onLeftIconIconMouseLeave:A,onPressEnter:Z,rightIcon:ne,leftIcon:oe,withDropDown:ve,dropdownData:fe,onSelectData:Q,withTags:a,tagProps:ee,withLink:S,withCopy:J,onCopy:se,inputWrapperStyle:L,inputLabelStyle:pe,requiredStyle:Re,inputContainerStyle:Se,leftIconStyle:ie,inputDropDownStyle:je,ulStyle:M,liStyle:we,httpStyle:ae,inputStyle:U,rightIconStyle:le,withCopyStyle:ke,inputHelperTextStyle:z})=>{const[I,he]=c.useState(!1),Ne=c.useRef(null),[Pe,Fe]=c.useState(!1);c.useState(!1);const $e=c.useRef(null),ce=c.useRef(null),[te,_e]=c.useState(!1),[Te,xe]=c.useState(1),o=v=>{let q=v.target.value;q.length===1&&(q=q.trim()),y&&typeof y=="function"&&y(P?q.replace(/\d/g,""):q)},$=()=>{Fe(!0),p&&typeof p=="function"&&p()},B=()=>{Fe(!1),_&&typeof _=="function"&&_()},ye=v=>{const q=v.target.value,Be=q.length===0;h==="number"&&(v.keyCode===69||!Be&&(v.keyCode===187||v.keyCode===107||v.keyCode===189||v.keyCode===109))&&v.preventDefault(),v.key==="Enter"&&q&&q.length>0&&Z&&typeof Z=="function"&&Z(q)},Me=()=>{se&&typeof se=="function"&&se(i)},De=v=>v,Le=()=>{let v={};return J&&(v.borderTopRightRadius=0,v.borderBottomRightRadius=0,v.borderRight=0),ve&&(v.paddingLeft=0),{...v,...Se??{}}},be=v=>{!v.composedPath().includes(ce.current)&&v.composedPath().includes($e.current)||_e(!1)},Ie=v=>{xe(v.id),_e(!1),Q&&typeof Q=="function"&&Q(v)};c.useEffect(()=>{i&&i.length===0&&calculateWidth()},[i]),c.useEffect(()=>(document.addEventListener("click",be),()=>{document.removeEventListener("click",be)}),[]);const We=c.useRef(!1);return c.useEffect(()=>{We.current?setTimeout(()=>{he(v=>!v)},0):We.current=!0},[]),t.jsxs("div",{className:K.inputWrapper,style:L??{},children:[f&&t.jsxs("label",{className:K.inputLabel,style:pe??{},children:[f," ",t.jsx("span",{className:K.required,style:Re??{},children:C&&"*"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[t.jsxs("div",{style:Le(),className:`${K.inputContainer} ${Pe&&!k?K.focused:""} ${w?K.disabled:""} ${u!=null&&u.error?K.error:""} ${K[E??"sm"]}`,children:[!ve&&!S&&oe&&t.jsx("div",{className:K.leftIcon,style:ie??{},onClick:()=>{R&&typeof R=="function"&&R()},onMouseEnter:()=>{O&&typeof O=="function"&&O()},onMouseLeave:()=>{A&&typeof A=="function"&&A()},children:De(oe)}),!S&&ve&&t.jsxs("div",{className:K.inputDropDown,style:je??{},onClick:()=>_e(!0),ref:$e,children:[fe.find(v=>v.id===Te).label,te&&t.jsx("ul",{ref:ce,style:M??{},children:fe&&fe.length&&fe.map((v,q)=>t.jsx("li",{style:we??{},onClick:()=>Ie(v),children:(v==null?void 0:v.label)??"-"},v.id))}),t.jsx(xt,{})]}),S&&t.jsx("div",{className:`${K.inputDropDown} ${K.http}`,style:ae??{},onClick:()=>_e(!0),ref:$e,children:"http://"}),t.jsxs("div",{className:K.inputContent,children:[a&&x&&x.length>0&&t.jsx("div",{className:K.inputTags,children:x.map((v,q)=>t.jsx("div",{className:K.inputSingleTags,children:t.jsx(dt,{...ee,id:v,label:v,withClose:!0})},q))}),t.jsx("input",{ref:Ne,style:U??{},type:h??"text",value:i,onChange:v=>o(v),onFocus:$,onBlur:B,disabled:w,required:C,onKeyDown:ye,readOnly:k,spellCheck:!1,placeholder:r??"",autoComplete:"off",maxLength:g})]}),ne&&t.jsx("div",{className:K.rightIcon,style:le??{},onClick:()=>{D&&typeof D=="function"&&D()},onMouseEnter:()=>{G&&typeof G=="function"&&G()},onMouseLeave:()=>{s&&typeof s=="function"&&s()},children:De(ne)})]}),J&&t.jsxs("div",{style:ke??{},onClick:Me,className:K.withCopy,children:[t.jsx(ar,{}),"Copy"]})]}),u&&(u==null?void 0:u.visible)&&t.jsx("div",{style:z??{},className:`${K.inputHelperText} ${u!=null&&u.error?K.error:""}`,children:t.jsx("p",{style:(u==null?void 0:u.style)??{},children:u.text})})]})},wr="Textarea-module__textareaContainer",kr="Textarea-module__textAreaLabel",Tr="Textarea-module__required",br="Textarea-module__wrap",Er="Textarea-module__textarea",Rr="Textarea-module__focused",$r="Textarea-module__disabled",Nr="Textarea-module__error",Fr="Textarea-module__helperTextStyle",Ce={textareaContainer:wr,textAreaLabel:kr,required:Tr,wrap:br,textarea:Er,focused:Rr,disabled:$r,error:Nr,helperTextStyle:Fr},Sr=({width:i,height:f,color:r})=>t.jsxs("svg",{width:i??"16",height:f??"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("g",{id:"help-circle",clipPath:"url(#clip0_433_6293)",children:t.jsx("path",{id:"Icon",d:"M6.05992 5.99998C6.21665 5.55442 6.52602 5.17872 6.93322 4.9394C7.34042 4.70009 7.81918 4.61261 8.2847 4.69245C8.75022 4.7723 9.17246 5.01433 9.47664 5.37567C9.78081 5.737 9.94729 6.19433 9.94659 6.66665C9.94659 7.99998 7.94659 8.66665 7.94659 8.66665M7.99992 11.3333H8.00659M14.6666 7.99998C14.6666 11.6819 11.6818 14.6666 7.99992 14.6666C4.31802 14.6666 1.33325 11.6819 1.33325 7.99998C1.33325 4.31808 4.31802 1.33331 7.99992 1.33331C11.6818 1.33331 14.6666 4.31808 14.6666 7.99998Z",stroke:r??"#A4A7AE",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_433_6293",children:t.jsx("rect",{width:i??"16",height:f??"16",fill:"white"})})})]}),Pr=({placeholder:i,label:f,msg:r,cols:C,rows:w,value:h,maxLength:E,onChange:y,onFocus:p,onBlur:_,disabled:u,required:k,textareaContainerStyle:g,textareaLabelStyle:P,requiredStyle:x,textareaStyle:D,textareaHelperTextStyle:G})=>{const[s,R]=c.useState(!1),O=ne=>{let oe=ne.target.value;y&&typeof y=="function"&&y(oe)},A=()=>{R(!0),p&&typeof p=="function"&&p()},Z=()=>{R(!1),_&&typeof _=="function"&&_()};return t.jsxs("div",{style:g??{},className:`${Ce.textareaContainer} ${r!=null&&r.type&&(r!=null&&r.visible)?Ce[r==null?void 0:r.type]:""} ${u?Ce.disabled:null}`,children:[f&&t.jsxs("div",{style:P,className:Ce.textAreaLabel,children:[t.jsx("p",{children:f}),t.jsx("span",{style:x??{},className:Ce.required,children:k&&"*"}),t.jsx(Sr,{})]}),t.jsx("div",{className:Ce.wrap,children:t.jsx("textarea",{style:D??{},className:`${Ce.textarea} ${s?Ce.focused:""} ${u?Ce.disabled:""} ${r!=null&&r.error?Ce.error:""}`,value:h,placeholder:i??"",cols:C??"30",rows:w??"5",maxLength:E??null,onFocus:A,disabled:u,onBlur:Z,onChange:O})}),t.jsx("div",{style:G??{},className:`${Ce.helperTextStyle} ${r!=null&&r.error?Ce.error:""}`,children:t.jsx("p",{style:(r==null?void 0:r.style)??{},children:r.text})})]})},Dr="Toggle-module__toggleWrapper",Wr="Toggle-module__toggleState",Lr="Toggle-module__checked",Or="Toggle-module__disabled",ot={toggleWrapper:Dr,toggleState:Wr,checked:Lr,disabled:Or},Ar=({checked:i,change:f,disabled:r,required:C,activeStyle:w,bgStyle:h,checkedBgStyle:E,disabledBgStyle:y,circleStyle:p,checkedCircleStyle:_,disabledCircleStyle:u})=>{const[k,g]=c.useState(!1),P=()=>{f&&typeof f=="function"&&f(!i)},x=()=>{if(k)return w??{};if(i){if(E)return E}else if(i){if(r&&y)return y}else if(h)return h;return{}},D=()=>{if(i){if(_)return _}else if(i){if(r&&u)return u}else if(p)return p;return{}};return t.jsx("div",{style:x(),onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onMouseLeave:()=>g(!1),onClick:P,className:`${ot.toggleWrapper} ${i?ot.checked:""} ${r?ot.disabled:""}`,children:t.jsx("div",{style:D(),className:ot.toggleState,children:t.jsx("input",{type:"checkbox",checked:i,readOnly:!0,disabled:r??!1,hidden:!0,required:C??!1})})})},Mr="Radio-module__radioWrapper",Ir="Radio-module__sm",Br="Radio-module__md",Vr="Radio-module__checked",Hr="Radio-module__innerCircle",qr="Radio-module__radioState",Yr="Radio-module__disabled",Ae={radioWrapper:Mr,sm:Ir,md:Br,checked:Vr,innerCircle:Hr,radioState:qr,disabled:Yr},Ct=({checked:i,change:f,disabled:r,isRequired:C,withUncheckState:w,size:h})=>{c.useState(!1);const E=()=>{f&&typeof f=="function"&&(w||!w&&!i)&&f(!0)};return t.jsxs("div",{className:`${Ae.radioWrapper} ${Ae[h]??Ae.md} ${i?Ae.checked:""} ${r?Ae.disabled:""}`,onClick:E,children:[t.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:r??!1,required:C??!1}),t.jsx("div",{className:Ae.radioState,children:t.jsx("div",{className:Ae.innerCircle})})]})},Ur="Dropdown-module__dropdownWrapper",zr="Dropdown-module__placeHolder",Kr="Dropdown-module__dropdownLabel",Gr="Dropdown-module__required",Jr="Dropdown-module__dropdownContainer",Xr="Dropdown-module__sm",Zr="Dropdown-module__md",Qr="Dropdown-module__selectedTags",en="Dropdown-module__selectedList",tn="Dropdown-module__additional",rn="Dropdown-module__dropdownList",nn="Dropdown-module__disabled",on="Dropdown-module__selected",sn="Dropdown-module__focused",an="Dropdown-module__error",ln="Dropdown-module__dropdownHelperText",re={dropdownWrapper:Ur,placeHolder:zr,dropdownLabel:Kr,required:Gr,dropdownContainer:Jr,sm:Xr,md:Zr,selectedTags:Qr,selectedList:en,additional:tn,dropdownList:rn,disabled:nn,selected:on,focused:sn,error:an,dropdownHelperText:ln},lt=({label:i,disabled:f,required:r,size:C="md",placeholder:w="placeholder",msg:h,readOnly:E,data:y,onSelect:p,selectedOptionID:_,withFilter:u,fixedDropdown:k=!1,onSearch:g,pagination:P,withMultiSelect:x=!1,skipSelected:D,labelIcon:G,closeIcon:s,dropdownIcon:R,iconDown:O,onLabelIconClick:A,onLabelIconMouseEnter:Z,onLabelIconMouseLeave:ne,dropdownWrapperStyle:oe,dropdownLabelStyle:ve,requiredStyle:fe,labelIconStyle:Q,dropdownContainerStyle:a,placeHolderStyle:ee,selectedTagsStyle:S,selectedListStyle:J,additionalStyle:se,dropdownListStyle:L,listStyle:pe})=>{const[Re,Se]=c.useState(!1),[ie,je]=c.useState(!1),M=c.useRef(y),[we,ae]=c.useState("");c.useState(null);const U=c.useRef([]),le=c.useRef(null),ke=c.useRef(null),z=c.useRef({}),I=(o,$)=>{const B=new Set;return o.filter(ye=>B.has(ye[$])?!1:(B.add(ye[$]),!0))},he=o=>{var $;M.current.forEach(B=>{o.id===B.id?B.selected=!0:B.selected=!1}),z.current=o,ae(($=z.current)==null?void 0:$.label),p&&typeof p=="function"&&p(z.current),je(!1)},Ne=o=>{U.current=[...U.current,...M.current.filter($=>$.id===o.id)],o.selected=!o.selected,U.current=I(U.current,"id").filter($=>$.selected),p&&typeof p=="function"&&p(U.current),ae(U.current.map($=>$.label).join(", ")),Se($=>!$)},Pe=o=>{o.stopPropagation(),U.current=[],_=null,M.current&&M.current.length>0&&y.forEach($=>$.selected=!1),p(x?[]:{}),ae("")},Fe=o=>{if(u&&!P)if(o&&o.length>0){let $=M.current.filter(B=>{var ye;return(ye=B==null?void 0:B.label)==null?void 0:ye.toLowerCase().includes(o.toLowerCase())});M.current=$}else M.current=y;g&&typeof g=="function"&&g(o),ae(o)},$e=()=>{if(_||_===0){let o=y.filter($=>Number($.id)===Number(_));o&&o[0]&&(z.current=o[0],D?(g&&typeof g=="function"&&g(z.current.label),ae(z.current.label),closeOnSelect&&setCollapsed($=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):he(o[0]))}},ce=o=>o,te=c.useRef({top:0,left:0}),_e=o=>{o.composedPath().includes(le.current)||je(!1)},Te=o=>{if(k){if(o.composedPath().includes(le.current))return;je(!1)}},xe=()=>{const o=le.current.getBoundingClientRect(),$=6;te.current.width=o.width,te.current.left=o.left,te.current.top=o.top+o.height+$};return c.useEffect(()=>{x&&(U.current=M.current.filter(o=>o.selected),ae(M.current.filter(o=>o.selected).map(o=>o.label).join(", ")))},[]),c.useEffect(()=>{xe()},[le]),c.useEffect(()=>{x||$e()},[_]),c.useEffect(()=>(document.addEventListener("click",_e),document.addEventListener("click",Te),()=>{document.removeEventListener("click",_e),document.removeEventListener("click",Te)}),[]),t.jsxs("div",{className:re.dropdownWrapper,style:oe??{},children:[i&&t.jsxs("label",{className:re.dropdownLabel,style:ve??{},children:[i," ",t.jsx("span",{className:re.required,style:fe??{},children:r&&"*"}),t.jsxs("span",{style:{...Q??{},display:"grid",placeItems:"center"},onClick:()=>{A&&typeof A=="function"&&A()},onMouseEnter:()=>{Z&&typeof Z=="function"&&Z()},onMouseLeave:()=>{ne&&typeof ne=="function"&&ne()},children:[" ",ce(G)]})]}),t.jsxs("div",{ref:le,onClick:()=>(je(o=>!o),xe()),className:`${re.dropdownContainer} ${ie&&!E?re.focused:""} ${f?re.disabled:""} ${h!=null&&h.error?re.error:""} ${re[C]}`,style:a??{},children:[t.jsx("span",{className:re.placeHolder,style:ee??{},children:we&&we.length>0?"":w}),x&&t.jsxs("div",{className:re.selectedTags,style:S??{},children:[U.current.slice(0,3).map((o,$)=>{let B=U.current[U.current.length-1];return t.jsxs("span",{className:re.selectedList,style:J??{},children:[o.label,o.id!==B.id&&$!==2?", ":""]},o==null?void 0:o.id)}),U.current.length>3&&t.jsxs("span",{className:re.additional,style:se??{},children:[" ","+(",U.current.length-3,")"]})]}),R&&t.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:ce(R)}),t.jsx("input",{autoCorrect:"off",hidden:x,readOnly:!u||!ie||x,type:"text",value:we,onChange:o=>Fe(o.target.value)},_),ie&&M.current&&M.current.length>0&&t.jsx("ul",{onClick:o=>o.stopPropagation(),ref:ke,className:re.dropdownList,style:k?{...L??{},width:te.current.width,top:te.current.top,left:te.current.left,position:"fixed",zIndex:"150"}:{...L??{}},children:M.current.map(o=>t.jsxs("li",{style:pe??{},className:`${!(o!=null&&o.label)||o.label===void 0||o!=null&&o.disabled?re.disabled:""} ${o!=null&&o.selected?re.selected:""}`,onClick:()=>{x?Ne(o):he(o)},children:[t.jsxs("p",{children:[" ",o!=null&&o.label?typeof o.label=="function"?o.label():o.label:"-"]}),(o==null?void 0:o.selected)&&t.jsx("span",{children:t.jsx(yt,{color:"#7F56D9",width:20,height:20})})]},o==null?void 0:o.id))}),(U.current.length>0||we.length)>0&&t.jsx("div",{onClick:o=>Pe(o),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:s?ce(s):t.jsx(ct,{width:16,height:16})}),t.jsx("div",{style:{display:"grid",placeItems:"center",transform:ie?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:O?ce(O):t.jsx(xt,{})})]}),h&&(h==null?void 0:h.visible)&&t.jsx("div",{className:`${re.dropdownHelperText} ${h!=null&&h.error?re.error:""}`,children:!ie&&t.jsx("p",{style:(h==null?void 0:h.style)??{},children:h.text})})]})},cn="Tooltip-module__tooltipContainer",un="Tooltip-module__tooltipContent",dn="Tooltip-module__top",fn="Tooltip-module__right",pn="Tooltip-module__bottom",hn="Tooltip-module__left",mn="Tooltip-module__tooltipTitle",vn="Tooltip-module__tooltipText",Ke={tooltipContainer:cn,tooltipContent:un,top:dn,right:fn,bottom:pn,left:hn,tooltipTitle:mn,tooltipText:vn},_n=({children:i,tooltipSlot:f,delay:r,placement:C="top",trigger:w="hover",title:h,text:E,tooltipContentStyle:y,tooltipTitlestyle:p,tooltipTextStyle:_,pointerPosition:u="10%"})=>{const k=c.useRef(null),g=c.useRef(null);let P;const[x,D]=c.useState(!1),G=()=>{w==="hover"&&(P=setTimeout(()=>{D(!0)},r||400))},s=()=>{w==="hover"&&(clearInterval(P),D(!1))},R=()=>{w==="click"&&D(A=>!A)},O=A=>{A.composedPath().includes(k.current)||D(!1)};return c.useEffect(()=>(document.addEventListener("click",O),()=>{document.removeEventListener("click",O)}),[]),c.useEffect(()=>{const A=g.current;A&&A.style.setProperty("--pointer-position",`${u}`)},[x]),t.jsxs("div",{ref:k,className:Ke.tooltipContainer,onClick:R,onMouseEnter:G,onMouseLeave:s,children:[i,x&&f?f():x&&t.jsxs("div",{onClick:A=>A.stopPropagation(),ref:g,style:y??{},className:`${Ke.tooltipContent} ${C?Ke[C]:Ke.bottom}`,children:[h&&h.length>0&&t.jsx("h2",{className:Ke.tooltipTitle,style:p??{},children:h}),E&&E.length>0&&t.jsx("p",{className:Ke.tooltipText,style:_??{},children:E})]})]})},xn="Popup-module__modalOverlay",yn="Popup-module__popupDrawerMode",gn="Popup-module__popupContainer",Cn="Popup-module__EnterFromLeft",jn="Popup-module__fadeIn",wn="Popup-module__withOptions",kn="Popup-module__horizontal",Tn="Popup-module__popupHeader",bn="Popup-module__popupTitle",En="Popup-module__popupDescription",Rn="Popup-module__typeIcon",$n="Popup-module__icon",Nn="Popup-module__templateWrapper",Ee={modalOverlay:xn,popupDrawerMode:yn,popupContainer:gn,enterFromLeft:Cn,fadeIn:jn,withOptions:wn,horizontal:kn,popupHeader:Tn,popupTitle:bn,popupDescription:En,typeIcon:Rn,icon:$n,templateWrapper:Nn};location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const Fn=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Sn=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Pn=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),jt=({visible:i,template:f,options:r,children:C,onClickOutside:w,onClose:h,widthType:E,modalOverlayStyle:y,popupContainerStyle:p,templateWrapperStyle:_,popupHeaderStyle:u,popupTitleStyle:k})=>{const g=()=>{if(!(!r||!(r!=null&&r.type)))switch(String(r==null?void 0:r.type)){case"delete":return t.jsx(Pn,{});case"unsaved":return t.jsx(Sn,{});case"success":return t.jsx(Fn,{})}},P=()=>{h&&typeof h=="function"&&h(!1)},x=c.useRef(null),D=G=>{G.target===x.current&&w&&typeof w=="function"&&w(!1)};return c.useEffect(()=>(document.addEventListener("click",D),()=>{document.removeEventListener("click",D)}),[]),i&&t.jsx("div",{ref:x,style:y??{},className:`
|
|
31
|
+
<%s key={someKey} {...props} />`,st,Oe,Nt,Oe),ht[Oe+st]=!0}}return e===C?Tt(Y):kt(Y),Y}}function bt(e,n,l){return mt(e,n,l,!0)}function Et(e,n,l){return mt(e,n,l,!1)}var Rt=Et,$t=bt;Xe.Fragment=C,Xe.jsx=Rt,Xe.jsxs=$t}()),Xe}process.env.NODE_ENV==="production"?it.exports=St():it.exports=Pt();var t=it.exports;const Dt="MainButton-module__mainButton",Wt="MainButton-module__sm",Lt="MainButton-module__onlyIcon",Ot="MainButton-module__buttonSlot",At="MainButton-module__buttonLabel",Mt="MainButton-module__md",It="MainButton-module__lg",Bt="MainButton-module__xl",Vt="MainButton-module__xl2",Ht="MainButton-module__disabled",Ye={mainButton:Dt,sm:Wt,onlyIcon:Lt,buttonSlot:Ot,buttonLabel:At,md:Mt,lg:It,xl:Bt,xl2:Vt,disabled:Ht},at=({label:i,buttonType:f="button",onClick:r,size:C="md",disabled:w,withIcons:h,iconOne:E,iconTwo:y,onlyIcon:p,buttonStyle:_,labelStyle:u,buttonSlotStyle:k})=>t.jsx("button",{type:f,style:_&&typeof _=="object"?_:{},className:`${Ye.mainButton} ${p?Ye.onlyIcon:""} ${C?Ye[C]:""} ${w?Ye.disabled:""}`,onClick:()=>{r&&typeof r=="function"&&r()},children:t.jsxs("div",{className:Ye.buttonSlot,style:k??{},children:[p||h&&E?E:"",!p&&t.jsx("span",{style:u??{},className:Ye.buttonLabel,children:i??"Button"}),h&&y?y:""]})}),qt="FormInput-module__inputWrapper",Yt="FormInput-module__inputLabel",Ut="FormInput-module__required",zt="FormInput-module__inputContainer",Kt="FormInput-module__inputContent",Gt="FormInput-module__inputTags",Jt="FormInput-module__focused",Xt="FormInput-module__error",Zt="FormInput-module__rightIcon",Qt="FormInput-module__leftIcon",er="FormInput-module__inputDropDown",tr="FormInput-module__http",rr="FormInput-module__disabled",nr="FormInput-module__sm",or="FormInput-module__md",sr="FormInput-module__withCopy",ir="FormInput-module__inputHelperText",K={inputWrapper:qt,inputLabel:Yt,required:Ut,inputContainer:zt,inputContent:Kt,inputTags:Gt,focused:Jt,error:Xt,rightIcon:Zt,leftIcon:Qt,inputDropDown:er,http:tr,disabled:rr,sm:nr,md:or,withCopy:sr,inputHelperText:ir},xt=({width:i,height:f,color:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:i??"12",height:f??"8",viewBox:"0 0 12 8",fill:"none",children:t.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:r??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),ar=({width:i,height:f,color:r})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:i??"20",height:f??"20",viewBox:"0 0 20 20",fill:"none",children:[t.jsx("g",{clipPath:"url(#clip0_444_26)",children:t.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:r??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_444_26",children:t.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),ct=i=>t.jsx("svg",{xmlns:i.xmlns??"http://www.w3.org/2000/svg",width:i.width??"14",height:i.height??"14",viewBox:i.viewBox??"0 0 14 14",fill:i.fill??"none",children:t.jsx("path",{d:i.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:i.stroke??"#A4A7AE",strokeWidth:i.strokeWidth??"1.66667",strokeLinecap:i.strokeLinecap??"round",strokeLinejoin:i.strokeLinejoin??"round"})}),lr="Checkbox-module__checkboxWrapper",cr="Checkbox-module__sm",ur="Checkbox-module__md",dr="Checkbox-module__checkMark",fr="Checkbox-module__checked",pr="Checkbox-module__disabled",Ue={checkboxWrapper:lr,sm:cr,md:ur,checkMark:dr,checked:fr,disabled:pr},yt=({color:i,width:f,height:r})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:f??"12",height:r??"12",viewBox:"0 0 12 12",fill:"none",children:t.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:i??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),hr=i=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...i,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:t.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),ut=({checked:i,change:f,disabled:r,required:C,multipleChecked:w,size:h,activeStyle:E,checkBoxStyle:y})=>{const p=c.useRef(null),[_,u]=c.useState(!1),k=()=>{f&&typeof f=="function"&&f(!i)},g=()=>_?E??{}:y??{};return t.jsxs("div",{style:g(),className:`${Ue.checkboxWrapper} ${Ue[h]??Ue.md} ${i?Ue.checked:Ue.unChecked} ${r?Ue.disabled:""}`,onMouseDown:()=>u(!0),onMouseUp:()=>u(!1),onMouseLeave:()=>u(!1),onClick:k,children:[t.jsx("input",{ref:p,type:"checkbox",disabled:r,checked:i,hidden:!0,readOnly:!0,required:C??!1}),i?w?t.jsx(hr,{}):t.jsx(yt,{}):""]})},mr="Tag-module__tagContainer",vr="Tag-module__onlyLabel",_r="Tag-module__sm",xr="Tag-module__md",yr="Tag-module__lg",gr="Tag-module__tagLabel",Cr="Tag-module__tagNumber",jr="Tag-module__tagClose",ze={tagContainer:mr,onlyLabel:vr,sm:_r,md:xr,lg:yr,tagLabel:gr,tagNumber:Cr,tagClose:jr},dt=({id:i,label:f,icon:r,withClose:C,withCheckbox:w,withNumber:h,number:E,checkboxProps:y,disable:p,size:_,onClose:u,tagContainerStyle:k,tagLabelStyle:g,tagNumberStyle:P,tagCloseStlye:x})=>{const D=()=>!w&&!r&&!C&&!h,G=()=>r,s=()=>{u&&typeof u=="function"&&u(i??null)};return t.jsxs("div",{style:k??{},className:`${ze.tagContainer} ${D()?ze.onlyLabel:""} ${ze[_??"md"]}`,children:[w&&t.jsx(ut,{...y}),r&&G(),f&&t.jsx("p",{style:g??{},className:ze.tagLabel,children:f??""}),h&&t.jsx("div",{style:P??{},className:ze.tagNumber,children:E??""}),C&&t.jsx("div",{style:x??{},className:ze.tagClose,onClick:s,children:t.jsx(ct,{width:(x==null?void 0:x.width)??"14",height:(x==null?void 0:x.height)??"14",color:(x==null?void 0:x.color)??"#A4A7AE"})})]})},gt=({value:i,label:f,placeholder:r,required:C,disabled:w,type:h,size:E,onChange:y,onFouce:p,onBlur:_,msg:u,readOnly:k,maxLength:g,onlyText:P,tagValues:x,onRightIconIconClick:D,onRightIconIconMouseEnter:G,onRightIconIconMouseLeave:s,onLeftIconIconClick:R,onLeftIconIconMouseEnter:O,onLeftIconIconMouseLeave:A,onPressEnter:Z,rightIcon:ne,leftIcon:oe,withDropDown:ve,dropdownData:fe,onSelectData:Q,withTags:a,tagProps:ee,withLink:S,withCopy:J,onCopy:se,inputWrapperStyle:L,inputLabelStyle:pe,requiredStyle:Re,inputContainerStyle:Se,leftIconStyle:ie,inputDropDownStyle:je,ulStyle:M,liStyle:we,httpStyle:ae,inputStyle:U,rightIconStyle:le,withCopyStyle:ke,inputHelperTextStyle:z})=>{const[I,he]=c.useState(!1),Ne=c.useRef(null),[Pe,Fe]=c.useState(!1);c.useState(!1);const $e=c.useRef(null),ce=c.useRef(null),[te,_e]=c.useState(!1),[Te,xe]=c.useState(1),o=v=>{let q=v.target.value;q.length===1&&(q=q.trim()),y&&typeof y=="function"&&y(P?q.replace(/\d/g,""):q)},$=()=>{Fe(!0),p&&typeof p=="function"&&p()},B=()=>{Fe(!1),_&&typeof _=="function"&&_()},ye=v=>{const q=v.target.value,Be=q.length===0;h==="number"&&(v.keyCode===69||!Be&&(v.keyCode===187||v.keyCode===107||v.keyCode===189||v.keyCode===109))&&v.preventDefault(),v.key==="Enter"&&q&&q.length>0&&Z&&typeof Z=="function"&&Z(q)},Me=()=>{se&&typeof se=="function"&&se(i)},De=v=>v,Le=()=>{let v={};return J&&(v.borderTopRightRadius=0,v.borderBottomRightRadius=0,v.borderRight=0),ve&&(v.paddingLeft=0),{...v,...Se??{}}},be=v=>{!v.composedPath().includes(ce.current)&&v.composedPath().includes($e.current)||_e(!1)},Ie=v=>{xe(v.id),_e(!1),Q&&typeof Q=="function"&&Q(v)};c.useEffect(()=>{i&&i.length===0&&calculateWidth()},[i]),c.useEffect(()=>(document.addEventListener("click",be),()=>{document.removeEventListener("click",be)}),[]);const We=c.useRef(!1);return c.useEffect(()=>{We.current?setTimeout(()=>{he(v=>!v)},0):We.current=!0},[]),t.jsxs("div",{className:K.inputWrapper,style:L??{},children:[f&&t.jsxs("label",{className:K.inputLabel,style:pe??{},children:[f," ",t.jsx("span",{className:K.required,style:Re??{},children:C&&"*"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[t.jsxs("div",{style:Le(),className:`${K.inputContainer} ${Pe&&!k?K.focused:""} ${w?K.disabled:""} ${u!=null&&u.error?K.error:""} ${K[E??"sm"]}`,children:[!ve&&!S&&oe&&t.jsx("div",{className:K.leftIcon,style:ie??{},onClick:()=>{R&&typeof R=="function"&&R()},onMouseEnter:()=>{O&&typeof O=="function"&&O()},onMouseLeave:()=>{A&&typeof A=="function"&&A()},children:De(oe)}),!S&&ve&&t.jsxs("div",{className:K.inputDropDown,style:je??{},onClick:()=>_e(!0),ref:$e,children:[fe.find(v=>v.id===Te).label,te&&t.jsx("ul",{ref:ce,style:M??{},children:fe&&fe.length&&fe.map((v,q)=>t.jsx("li",{style:we??{},onClick:()=>Ie(v),children:(v==null?void 0:v.label)??"-"},v.id))}),t.jsx(xt,{})]}),S&&t.jsx("div",{className:`${K.inputDropDown} ${K.http}`,style:ae??{},onClick:()=>_e(!0),ref:$e,children:"http://"}),t.jsxs("div",{className:K.inputContent,children:[a&&x&&x.length>0&&t.jsx("div",{className:K.inputTags,children:x.map((v,q)=>t.jsx("div",{className:K.inputSingleTags,children:t.jsx(dt,{...ee,id:v,label:v,withClose:!0})},q))}),t.jsx("input",{ref:Ne,style:U??{},type:h??"text",value:i,onChange:v=>o(v),onFocus:$,onBlur:B,disabled:w,required:C,onKeyDown:ye,readOnly:k,spellCheck:!1,placeholder:r??"",autoComplete:"off",maxLength:g})]}),ne&&t.jsx("div",{className:K.rightIcon,style:le??{},onClick:()=>{D&&typeof D=="function"&&D()},onMouseEnter:()=>{G&&typeof G=="function"&&G()},onMouseLeave:()=>{s&&typeof s=="function"&&s()},children:De(ne)})]}),J&&t.jsxs("div",{style:ke??{},onClick:Me,className:K.withCopy,children:[t.jsx(ar,{}),"Copy"]})]}),u&&(u==null?void 0:u.visible)&&t.jsx("div",{style:z??{},className:`${K.inputHelperText} ${u!=null&&u.error?K.error:""}`,children:t.jsx("p",{style:(u==null?void 0:u.style)??{},children:u.text})})]})},wr="Textarea-module__textareaContainer",kr="Textarea-module__textAreaLabel",Tr="Textarea-module__required",br="Textarea-module__wrap",Er="Textarea-module__textarea",Rr="Textarea-module__focused",$r="Textarea-module__disabled",Nr="Textarea-module__error",Fr="Textarea-module__helperTextStyle",Ce={textareaContainer:wr,textAreaLabel:kr,required:Tr,wrap:br,textarea:Er,focused:Rr,disabled:$r,error:Nr,helperTextStyle:Fr},Sr=({width:i,height:f,color:r})=>t.jsxs("svg",{width:i??"16",height:f??"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("g",{id:"help-circle",clipPath:"url(#clip0_433_6293)",children:t.jsx("path",{id:"Icon",d:"M6.05992 5.99998C6.21665 5.55442 6.52602 5.17872 6.93322 4.9394C7.34042 4.70009 7.81918 4.61261 8.2847 4.69245C8.75022 4.7723 9.17246 5.01433 9.47664 5.37567C9.78081 5.737 9.94729 6.19433 9.94659 6.66665C9.94659 7.99998 7.94659 8.66665 7.94659 8.66665M7.99992 11.3333H8.00659M14.6666 7.99998C14.6666 11.6819 11.6818 14.6666 7.99992 14.6666C4.31802 14.6666 1.33325 11.6819 1.33325 7.99998C1.33325 4.31808 4.31802 1.33331 7.99992 1.33331C11.6818 1.33331 14.6666 4.31808 14.6666 7.99998Z",stroke:r??"#A4A7AE",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_433_6293",children:t.jsx("rect",{width:i??"16",height:f??"16",fill:"white"})})})]}),Pr=({placeholder:i,label:f,msg:r,cols:C,rows:w,value:h,maxLength:E,onChange:y,onFocus:p,onBlur:_,disabled:u,required:k,textareaContainerStyle:g,textareaLabelStyle:P,requiredStyle:x,textareaStyle:D,textareaHelperTextStyle:G})=>{const[s,R]=c.useState(!1),O=ne=>{let oe=ne.target.value;y&&typeof y=="function"&&y(oe)},A=()=>{R(!0),p&&typeof p=="function"&&p()},Z=()=>{R(!1),_&&typeof _=="function"&&_()};return t.jsxs("div",{style:g??{},className:`${Ce.textareaContainer} ${r!=null&&r.type&&(r!=null&&r.visible)?Ce[r==null?void 0:r.type]:""} ${u?Ce.disabled:null}`,children:[f&&t.jsxs("div",{style:P,className:Ce.textAreaLabel,children:[t.jsx("p",{children:f}),t.jsx("span",{style:x??{},className:Ce.required,children:k&&"*"}),t.jsx(Sr,{})]}),t.jsx("div",{className:Ce.wrap,children:t.jsx("textarea",{style:D??{},className:`${Ce.textarea} ${s?Ce.focused:""} ${u?Ce.disabled:""} ${r!=null&&r.error?Ce.error:""}`,value:h,placeholder:i??"",cols:C??"30",rows:w??"5",maxLength:E??null,onFocus:A,disabled:u,onBlur:Z,onChange:O})}),r&&(r==null?void 0:r.text)&&(r==null?void 0:r.text.length)>0&&t.jsx("div",{style:G??{},className:`${Ce.helperTextStyle} ${r!=null&&r.error?Ce.error:""}`,children:t.jsx("p",{style:(r==null?void 0:r.style)??{},children:r.text})})]})},Dr="Toggle-module__toggleWrapper",Wr="Toggle-module__toggleState",Lr="Toggle-module__checked",Or="Toggle-module__disabled",ot={toggleWrapper:Dr,toggleState:Wr,checked:Lr,disabled:Or},Ar=({checked:i,change:f,disabled:r,required:C,activeStyle:w,bgStyle:h,checkedBgStyle:E,disabledBgStyle:y,circleStyle:p,checkedCircleStyle:_,disabledCircleStyle:u})=>{const[k,g]=c.useState(!1),P=()=>{f&&typeof f=="function"&&f(!i)},x=()=>{if(k)return w??{};if(i){if(E)return E}else if(i){if(r&&y)return y}else if(h)return h;return{}},D=()=>{if(i){if(_)return _}else if(i){if(r&&u)return u}else if(p)return p;return{}};return t.jsx("div",{style:x(),onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onMouseLeave:()=>g(!1),onClick:P,className:`${ot.toggleWrapper} ${i?ot.checked:""} ${r?ot.disabled:""}`,children:t.jsx("div",{style:D(),className:ot.toggleState,children:t.jsx("input",{type:"checkbox",checked:i,readOnly:!0,disabled:r??!1,hidden:!0,required:C??!1})})})},Mr="Radio-module__radioWrapper",Ir="Radio-module__sm",Br="Radio-module__md",Vr="Radio-module__checked",Hr="Radio-module__innerCircle",qr="Radio-module__radioState",Yr="Radio-module__disabled",Ae={radioWrapper:Mr,sm:Ir,md:Br,checked:Vr,innerCircle:Hr,radioState:qr,disabled:Yr},Ct=({checked:i,change:f,disabled:r,isRequired:C,withUncheckState:w,size:h})=>{c.useState(!1);const E=()=>{f&&typeof f=="function"&&(w||!w&&!i)&&f(!0)};return t.jsxs("div",{className:`${Ae.radioWrapper} ${Ae[h]??Ae.md} ${i?Ae.checked:""} ${r?Ae.disabled:""}`,onClick:E,children:[t.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:r??!1,required:C??!1}),t.jsx("div",{className:Ae.radioState,children:t.jsx("div",{className:Ae.innerCircle})})]})},Ur="Dropdown-module__dropdownWrapper",zr="Dropdown-module__placeHolder",Kr="Dropdown-module__dropdownLabel",Gr="Dropdown-module__required",Jr="Dropdown-module__dropdownContainer",Xr="Dropdown-module__sm",Zr="Dropdown-module__md",Qr="Dropdown-module__selectedTags",en="Dropdown-module__selectedList",tn="Dropdown-module__additional",rn="Dropdown-module__dropdownList",nn="Dropdown-module__disabled",on="Dropdown-module__selected",sn="Dropdown-module__focused",an="Dropdown-module__error",ln="Dropdown-module__dropdownHelperText",re={dropdownWrapper:Ur,placeHolder:zr,dropdownLabel:Kr,required:Gr,dropdownContainer:Jr,sm:Xr,md:Zr,selectedTags:Qr,selectedList:en,additional:tn,dropdownList:rn,disabled:nn,selected:on,focused:sn,error:an,dropdownHelperText:ln},lt=({label:i,disabled:f,required:r,size:C="md",placeholder:w="placeholder",msg:h,readOnly:E,data:y,onSelect:p,selectedOptionID:_,withFilter:u,fixedDropdown:k=!1,onSearch:g,pagination:P,withMultiSelect:x=!1,skipSelected:D,labelIcon:G,closeIcon:s,dropdownIcon:R,iconDown:O,onLabelIconClick:A,onLabelIconMouseEnter:Z,onLabelIconMouseLeave:ne,dropdownWrapperStyle:oe,dropdownLabelStyle:ve,requiredStyle:fe,labelIconStyle:Q,dropdownContainerStyle:a,placeHolderStyle:ee,selectedTagsStyle:S,selectedListStyle:J,additionalStyle:se,dropdownListStyle:L,listStyle:pe})=>{const[Re,Se]=c.useState(!1),[ie,je]=c.useState(!1),M=c.useRef(y),[we,ae]=c.useState("");c.useState(null);const U=c.useRef([]),le=c.useRef(null),ke=c.useRef(null),z=c.useRef({}),I=(o,$)=>{const B=new Set;return o.filter(ye=>B.has(ye[$])?!1:(B.add(ye[$]),!0))},he=o=>{var $;M.current.forEach(B=>{o.id===B.id?B.selected=!0:B.selected=!1}),z.current=o,ae(($=z.current)==null?void 0:$.label),p&&typeof p=="function"&&p(z.current),je(!1)},Ne=o=>{U.current=[...U.current,...M.current.filter($=>$.id===o.id)],o.selected=!o.selected,U.current=I(U.current,"id").filter($=>$.selected),p&&typeof p=="function"&&p(U.current),ae(U.current.map($=>$.label).join(", ")),Se($=>!$)},Pe=o=>{o.stopPropagation(),U.current=[],_=null,M.current&&M.current.length>0&&y.forEach($=>$.selected=!1),p(x?[]:{}),ae("")},Fe=o=>{if(u&&!P)if(o&&o.length>0){let $=M.current.filter(B=>{var ye;return(ye=B==null?void 0:B.label)==null?void 0:ye.toLowerCase().includes(o.toLowerCase())});M.current=$}else M.current=y;g&&typeof g=="function"&&g(o),ae(o)},$e=()=>{if(_||_===0){let o=y.filter($=>Number($.id)===Number(_));o&&o[0]&&(z.current=o[0],D?(g&&typeof g=="function"&&g(z.current.label),ae(z.current.label),closeOnSelect&&setCollapsed($=>!1),withDropdownSearch&&DropdownSearchValue&&SetDropdownSearchValue("")):he(o[0]))}},ce=o=>o,te=c.useRef({top:0,left:0}),_e=o=>{o.composedPath().includes(le.current)||je(!1)},Te=o=>{if(k){if(o.composedPath().includes(le.current))return;je(!1)}},xe=()=>{const o=le.current.getBoundingClientRect(),$=6;te.current.width=o.width,te.current.left=o.left,te.current.top=o.top+o.height+$};return c.useEffect(()=>{x&&(U.current=M.current.filter(o=>o.selected),ae(M.current.filter(o=>o.selected).map(o=>o.label).join(", ")))},[]),c.useEffect(()=>{xe()},[le]),c.useEffect(()=>{x||$e()},[_]),c.useEffect(()=>(document.addEventListener("click",_e),document.addEventListener("click",Te),()=>{document.removeEventListener("click",_e),document.removeEventListener("click",Te)}),[]),t.jsxs("div",{className:re.dropdownWrapper,style:oe??{},children:[i&&t.jsxs("label",{className:re.dropdownLabel,style:ve??{},children:[i," ",t.jsx("span",{className:re.required,style:fe??{},children:r&&"*"}),t.jsxs("span",{style:{...Q??{},display:"grid",placeItems:"center"},onClick:()=>{A&&typeof A=="function"&&A()},onMouseEnter:()=>{Z&&typeof Z=="function"&&Z()},onMouseLeave:()=>{ne&&typeof ne=="function"&&ne()},children:[" ",ce(G)]})]}),t.jsxs("div",{ref:le,onClick:()=>(je(o=>!o),xe()),className:`${re.dropdownContainer} ${ie&&!E?re.focused:""} ${f?re.disabled:""} ${h!=null&&h.error?re.error:""} ${re[C]}`,style:a??{},children:[t.jsx("span",{className:re.placeHolder,style:ee??{},children:we&&we.length>0?"":w}),x&&t.jsxs("div",{className:re.selectedTags,style:S??{},children:[U.current.slice(0,3).map((o,$)=>{let B=U.current[U.current.length-1];return t.jsxs("span",{className:re.selectedList,style:J??{},children:[o.label,o.id!==B.id&&$!==2?", ":""]},o==null?void 0:o.id)}),U.current.length>3&&t.jsxs("span",{className:re.additional,style:se??{},children:[" ","+(",U.current.length-3,")"]})]}),R&&t.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:ce(R)}),t.jsx("input",{autoCorrect:"off",hidden:x,readOnly:!u||!ie||x,type:"text",value:we,onChange:o=>Fe(o.target.value)},_),ie&&M.current&&M.current.length>0&&t.jsx("ul",{onClick:o=>o.stopPropagation(),ref:ke,className:re.dropdownList,style:k?{...L??{},width:te.current.width,top:te.current.top,left:te.current.left,position:"fixed",zIndex:"150"}:{...L??{}},children:M.current.map(o=>t.jsxs("li",{style:pe??{},className:`${!(o!=null&&o.label)||o.label===void 0||o!=null&&o.disabled?re.disabled:""} ${o!=null&&o.selected?re.selected:""}`,onClick:()=>{x?Ne(o):he(o)},children:[t.jsxs("p",{children:[" ",o!=null&&o.label?typeof o.label=="function"?o.label():o.label:"-"]}),(o==null?void 0:o.selected)&&t.jsx("span",{children:t.jsx(yt,{color:"#7F56D9",width:20,height:20})})]},o==null?void 0:o.id))}),(U.current.length>0||we.length)>0&&t.jsx("div",{onClick:o=>Pe(o),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:s?ce(s):t.jsx(ct,{width:16,height:16})}),t.jsx("div",{style:{display:"grid",placeItems:"center",transform:ie?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:O?ce(O):t.jsx(xt,{})})]}),h&&(h==null?void 0:h.visible)&&t.jsx("div",{className:`${re.dropdownHelperText} ${h!=null&&h.error?re.error:""}`,children:!ie&&t.jsx("p",{style:(h==null?void 0:h.style)??{},children:h.text})})]})},cn="Tooltip-module__tooltipContainer",un="Tooltip-module__tooltipContent",dn="Tooltip-module__top",fn="Tooltip-module__right",pn="Tooltip-module__bottom",hn="Tooltip-module__left",mn="Tooltip-module__tooltipTitle",vn="Tooltip-module__tooltipText",Ke={tooltipContainer:cn,tooltipContent:un,top:dn,right:fn,bottom:pn,left:hn,tooltipTitle:mn,tooltipText:vn},_n=({children:i,tooltipSlot:f,delay:r,placement:C="top",trigger:w="hover",title:h,text:E,tooltipContentStyle:y,tooltipTitlestyle:p,tooltipTextStyle:_,pointerPosition:u="10%"})=>{const k=c.useRef(null),g=c.useRef(null);let P;const[x,D]=c.useState(!1),G=()=>{w==="hover"&&(P=setTimeout(()=>{D(!0)},r||400))},s=()=>{w==="hover"&&(clearTimeout(P),setTimeout(()=>{D(!1)},r||400))},R=()=>{w==="click"&&D(A=>!A)},O=A=>{A.composedPath().includes(k.current)||D(!1)};return c.useEffect(()=>(document.addEventListener("click",O),()=>{document.removeEventListener("click",O)}),[]),c.useEffect(()=>{const A=g.current;A&&A.style.setProperty("--pointer-position",`${u}`)},[x]),t.jsxs("div",{ref:k,className:Ke.tooltipContainer,onClick:R,onMouseEnter:G,onMouseLeave:s,children:[i,x&&f?f():x&&t.jsxs("div",{onClick:A=>A.stopPropagation(),ref:g,style:y??{},className:`${Ke.tooltipContent} ${C?Ke[C]:Ke.bottom}`,children:[h&&h.length>0&&t.jsx("h2",{className:Ke.tooltipTitle,style:p??{},children:h}),E&&E.length>0&&t.jsx("p",{className:Ke.tooltipText,style:_??{},children:E})]})]})},xn="Popup-module__modalOverlay",yn="Popup-module__popupDrawerMode",gn="Popup-module__popupContainer",Cn="Popup-module__EnterFromLeft",jn="Popup-module__fadeIn",wn="Popup-module__withOptions",kn="Popup-module__horizontal",Tn="Popup-module__popupHeader",bn="Popup-module__popupTitle",En="Popup-module__popupDescription",Rn="Popup-module__typeIcon",$n="Popup-module__icon",Nn="Popup-module__templateWrapper",Ee={modalOverlay:xn,popupDrawerMode:yn,popupContainer:gn,enterFromLeft:Cn,fadeIn:jn,withOptions:wn,horizontal:kn,popupHeader:Tn,popupTitle:bn,popupDescription:En,typeIcon:Rn,icon:$n,templateWrapper:Nn};location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const Fn=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Sn=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Pn=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),jt=({visible:i,template:f,options:r,children:C,onClickOutside:w,onClose:h,widthType:E,modalOverlayStyle:y,popupContainerStyle:p,templateWrapperStyle:_,popupHeaderStyle:u,popupTitleStyle:k})=>{const g=()=>{if(!(!r||!(r!=null&&r.type)))switch(String(r==null?void 0:r.type)){case"delete":return t.jsx(Pn,{});case"unsaved":return t.jsx(Sn,{});case"success":return t.jsx(Fn,{})}},P=()=>{h&&typeof h=="function"&&h(!1)},x=c.useRef(null),D=G=>{G.target===x.current&&w&&typeof w=="function"&&w(!1)};return c.useEffect(()=>(document.addEventListener("click",D),()=>{document.removeEventListener("click",D)}),[]),i&&t.jsx("div",{ref:x,style:y??{},className:`
|
|
32
32
|
mcModal_global
|
|
33
33
|
${Ee.modalOverlay}
|
|
34
34
|
${r&&r.mode==="drawer"?Ee.popupDrawerMode:""}
|
|
@@ -1022,7 +1022,7 @@ const Lt = "MainButton-module__mainButton", Ot = "MainButton-module__sm", At = "
|
|
|
1022
1022
|
onChange: A
|
|
1023
1023
|
}
|
|
1024
1024
|
) }),
|
|
1025
|
-
/* @__PURE__ */ t.jsx("div", { style: J ?? {}, className: `${we.helperTextStyle} ${r != null && r.error ? we.error : ""}`, children: /* @__PURE__ */ t.jsx("p", { style: (r == null ? void 0 : r.style) ?? {}, children: r.text }) })
|
|
1025
|
+
r && (r == null ? void 0 : r.text) && (r == null ? void 0 : r.text.length) > 0 && /* @__PURE__ */ t.jsx("div", { style: J ?? {}, className: `${we.helperTextStyle} ${r != null && r.error ? we.error : ""}`, children: /* @__PURE__ */ t.jsx("p", { style: (r == null ? void 0 : r.style) ?? {}, children: r.text }) })
|
|
1026
1026
|
]
|
|
1027
1027
|
}
|
|
1028
1028
|
);
|
|
@@ -1347,7 +1347,9 @@ const Lt = "MainButton-module__mainButton", Ot = "MainButton-module__sm", At = "
|
|
|
1347
1347
|
W(!0);
|
|
1348
1348
|
}, r || 400));
|
|
1349
1349
|
}, s = () => {
|
|
1350
|
-
j === "hover" && (
|
|
1350
|
+
j === "hover" && (clearTimeout(D), setTimeout(() => {
|
|
1351
|
+
W(!1);
|
|
1352
|
+
}, r || 400));
|
|
1351
1353
|
}, E = () => {
|
|
1352
1354
|
j === "click" && W((S) => !S);
|
|
1353
1355
|
}, A = (S) => {
|