@nice2dev/ui 1.0.29 → 1.0.31
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 +512 -0
- package/README.md +30 -31
- package/dist/NiceBackupStatusBadge.doc-Bx2bFmBQ.cjs +1 -0
- package/dist/NiceBackupStatusBadge.doc-CdDxIQ-M.js +25 -0
- package/dist/NiceCalendarScheduler.doc-BEtQkZjV.cjs +9 -0
- package/dist/NiceCalendarScheduler.doc-D__LRgOx.js +33 -0
- package/dist/NiceConfirmDialog-B57cl_F7.cjs +1 -0
- package/dist/NiceConfirmDialog-BiTJVR4-.js +81 -0
- package/dist/NiceConfirmDialog-Bjw_rN4o.cjs +1 -0
- package/dist/NiceConfirmDialog-N9fBTLYm.js +81 -0
- package/dist/NiceDrawingCanvas.doc-Dv5vB4gY.js +32 -0
- package/dist/NiceDrawingCanvas.doc-Ww9zz17x.cjs +8 -0
- package/dist/NiceErrorBoundary-1H751jK7.cjs +1 -0
- package/dist/NiceErrorBoundary-B-txoU3Y.js +709 -0
- package/dist/NiceErrorBoundary-BD-uqk_q.js +709 -0
- package/dist/NiceErrorBoundary-CIPXaYik.cjs +1 -0
- package/dist/NiceFileManagerViews.doc-CKlnm6cX.cjs +1 -0
- package/dist/NiceFileManagerViews.doc-Cg21DArG.js +25 -0
- package/dist/NiceForm-BNZB31Pg.js +4499 -0
- package/dist/NiceForm-CPyAXxBO.cjs +1 -0
- package/dist/NiceForm-DGUTmaZT.js +5014 -0
- package/dist/NiceForm-DmU-gmyv.cjs +382 -0
- package/dist/NiceMegaMenu.doc-7UyOCd3l.cjs +7 -0
- package/dist/NiceMegaMenu.doc-zeIyVa65.js +31 -0
- package/dist/NiceModal-BClAtR5T.js +95 -0
- package/dist/NiceModal-Bj53SKLI.js +95 -0
- package/dist/NiceModal-DC0UlQhc.cjs +1 -0
- package/dist/NiceModal-iKwtagFB.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-BBOg9g0b.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-BO8Hw_W9.js +7619 -0
- package/dist/NiceModuleLifecyclePanel-Ch7HRRoy.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-DtuXRiLR.js +6991 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-BVo-4KAD.js +172 -0
- package/dist/NicePagination-Bjxy9aEc.js +172 -0
- package/dist/NicePagination-CaohvQsY.cjs +1 -0
- package/dist/NicePagination-CfFfNwrg.cjs +1 -0
- package/dist/NicePinCodeInput-DsyLuc0b.cjs +696 -0
- package/dist/NicePinCodeInput-nuRCN-9R.js +13223 -0
- package/dist/NiceSavedQueryPanel-BBFV4qiF.js +6969 -0
- package/dist/NiceSavedQueryPanel-CH5c3rUG.js +6988 -0
- package/dist/NiceSavedQueryPanel-CsiVNkCT.cjs +596 -0
- package/dist/NiceSavedQueryPanel-aQrEmmcC.cjs +596 -0
- package/dist/NiceScannerControl-Cd5KXJA9.js +12769 -0
- package/dist/NiceScannerControl-DZsERSw_.cjs +698 -0
- package/dist/NiceScannerControl.css +1 -0
- package/dist/NiceWindow-BoDzlGk-.js +1621 -0
- package/dist/NiceWindow-Cm9E6EAi.cjs +1 -0
- package/dist/NiceWindow-DgONWxBm.cjs +1 -0
- package/dist/NiceWindow-FMrVS7zo.js +1603 -0
- package/dist/charts-B90sSFeJ.cjs +761 -0
- package/dist/charts-Bs0aDM0X.js +4671 -0
- package/dist/charts-DaLf19vS.js +4671 -0
- package/dist/charts-DjjKkw0q.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-BUTtIHg0.js +27766 -0
- package/dist/core-BUsZ7_vI.js +27914 -0
- package/dist/core-CESNSRyS.cjs +122 -0
- package/dist/core-CLfcCDKc.cjs +122 -0
- package/dist/data-branching-ByQdcjKO.cjs +1 -0
- package/dist/data-branching-D7l_kILW.cjs +1 -0
- package/dist/data-branching-lJ07lDN-.js +6255 -0
- package/dist/data-branching-psTzlcrT.js +6255 -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 +41 -37
- package/dist/data.mjs +18 -19
- package/dist/devops-Bi8MXtko.js +8165 -0
- package/dist/devops-D7bQ3rE4.cjs +17 -0
- package/dist/devops-On_1wRf9.cjs +17 -0
- package/dist/devops-jCmpD6O-.js +8165 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.mjs +3 -3
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +219 -431
- package/dist/editors.mjs +48 -56
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.mjs +3 -3
- package/dist/index-BDH1yDSg.js +69235 -0
- package/dist/index-BpixglWg.js +69337 -0
- package/dist/index-C9njkNOD.cjs +5470 -0
- package/dist/index-DLR-aWZR.cjs +5506 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +798 -1059
- package/dist/index.mjs +741 -756
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +24 -24
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +25 -213
- package/dist/navigation.mjs +143 -151
- package/dist/no-code-8lO7o6xi.js +7425 -0
- package/dist/no-code-BHo5WrXr.js +7425 -0
- package/dist/no-code-DyA_1_Th.cjs +332 -0
- package/dist/no-code-K8tOLNew.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.d.ts +12 -0
- package/dist/overlays.mjs +82 -82
- package/dist/pickerCommons-BEc3pZ_s.js +2044 -0
- package/dist/pickerCommons-CORo9j2a.js +2119 -0
- package/dist/pickerCommons-CrITwM88.cjs +1 -0
- package/dist/pickerCommons-D3WShRrR.cjs +1 -0
- package/dist/style.css +5 -5
- package/package.json +3 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",n="NiceMegaMenu",t="Mega menu with multi-column layouts and rich content.",o="navigation",c="1.0.0",i="planned",s=[{name:"items",type:"MegaMenuItem[]",required:!0,description:"Menu items"},{name:"onItemClick",type:"(item: MegaMenuItem) => void",description:"Item click callback"},{name:"trigger",type:"'click' | 'hover'",default:"'hover'",description:"Trigger type"},{name:"columns",type:"number",default:"4",description:"Column count"},{name:"showIcons",type:"boolean",default:"true",description:"Show item icons"},{name:"showDescriptions",type:"boolean",default:"true",description:"Show descriptions"},{name:"featured",type:"React.ReactNode",description:"Featured content"}],a=[{title:"Mega Menu",description:"Rich navigation menu",code:`<NiceMegaMenu
|
|
2
|
+
items={menuStructure}
|
|
3
|
+
onItemClick={handleNavigation}
|
|
4
|
+
columns={4}
|
|
5
|
+
showIcons
|
|
6
|
+
showDescriptions
|
|
7
|
+
/>`}],r={keyboard:["Tab through items","Arrow keys to navigate"],aria:["Menu role","Submenu announcements"]},u=["NiceMenu","NiceUserMenu"],m={$schema:e,name:n,description:t,category:o,since:c,status:i,props:s,examples:a,accessibility:r,seeAlso:u};exports.$schema=e;exports.accessibility=r;exports.category=o;exports.default=m;exports.description=t;exports.examples=a;exports.name=n;exports.props=s;exports.seeAlso=u;exports.since=c;exports.status=i;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceMegaMenu", t = "Mega menu with multi-column layouts and rich content.", o = "navigation", c = "1.0.0", i = "planned", s = [{ name: "items", type: "MegaMenuItem[]", required: !0, description: "Menu items" }, { name: "onItemClick", type: "(item: MegaMenuItem) => void", description: "Item click callback" }, { name: "trigger", type: "'click' | 'hover'", default: "'hover'", description: "Trigger type" }, { name: "columns", type: "number", default: "4", description: "Column count" }, { name: "showIcons", type: "boolean", default: "true", description: "Show item icons" }, { name: "showDescriptions", type: "boolean", default: "true", description: "Show descriptions" }, { name: "featured", type: "React.ReactNode", description: "Featured content" }], a = [{ title: "Mega Menu", description: "Rich navigation menu", code: `<NiceMegaMenu
|
|
2
|
+
items={menuStructure}
|
|
3
|
+
onItemClick={handleNavigation}
|
|
4
|
+
columns={4}
|
|
5
|
+
showIcons
|
|
6
|
+
showDescriptions
|
|
7
|
+
/>` }], r = { keyboard: ["Tab through items", "Arrow keys to navigate"], aria: ["Menu role", "Submenu announcements"] }, u = ["NiceMenu", "NiceUserMenu"], m = {
|
|
8
|
+
$schema: e,
|
|
9
|
+
name: n,
|
|
10
|
+
description: t,
|
|
11
|
+
category: o,
|
|
12
|
+
since: c,
|
|
13
|
+
status: i,
|
|
14
|
+
props: s,
|
|
15
|
+
examples: a,
|
|
16
|
+
accessibility: r,
|
|
17
|
+
seeAlso: u
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as $schema,
|
|
21
|
+
r as accessibility,
|
|
22
|
+
o as category,
|
|
23
|
+
m as default,
|
|
24
|
+
t as description,
|
|
25
|
+
a as examples,
|
|
26
|
+
n as name,
|
|
27
|
+
s as props,
|
|
28
|
+
u as seeAlso,
|
|
29
|
+
c as since,
|
|
30
|
+
i as status
|
|
31
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { G as L, E as g, r as F, b as S, S as $, o as j } from "./core-BUTtIHg0.js";
|
|
3
|
+
import { useContext as G, useRef as M, useState as P, useEffect as u } from "react";
|
|
4
|
+
import { createPortal as R } from "react-dom";
|
|
5
|
+
const A = ({
|
|
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 } = L(), p = G(g), m = M(null), [r, k] = P(!1), w = F("modal", i), x = S("modal", i);
|
|
21
|
+
if ($(m, l), u(() => {
|
|
22
|
+
if (!l || !c)
|
|
23
|
+
return;
|
|
24
|
+
const a = (E) => {
|
|
25
|
+
E.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__ */ n(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: m,
|
|
42
|
+
className: `nice-modal nice-modal--${r ? "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__ */ n("div", { className: "nice-modal__header", children: [
|
|
50
|
+
/* @__PURE__ */ e("h2", { className: "nice-modal__title", children: t }),
|
|
51
|
+
/* @__PURE__ */ n("div", { className: "nice-modal__header-actions", children: [
|
|
52
|
+
y && /* @__PURE__ */ e(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
className: "nice-modal__fullscreen",
|
|
57
|
+
onClick: () => k((a) => !a),
|
|
58
|
+
"aria-label": r ? "Exit fullscreen" : "Fullscreen",
|
|
59
|
+
children: /* @__PURE__ */ e(j, { name: r ? "collapse" : "expand", size: 16 })
|
|
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, p?.portalTarget ?? document.body);
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
A as N
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { G as L, E as g, r as F, a as $, x as j, o as G } from "./core-BUsZ7_vI.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 A = ({
|
|
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 } = L(), p = M(g), m = P(null), [r, x] = R(!1), k = F("modal", i), w = $("modal", i);
|
|
21
|
+
if (j(m, l), u(() => {
|
|
22
|
+
if (!l || !c)
|
|
23
|
+
return;
|
|
24
|
+
const a = (E) => {
|
|
25
|
+
E.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__ */ n(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: m,
|
|
42
|
+
className: `nice-modal nice-modal--${r ? "full" : f} nice-modal--ds-${w} ${_ || ""}`,
|
|
43
|
+
style: { ...k, ...b },
|
|
44
|
+
role: "dialog",
|
|
45
|
+
"aria-modal": "true",
|
|
46
|
+
"aria-label": t,
|
|
47
|
+
onClick: (a) => a.stopPropagation(),
|
|
48
|
+
children: [
|
|
49
|
+
t && /* @__PURE__ */ n("div", { className: "nice-modal__header", children: [
|
|
50
|
+
/* @__PURE__ */ e("h2", { className: "nice-modal__title", children: t }),
|
|
51
|
+
/* @__PURE__ */ n("div", { className: "nice-modal__header-actions", children: [
|
|
52
|
+
y && /* @__PURE__ */ e(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
className: "nice-modal__fullscreen",
|
|
57
|
+
onClick: () => x((a) => !a),
|
|
58
|
+
"aria-label": r ? "Exit fullscreen" : "Fullscreen",
|
|
59
|
+
children: /* @__PURE__ */ e(G, { name: r ? "collapse" : "expand", size: 16 })
|
|
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 z(C, p?.portalTarget ?? document.body);
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
A as N
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("./core-CLfcCDKc.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:x,zIndex:i,className:y,style:_,displayStyle:u})=>{const{t:j}=t.Gt(),b=a.useContext(t.Er),m=a.useRef(null),[o,N]=a.useState(!1),k=t.rc("modal",u),w=t.ac("modal",u);if(t.xc(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} ${y||""}`,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:[x&&e.jsx("button",{type:"button",className:"nice-modal__fullscreen",onClick:()=>N(s=>!s),"aria-label":o?"Exit fullscreen":"Fullscreen",children:e.jsx(t.oa,{name:o?"collapse":"expand",size:16})}),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 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("./core-CESNSRyS.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:x,zIndex:i,className:y,style:_,displayStyle:u})=>{const{t:j}=t.Gt(),b=a.useContext(t.Er),m=a.useRef(null),[o,N]=a.useState(!1),k=t.rc("modal",u),w=t.ac("modal",u);if(t.Sc(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} ${y||""}`,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:[x&&e.jsx("button",{type:"button",className:"nice-modal__fullscreen",onClick:()=>N(s=>!s),"aria-label":o?"Exit fullscreen":"Fullscreen",children:e.jsx(t.oa,{name:o?"collapse":"expand",size:16})}),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;
|