@zydon/common-csr 2.0.1 → 2.0.3

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.
@@ -1,6 +1,6 @@
1
1
  import { Theme, SxProps, CSSObject } from '@mui/material/styles';
2
- import { ButtonBaseProps } from '@mui/material/ButtonBase';
3
2
  import * as react from 'react';
3
+ import { ButtonBaseProps } from '@mui/material/ButtonBase';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { BoxProps } from '@mui/material/Box';
6
6
  import { CollapseProps } from '@mui/material/Collapse';
@@ -170,6 +170,9 @@ type NavItemBaseProps = {
170
170
  info?: string[] | React.ReactNode;
171
171
  };
172
172
  type NavItemProps = ButtonBaseProps & NavItemStateProps & NavItemBaseProps;
173
+ type NavItemButtonProps = ButtonBaseProps & NavItemStateProps & NavItemBaseProps & {
174
+ onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
175
+ };
173
176
  type NavListProps = {
174
177
  depth: number;
175
178
  cssVars?: CSSObject;
@@ -178,13 +181,31 @@ type NavListProps = {
178
181
  render?: NavItemBaseProps['render'];
179
182
  enabledRootRedirect?: NavItemStateProps['enabledRootRedirect'];
180
183
  };
184
+ type NavListButtonProps = {
185
+ depth: number;
186
+ cssVars?: CSSObject;
187
+ slotProps?: SlotProps;
188
+ data: NavItemBaseProps;
189
+ render?: NavItemBaseProps['render'];
190
+ enabledRootRedirect?: NavItemStateProps['enabledRootRedirect'];
191
+ onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
192
+ };
181
193
  type NavSubListProps = Omit<NavListProps, 'data'> & {
182
194
  data: NavItemBaseProps[];
183
195
  };
196
+ type NavButtonSubListProps = Omit<NavListProps, 'data'> & {
197
+ data: NavItemBaseProps[];
198
+ onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
199
+ };
184
200
  type NavGroupProps = Omit<NavListProps, 'data' | 'depth'> & {
185
201
  subheader?: string;
186
202
  items: NavItemBaseProps[];
187
203
  };
204
+ type NavButtonGroupProps = Omit<NavListProps, 'data' | 'depth'> & {
205
+ subheader?: string;
206
+ items: NavItemBaseProps[];
207
+ onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
208
+ };
188
209
  type NavSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
189
210
  sx?: SxProps<Theme>;
190
211
  data: {
@@ -192,32 +213,20 @@ type NavSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
192
213
  items: NavItemBaseProps[];
193
214
  }[];
194
215
  };
195
-
196
- type UseNavItemReturn = {
197
- subItem: boolean;
198
- rootItem: boolean;
199
- subDeepItem: boolean;
200
- baseProps: Record<string, any>;
201
- renderIcon: React.ReactNode;
202
- renderInfo: React.ReactNode;
203
- };
204
- type UseNavItemProps = {
205
- path: NavItemProps['path'];
206
- icon?: NavItemProps['icon'];
207
- info?: NavItemProps['info'];
208
- depth?: NavItemProps['depth'];
209
- render?: NavItemProps['render'];
210
- hasChild?: NavItemProps['hasChild'];
211
- externalLink?: NavItemProps['externalLink'];
212
- enabledRootRedirect?: NavItemProps['enabledRootRedirect'];
216
+ type NavButtonSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
217
+ sx?: SxProps<Theme>;
218
+ data: {
219
+ subheader?: string;
220
+ items: NavItemBaseProps[];
221
+ }[];
222
+ onNavigate(event: React.MouseEvent<HTMLButtonElement>, to: string): void;
213
223
  };
214
- declare function useNavItem({ path, icon, info, depth, render, hasChild, externalLink, enabledRootRedirect, }: UseNavItemProps): UseNavItemReturn;
215
224
 
216
- declare const NavItem$2: react.ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
225
+ declare const NavItem$3: react.ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
217
226
 
218
227
  declare function NavSectionHorizontal({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, }: NavSectionProps): react_jsx_runtime.JSX.Element;
219
228
 
220
- declare const NavItem$1: react.ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
229
+ declare const NavItem$2: react.ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
221
230
 
222
231
  declare const NavSectionMini: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, }: NavSectionProps) => react_jsx_runtime.JSX.Element;
223
232
 
@@ -274,8 +283,32 @@ declare function NavLi({ sx, children, disabled, ...other }: BoxProps & {
274
283
  }): react_jsx_runtime.JSX.Element;
275
284
  declare function NavUl({ children, sx, ...other }: BoxProps): react_jsx_runtime.JSX.Element;
276
285
 
277
- declare const NavItem: react.ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
286
+ type UseNavItemReturn = {
287
+ subItem: boolean;
288
+ rootItem: boolean;
289
+ subDeepItem: boolean;
290
+ baseProps: Record<string, any>;
291
+ renderIcon: React.ReactNode;
292
+ renderInfo: React.ReactNode;
293
+ };
294
+ type UseNavItemProps = {
295
+ path: NavItemProps['path'];
296
+ icon?: NavItemProps['icon'];
297
+ info?: NavItemProps['info'];
298
+ depth?: NavItemProps['depth'];
299
+ render?: NavItemProps['render'];
300
+ hasChild?: NavItemProps['hasChild'];
301
+ externalLink?: NavItemProps['externalLink'];
302
+ enabledRootRedirect?: NavItemProps['enabledRootRedirect'];
303
+ };
304
+ declare function useNavItem({ path, icon, info, depth, render, hasChild, externalLink, enabledRootRedirect, }: UseNavItemProps): UseNavItemReturn;
305
+
306
+ declare const NavItem$1: react.ForwardRefExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
278
307
 
279
308
  declare const NavSectionVertical: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, }: NavSectionProps) => react_jsx_runtime.JSX.Element;
