@nice2dev/ui 1.0.30 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +495 -0
- package/README.md +30 -31
- package/dist/NiceCalendarScheduler.doc-BEtQkZjV.cjs +9 -0
- package/dist/NiceCalendarScheduler.doc-D__LRgOx.js +33 -0
- package/dist/NiceConfirmDialog-B57cl_F7.cjs +1 -0
- package/dist/NiceConfirmDialog-N9fBTLYm.js +81 -0
- package/dist/NiceDrawingCanvas.doc-Dv5vB4gY.js +32 -0
- package/dist/NiceDrawingCanvas.doc-Ww9zz17x.cjs +8 -0
- package/dist/NiceErrorBoundary-BD-uqk_q.js +709 -0
- package/dist/NiceErrorBoundary-CIPXaYik.cjs +1 -0
- package/dist/NiceFileManagerViews.doc-CKlnm6cX.cjs +1 -0
- package/dist/NiceFileManagerViews.doc-Cg21DArG.js +25 -0
- package/dist/NiceForm-BNZB31Pg.js +4499 -0
- package/dist/NiceForm-CPyAXxBO.cjs +1 -0
- package/dist/NiceMegaMenu.doc-7UyOCd3l.cjs +7 -0
- package/dist/NiceMegaMenu.doc-zeIyVa65.js +31 -0
- package/dist/NiceModal-Bj53SKLI.js +95 -0
- package/dist/NiceModal-DC0UlQhc.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-BBOg9g0b.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-DtuXRiLR.js +6991 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-Bjxy9aEc.js +172 -0
- package/dist/NicePagination-CfFfNwrg.cjs +1 -0
- package/dist/NiceSavedQueryPanel-CH5c3rUG.js +6988 -0
- package/dist/NiceSavedQueryPanel-aQrEmmcC.cjs +596 -0
- package/dist/NiceScannerControl-Cd5KXJA9.js +12769 -0
- package/dist/NiceScannerControl-DZsERSw_.cjs +698 -0
- package/dist/NiceScannerControl.css +1 -0
- package/dist/NiceWindow-BoDzlGk-.js +1621 -0
- package/dist/NiceWindow-DgONWxBm.cjs +1 -0
- package/dist/charts-Bs0aDM0X.js +4671 -0
- package/dist/charts-DjjKkw0q.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-BUsZ7_vI.js +27914 -0
- package/dist/core-CLfcCDKc.cjs +122 -0
- package/dist/data-branching-D7l_kILW.cjs +1 -0
- package/dist/data-branching-lJ07lDN-.js +6255 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +41 -37
- package/dist/data.mjs +18 -19
- package/dist/devops-Bi8MXtko.js +8165 -0
- package/dist/devops-On_1wRf9.cjs +17 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +215 -431
- package/dist/editors.mjs +48 -56
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +3 -3
- package/dist/index-BDH1yDSg.js +69235 -0
- package/dist/index-C9njkNOD.cjs +5470 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +441 -916
- package/dist/index.mjs +908 -933
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +25 -213
- package/dist/navigation.mjs +105 -113
- package/dist/no-code-8lO7o6xi.js +7425 -0
- package/dist/no-code-K8tOLNew.cjs +332 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.d.ts +8 -0
- package/dist/overlays.mjs +36 -36
- package/dist/pickerCommons-CORo9j2a.js +2119 -0
- package/dist/pickerCommons-D3WShRrR.cjs +1 -0
- package/dist/style.css +5 -5
- package/package.json +3 -3
package/dist/no-code.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./no-code-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./no-code-K8tOLNew.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.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-
|
|
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-8lO7o6xi.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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./NiceWindow-DgONWxBm.cjs"),r=require("react/jsx-runtime"),M=require("./core-CLfcCDKc.cjs"),e=require("react"),B=require("react-dom");function Y(){const t=e.useContext(M.Er);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const W=({open:t,onClose:c,children:v,title:o,size:x="md",closeOnBackdropClick:l=!0,closeOnEscape:d=!0,disableFocusTrap:u=!1,disableBodyScroll:j=!0,zIndex:_=1e3,className:p,style:E})=>{const w=e.useRef(null);M.xc(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=g=>{g.key==="Escape"&&(g.preventDefault(),c())};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[d,t,c]);const f=e.useCallback(n=>{l&&n.target===n.currentTarget&&c()},[l,c]);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"}[x];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 ${s} ${p||""}`,role:"dialog","aria-modal":"true","aria-label":o,style:E,tabIndex:-1,children:v})}),y)},O=({children:t,showClose:c=!0,onClose:v,className:o})=>r.jsxs("div",{className:`nice-modal__header ${o||""}`,children:[r.jsx("div",{className:"nice-modal__title",children:t}),c&&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:c})=>r.jsx("div",{className:`nice-modal__body ${c||""}`,children:t}),q=({children:t,className:c})=>r.jsx("div",{className:`nice-modal__footer ${c||""}`,children:t}),K=({open:t,onClose:c,children:v,position:o="right",size:x=320,title:l,closeOnBackdropClick:d=!0,closeOnEscape:u=!0,swipeToClose:j=!0,zIndex:_=1e3,className:p,style:E})=>{const w=e.useRef(null),[y,f]=e.useState(!1),[s,n]=e.useState(0);M.xc(w,t);const g=Y();e.useEffect(()=>{if(!u||!t)return;const a=k=>{k.key==="Escape"&&(k.preventDefault(),c())};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[u,t,c]);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 C=!1;switch(o){case"left":C=a.deltaX<-100;break;case"right":C=a.deltaX>100;break;case"top":C=a.deltaY<-100;break;case"bottom":C=a.deltaY>100;break}C&&(M.ua("light"),c()),n(0),f(!1)},[o,c]),{ref:P}=M.Wc({enabled:j&&t,onPanStart:()=>f(!0),onPan:h,onPanEnd:D}),S=e.useCallback(a=>{d&&a.target===a.currentTarget&&c()},[d,c]);if(!t)return null;const $=o==="left"||o==="right",L=$?{width:typeof x=="number"?`${x}px`:x}:{height:typeof x=="number"?`${x}px`:x},i=()=>{if(y)return $?`translateX(${s}px)`:`translateY(${s}px)`};return B.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-drawer__overlay ${t?"nice-drawer__overlay--visible":""}`,style:{zIndex:_},onClick:S}),r.jsx("div",{ref:a=>{w.current=a,P.current=a},className:`nice-drawer nice-drawer--${o} ${t?"nice-drawer--open":""} ${p||""}`,style:{...L,zIndex:_+1,transform:i(),transition:y?"none":void 0,...E},role:"dialog","aria-modal":"true","aria-label":l,tabIndex:-1,children:v})]}),g)},F=({open:t,onClose:c,children:v,title:o,showHandle:x=!0,snapPoints:l=[.5,.9],initialSnap:d=0,expandable:u=!0,closeOnBackdropClick:j=!0,closeOnEscape:_=!0,hapticFeedback:p=!0,zIndex:E=1e3,className:w,style:y})=>{const f=e.useRef(null),s=e.useRef(null),[n,g]=e.useState(d),[h,D]=e.useState(!1),[P,S]=e.useState(0),$=e.useRef(0);e.useEffect(()=>{t&&(g(d),S(0))},[t,d]),M.xc(f,t);const L=Y();e.useEffect(()=>{if(!_||!t)return;const m=b=>{b.key==="Escape"&&(b.preventDefault(),c())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[_,t,c]),e.useEffect(()=>{if(t){const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}}},[t]);const i=e.useCallback(m=>{const b=m.target.closest(".nice-bottom-sheet__handle"),I=s.current,H=!I||I.scrollTop<=0;!b&&!H||(D(!0),$.current=m.touches[0].clientY)},[]),a=e.useCallback(m=>{if(!h)return;const b=m.touches[0].clientY-$.current;(b>0||n<l.length-1)&&S(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?(g(n+1),p&&M.ua("selection")):b<-I&&(n>0?(g(n-1),p&&M.ua("selection")):(p&&M.ua("light"),c())),D(!1),S(0)},[h,P,n,l,u,p,c]),C=e.useCallback(()=>{j&&c()},[j,c]);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:E},onClick:C}),r.jsxs("div",{ref:f,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${w||""}`,style:{zIndex:E+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":o,tabIndex:-1,onTouchStart:i,onTouchMove:a,onTouchEnd:k,children:[x&&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:c,placement:v="bottom",triggerMode:o="click",open:x,onOpenChange:l,hoverDelay:d=200,offset:u=8,className:j,showArrow:_=!0})=>{const[p,E]=e.useState(!1),w=e.useRef(null),y=e.useRef(null),f=e.useRef(null),s=Y(),n=x!==void 0,g=n?x:p,h=e.useCallback(i=>{n||E(i),l?.(i)},[n,l]);M.Sc(y,()=>{o!=="manual"&&g&&h(!1)});const D=e.useCallback(()=>{o==="click"&&h(!g)},[o,g,h]),P=e.useCallback(()=>{o==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!0),d))},[o,d,h]),S=e.useCallback(()=>{o==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!1),d))},[o,d,h]),[$,L]=e.useState({top:0,left:0});return e.useEffect(()=>{if(!g||!w.current||!y.current)return;const i=w.current.getBoundingClientRect(),a=y.current.getBoundingClientRect(),k=window.innerWidth,C=window.innerHeight;let R=0,T=0;const[m,b="center"]=v.split("-");switch(m){case"top":R=i.top-a.height-u,T=i.left+(i.width-a.width)/2;break;case"bottom":R=i.bottom+u,T=i.left+(i.width-a.width)/2;break;case"left":R=i.top+(i.height-a.height)/2,T=i.left-a.width-u;break;case"right":R=i.top+(i.height-a.height)/2,T=i.right+u;break}m==="top"||m==="bottom"?(b==="start"&&(T=i.left),b==="end"&&(T=i.right-a.width)):(b==="start"&&(R=i.top),b==="end"&&(R=i.bottom-a.height)),T=Math.max(8,Math.min(k-a.width-8,T)),R=Math.max(8,Math.min(C-a.height-8,R)),L({top:R,left:T})},[g,v,u]),r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,className:"nice-popover__trigger",onClick:D,onMouseEnter:P,onMouseLeave:S,style:{display:"inline-block"},children:t}),g&&B.createPortal(r.jsxs("div",{ref:y,className:`nice-popover nice-popover--${v} ${j||""}`,style:{position:"fixed",top:$.top,left:$.left,zIndex:1100},onMouseEnter:P,onMouseLeave:S,role:"tooltip",children:[_&&r.jsx("div",{className:"nice-popover__arrow"}),r.jsx("div",{className:"nice-popover__content",children:c})]}),s)]})},A=({items:t,children:c,onOpen:v,onClose:o,className:x})=>{const[l,d]=e.useState(!1),[u,j]=e.useState({x:0,y:0}),_=e.useRef(null),p=e.useRef(null),E=Y();M.Sc(_,()=>{l&&(d(!1),o?.())});const w=e.useCallback(s=>{s.preventDefault(),j({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:p,onContextMenu:w,style:{display:"contents"},children:c}),l&&B.createPortal(r.jsx("div",{ref:_,className:`nice-context-menu ${x||""}`,style:{position:"fixed",left:u.x,top:u.y,zIndex:1200},role:"menu",children:f(t)}),E)]})};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=W;exports.NiceModalBody=X;exports.NiceModalFooter=q;exports.NiceModalHeader=O;exports.NiceOverlayPopover=z;
|
package/dist/overlays.d.ts
CHANGED
|
@@ -35,6 +35,14 @@ export declare interface NiceActionSheetProps extends NiceBaseProps {
|
|
|
35
35
|
showCancelButton?: boolean;
|
|
36
36
|
/** Cancel button text. */
|
|
37
37
|
cancelText?: string;
|
|
38
|
+
/** Sheet size (xs..xl) — scales the max-width + item font. */
|
|
39
|
+
size?: NiceSize;
|
|
40
|
+
/** Disabled: dims the sheet + blocks every action. */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** Loading: a spinner overlay + aria-busy; actions blocked. */
|
|
43
|
+
loading?: boolean;
|
|
44
|
+
/** Error message shown at the top of the sheet. */
|
|
45
|
+
error?: string;
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
export declare const NiceBlockUI: default_2.ForwardRefExoticComponent<NiceBlockUIProps & default_2.RefAttributes<HTMLDivElement>>;
|
package/dist/overlays.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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
|
|
2
|
-
import { jsxs as S, Fragment as
|
|
3
|
-
import {
|
|
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 xe } from "./NiceWindow-BoDzlGk-.js";
|
|
2
|
+
import { jsxs as S, Fragment as O, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { x as j, u as K, S as z, W as U, E as V } from "./core-BUsZ7_vI.js";
|
|
4
4
|
import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as q } from "react";
|
|
5
|
-
import { createPortal as
|
|
5
|
+
import { createPortal as W } from "react-dom";
|
|
6
6
|
function X() {
|
|
7
7
|
const e = q(V);
|
|
8
8
|
return e?.portalTarget ? e.portalTarget : typeof document < "u" ? document.body : null;
|
|
@@ -16,22 +16,22 @@ const F = ({
|
|
|
16
16
|
closeOnBackdropClick: l = !0,
|
|
17
17
|
closeOnEscape: s = !0,
|
|
18
18
|
disableFocusTrap: d = !1,
|
|
19
|
-
disableBodyScroll:
|
|
19
|
+
disableBodyScroll: k = !0,
|
|
20
20
|
zIndex: N = 1e3,
|
|
21
|
-
className:
|
|
21
|
+
className: x,
|
|
22
22
|
style: M
|
|
23
23
|
}) => {
|
|
24
24
|
const y = E(null);
|
|
25
25
|
j(y, e && !d);
|
|
26
26
|
const p = X();
|
|
27
27
|
Y(() => {
|
|
28
|
-
if (!
|
|
28
|
+
if (!k && e) {
|
|
29
29
|
const t = document.body.style.overflow;
|
|
30
30
|
return document.body.style.overflow = "hidden", () => {
|
|
31
31
|
document.body.style.overflow = t;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
}, [e,
|
|
34
|
+
}, [e, k]), Y(() => {
|
|
35
35
|
if (!s || !e)
|
|
36
36
|
return;
|
|
37
37
|
const t = (g) => {
|
|
@@ -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 W(
|
|
58
58
|
/* @__PURE__ */ a(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -66,7 +66,7 @@ const F = ({
|
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
ref: y,
|
|
69
|
-
className: `nice-modal ${c} ${
|
|
69
|
+
className: `nice-modal ${c} ${x || ""}`,
|
|
70
70
|
role: "dialog",
|
|
71
71
|
"aria-modal": "true",
|
|
72
72
|
"aria-label": r,
|
|
@@ -107,9 +107,9 @@ const F = ({
|
|
|
107
107
|
title: l,
|
|
108
108
|
closeOnBackdropClick: s = !0,
|
|
109
109
|
closeOnEscape: d = !0,
|
|
110
|
-
swipeToClose:
|
|
110
|
+
swipeToClose: k = !0,
|
|
111
111
|
zIndex: N = 1e3,
|
|
112
|
-
className:
|
|
112
|
+
className: x,
|
|
113
113
|
style: M
|
|
114
114
|
}) => {
|
|
115
115
|
const y = E(null), [p, u] = D(!1), [c, t] = D(0);
|
|
@@ -160,11 +160,11 @@ const F = ({
|
|
|
160
160
|
R = n.deltaY > 100;
|
|
161
161
|
break;
|
|
162
162
|
}
|
|
163
|
-
R && (
|
|
163
|
+
R && (K("light"), o()), t(0), u(!1);
|
|
164
164
|
},
|
|
165
165
|
[r, o]
|
|
166
166
|
), { ref: L } = U({
|
|
167
|
-
enabled:
|
|
167
|
+
enabled: k && e,
|
|
168
168
|
onPanStart: () => u(!0),
|
|
169
169
|
onPan: h,
|
|
170
170
|
onPanEnd: H
|
|
@@ -180,8 +180,8 @@ const F = ({
|
|
|
180
180
|
if (p)
|
|
181
181
|
return I ? `translateX(${c}px)` : `translateY(${c}px)`;
|
|
182
182
|
};
|
|
183
|
-
return
|
|
184
|
-
/* @__PURE__ */ S(
|
|
183
|
+
return W(
|
|
184
|
+
/* @__PURE__ */ S(O, { children: [
|
|
185
185
|
/* @__PURE__ */ a(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
@@ -196,7 +196,7 @@ const F = ({
|
|
|
196
196
|
ref: (n) => {
|
|
197
197
|
y.current = n, L.current = n;
|
|
198
198
|
},
|
|
199
|
-
className: `nice-drawer nice-drawer--${r} ${e ? "nice-drawer--open" : ""} ${
|
|
199
|
+
className: `nice-drawer nice-drawer--${r} ${e ? "nice-drawer--open" : ""} ${x || ""}`,
|
|
200
200
|
style: {
|
|
201
201
|
...B,
|
|
202
202
|
zIndex: N + 1,
|
|
@@ -223,9 +223,9 @@ const F = ({
|
|
|
223
223
|
snapPoints: l = [0.5, 0.9],
|
|
224
224
|
initialSnap: s = 0,
|
|
225
225
|
expandable: d = !0,
|
|
226
|
-
closeOnBackdropClick:
|
|
226
|
+
closeOnBackdropClick: k = !0,
|
|
227
227
|
closeOnEscape: N = !0,
|
|
228
|
-
hapticFeedback:
|
|
228
|
+
hapticFeedback: x = !0,
|
|
229
229
|
zIndex: M = 1e3,
|
|
230
230
|
className: y,
|
|
231
231
|
style: p
|
|
@@ -267,15 +267,15 @@ const F = ({
|
|
|
267
267
|
const f = window.innerHeight;
|
|
268
268
|
l[t] * f;
|
|
269
269
|
const w = -L, C = f * 0.15;
|
|
270
|
-
w > C && d && t < l.length - 1 ? (g(t + 1),
|
|
271
|
-
}, [h, L, t, l, d,
|
|
272
|
-
|
|
273
|
-
}, [
|
|
270
|
+
w > C && d && t < l.length - 1 ? (g(t + 1), x && K("selection")) : w < -C && (t > 0 ? (g(t - 1), x && K("selection")) : (x && K("light"), o())), H(!1), P(0);
|
|
271
|
+
}, [h, L, t, l, d, x, o]), R = b(() => {
|
|
272
|
+
k && o();
|
|
273
|
+
}, [k, o]);
|
|
274
274
|
if (!e)
|
|
275
275
|
return null;
|
|
276
276
|
const T = l[t] * 100, $ = h ? L : 0;
|
|
277
|
-
return
|
|
278
|
-
/* @__PURE__ */ S(
|
|
277
|
+
return W(
|
|
278
|
+
/* @__PURE__ */ S(O, { children: [
|
|
279
279
|
/* @__PURE__ */ a(
|
|
280
280
|
"div",
|
|
281
281
|
{
|
|
@@ -322,10 +322,10 @@ const F = ({
|
|
|
322
322
|
onOpenChange: l,
|
|
323
323
|
hoverDelay: s = 200,
|
|
324
324
|
offset: d = 8,
|
|
325
|
-
className:
|
|
325
|
+
className: k,
|
|
326
326
|
showArrow: N = !0
|
|
327
327
|
}) => {
|
|
328
|
-
const [
|
|
328
|
+
const [x, M] = D(!1), y = E(null), p = E(null), u = E(null), c = X(), t = v !== void 0, g = t ? v : x, h = b(
|
|
329
329
|
(i) => {
|
|
330
330
|
t || M(i), l?.(i);
|
|
331
331
|
},
|
|
@@ -362,7 +362,7 @@ const F = ({
|
|
|
362
362
|
break;
|
|
363
363
|
}
|
|
364
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__ */ S(
|
|
365
|
+
}, [g, m, d]), /* @__PURE__ */ S(O, { children: [
|
|
366
366
|
/* @__PURE__ */ a(
|
|
367
367
|
"div",
|
|
368
368
|
{
|
|
@@ -375,12 +375,12 @@ const F = ({
|
|
|
375
375
|
children: e
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
|
-
g &&
|
|
378
|
+
g && W(
|
|
379
379
|
/* @__PURE__ */ S(
|
|
380
380
|
"div",
|
|
381
381
|
{
|
|
382
382
|
ref: p,
|
|
383
|
-
className: `nice-popover nice-popover--${m} ${
|
|
383
|
+
className: `nice-popover nice-popover--${m} ${k || ""}`,
|
|
384
384
|
style: {
|
|
385
385
|
position: "fixed",
|
|
386
386
|
top: I.top,
|
|
@@ -406,13 +406,13 @@ const F = ({
|
|
|
406
406
|
onClose: r,
|
|
407
407
|
className: v
|
|
408
408
|
}) => {
|
|
409
|
-
const [l, s] = D(!1), [d,
|
|
409
|
+
const [l, s] = D(!1), [d, k] = D({ x: 0, y: 0 }), N = E(null), x = E(null), M = X();
|
|
410
410
|
z(N, () => {
|
|
411
411
|
l && (s(!1), r?.());
|
|
412
412
|
});
|
|
413
413
|
const y = b(
|
|
414
414
|
(c) => {
|
|
415
|
-
c.preventDefault(),
|
|
415
|
+
c.preventDefault(), k({ x: c.clientX, y: c.clientY }), s(!0), m?.();
|
|
416
416
|
},
|
|
417
417
|
[m]
|
|
418
418
|
), p = b(
|
|
@@ -443,9 +443,9 @@ const F = ({
|
|
|
443
443
|
]
|
|
444
444
|
}
|
|
445
445
|
) }, t.key)) });
|
|
446
|
-
return /* @__PURE__ */ S(
|
|
447
|
-
/* @__PURE__ */ a("div", { ref:
|
|
448
|
-
l &&
|
|
446
|
+
return /* @__PURE__ */ S(O, { children: [
|
|
447
|
+
/* @__PURE__ */ a("div", { ref: x, onContextMenu: y, style: { display: "contents" }, children: o }),
|
|
448
|
+
l && W(
|
|
449
449
|
/* @__PURE__ */ a(
|
|
450
450
|
"div",
|
|
451
451
|
{
|
|
@@ -488,5 +488,5 @@ export {
|
|
|
488
488
|
pe as NiceWindow,
|
|
489
489
|
_e as NiceWindowManager,
|
|
490
490
|
Ne as useCommandPalette,
|
|
491
|
-
|
|
491
|
+
xe as useRegisterCommands
|
|
492
492
|
};
|