@nice2dev/ui 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -39
- package/dist/NiceErrorBoundary-CH8SBcSZ.js +762 -0
- package/dist/NiceErrorBoundary-CKBaWmkn.js +762 -0
- package/dist/NiceErrorBoundary-CaVVPLh4.cjs +1 -0
- package/dist/NiceErrorBoundary-DBiUvzQs.cjs +1 -0
- package/dist/NiceForm-B5dMsHbO.js +5357 -0
- package/dist/NiceForm-Dbciuo4w.cjs +382 -0
- package/dist/NiceForm-DccuzkPX.cjs +382 -0
- package/dist/NiceForm-Jf-ufPZz.js +5357 -0
- package/dist/NiceModal-Bf1Q1VNL.cjs +1 -0
- package/dist/NiceModal-BxXotB3l.js +95 -0
- package/dist/NiceModal-DCA0wCuD.cjs +1 -0
- package/dist/NiceModal-DrywdSv3.js +95 -0
- package/dist/NiceModuleLifecyclePanel-CDX38sEx.js +6343 -0
- package/dist/NiceModuleLifecyclePanel-CEzuZnmj.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-D-dojncS.js +6349 -0
- package/dist/NiceModuleLifecyclePanel-xLrOv8nL.cjs +1 -0
- package/dist/NicePagination-1mgQ1T6J.cjs +1 -0
- package/dist/NicePagination-Aj63sKV3.js +171 -0
- package/dist/NicePagination-DNjVutBJ.cjs +1 -0
- package/dist/NicePagination-kFBRytja.js +171 -0
- package/dist/NicePinCodeInput-B_0RCKQN.cjs +419 -0
- package/dist/NicePinCodeInput-CPQhsGVC.js +11875 -0
- package/dist/NicePinCodeInput-DbeOo9o6.cjs +419 -0
- package/dist/NicePinCodeInput-Dffu701_.js +11875 -0
- package/dist/NiceSavedQueryPanel-4l-V9dGK.js +6446 -0
- package/dist/NiceSavedQueryPanel-B-EQ1oLv.cjs +596 -0
- package/dist/NiceSavedQueryPanel-B5TjD_Sb.cjs +596 -0
- package/dist/NiceSavedQueryPanel-D9Z3gF87.js +6446 -0
- package/dist/NiceTabs-BQgV3eKE.cjs +1 -0
- package/dist/NiceTabs-CaCiaBCQ.js +1624 -0
- package/dist/NiceTabs-CbKhMxbC.cjs +1 -0
- package/dist/NiceTabs-HXphGn1B.js +1624 -0
- package/dist/NiceWindow-Ceb0mZ_0.js +1409 -0
- package/dist/NiceWindow-Cn3e0Xtd.cjs +1 -0
- package/dist/NiceWindow-DXpnFZ0E.cjs +1 -0
- package/dist/NiceWindow-EXCwOEXz.js +1409 -0
- package/dist/charts-B6dTpbYV.cjs +761 -0
- package/dist/charts-BPJefcE8.js +4645 -0
- package/dist/charts-D5Qd_0sO.js +4645 -0
- package/dist/charts-Dr6QyMiv.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-CtqcSgsw.js +22316 -0
- package/dist/core-DJ4NPp2B.js +22316 -0
- package/dist/core-DPY4m7vb.cjs +96 -0
- package/dist/core-oNMPbzb7.cjs +96 -0
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +2 -2
- package/dist/index-B-9lbtwJ.cjs +5194 -0
- package/dist/index-BNy9Nn0X.js +61422 -0
- package/dist/index-DM6SBE8H.cjs +5194 -0
- package/dist/index-DqpmYrH_.js +61432 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +69 -4
- package/dist/index.mjs +892 -890
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.mjs +13 -13
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +36 -36
- package/package.json +3 -3
package/dist/lazy.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),n=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitGraph$1).then(e=>({default:e.NiceGitGraph}))),o=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceBranchManager$1).then(e=>({default:e.NiceBranchManager}))),l=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitDiffViewer$1).then(e=>({default:e.NiceGitDiffViewer}))),s=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitBlame$1).then(e=>({default:e.NiceGitBlame}))),h=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitConflictResolver$1).then(e=>({default:e.NiceGitConflictResolver}))),c=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NicePipelineEditor$1).then(e=>({default:e.NicePipelineEditor}))),y=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NicePipelineMonitor$1).then(e=>({default:e.NicePipelineMonitor}))),u=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitHooks$1).then(e=>({default:e.NiceGitHooks}))),z=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceMergeRequestBuilder$1).then(e=>({default:e.NiceMergeRequestBuilder}))),d=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceAPIFlow$1).then(e=>({default:e.NiceAPIFlow}))),f=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceCodeTemplate$1).then(e=>({default:e.NiceCodeTemplate}))),N=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceDataMapper$1).then(e=>({default:e.NiceDataMapper}))),L=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceEventOrchestrator$1).then(e=>({default:e.NiceEventOrchestrator}))),p=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceStateDesigner$1).then(e=>({default:e.NiceStateDesigner}))),v=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceTestBuilder$1).then(e=>({default:e.NiceTestBuilder}))),D=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataBranchManager$1).then(e=>({default:e.NiceDataBranchManager}))),P=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataDiffViewer$1).then(e=>({default:e.NiceDataDiffViewer}))),m=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataBranchGraph$1).then(e=>({default:e.NiceDataBranchGraph}))),q=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataMergeBuilder$1).then(e=>({default:e.NiceDataMergeBuilder}))),B=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataConflictResolver$1).then(e=>({default:e.NiceDataConflictResolver}))),M=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataSnapshot$1).then(e=>({default:e.NiceDataSnapshot}))),G=a.lazy(()=>Promise.resolve().then(()=>require("./charts-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),n=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitGraph$1).then(e=>({default:e.NiceGitGraph}))),o=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceBranchManager$1).then(e=>({default:e.NiceBranchManager}))),l=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitDiffViewer$1).then(e=>({default:e.NiceGitDiffViewer}))),s=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitBlame$1).then(e=>({default:e.NiceGitBlame}))),h=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitConflictResolver$1).then(e=>({default:e.NiceGitConflictResolver}))),c=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NicePipelineEditor$1).then(e=>({default:e.NicePipelineEditor}))),y=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NicePipelineMonitor$1).then(e=>({default:e.NicePipelineMonitor}))),u=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceGitHooks$1).then(e=>({default:e.NiceGitHooks}))),z=a.lazy(()=>Promise.resolve().then(()=>require("./devops-CkuTC7RJ.cjs")).then(e=>e.NiceMergeRequestBuilder$1).then(e=>({default:e.NiceMergeRequestBuilder}))),d=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceAPIFlow$1).then(e=>({default:e.NiceAPIFlow}))),f=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceCodeTemplate$1).then(e=>({default:e.NiceCodeTemplate}))),N=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceDataMapper$1).then(e=>({default:e.NiceDataMapper}))),L=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceEventOrchestrator$1).then(e=>({default:e.NiceEventOrchestrator}))),p=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceStateDesigner$1).then(e=>({default:e.NiceStateDesigner}))),v=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-Bb3QFKdm.cjs")).then(e=>e.NiceTestBuilder$1).then(e=>({default:e.NiceTestBuilder}))),D=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataBranchManager$1).then(e=>({default:e.NiceDataBranchManager}))),P=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataDiffViewer$1).then(e=>({default:e.NiceDataDiffViewer}))),m=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataBranchGraph$1).then(e=>({default:e.NiceDataBranchGraph}))),q=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataMergeBuilder$1).then(e=>({default:e.NiceDataMergeBuilder}))),B=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataConflictResolver$1).then(e=>({default:e.NiceDataConflictResolver}))),M=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-B_9C6-hE.cjs")).then(e=>e.NiceDataSnapshot$1).then(e=>({default:e.NiceDataSnapshot}))),G=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B6dTpbYV.cjs")).then(e=>e.NiceChart$1).then(e=>({default:e.NiceChart}))),g=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B6dTpbYV.cjs")).then(e=>e.NiceTreeMap$1).then(e=>({default:e.NiceTreeMap}))),$=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B6dTpbYV.cjs")).then(e=>e.NiceSankey$1).then(e=>({default:e.NiceSankey}))),t=()=>{Promise.resolve().then(()=>require("./devops.cjs"))},r=()=>{Promise.resolve().then(()=>require("./no-code.cjs"))},i=()=>{Promise.resolve().then(()=>require("./data-branching.cjs"))},C=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{t(),r(),i()}):setTimeout(()=>{t(),r(),i()},2e3)};exports.LazyAPIFlow=d;exports.LazyBranchManager=o;exports.LazyChart=G;exports.LazyCodeTemplate=f;exports.LazyDataBranchGraph=m;exports.LazyDataBranchManager=D;exports.LazyDataConflictResolver=B;exports.LazyDataDiffViewer=P;exports.LazyDataMapper=N;exports.LazyDataMergeBuilder=q;exports.LazyDataSnapshot=M;exports.LazyEventOrchestrator=L;exports.LazyGitBlame=s;exports.LazyGitConflictResolver=h;exports.LazyGitDiffViewer=l;exports.LazyGitGraph=n;exports.LazyGitHooks=u;exports.LazyMergeRequestBuilder=z;exports.LazyPipelineEditor=c;exports.LazyPipelineMonitor=y;exports.LazySankey=$;exports.LazyStateDesigner=p;exports.LazyTestBuilder=v;exports.LazyTreemap=g;exports.preloadDataBranching=i;exports.preloadDevOps=t;exports.preloadHeavyModules=C;exports.preloadNoCode=r;
|
package/dist/lazy.mjs
CHANGED
|
@@ -48,11 +48,11 @@ const r = t(
|
|
|
48
48
|
), k = t(
|
|
49
49
|
() => import("./data-branching-BmCKIXgr.js").then((e) => e.k).then((e) => ({ default: e.NiceDataSnapshot }))
|
|
50
50
|
), v = t(
|
|
51
|
-
() => import("./charts-
|
|
51
|
+
() => import("./charts-D5Qd_0sO.js").then((e) => e.A).then((e) => ({ default: e.NiceChart }))
|
|
52
52
|
), w = t(
|
|
53
|
-
() => import("./charts-
|
|
53
|
+
() => import("./charts-D5Qd_0sO.js").then((e) => e.E).then((e) => ({ default: e.NiceTreeMap }))
|
|
54
54
|
), T = t(
|
|
55
|
-
() => import("./charts-
|
|
55
|
+
() => import("./charts-D5Qd_0sO.js").then((e) => e.B).then((e) => ({ default: e.NiceSankey }))
|
|
56
56
|
), a = () => {
|
|
57
57
|
import("./devops.mjs");
|
|
58
58
|
}, n = () => {
|
package/dist/navigation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./NiceModuleLifecyclePanel-D8cIOI8I.cjs"),e=require("react/jsx-runtime"),v=require("./core-B-tu8l9M.cjs"),h=require("react"),U=require("./NiceTabs-CHg36waF.cjs"),V=require("./NicePagination-DGd3Hrh9.cjs"),B=h.forwardRef(({items:b,activeKey:N,collapsed:a=!1,width:p=240,collapsedWidth:t=52,onItemClick:k,onCollapseChange:D,header:y,footer:d,size:m="md",className:g,style:S,id:j,accessMode:M,...w},x)=>{const c=v.Ss(j),o=v.Bs(M,j),[l,u]=h.useState(new Set),r=h.useCallback(i=>{u($=>{const s=new Set($);return s.has(i)?s.delete(i):s.add(i),s})},[]);if(o==="hidden")return null;const _=(i,$=0)=>{const s=i.children&&i.children.length>0,E=l.has(i.key),C=i.key===N;return e.jsxs("li",{className:"nice-sidebar-menu__item",children:[e.jsxs("button",{className:`nice-sidebar-menu__btn ${C?"nice-sidebar-menu__btn--active":""} ${i.disabled?"nice-sidebar-menu__btn--disabled":""}`,style:{paddingLeft:a?void 0:12+$*16},onClick:()=>s?r(i.key):k?.(i),disabled:i.disabled,title:a?i.text:void 0,type:"button",children:[i.icon&&e.jsx("span",{className:"nice-sidebar-menu__icon",children:i.icon}),!a&&e.jsx("span",{className:"nice-sidebar-menu__label",children:i.text}),!a&&i.badge!==void 0&&e.jsx("span",{className:"nice-sidebar-menu__badge",children:i.badge}),!a&&s&&e.jsx("span",{className:"nice-sidebar-menu__chevron",children:E?"▾":"▸"})]}),s&&E&&!a&&e.jsx("ul",{className:"nice-sidebar-menu__children",children:i.children.map(T=>_(T,$+1))})]},i.key)};return e.jsxs("nav",{ref:x,id:c,className:`nice-sidebar-menu nice-sidebar-menu--${m} ${a?"nice-sidebar-menu--collapsed":""} ${g??""}`,style:{...S,width:a?t:p},...w,children:[y&&e.jsx("div",{className:"nice-sidebar-menu__header",children:y}),e.jsx("ul",{className:"nice-sidebar-menu__list",role:"list",children:b.map(i=>_(i))}),d&&e.jsx("div",{className:"nice-sidebar-menu__footer",children:d})]})});B.displayName="NiceSidebarMenu";const P=h.forwardRef(({items:b,activeKey:N,onItemClick:a,brand:p,actions:t,size:k="md",className:D,style:y,id:d,accessMode:m,...g},S)=>{const j=v.Ss(d),M=v.Bs(m,d),[w,x]=h.useState(null);return M==="hidden"?null:e.jsxs("nav",{ref:S,id:j,className:`nice-top-menu nice-top-menu--${k} ${D??""}`,style:y,...g,children:[p&&e.jsx("div",{className:"nice-top-menu__brand",children:p}),e.jsx("ul",{className:"nice-top-menu__items",role:"menubar",children:b.map(c=>{const o=c.children&&c.children.length>0,l=w===c.key;return e.jsxs("li",{className:"nice-top-menu__item",onMouseEnter:()=>o&&x(c.key),onMouseLeave:()=>o&&x(null),children:[e.jsxs("button",{className:`nice-top-menu__btn ${c.key===N?"nice-top-menu__btn--active":""}`,onClick:()=>o?x(l?null:c.key):a?.(c),role:"menuitem","aria-haspopup":o,"aria-expanded":l,disabled:c.disabled,type:"button",children:[c.icon&&e.jsx("span",{children:c.icon}),e.jsx("span",{children:c.text}),o&&e.jsx("span",{className:"nice-top-menu__chevron",children:"▾"})]}),o&&l&&e.jsx("ul",{className:"nice-top-menu__dropdown",role:"menu",children:c.children.map(u=>e.jsx("li",{children:e.jsxs("button",{className:`nice-top-menu__dropdown-btn ${u.key===N?"nice-top-menu__dropdown-btn--active":""}`,onClick:()=>{a?.(u),x(null)},disabled:u.disabled,role:"menuitem",type:"button",children:[u.icon&&e.jsx("span",{children:u.icon}),e.jsx("span",{children:u.text}),u.badge!==void 0&&e.jsx("span",{className:"nice-top-menu__badge",children:u.badge})]})},u.key))})]},c.key)})}),t&&e.jsx("div",{className:"nice-top-menu__actions",children:t})]})});P.displayName="NiceTopMenu";const I=h.forwardRef(({tabs:b,activeTab:N,onTabChange:a,onItemClick:p,minimized:t=!1,onMinimizeToggle:k,size:D="md",className:y,style:d,id:m,accessMode:g,...S},j)=>{const M=v.Ss(m),w=v.Bs(g,m),[x,c]=h.useState(N??b[0]?.key),o=N??x,l=b.find(r=>r.key===o),u=h.useCallback(r=>{c(r),a?.(r)},[a]);return w==="hidden"?null:e.jsxs("div",{ref:j,id:M,className:`nice-ribbon-menu nice-ribbon-menu--${D} ${t?"nice-ribbon-menu--minimized":""} ${y??""}`,style:d,...S,children:[e.jsxs("div",{className:"nice-ribbon-menu__tabs",role:"tablist",children:[b.map(r=>e.jsx("button",{className:`nice-ribbon-menu__tab ${r.key===o?"nice-ribbon-menu__tab--active":""}`,onClick:()=>u(r.key),role:"tab","aria-selected":r.key===o,type:"button",children:r.label},r.key)),e.jsx("button",{className:"nice-ribbon-menu__minimize",onClick:()=>k?.(!t),type:"button","aria-label":t?"Expand":"Minimize",children:t?"▼":"▲"})]}),!t&&l&&e.jsx("div",{className:"nice-ribbon-menu__panel",role:"tabpanel",children:l.groups.map((r,_)=>e.jsxs("div",{className:"nice-ribbon-menu__group",children:[e.jsx("div",{className:"nice-ribbon-menu__group-items",children:r.items.map(i=>e.jsxs("button",{className:"nice-ribbon-menu__item",onClick:()=>p?.(i),disabled:i.disabled,type:"button",children:[i.icon&&e.jsx("span",{className:"nice-ribbon-menu__item-icon",children:i.icon}),e.jsx("span",{className:"nice-ribbon-menu__item-label",children:i.text})]},i.key))}),e.jsx("div",{className:"nice-ribbon-menu__group-label",children:r.label})]},_))})]})});I.displayName="NiceRibbonMenu";const L=h.forwardRef(({items:b,activeKey:N,onItemClick:a,position:p="bottom",autoHide:t=!1,iconSize:k=40,size:D="md",className:y,style:d,id:m,accessMode:g,...S},j)=>{const M=v.Ss(m),w=v.Bs(g,m),[x,c]=h.useState(!1),o=!t||x;return w==="hidden"?null:e.jsx("div",{ref:j,id:M,className:`nice-dock-menu nice-dock-menu--${p} nice-dock-menu--${D} ${t&&!o?"nice-dock-menu--hidden":""} ${y??""}`,style:d,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),...S,children:e.jsx("div",{className:"nice-dock-menu__items",children:b.map(l=>e.jsxs("button",{className:`nice-dock-menu__item ${l.key===N?"nice-dock-menu__item--active":""}`,onClick:()=>a?.(l),disabled:l.disabled,title:l.text,type:"button",style:{width:k,height:k},children:[l.icon?e.jsx("span",{className:"nice-dock-menu__icon",children:l.icon}):e.jsx("span",{children:l.text[0]}),l.badge!==void 0&&e.jsx("span",{className:"nice-dock-menu__badge",children:l.badge})]},l.key))})})});L.displayName="NiceDockMenu";const W=h.forwardRef(({items:b,activeKey:N,onItemClick:a,open:p,onOpenChange:t,position:k="left",panelWidth:D=280,header:y,footer:d,size:m="md",className:g,style:S,id:j,accessMode:M,...w},x)=>{const c=v.Ss(j),o=v.Bs(M,j),{t:l}=v.$o(),[u,r]=h.useState(!1),_=p??u,i=h.useCallback(()=>{const s=!_;r(s),t?.(s)},[_,t]),$=h.useCallback(s=>{a?.(s),r(!1),t?.(!1)},[a,t]);return o==="hidden"?null:e.jsxs("div",{ref:x,id:c,className:`nice-hamburger-menu nice-hamburger-menu--${m} ${g??""}`,style:S,...w,children:[e.jsx("button",{className:"nice-hamburger-menu__trigger",onClick:i,"aria-label":l("nav.menu","Menu"),"aria-expanded":_,type:"button",children:e.jsxs("span",{className:`nice-hamburger-menu__icon ${_?"nice-hamburger-menu__icon--open":""}`,children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}),_&&e.jsx("div",{className:"nice-hamburger-menu__backdrop",onClick:i,"aria-hidden":!0}),e.jsxs("div",{className:`nice-hamburger-menu__panel nice-hamburger-menu__panel--${k} ${_?"nice-hamburger-menu__panel--open":""}`,style:{width:D},children:[y&&e.jsx("div",{className:"nice-hamburger-menu__header",children:y}),e.jsx("ul",{className:"nice-hamburger-menu__list",role:"menu",children:b.map(s=>e.jsx("li",{children:e.jsxs("button",{className:`nice-hamburger-menu__item ${s.key===N?"nice-hamburger-menu__item--active":""}`,onClick:()=>$(s),disabled:s.disabled,role:"menuitem",type:"button",children:[s.icon&&e.jsx("span",{className:"nice-hamburger-menu__item-icon",children:s.icon}),e.jsx("span",{children:s.text}),s.badge!==void 0&&e.jsx("span",{className:"nice-hamburger-menu__item-badge",children:s.badge})]})},s.key))}),d&&e.jsx("div",{className:"nice-hamburger-menu__footer",children:d})]})]})});W.displayName="NiceHamburgerMenu";const O=h.forwardRef(({canGoBack:b=!1,canGoForward:N=!1,onBack:a,onForward:p,onRefresh:t,enableShortcuts:k=!0,showRefresh:D=!0,showStop:y=!0,isLoading:d=!1,onStop:m,size:g="md",variant:S="default",tooltipPosition:j="bottom",backIcon:M,forwardIcon:w,refreshIcon:x,stopIcon:c,className:o,style:l,id:u,accessMode:r,disabled:_,...i},$)=>{const s=v.Ss(u),E=v.Bs(r,u),{t:C}=v.$o();if(h.useEffect(()=>{if(!k||_)return;const A=f=>{const R=f.altKey,H=f.ctrlKey||f.metaKey;R&&f.key==="ArrowLeft"?(f.preventDefault(),b&&a?.()):R&&f.key==="ArrowRight"?(f.preventDefault(),N&&p?.()):f.key==="F5"||H&&f.key==="r"?(f.preventDefault(),d?m?.():t?.()):f.key==="Escape"&&d&&(f.preventDefault(),m?.())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[k,_,b,N,d,a,p,t,m]),E==="hidden")return null;const T=E==="disabled"||_,q=M??e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})}),z=w??e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})}),F=x??e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),K=c??e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});return e.jsxs("div",{ref:$,id:s,className:`nice-nav-controls nice-nav-controls--${g} nice-nav-controls--${S}${T?" nice-nav-controls--disabled":""}${o?` ${o}`:""}`,style:l,role:"navigation","aria-label":C("nav.controls","Navigation controls"),...i,children:[e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--back${b?"":" nice-nav-controls__btn--disabled"}`,onClick:a,disabled:T||!b,"aria-label":C("nav.back","Back"),title:`${C("nav.back","Back")} (Alt+←)`,children:q}),e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--forward${N?"":" nice-nav-controls__btn--disabled"}`,onClick:p,disabled:T||!N,"aria-label":C("nav.forward","Forward"),title:`${C("nav.forward","Forward")} (Alt+→)`,children:z}),(D||y&&d)&&(d?e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--stop nice-nav-controls__btn--loading",onClick:m,disabled:T,"aria-label":C("nav.stop","Stop"),title:`${C("nav.stop","Stop")} (Esc)`,children:K}):e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--refresh",onClick:t,disabled:T,"aria-label":C("nav.refresh","Refresh"),title:`${C("nav.refresh","Refresh")} (F5)`,children:F}))]})});O.displayName="NiceNavigationControls";exports.DEFAULT_SIDEBAR_PREFS=n.DEFAULT_SIDEBAR_PREFS;exports.DesktopContextMenu=n.DesktopContextMenu;exports.DesktopGrid=n.DesktopGrid;exports.DesktopStartMenu=n.DesktopStartMenu;exports.DesktopSystemTray=n.DesktopSystemTray;exports.DesktopTaskbar=n.DesktopTaskbar;exports.NiceAccordion=n.NiceAccordion;exports.NiceAppLayout=n.NiceAppLayout;exports.NiceAuthButtons=n.NiceAuthButtons;exports.NiceBottomNavigation=n.NiceBottomNavigation;exports.NiceBreadcrumb=n.NiceBreadcrumb;exports.NiceCard=n.NiceCard;exports.NiceClassicShell=n.NiceClassicShell;exports.NiceCompactShell=n.NiceCompactShell;exports.NiceConsole=n.NiceConsole;exports.NiceContextMenu=n.NiceContextMenu;exports.NiceDashboardLayout=n.NiceDashboardLayout;exports.NiceDashboardShell=n.NiceDashboardShell;exports.NiceDesktop=n.NiceDesktop;exports.NiceDock=n.NiceDock;exports.NiceDynamicSidebar=n.NiceDynamicSidebar;exports.NiceHybridShell=n.NiceHybridShell;exports.NiceKioskShell=n.NiceKioskShell;exports.NiceMdiWorkspace=n.NiceMdiWorkspace;exports.NiceMenu=n.NiceMenu;exports.NiceMinimalShell=n.NiceMinimalShell;exports.NiceModeSelector=n.NiceModeSelector;exports.NiceModernShell=n.NiceModernShell;exports.NiceModuleLifecyclePanel=n.NiceModuleLifecyclePanel;exports.NiceMultiView=n.NiceMultiView;exports.NiceNavMenu=n.NiceNavMenu;exports.NiceNavbar=n.NiceNavbar;exports.NiceOnboardingWizard=n.NiceOnboardingWizard;exports.NiceOrganizationProfileForm=n.NiceOrganizationProfileForm;exports.NicePwaShell=n.NicePwaShell;exports.NiceSetupWizard=n.NiceSetupWizard;exports.NiceSidebarNav=n.NiceSidebarNav;exports.NiceSplitter=n.NiceSplitter;exports.NiceTabPanel=n.NiceTabPanel;exports.NiceTenantSwitcher=n.NiceTenantSwitcher;exports.NiceToolbar=n.NiceToolbar;exports.NiceUserMenu=n.NiceUserMenu;exports.NiceWizard=n.NiceWizard;exports.SIDEBAR_MODE_META=n.SIDEBAR_MODE_META;exports.NiceTabs=U.NiceTabs;exports.NicePagination=V.NicePagination;exports.NiceDockMenu=L;exports.NiceHamburgerMenu=W;exports.NiceNavigationControls=O;exports.NiceRibbonMenu=I;exports.NiceSidebarMenu=B;exports.NiceTopMenu=P;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./NiceModuleLifecyclePanel-CEzuZnmj.cjs"),e=require("react/jsx-runtime"),v=require("./core-oNMPbzb7.cjs"),_=require("react"),U=require("./NiceTabs-BQgV3eKE.cjs"),V=require("./NicePagination-1mgQ1T6J.cjs"),P=_.forwardRef(({items:b,activeKey:N,collapsed:a=!1,width:p=240,collapsedWidth:t=52,onItemClick:k,onCollapseChange:D,header:y,footer:d,size:m="md",className:g,style:M,id:j,accessMode:S,...w},x)=>{const c=v.ks(j),o=v._s(S,j),[l,u]=_.useState(new Set),r=_.useCallback(i=>{u($=>{const s=new Set($);return s.has(i)?s.delete(i):s.add(i),s})},[]);if(o==="hidden")return null;const h=(i,$=0)=>{const s=i.children&&i.children.length>0,E=l.has(i.key),C=i.key===N;return e.jsxs("li",{className:"nice-sidebar-menu__item",children:[e.jsxs("button",{className:`nice-sidebar-menu__btn ${C?"nice-sidebar-menu__btn--active":""} ${i.disabled?"nice-sidebar-menu__btn--disabled":""}`,style:{paddingLeft:a?void 0:12+$*16},onClick:()=>s?r(i.key):k?.(i),disabled:i.disabled,title:a?i.text:void 0,type:"button",children:[i.icon&&e.jsx("span",{className:"nice-sidebar-menu__icon",children:i.icon}),!a&&e.jsx("span",{className:"nice-sidebar-menu__label",children:i.text}),!a&&i.badge!==void 0&&e.jsx("span",{className:"nice-sidebar-menu__badge",children:i.badge}),!a&&s&&e.jsx("span",{className:"nice-sidebar-menu__chevron",children:E?"▾":"▸"})]}),s&&E&&!a&&e.jsx("ul",{className:"nice-sidebar-menu__children",children:i.children.map(T=>h(T,$+1))})]},i.key)};return e.jsxs("nav",{ref:x,id:c,className:`nice-sidebar-menu nice-sidebar-menu--${m} ${a?"nice-sidebar-menu--collapsed":""} ${g??""}`,style:{...M,width:a?t:p},...w,children:[y&&e.jsx("div",{className:"nice-sidebar-menu__header",children:y}),e.jsx("ul",{className:"nice-sidebar-menu__list",role:"list",children:b.map(i=>h(i))}),d&&e.jsx("div",{className:"nice-sidebar-menu__footer",children:d})]})});P.displayName="NiceSidebarMenu";const I=_.forwardRef(({items:b,activeKey:N,onItemClick:a,brand:p,actions:t,size:k="md",className:D,style:y,id:d,accessMode:m,...g},M)=>{const j=v.ks(d),S=v._s(m,d),[w,x]=_.useState(null);return S==="hidden"?null:e.jsxs("nav",{ref:M,id:j,className:`nice-top-menu nice-top-menu--${k} ${D??""}`,style:y,...g,children:[p&&e.jsx("div",{className:"nice-top-menu__brand",children:p}),e.jsx("ul",{className:"nice-top-menu__items",role:"menubar",children:b.map(c=>{const o=c.children&&c.children.length>0,l=w===c.key;return e.jsxs("li",{className:"nice-top-menu__item",onMouseEnter:()=>o&&x(c.key),onMouseLeave:()=>o&&x(null),children:[e.jsxs("button",{className:`nice-top-menu__btn ${c.key===N?"nice-top-menu__btn--active":""}`,onClick:()=>o?x(l?null:c.key):a?.(c),role:"menuitem","aria-haspopup":o,"aria-expanded":l,disabled:c.disabled,type:"button",children:[c.icon&&e.jsx("span",{children:c.icon}),e.jsx("span",{children:c.text}),o&&e.jsx("span",{className:"nice-top-menu__chevron",children:"▾"})]}),o&&l&&e.jsx("ul",{className:"nice-top-menu__dropdown",role:"menu",children:c.children.map(u=>e.jsx("li",{children:e.jsxs("button",{className:`nice-top-menu__dropdown-btn ${u.key===N?"nice-top-menu__dropdown-btn--active":""}`,onClick:()=>{a?.(u),x(null)},disabled:u.disabled,role:"menuitem",type:"button",children:[u.icon&&e.jsx("span",{children:u.icon}),e.jsx("span",{children:u.text}),u.badge!==void 0&&e.jsx("span",{className:"nice-top-menu__badge",children:u.badge})]})},u.key))})]},c.key)})}),t&&e.jsx("div",{className:"nice-top-menu__actions",children:t})]})});I.displayName="NiceTopMenu";const B=_.forwardRef(({tabs:b,activeTab:N,onTabChange:a,onItemClick:p,minimized:t=!1,onMinimizeToggle:k,size:D="md",className:y,style:d,id:m,accessMode:g,...M},j)=>{const S=v.ks(m),w=v._s(g,m),[x,c]=_.useState(N??b[0]?.key),o=N??x,l=b.find(r=>r.key===o),u=_.useCallback(r=>{c(r),a?.(r)},[a]);return w==="hidden"?null:e.jsxs("div",{ref:j,id:S,className:`nice-ribbon-menu nice-ribbon-menu--${D} ${t?"nice-ribbon-menu--minimized":""} ${y??""}`,style:d,...M,children:[e.jsxs("div",{className:"nice-ribbon-menu__tabs",role:"tablist",children:[b.map(r=>e.jsx("button",{className:`nice-ribbon-menu__tab ${r.key===o?"nice-ribbon-menu__tab--active":""}`,onClick:()=>u(r.key),role:"tab","aria-selected":r.key===o,type:"button",children:r.label},r.key)),e.jsx("button",{className:"nice-ribbon-menu__minimize",onClick:()=>k?.(!t),type:"button","aria-label":t?"Expand":"Minimize",children:t?"▼":"▲"})]}),!t&&l&&e.jsx("div",{className:"nice-ribbon-menu__panel",role:"tabpanel",children:l.groups.map((r,h)=>e.jsxs("div",{className:"nice-ribbon-menu__group",children:[e.jsx("div",{className:"nice-ribbon-menu__group-items",children:r.items.map(i=>e.jsxs("button",{className:"nice-ribbon-menu__item",onClick:()=>p?.(i),disabled:i.disabled,type:"button",children:[i.icon&&e.jsx("span",{className:"nice-ribbon-menu__item-icon",children:i.icon}),e.jsx("span",{className:"nice-ribbon-menu__item-label",children:i.text})]},i.key))}),e.jsx("div",{className:"nice-ribbon-menu__group-label",children:r.label})]},h))})]})});B.displayName="NiceRibbonMenu";const L=_.forwardRef(({items:b,activeKey:N,onItemClick:a,position:p="bottom",autoHide:t=!1,iconSize:k=40,size:D="md",className:y,style:d,id:m,accessMode:g,...M},j)=>{const S=v.ks(m),w=v._s(g,m),[x,c]=_.useState(!1),o=!t||x;return w==="hidden"?null:e.jsx("div",{ref:j,id:S,className:`nice-dock-menu nice-dock-menu--${p} nice-dock-menu--${D} ${t&&!o?"nice-dock-menu--hidden":""} ${y??""}`,style:d,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),...M,children:e.jsx("div",{className:"nice-dock-menu__items",children:b.map(l=>e.jsxs("button",{className:`nice-dock-menu__item ${l.key===N?"nice-dock-menu__item--active":""}`,onClick:()=>a?.(l),disabled:l.disabled,title:l.text,type:"button",style:{width:k,height:k},children:[l.icon?e.jsx("span",{className:"nice-dock-menu__icon",children:l.icon}):e.jsx("span",{children:l.text[0]}),l.badge!==void 0&&e.jsx("span",{className:"nice-dock-menu__badge",children:l.badge})]},l.key))})})});L.displayName="NiceDockMenu";const W=_.forwardRef(({items:b,activeKey:N,onItemClick:a,open:p,onOpenChange:t,position:k="left",panelWidth:D=280,header:y,footer:d,size:m="md",className:g,style:M,id:j,accessMode:S,...w},x)=>{const c=v.ks(j),o=v._s(S,j),{t:l}=v.$o(),[u,r]=_.useState(!1),h=p??u,i=_.useCallback(()=>{const s=!h;r(s),t?.(s)},[h,t]),$=_.useCallback(s=>{a?.(s),r(!1),t?.(!1)},[a,t]);return o==="hidden"?null:e.jsxs("div",{ref:x,id:c,className:`nice-hamburger-menu nice-hamburger-menu--${m} ${g??""}`,style:M,...w,children:[e.jsx("button",{className:"nice-hamburger-menu__trigger",onClick:i,"aria-label":l("nav.menu","Menu"),"aria-expanded":h,type:"button",children:e.jsxs("span",{className:`nice-hamburger-menu__icon ${h?"nice-hamburger-menu__icon--open":""}`,children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}),h&&e.jsx("div",{className:"nice-hamburger-menu__backdrop",onClick:i,"aria-hidden":!0}),e.jsxs("div",{className:`nice-hamburger-menu__panel nice-hamburger-menu__panel--${k} ${h?"nice-hamburger-menu__panel--open":""}`,style:{width:D},children:[y&&e.jsx("div",{className:"nice-hamburger-menu__header",children:y}),e.jsx("ul",{className:"nice-hamburger-menu__list",role:"menu",children:b.map(s=>e.jsx("li",{children:e.jsxs("button",{className:`nice-hamburger-menu__item ${s.key===N?"nice-hamburger-menu__item--active":""}`,onClick:()=>$(s),disabled:s.disabled,role:"menuitem",type:"button",children:[s.icon&&e.jsx("span",{className:"nice-hamburger-menu__item-icon",children:s.icon}),e.jsx("span",{children:s.text}),s.badge!==void 0&&e.jsx("span",{className:"nice-hamburger-menu__item-badge",children:s.badge})]})},s.key))}),d&&e.jsx("div",{className:"nice-hamburger-menu__footer",children:d})]})]})});W.displayName="NiceHamburgerMenu";const O=_.forwardRef(({canGoBack:b=!1,canGoForward:N=!1,onBack:a,onForward:p,onRefresh:t,enableShortcuts:k=!0,showRefresh:D=!0,showStop:y=!0,isLoading:d=!1,onStop:m,size:g="md",variant:M="default",tooltipPosition:j="bottom",backIcon:S,forwardIcon:w,refreshIcon:x,stopIcon:c,className:o,style:l,id:u,accessMode:r,disabled:h,...i},$)=>{const s=v.ks(u),E=v._s(r,u),{t:C}=v.$o();if(_.useEffect(()=>{if(!k||h)return;const A=f=>{const R=f.altKey,H=f.ctrlKey||f.metaKey;R&&f.key==="ArrowLeft"?(f.preventDefault(),b&&a?.()):R&&f.key==="ArrowRight"?(f.preventDefault(),N&&p?.()):f.key==="F5"||H&&f.key==="r"?(f.preventDefault(),d?m?.():t?.()):f.key==="Escape"&&d&&(f.preventDefault(),m?.())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[k,h,b,N,d,a,p,t,m]),E==="hidden")return null;const T=E==="disabled"||h,q=S??e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})}),z=w??e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})}),F=x??e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),K=c??e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});return e.jsxs("div",{ref:$,id:s,className:`nice-nav-controls nice-nav-controls--${g} nice-nav-controls--${M}${T?" nice-nav-controls--disabled":""}${o?` ${o}`:""}`,style:l,role:"navigation","aria-label":C("nav.controls","Navigation controls"),...i,children:[e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--back${b?"":" nice-nav-controls__btn--disabled"}`,onClick:a,disabled:T||!b,"aria-label":C("nav.back","Back"),title:`${C("nav.back","Back")} (Alt+←)`,children:q}),e.jsx("button",{type:"button",className:`nice-nav-controls__btn nice-nav-controls__btn--forward${N?"":" nice-nav-controls__btn--disabled"}`,onClick:p,disabled:T||!N,"aria-label":C("nav.forward","Forward"),title:`${C("nav.forward","Forward")} (Alt+→)`,children:z}),(D||y&&d)&&(d?e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--stop nice-nav-controls__btn--loading",onClick:m,disabled:T,"aria-label":C("nav.stop","Stop"),title:`${C("nav.stop","Stop")} (Esc)`,children:K}):e.jsx("button",{type:"button",className:"nice-nav-controls__btn nice-nav-controls__btn--refresh",onClick:t,disabled:T,"aria-label":C("nav.refresh","Refresh"),title:`${C("nav.refresh","Refresh")} (F5)`,children:F}))]})});O.displayName="NiceNavigationControls";exports.DEFAULT_SIDEBAR_PREFS=n.DEFAULT_SIDEBAR_PREFS;exports.DesktopContextMenu=n.DesktopContextMenu;exports.DesktopGrid=n.DesktopGrid;exports.DesktopStartMenu=n.DesktopStartMenu;exports.DesktopSystemTray=n.DesktopSystemTray;exports.DesktopTaskbar=n.DesktopTaskbar;exports.NiceAccordion=n.NiceAccordion;exports.NiceAppLayout=n.NiceAppLayout;exports.NiceAuthButtons=n.NiceAuthButtons;exports.NiceBottomNavigation=n.NiceBottomNavigation;exports.NiceBreadcrumb=n.NiceBreadcrumb;exports.NiceCard=n.NiceCard;exports.NiceClassicShell=n.NiceClassicShell;exports.NiceCompactShell=n.NiceCompactShell;exports.NiceConsole=n.NiceConsole;exports.NiceContextMenu=n.NiceContextMenu;exports.NiceDashboardLayout=n.NiceDashboardLayout;exports.NiceDashboardShell=n.NiceDashboardShell;exports.NiceDesktop=n.NiceDesktop;exports.NiceDock=n.NiceDock;exports.NiceDynamicSidebar=n.NiceDynamicSidebar;exports.NiceHybridShell=n.NiceHybridShell;exports.NiceKioskShell=n.NiceKioskShell;exports.NiceMdiWorkspace=n.NiceMdiWorkspace;exports.NiceMenu=n.NiceMenu;exports.NiceMinimalShell=n.NiceMinimalShell;exports.NiceModeSelector=n.NiceModeSelector;exports.NiceModernShell=n.NiceModernShell;exports.NiceModuleLifecyclePanel=n.NiceModuleLifecyclePanel;exports.NiceMultiView=n.NiceMultiView;exports.NiceNavMenu=n.NiceNavMenu;exports.NiceNavbar=n.NiceNavbar;exports.NiceOnboardingWizard=n.NiceOnboardingWizard;exports.NiceOrganizationProfileForm=n.NiceOrganizationProfileForm;exports.NicePwaShell=n.NicePwaShell;exports.NiceSetupWizard=n.NiceSetupWizard;exports.NiceSidebarNav=n.NiceSidebarNav;exports.NiceSplitter=n.NiceSplitter;exports.NiceTabPanel=n.NiceTabPanel;exports.NiceTenantSwitcher=n.NiceTenantSwitcher;exports.NiceToolbar=n.NiceToolbar;exports.NiceUserMenu=n.NiceUserMenu;exports.NiceWizard=n.NiceWizard;exports.SIDEBAR_MODE_META=n.SIDEBAR_MODE_META;exports.NiceTabs=U.NiceTabs;exports.NicePagination=V.NicePagination;exports.NiceDockMenu=L;exports.NiceHamburgerMenu=W;exports.NiceNavigationControls=O;exports.NiceRibbonMenu=B;exports.NiceSidebarMenu=P;exports.NiceTopMenu=I;
|
package/dist/navigation.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as ae, a as ie, b as ce, c as se, d as le, e as te, N as re, f as oe, g as de, h as ue, i as be, j as me, k as _e, l as he, m as pe, n as Ne, o as ve, p as ke, q as ye, r as fe, s as ge, t as $e, u as xe, v as we, w as Me, x as Ce, y as De, z as Se, A as Ee, B as Ie, C as Te, E as Ae, F as
|
|
1
|
+
import { D as ae, a as ie, b as ce, c as se, d as le, e as te, N as re, f as oe, g as de, h as ue, i as be, j as me, k as _e, l as he, m as pe, n as Ne, o as ve, p as ke, q as ye, r as fe, s as ge, t as $e, u as xe, v as we, w as Me, x as Ce, y as De, z as Se, A as Ee, B as Ie, C as Te, E as Ae, F as Pe, G as Be, H as Le, I as Re, J as We, K as Ke, L as Oe, M as Fe, O as He, P as je, Q as ze, S as Ue } from "./NiceModuleLifecyclePanel-D-dojncS.js";
|
|
2
2
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { forwardRef as T, useState as
|
|
5
|
-
import { f as qe } from "./NiceTabs-
|
|
6
|
-
import { N as Qe } from "./NicePagination-
|
|
3
|
+
import { k as E, _ as I, $ as W } from "./core-CtqcSgsw.js";
|
|
4
|
+
import { forwardRef as T, useState as P, useCallback as B, useEffect as z } from "react";
|
|
5
|
+
import { f as qe } from "./NiceTabs-CaCiaBCQ.js";
|
|
6
|
+
import { N as Qe } from "./NicePagination-kFBRytja.js";
|
|
7
7
|
const U = T(
|
|
8
8
|
({
|
|
9
9
|
items: b,
|
|
@@ -22,7 +22,7 @@ const U = T(
|
|
|
22
22
|
accessMode: x,
|
|
23
23
|
...w
|
|
24
24
|
}, N) => {
|
|
25
|
-
const i = E(y), r = I(x, y), [s, u] =
|
|
25
|
+
const i = E(y), r = I(x, y), [s, u] = P(/* @__PURE__ */ new Set()), t = B((n) => {
|
|
26
26
|
u((D) => {
|
|
27
27
|
const a = new Set(D);
|
|
28
28
|
return a.has(n) ? a.delete(n) : a.add(n), a;
|
|
@@ -85,7 +85,7 @@ const V = T(
|
|
|
85
85
|
accessMode: _,
|
|
86
86
|
...g
|
|
87
87
|
}, $) => {
|
|
88
|
-
const y = E(d), x = I(_, d), [w, N] =
|
|
88
|
+
const y = E(d), x = I(_, d), [w, N] = P(null);
|
|
89
89
|
return x === "hidden" ? null : /* @__PURE__ */ o(
|
|
90
90
|
"nav",
|
|
91
91
|
{
|
|
@@ -166,7 +166,7 @@ const q = T(
|
|
|
166
166
|
accessMode: g,
|
|
167
167
|
...$
|
|
168
168
|
}, y) => {
|
|
169
|
-
const x = E(_), w = I(g, _), [N, i] =
|
|
169
|
+
const x = E(_), w = I(g, _), [N, i] = P(m ?? b[0]?.key), r = m ?? N, s = b.find((t) => t.key === r), u = B(
|
|
170
170
|
(t) => {
|
|
171
171
|
i(t), c?.(t);
|
|
172
172
|
},
|
|
@@ -243,7 +243,7 @@ const J = T(
|
|
|
243
243
|
accessMode: g,
|
|
244
244
|
...$
|
|
245
245
|
}, y) => {
|
|
246
|
-
const x = E(_), w = I(g, _), [N, i] =
|
|
246
|
+
const x = E(_), w = I(g, _), [N, i] = P(!1), r = !l || N;
|
|
247
247
|
return w === "hidden" ? null : /* @__PURE__ */ e(
|
|
248
248
|
"div",
|
|
249
249
|
{
|
|
@@ -293,10 +293,10 @@ const Q = T(
|
|
|
293
293
|
accessMode: x,
|
|
294
294
|
...w
|
|
295
295
|
}, N) => {
|
|
296
|
-
const i = E(y), r = I(x, y), { t: s } = W(), [u, t] =
|
|
296
|
+
const i = E(y), r = I(x, y), { t: s } = W(), [u, t] = P(!1), h = p ?? u, n = B(() => {
|
|
297
297
|
const a = !h;
|
|
298
298
|
t(a), l?.(a);
|
|
299
|
-
}, [h, l]), D =
|
|
299
|
+
}, [h, l]), D = B(
|
|
300
300
|
(a) => {
|
|
301
301
|
c?.(a), t(!1), l?.(!1);
|
|
302
302
|
},
|
|
@@ -563,8 +563,8 @@ export {
|
|
|
563
563
|
Te as NiceNavMenu,
|
|
564
564
|
Ae as NiceNavbar,
|
|
565
565
|
X as NiceNavigationControls,
|
|
566
|
-
|
|
567
|
-
|
|
566
|
+
Pe as NiceOnboardingWizard,
|
|
567
|
+
Be as NiceOrganizationProfileForm,
|
|
568
568
|
Qe as NicePagination,
|
|
569
569
|
Le as NicePwaShell,
|
|
570
570
|
q as NiceRibbonMenu,
|
package/dist/overlays.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./NiceWindow-Cn3e0Xtd.cjs"),r=require("react/jsx-runtime"),M=require("./core-oNMPbzb7.cjs"),e=require("react"),B=require("react-dom");function Y(){const t=e.useContext(M.nr);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const W=({open:t,onClose:s,children:v,title:a,size:g="md",closeOnBackdropClick:l=!0,closeOnEscape:d=!0,disableFocusTrap:u=!1,disableBodyScroll:j=!0,zIndex:_=1e3,className:p,style:C})=>{const w=e.useRef(null);M.As(w,t&&!u);const y=Y();e.useEffect(()=>{if(!j&&t){const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}}},[t,j]),e.useEffect(()=>{if(!d||!t)return;const n=x=>{x.key==="Escape"&&(x.preventDefault(),s())};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[d,t,s]);const f=e.useCallback(n=>{l&&n.target===n.currentTarget&&s()},[l,s]);if(!t)return null;const i={sm:"nice-modal--sm",md:"nice-modal--md",lg:"nice-modal--lg",xl:"nice-modal--xl",full:"nice-modal--full"}[g];return B.createPortal(r.jsx("div",{className:"nice-modal__overlay",style:{zIndex:_},onClick:f,role:"presentation",children:r.jsx("div",{ref:w,className:`nice-modal ${i} ${p||""}`,role:"dialog","aria-modal":"true","aria-label":a,style:C,tabIndex:-1,children:v})}),y)},q=({children:t,showClose:s=!0,onClose:v,className:a})=>r.jsxs("div",{className:`nice-modal__header ${a||""}`,children:[r.jsx("div",{className:"nice-modal__title",children:t}),s&&v&&r.jsx("button",{type:"button",className:"nice-modal__close",onClick:v,"aria-label":"Close",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"M4 4l12 12M4 16L16 4"})})})]}),O=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__body ${s||""}`,children:t}),X=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__footer ${s||""}`,children:t}),A=({open:t,onClose:s,children:v,position:a="right",size:g=320,title:l,closeOnBackdropClick:d=!0,closeOnEscape:u=!0,swipeToClose:j=!0,zIndex:_=1e3,className:p,style:C})=>{const w=e.useRef(null),[y,f]=e.useState(!1),[i,n]=e.useState(0);M.As(w,t);const x=Y();e.useEffect(()=>{if(!u||!t)return;const o=k=>{k.key==="Escape"&&(k.preventDefault(),s())};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[u,t,s]);const h=e.useCallback(o=>{let k=0;switch(a){case"left":k=Math.min(0,o.deltaX);break;case"right":k=Math.max(0,o.deltaX);break;case"top":k=Math.min(0,o.deltaY);break;case"bottom":k=Math.max(0,o.deltaY);break}n(k)},[a]),D=e.useCallback(o=>{let E=!1;switch(a){case"left":E=o.deltaX<-100;break;case"right":E=o.deltaX>100;break;case"top":E=o.deltaY<-100;break;case"bottom":E=o.deltaY>100;break}E&&(M.Dr("light"),s()),n(0),f(!1)},[a,s]),{ref:P}=M.qs({enabled:j&&t,onPanStart:()=>f(!0),onPan:h,onPanEnd:D}),$=e.useCallback(o=>{d&&o.target===o.currentTarget&&s()},[d,s]);if(!t)return null;const S=a==="left"||a==="right",L=S?{width:typeof g=="number"?`${g}px`:g}:{height:typeof g=="number"?`${g}px`:g},c=()=>{if(y)return S?`translateX(${i}px)`:`translateY(${i}px)`};return B.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-drawer__overlay ${t?"nice-drawer__overlay--visible":""}`,style:{zIndex:_},onClick:$}),r.jsx("div",{ref:o=>{w.current=o,P.current=o},className:`nice-drawer nice-drawer--${a} ${t?"nice-drawer--open":""} ${p||""}`,style:{...L,zIndex:_+1,transform:c(),transition:y?"none":void 0,...C},role:"dialog","aria-modal":"true","aria-label":l,tabIndex:-1,children:v})]}),x)},K=({open:t,onClose:s,children:v,title:a,showHandle:g=!0,snapPoints:l=[.5,.9],initialSnap:d=0,expandable:u=!0,closeOnBackdropClick:j=!0,closeOnEscape:_=!0,hapticFeedback:p=!0,zIndex:C=1e3,className:w,style:y})=>{const f=e.useRef(null),i=e.useRef(null),[n,x]=e.useState(d),[h,D]=e.useState(!1),[P,$]=e.useState(0),S=e.useRef(0);e.useEffect(()=>{t&&(x(d),$(0))},[t,d]),M.As(f,t);const L=Y();e.useEffect(()=>{if(!_||!t)return;const m=b=>{b.key==="Escape"&&(b.preventDefault(),s())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[_,t,s]),e.useEffect(()=>{if(t){const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}}},[t]);const c=e.useCallback(m=>{const b=m.target.closest(".nice-bottom-sheet__handle"),I=i.current,H=!I||I.scrollTop<=0;!b&&!H||(D(!0),S.current=m.touches[0].clientY)},[]),o=e.useCallback(m=>{if(!h)return;const b=m.touches[0].clientY-S.current;(b>0||n<l.length-1)&&$(b)},[h,n,l.length]),k=e.useCallback(()=>{if(!h)return;const m=window.innerHeight;l[n]*m;const b=-P,I=m*.15;b>I&&u&&n<l.length-1?(x(n+1),p&&M.Dr("selection")):b<-I&&(n>0?(x(n-1),p&&M.Dr("selection")):(p&&M.Dr("light"),s())),D(!1),$(0)},[h,P,n,l,u,p,s]),E=e.useCallback(()=>{j&&s()},[j,s]);if(!t)return null;const R=l[n]*100,T=h?P:0;return B.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-bottom-sheet__overlay ${t?"nice-bottom-sheet__overlay--visible":""}`,style:{zIndex:C},onClick:E}),r.jsxs("div",{ref:f,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${w||""}`,style:{zIndex:C+1,height:`${R}vh`,transform:`translateY(${Math.max(0,T)}px)`,transition:h?"none":"transform 0.3s ease-out, height 0.3s ease-out",...y},role:"dialog","aria-modal":"true","aria-label":a,tabIndex:-1,onTouchStart:c,onTouchMove:o,onTouchEnd:k,children:[g&&r.jsx("div",{className:"nice-bottom-sheet__handle","aria-hidden":"true"}),a&&r.jsx("div",{className:"nice-bottom-sheet__title",children:a}),r.jsx("div",{ref:i,className:"nice-bottom-sheet__content",children:v})]})]}),L)},F=({trigger:t,children:s,placement:v="bottom",triggerMode:a="click",open:g,onOpenChange:l,hoverDelay:d=200,offset:u=8,className:j,showArrow:_=!0})=>{const[p,C]=e.useState(!1),w=e.useRef(null),y=e.useRef(null),f=e.useRef(null),i=Y(),n=g!==void 0,x=n?g:p,h=e.useCallback(c=>{n||C(c),l?.(c)},[n,l]);M.Cs(y,()=>{a!=="manual"&&x&&h(!1)});const D=e.useCallback(()=>{a==="click"&&h(!x)},[a,x,h]),P=e.useCallback(()=>{a==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!0),d))},[a,d,h]),$=e.useCallback(()=>{a==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!1),d))},[a,d,h]),[S,L]=e.useState({top:0,left:0});return e.useEffect(()=>{if(!x||!w.current||!y.current)return;const c=w.current.getBoundingClientRect(),o=y.current.getBoundingClientRect(),k=window.innerWidth,E=window.innerHeight;let R=0,T=0;const[m,b="center"]=v.split("-");switch(m){case"top":R=c.top-o.height-u,T=c.left+(c.width-o.width)/2;break;case"bottom":R=c.bottom+u,T=c.left+(c.width-o.width)/2;break;case"left":R=c.top+(c.height-o.height)/2,T=c.left-o.width-u;break;case"right":R=c.top+(c.height-o.height)/2,T=c.right+u;break}m==="top"||m==="bottom"?(b==="start"&&(T=c.left),b==="end"&&(T=c.right-o.width)):(b==="start"&&(R=c.top),b==="end"&&(R=c.bottom-o.height)),T=Math.max(8,Math.min(k-o.width-8,T)),R=Math.max(8,Math.min(E-o.height-8,R)),L({top:R,left:T})},[x,v,u]),r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,className:"nice-popover__trigger",onClick:D,onMouseEnter:P,onMouseLeave:$,style:{display:"inline-block"},children:t}),x&&B.createPortal(r.jsxs("div",{ref:y,className:`nice-popover nice-popover--${v} ${j||""}`,style:{position:"fixed",top:S.top,left:S.left,zIndex:1100},onMouseEnter:P,onMouseLeave:$,role:"tooltip",children:[_&&r.jsx("div",{className:"nice-popover__arrow"}),r.jsx("div",{className:"nice-popover__content",children:s})]}),i)]})},z=({items:t,children:s,onOpen:v,onClose:a,className:g})=>{const[l,d]=e.useState(!1),[u,j]=e.useState({x:0,y:0}),_=e.useRef(null),p=e.useRef(null),C=Y();M.Cs(_,()=>{l&&(d(!1),a?.())});const w=e.useCallback(i=>{i.preventDefault(),j({x:i.clientX,y:i.clientY}),d(!0),v?.()},[v]),y=e.useCallback(i=>{!i.disabled&&i.onClick&&(i.onClick(),d(!1),a?.())},[a]);e.useEffect(()=>{if(!l)return;const i=n=>{n.key==="Escape"&&(d(!1),a?.())};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[l,a]);const f=i=>r.jsx("ul",{className:"nice-context-menu__list",role:"menu",children:i.map(n=>n.divider?r.jsx("li",{className:"nice-context-menu__divider",role:"separator"},n.key):r.jsx("li",{role:"presentation",children:r.jsxs("button",{type:"button",className:`nice-context-menu__item ${n.disabled?"nice-context-menu__item--disabled":""} ${n.danger?"nice-context-menu__item--danger":""}`,role:"menuitem",disabled:n.disabled,onClick:()=>y(n),children:[n.icon&&r.jsx("span",{className:"nice-context-menu__icon",children:n.icon}),r.jsx("span",{className:"nice-context-menu__label",children:n.label})]})},n.key))});return r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:p,onContextMenu:w,style:{display:"contents"},children:s}),l&&B.createPortal(r.jsx("div",{ref:_,className:`nice-context-menu ${g||""}`,style:{position:"fixed",left:u.x,top:u.y,zIndex:1200},role:"menu",children:f(t)}),C)]})};exports.NiceActionSheet=N.NiceActionSheet;exports.NiceBlockUI=N.NiceBlockUI;exports.NiceBox=N.NiceBox;exports.NiceCommandPaletteProvider=N.NiceCommandPaletteProvider;exports.NiceLoadPanel=N.NiceLoadPanel;exports.NicePopover=N.NicePopover;exports.NiceResizable=N.NiceResizable;exports.NiceResponsiveBox=N.NiceResponsiveBox;exports.NiceScrollView=N.NiceScrollView;exports.NiceTutorial=N.NiceTutorial;exports.NiceTutorialProvider=N.NiceTutorialProvider;exports.NiceWindow=N.NiceWindow;exports.NiceWindowManager=N.NiceWindowManager;exports.useCommandPalette=N.useCommandPalette;exports.useRegisterCommands=N.useRegisterCommands;exports.NiceBottomSheet=K;exports.NiceContextMenu=z;exports.NiceDrawer=A;exports.NiceModal=W;exports.NiceModalBody=O;exports.NiceModalFooter=X;exports.NiceModalHeader=q;exports.NiceOverlayPopover=F;
|
package/dist/overlays.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { N as se, a as de, b as ue, c as he, d as fe, e as me, f as ve, g as ge, h as we, i as be, j as ye, k as pe, l as _e, u as Ne, m as ke } from "./NiceWindow-
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as
|
|
5
|
-
import { createPortal as
|
|
1
|
+
import { N as se, a as de, b as ue, c as he, d as fe, e as me, f as ve, g as ge, h as we, i as be, j as ye, k as pe, l as _e, u as Ne, m as ke } from "./NiceWindow-EXCwOEXz.js";
|
|
2
|
+
import { jsxs as C, Fragment as O, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { A as j, D as K, a as A, q as z, n as U } from "./core-CtqcSgsw.js";
|
|
4
|
+
import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as V } from "react";
|
|
5
|
+
import { createPortal as X } from "react-dom";
|
|
6
6
|
function W() {
|
|
7
|
-
const e =
|
|
7
|
+
const e = V(U);
|
|
8
8
|
return e?.portalTarget ? e.portalTarget : typeof document < "u" ? document.body : null;
|
|
9
9
|
}
|
|
10
10
|
const F = ({
|
|
@@ -54,7 +54,7 @@ const F = ({
|
|
|
54
54
|
xl: "nice-modal--xl",
|
|
55
55
|
full: "nice-modal--full"
|
|
56
56
|
}[v];
|
|
57
|
-
return
|
|
57
|
+
return X(
|
|
58
58
|
/* @__PURE__ */ a(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -84,7 +84,7 @@ const F = ({
|
|
|
84
84
|
showClose: o = !0,
|
|
85
85
|
onClose: m,
|
|
86
86
|
className: r
|
|
87
|
-
}) => /* @__PURE__ */
|
|
87
|
+
}) => /* @__PURE__ */ C("div", { className: `nice-modal__header ${r || ""}`, children: [
|
|
88
88
|
/* @__PURE__ */ a("div", { className: "nice-modal__title", children: e }),
|
|
89
89
|
o && m && /* @__PURE__ */ a("button", { type: "button", className: "nice-modal__close", onClick: m, "aria-label": "Close", children: /* @__PURE__ */ a(
|
|
90
90
|
"svg",
|
|
@@ -143,7 +143,7 @@ const F = ({
|
|
|
143
143
|
t(_);
|
|
144
144
|
},
|
|
145
145
|
[r]
|
|
146
|
-
),
|
|
146
|
+
), H = b(
|
|
147
147
|
(n) => {
|
|
148
148
|
let R = !1;
|
|
149
149
|
switch (r) {
|
|
@@ -163,11 +163,11 @@ const F = ({
|
|
|
163
163
|
R && (K("light"), o()), t(0), u(!1);
|
|
164
164
|
},
|
|
165
165
|
[r, o]
|
|
166
|
-
), { ref: L } =
|
|
166
|
+
), { ref: L } = z({
|
|
167
167
|
enabled: x && e,
|
|
168
168
|
onPanStart: () => u(!0),
|
|
169
169
|
onPan: h,
|
|
170
|
-
onPanEnd:
|
|
170
|
+
onPanEnd: H
|
|
171
171
|
}), P = b(
|
|
172
172
|
(n) => {
|
|
173
173
|
s && n.target === n.currentTarget && o();
|
|
@@ -176,12 +176,12 @@ const F = ({
|
|
|
176
176
|
);
|
|
177
177
|
if (!e)
|
|
178
178
|
return null;
|
|
179
|
-
const I = r === "left" || r === "right",
|
|
179
|
+
const I = r === "left" || r === "right", S = I ? { width: typeof v == "number" ? `${v}px` : v } : { height: typeof v == "number" ? `${v}px` : v }, i = () => {
|
|
180
180
|
if (p)
|
|
181
181
|
return I ? `translateX(${c}px)` : `translateY(${c}px)`;
|
|
182
182
|
};
|
|
183
|
-
return
|
|
184
|
-
/* @__PURE__ */
|
|
183
|
+
return X(
|
|
184
|
+
/* @__PURE__ */ C(O, { children: [
|
|
185
185
|
/* @__PURE__ */ a(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
@@ -198,7 +198,7 @@ const F = ({
|
|
|
198
198
|
},
|
|
199
199
|
className: `nice-drawer nice-drawer--${r} ${e ? "nice-drawer--open" : ""} ${k || ""}`,
|
|
200
200
|
style: {
|
|
201
|
-
...
|
|
201
|
+
...S,
|
|
202
202
|
zIndex: N + 1,
|
|
203
203
|
transform: i(),
|
|
204
204
|
transition: p ? "none" : void 0,
|
|
@@ -230,11 +230,11 @@ const F = ({
|
|
|
230
230
|
className: y,
|
|
231
231
|
style: p
|
|
232
232
|
}) => {
|
|
233
|
-
const u = E(null), c = E(null), [t, g] = D(s), [h,
|
|
233
|
+
const u = E(null), c = E(null), [t, g] = D(s), [h, H] = D(!1), [L, P] = D(0), I = E(0);
|
|
234
234
|
Y(() => {
|
|
235
235
|
e && (g(s), P(0));
|
|
236
236
|
}, [e, s]), j(u, e);
|
|
237
|
-
const
|
|
237
|
+
const S = W();
|
|
238
238
|
Y(() => {
|
|
239
239
|
if (!N || !e)
|
|
240
240
|
return;
|
|
@@ -251,8 +251,8 @@ const F = ({
|
|
|
251
251
|
}
|
|
252
252
|
}, [e]);
|
|
253
253
|
const i = b((f) => {
|
|
254
|
-
const w = f.target.closest(".nice-bottom-sheet__handle"), B = c.current,
|
|
255
|
-
!w && !
|
|
254
|
+
const w = f.target.closest(".nice-bottom-sheet__handle"), B = c.current, q = !B || B.scrollTop <= 0;
|
|
255
|
+
!w && !q || (H(!0), I.current = f.touches[0].clientY);
|
|
256
256
|
}, []), n = b(
|
|
257
257
|
(f) => {
|
|
258
258
|
if (!h)
|
|
@@ -267,15 +267,15 @@ const F = ({
|
|
|
267
267
|
const f = window.innerHeight;
|
|
268
268
|
l[t] * f;
|
|
269
269
|
const w = -L, B = f * 0.15;
|
|
270
|
-
w > B && d && t < l.length - 1 ? (g(t + 1), k && K("selection")) : w < -B && (t > 0 ? (g(t - 1), k && K("selection")) : (k && K("light"), o())),
|
|
270
|
+
w > B && d && t < l.length - 1 ? (g(t + 1), k && K("selection")) : w < -B && (t > 0 ? (g(t - 1), k && K("selection")) : (k && K("light"), o())), H(!1), P(0);
|
|
271
271
|
}, [h, L, t, l, d, k, o]), R = b(() => {
|
|
272
272
|
x && o();
|
|
273
273
|
}, [x, o]);
|
|
274
274
|
if (!e)
|
|
275
275
|
return null;
|
|
276
276
|
const T = l[t] * 100, $ = h ? L : 0;
|
|
277
|
-
return
|
|
278
|
-
/* @__PURE__ */
|
|
277
|
+
return X(
|
|
278
|
+
/* @__PURE__ */ C(O, { children: [
|
|
279
279
|
/* @__PURE__ */ a(
|
|
280
280
|
"div",
|
|
281
281
|
{
|
|
@@ -284,7 +284,7 @@ const F = ({
|
|
|
284
284
|
onClick: R
|
|
285
285
|
}
|
|
286
286
|
),
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ C(
|
|
288
288
|
"div",
|
|
289
289
|
{
|
|
290
290
|
ref: u,
|
|
@@ -311,7 +311,7 @@ const F = ({
|
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
] }),
|
|
314
|
-
|
|
314
|
+
S
|
|
315
315
|
);
|
|
316
316
|
}, ae = ({
|
|
317
317
|
trigger: e,
|
|
@@ -331,16 +331,16 @@ const F = ({
|
|
|
331
331
|
},
|
|
332
332
|
[t, l]
|
|
333
333
|
);
|
|
334
|
-
|
|
334
|
+
A(p, () => {
|
|
335
335
|
r !== "manual" && g && h(!1);
|
|
336
336
|
});
|
|
337
|
-
const
|
|
337
|
+
const H = b(() => {
|
|
338
338
|
r === "click" && h(!g);
|
|
339
339
|
}, [r, g, h]), L = b(() => {
|
|
340
340
|
r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!0), s));
|
|
341
341
|
}, [r, s, h]), P = b(() => {
|
|
342
342
|
r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!1), s));
|
|
343
|
-
}, [r, s, h]), [I,
|
|
343
|
+
}, [r, s, h]), [I, S] = D({ top: 0, left: 0 });
|
|
344
344
|
return Y(() => {
|
|
345
345
|
if (!g || !y.current || !p.current)
|
|
346
346
|
return;
|
|
@@ -361,22 +361,22 @@ const F = ({
|
|
|
361
361
|
T = i.top + (i.height - n.height) / 2, $ = i.right + d;
|
|
362
362
|
break;
|
|
363
363
|
}
|
|
364
|
-
f === "top" || f === "bottom" ? (w === "start" && ($ = i.left), w === "end" && ($ = i.right - n.width)) : (w === "start" && (T = i.top), w === "end" && (T = i.bottom - n.height)), $ = Math.max(8, Math.min(_ - n.width - 8, $)), T = Math.max(8, Math.min(R - n.height - 8, T)),
|
|
365
|
-
}, [g, m, d]), /* @__PURE__ */
|
|
364
|
+
f === "top" || f === "bottom" ? (w === "start" && ($ = i.left), w === "end" && ($ = i.right - n.width)) : (w === "start" && (T = i.top), w === "end" && (T = i.bottom - n.height)), $ = Math.max(8, Math.min(_ - n.width - 8, $)), T = Math.max(8, Math.min(R - n.height - 8, T)), S({ top: T, left: $ });
|
|
365
|
+
}, [g, m, d]), /* @__PURE__ */ C(O, { children: [
|
|
366
366
|
/* @__PURE__ */ a(
|
|
367
367
|
"div",
|
|
368
368
|
{
|
|
369
369
|
ref: y,
|
|
370
370
|
className: "nice-popover__trigger",
|
|
371
|
-
onClick:
|
|
371
|
+
onClick: H,
|
|
372
372
|
onMouseEnter: L,
|
|
373
373
|
onMouseLeave: P,
|
|
374
374
|
style: { display: "inline-block" },
|
|
375
375
|
children: e
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
|
-
g &&
|
|
379
|
-
/* @__PURE__ */
|
|
378
|
+
g && X(
|
|
379
|
+
/* @__PURE__ */ C(
|
|
380
380
|
"div",
|
|
381
381
|
{
|
|
382
382
|
ref: p,
|
|
@@ -407,7 +407,7 @@ const F = ({
|
|
|
407
407
|
className: v
|
|
408
408
|
}) => {
|
|
409
409
|
const [l, s] = D(!1), [d, x] = D({ x: 0, y: 0 }), N = E(null), k = E(null), M = W();
|
|
410
|
-
|
|
410
|
+
A(N, () => {
|
|
411
411
|
l && (s(!1), r?.());
|
|
412
412
|
});
|
|
413
413
|
const y = b(
|
|
@@ -429,7 +429,7 @@ const F = ({
|
|
|
429
429
|
};
|
|
430
430
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
431
431
|
}, [l, r]);
|
|
432
|
-
const u = (c) => /* @__PURE__ */ a("ul", { className: "nice-context-menu__list", role: "menu", children: c.map((t) => t.divider ? /* @__PURE__ */ a("li", { className: "nice-context-menu__divider", role: "separator" }, t.key) : /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */
|
|
432
|
+
const u = (c) => /* @__PURE__ */ a("ul", { className: "nice-context-menu__list", role: "menu", children: c.map((t) => t.divider ? /* @__PURE__ */ a("li", { className: "nice-context-menu__divider", role: "separator" }, t.key) : /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */ C(
|
|
433
433
|
"button",
|
|
434
434
|
{
|
|
435
435
|
type: "button",
|
|
@@ -443,9 +443,9 @@ const F = ({
|
|
|
443
443
|
]
|
|
444
444
|
}
|
|
445
445
|
) }, t.key)) });
|
|
446
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ C(O, { children: [
|
|
447
447
|
/* @__PURE__ */ a("div", { ref: k, onContextMenu: y, style: { display: "contents" }, children: o }),
|
|
448
|
-
l &&
|
|
448
|
+
l && X(
|
|
449
449
|
/* @__PURE__ */ a(
|
|
450
450
|
"div",
|
|
451
451
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "Nice2Dev UI — Universal, themeable, i18n-ready React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"react-dom": ">=17.0.0"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@nice2dev/i18n": "^1.0.
|
|
103
|
-
"@nice2dev/ui-core": "^1.0.
|
|
102
|
+
"@nice2dev/i18n": "^1.0.16",
|
|
103
|
+
"@nice2dev/ui-core": "^1.0.16",
|
|
104
104
|
"country-flag-icons": "^1.6.17"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|