@nice2dev/ui 1.0.16 → 1.0.17

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 (42) hide show
  1. package/dist/NiceErrorBoundary-B1Y6X3Ya.js +762 -0
  2. package/dist/NiceErrorBoundary-DM5IMdOr.cjs +1 -0
  3. package/dist/NiceForm-BSkm9-yP.js +5357 -0
  4. package/dist/NiceForm-DDN-yf30.cjs +382 -0
  5. package/dist/NiceModal-9uxWPAE_.cjs +1 -0
  6. package/dist/NiceModal-BPDP1Fi-.js +95 -0
  7. package/dist/NiceModuleLifecyclePanel-DF0Ay1oH.js +6349 -0
  8. package/dist/NiceModuleLifecyclePanel-g_ZVFzoE.cjs +1 -0
  9. package/dist/NicePagination-D829pF7A.cjs +1 -0
  10. package/dist/NicePagination-D89Kst8b.js +171 -0
  11. package/dist/NicePinCodeInput-Bf_QcaPW.cjs +419 -0
  12. package/dist/NicePinCodeInput-Co42gC9R.js +11875 -0
  13. package/dist/NiceSavedQueryPanel-BuvMBwIf.cjs +596 -0
  14. package/dist/NiceSavedQueryPanel-DR-j6eA5.js +6446 -0
  15. package/dist/NiceTabs-B6E7-er3.cjs +1 -0
  16. package/dist/NiceTabs-J2zAw8vC.js +1624 -0
  17. package/dist/NiceWindow-6F_z4_18.js +1409 -0
  18. package/dist/NiceWindow-Bnh6rKt4.cjs +1 -0
  19. package/dist/charts-DXkFBiD4.cjs +761 -0
  20. package/dist/charts-SHnY1_oD.js +4645 -0
  21. package/dist/charts.cjs +1 -1
  22. package/dist/charts.mjs +1 -1
  23. package/dist/core-Dpfb_THi.js +22316 -0
  24. package/dist/core-DqlrEV-9.cjs +96 -0
  25. package/dist/data.cjs +1 -1
  26. package/dist/data.mjs +1 -1
  27. package/dist/editors.cjs +1 -1
  28. package/dist/editors.mjs +3 -3
  29. package/dist/feedback.cjs +1 -1
  30. package/dist/feedback.mjs +2 -2
  31. package/dist/index-GIkNMdRp.js +61439 -0
  32. package/dist/index-pQGuLKEE.cjs +5194 -0
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.mjs +12 -12
  35. package/dist/lazy.cjs +1 -1
  36. package/dist/lazy.mjs +3 -3
  37. package/dist/navigation.cjs +1 -1
  38. package/dist/navigation.mjs +4 -4
  39. package/dist/overlays.cjs +1 -1
  40. package/dist/overlays.mjs +2 -2
  41. package/dist/style.css +22 -7
  42. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),t=require("./core-DqlrEV-9.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-Dpfb_THi.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
+ };