@nice2dev/ui 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NiceModuleLifecyclePanel-D8EoXqBy.cjs"),e=require("react/jsx-runtime"),c=require("@nice2dev/ui-core"),a=require("react"),z=require("./pickerCommons-DvQptSPX.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-Bk5MXMVu.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;
@@ -1469,6 +1478,14 @@ export declare interface NiceSetupWizardProps {
1469
1478
  };
1470
1479
  /** Accessibility */
1471
1480
  accessMode?: NiceAccessMode;
1481
+ /**
1482
+ * Height of the wizard (1.3.1) — px or any CSS length. Default: as tall as the step, up to the
1483
+ * screen (`max-height: 100vh`), so on a short step the button bar sits right under it. With a
1484
+ * height the wizard fills exactly that (no 400px minimum, no 100vh cap): the step body scrolls
1485
+ * and the button bar stays at the bottom edge on every step. `'100%'` fills a parent with a
1486
+ * definite height, `'100dvh'` the screen.
1487
+ */
1488
+ height?: number | string;
1472
1489
  id?: string;
1473
1490
  className?: string;
1474
1491
  style?: default_2.CSSProperties;
@@ -1556,9 +1573,19 @@ export declare interface NiceSidebarNavProps {
1556
1573
  * — e.g. a single-pane layout — can ignore the third argument; nothing else
1557
1574
  * changes for them.
1558
1575
  */
1559
- onNavigate?: (route: string, view: SidebarNavView, opts?: {
1560
- forceNew?: boolean;
1561
- }) => 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';
1562
1589
  /**
1563
1590
  * Resolves a route key to a URL. When provided, the right-click menu shows
1564
1591
  * "Open in new browser tab" (via `window.open`) and "Copy link". When
@@ -1930,7 +1957,8 @@ declare interface NiceThemePickerProps extends NiceFormFieldProps, DualVisibilit
1930
1957
  previewSize?: number;
1931
1958
  /**
1932
1959
  * Preview rendering style:
1933
- * - `'page'` (default): a small "page" thumbnail with header/text/sidebar.
1960
+ * - `'page'` (default): a page in miniature — accent bar on top, a card with two lines of text
1961
+ * between thin margins of the page background.
1934
1962
  * - `'swatch'`: a flag-like vertical colour stripe (cheaper, less informative).
1935
1963
  */
1936
1964
  previewShape?: 'page' | 'swatch';
@@ -2160,14 +2188,32 @@ export declare const SIDEBAR_MODE_META: Record<SidebarNavMode, {
2160
2188
  label: string;
2161
2189
  }>;
2162
2190
 
2191
+ declare type SidebarLevelShading = 'tint' | 'shade';
2192
+
2163
2193
  /** Translated label for a sidebar mode, falling back to the English default. */
2164
2194
  export declare function sidebarModeLabel(t: NiceTranslateFn, mode: SidebarNavMode): string;
2165
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
+
2166
2211
  /**
2167
2212
  * Top-level data node: one data source with all its navigation children.
2168
- * modules → used in 'all' mode (depth: source → module → view)
2169
- * roles → used in 'by-role' mode (depth: source → role → module → view)
2170
- * 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.
2171
2217
  */
2172
2218
  export declare interface SidebarNavDataNode {
2173
2219
  source: SidebarNavDataSource;
@@ -2180,13 +2226,12 @@ export declare interface SidebarNavDataNode {
2180
2226
  }
2181
2227
 
2182
2228
  /** A database / API instance that can be pinned per mode */
2183
- export declare interface SidebarNavDataSource {
2229
+ export declare interface SidebarNavDataSource extends SidebarNavBranchColors {
2184
2230
  id: string;
2185
2231
  label: string;
2186
2232
  /** Custom hover tooltip. Falls back to `label` when omitted. */
2187
2233
  tooltip?: ReactNode;
2188
2234
  icon?: ReactNode;
2189
- color?: string;
2190
2235
  /** Server URL or connection string hint */
2191
2236
  url?: string;
2192
2237
  type?: 'database' | 'instance' | 'api' | 'other';
@@ -2202,6 +2247,9 @@ export declare interface SidebarNavFavorite {
2202
2247
  route?: string;
2203
2248
  sourceId?: string;
2204
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;
2205
2253
  addedAt: number;
2206
2254
  }
2207
2255
 
@@ -2214,11 +2262,13 @@ export declare interface SidebarNavHiddenItem {
2214
2262
  label: string;
2215
2263
  }
2216
2264
 
2265
+ export declare type SidebarNavItem = SidebarNavDataSource | SidebarNavRole | SidebarNavUnit | SidebarNavModule | SidebarNavView;
2266
+
2217
2267
  /** Display mode for the sidebar navigation */
2218
2268
  export declare type SidebarNavMode = 'all' | 'by-role' | 'by-unit' | 'favorites' | 'search' | 'preferences';
2219
2269
 
2220
2270
  /** A module containing multiple views */
2221
- export declare interface SidebarNavModule {
2271
+ export declare interface SidebarNavModule extends SidebarNavBranchColors {
2222
2272
  id: string;
2223
2273
  label: string;
2224
2274
  /** Custom hover tooltip. Falls back to `label` when omitted. */
@@ -2229,8 +2279,29 @@ export declare interface SidebarNavModule {
2229
2279
  sourceId?: string;
2230
2280
  }
2231
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
+
2232
2303
  /** A role grouping modules */
2233
- export declare interface SidebarNavRole {
2304
+ export declare interface SidebarNavRole extends SidebarNavBranchColors {
2234
2305
  id: string;
2235
2306
  label: string;
2236
2307
  /** Custom hover tooltip. Falls back to `label` when omitted. */
@@ -2241,8 +2312,11 @@ export declare interface SidebarNavRole {
2241
2312
  sourceId?: string;
2242
2313
  }
2243
2314
 
2315
+ /** The three trees of a data node: `modules` (the "All" mode), `roles`, `units`. */
2316
+ export declare type SidebarNavTreeName = 'modules' | 'roles' | 'units';
2317
+
2244
2318
  /** An organizational unit grouping modules */
2245
- export declare interface SidebarNavUnit {
2319
+ export declare interface SidebarNavUnit extends SidebarNavBranchColors {
2246
2320
  id: string;
2247
2321
  label: string;
2248
2322
  /** Custom hover tooltip. Falls back to `label` when omitted. */
@@ -2270,8 +2344,8 @@ export declare interface SidebarNavUserPrefs {
2270
2344
  hiddenItems: SidebarNavHiddenItem[];
2271
2345
  favorites: SidebarNavFavorite[];
2272
2346
  /**
2273
- * How many levels to show per mode.
2274
- * 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).
2275
2349
  */
2276
2350
  maxDepth: Partial<Record<SidebarNavMode, number>>;
2277
2351
  /** IDs that are manually collapsed */
@@ -2296,20 +2370,48 @@ export declare interface SidebarNavUserPrefs {
2296
2370
  itemOrder: Partial<Record<SidebarNavMode, string[]>>;
2297
2371
  }
2298
2372
 
2299
- /** A single navigable view / entity view */
2300
- export declare interface SidebarNavView {
2373
+ /**
2374
+ * A single navigable view / entity view. With `children` it is a group (1.3.2), nested to any
2375
+ * depth. Ids must be unique across the whole tree: collapse state, favorites and hidden items are
2376
+ * kept by id.
2377
+ */
2378
+ export declare interface SidebarNavView extends SidebarNavBranchColors {
2301
2379
  id: string;
2302
2380
  label: string;
2303
2381
  /** Custom hover tooltip. Falls back to `label` when omitted. */
2304
2382
  tooltip?: ReactNode;
2305
2383
  icon?: ReactNode;
2306
- /** Route path for navigation */
2384
+ /**
2385
+ * Route path for navigation. On a group (a view with `children`), clicking the label opens the
2386
+ * route and expands the group; the arrow only expands or collapses it.
2387
+ */
2307
2388
  route?: string;
2308
2389
  /** Badge counter (unread notifications, pending tasks, …) */
2309
2390
  badge?: string | number;
2310
2391
  isExternal?: boolean;
2311
2392
  /** Module this view belongs to */
2312
2393
  moduleId?: string;
2394
+ /** Nested items (1.3.2) — a view with children is a group. */
2395
+ children?: SidebarNavView[];
2396
+ }
2397
+
2398
+ /** One item met by {@link walkSidebarNav}. */
2399
+ export declare interface SidebarNavVisit<T extends SidebarNavItem = SidebarNavItem> {
2400
+ item: T;
2401
+ kind: SidebarNavHiddenItem['kind'];
2402
+ /** The level its row is drawn at: 1 = source, 2 = the first level under it, … */
2403
+ depth: number;
2404
+ /** The items above it, from the source down (itself not included). */
2405
+ ancestors: SidebarNavPathEntry[];
2406
+ sourceId: string;
2407
+ /** The module it belongs to (a module: itself). */
2408
+ moduleId?: string;
2409
+ /** The tree it was met in; absent for the source. */
2410
+ tree?: SidebarNavTreeName;
2411
+ /** Base colour of the nearest branch with its own colour, itself included. */
2412
+ branchColor?: string;
2413
+ /** Background of its row, when levels or branches are coloured. */
2414
+ color?: string;
2313
2415
  }
2314
2416
 
2315
2417
  declare interface StartMenuProps {
@@ -2335,17 +2437,20 @@ declare interface TaskbarProps {
2335
2437
  onItemClick?: (key: string) => void;
2336
2438
  }
2337
2439
 
2338
- /** Colours used to render a theme preview thumbnail. All optional except `background`. */
2440
+ /** Colours used to render a theme preview thumbnail. */
2339
2441
  declare interface ThemePreviewColors {
2340
- /** Main page background. */
2442
+ /** Main surface (a theme's `backgrounds.primary`) — the card in the middle of the 'page' shape. */
2341
2443
  background: string;
2342
- /** Sidebar / secondary surface (left bar in 'page' shape). */
2444
+ /**
2445
+ * Secondary surface (`backgrounds.secondary`) — the page background left and right of the card
2446
+ * in the 'page' shape. Defaults to `background`.
2447
+ */
2343
2448
  backgroundSecondary?: string;
2344
- /** Accent / header bar colour. */
2449
+ /** Accent — the bar across the top of the 'page' shape. */
2345
2450
  primary: string;
2346
- /** Body text colour (rendered as a thin line). */
2451
+ /** Body text — the two lines on the card. */
2347
2452
  textColor: string;
2348
- /** Optional border (defaults to a translucent overlay). */
2453
+ /** Border of the thumbnail and of the card (defaults to a translucent overlay). */
2349
2454
  border?: string;
2350
2455
  }
2351
2456
 
@@ -2364,6 +2469,21 @@ declare interface UserMenuItem {
2364
2469
  disabled?: boolean;
2365
2470
  }
2366
2471
 
2472
+ /**
2473
+ * Visit every item of `data`, depth first, parents before their children. Return `false` from
2474
+ * `visit` to skip an item's subtree.
2475
+ */
2476
+ export declare function walkSidebarNav(data: readonly SidebarNavDataNode[], visit: (v: SidebarNavVisit) => boolean | void, options?: WalkSidebarNavOptions): void;
2477
+
2478
+ export declare interface WalkSidebarNavOptions {
2479
+ /** Trees to walk. Default `['modules']`. */
2480
+ trees?: SidebarNavTreeName[];
2481
+ /** The sidebar's `levelColors`, so `color` matches the drawn rows. */
2482
+ levelColors?: string[];
2483
+ /** Direction of the tints. Default `'tint'`. */
2484
+ shading?: SidebarLevelShading;
2485
+ }
2486
+
2367
2487
  /** A single step in the wizard. */
2368
2488
  declare interface WizardStep {
2369
2489
  id: string;