@aic-kits/react 0.28.4 → 0.28.6

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
@@ -205,7 +205,7 @@ function print() { __p += __j.call(arguments, '') }
205
205
  opacity: 0;
206
206
  `}
207
207
  white-space: nowrap;
208
- `,pa=({label:n,isActive:o,isLoading:i,dropdownItems:s=[],onClick:l,size:c="large",isDropdownOpen:d=!1,isDropdownItem:g=!1,onMouseEnter:v,paddingX:m,paddingY:_})=>{const $=ue().__hd__.header,E=$.navItem,T=o?E.active:E.inactive,P=h.useMemo(()=>g?"transparent":d?T.hoverBackgroundColor:T.backgroundColor,[g,d,T.backgroundColor,T.hoverBackgroundColor]);return b.jsxs(Mc,{onClick:l,onMouseEnter:v,$themeBackgroundColor:P,$themeBoxShadow:!g&&d?T.hoverBoxShadow:"none",$themeHoverBackgroundColor:g?"transparent":T.hoverBackgroundColor,$themeHoverBoxShadow:g?"none":T.hoverBoxShadow,$themeHoverColor:E.active.backgroundColor,$themeRadius:E.radius,$themePaddingX:m??E.paddingX,$themePaddingY:_??E.paddingY,$gap:$.loadingGap,children:[b.jsx(N,{display:"flex",justifyContent:"start",flex:1,children:b.jsx(yu,{$themeFontWeight:T.fontWeight,$themeFontSize:E[c].fontSize,$themeColor:T.color,$themeHoverColor:E.hover.color,$isLoading:i??!1,children:n})}),(s.length>0||d)&&b.jsxs(yu,{$themeFontWeight:T.fontWeight,$themeFontSize:E[c].fontSize,$themeColor:T.color,$themeHoverColor:E.hover.color,$isLoading:i??!1,$isDropdownOpen:d,$isDropdownItem:g,children:[s.length>0&&b.jsx(ua,{size:16,weight:"bold"}),g&&b.jsx(gr,{rotate:45,size:16,weight:"bold"})]}),b.jsx(N,{display:"flex",alignItems:"center",justifyContent:"center",absoluteFill:!0,opacity:i?1:0,transition:"opacity 0.2s ease-in-out",children:b.jsx(da,{size:E[c].loadingSize,color:T.color})})]})};function n3({userProfile:n,dropdownItems:o,maxHeight:i},s){const l=ue(),c=l.__hd__.header.profileDropdown,[d,g]=h.useState(!1),v=h.useRef(null),m=h.useRef(null),_=pe.isString(c.minWidth)&&En(c.minWidth)?l.sizes[c.minWidth]:c.minWidth,S=pe.isString(i)&&En(i)?l.sizes[i]:i||c.defaultMaxHeight,$=()=>{v.current&&clearTimeout(v.current),m.current&&clearTimeout(m.current)},E=(P=()=>{})=>{$(),g(!0),v.current=setTimeout(P,c.animationDuration)},T=(P=()=>{})=>{$(),g(!1),m.current=setTimeout(P,c.animationDuration)};return h.useImperativeHandle(s,()=>({showDropdown:E,hideDropdown:T})),b.jsx(N,{position:"absolute",top:c.offset.top,right:c.offset.right,minWidth:_,zIndex:d?1e3:-1,opacity:d?1:0,transition:`opacity ${c.animationDuration}ms ease-in-out, z-index ${c.animationDuration}ms ease-in-out`,onMouseEnter:()=>E(),onMouseLeave:()=>T(),children:b.jsxs(N,{overflow:"hidden",mt:c.spacingTop,mr:c.containerPaddingRight,padding:c.padding,backgroundColor:c.backgroundColor,boxShadow:c.boxShadow,maxHeight:d?S:0,transition:`max-height ${c.animationDuration}ms ease-in-out`,style:{borderRadius:c.borderRadius},display:"flex",flexDirection:"column",children:[n!=null&&n.name?b.jsx(N,{py:c.padding,ml:"md",children:b.jsx(We,{textAlign:"left",children:n.name})}):b.jsx(N,{py:c.padding,ml:"md",children:b.jsx(We,{textAlign:"left",children:n==null?void 0:n.email})}),b.jsx(N,{p:c.padding,children:b.jsx(Fc,{})}),o==null?void 0:o.map(P=>b.jsx(pa,{label:P.label,onClick:P.onClick,isActive:P.isActive,size:"medium",isDropdownItem:!0},P.label))]})})}const r3=h.forwardRef(n3),zc=({isSignedIn:n=!1,isDropdownVisible:o,setIsDropdownVisible:i,userProfile:s,dropdownItems:l,profileDropdownMaxHeight:c,onProfileClick:d,onSignInClick:g,onRegisterClick:v})=>{const _=ue().__hd__.header.avatarSize||"md",S=h.useRef(null),$=()=>{var T;i(!0),(T=S.current)==null||T.showDropdown()},E=()=>{var T;(T=S.current)==null||T.hideDropdown(()=>{i(!1)})};return h.useEffect(()=>{o?$():E()},[o]),b.jsxs(N,{display:"flex",flexDirection:"row",alignItems:"center",children:[n?b.jsx(Et,{onClick:d,children:b.jsxs(N,{display:"flex",flexDirection:"row",alignItems:"center",p:"sm",r:"full",bgColor:"grey100",onMouseEnter:$,onMouseLeave:E,children:[b.jsx(Lc,{src:s==null?void 0:s.avatar,name:s==null?void 0:s.name,size:_}),(s==null?void 0:s.name)&&b.jsx(N,{ml:"sm",children:b.jsx(We,{fontWeight:"medium",children:s.name})})]})}):b.jsxs(b.Fragment,{children:[b.jsx(N,{mr:"md",children:b.jsx(Xo,{text:"Sign in",variant:"text",color:"black",onClick:g})}),b.jsx(Xo,{text:"Register",color:"primary",corner:"rounded",onClick:v})]}),n&&b.jsx(r3,{ref:S,userProfile:s,dropdownItems:l,maxHeight:c})]})},i3="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='500'%20zoomAndPan='magnify'%20viewBox='0%200%20375%20374.999991'%20height='500'%20preserveAspectRatio='xMidYMid%20meet'%20version='1.0'%3e%3cdefs%3e%3cg%3e%3c/g%3e%3c/defs%3e%3cg%20fill='%230a1420'%20fill-opacity='1'%3e%3cg%20transform='translate(66.308093,%20231.512278)'%3e%3cg%3e%3cpath%20d='M%2095.3125%20-19.625%20L%2098.71875%20-19.625%20L%2098.71875%200%20C%2097.832031%200.375%2096.851562%200.71875%2095.78125%201.03125%20C%2094.71875%201.351562%2093.554688%201.515625%2092.296875%201.515625%20C%2087.265625%201.515625%2082.734375%200.351562%2078.703125%20-1.96875%20C%2074.679688%20-4.300781%2071.472656%20-7.421875%2069.078125%20-11.328125%20C%2066.054688%20-7.421875%2062.375%20-4.300781%2058.03125%20-1.96875%20C%2053.695312%200.351562%2048.757812%201.515625%2043.21875%201.515625%20C%2036.300781%201.515625%2030.007812%20-0.242188%2024.34375%20-3.765625%20C%2018.6875%20-7.296875%2014.1875%20-12.015625%2010.84375%20-17.921875%20C%207.507812%20-23.835938%205.84375%20-30.445312%205.84375%20-37.75%20C%205.84375%20-45.050781%207.507812%20-51.65625%2010.84375%20-57.5625%20C%2014.1875%20-63.476562%2018.6875%20-68.195312%2024.34375%20-71.71875%20C%2030.007812%20-75.25%2036.300781%20-77.015625%2043.21875%20-77.015625%20C%2047.625%20-77.015625%2051.617188%20-76.289062%2055.203125%20-74.84375%20C%2058.796875%20-73.394531%2061.972656%20-71.410156%2064.734375%20-68.890625%20L%2064.734375%20-75.5%20L%2088.71875%20-75.5%20L%2088.71875%20-26.984375%20C%2088.71875%20-23.835938%2089.40625%20-21.820312%2090.78125%20-20.9375%20C%2092.164062%20-20.0625%2093.675781%20-19.625%2095.3125%20-19.625%20Z%20M%2047.9375%20-19.8125%20C%2052.84375%20-19.8125%2057.054688%20-21.539062%2060.578125%20-25%20C%2064.109375%20-28.46875%2065.875%20-32.71875%2065.875%20-37.75%20C%2065.875%20-42.78125%2064.109375%20-47.023438%2060.578125%20-50.484375%20C%2057.054688%20-53.953125%2052.84375%20-55.6875%2047.9375%20-55.6875%20C%2042.90625%20-55.6875%2038.660156%20-53.953125%2035.203125%20-50.484375%20C%2031.742188%20-47.023438%2030.015625%20-42.78125%2030.015625%20-37.75%20C%2030.015625%20-32.71875%2031.742188%20-28.46875%2035.203125%20-25%20C%2038.660156%20-21.539062%2042.90625%20-19.8125%2047.9375%20-19.8125%20Z%20M%2047.9375%20-19.8125%20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20fill='%230a1420'%20fill-opacity='1'%3e%3cg%20transform='translate(167.850545,%20231.512278)'%3e%3cg%3e%3cpath%20d='M%2023.59375%20-88.140625%20C%2020.070312%20-88.140625%2016.988281%20-89.460938%2014.34375%20-92.109375%20C%2011.695312%20-94.753906%2010.375%20-97.835938%2010.375%20-101.359375%20C%2010.375%20-105.003906%2011.695312%20-108.117188%2014.34375%20-110.703125%20C%2016.988281%20-113.285156%2020.070312%20-114.578125%2023.59375%20-114.578125%20C%2027.238281%20-114.578125%2030.351562%20-113.285156%2032.9375%20-110.703125%20C%2035.519531%20-108.117188%2036.8125%20-105.003906%2036.8125%20-101.359375%20C%2036.8125%20-97.835938%2035.519531%20-94.753906%2032.9375%20-92.109375%20C%2030.351562%20-89.460938%2027.238281%20-88.140625%2023.59375%20-88.140625%20Z%20M%2011.515625%200%20L%2011.515625%20-75.5%20L%2035.484375%20-75.5%20L%2035.484375%200%20Z%20M%2011.515625%200%20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20fill='%230a1420'%20fill-opacity='1'%3e%3cg%20transform='translate(215.035693,%20231.512278)'%3e%3cg%3e%3cpath%20d='M%2047.9375%201.515625%20C%2039.507812%201.515625%2032.148438%20-0.179688%2025.859375%20-3.578125%20C%2019.566406%20-6.984375%2014.65625%20-11.640625%2011.125%20-17.546875%20C%207.601562%20-23.460938%205.84375%20-30.195312%205.84375%20-37.75%20C%205.84375%20-45.300781%207.601562%20-52.03125%2011.125%20-57.9375%20C%2014.65625%20-63.851562%2019.566406%20-68.507812%2025.859375%20-71.90625%20C%2032.148438%20-75.3125%2039.507812%20-77.015625%2047.9375%20-77.015625%20C%2059.269531%20-77.015625%2068.582031%20-74.023438%2075.875%20-68.046875%20C%2083.175781%20-62.066406%2087.644531%20-54.359375%2089.28125%20-44.921875%20L%2064.359375%20-44.921875%20C%2063.097656%20-48.191406%2061.019531%20-50.769531%2058.125%20-52.65625%20C%2055.238281%20-54.550781%2051.84375%20-55.5625%2047.9375%20-55.6875%20C%2042.78125%20-55.5625%2038.503906%20-53.828125%2035.109375%20-50.484375%20C%2031.710938%20-47.148438%2030.015625%20-42.90625%2030.015625%20-37.75%20C%2030.015625%20-32.71875%2031.710938%20-28.5%2035.109375%20-25.09375%20C%2038.503906%20-21.695312%2042.78125%20-19.9375%2047.9375%20-19.8125%20C%2051.84375%20-19.9375%2055.238281%20-20.972656%2058.125%20-22.921875%20C%2061.019531%20-24.878906%2063.097656%20-27.429688%2064.359375%20-30.578125%20L%2089.28125%20-30.578125%20C%2087.644531%20-21.140625%2083.175781%20-13.429688%2075.875%20-7.453125%20C%2068.582031%20-1.472656%2059.269531%201.515625%2047.9375%201.515625%20Z%20M%2047.9375%201.515625%20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Bc=({onLogoClick:n})=>b.jsx(N,{children:b.jsx(Et,{onClick:n,children:b.jsx(St,{art:i3,type:"svg",width:"lg",height:"lg"})})}),o3=({dropdownMaxHeight:n,dropdownMinWidth:o,isDropdownOpen:i=!1,dropdownItems:s=[]})=>{const l=ue(),c=l.__hd__.header.navDropdown,d=pe.isString(n)&&En(n)?l.sizes[n]:n||c.defaultMaxHeight,g=pe.isString(o)&&En(o)?l.sizes[o]:o||c.minWidth;return b.jsx(N,{position:"absolute",top:"100%",left:0,minWidth:g,zIndex:i?1e3:-1,opacity:i?1:0,transition:`z-index ${c.animationDuration}ms ease-in, opacity ${c.animationDuration}ms ease-in`,children:b.jsx(N,{overflow:"hidden",display:"flex",flexDirection:"column",mt:c.spacingTop,px:c.paddingX,py:c.paddingY,gap:c.gap,backgroundColor:c.backgroundColor,boxShadow:c.boxShadow,maxHeight:i?d:0,transition:`max-height ${c.animationDuration}ms ease-in`,style:{borderRadius:c.borderRadius},children:s.length>0&&s.map((v,m)=>b.jsx(pa,{isDropdownOpen:!0,isDropdownItem:!0,size:"medium",paddingX:"none",paddingY:"none",...v},`nav-dropdown-item-${m}`))})})},a3=ge.span`
208
+ `,pa=({label:n,isActive:o,isLoading:i,dropdownItems:s=[],onClick:l,size:c="large",isDropdownOpen:d=!1,isDropdownItem:g=!1,onMouseEnter:v,paddingX:m,paddingY:_})=>{const $=ue().__hd__.header,E=$.navItem,T=o?E.active:E.inactive,P=h.useMemo(()=>g?"transparent":d?T.hoverBackgroundColor:T.backgroundColor,[g,d,T.backgroundColor,T.hoverBackgroundColor]);return b.jsxs(Mc,{onClick:l,onMouseEnter:v,$themeBackgroundColor:P,$themeBoxShadow:!g&&d?T.hoverBoxShadow:"none",$themeHoverBackgroundColor:g?"transparent":T.hoverBackgroundColor,$themeHoverBoxShadow:g?"none":T.hoverBoxShadow,$themeHoverColor:E.active.backgroundColor,$themeRadius:E.radius,$themePaddingX:m??E.paddingX,$themePaddingY:_??E.paddingY,$gap:$.loadingGap,children:[b.jsx(N,{display:"flex",justifyContent:"start",flex:1,children:b.jsx(yu,{$themeFontWeight:T.fontWeight,$themeFontSize:E[c].fontSize,$themeColor:T.color,$themeHoverColor:E.hover.color,$isLoading:i??!1,children:n})}),(s.length>0||d)&&b.jsxs(yu,{$themeFontWeight:T.fontWeight,$themeFontSize:E[c].fontSize,$themeColor:T.color,$themeHoverColor:E.hover.color,$isLoading:i??!1,$isDropdownOpen:d,$isDropdownItem:g,children:[s.length>0&&b.jsx(ua,{size:16,weight:"bold"}),g&&b.jsx(gr,{rotate:45,size:16,weight:"bold"})]}),b.jsx(N,{display:"flex",alignItems:"center",justifyContent:"center",absoluteFill:!0,opacity:i?1:0,transition:"opacity 0.2s ease-in-out",children:b.jsx(da,{size:E[c].loadingSize,color:T.color})})]})};function n3({userProfile:n,dropdownItems:o,maxHeight:i},s){const l=ue(),c=l.__hd__.header.profileDropdown,[d,g]=h.useState(!1),v=h.useRef(null),m=h.useRef(null),_=pe.isString(c.minWidth)&&En(c.minWidth)?l.sizes[c.minWidth]:c.minWidth,S=pe.isString(i)&&En(i)?l.sizes[i]:i||c.defaultMaxHeight,$=()=>{v.current&&clearTimeout(v.current),m.current&&clearTimeout(m.current)},E=(P=()=>{})=>{$(),g(!0),v.current=setTimeout(P,c.animationDuration)},T=(P=()=>{})=>{$(),g(!1),m.current=setTimeout(P,c.animationDuration)};return h.useImperativeHandle(s,()=>({showDropdown:E,hideDropdown:T})),b.jsx(N,{position:"absolute",top:c.offset.top,right:c.offset.right,minWidth:_,zIndex:d?1e3:-1,opacity:d?1:0,transition:`opacity ${c.animationDuration}ms ease-in-out, z-index ${c.animationDuration}ms ease-in-out`,onMouseEnter:()=>E(),onMouseLeave:()=>T(),children:b.jsxs(N,{overflow:"hidden",mt:c.spacingTop,mr:c.containerPaddingRight,padding:c.padding,backgroundColor:c.backgroundColor,boxShadow:c.boxShadow,maxHeight:d?S:0,transition:`max-height ${c.animationDuration}ms ease-in-out`,style:{borderRadius:c.borderRadius},display:"flex",flexDirection:"column",children:[n!=null&&n.name?b.jsx(N,{py:c.padding,mx:"md",children:b.jsx(We,{textAlign:"left",children:n.name})}):b.jsx(N,{py:c.padding,mx:"md",children:b.jsx(We,{textAlign:"left",children:n==null?void 0:n.email})}),b.jsx(N,{p:c.padding,children:b.jsx(Fc,{})}),o==null?void 0:o.map(P=>b.jsx(pa,{label:P.label,onClick:P.onClick,isActive:P.isActive,size:"medium",isDropdownItem:!0},P.label))]})})}const r3=h.forwardRef(n3),zc=({isSignedIn:n=!1,isDropdownVisible:o,setIsDropdownVisible:i,userProfile:s,dropdownItems:l,profileDropdownMaxHeight:c,onProfileClick:d,onSignInClick:g,onRegisterClick:v})=>{const _=ue().__hd__.header.avatarSize||"md",S=h.useRef(null),$=()=>{var T;i(!0),(T=S.current)==null||T.showDropdown()},E=()=>{var T;(T=S.current)==null||T.hideDropdown(()=>{i(!1)})};return h.useEffect(()=>{o?$():E()},[o]),b.jsxs(N,{display:"flex",flexDirection:"row",alignItems:"center",children:[n?b.jsx(Et,{onClick:d,children:b.jsxs(N,{display:"flex",flexDirection:"row",alignItems:"center",p:"sm",r:"full",bgColor:"grey100",onMouseEnter:$,onMouseLeave:E,children:[b.jsx(Lc,{src:s==null?void 0:s.avatar,name:s==null?void 0:s.name,size:_}),(s==null?void 0:s.name)&&b.jsx(N,{ml:"sm",children:b.jsx(We,{fontWeight:"medium",children:s.name})})]})}):b.jsxs(b.Fragment,{children:[b.jsx(N,{mr:"md",children:b.jsx(Xo,{text:"Sign in",variant:"text",color:"black",onClick:g})}),b.jsx(Xo,{text:"Register",color:"primary",corner:"rounded",onClick:v})]}),n&&b.jsx(r3,{ref:S,userProfile:s,dropdownItems:l,maxHeight:c})]})},i3="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='500'%20zoomAndPan='magnify'%20viewBox='0%200%20375%20374.999991'%20height='500'%20preserveAspectRatio='xMidYMid%20meet'%20version='1.0'%3e%3cdefs%3e%3cg%3e%3c/g%3e%3c/defs%3e%3cg%20fill='%230a1420'%20fill-opacity='1'%3e%3cg%20transform='translate(66.308093,%20231.512278)'%3e%3cg%3e%3cpath%20d='M%2095.3125%20-19.625%20L%2098.71875%20-19.625%20L%2098.71875%200%20C%2097.832031%200.375%2096.851562%200.71875%2095.78125%201.03125%20C%2094.71875%201.351562%2093.554688%201.515625%2092.296875%201.515625%20C%2087.265625%201.515625%2082.734375%200.351562%2078.703125%20-1.96875%20C%2074.679688%20-4.300781%2071.472656%20-7.421875%2069.078125%20-11.328125%20C%2066.054688%20-7.421875%2062.375%20-4.300781%2058.03125%20-1.96875%20C%2053.695312%200.351562%2048.757812%201.515625%2043.21875%201.515625%20C%2036.300781%201.515625%2030.007812%20-0.242188%2024.34375%20-3.765625%20C%2018.6875%20-7.296875%2014.1875%20-12.015625%2010.84375%20-17.921875%20C%207.507812%20-23.835938%205.84375%20-30.445312%205.84375%20-37.75%20C%205.84375%20-45.050781%207.507812%20-51.65625%2010.84375%20-57.5625%20C%2014.1875%20-63.476562%2018.6875%20-68.195312%2024.34375%20-71.71875%20C%2030.007812%20-75.25%2036.300781%20-77.015625%2043.21875%20-77.015625%20C%2047.625%20-77.015625%2051.617188%20-76.289062%2055.203125%20-74.84375%20C%2058.796875%20-73.394531%2061.972656%20-71.410156%2064.734375%20-68.890625%20L%2064.734375%20-75.5%20L%2088.71875%20-75.5%20L%2088.71875%20-26.984375%20C%2088.71875%20-23.835938%2089.40625%20-21.820312%2090.78125%20-20.9375%20C%2092.164062%20-20.0625%2093.675781%20-19.625%2095.3125%20-19.625%20Z%20M%2047.9375%20-19.8125%20C%2052.84375%20-19.8125%2057.054688%20-21.539062%2060.578125%20-25%20C%2064.109375%20-28.46875%2065.875%20-32.71875%2065.875%20-37.75%20C%2065.875%20-42.78125%2064.109375%20-47.023438%2060.578125%20-50.484375%20C%2057.054688%20-53.953125%2052.84375%20-55.6875%2047.9375%20-55.6875%20C%2042.90625%20-55.6875%2038.660156%20-53.953125%2035.203125%20-50.484375%20C%2031.742188%20-47.023438%2030.015625%20-42.78125%2030.015625%20-37.75%20C%2030.015625%20-32.71875%2031.742188%20-28.46875%2035.203125%20-25%20C%2038.660156%20-21.539062%2042.90625%20-19.8125%2047.9375%20-19.8125%20Z%20M%2047.9375%20-19.8125%20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20fill='%230a1420'%20fill-opacity='1'%3e%3cg%20transform='translate(167.850545,%20231.512278)'%3e%3cg%3e%3cpath%20d='M%2023.59375%20-88.140625%20C%2020.070312%20-88.140625%2016.988281%20-89.460938%2014.34375%20-92.109375%20C%2011.695312%20-94.753906%2010.375%20-97.835938%2010.375%20-101.359375%20C%2010.375%20-105.003906%2011.695312%20-108.117188%2014.34375%20-110.703125%20C%2016.988281%20-113.285156%2020.070312%20-114.578125%2023.59375%20-114.578125%20C%2027.238281%20-114.578125%2030.351562%20-113.285156%2032.9375%20-110.703125%20C%2035.519531%20-108.117188%2036.8125%20-105.003906%2036.8125%20-101.359375%20C%2036.8125%20-97.835938%2035.519531%20-94.753906%2032.9375%20-92.109375%20C%2030.351562%20-89.460938%2027.238281%20-88.140625%2023.59375%20-88.140625%20Z%20M%2011.515625%200%20L%2011.515625%20-75.5%20L%2035.484375%20-75.5%20L%2035.484375%200%20Z%20M%2011.515625%200%20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20fill='%230a1420'%20fill-opacity='1'%3e%3cg%20transform='translate(215.035693,%20231.512278)'%3e%3cg%3e%3cpath%20d='M%2047.9375%201.515625%20C%2039.507812%201.515625%2032.148438%20-0.179688%2025.859375%20-3.578125%20C%2019.566406%20-6.984375%2014.65625%20-11.640625%2011.125%20-17.546875%20C%207.601562%20-23.460938%205.84375%20-30.195312%205.84375%20-37.75%20C%205.84375%20-45.300781%207.601562%20-52.03125%2011.125%20-57.9375%20C%2014.65625%20-63.851562%2019.566406%20-68.507812%2025.859375%20-71.90625%20C%2032.148438%20-75.3125%2039.507812%20-77.015625%2047.9375%20-77.015625%20C%2059.269531%20-77.015625%2068.582031%20-74.023438%2075.875%20-68.046875%20C%2083.175781%20-62.066406%2087.644531%20-54.359375%2089.28125%20-44.921875%20L%2064.359375%20-44.921875%20C%2063.097656%20-48.191406%2061.019531%20-50.769531%2058.125%20-52.65625%20C%2055.238281%20-54.550781%2051.84375%20-55.5625%2047.9375%20-55.6875%20C%2042.78125%20-55.5625%2038.503906%20-53.828125%2035.109375%20-50.484375%20C%2031.710938%20-47.148438%2030.015625%20-42.90625%2030.015625%20-37.75%20C%2030.015625%20-32.71875%2031.710938%20-28.5%2035.109375%20-25.09375%20C%2038.503906%20-21.695312%2042.78125%20-19.9375%2047.9375%20-19.8125%20C%2051.84375%20-19.9375%2055.238281%20-20.972656%2058.125%20-22.921875%20C%2061.019531%20-24.878906%2063.097656%20-27.429688%2064.359375%20-30.578125%20L%2089.28125%20-30.578125%20C%2087.644531%20-21.140625%2083.175781%20-13.429688%2075.875%20-7.453125%20C%2068.582031%20-1.472656%2059.269531%201.515625%2047.9375%201.515625%20Z%20M%2047.9375%201.515625%20'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Bc=({onLogoClick:n})=>b.jsx(N,{children:b.jsx(Et,{onClick:n,children:b.jsx(St,{art:i3,type:"svg",width:"lg",height:"lg"})})}),o3=({dropdownMaxHeight:n,dropdownMinWidth:o,isDropdownOpen:i=!1,dropdownItems:s=[]})=>{const l=ue(),c=l.__hd__.header.navDropdown,d=pe.isString(n)&&En(n)?l.sizes[n]:n||c.defaultMaxHeight,g=pe.isString(o)&&En(o)?l.sizes[o]:o||c.minWidth;return b.jsx(N,{position:"absolute",top:"100%",left:0,minWidth:g,zIndex:i?1e3:-1,opacity:i?1:0,transition:`z-index ${c.animationDuration}ms ease-in, opacity ${c.animationDuration}ms ease-in`,children:b.jsx(N,{overflow:"hidden",display:"flex",flexDirection:"column",mt:c.spacingTop,px:c.paddingX,py:c.paddingY,gap:c.gap,backgroundColor:c.backgroundColor,boxShadow:c.boxShadow,maxHeight:i?d:0,transition:`max-height ${c.animationDuration}ms ease-in`,style:{borderRadius:c.borderRadius},children:s.length>0&&s.map((v,m)=>b.jsx(pa,{isDropdownOpen:!0,isDropdownItem:!0,size:"medium",paddingX:"none",paddingY:"none",...v},`nav-dropdown-item-${m}`))})})},a3=ge.span`
209
209
  position: relative;
