@nice2dev/ui 1.0.12 → 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/CHANGELOG.md +28 -0
- package/README.md +53 -36
- package/css/legacy-bg-text-aliases.css +83 -0
- package/dist/NiceErrorBoundary-BLTq8mPU.cjs +1 -0
- package/dist/NiceErrorBoundary-Bjw5U31n.js +762 -0
- package/dist/NiceErrorBoundary-CH8SBcSZ.js +762 -0
- package/dist/NiceErrorBoundary-CaVVPLh4.cjs +1 -0
- package/dist/NiceForm-CUlhtlHw.js +5357 -0
- package/dist/NiceForm-DTgIGX88.cjs +382 -0
- package/dist/NiceForm-Dbciuo4w.cjs +382 -0
- package/dist/NiceForm-Jf-ufPZz.js +5357 -0
- package/dist/NiceForm.css +1 -1
- package/dist/NiceModal-Bf1Q1VNL.cjs +1 -0
- package/dist/NiceModal-C_t2qqZd.js +95 -0
- package/dist/NiceModal-DrywdSv3.js +95 -0
- package/dist/NiceModal-FQqBxCij.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-CCFHxKIu.js +6343 -0
- package/dist/NiceModuleLifecyclePanel-CDX38sEx.js +6343 -0
- package/dist/NiceModuleLifecyclePanel-D8cIOI8I.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-xLrOv8nL.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NicePagination-Aj63sKV3.js +171 -0
- package/dist/NicePagination-BVkkePJU.js +171 -0
- package/dist/NicePagination-DGd3Hrh9.cjs +1 -0
- package/dist/NicePagination-DNjVutBJ.cjs +1 -0
- package/dist/NicePinCodeInput-B_0RCKQN.cjs +419 -0
- package/dist/NicePinCodeInput-CDtodnIM.js +11875 -0
- package/dist/NicePinCodeInput-Dffu701_.js +11875 -0
- package/dist/NicePinCodeInput-DytLfqZL.cjs +419 -0
- package/dist/NicePinCodeInput.css +1 -1
- package/dist/NiceSavedQueryPanel-4l-V9dGK.js +6446 -0
- package/dist/NiceSavedQueryPanel-B5TjD_Sb.cjs +596 -0
- package/dist/NiceSavedQueryPanel-CbR3EDQU.cjs +596 -0
- package/dist/NiceSavedQueryPanel-DJqCNWYZ.js +6446 -0
- package/dist/NiceTabs-B-9_mzpc.js +1624 -0
- package/dist/NiceTabs-CHg36waF.cjs +1 -0
- package/dist/NiceTabs-CbKhMxbC.cjs +1 -0
- package/dist/NiceTabs-HXphGn1B.js +1624 -0
- package/dist/NiceWindow-BxGVzUs2.js +1409 -0
- package/dist/NiceWindow-Ceb0mZ_0.js +1409 -0
- package/dist/NiceWindow-DXpnFZ0E.cjs +1 -0
- package/dist/NiceWindow-HhPIzPzs.cjs +1 -0
- package/dist/charts-BPJefcE8.js +4645 -0
- package/dist/charts-Dr6QyMiv.cjs +761 -0
- package/dist/charts-Us8Ep8MJ.cjs +761 -0
- package/dist/charts-fO6InNZd.js +4645 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/core-B-tu8l9M.cjs +96 -0
- package/dist/core-BJ_UNMlX.js +22276 -0
- package/dist/core-DJ4NPp2B.js +22316 -0
- package/dist/core-DPY4m7vb.cjs +96 -0
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +7 -0
- 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-DHc_KZkF.js +61311 -0
- package/dist/index-drIVMHeC.cjs +5194 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1209 -67
- package/dist/index.mjs +887 -871
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +309 -70
- package/dist/navigation.mjs +92 -91
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +36 -36
- package/dist/style.css +7 -0
- package/package.json +9 -5
package/dist/navigation.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as ae, a as ie, b as ce, c as se, d as le, e as
|
|
1
|
+
import { D as ae, a as ie, b as ce, c as se, d as le, e as te, N as re, f as oe, g as de, h as ue, i as be, j as me, k as _e, l as he, m as pe, n as Ne, o as ve, p as ke, q as ye, r as fe, s as ge, t as $e, u as xe, v as we, w as Me, x as Ce, y as De, z as Se, A as Ee, B as Ie, C as Te, E as Ae, F as Pe, G as Be, H as Le, I as Re, J as We, K as Ke, L as Oe, M as Fe, O as He, P as je, Q as ze, S as Ue } from "./NiceModuleLifecyclePanel-CDX38sEx.js";
|
|
2
2
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { forwardRef as T, useState as
|
|
5
|
-
import { f as
|
|
6
|
-
import { N as
|
|
3
|
+
import { k as E, _ as I, $ as W } from "./core-DJ4NPp2B.js";
|
|
4
|
+
import { forwardRef as T, useState as P, useCallback as B, useEffect as z } from "react";
|
|
5
|
+
import { f as qe } from "./NiceTabs-HXphGn1B.js";
|
|
6
|
+
import { N as Qe } from "./NicePagination-Aj63sKV3.js";
|
|
7
7
|
const U = T(
|
|
8
8
|
({
|
|
9
9
|
items: b,
|
|
@@ -20,25 +20,25 @@ const U = T(
|
|
|
20
20
|
style: $,
|
|
21
21
|
id: y,
|
|
22
22
|
accessMode: x,
|
|
23
|
-
...
|
|
23
|
+
...w
|
|
24
24
|
}, N) => {
|
|
25
|
-
const i = E(y),
|
|
25
|
+
const i = E(y), r = I(x, y), [s, u] = P(/* @__PURE__ */ new Set()), t = B((n) => {
|
|
26
26
|
u((D) => {
|
|
27
27
|
const a = new Set(D);
|
|
28
28
|
return a.has(n) ? a.delete(n) : a.add(n), a;
|
|
29
29
|
});
|
|
30
30
|
}, []);
|
|
31
|
-
if (
|
|
31
|
+
if (r === "hidden")
|
|
32
32
|
return null;
|
|
33
33
|
const h = (n, D = 0) => {
|
|
34
|
-
const a = n.children && n.children.length > 0, A = s.has(n.key),
|
|
34
|
+
const a = n.children && n.children.length > 0, A = s.has(n.key), M = n.key === m;
|
|
35
35
|
return /* @__PURE__ */ o("li", { className: "nice-sidebar-menu__item", children: [
|
|
36
36
|
/* @__PURE__ */ o(
|
|
37
37
|
"button",
|
|
38
38
|
{
|
|
39
|
-
className: `nice-sidebar-menu__btn ${
|
|
39
|
+
className: `nice-sidebar-menu__btn ${M ? "nice-sidebar-menu__btn--active" : ""} ${n.disabled ? "nice-sidebar-menu__btn--disabled" : ""}`,
|
|
40
40
|
style: { paddingLeft: c ? void 0 : 12 + D * 16 },
|
|
41
|
-
onClick: () => a ?
|
|
41
|
+
onClick: () => a ? t(n.key) : v?.(n),
|
|
42
42
|
disabled: n.disabled,
|
|
43
43
|
title: c ? n.text : void 0,
|
|
44
44
|
type: "button",
|
|
@@ -60,7 +60,7 @@ const U = T(
|
|
|
60
60
|
id: i,
|
|
61
61
|
className: `nice-sidebar-menu nice-sidebar-menu--${_} ${c ? "nice-sidebar-menu--collapsed" : ""} ${g ?? ""}`,
|
|
62
62
|
style: { ...$, width: c ? l : p },
|
|
63
|
-
...
|
|
63
|
+
...w,
|
|
64
64
|
children: [
|
|
65
65
|
k && /* @__PURE__ */ e("div", { className: "nice-sidebar-menu__header", children: k }),
|
|
66
66
|
/* @__PURE__ */ e("ul", { className: "nice-sidebar-menu__list", role: "list", children: b.map((n) => h(n)) }),
|
|
@@ -85,7 +85,7 @@ const V = T(
|
|
|
85
85
|
accessMode: _,
|
|
86
86
|
...g
|
|
87
87
|
}, $) => {
|
|
88
|
-
const y = E(d), x = I(_, d), [
|
|
88
|
+
const y = E(d), x = I(_, d), [w, N] = P(null);
|
|
89
89
|
return x === "hidden" ? null : /* @__PURE__ */ o(
|
|
90
90
|
"nav",
|
|
91
91
|
{
|
|
@@ -97,32 +97,32 @@ const V = T(
|
|
|
97
97
|
children: [
|
|
98
98
|
p && /* @__PURE__ */ e("div", { className: "nice-top-menu__brand", children: p }),
|
|
99
99
|
/* @__PURE__ */ e("ul", { className: "nice-top-menu__items", role: "menubar", children: b.map((i) => {
|
|
100
|
-
const
|
|
100
|
+
const r = i.children && i.children.length > 0, s = w === i.key;
|
|
101
101
|
return /* @__PURE__ */ o(
|
|
102
102
|
"li",
|
|
103
103
|
{
|
|
104
104
|
className: "nice-top-menu__item",
|
|
105
|
-
onMouseEnter: () =>
|
|
106
|
-
onMouseLeave: () =>
|
|
105
|
+
onMouseEnter: () => r && N(i.key),
|
|
106
|
+
onMouseLeave: () => r && N(null),
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ o(
|
|
109
109
|
"button",
|
|
110
110
|
{
|
|
111
111
|
className: `nice-top-menu__btn ${i.key === m ? "nice-top-menu__btn--active" : ""}`,
|
|
112
|
-
onClick: () =>
|
|
112
|
+
onClick: () => r ? N(s ? null : i.key) : c?.(i),
|
|
113
113
|
role: "menuitem",
|
|
114
|
-
"aria-haspopup":
|
|
114
|
+
"aria-haspopup": r,
|
|
115
115
|
"aria-expanded": s,
|
|
116
116
|
disabled: i.disabled,
|
|
117
117
|
type: "button",
|
|
118
118
|
children: [
|
|
119
119
|
i.icon && /* @__PURE__ */ e("span", { children: i.icon }),
|
|
120
120
|
/* @__PURE__ */ e("span", { children: i.text }),
|
|
121
|
-
|
|
121
|
+
r && /* @__PURE__ */ e("span", { className: "nice-top-menu__chevron", children: "▾" })
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
|
|
125
|
+
r && s && /* @__PURE__ */ e("ul", { className: "nice-top-menu__dropdown", role: "menu", children: i.children.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
126
126
|
"button",
|
|
127
127
|
{
|
|
128
128
|
className: `nice-top-menu__dropdown-btn ${u.key === m ? "nice-top-menu__dropdown-btn--active" : ""}`,
|
|
@@ -166,13 +166,13 @@ const q = T(
|
|
|
166
166
|
accessMode: g,
|
|
167
167
|
...$
|
|
168
168
|
}, y) => {
|
|
169
|
-
const x = E(_),
|
|
170
|
-
(
|
|
171
|
-
i(
|
|
169
|
+
const x = E(_), w = I(g, _), [N, i] = P(m ?? b[0]?.key), r = m ?? N, s = b.find((t) => t.key === r), u = B(
|
|
170
|
+
(t) => {
|
|
171
|
+
i(t), c?.(t);
|
|
172
172
|
},
|
|
173
173
|
[c]
|
|
174
174
|
);
|
|
175
|
-
return
|
|
175
|
+
return w === "hidden" ? null : /* @__PURE__ */ o(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
178
178
|
ref: y,
|
|
@@ -182,17 +182,17 @@ const q = T(
|
|
|
182
182
|
...$,
|
|
183
183
|
children: [
|
|
184
184
|
/* @__PURE__ */ o("div", { className: "nice-ribbon-menu__tabs", role: "tablist", children: [
|
|
185
|
-
b.map((
|
|
185
|
+
b.map((t) => /* @__PURE__ */ e(
|
|
186
186
|
"button",
|
|
187
187
|
{
|
|
188
|
-
className: `nice-ribbon-menu__tab ${
|
|
189
|
-
onClick: () => u(
|
|
188
|
+
className: `nice-ribbon-menu__tab ${t.key === r ? "nice-ribbon-menu__tab--active" : ""}`,
|
|
189
|
+
onClick: () => u(t.key),
|
|
190
190
|
role: "tab",
|
|
191
|
-
"aria-selected":
|
|
191
|
+
"aria-selected": t.key === r,
|
|
192
192
|
type: "button",
|
|
193
|
-
children:
|
|
193
|
+
children: t.label
|
|
194
194
|
},
|
|
195
|
-
|
|
195
|
+
t.key
|
|
196
196
|
)),
|
|
197
197
|
/* @__PURE__ */ e(
|
|
198
198
|
"button",
|
|
@@ -205,8 +205,8 @@ const q = T(
|
|
|
205
205
|
}
|
|
206
206
|
)
|
|
207
207
|
] }),
|
|
208
|
-
!l && s && /* @__PURE__ */ e("div", { className: "nice-ribbon-menu__panel", role: "tabpanel", children: s.groups.map((
|
|
209
|
-
/* @__PURE__ */ e("div", { className: "nice-ribbon-menu__group-items", children:
|
|
208
|
+
!l && s && /* @__PURE__ */ e("div", { className: "nice-ribbon-menu__panel", role: "tabpanel", children: s.groups.map((t, h) => /* @__PURE__ */ o("div", { className: "nice-ribbon-menu__group", children: [
|
|
209
|
+
/* @__PURE__ */ e("div", { className: "nice-ribbon-menu__group-items", children: t.items.map((n) => /* @__PURE__ */ o(
|
|
210
210
|
"button",
|
|
211
211
|
{
|
|
212
212
|
className: "nice-ribbon-menu__item",
|
|
@@ -220,7 +220,7 @@ const q = T(
|
|
|
220
220
|
},
|
|
221
221
|
n.key
|
|
222
222
|
)) }),
|
|
223
|
-
/* @__PURE__ */ e("div", { className: "nice-ribbon-menu__group-label", children:
|
|
223
|
+
/* @__PURE__ */ e("div", { className: "nice-ribbon-menu__group-label", children: t.label })
|
|
224
224
|
] }, h)) })
|
|
225
225
|
]
|
|
226
226
|
}
|
|
@@ -243,13 +243,13 @@ const J = T(
|
|
|
243
243
|
accessMode: g,
|
|
244
244
|
...$
|
|
245
245
|
}, y) => {
|
|
246
|
-
const x = E(_),
|
|
247
|
-
return
|
|
246
|
+
const x = E(_), w = I(g, _), [N, i] = P(!1), r = !l || N;
|
|
247
|
+
return w === "hidden" ? null : /* @__PURE__ */ e(
|
|
248
248
|
"div",
|
|
249
249
|
{
|
|
250
250
|
ref: y,
|
|
251
251
|
id: x,
|
|
252
|
-
className: `nice-dock-menu nice-dock-menu--${p} nice-dock-menu--${C} ${l && !
|
|
252
|
+
className: `nice-dock-menu nice-dock-menu--${p} nice-dock-menu--${C} ${l && !r ? "nice-dock-menu--hidden" : ""} ${k ?? ""}`,
|
|
253
253
|
style: d,
|
|
254
254
|
onMouseEnter: () => i(!0),
|
|
255
255
|
onMouseLeave: () => i(!1),
|
|
@@ -291,25 +291,25 @@ const Q = T(
|
|
|
291
291
|
style: $,
|
|
292
292
|
id: y,
|
|
293
293
|
accessMode: x,
|
|
294
|
-
...
|
|
294
|
+
...w
|
|
295
295
|
}, N) => {
|
|
296
|
-
const i = E(y),
|
|
296
|
+
const i = E(y), r = I(x, y), { t: s } = W(), [u, t] = P(!1), h = p ?? u, n = B(() => {
|
|
297
297
|
const a = !h;
|
|
298
|
-
|
|
299
|
-
}, [h, l]), D =
|
|
298
|
+
t(a), l?.(a);
|
|
299
|
+
}, [h, l]), D = B(
|
|
300
300
|
(a) => {
|
|
301
|
-
c?.(a),
|
|
301
|
+
c?.(a), t(!1), l?.(!1);
|
|
302
302
|
},
|
|
303
303
|
[c, l]
|
|
304
304
|
);
|
|
305
|
-
return
|
|
305
|
+
return r === "hidden" ? null : /* @__PURE__ */ o(
|
|
306
306
|
"div",
|
|
307
307
|
{
|
|
308
308
|
ref: N,
|
|
309
309
|
id: i,
|
|
310
310
|
className: `nice-hamburger-menu nice-hamburger-menu--${_} ${g ?? ""}`,
|
|
311
311
|
style: $,
|
|
312
|
-
...
|
|
312
|
+
...w,
|
|
313
313
|
children: [
|
|
314
314
|
/* @__PURE__ */ e(
|
|
315
315
|
"button",
|
|
@@ -381,17 +381,17 @@ const X = T(
|
|
|
381
381
|
variant: $ = "default",
|
|
382
382
|
tooltipPosition: y = "bottom",
|
|
383
383
|
backIcon: x,
|
|
384
|
-
forwardIcon:
|
|
384
|
+
forwardIcon: w,
|
|
385
385
|
refreshIcon: N,
|
|
386
386
|
stopIcon: i,
|
|
387
|
-
className:
|
|
387
|
+
className: r,
|
|
388
388
|
style: s,
|
|
389
389
|
id: u,
|
|
390
|
-
accessMode:
|
|
390
|
+
accessMode: t,
|
|
391
391
|
disabled: h,
|
|
392
392
|
...n
|
|
393
393
|
}, D) => {
|
|
394
|
-
const a = E(u), A = I(
|
|
394
|
+
const a = E(u), A = I(t, u), { t: M } = W();
|
|
395
395
|
if (z(() => {
|
|
396
396
|
if (!v || h)
|
|
397
397
|
return;
|
|
@@ -423,7 +423,7 @@ const X = T(
|
|
|
423
423
|
strokeWidth: "2",
|
|
424
424
|
children: /* @__PURE__ */ e("polyline", { points: "15 18 9 12 15 6" })
|
|
425
425
|
}
|
|
426
|
-
), O =
|
|
426
|
+
), O = w ?? /* @__PURE__ */ e(
|
|
427
427
|
"svg",
|
|
428
428
|
{
|
|
429
429
|
width: "16",
|
|
@@ -468,10 +468,10 @@ const X = T(
|
|
|
468
468
|
{
|
|
469
469
|
ref: D,
|
|
470
470
|
id: a,
|
|
471
|
-
className: `nice-nav-controls nice-nav-controls--${g} nice-nav-controls--${$}${S ? " nice-nav-controls--disabled" : ""}${
|
|
471
|
+
className: `nice-nav-controls nice-nav-controls--${g} nice-nav-controls--${$}${S ? " nice-nav-controls--disabled" : ""}${r ? ` ${r}` : ""}`,
|
|
472
472
|
style: s,
|
|
473
473
|
role: "navigation",
|
|
474
|
-
"aria-label":
|
|
474
|
+
"aria-label": M("nav.controls", "Navigation controls"),
|
|
475
475
|
...n,
|
|
476
476
|
children: [
|
|
477
477
|
/* @__PURE__ */ e(
|
|
@@ -481,8 +481,8 @@ const X = T(
|
|
|
481
481
|
className: `nice-nav-controls__btn nice-nav-controls__btn--back${b ? "" : " nice-nav-controls__btn--disabled"}`,
|
|
482
482
|
onClick: c,
|
|
483
483
|
disabled: S || !b,
|
|
484
|
-
"aria-label":
|
|
485
|
-
title: `${
|
|
484
|
+
"aria-label": M("nav.back", "Back"),
|
|
485
|
+
title: `${M("nav.back", "Back")} (Alt+←)`,
|
|
486
486
|
children: K
|
|
487
487
|
}
|
|
488
488
|
),
|
|
@@ -493,8 +493,8 @@ const X = T(
|
|
|
493
493
|
className: `nice-nav-controls__btn nice-nav-controls__btn--forward${m ? "" : " nice-nav-controls__btn--disabled"}`,
|
|
494
494
|
onClick: p,
|
|
495
495
|
disabled: S || !m,
|
|
496
|
-
"aria-label":
|
|
497
|
-
title: `${
|
|
496
|
+
"aria-label": M("nav.forward", "Forward"),
|
|
497
|
+
title: `${M("nav.forward", "Forward")} (Alt+→)`,
|
|
498
498
|
children: O
|
|
499
499
|
}
|
|
500
500
|
),
|
|
@@ -505,8 +505,8 @@ const X = T(
|
|
|
505
505
|
className: "nice-nav-controls__btn nice-nav-controls__btn--stop nice-nav-controls__btn--loading",
|
|
506
506
|
onClick: _,
|
|
507
507
|
disabled: S,
|
|
508
|
-
"aria-label":
|
|
509
|
-
title: `${
|
|
508
|
+
"aria-label": M("nav.stop", "Stop"),
|
|
509
|
+
title: `${M("nav.stop", "Stop")} (Esc)`,
|
|
510
510
|
children: H
|
|
511
511
|
}
|
|
512
512
|
) : /* @__PURE__ */ e(
|
|
@@ -516,8 +516,8 @@ const X = T(
|
|
|
516
516
|
className: "nice-nav-controls__btn nice-nav-controls__btn--refresh",
|
|
517
517
|
onClick: l,
|
|
518
518
|
disabled: S,
|
|
519
|
-
"aria-label":
|
|
520
|
-
title: `${
|
|
519
|
+
"aria-label": M("nav.refresh", "Refresh"),
|
|
520
|
+
title: `${M("nav.refresh", "Refresh")} (F5)`,
|
|
521
521
|
children: F
|
|
522
522
|
}
|
|
523
523
|
))
|
|
@@ -533,50 +533,51 @@ export {
|
|
|
533
533
|
ce as DesktopGrid,
|
|
534
534
|
se as DesktopStartMenu,
|
|
535
535
|
le as DesktopSystemTray,
|
|
536
|
-
|
|
537
|
-
|
|
536
|
+
te as DesktopTaskbar,
|
|
537
|
+
re as NiceAccordion,
|
|
538
538
|
oe as NiceAppLayout,
|
|
539
|
-
de as
|
|
540
|
-
ue as
|
|
541
|
-
be as
|
|
542
|
-
me as
|
|
543
|
-
_e as
|
|
544
|
-
he as
|
|
545
|
-
pe as
|
|
546
|
-
Ne as
|
|
547
|
-
ve as
|
|
548
|
-
ke as
|
|
549
|
-
ye as
|
|
539
|
+
de as NiceAuthButtons,
|
|
540
|
+
ue as NiceBottomNavigation,
|
|
541
|
+
be as NiceBreadcrumb,
|
|
542
|
+
me as NiceCard,
|
|
543
|
+
_e as NiceClassicShell,
|
|
544
|
+
he as NiceCompactShell,
|
|
545
|
+
pe as NiceConsole,
|
|
546
|
+
Ne as NiceContextMenu,
|
|
547
|
+
ve as NiceDashboardLayout,
|
|
548
|
+
ke as NiceDashboardShell,
|
|
549
|
+
ye as NiceDesktop,
|
|
550
|
+
fe as NiceDock,
|
|
550
551
|
J as NiceDockMenu,
|
|
551
|
-
|
|
552
|
+
ge as NiceDynamicSidebar,
|
|
552
553
|
Q as NiceHamburgerMenu,
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
Me as
|
|
557
|
-
we as NiceMenu,
|
|
554
|
+
$e as NiceHybridShell,
|
|
555
|
+
xe as NiceKioskShell,
|
|
556
|
+
we as NiceMdiWorkspace,
|
|
557
|
+
Me as NiceMenu,
|
|
558
558
|
Ce as NiceMinimalShell,
|
|
559
559
|
De as NiceModeSelector,
|
|
560
560
|
Se as NiceModernShell,
|
|
561
561
|
Ee as NiceModuleLifecyclePanel,
|
|
562
562
|
Ie as NiceMultiView,
|
|
563
|
-
Te as
|
|
563
|
+
Te as NiceNavMenu,
|
|
564
|
+
Ae as NiceNavbar,
|
|
564
565
|
X as NiceNavigationControls,
|
|
565
|
-
|
|
566
|
+
Pe as NiceOnboardingWizard,
|
|
566
567
|
Be as NiceOrganizationProfileForm,
|
|
567
|
-
|
|
568
|
-
|
|
568
|
+
Qe as NicePagination,
|
|
569
|
+
Le as NicePwaShell,
|
|
569
570
|
q as NiceRibbonMenu,
|
|
570
|
-
|
|
571
|
+
Re as NiceSetupWizard,
|
|
571
572
|
U as NiceSidebarMenu,
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
573
|
+
We as NiceSidebarNav,
|
|
574
|
+
Ke as NiceSplitter,
|
|
575
|
+
Oe as NiceTabPanel,
|
|
576
|
+
qe as NiceTabs,
|
|
577
|
+
Fe as NiceTenantSwitcher,
|
|
578
|
+
He as NiceToolbar,
|
|
578
579
|
V as NiceTopMenu,
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
je as NiceUserMenu,
|
|
581
|
+
ze as NiceWizard,
|
|
582
|
+
Ue as SIDEBAR_MODE_META
|
|
582
583
|
};
|
package/dist/overlays.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./NiceWindow-DXpnFZ0E.cjs"),r=require("react/jsx-runtime"),M=require("./core-DPY4m7vb.cjs"),e=require("react"),B=require("react-dom");function Y(){const t=e.useContext(M.nr);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const W=({open:t,onClose:s,children:v,title:a,size:g="md",closeOnBackdropClick:l=!0,closeOnEscape:d=!0,disableFocusTrap:u=!1,disableBodyScroll:j=!0,zIndex:_=1e3,className:p,style:C})=>{const w=e.useRef(null);M.As(w,t&&!u);const y=Y();e.useEffect(()=>{if(!j&&t){const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=n}}},[t,j]),e.useEffect(()=>{if(!d||!t)return;const n=x=>{x.key==="Escape"&&(x.preventDefault(),s())};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[d,t,s]);const f=e.useCallback(n=>{l&&n.target===n.currentTarget&&s()},[l,s]);if(!t)return null;const i={sm:"nice-modal--sm",md:"nice-modal--md",lg:"nice-modal--lg",xl:"nice-modal--xl",full:"nice-modal--full"}[g];return B.createPortal(r.jsx("div",{className:"nice-modal__overlay",style:{zIndex:_},onClick:f,role:"presentation",children:r.jsx("div",{ref:w,className:`nice-modal ${i} ${p||""}`,role:"dialog","aria-modal":"true","aria-label":a,style:C,tabIndex:-1,children:v})}),y)},q=({children:t,showClose:s=!0,onClose:v,className:a})=>r.jsxs("div",{className:`nice-modal__header ${a||""}`,children:[r.jsx("div",{className:"nice-modal__title",children:t}),s&&v&&r.jsx("button",{type:"button",className:"nice-modal__close",onClick:v,"aria-label":"Close",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"M4 4l12 12M4 16L16 4"})})})]}),O=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__body ${s||""}`,children:t}),X=({children:t,className:s})=>r.jsx("div",{className:`nice-modal__footer ${s||""}`,children:t}),A=({open:t,onClose:s,children:v,position:a="right",size:g=320,title:l,closeOnBackdropClick:d=!0,closeOnEscape:u=!0,swipeToClose:j=!0,zIndex:_=1e3,className:p,style:C})=>{const w=e.useRef(null),[y,f]=e.useState(!1),[i,n]=e.useState(0);M.As(w,t);const x=Y();e.useEffect(()=>{if(!u||!t)return;const o=k=>{k.key==="Escape"&&(k.preventDefault(),s())};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[u,t,s]);const h=e.useCallback(o=>{let k=0;switch(a){case"left":k=Math.min(0,o.deltaX);break;case"right":k=Math.max(0,o.deltaX);break;case"top":k=Math.min(0,o.deltaY);break;case"bottom":k=Math.max(0,o.deltaY);break}n(k)},[a]),D=e.useCallback(o=>{let E=!1;switch(a){case"left":E=o.deltaX<-100;break;case"right":E=o.deltaX>100;break;case"top":E=o.deltaY<-100;break;case"bottom":E=o.deltaY>100;break}E&&(M.Dr("light"),s()),n(0),f(!1)},[a,s]),{ref:P}=M.qs({enabled:j&&t,onPanStart:()=>f(!0),onPan:h,onPanEnd:D}),$=e.useCallback(o=>{d&&o.target===o.currentTarget&&s()},[d,s]);if(!t)return null;const S=a==="left"||a==="right",L=S?{width:typeof g=="number"?`${g}px`:g}:{height:typeof g=="number"?`${g}px`:g},c=()=>{if(y)return S?`translateX(${i}px)`:`translateY(${i}px)`};return B.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-drawer__overlay ${t?"nice-drawer__overlay--visible":""}`,style:{zIndex:_},onClick:$}),r.jsx("div",{ref:o=>{w.current=o,P.current=o},className:`nice-drawer nice-drawer--${a} ${t?"nice-drawer--open":""} ${p||""}`,style:{...L,zIndex:_+1,transform:c(),transition:y?"none":void 0,...C},role:"dialog","aria-modal":"true","aria-label":l,tabIndex:-1,children:v})]}),x)},K=({open:t,onClose:s,children:v,title:a,showHandle:g=!0,snapPoints:l=[.5,.9],initialSnap:d=0,expandable:u=!0,closeOnBackdropClick:j=!0,closeOnEscape:_=!0,hapticFeedback:p=!0,zIndex:C=1e3,className:w,style:y})=>{const f=e.useRef(null),i=e.useRef(null),[n,x]=e.useState(d),[h,D]=e.useState(!1),[P,$]=e.useState(0),S=e.useRef(0);e.useEffect(()=>{t&&(x(d),$(0))},[t,d]),M.As(f,t);const L=Y();e.useEffect(()=>{if(!_||!t)return;const m=b=>{b.key==="Escape"&&(b.preventDefault(),s())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[_,t,s]),e.useEffect(()=>{if(t){const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}}},[t]);const c=e.useCallback(m=>{const b=m.target.closest(".nice-bottom-sheet__handle"),I=i.current,H=!I||I.scrollTop<=0;!b&&!H||(D(!0),S.current=m.touches[0].clientY)},[]),o=e.useCallback(m=>{if(!h)return;const b=m.touches[0].clientY-S.current;(b>0||n<l.length-1)&&$(b)},[h,n,l.length]),k=e.useCallback(()=>{if(!h)return;const m=window.innerHeight;l[n]*m;const b=-P,I=m*.15;b>I&&u&&n<l.length-1?(x(n+1),p&&M.Dr("selection")):b<-I&&(n>0?(x(n-1),p&&M.Dr("selection")):(p&&M.Dr("light"),s())),D(!1),$(0)},[h,P,n,l,u,p,s]),E=e.useCallback(()=>{j&&s()},[j,s]);if(!t)return null;const R=l[n]*100,T=h?P:0;return B.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`nice-bottom-sheet__overlay ${t?"nice-bottom-sheet__overlay--visible":""}`,style:{zIndex:C},onClick:E}),r.jsxs("div",{ref:f,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${w||""}`,style:{zIndex:C+1,height:`${R}vh`,transform:`translateY(${Math.max(0,T)}px)`,transition:h?"none":"transform 0.3s ease-out, height 0.3s ease-out",...y},role:"dialog","aria-modal":"true","aria-label":a,tabIndex:-1,onTouchStart:c,onTouchMove:o,onTouchEnd:k,children:[g&&r.jsx("div",{className:"nice-bottom-sheet__handle","aria-hidden":"true"}),a&&r.jsx("div",{className:"nice-bottom-sheet__title",children:a}),r.jsx("div",{ref:i,className:"nice-bottom-sheet__content",children:v})]})]}),L)},F=({trigger:t,children:s,placement:v="bottom",triggerMode:a="click",open:g,onOpenChange:l,hoverDelay:d=200,offset:u=8,className:j,showArrow:_=!0})=>{const[p,C]=e.useState(!1),w=e.useRef(null),y=e.useRef(null),f=e.useRef(null),i=Y(),n=g!==void 0,x=n?g:p,h=e.useCallback(c=>{n||C(c),l?.(c)},[n,l]);M.Cs(y,()=>{a!=="manual"&&x&&h(!1)});const D=e.useCallback(()=>{a==="click"&&h(!x)},[a,x,h]),P=e.useCallback(()=>{a==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!0),d))},[a,d,h]),$=e.useCallback(()=>{a==="hover"&&(f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>h(!1),d))},[a,d,h]),[S,L]=e.useState({top:0,left:0});return e.useEffect(()=>{if(!x||!w.current||!y.current)return;const c=w.current.getBoundingClientRect(),o=y.current.getBoundingClientRect(),k=window.innerWidth,E=window.innerHeight;let R=0,T=0;const[m,b="center"]=v.split("-");switch(m){case"top":R=c.top-o.height-u,T=c.left+(c.width-o.width)/2;break;case"bottom":R=c.bottom+u,T=c.left+(c.width-o.width)/2;break;case"left":R=c.top+(c.height-o.height)/2,T=c.left-o.width-u;break;case"right":R=c.top+(c.height-o.height)/2,T=c.right+u;break}m==="top"||m==="bottom"?(b==="start"&&(T=c.left),b==="end"&&(T=c.right-o.width)):(b==="start"&&(R=c.top),b==="end"&&(R=c.bottom-o.height)),T=Math.max(8,Math.min(k-o.width-8,T)),R=Math.max(8,Math.min(E-o.height-8,R)),L({top:R,left:T})},[x,v,u]),r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,className:"nice-popover__trigger",onClick:D,onMouseEnter:P,onMouseLeave:$,style:{display:"inline-block"},children:t}),x&&B.createPortal(r.jsxs("div",{ref:y,className:`nice-popover nice-popover--${v} ${j||""}`,style:{position:"fixed",top:S.top,left:S.left,zIndex:1100},onMouseEnter:P,onMouseLeave:$,role:"tooltip",children:[_&&r.jsx("div",{className:"nice-popover__arrow"}),r.jsx("div",{className:"nice-popover__content",children:s})]}),i)]})},z=({items:t,children:s,onOpen:v,onClose:a,className:g})=>{const[l,d]=e.useState(!1),[u,j]=e.useState({x:0,y:0}),_=e.useRef(null),p=e.useRef(null),C=Y();M.Cs(_,()=>{l&&(d(!1),a?.())});const w=e.useCallback(i=>{i.preventDefault(),j({x:i.clientX,y:i.clientY}),d(!0),v?.()},[v]),y=e.useCallback(i=>{!i.disabled&&i.onClick&&(i.onClick(),d(!1),a?.())},[a]);e.useEffect(()=>{if(!l)return;const i=n=>{n.key==="Escape"&&(d(!1),a?.())};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[l,a]);const f=i=>r.jsx("ul",{className:"nice-context-menu__list",role:"menu",children:i.map(n=>n.divider?r.jsx("li",{className:"nice-context-menu__divider",role:"separator"},n.key):r.jsx("li",{role:"presentation",children:r.jsxs("button",{type:"button",className:`nice-context-menu__item ${n.disabled?"nice-context-menu__item--disabled":""} ${n.danger?"nice-context-menu__item--danger":""}`,role:"menuitem",disabled:n.disabled,onClick:()=>y(n),children:[n.icon&&r.jsx("span",{className:"nice-context-menu__icon",children:n.icon}),r.jsx("span",{className:"nice-context-menu__label",children:n.label})]})},n.key))});return r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:p,onContextMenu:w,style:{display:"contents"},children:s}),l&&B.createPortal(r.jsx("div",{ref:_,className:`nice-context-menu ${g||""}`,style:{position:"fixed",left:u.x,top:u.y,zIndex:1200},role:"menu",children:f(t)}),C)]})};exports.NiceActionSheet=N.NiceActionSheet;exports.NiceBlockUI=N.NiceBlockUI;exports.NiceBox=N.NiceBox;exports.NiceCommandPaletteProvider=N.NiceCommandPaletteProvider;exports.NiceLoadPanel=N.NiceLoadPanel;exports.NicePopover=N.NicePopover;exports.NiceResizable=N.NiceResizable;exports.NiceResponsiveBox=N.NiceResponsiveBox;exports.NiceScrollView=N.NiceScrollView;exports.NiceTutorial=N.NiceTutorial;exports.NiceTutorialProvider=N.NiceTutorialProvider;exports.NiceWindow=N.NiceWindow;exports.NiceWindowManager=N.NiceWindowManager;exports.useCommandPalette=N.useCommandPalette;exports.useRegisterCommands=N.useRegisterCommands;exports.NiceBottomSheet=K;exports.NiceContextMenu=z;exports.NiceDrawer=A;exports.NiceModal=W;exports.NiceModalBody=O;exports.NiceModalFooter=X;exports.NiceModalHeader=q;exports.NiceOverlayPopover=F;
|