@zydon/common-csr 2.1.14 → 2.1.16
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/{chunk-UPJICKSC.js → chunk-C5KPGXFY.js} +12 -12
- package/dist/components/ConfigsHeader/index.d.ts +2 -1
- package/dist/components/ConfigsHeader/index.js +4 -4
- package/dist/components/EditorField/index.js +1 -1
- package/dist/components/editor/index.d.ts +1 -1
- package/dist/components/editor/index.js +1 -1
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/image/index.js +3 -3
- package/dist/components/nav-section/index.d.ts +5 -5
- package/dist/components/nav-section/index.js +10 -10
- package/package.json +18 -17
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef, useState, useCallback, useEffect } from 'react';
|
|
1
|
+
import { memo, forwardRef, useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import Zo from '@mui/material/Backdrop';
|
|
3
3
|
import Bo from '@mui/material/FormHelperText';
|
|
4
4
|
import To from '@mui/material/Portal';
|
|
@@ -14,17 +14,17 @@ import { createLowlight, common } from 'lowlight';
|
|
|
14
14
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { varAlpha } from '@zydon/common/theme/styles';
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import ko from '@mui/material/Divider';
|
|
18
|
+
import J, { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
19
19
|
import { listClasses } from '@mui/material/List';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
20
|
+
import eo from '@mui/material/Menu';
|
|
21
|
+
import ro from '@zydon/common/components/Icon';
|
|
22
|
+
import j from '@mui/material/SvgIcon';
|
|
23
|
+
import so from '@mui/material/Button';
|
|
24
|
+
import co from '@mui/material/Popover';
|
|
25
|
+
import mo from '@mui/material/TextField';
|
|
26
|
+
import uo from '@mui/material/Typography';
|
|
27
27
|
|
|
28
|
-
var e={root:"nml__editor__root",toolbar:{hr:"nml__editor__toolbar__hr",root:"nml__editor__toolbar__root",bold:"nml__editor__toolbar__bold",code:"nml__editor__toolbar__code",undo:"nml__editor__toolbar__undo",redo:"nml__editor__toolbar__redo",link:"nml__editor__toolbar__link",clear:"nml__editor__toolbar__clear",image:"nml__editor__toolbar__image",italic:"nml__editor__toolbar__italic",strike:"nml__editor__toolbar__strike",hardbreak:"nml__editor__toolbar__hardbreak",unsetlink:"nml__editor__toolbar__unsetlink",codeBlock:"nml__editor__toolbar__code__block",alignLeft:"nml__editor__toolbar__align__left",fullscreen:"nml__editor__toolbar__fullscreen",blockquote:"nml__editor__toolbar__blockquote",bulletList:"nml__editor__toolbar__bullet__list",alignRight:"nml__editor__toolbar__align__right",orderedList:"nml__editor__toolbar__ordered__list",alignCenter:"nml__editor__toolbar__align__center",alignJustify:"nml__editor__toolbar__align__justify"},content:{hr:"nml__editor__content__hr",root:"nml__editor__content__root",link:"nml__editor__content__link",image:"nml__editor__content__image",codeInline:"nml__editor__content__code",heading:"nml__editor__content__heading",listItem:"nml__editor__content__listItem",codeBlock:"nml__editor__content__code__block",blockquote:"nml__editor__content__blockquote",langSelect:"nml__editor__content__lang__select",placeholder:"nml__editor__content__placeholder",bulletList:"nml__editor__content__bullet__list",orderedList:"nml__editor__content__ordered__list"}};var T=({node:{attrs:{language:o}},extension:a,updateAttributes:i})=>jsxs(NodeViewWrapper,{className:e.content.codeBlock,children:[jsxs("select",{name:"language",contentEditable:!1,defaultValue:o,onChange:t=>i({language:t.target.value}),className:e.content.langSelect,children:[jsx("option",{value:"null",children:"auto"}),jsx("option",{disabled:!0,children:"\u2014"}),a.options.lowlight.listLanguages().map(t=>jsx("option",{value:t,children:t},t))]}),jsx("pre",{children:jsx(NodeViewContent,{as:"code"})})]});var J="0.75em",S=styled(d,{shouldForwardProp:o=>o!=="error"&&o!=="disabled"&&o!=="fullScreen"})(({error:o,disabled:a,fullScreen:i,theme:t})=>({minHeight:240,borderRadius:t.shape.borderRadius,border:`solid 1px ${varAlpha(t.vars.palette.grey["500Channel"],.2)}`,scrollbarWidth:"thin",scrollbarColor:`${varAlpha(t.vars.palette.text.disabledChannel,.4)} ${varAlpha(t.vars.palette.text.disabledChannel,.08)}`,...o&&{border:`solid 1px ${t.vars.palette.error.main}`},...a&&{opacity:.48,pointerEvents:"none"},...i&&{top:16,left:16,position:"fixed",zIndex:t.zIndex.modal,maxHeight:"unset !important",width:"calc(100% - 32px)",height:"calc(100% - 32px)",backgroundColor:t.vars.palette.background.default},[`& .${e.content.placeholder}`]:{"&:first-of-type::before":{...t.typography.body2,height:0,float:"left",pointerEvents:"none",content:"attr(data-placeholder)",color:t.vars.palette.text.disabled}},[`& .${e.content.root}`]:{display:"flex",flex:"1 1 auto",overflowY:"auto",flexDirection:"column",borderBottomLeftRadius:"inherit",borderBottomRightRadius:"inherit",backgroundColor:varAlpha(t.vars.palette.grey["500Channel"],.08),...o&&{backgroundColor:varAlpha(t.vars.palette.error.mainChannel,.08)},"& .tiptap":{"> * + *":{marginTop:0,marginBottom:J},"&.ProseMirror":{flex:"1 1 auto",outline:"none",padding:t.spacing(0,2)},h1:{...t.typography.h1,marginTop:40,marginBottom:8},h2:{...t.typography.h2,marginTop:40,marginBottom:8},h3:{...t.typography.h3,marginTop:24,marginBottom:8},h4:{...t.typography.h4,marginTop:24,marginBottom:8},h5:{...t.typography.h5,marginTop:24,marginBottom:8},h6:{...t.typography.h6,marginTop:24,marginBottom:8},p:{...t.typography.body1,marginBottom:"1.25rem"},[`& .${e.content.heading}`]:{},[`& .${e.content.link}`]:{color:t.vars.palette.primary.main},[`& .${e.content.hr}`]:{flexShrink:0,borderWidth:0,margin:"2em 0",msFlexNegative:0,WebkitFlexShrink:0,borderStyle:"solid",borderBottomWidth:"thin",borderColor:t.vars.palette.divider},[`& .${e.content.image}`]:{width:"100%",height:"auto",maxWidth:"100%",margin:"auto auto 1.25em"},[`& .${e.content.bulletList}`]:{paddingLeft:16,listStyleType:"disc"},[`& .${e.content.orderedList}`]:{paddingLeft:16},[`& .${e.content.listItem}`]:{lineHeight:2,"& > p":{margin:0,display:"inline-block"}},[`& .${e.content.blockquote}`]:{lineHeight:1.5,fontSize:"1.5em",margin:"24px auto",position:"relative",fontFamily:"Georgia, serif",padding:t.spacing(3,3,3,8),color:t.vars.palette.text.secondary,borderLeft:`solid 8px ${varAlpha(t.vars.palette.grey["500Channel"],.08)}`,[t.breakpoints.up("md")]:{width:"100%",maxWidth:640},"& p":{margin:0,fontSize:"inherit",fontFamily:"inherit"},"&::before":{left:16,top:-8,display:"block",fontSize:"3em",content:'"\\201C"',position:"absolute",color:t.vars.palette.text.disabled}},[`& .${e.content.codeInline}`]:{padding:t.spacing(.25,.5),color:t.vars.palette.text.secondary,fontSize:t.typography.body2.fontSize,borderRadius:t.shape.borderRadius/2,backgroundColor:varAlpha(t.vars.palette.grey["500Channel"],.2)},[`& .${e.content.codeBlock}`]:{position:"relative","& pre":{overflowX:"auto",color:t.vars.palette.common.white,padding:t.spacing(5,3,3,3),borderRadius:t.shape.borderRadius,backgroundColor:t.vars.palette.grey[900],fontFamily:"'JetBrainsMono', monospace","& code":{fontSize:t.typography.body2.fontSize}},[`& .${e.content.langSelect}`]:{top:8,right:8,zIndex:1,padding:4,outline:"none",borderRadius:4,position:"absolute",color:t.vars.palette.common.white,fontWeight:t.typography.fontWeightMedium,borderColor:varAlpha(t.vars.palette.grey["500Channel"],.08),backgroundColor:varAlpha(t.vars.palette.grey["500Channel"],.08)}}}}}));var n=({sx:o,icon:a,label:i,active:t,disabled:l,...s})=>jsxs(j,{sx:{px:.75,width:28,height:28,borderRadius:.75,typography:"body2","&:hover":{bgcolor:"action.hover"},...t&&{bgcolor:"action.selected"},...l&&{pointerEvents:"none",cursor:"not-allowed",opacity:.48},...o},...s,children:[a&&jsx(K,{sx:{fontSize:18},children:a}),i&&i]});var io=["Heading 1","Heading 2","Heading 3","Heading 4","Heading 5","Heading 6"],A=({editor:o})=>{let[a,i]=useState(null),t=s=>{i(s.currentTarget);},l=()=>{i(null);};return o?jsxs(Fragment,{children:[jsxs(j,{id:"heading-menu-button","aria-label":"Heading menu button","aria-controls":a?"heading-menu-button":void 0,"aria-haspopup":"true","aria-expanded":a?"true":void 0,onClick:t,sx:{px:1,width:120,height:32,borderRadius:.75,typography:"body2",justifyContent:"space-between",border:s=>`solid 1px ${varAlpha(s.vars.palette.grey["500Channel"],.2)}`},children:[o.isActive("heading",{level:1})&&"Heading 1"||o.isActive("heading",{level:2})&&"Heading 2"||o.isActive("heading",{level:3})&&"Heading 3"||o.isActive("heading",{level:4})&&"Heading 4"||o.isActive("heading",{level:5})&&"Heading 5"||o.isActive("heading",{level:6})&&"Heading 6"||"Paragraph",jsx(ao,{width:16,icon:a?"ARROW_UP_SIMPLE":"ARROW_DOWN_SIMPLE"})]}),jsxs(ro,{id:"heading-menu",anchorEl:a,open:!!a,onClose:l,MenuListProps:{"aria-labelledby":"heading-button"},slotProps:{paper:{sx:{width:120,[`& .${listClasses.root}`]:{gap:.5,display:"flex",flexDirection:"column"},[`& .${buttonBaseClasses.root}`]:{px:1,width:1,height:34,borderRadius:.75,justifyContent:"flex-start","&:hover":{backgroundColor:"action.hover"}}}}},children:[jsx(n,{component:"li",label:"Paragraph",active:o.isActive("paragraph"),onClick:()=>{l(),o.chain().focus().setParagraph().run();}}),io.map((s,p)=>{let g=p+1;return jsx(n,{"aria-label":s,component:"li",label:s,active:o.isActive("heading",{level:g}),onClick:()=>{l(),o.chain().focus().toggleHeading({level:g}).run();},sx:{...s!=="Paragraph"&&{fontSize:18-p,fontWeight:"fontWeightBold"}}},s)})]})]}):null};var P=({editor:o})=>{let[a,i]=useState(""),[t,l]=useState(null),s=c=>{l(c.currentTarget);},p=()=>{l(null);},g=useCallback(()=>{p(),t&&o?.chain().focus().setImage({src:a}).run();},[t,o,a]);return o?jsxs(Fragment,{children:[jsx(n,{"aria-label":"Image",className:e.toolbar.image,onClick:s,icon:jsx("path",{d:"M20 5H4V19L13.2923 9.70649C13.6828 9.31595 14.3159 9.31591 14.7065 9.70641L20 15.0104V5ZM2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z"})}),jsxs(po,{id:t?"simple-popover":void 0,open:!!t,anchorEl:t,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{sx:{p:2.5}}},children:[jsx(go,{variant:"subtitle2",sx:{mb:1},children:"URL"}),jsxs(d,{direction:"row",alignItems:"center",spacing:1,children:[jsx(uo,{size:"small",placeholder:"Enter URL here...",value:a,onChange:c=>{i(c.target.value);},sx:{width:240}}),jsx(co,{variant:"contained",onClick:g,children:"Apply"})]})]})]}):null};var R=({editor:o})=>{let[a,i]=useState(""),[t,l]=useState(null),s=c=>{let L=o?.getAttributes("link").href;l(c.currentTarget),i(L||"");},p=()=>{l(null);},g=useCallback(()=>{p(),a?o?.chain().focus().extendMarkRange("link").setLink({href:a}).run():o?.chain().focus().extendMarkRange("link").unsetLink().run();},[o,a]);return o?jsxs(Fragment,{children:[jsx(n,{"aria-label":"Link",active:o.isActive("link"),className:e.toolbar.link,onClick:s,icon:jsx("path",{d:"M17.6567 14.8284L16.2425 13.4142L17.6567 12C19.2188 10.4379 19.2188 7.90524 17.6567 6.34314C16.0946 4.78105 13.5619 4.78105 11.9998 6.34314L10.5856 7.75736L9.17139 6.34314L10.5856 4.92893C12.9287 2.58578 16.7277 2.58578 19.0709 4.92893C21.414 7.27208 21.414 11.0711 19.0709 13.4142L17.6567 14.8284ZM14.8282 17.6569L13.414 19.0711C11.0709 21.4142 7.27189 21.4142 4.92875 19.0711C2.5856 16.7279 2.5856 12.9289 4.92875 10.5858L6.34296 9.17157L7.75717 10.5858L6.34296 12C4.78086 13.5621 4.78086 16.0948 6.34296 17.6569C7.90506 19.2189 10.4377 19.2189 11.9998 17.6569L13.414 16.2426L14.8282 17.6569ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z"})}),jsx(n,{"aria-label":"Unset link",disabled:!o.isActive("link"),className:e.toolbar.unsetlink,onClick:()=>o.chain().focus().unsetLink().run(),icon:jsx("path",{d:"M17.657 14.8284L16.2428 13.4142L17.657 12C19.2191 10.4379 19.2191 7.90526 17.657 6.34316C16.0949 4.78106 13.5622 4.78106 12.0001 6.34316L10.5859 7.75737L9.17171 6.34316L10.5859 4.92895C12.9291 2.5858 16.7281 2.5858 19.0712 4.92895C21.4143 7.27209 21.4143 11.0711 19.0712 13.4142L17.657 14.8284ZM14.8286 17.6569L13.4143 19.0711C11.0712 21.4142 7.27221 21.4142 4.92907 19.0711C2.58592 16.7279 2.58592 12.9289 4.92907 10.5858L6.34328 9.17159L7.75749 10.5858L6.34328 12C4.78118 13.5621 4.78118 16.0948 6.34328 17.6569C7.90538 19.219 10.438 19.219 12.0001 17.6569L13.4143 16.2427L14.8286 17.6569ZM14.8286 7.75737L16.2428 9.17159L9.17171 16.2427L7.75749 14.8284L14.8286 7.75737ZM5.77539 2.29291L7.70724 1.77527L8.74252 5.63897L6.81067 6.15661L5.77539 2.29291ZM15.2578 18.3611L17.1896 17.8434L18.2249 21.7071L16.293 22.2248L15.2578 18.3611ZM2.29303 5.77527L6.15673 6.81054L5.63909 8.7424L1.77539 7.70712L2.29303 5.77527ZM18.3612 15.2576L22.2249 16.2929L21.7072 18.2248L17.8435 17.1895L18.3612 15.2576Z"})}),jsxs(po,{id:t?"simple-popover":void 0,open:!!t,anchorEl:t,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{sx:{p:2.5}}},children:[jsx(go,{variant:"subtitle2",sx:{mb:1},children:"URL"}),jsxs(d,{direction:"row",alignItems:"center",spacing:1,children:[jsx(uo,{size:"small",placeholder:"Enter URL here...",value:a,onChange:c=>{i(c.target.value);},sx:{width:240}}),jsx(co,{variant:"contained",onClick:g,children:"Apply"})]})]})]}):null};var I=({editor:o,fullItem:a,fullScreen:i,onToggleFullScreen:t})=>o?jsxs(d,{spacing:1,direction:"row",flexWrap:"wrap",alignItems:"center",divider:jsx(Vo,{orientation:"vertical",flexItem:!0,sx:{height:16,my:"auto"}}),className:e.toolbar.root,sx:{p:1.25,bgcolor:"background.paper",borderTopRightRadius:"inherit",borderTopLeftRadius:"inherit",borderBottom:l=>`solid 1px ${varAlpha(l.vars.palette.grey["500Channel"],.2)}`},children:[jsx(A,{editor:o}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Bold",active:o.isActive("bold"),className:e.toolbar.bold,onClick:()=>o.chain().focus().toggleBold().run(),icon:jsx("path",{d:"M8 11H12.5C13.8807 11 15 9.88071 15 8.5C15 7.11929 13.8807 6 12.5 6H8V11ZM18 15.5C18 17.9853 15.9853 20 13.5 20H6V4H12.5C14.9853 4 17 6.01472 17 8.5C17 9.70431 16.5269 10.7981 15.7564 11.6058C17.0979 12.3847 18 13.837 18 15.5ZM8 13V18H13.5C14.8807 18 16 16.8807 16 15.5C16 14.1193 14.8807 13 13.5 13H8Z"})}),jsx(n,{"aria-label":"Italic",active:o.isActive("italic"),className:e.toolbar.italic,onClick:()=>o.chain().focus().toggleItalic().run(),icon:jsx("path",{d:"M15 20H7V18H9.92661L12.0425 6H9V4H17V6H14.0734L11.9575 18H15V20Z"})}),jsx(n,{"aria-label":"Strike",active:o.isActive("strike"),className:e.toolbar.italic,onClick:()=>o.chain().focus().toggleStrike().run(),icon:jsx("path",{d:"M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z"})})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Bullet list",active:o.isActive("bulletList"),className:e.toolbar.bulletList,onClick:()=>o.chain().focus().toggleBulletList().run(),icon:jsx("path",{d:"M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"})}),jsx(n,{"aria-label":"Ordered list",active:o.isActive("orderedList"),className:e.toolbar.orderedList,onClick:()=>o.chain().focus().toggleOrderedList().run(),icon:jsx("path",{d:"M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"})})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Align left",active:o.isActive({textAlign:"left"}),className:e.toolbar.alignLeft,onClick:()=>o.chain().focus().setTextAlign("left").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z"})}),jsx(n,{"aria-label":"Align center",active:o.isActive({textAlign:"center"}),className:e.toolbar.alignCenter,onClick:()=>o.chain().focus().setTextAlign("center").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z"})}),jsx(n,{"aria-label":"Align right",active:o.isActive({textAlign:"right"}),className:e.toolbar.alignRight,onClick:()=>o.chain().focus().setTextAlign("right").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z"})}),jsx(n,{"aria-label":"Align justify",active:o.isActive({textAlign:"justify"}),className:e.toolbar.alignJustify,onClick:()=>o.chain().focus().setTextAlign("justify").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z"})})]}),a&&jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Align justify",active:o.isActive("code"),className:e.toolbar.code,onClick:()=>o.chain().focus().toggleCode().run(),icon:jsx("path",{d:"M16.95 8.46448L18.3642 7.05026L23.3139 12L18.3642 16.9498L16.95 15.5355L20.4855 12L16.95 8.46448ZM7.05048 8.46448L3.51495 12L7.05048 15.5355L5.63627 16.9498L0.686523 12L5.63627 7.05026L7.05048 8.46448Z"})}),jsx(n,{"aria-label":"Align justify",active:o.isActive("codeBlock"),className:e.toolbar.codeBlock,onClick:()=>o.chain().focus().toggleCodeBlock().run(),icon:jsx("path",{d:"M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM4 5V19H20V5H4ZM20 12L16.4645 15.5355L15.0503 14.1213L17.1716 12L15.0503 9.87868L16.4645 8.46447L20 12ZM6.82843 12L8.94975 14.1213L7.53553 15.5355L4 12L7.53553 8.46447L8.94975 9.87868L6.82843 12ZM11.2443 17H9.11597L12.7557 7H14.884L11.2443 17Z"})})]}),a&&jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Blockquote",active:o.isActive("blockquote"),className:e.toolbar.blockquote,onClick:()=>o.chain().focus().toggleBlockquote().run(),icon:jsx("path",{d:"M4.58341 17.3211C3.55316 16.2274 3 15 3 13.0103C3 9.51086 5.45651 6.37366 9.03059 4.82318L9.92328 6.20079C6.58804 8.00539 5.93618 10.346 5.67564 11.822C6.21263 11.5443 6.91558 11.4466 7.60471 11.5105C9.40908 11.6778 10.8312 13.159 10.8312 15C10.8312 16.933 9.26416 18.5 7.33116 18.5C6.2581 18.5 5.23196 18.0095 4.58341 17.3211ZM14.5834 17.3211C13.5532 16.2274 13 15 13 13.0103C13 9.51086 15.4565 6.37366 19.0306 4.82318L19.9233 6.20079C16.588 8.00539 15.9362 10.346 15.6756 11.822C16.2126 11.5443 16.9156 11.4466 17.6047 11.5105C19.4091 11.6778 20.8312 13.159 20.8312 15C20.8312 16.933 19.2642 18.5 17.3312 18.5C16.2581 18.5 15.232 18.0095 14.5834 17.3211Z"})}),jsx(n,{"aria-label":"Horizontal",className:e.toolbar.hr,onClick:()=>o.chain().focus().setHorizontalRule().run(),icon:jsx("path",{d:"M2 11H4V13H2V11ZM6 11H18V13H6V11ZM20 11H22V13H20V11Z"})})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(R,{editor:o}),jsx(P,{editor:o})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"HardBreak",onClick:()=>o.chain().focus().setHardBreak().run(),className:e.toolbar.hardbreak,icon:jsx("path",{d:"M15 18H16.5C17.8807 18 19 16.8807 19 15.5C19 14.1193 17.8807 13 16.5 13H3V11H16.5C18.9853 11 21 13.0147 21 15.5C21 17.9853 18.9853 20 16.5 20H15V22L11 19L15 16V18ZM3 4H21V6H3V4ZM9 18V20H3V18H9Z"})}),jsx(n,{"aria-label":"Clear",className:e.toolbar.clear,onClick:()=>o.chain().focus().clearNodes().unsetAllMarks().run(),icon:jsx("path",{d:"M12.6512 14.0654L11.6047 20H9.57389L10.9247 12.339L3.51465 4.92892L4.92886 3.51471L20.4852 19.0711L19.071 20.4853L12.6512 14.0654ZM11.7727 7.53009L12.0425 5.99999H10.2426L8.24257 3.99999H19.9999V5.99999H14.0733L13.4991 9.25652L11.7727 7.53009Z"})})]}),a&&jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Undo",className:e.toolbar.undo,disabled:!o.can().chain().focus().undo().run(),onClick:()=>o.chain().focus().undo().run(),icon:jsx("path",{d:"M8 7V11L2 6L8 1V5H13C17.4183 5 21 8.58172 21 13C21 17.4183 17.4183 21 13 21H4V19H13C16.3137 19 19 16.3137 19 13C19 9.68629 16.3137 7 13 7H8Z"})}),jsx(n,{"aria-label":"Redo",className:e.toolbar.redo,disabled:!o.can().chain().focus().redo().run(),onClick:()=>o.chain().focus().redo().run(),icon:jsx("path",{d:"M16 7H11C7.68629 7 5 9.68629 5 13C5 16.3137 7.68629 19 11 19H20V21H11C6.58172 21 3 17.4183 3 13C3 8.58172 6.58172 5 11 5H16V1L22 6L16 11V7Z"})})]}),jsx(d,{direction:"row",spacing:.5,children:jsx(n,{"aria-label":"Fullscreen",className:e.toolbar.fullscreen,onClick:t,icon:i?jsx("path",{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"}):jsx("path",{d:"M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z"})})})]}):null;var Fo=forwardRef(({sx:o,error:a,onChange:i,slotProps:t,helperText:l,resetValue:s,editable:p=!0,fullItem:g=!1,value:c="",placeholder:L="Write something awesome...",...N},$)=>{let[h,z]=useState(!1),W=useCallback(()=>{z(_=>!_);},[]),U=createLowlight(common),f=useEditor({content:c,editable:p,extensions:[zo.configure({codeBlock:!1,code:{HTMLAttributes:{class:e.content.codeInline}},heading:{HTMLAttributes:{class:e.content.heading}},horizontalRule:{HTMLAttributes:{class:e.content.hr}},listItem:{HTMLAttributes:{class:e.content.listItem}},blockquote:{HTMLAttributes:{class:e.content.blockquote}},bulletList:{HTMLAttributes:{class:e.content.bulletList}},orderedList:{HTMLAttributes:{class:e.content.orderedList}}}),wo.configure({placeholder:L,emptyEditorClass:e.content.placeholder}),Eo.configure({HTMLAttributes:{class:e.content.image}}),Ro.configure({types:["heading","paragraph"]}),Po.configure({autolink:!0,openOnClick:!1,HTMLAttributes:{class:e.content.link}}),Ao.extend({addNodeView(){return ReactNodeViewRenderer(T)}}).configure({lowlight:U,HTMLAttributes:{class:e.content.codeBlock}})],onUpdate({editor:_}){let F=_.getHTML();i?.(F);},...N});return useEffect(()=>{let _=setTimeout(()=>{f?.isEmpty&&c!=="<p></p>"&&f.commands.setContent(c);},100);return ()=>clearTimeout(_)},[c,f]),useEffect(()=>{s&&!c&&f?.commands.clearContent();},[c]),useEffect(()=>{h?document.body.style.overflow="hidden":document.body.style.overflow="";},[h]),jsxs(To,{disablePortal:!h,children:[h&&jsx(Zo,{open:!0,sx:{zIndex:_=>_.zIndex.modal-1}}),jsxs(d,{sx:{...!p&&{cursor:"not-allowed"},...t?.wrap},children:[jsxs(S,{error:!!a,disabled:!p,fullScreen:h,className:e.root,sx:o,children:[jsx(I,{editor:f,fullItem:g,fullScreen:h,onToggleFullScreen:W}),jsx(EditorContent,{ref:$,spellCheck:"false",autoComplete:"off",autoCapitalize:"off",editor:f,className:e.content.root})]}),l&&jsx(Bo,{error:!!a,sx:{px:2},children:l})]})]})});Fo.displayName="Editor";
|
|
28
|
+
var e={root:"nml__editor__root",toolbar:{hr:"nml__editor__toolbar__hr",root:"nml__editor__toolbar__root",bold:"nml__editor__toolbar__bold",code:"nml__editor__toolbar__code",undo:"nml__editor__toolbar__undo",redo:"nml__editor__toolbar__redo",link:"nml__editor__toolbar__link",clear:"nml__editor__toolbar__clear",image:"nml__editor__toolbar__image",italic:"nml__editor__toolbar__italic",strike:"nml__editor__toolbar__strike",hardbreak:"nml__editor__toolbar__hardbreak",unsetlink:"nml__editor__toolbar__unsetlink",codeBlock:"nml__editor__toolbar__code__block",alignLeft:"nml__editor__toolbar__align__left",fullscreen:"nml__editor__toolbar__fullscreen",blockquote:"nml__editor__toolbar__blockquote",bulletList:"nml__editor__toolbar__bullet__list",alignRight:"nml__editor__toolbar__align__right",orderedList:"nml__editor__toolbar__ordered__list",alignCenter:"nml__editor__toolbar__align__center",alignJustify:"nml__editor__toolbar__align__justify"},content:{hr:"nml__editor__content__hr",root:"nml__editor__content__root",link:"nml__editor__content__link",image:"nml__editor__content__image",codeInline:"nml__editor__content__code",heading:"nml__editor__content__heading",listItem:"nml__editor__content__listItem",codeBlock:"nml__editor__content__code__block",blockquote:"nml__editor__content__blockquote",langSelect:"nml__editor__content__lang__select",placeholder:"nml__editor__content__placeholder",bulletList:"nml__editor__content__bullet__list",orderedList:"nml__editor__content__ordered__list"}};var T=({node:{attrs:{language:o}},extension:a,updateAttributes:i})=>jsxs(NodeViewWrapper,{className:e.content.codeBlock,children:[jsxs("select",{name:"language",contentEditable:!1,defaultValue:o,onChange:t=>i({language:t.target.value}),className:e.content.langSelect,children:[jsx("option",{value:"null",children:"auto"}),jsx("option",{disabled:!0,children:"\u2014"}),a.options.lowlight.listLanguages().map(t=>jsx("option",{value:t,children:t},t))]}),jsx("pre",{children:jsx(NodeViewContent,{as:"code"})})]});var G="0.75em",S=styled(d,{shouldForwardProp:o=>o!=="error"&&o!=="disabled"&&o!=="fullScreen"})(({error:o,disabled:a,fullScreen:i,theme:t})=>({minHeight:240,borderRadius:t.shape.borderRadius,border:`solid 1px ${varAlpha(t.vars.palette.grey["500Channel"],.2)}`,scrollbarWidth:"thin",scrollbarColor:`${varAlpha(t.vars.palette.text.disabledChannel,.4)} ${varAlpha(t.vars.palette.text.disabledChannel,.08)}`,...o&&{border:`solid 1px ${t.vars.palette.error.main}`},...a&&{opacity:.48,pointerEvents:"none"},...i&&{top:16,left:16,position:"fixed",zIndex:t.zIndex.modal,maxHeight:"unset !important",width:"calc(100% - 32px)",height:"calc(100% - 32px)",backgroundColor:t.vars.palette.background.default},[`& .${e.content.placeholder}`]:{"&:first-of-type::before":{...t.typography.body2,height:0,float:"left",pointerEvents:"none",content:"attr(data-placeholder)",color:t.vars.palette.text.disabled}},[`& .${e.content.root}`]:{display:"flex",flex:"1 1 auto",overflowY:"auto",flexDirection:"column",borderBottomLeftRadius:"inherit",borderBottomRightRadius:"inherit",backgroundColor:varAlpha(t.vars.palette.grey["500Channel"],.08),...o&&{backgroundColor:varAlpha(t.vars.palette.error.mainChannel,.08)},"& .tiptap":{"> * + *":{marginTop:0,marginBottom:G},"&.ProseMirror":{flex:"1 1 auto",outline:"none",padding:t.spacing(0,2)},h1:{...t.typography.h1,marginTop:40,marginBottom:8},h2:{...t.typography.h2,marginTop:40,marginBottom:8},h3:{...t.typography.h3,marginTop:24,marginBottom:8},h4:{...t.typography.h4,marginTop:24,marginBottom:8},h5:{...t.typography.h5,marginTop:24,marginBottom:8},h6:{...t.typography.h6,marginTop:24,marginBottom:8},p:{...t.typography.body1,marginBottom:"1.25rem"},[`& .${e.content.heading}`]:{},[`& .${e.content.link}`]:{color:t.vars.palette.primary.main},[`& .${e.content.hr}`]:{flexShrink:0,borderWidth:0,margin:"2em 0",msFlexNegative:0,WebkitFlexShrink:0,borderStyle:"solid",borderBottomWidth:"thin",borderColor:t.vars.palette.divider},[`& .${e.content.image}`]:{width:"100%",height:"auto",maxWidth:"100%",margin:"auto auto 1.25em"},[`& .${e.content.bulletList}`]:{paddingLeft:16,listStyleType:"disc"},[`& .${e.content.orderedList}`]:{paddingLeft:16},[`& .${e.content.listItem}`]:{lineHeight:2,"& > p":{margin:0,display:"inline-block"}},[`& .${e.content.blockquote}`]:{lineHeight:1.5,fontSize:"1.5em",margin:"24px auto",position:"relative",fontFamily:"Georgia, serif",padding:t.spacing(3,3,3,8),color:t.vars.palette.text.secondary,borderLeft:`solid 8px ${varAlpha(t.vars.palette.grey["500Channel"],.08)}`,[t.breakpoints.up("md")]:{width:"100%",maxWidth:640},"& p":{margin:0,fontSize:"inherit",fontFamily:"inherit"},"&::before":{left:16,top:-8,display:"block",fontSize:"3em",content:'"\\201C"',position:"absolute",color:t.vars.palette.text.disabled}},[`& .${e.content.codeInline}`]:{padding:t.spacing(.25,.5),color:t.vars.palette.text.secondary,fontSize:t.typography.body2.fontSize,borderRadius:t.shape.borderRadius/2,backgroundColor:varAlpha(t.vars.palette.grey["500Channel"],.2)},[`& .${e.content.codeBlock}`]:{position:"relative","& pre":{overflowX:"auto",color:t.vars.palette.common.white,padding:t.spacing(5,3,3,3),borderRadius:t.shape.borderRadius,backgroundColor:t.vars.palette.grey[900],fontFamily:"'JetBrainsMono', monospace","& code":{fontSize:t.typography.body2.fontSize}},[`& .${e.content.langSelect}`]:{top:8,right:8,zIndex:1,padding:4,outline:"none",borderRadius:4,position:"absolute",color:t.vars.palette.common.white,fontWeight:t.typography.fontWeightMedium,borderColor:varAlpha(t.vars.palette.grey["500Channel"],.08),backgroundColor:varAlpha(t.vars.palette.grey["500Channel"],.08)}}}}}));var n=({sx:o,icon:a,label:i,active:t,disabled:l,...s})=>jsxs(J,{sx:{px:.75,width:28,height:28,borderRadius:.75,typography:"body2","&:hover":{bgcolor:"action.hover"},...t&&{bgcolor:"action.selected"},...l&&{pointerEvents:"none",cursor:"not-allowed",opacity:.48},...o},...s,children:[a&&jsx(j,{sx:{fontSize:18},children:a}),i&&i]});var no=["Heading 1","Heading 2","Heading 3","Heading 4","Heading 5","Heading 6"],A=({editor:o})=>{let[a,i]=useState(null),t=s=>{i(s.currentTarget);},l=()=>{i(null);};return o?jsxs(Fragment,{children:[jsxs(J,{id:"heading-menu-button","aria-label":"Heading menu button","aria-controls":a?"heading-menu-button":void 0,"aria-haspopup":"true","aria-expanded":a?"true":void 0,onClick:t,sx:{px:1,width:120,height:32,borderRadius:.75,typography:"body2",justifyContent:"space-between",border:s=>`solid 1px ${varAlpha(s.vars.palette.grey["500Channel"],.2)}`},children:[o.isActive("heading",{level:1})&&"Heading 1"||o.isActive("heading",{level:2})&&"Heading 2"||o.isActive("heading",{level:3})&&"Heading 3"||o.isActive("heading",{level:4})&&"Heading 4"||o.isActive("heading",{level:5})&&"Heading 5"||o.isActive("heading",{level:6})&&"Heading 6"||"Paragraph",jsx(ro,{width:16,icon:a?"ARROW_UP_SIMPLE":"ARROW_DOWN_SIMPLE"})]}),jsxs(eo,{id:"heading-menu",anchorEl:a,open:!!a,onClose:l,MenuListProps:{"aria-labelledby":"heading-button"},slotProps:{paper:{sx:{width:120,[`& .${listClasses.root}`]:{gap:.5,display:"flex",flexDirection:"column"},[`& .${buttonBaseClasses.root}`]:{px:1,width:1,height:34,borderRadius:.75,justifyContent:"flex-start","&:hover":{backgroundColor:"action.hover"}}}}},children:[jsx(n,{component:"li",label:"Paragraph",active:o.isActive("paragraph"),onClick:()=>{l(),o.chain().focus().setParagraph().run();}}),no.map((s,p)=>{let g=p+1;return jsx(n,{"aria-label":s,component:"li",label:s,active:o.isActive("heading",{level:g}),onClick:()=>{l(),o.chain().focus().toggleHeading({level:g}).run();},sx:{...s!=="Paragraph"&&{fontSize:18-p,fontWeight:"fontWeightBold"}}},s)})]})]}):null};var P=({editor:o})=>{let[a,i]=useState(""),[t,l]=useState(null),s=c=>{l(c.currentTarget);},p=()=>{l(null);},g=useCallback(()=>{p(),t&&o?.chain().focus().setImage({src:a}).run();},[t,o,a]);return o?jsxs(Fragment,{children:[jsx(n,{"aria-label":"Image",className:e.toolbar.image,onClick:s,icon:jsx("path",{d:"M20 5H4V19L13.2923 9.70649C13.6828 9.31595 14.3159 9.31591 14.7065 9.70641L20 15.0104V5ZM2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z"})}),jsxs(co,{id:t?"simple-popover":void 0,open:!!t,anchorEl:t,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{sx:{p:2.5}}},children:[jsx(uo,{variant:"subtitle2",sx:{mb:1},children:"URL"}),jsxs(d,{direction:"row",alignItems:"center",spacing:1,children:[jsx(mo,{size:"small",placeholder:"Enter URL here...",value:a,onChange:c=>{i(c.target.value);},sx:{width:240}}),jsx(so,{variant:"contained",onClick:g,children:"Apply"})]})]})]}):null};var R=({editor:o})=>{let[a,i]=useState(""),[t,l]=useState(null),s=c=>{let L=o?.getAttributes("link").href;l(c.currentTarget),i(L||"");},p=()=>{l(null);},g=useCallback(()=>{p(),a?o?.chain().focus().extendMarkRange("link").setLink({href:a}).run():o?.chain().focus().extendMarkRange("link").unsetLink().run();},[o,a]);return o?jsxs(Fragment,{children:[jsx(n,{"aria-label":"Link",active:o.isActive("link"),className:e.toolbar.link,onClick:s,icon:jsx("path",{d:"M17.6567 14.8284L16.2425 13.4142L17.6567 12C19.2188 10.4379 19.2188 7.90524 17.6567 6.34314C16.0946 4.78105 13.5619 4.78105 11.9998 6.34314L10.5856 7.75736L9.17139 6.34314L10.5856 4.92893C12.9287 2.58578 16.7277 2.58578 19.0709 4.92893C21.414 7.27208 21.414 11.0711 19.0709 13.4142L17.6567 14.8284ZM14.8282 17.6569L13.414 19.0711C11.0709 21.4142 7.27189 21.4142 4.92875 19.0711C2.5856 16.7279 2.5856 12.9289 4.92875 10.5858L6.34296 9.17157L7.75717 10.5858L6.34296 12C4.78086 13.5621 4.78086 16.0948 6.34296 17.6569C7.90506 19.2189 10.4377 19.2189 11.9998 17.6569L13.414 16.2426L14.8282 17.6569ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z"})}),jsx(n,{"aria-label":"Unset link",disabled:!o.isActive("link"),className:e.toolbar.unsetlink,onClick:()=>o.chain().focus().unsetLink().run(),icon:jsx("path",{d:"M17.657 14.8284L16.2428 13.4142L17.657 12C19.2191 10.4379 19.2191 7.90526 17.657 6.34316C16.0949 4.78106 13.5622 4.78106 12.0001 6.34316L10.5859 7.75737L9.17171 6.34316L10.5859 4.92895C12.9291 2.5858 16.7281 2.5858 19.0712 4.92895C21.4143 7.27209 21.4143 11.0711 19.0712 13.4142L17.657 14.8284ZM14.8286 17.6569L13.4143 19.0711C11.0712 21.4142 7.27221 21.4142 4.92907 19.0711C2.58592 16.7279 2.58592 12.9289 4.92907 10.5858L6.34328 9.17159L7.75749 10.5858L6.34328 12C4.78118 13.5621 4.78118 16.0948 6.34328 17.6569C7.90538 19.219 10.438 19.219 12.0001 17.6569L13.4143 16.2427L14.8286 17.6569ZM14.8286 7.75737L16.2428 9.17159L9.17171 16.2427L7.75749 14.8284L14.8286 7.75737ZM5.77539 2.29291L7.70724 1.77527L8.74252 5.63897L6.81067 6.15661L5.77539 2.29291ZM15.2578 18.3611L17.1896 17.8434L18.2249 21.7071L16.293 22.2248L15.2578 18.3611ZM2.29303 5.77527L6.15673 6.81054L5.63909 8.7424L1.77539 7.70712L2.29303 5.77527ZM18.3612 15.2576L22.2249 16.2929L21.7072 18.2248L17.8435 17.1895L18.3612 15.2576Z"})}),jsxs(co,{id:t?"simple-popover":void 0,open:!!t,anchorEl:t,onClose:p,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{sx:{p:2.5}}},children:[jsx(uo,{variant:"subtitle2",sx:{mb:1},children:"URL"}),jsxs(d,{direction:"row",alignItems:"center",spacing:1,children:[jsx(mo,{size:"small",placeholder:"Enter URL here...",value:a,onChange:c=>{i(c.target.value);},sx:{width:240}}),jsx(so,{variant:"contained",onClick:g,children:"Apply"})]})]})]}):null};var I=({editor:o,fullItem:a,fullScreen:i,onToggleFullScreen:t})=>o?jsxs(d,{spacing:1,direction:"row",flexWrap:"wrap",alignItems:"center",divider:jsx(ko,{orientation:"vertical",flexItem:!0,sx:{height:16,my:"auto"}}),className:e.toolbar.root,sx:{p:1.25,bgcolor:"background.paper",borderTopRightRadius:"inherit",borderTopLeftRadius:"inherit",borderBottom:l=>`solid 1px ${varAlpha(l.vars.palette.grey["500Channel"],.2)}`},children:[jsx(A,{editor:o}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Bold",active:o.isActive("bold"),className:e.toolbar.bold,onClick:()=>o.chain().focus().toggleBold().run(),icon:jsx("path",{d:"M8 11H12.5C13.8807 11 15 9.88071 15 8.5C15 7.11929 13.8807 6 12.5 6H8V11ZM18 15.5C18 17.9853 15.9853 20 13.5 20H6V4H12.5C14.9853 4 17 6.01472 17 8.5C17 9.70431 16.5269 10.7981 15.7564 11.6058C17.0979 12.3847 18 13.837 18 15.5ZM8 13V18H13.5C14.8807 18 16 16.8807 16 15.5C16 14.1193 14.8807 13 13.5 13H8Z"})}),jsx(n,{"aria-label":"Italic",active:o.isActive("italic"),className:e.toolbar.italic,onClick:()=>o.chain().focus().toggleItalic().run(),icon:jsx("path",{d:"M15 20H7V18H9.92661L12.0425 6H9V4H17V6H14.0734L11.9575 18H15V20Z"})}),jsx(n,{"aria-label":"Strike",active:o.isActive("strike"),className:e.toolbar.italic,onClick:()=>o.chain().focus().toggleStrike().run(),icon:jsx("path",{d:"M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z"})})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Bullet list",active:o.isActive("bulletList"),className:e.toolbar.bulletList,onClick:()=>o.chain().focus().toggleBulletList().run(),icon:jsx("path",{d:"M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"})}),jsx(n,{"aria-label":"Ordered list",active:o.isActive("orderedList"),className:e.toolbar.orderedList,onClick:()=>o.chain().focus().toggleOrderedList().run(),icon:jsx("path",{d:"M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z"})})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Align left",active:o.isActive({textAlign:"left"}),className:e.toolbar.alignLeft,onClick:()=>o.chain().focus().setTextAlign("left").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z"})}),jsx(n,{"aria-label":"Align center",active:o.isActive({textAlign:"center"}),className:e.toolbar.alignCenter,onClick:()=>o.chain().focus().setTextAlign("center").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z"})}),jsx(n,{"aria-label":"Align right",active:o.isActive({textAlign:"right"}),className:e.toolbar.alignRight,onClick:()=>o.chain().focus().setTextAlign("right").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z"})}),jsx(n,{"aria-label":"Align justify",active:o.isActive({textAlign:"justify"}),className:e.toolbar.alignJustify,onClick:()=>o.chain().focus().setTextAlign("justify").run(),icon:jsx("path",{d:"M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z"})})]}),a&&jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Align justify",active:o.isActive("code"),className:e.toolbar.code,onClick:()=>o.chain().focus().toggleCode().run(),icon:jsx("path",{d:"M16.95 8.46448L18.3642 7.05026L23.3139 12L18.3642 16.9498L16.95 15.5355L20.4855 12L16.95 8.46448ZM7.05048 8.46448L3.51495 12L7.05048 15.5355L5.63627 16.9498L0.686523 12L5.63627 7.05026L7.05048 8.46448Z"})}),jsx(n,{"aria-label":"Align justify",active:o.isActive("codeBlock"),className:e.toolbar.codeBlock,onClick:()=>o.chain().focus().toggleCodeBlock().run(),icon:jsx("path",{d:"M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM4 5V19H20V5H4ZM20 12L16.4645 15.5355L15.0503 14.1213L17.1716 12L15.0503 9.87868L16.4645 8.46447L20 12ZM6.82843 12L8.94975 14.1213L7.53553 15.5355L4 12L7.53553 8.46447L8.94975 9.87868L6.82843 12ZM11.2443 17H9.11597L12.7557 7H14.884L11.2443 17Z"})})]}),a&&jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Blockquote",active:o.isActive("blockquote"),className:e.toolbar.blockquote,onClick:()=>o.chain().focus().toggleBlockquote().run(),icon:jsx("path",{d:"M4.58341 17.3211C3.55316 16.2274 3 15 3 13.0103C3 9.51086 5.45651 6.37366 9.03059 4.82318L9.92328 6.20079C6.58804 8.00539 5.93618 10.346 5.67564 11.822C6.21263 11.5443 6.91558 11.4466 7.60471 11.5105C9.40908 11.6778 10.8312 13.159 10.8312 15C10.8312 16.933 9.26416 18.5 7.33116 18.5C6.2581 18.5 5.23196 18.0095 4.58341 17.3211ZM14.5834 17.3211C13.5532 16.2274 13 15 13 13.0103C13 9.51086 15.4565 6.37366 19.0306 4.82318L19.9233 6.20079C16.588 8.00539 15.9362 10.346 15.6756 11.822C16.2126 11.5443 16.9156 11.4466 17.6047 11.5105C19.4091 11.6778 20.8312 13.159 20.8312 15C20.8312 16.933 19.2642 18.5 17.3312 18.5C16.2581 18.5 15.232 18.0095 14.5834 17.3211Z"})}),jsx(n,{"aria-label":"Horizontal",className:e.toolbar.hr,onClick:()=>o.chain().focus().setHorizontalRule().run(),icon:jsx("path",{d:"M2 11H4V13H2V11ZM6 11H18V13H6V11ZM20 11H22V13H20V11Z"})})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(R,{editor:o}),jsx(P,{editor:o})]}),jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"HardBreak",onClick:()=>o.chain().focus().setHardBreak().run(),className:e.toolbar.hardbreak,icon:jsx("path",{d:"M15 18H16.5C17.8807 18 19 16.8807 19 15.5C19 14.1193 17.8807 13 16.5 13H3V11H16.5C18.9853 11 21 13.0147 21 15.5C21 17.9853 18.9853 20 16.5 20H15V22L11 19L15 16V18ZM3 4H21V6H3V4ZM9 18V20H3V18H9Z"})}),jsx(n,{"aria-label":"Clear",className:e.toolbar.clear,onClick:()=>o.chain().focus().clearNodes().unsetAllMarks().run(),icon:jsx("path",{d:"M12.6512 14.0654L11.6047 20H9.57389L10.9247 12.339L3.51465 4.92892L4.92886 3.51471L20.4852 19.0711L19.071 20.4853L12.6512 14.0654ZM11.7727 7.53009L12.0425 5.99999H10.2426L8.24257 3.99999H19.9999V5.99999H14.0733L13.4991 9.25652L11.7727 7.53009Z"})})]}),a&&jsxs(d,{direction:"row",spacing:.5,children:[jsx(n,{"aria-label":"Undo",className:e.toolbar.undo,disabled:!o.can().chain().focus().undo().run(),onClick:()=>o.chain().focus().undo().run(),icon:jsx("path",{d:"M8 7V11L2 6L8 1V5H13C17.4183 5 21 8.58172 21 13C21 17.4183 17.4183 21 13 21H4V19H13C16.3137 19 19 16.3137 19 13C19 9.68629 16.3137 7 13 7H8Z"})}),jsx(n,{"aria-label":"Redo",className:e.toolbar.redo,disabled:!o.can().chain().focus().redo().run(),onClick:()=>o.chain().focus().redo().run(),icon:jsx("path",{d:"M16 7H11C7.68629 7 5 9.68629 5 13C5 16.3137 7.68629 19 11 19H20V21H11C6.58172 21 3 17.4183 3 13C3 8.58172 6.58172 5 11 5H16V1L22 6L16 11V7Z"})})]}),jsx(d,{direction:"row",spacing:.5,children:jsx(n,{"aria-label":"Fullscreen",className:e.toolbar.fullscreen,onClick:t,icon:i?jsx("path",{d:"M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z"}):jsx("path",{d:"M16 3H22V9H20V5H16V3ZM2 3H8V5H4V9H2V3ZM20 19V15H22V21H16V19H20ZM4 19H8V21H2V15H4V19Z"})})})]}):null;var Fo=createLowlight(common),Oo=memo(forwardRef(({sx:o,error:a,onChange:i,slotProps:t,helperText:l,resetValue:s,editable:p=!0,fullItem:g=!1,value:c="",placeholder:L="Write something awesome...",...N},$)=>{let[h,z]=useState(!1),W=useCallback(()=>{z(_=>!_);},[]),f=useEditor({content:c,editable:p,extensions:[zo.configure({codeBlock:!1,code:{HTMLAttributes:{class:e.content.codeInline}},heading:{HTMLAttributes:{class:e.content.heading}},horizontalRule:{HTMLAttributes:{class:e.content.hr}},listItem:{HTMLAttributes:{class:e.content.listItem}},blockquote:{HTMLAttributes:{class:e.content.blockquote}},bulletList:{HTMLAttributes:{class:e.content.bulletList}},orderedList:{HTMLAttributes:{class:e.content.orderedList}}}),wo.configure({placeholder:L,emptyEditorClass:e.content.placeholder}),Eo.configure({HTMLAttributes:{class:e.content.image}}),Ro.configure({types:["heading","paragraph"]}),Po.configure({autolink:!0,openOnClick:!1,HTMLAttributes:{class:e.content.link}}),Ao.extend({addNodeView(){return ReactNodeViewRenderer(T)}}).configure({lowlight:Fo,HTMLAttributes:{class:e.content.codeBlock}})],onUpdate({editor:_}){let U=_.getHTML();i?.(U);},...N});return useEffect(()=>{let _=setTimeout(()=>{f?.isEmpty&&c!=="<p></p>"&&f.commands.setContent(c);},100);return ()=>clearTimeout(_)},[c,f]),useEffect(()=>{s&&!c&&f?.commands.clearContent();},[c]),useEffect(()=>{h?document.body.style.overflow="hidden":document.body.style.overflow="";},[h]),jsxs(To,{disablePortal:!h,children:[h&&jsx(Zo,{open:!0,sx:{zIndex:_=>_.zIndex.modal-1}}),jsxs(d,{sx:{...!p&&{cursor:"not-allowed"},...t?.wrap},children:[jsxs(S,{error:!!a,disabled:!p,fullScreen:h,className:e.root,sx:o,children:[jsx(I,{editor:f,fullItem:g,fullScreen:h,onToggleFullScreen:W}),jsx(EditorContent,{ref:$,spellCheck:"false",autoComplete:"off",autoCapitalize:"off",editor:f,className:e.content.root})]}),l&&jsx(Bo,{error:!!a,sx:{px:2},children:l})]})]})}));Oo.displayName="Editor";
|
|
29
29
|
|
|
30
|
-
export { e as a,
|
|
30
|
+
export { e as a, Oo as b };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { StackProps } from '@mui/material/Stack';
|
|
3
4
|
|
|
4
|
-
declare const MySubscriptionConfigsLayoutHeader: () => react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare const MySubscriptionConfigsLayoutHeader: ({ ...props }: StackProps) => react_jsx_runtime.JSX.Element;
|
|
5
6
|
|
|
6
7
|
interface HeaderProps {
|
|
7
8
|
backPath?: string;
|
|
@@ -3,13 +3,13 @@ import g from '@mui/material/Stack';
|
|
|
3
3
|
import F from '@zydon/common/components/IconButton';
|
|
4
4
|
import L from '@zydon/common/components/Portal';
|
|
5
5
|
import { memo } from 'react';
|
|
6
|
-
import
|
|
6
|
+
import x from '@mui/material/Link';
|
|
7
7
|
import d from '@mui/material/Typography';
|
|
8
|
-
import
|
|
8
|
+
import S from '@zydon/common/components/Icon';
|
|
9
9
|
import h from '@mui/material/Breadcrumbs';
|
|
10
10
|
import { styled, alpha } from '@mui/material/styles';
|
|
11
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
|
-
var m=styled(h)(({theme:o})=>({"& .MuiBreadcrumbs-separator":{marginLeft:o.spacing(-1),marginRight:o.spacing(-1)}}));var
|
|
13
|
+
var m=styled(h)(({theme:o})=>({"& .MuiBreadcrumbs-separator":{marginLeft:o.spacing(-1),marginRight:o.spacing(-1)}}));var b=({title:o,breadcrumbs:r})=>jsxs(g,{children:[jsx(d,{variant:"subtitle1",fontSize:"subtitle1.fontSize",color:"text.primary",children:o}),r&&jsx(m,{"aria-label":"breadcrumb",separator:jsx(S,{icon:"CHEVRON_RIGHT",width:18,color:"text.secondary"}),children:r.map((t,a)=>a===r.length-1||t.path===""?jsx(d,{variant:"caption",fontWeight:400,color:t.path===""?"text.disabled":void 0,children:t.label},t.label):jsx(x,{href:t.path,underline:"hover",variant:"caption",fontWeight:400,color:"text.secondary",children:t.label},t.label))})]}),l=memo(b);var s=styled(g)(({theme:o})=>({width:"100%",height:"fit-content",minHeight:71,flexDirection:"row",alignItems:"center",padding:o.spacing(0,3),gap:o.spacing(2),borderBottom:`1px solid ${o.palette.divider}`,zIndex:9,backgroundColor:o.palette.background.paper}));var P=({...o})=>jsx(s,{position:"sticky",top:0,...o,children:jsx(g,{flexGrow:1,width:"100%",id:n})}),B=P;var f=styled(g)(({theme:o})=>({flexDirection:"row",alignItems:"center",gap:o.spacing(1),color:o.palette.text.secondary,[o.breakpoints.up("md")]:{gap:o.spacing(3)},[o.breakpoints.down("md")]:{"& button, & a":{textIndent:"-9999em",fontSize:0,minWidth:36,maxWidth:36,height:36,width:36,overflow:"hidden","& .MuiButton-icon":{margin:0}},"& a":{border:`1px solid ${alpha(o.palette.grey[500],.2)}`}}}));var n="CONFIGS_HEADER",W=({children:o,backPath:r,title:t,breadcrumbs:a,actions:p})=>jsx(L,{container:n,children:jsxs(g,{direction:"row",alignItems:"center",justifyContent:"space-between",gap:1,children:[jsxs(g,{direction:"row",alignItems:"center",gap:1,children:[r&&jsx(F,{component:Link,to:r,label:"Voltar",icon:"CHEVRON_LEFT",color:"text.primary",size:"small"}),jsx(l,{title:t,breadcrumbs:a}),o]}),p&&jsx(f,{children:p})]})}),fo=W;
|
|
14
14
|
|
|
15
|
-
export { n as CONFIGS_HEADER,
|
|
15
|
+
export { n as CONFIGS_HEADER, B as Header, fo as default };
|
|
@@ -50,7 +50,7 @@ declare const editorClasses: {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
declare const Editor: react.
|
|
53
|
+
declare const Editor: react.NamedExoticComponent<Partial<_tiptap_react.UseEditorOptions> & {
|
|
54
54
|
value?: string | undefined;
|
|
55
55
|
error?: boolean | undefined;
|
|
56
56
|
fullItem?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { b as Editor, a as editorClasses } from '../../chunk-
|
|
1
|
+
export { b as Editor, a as editorClasses } from '../../chunk-C5KPGXFY.js';
|
|
@@ -21,6 +21,6 @@ type ImageProps = BoxProps & LazyLoadImageProps & {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
declare const Image: react.
|
|
24
|
+
declare const Image: react.NamedExoticComponent<Omit<ImageProps, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
25
25
|
|
|
26
26
|
export { Image, ImageProps, ImageRatioType, imageClasses };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
1
|
+
import { memo, forwardRef } from 'react';
|
|
2
2
|
import { LazyLoadImage } from 'react-lazy-load-image-component';
|
|
3
3
|
import s from '@mui/material/Box';
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
var o={root:"mnl__image__root",wrapper:"mnl__image__wrapper",overlay:"mnl__image__overlay"};var
|
|
7
|
+
var o={root:"mnl__image__root",wrapper:"mnl__image__wrapper",overlay:"mnl__image__overlay"};var E=styled(s)({overflow:"hidden",position:"relative",display:"inline-block",[`& .${o.wrapper}`]:{width:"100%",height:"100%",backgroundSize:"cover !important"}}),b=styled("span")({top:0,left:0,zIndex:1,width:"100%",height:"100%",position:"absolute"}),z=memo(forwardRef(({ratio:a,disabledEffect:r=!1,alt:m,src:i,delayTime:l,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,effect:y="blur",visibleByDefault:e,wrapperClassName:w,useIntersectionObserver:D,slotProps:t,sx:v,...C},x)=>{let F=jsx(s,{component:LazyLoadImage,alt:m,src:i,delayTime:l,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,visibleByDefault:e,effect:e||r?void 0:y,useIntersectionObserver:D,wrapperClassName:w||o.wrapper,placeholderSrc:e||r?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=":"data:image/svg+xml,%3Csvg%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%3CradialGradient%20id%3D%22a%22%20cx%3D%2250%25%22%20cy%3D%2246.801102%25%22%20r%3D%2295.497112%25%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22%20%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23919eab%22%20stop-opacity%3D%22.48%22%20%2F%3E%0A%20%20%3C%2FradialGradient%3E%0A%20%20%3Cpath%20d%3D%22m88%2086h512v512h-512z%22%20fill%3D%22url(%23a)%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate(-88%20-86)%22%20%2F%3E%0A%3C%2Fsvg%3E%0A",style:{width:"100%",height:"100%",objectFit:"cover",verticalAlign:"bottom",aspectRatio:a}});return jsxs(E,{ref:x,component:"span",className:o.root,sx:{...!!a&&{width:1},...v},...C,children:[t?.overlay&&jsx(b,{className:o.overlay,sx:t?.overlay}),F]})}));z.displayName="Image";
|
|
8
8
|
|
|
9
|
-
export {
|
|
9
|
+
export { z as Image, o as imageClasses };
|
|
@@ -235,15 +235,15 @@ type NavButtonSectionProps = Omit<NavListProps, 'data' | 'depth'> & {
|
|
|
235
235
|
pathname: string;
|
|
236
236
|
};
|
|
237
237
|
|
|
238
|
-
declare const NavItem$4: react.
|
|
238
|
+
declare const NavItem$4: react.NamedExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
239
239
|
|
|
240
240
|
declare function NavSectionHorizontal({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, }: NavSectionProps): react_jsx_runtime.JSX.Element;
|
|
241
241
|
|
|
242
|
-
declare const NavItem$3: react.
|
|
242
|
+
declare const NavItem$3: react.NamedExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
243
243
|
|
|
244
244
|
declare const NavSectionMini: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, }: NavSectionProps) => react_jsx_runtime.JSX.Element;
|
|
245
245
|
|
|
246
|
-
declare const NavItem$2: react.
|
|
246
|
+
declare const NavItem$2: react.NamedExoticComponent<Omit<NavItemButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
247
247
|
|
|
248
248
|
declare const NavSectionMiniWithButtons: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, onNavigate, pathname, }: NavButtonSectionProps) => react_jsx_runtime.JSX.Element;
|
|
249
249
|
|
|
@@ -320,11 +320,11 @@ type UseNavItemProps = {
|
|
|
320
320
|
};
|
|
321
321
|
declare function useNavItem({ path, icon, info, depth, render, hasChild, externalLink, enabledRootRedirect, }: UseNavItemProps): UseNavItemReturn;
|
|
322
322
|
|
|
323
|
-
declare const NavItem$1: react.
|
|
323
|
+
declare const NavItem$1: react.NamedExoticComponent<Omit<NavItemProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
324
324
|
|
|
325
325
|
declare const NavSectionVertical: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, }: NavSectionProps) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
|
|
327
|
-
declare const NavItem: react.
|
|
327
|
+
declare const NavItem: react.NamedExoticComponent<Omit<NavItemButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
328
328
|
|
|
329
329
|
declare const NavSectionVerticalWithButtons: ({ sx, data, render, slotProps, enabledRootRedirect, cssVars: overridesVars, onNavigate, pathname, }: NavButtonSectionProps) => react_jsx_runtime.JSX.Element;
|
|
330
330
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { stylesMode, paper, varAlpha } from '@zydon/common/theme/styles';
|
|
2
|
-
import { forwardRef, cloneElement, useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
2
|
+
import { forwardRef, memo, cloneElement, useState, useCallback, useRef, useEffect, useMemo } from 'react';
|
|
3
3
|
import q from '@mui/material/Box';
|
|
4
|
-
import
|
|
4
|
+
import Fe from '@mui/material/ButtonBase';
|
|
5
5
|
import { styled, useTheme } from '@mui/material/styles';
|
|
6
|
-
import
|
|
6
|
+
import Je from '@mui/material/Tooltip';
|
|
7
7
|
import ge from '@zydon/common/components/Icon';
|
|
8
8
|
import Te from '@mui/material/Collapse';
|
|
9
9
|
import We from '@mui/material/Typography';
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import { Link, matchPath, useLocation } from 'react-router-dom';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
12
|
+
import mo from '@mui/material/Stack';
|
|
13
|
+
import po from '@zydon/common/components/Scrollbar';
|
|
14
|
+
import to from '@mui/material/Paper';
|
|
15
|
+
import ro from '@mui/material/Popover';
|
|
16
|
+
import et from '@mui/material/Divider';
|
|
17
17
|
|
|
18
|
-
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 fe={dark:"#282F37",light:"#EDEFF2"};function Z(e,i){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":e.palette.primary.contrastText,"--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,...i==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function _e(e){let{shape:i,spacing:o}=e;return {...Z(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.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":fe.light,"--nav-bullet-dark-color":fe.dark}}function Ee(e){let{shape:i,spacing:o}=e;return {...Z(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.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 Me(e){let{shape:i,spacing:o}=e;return {...Z(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${i.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 k={mini:Ee,vertical:_e,horizontal:Me};function S({open:e,active:i,disabled:o}){let a=t.item.root;return i?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 Q({sx:e,children:i}){return jsx(Fragment,{children:jsx(We,{component:"div",sx:{gap:1,alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:o=>o.spacing(2,1,1,1.5),fontSize:o=>o.typography.pxToRem(11),transition:o=>o.transitions.create(["color","padding-left"],{duration:o.transitions.duration.standard}),...e},children:i})})}function X({sx:e,depth:i,children:o,...a}){return jsx(Te,{sx:{...i+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:i,disabled:o,...a}){return jsx(q,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:i})}function N({children:e,sx:i,...o}){return jsx(q,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...i},...o,children:e})}var be=forwardRef(({href:e,...i},o)=>jsx(Link,{ref:o,to:e,...i}));function M({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n}){let l=a===1,v=!l,p=Number(a)>2,b=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:be,href:e},d=null;i&&r?.navIcon&&typeof i=="string"?d=r?.navIcon[i]:d=i;let f=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,h]=o,y=r.navInfo(h)[x];f=y?cloneElement(y):null;}else f=o;return {subItem:v,rootItem:l,subDeepItem:p,baseProps:b,renderIcon:d,renderInfo:f}}var ee=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(Ke,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:h.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}),Ke=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...n.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...n.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,flexGrow:1},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Ne=e=>{let i=e.split("?")[1];return i?new URLSearchParams(i).toString().length>0:!1};function oe(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function xe(e){try{let i=new URL(e,window.location.origin);return oe(i.pathname)}catch{return e}}function I(e){return e.startsWith("http")}function W(e){return e.replace(window.location.origin,"")}function w(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function z(e,i=!0){let o=oe(w()),a=Ne(e);if(e.startsWith("#")||I(e))return !1;if(i||a){let m=o.includes(e),n=xe(e);return m||a&&n===o}return o===e}function te({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ee,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:i===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:i===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i===1&&{ml:-.75},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(io,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})}function io({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(te,{data:m,render:o,depth:i+1,cssVars:a,slotProps:r,enabledRootRedirect:s},m.title))})}function qr({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),n={...k.horizontal(m),...s};return jsx(lo,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(so,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...n,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(po,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function po({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r}){return jsx(g,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(te,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})})}var ne=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(go,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&h.subItem&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo})]})}),go=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ie=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(ne,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(to,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Lo,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})};function Lo({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(ie,{data:m,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r},m.title))})}var $n=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.mini(m),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(Bo,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},Bo=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r})=>jsx(g,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ie,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})});function Y({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n,onNavigate:l}){let v=a===1,p=!v,c=Number(a)>2,d=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:h=>l(h,e)},f=null;i&&r?.navIcon&&typeof i=="string"?f=r?.navIcon[i]:f=i;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[h,y]=o,E=r.navInfo(y)[h];x=E?cloneElement(E):null;}else x=o;return {subItem:p,rootItem:v,subDeepItem:c,baseProps:d,renderIcon:f,renderInfo:x}}var se=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f}),K=!(m===1),de=jsxs(Oo,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&K&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&y.subItem&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo})]});return de}),Oo=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var me=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v=useRef(null),p=I(e.path),c=W(e.path),b=!!matchPath({path:c||"",end:!p},n),d=Array.isArray(e.children)?e.children.some(K=>matchPath({path:W(K.path)||"",end:!p},n)):b,[f,x]=useState(!1);useEffect(()=>{f&&y();},[n]);let h=useCallback(()=>{e.children&&x(!0);},[e.children]),y=useCallback(()=>{x(!1);},[]),E=jsx(se,{ref:v,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:d,disabled:e.disabled,hasChild:!!e.children,open:e.children&&f,externalLink:!1,enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:h,onMouseLeave:y,onNavigate:m});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[E,jsx(to,{disableScrollLock:!0,open:f,anchorEl:v.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:h,onMouseLeave:y,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...f&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(oo,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...r?.paper},children:jsx(Ko,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})})})]}):jsx(g,{disabled:e.disabled,children:E})};function Ko({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n}){return jsx(N,{sx:{gap:.5},children:e.map(l=>jsx(me,{data:l,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},l.title))})}var hi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.mini(l),...s};return jsx(so,{component:"nav",className:t.mini.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)",alignItems:"center",justifyContent:"center"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsxs(Fragment,{children:[p.subheader&&jsx(Fragment,{children:jsx(Yo,{sx:{my:2},flexItem:!0})}),jsx(et,{render:o,cssVars:v,items:p.items,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden})]},p.subheader??p.items[0]?.title??c))})})},et=({items:e,render:i,renderEmptyView:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(v=>!v.hidden).map(v=>jsx(me,{depth:1,data:v,render:i,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},v.title))});return jsx(g,{children:l})};var le=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(mt,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}),mt=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var pe=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>{let s=w(),m=z(e.path,!!e.children),[n,l]=useState(m);useEffect(()=>{m||p();},[s]);let v=useCallback(()=>{e.children&&l(b=>!b);},[e.children]),p=useCallback(()=>{l(!1);},[]),c=jsx(le,{render:i,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&&n,externalLink:I(e.path),enabledRootRedirect:r,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:[c,jsx(X,{"data-group":e.title,in:n,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(ct,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r})})]}):jsx(g,{disabled:e.disabled,children:c})},ct=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(pe,{data:s,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r},s.title))});var Yi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.vertical(m),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(gt,{subheader:l.subheader,items:l.items,render:o,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},gt=({items:e,render:i,subheader:o,slotProps:a,enabledRootRedirect:r})=>{let[s,m]=useState(!0),n=useCallback(()=>{m(v=>!v);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(pe,{data:v,render:i,depth:1,slotProps:a,enabledRootRedirect:r},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(Q,{"data-title":o,open:s,onClick:n,sx:a?.subheader,children:o}),jsx(Te,{in:s,children:l})]}):l})};var ce=forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=Y({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f});return jsxs(Ct,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(qe,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_RIGHT",className:t.item.arrow})]})}),Ct=styled(De,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ve=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>{let n=I(e.path),l=W(e.path),v=!!matchPath({path:l||"",end:!n},m),p=Array.isArray(e.children)?e.children.some(h=>matchPath({path:W(h.path)||"",end:!n},m)):v,[c,b]=useState(p);useEffect(()=>{p||f();},[m]);let d=useCallback(()=>{e.children&&b(h=>!h);},[e.children]),f=useCallback(()=>{b(!1);},[]),x=jsx(ce,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:p,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:!1,enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:d,onNavigate:s});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:[x,jsx(X,{"data-group":e.title,in:c,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Pt,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})})]}):jsx(g,{disabled:e.disabled,children:x})},Pt=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(ve,{data:n,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m},n.title))});var Ba=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.vertical(l),...s};return jsx(so,{component:"nav",className:t.vertical.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsx(Wt,{subheader:p.subheader,items:p.items,render:o,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden,hiddenSubheader:p.hiddenSubheader},p.subheader??p.items[0]?.title??c))})})},Wt=({items:e,render:i,renderEmptyView:o,subheader:a,hiddenSubheader:r,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l})=>{let[v,p]=useState(!0),c=useCallback(()=>{p(d=>!d);},[]),b=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(d=>!d.hidden).map(d=>jsx(ve,{data:d,render:i,depth:1,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l},d.title))});return jsx(g,{children:a&&!r?jsxs(Fragment,{children:[jsx(Q,{"data-title":a,open:v,onClick:c,sx:s?.subheader,children:a}),jsx(Te,{in:v,children:b})]}):b})};
|
|
18
|
+
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 fe={dark:"#282F37",light:"#EDEFF2"};function re(e,i){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":e.palette.primary.contrastText,"--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,...i==="vertical"&&{"--nav-item-sub-active-bg":o.action.hover,"--nav-subheader-color":o.text.disabled,"--nav-subheader-hover-color":o.text.primary}}}function _e(e){let{shape:i,spacing:o}=e;return {...re(e,"vertical"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.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":fe.light,"--nav-bullet-dark-color":fe.dark}}function Ee(e){let{shape:i,spacing:o}=e;return {...re(e,"mini"),"--nav-item-gap":o(.5),"--nav-item-radius":`${i.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 Me(e){let{shape:i,spacing:o}=e;return {...re(e,"horizontal"),"--nav-item-gap":o(.75),"--nav-height":"56px","--nav-item-radius":`${i.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 k={mini:Ee,vertical:_e,horizontal:Me};function S({open:e,active:i,disabled:o}){let a=t.item.root;return i?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 Q({sx:e,children:i}){return jsx(Fragment,{children:jsx(We,{component:"div",sx:{gap:1,alignItems:"center",position:"relative",typography:"overline",display:"inline-flex",alignSelf:"flex-start",color:"var(--nav-subheader-color)",padding:o=>o.spacing(2,1,1,1.5),fontSize:o=>o.typography.pxToRem(11),transition:o=>o.transitions.create(["color","padding-left"],{duration:o.transitions.duration.standard}),...e},children:i})})}function X({sx:e,depth:i,children:o,...a}){return jsx(Te,{sx:{...i+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:i,disabled:o,...a}){return jsx(q,{component:"li",className:t.li,sx:{display:"flex",flexDirection:"column",...o&&{cursor:"not-allowed"},...e},...a,children:i})}function N({children:e,sx:i,...o}){return jsx(q,{component:"ul",className:t.ul,sx:{display:"flex",flexDirection:"column",...i},...o,children:e})}var be=forwardRef(({href:e,...i},o)=>jsx(Link,{ref:o,to:e,...i}));function M({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n}){let l=a===1,v=!l,p=Number(a)>2,b=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{component:be,href:e},d=null;i&&r?.navIcon&&typeof i=="string"?d=r?.navIcon[i]:d=i;let f=null;if(o&&r?.navInfo&&Array.isArray(o)){let[x,h]=o,y=r.navInfo(h)[x];f=y?cloneElement(y):null;}else f=o;return {subItem:v,rootItem:l,subDeepItem:p,baseProps:b,renderIcon:d,renderInfo:f}}var Y=memo(forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(Qe,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(Je,{title:r,arrow:!0,children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:h.subItem?"CHEVRON_RIGHT":"ARROW_DOWN_SIMPLE",className:t.item.arrow})]})}));Y.displayName="NavItem";var Qe=styled(Fe,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,padding:"var(--nav-item-root-padding)",minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-root-margin)"},[`& .${t.item.title}`]:{...n.title,whiteSpace:"nowrap"},[`& .${t.item.caption}`]:{...n.caption,marginLeft:r.spacing(.75)},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,padding:"var(--nav-item-sub-padding)",minHeight:"var(--nav-item-sub-height)",color:r.vars.palette.text.secondary,[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,flexGrow:1},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var Ne=e=>{let i=e.split("?")[1];return i?new URLSearchParams(i).toString().length>0:!1};function ie(e){return e!=="/"&&e.endsWith("/")?e.slice(0,-1):e}function xe(e){try{let i=new URL(e,window.location.origin);return ie(i.pathname)}catch{return e}}function I(e){return e.startsWith("http")}function W(e){return e.replace(window.location.origin,"")}function w(){let{pathname:e}=useLocation();return useMemo(()=>e,[e])}function z(e,i=!0){let o=ie(w()),a=Ne(e);if(e.startsWith("#")||I(e))return !1;if(i||a){let m=o.includes(e),n=xe(e);return m||a&&n===o}return o===e}function ae({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(Y,{ref:l,render:o,title:e.title,path:e.path,icon:e.icon,info:e.info,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(ro,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:i===1?{vertical:"bottom",horizontal:"left"}:{vertical:"center",horizontal:"right"},transformOrigin:i===1?{vertical:"top",horizontal:"left"}:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i===1&&{ml:-.75},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(to,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(ao,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})}function ao({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(ae,{data:m,render:o,depth:i+1,cssVars:a,slotProps:r,enabledRootRedirect:s},m.title))})}function Yr({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){let m=useTheme(),n={...k.horizontal(m),...s};return jsx(po,{sx:{height:1},slotProps:{content:{height:1,display:"flex",alignItems:"center"}},children:jsx(mo,{component:"nav",direction:"row",alignItems:"center",className:t.horizontal.root,sx:{...n,mx:"auto",height:1,minHeight:"var(--nav-height)",...e},children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(co,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})})}function co({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r}){return jsx(g,{children:jsx(N,{sx:{flexDirection:"row",gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ae,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})})}var Z=memo(forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(xo,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(Je,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&h.subItem&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo})]})}));Z.displayName="NavItem";var xo=styled(Fe,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var me=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})=>{let m=useTheme(),n=w(),l=useRef(null),v=z(e.path,!!e.children),[p,c]=useState(!1);useEffect(()=>{p&&d();},[n]);let b=useCallback(()=>{e.children&&c(!0);},[e.children]),d=useCallback(()=>{c(!1);},[]),f=jsx(Z,{ref:l,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:v,disabled:e.disabled,hasChild:!!e.children,open:e.children&&p,externalLink:I(e.path),enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:b,onMouseLeave:d});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[f,jsx(ro,{disableScrollLock:!0,open:p,anchorEl:l.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:b,onMouseLeave:d,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...p&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(to,{className:t.paper,sx:{minWidth:180,...paper({theme:m,dropdown:!0}),...r?.paper},children:jsx(Po,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s})})})]}):jsx(g,{disabled:e.disabled,children:f})};function Po({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s}){return jsx(N,{sx:{gap:.5},children:e.map(m=>jsx(me,{data:m,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r},m.title))})}var Tn=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.mini(m),...s};return jsx(mo,{component:"nav",className:t.mini.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(Eo,{render:o,cssVars:n,items:l.items,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},Eo=({items:e,render:i,slotProps:o,enabledRootRedirect:a,cssVars:r})=>jsx(g,{children:jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(me,{depth:1,data:s,render:i,cssVars:r,slotProps:o,enabledRootRedirect:a},s.title))})});function j({path:e,icon:i,info:o,depth:a,render:r,hasChild:s,externalLink:m,enabledRootRedirect:n,onNavigate:l}){let v=a===1,p=!v,c=Number(a)>2,d=s&&!n?{component:"div"}:m?{href:e,target:"_blank",rel:"noopener"}:{onClick:h=>l(h,e)},f=null;i&&r?.navIcon&&typeof i=="string"?f=r?.navIcon[i]:f=i;let x=null;if(o&&r?.navInfo&&Array.isArray(o)){let[h,y]=o,E=r.navInfo(y)[h];x=E?cloneElement(E):null;}else x=o;return {subItem:p,rootItem:v,subDeepItem:c,baseProps:d,renderIcon:f,renderInfo:x}}var ee=memo(forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=j({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f}),K=!(m===1),de=jsxs(Ao,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&K&&jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(Je,{title:r,arrow:!0,placement:"right",children:jsx(ge,{icon:"INFO_CIRCLE",className:t.item.caption})}),o&&y.subItem&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo})]});return de}));ee.displayName="NavItem";var Ao=styled(Fe,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,textAlign:"center",flexDirection:"column",width:48,minHeight:44,padding:"var(--nav-item-root-padding)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.title}`]:{...n.title,...u.noWrap,lineHeight:"16px",fontSize:r.typography.pxToRem(10),fontWeight:e?r.typography.fontWeightBold:r.typography.fontWeightSemiBold},[`& .${t.item.caption}`]:{...n.caption,top:11,left:6,position:"absolute"},[`& .${t.item.arrow}`]:{...n.arrow,top:11,right:6,position:"absolute"},[`& .${t.item.info}`]:{...n.info},...e&&{color:r.palette.primary.contrastText,backgroundColor:r.palette.primary.main,"&:hover":{backgroundColor:r.palette.primary.lighter},[stylesMode.dark]:{color:"var(--nav-item-root-active-color-on-dark)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,color:r.vars.palette.text.secondary,minHeight:"var(--nav-item-sub-height)",padding:"var(--nav-item-sub-padding)",[`& .${t.item.icon}`]:{...n.icon,margin:"var(--nav-icon-sub-margin)"},[`& .${t.item.title}`]:{...n.title,...r.typography.body2,fontWeight:e?r.typography.fontWeightSemiBold:r.typography.fontWeightMedium,flex:"1 1 auto"},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow,marginRight:r.spacing(-.5)},[`& .${t.item.info}`]:{...n.info},...e&&{color:"var(--nav-item-sub-active-color)",backgroundColor:"var(--nav-item-sub-active-bg)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var pe=({data:e,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v=useRef(null),p=I(e.path),c=W(e.path),b=!!matchPath({path:c||"",end:!p},n),d=Array.isArray(e.children)?e.children.some(K=>matchPath({path:W(K.path)||"",end:!p},n)):b,[f,x]=useState(!1);useEffect(()=>{f&&y();},[n]);let h=useCallback(()=>{e.children&&x(!0);},[e.children]),y=useCallback(()=>{x(!1);},[]),E=jsx(ee,{ref:v,render:o,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:i,active:d,disabled:e.disabled,hasChild:!!e.children,open:e.children&&f,externalLink:!1,enabledRootRedirect:s,slotProps:i===1?r?.rootItem:r?.subItem,onMouseEnter:h,onMouseLeave:y,onNavigate:m});return e.roles&&r?.currentRole&&!e?.roles?.includes(r?.currentRole)?null:e.children?jsxs(g,{disabled:e.disabled,children:[E,jsx(ro,{disableScrollLock:!0,open:f,anchorEl:v.current,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},slotProps:{paper:{onMouseEnter:h,onMouseLeave:y,sx:{px:.75,boxShadow:"none",overflow:"unset",backdropFilter:"none",background:"transparent",...i>1&&{mt:-1},...f&&{pointerEvents:"auto"}}}},sx:{...a,pointerEvents:"none"},children:jsx(to,{className:t.paper,sx:{minWidth:180,...paper({theme:l,dropdown:!0}),...r?.paper},children:jsx(Yo,{data:e.children,depth:i,render:o,cssVars:a,slotProps:r,enabledRootRedirect:s,onNavigate:m,pathname:n})})})]}):jsx(g,{disabled:e.disabled,children:E})};function Yo({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n}){return jsx(N,{sx:{gap:.5},children:e.map(l=>jsx(pe,{data:l,render:i,depth:o+1,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},l.title))})}var yi=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.mini(l),...s};return jsx(mo,{component:"nav",className:t.mini.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)",alignItems:"center",justifyContent:"center"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsxs(Fragment,{children:[p.subheader&&jsx(Fragment,{children:jsx(et,{sx:{my:2},flexItem:!0})}),jsx(rt,{render:o,cssVars:v,items:p.items,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden})]},p.subheader??p.items[0]?.title??c))})})},rt=({items:e,render:i,renderEmptyView:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(v=>!v.hidden).map(v=>jsx(pe,{depth:1,data:v,render:i,cssVars:s,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n},v.title))});return jsx(g,{children:l})};var oe=memo(forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,...f},x)=>{let h=M({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d});return jsxs(vt,{ref:x,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...h.baseProps,...f,children:[i&&jsx(q,{component:"span",className:t.item.icon,children:h.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(Je,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:h.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_LEFT",className:t.item.arrow})]})}));oe.displayName="NavItem";var vt=styled(Fe,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ce=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>{let s=w(),m=z(e.path,!!e.children),[n,l]=useState(m);useEffect(()=>{m||p();},[s]);let v=useCallback(()=>{e.children&&l(b=>!b);},[e.children]),p=useCallback(()=>{l(!1);},[]),c=jsx(oe,{render:i,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&&n,externalLink:I(e.path),enabledRootRedirect:r,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:[c,jsx(X,{"data-group":e.title,in:n,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(ft,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r})})]}):jsx(g,{disabled:e.disabled,children:c})},ft=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(s=>jsx(ce,{data:s,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r},s.title))});var ta=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s})=>{let m=useTheme(),n={...k.vertical(m),...s};return jsx(mo,{component:"nav",className:t.vertical.root,sx:{...n,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.map(l=>jsx(It,{subheader:l.subheader,items:l.items,render:o,slotProps:a,enabledRootRedirect:r},l.subheader??l.items[0].title))})})},It=({items:e,render:i,subheader:o,slotProps:a,enabledRootRedirect:r})=>{let[s,m]=useState(!0),n=useCallback(()=>{m(v=>!v);},[]),l=jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(v=>jsx(ce,{data:v,render:i,depth:1,slotProps:a,enabledRootRedirect:r},v.title))});return jsx(g,{children:o?jsxs(Fragment,{children:[jsx(Q,{"data-title":o,open:s,onClick:n,sx:a?.subheader,children:o}),jsx(Te,{in:s,children:l})]}):l})};var te=memo(forwardRef(({path:e,icon:i,info:o,title:a,caption:r,open:s,depth:m,render:n,active:l,disabled:v,hasChild:p,slotProps:c,externalLink:b,enabledRootRedirect:d,onNavigate:f,...x},h)=>{let y=j({path:e,icon:i,info:o,depth:m,render:n,hasChild:p,externalLink:b,enabledRootRedirect:d,onNavigate:f});return jsxs(Bt,{ref:h,"aria-label":a,depth:m,active:l,disabled:v,open:s&&!l,sx:{...c?.sx,[`& .${t.item.icon}`]:c?.icon,[`& .${t.item.texts}`]:c?.texts,[`& .${t.item.title}`]:c?.title,[`& .${t.item.caption}`]:c?.caption,[`& .${t.item.info}`]:c?.info,[`& .${t.item.arrow}`]:c?.arrow},className:S({open:s&&!l,active:l,disabled:v}),...y.baseProps,...x,...y.baseProps.onClick?{onClick:y.baseProps.onClick,style:{textAlign:"left"}}:{},children:[i&&jsx(q,{component:"span",className:t.item.icon,children:y.renderIcon}),a&&jsxs(q,{component:"span",className:t.item.texts,children:[jsx(q,{component:"span",className:t.item.title,children:a}),r&&jsx(Je,{title:r,placement:"top-start",children:jsx(q,{component:"span",className:t.item.caption,children:r})})]}),o&&jsx(q,{component:"span",className:t.item.info,children:y.renderInfo}),p&&jsx(ge,{icon:s?"ARROW_DOWN_SIMPLE":"CHEVRON_RIGHT",className:t.item.arrow})]})}));te.displayName="NavItem";var Bt=styled(Fe,{shouldForwardProp:e=>e!=="active"&&e!=="open"&&e!=="disabled"&&e!=="depth"})(({active:e,open:i,disabled:o,depth:a,theme:r})=>{let s=a===1,m=!s,n={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&&{...n.item,minHeight:"var(--nav-item-root-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"}},...i&&{color:"var(--nav-item-root-open-color)",backgroundColor:"var(--nav-item-root-open-bg)"}},...m&&{...n.item,minHeight:"var(--nav-item-sub-height)",[`& .${t.item.icon}`]:{...n.icon},[`& .${t.item.texts}`]:{...n.texts},[`& .${t.item.title}`]:{...n.title},[`& .${t.item.caption}`]:{...n.caption},[`& .${t.item.arrow}`]:{...n.arrow},[`& .${t.item.info}`]:{...n.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)"},...i&&{color:"var(--nav-item-sub-open-color)",backgroundColor:"var(--nav-item-sub-open-bg)"}},...o&&u.disabled}});var ve=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>{let n=I(e.path),l=W(e.path),v=!!matchPath({path:l||"",end:!n},m),p=Array.isArray(e.children)?e.children.some(h=>matchPath({path:W(h.path)||"",end:!n},m)):v,[c,b]=useState(p);useEffect(()=>{p||f();},[m]);let d=useCallback(()=>{e.children&&b(h=>!h);},[e.children]),f=useCallback(()=>{b(!1);},[]),x=jsx(te,{render:i,path:e.path,icon:e.icon,info:e.info,title:e.title,caption:e.caption,depth:o,active:p,disabled:e.disabled,hasChild:!!e.children,open:e.children&&c,externalLink:!1,enabledRootRedirect:r,slotProps:o===1?a?.rootItem:a?.subItem,onClick:d,onNavigate:s});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:[x,jsx(X,{"data-group":e.title,in:c,depth:o,unmountOnExit:!0,mountOnEnter:!0,children:jsx(Mt,{data:e.children,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})})]}):jsx(g,{disabled:e.disabled,children:x})},Mt=({data:e,render:i,depth:o,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m})=>jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.map(n=>jsx(ve,{data:n,render:i,depth:o+1,slotProps:a,enabledRootRedirect:r,onNavigate:s,pathname:m},n.title))});var Wa=({sx:e,data:i,render:o,slotProps:a,enabledRootRedirect:r,cssVars:s,onNavigate:m,pathname:n})=>{let l=useTheme(),v={...k.vertical(l),...s};return jsx(mo,{component:"nav",className:t.vertical.root,sx:{...v,...e},children:jsx(N,{sx:{flex:"1 1 auto",gap:"var(--nav-item-gap)"},children:i.filter(p=>"divider"in p?!0:!p.hidden).map((p,c)=>"divider"in p?jsx("li",{children:p.divider},`divider-${c}`):jsx(Ht,{subheader:p.subheader,items:p.items,render:o,renderEmptyView:p.renderEmptyView,slotProps:a,enabledRootRedirect:r,onNavigate:m,pathname:n,hidden:p.hidden,hiddenSubheader:p.hiddenSubheader},p.subheader??p.items[0]?.title??c))})})},Ht=({items:e,render:i,renderEmptyView:o,subheader:a,hiddenSubheader:r,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l})=>{let[v,p]=useState(!0),c=useCallback(()=>{p(d=>!d);},[]),b=o&&e.length===0?o():jsx(N,{sx:{gap:"var(--nav-item-gap)"},children:e.filter(d=>!d.hidden).map(d=>jsx(ve,{data:d,render:i,depth:1,slotProps:s,enabledRootRedirect:m,onNavigate:n,pathname:l},d.title))});return jsx(g,{children:a&&!r?jsxs(Fragment,{children:[jsx(Q,{"data-title":a,open:v,onClick:c,sx:s?.subheader,children:a}),jsx(Te,{in:v,children:b})]}):b})};
|
|
19
19
|
|
|
20
|
-
export { X as NavCollapse, g as NavLi,
|
|
20
|
+
export { X as NavCollapse, g as NavLi, Yr as NavSectionHorizontal, Y as NavSectionHorizontalItem, Tn as NavSectionMini, ee as NavSectionMiniButtonItem, Z as NavSectionMiniItem, yi as NavSectionMiniWithButtons, ta as NavSectionVertical, te as NavSectionVerticalButtonItem, oe as NavSectionVerticalItem, Wa as NavSectionVerticalWithButtons, N as NavUl, Q as Subheader, fe as bulletColor, t as navSectionClasses, k as navSectionCssVars, u as sharedStyles, S as stateClasses, M as useNavItem };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1.
|
|
2
|
+
"version": "2.1.16",
|
|
3
3
|
"name": "@zydon/common-csr",
|
|
4
4
|
"description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
|
|
5
5
|
"license": "MIT",
|
|
@@ -57,11 +57,12 @@
|
|
|
57
57
|
"./styles.css": "./dist/index.css"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@emotion/react": "^11.
|
|
61
|
-
"@emotion/styled": "^11.
|
|
62
|
-
"@mui/material": "^5.
|
|
63
|
-
"@mui/
|
|
64
|
-
"@mui/x-
|
|
60
|
+
"@emotion/react": "^11.14.0",
|
|
61
|
+
"@emotion/styled": "^11.14.0",
|
|
62
|
+
"@mui/material": "^5.18.0",
|
|
63
|
+
"@mui/system": "^5.18.0",
|
|
64
|
+
"@mui/x-data-grid-premium": "^7.29.12",
|
|
65
|
+
"@mui/x-license": "^7.29.1",
|
|
65
66
|
"@testing-library/dom": "10.0.0",
|
|
66
67
|
"@testing-library/jest-dom": "^6.6.3",
|
|
67
68
|
"@testing-library/react": "^16.1.0",
|
|
@@ -69,8 +70,8 @@
|
|
|
69
70
|
"@types/jest": "^30.0.0",
|
|
70
71
|
"@types/jest-axe": "^3.5.9",
|
|
71
72
|
"@types/node": "^24.10.1",
|
|
72
|
-
"@types/react": "^
|
|
73
|
-
"@types/react-dom": "^
|
|
73
|
+
"@types/react": "^19.2.7",
|
|
74
|
+
"@types/react-dom": "^19.2.3",
|
|
74
75
|
"@types/react-lazy-load-image-component": "^1.6.4",
|
|
75
76
|
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
76
77
|
"@typescript-eslint/parser": "^6.4.1",
|
|
@@ -88,8 +89,8 @@
|
|
|
88
89
|
"jest-junit": "^16.0.0",
|
|
89
90
|
"postcss": "^8.4.41",
|
|
90
91
|
"prettier": "^3.0.2",
|
|
91
|
-
"react": "^
|
|
92
|
-
"react-dom": "^
|
|
92
|
+
"react": "^19.2.1",
|
|
93
|
+
"react-dom": "^19.2.1",
|
|
93
94
|
"react-hook-form": "^7.53.0",
|
|
94
95
|
"react-router-dom": "^6.26.1",
|
|
95
96
|
"ts-jest": "^29.2.5",
|
|
@@ -111,17 +112,17 @@
|
|
|
111
112
|
"@uiw/react-codemirror": "^4.23.0",
|
|
112
113
|
"ace-builds": "1.32.9",
|
|
113
114
|
"lowlight": "^3.1.0",
|
|
114
|
-
"react-ace": "
|
|
115
|
+
"react-ace": "14.0.1",
|
|
115
116
|
"react-lazy-load-image-component": "^1.6.2"
|
|
116
117
|
},
|
|
117
118
|
"peerDependencies": {
|
|
118
|
-
"@emotion/react": "^11.
|
|
119
|
-
"@emotion/styled": "^11.
|
|
120
|
-
"@mui/material": "^5.
|
|
121
|
-
"@mui/x-data-grid-premium": "^7.
|
|
119
|
+
"@emotion/react": "^11.14.0",
|
|
120
|
+
"@emotion/styled": "^11.14.0",
|
|
121
|
+
"@mui/material": "^5.18.0",
|
|
122
|
+
"@mui/x-data-grid-premium": "^7.29.12",
|
|
122
123
|
"@zydon/common": ">=2.x",
|
|
123
|
-
"react": "^18.
|
|
124
|
-
"react-dom": "^18.
|
|
124
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
125
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
125
126
|
"react-hook-form": "^7.53.0",
|
|
126
127
|
"react-router-dom": "^6.26.1"
|
|
127
128
|
},
|