210
210
  `,s3=({item:n,index:o,openItemIndex:i,handleNavItemMouseEnter:s,handleNavItemMouseLeave:l})=>{var v,m;const[c,d]=h.useState(0),g=h.useRef(null);return h.useLayoutEffect(()=>{g.current&&d(g.current.offsetWidth)},[n]),b.jsxs(a3,{onMouseLeave:l,onMouseEnter:()=>s(n,o),children:[b.jsx(N,{ref:g,display:"inline-block",children:b.jsx(pa,{...n,isActive:i!==o&&(n.isActive||((v=n.dropdownItems)==null?void 0:v.some(_=>_.isActive)))||n.isActive,isLoading:i!==o&&(n.isLoading||((m=n.dropdownItems)==null?void 0:m.some(_=>_.isLoading)))||n.isLoading,isDropdownOpen:i===o})}),n.dropdownItems&&n.dropdownItems.length>0&&b.jsx(o3,{dropdownItems:n.dropdownItems,isDropdownOpen:i===o,dropdownMinWidth:c})]})},Wc=({navItems:n=[]})=>{const i=ue().__hd__.header,s=h.useRef(null),[l,c]=h.useState(!1),[d,g]=h.useState(!0),v=yi(),m=!dt()&&v==="xs",[_,S]=h.useState(null);h.useEffect(()=>{dt()||(c(!m),setTimeout(()=>{g(!1)},300))},[m]);const $=h.useDeferredValue(l),E=(P,B)=>{P.dropdownItems&&P.dropdownItems.length>0&&S(B)},T=()=>{S(null)};return b.jsx(fa,{display:"flex",visible:d,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:b.jsx(N,{ref:s,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((P,B)=>b.jsx(s3,{item:P,index:B,openItemIndex:_,handleNavItemMouseEnter:E,handleNavItemMouseLeave:T},`nav-item-wrapper-${B}`))})})};function l3({backgroundColor:n="white",navItems:o=[],isSignedIn:i=!1,userProfile:s,profileDropdownItems:l,profileDropdownMaxHeight:c,onLogoClick:d,onNavItemClick:g,onSignInClick:v,onRegisterClick:m,onProfileClick:_,...S},$){const[E,T]=h.useState(!1);return h.useImperativeHandle($,()=>({showDropdown:()=>T(!0),hideDropdown:()=>T(!1)})),b.jsxs(N,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",p:"md",bgColor:n,...S,children:[b.jsx(Bc,{onLogoClick:d}),b.jsx(Wc,{navItems:o,onNavItemClick:g}),b.jsx(zc,{isSignedIn:i,isDropdownVisible:E,setIsDropdownVisible:T,userProfile:s,dropdownItems:l,profileDropdownMaxHeight:c,onSignInClick:v,onRegisterClick:m,onProfileClick:_})]})}const jc=h.forwardRef(l3),u3=(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},c3=(n,o)=>{const i={};return n&&o==="maxWidth"&&(i.marginLeft="auto",i.marginRight="auto"),i},f3=({children:n,backgroundColor:o="white",header:i,contentLayoutMode:s="maxWidth",style:l,...c})=>{const g=ue().__hd__.base,v=yi(),m=dt()||v==="md"||v==="lg"||v==="xl",_=u3(m,s,g),S=c3(m,s);return b.jsxs(N,{display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative",bgColor:o,style:l,...c,children:[i&&b.jsx(jc,{...i}),b.jsx(N,{flex:1,overflow:"visible",position:"relative",width:"100%",..._,style:S,children:n})]})},d3=ge.div`
