@aic-kits/react 0.26.2 → 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 +2 -2
- package/dist/index.js +1 -3
- package/package.json +2 -2
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`
|
|
@@ -467,4 +467,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
467
467
|
min-width: 300px; // Basic min-width
|
|
468
468
|
max-height: 100vh; // Prevent overly tall modals
|
|
469
469
|
overflow-y: auto;
|
|
470
|
-
`,V6=({open:n,onClose:o,children:i,"data-testid":s,...l})=>{if(!n)return null;const c=p=>{p.target===p.currentTarget&&(o==null||o())};return x.jsx(Z6,{onClick:c,"data-testid":s?`${s}-backdrop`:void 0,children:x.jsx(N6,{"data-testid":s,children:x.jsx(U,{
|
|
470
|
+
`,V6=({open:n,onClose:o,children:i,"data-testid":s,...l})=>{if(!n)return null;const c=p=>{p.target===p.currentTarget&&(o==null||o())};return x.jsx(Z6,{onClick:c,"data-testid":s?`${s}-backdrop`:void 0,children:x.jsx(N6,{"data-testid":s,children:x.jsx(U,{...l,children:i})})})};exports.Accordion=C6;exports.Art=St;exports.Avatar=kc;exports.Base=w3;exports.Box=U;exports.Brand=bc;exports.Button=Ko;exports.Carousel=b6;exports.Checkbox=A6;exports.DEFAULT_VIMEO_CONFIG=s6;exports.Divider=zc;exports.Emoji=xc;exports.Grid=of;exports.Header=Hc;exports.HeaderAuth=jc;exports.HeaderLogo=Wc;exports.HeaderNav=Dc;exports.Icon=la;exports.Image=Lc;exports.Input=Zc;exports.List=A3;exports.Loading=ha;exports.Modal=V6;exports.Pagination=z6;exports.PaginationItem=af;exports.Progress=H6;exports.RESPONSIVE_BREAKPOINTS=pr;exports.RESPONSIVE_BREAKPOINT_KEYS=fr;exports.SUPPORTED_RICH_TEXT_TAGS=Oc;exports.Select=R6;exports.SelectDropdownItem=tf;exports.SelectInputDisplay=nf;exports.Skeleton=fa;exports.StyledBox=pc;exports.Svg=Ic;exports.Tag=$6;exports.Text=We;exports.ThemeProvider=fm;exports.Touchable=Et;exports.VIMEO_HOST=l6;exports.Vimeo=u6;exports.accordionTheme=Mu;exports.artTheme=zu;exports.avatarTheme=Bu;exports.baseTheme=ju;exports.buttonTheme=Wu;exports.carouselTheme=Du;exports.checkboxTheme=Hu;exports.configKeys=dc;exports.css=Ye;exports.cssPropsKey=lc;exports.customBoxPropsConfig=uc;exports.customBoxPropsKey=sa;exports.defaultColorPalette=gi;exports.defaultGradientColorPalette=Iu;exports.defaultScale=Xt;exports.defaultTheme=ai;exports.dividerTheme=Zu;exports.genBoxStyle=hc;exports.generateResponsiveStyles=aa;exports.getBorderWidths=Yo;exports.getComponentsTheme=tc;exports.getFontSizes=mi;exports.getFontWeights=ra;exports.getFonts=ta;exports.getGlobalTheme=tm;exports.getLineHeights=na;exports.getPaginationTheme=qu;exports.getRadii=Qo;exports.getResponsiveValue=oc;exports.getSelectStyles=rf;exports.getShadows=ku;exports.getSizeValue=Ve;exports.getSizes=Jo;exports.getSpaces=ea;exports.getTextColor=xi;exports.getTheme=nc;exports.getThemeValue=cc;exports.headerTheme=Nu;exports.inferResponsiveValues=ic;exports.inputTheme=Vu;exports.isBorderWidth=Z2;exports.isColor=Lu;exports.isEmoji=gc;exports.isFontSize=J2;exports.isFontWeight=em;exports.isGradientColor=N2;exports.isIcon=mc;exports.isImage=vc;exports.isRadius=Ou;exports.isResponsiveValue=vi;exports.isSSR=dt;exports.isShadow=Q2;exports.isSize=Vn;exports.isSpace=Fu;exports.isSvg=yc;exports.keyframes=ia;exports.listTheme=Uu;exports.loadingTheme=Gu;exports.mapStylePropToThemeValue=fc;exports.populateResponsiveValue=oa;exports.progressTheme=Ku;exports.reduceResponsiveValue=ac;exports.selectTheme=Xu;exports.shouldForwardProp=rc;exports.skeletonTheme=Yu;exports.styled=de;exports.tagTheme=Qu;exports.touchableTheme=Ju;exports.transformResponsiveValue=ft;exports.transposeObject=Go;exports.useEventListener=qo;exports.useHover=da;exports.useIsomorphicLayoutEffect=Mc;exports.useMediaQuery=i3;exports.useResponsiveBreakpoint=bi;exports.useSelectState=ef;exports.useTheme=ce;exports.useWindowDimensions=Fc;exports.vimeoTheme=ec;
|
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 = [],
|
|
@@ -11818,8 +11818,6 @@ const bi = pe(Wt)`
|
|
|
11818
11818
|
}, "data-testid": s ? `${s}-backdrop` : void 0, children: /* @__PURE__ */ E(N6, { "data-testid": s, children: /* @__PURE__ */ E(
|
|
11819
11819
|
j,
|
|
11820
11820
|
{
|
|
11821
|
-
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
11822
|
-
backgroundColor: "white",
|
|
11823
11821
|
...l,
|
|
11824
11822
|
children: i
|
|
11825
11823
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aic-kits/react",
|
|
3
|
-
"version": "0.26.
|
|
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": "
|
|
56
|
+
"gitHead": "22c42f9b0b05d61750cbc8844fab28ada0b0510a"
|
|
57
57
|
}
|