@nice2dev/ui 1.1.9 → 1.1.10
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 +74 -0
- package/README.md +17 -16
- package/dist/NiceCodeEditor-BfkH1bsZ.cjs +260 -0
- package/dist/NiceCodeEditor-CduGYggj.js +1179 -0
- package/dist/NiceColorPicker-CdUnhM-A.cjs +1 -0
- package/dist/NiceColorPicker-DpXwnDwL.js +598 -0
- package/dist/NiceConfirmDialog-B7aNRL2K.cjs +1 -0
- package/dist/NiceConfirmDialog-BdhWenrO.js +81 -0
- package/dist/NiceDataGrid-CVYEo_nv.cjs +10 -0
- package/dist/NiceDataGrid-D-rm4lu8.js +2217 -0
- package/dist/NiceDocumentViewer-BgcgLWJ3.cjs +180 -0
- package/dist/NiceDocumentViewer-sukmGhRx.js +672 -0
- package/dist/NiceForm-DVc0Xoly.js +4819 -0
- package/dist/NiceForm-qD_RKPYz.cjs +1 -0
- package/dist/NiceGantt-4UBd4uJ8.cjs +1 -0
- package/dist/NiceGantt-B_1lwEsp.js +328 -0
- package/dist/NiceHtmlEditor-Bce9Vwe1.cjs +10 -0
- package/dist/NiceHtmlEditor-CGRgcu2h.js +848 -0
- package/dist/NiceLoginForm-BTuQ0eKk.cjs +1 -0
- package/dist/NiceLoginForm-o1A-TBcp.js +736 -0
- package/dist/NiceMention-Dds9GQzk.cjs +430 -0
- package/dist/NiceMention-DlLXWddO.js +11268 -0
- package/dist/NiceModal-Dr1e3nQZ.cjs +1 -0
- package/dist/NiceModal-sihGCfDy.js +95 -0
- package/dist/NiceModuleLifecyclePanel-Du7G3-RG.js +7053 -0
- package/dist/NiceModuleLifecyclePanel-js1p7LIY.cjs +1 -0
- package/dist/NicePagination-D44waj9o.cjs +1 -0
- package/dist/NicePagination-DdxH8KMG.js +179 -0
- package/dist/NicePivotGrid-B2YHP3Z6.js +1183 -0
- package/dist/NicePivotGrid-BtVUWiud.cjs +152 -0
- package/dist/NiceSavedQueryPanel-C0A-eoYN.js +5142 -0
- package/dist/NiceSavedQueryPanel-ZrilZRtf.cjs +586 -0
- package/dist/NiceScheduler-KSzaUQxC.js +1693 -0
- package/dist/NiceScheduler-O3AwmdGG.cjs +5 -0
- package/dist/NiceSelect-BCbWtu1v.js +433 -0
- package/dist/NiceSelect-BqtiQbfD.cjs +1 -0
- package/dist/NiceWindow-BU1Ce7gS.js +1623 -0
- package/dist/NiceWindow-jjdE6vGy.cjs +1 -0
- package/dist/charts-C44vJber.cjs +768 -0
- package/dist/charts-XVlDwU0y.js +4732 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +8 -8
- package/dist/core-BxiH7vkV.cjs +1 -0
- package/dist/core-DMV6_SEE.js +795 -0
- package/dist/data-branching-oEH04O3i.js +6273 -0
- package/dist/data-branching-wmsbLNfa.cjs +1 -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 +2 -2
- package/dist/data.mjs +3 -3
- package/dist/devops-Bt6EsfPa.cjs +17 -0
- package/dist/devops-CnZQ1rU5.js +8312 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +2 -1
- package/dist/editors.mjs +7 -7
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +3 -3
- package/dist/index.cjs +142 -142
- package/dist/index.d.ts +45 -26
- package/dist/index.mjs +7480 -7459
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +69 -69
- package/dist/no-code-4GtIBr6f.js +7503 -0
- package/dist/no-code-Bdwh1vyS.cjs +332 -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 +102 -102
- package/dist/pickerCommons-31hyz1gs.js +1122 -0
- package/dist/pickerCommons-BifIkPdk.cjs +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("@nice2dev/ui-core"),a=require("react"),L=require("react-dom"),g=({open:l,onClose:n,title:o,size:f="md",children:h,footer:i,closeOnOverlay:y=!0,closeOnEscape:r=!0,fullscreenable:v,zIndex:d,className:x,style:N,displayStyle:u})=>{const{t:_}=t.useNiceTranslation(),j=a.useContext(t.NiceThemeContext),m=a.useRef(null),[c,b]=a.useState(!1),C=t.useComponentDisplayStyle("modal",u),p=t.useComponentDisplayClass("modal",u);if(t.useFocusTrap(m,l),a.useEffect(()=>{if(!l||!r)return;const s=w=>{w.key==="Escape"&&n()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[l,r,n]),a.useEffect(()=>(l?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[l]),!l||typeof document>"u")return null;const k=e.jsx("div",{className:"nice-modal-overlay",style:d?{zIndex:d}:void 0,onClick:y?n:void 0,children:e.jsxs("div",{ref:m,className:`nice-modal nice-modal--${c?"full":f} nice-modal--ds-${p} ${x||""}`,style:{...C,...N},role:"dialog","aria-modal":"true","aria-label":o,onClick:s=>s.stopPropagation(),children:[o&&e.jsxs("div",{className:"nice-modal__header",children:[e.jsx("h2",{className:"nice-modal__title",children:o}),e.jsxs("div",{className:"nice-modal__header-actions",children:[v&&e.jsx("button",{type:"button",className:"nice-modal__fullscreen",onClick:()=>b(s=>!s),"aria-label":c?"Exit fullscreen":"Fullscreen",children:e.jsx(t.NiceIcon,{name:c?"collapse":"expand",size:16})}),e.jsx("button",{type:"button",className:"nice-modal__close",onClick:n,"aria-label":_("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}),i&&e.jsx("div",{className:"nice-modal__footer",children:i})]})});return L.createPortal(k,j?.portalTarget??document.body)};exports.NiceModal=g;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useNiceTranslation as g, NiceThemeContext as E, useComponentDisplayStyle as F, useComponentDisplayClass as T, useFocusTrap as $, NiceIcon as j } from "@nice2dev/ui-core";
|
|
3
|
+
import { useContext as D, useRef as M, useState as P, useEffect as u } from "react";
|
|
4
|
+
import { createPortal as R } from "react-dom";
|
|
5
|
+
const q = ({
|
|
6
|
+
open: l,
|
|
7
|
+
onClose: a,
|
|
8
|
+
title: t,
|
|
9
|
+
size: f = "md",
|
|
10
|
+
children: h,
|
|
11
|
+
footer: r,
|
|
12
|
+
closeOnOverlay: y = !0,
|
|
13
|
+
closeOnEscape: c = !0,
|
|
14
|
+
fullscreenable: v,
|
|
15
|
+
zIndex: i,
|
|
16
|
+
className: p,
|
|
17
|
+
style: N,
|
|
18
|
+
displayStyle: d
|
|
19
|
+
}) => {
|
|
20
|
+
const { t: _ } = g(), b = D(E), m = M(null), [n, C] = P(!1), x = F("modal", d), k = T("modal", d);
|
|
21
|
+
if ($(m, l), u(() => {
|
|
22
|
+
if (!l || !c)
|
|
23
|
+
return;
|
|
24
|
+
const o = (L) => {
|
|
25
|
+
L.key === "Escape" && a();
|
|
26
|
+
};
|
|
27
|
+
return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
|
|
28
|
+
}, [l, c, a]), 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 w = /* @__PURE__ */ e(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: "nice-modal-overlay",
|
|
36
|
+
style: i ? { zIndex: i } : void 0,
|
|
37
|
+
onClick: y ? a : void 0,
|
|
38
|
+
children: /* @__PURE__ */ s(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: m,
|
|
42
|
+
className: `nice-modal nice-modal--${n ? "full" : f} nice-modal--ds-${k} ${p || ""}`,
|
|
43
|
+
style: { ...x, ...N },
|
|
44
|
+
role: "dialog",
|
|
45
|
+
"aria-modal": "true",
|
|
46
|
+
"aria-label": t,
|
|
47
|
+
onClick: (o) => o.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
|
+
v && /* @__PURE__ */ e(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
className: "nice-modal__fullscreen",
|
|
57
|
+
onClick: () => C((o) => !o),
|
|
58
|
+
"aria-label": n ? "Exit fullscreen" : "Fullscreen",
|
|
59
|
+
children: /* @__PURE__ */ e(j, { name: n ? "collapse" : "expand", size: 16 })
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
className: "nice-modal__close",
|
|
67
|
+
onClick: a,
|
|
68
|
+
"aria-label": _("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
|
+
r && /* @__PURE__ */ e("div", { className: "nice-modal__footer", children: r })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
return R(w, b?.portalTarget ?? document.body);
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
q as N
|
|
95
|
+
};
|