@nice2dev/ui 1.0.6 → 1.0.10

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.
Files changed (137) hide show
  1. package/dist/NiceAPIFlow.doc-DnQLPUie.js +30 -0
  2. package/dist/NiceAPIFlow.doc-Dx4qw1lm.cjs +6 -0
  3. package/dist/NiceBranchManager.doc-BXjiENlD.cjs +6 -0
  4. package/dist/NiceBranchManager.doc-xLB82YwU.js +30 -0
  5. package/dist/NiceButton-CDiS45Ya.cjs +1 -0
  6. package/dist/NiceButton-D9l39Rs7.js +595 -0
  7. package/dist/NiceCodeTemplate.doc-BWxTE4C_.cjs +6 -0
  8. package/dist/NiceCodeTemplate.doc-CA2U5F-v.js +30 -0
  9. package/dist/NiceDataBranchGraph.doc-CkitupWc.js +29 -0
  10. package/dist/NiceDataBranchGraph.doc-DDUgipqH.cjs +5 -0
  11. package/dist/NiceDataBranchManager.doc-B0ODKOs4.js +30 -0
  12. package/dist/NiceDataBranchManager.doc-CC5o8ihs.cjs +6 -0
  13. package/dist/NiceDataConflictResolver.doc-CdzScNie.cjs +5 -0
  14. package/dist/NiceDataConflictResolver.doc-V8vxYAeo.js +29 -0
  15. package/dist/NiceDataDiffViewer.doc-CR14Bq3A.cjs +6 -0
  16. package/dist/NiceDataDiffViewer.doc-w2I2QjhX.js +30 -0
  17. package/dist/NiceDataMapper.doc-C7jSyHRM.js +30 -0
  18. package/dist/NiceDataMapper.doc-DXjQHz87.cjs +6 -0
  19. package/dist/NiceDataMergeBuilder.doc-CV32WC_w.cjs +6 -0
  20. package/dist/NiceDataMergeBuilder.doc-DtuYb3nx.js +30 -0
  21. package/dist/NiceDataSnapshot.doc-CFLkY3ry.js +30 -0
  22. package/dist/NiceDataSnapshot.doc-CpZyQ17u.cjs +6 -0
  23. package/dist/NiceErrorBoundary-B5nF-OVn.cjs +1 -0
  24. package/dist/NiceErrorBoundary-BAeqfoSc.cjs +1 -0
  25. package/dist/NiceErrorBoundary-D75yr_WE.js +762 -0
  26. package/dist/NiceErrorBoundary-niMx1aSJ.js +837 -0
  27. package/dist/NiceEventOrchestrator.doc-C4SJfIDV.js +30 -0
  28. package/dist/NiceEventOrchestrator.doc-CxjsLxBG.cjs +6 -0
  29. package/dist/NiceForm-CKoJA6NG.js +5131 -0
  30. package/dist/NiceForm-D7xnpnRJ.cjs +382 -0
  31. package/dist/NiceForm.css +1 -0
  32. package/dist/NiceGitBlame.doc-BG3_K9_0.cjs +6 -0
  33. package/dist/NiceGitBlame.doc-DrJABEat.js +30 -0
  34. package/dist/NiceGitConflictResolver.doc-BK7hAfz6.js +30 -0
  35. package/dist/NiceGitConflictResolver.doc-CgroGM9_.cjs +6 -0
  36. package/dist/NiceGitDiffViewer.doc-BAwgcY_3.cjs +6 -0
  37. package/dist/NiceGitDiffViewer.doc-BXKJeP-E.js +30 -0
  38. package/dist/NiceGitGraph.doc-B-WtGuzn.cjs +5 -0
  39. package/dist/NiceGitGraph.doc-DxnDPCgC.js +29 -0
  40. package/dist/NiceGitHooks.doc-BrEizvMp.js +29 -0
  41. package/dist/NiceGitHooks.doc-C4EdV5zj.cjs +5 -0
  42. package/dist/NiceMergeRequestBuilder.doc-C5p8mYuh.cjs +6 -0
  43. package/dist/NiceMergeRequestBuilder.doc-Ct9RCmU8.js +30 -0
  44. package/dist/NiceModal-1QX7NhyH.js +95 -0
  45. package/dist/NiceModal-CAwsKVQ2.cjs +1 -0
  46. package/dist/NiceModuleLifecyclePanel-Brg1RLwi.cjs +1 -0
  47. package/dist/NiceModuleLifecyclePanel-C9xMSjOF.cjs +1 -0
  48. package/dist/NiceModuleLifecyclePanel-CMrPbSw9.js +5249 -0
  49. package/dist/NiceModuleLifecyclePanel-I_TXRiiY.js +5053 -0
  50. package/dist/NiceModuleLifecyclePanel.css +1 -0
  51. package/dist/NicePagination-DbE-uOkl.js +171 -0
  52. package/dist/NicePagination-DlealakT.cjs +1 -0
  53. package/dist/NicePinCodeInput-B8cI8zu8.js +11830 -0
  54. package/dist/NicePinCodeInput-CrMfdxxc.js +15287 -0
  55. package/dist/NicePinCodeInput-D0aF9MK8.cjs +692 -0
  56. package/dist/NicePinCodeInput-SGQaHvpE.cjs +419 -0
  57. package/dist/NicePinCodeInput.css +1 -1
  58. package/dist/NicePipelineEditor.doc-0eGt8zbX.cjs +5 -0
  59. package/dist/NicePipelineEditor.doc-DTmaOebn.js +29 -0
  60. package/dist/NicePipelineMonitor.doc-67CmsRcf.cjs +5 -0
  61. package/dist/NicePipelineMonitor.doc-mSMdhuG8.js +29 -0
  62. package/dist/NiceSavedQueryPanel-BZNvqSQW.cjs +596 -0
  63. package/dist/NiceSavedQueryPanel-CUAsdOjJ.js +6190 -0
  64. package/dist/NiceSavedQueryPanel-CZ5bYOe_.js +6449 -0
  65. package/dist/NiceSavedQueryPanel-Ce2s060j.cjs +596 -0
  66. package/dist/NiceStateDesigner.doc-B36u0hNU.js +29 -0
  67. package/dist/NiceStateDesigner.doc-MPmvNHSx.cjs +5 -0
  68. package/dist/NiceTabs-DvOmxKyQ.cjs +1 -0
  69. package/dist/NiceTabs-DzLHzwuA.js +1636 -0
  70. package/dist/NiceTestBuilder.doc-BFInj8GJ.js +30 -0
  71. package/dist/NiceTestBuilder.doc-CB03U_uR.cjs +6 -0
  72. package/dist/NiceToggle-CaY1u82g.js +277 -0
  73. package/dist/NiceToggle-DFJFQv_Z.cjs +1 -0
  74. package/dist/NiceWindow-CVgkxcCz.cjs +1 -0
  75. package/dist/NiceWindow-DeC83yfE.js +1409 -0
  76. package/dist/NiceWindow-IdHAcP70.cjs +1 -0
  77. package/dist/NiceWindow-SiCaREbq.js +1408 -0
  78. package/dist/charts-BAS21jkC.js +4621 -0
  79. package/dist/charts-Bx_kNBsE.js +4280 -0
  80. package/dist/charts-DECVsCHX.cjs +754 -0
  81. package/dist/charts-DShUbWrP.cjs +759 -0
  82. package/dist/charts.cjs +1 -1
  83. package/dist/charts.css +1 -0
  84. package/dist/charts.d.ts +45 -48
  85. package/dist/charts.mjs +1 -1
  86. package/dist/core-BZBTsGWN.cjs +96 -0
  87. package/dist/core-BpghV7Ls.js +17555 -0
  88. package/dist/core-C2ZmWe_u.cjs +96 -0
  89. package/dist/core-Da43q-pO.js +22094 -0
  90. package/dist/data-branching-CJlrg8qf.cjs +1 -0
  91. package/dist/data-branching-DCUwI53s.js +6121 -0
  92. package/dist/data-branching-De4ExX-S.cjs +1 -0
  93. package/dist/data-branching-DiRfob1f.js +6071 -0
  94. package/dist/data-branching.cjs +1 -0
  95. package/dist/data-branching.d.ts +364 -0
  96. package/dist/data-branching.mjs +9 -0
  97. package/dist/data.cjs +1 -1
  98. package/dist/data.d.ts +206 -192
  99. package/dist/data.mjs +1 -1
  100. package/dist/devops-BnYinjkT.cjs +17 -0
  101. package/dist/devops-CXynFG3X.cjs +17 -0
  102. package/dist/devops-Ckh57eti.js +7198 -0
  103. package/dist/devops-D0TfzV5B.js +7660 -0
  104. package/dist/devops.cjs +1 -0
  105. package/dist/devops.d.ts +721 -0
  106. package/dist/devops.mjs +12 -0
  107. package/dist/editors.cjs +1 -1
  108. package/dist/editors.d.ts +311 -393
  109. package/dist/editors.mjs +61 -64
  110. package/dist/feedback.cjs +1 -1
  111. package/dist/feedback.d.ts +3 -44
  112. package/dist/feedback.mjs +11 -10
  113. package/dist/index-B8wxZ8Ps.cjs +5192 -0
  114. package/dist/index-CBIZ6mTQ.cjs +5734 -0
  115. package/dist/index-CIl98Vbm.js +72951 -0
  116. package/dist/index-pAuGTbuB.js +57319 -0
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.css +1 -1
  119. package/dist/index.d.ts +4673 -10015
  120. package/dist/index.mjs +880 -969
  121. package/dist/lazy.cjs +1 -0
  122. package/dist/lazy.d.ts +1848 -0
  123. package/dist/lazy.mjs +98 -0
  124. package/dist/navigation.cjs +1 -1
  125. package/dist/navigation.d.ts +151 -216
  126. package/dist/navigation.mjs +111 -48
  127. package/dist/no-code-B5bzduNP.cjs +332 -0
  128. package/dist/no-code-BCuadkm4.cjs +332 -0
  129. package/dist/no-code-D8RJ7lx0.js +7064 -0
  130. package/dist/no-code-TL7PyulA.js +7005 -0
  131. package/dist/no-code.cjs +1 -0
  132. package/dist/no-code.d.ts +833 -0
  133. package/dist/no-code.mjs +13 -0
  134. package/dist/overlays.cjs +1 -1
  135. package/dist/overlays.d.ts +13 -45
  136. package/dist/overlays.mjs +490 -24
  137. package/package.json +24 -2
