@nice2dev/ui 1.0.21 → 1.0.22

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 (90) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/dist/NiceErrorBoundary-B0262Ffc.js +770 -0
  3. package/dist/NiceErrorBoundary-BXOLv-zG.cjs +1 -0
  4. package/dist/NiceErrorBoundary-DsreAsON.cjs +1 -0
  5. package/dist/NiceErrorBoundary-HMfrXIir.js +770 -0
  6. package/dist/NiceForm-B7D1MASh.js +5383 -0
  7. package/dist/NiceForm-BA9zZdm8.cjs +382 -0
  8. package/dist/NiceForm-Ba9rvBoT.cjs +382 -0
  9. package/dist/NiceForm-DAGMJpgx.js +5383 -0
  10. package/dist/NiceModal-BVT9cZbf.cjs +1 -0
  11. package/dist/NiceModal-CiOYOWJy.cjs +1 -0
  12. package/dist/NiceModal-DZbHCdKq.js +95 -0
  13. package/dist/NiceModal-MeC1cNtW.js +95 -0
  14. package/dist/NiceModuleLifecyclePanel-BiX4KxaK.js +6781 -0
  15. package/dist/NiceModuleLifecyclePanel-CDo0iVfr.js +6781 -0
  16. package/dist/NiceModuleLifecyclePanel-DEJpoz5a.cjs +1 -0
  17. package/dist/NiceModuleLifecyclePanel-DrDTpH6K.cjs +1 -0
  18. package/dist/NiceModuleLifecyclePanel.css +1 -1
  19. package/dist/NicePagination-C8gx6Bcl.js +171 -0
  20. package/dist/NicePagination-CNxEAb4C.cjs +1 -0
  21. package/dist/NicePagination-Cg_WEf-R.cjs +1 -0
  22. package/dist/NicePagination-DQXdzx7W.js +171 -0
  23. package/dist/NicePinCodeInput-3WugpLHi.js +12240 -0
  24. package/dist/NicePinCodeInput-CSfRHs4v.cjs +419 -0
  25. package/dist/NicePinCodeInput-CjwFvOEQ.js +13092 -0
  26. package/dist/NicePinCodeInput-DoBQnMj9.cjs +694 -0
  27. package/dist/NiceSavedQueryPanel-DFDDuKWd.js +6597 -0
  28. package/dist/NiceSavedQueryPanel-DTU4eiIH.cjs +596 -0
  29. package/dist/NiceSavedQueryPanel-qtWETcRP.cjs +596 -0
  30. package/dist/NiceSavedQueryPanel-z29D7N_A.js +6584 -0
  31. package/dist/NiceTabs-B4dM77y_.js +1657 -0
  32. package/dist/NiceTabs-BTVTtRZR.cjs +1 -0
  33. package/dist/NiceTabs-BXGmot7J.cjs +1 -0
  34. package/dist/NiceTabs-DJdhKste.js +1657 -0
  35. package/dist/NiceWindow-Cs6-Dbci.js +1592 -0
  36. package/dist/NiceWindow-DYw4NCeb.js +1592 -0
  37. package/dist/NiceWindow-O_g8StvA.cjs +1 -0
  38. package/dist/NiceWindow-a4wB_m30.cjs +1 -0
  39. package/dist/NiceWindow.css +1 -0
  40. package/dist/charts-BDr6B81L.js +4657 -0
  41. package/dist/charts-Ci_KrAoU.cjs +761 -0
  42. package/dist/charts-ClxW-i5q.js +4657 -0
  43. package/dist/charts-Dr_FIPZT.cjs +761 -0
  44. package/dist/charts.cjs +1 -1
  45. package/dist/charts.mjs +1 -1
  46. package/dist/core-BIz6zQ5u.cjs +122 -0
  47. package/dist/core-BYxnKGOi.js +23141 -0
  48. package/dist/core-Cjw8oBvC.cjs +96 -0
  49. package/dist/core-xcuNJ-DB.js +24948 -0
  50. package/dist/data-branching-Byz79mmA.cjs +1 -0
  51. package/dist/data-branching-DjuerHfS.js +6133 -0
  52. package/dist/data-branching.cjs +1 -1
  53. package/dist/data-branching.d.ts +3 -0
  54. package/dist/data-branching.mjs +1 -1
  55. package/dist/data.cjs +1 -1
  56. package/dist/data.d.ts +10 -7
  57. package/dist/data.mjs +1 -1
  58. package/dist/devops-DYFov8j3.js +7684 -0
  59. package/dist/devops-g4qcLXah.cjs +17 -0
  60. package/dist/devops.cjs +1 -1
  61. package/dist/devops.d.ts +5 -0
  62. package/dist/devops.mjs +1 -1
  63. package/dist/editors.cjs +1 -1
  64. package/dist/editors.d.ts +172 -1
  65. package/dist/editors.mjs +44 -41
  66. package/dist/feedback.cjs +1 -1
  67. package/dist/feedback.d.ts +1 -2
  68. package/dist/feedback.mjs +2 -2
  69. package/dist/index-AEO3cK4T.cjs +5194 -0
  70. package/dist/index-BMQ-F0zE.js +65054 -0
  71. package/dist/index-BNb9q4Ll.cjs +5490 -0
  72. package/dist/index-CjdfogVa.js +66711 -0
  73. package/dist/index.cjs +1 -1
  74. package/dist/index.d.ts +504 -25
  75. package/dist/index.mjs +979 -963
  76. package/dist/lazy.cjs +1 -1
  77. package/dist/lazy.d.ts +11 -0
  78. package/dist/lazy.mjs +24 -24
  79. package/dist/navigation.cjs +1 -1
  80. package/dist/navigation.mjs +34 -34
  81. package/dist/no-code-Dl3ima61.cjs +332 -0
  82. package/dist/no-code-ktRzFaET.js +7133 -0
  83. package/dist/no-code.cjs +1 -1
  84. package/dist/no-code.d.ts +11 -0
  85. package/dist/no-code.mjs +1 -1
  86. package/dist/overlays.cjs +1 -1
  87. package/dist/overlays.d.ts +38 -0
  88. package/dist/overlays.mjs +48 -48
  89. package/dist/style.css +5 -2
  90. package/package.json +1 -1