211
211
  display: flex;
@@ -454,7 +454,6 @@ function print() { __p += __j.call(arguments, '') }
454
454
  justify-content: center;
455
455
  `,Iv=ge(N)`
456
456
  z-index: 2001; // Ensure it's above the backdrop
457
- min-width: 300px; // Basic min-width
458
457
  max-height: 100vh; // Prevent overly tall modals
459
458
  overflow-y: auto;
460
459
  `,Fv=({open:n,onClose:o,children:i,"data-testid":s,...l})=>{if(!n)return null;const c=d=>{d.target===d.currentTarget&&(o==null||o())};return b.jsx(Ov,{onClick:c,"data-testid":s?`${s}-backdrop`:void 0,children:b.jsx(Iv,{"data-testid":s,children:b.jsx(N,{...l,children:i})})})},Mv=({children:n,description:o,placement:i,backgroundColor:s,color:l})=>{const d=ue().__hd__.tooltip,g=i??d.defaultPlacement,v=s??d.defaultBackgroundColor,m=l??d.defaultTextColor,_=h.useRef(null),S=xi(_),$=d.positioning.placements[g];return b.jsxs(N,{display:"inline-block",position:"relative",ref:_,children:[n,S&&b.jsx(N,{position:"absolute",bgColor:v,p:d.container.padding,r:d.container.borderRadius,boxShadow:d.container.shadow,zIndex:d.container.zIndex,width:"max-content",maxWidth:d.container.maxWidth,...$,children:b.jsx(We,{color:m,fontSize:d.text.fontSize,children:o})})]})};exports.Accordion=hv;exports.Art=St;exports.Avatar=Lc;exports.Base=f3;exports.Box=N;exports.Brand=yc;exports.Button=Xo;exports.Carousel=uv;exports.Checkbox=vv;exports.DEFAULT_VIMEO_CONFIG=Y3;exports.Divider=Fc;exports.Emoji=xc;exports.Grid=nf;exports.Header=jc;exports.HeaderAuth=zc;exports.HeaderLogo=Bc;exports.HeaderNav=Wc;exports.Icon=la;exports.Image=Pc;exports.Input=Dc;exports.List=v3;exports.Loading=da;exports.Modal=Fv;exports.Pagination=Tv;exports.PaginationItem=rf;exports.Progress=Lv;exports.RESPONSIVE_BREAKPOINTS=pr;exports.RESPONSIVE_BREAKPOINT_KEYS=fr;exports.SUPPORTED_RICH_TEXT_TAGS=Rc;exports.Select=xv;exports.SelectDropdownItem=Jc;exports.SelectInputDisplay=ef;exports.Skeleton=fa;exports.StyledBox=hc;exports.Svg=kc;exports.Tag=mv;exports.Text=We;exports.ThemeProvider=um;exports.Tooltip=Mv;exports.Touchable=Et;exports.VIMEO_HOST=Q3;exports.Vimeo=J3;exports.accordionTheme=Iu;exports.artTheme=Fu;exports.avatarTheme=Mu;exports.baseTheme=zu;exports.buttonTheme=Bu;exports.carouselTheme=Wu;exports.checkboxTheme=ju;exports.configKeys=fc;exports.css=Ye;exports.cssPropsKey=sc;exports.customBoxPropsConfig=lc;exports.customBoxPropsKey=sa;exports.defaultColorPalette=gi;exports.defaultGradientColorPalette=ku;exports.defaultScale=Xt;exports.defaultTheme=si;exports.dividerTheme=Du;exports.genBoxStyle=dc;exports.generateResponsiveStyles=aa;exports.getBorderWidths=Yo;exports.getComponentsTheme=ec;exports.getFontSizes=mi;exports.getFontWeights=ra;exports.getFonts=ta;exports.getGlobalTheme=J2;exports.getLineHeights=na;exports.getPaginationTheme=Uu;exports.getRadii=Qo;exports.getResponsiveValue=ic;exports.getSelectStyles=tf;exports.getShadows=Lu;exports.getSizeValue=Ve;exports.getSizes=Jo;exports.getSpaces=ea;exports.getTextColor=bi;exports.getTheme=tc;exports.getThemeValue=uc;exports.headerTheme=Hu;exports.inferResponsiveValues=rc;exports.inputTheme=Zu;exports.isBorderWidth=D2;exports.isColor=Pu;exports.isEmoji=pc;exports.isFontSize=Y2;exports.isFontWeight=Q2;exports.isGradientColor=H2;exports.isIcon=gc;exports.isImage=mc;exports.isRadius=Ru;exports.isResponsiveValue=vi;exports.isSSR=dt;exports.isShadow=K2;exports.isSize=En;exports.isSpace=Ou;exports.isSvg=vc;exports.keyframes=ia;exports.listTheme=Nu;exports.loadingTheme=Vu;exports.mapStylePropToThemeValue=cc;exports.populateResponsiveValue=oa;exports.progressTheme=Gu;exports.reduceResponsiveValue=oc;exports.selectTheme=qu;exports.shouldForwardProp=nc;exports.skeletonTheme=Xu;exports.styled=ge;exports.tagTheme=Ku;exports.tooltipTheme=Yu;exports.touchableTheme=Qu;exports.transformResponsiveValue=ft;exports.transposeObject=Go;exports.useEventListener=qo;exports.useHover=xi;exports.useIsomorphicLayoutEffect=Ic;exports.useMediaQuery=q8;exports.useResponsiveBreakpoint=yi;exports.useSelectState=Qc;exports.useTheme=ue;exports.useWindowDimensions=Oc;exports.vimeoTheme=Ju;
package/dist/index.js CHANGED
@@ -6856,7 +6856,7 @@ function n3({
6856
6856
  display: "flex",
6857
6857
  flexDirection: "column",
6858
6858
  children: [
6859
- n != null && n.name ? /* @__PURE__ */ C(V, { py: c.padding, ml: "md", children: /* @__PURE__ */ C(Ue, { textAlign: "left", children: n.name }) }) : /* @__PURE__ */ C(V, { py: c.padding, ml: "md", children: /* @__PURE__ */ C(Ue, { textAlign: "left", children: n == null ? void 0 : n.email }) }),
6859
+ n != null && n.name ? /* @__PURE__ */ C(V, { py: c.padding, mx: "md", children: /* @__PURE__ */ C(Ue, { textAlign: "left", children: n.name }) }) : /* @__PURE__ */ C(V, { py: c.padding, mx: "md", children: /* @__PURE__ */ C(Ue, { textAlign: "left", children: n == null ? void 0 : n.email }) }),
6860
6860
  /* @__PURE__ */ C(V, { p: c.padding, children: /* @__PURE__ */ C(t3, {}) }),
6861
6861
  o == null ? void 0 : o.map((L) => /* @__PURE__ */ C(
6862
6862
  aa,
@@ -11868,7 +11868,6 @@ const bi = ge(Dt)`
11868
11868
  justify-content: center;
11869
11869
  `, O6 = ge(V)`
11870
11870
  z-index: 2001; // Ensure it's above the backdrop
11871
- min-width: 300px; // Basic min-width
11872
11871
  max-height: 100vh; // Prevent overly tall modals
11873
11872
  overflow-y: auto;
11874
11873
  `, iv = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aic-kits/react",
3
- "version": "0.28.4",
3
+ "version": "0.28.6",
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": "99505863cec52160ddd6eddf41944e3070019da7"
56
+ "gitHead": "99283e43e8b0afaef560428ee4a464daff003ba4"
57
57
  }