@instincthub/react-ui 0.0.9 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1792,7 +1792,6 @@
1792
1792
  height: 20px;
1793
1793
  padding: 5px;
1794
1794
  margin: 0;
1795
- font-size: 1.2rem;
1796
1795
  pointer-events: initial;
1797
1796
  left: 5px;
1798
1797
  top: 15px;
@@ -52,6 +52,7 @@
52
52
  justify-content: space-between;
53
53
  flex: 1;
54
54
  margin-left: 40px;
55
+ background-color: var(--White);
55
56
  }
56
57
 
57
58
  /* Navigation links */
@@ -242,7 +242,6 @@ li {
242
242
  @media (min-width: 1024px) {
243
243
  p,
244
244
  div,
245
- span,
246
245
  i,
247
246
  li {
248
247
  font-size: 1.1rem;
@@ -1,2 +1,2 @@
1
- import{slicedToArray as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as n,jsxs as i,Fragment as r}from"react/jsx-runtime";import{useState as a,useEffect as t}from"react";import o from"next/link";import l from"next/image";import u from"@mui/icons-material/LightMode";import c from"@mui/icons-material/DarkMode";var s=function(s){var h,d,m=s.session,b=s.logoSrc,v=s.logoAlt,f=void 0===v?"Company Logo":v,p=s.navLinks,g=s.userAreaLinks,N=void 0===g?[]:g,w=s.theme,k=void 0===w?"LightMode":w,L=s.containerClass,E=void 0===L?"ihub-container":L,M=a(!1),x=e(M,2),_=x[0],D=x[1],C=a(!1),S=e(C,2),A=S[0],y=S[1],j=a(!1),z=e(j,2),B=z[0],I=z[1],P=a(null),U=e(P,2),H=U[0],T=U[1],W=a(null),Y=e(W,2),q=Y[0],F=Y[1],G=a(k),J=e(G,2),K=J[0],O=J[1],Q=null==m||null===(h=m.user)||void 0===h?void 0:h.name;t((function(){var e=function(){window.scrollY>50?y(!0):y(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]),t((function(){var e=localStorage.getItem("theme");e&&(O(e),document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e))}),[]),t((function(){var e=function(e){var n=e.target;!_||n.closest(".ihub-navbar-elements")||n.closest(".ihub-hamburger")||D(!1),B&&!n.closest(".ihub-user-dropdown")&&(I(!1),F(null)),null===H||n.closest(".ihub-nav-submenu-".concat(H))||T(null)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}),[_,B,H,q]),t((function(){var e=function(){window.innerWidth>768&&_&&D(!1)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[_]);return n("header",{className:"ihub-navbar ".concat(A?"ihub-navbar-scrolled":""," ").concat("DarkMode"===K?"ihub-navbar-dark":""),children:n("div",{className:E,children:i("nav",{className:"ihub-navbar-container",children:[n("div",{className:"ihub-navbar-logo",children:n(o,{href:"/",children:n(l,{src:b,alt:f,width:120,height:40,className:"ihub-logo-image"})})}),i("div",{className:"ihub-hamburger",onClick:function(){D(!_),T(null)},children:[n("div",{className:"ihub-hamburger-line ".concat(_?"ihub-active":"")}),n("div",{className:"ihub-hamburger-line ".concat(_?"ihub-active":"")}),n("div",{className:"ihub-hamburger-line ".concat(_?"ihub-active":"")})]}),i("div",{className:"ihub-navbar-elements ".concat(_?"ihub-active":""),children:[i("ul",{className:"ihub-nav-links",children:[p.map((function(e,a){return n("li",{className:"ihub-nav-item ihub-nav-submenu-".concat(a," ").concat(e.submenu?"ihub-has-submenu":""," ").concat(H===a?"ihub-submenu-active":""),children:e.submenu?i(r,{children:[i("a",{href:"#",onClick:function(e){return function(e,n){n.preventDefault(),T(H===e?null:e)}(a,e)},className:"ihub-submenu-toggle ".concat(e.highlight?"ihub-nav-highlight":""),children:[e.title,n("span",{className:"ihub-dropdown-arrow"})]}),H===a&&n("ul",{className:"ihub-submenu",children:e.submenu.map((function(e,r){return n("li",{className:"ihub-submenu-item",children:e.isExternal?i("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[e.icon&&n("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]}):i(o,{href:e.href,children:[e.icon&&n("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]})},r)}))})]}):n(r,{children:e.isExternal?n("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:e.highlight?"ihub-nav-highlight":"",children:e.title}):n(o,{href:e.href,className:e.highlight?"ihub-nav-highlight":"",children:e.title})})},a)})),n("li",{className:"ihub-nav-item",children:n("button",{onClick:function(){var e="LightMode"===K?"DarkMode":"LightMode";document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e),O(e),localStorage.setItem("theme",e)},className:"ihub-theme-toggle","aria-label":"Switch to ".concat("LightMode"===K?"DarkMode":"LightMode"," mode"),children:n("LightMode"===K?c:u,{})})})]}),n("div",{className:"ihub-navbar-user-area",children:m?i("div",{className:"ihub-user-dropdown",children:[i("div",{className:"ihub-user-profile",onClick:function(){I(!B),F(null)},children:[null!=Q&&Q.picture?n(l,{src:Q.picture,alt:"User",width:40,height:40,className:"ihub-user-avatar"}):n("div",{className:"ihub-user-initials",children:(null==Q||null===(d=Q.full_name)||void 0===d?void 0:d.charAt(0))||"U"}),i("span",{className:"ihub-user-name ihub-hide-sm",children:[null==Q?void 0:Q.full_name,n("span",{className:"ihub-dropdown-arrow"})]})]}),B&&i("div",{className:"ihub-dropdown ihub-user-menu-dropdown",children:[N.map((function(e,r){return n("div",{className:"ihub-dropdown-item-wrapper",children:e.submenu?i("div",{className:"ihub-dropdown-with-submenu",children:[i("a",{href:"#",className:"ihub-dropdown-item ihub-dropdown-parent",onClick:function(e){return function(e,n){n.preventDefault(),n.stopPropagation(),F(q===e?null:e)}(r,e)},target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&n("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title,n("span",{className:"ihub-submenu-caret ".concat(q===r?"ihub-active":"")})]}),q===r&&n("div",{className:"ihub-user-submenu",children:e.submenu.map((function(e,r){return i(o,{href:e.href,className:"ihub-dropdown-subitem",target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&n("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]},r)}))})]}):i(o,{href:e.href,className:"ihub-dropdown-item",children:[e.icon&&n("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]})},r)})),i(o,{href:"/api/auth/signout",className:"ihub-dropdown-item ihub-signout",children:[n("span",{className:"ihub-dropdown-icon",children:"⤴"}),"Sign out"]})]})]}):n("div",{className:"ihub-auth-buttons",children:N.map((function(e,i){return e.isButton?n(o,{href:e.href,className:"".concat("outline"===e.buttonStyle?"ihub-outlined-btn":"ihub-important-btn"),target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:e.title},i):n(o,{href:e.href,className:"ihub-auth-link",children:e.title},i)}))})})]})]})})})};export{s as default};
1
+ import{slicedToArray as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as n,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as a,useEffect as t}from"react";import o from"next/link";import l from"next/image";import u from"@mui/icons-material/LightMode";import c from"@mui/icons-material/DarkMode";var s=function(s){var h,d,m=s.session,b=s.logoSrc,v=s.logoAlt,p=void 0===v?"Company Logo":v,f=s.navLinks,g=s.userAreaLinks,N=void 0===g?[]:g,w=s.theme,k=void 0===w?"LightMode":w,L=s.containerClass,E=void 0===L?"ihub-container":L,M=s.topBanner,x=s.bottomBanner,_=s.hideTopBanner,D=void 0!==_&&_,B=s.hideBottomBanner,C=void 0!==B&&B,S=a(!1),A=e(S,2),y=A[0],j=A[1],z=a(!1),I=e(z,2),P=I[0],T=I[1],U=a(!1),H=e(U,2),W=H[0],Y=H[1],q=a(null),F=e(q,2),G=F[0],J=F[1],K=a(null),O=e(K,2),Q=O[0],R=O[1],V=a(k),X=e(V,2),Z=X[0],$=X[1],ee=null==m||null===(h=m.user)||void 0===h?void 0:h.name;t((function(){var e=function(){window.scrollY>50?T(!0):T(!1)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}}),[]),t((function(){var e=localStorage.getItem("theme");e&&($(e),document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e))}),[]),t((function(){var e=function(e){var n=e.target;!y||n.closest(".ihub-navbar-elements")||n.closest(".ihub-hamburger")||j(!1),W&&!n.closest(".ihub-user-dropdown")&&(Y(!1),R(null)),null===G||n.closest(".ihub-nav-submenu-".concat(G))||J(null)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}),[y,W,G,Q]),t((function(){var e=function(){window.innerWidth>768&&y&&j(!1)};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[y]);return n("header",{className:"ihub-navbar ".concat(P?"ihub-navbar-scrolled":""," ").concat("DarkMode"===Z?"ihub-navbar-dark":""),children:[M&&!D&&i("div",{className:"ihub-navbar-top-banner",children:M}),i("div",{className:E,children:n("nav",{className:"ihub-navbar-container",children:[i("div",{className:"ihub-navbar-logo",children:i(o,{href:"/",children:i(l,{src:b,alt:p,width:120,height:40,className:"ihub-logo-image"})})}),n("div",{className:"ihub-hamburger",onClick:function(){j(!y),J(null)},children:[i("div",{className:"ihub-hamburger-line ".concat(y?"ihub-active":"")}),i("div",{className:"ihub-hamburger-line ".concat(y?"ihub-active":"")}),i("div",{className:"ihub-hamburger-line ".concat(y?"ihub-active":"")})]}),n("div",{className:"ihub-navbar-elements ".concat(y?"ihub-active":""),children:[n("ul",{className:"ihub-nav-links",children:[f.map((function(e,a){return i("li",{className:"ihub-nav-item ihub-nav-submenu-".concat(a," ").concat(e.submenu?"ihub-has-submenu":""," ").concat(G===a?"ihub-submenu-active":""),children:e.submenu?n(r,{children:[n("a",{href:"#",onClick:function(e){return function(e,n){n.preventDefault(),J(G===e?null:e)}(a,e)},className:"ihub-submenu-toggle ".concat(e.highlight?"ihub-nav-highlight":""),children:[e.title,i("span",{className:"ihub-dropdown-arrow"})]}),G===a&&i("ul",{className:"ihub-submenu",children:e.submenu.map((function(e,r){return i("li",{className:"ihub-submenu-item",children:e.isExternal?n("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[e.icon&&i("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]}):n(o,{href:e.href,children:[e.icon&&i("span",{className:"ihub-submenu-icon",children:e.icon}),e.title]})},r)}))})]}):i(r,{children:e.isExternal?i("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:e.highlight?"ihub-nav-highlight":"",children:e.title}):i(o,{href:e.href,className:e.highlight?"ihub-nav-highlight":"",children:e.title})})},a)})),i("li",{className:"ihub-nav-item",children:i("button",{onClick:function(){var e="LightMode"===Z?"DarkMode":"LightMode";document.documentElement.classList.remove("LightMode","DarkMode"),document.documentElement.classList.add(e),$(e),localStorage.setItem("theme",e)},className:"ihub-theme-toggle","aria-label":"Switch to ".concat("LightMode"===Z?"DarkMode":"LightMode"," mode"),children:i("LightMode"===Z?c:u,{})})})]}),i("div",{className:"ihub-navbar-user-area",children:m?n("div",{className:"ihub-user-dropdown",children:[n("div",{className:"ihub-user-profile",onClick:function(){Y(!W),R(null)},children:[null!=ee&&ee.picture?i(l,{src:ee.picture,alt:"User",width:40,height:40,className:"ihub-user-avatar"}):i("div",{className:"ihub-user-initials",children:(null==ee||null===(d=ee.full_name)||void 0===d?void 0:d.charAt(0))||"U"}),n("span",{className:"ihub-user-name ihub-hide-sm",children:[null==ee?void 0:ee.full_name,i("span",{className:"ihub-dropdown-arrow"})]})]}),W&&n("div",{className:"ihub-dropdown ihub-user-menu-dropdown",children:[N.map((function(e,r){return i("div",{className:"ihub-dropdown-item-wrapper",children:e.submenu?n("div",{className:"ihub-dropdown-with-submenu",children:[n("a",{href:"#",className:"ihub-dropdown-item ihub-dropdown-parent",onClick:function(e){return function(e,n){n.preventDefault(),n.stopPropagation(),R(Q===e?null:e)}(r,e)},target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&i("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title,i("span",{className:"ihub-submenu-caret ".concat(Q===r?"ihub-active":"")})]}),Q===r&&i("div",{className:"ihub-user-submenu",children:e.submenu.map((function(e,r){return n(o,{href:e.href,className:"ihub-dropdown-subitem",target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:[e.icon&&i("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]},r)}))})]}):n(o,{href:e.href,className:"ihub-dropdown-item",children:[e.icon&&i("span",{className:"ihub-dropdown-icon",children:e.icon}),e.title]})},r)})),n(o,{href:"/api/auth/signout",className:"ihub-dropdown-item ihub-signout",children:[i("span",{className:"ihub-dropdown-icon",children:"⤴"}),"Sign out"]})]})]}):i("div",{className:"ihub-auth-buttons",children:N.map((function(e,n){return e.isButton?i(o,{href:e.href,className:"".concat("outline"===e.buttonStyle?"ihub-outlined-btn":"ihub-important-btn"),target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,children:e.title},n):i(o,{href:e.href,className:"ihub-auth-link",children:e.title},n)}))})})]})]})}),x&&!C&&i("div",{className:"ihub-navbar-bottom-banner",children:x})]})};export{s as default};
2
2
  //# sourceMappingURL=ResponsiveNavbar.js.map
@@ -1,2 +1,2 @@
1
- import{slicedToArray as a,asyncToGenerator as n,regeneratorRuntime as i}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import l from"next/link";import{reqOptions as c,fetchAPI as s}from"../../lib/helpFunction.js";import"../../lib/utils.js";import{useSearchParams as u}from"next/navigation";var h=function(a){if(!a)return null;try{return new URL(a).searchParams.get("offset")}catch(a){return null}},d=function(d){var p=d.data,g=d.limit,f=d.urlPath,m=d.setData,b=d.token,v=void 0===b?null:b,w=d.tabsValues,x=void 0===w?"":w,N=d.searchValues,L=void 0===N?"":N,k=d.rangeLimit,y=void 0===k?5:k,P=d.className,G=void 0===P?"":P,I=d.showFirstLast,M=void 0===I||I,R=u(),j=R.get("offset")||"0",C=R.get("search")||"",S=o([]),U=a(S,2),B=U[0],F=U[1],T=o(0),A=a(T,2),V=A[0],Z=A[1],_=o(y||5),D=a(_,2),E=D[0],H=D[1],O=o(!1),q=a(O,2),z=q[0],J=q[1],K=Number(j),Q=Math.floor(K/g),W=h((null==p?void 0:p.next)||""),X=h((null==p?void 0:p.previous)||""),Y=function(){var a=n(i().mark((function a(n){var t,e,o,r,l;return i().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return J(!0),a.prev=1,t=c("GET",null,v),e=void 0!==n?"&offset=".concat(n):"",o=L||C?"&search=".concat(encodeURIComponent(L||C)):"",r=x?"&cat=".concat(encodeURIComponent(x)):"",l="".concat(f,"?limit=").concat(g).concat(e).concat(o).concat(r),console.log("searchOffset: ",n,l),a.next=10,s(m,l,t,!0);case 10:a.next=15;break;case 12:a.prev=12,a.t0=a.catch(1),console.error("Pagination fetch error:",a.t0);case 15:return a.prev=15,$(),J(!1),a.finish(15);case 19:case"end":return a.stop()}}),a,null,[[1,12,15,19]])})));return function(n){return a.apply(this,arguments)}}(),$=function(){console.log("updatePageRange called with currentPageIndex:",Q,y),Q+1>=y?(Z(Q-2),H(Q+3)):(Z(0),H(y))};if(r((function(){if(K>0||x||L||C?Y(K):Y(),null!=p&&p.count){var a=Math.ceil(p.count/g);F(Array.from({length:a},(function(a,n){return n})))}}),[j,null==p?void 0:p.count,x,g]),r((function(){if("undefined"!=typeof window){var a=new URLSearchParams(window.location.search);a.set("offset","0"),window.history.replaceState({},"","".concat(window.location.pathname,"?").concat(a.toString()))}}),[L,C]),!B.length&&!z)return null;var aa=B.length,na=0===Q,ia=Q===aa-1,ta=B.slice(V,E);return t("div",{className:"ihub-pagination-container ".concat(G),role:"navigation","aria-label":"Pagination",children:[z&&t("div",{className:"ihub-pagination-loading",children:[e("div",{className:"ihub-loading-spinner"}),e("span",{children:"Loading..."})]}),t("ul",{className:"ihub-pagination-list",children:[t("div",{className:"ihub-pagination-nav-group",children:[M&&e("li",{className:"ihub-pagination-item ".concat(na?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=0",className:"ihub-pagination-link ihub-pagination-first","aria-label":"Go to first page",tabIndex:na?-1:0,children:"First"})}),e("li",{className:"ihub-pagination-item ".concat(na||null==p||!p.previous?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=".concat(X||0),className:"ihub-pagination-link ihub-pagination-previous","aria-label":"Go to previous page",tabIndex:na||null==p||!p.previous?-1:0,children:e("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e("path",{d:"M7.66927 1.83333L3.08594 6.41667L7.66927 11L6.7526 12.8333L0.335938 6.41667L6.7526 0L7.66927 1.83333Z",fill:"currentColor"})})})})]}),e("div",{className:"ihub-pagination-pages",children:ta.map((function(a){var n=Q===a,i=a+1;return e("li",{className:"ihub-pagination-item ".concat(n?"ihub-pagination-active":""),"data-page":i,children:e(l,{href:"?offset=".concat(a*g),className:"ihub-pagination-link ihub-pagination-number","aria-label":"Go to page ".concat(i),"aria-current":n?"page":void 0,children:i})},a)}))}),t("div",{className:"ihub-pagination-nav-group ".concat(null!=p&&p.next?"":"ihub-pagination-disabled"),children:[e("li",{className:"ihub-pagination-item ".concat(ia||null==p||!p.next?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=".concat(W||K),className:"ihub-pagination-link ihub-pagination-next","aria-label":"Go to next page",tabIndex:ia||null==p||!p.next?-1:0,children:e("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e("path",{d:"M0.330731 1.83333L4.91406 6.41667L0.330731 11L1.2474 12.8333L7.66406 6.41667L1.2474 0L0.330731 1.83333Z",fill:"currentColor"})})})}),M&&e("li",{className:"ihub-pagination-item ".concat(ia?"ihub-pagination-disabled":""),children:e(l,{href:"?offset=".concat((aa-1)*g),className:"ihub-pagination-link ihub-pagination-last","aria-label":"Go to last page",tabIndex:ia?-1:0,children:"Last"})})]})]}),e("div",{className:"ihub-pagination-info",children:t("span",{className:"ihub-pagination-summary",children:["Showing ",Math.min(K+1,(null==p?void 0:p.count)||0)," to"," ",Math.min(K+g,(null==p?void 0:p.count)||0)," of"," ",(null==p?void 0:p.count)||0," results"]})})]})};export{d as default};
1
+ import{slicedToArray as a,asyncToGenerator as n,regeneratorRuntime as i}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useState as o,useRef as r,useEffect as l}from"react";import c from"next/link";import{reqOptions as s,fetchAPI as u}from"../../lib/helpFunction.js";import"../../lib/utils.js";import{useSearchParams as h}from"next/navigation";var d=function(a){if(!a)return null;try{return new URL(a).searchParams.get("offset")}catch(a){return null}},p=function(p){var g=p.data,f=p.limit,m=p.urlPath,b=p.setData,v=p.token,w=void 0===v?null:v,x=p.tabsValues,N=void 0===x?"":x,L=p.searchValues,k=void 0===L?"":L,y=p.rangeLimit,P=void 0===y?5:y,G=p.className,I=void 0===G?"":G,M=p.showFirstLast,R=void 0===M||M,j=h(),C=j.get("offset")||"0",S=j.get("search")||"",U=o([]),B=a(U,2),F=B[0],T=B[1],A=o(0),V=a(A,2),Z=V[0],_=V[1],D=o(P||5),E=a(D,2),H=E[0],q=E[1],z=o(!1),J=a(z,2),K=J[0],O=J[1],Q=r(!0),W=Number(C),X=Math.floor(W/f),Y=d((null==g?void 0:g.next)||""),$=d((null==g?void 0:g.previous)||""),aa=function(){var a=n(i().mark((function a(n){var t,e,o,r,l;return i().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return O(!0),a.prev=1,t=s("GET",null,w),e=void 0!==n?"&offset=".concat(n):"",o=k||S?"&search=".concat(encodeURIComponent(k||S)):"",r=N?"&cat=".concat(encodeURIComponent(N)):"",l="".concat(m,"?limit=").concat(f).concat(e).concat(o).concat(r),a.next=9,u(b,l,t,!0);case 9:a.next=14;break;case 11:a.prev=11,a.t0=a.catch(1),console.error("Pagination fetch error:",a.t0);case 14:return a.prev=14,na(),O(!1),a.finish(14);case 18:case"end":return a.stop()}}),a,null,[[1,11,14,18]])})));return function(n){return a.apply(this,arguments)}}(),na=function(){console.log("updatePageRange called with currentPageIndex:",X,P),X+1>=P?(_(X-2),q(X+3)):(_(0),q(P))};if(l((function(){if(W>0||N||k||S?aa(W):aa(),null!=g&&g.count){var a=Math.ceil(g.count/f);T(Array.from({length:a},(function(a,n){return n})))}}),[C,null==g?void 0:g.count,N,f]),l((function(){if(Q.current)Q.current=!1;else if("undefined"!=typeof window){var a=new URLSearchParams(window.location.search);a.set("offset","0"),window.history.replaceState({},"","".concat(window.location.pathname,"?").concat(a.toString()))}}),[k,S]),!F.length&&!K)return null;var ia=F.length,ta=0===X,ea=X===ia-1,oa=F.slice(Z,H);return t("div",{className:"ihub-pagination-container ".concat(I),role:"navigation","aria-label":"Pagination",children:[K&&t("div",{className:"ihub-pagination-loading",children:[e("div",{className:"ihub-loading-spinner"}),e("span",{children:"Loading..."})]}),t("ul",{className:"ihub-pagination-list",children:[t("div",{className:"ihub-pagination-nav-group",children:[R&&e("li",{className:"ihub-pagination-item ".concat(ta?"ihub-pagination-disabled":""),children:e(c,{href:"?offset=0",className:"ihub-pagination-link ihub-pagination-first","aria-label":"Go to first page",tabIndex:ta?-1:0,children:"First"})}),e("li",{className:"ihub-pagination-item ".concat(ta||null==g||!g.previous?"ihub-pagination-disabled":""),children:e(c,{href:"?offset=".concat($||0),className:"ihub-pagination-link ihub-pagination-previous","aria-label":"Go to previous page",tabIndex:ta||null==g||!g.previous?-1:0,children:e("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e("path",{d:"M7.66927 1.83333L3.08594 6.41667L7.66927 11L6.7526 12.8333L0.335938 6.41667L6.7526 0L7.66927 1.83333Z",fill:"currentColor"})})})})]}),e("div",{className:"ihub-pagination-pages",children:oa.map((function(a){var n=X===a,i=a+1;return e("li",{className:"ihub-pagination-item ".concat(n?"ihub-pagination-active":""),"data-page":i,children:e(c,{href:"?offset=".concat(a*f),className:"ihub-pagination-link ihub-pagination-number","aria-label":"Go to page ".concat(i),"aria-current":n?"page":void 0,children:i})},a)}))}),t("div",{className:"ihub-pagination-nav-group ".concat(null!=g&&g.next?"":"ihub-pagination-disabled"),children:[e("li",{className:"ihub-pagination-item ".concat(ea||null==g||!g.next?"ihub-pagination-disabled":""),children:e(c,{href:"?offset=".concat(Y||W),className:"ihub-pagination-link ihub-pagination-next","aria-label":"Go to next page",tabIndex:ea||null==g||!g.next?-1:0,children:e("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e("path",{d:"M0.330731 1.83333L4.91406 6.41667L0.330731 11L1.2474 12.8333L7.66406 6.41667L1.2474 0L0.330731 1.83333Z",fill:"currentColor"})})})}),R&&e("li",{className:"ihub-pagination-item ".concat(ea?"ihub-pagination-disabled":""),children:e(c,{href:"?offset=".concat((ia-1)*f),className:"ihub-pagination-link ihub-pagination-last","aria-label":"Go to last page",tabIndex:ea?-1:0,children:"Last"})})]})]}),e("div",{className:"ihub-pagination-info",children:t("span",{className:"ihub-pagination-summary",children:["Showing ",Math.min(W+1,(null==g?void 0:g.count)||0)," to"," ",Math.min(W+f,(null==g?void 0:g.count)||0)," of"," ",(null==g?void 0:g.count)||0," results"]})})]})};export{p as default};
2
2
  //# sourceMappingURL=Pagination.js.map
@@ -1,3 +1,29 @@
1
1
  import { NavbarPropsType } from "../../types";
2
- declare const ResponsiveNavbar: ({ session, logoSrc, logoAlt, navLinks, userAreaLinks, theme: initialTheme, containerClass, }: NavbarPropsType) => import("react/jsx-runtime").JSX.Element;
2
+ /**
3
+ * @example
4
+ * ```tsx
5
+ * <ResponsiveNavbar
6
+ * session={session}
7
+ * logoSrc="https://example.com/logo.png"
8
+ * logoAlt="Company Logo"
9
+ * navLinks={navLinks}
10
+ * userAreaLinks={userAreaLinks}
11
+ * theme="LightMode"
12
+ * containerClass="ihub-container"
13
+ * topBanner={<div>Top Banner</div>}
14
+ * />
15
+ * ```
16
+ * @param {SessionType} session - The session object
17
+ * @param {string} logoSrc - The source of the logo
18
+ * @param {string} logoAlt - The alt text of the logo
19
+ * @param {NavLinkType[]} navLinks - The navigation links
20
+ * @param {UserAreaLinkType[]} userAreaLinks - The user area links
21
+ * @param {string} theme - The theme of the navbar
22
+ * @param {string} containerClass - The class of the container
23
+ * @param {React.ReactNode | JSX.Element | null} topBanner - The top banner
24
+ * @param {React.ReactNode | JSX.Element | null} bottomBanner - The bottom banner
25
+ * @param {boolean} hideTopBanner - Whether to hide the top banner
26
+ * @param {boolean} hideBottomBanner - Whether to hide the bottom banner
27
+ * */
28
+ declare const ResponsiveNavbar: ({ session, logoSrc, logoAlt, navLinks, userAreaLinks, theme: initialTheme, containerClass, topBanner, bottomBanner, hideTopBanner, hideBottomBanner, }: NavbarPropsType) => import("react/jsx-runtime").JSX.Element;
3
29
  export default ResponsiveNavbar;
@@ -240,6 +240,10 @@ export interface NavbarPropsType {
240
240
  userAreaLinks?: UserAreaLinkType[];
241
241
  theme?: "LightMode" | "DarkMode";
242
242
  containerClass?: string;
243
+ topBanner?: React.ReactNode | JSX.Element | null;
244
+ hideTopBanner?: boolean;
245
+ bottomBanner?: React.ReactNode | JSX.Element | null;
246
+ hideBottomBanner?: boolean;
243
247
  }
244
248
  export interface LoginFormPropsType {
245
249
  params?: SearchParamsType;