package/dist/no-code.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./no-code-Bb3QFKdm.cjs");exports.NiceAPIFlow=e.NiceAPIFlow;exports.NiceCodePreview=e.NiceCodePreview;exports.NiceCodeTemplate=e.NiceCodeTemplate;exports.NiceComponentDesigner=e.NiceComponentDesigner;exports.NiceDataMapper=e.NiceDataMapper;exports.NiceEventOrchestrator=e.NiceEventOrchestrator;exports.NiceLowCodeStudio=e.NiceLowCodeStudio;exports.NicePageBuilder=e.NicePageBuilder;exports.NiceStateDesigner=e.NiceStateDesigner;exports.NiceTestBuilder=e.NiceTestBuilder;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./no-code-Dl3ima61.cjs");exports.NiceAPIFlow=e.NiceAPIFlow;exports.NiceCodePreview=e.NiceCodePreview;exports.NiceCodeTemplate=e.NiceCodeTemplate;exports.NiceComponentDesigner=e.NiceComponentDesigner;exports.NiceDataMapper=e.NiceDataMapper;exports.NiceEventOrchestrator=e.NiceEventOrchestrator;exports.NiceLowCodeStudio=e.NiceLowCodeStudio;exports.NicePageBuilder=e.NicePageBuilder;exports.NiceStateDesigner=e.NiceStateDesigner;exports.NiceTestBuilder=e.NiceTestBuilder;
package/dist/no-code.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { NiceBaseProps } from '@nice2dev/ui-core';
3
+ import { NiceComponentTutorial } from '@nice2dev/ui-core';
3
4
 