280
309
 
281
- export { NavCollapse, NavGroupProps, NavItemBaseProps, NavItemProps, NavItemRenderProps, NavItemSlotProps, NavItemStateProps, NavLi, NavListProps, NavSectionHorizontal, NavItem$2 as NavSectionHorizontalItem, NavSectionMini, NavItem$1 as NavSectionMiniItem, NavSectionProps, NavSectionVertical, NavItem as NavSectionVerticalItem, NavSubListProps, NavUl, SlotProps, Subheader, UseNavItemProps, UseNavItemReturn, bulletColor, navSectionClasses, navSectionCssVars, sharedStyles, stateClasses, useNavItem };
310
+ declare const NavItem: react.ForwardRefExoticComponent<Omit<NavItemButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
311
+
312
+ declare const NavSectionVerticalWithButtons: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, onNavigate, }: NavButtonSectionProps) => react_jsx_runtime.JSX.Element;
313
+
314
+ export { NavButtonGroupProps, NavButtonSectionProps, NavButtonSubListProps, NavCollapse, NavGroupProps, NavItemBaseProps, NavItemButtonProps, NavItemProps, NavItemRenderProps, NavItemSlotProps, NavItemStateProps, NavLi, NavListButtonProps, NavListProps, NavSectionHorizontal, NavItem$3 as NavSectionHorizontalItem, NavSectionMini, NavItem$2 as NavSectionMiniItem, NavSectionProps, NavSectionVertical, NavItem as NavSectionVerticalButtonItem, NavItem$1 as NavSectionVerticalItem, NavSectionVerticalWithButtons, NavSubListProps, NavUl, SlotProps, Subheader, UseNavItemProps, UseNavItemReturn, bulletColor, navSectionClasses, navSectionCssVars, sharedStyles, stateClasses, useNavItem };
@@ -1,19 +1,19 @@
1
1
  import { stylesMode, paper, varAlpha } from '@zydon/common/theme/styles';
2
2
  import { forwardRef, cloneElement, useState, useCallback, useRef, useEffect, useMemo } from 'react';
3
- import { Link, useLocation } from 'react-router-dom';
4
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
- import T from '@mui/material/Box';
6
- import Se from '@mui/material/ButtonBase';
3
+ import U from '@mui/material/Box';
4
+ import Me from '@mui/material/ButtonBase';
7
5
  import { styled, useTheme } from '@mui/material/styles';
8
- import Le from '@mui/material/Tooltip';
9
- import oe from '@zydon/common/components/Icon';
10
- import be from '@mui/material/Collapse';
11
- import ge from '@mui/material/ListSubheader';
12
- import He from '@mui/material/Stack';
13
- import Ae from '@zydon/common/components/Scrollbar';
14
- import Be from '@mui/material/Paper';
15
- import ze from '@mui/material/Popover';
6
+ import Te from '@mui/material/Tooltip';
7
+ import me from '@zydon/common/components/Icon';
8
+ import Se from '@mui/material/Collapse';
9
+ import we from '@mui/material/ListSubheader';
10
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
+ import { Link, useLocation } from 'react-router-dom';
12
+ import Ye from '@mui/material/Stack';
13
+ import je from '@zydon/common/components/Scrollbar';
14
+ import Fe from '@mui/material/Paper';
15
+ import qe from '@mui/material/Popover';
16
16
 
