@instincthub/react-ui 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/assets/css/forms/submit-button.css +340 -102
- package/dist/src/components/auth/LoginForm.cjs +1 -1
- package/dist/src/components/auth/LoginForm.js +1 -1
- package/dist/src/components/forms/SubmitButton.cjs +1 -1
- package/dist/src/components/forms/SubmitButton.js +1 -1
- package/dist/src/components/ui/ComponentLists.cjs +1 -1
- package/dist/src/components/ui/ComponentLists.js +1 -1
- package/dist/src/types/components/forms/SubmitButton.d.ts +4 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as e,typeof as n,asyncToGenerator as r,regenerator as t,objectSpread2 as a,regeneratorValues as i}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as o,jsxs as s,Fragment as u}from"react/jsx-runtime";import{useState as l,useEffect as c,useRef as d,useCallback as m,useMemo as h}from"react";import{signOut as f,signIn as b}from"../../../node_modules/.pnpm/next-auth@5.0.0-beta.30_next@15.5.26_@babel_core@7.28.5_react-dom@19.3.0_react@19.3.0__react@19.3.0__react@19.3.0/node_modules/next-auth/react.js";import{useRouter as v}from"next/navigation";import{getData as p}from"../lib/auth/dbRequestst.js";import{getCookie as k,setCookie as g,handleResendOTP as w,reqOptions as y}from"../lib/helpFunction.js";import{openConfirmModal as N,openToast as C}from"../lib/modals/modals.js";import"../lib/utils.js";import"../lib/phoneUtils.js";import T from"../forms/PasswordField.js";import x from"../forms/InputText.js";import S from"../ui/OrDivider.js";import P from"./FromInstinctHub.js";import j from"../forms/SubmitButton.js";var A=function(e){return e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").trim()};function L(n,r){var t=l(n),a=e(t,2),i=a[0],o=a[1];return c(function(){var e=setTimeout(function(){o(n)},r);return function(){clearTimeout(e)}},[n,r]),i}var _="loginForm_preservedData",O=function(){try{localStorage.removeItem(_)}catch(e){console.warn("Failed to clear form data:",e)}},R=function(){return s("div",{className:"ihub-loading-skeleton",children:[o("div",{className:"ihub-skeleton-line ihub-skeleton-title"}),o("div",{className:"ihub-skeleton-line ihub-skeleton-input"}),o("div",{className:"ihub-skeleton-line ihub-skeleton-input"}),o("div",{className:"ihub-skeleton-line ihub-skeleton-button"})]})},E=function(E){var F=E.session;E.params;var I=E.searchParams,U=E.endpointPath,V=E.verificationPath,M=E.redirectPath,q=E.hideResetPassword,D=void 0!==q&&q,H=E.hideSignup,B=void 0!==H&&H,W=E.type,Y=E.channelUsername,J=void 0===Y?"skills":Y,X=E.isLoading,z=void 0!==X&&X,G=E.onSubmitStart,K=E.onSubmitComplete,Z=E.loadingText,$=void 0===Z?"Loading...":Z,Q=E.preserveFormData,ee=void 0!==Q&&Q,ne=E.onSuccessRedirect,re=E.onFailureRedirect,te=E.customValidationHandler,ae=E.autoRedirectOnSession,ie=void 0===ae||ae,oe=E.title,se=void 0===oe?"Login Form":oe,ue=E.subtitle,le=E.showTitle,ce=void 0===le||le,de=E.className,me=E.formClassName,he=E.enableClientValidation,fe=void 0!==he&&he,be=E.customValidationRules,ve=E.onError,pe=E.sessionCheckInterval,ke=void 0===pe?3e4:pe,ge=E.clearCallbackAfterUse,we=void 0===ge||ge,ye=E.submitButtonText,Ne=void 0===ye?"Login":ye,Ce=E.submitButtonVariant,Te=void 0===Ce?"primary":Ce,xe=E.showRememberMe,Se=void 0!==xe&&xe,Pe=E.rememberMeText,je=void 0===Pe?"Remember me":Pe,Ae=E.enableOAuth,Le=void 0!==Ae&&Ae,_e=E.oauthProviders,Oe=void 0===_e?[]:_e,Re=E.oauthConfig,Ee=void 0===Re?{}:Re,Fe=E.enableCaptcha,Ie=void 0!==Fe&&Fe;E.captchaProvider;var Ue=E.enableRateLimiting,Ve=void 0!==Ue&&Ue,Me=E.maxAttempts,qe=void 0===Me?5:Me,De=E.lockoutDuration,He=void 0===De?3e5:De,Be=E.trackingEnabled,We=void 0!==Be&&Be,Ye=E.onLoginAttempt,Je=E.onLoginSuccess,Xe=E.onLoginFailure,ze=E.ariaLabel,Ge=E.ariaDescribedBy,Ke=E.focusOnMount,Ze=void 0!==Ke&&Ke;E.autoComplete;var $e=E.validateOnBlur,Qe=void 0!==$e&&$e,en=E.debounceValidation,nn=void 0===en?300:en,rn=E.showPasswordStrength,tn=void 0!==rn&&rn,an=E.enableFormReset,on=void 0!==an&&an,sn=E.autoSave,un=void 0!==sn&&sn,ln=E.autoSaveInterval,cn=void 0===ln?5e3:ln,dn=E.offlineSupport,mn=void 0!==dn&&dn,hn=E.retryAttempts,fn=void 0===hn?3:hn,bn=E.retryDelay,vn=void 0===bn?1e3:bn,pn=E.sessionTimeoutWarning,kn=void 0!==pn&&pn,gn=E.sessionTimeoutDuration,wn=void 0===gn?18e5:gn,yn=E.csrfToken,Nn=E.sanitizeInputs,Cn=void 0===Nn||Nn,Tn=E.highContrastMode,xn=void 0!==Tn&&Tn,Sn=E.showLoadingSkeleton,Pn=void 0!==Sn&&Sn,jn=E.preventMultipleSubmissions,An=void 0===jn||jn,Ln=v(),_n=I.error,On=function(e){if(e)try{return decodeURIComponent(e)}catch(e){return}}(I.callbackUrl),Rn=l(""),En=e(Rn,2),Fn=En[0],In=En[1],Un=l(1),Vn=e(Un,2),Mn=Vn[0],qn=Vn[1],Dn=l(""),Hn=e(Dn,2),Bn=Hn[0],Wn=Hn[1],Yn=l(""),Jn=e(Yn,2),Xn=Jn[0],zn=Jn[1],Gn=l(!1),Kn=e(Gn,2),Zn=Kn[0],$n=Kn[1],Qn=l(!1),er=e(Qn,2),nr=er[0],rr=er[1],tr=l(0),ar=e(tr,2),ir=ar[0],or=ar[1],sr=l(!1),ur=e(sr,2),lr=ur[0],cr=ur[1],dr=l({}),mr=e(dr,2),hr=mr[0],fr=mr[1],br=l(!1),vr=e(br,2),pr=vr[0],kr=vr[1];c(function(){return kr(!0)},[]);var gr=l(!1),wr=e(gr,2),yr=wr[0],Nr=wr[1],Cr=l({score:0,feedback:[]}),Tr=e(Cr,2),xr=Tr[0],Sr=Tr[1],Pr=l(!1),jr=e(Pr,2),Ar=jr[0],Lr=jr[1],_r=l(!1),Or=e(_r,2),Rr=Or[0],Er=Or[1],Fr=l(!1),Ir=e(Fr,2),Ur=Ir[0],Vr=Ir[1],Mr=l(""),qr=e(Mr,2),Dr=qr[0],Hr=qr[1],Br=l(function(){return Math.random().toString(36).substr(2,9)}),Wr=e(Br,1)[0],Yr=d(null),Jr=d(null),Xr=d(null),zr=d(null),Gr=d(null),Kr=d(!0),Zr=d(null),$r=d(0),Qr=F,et=L(Bn,nn),nt=L(Xn,nn),rt=z||Zn||Ar,tt=m(function(){Yr.current&&Yr.current.abort(),[Jr,Xr,zr,Gr].forEach(function(e){e.current&&clearTimeout(e.current)})},[]);c(function(){if(ee){var e=function(){try{var e=localStorage.getItem(_);return e?JSON.parse(e):null}catch(e){return console.warn("Failed to load form data:",e),null}}();e&&(Wn(e.username),rr(e.rememberMe))}},[ee]),c(function(){if(un&&Ur)return zr.current=setTimeout(function(){ee&&function(e){try{localStorage.setItem(_,JSON.stringify(e))}catch(e){console.warn("Failed to save form data:",e)}}({username:Bn,rememberMe:nr})},cn),function(){zr.current&&clearTimeout(zr.current)}},[un,cn,Bn,nr,Ur,ee]),c(function(){if(mn){var e=function(){return Nr(!1)},n=function(){return Nr(!0)};return window.addEventListener("online",e),window.addEventListener("offline",n),Nr(!navigator.onLine),function(){window.removeEventListener("online",e),window.removeEventListener("offline",n)}}},[mn]);var at=h(function(){return function(e){return e&&"object"===n(e)&&"token"in e}(Qr)?Qr:null},[Qr]),it=h(function(){var e,r,t,a,i;return{handle:"object"===n(null==at?void 0:at.channels)?null==at||null===(e=at.channels)||void 0===e||null===(e=e.active)||void 0===e?void 0:e.username:"",token:null==at?void 0:at.accessToken,uuid:null==at||null===(r=at.user)||void 0===r?void 0:r.uuid,email:(null==at||null===(t=at.user)||void 0===t?void 0:t.email)||(null==at||null===(a=at.user)||void 0===a?void 0:a.email),verifyEmail:null==at||null===(i=at.user)||void 0===i?void 0:i.emailVerified}},[at,F]),ot=it.handle,st=it.token,ut=it.uuid,lt=it.email,ct=it.verifyEmail;c(function(){if(kn&&st&&!Rr)return Gr.current=setTimeout(function(){Kr.current&&N("Your session will expire in 5 minutes. Do you want to extend it?").then(function(e){Er(!0)})},wn-3e5),function(){Gr.current&&clearTimeout(Gr.current)}},[kn,wn,st,Rr]),c(function(){tn&&Xn&&Sr(function(e){var n={score:0,feedback:[]};return e.length>=8?n.score+=1:n.feedback.push("At least 8 characters"),/[A-Z]/.test(e)?n.score+=1:n.feedback.push("Include uppercase letter"),/[a-z]/.test(e)?n.score+=1:n.feedback.push("Include lowercase letter"),/\d/.test(e)?n.score+=1:n.feedback.push("Include number"),/[!@#$%^&*(),.?":{}|<>]/.test(e)?n.score+=1:n.feedback.push("Include special character"),n}(Xn))},[Xn,tn]);var dt=m(function(){if(!fe)return!0;var e={},n=Cn?A(Bn):Bn,r=Cn?A(Xn):Xn;if(null!=be&&be.username){var t=be.username(n);t&&(e.username=t)}else n.trim()?n.length<3&&(e.username="Username must be at least 3 characters"):e.username="Username is required";if(null!=be&&be.password){var a=be.password(r);a&&(e.password=a)}else r.trim()?r.length<6&&(e.password="Password must be at least 6 characters"):e.password="Password is required";if(fr(e),Object.keys(e).length>0){var i=Object.values(e).join(". "),o=document.createElement("div");o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","true"),o.style.position="absolute",o.style.left="-10000px",o.textContent="Form validation errors: ".concat(i),document.body.appendChild(o),setTimeout(function(){document.body.contains(o)&&document.body.removeChild(o)},1e3)}return 0===Object.keys(e).length},[fe,be,Bn,Xn,Cn]);c(function(){Qe&&Ur&&fe&&dt()},[et,nt,Qe,Ur,fe,dt]);var mt=m(function(){return!Ve||(!(ir>=qe)||(cr(!0),Jr.current=setTimeout(function(){Kr.current&&(cr(!1),or(0))},He),!1))},[Ve,ir,qe,He]),ht=m(function(){var e=r(t().m(function e(n){var r,a,o;return t().w(function(e){for(;;)switch(e.n){case 0:r=t().m(function e(r){var a,i;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,n();case 1:return a=e.v,e.a(2,{v:a});case 2:if(e.p=2,i=e.v,r!==fn&&"AbortError"!==i.name){e.n=3;break}throw i;case 3:return e.n=4,new Promise(function(e){return setTimeout(e,vn*Math.pow(2,r))});case 4:return e.a(2)}},e,null,[[0,2]])}),o=0;case 1:if(!(o<=fn)){e.n=4;break}return e.d(i(r(o)),2);case 2:if(!(a=e.v)){e.n=3;break}return e.a(2,a.v);case 3:o++,e.n=1;break;case 4:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}(),[fn,vn]),ft=m(function(){var e=r(t().m(function e(n){var i,o,s,u,l,c,d,m,h,f,v,p,k;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n.preventDefault(),!An||!Ar){e.n=1;break}return e.a(2);case 1:if(Vr(!0),dt()){e.n=2;break}return null==ve||ve("Validation failed","validation"),e.a(2);case 2:if(!mn||!yr){e.n=3;break}return In("You are offline. Please check your connection and try again."),null==ve||ve("Offline","network"),e.a(2);case 3:if(mt()){e.n=4;break}return o="Too many attempts. Please wait ".concat(Math.ceil(He/6e4)," minutes."),In(o),null==ve||ve(o,"auth"),e.a(2);case 4:if(!Ie||Dr){e.n=5;break}return In("Please complete the CAPTCHA verification."),null==ve||ve("CAPTCHA required","validation"),e.a(2);case 5:return tt(),Yr.current=new AbortController,qn(0),In(""),$n(!0),Lr(!0),fr({}),$r.current=0,null==G||G(),We&&(null==Ye||Ye(Bn)),Ve&&or(function(e){return e+1}),s=Cn?A(Bn):Bn,u=Cn?A(Xn):Xn,l={username:s,password:u,provider:"credentials",channel:J,formId:Wr},Se&&(l.rememberMe=nr),yn&&(l._token=yn),Ie&&Dr&&(l.captchaToken=Dr),(c=y("POST",JSON.stringify(l),null,"json")).signal=null===(i=Yr.current)||void 0===i?void 0:i.signal,c.headers=a(a({},c.headers),{},{"X-Requested-With":"XMLHttpRequest","X-Form-ID":Wr}),yn&&(c.headers["X-CSRF-Token"]=yn),d=function(){var e=r(t().m(function e(){var n,r,a;return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch(U||"/api/auth/login",c);case 1:return n=e.v,r=n,e.n=2,n.json();case 2:return a=e.v,e.a(2,{req:r,res:a})}},e)}));return function(){return e.apply(this,arguments)}}(),e.p=6,e.n=7,ht(d);case 7:if(m=e.v,h=m.req,f=m.res,200!==h.status&&!h.ok){e.n=9;break}return v={username:JSON.stringify(f),password:"instincthub",redirect:!1},On&&(v.callbackUrl=On,g("callbackUrl",On,30)),null==K||K(!0),We&&(null==Je||Je(f)),Ve&&or(0),ee||O(),e.n=8,b("credentials",v);case 8:qn(1),Ln.refresh(),e.n=10;break;case 9:p=f.message||f.detail||"An error occurred",In(p),qn(1),null==ve||ve(p,"auth"),null==K||K(!1),We&&(null==Xe||Xe(p,Bn));case 10:e.n=13;break;case 11:if(e.p=11,"AbortError"!==e.v.name){e.n=12;break}return e.a(2);case 12:C(k="Couldn't login. Please try again.",400),qn(1),null==ve||ve(k,"network"),null==K||K(!1),We&&(null==Xe||Xe(k,Bn));case 13:return e.p=13,Kr.current&&($n(!1),Lr(!1)),e.f(13);case 14:return e.a(2)}},e,null,[[6,11,13,14]])}));return function(n){return e.apply(this,arguments)}}(),[Bn,Xn,J,On,U,dt,mt,tt,G,Ye,K,Je,ve,Xe,Ve,Se,nr,Cn,yn,Ie,Dr,Wr,An,Ar,mn,yr,ht,ee,We]),bt=m(function(){on&&(Wn(""),zn(""),rr(!1),In(""),fr({}),Sr({score:0,feedback:[]}),Vr(!1),ee&&O(),setTimeout(function(){var e,n=null===(e=Zr.current)||void 0===e?void 0:e.querySelector('input[name="username"]');n&&n.focus()},100))},[on,ee]),vt=m(function(e,n){if(ne)ne(e,n);else{var r=k("callbackUrl"),t=n||r;if(t)we&&g("callbackUrl","",-1),Ln.push(t);else if(M)Ln.push(M);else if("skills"===W)Ln.push("/library");else if("lms"===W)if(ot){var a="You are currently logged in with ".concat(ot," channel. Would you like to proceed to the dashboard?");N(a).then(function(e){e&&Ln.push("/".concat(ot))})}else{N("You do not have an active channel for this account. Would you like to create one?").then(function(e){e?Ln.push("/auth/create-channel"):f()})}else Ln.push("/")}},[ne,we,M,W,ot,Ln]),pt=m(r(t().m(function e(){var n,r,a,i,o;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:if(st&&at){e.n=1;break}return e.a(2);case 1:if(!te){e.n=6;break}return e.p=2,e.n=3,te(at);case 3:if(e.v){e.n=4;break}return null==re||re("Custom validation failed"),e.a(2);case 4:e.n=6;break;case 5:return e.p=5,i=e.v,console.error("Custom validation error:",i),null==re||re("Validation error occurred"),e.a(2);case 6:return tt(),Yr.current=new AbortController,e.p=7,n={path:"auth/skills/validate-user-token/?access_token=".concat(st,"&user_uuid=").concat(ut),token:st},e.n=8,p(n);case 8:if("Unauthorized"!==(null==(r=e.v)?void 0:r.detail)&&"Not found."!==(null==r?void 0:r.detail)){e.n=9;break}return C("Couldn't login. Please try again.",400),qn(1),null==re||re("Token validation failed"),e.a(2);case 9:!1===ct?(a="".concat(V||"/auth/verify-email","?email=").concat(lt),N("You need to verify your email address, click okay to request for a one time password (OTP).").then(function(e){e&<?(w(lt),Ln.push(a)):f()})):vt(at,On);case 10:e.n=13;break;case 11:if(e.p=11,"AbortError"!==(o=e.v).name){e.n=12;break}return e.a(2);case 12:console.error("Validation error:",o),C("Validation failed. Please try again.",400),qn(1),null==re||re("Network error during validation");case 13:return e.a(2)}},e,null,[[7,11],[2,5]])})),[st,ut,at,te,re,tt,V,lt,ct,vt,On,Ln]),kt=m(function(e){Vr(!0);var n=e.target.value;Wn(n),hr.username&&fr(function(e){return a(a({},e),{},{username:void 0})})},[hr.username]),gt=m(function(e){Vr(!0);var n=e.target.value;zn(n),hr.password&&fr(function(e){return a(a({},e),{},{password:void 0})})},[hr.password]);m(function(e){Qe&&fe&&setTimeout(function(){return dt()},100)},[Qe,fe,dt]);var wt=m(function(e){var n=Ee[e]||{},r=a({callbackUrl:On},n);We&&(null==Ye||Ye("oauth_".concat(e))),b(e,r)},[Ee,On,We,Ye]);return c(function(){On&&g("callbackUrl",On,30)},[On]),c(function(){if(ie&&!rt&&F)if(at&&st)te||ut?pt():vt(at,On);else if(null!=F&&F.user){var e={name:F.user};vt(e,On)}},[F,at,st,ut,ie,rt,te,pt,vt,On]),c(function(){if(ke>0&&st){var e=function(){Xr.current=setTimeout(function(){Kr.current&&st&&(pt(),e())},ke)};return e(),function(){Xr.current&&clearTimeout(Xr.current)}}},[ke,st,pt]),c(function(){if(Ze){var e=document.querySelector('input[name="username"]');e&&e.focus()}},[Ze]),c(function(){return function(){Kr.current=!1,tt()}},[tt]),c(function(){return xn?document.body.classList.add("ihub-high-contrast"):document.body.classList.remove("ihub-high-contrast"),function(){document.body.classList.remove("ihub-high-contrast")}},[xn]),o("div",Pn&&rt?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:o(R,{})}:rt&&Pn?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:o("div",{className:"ihub-loading-state",children:o("p",{children:$})})}:lr?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:s("div",{className:"ihub-error-state",children:[s("p",{children:["Too many login attempts. Please wait"," ",Math.ceil(He/6e4)," minutes before trying again."]}),on&&o("button",{onClick:bt,className:"ihub-reset-btn ihub-mt-3",type:"button",children:"Reset Form"})]})}:mn&&yr?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:s("div",{className:"ihub-offline-state",children:[o("p",{children:"You are currently offline. Please check your internet connection and try again."}),o("button",{onClick:function(){return window.location.reload()},className:"ihub-retry-btn ihub-mt-3",type:"button",children:"Retry"})]})}:{className:"".concat(de||""," ").concat(xn?"ihub-high-contrast":""),children:s("form",{ref:Zr,onSubmit:ft,method:"post",className:"ihub-max-w-500 ihub-mx-auto ".concat(me||""),"aria-label":ze||"Login form","aria-describedby":Ge,noValidate:fe,children:[ce&&s(u,{children:[o("h1",{className:"ihub-fs-32",children:se}),ue&&o("p",{className:"ihub-subtitle",children:ue})]}),_n&&o("div",{className:"err",role:"alert","aria-live":"polite",children:"Sign in failed. Check the details you provided are correct."}),o(x,{name:"username",type:"text",label:"Email or Username",required:!0,textTransform:"lowercase",value:Bn,onChange:kt}),hr.username&&o("p",{className:"err",id:"username-error",role:"alert",children:hr.username}),o(T,{name:"password",label:"Password",required:!0,id:"password",value:Xn,onChange:gt}),hr.password&&o("p",{className:"err",id:"password-error",role:"alert",children:hr.password}),tn&&Xn&&s("div",{className:"ihub-password-strength ihub-mt-2",id:"password-strength",children:[o("div",{className:"ihub-strength-meter",children:o("div",{className:"ihub-strength-bar ihub-strength-".concat(xr.score),style:{width:"".concat(xr.score/5*100,"%")}})}),s("p",{className:"ihub-strength-text",children:["Password strength:"," ",["Very Weak","Weak","Fair","Good","Strong"][xr.score]]}),xr.feedback.length>0&&o("ul",{className:"ihub-strength-feedback",children:xr.feedback.map(function(e,n){return o("li",{children:e},n)})})]}),Se&&s("div",{className:"ihub-remember-me ihub-mt-3",children:[s("label",{className:"ihub-checkbox-label",children:[o("input",{type:"checkbox",checked:nr,onChange:function(e){rr(e.target.checked),Vr(!0)},"aria-describedby":"remember-me-help"}),je]}),o("small",{id:"remember-me-help",className:"ihub-help-text",children:"Keep me signed in on this device"})]}),Ie&&o("div",{className:"ihub-captcha ihub-mt-3",children:s("div",{className:"ihub-captcha-placeholder",children:[o("p",{children:"CAPTCHA verification would be loaded here"}),o("button",{type:"button",onClick:function(){return Hr("mock-captcha-token")},className:"ihub-verify-btn",children:"Verify (Mock)"})]})}),Fn&&o("div",{className:"err",role:"alert","aria-live":"polite",children:Fn}),s("div",{className:"action ihub-mt-4 ihub-mb-5",children:[o(j,{label:Ne,type:"submit",status:Mn,variant:Te,disabled:!pr}),on&&o("button",{type:"button",onClick:bt,className:"ihub-reset-btn ihub-ml-3",disabled:rt,children:"Reset"}),(!D||!B||Le)&&o(S,{labels:"or sign with"}),Le&&Oe.length>0&&o("div",{className:"ihub-oauth-buttons ihub-mt-3",role:"group","aria-label":"Social login options",children:Oe.map(function(e){return s("button",{type:"button",className:"ihub-oauth-btn ihub-oauth-".concat(e),onClick:function(){return wt(e)},disabled:rt,"aria-label":"Continue with ".concat(e),children:["Continue with"," ",e.charAt(0).toUpperCase()+e.slice(1)]},e)})}),!D&&s("p",{className:"ihub-text-center ihub-fs-14",children:["Can't remember password?"," ",o("a",{href:"/auth/reset-password",children:"Reset Password"})]}),!B&&s("p",{className:"ihub-text-center ihub-fs-14",children:["New user? ",o("a",{href:"/auth/signup",children:"Create an account."})]})]}),o(P,{showText:!0}),"development"===process.env.NODE_ENV&&s("details",{className:"ihub-dev-info ihub-mt-4",children:[o("summary",{children:"Development Info"}),o("pre",{className:"ihub-dev-details",children:JSON.stringify({formTouched:Ur,isOffline:mn?yr:"disabled",passwordStrength:tn?xr:"disabled",attemptCount:Ve?ir:"disabled",validationErrors:hr,formId:Wr},null,2)})]})]})})};export{E as default};
|
|
1
|
+
import{slicedToArray as e,typeof as n,asyncToGenerator as r,regenerator as t,objectSpread2 as a,regeneratorValues as i}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as o,jsxs as s,Fragment as u}from"react/jsx-runtime";import{useState as l,useEffect as c,useRef as d,useCallback as m,useMemo as h}from"react";import{signOut as f,signIn as b}from"../../../node_modules/.pnpm/next-auth@5.0.0-beta.30_next@15.5.26_@babel_core@7.28.5_react-dom@19.3.0_react@19.3.0__react@19.3.0__react@19.3.0/node_modules/next-auth/react.js";import{useRouter as v}from"next/navigation";import{getData as p}from"../lib/auth/dbRequestst.js";import{getCookie as k,setCookie as g,handleResendOTP as w,reqOptions as y}from"../lib/helpFunction.js";import{openConfirmModal as N,openToast as C}from"../lib/modals/modals.js";import"../lib/utils.js";import"../lib/phoneUtils.js";import T from"../forms/PasswordField.js";import x from"../forms/InputText.js";import S from"../ui/OrDivider.js";import P from"./FromInstinctHub.js";import j from"../forms/SubmitButton.js";var A=function(e){return e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").trim()};function L(n,r){var t=l(n),a=e(t,2),i=a[0],o=a[1];return c(function(){var e=setTimeout(function(){o(n)},r);return function(){clearTimeout(e)}},[n,r]),i}var _="loginForm_preservedData",O=function(){try{localStorage.removeItem(_)}catch(e){console.warn("Failed to clear form data:",e)}},R=function(){return s("div",{className:"ihub-loading-skeleton",children:[o("div",{className:"ihub-skeleton-line ihub-skeleton-title"}),o("div",{className:"ihub-skeleton-line ihub-skeleton-input"}),o("div",{className:"ihub-skeleton-line ihub-skeleton-input"}),o("div",{className:"ihub-skeleton-line ihub-skeleton-button"})]})},E=function(E){var F=E.session;E.params;var I=E.searchParams,U=E.endpointPath,V=E.verificationPath,M=E.redirectPath,q=E.hideResetPassword,D=void 0!==q&&q,H=E.hideSignup,B=void 0!==H&&H,W=E.type,Y=E.channelUsername,J=void 0===Y?"skills":Y,X=E.isLoading,z=void 0!==X&&X,G=E.onSubmitStart,K=E.onSubmitComplete,Z=E.loadingText,$=void 0===Z?"Loading...":Z,Q=E.preserveFormData,ee=void 0!==Q&&Q,ne=E.onSuccessRedirect,re=E.onFailureRedirect,te=E.customValidationHandler,ae=E.autoRedirectOnSession,ie=void 0===ae||ae,oe=E.title,se=void 0===oe?"Login Form":oe,ue=E.subtitle,le=E.showTitle,ce=void 0===le||le,de=E.className,me=E.formClassName,he=E.enableClientValidation,fe=void 0!==he&&he,be=E.customValidationRules,ve=E.onError,pe=E.sessionCheckInterval,ke=void 0===pe?3e4:pe,ge=E.clearCallbackAfterUse,we=void 0===ge||ge,ye=E.submitButtonText,Ne=void 0===ye?"Login":ye,Ce=E.submitButtonVariant,Te=void 0===Ce?"primary":Ce,xe=E.showRememberMe,Se=void 0!==xe&&xe,Pe=E.rememberMeText,je=void 0===Pe?"Remember me":Pe,Ae=E.enableOAuth,Le=void 0!==Ae&&Ae,_e=E.oauthProviders,Oe=void 0===_e?[]:_e,Re=E.oauthConfig,Ee=void 0===Re?{}:Re,Fe=E.enableCaptcha,Ie=void 0!==Fe&&Fe;E.captchaProvider;var Ue=E.enableRateLimiting,Ve=void 0!==Ue&&Ue,Me=E.maxAttempts,qe=void 0===Me?5:Me,De=E.lockoutDuration,He=void 0===De?3e5:De,Be=E.trackingEnabled,We=void 0!==Be&&Be,Ye=E.onLoginAttempt,Je=E.onLoginSuccess,Xe=E.onLoginFailure,ze=E.ariaLabel,Ge=E.ariaDescribedBy,Ke=E.focusOnMount,Ze=void 0!==Ke&&Ke;E.autoComplete;var $e=E.validateOnBlur,Qe=void 0!==$e&&$e,en=E.debounceValidation,nn=void 0===en?300:en,rn=E.showPasswordStrength,tn=void 0!==rn&&rn,an=E.enableFormReset,on=void 0!==an&&an,sn=E.autoSave,un=void 0!==sn&&sn,ln=E.autoSaveInterval,cn=void 0===ln?5e3:ln,dn=E.offlineSupport,mn=void 0!==dn&&dn,hn=E.retryAttempts,fn=void 0===hn?3:hn,bn=E.retryDelay,vn=void 0===bn?1e3:bn,pn=E.sessionTimeoutWarning,kn=void 0!==pn&&pn,gn=E.sessionTimeoutDuration,wn=void 0===gn?18e5:gn,yn=E.csrfToken,Nn=E.sanitizeInputs,Cn=void 0===Nn||Nn,Tn=E.highContrastMode,xn=void 0!==Tn&&Tn,Sn=E.showLoadingSkeleton,Pn=void 0!==Sn&&Sn,jn=E.preventMultipleSubmissions,An=void 0===jn||jn,Ln=v(),_n=I.error,On=function(e){if(e)try{return decodeURIComponent(e)}catch(e){return}}(I.callbackUrl),Rn=l(""),En=e(Rn,2),Fn=En[0],In=En[1],Un=l(1),Vn=e(Un,2),Mn=Vn[0],qn=Vn[1],Dn=l(""),Hn=e(Dn,2),Bn=Hn[0],Wn=Hn[1],Yn=l(""),Jn=e(Yn,2),Xn=Jn[0],zn=Jn[1],Gn=l(!1),Kn=e(Gn,2),Zn=Kn[0],$n=Kn[1],Qn=l(!1),er=e(Qn,2),nr=er[0],rr=er[1],tr=l(0),ar=e(tr,2),ir=ar[0],or=ar[1],sr=l(!1),ur=e(sr,2),lr=ur[0],cr=ur[1],dr=l({}),mr=e(dr,2),hr=mr[0],fr=mr[1],br=l(!1),vr=e(br,2),pr=vr[0],kr=vr[1];c(function(){return kr(!0)},[]);var gr=l(!1),wr=e(gr,2),yr=wr[0],Nr=wr[1],Cr=l({score:0,feedback:[]}),Tr=e(Cr,2),xr=Tr[0],Sr=Tr[1],Pr=l(!1),jr=e(Pr,2),Ar=jr[0],Lr=jr[1],_r=l(!1),Or=e(_r,2),Rr=Or[0],Er=Or[1],Fr=l(!1),Ir=e(Fr,2),Ur=Ir[0],Vr=Ir[1],Mr=l(""),qr=e(Mr,2),Dr=qr[0],Hr=qr[1],Br=l(function(){return Math.random().toString(36).substr(2,9)}),Wr=e(Br,1)[0],Yr=d(null),Jr=d(null),Xr=d(null),zr=d(null),Gr=d(null),Kr=d(!0),Zr=d(null),$r=d(0),Qr=F,et=L(Bn,nn),nt=L(Xn,nn),rt=z||Zn||Ar,tt=m(function(){Yr.current&&Yr.current.abort(),[Jr,Xr,zr,Gr].forEach(function(e){e.current&&clearTimeout(e.current)})},[]);c(function(){if(ee){var e=function(){try{var e=localStorage.getItem(_);return e?JSON.parse(e):null}catch(e){return console.warn("Failed to load form data:",e),null}}();e&&(Wn(e.username),rr(e.rememberMe))}},[ee]),c(function(){if(un&&Ur)return zr.current=setTimeout(function(){ee&&function(e){try{localStorage.setItem(_,JSON.stringify(e))}catch(e){console.warn("Failed to save form data:",e)}}({username:Bn,rememberMe:nr})},cn),function(){zr.current&&clearTimeout(zr.current)}},[un,cn,Bn,nr,Ur,ee]),c(function(){if(mn){var e=function(){return Nr(!1)},n=function(){return Nr(!0)};return window.addEventListener("online",e),window.addEventListener("offline",n),Nr(!navigator.onLine),function(){window.removeEventListener("online",e),window.removeEventListener("offline",n)}}},[mn]);var at=h(function(){return function(e){return e&&"object"===n(e)&&"token"in e}(Qr)?Qr:null},[Qr]),it=h(function(){var e,r,t,a,i;return{handle:"object"===n(null==at?void 0:at.channels)?null==at||null===(e=at.channels)||void 0===e||null===(e=e.active)||void 0===e?void 0:e.username:"",token:null==at?void 0:at.accessToken,uuid:null==at||null===(r=at.user)||void 0===r?void 0:r.uuid,email:(null==at||null===(t=at.user)||void 0===t?void 0:t.email)||(null==at||null===(a=at.user)||void 0===a?void 0:a.email),verifyEmail:null==at||null===(i=at.user)||void 0===i?void 0:i.emailVerified}},[at,F]),ot=it.handle,st=it.token,ut=it.uuid,lt=it.email,ct=it.verifyEmail;c(function(){if(kn&&st&&!Rr)return Gr.current=setTimeout(function(){Kr.current&&N("Your session will expire in 5 minutes. Do you want to extend it?").then(function(e){Er(!0)})},wn-3e5),function(){Gr.current&&clearTimeout(Gr.current)}},[kn,wn,st,Rr]),c(function(){tn&&Xn&&Sr(function(e){var n={score:0,feedback:[]};return e.length>=8?n.score+=1:n.feedback.push("At least 8 characters"),/[A-Z]/.test(e)?n.score+=1:n.feedback.push("Include uppercase letter"),/[a-z]/.test(e)?n.score+=1:n.feedback.push("Include lowercase letter"),/\d/.test(e)?n.score+=1:n.feedback.push("Include number"),/[!@#$%^&*(),.?":{}|<>]/.test(e)?n.score+=1:n.feedback.push("Include special character"),n}(Xn))},[Xn,tn]);var dt=m(function(){if(!fe)return!0;var e={},n=Cn?A(Bn):Bn,r=Cn?A(Xn):Xn;if(null!=be&&be.username){var t=be.username(n);t&&(e.username=t)}else n.trim()?n.length<3&&(e.username="Username must be at least 3 characters"):e.username="Username is required";if(null!=be&&be.password){var a=be.password(r);a&&(e.password=a)}else r.trim()?r.length<6&&(e.password="Password must be at least 6 characters"):e.password="Password is required";if(fr(e),Object.keys(e).length>0){var i=Object.values(e).join(". "),o=document.createElement("div");o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","true"),o.style.position="absolute",o.style.left="-10000px",o.textContent="Form validation errors: ".concat(i),document.body.appendChild(o),setTimeout(function(){document.body.contains(o)&&document.body.removeChild(o)},1e3)}return 0===Object.keys(e).length},[fe,be,Bn,Xn,Cn]);c(function(){Qe&&Ur&&fe&&dt()},[et,nt,Qe,Ur,fe,dt]);var mt=m(function(){return!Ve||(!(ir>=qe)||(cr(!0),Jr.current=setTimeout(function(){Kr.current&&(cr(!1),or(0))},He),!1))},[Ve,ir,qe,He]),ht=m(function(){var e=r(t().m(function e(n){var r,a,o;return t().w(function(e){for(;;)switch(e.n){case 0:r=t().m(function e(r){var a,i;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,n();case 1:return a=e.v,e.a(2,{v:a});case 2:if(e.p=2,i=e.v,r!==fn&&"AbortError"!==i.name){e.n=3;break}throw i;case 3:return e.n=4,new Promise(function(e){return setTimeout(e,vn*Math.pow(2,r))});case 4:return e.a(2)}},e,null,[[0,2]])}),o=0;case 1:if(!(o<=fn)){e.n=4;break}return e.d(i(r(o)),2);case 2:if(!(a=e.v)){e.n=3;break}return e.a(2,a.v);case 3:o++,e.n=1;break;case 4:return e.a(2)}},e)}));return function(n){return e.apply(this,arguments)}}(),[fn,vn]),ft=m(function(){var e=r(t().m(function e(n){var i,o,s,u,l,c,d,m,h,f,v,p,k;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n.preventDefault(),!An||!Ar){e.n=1;break}return e.a(2);case 1:if(Vr(!0),dt()){e.n=2;break}return null==ve||ve("Validation failed","validation"),e.a(2);case 2:if(!mn||!yr){e.n=3;break}return In("You are offline. Please check your connection and try again."),null==ve||ve("Offline","network"),e.a(2);case 3:if(mt()){e.n=4;break}return o="Too many attempts. Please wait ".concat(Math.ceil(He/6e4)," minutes."),In(o),null==ve||ve(o,"auth"),e.a(2);case 4:if(!Ie||Dr){e.n=5;break}return In("Please complete the CAPTCHA verification."),null==ve||ve("CAPTCHA required","validation"),e.a(2);case 5:return tt(),Yr.current=new AbortController,qn(0),In(""),$n(!0),Lr(!0),fr({}),$r.current=0,null==G||G(),We&&(null==Ye||Ye(Bn)),Ve&&or(function(e){return e+1}),s=Cn?A(Bn):Bn,u=Cn?A(Xn):Xn,l={username:s,password:u,provider:"credentials",channel:J,formId:Wr},Se&&(l.rememberMe=nr),yn&&(l._token=yn),Ie&&Dr&&(l.captchaToken=Dr),(c=y("POST",JSON.stringify(l),null,"json")).signal=null===(i=Yr.current)||void 0===i?void 0:i.signal,c.headers=a(a({},c.headers),{},{"X-Requested-With":"XMLHttpRequest","X-Form-ID":Wr}),yn&&(c.headers["X-CSRF-Token"]=yn),d=function(){var e=r(t().m(function e(){var n,r,a;return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,fetch(U||"/api/auth/login",c);case 1:return n=e.v,r=n,e.n=2,n.json();case 2:return a=e.v,e.a(2,{req:r,res:a})}},e)}));return function(){return e.apply(this,arguments)}}(),e.p=6,e.n=7,ht(d);case 7:if(m=e.v,h=m.req,f=m.res,200!==h.status&&!h.ok){e.n=9;break}return v={username:JSON.stringify(f),password:"instincthub",redirect:!1},On&&(v.callbackUrl=On,g("callbackUrl",On,30)),null==K||K(!0),We&&(null==Je||Je(f)),Ve&&or(0),ee||O(),e.n=8,b("credentials",v);case 8:qn(1),Ln.refresh(),e.n=10;break;case 9:p=f.message||f.detail||"An error occurred",In(p),qn(1),null==ve||ve(p,"auth"),null==K||K(!1),We&&(null==Xe||Xe(p,Bn));case 10:e.n=13;break;case 11:if(e.p=11,"AbortError"!==e.v.name){e.n=12;break}return e.a(2);case 12:C(k="Couldn't login. Please try again.",400),qn(1),null==ve||ve(k,"network"),null==K||K(!1),We&&(null==Xe||Xe(k,Bn));case 13:return e.p=13,Kr.current&&($n(!1),Lr(!1)),e.f(13);case 14:return e.a(2)}},e,null,[[6,11,13,14]])}));return function(n){return e.apply(this,arguments)}}(),[Bn,Xn,J,On,U,dt,mt,tt,G,Ye,K,Je,ve,Xe,Ve,Se,nr,Cn,yn,Ie,Dr,Wr,An,Ar,mn,yr,ht,ee,We]),bt=m(function(){on&&(Wn(""),zn(""),rr(!1),In(""),fr({}),Sr({score:0,feedback:[]}),Vr(!1),ee&&O(),setTimeout(function(){var e,n=null===(e=Zr.current)||void 0===e?void 0:e.querySelector('input[name="username"]');n&&n.focus()},100))},[on,ee]),vt=m(function(e,n){if(ne)ne(e,n);else{var r=k("callbackUrl"),t=n||r;if(t)we&&g("callbackUrl","",-1),Ln.push(t);else if(M)Ln.push(M);else if("skills"===W)Ln.push("/library");else if("lms"===W)if(ot){var a="You are currently logged in with ".concat(ot," channel. Would you like to proceed to the dashboard?");N(a).then(function(e){e&&Ln.push("/".concat(ot))})}else{N("You do not have an active channel for this account. Would you like to create one?").then(function(e){e?Ln.push("/auth/create-channel"):f()})}else Ln.push("/")}},[ne,we,M,W,ot,Ln]),pt=m(r(t().m(function e(){var n,r,a,i,o;return t().w(function(e){for(;;)switch(e.p=e.n){case 0:if(st&&at){e.n=1;break}return e.a(2);case 1:if(!te){e.n=6;break}return e.p=2,e.n=3,te(at);case 3:if(e.v){e.n=4;break}return null==re||re("Custom validation failed"),e.a(2);case 4:e.n=6;break;case 5:return e.p=5,i=e.v,console.error("Custom validation error:",i),null==re||re("Validation error occurred"),e.a(2);case 6:return tt(),Yr.current=new AbortController,e.p=7,n={path:"auth/skills/validate-user-token/?access_token=".concat(st,"&user_uuid=").concat(ut),token:st},e.n=8,p(n);case 8:if("Unauthorized"!==(null==(r=e.v)?void 0:r.detail)&&"Not found."!==(null==r?void 0:r.detail)){e.n=9;break}return C("Couldn't login. Please try again.",400),qn(1),null==re||re("Token validation failed"),e.a(2);case 9:!1===ct?(a="".concat(V||"/auth/verify-email","?email=").concat(lt),N("You need to verify your email address, click okay to request for a one time password (OTP).").then(function(e){e&<?(w(lt),Ln.push(a)):f()})):vt(at,On);case 10:e.n=13;break;case 11:if(e.p=11,"AbortError"!==(o=e.v).name){e.n=12;break}return e.a(2);case 12:console.error("Validation error:",o),C("Validation failed. Please try again.",400),qn(1),null==re||re("Network error during validation");case 13:return e.a(2)}},e,null,[[7,11],[2,5]])})),[st,ut,at,te,re,tt,V,lt,ct,vt,On,Ln]),kt=m(function(e){Vr(!0);var n=e.target.value;Wn(n),hr.username&&fr(function(e){return a(a({},e),{},{username:void 0})})},[hr.username]),gt=m(function(e){Vr(!0);var n=e.target.value;zn(n),hr.password&&fr(function(e){return a(a({},e),{},{password:void 0})})},[hr.password]);m(function(e){Qe&&fe&&setTimeout(function(){return dt()},100)},[Qe,fe,dt]);var wt=m(function(e){var n=Ee[e]||{},r=a({callbackUrl:On},n);We&&(null==Ye||Ye("oauth_".concat(e))),b(e,r)},[Ee,On,We,Ye]);return c(function(){On&&g("callbackUrl",On,30)},[On]),c(function(){if(ie&&!rt&&F)if(at&&st)te||ut?pt():vt(at,On);else if(null!=F&&F.user){var e={name:F.user};vt(e,On)}},[F,at,st,ut,ie,rt,te,pt,vt,On]),c(function(){if(ke>0&&st){var e=function(){Xr.current=setTimeout(function(){Kr.current&&st&&(pt(),e())},ke)};return e(),function(){Xr.current&&clearTimeout(Xr.current)}}},[ke,st,pt]),c(function(){if(Ze){var e=document.querySelector('input[name="username"]');e&&e.focus()}},[Ze]),c(function(){return Kr.current=!0,function(){Kr.current=!1,tt()}},[tt]),c(function(){return xn?document.body.classList.add("ihub-high-contrast"):document.body.classList.remove("ihub-high-contrast"),function(){document.body.classList.remove("ihub-high-contrast")}},[xn]),o("div",Pn&&rt?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:o(R,{})}:rt&&Pn?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:o("div",{className:"ihub-loading-state",children:o("p",{children:$})})}:lr?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:s("div",{className:"ihub-error-state",children:[s("p",{children:["Too many login attempts. Please wait"," ",Math.ceil(He/6e4)," minutes before trying again."]}),on&&o("button",{onClick:bt,className:"ihub-reset-btn ihub-mt-3",type:"button",children:"Reset Form"})]})}:mn&&yr?{className:"ihub-max-w-500 ihub-mx-auto ".concat(de||""),children:s("div",{className:"ihub-offline-state",children:[o("p",{children:"You are currently offline. Please check your internet connection and try again."}),o("button",{onClick:function(){return window.location.reload()},className:"ihub-retry-btn ihub-mt-3",type:"button",children:"Retry"})]})}:{className:"".concat(de||""," ").concat(xn?"ihub-high-contrast":""),children:s("form",{ref:Zr,onSubmit:ft,method:"post",className:"ihub-max-w-500 ihub-mx-auto ".concat(me||""),"aria-label":ze||"Login form","aria-describedby":Ge,noValidate:fe,children:[ce&&s(u,{children:[o("h1",{className:"ihub-fs-32",children:se}),ue&&o("p",{className:"ihub-subtitle",children:ue})]}),_n&&o("div",{className:"err",role:"alert","aria-live":"polite",children:"Sign in failed. Check the details you provided are correct."}),o(x,{name:"username",type:"text",label:"Email or Username",required:!0,textTransform:"lowercase",value:Bn,onChange:kt}),hr.username&&o("p",{className:"err",id:"username-error",role:"alert",children:hr.username}),o(T,{name:"password",label:"Password",required:!0,id:"password",value:Xn,onChange:gt}),hr.password&&o("p",{className:"err",id:"password-error",role:"alert",children:hr.password}),tn&&Xn&&s("div",{className:"ihub-password-strength ihub-mt-2",id:"password-strength",children:[o("div",{className:"ihub-strength-meter",children:o("div",{className:"ihub-strength-bar ihub-strength-".concat(xr.score),style:{width:"".concat(xr.score/5*100,"%")}})}),s("p",{className:"ihub-strength-text",children:["Password strength:"," ",["Very Weak","Weak","Fair","Good","Strong"][xr.score]]}),xr.feedback.length>0&&o("ul",{className:"ihub-strength-feedback",children:xr.feedback.map(function(e,n){return o("li",{children:e},n)})})]}),Se&&s("div",{className:"ihub-remember-me ihub-mt-3",children:[s("label",{className:"ihub-checkbox-label",children:[o("input",{type:"checkbox",checked:nr,onChange:function(e){rr(e.target.checked),Vr(!0)},"aria-describedby":"remember-me-help"}),je]}),o("small",{id:"remember-me-help",className:"ihub-help-text",children:"Keep me signed in on this device"})]}),Ie&&o("div",{className:"ihub-captcha ihub-mt-3",children:s("div",{className:"ihub-captcha-placeholder",children:[o("p",{children:"CAPTCHA verification would be loaded here"}),o("button",{type:"button",onClick:function(){return Hr("mock-captcha-token")},className:"ihub-verify-btn",children:"Verify (Mock)"})]})}),Fn&&o("div",{className:"err",role:"alert","aria-live":"polite",children:Fn}),s("div",{className:"action ihub-mt-4 ihub-mb-5",children:[o(j,{label:Ne,type:"submit",status:Mn,variant:Te,disabled:!pr}),on&&o("button",{type:"button",onClick:bt,className:"ihub-reset-btn ihub-ml-3",disabled:rt,children:"Reset"}),(!D||!B||Le)&&o(S,{labels:"or sign with"}),Le&&Oe.length>0&&o("div",{className:"ihub-oauth-buttons ihub-mt-3",role:"group","aria-label":"Social login options",children:Oe.map(function(e){return s("button",{type:"button",className:"ihub-oauth-btn ihub-oauth-".concat(e),onClick:function(){return wt(e)},disabled:rt,"aria-label":"Continue with ".concat(e),children:["Continue with"," ",e.charAt(0).toUpperCase()+e.slice(1)]},e)})}),!D&&s("p",{className:"ihub-text-center ihub-fs-14",children:["Can't remember password?"," ",o("a",{href:"/auth/reset-password",children:"Reset Password"})]}),!B&&s("p",{className:"ihub-text-center ihub-fs-14",children:["New user? ",o("a",{href:"/auth/signup",children:"Create an account."})]})]}),o(P,{showText:!0}),"development"===process.env.NODE_ENV&&s("details",{className:"ihub-dev-info ihub-mt-4",children:[o("summary",{children:"Development Info"}),o("pre",{className:"ihub-dev-details",children:JSON.stringify({formTouched:Ur,isOffline:mn?yr:"disabled",passwordStrength:tn?xr:"disabled",attemptCount:Ve?ir:"disabled",validationErrors:hr,formId:Wr},null,2)})]})]})})};export{E as default};
|
|
2
2
|
//# sourceMappingURL=LoginForm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_rollupPluginBabelHelpers.cjs"),t=require("react/jsx-runtime"),i=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_rollupPluginBabelHelpers.cjs"),t=require("react/jsx-runtime"),i=require("react"),r=function(){return t.jsxs("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__spinner ihub-bt-spinner",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[t.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2.5"}),t.jsx("path",{d:"M21 12a9 9 0 0 0-9-9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})},s=function(){return t.jsx("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__chevron",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:t.jsx("path",{d:"M9 6l6 6-6 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},n=function(){return t.jsx("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__check",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:t.jsx("path",{d:"M5 12.5l4.5 4.5L19 7.5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},a=function(){return t.jsxs("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__error",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[t.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5"}),t.jsx("path",{d:"M12 7.5v5.5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),t.jsx("circle",{cx:"12",cy:"16.5",r:"1.25",fill:"currentColor"})]})},o=function(e){var i=e.status;return 0===i?t.jsx(r,{}):2===i?t.jsx(n,{}):3===i?t.jsx(a,{}):t.jsx(s,{})},u=i.forwardRef(function(s,n){var a=s.label,u=s.status,l=void 0===u?1:u,c=s.type,b=void 0===c?"submit":c,d=s.name,h=s.variant,m=void 0===h?"important":h,f=s.disabled,x=void 0!==f&&f,j=s.onClick,v=s.autoResetTimeout,p=void 0===v?3e4:v,_=s.className,k=void 0===_?"":_,y=s.ariaLabel,N=s.id,C=void 0===N?"submitBtn":N,g=s.testId,B=void 0===g?"submit-button":g,L=i.useState(l),w=e.slicedToArray(L,2),W=w[0],M=w[1];i.useEffect(function(){M(l)},[l]),i.useEffect(function(){if(0===W&&p>0){var e=setTimeout(function(){M(1)},p);return function(){return clearTimeout(e)}}},[W,p]);var T=i.useCallback(function(e){j&&j(e)},[j]),q=0===W,E=x||q,O="icon"===m,P=["ihub-submit-btn","".concat(m,"-btn"),O?"":"ihub-submit-btn--with-slot",q?"ihub-rolling":"",k].filter(Boolean).join(" ");return t.jsx("div",{className:"ihub-submit-btn-wrapper",children:t.jsx("button",{ref:n,type:b,name:d,id:C,"data-testid":B,"data-variant":m,"data-status":W,className:P,disabled:E,onClick:T,"aria-label":y||("string"==typeof a?a:""),"aria-busy":q,children:O?q?t.jsx(r,{}):t.jsx("span",{className:"ihub-submit-btn__label",children:a}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"ihub-submit-btn__label",children:a}),t.jsx("span",{className:"ihub-submit-btn__slot","aria-hidden":"true",children:t.jsx(o,{status:W})})]})})})});u.displayName="SubmitButton",exports.default=u;
|
|
2
2
|
//# sourceMappingURL=SubmitButton.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as
|
|
1
|
+
import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as i,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as o,useEffect as a,useCallback as s}from"react";var u=function(){return e("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__spinner ihub-bt-spinner",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[i("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2.5"}),i("path",{d:"M21 12a9 9 0 0 0-9-9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})},l=function(){return i("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__chevron",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:i("path",{d:"M9 6l6 6-6 6",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},c=function(){return i("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__check",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:i("path",{d:"M5 12.5l4.5 4.5L19 7.5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})},b=function(){return e("svg",{className:"ihub-submit-btn__icon ihub-submit-btn__error",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[i("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5"}),i("path",{d:"M12 7.5v5.5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"}),i("circle",{cx:"12",cy:"16.5",r:"1.25",fill:"currentColor"})]})},d=function(t){var e=t.status;return i(0===e?u:2===e?c:3===e?b:l,{})},h=n(function(n,l){var c=n.label,b=n.status,h=void 0===b?1:b,m=n.type,f=void 0===m?"submit":m,p=n.name,v=n.variant,_=void 0===v?"important":v,k=n.disabled,N=void 0!==k&&k,y=n.onClick,x=n.autoResetTimeout,C=void 0===x?3e4:x,B=n.className,L=void 0===B?"":B,g=n.ariaLabel,w=n.id,W=void 0===w?"submitBtn":w,j=n.testId,M=void 0===j?"submit-button":j,T=o(h),A=t(T,2),H=A[0],I=A[1];a(function(){I(h)},[h]),a(function(){if(0===H&&C>0){var t=setTimeout(function(){I(1)},C);return function(){return clearTimeout(t)}}},[H,C]);var O=s(function(t){y&&y(t)},[y]),P=0===H,R=N||P,S="icon"===_,q=["ihub-submit-btn","".concat(_,"-btn"),S?"":"ihub-submit-btn--with-slot",P?"ihub-rolling":"",L].filter(Boolean).join(" ");return i("div",{className:"ihub-submit-btn-wrapper",children:i("button",{ref:l,type:f,name:p,id:W,"data-testid":M,"data-variant":_,"data-status":H,className:q,disabled:R,onClick:O,"aria-label":g||("string"==typeof c?c:""),"aria-busy":P,children:S?P?i(u,{}):i("span",{className:"ihub-submit-btn__label",children:c}):e(r,{children:[i("span",{className:"ihub-submit-btn__label",children:c}),i("span",{className:"ihub-submit-btn__slot","aria-hidden":"true",children:i(d,{status:H})})]})})})});h.displayName="SubmitButton";export{h as default};
|
|
2
2
|
//# sourceMappingURL=SubmitButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_rollupPluginBabelHelpers.cjs"),o=require("react/jsx-runtime"),t=require("../../../node_modules/.pnpm/lucide-react@0.525.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/check.cjs"),n=require("../../../node_modules/.pnpm/lucide-react@0.525.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/copy.cjs"),s=require("react"),a=require("../forms/FilterObjects.cjs"),r=require("../forms/InputText.cjs");exports.default=function(){var c=s.useState(""),p=e.slicedToArray(c,2),i=p[0],m=p[1],d=s.useState(""),l=e.slicedToArray(d,2),u=l[0],h=l[1],x=s.useState(null),_=e.slicedToArray(x,2),g=_[0],b=_[1],y=[{name:"FormComponent",description:"Reusable form component for user input",category:"Forms",repo_path:"src/components/forms",example_path:"docs/static-docs/examples/FormComponent.md",visual_demo_url:"/components/auth/signup-form"},{name:"ActionDropdown",description:"Dropdown component for actions",category:"Forms",repo_path:"src/components/forms/ActionDropdown.tsx",example_path:"docs/static-docs/components/ActionDropdown.md",visual_demo_url:"/components/forms/action-dropdown"},{name:"AnimatedBox",description:"Animated container component",category:"Forms",repo_path:"src/components/forms/AnimatedBox.tsx",example_path:"docs/static-docs/components/AnimatedBox.md",visual_demo_url:"/components/forms/animated-box"},{name:"PasswordField",description:"Secure password input field",category:"Forms",repo_path:"src/components/forms/PasswordField.tsx",example_path:"docs/static-docs/components/PasswordField.md",visual_demo_url:"/components/forms/password-field"},{name:"DateInput",description:"Date selection input field",category:"Forms",repo_path:"src/components/forms/DateInput.tsx",example_path:"docs/static-docs/components/DateInput.md",visual_demo_url:"/components/forms/date-input"},{name:"DateTimeInput",description:"Date and time selection input field",category:"Forms",repo_path:"src/components/forms/DateTimeInput.tsx",example_path:"docs/static-docs/components/DateTimeInput.md"},{name:"DateTimePicker",description:"Modern date and time picker with calendar popup",category:"Forms",repo_path:"src/components/forms/DateTimePicker.tsx",example_path:"docs/static-docs/components/DateTimePicker.md",visual_demo_url:"/components/forms/time-picker"},{name:"DateRangePicker",description:"Date range picker with two-click selection, hover preview, and quick presets",category:"Forms",repo_path:"src/components/forms/DateRangePicker.tsx",example_path:"docs/static-docs/components/DateRangePicker.md",visual_demo_url:"/components/forms/date-range-picker"},{name:"DropFile",description:"File drag and drop component",category:"Forms",repo_path:"src/components/forms/DropFile.tsx",example_path:"docs/static-docs/components/DropFile.md",visual_demo_url:"/components/forms/drop-file"},{name:"EmailList",description:"Email list display component",category:"Forms",repo_path:"src/components/forms/EmailList.tsx",example_path:"docs/static-docs/components/EmailList.md",visual_demo_url:"/components/forms/email-list"},{name:"FilterArray",description:"Array filtering component",category:"Forms",repo_path:"src/components/forms/FilterArray.tsx",example_path:"docs/static-docs/components/FilterArray.md",visual_demo_url:"/components/forms/filter-array"},{name:"FilterBy",description:"Filtering component with criteria",category:"Forms",repo_path:"src/components/forms/FilterBy.tsx",example_path:"docs/static-docs/components/FilterBy.md"},{name:"FilterObjects",description:"Object filtering component",category:"Forms",repo_path:"src/components/forms/FilterObjects.tsx",example_path:"docs/static-docs/components/FilterObjects.md",visual_demo_url:"/components/forms/filter-objects"},{name:"FormError",description:"Form error display component",category:"Forms",repo_path:"src/components/forms/FormError.tsx",example_path:"docs/static-docs/components/FormError.md"},{name:"HandleError",description:"Error handling component",category:"Forms",repo_path:"src/components/forms/HandleError.tsx",example_path:"docs/static-docs/components/HandleError.md"},{name:"Logout",description:"Logout functionality component",category:"Forms",repo_path:"src/components/forms/Logout.tsx",example_path:"docs/static-docs/components/Logout.md"},{name:"MessageDisplay",description:"Message display component",category:"Forms",repo_path:"src/components/forms/MessageDisplay.tsx",example_path:"docs/static-docs/components/MessageDisplay.md"},{name:"MultipleEmail",description:"Multiple email input component",category:"Forms",repo_path:"src/components/forms/MultipleEmail.tsx",example_path:"docs/static-docs/components/MultipleEmail.md",visual_demo_url:"/components/forms/multiple-email"},{name:"PageLoading",description:"Page loading indicator component",category:"Forms",repo_path:"src/components/forms/PageLoading.tsx",example_path:"docs/static-docs/components/PageLoading.md"},{name:"PhoneNumberInput",description:"Phone number input with searchable country picker, paste detection and E.164 output",category:"Forms",repo_path:"src/components/forms/PhoneNumberInput.tsx",example_path:"docs/static-docs/components/PhoneNumberInput.md",visual_demo_url:"/components/forms/phone-number-input"},{name:"RadioField",description:"Radio button input field",category:"Forms",repo_path:"src/components/forms/RadioField.tsx",example_path:"docs/static-docs/components/RadioField.md"},{name:"RadioSimple",description:"Simplified radio button component",category:"Forms",repo_path:"src/components/forms/RadioSimple.tsx",example_path:"docs/static-docs/components/RadioSimple.md"},{name:"ReactTimeAgo",description:"Time ago display component",category:"Forms",repo_path:"src/components/forms/ReactTimeAgo.tsx",example_path:"docs/static-docs/components/ReactTimeAgo.md"},{name:"ReadTermsAndCondition",description:"Terms and conditions acceptance component",category:"Forms",repo_path:"src/components/forms/ReadTermsAndCondition.tsx",example_path:"docs/static-docs/components/ReadTermsAndCondition.md"},{name:"SearchField",description:"Search input field component",category:"Forms",repo_path:"src/components/forms/SearchField.tsx",example_path:"docs/static-docs/components/SearchField.md",visual_demo_url:"/components/forms/search-field"},{name:"SearchFieldDB",description:"Database search field component",category:"Forms",repo_path:"src/components/forms/SearchFieldDB.tsx",example_path:"docs/static-docs/components/SearchFieldDB.md"},{name:"SearchableDropdown",description:"API-powered searchable dropdown with debounced search, selection, and clear",category:"Forms",repo_path:"src/components/forms/SearchableDropdown.tsx",example_path:"docs/static-docs/components/SearchableDropdown.md",visual_demo_url:"/components/forms/searchable-dropdown"},{name:"StepProgressBar",description:"Step progress indicator component",category:"Forms",repo_path:"src/components/forms/StepProgressBar.tsx",example_path:"docs/static-docs/components/StepProgressBar.md"},{name:"SubmitButton",description:"Form submission button component",category:"Forms",repo_path:"src/components/forms/SubmitButton.tsx",example_path:"docs/static-docs/components/SubmitButton.md"},{name:"Tables",description:"Table display component",category:"Forms",repo_path:"src/components/forms/Tables.tsx",example_path:"docs/static-docs/components/Tables.md"},{name:"TextArea",description:"Multi-line text input component",category:"Forms",repo_path:"src/components/forms/TextArea.tsx",example_path:"docs/static-docs/components/TextArea.md"},{name:"TextField",description:"Text input field component",category:"Forms",repo_path:"src/components/forms/TextField.tsx",example_path:"docs/static-docs/components/TextField.md"},{name:"Tooltip",description:"Tooltip display component",category:"Forms",repo_path:"src/components/forms/Tooltip.tsx",example_path:"docs/static-docs/components/Tooltip.md"},{name:"UnsplashRandomImage",description:"Random image from Unsplash component",category:"Forms",repo_path:"src/components/forms/UnsplashRandomImage.tsx",example_path:"docs/static-docs/components/UnsplashRandomImage.md"},{name:"DownloadAsExcel",description:"Excel download functionality component",category:"Forms",repo_path:"src/components/forms/DownloadAsExcel.tsx",example_path:"docs/static-docs/components/DownloadAsExcel.md"},{name:"THeadSortBtn",description:"Table header sort button component",category:"Forms",repo_path:"src/components/forms/THeadSortBtn.tsx",example_path:"docs/static-docs/components/THeadSortBtn.md"},{name:"THeadSortList",description:"Table header sort list component",category:"Forms",repo_path:"src/components/forms/THeadSortList.tsx",example_path:"docs/static-docs/components/THeadSortList.md"},{name:"TBodyNoData",description:"Table body empty state component",category:"Forms",repo_path:"src/components/forms/TBodyNoData.tsx",example_path:"docs/static-docs/components/TBodyNoData.md"},{name:"FileUploader",description:"File upload component",category:"Forms",repo_path:"src/components/forms/uploads/FileUploader.tsx",example_path:"docs/static-docs/components/FileUploader.md",visual_demo_url:"/components/forms/file-uploader"},{name:"IhubFileUploader",description:"InstinctHub file upload component",category:"Forms",repo_path:"src/components/forms/uploads/IhubFileUploader.tsx",example_path:"docs/static-docs/components/IhubFileUploader.md"},{name:"S3MultiUploader",description:"Multi-file queue uploader with per-file progress bars and direct S3 multipart upload via @aws-sdk/lib-storage",category:"Forms",repo_path:"src/components/forms/uploads/S3MultiUploader.tsx",example_path:"docs/static-docs/components/S3MultiUploader.md",visual_demo_url:"/components/ui/s3-multi-uploader"},{name:"ActionCallbackDropdown",description:"Action callback dropdown component",category:"Forms",repo_path:"src/components/forms/ActionCallbackDropdown.tsx",example_path:"docs/static-docs/components/ActionCallbackDropdown.md"},{name:"InputNumber",description:"InputNumber component for numerical input",category:"Form",repo_path:"src/components/forms/InputNumber.tsx",example_path:"docs/static-docs/components/InputNumber.md",visual_demo_url:"/components/forms/input-number"},{name:"InputText",description:"InputText component for text input",category:"Form",repo_path:"src/components/forms/InputText.tsx",example_path:"docs/static-docs/components/InputText.md",visual_demo_url:"/components/forms/input-text"},{name:"InputTextarea",description:"InputTextarea component for text input",category:"Form",repo_path:"src/components/forms/InputTextarea.tsx",example_path:"docs/static-docs/components/InputTextarea.md",visual_demo_url:"/components/forms/input-textarea"},{name:"SearchObjectsFromDB",description:"SearchObjectsFromDB component for searching objects from database",category:"Form",repo_path:"src/components/forms/SearchObjectsFromDB.tsx",example_path:"docs/static-docs/components/SearchObjectsFromDB.md"},{name:"ToggleButton",description:"ToggleButton component for changing state.",category:"Form",repo_path:"src/components/forms/ToggleButton.tsx",example_path:"docs/static-docs/components/ToggleButton.md"},{name:"DateInputPicker",description:"DateInputPicker component for picking date and time.",category:"Form",repo_path:"src/components/forms/DateInputPicker.tsx",example_path:"docs/static-docs/components/DateInputPicker.md"},{name:"TimePicker",description:"TimePicker component for selecting time with 12/24-hour format support.",category:"Form",repo_path:"src/components/forms/TimePicker.tsx",example_path:"docs/static-docs/components/TimePicker.md"},{name:"ChipsInput",description:"ChipsInput is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/ChipsInput.tsx",example_path:"docs/static-docs/components/ChipsInput.md"},{name:"RadioButton",description:"RadioButton is used to enter single value on an input field.",category:"Form",repo_path:"src/components/forms/radio-btn/RadioButton.tsx",example_path:"docs/static-docs/components/RadioButton.md"},{name:"RadioGroup",description:"RadioGroup is used to select each from group value on an input field.",category:"Form",repo_path:"src/components/forms/radio-btn/RadioGroup.tsx",example_path:"docs/static-docs/components/RadioGroup.md"},{name:"InputAmount",description:"InputAmount is used to enter amount on an input field.",category:"Form",repo_path:"src/components/forms/InputAmount.tsx",example_path:"docs/static-docs/components/InputAmount.md"},{name:"CheckBoxes",description:"CheckBoxes is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/CheckBoxes.tsx",example_path:"docs/static-docs/components/CheckBoxes.md"},{name:"CheckBoxesField",description:"CheckBoxesField is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/CheckboxesField.tsx",example_path:"docs/static-docs/components/CheckBoxesField.md"},{name:"CountryInput",description:"Searchable country selector input field",category:"Form",repo_path:"src/components/forms/CountryInput.tsx",example_path:"docs/static-docs/components/CountryInput.md"},{name:"CountryStateInput",description:"Searchable state/province selector based on selected country",category:"Form",repo_path:"src/components/forms/CountryStateInput.tsx",example_path:"docs/static-docs/components/CountryStateInput.md"},{name:"InputSearchDropdown",description:"Generic searchable dropdown component for organizations",category:"Form",repo_path:"src/components/forms/InputSearchDropdown.tsx",example_path:"docs/static-docs/components/InputSearchDropdown.md"},{name:"RangeRadio",description:"Range radio button component for selecting values within a range",category:"Form",repo_path:"src/components/forms/RangeRadio.tsx",example_path:"docs/static-docs/components/RangeRadio.md"},{name:"IsUsernameEmailTaken",description:"Username/email availability checker",category:"Auth",repo_path:"src/components/auth/IsUsernameEmailTaken.tsx",example_path:"docs/static-docs/components/IsUsernameEmailTaken.md",visual_demo_url:"/components/auth/username-email-checker"},{name:"ClientDetector",description:"Client device detection component",category:"Auth",repo_path:"src/components/auth/ClientDetector.tsx",example_path:"docs/static-docs/components/ClientDetector.md",visual_demo_url:"/components/auth/client-detector"},{name:"PasswordsMatch",description:"Password matching validation component",category:"Auth",repo_path:"src/components/auth/PasswordsMatch.tsx",example_path:"docs/static-docs/components/PasswordsMatch.md"},{name:"FromInstinctHub",description:"From InstinctHub component",category:"Auth",repo_path:"src/components/auth/FromInstinctHub.tsx",example_path:"docs/static-docs/components/FromInstinctHub.md"},{name:"LoginForm",description:"Login form component",category:"Auth",repo_path:"src/components/auth/LoginForm.tsx",example_path:"docs/static-docs/components/LoginForm.md",visual_demo_url:"/components/auth/login-form"},{name:"SignUpForm",description:"Sign up form component",category:"Auth",repo_path:"src/__examples__/src/components/forms/SignUpFormExample.tsx",example_path:"docs/static-docs/components/SignUpForm.md",visual_demo_url:"/components/auth/signup-form"},{name:"ReactClientProviders",description:"Comprehensive wrapper providing all essential React providers",category:"Auth",repo_path:"src/components/auth/ReactClientProviders.tsx",example_path:"docs/static-docs/components/ReactClientProviders.md"},{name:"ClientOnly",description:"Wrapper component that only renders children on client side",category:"Auth",repo_path:"src/components/auth/ClientOnly.tsx",example_path:"docs/static-docs/components/ClientOnly.md"},{name:"useClientSide",description:"Hook for safely handling client-side initialization",category:"Auth",repo_path:"src/components/auth/useClientSide.ts",example_path:"docs/static-docs/components/useClientSide.md"},{name:"useFormattedDate",description:"Hook for consistent date formatting between server and client",category:"Auth",repo_path:"src/components/auth/useFormattedDate.ts",example_path:"docs/static-docs/components/useFormattedDate.md"},{name:"useStableRandom",description:"Hook for generating stable random values",category:"Auth",repo_path:"src/components/auth/useStableRandom.ts",example_path:"docs/static-docs/components/useStableRandom.md"},{name:"useExternalData",description:"Hook for safely handling external data to prevent hydration mismatches",category:"Auth",repo_path:"src/components/auth/useExternalData.ts",example_path:"docs/static-docs/components/useExternalData.md"},{name:"PermissionWrapper",description:"Component that conditionally renders children based on user permissions using role-based access control",category:"Auth",repo_path:"src/components/auth/PermissionWrapper.tsx",example_path:"docs/static-docs/components/PermissionWrapper.md"},{name:"ChannelListAvatar",description:"Channel list avatar component",category:"Navbar",repo_path:"src/components/navbar/ChannelListAvatar.tsx",example_path:"docs/static-docs/components/ChannelListAvatar.md"},{name:"MenuDropdown",description:"Menu dropdown component",category:"Navbar",repo_path:"src/components/navbar/MenuDropdown.tsx",example_path:"docs/static-docs/components/MenuDropdown.md"},{name:"Breadcrumb",description:"Breadcrumb component",category:"Navbar",repo_path:"src/components/navbar/Breadcrumb.tsx",example_path:"docs/static-docs/components/Breadcrumb.md"},{name:"ResponsiveNavbar",description:"Responsive navbar component",category:"Navbar",repo_path:"src/components/navbar/ResponsiveNavbar.tsx",example_path:"docs/static-docs/components/ResponsiveNavbar.md"},{name:"SideNavbar",description:"Side navbar component",category:"Navbar",repo_path:"src/components/navbar/SideNavbar.tsx",example_path:"docs/static-docs/components/SideNavbar.md",visual_demo_url:"/components/navbars/sidenav"},{name:"SideNavbarContext",description:"Context provider for side navigation state management",category:"Navbar",repo_path:"src/components/navbar/SideNavbarContext.tsx",example_path:"docs/static-docs/components/SideNavbarContext.md"},{name:"CustomTextEditor",description:"Custom text editor component",category:"UI",repo_path:"src/components/ui/editor/CustomTextEditor.tsx",example_path:"docs/static-docs/components/CustomTextEditor.md"},{name:"IHubTextEditor",description:"Notion-style rich text editor: slash commands, flexible tables (row/column handles, add, move, duplicate, colour), image/video/audio/PDF/file uploads, embeds, section banners, callouts, toggles, CTA buttons, and rich HTML that keeps its inline styles",category:"UI",repo_path:"src/components/ui/editor/ihub-editor/IHubTextEditor.tsx",example_path:"docs/static-docs/components/IHubTextEditor.md",visual_demo_url:"/components/ui/ihub-text-editor"},{name:"ContentViewer",description:"Content viewer component",category:"UI",repo_path:"src/components/ui/viewer/ContentViewer.tsx",example_path:"docs/static-docs/components/ContentViewer.md",visual_demo_url:"/components/ui/content-viewer"},{name:"ContentViewOrEdit",description:"Content view or edit component",category:"UI",repo_path:"src/components/ui/viewer/ContentViewOrEdit.tsx",example_path:"docs/static-docs/components/ContentViewOrEdit.md",visual_demo_url:"/components/ui/content-view-or-edit"},{name:"CodeDisplay",description:"Code display component",category:"UI",repo_path:"src/components/ui/viewer/CodeDisplay.tsx",example_path:"docs/static-docs/components/CodeDisplay.md"},{name:"DangerousRenderer",description:"Safe-by-default renderer for untrusted HTML/Markdown — DOMPurify sanitization, link hardening, DoS guards, and optional custom wrapper via children.",category:"UI",repo_path:"src/components/ui/viewer/DangerousRenderer.tsx",example_path:"docs/static-docs/components/DangerousRenderer.md",visual_demo_url:"/components/ui/dangerous-renderer"},{name:"IHubTable",description:"InstinctHub client-side table with search, sort, filter, pagination and CSV/Excel/PDF export",category:"UI",repo_path:"src/components/ui/tables/IHubTable.tsx",example_path:"docs/static-docs/components/IHubTable.md"},{name:"IHubTableServer",description:"InstinctHub server-side table with API pagination, search, sorting and full-dataset CSV/Excel/PDF export",category:"UI",repo_path:"src/components/ui/tables/IHubTableServer.tsx",example_path:"docs/static-docs/components/IHubTableServer.md",visual_demo_url:"/components/ui/table-server-examples"},{name:"OrDivider",description:"Or divider component",category:"UI",repo_path:"src/components/ui/OrDivider.tsx",example_path:"docs/static-docs/components/OrDivider.md",visual_demo_url:"/components/ui/or-divider"},{name:"Card",description:"Card component",category:"UI",repo_path:"src/components/ui/cards/Card.tsx",example_path:"docs/static-docs/components/Card.md"},{name:"CardList",description:"Card list component",category:"UI",repo_path:"src/components/ui/cards/CardList.tsx",example_path:"docs/static-docs/components/CardList.md",visual_demo_url:"/components/ui/card-list"},{name:"CardGrid",description:"Card grid component",category:"UI",repo_path:"src/components/ui/cards/CardGrid.tsx",example_path:"docs/static-docs/components/CardGrid.md",visual_demo_url:"/components/ui/card-grid"},{name:"HorizontalCard",description:"Horizontal card component",category:"UI",repo_path:"src/components/ui/cards/HorizontalCard.tsx",example_path:"docs/static-docs/components/HorizontalCard.md"},{name:"FeatureCard",description:"Feature card component",category:"UI",repo_path:"src/components/ui/cards/FeatureCard.tsx",example_path:"docs/static-docs/components/FeatureCard.md"},{name:"MediaCard",description:"Media card component",category:"UI",repo_path:"src/components/ui/cards/MediaCard.tsx",example_path:"docs/static-docs/components/MediaCard.md"},{name:"PricingCard",description:"Pricing card component",category:"UI",repo_path:"src/components/ui/cards/PricingCard.tsx",example_path:"docs/static-docs/components/PricingCard.md"},{name:"ProfileCard",description:"Profile card component",category:"UI",repo_path:"src/components/ui/cards/ProfileCard.tsx",example_path:"docs/static-docs/components/ProfileCard.md"},{name:"RandomGradientImage",description:"Random gradient image component",category:"UI",repo_path:"src/components/ui/images/RandomGradientImage.tsx",example_path:"docs/static-docs/components/RandomGradientImage.md",visual_demo_url:"/components/ui/random-gradient-image"},{name:"Dialog",description:"A reusable dialog component",category:"UI",repo_path:"src/components/ui/dialogs/Dialog.tsx",example_path:"docs/static-docs/components/Dialog.md"},{name:"Badge",description:"A reusable Badge component",category:"UI",repo_path:"src/components/ui/Badge.tsx",example_path:"docs/static-docs/components/Badge.md"},{name:"Action",description:"A reusable Action component",category:"UI",repo_path:"src/components/ui/Action.tsx",example_path:"docs/static-docs/components/Action.md"},{name:"Dropdown",description:"A reusable Dropdown component",category:"UI",repo_path:"src/components/ui/Dropdown.tsx",example_path:"docs/static-docs/components/Dropdown.md"},{name:"ColorPicker",description:"A reusable ColorPicker component",category:"UI",repo_path:"src/components/ui/ColorPicker.tsx",example_path:"docs/static-docs/components/ColorPicker.md"},{name:"Pagination",description:"A reusable Pagination component",category:"UI",repo_path:"src/components/ui/pagination/Pagination.tsx",example_path:"docs/static-docs/components/Pagination.md",visual_demo_url:"/components/ui/pagination"},{name:"PaginationDemo",description:"A demo for the Pagination component",category:"UI",repo_path:"src/components/ui/pagination/PaginationDemo.tsx",example_path:"docs/static-docs/components/PaginationDemo.md"},{name:"CreateButton",description:"A reusable CreateButton component",category:"UI",repo_path:"src/components/ui/create-button/CreateButton.tsx",example_path:"docs/static-docs/components/CreateButton.md"},{name:"CreateButtonExample",description:"An example of the CreateButton component",category:"UI",repo_path:"src/components/ui/create-button/CreateButtonExample.tsx",example_path:"docs/static-docs/components/CreateButtonExample.md"},{name:"MenuBar",description:"Toolbar component for the TipTap rich text editor",category:"UI",repo_path:"src/components/ui/editor/MenuBar.tsx",example_path:"docs/static-docs/components/MenuBar.md"},{name:"InstinctHubChart",description:"Versatile chart component supporting multiple chart types",category:"UI",repo_path:"src/components/ui/charts/InstinctHubChart.tsx",example_path:"docs/static-docs/components/InstinctHubChart.md"},{name:"InstinctHubChartDashboard",description:"Dashboard component showcasing multiple charts",category:"UI",repo_path:"src/components/ui/charts/InstinctHubChartDashboard.tsx",example_path:"docs/static-docs/components/InstinctHubChartDashboard.md"},{name:"ChartConfigurator",description:"Interactive chart configuration interface",category:"UI",repo_path:"src/components/ui/charts/ChartConfigurator.tsx",example_path:"docs/static-docs/components/ChartConfigurator.md"},{name:"ChangeStyleVariable",description:"Style variable changer component",category:"Theme",repo_path:"src/components/theme/ChangeStyleVariable.tsx",example_path:"docs/static-docs/components/ChangeStyleVariable.md"},{name:"DarkModeProvider",description:"Dark mode provider component",category:"Theme",repo_path:"src/components/theme/DarkModeProvider.tsx",example_path:"docs/static-docs/components/DarkModeProvider.md"},{name:"LoadingAnimate",description:"Loading animation component",category:"Theme",repo_path:"src/components/theme/LoadingAnimate.tsx",example_path:"docs/static-docs/components/LoadingAnimate.md"},{name:"SessionProviders",description:"Session providers component",category:"Theme",repo_path:"src/components/theme/SessionProviders.tsx",example_path:"docs/static-docs/components/SessionProviders.md"},{name:"SessionExpiresLogout",description:"Session expiration logout component",category:"Theme",repo_path:"src/components/theme/signout/SessionExpiresLogout.tsx",example_path:"docs/static-docs/components/SessionExpiresLogout.md"},{name:"SignOutSession",description:"Sign out session component",category:"Theme",repo_path:"src/components/theme/signout/SignOutSession.tsx",example_path:"docs/static-docs/components/SignOutSession.md"},{name:"TimeTracker",description:"Time tracking component",category:"Status",repo_path:"src/components/status/ReactTimeTracker.tsx",example_path:"docs/static-docs/components/TimeTracker.md"},{name:"SessionHandleProvider",description:"Session handling provider component",category:"Status",repo_path:"src/components/status/SessionHandleProvider.tsx",example_path:"docs/static-docs/components/SessionHandleProvider.md"},{name:"Error500",description:"500 error display component",category:"Status",repo_path:"src/components/status/Error500.tsx",example_path:"docs/static-docs/components/Error500.md"},{name:"ErrorState",description:"Error state display component",category:"Status",repo_path:"src/components/status/ErrorState.tsx",example_path:"docs/static-docs/components/ErrorState.md"},{name:"ReactTimeTracker",description:"React time tracking component",category:"Status",repo_path:"src/components/status/ReactTimeTracker.tsx",example_path:"docs/static-docs/components/ReactTimeTracker.md"},{name:"DeleteConfirmationModal",description:"Delete confirmation modal component",category:"Status",repo_path:"src/components/status/DeleteConfirmationModal.tsx",example_path:"docs/static-docs/components/DeleteConfirmationModal.md"},{name:"CopyToClipboard",description:"Copy to clipboard functionality component",category:"Status",repo_path:"src/components/status/CopyToClipBoard.tsx",example_path:"docs/static-docs/components/CopyToClipboard.md"},{name:"MultiPurposeModal",description:"Multi-purpose modal component",category:"Status",repo_path:"src/components/status/MultiPurposeModal.tsx",example_path:"docs/static-docs/components/MultiPurposeModal.md"},{name:"ModalExamples",description:"Modal examples component",category:"Status",repo_path:"src/components/status/ModalExamples.tsx",example_path:"docs/static-docs/components/ModalExamples.md"},{name:"NotFound",description:"Not found component",category:"Status",repo_path:"src/components/status/NotFound.tsx",example_path:"docs/static-docs/components/NotFound.md"},{name:"Unauthorized",description:"Unauthorized component",category:"Status",repo_path:"src/components/status/Unauthorized.tsx",example_path:"docs/static-docs/components/Unauthorized.md"},{name:"ModalWrapper",description:"ModalWrapper component",category:"Status",repo_path:"src/components/status/ModalWrapper.tsx",example_path:"docs/static-docs/components/ModalWrapper.md"},{name:"Tabs",description:"Tab navigation component",category:"Tabs",repo_path:"src/components/tabs/Tabs.tsx",example_path:"docs/static-docs/components/Tabs.md"},{name:"VerticalTabs",description:"Vertical tab navigation component",category:"Tabs",repo_path:"src/components/tabs/VerticalTabs.tsx",example_path:"docs/static-docs/components/VerticalTabs.md"},{name:"TabContent",description:"Tab content display component",category:"Tabs",repo_path:"src/components/tabs/TabContent.tsx",example_path:"docs/static-docs/components/TabContent.md"},{name:"Cursor",description:"Custom cursor component with trailing effects and animations",category:"Cursors",repo_path:"src/components/cursors/Cursor.tsx",example_path:"docs/static-docs/components/Cursor.md"},{name:"MagneticButton",description:"Button component with magnetic cursor attraction effect",category:"Cursors",repo_path:"src/components/cursors/MagneticButton.tsx",example_path:"docs/static-docs/components/MagneticButton.md"},{name:"CursorContext",description:"Context provider for cursor state management across the application",category:"Cursors",repo_path:"src/components/cursors/CursorContext.tsx",example_path:"docs/static-docs/components/CursorContext.md"},{name:"useCursorInteraction",description:"Hook for adding interactive cursor effects to elements",category:"Cursors",repo_path:"src/components/cursors/useCursorInteraction.tsx",example_path:"docs/static-docs/components/useCursorInteraction.md"},{name:"CursorControlDemo",description:"Comprehensive demo component for the cursor system",category:"Cursors",repo_path:"src/components/cursors/CursorControlDemo.tsx",example_path:"docs/static-docs/components/CursorControlDemo.md"},{name:"Paystack",description:"Paystack payment integration component",category:"Library",repo_path:"src/components/lib/readme/paystack.md",example_path:"docs/static-docs/components/Paystack.md"}],f=s.useMemo(function(){var o=Array.from(new Set(y.map(function(e){return e.category}))).sort();return[{id:"",title:"All Categories"}].concat(e.toConsumableArray(o.map(function(e){return{id:e,title:e}})))},[y]),C=s.useMemo(function(){var e=y;if(u&&(e=e.filter(function(e){return e.category===u})),i.trim()){var o=i.toLowerCase();e=e.filter(function(e){return e.name.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)||e.category.toLowerCase().includes(o)})}return e},[y,i,u]),v=s.useMemo(function(){return C.reduce(function(e,o){return e[o.category]||(e[o.category]=[]),e[o.category].push(o),e},{})},[C]),F="https://github.com/instincthub/instincthub-react-ui/blob/main/",T=s.useState(""),I=e.slicedToArray(T,2),S=I[0],D=I[1];s.useEffect(function(){D(window.location.origin)},[]);var k=function(){var o=e.asyncToGenerator(e.regenerator().m(function o(t,n){var s;return e.regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,navigator.clipboard.writeText(t);case 1:b("".concat(n,"-").concat(t)),setTimeout(function(){return b(null)},2e3),e.n=3;break;case 2:e.p=2,s=e.v,console.error("Failed to copy: ",s);case 3:return e.a(2)}},o,null,[[0,2]])}));return function(e,t){return o.apply(this,arguments)}}();return o.jsxs("div",{className:"ihub-component-lists",children:[o.jsx("h1",{className:"ihub-component-lists-title",children:"InstinctHub React UI Components"}),o.jsx("p",{className:"ihub-component-lists-description",children:"A comprehensive list of all available components in the InstinctHub React UI library."}),o.jsxs("div",{className:"ihub-search-container",children:[o.jsxs("div",{className:"ihub-flex ihub-gap-3 ihub-mb-3",children:[o.jsx("div",{style:{flex:1},children:o.jsx(r.default,{label:"Search",name:"search",placeholder:"Search components by name, description, or category...",value:i,onChange:function(e){return m(e.target.value)},activeLabel:!0})}),o.jsx("div",{className:"ihub-mt-1 ihub-pl-3",children:o.jsx(a.default,{options:f,defaultValue:u||"",name:"category",setValue:function(e){return h(String(e.id))},defaultWidth:"200px"})})]}),(i||u)&&o.jsxs("div",{className:"ihub-search-results-info",children:["Found ",C.length," component",1!==C.length?"s":"",i&&' matching "'.concat(i,'"'),u&&' in category "'.concat(u,'"'),(i||u)&&o.jsx("button",{onClick:function(){m(""),h("")},style:{marginLeft:"10px",padding:"4px 8px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",cursor:"pointer"},children:"Clear Filters"})]})]}),Object.entries(v).map(function(s){var a=e.slicedToArray(s,2),r=a[0],c=a[1];return o.jsxs("div",{className:"ihub-component-category",children:[o.jsx("h2",{className:"ihub-component-category-title",children:r}),o.jsx("div",{className:"ihub-component-grid",children:c.map(function(e){return o.jsxs("div",{className:"ihub-component-card",children:[o.jsx("h3",{className:"ihub-component-name",children:e.name}),o.jsx("p",{className:"ihub-component-description",children:e.description}),o.jsxs("div",{className:"ihub-component-links",children:[o.jsxs("div",{className:"ihub-link-group ihub-flex",children:[o.jsx("a",{href:"".concat(F).concat(e.repo_path),target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link",children:"Repository"}),o.jsx("button",{onClick:function(){return k("".concat(F).concat(e.repo_path),"repo")},className:"ihub-copy-btn",title:"Copy ".concat(e.name," repository link"),children:g==="repo-".concat(F).concat(e.repo_path)?o.jsx(t.default,{}):o.jsx(n.default,{})})]}),o.jsxs("div",{className:"ihub-link-group ihub-flex ihub-mt-2",children:[o.jsx("a",{href:"".concat(F).concat(e.example_path),target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link",children:"Example"}),o.jsx("button",{onClick:function(){return k("".concat(F).concat(e.example_path),"example")},className:"ihub-copy-btn",title:"Copy ".concat(e.name," example link"),children:g==="example-".concat(F).concat(e.example_path)?o.jsx(t.default,{}):o.jsx(n.default,{})})]}),e.visual_demo_url&&o.jsxs("div",{className:"ihub-link-group ihub-flex ihub-mt-2",children:[o.jsx("a",{href:e.visual_demo_url,target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link ihub-demo-link",children:"Live Demo"}),o.jsx("button",{onClick:function(){return k(S+e.visual_demo_url,"demo")},className:"ihub-copy-btn",title:"Copy ".concat(e.name,"live demo link"),children:g==="demo-".concat(S).concat(e.visual_demo_url)?o.jsx(t.default,{}):o.jsx(n.default,{})})]})]})]},e.name)})})]},r)}),0===Object.keys(v).length&&(i||u)&&o.jsxs("div",{className:"ihub-no-results",children:[o.jsxs("p",{children:["No components found",i&&' matching "'.concat(i,'"'),u&&' in category "'.concat(u,'"')]}),o.jsx("button",{onClick:function(){m(""),h("")},className:"ihub-clear-search-btn",children:"Clear Filters"})]})]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_rollupPluginBabelHelpers.cjs"),o=require("react/jsx-runtime"),t=require("../../../node_modules/.pnpm/lucide-react@0.525.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/check.cjs"),n=require("../../../node_modules/.pnpm/lucide-react@0.525.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/copy.cjs"),s=require("react"),a=require("../forms/FilterObjects.cjs"),r=require("../forms/InputText.cjs");exports.default=function(){var c=s.useState(""),p=e.slicedToArray(c,2),i=p[0],m=p[1],d=s.useState(""),l=e.slicedToArray(d,2),u=l[0],h=l[1],x=s.useState(null),_=e.slicedToArray(x,2),g=_[0],b=_[1],y=[{name:"FormComponent",description:"Reusable form component for user input",category:"Forms",repo_path:"src/components/forms",example_path:"docs/static-docs/examples/FormComponent.md",visual_demo_url:"/components/auth/signup-form"},{name:"ActionDropdown",description:"Dropdown component for actions",category:"Forms",repo_path:"src/components/forms/ActionDropdown.tsx",example_path:"docs/static-docs/components/ActionDropdown.md",visual_demo_url:"/components/forms/action-dropdown"},{name:"AnimatedBox",description:"Animated container component",category:"Forms",repo_path:"src/components/forms/AnimatedBox.tsx",example_path:"docs/static-docs/components/AnimatedBox.md",visual_demo_url:"/components/forms/animated-box"},{name:"PasswordField",description:"Secure password input field",category:"Forms",repo_path:"src/components/forms/PasswordField.tsx",example_path:"docs/static-docs/components/PasswordField.md",visual_demo_url:"/components/forms/password-field"},{name:"DateInput",description:"Date selection input field",category:"Forms",repo_path:"src/components/forms/DateInput.tsx",example_path:"docs/static-docs/components/DateInput.md",visual_demo_url:"/components/forms/date-input"},{name:"DateTimeInput",description:"Date and time selection input field",category:"Forms",repo_path:"src/components/forms/DateTimeInput.tsx",example_path:"docs/static-docs/components/DateTimeInput.md"},{name:"DateTimePicker",description:"Modern date and time picker with calendar popup",category:"Forms",repo_path:"src/components/forms/DateTimePicker.tsx",example_path:"docs/static-docs/components/DateTimePicker.md",visual_demo_url:"/components/forms/time-picker"},{name:"DateRangePicker",description:"Date range picker with two-click selection, hover preview, and quick presets",category:"Forms",repo_path:"src/components/forms/DateRangePicker.tsx",example_path:"docs/static-docs/components/DateRangePicker.md",visual_demo_url:"/components/forms/date-range-picker"},{name:"DropFile",description:"File drag and drop component",category:"Forms",repo_path:"src/components/forms/DropFile.tsx",example_path:"docs/static-docs/components/DropFile.md",visual_demo_url:"/components/forms/drop-file"},{name:"EmailList",description:"Email list display component",category:"Forms",repo_path:"src/components/forms/EmailList.tsx",example_path:"docs/static-docs/components/EmailList.md",visual_demo_url:"/components/forms/email-list"},{name:"FilterArray",description:"Array filtering component",category:"Forms",repo_path:"src/components/forms/FilterArray.tsx",example_path:"docs/static-docs/components/FilterArray.md",visual_demo_url:"/components/forms/filter-array"},{name:"FilterBy",description:"Filtering component with criteria",category:"Forms",repo_path:"src/components/forms/FilterBy.tsx",example_path:"docs/static-docs/components/FilterBy.md"},{name:"FilterObjects",description:"Object filtering component",category:"Forms",repo_path:"src/components/forms/FilterObjects.tsx",example_path:"docs/static-docs/components/FilterObjects.md",visual_demo_url:"/components/forms/filter-objects"},{name:"FormError",description:"Form error display component",category:"Forms",repo_path:"src/components/forms/FormError.tsx",example_path:"docs/static-docs/components/FormError.md"},{name:"HandleError",description:"Error handling component",category:"Forms",repo_path:"src/components/forms/HandleError.tsx",example_path:"docs/static-docs/components/HandleError.md"},{name:"Logout",description:"Logout functionality component",category:"Forms",repo_path:"src/components/forms/Logout.tsx",example_path:"docs/static-docs/components/Logout.md"},{name:"MessageDisplay",description:"Message display component",category:"Forms",repo_path:"src/components/forms/MessageDisplay.tsx",example_path:"docs/static-docs/components/MessageDisplay.md"},{name:"MultipleEmail",description:"Multiple email input component",category:"Forms",repo_path:"src/components/forms/MultipleEmail.tsx",example_path:"docs/static-docs/components/MultipleEmail.md",visual_demo_url:"/components/forms/multiple-email"},{name:"PageLoading",description:"Page loading indicator component",category:"Forms",repo_path:"src/components/forms/PageLoading.tsx",example_path:"docs/static-docs/components/PageLoading.md"},{name:"PhoneNumberInput",description:"Phone number input with searchable country picker, paste detection and E.164 output",category:"Forms",repo_path:"src/components/forms/PhoneNumberInput.tsx",example_path:"docs/static-docs/components/PhoneNumberInput.md",visual_demo_url:"/components/forms/phone-number-input"},{name:"RadioField",description:"Radio button input field",category:"Forms",repo_path:"src/components/forms/RadioField.tsx",example_path:"docs/static-docs/components/RadioField.md"},{name:"RadioSimple",description:"Simplified radio button component",category:"Forms",repo_path:"src/components/forms/RadioSimple.tsx",example_path:"docs/static-docs/components/RadioSimple.md"},{name:"ReactTimeAgo",description:"Time ago display component",category:"Forms",repo_path:"src/components/forms/ReactTimeAgo.tsx",example_path:"docs/static-docs/components/ReactTimeAgo.md"},{name:"ReadTermsAndCondition",description:"Terms and conditions acceptance component",category:"Forms",repo_path:"src/components/forms/ReadTermsAndCondition.tsx",example_path:"docs/static-docs/components/ReadTermsAndCondition.md"},{name:"SearchField",description:"Search input field component",category:"Forms",repo_path:"src/components/forms/SearchField.tsx",example_path:"docs/static-docs/components/SearchField.md",visual_demo_url:"/components/forms/search-field"},{name:"SearchFieldDB",description:"Database search field component",category:"Forms",repo_path:"src/components/forms/SearchFieldDB.tsx",example_path:"docs/static-docs/components/SearchFieldDB.md"},{name:"SearchableDropdown",description:"API-powered searchable dropdown with debounced search, selection, and clear",category:"Forms",repo_path:"src/components/forms/SearchableDropdown.tsx",example_path:"docs/static-docs/components/SearchableDropdown.md",visual_demo_url:"/components/forms/searchable-dropdown"},{name:"StepProgressBar",description:"Step progress indicator component",category:"Forms",repo_path:"src/components/forms/StepProgressBar.tsx",example_path:"docs/static-docs/components/StepProgressBar.md"},{name:"SubmitButton",description:"Form submission button component",category:"Forms",repo_path:"src/components/forms/SubmitButton.tsx",example_path:"docs/static-docs/components/SubmitButton.md",visual_demo_url:"/components/forms/submit-button"},{name:"Tables",description:"Table display component",category:"Forms",repo_path:"src/components/forms/Tables.tsx",example_path:"docs/static-docs/components/Tables.md"},{name:"TextArea",description:"Multi-line text input component",category:"Forms",repo_path:"src/components/forms/TextArea.tsx",example_path:"docs/static-docs/components/TextArea.md"},{name:"TextField",description:"Text input field component",category:"Forms",repo_path:"src/components/forms/TextField.tsx",example_path:"docs/static-docs/components/TextField.md"},{name:"Tooltip",description:"Tooltip display component",category:"Forms",repo_path:"src/components/forms/Tooltip.tsx",example_path:"docs/static-docs/components/Tooltip.md"},{name:"UnsplashRandomImage",description:"Random image from Unsplash component",category:"Forms",repo_path:"src/components/forms/UnsplashRandomImage.tsx",example_path:"docs/static-docs/components/UnsplashRandomImage.md"},{name:"DownloadAsExcel",description:"Excel download functionality component",category:"Forms",repo_path:"src/components/forms/DownloadAsExcel.tsx",example_path:"docs/static-docs/components/DownloadAsExcel.md"},{name:"THeadSortBtn",description:"Table header sort button component",category:"Forms",repo_path:"src/components/forms/THeadSortBtn.tsx",example_path:"docs/static-docs/components/THeadSortBtn.md"},{name:"THeadSortList",description:"Table header sort list component",category:"Forms",repo_path:"src/components/forms/THeadSortList.tsx",example_path:"docs/static-docs/components/THeadSortList.md"},{name:"TBodyNoData",description:"Table body empty state component",category:"Forms",repo_path:"src/components/forms/TBodyNoData.tsx",example_path:"docs/static-docs/components/TBodyNoData.md"},{name:"FileUploader",description:"File upload component",category:"Forms",repo_path:"src/components/forms/uploads/FileUploader.tsx",example_path:"docs/static-docs/components/FileUploader.md",visual_demo_url:"/components/forms/file-uploader"},{name:"IhubFileUploader",description:"InstinctHub file upload component",category:"Forms",repo_path:"src/components/forms/uploads/IhubFileUploader.tsx",example_path:"docs/static-docs/components/IhubFileUploader.md"},{name:"S3MultiUploader",description:"Multi-file queue uploader with per-file progress bars and direct S3 multipart upload via @aws-sdk/lib-storage",category:"Forms",repo_path:"src/components/forms/uploads/S3MultiUploader.tsx",example_path:"docs/static-docs/components/S3MultiUploader.md",visual_demo_url:"/components/ui/s3-multi-uploader"},{name:"ActionCallbackDropdown",description:"Action callback dropdown component",category:"Forms",repo_path:"src/components/forms/ActionCallbackDropdown.tsx",example_path:"docs/static-docs/components/ActionCallbackDropdown.md"},{name:"InputNumber",description:"InputNumber component for numerical input",category:"Form",repo_path:"src/components/forms/InputNumber.tsx",example_path:"docs/static-docs/components/InputNumber.md",visual_demo_url:"/components/forms/input-number"},{name:"InputText",description:"InputText component for text input",category:"Form",repo_path:"src/components/forms/InputText.tsx",example_path:"docs/static-docs/components/InputText.md",visual_demo_url:"/components/forms/input-text"},{name:"InputTextarea",description:"InputTextarea component for text input",category:"Form",repo_path:"src/components/forms/InputTextarea.tsx",example_path:"docs/static-docs/components/InputTextarea.md",visual_demo_url:"/components/forms/input-textarea"},{name:"SearchObjectsFromDB",description:"SearchObjectsFromDB component for searching objects from database",category:"Form",repo_path:"src/components/forms/SearchObjectsFromDB.tsx",example_path:"docs/static-docs/components/SearchObjectsFromDB.md"},{name:"ToggleButton",description:"ToggleButton component for changing state.",category:"Form",repo_path:"src/components/forms/ToggleButton.tsx",example_path:"docs/static-docs/components/ToggleButton.md"},{name:"DateInputPicker",description:"DateInputPicker component for picking date and time.",category:"Form",repo_path:"src/components/forms/DateInputPicker.tsx",example_path:"docs/static-docs/components/DateInputPicker.md"},{name:"TimePicker",description:"TimePicker component for selecting time with 12/24-hour format support.",category:"Form",repo_path:"src/components/forms/TimePicker.tsx",example_path:"docs/static-docs/components/TimePicker.md"},{name:"ChipsInput",description:"ChipsInput is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/ChipsInput.tsx",example_path:"docs/static-docs/components/ChipsInput.md"},{name:"RadioButton",description:"RadioButton is used to enter single value on an input field.",category:"Form",repo_path:"src/components/forms/radio-btn/RadioButton.tsx",example_path:"docs/static-docs/components/RadioButton.md"},{name:"RadioGroup",description:"RadioGroup is used to select each from group value on an input field.",category:"Form",repo_path:"src/components/forms/radio-btn/RadioGroup.tsx",example_path:"docs/static-docs/components/RadioGroup.md"},{name:"InputAmount",description:"InputAmount is used to enter amount on an input field.",category:"Form",repo_path:"src/components/forms/InputAmount.tsx",example_path:"docs/static-docs/components/InputAmount.md"},{name:"CheckBoxes",description:"CheckBoxes is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/CheckBoxes.tsx",example_path:"docs/static-docs/components/CheckBoxes.md"},{name:"CheckBoxesField",description:"CheckBoxesField is used to enter multiple values on an input field.",category:"Form",repo_path:"src/components/forms/CheckboxesField.tsx",example_path:"docs/static-docs/components/CheckBoxesField.md"},{name:"CountryInput",description:"Searchable country selector input field",category:"Form",repo_path:"src/components/forms/CountryInput.tsx",example_path:"docs/static-docs/components/CountryInput.md"},{name:"CountryStateInput",description:"Searchable state/province selector based on selected country",category:"Form",repo_path:"src/components/forms/CountryStateInput.tsx",example_path:"docs/static-docs/components/CountryStateInput.md"},{name:"InputSearchDropdown",description:"Generic searchable dropdown component for organizations",category:"Form",repo_path:"src/components/forms/InputSearchDropdown.tsx",example_path:"docs/static-docs/components/InputSearchDropdown.md"},{name:"RangeRadio",description:"Range radio button component for selecting values within a range",category:"Form",repo_path:"src/components/forms/RangeRadio.tsx",example_path:"docs/static-docs/components/RangeRadio.md"},{name:"IsUsernameEmailTaken",description:"Username/email availability checker",category:"Auth",repo_path:"src/components/auth/IsUsernameEmailTaken.tsx",example_path:"docs/static-docs/components/IsUsernameEmailTaken.md",visual_demo_url:"/components/auth/username-email-checker"},{name:"ClientDetector",description:"Client device detection component",category:"Auth",repo_path:"src/components/auth/ClientDetector.tsx",example_path:"docs/static-docs/components/ClientDetector.md",visual_demo_url:"/components/auth/client-detector"},{name:"PasswordsMatch",description:"Password matching validation component",category:"Auth",repo_path:"src/components/auth/PasswordsMatch.tsx",example_path:"docs/static-docs/components/PasswordsMatch.md"},{name:"FromInstinctHub",description:"From InstinctHub component",category:"Auth",repo_path:"src/components/auth/FromInstinctHub.tsx",example_path:"docs/static-docs/components/FromInstinctHub.md"},{name:"LoginForm",description:"Login form component",category:"Auth",repo_path:"src/components/auth/LoginForm.tsx",example_path:"docs/static-docs/components/LoginForm.md",visual_demo_url:"/components/auth/login-form"},{name:"SignUpForm",description:"Sign up form component",category:"Auth",repo_path:"src/__examples__/src/components/forms/SignUpFormExample.tsx",example_path:"docs/static-docs/components/SignUpForm.md",visual_demo_url:"/components/auth/signup-form"},{name:"ReactClientProviders",description:"Comprehensive wrapper providing all essential React providers",category:"Auth",repo_path:"src/components/auth/ReactClientProviders.tsx",example_path:"docs/static-docs/components/ReactClientProviders.md"},{name:"ClientOnly",description:"Wrapper component that only renders children on client side",category:"Auth",repo_path:"src/components/auth/ClientOnly.tsx",example_path:"docs/static-docs/components/ClientOnly.md"},{name:"useClientSide",description:"Hook for safely handling client-side initialization",category:"Auth",repo_path:"src/components/auth/useClientSide.ts",example_path:"docs/static-docs/components/useClientSide.md"},{name:"useFormattedDate",description:"Hook for consistent date formatting between server and client",category:"Auth",repo_path:"src/components/auth/useFormattedDate.ts",example_path:"docs/static-docs/components/useFormattedDate.md"},{name:"useStableRandom",description:"Hook for generating stable random values",category:"Auth",repo_path:"src/components/auth/useStableRandom.ts",example_path:"docs/static-docs/components/useStableRandom.md"},{name:"useExternalData",description:"Hook for safely handling external data to prevent hydration mismatches",category:"Auth",repo_path:"src/components/auth/useExternalData.ts",example_path:"docs/static-docs/components/useExternalData.md"},{name:"PermissionWrapper",description:"Component that conditionally renders children based on user permissions using role-based access control",category:"Auth",repo_path:"src/components/auth/PermissionWrapper.tsx",example_path:"docs/static-docs/components/PermissionWrapper.md"},{name:"ChannelListAvatar",description:"Channel list avatar component",category:"Navbar",repo_path:"src/components/navbar/ChannelListAvatar.tsx",example_path:"docs/static-docs/components/ChannelListAvatar.md"},{name:"MenuDropdown",description:"Menu dropdown component",category:"Navbar",repo_path:"src/components/navbar/MenuDropdown.tsx",example_path:"docs/static-docs/components/MenuDropdown.md"},{name:"Breadcrumb",description:"Breadcrumb component",category:"Navbar",repo_path:"src/components/navbar/Breadcrumb.tsx",example_path:"docs/static-docs/components/Breadcrumb.md"},{name:"ResponsiveNavbar",description:"Responsive navbar component",category:"Navbar",repo_path:"src/components/navbar/ResponsiveNavbar.tsx",example_path:"docs/static-docs/components/ResponsiveNavbar.md"},{name:"SideNavbar",description:"Side navbar component",category:"Navbar",repo_path:"src/components/navbar/SideNavbar.tsx",example_path:"docs/static-docs/components/SideNavbar.md",visual_demo_url:"/components/navbars/sidenav"},{name:"SideNavbarContext",description:"Context provider for side navigation state management",category:"Navbar",repo_path:"src/components/navbar/SideNavbarContext.tsx",example_path:"docs/static-docs/components/SideNavbarContext.md"},{name:"CustomTextEditor",description:"Custom text editor component",category:"UI",repo_path:"src/components/ui/editor/CustomTextEditor.tsx",example_path:"docs/static-docs/components/CustomTextEditor.md"},{name:"IHubTextEditor",description:"Notion-style rich text editor: slash commands, flexible tables (row/column handles, add, move, duplicate, colour), image/video/audio/PDF/file uploads, embeds, section banners, callouts, toggles, CTA buttons, and rich HTML that keeps its inline styles",category:"UI",repo_path:"src/components/ui/editor/ihub-editor/IHubTextEditor.tsx",example_path:"docs/static-docs/components/IHubTextEditor.md",visual_demo_url:"/components/ui/ihub-text-editor"},{name:"ContentViewer",description:"Content viewer component",category:"UI",repo_path:"src/components/ui/viewer/ContentViewer.tsx",example_path:"docs/static-docs/components/ContentViewer.md",visual_demo_url:"/components/ui/content-viewer"},{name:"ContentViewOrEdit",description:"Content view or edit component",category:"UI",repo_path:"src/components/ui/viewer/ContentViewOrEdit.tsx",example_path:"docs/static-docs/components/ContentViewOrEdit.md",visual_demo_url:"/components/ui/content-view-or-edit"},{name:"CodeDisplay",description:"Code display component",category:"UI",repo_path:"src/components/ui/viewer/CodeDisplay.tsx",example_path:"docs/static-docs/components/CodeDisplay.md"},{name:"DangerousRenderer",description:"Safe-by-default renderer for untrusted HTML/Markdown — DOMPurify sanitization, link hardening, DoS guards, and optional custom wrapper via children.",category:"UI",repo_path:"src/components/ui/viewer/DangerousRenderer.tsx",example_path:"docs/static-docs/components/DangerousRenderer.md",visual_demo_url:"/components/ui/dangerous-renderer"},{name:"IHubTable",description:"InstinctHub client-side table with search, sort, filter, pagination and CSV/Excel/PDF export",category:"UI",repo_path:"src/components/ui/tables/IHubTable.tsx",example_path:"docs/static-docs/components/IHubTable.md"},{name:"IHubTableServer",description:"InstinctHub server-side table with API pagination, search, sorting and full-dataset CSV/Excel/PDF export",category:"UI",repo_path:"src/components/ui/tables/IHubTableServer.tsx",example_path:"docs/static-docs/components/IHubTableServer.md",visual_demo_url:"/components/ui/table-server-examples"},{name:"OrDivider",description:"Or divider component",category:"UI",repo_path:"src/components/ui/OrDivider.tsx",example_path:"docs/static-docs/components/OrDivider.md",visual_demo_url:"/components/ui/or-divider"},{name:"Card",description:"Card component",category:"UI",repo_path:"src/components/ui/cards/Card.tsx",example_path:"docs/static-docs/components/Card.md"},{name:"CardList",description:"Card list component",category:"UI",repo_path:"src/components/ui/cards/CardList.tsx",example_path:"docs/static-docs/components/CardList.md",visual_demo_url:"/components/ui/card-list"},{name:"CardGrid",description:"Card grid component",category:"UI",repo_path:"src/components/ui/cards/CardGrid.tsx",example_path:"docs/static-docs/components/CardGrid.md",visual_demo_url:"/components/ui/card-grid"},{name:"HorizontalCard",description:"Horizontal card component",category:"UI",repo_path:"src/components/ui/cards/HorizontalCard.tsx",example_path:"docs/static-docs/components/HorizontalCard.md"},{name:"FeatureCard",description:"Feature card component",category:"UI",repo_path:"src/components/ui/cards/FeatureCard.tsx",example_path:"docs/static-docs/components/FeatureCard.md"},{name:"MediaCard",description:"Media card component",category:"UI",repo_path:"src/components/ui/cards/MediaCard.tsx",example_path:"docs/static-docs/components/MediaCard.md"},{name:"PricingCard",description:"Pricing card component",category:"UI",repo_path:"src/components/ui/cards/PricingCard.tsx",example_path:"docs/static-docs/components/PricingCard.md"},{name:"ProfileCard",description:"Profile card component",category:"UI",repo_path:"src/components/ui/cards/ProfileCard.tsx",example_path:"docs/static-docs/components/ProfileCard.md"},{name:"RandomGradientImage",description:"Random gradient image component",category:"UI",repo_path:"src/components/ui/images/RandomGradientImage.tsx",example_path:"docs/static-docs/components/RandomGradientImage.md",visual_demo_url:"/components/ui/random-gradient-image"},{name:"Dialog",description:"A reusable dialog component",category:"UI",repo_path:"src/components/ui/dialogs/Dialog.tsx",example_path:"docs/static-docs/components/Dialog.md"},{name:"Badge",description:"A reusable Badge component",category:"UI",repo_path:"src/components/ui/Badge.tsx",example_path:"docs/static-docs/components/Badge.md"},{name:"Action",description:"A reusable Action component",category:"UI",repo_path:"src/components/ui/Action.tsx",example_path:"docs/static-docs/components/Action.md"},{name:"Dropdown",description:"A reusable Dropdown component",category:"UI",repo_path:"src/components/ui/Dropdown.tsx",example_path:"docs/static-docs/components/Dropdown.md"},{name:"ColorPicker",description:"A reusable ColorPicker component",category:"UI",repo_path:"src/components/ui/ColorPicker.tsx",example_path:"docs/static-docs/components/ColorPicker.md"},{name:"Pagination",description:"A reusable Pagination component",category:"UI",repo_path:"src/components/ui/pagination/Pagination.tsx",example_path:"docs/static-docs/components/Pagination.md",visual_demo_url:"/components/ui/pagination"},{name:"PaginationDemo",description:"A demo for the Pagination component",category:"UI",repo_path:"src/components/ui/pagination/PaginationDemo.tsx",example_path:"docs/static-docs/components/PaginationDemo.md"},{name:"CreateButton",description:"A reusable CreateButton component",category:"UI",repo_path:"src/components/ui/create-button/CreateButton.tsx",example_path:"docs/static-docs/components/CreateButton.md"},{name:"CreateButtonExample",description:"An example of the CreateButton component",category:"UI",repo_path:"src/components/ui/create-button/CreateButtonExample.tsx",example_path:"docs/static-docs/components/CreateButtonExample.md"},{name:"MenuBar",description:"Toolbar component for the TipTap rich text editor",category:"UI",repo_path:"src/components/ui/editor/MenuBar.tsx",example_path:"docs/static-docs/components/MenuBar.md"},{name:"InstinctHubChart",description:"Versatile chart component supporting multiple chart types",category:"UI",repo_path:"src/components/ui/charts/InstinctHubChart.tsx",example_path:"docs/static-docs/components/InstinctHubChart.md"},{name:"InstinctHubChartDashboard",description:"Dashboard component showcasing multiple charts",category:"UI",repo_path:"src/components/ui/charts/InstinctHubChartDashboard.tsx",example_path:"docs/static-docs/components/InstinctHubChartDashboard.md"},{name:"ChartConfigurator",description:"Interactive chart configuration interface",category:"UI",repo_path:"src/components/ui/charts/ChartConfigurator.tsx",example_path:"docs/static-docs/components/ChartConfigurator.md"},{name:"ChangeStyleVariable",description:"Style variable changer component",category:"Theme",repo_path:"src/components/theme/ChangeStyleVariable.tsx",example_path:"docs/static-docs/components/ChangeStyleVariable.md"},{name:"DarkModeProvider",description:"Dark mode provider component",category:"Theme",repo_path:"src/components/theme/DarkModeProvider.tsx",example_path:"docs/static-docs/components/DarkModeProvider.md"},{name:"LoadingAnimate",description:"Loading animation component",category:"Theme",repo_path:"src/components/theme/LoadingAnimate.tsx",example_path:"docs/static-docs/components/LoadingAnimate.md"},{name:"SessionProviders",description:"Session providers component",category:"Theme",repo_path:"src/components/theme/SessionProviders.tsx",example_path:"docs/static-docs/components/SessionProviders.md"},{name:"SessionExpiresLogout",description:"Session expiration logout component",category:"Theme",repo_path:"src/components/theme/signout/SessionExpiresLogout.tsx",example_path:"docs/static-docs/components/SessionExpiresLogout.md"},{name:"SignOutSession",description:"Sign out session component",category:"Theme",repo_path:"src/components/theme/signout/SignOutSession.tsx",example_path:"docs/static-docs/components/SignOutSession.md"},{name:"TimeTracker",description:"Time tracking component",category:"Status",repo_path:"src/components/status/ReactTimeTracker.tsx",example_path:"docs/static-docs/components/TimeTracker.md"},{name:"SessionHandleProvider",description:"Session handling provider component",category:"Status",repo_path:"src/components/status/SessionHandleProvider.tsx",example_path:"docs/static-docs/components/SessionHandleProvider.md"},{name:"Error500",description:"500 error display component",category:"Status",repo_path:"src/components/status/Error500.tsx",example_path:"docs/static-docs/components/Error500.md"},{name:"ErrorState",description:"Error state display component",category:"Status",repo_path:"src/components/status/ErrorState.tsx",example_path:"docs/static-docs/components/ErrorState.md"},{name:"ReactTimeTracker",description:"React time tracking component",category:"Status",repo_path:"src/components/status/ReactTimeTracker.tsx",example_path:"docs/static-docs/components/ReactTimeTracker.md"},{name:"DeleteConfirmationModal",description:"Delete confirmation modal component",category:"Status",repo_path:"src/components/status/DeleteConfirmationModal.tsx",example_path:"docs/static-docs/components/DeleteConfirmationModal.md"},{name:"CopyToClipboard",description:"Copy to clipboard functionality component",category:"Status",repo_path:"src/components/status/CopyToClipBoard.tsx",example_path:"docs/static-docs/components/CopyToClipboard.md"},{name:"MultiPurposeModal",description:"Multi-purpose modal component",category:"Status",repo_path:"src/components/status/MultiPurposeModal.tsx",example_path:"docs/static-docs/components/MultiPurposeModal.md"},{name:"ModalExamples",description:"Modal examples component",category:"Status",repo_path:"src/components/status/ModalExamples.tsx",example_path:"docs/static-docs/components/ModalExamples.md"},{name:"NotFound",description:"Not found component",category:"Status",repo_path:"src/components/status/NotFound.tsx",example_path:"docs/static-docs/components/NotFound.md"},{name:"Unauthorized",description:"Unauthorized component",category:"Status",repo_path:"src/components/status/Unauthorized.tsx",example_path:"docs/static-docs/components/Unauthorized.md"},{name:"ModalWrapper",description:"ModalWrapper component",category:"Status",repo_path:"src/components/status/ModalWrapper.tsx",example_path:"docs/static-docs/components/ModalWrapper.md"},{name:"Tabs",description:"Tab navigation component",category:"Tabs",repo_path:"src/components/tabs/Tabs.tsx",example_path:"docs/static-docs/components/Tabs.md"},{name:"VerticalTabs",description:"Vertical tab navigation component",category:"Tabs",repo_path:"src/components/tabs/VerticalTabs.tsx",example_path:"docs/static-docs/components/VerticalTabs.md"},{name:"TabContent",description:"Tab content display component",category:"Tabs",repo_path:"src/components/tabs/TabContent.tsx",example_path:"docs/static-docs/components/TabContent.md"},{name:"Cursor",description:"Custom cursor component with trailing effects and animations",category:"Cursors",repo_path:"src/components/cursors/Cursor.tsx",example_path:"docs/static-docs/components/Cursor.md"},{name:"MagneticButton",description:"Button component with magnetic cursor attraction effect",category:"Cursors",repo_path:"src/components/cursors/MagneticButton.tsx",example_path:"docs/static-docs/components/MagneticButton.md"},{name:"CursorContext",description:"Context provider for cursor state management across the application",category:"Cursors",repo_path:"src/components/cursors/CursorContext.tsx",example_path:"docs/static-docs/components/CursorContext.md"},{name:"useCursorInteraction",description:"Hook for adding interactive cursor effects to elements",category:"Cursors",repo_path:"src/components/cursors/useCursorInteraction.tsx",example_path:"docs/static-docs/components/useCursorInteraction.md"},{name:"CursorControlDemo",description:"Comprehensive demo component for the cursor system",category:"Cursors",repo_path:"src/components/cursors/CursorControlDemo.tsx",example_path:"docs/static-docs/components/CursorControlDemo.md"},{name:"Paystack",description:"Paystack payment integration component",category:"Library",repo_path:"src/components/lib/readme/paystack.md",example_path:"docs/static-docs/components/Paystack.md"}],f=s.useMemo(function(){var o=Array.from(new Set(y.map(function(e){return e.category}))).sort();return[{id:"",title:"All Categories"}].concat(e.toConsumableArray(o.map(function(e){return{id:e,title:e}})))},[y]),C=s.useMemo(function(){var e=y;if(u&&(e=e.filter(function(e){return e.category===u})),i.trim()){var o=i.toLowerCase();e=e.filter(function(e){return e.name.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)||e.category.toLowerCase().includes(o)})}return e},[y,i,u]),v=s.useMemo(function(){return C.reduce(function(e,o){return e[o.category]||(e[o.category]=[]),e[o.category].push(o),e},{})},[C]),F="https://github.com/instincthub/instincthub-react-ui/blob/main/",T=s.useState(""),I=e.slicedToArray(T,2),S=I[0],D=I[1];s.useEffect(function(){D(window.location.origin)},[]);var k=function(){var o=e.asyncToGenerator(e.regenerator().m(function o(t,n){var s;return e.regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,navigator.clipboard.writeText(t);case 1:b("".concat(n,"-").concat(t)),setTimeout(function(){return b(null)},2e3),e.n=3;break;case 2:e.p=2,s=e.v,console.error("Failed to copy: ",s);case 3:return e.a(2)}},o,null,[[0,2]])}));return function(e,t){return o.apply(this,arguments)}}();return o.jsxs("div",{className:"ihub-component-lists",children:[o.jsx("h1",{className:"ihub-component-lists-title",children:"InstinctHub React UI Components"}),o.jsx("p",{className:"ihub-component-lists-description",children:"A comprehensive list of all available components in the InstinctHub React UI library."}),o.jsxs("div",{className:"ihub-search-container",children:[o.jsxs("div",{className:"ihub-flex ihub-gap-3 ihub-mb-3",children:[o.jsx("div",{style:{flex:1},children:o.jsx(r.default,{label:"Search",name:"search",placeholder:"Search components by name, description, or category...",value:i,onChange:function(e){return m(e.target.value)},activeLabel:!0})}),o.jsx("div",{className:"ihub-mt-1 ihub-pl-3",children:o.jsx(a.default,{options:f,defaultValue:u||"",name:"category",setValue:function(e){return h(String(e.id))},defaultWidth:"200px"})})]}),(i||u)&&o.jsxs("div",{className:"ihub-search-results-info",children:["Found ",C.length," component",1!==C.length?"s":"",i&&' matching "'.concat(i,'"'),u&&' in category "'.concat(u,'"'),(i||u)&&o.jsx("button",{onClick:function(){m(""),h("")},style:{marginLeft:"10px",padding:"4px 8px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",fontSize:"12px",cursor:"pointer"},children:"Clear Filters"})]})]}),Object.entries(v).map(function(s){var a=e.slicedToArray(s,2),r=a[0],c=a[1];return o.jsxs("div",{className:"ihub-component-category",children:[o.jsx("h2",{className:"ihub-component-category-title",children:r}),o.jsx("div",{className:"ihub-component-grid",children:c.map(function(e){return o.jsxs("div",{className:"ihub-component-card",children:[o.jsx("h3",{className:"ihub-component-name",children:e.name}),o.jsx("p",{className:"ihub-component-description",children:e.description}),o.jsxs("div",{className:"ihub-component-links",children:[o.jsxs("div",{className:"ihub-link-group ihub-flex",children:[o.jsx("a",{href:"".concat(F).concat(e.repo_path),target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link",children:"Repository"}),o.jsx("button",{onClick:function(){return k("".concat(F).concat(e.repo_path),"repo")},className:"ihub-copy-btn",title:"Copy ".concat(e.name," repository link"),children:g==="repo-".concat(F).concat(e.repo_path)?o.jsx(t.default,{}):o.jsx(n.default,{})})]}),o.jsxs("div",{className:"ihub-link-group ihub-flex ihub-mt-2",children:[o.jsx("a",{href:"".concat(F).concat(e.example_path),target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link",children:"Example"}),o.jsx("button",{onClick:function(){return k("".concat(F).concat(e.example_path),"example")},className:"ihub-copy-btn",title:"Copy ".concat(e.name," example link"),children:g==="example-".concat(F).concat(e.example_path)?o.jsx(t.default,{}):o.jsx(n.default,{})})]}),e.visual_demo_url&&o.jsxs("div",{className:"ihub-link-group ihub-flex ihub-mt-2",children:[o.jsx("a",{href:e.visual_demo_url,target:"_blank",rel:"noopener noreferrer",className:"ihub-component-link ihub-demo-link",children:"Live Demo"}),o.jsx("button",{onClick:function(){return k(S+e.visual_demo_url,"demo")},className:"ihub-copy-btn",title:"Copy ".concat(e.name,"live demo link"),children:g==="demo-".concat(S).concat(e.visual_demo_url)?o.jsx(t.default,{}):o.jsx(n.default,{})})]})]})]},e.name)})})]},r)}),0===Object.keys(v).length&&(i||u)&&o.jsxs("div",{className:"ihub-no-results",children:[o.jsxs("p",{children:["No components found",i&&' matching "'.concat(i,'"'),u&&' in category "'.concat(u,'"')]}),o.jsx("button",{onClick:function(){m(""),h("")},className:"ihub-clear-search-btn",children:"Clear Filters"})]})]})};
|
|
2
2
|
//# sourceMappingURL=ComponentLists.cjs.map
|