@nice2dev/ui 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NiceModuleLifecyclePanel-BWUYyWfY.cjs"),e=require("react/jsx-runtime"),c=require("@nice2dev/ui-core"),a=require("react"),z=require("./pickerCommons-CUGHOWyc.cjs"),K=require("./NicePagination-D_3GfWp5.cjs"),E=[],W=Object.assign(a.forwardRef(({items:p=E,activeKey:f,collapsed:l=!1,width:x=240,collapsedWidth:u=52,onItemClick:y,onCollapseChange:A,header:g,footer:b,size:_="md",className:R,style:$,id:S,accessMode:C,...D},m)=>{const j=c.useControlId(S),M=c.useNiceAccessMode(C,S),[k,h]=a.useState(new Set),i=a.useCallback(n=>{h(t=>{const o=new Set(t);return o.has(n)?o.delete(n):o.add(n),o})},[]);if(M==="hidden")return null;const d=(n,t=0)=>{const o=n.children&&n.children.length>0,r=k.has(n.key),N=n.key===f;return e.jsxs("li",{className:"nice-sidebar-menu__item",children:[e.jsxs("button",{className:`nice-sidebar-menu__btn ${N?"nice-sidebar-menu__btn--active":""} ${n.disabled?"nice-sidebar-menu__btn--disabled":""}`,style:{paddingLeft:l?void 0:12+t*16},onClick:()=>o?i(n.key):y?.(n),disabled:n.disabled,title:l?n.text:void 0,type:"button",children:[n.icon&&e.jsx("span",{className:"nice-sidebar-menu__icon",children:n.icon}),!l&&e.jsx("span",{className:"nice-sidebar-menu__label",children:n.text}),!l&&n.badge!==void 0&&e.jsx("span",{className:"nice-sidebar-menu__badge",children:n.badge}),!l&&o&&e.jsx("span",{className:"nice-sidebar-menu__chevron",children:e.jsx(c.NiceIcon,{name:r?"chevron-down":"chevron-right",size:14})})]}),o&&r&&!l&&e.jsx("ul",{className:"nice-sidebar-menu__children",children:n.children.map(I=>d(I,t+1))})]},n.key)};return e.jsxs("nav",{ref:m,id:j,className:`nice-sidebar-menu nice-sidebar-menu--${_} ${l?"nice-sidebar-menu--collapsed":""} ${R??""}`,style:{...$,width:l?u:x},...D,children:[g&&e.jsx("div",{className:"nice-sidebar-menu__header",children:g}),e.jsx("ul",{className:"nice-sidebar-menu__list",role:"list",children:p.map(n=>d(n))}),b&&e.jsx("div",{className:"nice-sidebar-menu__footer",children:b})]})}),{displayName:"NiceSidebarMenu"}),q=Object.assign(a.forwardRef(({items:p=E,activeKey:f,onItemClick:l,brand:x,actions:u,size:y="md",className:A,style:g,id:b,accessMode:_,...R},$)=>{const S=c.useControlId(b),C=c.useNiceAccessMode(_,b),[D,m]=a.useState(null),[j,M]=a.useState(!1),k=a.useRef(null),h=a.useRef(null);c.useRovingFocus(k,{orientation:"horizontal",wrap:!0,typeahead:!0}),c.useRovingFocus(h,{orientation:"vertical",wrap:!0,typeahead:!0}),c.useOverlayFocus(h,{open:D!=null&&!j,modal:!1,onClose:()=>m(null)});const i=n=>{M(!1),m(n)},d=n=>{if(n.key!=="ArrowLeft"&&n.key!=="ArrowRight")return;n.preventDefault();const t=[...k.current?.querySelectorAll(".nice-top-menu__btn")??[]],o=t.findIndex(N=>N.getAttribute("aria-expanded")==="true"),r=t[(o+(n.key==="ArrowRight"?1:-1)+t.length)%t.length];m(null),r?.focus()};return C==="hidden"?null:e.jsxs("nav",{ref:$,id:S,className:`nice-top-menu nice-top-menu--${y} ${A??""}`,style:g,...R,children:[x&&e.jsx("div",{className:"nice-top-menu__brand",children:x}),e.jsx("ul",{className:"nice-top-menu__items",role:"menubar",ref:k,children:p.map(n=>{const t=n.children&&n.children.length>0,o=D===n.key;return e.jsxs("li",{className:"nice-top-menu__item",onMouseEnter:()=>{t&&(M(!0),m(n.key))},onMouseLeave:()=>t&&m(null),children:[e.jsxs("button",{className:`nice-top-menu__btn ${n.key===f?"nice-top-menu__btn--active":""}`,onClick:()=>t?o?m(null):i(n.key):l?.(n),onKeyDown:r=>{const N=r.nativeEvent.niceSource;t&&r.key==="ArrowDown"&&N!=="gamepad"&&(r.preventDefault(),i(n.key))},role:"menuitem","aria-haspopup":t,"aria-expanded":o,disabled:n.disabled,type:"button",children:[n.icon&&e.jsx("span",{children:n.icon}),e.jsx("span",{children:n.text}),t&&e.jsx("span",{className:"nice-top-menu__chevron",children:e.jsx(c.NiceIcon,{name:"chevron-down",size:14})})]}),t&&o&&e.jsx("ul",{className:"nice-top-menu__dropdown",role:"menu",ref:h,onKeyDown:d,children:n.children.map(r=>e.jsx("li",{children:e.jsxs("button",{className:`nice-top-menu__dropdown-btn ${r.key===f?"nice-top-menu__dropdown-btn--active":""}`,onClick:()=>{l?.(r),m(null)},disabled:r.disabled,role:"menuitem",type:"button",children:[r.icon&&e.jsx("span",{children:r.icon}),e.jsx("span",{children:r.text}),r.badge!==void 0&&e.jsx("span",{className:"nice-top-menu__badge",children:r.badge})]})},r.key))})]},n.key)})}),u&&e.jsx("div",{className:"nice-top-menu__actions",children:u})]})}),{displayName:"NiceTopMenu"}),H=[],U=Object.assign(a.forwardRef(({tabs:p=H,activeTab:f,onTabChange:l,onItemClick:x,minimized:u=!1,onMinimizeToggle:y,size:A="md",className:g,style:b,id:_,accessMode:R,...$},S)=>{const C=a.useRef(null);c.useRovingFocus(C,{orientation:"horizontal",wrap:!0,activateOnMove:!0});const D=c.useControlId(_),m=c.useNiceAccessMode(R,_),{t:j}=c.useNiceTranslation(),[M,k]=a.useState(void 0),h=f??M??p[0]?.key,i=p.find(n=>n.key===h),d=a.useCallback(n=>{k(n),l?.(n)},[l]);return m==="hidden"?null:e.jsxs("div",{ref:S,id:D,className:`nice-ribbon-menu nice-ribbon-menu--${A} ${u?"nice-ribbon-menu--minimized":""} ${g??""}`,style:b,...$,children:[e.jsxs("div",{className:"nice-ribbon-menu__tabs",ref:C,role:"tablist",children:[p.map(n=>e.jsx("button",{className:`nice-ribbon-menu__tab ${n.key===h?"nice-ribbon-menu__tab--active":""}`,onClick:()=>d(n.key),role:"tab","aria-selected":n.key===h,type:"button",children:n.label},n.key)),e.jsx("button",{className:"nice-ribbon-menu__minimize",onClick:()=>y?.(!u),type:"button","aria-label":u?j("nav.expand","Expand"):j("nav.collapse","Collapse"),children:e.jsx(c.NiceIcon,{name:u?"chevron-down":"chevron-up",size:14})})]}),!u&&i&&e.jsx("div",{className:"nice-ribbon-menu__panel",role:"tabpanel",children:i.groups.map((n,t)=>e.jsxs("div",{className:"nice-ribbon-menu__group",children:[e.jsx("div",{className:"nice-ribbon-menu__group-items",children:n.items.map(o=>e.jsxs("button",{className:"nice-ribbon-menu__item",onClick:()=>x?.(o),disabled:o.disabled,type:"button",children:[o.icon&&e.jsx("span",{className:"nice-ribbon-menu__item-icon",children:o.icon}),e.jsx("span",{className:"nice-ribbon-menu__item-label",children:o.text})]},o.key))}),e.jsx("div",{className:"nice-ribbon-menu__group-label",children:n.label})]},t))})]})}),{displayName:"NiceRibbonMenu"}),V=Object.assign(a.forwardRef(({items:p=E,activeKey:f,onItemClick:l,position:x="bottom",autoHide:u=!1,iconSize:y=40,size:A="md",className:g,style:b,id:_,accessMode:R,...$},S)=>{const C=c.useControlId(_),D=c.useNiceAccessMode(R,_),[m,j]=a.useState(!1),[M,k]=a.useState(!1),h=!u||m||M;return D==="hidden"?null:e.jsx("div",{ref:S,id:C,className:`nice-dock-menu nice-dock-menu--${x} nice-dock-menu--${A} ${u&&!h?"nice-dock-menu--hidden":""} ${g??""}`,style:b,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onFocus:()=>k(!0),onBlur:i=>{i.currentTarget.contains(i.relatedTarget)||k(!1)},...$,children:e.jsx("div",{className:"nice-dock-menu__items",children:p.map(i=>e.jsxs("button",{className:`nice-dock-menu__item ${i.key===f?"nice-dock-menu__item--active":""}`,onClick:()=>l?.(i),disabled:i.disabled,title:i.text,"aria-label":i.text,type:"button",style:{width:y,height:y},children:[i.icon?e.jsx("span",{className:"nice-dock-menu__icon",children:i.icon}):e.jsx("span",{children:i.text[0]}),i.badge!==void 0&&e.jsx("span",{className:"nice-dock-menu__badge",children:i.badge})]},i.key))})})}),{displayName:"NiceDockMenu"}),Y=Object.assign(a.forwardRef(({items:p=E,activeKey:f,onItemClick:l,open:x,onOpenChange:u,position:y="left",panelWidth:A=280,header:g,footer:b,size:_="md",className:R,style:$,id:S,accessMode:C,...D},m)=>{const j=c.useControlId(S),M=c.useNiceAccessMode(C,S),{t:k}=c.useNiceTranslation(),[h,i]=a.useState(!1),d=x??h,n=a.useCallback(v=>{i(v),u?.(v)},[u]),t=a.useCallback(()=>n(!d),[d,n]),o=a.useCallback(v=>{l?.(v),n(!1)},[l,n]),r=a.useRef(null),N=a.useRef(null),I=a.useRef(null);return a.useLayoutEffect(()=>{I.current?.toggleAttribute("inert",!d)},[d]),c.useMenuButton(r,N,{open:d,onOpenChange:n,closeOnFocusOut:!1,closeOnOutsidePress:!1}),M==="hidden"?null:e.jsxs("div",{ref:m,id:j,className:`nice-hamburger-menu nice-hamburger-menu--${_} ${R??""}`,style:$,...D,children:[e.jsx("button",{ref:r,className:"nice-hamburger-menu__trigger",onClick:t,"aria-label":k("nav.menu","Menu"),"aria-haspopup":"menu","aria-expanded":d,type:"button",children:e.jsxs("span",{className:`nice-hamburger-menu__icon ${d?"nice-hamburger-menu__icon--open":""}`,children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}),d&&e.jsx("div",{className:"nice-hamburger-menu__backdrop",onClick:t,"aria-hidden":!0}),e.jsxs("div",{ref:I,className:`nice-hamburger-menu__panel nice-hamburger-menu__panel--${y} ${d?"nice-hamburger-menu__panel--open":""}`,style:{width:A},children:[g&&e.jsx("div",{className:"nice-hamburger-menu__header",children:g}),e.jsx("ul",{className:"nice-hamburger-menu__list",role:"menu",ref:N,children:p.map(v=>e.jsx("li",{children:e.jsxs("button",{className:`nice-hamburger-menu__item ${v.key===f?"nice-hamburger-menu__item--active":""}`,onClick:()=>o(v),disabled:v.disabled,role:"menuitem",type:"button",children:[v.icon&&e.jsx("span",{className:"nice-hamburger-menu__item-icon",children:v.icon}),e.jsx("span",{children:v.text}),v.badge!==void 0&&e.jsx("span",{className:"nice-hamburger-menu__item-badge",children:v.badge})]})},v.key))}),b&&e.jsx("div",{className:"nice-hamburger-menu__footer",children:b})]})]})}),{displayName:"NiceHamburgerMenu"}),J=Object.assign(a.forwardRef(({canGoBack:p=!1,canGoForward:f=!1,onBack:l,onForward:x,onRefresh:u,enableShortcuts:y=!0,showRefresh:A=!0,showStop:g=!0,isLoading:b=!1,onStop:_,size:R="md",variant:$="default",tooltipPosition:S="bottom",backIcon:C,forwardIcon:D,refreshIcon:m,stopIcon:j,className:M,style:k,id:h,accessMode:i,disabled:d,...n},t)=>{const o=c.useControlId(h),r=c.useNiceAccessMode(i,h),{t:N}=c.useNiceTranslation();if(a.useEffect(()=>{if(!y||d)return;const T=w=>{const O=w.altKey,B=w.ctrlKey||w.metaKey;O&&w.key==="ArrowLeft"?(w.preventDefault(),p&&l?.()):O&&w.key==="ArrowRight"?(w.preventDefault(),f&&x?.()):w.key==="F5"||B&&w.key==="r"?(w.preventDefault(),b?_?.():u?.()):w.key==="Escape"&&b&&(w.preventDefault(),_?.())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[y,d,p,f,b,l,x,u,_]),r==="hidden")return null;const I=r==="disabled"||d,v=C??e.jsx(c.NiceIcon,{name:"chevron-left",size:16}),P=D??e.jsx(c.NiceIcon,{name:"chevron-right",size:16}),F=m??e.jsx(c.NiceIcon,{name:"refresh",size:16}),L=j??e.jsx(c.NiceIcon,{name:"close",size:16});return e.jsxs("div",{ref:t,id:o,className:`nice-nav-controls nice-nav-controls--${R} nice-nav-controls--${$}${I?" nice-nav-controls--disabled":""}${M?` ${M}`:""}`,style:k,role:"navigation","aria-label":N("nav.controls","Navigation controls"),...n,children:[e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--back${p?"":" nice-nav-controls__btn--disabled"}`,onClick:l,disabled:I||!p,"aria-label":N("nav.back","Back"),title:`${N("nav.back","Back")} (Alt+←)`,children:v}),e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--forward${f?"":" nice-nav-controls__btn--disabled"}`,onClick:x,disabled:I||!f,"aria-label":N("nav.forward","Forward"),title:`${N("nav.forward","Forward")} (Alt+→)`,children:P}),(A||g&&b)&&(b?e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--stop nice-nav-controls__btn--loading",onClick:_,disabled:I,"aria-label":N("nav.stop","Stop"),title:`${N("nav.stop","Stop")} (Esc)`,children:L}):e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--refresh",onClick:u,disabled:I,"aria-label":N("nav.refresh","Refresh"),title:`${N("nav.refresh","Refresh")} (F5)`,children:F}))]})}),{displayName:"NiceNavigationControls"});exports.DEFAULT_SIDEBAR_PREFS=s.DEFAULT_SIDEBAR_PREFS;exports.DesktopContextMenu=s.DesktopContextMenu;exports.DesktopGrid=s.DesktopGrid;exports.DesktopStartMenu=s.DesktopStartMenu;exports.DesktopSystemTray=s.DesktopSystemTray;exports.DesktopTaskbar=s.DesktopTaskbar;exports.NiceAccordion=s.NiceAccordion;exports.NiceAppLayout=s.NiceAppLayout;exports.NiceAuthButtons=s.NiceAuthButtons;exports.NiceBreadcrumb=s.NiceBreadcrumb;exports.NiceCard=s.NiceCard;exports.NiceConsole=s.NiceConsole;exports.NiceContextMenu=s.NiceContextMenu;exports.NiceDashboardLayout=s.NiceDashboardLayout;exports.NiceDashboardShell=s.NiceDashboardShell;exports.NiceDesktop=s.NiceDesktop;exports.NiceDock=s.NiceDock;exports.NiceDynamicSidebar=s.NiceDynamicSidebar;exports.NiceHybridShell=s.NiceHybridShell;exports.NiceKioskShell=s.NiceKioskShell;exports.NiceMdiWorkspace=s.NiceMdiWorkspace;exports.NiceMenu=s.NiceMenu;exports.NiceMinimalShell=s.NiceMinimalShell;exports.NiceModeSelector=s.NiceModeSelector;exports.NiceModernShell=s.NiceModernShell;exports.NiceModuleLifecyclePanel=s.NiceModuleLifecyclePanel;exports.NiceNavMenu=s.NiceNavMenu;exports.NiceNavbar=s.NiceNavbar;exports.NiceOrganizationProfileForm=s.NiceOrganizationProfileForm;exports.NicePwaShell=s.NicePwaShell;exports.NiceSetupWizard=s.NiceSetupWizard;exports.NiceSidebarNav=s.NiceSidebarNav;exports.NiceSplitter=s.NiceSplitter;exports.NiceUserMenu=s.NiceUserMenu;exports.NiceWizard=s.NiceWizard;exports.SIDEBAR_MODE_META=s.SIDEBAR_MODE_META;exports.sidebarModeLabel=s.sidebarModeLabel;exports.NiceTabs=z.NiceTabs;exports.NicePagination=K.NicePagination;exports.NiceDockMenu=V;exports.NiceHamburgerMenu=Y;exports.NiceNavigationControls=J;exports.NiceRibbonMenu=U;exports.NiceSidebarMenu=W;exports.NiceTopMenu=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NiceModuleLifecyclePanel-DIYT_O2m.cjs"),e=require("react/jsx-runtime"),i=require("@nice2dev/ui-core"),a=require("react"),z=require("./pickerCommons-CUGHOWyc.cjs"),K=require("./NicePagination-D_3GfWp5.cjs"),E=[],W=Object.assign(a.forwardRef(({items:p=E,activeKey:f,collapsed:l=!1,width:x=240,collapsedWidth:d=52,onItemClick:y,onCollapseChange:I,header:g,footer:b,size:_="md",className:R,style:$,id:S,accessMode:C,...w},m)=>{const j=i.useControlId(S),M=i.useNiceAccessMode(C,S),[k,h]=a.useState(new Set),c=a.useCallback(n=>{h(t=>{const o=new Set(t);return o.has(n)?o.delete(n):o.add(n),o})},[]);if(M==="hidden")return null;const u=(n,t=0)=>{const o=n.children&&n.children.length>0,r=k.has(n.key),N=n.key===f;return e.jsxs("li",{className:"nice-sidebar-menu__item",children:[e.jsxs("button",{className:`nice-sidebar-menu__btn ${N?"nice-sidebar-menu__btn--active":""} ${n.disabled?"nice-sidebar-menu__btn--disabled":""}`,style:{paddingLeft:l?void 0:12+t*16},onClick:()=>o?c(n.key):y?.(n),disabled:n.disabled,title:l?n.text:void 0,type:"button",children:[n.icon&&e.jsx("span",{className:"nice-sidebar-menu__icon",children:n.icon}),!l&&e.jsx("span",{className:"nice-sidebar-menu__label",children:n.text}),!l&&n.badge!==void 0&&e.jsx("span",{className:"nice-sidebar-menu__badge",children:n.badge}),!l&&o&&e.jsx("span",{className:"nice-sidebar-menu__chevron",children:e.jsx(i.NiceIcon,{name:r?"chevron-down":"chevron-right",size:14})})]}),o&&r&&!l&&e.jsx("ul",{className:"nice-sidebar-menu__children",children:n.children.map(A=>u(A,t+1))})]},n.key)};return e.jsxs("nav",{ref:m,id:j,className:`nice-sidebar-menu nice-sidebar-menu--${_} ${l?"nice-sidebar-menu--collapsed":""} ${R??""}`,style:{...$,width:l?d:x},...w,children:[g&&e.jsx("div",{className:"nice-sidebar-menu__header",children:g}),e.jsx("ul",{className:"nice-sidebar-menu__list",role:"list",children:p.map(n=>u(n))}),b&&e.jsx("div",{className:"nice-sidebar-menu__footer",children:b})]})}),{displayName:"NiceSidebarMenu"}),q=Object.assign(a.forwardRef(({items:p=E,activeKey:f,onItemClick:l,brand:x,actions:d,size:y="md",className:I,style:g,id:b,accessMode:_,...R},$)=>{const S=i.useControlId(b),C=i.useNiceAccessMode(_,b),[w,m]=a.useState(null),[j,M]=a.useState(!1),k=a.useRef(null),h=a.useRef(null);i.useRovingFocus(k,{orientation:"horizontal",wrap:!0,typeahead:!0}),i.useRovingFocus(h,{orientation:"vertical",wrap:!0,typeahead:!0}),i.useOverlayFocus(h,{open:w!=null&&!j,modal:!1,onClose:()=>m(null)});const c=n=>{M(!1),m(n)},u=n=>{if(n.key!=="ArrowLeft"&&n.key!=="ArrowRight")return;n.preventDefault();const t=[...k.current?.querySelectorAll(".nice-top-menu__btn")??[]],o=t.findIndex(N=>N.getAttribute("aria-expanded")==="true"),r=t[(o+(n.key==="ArrowRight"?1:-1)+t.length)%t.length];m(null),r?.focus()};return C==="hidden"?null:e.jsxs("nav",{ref:$,id:S,className:`nice-top-menu nice-top-menu--${y} ${I??""}`,style:g,...R,children:[x&&e.jsx("div",{className:"nice-top-menu__brand",children:x}),e.jsx("ul",{className:"nice-top-menu__items",role:"menubar",ref:k,children:p.map(n=>{const t=n.children&&n.children.length>0,o=w===n.key;return e.jsxs("li",{className:"nice-top-menu__item",onMouseEnter:()=>{t&&(M(!0),m(n.key))},onMouseLeave:()=>t&&m(null),children:[e.jsxs("button",{className:`nice-top-menu__btn ${n.key===f?"nice-top-menu__btn--active":""}`,onClick:()=>t?o?m(null):c(n.key):l?.(n),onKeyDown:r=>{const N=r.nativeEvent.niceSource;t&&r.key==="ArrowDown"&&N!=="gamepad"&&(r.preventDefault(),c(n.key))},role:"menuitem","aria-haspopup":t,"aria-expanded":o,disabled:n.disabled,type:"button",children:[n.icon&&e.jsx("span",{children:n.icon}),e.jsx("span",{children:n.text}),t&&e.jsx("span",{className:"nice-top-menu__chevron",children:e.jsx(i.NiceIcon,{name:"chevron-down",size:14})})]}),t&&o&&e.jsx("ul",{className:"nice-top-menu__dropdown",role:"menu",ref:h,onKeyDown:u,children:n.children.map(r=>e.jsx("li",{children:e.jsxs("button",{className:`nice-top-menu__dropdown-btn ${r.key===f?"nice-top-menu__dropdown-btn--active":""}`,onClick:()=>{l?.(r),m(null)},disabled:r.disabled,role:"menuitem",type:"button",children:[r.icon&&e.jsx("span",{children:r.icon}),e.jsx("span",{children:r.text}),r.badge!==void 0&&e.jsx("span",{className:"nice-top-menu__badge",children:r.badge})]})},r.key))})]},n.key)})}),d&&e.jsx("div",{className:"nice-top-menu__actions",children:d})]})}),{displayName:"NiceTopMenu"}),H=[],U=Object.assign(a.forwardRef(({tabs:p=H,activeTab:f,onTabChange:l,onItemClick:x,minimized:d=!1,onMinimizeToggle:y,size:I="md",className:g,style:b,id:_,accessMode:R,...$},S)=>{const C=a.useRef(null);i.useRovingFocus(C,{orientation:"horizontal",wrap:!0,activateOnMove:!0});const w=i.useControlId(_),m=i.useNiceAccessMode(R,_),{t:j}=i.useNiceTranslation(),[M,k]=a.useState(void 0),h=f??M??p[0]?.key,c=p.find(n=>n.key===h),u=a.useCallback(n=>{k(n),l?.(n)},[l]);return m==="hidden"?null:e.jsxs("div",{ref:S,id:w,className:`nice-ribbon-menu nice-ribbon-menu--${I} ${d?"nice-ribbon-menu--minimized":""} ${g??""}`,style:b,...$,children:[e.jsxs("div",{className:"nice-ribbon-menu__tabs",ref:C,role:"tablist",children:[p.map(n=>e.jsx("button",{className:`nice-ribbon-menu__tab ${n.key===h?"nice-ribbon-menu__tab--active":""}`,onClick:()=>u(n.key),role:"tab","aria-selected":n.key===h,type:"button",children:n.label},n.key)),e.jsx("button",{className:"nice-ribbon-menu__minimize",onClick:()=>y?.(!d),type:"button","aria-label":d?j("nav.expand","Expand"):j("nav.collapse","Collapse"),children:e.jsx(i.NiceIcon,{name:d?"chevron-down":"chevron-up",size:14})})]}),!d&&c&&e.jsx("div",{className:"nice-ribbon-menu__panel",role:"tabpanel",children:c.groups.map((n,t)=>e.jsxs("div",{className:"nice-ribbon-menu__group",children:[e.jsx("div",{className:"nice-ribbon-menu__group-items",children:n.items.map(o=>e.jsxs("button",{className:"nice-ribbon-menu__item",onClick:()=>x?.(o),disabled:o.disabled,type:"button",children:[o.icon&&e.jsx("span",{className:"nice-ribbon-menu__item-icon",children:o.icon}),e.jsx("span",{className:"nice-ribbon-menu__item-label",children:o.text})]},o.key))}),e.jsx("div",{className:"nice-ribbon-menu__group-label",children:n.label})]},t))})]})}),{displayName:"NiceRibbonMenu"}),V=Object.assign(a.forwardRef(({items:p=E,activeKey:f,onItemClick:l,position:x="bottom",autoHide:d=!1,iconSize:y=40,size:I="md",className:g,style:b,id:_,accessMode:R,...$},S)=>{const C=i.useControlId(_),w=i.useNiceAccessMode(R,_),[m,j]=a.useState(!1),[M,k]=a.useState(!1),h=!d||m||M;return w==="hidden"?null:e.jsx("div",{ref:S,id:C,className:`nice-dock-menu nice-dock-menu--${x} nice-dock-menu--${I} ${d&&!h?"nice-dock-menu--hidden":""} ${g??""}`,style:b,onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onFocus:()=>k(!0),onBlur:c=>{c.currentTarget.contains(c.relatedTarget)||k(!1)},...$,children:e.jsx("div",{className:"nice-dock-menu__items",children:p.map(c=>e.jsxs("button",{className:`nice-dock-menu__item ${c.key===f?"nice-dock-menu__item--active":""}`,onClick:()=>l?.(c),disabled:c.disabled,title:c.text,"aria-label":c.text,type:"button",style:{width:y,height:y},children:[c.icon?e.jsx("span",{className:"nice-dock-menu__icon",children:c.icon}):e.jsx("span",{children:c.text[0]}),c.badge!==void 0&&e.jsx("span",{className:"nice-dock-menu__badge",children:c.badge})]},c.key))})})}),{displayName:"NiceDockMenu"}),Y=Object.assign(a.forwardRef(({items:p=E,activeKey:f,onItemClick:l,open:x,onOpenChange:d,position:y="left",panelWidth:I=280,header:g,footer:b,size:_="md",className:R,style:$,id:S,accessMode:C,...w},m)=>{const j=i.useControlId(S),M=i.useNiceAccessMode(C,S),{t:k}=i.useNiceTranslation(),[h,c]=a.useState(!1),u=x??h,n=a.useCallback(v=>{c(v),d?.(v)},[d]),t=a.useCallback(()=>n(!u),[u,n]),o=a.useCallback(v=>{l?.(v),n(!1)},[l,n]),r=a.useRef(null),N=a.useRef(null),A=a.useRef(null);return a.useLayoutEffect(()=>{A.current?.toggleAttribute("inert",!u)},[u]),i.useMenuButton(r,N,{open:u,onOpenChange:n,closeOnFocusOut:!1,closeOnOutsidePress:!1}),M==="hidden"?null:e.jsxs("div",{ref:m,id:j,className:`nice-hamburger-menu nice-hamburger-menu--${_} ${R??""}`,style:$,...w,children:[e.jsx("button",{ref:r,className:"nice-hamburger-menu__trigger",onClick:t,"aria-label":k("nav.menu","Menu"),"aria-haspopup":"menu","aria-expanded":u,type:"button",children:e.jsxs("span",{className:`nice-hamburger-menu__icon ${u?"nice-hamburger-menu__icon--open":""}`,children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}),u&&e.jsx("div",{className:"nice-hamburger-menu__backdrop",onClick:t,"aria-hidden":!0}),e.jsxs("div",{ref:A,className:`nice-hamburger-menu__panel nice-hamburger-menu__panel--${y} ${u?"nice-hamburger-menu__panel--open":""}`,style:{width:I},children:[g&&e.jsx("div",{className:"nice-hamburger-menu__header",children:g}),e.jsx("ul",{className:"nice-hamburger-menu__list",role:"menu",ref:N,children:p.map(v=>e.jsx("li",{children:e.jsxs("button",{className:`nice-hamburger-menu__item ${v.key===f?"nice-hamburger-menu__item--active":""}`,onClick:()=>o(v),disabled:v.disabled,role:"menuitem",type:"button",children:[v.icon&&e.jsx("span",{className:"nice-hamburger-menu__item-icon",children:v.icon}),e.jsx("span",{children:v.text}),v.badge!==void 0&&e.jsx("span",{className:"nice-hamburger-menu__item-badge",children:v.badge})]})},v.key))}),b&&e.jsx("div",{className:"nice-hamburger-menu__footer",children:b})]})]})}),{displayName:"NiceHamburgerMenu"}),J=Object.assign(a.forwardRef(({canGoBack:p=!1,canGoForward:f=!1,onBack:l,onForward:x,onRefresh:d,enableShortcuts:y=!0,showRefresh:I=!0,showStop:g=!0,isLoading:b=!1,onStop:_,size:R="md",variant:$="default",tooltipPosition:S="bottom",backIcon:C,forwardIcon:w,refreshIcon:m,stopIcon:j,className:M,style:k,id:h,accessMode:c,disabled:u,...n},t)=>{const o=i.useControlId(h),r=i.useNiceAccessMode(c,h),{t:N}=i.useNiceTranslation();if(a.useEffect(()=>{if(!y||u)return;const T=D=>{const O=D.altKey,L=D.ctrlKey||D.metaKey;O&&D.key==="ArrowLeft"?(D.preventDefault(),p&&l?.()):O&&D.key==="ArrowRight"?(D.preventDefault(),f&&x?.()):D.key==="F5"||L&&D.key==="r"?(D.preventDefault(),b?_?.():d?.()):D.key==="Escape"&&b&&(D.preventDefault(),_?.())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[y,u,p,f,b,l,x,d,_]),r==="hidden")return null;const A=r==="disabled"||u,v=C??e.jsx(i.NiceIcon,{name:"chevron-left",size:16}),P=w??e.jsx(i.NiceIcon,{name:"chevron-right",size:16}),B=m??e.jsx(i.NiceIcon,{name:"refresh",size:16}),F=j??e.jsx(i.NiceIcon,{name:"close",size:16});return e.jsxs("div",{ref:t,id:o,className:`nice-nav-controls nice-nav-controls--${R} nice-nav-controls--${$}${A?" nice-nav-controls--disabled":""}${M?` ${M}`:""}`,style:k,role:"navigation","aria-label":N("nav.controls","Navigation controls"),...n,children:[e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--back${p?"":" nice-nav-controls__btn--disabled"}`,onClick:l,disabled:A||!p,"aria-label":N("nav.back","Back"),title:`${N("nav.back","Back")} (Alt+←)`,children:v}),e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--forward${f?"":" nice-nav-controls__btn--disabled"}`,onClick:x,disabled:A||!f,"aria-label":N("nav.forward","Forward"),title:`${N("nav.forward","Forward")} (Alt+→)`,children:P}),(I||g&&b)&&(b?e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--stop nice-nav-controls__btn--loading",onClick:_,disabled:A,"aria-label":N("nav.stop","Stop"),title:`${N("nav.stop","Stop")} (Esc)`,children:F}):e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--refresh",onClick:d,disabled:A,"aria-label":N("nav.refresh","Refresh"),title:`${N("nav.refresh","Refresh")} (F5)`,children:B}))]})}),{displayName:"NiceNavigationControls"});exports.DEFAULT_SIDEBAR_PREFS=s.DEFAULT_SIDEBAR_PREFS;exports.DesktopContextMenu=s.DesktopContextMenu;exports.DesktopGrid=s.DesktopGrid;exports.DesktopStartMenu=s.DesktopStartMenu;exports.DesktopSystemTray=s.DesktopSystemTray;exports.DesktopTaskbar=s.DesktopTaskbar;exports.NiceAccordion=s.NiceAccordion;exports.NiceAppLayout=s.NiceAppLayout;exports.NiceAuthButtons=s.NiceAuthButtons;exports.NiceBreadcrumb=s.NiceBreadcrumb;exports.NiceCard=s.NiceCard;exports.NiceConsole=s.NiceConsole;exports.NiceContextMenu=s.NiceContextMenu;exports.NiceDashboardLayout=s.NiceDashboardLayout;exports.NiceDashboardShell=s.NiceDashboardShell;exports.NiceDesktop=s.NiceDesktop;exports.NiceDock=s.NiceDock;exports.NiceDynamicSidebar=s.NiceDynamicSidebar;exports.NiceHybridShell=s.NiceHybridShell;exports.NiceKioskShell=s.NiceKioskShell;exports.NiceMdiWorkspace=s.NiceMdiWorkspace;exports.NiceMenu=s.NiceMenu;exports.NiceMinimalShell=s.NiceMinimalShell;exports.NiceModeSelector=s.NiceModeSelector;exports.NiceModernShell=s.NiceModernShell;exports.NiceModuleLifecyclePanel=s.NiceModuleLifecyclePanel;exports.NiceNavMenu=s.NiceNavMenu;exports.NiceNavbar=s.NiceNavbar;exports.NiceOrganizationProfileForm=s.NiceOrganizationProfileForm;exports.NicePwaShell=s.NicePwaShell;exports.NiceSetupWizard=s.NiceSetupWizard;exports.NiceSidebarNav=s.NiceSidebarNav;exports.NiceSplitter=s.NiceSplitter;exports.NiceUserMenu=s.NiceUserMenu;exports.NiceWizard=s.NiceWizard;exports.SIDEBAR_MODE_META=s.SIDEBAR_MODE_META;exports.findSidebarItemByRoute=s.findSidebarItemByRoute;exports.mapSidebarViews=s.mapSidebarViews;exports.sidebarModeLabel=s.sidebarModeLabel;exports.walkSidebarNav=s.walkSidebarNav;exports.NiceTabs=z.NiceTabs;exports.NicePagination=K.NicePagination;exports.NiceDockMenu=V;exports.NiceHamburgerMenu=Y;exports.NiceNavigationControls=J;exports.NiceRibbonMenu=U;exports.NiceSidebarMenu=W;exports.NiceTopMenu=q;
@@ -76,6 +76,9 @@ declare interface DualVisibilityProps {
76
76
  showTextInMenu?: boolean;
77
77
  }
