@nice2dev/ui 1.3.12 → 1.3.13
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/CHANGELOG.md +72 -0
- package/dist/NiceModuleLifecyclePanel-BakQIZ5c.js +8418 -0
- package/dist/NiceModuleLifecyclePanel-ui6mzXQS.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/index.cjs +238 -238
- package/dist/index.css +1 -1
- package/dist/index.d.ts +697 -3
- package/dist/index.mjs +21737 -19198
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +81 -0
- package/dist/navigation.mjs +97 -96
- package/dist/style.css +2 -2
- package/package.json +4 -4
package/dist/navigation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NiceModuleLifecyclePanel-DCrFyUH8.cjs"),e=require("react/jsx-runtime"),i=require("@nice2dev/ui-core"),a=require("react"),z=require("./pickerCommons-KrBqCBDn.cjs"),K=require("./NicePagination-CKsAP38Q.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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./NiceModuleLifecyclePanel-ui6mzXQS.cjs"),e=require("react/jsx-runtime"),i=require("@nice2dev/ui-core"),a=require("react"),z=require("./pickerCommons-KrBqCBDn.cjs"),K=require("./NicePagination-CKsAP38Q.cjs"),E=[],W=Object.assign(a.forwardRef(({items:p=E,activeKey:f,collapsed:l=!1,width:x=240,collapsedWidth:d=52,onItemClick:y,onCollapseChange:A,header:g,footer:b,size:_="md",className:R,style:I,id:S,accessMode:D,...C},m)=>{const j=i.useControlId(S),M=i.useNiceAccessMode(D,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($=>u($,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:{...I,width:l?d:x},...C,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:A,style:g,id:b,accessMode:_,...R},I)=>{const S=i.useControlId(b),D=i.useNiceAccessMode(_,b),[C,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:C!=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 D==="hidden"?null:e.jsxs("nav",{ref:I,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=C===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"}),U=[],H=Object.assign(a.forwardRef(({tabs:p=U,activeTab:f,onTabChange:l,onItemClick:x,minimized:d=!1,onMinimizeToggle:y,size:A="md",className:g,style:b,id:_,accessMode:R,...I},S)=>{const D=a.useRef(null);i.useRovingFocus(D,{orientation:"horizontal",wrap:!0,activateOnMove:!0});const C=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:C,className:`nice-ribbon-menu nice-ribbon-menu--${A} ${d?"nice-ribbon-menu--minimized":""} ${g??""}`,style:b,...I,children:[e.jsxs("div",{className:"nice-ribbon-menu__tabs",ref:D,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:A="md",className:g,style:b,id:_,accessMode:R,...I},S)=>{const D=i.useControlId(_),C=i.useNiceAccessMode(R,_),[m,j]=a.useState(!1),[M,k]=a.useState(!1),h=!d||m||M;return C==="hidden"?null:e.jsx("div",{ref:S,id:D,className:`nice-dock-menu nice-dock-menu--${x} nice-dock-menu--${A} ${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)},...I,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:A=280,header:g,footer:b,size:_="md",className:R,style:I,id:S,accessMode:D,...C},m)=>{const j=i.useControlId(S),M=i.useNiceAccessMode(D,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.useRef(null);return a.useLayoutEffect(()=>{$.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:I,...C,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:$,className:`nice-hamburger-menu__panel nice-hamburger-menu__panel--${y} ${u?"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:d,enableShortcuts:y=!0,showRefresh:A=!0,showStop:g=!0,isLoading:b=!1,onStop:_,size:R="md",variant:I="default",tooltipPosition:S="bottom",backIcon:D,forwardIcon:C,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=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?_?.():d?.()):w.key==="Escape"&&b&&(w.preventDefault(),_?.())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[y,u,p,f,b,l,x,d,_]),r==="hidden")return null;const $=r==="disabled"||u,v=D??e.jsx(i.NiceIcon,{name:"chevron-left",size:16}),F=C??e.jsx(i.NiceIcon,{name:"chevron-right",size:16}),L=m??e.jsx(i.NiceIcon,{name:"refresh",size:16}),P=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--${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:$||!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:$||!f,"aria-label":N("nav.forward","Forward"),title:`${N("nav.forward","Forward")} (Alt+→)`,children:F}),(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:$,"aria-label":N("nav.stop","Stop"),title:`${N("nav.stop","Stop")} (Esc)`,children:P}):e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--refresh",onClick:d,disabled:$,"aria-label":N("nav.refresh","Refresh"),title:`${N("nav.refresh","Refresh")} (F5)`,children:L}))]})}),{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_DEFAULT_FAVORITE_LIST=s.SIDEBAR_DEFAULT_FAVORITE_LIST;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=H;exports.NiceSidebarMenu=W;exports.NiceTopMenu=q;
|
package/dist/navigation.d.ts
CHANGED
|
@@ -655,6 +655,22 @@ export declare interface NiceHybridShellProps extends NiceBaseProps {
|
|
|
655
655
|
hintBar?: NiceShellHintBar;
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
+
/** A button of {@link NiceIconRail}. */
|
|
659
|
+
declare interface NiceIconRailItem {
|
|
660
|
+
id: string;
|
|
661
|
+
/** The caption under the icon. */
|
|
662
|
+
label: string;
|
|
663
|
+
icon: default_2.ReactNode;
|
|
664
|
+
/** Hover text; default the caption. */
|
|
665
|
+
title?: string;
|
|
666
|
+
/** A count or a short mark on the icon. */
|
|
667
|
+
badge?: string | number;
|
|
668
|
+
disabled?: boolean;
|
|
669
|
+
/** A route the host opens when the button is pressed (no `onClick`). */
|
|
670
|
+
route?: string;
|
|
671
|
+
onClick?: () => void;
|
|
672
|
+
}
|
|
673
|
+
|
|
658
674
|
export declare const NiceKioskShell: ForwardRefExoticComponent<NiceKioskShellProps & RefAttributes<HTMLDivElement>> & {
|
|
659
675
|
displayName: string;
|
|
660
676
|
};
|
|
@@ -1709,6 +1725,41 @@ export declare interface NiceSidebarNavProps {
|
|
|
1709
1725
|
* in collapsed mode (legacy behaviour).
|
|
1710
1726
|
*/
|
|
1711
1727
|
expandableWhenCollapsed?: boolean;
|
|
1728
|
+
/**
|
|
1729
|
+
* A second level (1.3.13): a column of buttons — icon, caption under it — on the outer side of
|
|
1730
|
+
* the sidebar. With items the footer has two buttons: the left one goes a level back (bar →
|
|
1731
|
+
* sidebar → icons), the right one a level on (icons → sidebar → bar). Without them the footer
|
|
1732
|
+
* is the one collapse button it always was.
|
|
1733
|
+
*/
|
|
1734
|
+
railItems?: NiceIconRailItem[];
|
|
1735
|
+
/** The bar is shown (controlled). */
|
|
1736
|
+
railOpen?: boolean;
|
|
1737
|
+
/** The bar is shown at mount (uncontrolled; default `false`). */
|
|
1738
|
+
defaultRailOpen?: boolean;
|
|
1739
|
+
/** Called when the bar is shown or hidden. */
|
|
1740
|
+
onRailOpenChange?: (open: boolean) => void;
|
|
1741
|
+
/** Width of the bar in px (default 76). */
|
|
1742
|
+
railWidth?: number;
|
|
1743
|
+
/** The bar's button of the page in view; default the one whose `route` is `activeRoute`. */
|
|
1744
|
+
railActiveId?: string;
|
|
1745
|
+
/**
|
|
1746
|
+
* By role / By unit with two or more roles / units (1.3.13): a bar under the mode icons picks
|
|
1747
|
+
* one and the tree shows its modules (`activeGroupId` in the preferences). `false` lists them
|
|
1748
|
+
* all, each a group, as before. Default `true`.
|
|
1749
|
+
*/
|
|
1750
|
+
groupPicker?: boolean;
|
|
1751
|
+
/**
|
|
1752
|
+
* How the Favourites view shows a list (1.3.13): `'list'` (default) — the items one under
|
|
1753
|
+
* another; `'tree'` — under their parents as the other tabs show them (source, role / unit,
|
|
1754
|
+
* module, the groups above), shared parents merged.
|
|
1755
|
+
*/
|
|
1756
|
+
favoritesLayout?: 'list' | 'tree';
|
|
1757
|
+
/**
|
|
1758
|
+
* Where a favourite sits in the `'tree'` layout: the items above it, from the top down; `[]` puts
|
|
1759
|
+
* it at the top. Default: the path it was added from (`favorite.path`), else where its view is in
|
|
1760
|
+
* `data` (By module first). Labels and icons of the parents come from `data` when they are in it.
|
|
1761
|
+
*/
|
|
1762
|
+
getFavoritePath?: (favorite: SidebarNavFavorite) => SidebarNavPathEntry[] | undefined;
|
|
1712
1763
|
/** Extra CSS class on the root element */
|
|
1713
1764
|
className?: string;
|
|
1714
1765
|
/** Size variant */
|
|
@@ -2220,6 +2271,9 @@ declare interface SetupWizardStep {
|
|
|
2220
2271
|
nextLabel?: string;
|
|
2221
2272
|
}
|
|
2222
2273
|
|
|
2274
|
+
/** The id of the default favourites list — the one `favorites` holds (1.3.13). */
|
|
2275
|
+
export declare const SIDEBAR_DEFAULT_FAVORITE_LIST = "favorites";
|
|
2276
|
+
|
|
2223
2277
|
/**
|
|
2224
2278
|
* Icon (ReactNode) + English label for each mode. Icons are theme-reactive
|
|
2225
2279
|
* (use currentColor). The label is the untranslated fallback — render it
|
|
@@ -2292,9 +2346,23 @@ export declare interface SidebarNavFavorite {
|
|
|
2292
2346
|
/** Branch colour of the item when it was added (1.3.2) — the favorites list shows it and passes it
|
|
2293
2347
|
* on in `onNavigate`. */
|
|
2294
2348
|
color?: string;
|
|
2349
|
+
/**
|
|
2350
|
+
* The items above it in the tab it was added from, from the source down (1.3.13) — where
|
|
2351
|
+
* `favoritesLayout="tree"` puts it. Plain data: an icon only as an icon name.
|
|
2352
|
+
*/
|
|
2353
|
+
path?: SidebarNavPathEntry[];
|
|
2295
2354
|
addedAt: number;
|
|
2296
2355
|
}
|
|
2297
2356
|
|
|
2357
|
+
/** A favourites list of the user's own (1.3.13); the default list stays in `favorites`. */
|
|
2358
|
+
export declare interface SidebarNavFavoriteList {
|
|
2359
|
+
id: string;
|
|
2360
|
+
label: string;
|
|
2361
|
+
/** Its items; an icon is kept only as an icon name (a string), so the list stores as JSON. */
|
|
2362
|
+
items: SidebarNavFavorite[];
|
|
2363
|
+
createdAt: number;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2298
2366
|
export declare interface SidebarNavHiddenItem {
|
|
2299
2367
|
/** The id of the hidden entity (source/module/view/role/unit id) */
|
|
2300
2368
|
id: string;
|
|
@@ -2391,7 +2459,20 @@ export declare interface SidebarNavUserPrefs {
|
|
|
2391
2459
|
*/
|
|
2392
2460
|
pinnedSources: Partial<Record<SidebarNavMode, string[]>>;
|
|
2393
2461
|
hiddenItems: SidebarNavHiddenItem[];
|
|
2462
|
+
/** The default favourites list ("Favourites"). */
|
|
2394
2463
|
favorites: SidebarNavFavorite[];
|
|
2464
|
+
/**
|
|
2465
|
+
* More favourites lists, made by the user (1.3.13). The Favourites view picks one with the bar
|
|
2466
|
+
* under the mode icons; an item's star puts it on any of them.
|
|
2467
|
+
*/
|
|
2468
|
+
favoriteLists?: SidebarNavFavoriteList[];
|
|
2469
|
+
/** The list the Favourites view shows (1.3.13); default the default list. */
|
|
2470
|
+
activeFavoriteListId?: string;
|
|
2471
|
+
/**
|
|
2472
|
+
* The role / unit the By role / By unit view shows (1.3.13), chosen with the bar under the mode
|
|
2473
|
+
* icons when there are two or more; default the first.
|
|
2474
|
+
*/
|
|
2475
|
+
activeGroupId?: Partial<Record<'by-role' | 'by-unit', string>>;
|
|
2395
2476
|
/**
|
|
2396
2477
|
* How many levels to show per mode: 1 = sources only, 2 = sources + first level, 3 = … Absent or
|
|
2397
2478
|
* 10 and more = every level (1.3.2; it was 4 before levels could nest).
|
package/dist/navigation.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { D as de, a as ue, b as be, c as me, d as pe, e as _e, N as he, f as Ne, g as ve, h as fe, i as ye, j as ge, k as ke, l as we, m as
|
|
1
|
+
import { D as de, a as ue, b as be, c as me, d as pe, e as _e, N as he, f as Ne, g as ve, h as fe, i as ye, j as ge, k as ke, l as we, m as Me, n as $e, o as De, p as Ce, q as xe, r as Se, s as Ae, t as Ee, u as Ie, v as Oe, w as Re, x as Te, y as Be, z as Fe, A as Le, B as Pe, C as ze, E as je, F as Ke, G as We, H as He, S as Ue, I as Ve, J as qe, K as Je, L as Ye, M as Qe } from "./NiceModuleLifecyclePanel-BakQIZ5c.js";
|
|
2
2
|
import { jsx as n, jsxs as b } from "react/jsx-runtime";
|
|
3
|
-
import { useControlId as T, useNiceAccessMode as B, useNiceTranslation as j, useMenuButton as J, useRovingFocus as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { a as
|
|
6
|
-
import { N as
|
|
7
|
-
const
|
|
8
|
-
/* @__PURE__ */
|
|
3
|
+
import { useControlId as T, useNiceAccessMode as B, useNiceTranslation as j, useMenuButton as J, useRovingFocus as z, NiceIcon as I, useOverlayFocus as Y } from "@nice2dev/ui-core";
|
|
4
|
+
import { forwardRef as F, useState as O, useCallback as L, useRef as R, useLayoutEffect as Q, useEffect as X } from "react";
|
|
5
|
+
import { a as Ze } from "./pickerCommons-BA3-D5RC.js";
|
|
6
|
+
import { N as en } from "./NicePagination-zOed5QxG.js";
|
|
7
|
+
const P = [], ae = /* @__PURE__ */ Object.assign(
|
|
8
|
+
/* @__PURE__ */ F(
|
|
9
9
|
({
|
|
10
|
-
items: m =
|
|
10
|
+
items: m = P,
|
|
11
11
|
activeKey: N,
|
|
12
12
|
collapsed: t = !1,
|
|
13
13
|
width: v = 240,
|
|
14
14
|
collapsedWidth: o = 52,
|
|
15
15
|
onItemClick: y,
|
|
16
|
-
onCollapseChange:
|
|
16
|
+
onCollapseChange: A,
|
|
17
17
|
header: g,
|
|
18
18
|
footer: l,
|
|
19
19
|
size: p = "md",
|
|
20
20
|
className: x,
|
|
21
21
|
style: S,
|
|
22
|
-
id:
|
|
23
|
-
accessMode:
|
|
24
|
-
...
|
|
22
|
+
id: M,
|
|
23
|
+
accessMode: $,
|
|
24
|
+
...D
|
|
25
25
|
}, u) => {
|
|
26
|
-
const k = T(
|
|
26
|
+
const k = T(M), w = B($, M), [f, _] = O(/* @__PURE__ */ new Set()), a = L((e) => {
|
|
27
27
|
_((i) => {
|
|
28
28
|
const s = new Set(i);
|
|
29
29
|
return s.has(e) ? s.delete(e) : s.add(e), s;
|
|
@@ -47,11 +47,11 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
47
47
|
e.icon && /* @__PURE__ */ n("span", { className: "nice-sidebar-menu__icon", children: e.icon }),
|
|
48
48
|
!t && /* @__PURE__ */ n("span", { className: "nice-sidebar-menu__label", children: e.text }),
|
|
49
49
|
!t && e.badge !== void 0 && /* @__PURE__ */ n("span", { className: "nice-sidebar-menu__badge", children: e.badge }),
|
|
50
|
-
!t && s && /* @__PURE__ */ n("span", { className: "nice-sidebar-menu__chevron", children: /* @__PURE__ */ n(
|
|
50
|
+
!t && s && /* @__PURE__ */ n("span", { className: "nice-sidebar-menu__chevron", children: /* @__PURE__ */ n(I, { name: c ? "chevron-down" : "chevron-right", size: 14 }) })
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
s && c && !t && /* @__PURE__ */ n("ul", { className: "nice-sidebar-menu__children", children: e.children.map((
|
|
54
|
+
s && c && !t && /* @__PURE__ */ n("ul", { className: "nice-sidebar-menu__children", children: e.children.map((E) => r(E, i + 1)) })
|
|
55
55
|
] }, e.key);
|
|
56
56
|
};
|
|
57
57
|
return /* @__PURE__ */ b(
|
|
@@ -61,7 +61,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
61
61
|
id: k,
|
|
62
62
|
className: `nice-sidebar-menu nice-sidebar-menu--${p} ${t ? "nice-sidebar-menu--collapsed" : ""} ${x ?? ""}`,
|
|
63
63
|
style: { ...S, width: t ? o : v },
|
|
64
|
-
...
|
|
64
|
+
...D,
|
|
65
65
|
children: [
|
|
66
66
|
g && /* @__PURE__ */ n("div", { className: "nice-sidebar-menu__header", children: g }),
|
|
67
67
|
/* @__PURE__ */ n("ul", { className: "nice-sidebar-menu__list", role: "list", children: m.map((e) => r(e)) }),
|
|
@@ -73,23 +73,23 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
73
73
|
),
|
|
74
74
|
{ displayName: "NiceSidebarMenu" }
|
|
75
75
|
), se = /* @__PURE__ */ Object.assign(
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ F(
|
|
77
77
|
({
|
|
78
|
-
items: m =
|
|
78
|
+
items: m = P,
|
|
79
79
|
activeKey: N,
|
|
80
80
|
onItemClick: t,
|
|
81
81
|
brand: v,
|
|
82
82
|
actions: o,
|
|
83
83
|
size: y = "md",
|
|
84
|
-
className:
|
|
84
|
+
className: A,
|
|
85
85
|
style: g,
|
|
86
86
|
id: l,
|
|
87
87
|
accessMode: p,
|
|
88
88
|
...x
|
|
89
89
|
}, S) => {
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
open:
|
|
90
|
+
const M = T(l), $ = B(p, l), [D, u] = O(null), [k, w] = O(!1), f = R(null), _ = R(null);
|
|
91
|
+
z(f, { orientation: "horizontal", wrap: !0, typeahead: !0 }), z(_, { orientation: "vertical", wrap: !0, typeahead: !0 }), Y(_, {
|
|
92
|
+
open: D != null && !k,
|
|
93
93
|
modal: !1,
|
|
94
94
|
onClose: () => u(null)
|
|
95
95
|
});
|
|
@@ -104,18 +104,18 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
104
104
|
], s = i.findIndex((d) => d.getAttribute("aria-expanded") === "true"), c = i[(s + (e.key === "ArrowRight" ? 1 : -1) + i.length) % i.length];
|
|
105
105
|
u(null), c?.focus();
|
|
106
106
|
};
|
|
107
|
-
return
|
|
107
|
+
return $ === "hidden" ? null : /* @__PURE__ */ b(
|
|
108
108
|
"nav",
|
|
109
109
|
{
|
|
110
110
|
ref: S,
|
|
111
|
-
id:
|
|
112
|
-
className: `nice-top-menu nice-top-menu--${y} ${
|
|
111
|
+
id: M,
|
|
112
|
+
className: `nice-top-menu nice-top-menu--${y} ${A ?? ""}`,
|
|
113
113
|
style: g,
|
|
114
114
|
...x,
|
|
115
115
|
children: [
|
|
116
116
|
v && /* @__PURE__ */ n("div", { className: "nice-top-menu__brand", children: v }),
|
|
117
117
|
/* @__PURE__ */ n("ul", { className: "nice-top-menu__items", role: "menubar", ref: f, children: m.map((e) => {
|
|
118
|
-
const i = e.children && e.children.length > 0, s =
|
|
118
|
+
const i = e.children && e.children.length > 0, s = D === e.key;
|
|
119
119
|
return /* @__PURE__ */ b(
|
|
120
120
|
"li",
|
|
121
121
|
{
|
|
@@ -142,7 +142,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
142
142
|
children: [
|
|
143
143
|
e.icon && /* @__PURE__ */ n("span", { children: e.icon }),
|
|
144
144
|
/* @__PURE__ */ n("span", { children: e.text }),
|
|
145
|
-
i && /* @__PURE__ */ n("span", { className: "nice-top-menu__chevron", children: /* @__PURE__ */ n(
|
|
145
|
+
i && /* @__PURE__ */ n("span", { className: "nice-top-menu__chevron", children: /* @__PURE__ */ n(I, { name: "chevron-down", size: 14 }) })
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
),
|
|
@@ -185,7 +185,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
185
185
|
),
|
|
186
186
|
{ displayName: "NiceTopMenu" }
|
|
187
187
|
), Z = [], ie = /* @__PURE__ */ Object.assign(
|
|
188
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ F(
|
|
189
189
|
({
|
|
190
190
|
tabs: m = Z,
|
|
191
191
|
activeTab: N,
|
|
@@ -193,16 +193,16 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
193
193
|
onItemClick: v,
|
|
194
194
|
minimized: o = !1,
|
|
195
195
|
onMinimizeToggle: y,
|
|
196
|
-
size:
|
|
196
|
+
size: A = "md",
|
|
197
197
|
className: g,
|
|
198
198
|
style: l,
|
|
199
199
|
id: p,
|
|
200
200
|
accessMode: x,
|
|
201
201
|
...S
|
|
202
|
-
},
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
const
|
|
202
|
+
}, M) => {
|
|
203
|
+
const $ = R(null);
|
|
204
|
+
z($, { orientation: "horizontal", wrap: !0, activateOnMove: !0 });
|
|
205
|
+
const D = T(p), u = B(x, p), { t: k } = j(), [w, f] = O(void 0), _ = N ?? w ?? m[0]?.key, a = m.find((e) => e.key === _), r = L(
|
|
206
206
|
(e) => {
|
|
207
207
|
f(e), t?.(e);
|
|
208
208
|
},
|
|
@@ -211,13 +211,13 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
211
211
|
return u === "hidden" ? null : /* @__PURE__ */ b(
|
|
212
212
|
"div",
|
|
213
213
|
{
|
|
214
|
-
ref:
|
|
215
|
-
id:
|
|
216
|
-
className: `nice-ribbon-menu nice-ribbon-menu--${
|
|
214
|
+
ref: M,
|
|
215
|
+
id: D,
|
|
216
|
+
className: `nice-ribbon-menu nice-ribbon-menu--${A} ${o ? "nice-ribbon-menu--minimized" : ""} ${g ?? ""}`,
|
|
217
217
|
style: l,
|
|
218
218
|
...S,
|
|
219
219
|
children: [
|
|
220
|
-
/* @__PURE__ */ b("div", { className: "nice-ribbon-menu__tabs", ref:
|
|
220
|
+
/* @__PURE__ */ b("div", { className: "nice-ribbon-menu__tabs", ref: $, role: "tablist", children: [
|
|
221
221
|
m.map((e) => /* @__PURE__ */ n(
|
|
222
222
|
"button",
|
|
223
223
|
{
|
|
@@ -237,7 +237,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
237
237
|
onClick: () => y?.(!o),
|
|
238
238
|
type: "button",
|
|
239
239
|
"aria-label": o ? k("nav.expand", "Expand") : k("nav.collapse", "Collapse"),
|
|
240
|
-
children: /* @__PURE__ */ n(
|
|
240
|
+
children: /* @__PURE__ */ n(I, { name: o ? "chevron-down" : "chevron-up", size: 14 })
|
|
241
241
|
}
|
|
242
242
|
)
|
|
243
243
|
] }),
|
|
@@ -265,28 +265,28 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
265
265
|
),
|
|
266
266
|
{ displayName: "NiceRibbonMenu" }
|
|
267
267
|
), ce = /* @__PURE__ */ Object.assign(
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ F(
|
|
269
269
|
({
|
|
270
|
-
items: m =
|
|
270
|
+
items: m = P,
|
|
271
271
|
activeKey: N,
|
|
272
272
|
onItemClick: t,
|
|
273
273
|
position: v = "bottom",
|
|
274
274
|
autoHide: o = !1,
|
|
275
275
|
iconSize: y = 40,
|
|
276
|
-
size:
|
|
276
|
+
size: A = "md",
|
|
277
277
|
className: g,
|
|
278
278
|
style: l,
|
|
279
279
|
id: p,
|
|
280
280
|
accessMode: x,
|
|
281
281
|
...S
|
|
282
|
-
},
|
|
283
|
-
const
|
|
284
|
-
return
|
|
282
|
+
}, M) => {
|
|
283
|
+
const $ = T(p), D = B(x, p), [u, k] = O(!1), [w, f] = O(!1), _ = !o || u || w;
|
|
284
|
+
return D === "hidden" ? null : /* @__PURE__ */ n(
|
|
285
285
|
"div",
|
|
286
286
|
{
|
|
287
|
-
ref:
|
|
288
|
-
id:
|
|
289
|
-
className: `nice-dock-menu nice-dock-menu--${v} nice-dock-menu--${
|
|
287
|
+
ref: M,
|
|
288
|
+
id: $,
|
|
289
|
+
className: `nice-dock-menu nice-dock-menu--${v} nice-dock-menu--${A} ${o && !_ ? "nice-dock-menu--hidden" : ""} ${g ?? ""}`,
|
|
290
290
|
style: l,
|
|
291
291
|
onMouseEnter: () => k(!0),
|
|
292
292
|
onMouseLeave: () => k(!1),
|
|
@@ -318,37 +318,37 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
318
318
|
),
|
|
319
319
|
{ displayName: "NiceDockMenu" }
|
|
320
320
|
), te = /* @__PURE__ */ Object.assign(
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ F(
|
|
322
322
|
({
|
|
323
|
-
items: m =
|
|
323
|
+
items: m = P,
|
|
324
324
|
activeKey: N,
|
|
325
325
|
onItemClick: t,
|
|
326
326
|
open: v,
|
|
327
327
|
onOpenChange: o,
|
|
328
328
|
position: y = "left",
|
|
329
|
-
panelWidth:
|
|
329
|
+
panelWidth: A = 280,
|
|
330
330
|
header: g,
|
|
331
331
|
footer: l,
|
|
332
332
|
size: p = "md",
|
|
333
333
|
className: x,
|
|
334
334
|
style: S,
|
|
335
|
-
id:
|
|
336
|
-
accessMode:
|
|
337
|
-
...
|
|
335
|
+
id: M,
|
|
336
|
+
accessMode: $,
|
|
337
|
+
...D
|
|
338
338
|
}, u) => {
|
|
339
|
-
const k = T(
|
|
339
|
+
const k = T(M), w = B($, M), { t: f } = j(), [_, a] = O(!1), r = v ?? _, e = L(
|
|
340
340
|
(h) => {
|
|
341
341
|
a(h), o?.(h);
|
|
342
342
|
},
|
|
343
343
|
[o]
|
|
344
|
-
), i =
|
|
344
|
+
), i = L(() => e(!r), [r, e]), s = L(
|
|
345
345
|
(h) => {
|
|
346
346
|
t?.(h), e(!1);
|
|
347
347
|
},
|
|
348
348
|
[t, e]
|
|
349
|
-
), c = R(null), d = R(null),
|
|
349
|
+
), c = R(null), d = R(null), E = R(null);
|
|
350
350
|
return Q(() => {
|
|
351
|
-
|
|
351
|
+
E.current?.toggleAttribute("inert", !r);
|
|
352
352
|
}, [r]), J(c, d, {
|
|
353
353
|
open: r,
|
|
354
354
|
onOpenChange: e,
|
|
@@ -361,7 +361,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
361
361
|
id: k,
|
|
362
362
|
className: `nice-hamburger-menu nice-hamburger-menu--${p} ${x ?? ""}`,
|
|
363
363
|
style: S,
|
|
364
|
-
...
|
|
364
|
+
...D,
|
|
365
365
|
children: [
|
|
366
366
|
/* @__PURE__ */ n(
|
|
367
367
|
"button",
|
|
@@ -390,9 +390,9 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
390
390
|
/* @__PURE__ */ b(
|
|
391
391
|
"div",
|
|
392
392
|
{
|
|
393
|
-
ref:
|
|
393
|
+
ref: E,
|
|
394
394
|
className: `nice-hamburger-menu__panel nice-hamburger-menu__panel--${y} ${r ? "nice-hamburger-menu__panel--open" : ""}`,
|
|
395
|
-
style: { width:
|
|
395
|
+
style: { width: A },
|
|
396
396
|
children: [
|
|
397
397
|
g && /* @__PURE__ */ n("div", { className: "nice-hamburger-menu__header", children: g }),
|
|
398
398
|
/* @__PURE__ */ n("ul", { className: "nice-hamburger-menu__list", role: "menu", ref: d, children: m.map((h) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ b(
|
|
@@ -421,7 +421,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
421
421
|
),
|
|
422
422
|
{ displayName: "NiceHamburgerMenu" }
|
|
423
423
|
), oe = /* @__PURE__ */ Object.assign(
|
|
424
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ F(
|
|
425
425
|
({
|
|
426
426
|
canGoBack: m = !1,
|
|
427
427
|
canGoForward: N = !1,
|
|
@@ -429,15 +429,15 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
429
429
|
onForward: v,
|
|
430
430
|
onRefresh: o,
|
|
431
431
|
enableShortcuts: y = !0,
|
|
432
|
-
showRefresh:
|
|
432
|
+
showRefresh: A = !0,
|
|
433
433
|
showStop: g = !0,
|
|
434
434
|
isLoading: l = !1,
|
|
435
435
|
onStop: p,
|
|
436
436
|
size: x = "md",
|
|
437
437
|
variant: S = "default",
|
|
438
|
-
tooltipPosition:
|
|
439
|
-
backIcon:
|
|
440
|
-
forwardIcon:
|
|
438
|
+
tooltipPosition: M = "bottom",
|
|
439
|
+
backIcon: $,
|
|
440
|
+
forwardIcon: D,
|
|
441
441
|
refreshIcon: u,
|
|
442
442
|
stopIcon: k,
|
|
443
443
|
className: w,
|
|
@@ -451,9 +451,9 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
451
451
|
if (X(() => {
|
|
452
452
|
if (!y || r)
|
|
453
453
|
return;
|
|
454
|
-
const K = (
|
|
455
|
-
const W =
|
|
456
|
-
W &&
|
|
454
|
+
const K = (C) => {
|
|
455
|
+
const W = C.altKey, q = C.ctrlKey || C.metaKey;
|
|
456
|
+
W && C.key === "ArrowLeft" ? (C.preventDefault(), m && t?.()) : W && C.key === "ArrowRight" ? (C.preventDefault(), N && v?.()) : C.key === "F5" || q && C.key === "r" ? (C.preventDefault(), l ? p?.() : o?.()) : C.key === "Escape" && l && (C.preventDefault(), p?.());
|
|
457
457
|
};
|
|
458
458
|
return window.addEventListener("keydown", K), () => window.removeEventListener("keydown", K);
|
|
459
459
|
}, [
|
|
@@ -468,13 +468,13 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
468
468
|
p
|
|
469
469
|
]), c === "hidden")
|
|
470
470
|
return null;
|
|
471
|
-
const
|
|
471
|
+
const E = c === "disabled" || r, h = $ ?? /* @__PURE__ */ n(I, { name: "chevron-left", size: 16 }), H = D ?? /* @__PURE__ */ n(I, { name: "chevron-right", size: 16 }), U = u ?? /* @__PURE__ */ n(I, { name: "refresh", size: 16 }), V = k ?? /* @__PURE__ */ n(I, { name: "close", size: 16 });
|
|
472
472
|
return /* @__PURE__ */ b(
|
|
473
473
|
"div",
|
|
474
474
|
{
|
|
475
475
|
ref: i,
|
|
476
476
|
id: s,
|
|
477
|
-
className: `nice-nav-controls nice-nav-controls--${x} nice-nav-controls--${S}${
|
|
477
|
+
className: `nice-nav-controls nice-nav-controls--${x} nice-nav-controls--${S}${E ? " nice-nav-controls--disabled" : ""}${w ? ` ${w}` : ""}`,
|
|
478
478
|
style: f,
|
|
479
479
|
role: "navigation",
|
|
480
480
|
"aria-label": d("nav.controls", "Navigation controls"),
|
|
@@ -486,7 +486,7 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
486
486
|
type: "button",
|
|
487
487
|
className: `nice-nav-controls__btn nice-nav-controls__btn--back${m ? "" : " nice-nav-controls__btn--disabled"}`,
|
|
488
488
|
onClick: t,
|
|
489
|
-
disabled:
|
|
489
|
+
disabled: E || !m,
|
|
490
490
|
"aria-label": d("nav.back", "Back"),
|
|
491
491
|
title: `${d("nav.back", "Back")} (Alt+←)`,
|
|
492
492
|
children: h
|
|
@@ -498,22 +498,22 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
498
498
|
type: "button",
|
|
499
499
|
className: `nice-nav-controls__btn nice-nav-controls__btn--forward${N ? "" : " nice-nav-controls__btn--disabled"}`,
|
|
500
500
|
onClick: v,
|
|
501
|
-
disabled:
|
|
501
|
+
disabled: E || !N,
|
|
502
502
|
"aria-label": d("nav.forward", "Forward"),
|
|
503
503
|
title: `${d("nav.forward", "Forward")} (Alt+→)`,
|
|
504
504
|
children: H
|
|
505
505
|
}
|
|
506
506
|
),
|
|
507
|
-
(
|
|
507
|
+
(A || g && l) && (l ? /* @__PURE__ */ n(
|
|
508
508
|
"button",
|
|
509
509
|
{
|
|
510
510
|
type: "button",
|
|
511
511
|
className: "nice-nav-controls__btn nice-nav-controls__btn--stop nice-nav-controls__btn--loading",
|
|
512
512
|
onClick: p,
|
|
513
|
-
disabled:
|
|
513
|
+
disabled: E,
|
|
514
514
|
"aria-label": d("nav.stop", "Stop"),
|
|
515
515
|
title: `${d("nav.stop", "Stop")} (Esc)`,
|
|
516
|
-
children:
|
|
516
|
+
children: V
|
|
517
517
|
}
|
|
518
518
|
) : /* @__PURE__ */ n(
|
|
519
519
|
"button",
|
|
@@ -521,10 +521,10 @@ const F = [], ae = /* @__PURE__ */ Object.assign(
|
|
|
521
521
|
type: "button",
|
|
522
522
|
className: "nice-nav-controls__btn nice-nav-controls__btn--refresh",
|
|
523
523
|
onClick: o,
|
|
524
|
-
disabled:
|
|
524
|
+
disabled: E,
|
|
525
525
|
"aria-label": d("nav.refresh", "Refresh"),
|
|
526
526
|
title: `${d("nav.refresh", "Refresh")} (F5)`,
|
|
527
|
-
children:
|
|
527
|
+
children: U
|
|
528
528
|
}
|
|
529
529
|
))
|
|
530
530
|
]
|
|
@@ -549,38 +549,39 @@ export {
|
|
|
549
549
|
ge as NiceConsole,
|
|
550
550
|
ke as NiceContextMenu,
|
|
551
551
|
we as NiceDashboardLayout,
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
Me as NiceDashboardShell,
|
|
553
|
+
$e as NiceDesktop,
|
|
554
|
+
De as NiceDock,
|
|
555
555
|
ce as NiceDockMenu,
|
|
556
|
-
|
|
556
|
+
Ce as NiceDynamicSidebar,
|
|
557
557
|
te as NiceHamburgerMenu,
|
|
558
558
|
xe as NiceHybridShell,
|
|
559
559
|
Se as NiceKioskShell,
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
560
|
+
Ae as NiceMdiWorkspace,
|
|
561
|
+
Ee as NiceMenu,
|
|
562
|
+
Ie as NiceMinimalShell,
|
|
563
|
+
Oe as NiceModeSelector,
|
|
564
564
|
Re as NiceModernShell,
|
|
565
565
|
Te as NiceModuleLifecyclePanel,
|
|
566
566
|
Be as NiceNavMenu,
|
|
567
|
-
|
|
567
|
+
Fe as NiceNavbar,
|
|
568
568
|
oe as NiceNavigationControls,
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
569
|
+
Le as NiceOrganizationProfileForm,
|
|
570
|
+
en as NicePagination,
|
|
571
|
+
Pe as NicePwaShell,
|
|
572
572
|
ie as NiceRibbonMenu,
|
|
573
|
-
|
|
573
|
+
ze as NiceSetupWizard,
|
|
574
574
|
ae as NiceSidebarMenu,
|
|
575
575
|
je as NiceSidebarNav,
|
|
576
576
|
Ke as NiceSplitter,
|
|
577
|
-
|
|
577
|
+
Ze as NiceTabs,
|
|
578
578
|
se as NiceTopMenu,
|
|
579
579
|
We as NiceUserMenu,
|
|
580
580
|
He as NiceWizard,
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
Je as
|
|
585
|
-
Ye as
|
|
581
|
+
Ue as SIDEBAR_DEFAULT_FAVORITE_LIST,
|
|
582
|
+
Ve as SIDEBAR_MODE_META,
|
|
583
|
+
qe as findSidebarItemByRoute,
|
|
584
|
+
Je as mapSidebarViews,
|
|
585
|
+
Ye as sidebarModeLabel,
|
|
586
|
+
Qe as walkSidebarNav
|
|
586
587
|
};
|