@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/overlays.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { N as se, a as de, b as ue, c as he, d as fe, e as me, f as ve, g as ge, h as we, i as be, j as ye, k as pe, l as _e, u as Ne, m as ke } from "./NiceWindow-
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as
|
|
5
|
-
import { createPortal as
|
|
1
|
+
import { N as se, a as de, b as ue, c as he, d as fe, e as me, f as ve, g as ge, h as we, i as be, j as ye, k as pe, l as _e, u as Ne, m as ke } from "./NiceWindow-Ceb0mZ_0.js";
|
|
2
|
+
import { jsxs as C, Fragment as O, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { A as j, D as K, a as A, q as z, n as U } from "./core-DJ4NPp2B.js";
|
|
4
|
+
import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as V } from "react";
|
|
5
|
+
import { createPortal as X } from "react-dom";
|
|
6
6
|
function W() {
|
|
7
|
-
const e =
|
|
7
|
+
const e = V(U);
|
|
8
8
|
return e?.portalTarget ? e.portalTarget : typeof document < "u" ? document.body : null;
|
|
9
9
|
}
|
|
10
10
|
const F = ({
|
|
@@ -54,7 +54,7 @@ const F = ({
|
|
|
54
54
|
xl: "nice-modal--xl",
|
|
55
55
|
full: "nice-modal--full"
|
|
56
56
|
}[v];
|
|
57
|
-
return
|
|
57
|
+
return X(
|
|
58
58
|
/* @__PURE__ */ a(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -84,7 +84,7 @@ const F = ({
|
|
|
84
84
|
showClose: o = !0,
|
|
85
85
|
onClose: m,
|
|
86
86
|
className: r
|
|
87
|
-
}) => /* @__PURE__ */
|
|
87
|
+
}) => /* @__PURE__ */ C("div", { className: `nice-modal__header ${r || ""}`, children: [
|
|
88
88
|
/* @__PURE__ */ a("div", { className: "nice-modal__title", children: e }),
|
|
89
89
|
o && m && /* @__PURE__ */ a("button", { type: "button", className: "nice-modal__close", onClick: m, "aria-label": "Close", children: /* @__PURE__ */ a(
|
|
90
90
|
"svg",
|
|
@@ -143,7 +143,7 @@ const F = ({
|
|
|
143
143
|
t(_);
|
|
144
144
|
},
|
|
145
145
|
[r]
|
|
146
|
-
),
|
|
146
|
+
), H = b(
|
|
147
147
|
(n) => {
|
|
148
148
|
let R = !1;
|
|
149
149
|
switch (r) {
|
|
@@ -163,11 +163,11 @@ const F = ({
|
|
|
163
163
|
R && (K("light"), o()), t(0), u(!1);
|
|
164
164
|
},
|
|
165
165
|
[r, o]
|
|
166
|
-
), { ref: L } =
|
|
166
|
+
), { ref: L } = z({
|
|
167
167
|
enabled: x && e,
|
|
168
168
|
onPanStart: () => u(!0),
|
|
169
169
|
onPan: h,
|
|
170
|
-
onPanEnd:
|
|
170
|
+
onPanEnd: H
|
|
171
171
|
}), P = b(
|
|
172
172
|
(n) => {
|
|
173
173
|
s && n.target === n.currentTarget && o();
|
|
@@ -176,12 +176,12 @@ const F = ({
|
|
|
176
176
|
);
|
|
177
177
|
if (!e)
|
|
178
178
|
return null;
|
|
179
|
-
const I = r === "left" || r === "right",
|
|
179
|
+
const I = r === "left" || r === "right", S = I ? { width: typeof v == "number" ? `${v}px` : v } : { height: typeof v == "number" ? `${v}px` : v }, i = () => {
|
|
180
180
|
if (p)
|
|
181
181
|
return I ? `translateX(${c}px)` : `translateY(${c}px)`;
|
|
182
182
|
};
|
|
183
|
-
return
|
|
184
|
-
/* @__PURE__ */
|
|
183
|
+
return X(
|
|
184
|
+
/* @__PURE__ */ C(O, { children: [
|
|
185
185
|
/* @__PURE__ */ a(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
@@ -198,7 +198,7 @@ const F = ({
|
|
|
198
198
|
},
|
|
199
199
|
className: `nice-drawer nice-drawer--${r} ${e ? "nice-drawer--open" : ""} ${k || ""}`,
|
|
200
200
|
style: {
|
|
201
|
-
...
|
|
201
|
+
...S,
|
|
202
202
|
zIndex: N + 1,
|
|
203
203
|
transform: i(),
|
|
204
204
|
transition: p ? "none" : void 0,
|
|
@@ -230,11 +230,11 @@ const F = ({
|
|
|
230
230
|
className: y,
|
|
231
231
|
style: p
|
|
232
232
|
}) => {
|
|
233
|
-
const u = E(null), c = E(null), [t, g] = D(s), [h,
|
|
233
|
+
const u = E(null), c = E(null), [t, g] = D(s), [h, H] = D(!1), [L, P] = D(0), I = E(0);
|
|
234
234
|
Y(() => {
|
|
235
235
|
e && (g(s), P(0));
|
|
236
236
|
}, [e, s]), j(u, e);
|
|
237
|
-
const
|
|
237
|
+
const S = W();
|
|
238
238
|
Y(() => {
|
|
239
239
|
if (!N || !e)
|
|
240
240
|
return;
|
|
@@ -251,8 +251,8 @@ const F = ({
|
|
|
251
251
|
}
|
|
252
252
|
}, [e]);
|
|
253
253
|
const i = b((f) => {
|
|
254
|
-
const w = f.target.closest(".nice-bottom-sheet__handle"), B = c.current,
|
|
255
|
-
!w && !
|
|
254
|
+
const w = f.target.closest(".nice-bottom-sheet__handle"), B = c.current, q = !B || B.scrollTop <= 0;
|
|
255
|
+
!w && !q || (H(!0), I.current = f.touches[0].clientY);
|
|
256
256
|
}, []), n = b(
|
|
257
257
|
(f) => {
|
|
258
258
|
if (!h)
|
|
@@ -267,15 +267,15 @@ const F = ({
|
|
|
267
267
|
const f = window.innerHeight;
|
|
268
268
|
l[t] * f;
|
|
269
269
|
const w = -L, B = f * 0.15;
|
|
270
|
-
w > B && d && t < l.length - 1 ? (g(t + 1), k && K("selection")) : w < -B && (t > 0 ? (g(t - 1), k && K("selection")) : (k && K("light"), o())),
|
|
270
|
+
w > B && d && t < l.length - 1 ? (g(t + 1), k && K("selection")) : w < -B && (t > 0 ? (g(t - 1), k && K("selection")) : (k && K("light"), o())), H(!1), P(0);
|
|
271
271
|
}, [h, L, t, l, d, k, o]), R = b(() => {
|
|
272
272
|
x && o();
|
|
273
273
|
}, [x, o]);
|
|
274
274
|
if (!e)
|
|
275
275
|
return null;
|
|
276
276
|
const T = l[t] * 100, $ = h ? L : 0;
|
|
277
|
-
return
|
|
278
|
-
/* @__PURE__ */
|
|
277
|
+
return X(
|
|
278
|
+
/* @__PURE__ */ C(O, { children: [
|
|
279
279
|
/* @__PURE__ */ a(
|
|
280
280
|
"div",
|
|
281
281
|
{
|
|
@@ -284,7 +284,7 @@ const F = ({
|
|
|
284
284
|
onClick: R
|
|
285
285
|
}
|
|
286
286
|
),
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ C(
|
|
288
288
|
"div",
|
|
289
289
|
{
|
|
290
290
|
ref: u,
|
|
@@ -311,7 +311,7 @@ const F = ({
|
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
] }),
|
|
314
|
-
|
|
314
|
+
S
|
|
315
315
|
);
|
|
316
316
|
}, ae = ({
|
|
317
317
|
trigger: e,
|
|
@@ -331,16 +331,16 @@ const F = ({
|
|
|
331
331
|
},
|
|
332
332
|
[t, l]
|
|
333
333
|
);
|
|
334
|
-
|
|
334
|
+
A(p, () => {
|
|
335
335
|
r !== "manual" && g && h(!1);
|
|
336
336
|
});
|
|
337
|
-
const
|
|
337
|
+
const H = b(() => {
|
|
338
338
|
r === "click" && h(!g);
|
|
339
339
|
}, [r, g, h]), L = b(() => {
|
|
340
340
|
r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!0), s));
|
|
341
341
|
}, [r, s, h]), P = b(() => {
|
|
342
342
|
r === "hover" && (u.current && window.clearTimeout(u.current), u.current = window.setTimeout(() => h(!1), s));
|
|
343
|
-
}, [r, s, h]), [I,
|
|
343
|
+
}, [r, s, h]), [I, S] = D({ top: 0, left: 0 });
|
|
344
344
|
return Y(() => {
|
|
345
345
|
if (!g || !y.current || !p.current)
|
|
346
346
|
return;
|
|
@@ -361,22 +361,22 @@ const F = ({
|
|
|
361
361
|
T = i.top + (i.height - n.height) / 2, $ = i.right + d;
|
|
362
362
|
break;
|
|
363
363
|
}
|
|
364
|
-
f === "top" || f === "bottom" ? (w === "start" && ($ = i.left), w === "end" && ($ = i.right - n.width)) : (w === "start" && (T = i.top), w === "end" && (T = i.bottom - n.height)), $ = Math.max(8, Math.min(_ - n.width - 8, $)), T = Math.max(8, Math.min(R - n.height - 8, T)),
|
|
365
|
-
}, [g, m, d]), /* @__PURE__ */
|
|
364
|
+
f === "top" || f === "bottom" ? (w === "start" && ($ = i.left), w === "end" && ($ = i.right - n.width)) : (w === "start" && (T = i.top), w === "end" && (T = i.bottom - n.height)), $ = Math.max(8, Math.min(_ - n.width - 8, $)), T = Math.max(8, Math.min(R - n.height - 8, T)), S({ top: T, left: $ });
|
|
365
|
+
}, [g, m, d]), /* @__PURE__ */ C(O, { children: [
|
|
366
366
|
/* @__PURE__ */ a(
|
|
367
367
|
"div",
|
|
368
368
|
{
|
|
369
369
|
ref: y,
|
|
370
370
|
className: "nice-popover__trigger",
|
|
371
|
-
onClick:
|
|
371
|
+
onClick: H,
|
|
372
372
|
onMouseEnter: L,
|
|
373
373
|
onMouseLeave: P,
|
|
374
374
|
style: { display: "inline-block" },
|
|
375
375
|
children: e
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
|
-
g &&
|
|
379
|
-
/* @__PURE__ */
|
|
378
|
+
g && X(
|
|
379
|
+
/* @__PURE__ */ C(
|
|
380
380
|
"div",
|
|
381
381
|
{
|
|
382
382
|
ref: p,
|
|
@@ -407,7 +407,7 @@ const F = ({
|
|
|
407
407
|
className: v
|
|
408
408
|
}) => {
|
|
409
409
|
const [l, s] = D(!1), [d, x] = D({ x: 0, y: 0 }), N = E(null), k = E(null), M = W();
|
|
410
|
-
|
|
410
|
+
A(N, () => {
|
|
411
411
|
l && (s(!1), r?.());
|
|
412
412
|
});
|
|
413
413
|
const y = b(
|
|
@@ -429,7 +429,7 @@ const F = ({
|
|
|
429
429
|
};
|
|
430
430
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
431
431
|
}, [l, r]);
|
|
432
|
-
const u = (c) => /* @__PURE__ */ a("ul", { className: "nice-context-menu__list", role: "menu", children: c.map((t) => t.divider ? /* @__PURE__ */ a("li", { className: "nice-context-menu__divider", role: "separator" }, t.key) : /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */
|
|
432
|
+
const u = (c) => /* @__PURE__ */ a("ul", { className: "nice-context-menu__list", role: "menu", children: c.map((t) => t.divider ? /* @__PURE__ */ a("li", { className: "nice-context-menu__divider", role: "separator" }, t.key) : /* @__PURE__ */ a("li", { role: "presentation", children: /* @__PURE__ */ C(
|
|
433
433
|
"button",
|
|
434
434
|
{
|
|
435
435
|
type: "button",
|
|
@@ -443,9 +443,9 @@ const F = ({
|
|
|
443
443
|
]
|
|
444
444
|
}
|
|
445
445
|
) }, t.key)) });
|
|
446
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ C(O, { children: [
|
|
447
447
|
/* @__PURE__ */ a("div", { ref: k, onContextMenu: y, style: { display: "contents" }, children: o }),
|
|
448
|
-
l &&
|
|
448
|
+
l && X(
|
|
449
449
|
/* @__PURE__ */ a(
|
|
450
450
|
"div",
|
|
451
451
|
{
|
package/dist/style.css
ADDED
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Nice2Dev UI — Universal, themeable, i18n-ready React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
+
"style": "dist/style.css",
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
12
|
"types": "./dist/index.d.ts",
|
|
@@ -62,10 +63,13 @@
|
|
|
62
63
|
"import": "./dist/data-branching.mjs",
|
|
63
64
|
"require": "./dist/data-branching.cjs"
|
|
64
65
|
},
|
|
65
|
-
"./style.css": "./dist/style.css"
|
|
66
|
+
"./style.css": "./dist/style.css",
|
|
67
|
+
"./dist/style.css": "./dist/style.css",
|
|
68
|
+
"./css/legacy-bg-text-aliases.css": "./css/legacy-bg-text-aliases.css"
|
|
66
69
|
},
|
|
67
70
|
"files": [
|
|
68
71
|
"dist",
|
|
72
|
+
"css",
|
|
69
73
|
"LICENSE",
|
|
70
74
|
"CHANGELOG.md",
|
|
71
75
|
"README.md"
|
|
@@ -75,7 +79,7 @@
|
|
|
75
79
|
],
|
|
76
80
|
"scripts": {
|
|
77
81
|
"dev": "vite",
|
|
78
|
-
"build": "tsc -p tsconfig.build.json && vite build",
|
|
82
|
+
"build": "tsc -p tsconfig.build.json && vite build && node scripts/postbuild-style.mjs",
|
|
79
83
|
"test": "vitest run",
|
|
80
84
|
"test:watch": "vitest",
|
|
81
85
|
"test:coverage": "vitest run --coverage",
|
|
@@ -95,8 +99,8 @@
|
|
|
95
99
|
"react-dom": ">=17.0.0"
|
|
96
100
|
},
|
|
97
101
|
"dependencies": {
|
|
98
|
-
"@nice2dev/i18n": "^1.0.
|
|
99
|
-
"@nice2dev/ui-core": "^1.0.
|
|
102
|
+
"@nice2dev/i18n": "^1.0.15",
|
|
103
|
+
"@nice2dev/ui-core": "^1.0.15",
|
|
100
104
|
"country-flag-icons": "^1.6.17"
|
|
101
105
|
},
|
|
102
106
|
"devDependencies": {
|