@nice2dev/ui 1.0.14 → 1.0.16

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 (67) hide show
  1. package/README.md +33 -39
  2. package/dist/NiceErrorBoundary-CH8SBcSZ.js +762 -0
  3. package/dist/NiceErrorBoundary-CKBaWmkn.js +762 -0
  4. package/dist/NiceErrorBoundary-CaVVPLh4.cjs +1 -0
  5. package/dist/NiceErrorBoundary-DBiUvzQs.cjs +1 -0
  6. package/dist/NiceForm-B5dMsHbO.js +5357 -0
  7. package/dist/NiceForm-Dbciuo4w.cjs +382 -0
  8. package/dist/NiceForm-DccuzkPX.cjs +382 -0
  9. package/dist/NiceForm-Jf-ufPZz.js +5357 -0
  10. package/dist/NiceModal-Bf1Q1VNL.cjs +1 -0
  11. package/dist/NiceModal-BxXotB3l.js +95 -0
  12. package/dist/NiceModal-DCA0wCuD.cjs +1 -0
  13. package/dist/NiceModal-DrywdSv3.js +95 -0
  14. package/dist/NiceModuleLifecyclePanel-CDX38sEx.js +6343 -0
  15. package/dist/NiceModuleLifecyclePanel-CEzuZnmj.cjs +1 -0
  16. package/dist/NiceModuleLifecyclePanel-D-dojncS.js +6349 -0
  17. package/dist/NiceModuleLifecyclePanel-xLrOv8nL.cjs +1 -0
  18. package/dist/NicePagination-1mgQ1T6J.cjs +1 -0
  19. package/dist/NicePagination-Aj63sKV3.js +171 -0
  20. package/dist/NicePagination-DNjVutBJ.cjs +1 -0
  21. package/dist/NicePagination-kFBRytja.js +171 -0
  22. package/dist/NicePinCodeInput-B_0RCKQN.cjs +419 -0
  23. package/dist/NicePinCodeInput-CPQhsGVC.js +11875 -0
  24. package/dist/NicePinCodeInput-DbeOo9o6.cjs +419 -0
  25. package/dist/NicePinCodeInput-Dffu701_.js +11875 -0
  26. package/dist/NiceSavedQueryPanel-4l-V9dGK.js +6446 -0
  27. package/dist/NiceSavedQueryPanel-B-EQ1oLv.cjs +596 -0
  28. package/dist/NiceSavedQueryPanel-B5TjD_Sb.cjs +596 -0
  29. package/dist/NiceSavedQueryPanel-D9Z3gF87.js +6446 -0
  30. package/dist/NiceTabs-BQgV3eKE.cjs +1 -0
  31. package/dist/NiceTabs-CaCiaBCQ.js +1624 -0
  32. package/dist/NiceTabs-CbKhMxbC.cjs +1 -0
  33. package/dist/NiceTabs-HXphGn1B.js +1624 -0
  34. package/dist/NiceWindow-Ceb0mZ_0.js +1409 -0
  35. package/dist/NiceWindow-Cn3e0Xtd.cjs +1 -0
  36. package/dist/NiceWindow-DXpnFZ0E.cjs +1 -0
  37. package/dist/NiceWindow-EXCwOEXz.js +1409 -0
  38. package/dist/charts-B6dTpbYV.cjs +761 -0
  39. package/dist/charts-BPJefcE8.js +4645 -0
  40. package/dist/charts-D5Qd_0sO.js +4645 -0
  41. package/dist/charts-Dr6QyMiv.cjs +761 -0
  42. package/dist/charts.cjs +1 -1
  43. package/dist/charts.mjs +1 -1
  44. package/dist/core-CtqcSgsw.js +22316 -0
  45. package/dist/core-DJ4NPp2B.js +22316 -0
  46. package/dist/core-DPY4m7vb.cjs +96 -0
  47. package/dist/core-oNMPbzb7.cjs +96 -0
  48. package/dist/data.cjs +1 -1
  49. package/dist/data.mjs +1 -1
  50. package/dist/editors.cjs +1 -1
  51. package/dist/editors.mjs +3 -3
  52. package/dist/feedback.cjs +1 -1
  53. package/dist/feedback.mjs +2 -2
  54. package/dist/index-B-9lbtwJ.cjs +5194 -0
  55. package/dist/index-BNy9Nn0X.js +61422 -0
  56. package/dist/index-DM6SBE8H.cjs +5194 -0
  57. package/dist/index-DqpmYrH_.js +61432 -0
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.d.ts +69 -4
  60. package/dist/index.mjs +892 -890
  61. package/dist/lazy.cjs +1 -1
  62. package/dist/lazy.mjs +3 -3
  63. package/dist/navigation.cjs +1 -1
  64. package/dist/navigation.mjs +13 -13
  65. package/dist/overlays.cjs +1 -1
  66. package/dist/overlays.mjs +36 -36
  67. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),t=require("./core-DPY4m7vb.cjs"),c=require("react"),g=require("react-dom"),E=({open:l,onClose:a,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:b}=t.$o(),j=c.useContext(t.nr),m=c.useRef(null),[o,N]=c.useState(!1),k=t.cs("modal",u),w=t.ls("modal",u);if(t.As(m,l),c.useEffect(()=>{if(!l||!d)return;const s=L=>{L.key==="Escape"&&a()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[l,d,a]),c.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?a: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:a,"aria-label":b("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 g.createPortal(C,j?.portalTarget??document.body)};exports.NiceModal=E;
@@ -0,0 +1,95 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { $ as g, n as $, c as E, l as F, A as j } from "./core-CtqcSgsw.js";
3
+ import { useContext as A, useRef as M, useState as P, useEffect as u } from "react";
4
+ import { createPortal as R } from "react-dom";
5
+ const z = ({
6
+ open: l,
7
+ onClose: o,
8
+ title: t,
9
+ size: f = "md",
10
+ children: h,
11
+ footer: s,
12
+ closeOnOverlay: v = !0,
13
+ closeOnEscape: c = !0,
14
+ fullscreenable: y,
15
+ zIndex: d,
16
+ className: _,
17
+ style: b,
18
+ displayStyle: i
19
+ }) => {
20
+ const { t: N } = g(), k = A($), m = M(null), [n, p] = P(!1), w = E("modal", i), x = F("modal", i);
21
+ if (j(m, l), u(() => {
22
+ if (!l || !c)
23
+ return;
24
+ const a = (L) => {
25
+ L.key === "Escape" && o();
26
+ };
27
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
28
+ }, [l, c, 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: d ? { zIndex: d } : void 0,
37
+ onClick: v ? o : void 0,
38
+ children: /* @__PURE__ */ r(
39
+ "div",
40
+ {
41
+ ref: m,
42
+ className: `nice-modal nice-modal--${n ? "full" : f} nice-modal--ds-${x} ${_ || ""}`,
43
+ style: { ...w, ...b },
44
+ role: "dialog",
45
+ "aria-modal": "true",
46
+ "aria-label": t,
47
+ onClick: (a) => a.stopPropagation(),
48
+ children: [
49
+ t && /* @__PURE__ */ r("div", { className: "nice-modal__header", children: [
50
+ /* @__PURE__ */ e("h2", { className: "nice-modal__title", children: t }),
51
+ /* @__PURE__ */ r("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": n ? "Exit fullscreen" : "Fullscreen",
59
+ children: n ? "⇲" : "⇱"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ className: "nice-modal__close",
67
+ onClick: o,
68
+ "aria-label": N("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
+ s && /* @__PURE__ */ e("div", { className: "nice-modal__footer", children: s })
86
+ ]
87
+ }
88
+ )
89
+ }
90
+ );
91
+ return R(C, k?.portalTarget ?? document.body);
92
+ };
93
+ export {
94
+ z as N
95
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),t=require("./core-oNMPbzb7.cjs"),c=require("react"),g=require("react-dom"),E=({open:l,onClose:a,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:b}=t.$o(),j=c.useContext(t.nr),m=c.useRef(null),[o,N]=c.useState(!1),k=t.cs("modal",u),w=t.ls("modal",u);if(t.As(m,l),c.useEffect(()=>{if(!l||!d)return;const s=L=>{L.key==="Escape"&&a()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[l,d,a]),c.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?a: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:a,"aria-label":b("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 g.createPortal(C,j?.portalTarget??document.body)};exports.NiceModal=E;
@@ -0,0 +1,95 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { $ as g, n as $, c as E, l as F, A as j } from "./core-DJ4NPp2B.js";
3
+ import { useContext as A, useRef as M, useState as P, useEffect as u } from "react";
4
+ import { createPortal as R } from "react-dom";
5
+ const z = ({
6
+ open: l,
7
+ onClose: o,
8
+ title: t,
9
+ size: f = "md",
10
+ children: h,
11
+ footer: s,
12
+ closeOnOverlay: v = !0,
13
+ closeOnEscape: c = !0,
14
+ fullscreenable: y,
15
+ zIndex: d,
16
+ className: _,
17
+ style: b,
18
+ displayStyle: i
19
+ }) => {
20
+ const { t: N } = g(), k = A($), m = M(null), [n, p] = P(!1), w = E("modal", i), x = F("modal", i);
21
+ if (j(m, l), u(() => {
22
+ if (!l || !c)
23
+ return;
24
+ const a = (L) => {
25
+ L.key === "Escape" && o();
26
+ };
27
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
28
+ }, [l, c, 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: d ? { zIndex: d } : void 0,
37
+ onClick: v ? o : void 0,
38
+ children: /* @__PURE__ */ r(
39
+ "div",
40
+ {
41
+ ref: m,
42
+ className: `nice-modal nice-modal--${n ? "full" : f} nice-modal--ds-${x} ${_ || ""}`,
43
+ style: { ...w, ...b },
44
+ role: "dialog",
45
+ "aria-modal": "true",
46
+ "aria-label": t,
47
+ onClick: (a) => a.stopPropagation(),
48
+ children: [
49
+ t && /* @__PURE__ */ r("div", { className: "nice-modal__header", children: [
50
+ /* @__PURE__ */ e("h2", { className: "nice-modal__title", children: t }),
51
+ /* @__PURE__ */ r("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": n ? "Exit fullscreen" : "Fullscreen",
59
+ children: n ? "⇲" : "⇱"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ "button",
64
+ {
65
+ type: "button",
66
+ className: "nice-modal__close",
67
+ onClick: o,
68
+ "aria-label": N("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
+ s && /* @__PURE__ */ e("div", { className: "nice-modal__footer", children: s })
86
+ ]
87
+ }
88
+ )
89
+ }
90
+ );
91
+ return R(C, k?.portalTarget ?? document.body);
92
+ };
93
+ export {
94
+ z as N
95
+ };