4
5
  declare interface ActionParam {
5
6
  id: string;
@@ -447,6 +448,8 @@ export declare interface NiceComponentDesignerProps {
447
448
  theme?: 'light' | 'dark';
448
449
  /** Additional class name */
449
450
  className?: string;
451
+ /** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
452
+ tutorial?: NiceComponentTutorial;
450
453
  }
451
454
 
452
455
  export declare const NiceDataMapper: default_2.FC<NiceDataMapperProps>;
@@ -503,6 +506,8 @@ export declare interface NiceLowCodeStudioProps {
503
506
  onSave?: (design: DesignState) => void;
504
507
  /** Additional class name */
505
508
  className?: string;
509
+ /** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
510
+ tutorial?: NiceComponentTutorial;
506
511
  }
507
512
 
508
513
  /**
@@ -533,6 +538,8 @@ export declare interface NicePageBuilderProps {
533
538
  previewMode?: 'desktop' | 'tablet' | 'mobile';
534
539
  /** Additional class name */
535
540
  className?: string;
541
+ /** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
542
+ tutorial?: NiceComponentTutorial;
536
543
  }
537
544
 
538
545
  export declare const NiceStateDesigner: default_2.FC<NiceStateDesignerProps>;
@@ -545,6 +552,8 @@ export declare interface NiceStateDesignerProps extends NiceBaseProps {
545
552
  onStoreChange?: (store: StoreDefinition) => void;
546
553
  onExport?: (code: string, format: ExportFormat) => void;
547
554
  onSave?: (store: StoreDefinition) => void;
555
+ /** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
556
+ tutorial?: NiceComponentTutorial;
548
557
  }
549
558
 
550
559
  export declare const NiceTestBuilder: default_2.FC<NiceTestBuilderProps>;
@@ -560,6 +569,8 @@ export declare interface NiceTestBuilderProps extends NiceBaseProps {
560
569
  onExport?: (code: string) => void;
561
570
  onRun?: (suiteId: string) => void;
562
571
  onRunAll?: () => void;
572
+ /** Optional "?" guided tour. Off by default; `true` uses the built-in tour. */
573
+ tutorial?: NiceComponentTutorial;
563
574
  }
564
575
 
565
576
  declare interface PageLayout {
package/dist/no-code.mjs CHANGED
@@ -1,4 +1,4 @@
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-snLY0d6I.js";
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-ktRzFaET.js";
2
2
  export {
3
3
  i as NiceAPIFlow,
4
4
  s as NiceCodePreview,
package/dist/overlays.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./NiceWindow-fcTJOlYf.cjs"),r=require("react/jsx-runtime"),M=require("./core-D0ElqRZA.cjs"),e=require("react"),B=require("react-dom");function Y(){const t=e.useContext(M.lr);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const H=({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:P})=>{const w=e.useRef(null);M.Ps(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:P,tabIndex:-1,children:v})}),y)},W=({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}),q=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__footer ${s||""}`,children:t}),K=({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:P})=>{const w=e.useRef(null),[y,f]=e.useState(!1),[i,n]=e.useState(0);M.Ps(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 $=!1;switch(a){case"left":$=o.deltaX<-100;break;case"right":$=o.deltaX>100;break;case"top":$=o.deltaY<-100;break;case"bottom":$=o.deltaY>100;break}$&&(M.Xr("light"),s()),n(0),f(!1)},[a,s]),{ref:C}=M.ac({enabled:j&&t,onPanStart:()=>f(!0),onPan:h,onPanEnd:D}),E=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:E}),r.jsx("div",{ref:o=>{w.current=o,C.current=o},className:`nice-drawer nice-drawer--${a} ${t?"nice-drawer--open":""} ${p||""}`,style:{...L,zIndex:_+1,transform:c(),transition:y?"none":void 0,...P},role:"dialog","aria-modal":"true","aria-label":l,tabIndex:-1,children:v})]}),x)},F=({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:P=1e3,className:w,style:y})=>{const f=e.useRef(null),i=e.useRef(null),[n,x]=e.useState(d),[h,D]=e.useState(!1),[C,E]=e.useState(0),S=e.useRef(0);e.useEffect(()=>{t&&(x(d),E(0))},[t,d]),M.Ps(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,X=!I||I.scrollTop<=0;!b&&!X||(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)&&E(b)},[h,n,l.length]),k=e.useCallback(()=>{if(!h)return;const m=window.innerHeight;l[n]*m;const b=-C,I=m*.15;b>I&&u&&n<l.length-1?(x(n+1),p&&M.Xr("selection")):b<-I&&(n>0?(x(n-1),p&&M.Xr("selection")):(p&&M.Xr("light"),s())),D(!1),E(0)},[h,C,n,l,u,p,s]),$=e.useCallback(()=>{j&&s()},[j,s]);if(!t)return null;const R=l[n]*100,T=h?C: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:P},onClick:$}),r.jsxs("div",{ref:f,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${w||""}`,style:{zIndex:P+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)},z=({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,P]=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||P(c),l?.(c)},[n,l]);M.$s(y,()=>{a!=="manual"&&x&&h(!1)});const D=e.useCallback(()=>{a==="click"&&h(!x)},[a,x,h]),C=e.useCallback(()=>{a==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!0),d))},[a,d,h]),E=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,$=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($-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:C,onMouseLeave:E,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:C,onMouseLeave:E,role:"tooltip",children:[_&&r.jsx("div",{className:"nice-popover__arrow"}),r.jsx("div",{className:"nice-popover__content",children:s})]}),i)]})},A=({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),P=Y();M.$s(_,()=>{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)}),P)]})};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=F;exports.NiceContextMenu=A;exports.NiceDrawer=K;exports.NiceModal=H;exports.NiceModalBody=O;exports.NiceModalFooter=q;exports.NiceModalHeader=W;exports.NiceOverlayPopover=z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./NiceWindow-O_g8StvA.cjs"),r=require("react/jsx-runtime"),M=require("./core-BIz6zQ5u.cjs"),e=require("react"),B=require("react-dom");function Y(){const t=e.useContext(M.fr);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const H=({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.Ws(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)},O=({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"})})})]}),X=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__body ${s||""}`,children:t}),q=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__footer ${s||""}`,children:t}),K=({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.Ws(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.jr("light"),s()),n(0),f(!1)},[a,s]),{ref:P}=M.sc({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)},F=({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.Ws(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,W=!I||I.scrollTop<=0;!b&&!W||(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.jr("selection")):b<-I&&(n>0?(x(n-1),p&&M.jr("selection")):(p&&M.jr("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)},z=({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.Os(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)]})},A=({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.Os(_,()=>{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=F;exports.NiceContextMenu=A;exports.NiceDrawer=K;exports.NiceModal=H;exports.NiceModalBody=X;exports.NiceModalFooter=q;exports.NiceModalHeader=O;exports.NiceOverlayPopover=z;
@@ -421,6 +421,14 @@ export declare interface NiceTutorialProps {
421
421
  finish?: string;
422
422
  skip?: string;
423
423
  stepOf?: string;
424
+ /** Play autoplay button (default "Play"). */
425
+ play?: string;
426
+ /** Pause autoplay button (default "Pause"). */
427
+ pause?: string;
428
+ /** Aria-label for the speed slider (default "Speed"). */
429
+ speed?: string;
430
+ /** Aria-label / tooltip for the tooltip close icon (default "Close"). */
431
+ close?: string;
424
432
  };
425
433
  /** Animation duration in ms (default 300) */
426
434
  animationDuration?: number;
@@ -428,6 +436,36 @@ export declare interface NiceTutorialProps {
428
436
  overlayOpacity?: number;
429
437
  /** Z-index for the overlay (default 10000) */
430
438
  zIndex?: number;
439
+ /**
440
+ * Where the control buttons (skip / prev / next / play) sit.
441
+ * - `'floating-bottom'` (default): fixed strip at bottom-center of the
442
+ * viewport. The buttons never move between steps and never overlap with
443
+ * the tooltip body.
444
+ * - `'inline'`: inside the tooltip footer (legacy behaviour — buttons
445
+ * re-position with each step).
446
+ */
447
+ buttonsPlacement?: 'floating-bottom' | 'inline';
448
+ /**
449
+ * How control buttons render.
450
+ * - `'icon'` (default): round icon-only buttons.
451
+ * - `'icon-text'`: icon with the label next to it.
452
+ * - `'text'`: text label only (legacy).
453
+ */
454
+ buttonsDisplay?: 'icon' | 'icon-text' | 'text';
455
+ /**
456
+ * Show the PLAY/PAUSE button + progress bar + speed slider. Default `true`.
457
+ * Disable to hide all autoplay controls.
458
+ */
459
+ showAutoplay?: boolean;
460
+ /** Initial autoplay interval in ms-per-step. Default `5000`. */
461
+ autoplayInterval?: number;
462
+ /** Min/max range for the speed slider in ms-per-step. Defaults `{ min: 2000, max: 15000 }`. */
463
+ autoplaySpeedRange?: {
464
+ min: number;
465
+ max: number;
466
+ };
467
+ /** Called whenever autoplay state changes. */
468
+ onAutoplayChange?: (playing: boolean) => void;
431
469
  }
432
470
 
433
471
  export declare const NiceTutorialProvider: default_2.FC<NiceTutorialProviderProps>;
package/dist/overlays.mjs CHANGED
@@ -1,9 +1,9 @@
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-C677O__r.js";
2
- import { jsxs as H, Fragment as O, jsx as a } from "react/jsx-runtime";
3
- import { P as j, X as K, a as z, b as U, l as V } from "./core-BFu5opn6.js";
4
- import { useRef as E, useState as P, useEffect as Y, useCallback as b, useContext as q } from "react";
5
- import { createPortal as C } from "react-dom";
6
- function W() {
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-DYw4NCeb.js";
2
+ import { jsxs as H, Fragment as j, jsx as a } from "react/jsx-runtime";
3
+ import { W as K, j as X, O as z, s as U, f as V } from "./core-xcuNJ-DB.js";
4
+ import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as q } from "react";
5
+ import { createPortal as W } from "react-dom";
6
+ function O() {
7
7
  const e = q(V);
8
8
  return e?.portalTarget ? e.portalTarget : typeof document < "u" ? document.body : null;
9
9
  }
@@ -22,8 +22,8 @@ const F = ({
22
22
  style: M
23
23
  }) => {
24
24
  const y = E(null);
25
- j(y, e && !d);
26
- const p = W();
25
+ K(y, e && !d);
26
+ const p = O();
27
27
  Y(() => {
28
28
  if (!x && e) {
29
29
  const t = document.body.style.overflow;
@@ -54,7 +54,7 @@ const F = ({
54
54
  xl: "nice-modal--xl",
55
55
  full: "nice-modal--full"
56
56
  }[v];
57
- return C(
57
+ return W(
58
58
  /* @__PURE__ */ a(
59
59
  "div",
60
60
  {
@@ -112,9 +112,9 @@ const F = ({
112
112
  className: k,
113
113
  style: M
114
114
  }) => {
115
- const y = E(null), [p, u] = P(!1), [c, t] = P(0);
116
- j(y, e);
117
- const g = W();
115
+ const y = E(null), [p, u] = D(!1), [c, t] = D(0);
116
+ K(y, e);
117
+ const g = O();
118
118
  Y(() => {
119
119
  if (!d || !e)
120
120
  return;
@@ -160,15 +160,15 @@ const F = ({
160
160
  R = n.deltaY > 100;
161
161
  break;
162
162
  }
163
- R && (K("light"), o()), t(0), u(!1);
163
+ R && (X("light"), o()), t(0), u(!1);
164
164
  },
165
165
  [r, o]
166
- ), { ref: D } = U({
166
+ ), { ref: L } = U({
167
167
  enabled: x && e,
168
168
  onPanStart: () => u(!0),
169
169
  onPan: h,
170
170
  onPanEnd: S
171
- }), L = b(
171
+ }), P = b(
172
172
  (n) => {
173
173
  s && n.target === n.currentTarget && o();
174
174
  },
@@ -176,29 +176,29 @@ const F = ({
176
176
  );
177
177
  if (!e)
178
178
  return null;
179
- const I = r === "left" || r === "right", X = I ? { width: typeof v == "number" ? `${v}px` : v } : { height: typeof v == "number" ? `${v}px` : v }, i = () => {
179
+ const I = r === "left" || r === "right", B = 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 C(
184
- /* @__PURE__ */ H(O, { children: [
183
+ return W(
184
+ /* @__PURE__ */ H(j, { children: [
185
185
  /* @__PURE__ */ a(
186
186
  "div",
187
187
  {
188
188
  className: `nice-drawer__overlay ${e ? "nice-drawer__overlay--visible" : ""}`,
189
189
  style: { zIndex: N },
190
- onClick: L
190
+ onClick: P
191
191
  }
192
192
  ),
193
193
  /* @__PURE__ */ a(
194
194
  "div",
195
195
  {
196
196
  ref: (n) => {
197
- y.current = n, D.current = n;
197
+ y.current = n, L.current = n;
198
198
  },
199
199
  className: `nice-drawer nice-drawer--${r} ${e ? "nice-drawer--open" : ""} ${k || ""}`,
200
200
  style: {
201
- ...X,
201
+ ...B,
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] = P(s), [h, S] = P(!1), [D, L] = P(0), I = E(0);
233
+ const u = E(null), c = E(null), [t, g] = D(s), [h, S] = D(!1), [L, P] = D(0), I = E(0);
234
234
  Y(() => {
235
- e && (g(s), L(0));
236
- }, [e, s]), j(u, e);
237
- const X = W();
235
+ e && (g(s), P(0));
236
+ }, [e, s]), K(u, e);
237
+ const B = O();
238
238
  Y(() => {
239
239
  if (!N || !e)
240
240
  return;
@@ -251,14 +251,14 @@ 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, A = !B || B.scrollTop <= 0;
254
+ const w = f.target.closest(".nice-bottom-sheet__handle"), C = c.current, A = !C || C.scrollTop <= 0;
255
255
  !w && !A || (S(!0), I.current = f.touches[0].clientY);
256
256
  }, []), n = b(
257
257
  (f) => {
258
258
  if (!h)
259
259
  return;
260
260
  const w = f.touches[0].clientY - I.current;
261
- (w > 0 || t < l.length - 1) && L(w);
261
+ (w > 0 || t < l.length - 1) && P(w);
262
262
  },
263
263
  [h, t, l.length]
264
264
  ), _ = b(() => {
@@ -266,16 +266,16 @@ const F = ({
266
266
  return;
267
267
  const f = window.innerHeight;
268
268
  l[t] * f;
269
- const w = -D, 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())), S(!1), L(0);
271
- }, [h, D, t, l, d, k, o]), R = b(() => {
269
+ const w = -L, C = f * 0.15;
270
+ w > C && d && t < l.length - 1 ? (g(t + 1), k && X("selection")) : w < -C && (t > 0 ? (g(t - 1), k && X("selection")) : (k && X("light"), o())), S(!1), P(0);
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
- const T = l[t] * 100, $ = h ? D : 0;
277
- return C(
278
- /* @__PURE__ */ H(O, { children: [
276
+ const T = l[t] * 100, $ = h ? L : 0;
277
+ return W(
278
+ /* @__PURE__ */ H(j, { children: [
279
279
  /* @__PURE__ */ a(
280
280
  "div",
281
281
  {
@@ -311,7 +311,7 @@ const F = ({
311
311
  }
312
312
  )
313
313
  ] }),
314
- X
314
+ B
315
315
  );
316
316
  }, ae = ({
317
317
  trigger: e,
@@ -325,7 +325,7 @@ const F = ({
325
325
  className: x,
326
326
  showArrow: N = !0
327
327
  }) => {
328
- const [k, M] = P(!1), y = E(null), p = E(null), u = E(null), c = W(), t = v !== void 0, g = t ? v : k, h = b(
328
+ const [k, M] = D(!1), y = E(null), p = E(null), u = E(null), c = O(), t = v !== void 0, g = t ? v : k, h = b(
329
329
  (i) => {
330
330
  t || M(i), l?.(i);
331
331
  },
@@ -336,11 +336,11 @@ const F = ({
336
336
  });
337
337
  const S = b(() => {
338
338
  r === "click" && h(!g);
339
- }, [r, g, h]), D = b(() => {
339
+ }, [r, g, h]), L = b(() => {
340
340
  r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!0), s));
341
- }, [r, s, h]), L = b(() => {
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, X] = P({ top: 0, left: 0 });
343
+ }, [r, s, h]), [I, B] = D({ top: 0, left: 0 });
344
344
  return Y(() => {
345
345
  if (!g || !y.current || !p.current)
346
346
  return;
@@ -361,21 +361,21 @@ 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)), X({ top: T, left: $ });
365
- }, [g, m, d]), /* @__PURE__ */ H(O, { children: [
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)), B({ top: T, left: $ });
365
+ }, [g, m, d]), /* @__PURE__ */ H(j, { children: [
366
366
  /* @__PURE__ */ a(
367
367
  "div",
368
368
  {
369
369
  ref: y,
370
370
  className: "nice-popover__trigger",
371
371
  onClick: S,
372
- onMouseEnter: D,
373
- onMouseLeave: L,
372
+ onMouseEnter: L,
373
+ onMouseLeave: P,
374
374
  style: { display: "inline-block" },
375
375
  children: e
376
376
  }
377
377
  ),
378
- g && C(
378
+ g && W(
379
379
  /* @__PURE__ */ H(
380
380
  "div",
381
381
  {
@@ -387,8 +387,8 @@ const F = ({
387
387
  left: I.left,
388
388
  zIndex: 1100
389
389
  },
390
- onMouseEnter: D,
391
- onMouseLeave: L,
390
+ onMouseEnter: L,
391
+ onMouseLeave: P,
392
392
  role: "tooltip",
393
393
  children: [
394
394
  N && /* @__PURE__ */ a("div", { className: "nice-popover__arrow" }),
@@ -406,7 +406,7 @@ const F = ({
406
406
  onClose: r,
407
407
  className: v
408
408
  }) => {
409
- const [l, s] = P(!1), [d, x] = P({ x: 0, y: 0 }), N = E(null), k = E(null), M = W();
409
+ const [l, s] = D(!1), [d, x] = D({ x: 0, y: 0 }), N = E(null), k = E(null), M = O();
410
410
  z(N, () => {
411
411
  l && (s(!1), r?.());
412
412
  });
@@ -443,9 +443,9 @@ const F = ({
443
443
  ]
444
444
  }
445
445
  ) }, t.key)) });
446
- return /* @__PURE__ */ H(O, { children: [
446
+ return /* @__PURE__ */ H(j, { children: [
447
447
  /* @__PURE__ */ a("div", { ref: k, onContextMenu: y, style: { display: "contents" }, children: o }),
448
- l && C(
448
+ l && W(
449
449
  /* @__PURE__ */ a(
450
450
  "div",
451
451
  {