78
78
 
79
+ /** The first view with `route`, searched in every tree unless `options.trees` says otherwise. */
80
+ export declare function findSidebarItemByRoute(data: readonly SidebarNavDataNode[], route: string, options?: WalkSidebarNavOptions): SidebarNavVisit<SidebarNavView> | undefined;
81
+
79
82
  declare interface Language {
80
83
  /** BCP-47 language tag, e.g. 'en', 'en-US', 'pt-BR'. */
81
84
  code: string;
@@ -93,6 +96,12 @@ declare interface Language {
93
96
 
94
97
  declare type LanguageDisplayName = 'native' | 'english';
95
98
 
99
+ /**
100
+ * A copy of `data` with `fn` applied to every view, nested ones included — e.g. to add badges.
101
+ * Return the view itself to keep it as it is.
102
+ */
103
+ export declare function mapSidebarViews(data: readonly SidebarNavDataNode[], fn: (view: SidebarNavView, depth: number) => SidebarNavView): SidebarNavDataNode[];
104
+
96
105
  /** A breadcrumb item. */
97
106
  declare interface NavbarBreadcrumb {
98
107
  label: string;
@@ -1564,9 +1573,19 @@ export declare interface NiceSidebarNavProps {
1564
1573
  * — e.g. a single-pane layout — can ignore the third argument; nothing else
1565
1574
  * changes for them.
1566
1575
  */
1567
- onNavigate?: (route: string, view: SidebarNavView, opts?: {
1568
- forceNew?: boolean;
1569
- }) => void;
1576
+ onNavigate?: (route: string, view: SidebarNavView, opts?: SidebarNavNavigateOptions) => void;
1577
+ /**
1578
+ * Colours per level for the whole tree (1.3.2): `[0]` is the source header, `[1]` the first level
1579
+ * under it, and so on; levels past the end take tints of the last colour. Each row gets its
1580
+ * level's colour as a full background with readable text. A branch's own `color` / `levelColors`
1581
+ * overrides it for that subtree.
1582
+ */
1583
+ levelColors?: string[];
1584
+ /**
1585
+ * Which way the deeper levels of a colour go: `'tint'` (towards white), `'shade'` (towards black)
1586
+ * or `'auto'` (default) — shades in a dark theme, tints otherwise.
1587
+ */
1588
+ levelShading?: 'auto' | 'tint' | 'shade';
1570
1589
  /**
1571
1590
  * Resolves a route key to a URL. When provided, the right-click menu shows
1572
1591
  * "Open in new browser tab" (via `window.open`) and "Copy link". When
@@ -2169,14 +2188,32 @@ export declare const SIDEBAR_MODE_META: Record<SidebarNavMode, {
2169
2188
  label: string;
2170
2189
  }>;
2171
2190
 
2191
+ declare type SidebarLevelShading = 'tint' | 'shade';
2192
+
2172
2193
  /** Translated label for a sidebar mode, falling back to the English default. */
2173
2194
  export declare function sidebarModeLabel(t: NiceTranslateFn, mode: SidebarNavMode): string;
2174
2195
 
2196
+ /**
2197
+ * Colour of a branch (1.3.2), on sources, modules, roles, units and views. The branch's row and
2198
+ * everything under it take the colour as a full row background, each deeper level a tint of it (a
2199
+ * shade in a dark theme), with readable text. Overrides the sidebar's `levelColors` and the colour
2200
+ * of the branches above for this subtree.
2201
+ */
2202
+ export declare interface SidebarNavBranchColors {
2203
+ /** One colour: the branch itself, deeper levels tints of it. Hex or `rgb()` gets the tints and the
2204
+ * readable text; any other CSS colour is used as given on every level. */
2205
+ color?: string;
2206
+ /** Colours per level of this branch, starting with the branch itself; past the end, tints of the
2207
+ * last one. Wins over `color`. */
2208
+ levelColors?: string[];
2209
+ }
2210
+
2175
2211
  /**
2176
2212
  * Top-level data node: one data source with all its navigation children.
2177
- * modules → used in 'all' mode (depth: source → module → view)
2178
- * roles → used in 'by-role' mode (depth: source → role → module → view)
2179
- * units → used in 'by-unit' mode (depth: source → unit → module → view)
2213
+ * modules → used in 'all' mode (depth: source → module → view → …)
2214
+ * roles → used in 'by-role' mode (depth: source → role → module → view → …)
2215
+ * units → used in 'by-unit' mode (depth: source → unit → module → view → …)
2216
+ * Views nest further through `children`, to any depth.
2180
2217
  */
2181
2218
  export declare interface SidebarNavDataNode {
2182
2219
  source: SidebarNavDataSource;
@@ -2189,13 +2226,12 @@ export declare interface SidebarNavDataNode {
2189
2226
  }
2190
2227
 
2191
2228
  /** A database / API instance that can be pinned per mode */
2192
- export declare interface SidebarNavDataSource {
2229
+ export declare interface SidebarNavDataSource extends SidebarNavBranchColors {
2193
2230
  id: string;
2194
2231
  label: string;
2195
2232
  /** Custom hover tooltip. Falls back to `label` when omitted. */
2196
2233
  tooltip?: ReactNode;
2197
2234
  icon?: ReactNode;
2198
- color?: string;
2199
2235
  /** Server URL or connection string hint */
2200
2236
  url?: string;
2201
2237
  type?: 'database' | 'instance' | 'api' | 'other';
@@ -2211,6 +2247,9 @@ export declare interface SidebarNavFavorite {
2211
2247
  route?: string;
2212
2248
  sourceId?: string;
2213
2249
  moduleId?: string;
2250
+ /** Branch colour of the item when it was added (1.3.2) — the favorites list shows it and passes it
2251
+ * on in `onNavigate`. */
2252
+ color?: string;
2214
2253
  addedAt: number;
2215
2254
  }
2216
2255
 
@@ -2223,11 +2262,13 @@ export declare interface SidebarNavHiddenItem {
2223
2262
  label: string;
2224
2263
  }
2225
2264
 
2265
+ export declare type SidebarNavItem = SidebarNavDataSource | SidebarNavRole | SidebarNavUnit | SidebarNavModule | SidebarNavView;
2266
+
2226
2267
  /** Display mode for the sidebar navigation */
2227
2268
  export declare type SidebarNavMode = 'all' | 'by-role' | 'by-unit' | 'favorites' | 'search' | 'preferences';
2228
2269
 
2229
2270
  /** A module containing multiple views */
2230
- export declare interface SidebarNavModule {
2271
+ export declare interface SidebarNavModule extends SidebarNavBranchColors {
2231
2272
  id: string;
2232
2273
  label: string;
2233
2274
  /** Custom hover tooltip. Falls back to `label` when omitted. */
@@ -2238,8 +2279,29 @@ export declare interface SidebarNavModule {
2238
2279
  sourceId?: string;
2239
2280
  }
2240
2281
 
2282
+ /** Third argument of `onNavigate`. */
2283
+ export declare interface SidebarNavNavigateOptions {
2284
+ /** Open a new tab even when the route is already open — the user's left-click preference or the
2285
+ * "Open in new tab" menu item. */
2286
+ forceNew?: boolean;
2287
+ /** Background of the clicked row: the colour of its level or branch, when one is set (1.3.2). */
2288
+ color?: string;
2289
+ /** Base colour of the nearest branch with its own `color` / `levelColors` — e.g. the database a
2290
+ * source stands for. What NiceNavShell's `tabColors="branch"` paints a tab with (1.3.2). */
2291
+ branchColor?: string;
2292
+ /** Ids and labels from the source down to the clicked item (1.3.2). */
2293
+ path?: SidebarNavPathEntry[];
2294
+ }
2295
+
2296
+ /** One step of the path from the source down to an item. */
2297
+ export declare interface SidebarNavPathEntry {
2298
+ id: string;
2299
+ label: string;
2300
+ icon?: ReactNode;
2301
+ }
2302
+
2241
2303
  /** A role grouping modules */
2242
- export declare interface SidebarNavRole {
2304
+ export declare interface SidebarNavRole extends SidebarNavBranchColors {
2243
2305
  id: string;
2244
2306
  label: string;
2245
2307
  /** Custom hover tooltip. Falls back to `label` when omitted. */
@@ -2250,8 +2312,11 @@ export declare interface SidebarNavRole {
2250
2312
  sourceId?: string;
2251
2313
  }
2252
2314
 
2315
+ /** The three trees of a data node: `modules` (the "All" mode), `roles`, `units`. */
2316
+ export declare type SidebarNavTreeName = 'modules' | 'roles' | 'units';
2317
+
2253
2318
  /** An organizational unit grouping modules */
2254
- export declare interface SidebarNavUnit {
2319
+ export declare interface SidebarNavUnit extends SidebarNavBranchColors {
2255
2320
  id: string;
2256
2321
  label: string;
2257
2322
  /** Custom hover tooltip. Falls back to `label` when omitted. */
@@ -2279,8 +2344,8 @@ export declare interface SidebarNavUserPrefs {
2279
2344
  hiddenItems: SidebarNavHiddenItem[];
2280
2345
  favorites: SidebarNavFavorite[];
2281
2346
  /**
2282
- * How many levels to show per mode.
2283
- * 1 = sources only, 2 = sources + first level, 3 = …, 4 = all (default)
2347
+ * How many levels to show per mode: 1 = sources only, 2 = sources + first level, 3 = … Absent or
2348
+ * 10 and more = every level (1.3.2; it was 4 before levels could nest).
2284
2349
  */
2285
2350
  maxDepth: Partial<Record<SidebarNavMode, number>>;
2286
2351
  /** IDs that are manually collapsed */
@@ -2303,22 +2368,61 @@ export declare interface SidebarNavUserPrefs {
2303
2368
  * Edited from the "Order" page in preferences.
2304
2369
  */
2305
2370
  itemOrder: Partial<Record<SidebarNavMode, string[]>>;
2371
+ /**
2372
+ * How a level / branch colour shows (1.3.3; `levelColors`, a branch's `color`):
2373
+ * - `'bar'` (default): a bar in the colour left of each row's arrow, and NavShell's tabs
2374
+ * underlined in it;
2375
+ * - `'fill'`: the whole row filled with it (text picked for contrast), and the tabs tinted
2376
+ * with a bar along the top — the look of 1.3.2.
2377
+ *
2378
+ * Set from the Display page of the preferences; `preferences={{ colorStyle: 'fill' }}` makes
2379
+ * `'fill'` the default.
2380
+ */
2381
+ colorStyle: 'bar' | 'fill';
2306
2382
  }
2307
2383
 
2308
- /** A single navigable view / entity view */
2309
- export declare interface SidebarNavView {
2384
+ /**
2385
+ * A single navigable view / entity view. With `children` it is a group (1.3.2), nested to any
2386
+ * depth. Ids must be unique across the whole tree: collapse state, favorites and hidden items are
2387
+ * kept by id.
2388
+ */
2389
+ export declare interface SidebarNavView extends SidebarNavBranchColors {
2310
2390
  id: string;
2311
2391
  label: string;
2312
2392
  /** Custom hover tooltip. Falls back to `label` when omitted. */
2313
2393
  tooltip?: ReactNode;
2314
2394
  icon?: ReactNode;
2315
- /** Route path for navigation */
2395
+ /**
2396
+ * Route path for navigation. On a group (a view with `children`), clicking the label opens the
2397
+ * route and expands the group; the arrow only expands or collapses it.
2398
+ */
2316
2399
  route?: string;
2317
2400
  /** Badge counter (unread notifications, pending tasks, …) */
2318
2401
  badge?: string | number;
2319
2402
  isExternal?: boolean;
2320
2403
  /** Module this view belongs to */
2321
2404
  moduleId?: string;
2405
+ /** Nested items (1.3.2) — a view with children is a group. */
2406
+ children?: SidebarNavView[];
2407
+ }
2408
+
2409
+ /** One item met by {@link walkSidebarNav}. */
2410
+ export declare interface SidebarNavVisit<T extends SidebarNavItem = SidebarNavItem> {
2411
+ item: T;
2412
+ kind: SidebarNavHiddenItem['kind'];
2413
+ /** The level its row is drawn at: 1 = source, 2 = the first level under it, … */
2414
+ depth: number;
2415
+ /** The items above it, from the source down (itself not included). */
2416
+ ancestors: SidebarNavPathEntry[];
2417
+ sourceId: string;
2418
+ /** The module it belongs to (a module: itself). */
2419
+ moduleId?: string;
2420
+ /** The tree it was met in; absent for the source. */
2421
+ tree?: SidebarNavTreeName;
2422
+ /** Base colour of the nearest branch with its own colour, itself included. */
2423
+ branchColor?: string;
2424
+ /** Background of its row, when levels or branches are coloured. */
2425
+ color?: string;
2322
2426
  }
2323
2427
 
2324
2428
  declare interface StartMenuProps {
@@ -2376,6 +2480,21 @@ declare interface UserMenuItem {
2376
2480
  disabled?: boolean;
2377
2481
  }
2378
2482
 
2483
+ /**
2484
+ * Visit every item of `data`, depth first, parents before their children. Return `false` from
2485
+ * `visit` to skip an item's subtree.
2486
+ */
2487
+ export declare function walkSidebarNav(data: readonly SidebarNavDataNode[], visit: (v: SidebarNavVisit) => boolean | void, options?: WalkSidebarNavOptions): void;
2488
+
2489
+ export declare interface WalkSidebarNavOptions {
2490
+ /** Trees to walk. Default `['modules']`. */
2491
+ trees?: SidebarNavTreeName[];
2492
+ /** The sidebar's `levelColors`, so `color` matches the drawn rows. */
2493
+ levelColors?: string[];
2494
+ /** Direction of the tints. Default `'tint'`. */
2495
+ shading?: SidebarLevelShading;
2496
+ }
2497
+
2379
2498
  /** A single step in the wizard. */
2380
2499
  declare interface WizardStep {
2381
2500
  id: string;