@sorocraft/ui
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -1,2 +0,2 @@ | ||
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as n,Fragment as t,forwardRef as i,useEffect as l,useRef as a}from"react";import d from"react-dom";var r={avatar:"Avatar-module_avatar__5-kP8",image:"Avatar-module_image__HFFlp",clickable:"Avatar-module_clickable__DD7pl",editable:"Avatar-module_editable__CpXtw",editIcon:"Avatar-module_editIcon__ULUa1",overlay:"Avatar-module_overlay__d95aK",overlayText:"Avatar-module_overlayText__NgsFM",loading:"Avatar-module_loading__9gBDd",xxs:"Avatar-module_xxs__zCCH6",xs:"Avatar-module_xs__1SMBv",sm:"Avatar-module_sm__8TB22",md:"Avatar-module_md__zeW0d",lg:"Avatar-module_lg__MWKN-",xl:"Avatar-module_xl__KCqIL",xxl:"Avatar-module_xxl__ox6gi",xxxl:"Avatar-module_xxxl__9Cc7C",inline:"Avatar-module_inline__H0AhD",flexWide:"Avatar-module_flexWide__GQYaQ",slidein:"Avatar-module_slidein__KV8Ih",fadeInOut:"Avatar-module_fadeInOut__2M9tv",heightAnimation:"Avatar-module_heightAnimation__RCYYu",fadein:"Avatar-module_fadein__lENH2",floatAnimation:"Avatar-module_floatAnimation__PNWhi"},_=function(e,o,n){void 0===n&&(n=[]);var t=[];for(var i in o)o[i]&&t.push(e[i]);return(null==n?void 0:n.length)>0&&(t=t.concat(n)),t.join(" ")},u={container:"SVGIcon-module_container__z2RN5",isLoading:"SVGIcon-module_isLoading__8BhuU",fadeInOut:"SVGIcon-module_fadeInOut__EgbCf",flexWide:"SVGIcon-module_flexWide__IfOOF",slidein:"SVGIcon-module_slidein__RT6-4",heightAnimation:"SVGIcon-module_heightAnimation__CmY-x",fadein:"SVGIcon-module_fadein__Y2P5U",floatAnimation:"SVGIcon-module_floatAnimation__kH3Tr"},c=function(o){var n=o.icon,t=o.size,i=void 0===t?"sm":t,l=o.className,a=void 0===l?"":l,d=o.isLoading,r=void 0!==d&&d,c=function(e){switch(e){case"xxs":return 8;case"xs":return 12;case"sm":default:return 16;case"md":return 24;case"lg":return 32;case"xl":return 48;case"xxl":return 64;case"xxxl":return 128}}(i);return n?e("div",{className:_(u,{container:!0,isLoading:r},[a]),children:e(n,{className:a,width:c,height:c,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"})}):null},m=function(){return m=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},m.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var s,h=function(n){return o("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},n,{children:[e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 8.377c0-.35 0-.525.015-.673a3 3 0 0 1 2.69-2.69C4.851 5 5.035 5 5.404 5c.143 0 .214 0 .274-.004a2 2 0 0 0 1.735-1.25c.023-.056.044-.12.086-.246.042-.127.063-.19.086-.246a2 2 0 0 1 1.735-1.25C9.38 2 9.448 2 9.58 2h4.838c.133 0 .2 0 .26.004a2 2 0 0 1 1.735 1.25c.023.056.044.12.086.246.042.127.063.19.086.246a2 2 0 0 0 1.735 1.25c.06.004.131.004.273.004.37 0 .554 0 .702.015a3 3 0 0 1 2.69 2.69c.014.147.014.322.014.672V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2z"}),e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 16.5a4 4 0 1 0 0-8 4 4 0 0 0 0 8"})]}))},g=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 6 9 17l-5-5"})}))},f=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18 6-6-6-6"})}))},p=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0M6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21"})}))},v=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 16 4-4m0 0 4 4m-4-4v9m8-4.257A5.5 5.5 0 0 0 16.5 7a.62.62 0 0 1-.534-.302 7.5 7.5 0 1 0-11.78 9.096"})}))},I=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.316 19.438A4 4 0 0 1 9 17h6a4 4 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0m6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"})}))},D=function(n){var t=n.source,i=void 0===t?null:t,l=n.alt,a=void 0===l?"avatar":l,d=n.size,u=void 0===d?"sm":d,m=n.onClick,s=n.className,g=n.isEditable,f=void 0!==g&&g,p=n.overlayIcon,D=n.inline,L=void 0!==D&&D,A=n.isLoading,x=void 0!==A&&A,k=n.overlayText,w=function(){switch(u){case"xxxl":return 512;case"xxl":return 256;case"xl":return 128;case"lg":return 96;case"md":return 64;case"xs":return 32;case"xxs":return 24;default:return 48}};return o("div",{className:_(r,{avatar:!0,clickable:!!m||f,editable:f,inline:L,loading:x},[r[u],s]),onClick:m,style:{width:w(),height:w()},children:[i?e("img",{src:i,alt:a,className:r.image,width:w(),height:w()}):e(c,{size:u,icon:I}),f&&e("div",{className:r.editIcon,children:e(c,{isLoading:x,icon:x?v:h})}),(!!p||k)&&o("div",{className:r.overlay,children:[!!p&&e(c,{isLoading:x,icon:x?v:p}),!!k&&e("div",{className:r.overlayText,children:k})]})]})},L={container:"Button-module_container__0j8md",confirm:"Button-module_confirm__N5z4A",confirmActions:"Button-module_confirmActions__Xh7kN",button:"Button-module_button__18Bed",label:"Button-module_label__1PsXG",light:"Button-module_light__oUjYe",lightDark:"Button-module_lightDark__vucG6",active:"Button-module_active__UeHD7",lightDanger:"Button-module_lightDanger__aDpy8",lightInfo:"Button-module_lightInfo__oCfFI",lightPrimary:"Button-module_lightPrimary__f7-kQ",lightSecondary:"Button-module_lightSecondary__YK-QR",lightWarning:"Button-module_lightWarning__-Ogcg",lightSuccess:"Button-module_lightSuccess__gSt46",primary:"Button-module_primary__st6yY",secondary:"Button-module_secondary__j-3rj",danger:"Button-module_danger__Hxs5n",dark:"Button-module_dark__T7dl8",info:"Button-module_info__2z1ZG",success:"Button-module_success__CHTsg",warning:"Button-module_warning__1voOb",whiteText:"Button-module_whiteText__12xTM",default:"Button-module_default__TZZU2",borderedPrimary:"Button-module_borderedPrimary__KrZVT",borderedSecondary:"Button-module_borderedSecondary__UPNks",small:"Button-module_small__zfmcP",xsmall:"Button-module_xsmall__QS3d-",fullWidth:"Button-module_fullWidth__AHpSl",flexWide:"Button-module_flexWide__xDrEF",slidein:"Button-module_slidein__ofhlO",fadeInOut:"Button-module_fadeInOut__nAOqm",heightAnimation:"Button-module_heightAnimation__fLFCd",fadein:"Button-module_fadein__pspkB",floatAnimation:"Button-module_floatAnimation__0PYtT"};!function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.DANGER="danger",e.SUCCESS="success",e.WARNING="warning",e.INFO="info",e.LIGHT="light",e.DEFAULT="default",e.DARK="dark",e.LIGHT_PRIMARY="lightPrimary",e.LIGHT_SUCCESS="lightSuccess",e.LIGHT_WARNING="lightWarning",e.LIGHT_INFO="lightInfo",e.LIGHT_DANGER="lightDanger",e.LIGHT_DARK="lightDark",e.LIGHT_SECONDARY="lightSecondary",e.WHITE_TEXT="whiteText",e.BORDERED_PRIMARY="borderedPrimary",e.BORDERED_SECONDARY="borderedSecondary"}(s||(s={}));var A,x=function(i){var l=i.type,a=void 0===l?s.PRIMARY:l,d=i.onClick,r=i.label,u=i.icon,m=i.fullWidth,h=void 0!==m&&m,g=i.isLoading,f=i.disabled,p=i.className,v=i.needConfirm,I=void 0!==v&&v,D=i.size,A=void 0===D?"standard":D,k=n(!1),w=k[0],y=k[1];return o("div",{className:_(L,{container:!0,fullWidth:h}),children:[e("button",{className:_(L,{button:!0,loading:!!g},[L[a],L[A],p]),onClick:I?function(){return y(!w)}:d,disabled:g||f,children:g?e(t,{children:"Loading..."}):o("div",{className:L.label,children:[u&&e(c,{icon:u}),e("span",{children:r})]})}),w&&o("div",{className:L.confirm,children:[e("div",{className:L.confirmMessage,children:"Are you sure?"}),o("div",{className:L.confirmActions,children:[e(x,{type:s.DANGER,onClick:function(){return y(!1)},label:"No"}),e(x,{type:s.SUCCESS,onClick:function(){y(!1),d()},label:"Yes"})]})]})]})},k={iconButton:"IconButton-module_iconButton__PmpB8",noPadding:"IconButton-module_noPadding__Jd2rK",lg:"IconButton-module_lg__KG7lp",md:"IconButton-module_md__s4q7b",sm:"IconButton-module_sm__are9s",xs:"IconButton-module_xs__qYwZc",confirm:"IconButton-module_confirm__-jXH4",confirmActions:"IconButton-module_confirmActions__j7-Tt",bottom:"IconButton-module_bottom__AEpND",disabled:"IconButton-module_disabled__pLK-t",white:"IconButton-module_white__AzyNN",light:"IconButton-module_light__i3AET",active:"IconButton-module_active__popsF",lightDark:"IconButton-module_lightDark__d7NQy",lightDanger:"IconButton-module_lightDanger__bIg02",lightInfo:"IconButton-module_lightInfo__820It",lightPrimary:"IconButton-module_lightPrimary__SCrg-",lightSecondary:"IconButton-module_lightSecondary__vN-aS",lightWarning:"IconButton-module_lightWarning__z1iaR",lightSuccess:"IconButton-module_lightSuccess__mUSnD",primary:"IconButton-module_primary__qjfR5",secondary:"IconButton-module_secondary__-CufX",danger:"IconButton-module_danger__lz3tP",dark:"IconButton-module_dark__QiBJk",info:"IconButton-module_info__eawU-",success:"IconButton-module_success__xkDzZ",warning:"IconButton-module_warning__DhbfD",whiteText:"IconButton-module_whiteText__111Ju",default:"IconButton-module_default__j2U57",borderedPrimary:"IconButton-module_borderedPrimary__DHXJQ",borderedSecondary:"IconButton-module_borderedSecondary__13GNA",flexWide:"IconButton-module_flexWide__BGOfY",slidein:"IconButton-module_slidein__Rmpl5",fadeInOut:"IconButton-module_fadeInOut__Z2E5a",heightAnimation:"IconButton-module_heightAnimation__JnqnZ",fadein:"IconButton-module_fadein__uX9ut",floatAnimation:"IconButton-module_floatAnimation__N-INw"},w=function(t){var i=t.icon,l=t.onClick,a=t.type,d=void 0===a?s.DEFAULT:a,r=t.needConfirm,u=void 0!==r&&r,m=t.noPadding,h=void 0!==m&&m,g=t.isLoading,f=void 0!==g&&g,p=t.size,v=void 0===p?"sm":p,I=t.confirmPosition,D=void 0===I?"top":I,L=n(!1),A=L[0],w=L[1];return o("div",{className:_(k,{iconButton:!0,noPadding:h},[k[d],k[v]]),onClick:f?void 0:u?function(){return w(!A)}:l,children:[e(c,{isLoading:f,icon:i,size:v}),A&&o("div",{className:"".concat(k.confirm," ").concat(k[D]),children:[e("div",{className:k.confirmMessage,children:"Are you sure?"}),o("div",{className:k.confirmActions,children:[e(x,{type:s.DANGER,onClick:function(){return w(!1)},label:"No",size:"small"}),e(x,{type:s.SUCCESS,onClick:l,label:"Yes",size:"small"})]})]})]})},y={listItem:"ListItem-module_listItem__ljWE5",separator:"ListItem-module_separator__CIXS1",dashedSeparator:"ListItem-module_dashedSeparator__SYWNX",content:"ListItem-module_content__mPC1D",data:"ListItem-module_data__e0N6V",title:"ListItem-module_title__YkOz9",subtitle:"ListItem-module_subtitle__5flJp",indicator:"ListItem-module_indicator__BwMsO",success:"ListItem-module_success__lgO8z",info:"ListItem-module_info__MKMBu",warning:"ListItem-module_warning__8P-nA",danger:"ListItem-module_danger__sWYOu",primary:"ListItem-module_primary__-bA-W",completed:"ListItem-module_completed__ovBl4",flexWide:"ListItem-module_flexWide__-0Q5a",slidein:"ListItem-module_slidein__dGxX-",fadeInOut:"ListItem-module_fadeInOut__Yuwsd",heightAnimation:"ListItem-module_heightAnimation__aVO2o",fadein:"ListItem-module_fadein__GSr23",floatAnimation:"ListItem-module_floatAnimation__efvAy"},B=function(n){var t=n.title,i=n.subtitle,l=n.actionTitle,a=void 0===l?"":l,d=n.action,r=n.completed,u=n.indicator,m=n.hasSeparator,s=void 0!==m&&m,h=n.hasDashedSeparator,f=void 0!==h&&h,p=n.isActionPending,v=void 0!==p&&p;return o("div",{className:_(y,{listItem:!0,separator:s,dashedSeparator:f}),children:[o("div",{className:y.content,children:[u&&e("div",{className:_(y,{indicator:!0},[y[u]])}),o("div",{className:y.data,children:[e("div",{className:y.title,children:t}),i&&e("div",{className:y.subtitle,children:i})]})]}),d&&e(x,{onClick:d,className:y.action,label:a,isLoading:v}),r&&e("div",{className:y.completed,children:e(c,{icon:g})})]})},b={link:"Link-module_link__35Vo1",fullWidth:"Link-module_fullWidth__eg45D",zero:"Link-module_zero__e-EXa",xxs:"Link-module_xxs__DLzl2",xs:"Link-module_xs__K3V8L",s:"Link-module_s__Ojcbu",m:"Link-module_m__KQ9M4",lg:"Link-module_lg__R71ff",xl:"Link-module_xl__q05MB",light:"Link-module_light__Ji8kV",active:"Link-module_active__iCkL0",lightDark:"Link-module_lightDark__1fDCG",lightDanger:"Link-module_lightDanger__lB9Tb",lightInfo:"Link-module_lightInfo__h5lfu",lightPrimary:"Link-module_lightPrimary__aZxve",lightSecondary:"Link-module_lightSecondary__QHh0c",lightWarning:"Link-module_lightWarning__iOuMw",lightSuccess:"Link-module_lightSuccess__zDBp0",primary:"Link-module_primary__CE3uj",secondary:"Link-module_secondary__KSolI",danger:"Link-module_danger__ugf9r",dark:"Link-module_dark__ap0Ls",info:"Link-module_info__9skpg",success:"Link-module_success__DwP-V",warning:"Link-module_warning__FhhXi",whiteText:"Link-module_whiteText__t7SOQ",default:"Link-module_default__3TBlr",borderedPrimary:"Link-module_borderedPrimary__RfPen",borderedSecondary:"Link-module_borderedSecondary__xTeGX",flexWide:"Link-module_flexWide__3A6ZB",slidein:"Link-module_slidein__kBzO4",fadeInOut:"Link-module_fadeInOut__zas8c",heightAnimation:"Link-module_heightAnimation__N7y-w",fadein:"Link-module_fadein__WxUdb",floatAnimation:"Link-module_floatAnimation__XrwU5"},C=function(n){var t=n.href,i=n.title,l=n.target,a=void 0===l?"_self":l,d=n.type,r=void 0===d?s.DEFAULT:d,u=n.padding,m=void 0===u?"zero":u,h=n.hasChevron,g=void 0!==h&&h,p=n.fullWidth;return o("a",{href:t,target:a,rel:"noopener noreferrer",className:_(b,{link:!0,fullWidth:void 0!==p&&p},[b[r],b[m]]),children:[e("span",{children:i})," ",g&&e(c,{icon:f})]})},N={input:"Input-module_input__505b7",full:"Input-module_full__h2smD",noMargin:"Input-module_noMargin__ysWuN",container:"Input-module_container__itXJp",colorPicker:"Input-module_colorPicker__Efa-c",required:"Input-module_required__kHc93",addon:"Input-module_addon__1cKdz",pointer:"Input-module_pointer__EsKoB",error:"Input-module_error__38tit",avatar:"Input-module_avatar__GJUWC",autoCompleteContent:"Input-module_autoCompleteContent__4anQc",reversed:"Input-module_reversed__dU1hV",transparent:"Input-module_transparent__ko36m",small:"Input-module_small__5vYiK",xsmall:"Input-module_xsmall__-9hXW",hasAddon:"Input-module_hasAddon__mruPW",flexWide:"Input-module_flexWide__4Wn1k",slidein:"Input-module_slidein__XYim1",fadeInOut:"Input-module_fadeInOut__bnAwc",heightAnimation:"Input-module_heightAnimation__tmt9Z",fadein:"Input-module_fadein__1HtqV",floatAnimation:"Input-module_floatAnimation__sYawG"};!function(e){e.TEXT="text",e.PASSWORD="password",e.EMAIL="email",e.NUMBER="number",e.URL="url",e.TEL="tel",e.DATE="date",e.DATETIME="datetime",e.SELECT="select",e.COLOR_PICKER="color-picker",e.TEXT_AREA="text-area",e.AVATAR_UPLOAD="avatar-upload",e.UPLOAD_IMAGE_ICON="upload-image-icon"}(A||(A={}));var S=i((function(n,i){var l=n.type,a=void 0===l?A.TEXT:l,d=n.label,r=n.placeholder,u=n.value,s=n.required,h=void 0!==s&&s,g=n.addonIcon,f=n.labelAddon,v=n.errorMessage,I=n.options,L=void 0===I?[]:I,x=n.fullWidth,k=n.avatarSize,w=n.source,y=n.autoCompleteContent,B=n.autoCompleteReverse,b=void 0!==B&&B,C=n.noMargin,S=void 0!==C&&C,O=n.isDisabled,E=void 0!==O&&O,W=n.isLoading,T=void 0!==W&&W,P=n.isMultiUpload,R=void 0!==P&&P,M=n.autoFocus,z=void 0!==M&&M,G=n.theme,U=void 0===G?"oval":G,Y=n.size,j=void 0===Y?"medium":Y,F=n.onBlur,H=n.onFocus,V=n.onChange,X=n.addonAction,K=n.onEnter,Z=n.onEsc,q=n.onFileSelect,Q=n.onFilesSelect,J=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)o.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n}(n,["type","label","placeholder","value","required","addonIcon","labelAddon","errorMessage","options","fullWidth","avatarSize","source","autoCompleteContent","autoCompleteReverse","noMargin","isDisabled","isLoading","isMultiUpload","autoFocus","theme","size","onBlur","onFocus","onChange","addonAction","onEnter","onEsc","onFileSelect","onFilesSelect"]),$=E||T,ee=function(e){switch(e.key){case"Enter":K&&K();break;case"Escape":Z&&Z()}},oe=function(e){var o=e.target.files[0],n=new FileReader;n.onload=function(){q&&q(o,n.result)},n.readAsDataURL(o)},ne=function(e){var o=e.target;Q&&Q(o.files)};return o("div",{className:_(N,{input:!0,full:!!x,noMargin:S,hasAddon:!!g},[N[U],N[j]]),children:[d&&o("label",{children:[e("span",{className:h?N.required:"",children:d}),!!f&&e("div",{className:N.labelAddon,children:f})]}),e("div",{className:N.container,children:function(){switch(a){case A.SELECT:return o("select",m({className:N.field,value:u,onBlur:F,onFocus:H,onChange:V,ref:i},J,{children:[e("option",{value:"",children:r}),L.map((function(o){var n=o.label,t=o.value;return e("option",{value:t,children:n},t)}))]}));case A.COLOR_PICKER:return e("input",m({className:"".concat(N.field," ").concat(N.colorPicker),type:"color",value:u,placeholder:r,onBlur:F,onFocus:H,onChange:V,disabled:$,ref:i},J));case A.TEXT_AREA:return e("textarea",m({className:N.field,value:u,placeholder:r,onBlur:F,onFocus:H,onChange:V,autoFocus:z,ref:i},J));case A.AVATAR_UPLOAD:return o("label",{htmlFor:"avatar-upload",children:[e(D,{size:k,source:w,isLoading:T,isEditable:!0}),e("input",{type:"file",name:"avatar-upload",id:"avatar-upload",accept:"image/*",onChange:R?ne:oe,ref:i,className:N.avatar,disabled:$,multiple:R})]});case A.UPLOAD_IMAGE_ICON:return o("label",{htmlFor:"upload-image-icon",children:[e(c,{icon:p,isLoading:T,size:"md"}),e("input",{type:"file",name:"upload-image-icon",id:"upload-image-icon",accept:"image/*",onChange:R?ne:oe,ref:i,className:N.avatar,disabled:$,multiple:R})]});default:return o(t,{children:[e("input",m({className:N.field,type:a,placeholder:r,value:u,onBlur:F,onFocus:H,onChange:V,onKeyUp:ee,ref:i,disabled:$,autoFocus:z},J)),g&&e("div",{className:X?"".concat(N.addon," ").concat(N.pointer):N.addon,onClick:X,children:e(c,{icon:g,isLoading:T})})]})}}()}),!!v&&e("div",{className:N.error,children:v}),!!y&&e("div",{className:_(N,{autoCompleteContent:!0,reversed:b}),children:y})]})})),O={menu:"DropDown-module_menu__gRW7p",container:"DropDown-module_container__ms9Bn",action:"DropDown-module_action__D8KuY",light:"DropDown-module_light__6NSjI",active:"DropDown-module_active__rGcA2",lightDark:"DropDown-module_lightDark__Ctspk",lightDanger:"DropDown-module_lightDanger__FaZ6G",lightInfo:"DropDown-module_lightInfo__DMaJO",lightPrimary:"DropDown-module_lightPrimary__sobOp",lightSecondary:"DropDown-module_lightSecondary__PB0m-",lightWarning:"DropDown-module_lightWarning__mkeGN",lightSuccess:"DropDown-module_lightSuccess__QNoVS",primary:"DropDown-module_primary__9-x6Y",secondary:"DropDown-module_secondary__HBses",danger:"DropDown-module_danger__ZbPY6",dark:"DropDown-module_dark__3YhdZ",info:"DropDown-module_info__5qwW6",success:"DropDown-module_success__NbhHj",warning:"DropDown-module_warning__MrYwV",whiteText:"DropDown-module_whiteText__eVLut",default:"DropDown-module_default__D0DNi",borderedPrimary:"DropDown-module_borderedPrimary__oTb-J",borderedSecondary:"DropDown-module_borderedSecondary__GqWsA",xsmall:"DropDown-module_xsmall__Mc6Zx",small:"DropDown-module_small__Goyza",large:"DropDown-module_large__P5F--",flexWide:"DropDown-module_flexWide__ySVZv",slidein:"DropDown-module_slidein__ZYDXA",fadeInOut:"DropDown-module_fadeInOut__hjIWL",heightAnimation:"DropDown-module_heightAnimation__EUum9",fadein:"DropDown-module_fadein__D2VO0",floatAnimation:"DropDown-module_floatAnimation__z5DD5"},E=function(e,o){var n=function(n){e.current&&!e.current.contains(n.target)&&o()};l((function(){return document.addEventListener("click",n),function(){document.removeEventListener("click",n)}}),[])},W=function(o){var t=o.containerRef,i=o.contentRef,a=o.isOpen,r=void 0!==a&&a,_=o.renderChild,u=o.onClose,c={isOpen:!1,top:0,left:0,bottom:0,right:0},s=n(c),h=s[0],g=s[1],f={position:"absolute",top:h.top,left:h.left,bottom:h.bottom,right:h.right,zIndex:111},p=function(){g(c),u()};return E(t,(function(){return p()})),l((function(){if(r)return function(){var e,o,n,l,a,d,r,_=null!==(n=null===(o=null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.getBoundingClientRect)||void 0===o?void 0:o.call(e))&&void 0!==n?n:{top:0,left:0,height:0,width:0},u=_.top,c=_.left,s=_.height,h=_.width,f=window.innerHeight,p=window.innerWidth,v=f-(u+s),I=u,D=c,L=p-(c+h),A=null!==(a=null===(l=null==i?void 0:i.current)||void 0===l?void 0:l.clientHeight)&&void 0!==a?a:200,x=null!==(r=null===(d=null==i?void 0:i.current)||void 0===d?void 0:d.clientWidth)&&void 0!==r?r:200,k="auto",w="auto",y="auto",B="auto";v<A&&I>=A?B=f-u-s+20:w=u+s+5,L<x&&D>=x?y=p-c:k=c,g(m(m({},{top:w,left:k,right:y,bottom:B}),{isOpen:!0}))}();p()}),[r,null==t?void 0:t.current]),h.isOpen?d.createPortal(e("div",{style:f,onClick:function(e){e.stopPropagation()},children:_(h)}),document.getElementById("portals")):null},T=function(o){var n=o.children;return e("div",{className:O.menu,children:n})},P=function(t){var i=t.action,d=t.menu,r=t.type,u=void 0===r?s.DEFAULT:r,c=t.closeRef,m=t.actionSize,h=void 0===m?"medium":m,g=a(null),f=a(null),p=a(null),v=n(!1),I=v[0],D=v[1],L=function(){return D(!1)};return l((function(){(null==c?void 0:c.current)&&(c.current={close:function(){return L()}})}),[c]),o("div",{className:O.container,ref:g,children:[e("div",{className:_(O,{action:!0},[O[u],O[h]]),ref:p,onClick:function(){return D(!I)},children:i}),e(W,{containerRef:g,contentRef:f,isOpen:I,onClose:L,renderChild:function(){return e("div",{className:O.menuContainer,ref:f,children:e(T,{children:d})})}})]})},R={container:"LoadingItem-module_container__ujRaI",fadeInOut:"LoadingItem-module_fadeInOut__HDJT8",square:"LoadingItem-module_square__OucYB",xxs:"LoadingItem-module_xxs__kTYcZ",xs:"LoadingItem-module_xs__sISZM",sm:"LoadingItem-module_sm__hsDHD",md:"LoadingItem-module_md__bU5yA",lg:"LoadingItem-module_lg__9sK4b",xl:"LoadingItem-module_xl__O0kH8",xxl:"LoadingItem-module_xxl__tIjdb",xxxl:"LoadingItem-module_xxxl__h73z5",xxxxl:"LoadingItem-module_xxxxl__XTzwy",flexWide:"LoadingItem-module_flexWide__sIJC3",slidein:"LoadingItem-module_slidein__8J982",heightAnimation:"LoadingItem-module_heightAnimation__cUh26",fadein:"LoadingItem-module_fadein__-CmLg",floatAnimation:"LoadingItem-module_floatAnimation__gQ2jh"},M=function(o){var n=o.shape,t=void 0===n?"square":n,i=o.size,l=void 0===i?"md":i,a=o.width,d=o.height;return e("div",{className:_(R,{container:!0},[R[t],R[l]]),style:{width:a,height:d}})},z=function(e){return null==e||("object"==typeof e?Array.isArray(e)?0===e.length:e instanceof Set||e instanceof Map?0===e.size:0===Object.keys(e).length:"string"==typeof e&&0===e.length)};export{D as Avatar,x as Button,P as DropDown,w as IconButton,S as Input,A as InputType,C as Link,B as ListItem,M as LoadingItem,c as SVGIcon,s as UIElementType,_ as classNames,z as isEmpty,E as useClickOutside}; | ||
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useState as n,Fragment as t,forwardRef as i,useEffect as l,useRef as a}from"react";import d from"react-dom";var r={avatar:"Avatar-module_avatar__5-kP8",image:"Avatar-module_image__HFFlp",clickable:"Avatar-module_clickable__DD7pl",editable:"Avatar-module_editable__CpXtw",editIcon:"Avatar-module_editIcon__ULUa1",overlay:"Avatar-module_overlay__d95aK",overlayText:"Avatar-module_overlayText__NgsFM",loading:"Avatar-module_loading__9gBDd",xxs:"Avatar-module_xxs__zCCH6",xs:"Avatar-module_xs__1SMBv",sm:"Avatar-module_sm__8TB22",md:"Avatar-module_md__zeW0d",lg:"Avatar-module_lg__MWKN-",xl:"Avatar-module_xl__KCqIL",xxl:"Avatar-module_xxl__ox6gi",xxxl:"Avatar-module_xxxl__9Cc7C",inline:"Avatar-module_inline__H0AhD",flexWide:"Avatar-module_flexWide__GQYaQ",slidein:"Avatar-module_slidein__KV8Ih",fadeInOut:"Avatar-module_fadeInOut__2M9tv",heightAnimation:"Avatar-module_heightAnimation__RCYYu",fadein:"Avatar-module_fadein__lENH2",floatAnimation:"Avatar-module_floatAnimation__PNWhi"},_=function(e,o,n){void 0===n&&(n=[]);var t=[];for(var i in o)o[i]&&t.push(e[i]);return(null==n?void 0:n.length)>0&&(t=t.concat(n)),t.join(" ")},u={container:"SVGIcon-module_container__z2RN5",isLoading:"SVGIcon-module_isLoading__8BhuU",fadeInOut:"SVGIcon-module_fadeInOut__EgbCf",flexWide:"SVGIcon-module_flexWide__IfOOF",slidein:"SVGIcon-module_slidein__RT6-4",heightAnimation:"SVGIcon-module_heightAnimation__CmY-x",fadein:"SVGIcon-module_fadein__Y2P5U",floatAnimation:"SVGIcon-module_floatAnimation__kH3Tr"},c=function(o){var n=o.icon,t=o.size,i=void 0===t?"sm":t,l=o.className,a=void 0===l?"":l,d=o.isLoading,r=void 0!==d&&d,c=function(e){switch(e){case"xxs":return 8;case"xs":return 12;case"sm":default:return 16;case"md":return 24;case"lg":return 32;case"xl":return 48;case"xxl":return 64;case"xxxl":return 128}}(i);return n?e("div",{className:_(u,{container:!0,isLoading:r},[a]),children:e(n,{className:a,width:c,height:c,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"})}):null},m=function(){return m=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},m.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var s,h=function(n){return o("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},n,{children:[e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 8.377c0-.35 0-.525.015-.673a3 3 0 0 1 2.69-2.69C4.851 5 5.035 5 5.404 5c.143 0 .214 0 .274-.004a2 2 0 0 0 1.735-1.25c.023-.056.044-.12.086-.246.042-.127.063-.19.086-.246a2 2 0 0 1 1.735-1.25C9.38 2 9.448 2 9.58 2h4.838c.133 0 .2 0 .26.004a2 2 0 0 1 1.735 1.25c.023.056.044.12.086.246.042.127.063.19.086.246a2 2 0 0 0 1.735 1.25c.06.004.131.004.273.004.37 0 .554 0 .702.015a3 3 0 0 1 2.69 2.69c.014.147.014.322.014.672V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2z"}),e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 16.5a4 4 0 1 0 0-8 4 4 0 0 0 0 8"})]}))},g=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 6 9 17l-5-5"})}))},f=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18 6-6-6-6"})}))},p=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0M6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21"})}))},v=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 16 4-4m0 0 4 4m-4-4v9m8-4.257A5.5 5.5 0 0 0 16.5 7a.62.62 0 0 1-.534-.302 7.5 7.5 0 1 0-11.78 9.096"})}))},I=function(o){return e("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.316 19.438A4 4 0 0 1 9 17h6a4 4 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0m6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"})}))},x=function(n){var t=n.source,i=void 0===t?null:t,l=n.alt,a=void 0===l?"avatar":l,d=n.size,u=void 0===d?"sm":d,m=n.onClick,s=n.className,g=n.isEditable,f=void 0!==g&&g,p=n.overlayIcon,x=n.inline,L=void 0!==x&&x,D=n.isLoading,A=void 0!==D&&D,k=n.overlayText,w=function(){switch(u){case"xxxl":return 512;case"xxl":return 256;case"xl":return 128;case"lg":return 96;case"md":return 64;case"xs":return 32;case"xxs":return 24;default:return 48}};return o("div",{className:_(r,{avatar:!0,clickable:!!m||f,editable:f,inline:L,loading:A},[r[u],s]),onClick:m,style:{width:w(),height:w()},children:[i?e("img",{src:i,alt:a,className:r.image,width:w(),height:w()}):e(c,{size:u,icon:I}),f&&e("div",{className:r.editIcon,children:e(c,{isLoading:A,icon:A?v:h})}),(!!p||k)&&o("div",{className:r.overlay,children:[!!p&&e(c,{isLoading:A,icon:A?v:p}),!!k&&e("div",{className:r.overlayText,children:k})]})]})},L={container:"Button-module_container__0j8md",confirm:"Button-module_confirm__N5z4A",confirmActions:"Button-module_confirmActions__Xh7kN",button:"Button-module_button__18Bed",label:"Button-module_label__1PsXG",light:"Button-module_light__oUjYe",lightDark:"Button-module_lightDark__vucG6",active:"Button-module_active__UeHD7",lightDanger:"Button-module_lightDanger__aDpy8",lightInfo:"Button-module_lightInfo__oCfFI",lightPrimary:"Button-module_lightPrimary__f7-kQ",lightSecondary:"Button-module_lightSecondary__YK-QR",lightWarning:"Button-module_lightWarning__-Ogcg",lightSuccess:"Button-module_lightSuccess__gSt46",primary:"Button-module_primary__st6yY",secondary:"Button-module_secondary__j-3rj",danger:"Button-module_danger__Hxs5n",dark:"Button-module_dark__T7dl8",info:"Button-module_info__2z1ZG",success:"Button-module_success__CHTsg",warning:"Button-module_warning__1voOb",whiteText:"Button-module_whiteText__12xTM",default:"Button-module_default__TZZU2",borderedPrimary:"Button-module_borderedPrimary__KrZVT",borderedSecondary:"Button-module_borderedSecondary__UPNks",small:"Button-module_small__zfmcP",xsmall:"Button-module_xsmall__QS3d-",fullWidth:"Button-module_fullWidth__AHpSl",flexWide:"Button-module_flexWide__xDrEF",slidein:"Button-module_slidein__ofhlO",fadeInOut:"Button-module_fadeInOut__nAOqm",heightAnimation:"Button-module_heightAnimation__fLFCd",fadein:"Button-module_fadein__pspkB",floatAnimation:"Button-module_floatAnimation__0PYtT"};!function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.DANGER="danger",e.SUCCESS="success",e.WARNING="warning",e.INFO="info",e.LIGHT="light",e.DEFAULT="default",e.DARK="dark",e.LIGHT_PRIMARY="lightPrimary",e.LIGHT_SUCCESS="lightSuccess",e.LIGHT_WARNING="lightWarning",e.LIGHT_INFO="lightInfo",e.LIGHT_DANGER="lightDanger",e.LIGHT_DARK="lightDark",e.LIGHT_SECONDARY="lightSecondary",e.WHITE_TEXT="whiteText",e.BORDERED_PRIMARY="borderedPrimary",e.BORDERED_SECONDARY="borderedSecondary"}(s||(s={}));var D,A=function(i){var l=i.type,a=void 0===l?s.PRIMARY:l,d=i.onClick,r=i.label,u=i.icon,m=i.fullWidth,h=void 0!==m&&m,g=i.isLoading,f=i.disabled,p=i.className,v=i.needConfirm,I=void 0!==v&&v,x=i.size,D=void 0===x?"standard":x,k=n(!1),w=k[0],y=k[1];return o("div",{className:_(L,{container:!0,fullWidth:h}),children:[e("button",{className:_(L,{button:!0,loading:!!g},[L[a],L[D],p]),onClick:I?function(){return y(!w)}:d,disabled:g||f,children:g?e(t,{children:"Loading..."}):o("div",{className:L.label,children:[u&&e(c,{icon:u}),e("span",{children:r})]})}),w&&o("div",{className:L.confirm,children:[e("div",{className:L.confirmMessage,children:"Are you sure?"}),o("div",{className:L.confirmActions,children:[e(A,{type:s.DANGER,onClick:function(){return y(!1)},label:"No"}),e(A,{type:s.SUCCESS,onClick:function(){y(!1),d()},label:"Yes"})]})]})]})},k={iconButton:"IconButton-module_iconButton__PmpB8",noPadding:"IconButton-module_noPadding__Jd2rK",lg:"IconButton-module_lg__KG7lp",md:"IconButton-module_md__s4q7b",sm:"IconButton-module_sm__are9s",xs:"IconButton-module_xs__qYwZc",confirm:"IconButton-module_confirm__-jXH4",confirmActions:"IconButton-module_confirmActions__j7-Tt",bottom:"IconButton-module_bottom__AEpND",disabled:"IconButton-module_disabled__pLK-t",white:"IconButton-module_white__AzyNN",light:"IconButton-module_light__i3AET",active:"IconButton-module_active__popsF",lightDark:"IconButton-module_lightDark__d7NQy",lightDanger:"IconButton-module_lightDanger__bIg02",lightInfo:"IconButton-module_lightInfo__820It",lightPrimary:"IconButton-module_lightPrimary__SCrg-",lightSecondary:"IconButton-module_lightSecondary__vN-aS",lightWarning:"IconButton-module_lightWarning__z1iaR",lightSuccess:"IconButton-module_lightSuccess__mUSnD",primary:"IconButton-module_primary__qjfR5",secondary:"IconButton-module_secondary__-CufX",danger:"IconButton-module_danger__lz3tP",dark:"IconButton-module_dark__QiBJk",info:"IconButton-module_info__eawU-",success:"IconButton-module_success__xkDzZ",warning:"IconButton-module_warning__DhbfD",whiteText:"IconButton-module_whiteText__111Ju",default:"IconButton-module_default__j2U57",borderedPrimary:"IconButton-module_borderedPrimary__DHXJQ",borderedSecondary:"IconButton-module_borderedSecondary__13GNA",flexWide:"IconButton-module_flexWide__BGOfY",slidein:"IconButton-module_slidein__Rmpl5",fadeInOut:"IconButton-module_fadeInOut__Z2E5a",heightAnimation:"IconButton-module_heightAnimation__JnqnZ",fadein:"IconButton-module_fadein__uX9ut",floatAnimation:"IconButton-module_floatAnimation__N-INw"},w=function(t){var i=t.icon,l=t.onClick,a=t.type,d=void 0===a?s.DEFAULT:a,r=t.needConfirm,u=void 0!==r&&r,m=t.noPadding,h=void 0!==m&&m,g=t.isLoading,f=void 0!==g&&g,p=t.size,v=void 0===p?"sm":p,I=t.confirmPosition,x=void 0===I?"top":I,L=n(!1),D=L[0],w=L[1];return o("div",{className:_(k,{iconButton:!0,noPadding:h},[k[d],k[v]]),onClick:f?void 0:u?function(){return w(!D)}:l,children:[e(c,{isLoading:f,icon:i,size:v}),D&&o("div",{className:"".concat(k.confirm," ").concat(k[x]),children:[e("div",{className:k.confirmMessage,children:"Are you sure?"}),o("div",{className:k.confirmActions,children:[e(A,{type:s.DANGER,onClick:function(){return w(!1)},label:"No",size:"small"}),e(A,{type:s.SUCCESS,onClick:l,label:"Yes",size:"small"})]})]})]})},y={listItem:"ListItem-module_listItem__ljWE5",separator:"ListItem-module_separator__CIXS1",dashedSeparator:"ListItem-module_dashedSeparator__SYWNX",content:"ListItem-module_content__mPC1D",data:"ListItem-module_data__e0N6V",title:"ListItem-module_title__YkOz9",subtitle:"ListItem-module_subtitle__5flJp",indicator:"ListItem-module_indicator__BwMsO",success:"ListItem-module_success__lgO8z",info:"ListItem-module_info__MKMBu",warning:"ListItem-module_warning__8P-nA",danger:"ListItem-module_danger__sWYOu",primary:"ListItem-module_primary__-bA-W",completed:"ListItem-module_completed__ovBl4",flexWide:"ListItem-module_flexWide__-0Q5a",slidein:"ListItem-module_slidein__dGxX-",fadeInOut:"ListItem-module_fadeInOut__Yuwsd",heightAnimation:"ListItem-module_heightAnimation__aVO2o",fadein:"ListItem-module_fadein__GSr23",floatAnimation:"ListItem-module_floatAnimation__efvAy"},B=function(n){var t=n.title,i=n.subtitle,l=n.actionTitle,a=void 0===l?"":l,d=n.action,r=n.completed,u=n.indicator,m=n.hasSeparator,s=void 0!==m&&m,h=n.hasDashedSeparator,f=void 0!==h&&h,p=n.isActionPending,v=void 0!==p&&p;return o("div",{className:_(y,{listItem:!0,separator:s,dashedSeparator:f}),children:[o("div",{className:y.content,children:[u&&e("div",{className:_(y,{indicator:!0},[y[u]])}),o("div",{className:y.data,children:[e("div",{className:y.title,children:t}),i&&e("div",{className:y.subtitle,children:i})]})]}),d&&e(A,{onClick:d,className:y.action,label:a,isLoading:v}),r&&e("div",{className:y.completed,children:e(c,{icon:g})})]})},b={link:"Link-module_link__35Vo1",fullWidth:"Link-module_fullWidth__eg45D",zero:"Link-module_zero__e-EXa",xxs:"Link-module_xxs__DLzl2",xs:"Link-module_xs__K3V8L",s:"Link-module_s__Ojcbu",m:"Link-module_m__KQ9M4",lg:"Link-module_lg__R71ff",xl:"Link-module_xl__q05MB",xxl:"Link-module_xxl__VZVxK",xxxl:"Link-module_xxxl__91qsW",light:"Link-module_light__Ji8kV",active:"Link-module_active__iCkL0",lightDark:"Link-module_lightDark__1fDCG",lightDanger:"Link-module_lightDanger__lB9Tb",lightInfo:"Link-module_lightInfo__h5lfu",lightPrimary:"Link-module_lightPrimary__aZxve",lightSecondary:"Link-module_lightSecondary__QHh0c",lightWarning:"Link-module_lightWarning__iOuMw",lightSuccess:"Link-module_lightSuccess__zDBp0",primary:"Link-module_primary__CE3uj",secondary:"Link-module_secondary__KSolI",danger:"Link-module_danger__ugf9r",dark:"Link-module_dark__ap0Ls",info:"Link-module_info__9skpg",success:"Link-module_success__DwP-V",warning:"Link-module_warning__FhhXi",whiteText:"Link-module_whiteText__t7SOQ",default:"Link-module_default__3TBlr",borderedPrimary:"Link-module_borderedPrimary__RfPen",borderedSecondary:"Link-module_borderedSecondary__xTeGX",flexWide:"Link-module_flexWide__3A6ZB",slidein:"Link-module_slidein__kBzO4",fadeInOut:"Link-module_fadeInOut__zas8c",heightAnimation:"Link-module_heightAnimation__N7y-w",fadein:"Link-module_fadein__WxUdb",floatAnimation:"Link-module_floatAnimation__XrwU5"},C=function(n){var t=n.href,i=n.title,l=n.target,a=void 0===l?"_self":l,d=n.type,r=void 0===d?s.DEFAULT:d,u=n.padding,m=void 0===u?"zero":u,h=n.hasChevron,g=void 0!==h&&h,p=n.fullWidth;return o("a",{href:t,target:a,rel:"noopener noreferrer",className:_(b,{link:!0,fullWidth:void 0!==p&&p},[b[r],b[m]]),children:[e("span",{children:i})," ",g&&e(c,{icon:f})]})},N={input:"Input-module_input__505b7",full:"Input-module_full__h2smD",noMargin:"Input-module_noMargin__ysWuN",container:"Input-module_container__itXJp",colorPicker:"Input-module_colorPicker__Efa-c",required:"Input-module_required__kHc93",addon:"Input-module_addon__1cKdz",pointer:"Input-module_pointer__EsKoB",error:"Input-module_error__38tit",avatar:"Input-module_avatar__GJUWC",autoCompleteContent:"Input-module_autoCompleteContent__4anQc",reversed:"Input-module_reversed__dU1hV",transparent:"Input-module_transparent__ko36m",small:"Input-module_small__5vYiK",xsmall:"Input-module_xsmall__-9hXW",hasAddon:"Input-module_hasAddon__mruPW",flexWide:"Input-module_flexWide__4Wn1k",slidein:"Input-module_slidein__XYim1",fadeInOut:"Input-module_fadeInOut__bnAwc",heightAnimation:"Input-module_heightAnimation__tmt9Z",fadein:"Input-module_fadein__1HtqV",floatAnimation:"Input-module_floatAnimation__sYawG"};!function(e){e.TEXT="text",e.PASSWORD="password",e.EMAIL="email",e.NUMBER="number",e.URL="url",e.TEL="tel",e.DATE="date",e.DATETIME="datetime",e.SELECT="select",e.COLOR_PICKER="color-picker",e.TEXT_AREA="text-area",e.AVATAR_UPLOAD="avatar-upload",e.UPLOAD_IMAGE_ICON="upload-image-icon"}(D||(D={}));var S=i((function(n,i){var l=n.type,a=void 0===l?D.TEXT:l,d=n.label,r=n.placeholder,u=n.value,s=n.required,h=void 0!==s&&s,g=n.addonIcon,f=n.labelAddon,v=n.errorMessage,I=n.options,L=void 0===I?[]:I,A=n.fullWidth,k=n.avatarSize,w=n.source,y=n.autoCompleteContent,B=n.autoCompleteReverse,b=void 0!==B&&B,C=n.noMargin,S=void 0!==C&&C,O=n.isDisabled,W=void 0!==O&&O,E=n.isLoading,T=void 0!==E&&E,P=n.isMultiUpload,R=void 0!==P&&P,M=n.autoFocus,z=void 0!==M&&M,G=n.theme,U=void 0===G?"oval":G,Y=n.size,j=void 0===Y?"medium":Y,F=n.onBlur,H=n.onFocus,V=n.onChange,K=n.addonAction,X=n.onEnter,Z=n.onEsc,q=n.onFileSelect,Q=n.onFilesSelect,J=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)o.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n}(n,["type","label","placeholder","value","required","addonIcon","labelAddon","errorMessage","options","fullWidth","avatarSize","source","autoCompleteContent","autoCompleteReverse","noMargin","isDisabled","isLoading","isMultiUpload","autoFocus","theme","size","onBlur","onFocus","onChange","addonAction","onEnter","onEsc","onFileSelect","onFilesSelect"]),$=W||T,ee=function(e){switch(e.key){case"Enter":X&&X();break;case"Escape":Z&&Z()}},oe=function(e){var o=e.target.files[0],n=new FileReader;n.onload=function(){q&&q(o,n.result)},n.readAsDataURL(o)},ne=function(e){var o=e.target;Q&&Q(o.files)};return o("div",{className:_(N,{input:!0,full:!!A,noMargin:S,hasAddon:!!g},[N[U],N[j]]),children:[d&&o("label",{children:[e("span",{className:h?N.required:"",children:d}),!!f&&e("div",{className:N.labelAddon,children:f})]}),e("div",{className:N.container,children:function(){switch(a){case D.SELECT:return o("select",m({className:N.field,value:u,onBlur:F,onFocus:H,onChange:V,ref:i},J,{children:[e("option",{value:"",children:r}),L.map((function(o){var n=o.label,t=o.value;return e("option",{value:t,children:n},t)}))]}));case D.COLOR_PICKER:return e("input",m({className:"".concat(N.field," ").concat(N.colorPicker),type:"color",value:u,placeholder:r,onBlur:F,onFocus:H,onChange:V,disabled:$,ref:i},J));case D.TEXT_AREA:return e("textarea",m({className:N.field,value:u,placeholder:r,onBlur:F,onFocus:H,onChange:V,autoFocus:z,ref:i},J));case D.AVATAR_UPLOAD:return o("label",{htmlFor:"avatar-upload",children:[e(x,{size:k,source:w,isLoading:T,isEditable:!0}),e("input",{type:"file",name:"avatar-upload",id:"avatar-upload",accept:"image/*",onChange:R?ne:oe,ref:i,className:N.avatar,disabled:$,multiple:R})]});case D.UPLOAD_IMAGE_ICON:return o("label",{htmlFor:"upload-image-icon",children:[e(c,{icon:p,isLoading:T,size:"md"}),e("input",{type:"file",name:"upload-image-icon",id:"upload-image-icon",accept:"image/*",onChange:R?ne:oe,ref:i,className:N.avatar,disabled:$,multiple:R})]});default:return o(t,{children:[e("input",m({className:N.field,type:a,placeholder:r,value:u,onBlur:F,onFocus:H,onChange:V,onKeyUp:ee,ref:i,disabled:$,autoFocus:z},J)),g&&e("div",{className:K?"".concat(N.addon," ").concat(N.pointer):N.addon,onClick:K,children:e(c,{icon:g,isLoading:T})})]})}}()}),!!v&&e("div",{className:N.error,children:v}),!!y&&e("div",{className:_(N,{autoCompleteContent:!0,reversed:b}),children:y})]})})),O={menu:"DropDown-module_menu__gRW7p",container:"DropDown-module_container__ms9Bn",action:"DropDown-module_action__D8KuY",light:"DropDown-module_light__6NSjI",active:"DropDown-module_active__rGcA2",lightDark:"DropDown-module_lightDark__Ctspk",lightDanger:"DropDown-module_lightDanger__FaZ6G",lightInfo:"DropDown-module_lightInfo__DMaJO",lightPrimary:"DropDown-module_lightPrimary__sobOp",lightSecondary:"DropDown-module_lightSecondary__PB0m-",lightWarning:"DropDown-module_lightWarning__mkeGN",lightSuccess:"DropDown-module_lightSuccess__QNoVS",primary:"DropDown-module_primary__9-x6Y",secondary:"DropDown-module_secondary__HBses",danger:"DropDown-module_danger__ZbPY6",dark:"DropDown-module_dark__3YhdZ",info:"DropDown-module_info__5qwW6",success:"DropDown-module_success__NbhHj",warning:"DropDown-module_warning__MrYwV",whiteText:"DropDown-module_whiteText__eVLut",default:"DropDown-module_default__D0DNi",borderedPrimary:"DropDown-module_borderedPrimary__oTb-J",borderedSecondary:"DropDown-module_borderedSecondary__GqWsA",xsmall:"DropDown-module_xsmall__Mc6Zx",small:"DropDown-module_small__Goyza",large:"DropDown-module_large__P5F--",flexWide:"DropDown-module_flexWide__ySVZv",slidein:"DropDown-module_slidein__ZYDXA",fadeInOut:"DropDown-module_fadeInOut__hjIWL",heightAnimation:"DropDown-module_heightAnimation__EUum9",fadein:"DropDown-module_fadein__D2VO0",floatAnimation:"DropDown-module_floatAnimation__z5DD5"},W=function(e,o){var n=function(n){e.current&&!e.current.contains(n.target)&&o()};l((function(){return document.addEventListener("click",n),function(){document.removeEventListener("click",n)}}),[])},E=function(o){var t=o.containerRef,i=o.contentRef,a=o.isOpen,r=void 0!==a&&a,_=o.renderChild,u=o.onClose,c={isOpen:!1,top:0,left:0,bottom:0,right:0},s=n(c),h=s[0],g=s[1],f={position:"absolute",top:h.top,left:h.left,bottom:h.bottom,right:h.right,zIndex:111},p=function(){g(c),u()};return W(t,(function(){return p()})),l((function(){if(r)return function(){var e,o,n,l,a,d,r,_=null!==(n=null===(o=null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.getBoundingClientRect)||void 0===o?void 0:o.call(e))&&void 0!==n?n:{top:0,left:0,height:0,width:0},u=_.top,c=_.left,s=_.height,h=_.width,f=window.innerHeight,p=window.innerWidth,v=f-(u+s),I=u,x=c,L=p-(c+h),D=null!==(a=null===(l=null==i?void 0:i.current)||void 0===l?void 0:l.clientHeight)&&void 0!==a?a:200,A=null!==(r=null===(d=null==i?void 0:i.current)||void 0===d?void 0:d.clientWidth)&&void 0!==r?r:200,k="auto",w="auto",y="auto",B="auto";v<D&&I>=D?B=f-u-s+20:w=u+s+5,L<A&&x>=A?y=p-c:k=c,g(m(m({},{top:w,left:k,right:y,bottom:B}),{isOpen:!0}))}();p()}),[r,null==t?void 0:t.current]),h.isOpen?d.createPortal(e("div",{style:f,onClick:function(e){e.stopPropagation()},children:_(h)}),document.getElementById("portals")):null},T=function(o){var n=o.children;return e("div",{className:O.menu,children:n})},P=function(t){var i=t.action,d=t.menu,r=t.type,u=void 0===r?s.DEFAULT:r,c=t.closeRef,m=t.actionSize,h=void 0===m?"medium":m,g=a(null),f=a(null),p=a(null),v=n(!1),I=v[0],x=v[1],L=function(){return x(!1)};return l((function(){(null==c?void 0:c.current)&&(c.current={close:function(){return L()}})}),[c]),o("div",{className:O.container,ref:g,children:[e("div",{className:_(O,{action:!0},[O[u],O[h]]),ref:p,onClick:function(){return x(!I)},children:i}),e(E,{containerRef:g,contentRef:f,isOpen:I,onClose:L,renderChild:function(){return e("div",{className:O.menuContainer,ref:f,children:e(T,{children:d})})}})]})},R={container:"LoadingItem-module_container__ujRaI",fadeInOut:"LoadingItem-module_fadeInOut__HDJT8",square:"LoadingItem-module_square__OucYB",xxs:"LoadingItem-module_xxs__kTYcZ",xs:"LoadingItem-module_xs__sISZM",sm:"LoadingItem-module_sm__hsDHD",md:"LoadingItem-module_md__bU5yA",lg:"LoadingItem-module_lg__9sK4b",xl:"LoadingItem-module_xl__O0kH8",xxl:"LoadingItem-module_xxl__tIjdb",xxxl:"LoadingItem-module_xxxl__h73z5",xxxxl:"LoadingItem-module_xxxxl__XTzwy",flexWide:"LoadingItem-module_flexWide__sIJC3",slidein:"LoadingItem-module_slidein__8J982",heightAnimation:"LoadingItem-module_heightAnimation__cUh26",fadein:"LoadingItem-module_fadein__-CmLg",floatAnimation:"LoadingItem-module_floatAnimation__gQ2jh"},M=function(o){var n=o.shape,t=void 0===n?"square":n,i=o.size,l=void 0===i?"md":i,a=o.width,d=o.height;return e("div",{className:_(R,{container:!0},[R[t],R[l]]),style:{width:a,height:d}})},z=function(e){return null==e||("object"==typeof e?Array.isArray(e)?0===e.length:e instanceof Set||e instanceof Map?0===e.size:0===Object.keys(e).length:"string"==typeof e&&0===e.length)};export{x as Avatar,A as Button,P as DropDown,w as IconButton,S as Input,D as InputType,C as Link,B as ListItem,M as LoadingItem,c as SVGIcon,s as UIElementType,_ as classNames,z as isEmpty,W as useClickOutside}; | ||
//# sourceMappingURL=index.esm.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(require("react-dom")),i={avatar:"Avatar-module_avatar__5-kP8",image:"Avatar-module_image__HFFlp",clickable:"Avatar-module_clickable__DD7pl",editable:"Avatar-module_editable__CpXtw",editIcon:"Avatar-module_editIcon__ULUa1",overlay:"Avatar-module_overlay__d95aK",overlayText:"Avatar-module_overlayText__NgsFM",loading:"Avatar-module_loading__9gBDd",xxs:"Avatar-module_xxs__zCCH6",xs:"Avatar-module_xs__1SMBv",sm:"Avatar-module_sm__8TB22",md:"Avatar-module_md__zeW0d",lg:"Avatar-module_lg__MWKN-",xl:"Avatar-module_xl__KCqIL",xxl:"Avatar-module_xxl__ox6gi",xxxl:"Avatar-module_xxxl__9Cc7C",inline:"Avatar-module_inline__H0AhD",flexWide:"Avatar-module_flexWide__GQYaQ",slidein:"Avatar-module_slidein__KV8Ih",fadeInOut:"Avatar-module_fadeInOut__2M9tv",heightAnimation:"Avatar-module_heightAnimation__RCYYu",fadein:"Avatar-module_fadein__lENH2",floatAnimation:"Avatar-module_floatAnimation__PNWhi"},l=function(e,o,n){void 0===n&&(n=[]);var t=[];for(var i in o)o[i]&&t.push(e[i]);return(null==n?void 0:n.length)>0&&(t=t.concat(n)),t.join(" ")},a={container:"SVGIcon-module_container__z2RN5",isLoading:"SVGIcon-module_isLoading__8BhuU",fadeInOut:"SVGIcon-module_fadeInOut__EgbCf",flexWide:"SVGIcon-module_flexWide__IfOOF",slidein:"SVGIcon-module_slidein__RT6-4",heightAnimation:"SVGIcon-module_heightAnimation__CmY-x",fadein:"SVGIcon-module_fadein__Y2P5U",floatAnimation:"SVGIcon-module_floatAnimation__kH3Tr"},d=function(o){var n=o.icon,t=o.size,i=void 0===t?"sm":t,d=o.className,r=void 0===d?"":d,_=o.isLoading,u=void 0!==_&&_,s=function(e){switch(e){case"xxs":return 8;case"xs":return 12;case"sm":default:return 16;case"md":return 24;case"lg":return 32;case"xl":return 48;case"xxl":return 64;case"xxxl":return 128}}(i);return n?e.jsx("div",{className:l(a,{container:!0,isLoading:u},[r]),children:e.jsx(n,{className:r,width:s,height:s,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"})}):null},r=function(){return r=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},r.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var _,u=function(o){return e.jsxs("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:[e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 8.377c0-.35 0-.525.015-.673a3 3 0 0 1 2.69-2.69C4.851 5 5.035 5 5.404 5c.143 0 .214 0 .274-.004a2 2 0 0 0 1.735-1.25c.023-.056.044-.12.086-.246.042-.127.063-.19.086-.246a2 2 0 0 1 1.735-1.25C9.38 2 9.448 2 9.58 2h4.838c.133 0 .2 0 .26.004a2 2 0 0 1 1.735 1.25c.023.056.044.12.086.246.042.127.063.19.086.246a2 2 0 0 0 1.735 1.25c.06.004.131.004.273.004.37 0 .554 0 .702.015a3 3 0 0 1 2.69 2.69c.014.147.014.322.014.672V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2z"}),e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 16.5a4 4 0 1 0 0-8 4 4 0 0 0 0 8"})]}))},s=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 6 9 17l-5-5"})}))},c=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18 6-6-6-6"})}))},m=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0M6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21"})}))},h=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 16 4-4m0 0 4 4m-4-4v9m8-4.257A5.5 5.5 0 0 0 16.5 7a.62.62 0 0 1-.534-.302 7.5 7.5 0 1 0-11.78 9.096"})}))},p=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.316 19.438A4 4 0 0 1 9 17h6a4 4 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0m6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"})}))},g=function(o){var n=o.source,t=void 0===n?null:n,a=o.alt,r=void 0===a?"avatar":a,_=o.size,s=void 0===_?"sm":_,c=o.onClick,m=o.className,g=o.isEditable,f=void 0!==g&&g,x=o.overlayIcon,v=o.inline,I=void 0!==v&&v,L=o.isLoading,D=void 0!==L&&L,A=o.overlayText,y=function(){switch(s){case"xxxl":return 512;case"xxl":return 256;case"xl":return 128;case"lg":return 96;case"md":return 64;case"xs":return 32;case"xxs":return 24;default:return 48}};return e.jsxs("div",{className:l(i,{avatar:!0,clickable:!!c||f,editable:f,inline:I,loading:D},[i[s],m]),onClick:c,style:{width:y(),height:y()},children:[t?e.jsx("img",{src:t,alt:r,className:i.image,width:y(),height:y()}):e.jsx(d,{size:s,icon:p}),f&&e.jsx("div",{className:i.editIcon,children:e.jsx(d,{isLoading:D,icon:D?h:u})}),(!!x||A)&&e.jsxs("div",{className:i.overlay,children:[!!x&&e.jsx(d,{isLoading:D,icon:D?h:x}),!!A&&e.jsx("div",{className:i.overlayText,children:A})]})]})},f={container:"Button-module_container__0j8md",confirm:"Button-module_confirm__N5z4A",confirmActions:"Button-module_confirmActions__Xh7kN",button:"Button-module_button__18Bed",label:"Button-module_label__1PsXG",light:"Button-module_light__oUjYe",lightDark:"Button-module_lightDark__vucG6",active:"Button-module_active__UeHD7",lightDanger:"Button-module_lightDanger__aDpy8",lightInfo:"Button-module_lightInfo__oCfFI",lightPrimary:"Button-module_lightPrimary__f7-kQ",lightSecondary:"Button-module_lightSecondary__YK-QR",lightWarning:"Button-module_lightWarning__-Ogcg",lightSuccess:"Button-module_lightSuccess__gSt46",primary:"Button-module_primary__st6yY",secondary:"Button-module_secondary__j-3rj",danger:"Button-module_danger__Hxs5n",dark:"Button-module_dark__T7dl8",info:"Button-module_info__2z1ZG",success:"Button-module_success__CHTsg",warning:"Button-module_warning__1voOb",whiteText:"Button-module_whiteText__12xTM",default:"Button-module_default__TZZU2",borderedPrimary:"Button-module_borderedPrimary__KrZVT",borderedSecondary:"Button-module_borderedSecondary__UPNks",small:"Button-module_small__zfmcP",xsmall:"Button-module_xsmall__QS3d-",fullWidth:"Button-module_fullWidth__AHpSl",flexWide:"Button-module_flexWide__xDrEF",slidein:"Button-module_slidein__ofhlO",fadeInOut:"Button-module_fadeInOut__nAOqm",heightAnimation:"Button-module_heightAnimation__fLFCd",fadein:"Button-module_fadein__pspkB",floatAnimation:"Button-module_floatAnimation__0PYtT"};exports.UIElementType=void 0,(_=exports.UIElementType||(exports.UIElementType={})).PRIMARY="primary",_.SECONDARY="secondary",_.DANGER="danger",_.SUCCESS="success",_.WARNING="warning",_.INFO="info",_.LIGHT="light",_.DEFAULT="default",_.DARK="dark",_.LIGHT_PRIMARY="lightPrimary",_.LIGHT_SUCCESS="lightSuccess",_.LIGHT_WARNING="lightWarning",_.LIGHT_INFO="lightInfo",_.LIGHT_DANGER="lightDanger",_.LIGHT_DARK="lightDark",_.LIGHT_SECONDARY="lightSecondary",_.WHITE_TEXT="whiteText",_.BORDERED_PRIMARY="borderedPrimary",_.BORDERED_SECONDARY="borderedSecondary";var x,v=function(n){var t=n.type,i=void 0===t?exports.UIElementType.PRIMARY:t,a=n.onClick,r=n.label,_=n.icon,u=n.fullWidth,s=void 0!==u&&u,c=n.isLoading,m=n.disabled,h=n.className,p=n.needConfirm,g=void 0!==p&&p,x=n.size,I=void 0===x?"standard":x,L=o.useState(!1),D=L[0],A=L[1];return e.jsxs("div",{className:l(f,{container:!0,fullWidth:s}),children:[e.jsx("button",{className:l(f,{button:!0,loading:!!c},[f[i],f[I],h]),onClick:g?function(){return A(!D)}:a,disabled:c||m,children:c?e.jsx(o.Fragment,{children:"Loading..."}):e.jsxs("div",{className:f.label,children:[_&&e.jsx(d,{icon:_}),e.jsx("span",{children:r})]})}),D&&e.jsxs("div",{className:f.confirm,children:[e.jsx("div",{className:f.confirmMessage,children:"Are you sure?"}),e.jsxs("div",{className:f.confirmActions,children:[e.jsx(v,{type:exports.UIElementType.DANGER,onClick:function(){return A(!1)},label:"No"}),e.jsx(v,{type:exports.UIElementType.SUCCESS,onClick:function(){A(!1),a()},label:"Yes"})]})]})]})},I={iconButton:"IconButton-module_iconButton__PmpB8",noPadding:"IconButton-module_noPadding__Jd2rK",lg:"IconButton-module_lg__KG7lp",md:"IconButton-module_md__s4q7b",sm:"IconButton-module_sm__are9s",xs:"IconButton-module_xs__qYwZc",confirm:"IconButton-module_confirm__-jXH4",confirmActions:"IconButton-module_confirmActions__j7-Tt",bottom:"IconButton-module_bottom__AEpND",disabled:"IconButton-module_disabled__pLK-t",white:"IconButton-module_white__AzyNN",light:"IconButton-module_light__i3AET",active:"IconButton-module_active__popsF",lightDark:"IconButton-module_lightDark__d7NQy",lightDanger:"IconButton-module_lightDanger__bIg02",lightInfo:"IconButton-module_lightInfo__820It",lightPrimary:"IconButton-module_lightPrimary__SCrg-",lightSecondary:"IconButton-module_lightSecondary__vN-aS",lightWarning:"IconButton-module_lightWarning__z1iaR",lightSuccess:"IconButton-module_lightSuccess__mUSnD",primary:"IconButton-module_primary__qjfR5",secondary:"IconButton-module_secondary__-CufX",danger:"IconButton-module_danger__lz3tP",dark:"IconButton-module_dark__QiBJk",info:"IconButton-module_info__eawU-",success:"IconButton-module_success__xkDzZ",warning:"IconButton-module_warning__DhbfD",whiteText:"IconButton-module_whiteText__111Ju",default:"IconButton-module_default__j2U57",borderedPrimary:"IconButton-module_borderedPrimary__DHXJQ",borderedSecondary:"IconButton-module_borderedSecondary__13GNA",flexWide:"IconButton-module_flexWide__BGOfY",slidein:"IconButton-module_slidein__Rmpl5",fadeInOut:"IconButton-module_fadeInOut__Z2E5a",heightAnimation:"IconButton-module_heightAnimation__JnqnZ",fadein:"IconButton-module_fadein__uX9ut",floatAnimation:"IconButton-module_floatAnimation__N-INw"},L={listItem:"ListItem-module_listItem__ljWE5",separator:"ListItem-module_separator__CIXS1",dashedSeparator:"ListItem-module_dashedSeparator__SYWNX",content:"ListItem-module_content__mPC1D",data:"ListItem-module_data__e0N6V",title:"ListItem-module_title__YkOz9",subtitle:"ListItem-module_subtitle__5flJp",indicator:"ListItem-module_indicator__BwMsO",success:"ListItem-module_success__lgO8z",info:"ListItem-module_info__MKMBu",warning:"ListItem-module_warning__8P-nA",danger:"ListItem-module_danger__sWYOu",primary:"ListItem-module_primary__-bA-W",completed:"ListItem-module_completed__ovBl4",flexWide:"ListItem-module_flexWide__-0Q5a",slidein:"ListItem-module_slidein__dGxX-",fadeInOut:"ListItem-module_fadeInOut__Yuwsd",heightAnimation:"ListItem-module_heightAnimation__aVO2o",fadein:"ListItem-module_fadein__GSr23",floatAnimation:"ListItem-module_floatAnimation__efvAy"},D={link:"Link-module_link__35Vo1",fullWidth:"Link-module_fullWidth__eg45D",zero:"Link-module_zero__e-EXa",xxs:"Link-module_xxs__DLzl2",xs:"Link-module_xs__K3V8L",s:"Link-module_s__Ojcbu",m:"Link-module_m__KQ9M4",lg:"Link-module_lg__R71ff",xl:"Link-module_xl__q05MB",light:"Link-module_light__Ji8kV",active:"Link-module_active__iCkL0",lightDark:"Link-module_lightDark__1fDCG",lightDanger:"Link-module_lightDanger__lB9Tb",lightInfo:"Link-module_lightInfo__h5lfu",lightPrimary:"Link-module_lightPrimary__aZxve",lightSecondary:"Link-module_lightSecondary__QHh0c",lightWarning:"Link-module_lightWarning__iOuMw",lightSuccess:"Link-module_lightSuccess__zDBp0",primary:"Link-module_primary__CE3uj",secondary:"Link-module_secondary__KSolI",danger:"Link-module_danger__ugf9r",dark:"Link-module_dark__ap0Ls",info:"Link-module_info__9skpg",success:"Link-module_success__DwP-V",warning:"Link-module_warning__FhhXi",whiteText:"Link-module_whiteText__t7SOQ",default:"Link-module_default__3TBlr",borderedPrimary:"Link-module_borderedPrimary__RfPen",borderedSecondary:"Link-module_borderedSecondary__xTeGX",flexWide:"Link-module_flexWide__3A6ZB",slidein:"Link-module_slidein__kBzO4",fadeInOut:"Link-module_fadeInOut__zas8c",heightAnimation:"Link-module_heightAnimation__N7y-w",fadein:"Link-module_fadein__WxUdb",floatAnimation:"Link-module_floatAnimation__XrwU5"},A={input:"Input-module_input__505b7",full:"Input-module_full__h2smD",noMargin:"Input-module_noMargin__ysWuN",container:"Input-module_container__itXJp",colorPicker:"Input-module_colorPicker__Efa-c",required:"Input-module_required__kHc93",addon:"Input-module_addon__1cKdz",pointer:"Input-module_pointer__EsKoB",error:"Input-module_error__38tit",avatar:"Input-module_avatar__GJUWC",autoCompleteContent:"Input-module_autoCompleteContent__4anQc",reversed:"Input-module_reversed__dU1hV",transparent:"Input-module_transparent__ko36m",small:"Input-module_small__5vYiK",xsmall:"Input-module_xsmall__-9hXW",hasAddon:"Input-module_hasAddon__mruPW",flexWide:"Input-module_flexWide__4Wn1k",slidein:"Input-module_slidein__XYim1",fadeInOut:"Input-module_fadeInOut__bnAwc",heightAnimation:"Input-module_heightAnimation__tmt9Z",fadein:"Input-module_fadein__1HtqV",floatAnimation:"Input-module_floatAnimation__sYawG"};exports.InputType=void 0,(x=exports.InputType||(exports.InputType={})).TEXT="text",x.PASSWORD="password",x.EMAIL="email",x.NUMBER="number",x.URL="url",x.TEL="tel",x.DATE="date",x.DATETIME="datetime",x.SELECT="select",x.COLOR_PICKER="color-picker",x.TEXT_AREA="text-area",x.AVATAR_UPLOAD="avatar-upload",x.UPLOAD_IMAGE_ICON="upload-image-icon";var y=o.forwardRef((function(n,t){var i=n.type,a=void 0===i?exports.InputType.TEXT:i,_=n.label,u=n.placeholder,s=n.value,c=n.required,h=void 0!==c&&c,p=n.addonIcon,f=n.labelAddon,x=n.errorMessage,v=n.options,I=void 0===v?[]:v,L=n.fullWidth,D=n.avatarSize,y=n.source,k=n.autoCompleteContent,w=n.autoCompleteReverse,j=void 0!==w&&w,B=n.noMargin,b=void 0!==B&&B,C=n.isDisabled,S=void 0!==C&&C,N=n.isLoading,T=void 0!==N&&N,E=n.isMultiUpload,O=void 0!==E&&E,W=n.autoFocus,P=void 0!==W&&W,R=n.theme,M=void 0===R?"oval":R,U=n.size,z=void 0===U?"medium":U,G=n.onBlur,F=n.onFocus,Y=n.onChange,H=n.addonAction,V=n.onEnter,X=n.onEsc,K=n.onFileSelect,q=n.onFilesSelect,Z=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)o.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n}(n,["type","label","placeholder","value","required","addonIcon","labelAddon","errorMessage","options","fullWidth","avatarSize","source","autoCompleteContent","autoCompleteReverse","noMargin","isDisabled","isLoading","isMultiUpload","autoFocus","theme","size","onBlur","onFocus","onChange","addonAction","onEnter","onEsc","onFileSelect","onFilesSelect"]),Q=S||T,J=function(e){switch(e.key){case"Enter":V&&V();break;case"Escape":X&&X()}},$=function(e){var o=e.target.files[0],n=new FileReader;n.onload=function(){K&&K(o,n.result)},n.readAsDataURL(o)},ee=function(e){var o=e.target;q&&q(o.files)};return e.jsxs("div",{className:l(A,{input:!0,full:!!L,noMargin:b,hasAddon:!!p},[A[M],A[z]]),children:[_&&e.jsxs("label",{children:[e.jsx("span",{className:h?A.required:"",children:_}),!!f&&e.jsx("div",{className:A.labelAddon,children:f})]}),e.jsx("div",{className:A.container,children:function(){switch(a){case exports.InputType.SELECT:return e.jsxs("select",r({className:A.field,value:s,onBlur:G,onFocus:F,onChange:Y,ref:t},Z,{children:[e.jsx("option",{value:"",children:u}),I.map((function(o){var n=o.label,t=o.value;return e.jsx("option",{value:t,children:n},t)}))]}));case exports.InputType.COLOR_PICKER:return e.jsx("input",r({className:"".concat(A.field," ").concat(A.colorPicker),type:"color",value:s,placeholder:u,onBlur:G,onFocus:F,onChange:Y,disabled:Q,ref:t},Z));case exports.InputType.TEXT_AREA:return e.jsx("textarea",r({className:A.field,value:s,placeholder:u,onBlur:G,onFocus:F,onChange:Y,autoFocus:P,ref:t},Z));case exports.InputType.AVATAR_UPLOAD:return e.jsxs("label",{htmlFor:"avatar-upload",children:[e.jsx(g,{size:D,source:y,isLoading:T,isEditable:!0}),e.jsx("input",{type:"file",name:"avatar-upload",id:"avatar-upload",accept:"image/*",onChange:O?ee:$,ref:t,className:A.avatar,disabled:Q,multiple:O})]});case exports.InputType.UPLOAD_IMAGE_ICON:return e.jsxs("label",{htmlFor:"upload-image-icon",children:[e.jsx(d,{icon:m,isLoading:T,size:"md"}),e.jsx("input",{type:"file",name:"upload-image-icon",id:"upload-image-icon",accept:"image/*",onChange:O?ee:$,ref:t,className:A.avatar,disabled:Q,multiple:O})]});default:return e.jsxs(o.Fragment,{children:[e.jsx("input",r({className:A.field,type:a,placeholder:u,value:s,onBlur:G,onFocus:F,onChange:Y,onKeyUp:J,ref:t,disabled:Q,autoFocus:P},Z)),p&&e.jsx("div",{className:H?"".concat(A.addon," ").concat(A.pointer):A.addon,onClick:H,children:e.jsx(d,{icon:p,isLoading:T})})]})}}()}),!!x&&e.jsx("div",{className:A.error,children:x}),!!k&&e.jsx("div",{className:l(A,{autoCompleteContent:!0,reversed:j}),children:k})]})})),k={menu:"DropDown-module_menu__gRW7p",container:"DropDown-module_container__ms9Bn",action:"DropDown-module_action__D8KuY",light:"DropDown-module_light__6NSjI",active:"DropDown-module_active__rGcA2",lightDark:"DropDown-module_lightDark__Ctspk",lightDanger:"DropDown-module_lightDanger__FaZ6G",lightInfo:"DropDown-module_lightInfo__DMaJO",lightPrimary:"DropDown-module_lightPrimary__sobOp",lightSecondary:"DropDown-module_lightSecondary__PB0m-",lightWarning:"DropDown-module_lightWarning__mkeGN",lightSuccess:"DropDown-module_lightSuccess__QNoVS",primary:"DropDown-module_primary__9-x6Y",secondary:"DropDown-module_secondary__HBses",danger:"DropDown-module_danger__ZbPY6",dark:"DropDown-module_dark__3YhdZ",info:"DropDown-module_info__5qwW6",success:"DropDown-module_success__NbhHj",warning:"DropDown-module_warning__MrYwV",whiteText:"DropDown-module_whiteText__eVLut",default:"DropDown-module_default__D0DNi",borderedPrimary:"DropDown-module_borderedPrimary__oTb-J",borderedSecondary:"DropDown-module_borderedSecondary__GqWsA",xsmall:"DropDown-module_xsmall__Mc6Zx",small:"DropDown-module_small__Goyza",large:"DropDown-module_large__P5F--",flexWide:"DropDown-module_flexWide__ySVZv",slidein:"DropDown-module_slidein__ZYDXA",fadeInOut:"DropDown-module_fadeInOut__hjIWL",heightAnimation:"DropDown-module_heightAnimation__EUum9",fadein:"DropDown-module_fadein__D2VO0",floatAnimation:"DropDown-module_floatAnimation__z5DD5"},w=function(e,n){var t=function(o){e.current&&!e.current.contains(o.target)&&n()};o.useEffect((function(){return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}),[])},j=function(n){var i=n.containerRef,l=n.contentRef,a=n.isOpen,d=void 0!==a&&a,_=n.renderChild,u=n.onClose,s={isOpen:!1,top:0,left:0,bottom:0,right:0},c=o.useState(s),m=c[0],h=c[1],p={position:"absolute",top:m.top,left:m.left,bottom:m.bottom,right:m.right,zIndex:111},g=function(){h(s),u()};return w(i,(function(){return g()})),o.useEffect((function(){if(d)return function(){var e,o,n,t,a,d,_,u=null!==(n=null===(o=null===(e=null==i?void 0:i.current)||void 0===e?void 0:e.getBoundingClientRect)||void 0===o?void 0:o.call(e))&&void 0!==n?n:{top:0,left:0,height:0,width:0},s=u.top,c=u.left,m=u.height,p=u.width,g=window.innerHeight,f=window.innerWidth,x=g-(s+m),v=s,I=c,L=f-(c+p),D=null!==(a=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.clientHeight)&&void 0!==a?a:200,A=null!==(_=null===(d=null==l?void 0:l.current)||void 0===d?void 0:d.clientWidth)&&void 0!==_?_:200,y="auto",k="auto",w="auto",j="auto";x<D&&v>=D?j=g-s-m+20:k=s+m+5,L<A&&I>=A?w=f-c:y=c,h(r(r({},{top:k,left:y,right:w,bottom:j}),{isOpen:!0}))}();g()}),[d,null==i?void 0:i.current]),m.isOpen?t.default.createPortal(e.jsx("div",{style:p,onClick:function(e){e.stopPropagation()},children:_(m)}),document.getElementById("portals")):null},B=function(o){var n=o.children;return e.jsx("div",{className:k.menu,children:n})},b={container:"LoadingItem-module_container__ujRaI",fadeInOut:"LoadingItem-module_fadeInOut__HDJT8",square:"LoadingItem-module_square__OucYB",xxs:"LoadingItem-module_xxs__kTYcZ",xs:"LoadingItem-module_xs__sISZM",sm:"LoadingItem-module_sm__hsDHD",md:"LoadingItem-module_md__bU5yA",lg:"LoadingItem-module_lg__9sK4b",xl:"LoadingItem-module_xl__O0kH8",xxl:"LoadingItem-module_xxl__tIjdb",xxxl:"LoadingItem-module_xxxl__h73z5",xxxxl:"LoadingItem-module_xxxxl__XTzwy",flexWide:"LoadingItem-module_flexWide__sIJC3",slidein:"LoadingItem-module_slidein__8J982",heightAnimation:"LoadingItem-module_heightAnimation__cUh26",fadein:"LoadingItem-module_fadein__-CmLg",floatAnimation:"LoadingItem-module_floatAnimation__gQ2jh"};exports.Avatar=g,exports.Button=v,exports.DropDown=function(n){var t=n.action,i=n.menu,a=n.type,d=void 0===a?exports.UIElementType.DEFAULT:a,r=n.closeRef,_=n.actionSize,u=void 0===_?"medium":_,s=o.useRef(null),c=o.useRef(null),m=o.useRef(null),h=o.useState(!1),p=h[0],g=h[1],f=function(){return g(!1)};return o.useEffect((function(){(null==r?void 0:r.current)&&(r.current={close:function(){return f()}})}),[r]),e.jsxs("div",{className:k.container,ref:s,children:[e.jsx("div",{className:l(k,{action:!0},[k[d],k[u]]),ref:m,onClick:function(){return g(!p)},children:t}),e.jsx(j,{containerRef:s,contentRef:c,isOpen:p,onClose:f,renderChild:function(){return e.jsx("div",{className:k.menuContainer,ref:c,children:e.jsx(B,{children:i})})}})]})},exports.IconButton=function(n){var t=n.icon,i=n.onClick,a=n.type,r=void 0===a?exports.UIElementType.DEFAULT:a,_=n.needConfirm,u=void 0!==_&&_,s=n.noPadding,c=void 0!==s&&s,m=n.isLoading,h=void 0!==m&&m,p=n.size,g=void 0===p?"sm":p,f=n.confirmPosition,x=void 0===f?"top":f,L=o.useState(!1),D=L[0],A=L[1];return e.jsxs("div",{className:l(I,{iconButton:!0,noPadding:c},[I[r],I[g]]),onClick:h?void 0:u?function(){return A(!D)}:i,children:[e.jsx(d,{isLoading:h,icon:t,size:g}),D&&e.jsxs("div",{className:"".concat(I.confirm," ").concat(I[x]),children:[e.jsx("div",{className:I.confirmMessage,children:"Are you sure?"}),e.jsxs("div",{className:I.confirmActions,children:[e.jsx(v,{type:exports.UIElementType.DANGER,onClick:function(){return A(!1)},label:"No",size:"small"}),e.jsx(v,{type:exports.UIElementType.SUCCESS,onClick:i,label:"Yes",size:"small"})]})]})]})},exports.Input=y,exports.Link=function(o){var n=o.href,t=o.title,i=o.target,a=void 0===i?"_self":i,r=o.type,_=void 0===r?exports.UIElementType.DEFAULT:r,u=o.padding,s=void 0===u?"zero":u,m=o.hasChevron,h=void 0!==m&&m,p=o.fullWidth,g=void 0!==p&&p;return e.jsxs("a",{href:n,target:a,rel:"noopener noreferrer",className:l(D,{link:!0,fullWidth:g},[D[_],D[s]]),children:[e.jsx("span",{children:t})," ",h&&e.jsx(d,{icon:c})]})},exports.ListItem=function(o){var n=o.title,t=o.subtitle,i=o.actionTitle,a=void 0===i?"":i,r=o.action,_=o.completed,u=o.indicator,c=o.hasSeparator,m=void 0!==c&&c,h=o.hasDashedSeparator,p=void 0!==h&&h,g=o.isActionPending,f=void 0!==g&&g;return e.jsxs("div",{className:l(L,{listItem:!0,separator:m,dashedSeparator:p}),children:[e.jsxs("div",{className:L.content,children:[u&&e.jsx("div",{className:l(L,{indicator:!0},[L[u]])}),e.jsxs("div",{className:L.data,children:[e.jsx("div",{className:L.title,children:n}),t&&e.jsx("div",{className:L.subtitle,children:t})]})]}),r&&e.jsx(v,{onClick:r,className:L.action,label:a,isLoading:f}),_&&e.jsx("div",{className:L.completed,children:e.jsx(d,{icon:s})})]})},exports.LoadingItem=function(o){var n=o.shape,t=void 0===n?"square":n,i=o.size,a=void 0===i?"md":i,d=o.width,r=o.height;return e.jsx("div",{className:l(b,{container:!0},[b[t],b[a]]),style:{width:d,height:r}})},exports.SVGIcon=d,exports.classNames=l,exports.isEmpty=function(e){return null==e||("object"==typeof e?Array.isArray(e)?0===e.length:e instanceof Set||e instanceof Map?0===e.size:0===Object.keys(e).length:"string"==typeof e&&0===e.length)},exports.useClickOutside=w; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(require("react-dom")),i={avatar:"Avatar-module_avatar__5-kP8",image:"Avatar-module_image__HFFlp",clickable:"Avatar-module_clickable__DD7pl",editable:"Avatar-module_editable__CpXtw",editIcon:"Avatar-module_editIcon__ULUa1",overlay:"Avatar-module_overlay__d95aK",overlayText:"Avatar-module_overlayText__NgsFM",loading:"Avatar-module_loading__9gBDd",xxs:"Avatar-module_xxs__zCCH6",xs:"Avatar-module_xs__1SMBv",sm:"Avatar-module_sm__8TB22",md:"Avatar-module_md__zeW0d",lg:"Avatar-module_lg__MWKN-",xl:"Avatar-module_xl__KCqIL",xxl:"Avatar-module_xxl__ox6gi",xxxl:"Avatar-module_xxxl__9Cc7C",inline:"Avatar-module_inline__H0AhD",flexWide:"Avatar-module_flexWide__GQYaQ",slidein:"Avatar-module_slidein__KV8Ih",fadeInOut:"Avatar-module_fadeInOut__2M9tv",heightAnimation:"Avatar-module_heightAnimation__RCYYu",fadein:"Avatar-module_fadein__lENH2",floatAnimation:"Avatar-module_floatAnimation__PNWhi"},l=function(e,o,n){void 0===n&&(n=[]);var t=[];for(var i in o)o[i]&&t.push(e[i]);return(null==n?void 0:n.length)>0&&(t=t.concat(n)),t.join(" ")},a={container:"SVGIcon-module_container__z2RN5",isLoading:"SVGIcon-module_isLoading__8BhuU",fadeInOut:"SVGIcon-module_fadeInOut__EgbCf",flexWide:"SVGIcon-module_flexWide__IfOOF",slidein:"SVGIcon-module_slidein__RT6-4",heightAnimation:"SVGIcon-module_heightAnimation__CmY-x",fadein:"SVGIcon-module_fadein__Y2P5U",floatAnimation:"SVGIcon-module_floatAnimation__kH3Tr"},d=function(o){var n=o.icon,t=o.size,i=void 0===t?"sm":t,d=o.className,r=void 0===d?"":d,_=o.isLoading,u=void 0!==_&&_,s=function(e){switch(e){case"xxs":return 8;case"xs":return 12;case"sm":default:return 16;case"md":return 24;case"lg":return 32;case"xl":return 48;case"xxl":return 64;case"xxxl":return 128}}(i);return n?e.jsx("div",{className:l(a,{container:!0,isLoading:u},[r]),children:e.jsx(n,{className:r,width:s,height:s,viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet"})}):null},r=function(){return r=Object.assign||function(e){for(var o,n=1,t=arguments.length;n<t;n++)for(var i in o=arguments[n])Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);return e},r.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var _,u=function(o){return e.jsxs("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:[e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2 8.377c0-.35 0-.525.015-.673a3 3 0 0 1 2.69-2.69C4.851 5 5.035 5 5.404 5c.143 0 .214 0 .274-.004a2 2 0 0 0 1.735-1.25c.023-.056.044-.12.086-.246.042-.127.063-.19.086-.246a2 2 0 0 1 1.735-1.25C9.38 2 9.448 2 9.58 2h4.838c.133 0 .2 0 .26.004a2 2 0 0 1 1.735 1.25c.023.056.044.12.086.246.042.127.063.19.086.246a2 2 0 0 0 1.735 1.25c.06.004.131.004.273.004.37 0 .554 0 .702.015a3 3 0 0 1 2.69 2.69c.014.147.014.322.014.672V16.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2z"}),e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 16.5a4 4 0 1 0 0-8 4 4 0 0 0 0 8"})]}))},s=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 6 9 17l-5-5"})}))},c=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m9 18 6-6-6-6"})}))},m=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m4.272 20.728 6.597-6.597c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668l6.553 6.553M14 15l2.869-2.869c.396-.396.594-.594.822-.668a1 1 0 0 1 .618 0c.228.074.426.272.822.668L22 15M10 9a2 2 0 1 1-4 0 2 2 0 0 1 4 0M6.8 21h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 18.72 22 17.88 22 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 3 18.88 3 17.2 3H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 5.28 2 6.12 2 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 21 5.12 21 6.8 21"})}))},h=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m8 16 4-4m0 0 4 4m-4-4v9m8-4.257A5.5 5.5 0 0 0 16.5 7a.62.62 0 0 1-.534-.302 7.5 7.5 0 1 0-11.78 9.096"})}))},p=function(o){return e.jsx("svg",r({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},o,{children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.316 19.438A4 4 0 0 1 9 17h6a4 4 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0m6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"})}))},g=function(o){var n=o.source,t=void 0===n?null:n,a=o.alt,r=void 0===a?"avatar":a,_=o.size,s=void 0===_?"sm":_,c=o.onClick,m=o.className,g=o.isEditable,f=void 0!==g&&g,x=o.overlayIcon,v=o.inline,I=void 0!==v&&v,L=o.isLoading,D=void 0!==L&&L,A=o.overlayText,y=function(){switch(s){case"xxxl":return 512;case"xxl":return 256;case"xl":return 128;case"lg":return 96;case"md":return 64;case"xs":return 32;case"xxs":return 24;default:return 48}};return e.jsxs("div",{className:l(i,{avatar:!0,clickable:!!c||f,editable:f,inline:I,loading:D},[i[s],m]),onClick:c,style:{width:y(),height:y()},children:[t?e.jsx("img",{src:t,alt:r,className:i.image,width:y(),height:y()}):e.jsx(d,{size:s,icon:p}),f&&e.jsx("div",{className:i.editIcon,children:e.jsx(d,{isLoading:D,icon:D?h:u})}),(!!x||A)&&e.jsxs("div",{className:i.overlay,children:[!!x&&e.jsx(d,{isLoading:D,icon:D?h:x}),!!A&&e.jsx("div",{className:i.overlayText,children:A})]})]})},f={container:"Button-module_container__0j8md",confirm:"Button-module_confirm__N5z4A",confirmActions:"Button-module_confirmActions__Xh7kN",button:"Button-module_button__18Bed",label:"Button-module_label__1PsXG",light:"Button-module_light__oUjYe",lightDark:"Button-module_lightDark__vucG6",active:"Button-module_active__UeHD7",lightDanger:"Button-module_lightDanger__aDpy8",lightInfo:"Button-module_lightInfo__oCfFI",lightPrimary:"Button-module_lightPrimary__f7-kQ",lightSecondary:"Button-module_lightSecondary__YK-QR",lightWarning:"Button-module_lightWarning__-Ogcg",lightSuccess:"Button-module_lightSuccess__gSt46",primary:"Button-module_primary__st6yY",secondary:"Button-module_secondary__j-3rj",danger:"Button-module_danger__Hxs5n",dark:"Button-module_dark__T7dl8",info:"Button-module_info__2z1ZG",success:"Button-module_success__CHTsg",warning:"Button-module_warning__1voOb",whiteText:"Button-module_whiteText__12xTM",default:"Button-module_default__TZZU2",borderedPrimary:"Button-module_borderedPrimary__KrZVT",borderedSecondary:"Button-module_borderedSecondary__UPNks",small:"Button-module_small__zfmcP",xsmall:"Button-module_xsmall__QS3d-",fullWidth:"Button-module_fullWidth__AHpSl",flexWide:"Button-module_flexWide__xDrEF",slidein:"Button-module_slidein__ofhlO",fadeInOut:"Button-module_fadeInOut__nAOqm",heightAnimation:"Button-module_heightAnimation__fLFCd",fadein:"Button-module_fadein__pspkB",floatAnimation:"Button-module_floatAnimation__0PYtT"};exports.UIElementType=void 0,(_=exports.UIElementType||(exports.UIElementType={})).PRIMARY="primary",_.SECONDARY="secondary",_.DANGER="danger",_.SUCCESS="success",_.WARNING="warning",_.INFO="info",_.LIGHT="light",_.DEFAULT="default",_.DARK="dark",_.LIGHT_PRIMARY="lightPrimary",_.LIGHT_SUCCESS="lightSuccess",_.LIGHT_WARNING="lightWarning",_.LIGHT_INFO="lightInfo",_.LIGHT_DANGER="lightDanger",_.LIGHT_DARK="lightDark",_.LIGHT_SECONDARY="lightSecondary",_.WHITE_TEXT="whiteText",_.BORDERED_PRIMARY="borderedPrimary",_.BORDERED_SECONDARY="borderedSecondary";var x,v=function(n){var t=n.type,i=void 0===t?exports.UIElementType.PRIMARY:t,a=n.onClick,r=n.label,_=n.icon,u=n.fullWidth,s=void 0!==u&&u,c=n.isLoading,m=n.disabled,h=n.className,p=n.needConfirm,g=void 0!==p&&p,x=n.size,I=void 0===x?"standard":x,L=o.useState(!1),D=L[0],A=L[1];return e.jsxs("div",{className:l(f,{container:!0,fullWidth:s}),children:[e.jsx("button",{className:l(f,{button:!0,loading:!!c},[f[i],f[I],h]),onClick:g?function(){return A(!D)}:a,disabled:c||m,children:c?e.jsx(o.Fragment,{children:"Loading..."}):e.jsxs("div",{className:f.label,children:[_&&e.jsx(d,{icon:_}),e.jsx("span",{children:r})]})}),D&&e.jsxs("div",{className:f.confirm,children:[e.jsx("div",{className:f.confirmMessage,children:"Are you sure?"}),e.jsxs("div",{className:f.confirmActions,children:[e.jsx(v,{type:exports.UIElementType.DANGER,onClick:function(){return A(!1)},label:"No"}),e.jsx(v,{type:exports.UIElementType.SUCCESS,onClick:function(){A(!1),a()},label:"Yes"})]})]})]})},I={iconButton:"IconButton-module_iconButton__PmpB8",noPadding:"IconButton-module_noPadding__Jd2rK",lg:"IconButton-module_lg__KG7lp",md:"IconButton-module_md__s4q7b",sm:"IconButton-module_sm__are9s",xs:"IconButton-module_xs__qYwZc",confirm:"IconButton-module_confirm__-jXH4",confirmActions:"IconButton-module_confirmActions__j7-Tt",bottom:"IconButton-module_bottom__AEpND",disabled:"IconButton-module_disabled__pLK-t",white:"IconButton-module_white__AzyNN",light:"IconButton-module_light__i3AET",active:"IconButton-module_active__popsF",lightDark:"IconButton-module_lightDark__d7NQy",lightDanger:"IconButton-module_lightDanger__bIg02",lightInfo:"IconButton-module_lightInfo__820It",lightPrimary:"IconButton-module_lightPrimary__SCrg-",lightSecondary:"IconButton-module_lightSecondary__vN-aS",lightWarning:"IconButton-module_lightWarning__z1iaR",lightSuccess:"IconButton-module_lightSuccess__mUSnD",primary:"IconButton-module_primary__qjfR5",secondary:"IconButton-module_secondary__-CufX",danger:"IconButton-module_danger__lz3tP",dark:"IconButton-module_dark__QiBJk",info:"IconButton-module_info__eawU-",success:"IconButton-module_success__xkDzZ",warning:"IconButton-module_warning__DhbfD",whiteText:"IconButton-module_whiteText__111Ju",default:"IconButton-module_default__j2U57",borderedPrimary:"IconButton-module_borderedPrimary__DHXJQ",borderedSecondary:"IconButton-module_borderedSecondary__13GNA",flexWide:"IconButton-module_flexWide__BGOfY",slidein:"IconButton-module_slidein__Rmpl5",fadeInOut:"IconButton-module_fadeInOut__Z2E5a",heightAnimation:"IconButton-module_heightAnimation__JnqnZ",fadein:"IconButton-module_fadein__uX9ut",floatAnimation:"IconButton-module_floatAnimation__N-INw"},L={listItem:"ListItem-module_listItem__ljWE5",separator:"ListItem-module_separator__CIXS1",dashedSeparator:"ListItem-module_dashedSeparator__SYWNX",content:"ListItem-module_content__mPC1D",data:"ListItem-module_data__e0N6V",title:"ListItem-module_title__YkOz9",subtitle:"ListItem-module_subtitle__5flJp",indicator:"ListItem-module_indicator__BwMsO",success:"ListItem-module_success__lgO8z",info:"ListItem-module_info__MKMBu",warning:"ListItem-module_warning__8P-nA",danger:"ListItem-module_danger__sWYOu",primary:"ListItem-module_primary__-bA-W",completed:"ListItem-module_completed__ovBl4",flexWide:"ListItem-module_flexWide__-0Q5a",slidein:"ListItem-module_slidein__dGxX-",fadeInOut:"ListItem-module_fadeInOut__Yuwsd",heightAnimation:"ListItem-module_heightAnimation__aVO2o",fadein:"ListItem-module_fadein__GSr23",floatAnimation:"ListItem-module_floatAnimation__efvAy"},D={link:"Link-module_link__35Vo1",fullWidth:"Link-module_fullWidth__eg45D",zero:"Link-module_zero__e-EXa",xxs:"Link-module_xxs__DLzl2",xs:"Link-module_xs__K3V8L",s:"Link-module_s__Ojcbu",m:"Link-module_m__KQ9M4",lg:"Link-module_lg__R71ff",xl:"Link-module_xl__q05MB",xxl:"Link-module_xxl__VZVxK",xxxl:"Link-module_xxxl__91qsW",light:"Link-module_light__Ji8kV",active:"Link-module_active__iCkL0",lightDark:"Link-module_lightDark__1fDCG",lightDanger:"Link-module_lightDanger__lB9Tb",lightInfo:"Link-module_lightInfo__h5lfu",lightPrimary:"Link-module_lightPrimary__aZxve",lightSecondary:"Link-module_lightSecondary__QHh0c",lightWarning:"Link-module_lightWarning__iOuMw",lightSuccess:"Link-module_lightSuccess__zDBp0",primary:"Link-module_primary__CE3uj",secondary:"Link-module_secondary__KSolI",danger:"Link-module_danger__ugf9r",dark:"Link-module_dark__ap0Ls",info:"Link-module_info__9skpg",success:"Link-module_success__DwP-V",warning:"Link-module_warning__FhhXi",whiteText:"Link-module_whiteText__t7SOQ",default:"Link-module_default__3TBlr",borderedPrimary:"Link-module_borderedPrimary__RfPen",borderedSecondary:"Link-module_borderedSecondary__xTeGX",flexWide:"Link-module_flexWide__3A6ZB",slidein:"Link-module_slidein__kBzO4",fadeInOut:"Link-module_fadeInOut__zas8c",heightAnimation:"Link-module_heightAnimation__N7y-w",fadein:"Link-module_fadein__WxUdb",floatAnimation:"Link-module_floatAnimation__XrwU5"},A={input:"Input-module_input__505b7",full:"Input-module_full__h2smD",noMargin:"Input-module_noMargin__ysWuN",container:"Input-module_container__itXJp",colorPicker:"Input-module_colorPicker__Efa-c",required:"Input-module_required__kHc93",addon:"Input-module_addon__1cKdz",pointer:"Input-module_pointer__EsKoB",error:"Input-module_error__38tit",avatar:"Input-module_avatar__GJUWC",autoCompleteContent:"Input-module_autoCompleteContent__4anQc",reversed:"Input-module_reversed__dU1hV",transparent:"Input-module_transparent__ko36m",small:"Input-module_small__5vYiK",xsmall:"Input-module_xsmall__-9hXW",hasAddon:"Input-module_hasAddon__mruPW",flexWide:"Input-module_flexWide__4Wn1k",slidein:"Input-module_slidein__XYim1",fadeInOut:"Input-module_fadeInOut__bnAwc",heightAnimation:"Input-module_heightAnimation__tmt9Z",fadein:"Input-module_fadein__1HtqV",floatAnimation:"Input-module_floatAnimation__sYawG"};exports.InputType=void 0,(x=exports.InputType||(exports.InputType={})).TEXT="text",x.PASSWORD="password",x.EMAIL="email",x.NUMBER="number",x.URL="url",x.TEL="tel",x.DATE="date",x.DATETIME="datetime",x.SELECT="select",x.COLOR_PICKER="color-picker",x.TEXT_AREA="text-area",x.AVATAR_UPLOAD="avatar-upload",x.UPLOAD_IMAGE_ICON="upload-image-icon";var y=o.forwardRef((function(n,t){var i=n.type,a=void 0===i?exports.InputType.TEXT:i,_=n.label,u=n.placeholder,s=n.value,c=n.required,h=void 0!==c&&c,p=n.addonIcon,f=n.labelAddon,x=n.errorMessage,v=n.options,I=void 0===v?[]:v,L=n.fullWidth,D=n.avatarSize,y=n.source,k=n.autoCompleteContent,w=n.autoCompleteReverse,j=void 0!==w&&w,B=n.noMargin,b=void 0!==B&&B,C=n.isDisabled,S=void 0!==C&&C,N=n.isLoading,T=void 0!==N&&N,E=n.isMultiUpload,O=void 0!==E&&E,W=n.autoFocus,P=void 0!==W&&W,R=n.theme,M=void 0===R?"oval":R,U=n.size,z=void 0===U?"medium":U,G=n.onBlur,F=n.onFocus,Y=n.onChange,H=n.addonAction,V=n.onEnter,K=n.onEsc,X=n.onFileSelect,q=n.onFilesSelect,Z=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)o.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n}(n,["type","label","placeholder","value","required","addonIcon","labelAddon","errorMessage","options","fullWidth","avatarSize","source","autoCompleteContent","autoCompleteReverse","noMargin","isDisabled","isLoading","isMultiUpload","autoFocus","theme","size","onBlur","onFocus","onChange","addonAction","onEnter","onEsc","onFileSelect","onFilesSelect"]),Q=S||T,J=function(e){switch(e.key){case"Enter":V&&V();break;case"Escape":K&&K()}},$=function(e){var o=e.target.files[0],n=new FileReader;n.onload=function(){X&&X(o,n.result)},n.readAsDataURL(o)},ee=function(e){var o=e.target;q&&q(o.files)};return e.jsxs("div",{className:l(A,{input:!0,full:!!L,noMargin:b,hasAddon:!!p},[A[M],A[z]]),children:[_&&e.jsxs("label",{children:[e.jsx("span",{className:h?A.required:"",children:_}),!!f&&e.jsx("div",{className:A.labelAddon,children:f})]}),e.jsx("div",{className:A.container,children:function(){switch(a){case exports.InputType.SELECT:return e.jsxs("select",r({className:A.field,value:s,onBlur:G,onFocus:F,onChange:Y,ref:t},Z,{children:[e.jsx("option",{value:"",children:u}),I.map((function(o){var n=o.label,t=o.value;return e.jsx("option",{value:t,children:n},t)}))]}));case exports.InputType.COLOR_PICKER:return e.jsx("input",r({className:"".concat(A.field," ").concat(A.colorPicker),type:"color",value:s,placeholder:u,onBlur:G,onFocus:F,onChange:Y,disabled:Q,ref:t},Z));case exports.InputType.TEXT_AREA:return e.jsx("textarea",r({className:A.field,value:s,placeholder:u,onBlur:G,onFocus:F,onChange:Y,autoFocus:P,ref:t},Z));case exports.InputType.AVATAR_UPLOAD:return e.jsxs("label",{htmlFor:"avatar-upload",children:[e.jsx(g,{size:D,source:y,isLoading:T,isEditable:!0}),e.jsx("input",{type:"file",name:"avatar-upload",id:"avatar-upload",accept:"image/*",onChange:O?ee:$,ref:t,className:A.avatar,disabled:Q,multiple:O})]});case exports.InputType.UPLOAD_IMAGE_ICON:return e.jsxs("label",{htmlFor:"upload-image-icon",children:[e.jsx(d,{icon:m,isLoading:T,size:"md"}),e.jsx("input",{type:"file",name:"upload-image-icon",id:"upload-image-icon",accept:"image/*",onChange:O?ee:$,ref:t,className:A.avatar,disabled:Q,multiple:O})]});default:return e.jsxs(o.Fragment,{children:[e.jsx("input",r({className:A.field,type:a,placeholder:u,value:s,onBlur:G,onFocus:F,onChange:Y,onKeyUp:J,ref:t,disabled:Q,autoFocus:P},Z)),p&&e.jsx("div",{className:H?"".concat(A.addon," ").concat(A.pointer):A.addon,onClick:H,children:e.jsx(d,{icon:p,isLoading:T})})]})}}()}),!!x&&e.jsx("div",{className:A.error,children:x}),!!k&&e.jsx("div",{className:l(A,{autoCompleteContent:!0,reversed:j}),children:k})]})})),k={menu:"DropDown-module_menu__gRW7p",container:"DropDown-module_container__ms9Bn",action:"DropDown-module_action__D8KuY",light:"DropDown-module_light__6NSjI",active:"DropDown-module_active__rGcA2",lightDark:"DropDown-module_lightDark__Ctspk",lightDanger:"DropDown-module_lightDanger__FaZ6G",lightInfo:"DropDown-module_lightInfo__DMaJO",lightPrimary:"DropDown-module_lightPrimary__sobOp",lightSecondary:"DropDown-module_lightSecondary__PB0m-",lightWarning:"DropDown-module_lightWarning__mkeGN",lightSuccess:"DropDown-module_lightSuccess__QNoVS",primary:"DropDown-module_primary__9-x6Y",secondary:"DropDown-module_secondary__HBses",danger:"DropDown-module_danger__ZbPY6",dark:"DropDown-module_dark__3YhdZ",info:"DropDown-module_info__5qwW6",success:"DropDown-module_success__NbhHj",warning:"DropDown-module_warning__MrYwV",whiteText:"DropDown-module_whiteText__eVLut",default:"DropDown-module_default__D0DNi",borderedPrimary:"DropDown-module_borderedPrimary__oTb-J",borderedSecondary:"DropDown-module_borderedSecondary__GqWsA",xsmall:"DropDown-module_xsmall__Mc6Zx",small:"DropDown-module_small__Goyza",large:"DropDown-module_large__P5F--",flexWide:"DropDown-module_flexWide__ySVZv",slidein:"DropDown-module_slidein__ZYDXA",fadeInOut:"DropDown-module_fadeInOut__hjIWL",heightAnimation:"DropDown-module_heightAnimation__EUum9",fadein:"DropDown-module_fadein__D2VO0",floatAnimation:"DropDown-module_floatAnimation__z5DD5"},w=function(e,n){var t=function(o){e.current&&!e.current.contains(o.target)&&n()};o.useEffect((function(){return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}),[])},j=function(n){var i=n.containerRef,l=n.contentRef,a=n.isOpen,d=void 0!==a&&a,_=n.renderChild,u=n.onClose,s={isOpen:!1,top:0,left:0,bottom:0,right:0},c=o.useState(s),m=c[0],h=c[1],p={position:"absolute",top:m.top,left:m.left,bottom:m.bottom,right:m.right,zIndex:111},g=function(){h(s),u()};return w(i,(function(){return g()})),o.useEffect((function(){if(d)return function(){var e,o,n,t,a,d,_,u=null!==(n=null===(o=null===(e=null==i?void 0:i.current)||void 0===e?void 0:e.getBoundingClientRect)||void 0===o?void 0:o.call(e))&&void 0!==n?n:{top:0,left:0,height:0,width:0},s=u.top,c=u.left,m=u.height,p=u.width,g=window.innerHeight,f=window.innerWidth,x=g-(s+m),v=s,I=c,L=f-(c+p),D=null!==(a=null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.clientHeight)&&void 0!==a?a:200,A=null!==(_=null===(d=null==l?void 0:l.current)||void 0===d?void 0:d.clientWidth)&&void 0!==_?_:200,y="auto",k="auto",w="auto",j="auto";x<D&&v>=D?j=g-s-m+20:k=s+m+5,L<A&&I>=A?w=f-c:y=c,h(r(r({},{top:k,left:y,right:w,bottom:j}),{isOpen:!0}))}();g()}),[d,null==i?void 0:i.current]),m.isOpen?t.default.createPortal(e.jsx("div",{style:p,onClick:function(e){e.stopPropagation()},children:_(m)}),document.getElementById("portals")):null},B=function(o){var n=o.children;return e.jsx("div",{className:k.menu,children:n})},b={container:"LoadingItem-module_container__ujRaI",fadeInOut:"LoadingItem-module_fadeInOut__HDJT8",square:"LoadingItem-module_square__OucYB",xxs:"LoadingItem-module_xxs__kTYcZ",xs:"LoadingItem-module_xs__sISZM",sm:"LoadingItem-module_sm__hsDHD",md:"LoadingItem-module_md__bU5yA",lg:"LoadingItem-module_lg__9sK4b",xl:"LoadingItem-module_xl__O0kH8",xxl:"LoadingItem-module_xxl__tIjdb",xxxl:"LoadingItem-module_xxxl__h73z5",xxxxl:"LoadingItem-module_xxxxl__XTzwy",flexWide:"LoadingItem-module_flexWide__sIJC3",slidein:"LoadingItem-module_slidein__8J982",heightAnimation:"LoadingItem-module_heightAnimation__cUh26",fadein:"LoadingItem-module_fadein__-CmLg",floatAnimation:"LoadingItem-module_floatAnimation__gQ2jh"};exports.Avatar=g,exports.Button=v,exports.DropDown=function(n){var t=n.action,i=n.menu,a=n.type,d=void 0===a?exports.UIElementType.DEFAULT:a,r=n.closeRef,_=n.actionSize,u=void 0===_?"medium":_,s=o.useRef(null),c=o.useRef(null),m=o.useRef(null),h=o.useState(!1),p=h[0],g=h[1],f=function(){return g(!1)};return o.useEffect((function(){(null==r?void 0:r.current)&&(r.current={close:function(){return f()}})}),[r]),e.jsxs("div",{className:k.container,ref:s,children:[e.jsx("div",{className:l(k,{action:!0},[k[d],k[u]]),ref:m,onClick:function(){return g(!p)},children:t}),e.jsx(j,{containerRef:s,contentRef:c,isOpen:p,onClose:f,renderChild:function(){return e.jsx("div",{className:k.menuContainer,ref:c,children:e.jsx(B,{children:i})})}})]})},exports.IconButton=function(n){var t=n.icon,i=n.onClick,a=n.type,r=void 0===a?exports.UIElementType.DEFAULT:a,_=n.needConfirm,u=void 0!==_&&_,s=n.noPadding,c=void 0!==s&&s,m=n.isLoading,h=void 0!==m&&m,p=n.size,g=void 0===p?"sm":p,f=n.confirmPosition,x=void 0===f?"top":f,L=o.useState(!1),D=L[0],A=L[1];return e.jsxs("div",{className:l(I,{iconButton:!0,noPadding:c},[I[r],I[g]]),onClick:h?void 0:u?function(){return A(!D)}:i,children:[e.jsx(d,{isLoading:h,icon:t,size:g}),D&&e.jsxs("div",{className:"".concat(I.confirm," ").concat(I[x]),children:[e.jsx("div",{className:I.confirmMessage,children:"Are you sure?"}),e.jsxs("div",{className:I.confirmActions,children:[e.jsx(v,{type:exports.UIElementType.DANGER,onClick:function(){return A(!1)},label:"No",size:"small"}),e.jsx(v,{type:exports.UIElementType.SUCCESS,onClick:i,label:"Yes",size:"small"})]})]})]})},exports.Input=y,exports.Link=function(o){var n=o.href,t=o.title,i=o.target,a=void 0===i?"_self":i,r=o.type,_=void 0===r?exports.UIElementType.DEFAULT:r,u=o.padding,s=void 0===u?"zero":u,m=o.hasChevron,h=void 0!==m&&m,p=o.fullWidth,g=void 0!==p&&p;return e.jsxs("a",{href:n,target:a,rel:"noopener noreferrer",className:l(D,{link:!0,fullWidth:g},[D[_],D[s]]),children:[e.jsx("span",{children:t})," ",h&&e.jsx(d,{icon:c})]})},exports.ListItem=function(o){var n=o.title,t=o.subtitle,i=o.actionTitle,a=void 0===i?"":i,r=o.action,_=o.completed,u=o.indicator,c=o.hasSeparator,m=void 0!==c&&c,h=o.hasDashedSeparator,p=void 0!==h&&h,g=o.isActionPending,f=void 0!==g&&g;return e.jsxs("div",{className:l(L,{listItem:!0,separator:m,dashedSeparator:p}),children:[e.jsxs("div",{className:L.content,children:[u&&e.jsx("div",{className:l(L,{indicator:!0},[L[u]])}),e.jsxs("div",{className:L.data,children:[e.jsx("div",{className:L.title,children:n}),t&&e.jsx("div",{className:L.subtitle,children:t})]})]}),r&&e.jsx(v,{onClick:r,className:L.action,label:a,isLoading:f}),_&&e.jsx("div",{className:L.completed,children:e.jsx(d,{icon:s})})]})},exports.LoadingItem=function(o){var n=o.shape,t=void 0===n?"square":n,i=o.size,a=void 0===i?"md":i,d=o.width,r=o.height;return e.jsx("div",{className:l(b,{container:!0},[b[t],b[a]]),style:{width:d,height:r}})},exports.SVGIcon=d,exports.classNames=l,exports.isEmpty=function(e){return null==e||("object"==typeof e?Array.isArray(e)?0===e.length:e instanceof Set||e instanceof Map?0===e.size:0===Object.keys(e).length:"string"==typeof e&&0===e.length)},exports.useClickOutside=w; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sorocraft/ui", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "UI Library by sorocraft.com", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
696552
1473