@aic-kits/react 0.26.3 → 0.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -214,7 +214,7 @@ function print() { __p += __j.call(arguments, '') }
214
214
  z-index: ${({$themeZIndex:n,$isOpen:o})=>o?n:-1};
215
215
 
216
216
  opacity: ${({$isOpen:n})=>n?1:0};
217
- transition: opacity 0.2s ease-in-out, z-index 0.2s ease-in-out, max-height ease-in-out;
217
+ transition: opacity 0.2s ease-in-out, z-index 0.2s ease-in-out, max-height 0.2s ease-in-out;
218
218
  `,m3=({dropdownMaxHeight:n,dropdownItems:o=[],isDropdownOpen:i=!1,...s})=>{const l=ce(),c=l.__hd__.header.navDropdown,p=ge.isString(n)&&Vn(n)?l.sizes[n]:n||c.defaultMaxHeight;return x.jsxs(g3,{$themeBackgroundColor:c.backgroundColor,$themeRadius:c.borderRadius,$themeMaxHeight:p,$themeZIndex:c.zIndex,$isOpen:i,"data-testid":"nav-dropdown-menu",children:[x.jsx(fi,{isDropdownOpen:!0,...s}),o.length>0&&o.map((g,m)=>x.jsx(fi,{isDropdownOpen:!0,isDropdownItem:!0,...g},`nav-dropdown-item-${m}`))]})},v3=de.span`
219
219
  position: relative;
220
220
  `,Dc=({navItems:n=[]})=>{const i=ce().__hd__.header,[s,l]=d.useState(!1),[c,p]=d.useState(!0),g=bi(),m=!dt()&&g==="xs",[v,S]=d.useState(null);d.useEffect(()=>{dt()||(l(!m),setTimeout(()=>{p(!1)},300))},[m]);const _=d.useDeferredValue(s),E=(A,P)=>{A.dropdownItems&&A.dropdownItems.length>0&&S(P)},$=()=>{S(null)};return x.jsx(fa,{display:"flex",visible:c,maxWidth:_?"100%":"0px",maxHeight:_?"100%":"0px",opacity:_?1:0,variant:"transparent",transition:"max-width 0.3s ease-in-out, opacity 0.3s ease-in-out",r:"lg",py:"sm",children:x.jsx(U,{display:"flex",flexDirection:"row",justifyContent:"center",flex:1,mx:"xl",gap:i.navItem.gap,p:i.padding,r:i.radius,bgColor:i.backgroundColor,children:n.map((A,P)=>{var B;return x.jsxs(v3,{onMouseLeave:$,children:[x.jsx(fi,{...A,isActive:A.isActive||((B=A.dropdownItems)==null?void 0:B.some(N=>N.isActive)),onMouseEnter:()=>E(A,P)}),A.dropdownItems&&A.dropdownItems.length>0&&x.jsx(m3,{...A,isDropdownOpen:v===P})]},`nav-item-wrapper-${P}`)})})})};function y3({backgroundColor:n="white",navItems:o=[],isSignedIn:i=!1,userProfile:s,profileDropdownItems:l,profileDropdownMaxHeight:c,onLogoClick:p,onNavItemClick:g,onSignInClick:m,onRegisterClick:v,onProfileClick:S,..._},E){const[$,A]=d.useState(!1);return d.useImperativeHandle(E,()=>({showDropdown:()=>A(!0),hideDropdown:()=>A(!1)})),x.jsxs(U,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",p:"md",bgColor:n,..._,children:[x.jsx(Wc,{onLogoClick:p}),x.jsx(Dc,{navItems:o,onNavItemClick:g}),x.jsx(jc,{isSignedIn:i,isDropdownVisible:$,setIsDropdownVisible:A,userProfile:s,dropdownItems:l,profileDropdownMaxHeight:c,onSignInClick:m,onRegisterClick:v,onProfileClick:S})]})}const Hc=d.forwardRef(y3),b3=(n,o,i)=>{let s={};return n?o==="padded"?(s.maxWidth=void 0,s.px=i.desktopPaddingX):(s.maxWidth=i.desktopContentMaxWidth,s.px=i.mobilePaddingX):(s.maxWidth=void 0,s.px=i.mobilePaddingX),s},x3=(n,o)=>{const i={};return n&&o==="maxWidth"&&(i.marginLeft="auto",i.marginRight="auto"),i},w3=({children:n,backgroundColor:o="white",header:i,contentLayoutMode:s="maxWidth",style:l,...c})=>{const g=ce().__hd__.base,m=bi(),v=dt()||m==="md"||m==="lg"||m==="xl",S=b3(v,s,g),_=x3(v,s);return x.jsxs(U,{display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative",bgColor:o,style:l,...c,children:[i&&x.jsx(Hc,{...i}),x.jsx(U,{flex:1,overflow:"visible",position:"relative",width:"100%",...S,style:_,children:n})]})},_3=de.div`
package/dist/index.js CHANGED
@@ -6930,7 +6930,7 @@ const h3 = Ne(d3), p3 = ({
6930
6930
  z-index: ${({ $themeZIndex: n, $isOpen: o }) => o ? n : -1};
6931
6931
 
6932
6932
  opacity: ${({ $isOpen: n }) => n ? 1 : 0};
6933
- transition: opacity 0.2s ease-in-out, z-index 0.2s ease-in-out, max-height ease-in-out;
6933
+ transition: opacity 0.2s ease-in-out, z-index 0.2s ease-in-out, max-height 0.2s ease-in-out;
6934
6934
  `, y3 = ({
6935
6935
  dropdownMaxHeight: n,
6936
6936
  dropdownItems: o = [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aic-kits/react",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -53,5 +53,5 @@
53
53
  "vite-plugin-dts": "^4.3.0",
54
54
  "vitest": "^2.1.8"
55
55
  },
56
- "gitHead": "59ba79e007209391bcf1b1a8b43b53104ed3a7e3"
56
+ "gitHead": "22c42f9b0b05d61750cbc8844fab28ada0b0510a"
57
57
  }