@aic-kits/react 0.12.1 → 0.12.2
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -202,7 +202,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[ci]+=1);const ws=n=>({none:0,
|
|
|
202
202
|
&:hover {
|
|
203
203
|
color: ${({theme:n,$themeHoverColor:o})=>n.colors[o]};
|
|
204
204
|
}
|
|
205
|
-
`,nf=({label:n,isActive:o,onClick:i,size:u="large"})=>{const d=le().__hd__.header.navItem,p=o?d.active:d.inactive;return w.jsx(nn,{onClick:i,children:w.jsx(Q_,{$themeFontWeight:p.fontWeight,$themeFontSize:d[u].fontSize,$themeColor:p.color,$themeHoverColor:d.hover.color,children:n})})};function ev({userProfile:n,dropdownItems:o,maxHeight:i},u){const c=le(),d=c.__hd__.header.profileDropdown,[p,y]=b.useState(!1),v=b.useRef(null),A=b.useRef(null),I=ke.isString(d.minWidth)&&gr(d.minWidth)?c.sizes[d.minWidth]:d.minWidth,T=ke.isString(i)&&gr(i)?c.sizes[i]:i||d.defaultMaxHeight,$=()=>{v.current&&clearTimeout(v.current),A.current&&clearTimeout(A.current)},O=(L=()=>{})=>{$(),y(!0),v.current=setTimeout(L,d.animationDuration)},D=(L=()=>{})=>{$(),y(!1),A.current=setTimeout(L,d.animationDuration)};return b.useImperativeHandle(u,()=>({showDropdown:O,hideDropdown:D})),w.jsx(G,{position:"absolute",top:d.offset.top,right:d.offset.right,minWidth:I,paddingTop:d.containerPaddingTop,paddingRight:d.containerPaddingRight,zIndex:1e3,onMouseEnter:()=>O(),onMouseLeave:()=>D(),opacity:p?1:0,maxHeight:p?T:0,overflow:"hidden",transition:`opacity ${d.animationDuration}ms ease-in-out, max-height ${d.animationDuration}ms ease-in-out`,children:w.jsxs(G,{backgroundColor:d.backgroundColor,borderWidth:d.borderWidth,borderColor:d.borderColor,borderRadius:d.borderRadius,padding:d.contentPadding,display:"flex",flexDirection:"column",gap:d.itemSpacing,children:[n!=null&&n.name?w.jsx(G,{paddingBottom:"sm",children:w.jsx(jt,{children:n.name})}):w.jsx(G,{paddingBottom:"sm",children:w.jsx(jt,{children:n==null?void 0:n.email})}),w.jsx(tf,{marginY:"md"}),o==null?void 0:o.map(L=>w.jsx(nf,{label:L.label,onClick:L.onClick,isActive:L.isActive,size:"medium"},L.label))]})})}const tv=b.forwardRef(ev),rf=({isSignedIn:n=!1,isDropdownVisible:o,setIsDropdownVisible:i,userProfile:u,dropdownItems:c,onProfileClick:d,onSignInClick:p,onRegisterClick:y})=>{var O;const v=le(),A=nt(v,v.__hd__.header.avatarSize||"md"),I=b.useRef(null),T=()=>{var D;i(!0),(D=I.current)==null||D.showDropdown()},$=()=>{var D;(D=I.current)==null||D.hideDropdown(()=>{i(!1)})};return b.useEffect(()=>{o?T():$()},[o]),w.jsxs(G,{display:"flex",flexDirection:"row",alignItems:"center",children:[n?w.jsx(nn,{onClick:d,children:w.jsxs(G,{display:"flex",flexDirection:"row",alignItems:"center",p:"sm",r:"full",bgColor:"grey100",onMouseEnter:T,onMouseLeave:$,children:[u!=null&&u.avatar?w.jsx(Nn,{type:"image",art:u.avatar,width:A,height:A,r:"full",overflow:"hidden"}):w.jsx(G,{width:A,height:A,r:"full",bgColor:"grey400",display:"flex",justifyContent:"center",alignItems:"center",children:w.jsx(jt,{color:"white",fontSize:"small",fontWeight:"semibold",children:((O=u==null?void 0:u.name)==null?void 0:O.charAt(0))||"U"})}),(u==null?void 0:u.name)&&w.jsx(G,{ml:"sm",children:w.jsx(jt,{fontWeight:"medium",children:u.name})})]})}):w.jsxs(w.Fragment,{children:[w.jsx(G,{mr:"md",children:w.jsx(hs,{text:"Sign in",variant:"text",color:"black",onClick:p})}),w.jsx(hs,{text:"Register",color:"primary",corner:"rounded",onClick:y})]}),w.jsx(tv,{ref:I,userProfile:u,dropdownItems:c})]})},nv="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",of=({onLogoClick:n})=>w.jsx(G,{children:w.jsx(nn,{onClick:n,children:w.jsx(Nn,{art:nv,type:"svg",width:"lg",height:"lg"})})}),sf=({navItems:n=[]})=>w.jsx(G,{display:"flex",flexDirection:"row",justifyContent:"center",flex:1,mx:"xl",gap:"lg",children:n.map((o,i)=>w.jsx(nf,{...o},`nav-item-${i}`))});function rv({backgroundColor:n="white",navItems:o=[],isSignedIn:i=!1,userProfile:u,profileDropdownItems:c,onLogoClick:d,onNavItemClick:p,onSignInClick:y,onRegisterClick:v,onProfileClick:A,...I},T){const[$,O]=b.useState(!1);return b.useImperativeHandle(T,()=>({showDropdown:()=>O(!0),hideDropdown:()=>O(!1)})),w.jsxs(G,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",p:"md",bgColor:n,...I,children:[w.jsx(of,{onLogoClick:d}),w.jsx(sf,{navItems:o,onNavItemClick:p}),w.jsx(rf,{isSignedIn:i,isDropdownVisible:$,setIsDropdownVisible:O,userProfile:u,dropdownItems:c,onSignInClick:y,onRegisterClick:v,onProfileClick:A})]})}const af=b.forwardRef(rv),iv=(n,o,i)=>{let u={};return n?o==="padded"?(u.maxWidth=void 0,u.px=i.desktopPaddingX):(u.maxWidth=i.desktopContentMaxWidth,u.px=i.mobilePaddingX):(u.maxWidth=void 0,u.px=i.mobilePaddingX),u},ov=(n,o)=>{const i={};return n&&o==="maxWidth"&&(i.marginLeft="auto",i.marginRight="auto"),i},sv=({children:n,backgroundColor:o="white",header:i,contentLayoutMode:u="maxWidth",style:c,...d})=>{const y=le().__hd__.base,v=j_(y.desktopMediaQuery),A=b.useMemo(()=>iv(v,u,y),[v,u,y]),I=b.useMemo(()=>ov(v,u),[v,u]);return w.jsxs(G,{display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative",bgColor:o,style:c,...d,children:[i&&w.jsx(af,{...i}),w.jsx(G,{flex:1,overflow:"visible",position:"relative",width:"100%",...A,style:I,children:n})]})},av=ge.div`
|
|
205
|
+
`,nf=({label:n,isActive:o,onClick:i,size:u="large"})=>{const d=le().__hd__.header.navItem,p=o?d.active:d.inactive;return w.jsx(nn,{onClick:i,children:w.jsx(Q_,{$themeFontWeight:p.fontWeight,$themeFontSize:d[u].fontSize,$themeColor:p.color,$themeHoverColor:d.hover.color,children:n})})};function ev({userProfile:n,dropdownItems:o,maxHeight:i},u){const c=le(),d=c.__hd__.header.profileDropdown,[p,y]=b.useState(!1),v=b.useRef(null),A=b.useRef(null),I=ke.isString(d.minWidth)&&gr(d.minWidth)?c.sizes[d.minWidth]:d.minWidth,T=ke.isString(i)&&gr(i)?c.sizes[i]:i||d.defaultMaxHeight,$=()=>{v.current&&clearTimeout(v.current),A.current&&clearTimeout(A.current)},O=(L=()=>{})=>{$(),y(!0),v.current=setTimeout(L,d.animationDuration)},D=(L=()=>{})=>{$(),y(!1),A.current=setTimeout(L,d.animationDuration)};return b.useImperativeHandle(u,()=>({showDropdown:O,hideDropdown:D})),w.jsx(G,{position:"absolute",top:d.offset.top,right:d.offset.right,minWidth:I,paddingTop:d.containerPaddingTop,paddingRight:d.containerPaddingRight,zIndex:1e3,onMouseEnter:()=>O(),onMouseLeave:()=>D(),opacity:p?1:0,maxHeight:p?T:0,overflow:"hidden",transition:`opacity ${d.animationDuration}ms ease-in-out, max-height ${d.animationDuration}ms ease-in-out`,children:w.jsxs(G,{backgroundColor:d.backgroundColor,borderWidth:d.borderWidth,borderColor:d.borderColor,borderRadius:d.borderRadius,padding:d.contentPadding,display:"flex",flexDirection:"column",gap:d.itemSpacing,children:[n!=null&&n.name?w.jsx(G,{paddingBottom:"sm",children:w.jsx(jt,{children:n.name})}):w.jsx(G,{paddingBottom:"sm",children:w.jsx(jt,{children:n==null?void 0:n.email})}),w.jsx(tf,{marginY:"md"}),o==null?void 0:o.map(L=>w.jsx(nf,{label:L.label,onClick:L.onClick,isActive:L.isActive,size:"medium"},L.label))]})})}const tv=b.forwardRef(ev),rf=({isSignedIn:n=!1,isDropdownVisible:o,setIsDropdownVisible:i,userProfile:u,dropdownItems:c,onProfileClick:d,onSignInClick:p,onRegisterClick:y})=>{var O;const v=le(),A=nt(v,v.__hd__.header.avatarSize||"md"),I=b.useRef(null),T=()=>{var D;i(!0),(D=I.current)==null||D.showDropdown()},$=()=>{var D;(D=I.current)==null||D.hideDropdown(()=>{i(!1)})};return b.useEffect(()=>{o?T():$()},[o]),w.jsxs(G,{display:"flex",flexDirection:"row",alignItems:"center",children:[n?w.jsx(nn,{onClick:d,children:w.jsxs(G,{display:"flex",flexDirection:"row",alignItems:"center",p:"sm",r:"full",bgColor:"grey100",onMouseEnter:T,onMouseLeave:$,children:[u!=null&&u.avatar?w.jsx(Nn,{type:"image",art:u.avatar,width:A,height:A,r:"full",overflow:"hidden"}):w.jsx(G,{width:A,height:A,r:"full",bgColor:"grey400",display:"flex",justifyContent:"center",alignItems:"center",children:w.jsx(jt,{color:"white",fontSize:"small",fontWeight:"semibold",children:((O=u==null?void 0:u.name)==null?void 0:O.charAt(0))||"U"})}),(u==null?void 0:u.name)&&w.jsx(G,{ml:"sm",children:w.jsx(jt,{fontWeight:"medium",children:u.name})})]})}):w.jsxs(w.Fragment,{children:[w.jsx(G,{mr:"md",children:w.jsx(hs,{text:"Sign in",variant:"text",color:"black",onClick:p})}),w.jsx(hs,{text:"Register",color:"primary",corner:"rounded",onClick:y})]}),n&&w.jsx(tv,{ref:I,userProfile:u,dropdownItems:c})]})},nv="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",of=({onLogoClick:n})=>w.jsx(G,{children:w.jsx(nn,{onClick:n,children:w.jsx(Nn,{art:nv,type:"svg",width:"lg",height:"lg"})})}),sf=({navItems:n=[]})=>w.jsx(G,{display:"flex",flexDirection:"row",justifyContent:"center",flex:1,mx:"xl",gap:"lg",children:n.map((o,i)=>w.jsx(nf,{...o},`nav-item-${i}`))});function rv({backgroundColor:n="white",navItems:o=[],isSignedIn:i=!1,userProfile:u,profileDropdownItems:c,onLogoClick:d,onNavItemClick:p,onSignInClick:y,onRegisterClick:v,onProfileClick:A,...I},T){const[$,O]=b.useState(!1);return b.useImperativeHandle(T,()=>({showDropdown:()=>O(!0),hideDropdown:()=>O(!1)})),w.jsxs(G,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",p:"md",bgColor:n,...I,children:[w.jsx(of,{onLogoClick:d}),w.jsx(sf,{navItems:o,onNavItemClick:p}),w.jsx(rf,{isSignedIn:i,isDropdownVisible:$,setIsDropdownVisible:O,userProfile:u,dropdownItems:c,onSignInClick:y,onRegisterClick:v,onProfileClick:A})]})}const af=b.forwardRef(rv),iv=(n,o,i)=>{let u={};return n?o==="padded"?(u.maxWidth=void 0,u.px=i.desktopPaddingX):(u.maxWidth=i.desktopContentMaxWidth,u.px=i.mobilePaddingX):(u.maxWidth=void 0,u.px=i.mobilePaddingX),u},ov=(n,o)=>{const i={};return n&&o==="maxWidth"&&(i.marginLeft="auto",i.marginRight="auto"),i},sv=({children:n,backgroundColor:o="white",header:i,contentLayoutMode:u="maxWidth",style:c,...d})=>{const y=le().__hd__.base,v=j_(y.desktopMediaQuery),A=b.useMemo(()=>iv(v,u,y),[v,u,y]),I=b.useMemo(()=>ov(v,u),[v,u]);return w.jsxs(G,{display:"flex",flexDirection:"column",width:"100%",height:"100%",position:"relative",bgColor:o,style:c,...d,children:[i&&w.jsx(af,{...i}),w.jsx(G,{flex:1,overflow:"visible",position:"relative",width:"100%",...A,style:I,children:n})]})},av=ge.div`
|
|
206
206
|
display: flex;
|
|
207
207
|
flex-direction: row;
|
|
208
208
|
align-items: center;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aic-kits/react",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"vite-plugin-dts": "^4.3.0",
|
|
47
47
|
"vitest": "^2.1.8"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "400f7d88e0d94fabe17f8986940b610448532a35"
|
|
50
50
|
}
|