@nice2dev/ui 1.0.23 → 1.0.25

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 (60) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/NiceErrorBoundary-CVybqo3l.js +770 -0
  3. package/dist/NiceErrorBoundary-D0NwBkFl.cjs +1 -0
  4. package/dist/NiceForm-BrBaLUkv.js +5386 -0
  5. package/dist/NiceForm-DoiApS60.cjs +382 -0
  6. package/dist/NiceModal-C582SiK7.cjs +1 -0
  7. package/dist/NiceModal-sFJw1CWm.js +95 -0
  8. package/dist/NiceModuleLifecyclePanel-D22ycAMQ.js +6817 -0
  9. package/dist/NiceModuleLifecyclePanel-shRuDyp3.cjs +1 -0
  10. package/dist/NiceModuleLifecyclePanel.css +1 -1
  11. package/dist/NicePagination-CtyaW_b4.cjs +1 -0
  12. package/dist/NicePagination-hGlKrWYL.js +171 -0
  13. package/dist/NicePinCodeInput-DPUlM3E1.cjs +696 -0
  14. package/dist/NicePinCodeInput-xSuOVhE8.js +13097 -0
  15. package/dist/NiceSavedQueryPanel-DzB0g0ak.cjs +596 -0
  16. package/dist/NiceSavedQueryPanel-Mz4jAsGJ.js +6893 -0
  17. package/dist/NiceTabs-1o8cpB_-.js +1657 -0
  18. package/dist/NiceTabs-B-FDOecP.cjs +1 -0
  19. package/dist/NiceWindow-9zQsi0zF.cjs +1 -0
  20. package/dist/NiceWindow-Dq-xx9cw.js +1592 -0
  21. package/dist/charts-DNQXBPGB.js +4657 -0
  22. package/dist/charts-IP38F-wh.cjs +761 -0
  23. package/dist/charts.cjs +1 -1
  24. package/dist/charts.mjs +1 -1
  25. package/dist/core-C7CI2mWz.js +25248 -0
  26. package/dist/core-CjUAwZ6z.cjs +122 -0
  27. package/dist/data-branching-Bv-f_gZk.cjs +1 -0
  28. package/dist/data-branching-CNi8vtZ1.js +6133 -0
  29. package/dist/data-branching.cjs +1 -1
  30. package/dist/data-branching.mjs +1 -1
  31. package/dist/data.cjs +1 -1
  32. package/dist/data.d.ts +19 -1
  33. package/dist/data.mjs +1 -1
  34. package/dist/devops-ZWKP6vRh.cjs +17 -0
  35. package/dist/devops-draw6Jrm.js +7684 -0
  36. package/dist/devops.cjs +1 -1
  37. package/dist/devops.mjs +1 -1
  38. package/dist/editors.cjs +1 -1
  39. package/dist/editors.mjs +3 -3
  40. package/dist/feedback.cjs +1 -1
  41. package/dist/feedback.mjs +2 -2
  42. package/dist/index-BkLJ4tzy.js +68026 -0
  43. package/dist/index-CwOe80Ws.cjs +5518 -0
  44. package/dist/index.cjs +1 -1
  45. package/dist/index.css +1 -1
  46. package/dist/index.d.ts +104 -1
  47. package/dist/index.mjs +757 -753
  48. package/dist/lazy.cjs +1 -1
  49. package/dist/lazy.mjs +24 -24
  50. package/dist/navigation.cjs +1 -1
  51. package/dist/navigation.d.ts +23 -0
  52. package/dist/navigation.mjs +4 -4
  53. package/dist/no-code-BndAN6hG.cjs +332 -0
  54. package/dist/no-code-DKYzw5If.js +7133 -0
  55. package/dist/no-code.cjs +1 -1
  56. package/dist/no-code.mjs +1 -1
  57. package/dist/overlays.cjs +1 -1
  58. package/dist/overlays.mjs +2 -2
  59. package/dist/style.css +2 -2
  60. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),t=require("./core-CjUAwZ6z.cjs"),a=require("react"),L=require("react-dom"),g=({open:l,onClose:c,title:n,size:f="md",children:h,footer:r,closeOnOverlay:v=!0,closeOnEscape:d=!0,fullscreenable:y,zIndex:i,className:x,style:_,displayStyle:u})=>{const{t:j}=t.Zt(),b=a.useContext(t.ur),m=a.useRef(null),[o,N]=a.useState(!1),k=t.Ns("modal",u),w=t.Es("modal",u);if(t.js(m,l),a.useEffect(()=>{if(!l||!d)return;const s=E=>{E.key==="Escape"&&c()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[l,d,c]),a.useEffect(()=>(l?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[l]),!l||typeof document>"u")return null;const C=e.jsx("div",{className:"nice-modal-overlay",style:i?{zIndex:i}:void 0,onClick:v?c:void 0,children:e.jsxs("div",{ref:m,className:`nice-modal nice-modal--${o?"full":f} nice-modal--ds-${w} ${x||""}`,style:{...k,..._},role:"dialog","aria-modal":"true","aria-label":n,onClick:s=>s.stopPropagation(),children:[n&&e.jsxs("div",{className:"nice-modal__header",children:[e.jsx("h2",{className:"nice-modal__title",children:n}),e.jsxs("div",{className:"nice-modal__header-actions",children:[y&&e.jsx("button",{type:"button",className:"nice-modal__fullscreen",onClick:()=>N(s=>!s),"aria-label":o?"Exit fullscreen":"Fullscreen",children:o?"⇲":"⇱"}),e.jsx("button",{type:"button",className:"nice-modal__close",onClick:c,"aria-label":j("controls.close","Close"),children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]})]}),e.jsx("div",{className:"nice-modal__body",children:h}),r&&e.jsx("div",{className:"nice-modal__footer",children:r})]})});return L.createPortal(C,b?.portalTarget??document.body)};exports.NiceModal=g;
@@ -0,0 +1,95 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { Z as L, u as g, N as j, E as F, j as $ } from "./core-C7CI2mWz.js";
3
+ import { useContext as M, useRef as P, useState as R, useEffect as u } from "react";
4
+ import { createPortal as Z } from "react-dom";
5
+ const z = ({
6
+ open: l,
7
+ onClose: o,
8
+ title: t,
9
+ size: f = "md",
10
+ children: h,
11
+ footer: n,
12
+ closeOnOverlay: v = !0,
13
+ closeOnEscape: d = !0,
14
+ fullscreenable: y,
15
+ zIndex: c,
16
+ className: _,
17
+ style: N,
18
+ displayStyle: i
19
+ }) => {
20
+ const { t: b } = L(), k = M(g), m = P(null), [r, p] = R(!1), w = j("modal", i), x = F("modal", i);
21
+ if ($(m, l), u(() => {
22
+ if (!l || !d)
23
+ return;
24
+ const a = (E) => {
25
+ E.key === "Escape" && o();
26
+ };
27
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
28
+ }, [l, d, o]), u(() => (l ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
29
+ document.body.style.overflow = "";
30
+ }), [l]), !l || typeof document > "u")
31
+ return null;
32
+ const C = /* @__PURE__ */ e(
33
+ "div",
34
+ {
35
+ className: "nice-modal-overlay",
36
+ style: c ? { zIndex: c } : void 0,
37
+ onClick: v ? o : void 0,
38
+ children: /* @__PURE__ */ s(
39
+ "div",
40
+ {
41
+ ref: m,
42
+ className: `nice-modal nice-modal--${r ? "full" : f} nice-modal--ds-${x} ${_ || ""}`,
43
+ style: { ...w, ...N },
44
+ role: "dialog",
45
+ "aria-modal": "true",
46
+ "aria-label": t,
47
+ onClick: (a) => a.stopPropagation(),
48
+ children: [
49
+ t && /* @__PURE__ */ s("div", { className: "nice-modal__header", children: [
50
+ /* @__PURE__ */ e("h2", { className: "nice-modal__title", children: t }),
51
+ /* @__PURE__ */ s("div", { className: "nice-modal__header-actions", children: [
52
+ y && /* @__PURE__ */ e(
53
+ "button",
54
+ {
55
+ type: "button",
56
+ className: "nice-modal__fullscreen",
57
+ onClick: () => p((a) => !a),
58
+ "aria-label": r ? "Exit fullscreen" : "Fullscreen",
59
+ children: r ? "⇲" : "⇱"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ className: "nice-modal__close",
67
+ onClick: o,
68
+ "aria-label": b("controls.close", "Close"),
69
+ children: /* @__PURE__ */ e(
70
+ "svg",
71
+ {
72
+ width: "24",
73
+ height: "24",
74
+ viewBox: "0 0 20 20",
75
+ fill: "currentColor",
76
+ "aria-hidden": "true",
77
+ children: /* @__PURE__ */ e("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
78
+ }
79
+ )
80
+ }
81
+ )
82
+ ] })
83
+ ] }),
84
+ /* @__PURE__ */ e("div", { className: "nice-modal__body", children: h }),
85
+ n && /* @__PURE__ */ e("div", { className: "nice-modal__footer", children: n })
86
+ ]
87
+ }
88
+ )
89
+ }
90
+ );
91
+ return Z(C, k?.portalTarget ?? document.body);
92
+ };
93
+ export {
94
+ z as N
95
+ };