@nice2dev/ui 1.0.14 → 1.0.15
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/dist/NiceErrorBoundary-CH8SBcSZ.js +762 -0
- package/dist/NiceErrorBoundary-CaVVPLh4.cjs +1 -0
- package/dist/NiceForm-Dbciuo4w.cjs +382 -0
- package/dist/NiceForm-Jf-ufPZz.js +5357 -0
- package/dist/NiceModal-Bf1Q1VNL.cjs +1 -0
- package/dist/NiceModal-DrywdSv3.js +95 -0
- package/dist/NiceModuleLifecyclePanel-CDX38sEx.js +6343 -0
- package/dist/NiceModuleLifecyclePanel-xLrOv8nL.cjs +1 -0
- package/dist/NicePagination-Aj63sKV3.js +171 -0
- package/dist/NicePagination-DNjVutBJ.cjs +1 -0
- package/dist/NicePinCodeInput-B_0RCKQN.cjs +419 -0
- package/dist/NicePinCodeInput-Dffu701_.js +11875 -0
- package/dist/NiceSavedQueryPanel-4l-V9dGK.js +6446 -0
- package/dist/NiceSavedQueryPanel-B5TjD_Sb.cjs +596 -0
- package/dist/NiceTabs-CbKhMxbC.cjs +1 -0
- package/dist/NiceTabs-HXphGn1B.js +1624 -0
- package/dist/NiceWindow-Ceb0mZ_0.js +1409 -0
- package/dist/NiceWindow-DXpnFZ0E.cjs +1 -0
- package/dist/charts-BPJefcE8.js +4645 -0
- package/dist/charts-Dr6QyMiv.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-DJ4NPp2B.js +22316 -0
- package/dist/core-DPY4m7vb.cjs +96 -0
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +2 -2
- package/dist/index-B-9lbtwJ.cjs +5194 -0
- package/dist/index-BNy9Nn0X.js +61422 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +69 -4
- package/dist/index.mjs +892 -890
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.mjs +13 -13
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +36 -36
- 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-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
|
+
};
|