@@ -0,0 +1,13 @@
1
+ import { N as i, a as s, b as c, c as o, d as r, e as t, f as N, g as d, h as n, i as p } from "./no-code-D8RJ7lx0.js";
2
+ export {
3
+ i as NiceAPIFlow,
4
+ s as NiceCodePreview,
5
+ c as NiceCodeTemplate,
6
+ o as NiceComponentDesigner,
7
+ r as NiceDataMapper,
8
+ t as NiceEventOrchestrator,
9
+ N as NiceLowCodeStudio,
10
+ d as NicePageBuilder,
11
+ n as NiceStateDesigner,
12
+ p as NiceTestBuilder
13
+ };
package/dist/overlays.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./NiceWindow-yARTUJsg.cjs");exports.NiceActionSheet=e.NiceActionSheet;exports.NiceBlockUI=e.NiceBlockUI;exports.NiceBottomSheet=e.NiceBottomSheet;exports.NiceBox=e.NiceBox;exports.NiceCommandPaletteProvider=e.NiceCommandPaletteProvider;exports.NiceContextMenu=e.NiceContextMenu;exports.NiceDrawer=e.NiceDrawer;exports.NiceLoadPanel=e.NiceLoadPanel;exports.NiceModal=e.NiceModal;exports.NiceModalBody=e.NiceModalBody;exports.NiceModalFooter=e.NiceModalFooter;exports.NiceModalHeader=e.NiceModalHeader;exports.NiceOverlayPopover=e.NicePopover;exports.NicePopover=e.NicePopover$1;exports.NiceResizable=e.NiceResizable;exports.NiceResponsiveBox=e.NiceResponsiveBox;exports.NiceScrollView=e.NiceScrollView;exports.NiceTutorial=e.NiceTutorial;exports.NiceTutorialProvider=e.NiceTutorialProvider;exports.NiceWindow=e.NiceWindow;exports.NiceWindowManager=e.NiceWindowManager;exports.useCommandPalette=e.useCommandPalette;exports.useRegisterCommands=e.useRegisterCommands;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./NiceWindow-CVgkxcCz.cjs"),r=require("react/jsx-runtime"),e=require("react"),I=require("react-dom"),M=require("./core-C2ZmWe_u.cjs");function B(){const t=e.useContext(M.NiceThemeContext);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const O=({open:t,onClose:i,children:v,title:o,size:g="md",closeOnBackdropClick:l=!0,closeOnEscape:d=!0,disableFocusTrap:u=!1,disableBodyScroll:T=!0,zIndex:p=1e3,className:_,style:C})=>{const w=e.useRef(null);M.useFocusTrap(w,t&&!u);const y=B();e.useEffect(()=>{if(!T&&t){const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}}},[t,T]),e.useEffect(()=>{if(!d||!t)return;const n=x=>{x.key==="Escape"&&(x.preventDefault(),i())};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[d,t,i]);const f=e.useCallback(n=>{l&&n.target===n.currentTarget&&i()},[l,i]);if(!t)return null;const s={sm:"nice-modal--sm",md:"nice-modal--md",lg:"nice-modal--lg",xl:"nice-modal--xl",full:"nice-modal--full"}[g];return I.createPortal(r.jsx("div",{className:"nice-modal__overlay",style:{zIndex:p},onClick:f,role:"presentation",children:r.jsx("div",{ref:w,className:`nice-modal ${s} ${_||""}`,role:"dialog","aria-modal":"true","aria-label":o,style:C,tabIndex:-1,children:v})}),y)},W=({children:t,showClose:i=!0,onClose:v,className:o})=>r.jsxs("div",{className:`nice-modal__header ${o||""}`,children:[r.jsx("div",{className:"nice-modal__title",children:t}),i&&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"})})})]}),F=({children:t,className:i})=>r.jsx("div",{className:`nice-modal__body ${i||""}`,children:t}),X=({children:t,className:i})=>r.jsx("div",{className:`nice-modal__footer ${i||""}`,children:t}),q=({open:t,onClose:i,children:v,position:o="right",size:g=320,title:l,closeOnBackdropClick:d=!0,closeOnEscape:u=!0,swipeToClose:T=!0,zIndex:p=1e3,className:_,style:C})=>{const w=e.useRef(null),[y,f]=e.useState(!1),[s,n]=e.useState(0);M.useFocusTrap(w,t);const x=B();e.useEffect(()=>{if(!u||!t)return;const a=k=>{k.key==="Escape"&&(k.preventDefault(),i())};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[u,t,i]);const h=e.useCallback(a=>{let k=0;switch(o){case"left":k=Math.min(0,a.deltaX);break;case"right":k=Math.max(0,a.deltaX);break;case"top":k=Math.min(0,a.deltaY);break;case"bottom":k=Math.max(0,a.deltaY);break}n(k)},[o]),D=e.useCallback(a=>{let P=!1;switch(o){case"left":P=a.deltaX<-100;break;case"right":P=a.deltaX>100;break;case"top":P=a.deltaY<-100;break;case"bottom":P=a.deltaY>100;break}P&&(M.triggerHaptic("light"),i()),n(0),f(!1)},[o,i]),{ref:E}=M.usePan({enabled:T&&t,onPanStart:()=>f(!0),onPan:h,onPanEnd:D}),$=e.useCallback(a=>{d&&a.target===a.currentTarget&&i()},[d,i]);if(!t)return null;const S=o==="left"||o==="right",L=S?{width:typeof g=="number"?`${g}px`:g}:{height:typeof g=="number"?`${g}px`:g},c=()=>{if(y)return S?`translateX(${s}px)`:`translateY(${s}px)`};return I.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-drawer__overlay ${t?"nice-drawer__overlay--visible":""}`,style:{zIndex:p},onClick:$}),r.jsx("div",{ref:a=>{w.current=a,E.current=a},className:`nice-drawer nice-drawer--${o} ${t?"nice-drawer--open":""} ${_||""}`,style:{...L,zIndex:p+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:i,children:v,title:o,showHandle:g=!0,snapPoints:l=[.5,.9],initialSnap:d=0,expandable:u=!0,closeOnBackdropClick:T=!0,closeOnEscape:p=!0,hapticFeedback:_=!0,zIndex:C=1e3,className:w,style:y})=>{const f=e.useRef(null),s=e.useRef(null),[n,x]=e.useState(d),[h,D]=e.useState(!1),[E,$]=e.useState(0),S=e.useRef(0);e.useEffect(()=>{t&&(x(d),$(0))},[t,d]),M.useFocusTrap(f,t);const L=B();e.useEffect(()=>{if(!p||!t)return;const m=b=>{b.key==="Escape"&&(b.preventDefault(),i())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[p,t,i]),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"),H=s.current,Y=!H||H.scrollTop<=0;!b&&!Y||(D(!0),S.current=m.touches[0].clientY)},[]),a=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=-E,H=m*.15;b>H&&u&&n<l.length-1?(x(n+1),_&&M.triggerHaptic("selection")):b<-H&&(n>0?(x(n-1),_&&M.triggerHaptic("selection")):(_&&M.triggerHaptic("light"),i())),D(!1),$(0)},[h,E,n,l,u,_,i]),P=e.useCallback(()=>{T&&i()},[T,i]);if(!t)return null;const j=l[n]*100,R=h?E:0;return I.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-bottom-sheet__overlay ${t?"nice-bottom-sheet__overlay--visible":""}`,style:{zIndex:C},onClick:P}),r.jsxs("div",{ref:f,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${w||""}`,style:{zIndex:C+1,height:`${j}vh`,transform:`translateY(${Math.max(0,R)}px)`,transition:h?"none":"transform 0.3s ease-out, height 0.3s ease-out",...y},role:"dialog","aria-modal":"true","aria-label":o,tabIndex:-1,onTouchStart:c,onTouchMove:a,onTouchEnd:k,children:[g&&r.jsx("div",{className:"nice-bottom-sheet__handle","aria-hidden":"true"}),o&&r.jsx("div",{className:"nice-bottom-sheet__title",children:o}),r.jsx("div",{ref:s,className:"nice-bottom-sheet__content",children:v})]})]}),L)},z=({trigger:t,children:i,placement:v="bottom",triggerMode:o="click",open:g,onOpenChange:l,hoverDelay:d=200,offset:u=8,className:T,showArrow:p=!0})=>{const[_,C]=e.useState(!1),w=e.useRef(null),y=e.useRef(null),f=e.useRef(null),s=B(),n=g!==void 0,x=n?g:_,h=e.useCallback(c=>{n||C(c),l?.(c)},[n,l]);M.useClickOutside(y,()=>{o!=="manual"&&x&&h(!1)});const D=e.useCallback(()=>{o==="click"&&h(!x)},[o,x,h]),E=e.useCallback(()=>{o==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!0),d))},[o,d,h]),$=e.useCallback(()=>{o==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!1),d))},[o,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(),a=y.current.getBoundingClientRect(),k=window.innerWidth,P=window.innerHeight;let j=0,R=0;const[m,b="center"]=v.split("-");switch(m){case"top":j=c.top-a.height-u,R=c.left+(c.width-a.width)/2;break;case"bottom":j=c.bottom+u,R=c.left+(c.width-a.width)/2;break;case"left":j=c.top+(c.height-a.height)/2,R=c.left-a.width-u;break;case"right":j=c.top+(c.height-a.height)/2,R=c.right+u;break}m==="top"||m==="bottom"?(b==="start"&&(R=c.left),b==="end"&&(R=c.right-a.width)):(b==="start"&&(j=c.top),b==="end"&&(j=c.bottom-a.height)),R=Math.max(8,Math.min(k-a.width-8,R)),j=Math.max(8,Math.min(P-a.height-8,j)),L({top:j,left:R})},[x,v,u]),r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,className:"nice-popover__trigger",onClick:D,onMouseEnter:E,onMouseLeave:$,style:{display:"inline-block"},children:t}),x&&I.createPortal(r.jsxs("div",{ref:y,className:`nice-popover nice-popover--${v} ${T||""}`,style:{position:"fixed",top:S.top,left:S.left,zIndex:1100},onMouseEnter:E,onMouseLeave:$,role:"tooltip",children:[p&&r.jsx("div",{className:"nice-popover__arrow"}),r.jsx("div",{className:"nice-popover__content",children:i})]}),s)]})},A=({items:t,children:i,onOpen:v,onClose:o,className:g})=>{const[l,d]=e.useState(!1),[u,T]=e.useState({x:0,y:0}),p=e.useRef(null),_=e.useRef(null),C=B();M.useClickOutside(p,()=>{l&&(d(!1),o?.())});const w=e.useCallback(s=>{s.preventDefault(),T({x:s.clientX,y:s.clientY}),d(!0),v?.()},[v]),y=e.useCallback(s=>{!s.disabled&&s.onClick&&(s.onClick(),d(!1),o?.())},[o]);e.useEffect(()=>{if(!l)return;const s=n=>{n.key==="Escape"&&(d(!1),o?.())};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[l,o]);const f=s=>r.jsx("ul",{className:"nice-context-menu__list",role:"menu",children:s.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:_,onContextMenu:w,style:{display:"contents"},children:i}),l&&I.createPortal(r.jsx("div",{ref:p,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=A;exports.NiceDrawer=q;exports.NiceModal=O;exports.NiceModalBody=F;exports.NiceModalFooter=X;exports.NiceModalHeader=W;exports.NiceOverlayPopover=z;
@@ -1,17 +1,10 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { ForwardRefExoticComponent } from 'react';
3
+ import { NiceBaseProps } from '@nice2dev/ui-core';
4
+ import { NiceSize } from '@nice2dev/ui-core';
3
5
  import { ReactNode } from 'react';
4
6
  import { RefAttributes } from 'react';
5
7
 
6
- /**
7
- * Per-component visibility & interaction level used by the access control system.
8
- * - `'full'` — fully interactive (default)
9
- * - `'readOnly'` — renders but cannot be edited
10
- * - `'disabled'` — renders greyed-out
11
- * - `'hidden'` — not rendered at all
12
- */
13
- declare type NiceAccessMode = 'full' | 'readOnly' | 'disabled' | 'hidden';
14
-
15
8
  export declare const NiceActionSheet: default_2.FC<NiceActionSheetProps>;
16
9
 
17
10
  /** An action item in the {@link NiceActionSheet}. */
@@ -44,28 +37,6 @@ export declare interface NiceActionSheetProps extends NiceBaseProps {
44
37
  cancelText?: string;
45
38
  }
46
39
 
47
- /** Base props inherited by every NiceToDev component. */
48
- declare interface NiceBaseProps {
49
- /** Additional CSS class name(s). */
50
- className?: string;
51
- /** Inline style object. */
52
- style?: React.CSSProperties;
53
- /** HTML `id` attribute. When omitted a stable auto-generated id is used. */
54
- id?: string;
55
- /** Tooltip text shown on hover. */
56
- title?: string;
57
- /** Test identifier for integration / e2e test selectors. */
58
- 'data-testid'?: string;
59
- /** Controls component visibility and interaction — see {@link NiceAccessMode}. */
60
- accessMode?: NiceAccessMode;
61
- /**
62
- * Visual presentation style override.
63
- * When set, overrides the global `displayStyle` from `NiceThemeProvider`.
64
- * @see NiceDisplayStyle
65
- */
66
- displayStyle?: NiceDisplayStyle;
67
- }
68
-
69
40
  export declare const NiceBlockUI: default_2.ForwardRefExoticComponent<NiceBlockUIProps & default_2.RefAttributes<HTMLDivElement>>;
70
41
 
71
42
  /** Props for the {@link NiceBlockUI} component — an overlay that blocks user interaction on its children. */
@@ -201,13 +172,6 @@ declare interface NiceContextMenuProps {
201
172
  className?: string;
202
173
  }
203
174
 
204
- /**
205
- * Cross-component visual presentation style.
206
- * Each style maps 1:1 to a ThemeVariantConfig preset controlling
207
- * buttons, inputs, cards, badges, tabs, toggles, tooltips, tables, etc.
208
- */
209
- declare type NiceDisplayStyle = 'default' | 'minimal' | 'rounded' | 'sharp' | 'glass' | 'neumorphic' | 'playful' | 'enterprise' | 'modern3d' | 'brutalist' | 'luxe' | 'pill' | 'flat' | 'editorial' | 'dashboard' | 'softCloud' | 'cosmic' | 'corporate' | 'bank' | 'government' | 'military' | 'legal' | 'medical' | 'swiss' | 'scandinavian' | 'bauhaus' | 'notebook' | 'origami' | 'watercolor' | 'monochrome' | 'paper' | 'zen' | 'terminal' | 'hacker' | 'retro8bit' | 'synthwave' | 'cyberpunk' | 'steampunk' | 'vapor' | 'neon' | 'windows95' | 'material' | 'fluent' | 'cupertino' | 'ant' | 'bootstrap' | 'chakra' | 'notion' | 'linear' | 'vercel' | 'candy' | 'bubblegum' | 'cartoon' | 'kawaii' | 'circus' | 'gaming' | 'kiddo' | 'disco' | 'clown';
210
-
211
175
  /**
212
176
  * Drawer component that slides in from screen edges.
213
177
  * Supports swipe-to-close on touch devices.
@@ -428,9 +392,6 @@ export declare interface NiceScrollViewProps extends NiceBaseProps {
428
392
  children?: default_2.ReactNode;
429
393
  }
430
394
 
431
- /** T-shirt sizing used across all components for consistent visual density. */
432
- declare type NiceSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
433
-
434
395
  export declare const NiceTutorial: default_2.FC<NiceTutorialProps>;
435
396
 
436
397
  /** Props for the {@link NiceTutorial} component — a guided walkthrough overlay with step-by-step highlighting. */
@@ -513,8 +474,10 @@ export declare const NiceWindowManager: ForwardRefExoticComponent<NiceWindowMana
513
474
 
514
475
  /** Props for the {@link NiceWindowManager} component — a multi-window manager with taskbar and z-index stacking. */
515
476
  export declare interface NiceWindowManagerProps extends NiceBaseProps {
516
- /** Managed window entries. */
517
- windows: NiceWindowState_2[];
477
+ /** Managed window entries. Optional when children (NiceWindow elements) are provided. */
478
+ windows?: NiceWindowState_2[];
479
+ /** Window children (NiceWindow elements). Used when `windows` is not provided. */
480
+ children?: React.ReactNode;
518
481
  /** Called when the window list changes (drag, resize, minimize, etc.). */
519
482
  onChange?: (windows: NiceWindowState_2[]) => void;
520
483
  /** Called when a window is closed. */
@@ -537,8 +500,8 @@ export declare interface NiceWindowPosition {
537
500
 
538
501
  /** Props for the {@link NiceWindow} component — a draggable, resizable, snappable desktop window with title bar controls. */
539
502
  export declare interface NiceWindowProps extends NiceBaseProps {
540
- /** Unique window identifier. */
541
- windowKey: string;
503
+ /** Unique window identifier. Auto-generated if not provided. */
504
+ windowKey?: string;
542
505
  /** Window title. */
543
506
  title: string;
544
507
  /** Icon displayed in title bar */
@@ -551,6 +514,11 @@ export declare interface NiceWindowProps extends NiceBaseProps {
551
514
  x?: number;
552
515
  /** Initial or controlled y position */
553
516
  y?: number;
517
+ /** Convenience initial position object — alternative to passing `x` and `y` separately. */
518
+ defaultPosition?: {
519
+ x: number;
520
+ y: number;
521
+ };
554
522
  /** Initial or controlled width */
555
523
  width?: number;
556
524
  /** Initial or controlled height */
package/dist/overlays.mjs CHANGED
@@ -1,26 +1,492 @@
1
- import { N as i, a as o, b as s, c, d as N, e as r, f as t, g as d, h as l, i as n, j as m, k as v, l as P, m as u, n as M, o as p, p as B, q as w, r as x, s as C, t as g, u as h, v as R } from "./NiceWindow-D1awkyFl.js";
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 Ne, u as _e, m as ke } from "./NiceWindow-DeC83yfE.js";
2
+ import { jsxs as C, Fragment as K, jsx as a } from "react/jsx-runtime";
3
+ import { useRef as E, useState as P, useEffect as Y, useCallback as b, useContext as U } from "react";
4
+ import { createPortal as X } from "react-dom";
5
+ import { e as j, t as W, f as z, g as V, N as q } from "./core-Da43q-pO.js";
6
+ function O() {
7
+ const e = U(q);
8
+ return e?.portalTarget ? e.portalTarget : typeof document < "u" ? document.body : null;
9
+ }
10
+ const Z = ({
11
+ open: e,
12
+ onClose: o,
13
+ children: m,
14
+ title: r,
15
+ size: v = "md",
16
+ closeOnBackdropClick: l = !0,
17
+ closeOnEscape: s = !0,
18
+ disableFocusTrap: d = !1,
19
+ disableBodyScroll: x = !0,
20
+ zIndex: _ = 1e3,
21
+ className: k,
22
+ style: M
23
+ }) => {
24
+ const y = E(null);
25
+ j(y, e && !d);
26
+ const p = O();
27
+ Y(() => {
28
+ if (!x && e) {
29
+ const t = document.body.style.overflow;
30
+ return document.body.style.overflow = "hidden", () => {
31
+ document.body.style.overflow = t;
32
+ };
33
+ }
34
+ }, [e, x]), Y(() => {
35
+ if (!s || !e)
36
+ return;
37
+ const t = (g) => {
38
+ g.key === "Escape" && (g.preventDefault(), o());
39
+ };
40
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
41
+ }, [s, e, o]);
42
+ const u = b(
43
+ (t) => {
44
+ l && t.target === t.currentTarget && o();
45
+ },
46
+ [l, o]
47
+ );
48
+ if (!e)
49
+ return null;
50
+ const c = {
51
+ sm: "nice-modal--sm",
52
+ md: "nice-modal--md",
53
+ lg: "nice-modal--lg",
54
+ xl: "nice-modal--xl",
55
+ full: "nice-modal--full"
56
+ }[v];
57
+ return X(
58
+ /* @__PURE__ */ a(
59
+ "div",
60
+ {
61
+ className: "nice-modal__overlay",
62
+ style: { zIndex: _ },
63
+ onClick: u,
64
+ role: "presentation",
65
+ children: /* @__PURE__ */ a(
66
+ "div",
67
+ {
68
+ ref: y,
69
+ className: `nice-modal ${c} ${k || ""}`,
70
+ role: "dialog",
71
+ "aria-modal": "true",
72
+ "aria-label": r,
73
+ style: M,
74
+ tabIndex: -1,
75
+ children: m
76
+ }
77
+ )
78
+ }
79
+ ),
80
+ p
81
+ );
82
+ }, ee = ({
83
+ children: e,
84
+ showClose: o = !0,
85
+ onClose: m,
86
+ className: r
87
+ }) => /* @__PURE__ */ C("div", { className: `nice-modal__header ${r || ""}`, children: [
88
+ /* @__PURE__ */ a("div", { className: "nice-modal__title", children: e }),
89
+ o && m && /* @__PURE__ */ a("button", { type: "button", className: "nice-modal__close", onClick: m, "aria-label": "Close", children: /* @__PURE__ */ a(
90
+ "svg",
91
+ {
92
+ width: "20",
93
+ height: "20",
94
+ viewBox: "0 0 20 20",
95
+ fill: "none",
96
+ stroke: "currentColor",
97
+ strokeWidth: "2",
98
+ children: /* @__PURE__ */ a("path", { d: "M4 4l12 12M4 16L16 4" })
99
+ }
100
+ ) })
101
+ ] }), te = ({ children: e, className: o }) => /* @__PURE__ */ a("div", { className: `nice-modal__body ${o || ""}`, children: e }), ne = ({ children: e, className: o }) => /* @__PURE__ */ a("div", { className: `nice-modal__footer ${o || ""}`, children: e }), re = ({
102
+ open: e,
103
+ onClose: o,
104
+ children: m,
105
+ position: r = "right",
106
+ size: v = 320,
107
+ title: l,
108
+ closeOnBackdropClick: s = !0,
109
+ closeOnEscape: d = !0,
110
+ swipeToClose: x = !0,
111
+ zIndex: _ = 1e3,
112
+ className: k,
113
+ style: M
114
+ }) => {
115
+ const y = E(null), [p, u] = P(!1), [c, t] = P(0);
116
+ j(y, e);
117
+ const g = O();
118
+ Y(() => {
119
+ if (!d || !e)
120
+ return;
121
+ const n = (N) => {
122
+ N.key === "Escape" && (N.preventDefault(), o());
123
+ };
124
+ return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
125
+ }, [d, e, o]);
126
+ const h = b(
127
+ (n) => {
128
+ let N = 0;
129
+ switch (r) {
130
+ case "left":
131
+ N = Math.min(0, n.deltaX);
132
+ break;
133
+ case "right":
134
+ N = Math.max(0, n.deltaX);
135
+ break;
136
+ case "top":
137
+ N = Math.min(0, n.deltaY);
138
+ break;
139
+ case "bottom":
140
+ N = Math.max(0, n.deltaY);
141
+ break;
142
+ }
143
+ t(N);
144
+ },
145
+ [r]
146
+ ), H = b(
147
+ (n) => {
148
+ let R = !1;
149
+ switch (r) {
150
+ case "left":
151
+ R = n.deltaX < -100;
152
+ break;
153
+ case "right":
154
+ R = n.deltaX > 100;
155
+ break;
156
+ case "top":
157
+ R = n.deltaY < -100;
158
+ break;
159
+ case "bottom":
160
+ R = n.deltaY > 100;
161
+ break;
162
+ }
163
+ R && (W("light"), o()), t(0), u(!1);
164
+ },
165
+ [r, o]
166
+ ), { ref: D } = V({
167
+ enabled: x && e,
168
+ onPanStart: () => u(!0),
169
+ onPan: h,
170
+ onPanEnd: H
171
+ }), L = b(
172
+ (n) => {
173
+ s && n.target === n.currentTarget && o();
174
+ },
175
+ [s, o]
176
+ );
177
+ if (!e)
178
+ return null;
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
+ if (p)
181
+ return I ? `translateX(${c}px)` : `translateY(${c}px)`;
182
+ };
183
+ return X(
184
+ /* @__PURE__ */ C(K, { children: [
185
+ /* @__PURE__ */ a(
186
+ "div",
187
+ {
188
+ className: `nice-drawer__overlay ${e ? "nice-drawer__overlay--visible" : ""}`,
189
+ style: { zIndex: _ },
190
+ onClick: L
191
+ }
192
+ ),
193
+ /* @__PURE__ */ a(
194
+ "div",
195
+ {
196
+ ref: (n) => {
197
+ y.current = n, D.current = n;
198
+ },
199
+ className: `nice-drawer nice-drawer--${r} ${e ? "nice-drawer--open" : ""} ${k || ""}`,
200
+ style: {
201
+ ...S,
202
+ zIndex: _ + 1,
203
+ transform: i(),
204
+ transition: p ? "none" : void 0,
205
+ ...M
206
+ },
207
+ role: "dialog",
208
+ "aria-modal": "true",
209
+ "aria-label": l,
210
+ tabIndex: -1,
211
+ children: m
212
+ }
213
+ )
214
+ ] }),
215
+ g
216
+ );
217
+ }, oe = ({
218
+ open: e,
219
+ onClose: o,
220
+ children: m,
221
+ title: r,
222
+ showHandle: v = !0,
223
+ snapPoints: l = [0.5, 0.9],
224
+ initialSnap: s = 0,
225
+ expandable: d = !0,
226
+ closeOnBackdropClick: x = !0,
227
+ closeOnEscape: _ = !0,
228
+ hapticFeedback: k = !0,
229
+ zIndex: M = 1e3,
230
+ className: y,
231
+ style: p
232
+ }) => {
233
+ const u = E(null), c = E(null), [t, g] = P(s), [h, H] = P(!1), [D, L] = P(0), I = E(0);
234
+ Y(() => {
235
+ e && (g(s), L(0));
236
+ }, [e, s]), j(u, e);
237
+ const S = O();
238
+ Y(() => {
239
+ if (!_ || !e)
240
+ return;
241
+ const f = (w) => {
242
+ w.key === "Escape" && (w.preventDefault(), o());
243
+ };
244
+ return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
245
+ }, [_, e, o]), Y(() => {
246
+ if (e) {
247
+ const f = document.body.style.overflow;
248
+ return document.body.style.overflow = "hidden", () => {
249
+ document.body.style.overflow = f;
250
+ };
251
+ }
252
+ }, [e]);
253
+ const i = b((f) => {
254
+ const w = f.target.closest(".nice-bottom-sheet__handle"), B = c.current, A = !B || B.scrollTop <= 0;
255
+ !w && !A || (H(!0), I.current = f.touches[0].clientY);
256
+ }, []), n = b(
257
+ (f) => {
258
+ if (!h)
259
+ return;
260
+ const w = f.touches[0].clientY - I.current;
261
+ (w > 0 || t < l.length - 1) && L(w);
262
+ },
263
+ [h, t, l.length]
264
+ ), N = b(() => {
265
+ if (!h)
266
+ return;
267
+ const f = window.innerHeight;
268
+ l[t] * f;
269
+ const w = -D, B = f * 0.15;
270
+ w > B && d && t < l.length - 1 ? (g(t + 1), k && W("selection")) : w < -B && (t > 0 ? (g(t - 1), k && W("selection")) : (k && W("light"), o())), H(!1), L(0);
271
+ }, [h, D, t, l, d, k, o]), R = b(() => {
272
+ x && o();
273
+ }, [x, o]);
274
+ if (!e)
275
+ return null;
276
+ const T = l[t] * 100, $ = h ? D : 0;
277
+ return X(
278
+ /* @__PURE__ */ C(K, { children: [
279
+ /* @__PURE__ */ a(
280
+ "div",
281
+ {
282
+ className: `nice-bottom-sheet__overlay ${e ? "nice-bottom-sheet__overlay--visible" : ""}`,
283
+ style: { zIndex: M },
284
+ onClick: R
285
+ }
286
+ ),
287
+ /* @__PURE__ */ C(
288
+ "div",
289
+ {
290
+ ref: u,
291
+ className: `nice-bottom-sheet ${e ? "nice-bottom-sheet--open" : ""} ${y || ""}`,
292
+ style: {
293
+ zIndex: M + 1,
294
+ height: `${T}vh`,
295
+ transform: `translateY(${Math.max(0, $)}px)`,
296
+ transition: h ? "none" : "transform 0.3s ease-out, height 0.3s ease-out",
297
+ ...p
298
+ },
299
+ role: "dialog",
300
+ "aria-modal": "true",
301
+ "aria-label": r,
302
+ tabIndex: -1,
303
+ onTouchStart: i,
304
+ onTouchMove: n,
305
+ onTouchEnd: N,
306
+ children: [
307
+ v && /* @__PURE__ */ a("div", { className: "nice-bottom-sheet__handle", "aria-hidden": "true" }),
308
+ r && /* @__PURE__ */ a("div", { className: "nice-bottom-sheet__title", children: r }),
309
+ /* @__PURE__ */ a("div", { ref: c, className: "nice-bottom-sheet__content", children: m })
310
+ ]
311
+ }
312
+ )
313
+ ] }),
314
+ S
315
+ );
316
+ }, ae = ({
317
+ trigger: e,
318
+ children: o,
319
+ placement: m = "bottom",
320
+ triggerMode: r = "click",
321
+ open: v,
322
+ onOpenChange: l,
323
+ hoverDelay: s = 200,
324
+ offset: d = 8,
325
+ className: x,
326
+ showArrow: _ = !0
327
+ }) => {
328
+ const [k, M] = P(!1), y = E(null), p = E(null), u = E(null), c = O(), t = v !== void 0, g = t ? v : k, h = b(
329
+ (i) => {
330
+ t || M(i), l?.(i);
331
+ },
332
+ [t, l]
333
+ );
334
+ z(p, () => {
335
+ r !== "manual" && g && h(!1);
336
+ });
337
+ const H = b(() => {
338
+ r === "click" && h(!g);
339
+ }, [r, g, h]), D = b(() => {
340
+ r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!0), s));
341
+ }, [r, s, h]), L = b(() => {
342
+ r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!1), s));
343
+ }, [r, s, h]), [I, S] = P({ top: 0, left: 0 });
344
+ return Y(() => {
345
+ if (!g || !y.current || !p.current)
346
+ return;
347
+ const i = y.current.getBoundingClientRect(), n = p.current.getBoundingClientRect(), N = window.innerWidth, R = window.innerHeight;
348
+ let T = 0, $ = 0;
349
+ const [f, w = "center"] = m.split("-");
350
+ switch (f) {
351
+ case "top":
352
+ T = i.top - n.height - d, $ = i.left + (i.width - n.width) / 2;
353
+ break;
354
+ case "bottom":
355
+ T = i.bottom + d, $ = i.left + (i.width - n.width) / 2;
356
+ break;
357
+ case "left":
358
+ T = i.top + (i.height - n.height) / 2, $ = i.left - n.width - d;
359
+ break;
360
+ case "right":
361
+ T = i.top + (i.height - n.height) / 2, $ = i.right + d;
362
+ break;
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 - n.width - 8, $)), T = Math.max(8, Math.min(R - n.height - 8, T)), S({ top: T, left: $ });
365
+ }, [g, m, d]), /* @__PURE__ */ C(K, { children: [
366
+ /* @__PURE__ */ a(
367
+ "div",
368
+ {
369
+ ref: y,
370
+ className: "nice-popover__trigger",
371
+ onClick: H,
372
+ onMouseEnter: D,
373
+ onMouseLeave: L,
374
+ style: { display: "inline-block" },
375
+ children: e
376
+ }
377
+ ),
378
+ g && X(
379
+ /* @__PURE__ */ C(
380
+ "div",
381
+ {
382
+ ref: p,
383
+ className: `nice-popover nice-popover--${m} ${x || ""}`,
384
+ style: {
385
+ position: "fixed",
386
+ top: I.top,
387
+ left: I.left,
388
+ zIndex: 1100
389
+ },
390
+ onMouseEnter: D,
391
+ onMouseLeave: L,
392
+ role: "tooltip",
393
+ children: [
394
+ _ && /* @__PURE__ */ a("div", { className: "nice-popover__arrow" }),
395
+ /* @__PURE__ */ a("div", { className: "nice-popover__content", children: o })
396
+ ]
397
+ }
398
+ ),
399
+ c
400
+ )
401
+ ] });
402
+ }, ie = ({
403
+ items: e,
404
+ children: o,
405
+ onOpen: m,
406
+ onClose: r,
407
+ className: v
408
+ }) => {
409
+ const [l, s] = P(!1), [d, x] = P({ x: 0, y: 0 }), _ = E(null), k = E(null), M = O();
410
+ z(_, () => {
411
+ l && (s(!1), r?.());
412
+ });
413
+ const y = b(
414
+ (c) => {
415
+ c.preventDefault(), x({ x: c.clientX, y: c.clientY }), s(!0), m?.();
416
+ },
417
+ [m]
418
+ ), p = b(
419
+ (c) => {
420
+ !c.disabled && c.onClick && (c.onClick(), s(!1), r?.());
421
+ },
422
+ [r]
423
+ );
424
+ Y(() => {
425
+ if (!l)
426
+ return;
427
+ const c = (t) => {
428
+ t.key === "Escape" && (s(!1), r?.());
429
+ };
430
+ return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
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__ */ C(
433
+ "button",
434
+ {
435
+ type: "button",
436
+ className: `nice-context-menu__item ${t.disabled ? "nice-context-menu__item--disabled" : ""} ${t.danger ? "nice-context-menu__item--danger" : ""}`,
437
+ role: "menuitem",
438
+ disabled: t.disabled,
439
+ onClick: () => p(t),
440
+ children: [
441
+ t.icon && /* @__PURE__ */ a("span", { className: "nice-context-menu__icon", children: t.icon }),
442
+ /* @__PURE__ */ a("span", { className: "nice-context-menu__label", children: t.label })
443
+ ]
444
+ }
445
+ ) }, t.key)) });
446
+ return /* @__PURE__ */ C(K, { children: [
447
+ /* @__PURE__ */ a("div", { ref: k, onContextMenu: y, style: { display: "contents" }, children: o }),
448
+ l && X(
449
+ /* @__PURE__ */ a(
450
+ "div",
451
+ {
452
+ ref: _,
453
+ className: `nice-context-menu ${v || ""}`,
454
+ style: {
455
+ position: "fixed",
456
+ left: d.x,
457
+ top: d.y,
458
+ zIndex: 1200
459
+ },
460
+ role: "menu",
461
+ children: u(e)
462
+ }
463
+ ),
464
+ M
465
+ )
466
+ ] });
467
+ };
2
468
  export {
3
- i as NiceActionSheet,
4
- o as NiceBlockUI,
5
- s as NiceBottomSheet,
6
- c as NiceBox,
7
- N as NiceCommandPaletteProvider,
8
- r as NiceContextMenu,
9
- t as NiceDrawer,
10
- d as NiceLoadPanel,
11
- l as NiceModal,
12
- n as NiceModalBody,
13
- m as NiceModalFooter,
14
- v as NiceModalHeader,
15
- P as NiceOverlayPopover,
16
- u as NicePopover,
17
- M as NiceResizable,
18
- p as NiceResponsiveBox,
19
- B as NiceScrollView,
20
- w as NiceTutorial,
21
- x as NiceTutorialProvider,
22
- C as NiceWindow,
23
- g as NiceWindowManager,
24
- h as useCommandPalette,
25
- R as useRegisterCommands
469
+ se as NiceActionSheet,
470
+ de as NiceBlockUI,
471
+ oe as NiceBottomSheet,
472
+ ue as NiceBox,
473
+ he as NiceCommandPaletteProvider,
474
+ ie as NiceContextMenu,
475
+ re as NiceDrawer,
476
+ fe as NiceLoadPanel,
477
+ Z as NiceModal,
478
+ te as NiceModalBody,
479
+ ne as NiceModalFooter,
480
+ ee as NiceModalHeader,
481
+ ae as NiceOverlayPopover,
482
+ me as NicePopover,
483
+ ve as NiceResizable,
484
+ ge as NiceResponsiveBox,
485
+ we as NiceScrollView,
486
+ be as NiceTutorial,
487
+ ye as NiceTutorialProvider,
488
+ pe as NiceWindow,
489
+ Ne as NiceWindowManager,
490
+ _e as useCommandPalette,
491
+ ke as useRegisterCommands
26
492
  };