17
- var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var X={dark:"#282F37",light:"#EDEFF2"};function V(e,r){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":o.primary.light,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...r==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function pe(e){let{shape:r,spacing:o}=e;return {...V(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${r.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":X.light,"--nav-bullet-dark-color":X.dark}}function ce(e){let{shape:r,spacing:o}=e;return {...V(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${r.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function ve(e){let{shape:r,spacing:o}=e;return {...V(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${r.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var P={mini:ce,vertical:pe,horizontal:ve};var Y=forwardRef(({href:e,...r},o)=>jsx(Link,{ref:o,to:e,...r}));function _({path:e,icon:r,info:o,depth:a,render:n,hasChild:s,externalLink:l,enabledRootRedirect:i}){let m=a===1,v=!m,c=Number(a)>2,f=s&&!i?{component:"div"}:l?{href:e,target:"_blank",rel:"noopener"}:{component:Y,href:e},d=null;r&&n?.navIcon&&typeof r=="string"?d=n?.navIcon[r]:d=r;let h=null;if(o&&n?.navInfo&&Array.isArray(o)){let[S,b]=o,K=n.navInfo(b)[S];h=K?cloneElement(K):null;}else h=o;return {subItem:v,rootItem:m,subDeepItem:c,baseProps:f,renderIcon:d,renderInfo:h}}function R({open:e,active:r,disabled:o}){let a=t.item.root;return r?a+=` ${t.state.active}`:e?a+=` ${t.state.open}`:o&&(a+=` ${t.state.disabled}`),a}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function j({sx:e,open:r,children:o,...a}){return jsxs(ge,{disableSticky:!0,component:"div",className:t.subheader,sx:{gap:1,cursor:"pointer",alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:n=>n.spacing(2,1,1,1.5),fontSize:n=>n.typography.pxToRem(11),transition:n=>n.transitions.create(["color","padding-left"],{duration:n.transitions.duration.standard}),"&:hover":{pl:2,color:"var(--nav-subheader-hover-color)"},...e},...a,children:[jsx(oe,{width:16,icon:r?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",sx:{left:-4,opacity:0,position:"absolute",transition:n=>n.transitions.create(["opacity"],{duration:n.transitions.duration.standard})}}),o]})}function ee({sx:e,depth:r,children:o,...a}){return jsx(be,{sx:{...r+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...a,children:o})}function g({sx:e,children:r,disabled:o,...a}){return jsx(T,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:r})}function x({children:e,sx:r,...o}){return jsx(T,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...r},...o,children:e})}var H=forwardRef(({path:e,icon:r,info:o,title:a,caption:n,open:s,depth:l,render:i,active:m,disabled:v,hasChild:c,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},S)=>{let b=_({path:e,icon:r,info:o,depth:l,render:i,hasChild:c,externalLink:f,enabledRootRedirect:d});return jsxs(Pe,{ref:S,"aria-label":a,depth:l,active:m,disabled:v,open:s&&!m,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:R({open:s&&!m,active:m,disabled:v}),...b.baseProps,...h,children:[r&&jsx(T,{component:"span",className:t.item.icon,children:b.renderIcon}),a&&jsx(T,{component:"span",className:t.item.title,children:a}),n&&jsx(Le,{title:n,arrow:!0,children:jsx(oe,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(T,{component:"span",className:t.item.info,children:b.renderInfo}),c&&jsx(oe,{icon:b.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Pe=styled(Se,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:r,disabled:o,depth:a,theme:n})=>{let s=a===1,l=!s,i={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...n.typography.body2,fontWeight:e?n.typography.fontWeightSemiBold:n.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...i.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...i.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...i.caption,marginLeft:n.spacing(.75)},[`& .${t.item.arrow}`]:{...i.arrow},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...r&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...l&&{...i.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:n.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...i.title,flexGrow:1},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow,marginRight:n.spacing(-.5)},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...r&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var te=e=>{let r=e.split("?")[1];return r?new URLSearchParams(r).toString().length>0:!1};function U(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function re(e){try{let r=new URL(e,window.location.origin);return U(r.pathname)}catch{return e}}function y(e){return e.startsWith("http")}function N(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function $(e,r=!0){let o=U(N()),a=te(e);if(e.startsWith("#")||y(e))return !1;if(r||a){let l=o.includes(e),i=re(e);return l||a&&i===o}return o===e}function A({data:e,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s}){let l=useTheme(),i=N(),m=useRef(null),v=$(e.path,!!e.children),[c,p]=useState(!1);useEffect(()=>{c&&d();},[i]);let f=useCallback(()=>{e.children&&p(!0);},[e.children]),d=useCallback(()=>{p(!1);},[]),h=jsx(H,{ref:m,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:r,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:y(e.path),enabledRootRedirect:s,slotProps:r===1?n?.rootItem:n?.subItem,onMouseEnter:f,onMouseLeave:d});return e.roles&&n?.currentRole&&!e?.roles?.includes(n?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[h,jsx(ze,{disableScrollLock:!0,open:c,anchorEl:m.current,anchorOrigin:r===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:r===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:f,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...r===1&&{ml:-.75},...c&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(Be,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...n?.paper},children:jsx(Ve,{data:e.children,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:h})}function Ve({data:e,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s}){return jsx(x,{sx:{gap:.5},children:e.map(l=>jsx(A,{data:l,render:o,depth:r+1,cssVars:a,slotProps:n,enabledRootRedirect:s},l.title))})}function rr({sx:e,data:r,render:o,slotProps:a,enabledRootRedirect:n,cssVars:s}){let l=useTheme(),i={...P.horizontal(l),...s};return jsx(Ae,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(He,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...i,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(x,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:r.map(m=>jsx(De,{render:o,cssVars:i,items:m.items,slotProps:a,enabledRootRedirect:n},m.subheader??m.items[0].title))})})})}function De({items:e,render:r,slotProps:o,enabledRootRedirect:a,cssVars:n}){return jsx(g,{children:jsx(x,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(A,{depth:1,data:s,render:r,cssVars:n,slotProps:o,enabledRootRedirect:a},s.title))})})}var F=forwardRef(({path:e,icon:r,info:o,title:a,caption:n,open:s,depth:l,render:i,active:m,disabled:v,hasChild:c,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},S)=>{let b=_({path:e,icon:r,info:o,depth:l,render:i,hasChild:c,externalLink:f,enabledRootRedirect:d});return jsxs(Qe,{ref:S,"aria-label":a,depth:l,active:m,disabled:v,open:s&&!m,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:R({open:s&&!m,active:m,disabled:v}),...b.baseProps,...h,children:[r&&jsx(T,{component:"span",className:t.item.icon,children:b.renderIcon}),a&&jsx(T,{component:"span",className:t.item.title,children:a}),n&&jsx(Le,{title:n,arrow:!0,placement:"right",children:jsx(oe,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&b.subItem&&jsx(T,{component:"span",className:t.item.info,children:b.renderInfo}),c&&jsx(oe,{icon:"CHEVRON_RIGHT",className:t.item.arrow})]})}),Qe=styled(Se,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:r,disabled:o,depth:a,theme:n})=>{let s=a===1,l=!s,i={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...i.item,textAlign:"center",flexDirection:"column",minHeight:"var(--nav-item-root-height)",padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...i.title,...u.noWrap,lineHeight:"16px",fontSize:n.typography.pxToRem(10),fontWeight:e?n.typography.fontWeightBold:n.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...i.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...i.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...r&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...l&&{...i.item,color:n.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...i.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...i.title,...n.typography.body2,fontWeight:e?n.typography.fontWeightSemiBold:n.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow,marginRight:n.spacing(-.5)},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...r&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});function G({data:e,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s}){let l=useTheme(),i=N(),m=useRef(null),v=$(e.path,!!e.children),[c,p]=useState(!1);useEffect(()=>{c&&d();},[i]);let f=useCallback(()=>{e.children&&p(!0);},[e.children]),d=useCallback(()=>{p(!1);},[]),h=jsx(F,{ref:m,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:r,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:y(e.path),enabledRootRedirect:s,slotProps:r===1?n?.rootItem:n?.subItem,onMouseEnter:f,onMouseLeave:d});return e.roles&&n?.currentRole&&!e?.roles?.includes(n?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[h,jsx(ze,{disableScrollLock:!0,open:c,anchorEl:m.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:f,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...r>1&&{mt:-1},...c&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(Be,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...n?.paper},children:jsx(no,{data:e.children,depth:r,render:o,cssVars:a,slotProps:n,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:h})}function no({data:e,render:r,depth:o,slotProps:a,enabledRootRedirect:n,cssVars:s}){return jsx(x,{sx:{gap:.5},children:e.map(l=>jsx(G,{data:l,render:r,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:n},l.title))})}var Hr=({sx:e,data:r,render:o,slotProps:a,enabledRootRedirect:n,cssVars:s})=>{let l=useTheme(),i={...P.mini(l),...s};return jsx(He,{component:"nav",className:t.mini.root,sx:{...i,...e},children:jsx(x,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:r.map(m=>jsx(mo,{render:o,cssVars:i,items:m.items,slotProps:a,enabledRootRedirect:n},m.subheader??m.items[0].title))})})},mo=({items:e,render:r,slotProps:o,enabledRootRedirect:a,cssVars:n})=>jsx(g,{children:jsx(x,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(G,{depth:1,data:s,render:r,cssVars:n,slotProps:o,enabledRootRedirect:a},s.title))})});var q=forwardRef(({path:e,icon:r,info:o,title:a,caption:n,open:s,depth:l,render:i,active:m,disabled:v,hasChild:c,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},S)=>{let b=_({path:e,icon:r,info:o,depth:l,render:i,hasChild:c,externalLink:f,enabledRootRedirect:d});return jsxs(fo,{ref:S,"aria-label":a,depth:l,active:m,disabled:v,open:s&&!m,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.texts}`]:p?.texts,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:R({open:s&&!m,active:m,disabled:v}),...b.baseProps,...h,children:[r&&jsx(T,{component:"span",className:t.item.icon,children:b.renderIcon}),a&&jsxs(T,{component:"span",className:t.item.texts,children:[jsx(T,{component:"span",className:t.item.title,children:a}),n&&jsx(Le,{title:n,placement:"top-start",children:jsx(T,{component:"span",className:t.item.caption,children:n})})]}),o&&jsx(T,{component:"span",className:t.item.info,children:b.renderInfo}),c&&jsx(oe,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),fo=styled(Se,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:r,disabled:o,depth:a,theme:n})=>{let s=a===1,l=!s,i={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...n.typography.body2,fontWeight:e?n.typography.fontWeightSemiBold:n.typography.fontWeightMedium},caption:{...u.noWrap,...n.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...i.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...i.icon},[`& .${t.item.texts}`]:{...i.texts},[`& .${t.item.title}`]:{...i.title},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow},[`& .${t.item.info}`]:{...i.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...r&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...l&&{...i.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...i.icon},[`& .${t.item.texts}`]:{...i.texts},[`& .${t.item.title}`]:{...i.title},[`& .${t.item.caption}`]:{...i.caption},[`& .${t.item.arrow}`]:{...i.arrow},[`& .${t.item.info}`]:{...i.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...r&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});function J({data:e,render:r,depth:o,slotProps:a,enabledRootRedirect:n}){let s=N(),l=$(e.path,!!e.children),[i,m]=useState(l);useEffect(()=>{l||c();},[s]);let v=useCallback(()=>{e.children&&m(f=>!f);},[e.children]),c=useCallback(()=>{m(!1);},[]),p=jsx(q,{render:r,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:l,disabled:e.disabled,hasChild:!!e.children,open:e.children&&i,externalLink:y(e.path),enabledRootRedirect:n,slotProps:o===1?a?.rootItem:a?.subItem,onClick:v});return e.roles&&a?.currentRole&&!e?.roles?.includes(a?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[p,jsx(ee,{"data-group":e.title,in:i,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(go,{data:e.children,render:r,depth:o,slotProps:a,enabledRootRedirect:n})})]}):jsx(g,{disabled:e.disabled,children:p})}function go({data:e,render:r,depth:o,slotProps:a,enabledRootRedirect:n}){return jsx(x,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(J,{data:s,render:r,depth:o+1,slotProps:a,enabledRootRedirect:n},s.title))})}var In=({sx:e,data:r,render:o,slotProps:a,enabledRootRedirect:n,cssVars:s})=>{let l=useTheme(),i={...P.vertical(l),...s};return jsx(He,{component:"nav",className:t.vertical.root,sx:{...i,...e},children:jsx(x,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:r.map(m=>jsx(Lo,{subheader:m.subheader,items:m.items,render:o,slotProps:a,enabledRootRedirect:n},m.subheader??m.items[0].title))})})},Lo=({items:e,render:r,subheader:o,slotProps:a,enabledRootRedirect:n})=>{let[s,l]=useState(!0),i=useCallback(()=>{l(v=>!v);},[]),m=jsx(x,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(J,{data:v,render:r,depth:1,slotProps:a,enabledRootRedirect:n},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(j,{"data-title":o,open:s,onClick:i,sx:a?.subheader,children:o}),jsx(be,{in:s,children:m})]}):m})};
17
+ var t={mini:{root:"nav__section__mini"},horizontal:{root:"nav__section__horizontal"},vertical:{root:"nav__section__vertical"},item:{root:"mnl__nav__item",icon:"mnl__nav__item__icon",info:"mnl__nav__item__info",texts:"mnl__nav__item__texts",title:"mnl__nav__item__title",arrow:"mnl__nav__item__arrow",caption:"mnl__nav__item__caption"},li:"mnl__nav__li",ul:"mnl__nav__ul",paper:"mnl__nav__paper",subheader:"mnl__nav__subheader",state:{open:"state--open",active:"state--active",disabled:"state--disabled"}};var ae={dark:"#282F37",light:"#EDEFF2"};function F(e,n){let{vars:{palette:o}}=e;return {"--nav-item-color":o.text.secondary,"--nav-item-hover-bg":o.action.hover,"--nav-item-caption-color":o.text.disabled,"--nav-item-root-active-color":o.primary.main,"--nav-item-root-active-color-on-dark":o.primary.light,"--nav-item-root-active-bg":varAlpha(o.primary.mainChannel,.08),"--nav-item-root-active-hover-bg":varAlpha(o.primary.mainChannel,.16),"--nav-item-root-open-color":o.text.primary,"--nav-item-root-open-bg":o.action.hover,"--nav-item-sub-active-color":o.text.primary,"--nav-item-sub-active-bg":o.action.selected,"--nav-item-sub-open-color":o.text.primary,"--nav-item-sub-open-bg":o.action.hover,...n==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function ye(e){let{shape:n,spacing:o}=e;return {...F(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${n.borderRadius}px`,"--nav-item-pt":o(.5),"--nav-item-pr":o(1),"--nav-item-pb":o(.5),"--nav-item-pl":o(1.5),"--nav-item-root-height":"44px","--nav-item-sub-height":"36px","--nav-icon-size":"24px","--nav-icon-margin":o(0,1.5,0,0),"--nav-bullet-size":"12px","--nav-bullet-light-color":ae.light,"--nav-bullet-dark-color":ae.dark}}function Ie(e){let{shape:n,spacing:o}=e;return {...F(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${n.borderRadius}px`,"--nav-item-root-height":"56px","--nav-item-root-padding":o(1,.5,.75,.5),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-root-margin":o(0,0,.75,0),"--nav-icon-sub-margin":o(0,1,0,0)}}function ke(e){let{shape:n,spacing:o}=e;return {...F(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${n.borderRadius*.75}px`,"--nav-item-root-height":"32px","--nav-item-root-padding":o(0,.75),"--nav-item-sub-height":"34px","--nav-item-sub-padding":o(0,1),"--nav-icon-size":"22px","--nav-icon-sub-margin":o(0,1,0,0),"--nav-icon-root-margin":o(0,1,0,0)}}var S={mini:Ie,vertical:ye,horizontal:ke};function w({open:e,active:n,disabled:o}){let i=t.item.root;return n?i+=` ${t.state.active}`:e?i+=` ${t.state.open}`:o&&(i+=` ${t.state.disabled}`),i}var u={icon:{flexShrink:0,display:"inline-flex",["& svg, & img"]:{width:"100%",height:"100%"}},arrow:{width:16,height:16,flexShrink:0,marginLeft:"6px",display:"inline-flex"},info:{fontSize:12,flexShrink:0,fontWeight:600,marginLeft:"6px",lineHeight:18/12,display:"inline-flex"},noWrap:{width:"100%",maxWidth:"100%",display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},disabled:{opacity:.48,pointerEvents:"none"}};function A({sx:e,open:n,children:o,...i}){return jsxs(we,{disableSticky:!0,component:"div",className:t.subheader,sx:{gap:1,cursor:"pointer",alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:r=>r.spacing(2,1,1,1.5),fontSize:r=>r.typography.pxToRem(11),transition:r=>r.transitions.create(["color","padding-left"],{duration:r.transitions.duration.standard}),"&:hover":{pl:2,color:"var(--nav-subheader-hover-color)"},...e},...i,children:[jsx(me,{width:16,icon:n?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",sx:{left:-4,opacity:0,position:"absolute",transition:r=>r.transitions.create(["opacity"],{duration:r.transitions.duration.standard})}}),o]})}function D({sx:e,depth:n,children:o,...i}){return jsx(Se,{sx:{...n+1!==1&&{pl:"calc(var(--nav-item-pl) + var(--nav-icon-size) / 2)",[`& .${t.ul}`]:{position:"relative",pl:"var(--nav-bullet-size)","&::before":{top:0,left:0,width:"2px",content:'""',position:"absolute",bottom:"calc(var(--nav-item-sub-height) - 2px - var(--nav-bullet-size) / 2)",bgcolor:"var(--nav-bullet-light-color)",[stylesMode.dark]:{bgcolor:"var(--nav-bullet-dark-color)"}}}},...e},...i,children:o})}function g({sx:e,children:n,disabled:o,...i}){return jsx(U,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...i,children:n})}function N({children:e,sx:n,...o}){return jsx(U,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...n},...o,children:e})}var se=forwardRef(({href:e,...n},o)=>jsx(Link,{ref:o,to:e,...n}));function B({path:e,icon:n,info:o,depth:i,render:r,hasChild:s,externalLink:m,enabledRootRedirect:a}){let l=i===1,c=!l,v=Number(i)>2,f=s&&!a?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:se,href:e},d=null;n&&r?.navIcon&&typeof n=="string"?d=r?.navIcon[n]:d=n;let h=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,b]=o,I=r.navInfo(b)[x];h=I?cloneElement(I):null;}else h=o;return {subItem:c,rootItem:l,subDeepItem:v,baseProps:f,renderIcon:d,renderInfo:h}}var J=forwardRef(({path:e,icon:n,info:o,title:i,caption:r,open:s,depth:m,render:a,active:l,disabled:c,hasChild:v,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},x)=>{let b=B({path:e,icon:n,info:o,depth:m,render:a,hasChild:v,externalLink:f,enabledRootRedirect:d});return jsxs(Oe,{ref:x,"aria-label":i,depth:m,active:l,disabled:c,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:w({open:s&&!l,active:l,disabled:c}),...b.baseProps,...h,children:[n&&jsx(U,{component:"span",className:t.item.icon,children:b.renderIcon}),i&&jsx(U,{component:"span",className:t.item.title,children:i}),r&&jsx(Te,{title:r,arrow:!0,children:jsx(me,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(U,{component:"span",className:t.item.info,children:b.renderInfo}),v&&jsx(me,{icon:b.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Oe=styled(Me,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:n,disabled:o,depth:i,theme:r})=>{let s=i===1,m=!s,a={item:{flexShrink:0,color:"var(--nav-item-color)",borderRadius:"var(--nav-item-radius)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...a.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...a.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...a.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...a.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...a.arrow},[`& .${t.item.info}`]:{...a.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...n&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...a.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...a.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...a.title,flexGrow:1},[`& .${t.item.caption}`]:{...a.caption},[`& .${t.item.arrow}`]:{...a.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...a.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...n&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var le=e=>{let n=e.split("?")[1];return n?new URLSearchParams(n).toString().length>0:!1};function K(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function pe(e){try{let n=new URL(e,window.location.origin);return K(n.pathname)}catch{return e}}function k(e){return e.startsWith("http")}function y(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function C(e,n=!0){let o=K(y()),i=le(e);if(e.startsWith("#")||k(e))return !1;if(n||i){let m=o.includes(e),a=pe(e);return m||i&&a===o}return o===e}function Q({data:e,depth:n,render:o,cssVars:i,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),a=y(),l=useRef(null),c=C(e.path,!!e.children),[v,p]=useState(!1);useEffect(()=>{v&&d();},[a]);let f=useCallback(()=>{e.children&&p(!0);},[e.children]),d=useCallback(()=>{p(!1);},[]),h=jsx(J,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:n,active:c,disabled:e.disabled,hasChild:!!e.children,open:e.children&&v,externalLink:k(e.path),enabledRootRedirect:s,slotProps:n===1?r?.rootItem:r?.subItem,onMouseEnter:f,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[h,jsx(qe,{disableScrollLock:!0,open:v,anchorEl:l.current,anchorOrigin:n===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:n===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:f,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...n===1&&{ml:-.75},...v&&{pointerEvents:"auto"}}}},sx:{...i,pointerEvents:"none"},children:jsx(Fe,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Qe,{data:e.children,depth:n,render:o,cssVars:i,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:h})}function Qe({data:e,depth:n,render:o,cssVars:i,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(Q,{data:m,render:o,depth:n+1,cssVars:i,slotProps:r,enabledRootRedirect:s},m.title))})}function Er({sx:e,data:n,render:o,slotProps:i,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),a={...S.horizontal(m),...s};return jsx(je,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(Ye,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...a,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:n.map(l=>jsx(eo,{render:o,cssVars:a,items:l.items,slotProps:i,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function eo({items:e,render:n,slotProps:o,enabledRootRedirect:i,cssVars:r}){return jsx(g,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(Q,{depth:1,data:s,render:n,cssVars:r,slotProps:o,enabledRootRedirect:i},s.title))})})}var Y=forwardRef(({path:e,icon:n,info:o,title:i,caption:r,open:s,depth:m,render:a,active:l,disabled:c,hasChild:v,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},x)=>{let b=B({path:e,icon:n,info:o,depth:m,render:a,hasChild:v,externalLink:f,enabledRootRedirect:d});return jsxs(io,{ref:x,"aria-label":i,depth:m,active:l,disabled:c,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:w({open:s&&!l,active:l,disabled:c}),...b.baseProps,...h,children:[n&&jsx(U,{component:"span",className:t.item.icon,children:b.renderIcon}),i&&jsx(U,{component:"span",className:t.item.title,children:i}),r&&jsx(Te,{title:r,arrow:!0,placement:"right",children:jsx(me,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&b.subItem&&jsx(U,{component:"span",className:t.item.info,children:b.renderInfo}),v&&jsx(me,{icon:"CHEVRON_RIGHT",className:t.item.arrow})]})}),io=styled(Me,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:n,disabled:o,depth:i,theme:r})=>{let s=i===1,m=!s,a={item:{width:"100%",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},title:{},caption:{width:16,height:16,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...a.item,textAlign:"center",flexDirection:"column",minHeight:"var(--nav-item-root-height)",padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...a.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...a.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...a.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...a.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...a.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...n&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...a.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...a.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...a.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...a.caption},[`& .${t.item.arrow}`]:{...a.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...a.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...n&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Z=({data:e,depth:n,render:o,cssVars:i,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),a=y(),l=useRef(null),c=C(e.path,!!e.children),[v,p]=useState(!1);useEffect(()=>{v&&d();},[a]);let f=useCallback(()=>{e.children&&p(!0);},[e.children]),d=useCallback(()=>{p(!1);},[]),h=jsx(Y,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:n,active:c,disabled:e.disabled,hasChild:!!e.children,open:e.children&&v,externalLink:k(e.path),enabledRootRedirect:s,slotProps:n===1?r?.rootItem:r?.subItem,onMouseEnter:f,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[h,jsx(qe,{disableScrollLock:!0,open:v,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:f,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...n>1&&{mt:-1},...v&&{pointerEvents:"auto"}}}},sx:{...i,pointerEvents:"none"},children:jsx(Fe,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(ho,{data:e.children,depth:n,render:o,cssVars:i,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:h})};function ho({data:e,render:n,depth:o,slotProps:i,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(Z,{data:m,render:n,depth:o+1,cssVars:s,slotProps:i,enabledRootRedirect:r},m.title))})}var bn=({sx:e,data:n,render:o,slotProps:i,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),a={...S.mini(m),...s};return jsx(Ye,{component:"nav",className:t.mini.root,sx:{...a,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:n.map(l=>jsx(xo,{render:o,cssVars:a,items:l.items,slotProps:i,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},xo=({items:e,render:n,slotProps:o,enabledRootRedirect:i,cssVars:r})=>jsx(g,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(Z,{depth:1,data:s,render:n,cssVars:r,slotProps:o,enabledRootRedirect:i},s.title))})});var j=forwardRef(({path:e,icon:n,info:o,title:i,caption:r,open:s,depth:m,render:a,active:l,disabled:c,hasChild:v,slotProps:p,externalLink:f,enabledRootRedirect:d,...h},x)=>{let b=B({path:e,icon:n,info:o,depth:m,render:a,hasChild:v,externalLink:f,enabledRootRedirect:d});return jsxs(Co,{ref:x,"aria-label":i,depth:m,active:l,disabled:c,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.texts}`]:p?.texts,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:w({open:s&&!l,active:l,disabled:c}),...b.baseProps,...h,children:[n&&jsx(U,{component:"span",className:t.item.icon,children:b.renderIcon}),i&&jsxs(U,{component:"span",className:t.item.texts,children:[jsx(U,{component:"span",className:t.item.title,children:i}),r&&jsx(Te,{title:r,placement:"top-start",children:jsx(U,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(U,{component:"span",className:t.item.info,children:b.renderInfo}),v&&jsx(me,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),Co=styled(Me,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:n,disabled:o,depth:i,theme:r})=>{let s=i===1,m=!s,a={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...a.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...a.icon},[`& .${t.item.texts}`]:{...a.texts},[`& .${t.item.title}`]:{...a.title},[`& .${t.item.caption}`]:{...a.caption},[`& .${t.item.arrow}`]:{...a.arrow},[`& .${t.item.info}`]:{...a.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...n&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...a.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...a.icon},[`& .${t.item.texts}`]:{...a.texts},[`& .${t.item.title}`]:{...a.title},[`& .${t.item.caption}`]:{...a.caption},[`& .${t.item.arrow}`]:{...a.arrow},[`& .${t.item.info}`]:{...a.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...n&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ee=({data:e,render:n,depth:o,slotProps:i,enabledRootRedirect:r})=>{let s=y(),m=C(e.path,!!e.children),[a,l]=useState(m);useEffect(()=>{m||v();},[s]);let c=useCallback(()=>{e.children&&l(f=>!f);},[e.children]),v=useCallback(()=>{l(!1);},[]),p=jsx(j,{render:n,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:m,disabled:e.disabled,hasChild:!!e.children,open:e.children&&a,externalLink:k(e.path),enabledRootRedirect:r,slotProps:o===1?i?.rootItem:i?.subItem,onClick:c});return e.roles&&i?.currentRole&&!e?.roles?.includes(i?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[p,jsx(D,{"data-group":e.title,in:a,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Ro,{data:e.children,render:n,depth:o,slotProps:i,enabledRootRedirect:r})})]}):jsx(g,{disabled:e.disabled,children:p})},Ro=({data:e,render:n,depth:o,slotProps:i,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ee,{data:s,render:n,depth:o+1,slotProps:i,enabledRootRedirect:r},s.title))});var Zn=({sx:e,data:n,render:o,slotProps:i,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),a={...S.vertical(m),...s};return jsx(Ye,{component:"nav",className:t.vertical.root,sx:{...a,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:n.map(l=>jsx(To,{subheader:l.subheader,items:l.items,render:o,slotProps:i,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},To=({items:e,render:n,subheader:o,slotProps:i,enabledRootRedirect:r})=>{let[s,m]=useState(!0),a=useCallback(()=>{m(c=>!c);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(c=>jsx(ee,{data:c,render:n,depth:1,slotProps:i,enabledRootRedirect:r},c.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(A,{"data-title":o,open:s,onClick:a,sx:i?.subheader,children:o}),jsx(Se,{in:s,children:l})]}):l})};function be({path:e,icon:n,info:o,depth:i,render:r,hasChild:s,externalLink:m,enabledRootRedirect:a,onNavigate:l}){let c=i===1,v=!c,p=Number(i)>2,d=s&&!a?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:b=>l(b,e)},h=null;n&&r?.navIcon&&typeof n=="string"?h=r?.navIcon[n]:h=n;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[b,I]=o,re=r.navInfo(I)[b];x=re?cloneElement(re):null;}else x=o;return {subItem:v,rootItem:c,subDeepItem:p,baseProps:d,renderIcon:h,renderInfo:x}}var oe=forwardRef(({path:e,icon:n,info:o,title:i,caption:r,open:s,depth:m,render:a,active:l,disabled:c,hasChild:v,slotProps:p,externalLink:f,enabledRootRedirect:d,onNavigate:h,...x},b)=>{let I=be({path:e,icon:n,info:o,depth:m,render:a,hasChild:v,externalLink:f,enabledRootRedirect:d,onNavigate:h});return jsxs(Fo,{ref:b,"aria-label":i,depth:m,active:l,disabled:c,open:s&&!l,sx:{...p?.sx,[`& .${t.item.icon}`]:p?.icon,[`& .${t.item.texts}`]:p?.texts,[`& .${t.item.title}`]:p?.title,[`& .${t.item.caption}`]:p?.caption,[`& .${t.item.info}`]:p?.info,[`& .${t.item.arrow}`]:p?.arrow},className:w({open:s&&!l,active:l,disabled:c}),...I.baseProps,...x,...I.baseProps.onClick?{onClick:I.baseProps.onClick,style:{textAlign:"left"}}:{},children:[n&&jsx(U,{component:"span",className:t.item.icon,children:I.renderIcon}),i&&jsxs(U,{component:"span",className:t.item.texts,children:[jsx(U,{component:"span",className:t.item.title,children:i}),r&&jsx(Te,{title:r,placement:"top-start",children:jsx(U,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(U,{component:"span",className:t.item.info,children:I.renderInfo}),v&&jsx(me,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),Fo=styled(Me,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:n,disabled:o,depth:i,theme:r})=>{let s=i===1,m=!s,a={item:{width:"100%",paddingTop:"var(--nav-item-pt)",paddingLeft:"var(--nav-item-pl)",paddingRight:"var(--nav-item-pr)",paddingBottom:"var(--nav-item-pb)",borderRadius:"var(--nav-item-radius)",color:"var(--nav-item-color)","&:hover":{backgroundColor:"var(--nav-item-hover-bg)"}},texts:{minWidth:0,flex:"1 1 auto"},title:{...u.noWrap,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium},caption:{...u.noWrap,...r.typography.caption,color:"var(--nav-item-caption-color)"},icon:{...u.icon,width:"var(--nav-icon-size)",height:"var(--nav-icon-size)",margin:"var(--nav-icon-margin)"},arrow:{...u.arrow},info:{...u.info}};return {...s&&{...a.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...a.icon},[`& .${t.item.texts}`]:{...a.texts},[`& .${t.item.title}`]:{...a.title},[`& .${t.item.caption}`]:{...a.caption},[`& .${t.item.arrow}`]:{...a.arrow},[`& .${t.item.info}`]:{...a.info},...e&&{color:"var(--nav-item-root-active-color)",backgroundColor:"var(--nav-item-root-active-bg)","&:hover":{backgroundColor:"var(--nav-item-root-active-hover-bg)"},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...n&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...a.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...a.icon},[`& .${t.item.texts}`]:{...a.texts},[`& .${t.item.title}`]:{...a.title},[`& .${t.item.caption}`]:{...a.caption},[`& .${t.item.arrow}`]:{...a.arrow},[`& .${t.item.info}`]:{...a.info},"&::before":{left:0,content:'""',position:"absolute",width:"var(--nav-bullet-size)",height:"var(--nav-bullet-size)",transform:"translate(calc(var(--nav-bullet-size) * -1), calc(var(--nav-bullet-size) * -0.4))",backgroundColor:"var(--nav-bullet-light-color)",mask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,WebkitMask:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 14 14'%3E%3Cpath d='M1 1v4a8 8 0 0 0 8 8h4' stroke='%23efefef' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 50%/100% auto`,[stylesMode.dark]:{backgroundColor:"var(--nav-bullet-dark-color)"}},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...n&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var te=({data:e,render:n,depth:o,slotProps:i,enabledRootRedirect:r,onNavigate:s})=>{let m=y(),a=C(e.path,!!e.children),[l,c]=useState(a);useEffect(()=>{a||p();},[m]);let v=useCallback(()=>{e.children&&c(d=>!d);},[e.children]),p=useCallback(()=>{c(!1);},[]),f=jsx(oe,{render:n,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:a,disabled:e.disabled,hasChild:!!e.children,open:e.children&&l,externalLink:k(e.path),enabledRootRedirect:r,slotProps:o===1?i?.rootItem:i?.subItem,onClick:v,onNavigate:s});return e.roles&&i?.currentRole&&!e?.roles?.includes(i?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,sx:{[`& .${t.li}`]:{"&:first-of-type":{mt:"var(--nav-item-gap)"}}},children:[f,jsx(D,{"data-group":e.title,in:l,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Ko,{data:e.children,render:n,depth:o,slotProps:i,enabledRootRedirect:r,onNavigate:s})})]}):jsx(g,{disabled:e.disabled,children:f})},Ko=({data:e,render:n,depth:o,slotProps:i,enabledRootRedirect:r,onNavigate:s})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(m=>jsx(te,{data:m,render:n,depth:o+1,slotProps:i,enabledRootRedirect:r,onNavigate:s},m.title))});var za=({sx:e,data:n,render:o,slotProps:i,enabledRootRedirect:r,cssVars:s,onNavigate:m})=>{let a=useTheme(),l={...S.vertical(a),...s};return jsx(Ye,{component:"nav",className:t.vertical.root,sx:{...l,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:n.map(c=>jsx(ot,{subheader:c.subheader,items:c.items,render:o,slotProps:i,enabledRootRedirect:r,onNavigate:m},c.subheader??c.items[0].title))})})},ot=({items:e,render:n,subheader:o,slotProps:i,enabledRootRedirect:r,onNavigate:s})=>{let[m,a]=useState(!0),l=useCallback(()=>{a(v=>!v);},[]),c=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(te,{data:v,render:n,depth:1,slotProps:i,enabledRootRedirect:r,onNavigate:s},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(A,{"data-title":o,open:m,onClick:l,sx:i?.subheader,children:o}),jsx(Se,{in:m,children:c})]}):c})};
18
18
 
19
- export { ee as NavCollapse, g as NavLi, rr as NavSectionHorizontal, H as NavSectionHorizontalItem, Hr as NavSectionMini, F as NavSectionMiniItem, In as NavSectionVertical, q as NavSectionVerticalItem, x as NavUl, j as Subheader, X as bulletColor, t as navSectionClasses, P as navSectionCssVars, u as sharedStyles, R as stateClasses, _ as useNavItem };
19
+ export { D as NavCollapse, g as NavLi, Er as NavSectionHorizontal, J as NavSectionHorizontalItem, bn as NavSectionMini, Y as NavSectionMiniItem, Zn as NavSectionVertical, oe as NavSectionVerticalButtonItem, j as NavSectionVerticalItem, za as NavSectionVerticalWithButtons, N as NavUl, A as Subheader, ae as bulletColor, t as navSectionClasses, S as navSectionCssVars, u as sharedStyles, w as stateClasses, B as useNavItem };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.1",
2
+ "version": "2.0.3",
3
3
  "name": "@zydon/common-csr",
4
4
  "description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
5
5
  "license": "MIT",
@@ -24,6 +24,10 @@
24
24
  "format": "prettier --write \"**/*.*\""
25
25
  },
26
26
  "exports": {
27
+ ".": {
28
+ "import": "./dist/index.mjs",
29
+ "types": "./dist/index.d.ts"
30
+ },
27
31
  "./components/*": {
28
32
  "import": "./dist/components/*/index.mjs",
29
33
  "types": "./dist/components/*/index.d.ts"