@nice2dev/ui 1.0.11 → 1.0.14
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 +28 -0
- package/README.md +61 -0
- package/css/legacy-bg-text-aliases.css +83 -0
- package/dist/NiceErrorBoundary-BLTq8mPU.cjs +1 -0
- package/dist/NiceErrorBoundary-Bjw5U31n.js +762 -0
- package/dist/NiceErrorBoundary-DT5XPTeu.cjs +1 -0
- package/dist/NiceErrorBoundary-SqPtbIxK.js +762 -0
- package/dist/NiceForm-CI_vgkD4.cjs +382 -0
- package/dist/NiceForm-CUlhtlHw.js +5357 -0
- package/dist/NiceForm-DTgIGX88.cjs +382 -0
- package/dist/NiceForm-t9zdH8kU.js +5343 -0
- package/dist/NiceForm.css +1 -1
- package/dist/NiceModal-C_t2qqZd.js +95 -0
- package/dist/NiceModal-DQ7u-xVm.cjs +1 -0
- package/dist/NiceModal-FQqBxCij.cjs +1 -0
- package/dist/NiceModal-IkSunDgK.js +95 -0
- package/dist/NiceModuleLifecyclePanel-CCFHxKIu.js +6343 -0
- package/dist/NiceModuleLifecyclePanel-Cj4x54sw.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-D-xBAp1_.js +5228 -0
- package/dist/NiceModuleLifecyclePanel-D8cIOI8I.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-BVkkePJU.js +171 -0
- package/dist/NicePagination-DDFkSRr9.js +171 -0
- package/dist/NicePagination-DGHtXqy1.cjs +1 -0
- package/dist/NicePagination-DGd3Hrh9.cjs +1 -0
- package/dist/NicePinCodeInput-BhIABBTV.cjs +419 -0
- package/dist/NicePinCodeInput-CDtodnIM.js +11875 -0
- package/dist/NicePinCodeInput-DytLfqZL.cjs +419 -0
- package/dist/NicePinCodeInput-jMNfPqOx.js +11866 -0
- package/dist/NicePinCodeInput.css +1 -1
- package/dist/NiceSavedQueryPanel-BkYRk5cX.js +6441 -0
- package/dist/NiceSavedQueryPanel-CbR3EDQU.cjs +596 -0
- package/dist/NiceSavedQueryPanel-CmFSi21-.cjs +596 -0
- package/dist/NiceSavedQueryPanel-DJqCNWYZ.js +6446 -0
- package/dist/NiceSavedQueryPanel.css +1 -1
- package/dist/NiceTabs-B-9_mzpc.js +1624 -0
- package/dist/NiceTabs-C4H5un8J.cjs +1 -0
- package/dist/NiceTabs-CHg36waF.cjs +1 -0
- package/dist/NiceTabs-DlsCMth_.js +1622 -0
- package/dist/NiceWindow-BNrA5Dxq.js +1409 -0
- package/dist/NiceWindow-BxGVzUs2.js +1409 -0
- package/dist/NiceWindow-CbzJmurQ.cjs +1 -0
- package/dist/NiceWindow-HhPIzPzs.cjs +1 -0
- package/dist/charts-F_b5-OR8.js +4621 -0
- package/dist/charts-Us8Ep8MJ.cjs +761 -0
- package/dist/charts-e10jGjuF.cjs +759 -0
- package/dist/charts-fO6InNZd.js +4645 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.css +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-B-tu8l9M.cjs +96 -0
- package/dist/core-BJ_UNMlX.js +22276 -0
- package/dist/core-CSfXTICE.cjs +96 -0
- package/dist/core-ClmvtMVZ.js +22253 -0
- package/dist/data-branching-B_9C6-hE.cjs +1 -0
- package/dist/data-branching-BmCKIXgr.js +6121 -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 +9 -2
- package/dist/data.mjs +1 -1
- package/dist/devops-BL39OCVh.js +7660 -0
- package/dist/devops-CkuTC7RJ.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 +92 -6
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +2 -2
- package/dist/index-BU6KCDpP.js +57872 -0
- package/dist/index-D7i7sZGV.cjs +5194 -0
- package/dist/index-DHc_KZkF.js +61311 -0
- package/dist/index-drIVMHeC.cjs +5194 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1607 -102
- package/dist/index.mjs +894 -867
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +309 -70
- package/dist/navigation.mjs +94 -93
- package/dist/no-code-Bb3QFKdm.cjs +332 -0
- package/dist/no-code-snLY0d6I.js +7065 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +33 -33
- package/dist/style.css +7 -0
- package/dist/vendor-DF586kuF.js +271 -0
- package/dist/vendor-DHEorsoy.cjs +1 -0
- package/package.json +10 -5
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-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;
|
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-snLY0d6I.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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("./NiceWindow-HhPIzPzs.cjs"),r=require("react/jsx-runtime"),M=require("./core-B-tu8l9M.cjs"),e=require("react"),I=require("react-dom");function B(){const t=e.useContext(M.tr);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const W=({open:t,onClose:s,children:v,title:a,size:g="md",closeOnBackdropClick:l=!0,closeOnEscape:d=!0,disableFocusTrap:u=!1,disableBodyScroll:j=!0,zIndex:_=1e3,className:p,style:C})=>{const N=e.useRef(null);M.ks(N,t&&!u);const y=B();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 I.createPortal(r.jsx("div",{className:"nice-modal__overlay",style:{zIndex:_},onClick:f,role:"presentation",children:r.jsx("div",{ref:N,className:`nice-modal ${i} ${p||""}`,role:"dialog","aria-modal":"true","aria-label":a,style:C,tabIndex:-1,children:v})}),y)},X=({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:C})=>{const N=e.useRef(null),[y,f]=e.useState(!1),[i,n]=e.useState(0);M.ks(N,t);const x=B();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.Hr("light"),s()),n(0),f(!1)},[a,s]),{ref:P}=M.Xs({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 I.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=>{N.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:N,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.ks(f,t);const L=B();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"),H=i.current,Y=!H||H.scrollTop<=0;!b&&!Y||(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,H=m*.15;b>H&&u&&n<l.length-1?(x(n+1),p&&M.Hr("selection")):b<-H&&(n>0?(x(n-1),p&&M.Hr("selection")):(p&&M.Hr("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 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:E}),r.jsxs("div",{ref:f,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${N||""}`,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),N=e.useRef(null),y=e.useRef(null),f=e.useRef(null),i=B(),n=g!==void 0,x=n?g:p,h=e.useCallback(c=>{n||C(c),l?.(c)},[n,l]);M.ws(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||!N.current||!y.current)return;const c=N.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:N,className:"nice-popover__trigger",onClick:D,onMouseEnter:P,onMouseLeave:$,style:{display:"inline-block"},children:t}),x&&I.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=B();M.ws(_,()=>{l&&(d(!1),a?.())});const N=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:N,style:{display:"contents"},children:s}),l&&I.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=w.NiceActionSheet;exports.NiceBlockUI=w.NiceBlockUI;exports.NiceBox=w.NiceBox;exports.NiceCommandPaletteProvider=w.NiceCommandPaletteProvider;exports.NiceLoadPanel=w.NiceLoadPanel;exports.NicePopover=w.NicePopover;exports.NiceResizable=w.NiceResizable;exports.NiceResponsiveBox=w.NiceResponsiveBox;exports.NiceScrollView=w.NiceScrollView;exports.NiceTutorial=w.NiceTutorial;exports.NiceTutorialProvider=w.NiceTutorialProvider;exports.NiceWindow=w.NiceWindow;exports.NiceWindowManager=w.NiceWindowManager;exports.useCommandPalette=w.useCommandPalette;exports.useRegisterCommands=w.useRegisterCommands;exports.NiceBottomSheet=F;exports.NiceContextMenu=A;exports.NiceDrawer=K;exports.NiceModal=W;exports.NiceModalBody=O;exports.NiceModalFooter=q;exports.NiceModalHeader=X;exports.NiceOverlayPopover=z;
|
package/dist/overlays.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { N as se, a as de, b as ue, c as he, d as fe, e as me, f as ve, g as ge, h as we, i as be, j as ye, k as pe, l as _e, u as Ne, m as ke } from "./NiceWindow-
|
|
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-BxGVzUs2.js";
|
|
2
2
|
import { jsxs as H, Fragment as O, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { useRef as E, useState as
|
|
5
|
-
import { createPortal as
|
|
3
|
+
import { k as j, H as K, b as z, X as U, t as V } from "./core-BJ_UNMlX.js";
|
|
4
|
+
import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as q } from "react";
|
|
5
|
+
import { createPortal as C } from "react-dom";
|
|
6
6
|
function W() {
|
|
7
|
-
const e = V
|
|
7
|
+
const e = q(V);
|
|
8
8
|
return e?.portalTarget ? e.portalTarget : typeof document < "u" ? document.body : null;
|
|
9
9
|
}
|
|
10
10
|
const F = ({
|
|
@@ -54,7 +54,7 @@ const F = ({
|
|
|
54
54
|
xl: "nice-modal--xl",
|
|
55
55
|
full: "nice-modal--full"
|
|
56
56
|
}[v];
|
|
57
|
-
return
|
|
57
|
+
return C(
|
|
58
58
|
/* @__PURE__ */ a(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -112,7 +112,7 @@ const F = ({
|
|
|
112
112
|
className: k,
|
|
113
113
|
style: M
|
|
114
114
|
}) => {
|
|
115
|
-
const y = E(null), [p, u] =
|
|
115
|
+
const y = E(null), [p, u] = D(!1), [c, t] = D(0);
|
|
116
116
|
j(y, e);
|
|
117
117
|
const g = W();
|
|
118
118
|
Y(() => {
|
|
@@ -163,7 +163,7 @@ const F = ({
|
|
|
163
163
|
R && (K("light"), o()), t(0), u(!1);
|
|
164
164
|
},
|
|
165
165
|
[r, o]
|
|
166
|
-
), { ref:
|
|
166
|
+
), { ref: L } = U({
|
|
167
167
|
enabled: x && e,
|
|
168
168
|
onPanStart: () => u(!0),
|
|
169
169
|
onPan: h,
|
|
@@ -176,11 +176,11 @@ const F = ({
|
|
|
176
176
|
);
|
|
177
177
|
if (!e)
|
|
178
178
|
return null;
|
|
179
|
-
const I = r === "left" || r === "right",
|
|
179
|
+
const I = r === "left" || r === "right", X = 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
|
|
183
|
+
return C(
|
|
184
184
|
/* @__PURE__ */ H(O, { children: [
|
|
185
185
|
/* @__PURE__ */ a(
|
|
186
186
|
"div",
|
|
@@ -194,11 +194,11 @@ const F = ({
|
|
|
194
194
|
"div",
|
|
195
195
|
{
|
|
196
196
|
ref: (n) => {
|
|
197
|
-
y.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
|
-
...
|
|
201
|
+
...X,
|
|
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] =
|
|
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
235
|
e && (g(s), P(0));
|
|
236
236
|
}, [e, s]), j(u, e);
|
|
237
|
-
const
|
|
237
|
+
const X = W();
|
|
238
238
|
Y(() => {
|
|
239
239
|
if (!N || !e)
|
|
240
240
|
return;
|
|
@@ -251,8 +251,8 @@ const F = ({
|
|
|
251
251
|
}
|
|
252
252
|
}, [e]);
|
|
253
253
|
const i = b((f) => {
|
|
254
|
-
const w = f.target.closest(".nice-bottom-sheet__handle"),
|
|
255
|
-
!w && !
|
|
254
|
+
const w = f.target.closest(".nice-bottom-sheet__handle"), B = c.current, A = !B || B.scrollTop <= 0;
|
|
255
|
+
!w && !A || (S(!0), I.current = f.touches[0].clientY);
|
|
256
256
|
}, []), n = b(
|
|
257
257
|
(f) => {
|
|
258
258
|
if (!h)
|
|
@@ -266,15 +266,15 @@ const F = ({
|
|
|
266
266
|
return;
|
|
267
267
|
const f = window.innerHeight;
|
|
268
268
|
l[t] * f;
|
|
269
|
-
const w = -
|
|
270
|
-
w >
|
|
271
|
-
}, [h,
|
|
269
|
+
const w = -L, B = f * 0.15;
|
|
270
|
+
w > B && d && t < l.length - 1 ? (g(t + 1), k && K("selection")) : w < -B && (t > 0 ? (g(t - 1), k && K("selection")) : (k && K("light"), o())), 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 ?
|
|
277
|
-
return
|
|
276
|
+
const T = l[t] * 100, $ = h ? L : 0;
|
|
277
|
+
return C(
|
|
278
278
|
/* @__PURE__ */ H(O, { children: [
|
|
279
279
|
/* @__PURE__ */ a(
|
|
280
280
|
"div",
|
|
@@ -311,7 +311,7 @@ const F = ({
|
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
] }),
|
|
314
|
-
|
|
314
|
+
X
|
|
315
315
|
);
|
|
316
316
|
}, ae = ({
|
|
317
317
|
trigger: e,
|
|
@@ -325,22 +325,22 @@ const F = ({
|
|
|
325
325
|
className: x,
|
|
326
326
|
showArrow: N = !0
|
|
327
327
|
}) => {
|
|
328
|
-
const [k, M] =
|
|
328
|
+
const [k, M] = D(!1), y = E(null), p = E(null), u = E(null), c = W(), t = v !== void 0, g = t ? v : k, h = b(
|
|
329
329
|
(i) => {
|
|
330
330
|
t || M(i), l?.(i);
|
|
331
331
|
},
|
|
332
332
|
[t, l]
|
|
333
333
|
);
|
|
334
|
-
|
|
334
|
+
z(p, () => {
|
|
335
335
|
r !== "manual" && g && h(!1);
|
|
336
336
|
});
|
|
337
337
|
const S = b(() => {
|
|
338
338
|
r === "click" && h(!g);
|
|
339
|
-
}, [r, g, h]),
|
|
339
|
+
}, [r, g, h]), L = b(() => {
|
|
340
340
|
r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!0), s));
|
|
341
341
|
}, [r, s, h]), P = b(() => {
|
|
342
342
|
r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!1), s));
|
|
343
|
-
}, [r, s, h]), [I,
|
|
343
|
+
}, [r, s, h]), [I, X] = D({ top: 0, left: 0 });
|
|
344
344
|
return Y(() => {
|
|
345
345
|
if (!g || !y.current || !p.current)
|
|
346
346
|
return;
|
|
@@ -361,7 +361,7 @@ 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)),
|
|
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
365
|
}, [g, m, d]), /* @__PURE__ */ H(O, { children: [
|
|
366
366
|
/* @__PURE__ */ a(
|
|
367
367
|
"div",
|
|
@@ -369,13 +369,13 @@ const F = ({
|
|
|
369
369
|
ref: y,
|
|
370
370
|
className: "nice-popover__trigger",
|
|
371
371
|
onClick: S,
|
|
372
|
-
onMouseEnter:
|
|
372
|
+
onMouseEnter: L,
|
|
373
373
|
onMouseLeave: P,
|
|
374
374
|
style: { display: "inline-block" },
|
|
375
375
|
children: e
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
|
-
g &&
|
|
378
|
+
g && C(
|
|
379
379
|
/* @__PURE__ */ H(
|
|
380
380
|
"div",
|
|
381
381
|
{
|
|
@@ -387,7 +387,7 @@ const F = ({
|
|
|
387
387
|
left: I.left,
|
|
388
388
|
zIndex: 1100
|
|
389
389
|
},
|
|
390
|
-
onMouseEnter:
|
|
390
|
+
onMouseEnter: L,
|
|
391
391
|
onMouseLeave: P,
|
|
392
392
|
role: "tooltip",
|
|
393
393
|
children: [
|
|
@@ -406,8 +406,8 @@ const F = ({
|
|
|
406
406
|
onClose: r,
|
|
407
407
|
className: v
|
|
408
408
|
}) => {
|
|
409
|
-
const [l, s] =
|
|
410
|
-
|
|
409
|
+
const [l, s] = D(!1), [d, x] = D({ x: 0, y: 0 }), N = E(null), k = E(null), M = W();
|
|
410
|
+
z(N, () => {
|
|
411
411
|
l && (s(!1), r?.());
|
|
412
412
|
});
|
|
413
413
|
const y = b(
|
|
@@ -445,7 +445,7 @@ const F = ({
|
|
|
445
445
|
) }, t.key)) });
|
|
446
446
|
return /* @__PURE__ */ H(O, { children: [
|
|
447
447
|
/* @__PURE__ */ a("div", { ref: k, onContextMenu: y, style: { display: "contents" }, children: o }),
|
|
448
|
-
l &&
|
|
448
|
+
l && C(
|
|
449
449
|
/* @__PURE__ */ a(
|
|
450
450
|
"div",
|
|
451
451
|
{
|
package/dist/style.css
ADDED