@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.
Files changed (76) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +53 -36
  3. package/css/legacy-bg-text-aliases.css +83 -0
  4. package/dist/NiceErrorBoundary-BLTq8mPU.cjs +1 -0
  5. package/dist/NiceErrorBoundary-Bjw5U31n.js +762 -0
  6. package/dist/NiceErrorBoundary-CH8SBcSZ.js +762 -0
  7. package/dist/NiceErrorBoundary-CaVVPLh4.cjs +1 -0
  8. package/dist/NiceForm-CUlhtlHw.js +5357 -0
  9. package/dist/NiceForm-DTgIGX88.cjs +382 -0
  10. package/dist/NiceForm-Dbciuo4w.cjs +382 -0
  11. package/dist/NiceForm-Jf-ufPZz.js +5357 -0
  12. package/dist/NiceForm.css +1 -1
  13. package/dist/NiceModal-Bf1Q1VNL.cjs +1 -0
  14. package/dist/NiceModal-C_t2qqZd.js +95 -0
  15. package/dist/NiceModal-DrywdSv3.js +95 -0
  16. package/dist/NiceModal-FQqBxCij.cjs +1 -0
  17. package/dist/NiceModuleLifecyclePanel-CCFHxKIu.js +6343 -0
  18. package/dist/NiceModuleLifecyclePanel-CDX38sEx.js +6343 -0
  19. package/dist/NiceModuleLifecyclePanel-D8cIOI8I.cjs +1 -0
  20. package/dist/NiceModuleLifecyclePanel-xLrOv8nL.cjs +1 -0
  21. package/dist/NiceModuleLifecyclePanel.css +1 -1
  22. package/dist/NicePagination-Aj63sKV3.js +171 -0
  23. package/dist/NicePagination-BVkkePJU.js +171 -0
  24. package/dist/NicePagination-DGd3Hrh9.cjs +1 -0
  25. package/dist/NicePagination-DNjVutBJ.cjs +1 -0
  26. package/dist/NicePinCodeInput-B_0RCKQN.cjs +419 -0
  27. package/dist/NicePinCodeInput-CDtodnIM.js +11875 -0
  28. package/dist/NicePinCodeInput-Dffu701_.js +11875 -0
  29. package/dist/NicePinCodeInput-DytLfqZL.cjs +419 -0
  30. package/dist/NicePinCodeInput.css +1 -1
  31. package/dist/NiceSavedQueryPanel-4l-V9dGK.js +6446 -0
  32. package/dist/NiceSavedQueryPanel-B5TjD_Sb.cjs +596 -0
  33. package/dist/NiceSavedQueryPanel-CbR3EDQU.cjs +596 -0
  34. package/dist/NiceSavedQueryPanel-DJqCNWYZ.js +6446 -0
  35. package/dist/NiceTabs-B-9_mzpc.js +1624 -0
  36. package/dist/NiceTabs-CHg36waF.cjs +1 -0
  37. package/dist/NiceTabs-CbKhMxbC.cjs +1 -0
  38. package/dist/NiceTabs-HXphGn1B.js +1624 -0
  39. package/dist/NiceWindow-BxGVzUs2.js +1409 -0
  40. package/dist/NiceWindow-Ceb0mZ_0.js +1409 -0
  41. package/dist/NiceWindow-DXpnFZ0E.cjs +1 -0
  42. package/dist/NiceWindow-HhPIzPzs.cjs +1 -0
  43. package/dist/charts-BPJefcE8.js +4645 -0
  44. package/dist/charts-Dr6QyMiv.cjs +761 -0
  45. package/dist/charts-Us8Ep8MJ.cjs +761 -0
  46. package/dist/charts-fO6InNZd.js +4645 -0
  47. package/dist/charts.cjs +1 -1
  48. package/dist/charts.mjs +1 -1
  49. package/dist/core-B-tu8l9M.cjs +96 -0
  50. package/dist/core-BJ_UNMlX.js +22276 -0
  51. package/dist/core-DJ4NPp2B.js +22316 -0
  52. package/dist/core-DPY4m7vb.cjs +96 -0
  53. package/dist/data.cjs +1 -1
  54. package/dist/data.d.ts +7 -0
  55. package/dist/data.mjs +1 -1
  56. package/dist/editors.cjs +1 -1
  57. package/dist/editors.mjs +3 -3
  58. package/dist/feedback.cjs +1 -1
  59. package/dist/feedback.mjs +2 -2
  60. package/dist/index-B-9lbtwJ.cjs +5194 -0
  61. package/dist/index-BNy9Nn0X.js +61422 -0
  62. package/dist/index-DHc_KZkF.js +61311 -0
  63. package/dist/index-drIVMHeC.cjs +5194 -0
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.css +1 -1
  66. package/dist/index.d.ts +1209 -67
  67. package/dist/index.mjs +887 -871
  68. package/dist/lazy.cjs +1 -1
  69. package/dist/lazy.mjs +3 -3
  70. package/dist/navigation.cjs +1 -1
  71. package/dist/navigation.d.ts +309 -70
  72. package/dist/navigation.mjs +92 -91
  73. package/dist/overlays.cjs +1 -1
  74. package/dist/overlays.mjs +36 -36
  75. package/dist/style.css +7 -0
  76. 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-BNrA5Dxq.js";
2
- import { jsxs as H, Fragment as O, jsx as a } from "react/jsx-runtime";
3
- import { k as j, H as K, b as z, X as U, t as V } from "./core-ClmvtMVZ.js";
4
- import { useRef as E, useState as D, useEffect as Y, useCallback as b, useContext as q } from "react";
5
- import { createPortal as C } from "react-dom";
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 = q(V);
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 C(
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__ */ H("div", { className: `nice-modal__header ${r || ""}`, children: [
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
- ), S = b(
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 } = U({
166
+ ), { ref: L } = z({
167
167
  enabled: x && e,
168
168
  onPanStart: () => u(!0),
169
169
  onPan: h,
170
- onPanEnd: S
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", X = I ? { width: typeof v == "number" ? `${v}px` : v } : { height: typeof v == "number" ? `${v}px` : v }, i = () => {
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 C(
184
- /* @__PURE__ */ H(O, { children: [
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
- ...X,
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, S] = D(!1), [L, P] = D(0), I = E(0);
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 X = W();
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, A = !B || B.scrollTop <= 0;
255
- !w && !A || (S(!0), I.current = f.touches[0].clientY);
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())), S(!1), P(0);
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 C(
278
- /* @__PURE__ */ H(O, { children: [
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__ */ H(
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
- X
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
- z(p, () => {
334
+ A(p, () => {
335
335
  r !== "manual" && g && h(!1);
336
336
  });
337
- const S = b(() => {
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, X] = D({ top: 0, left: 0 });
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)), X({ top: T, left: $ });
365
- }, [g, m, d]), /* @__PURE__ */ H(O, { children: [
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: S,
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 && C(
379
- /* @__PURE__ */ H(
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
- z(N, () => {
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__ */ H(
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__ */ H(O, { children: [
446
+ return /* @__PURE__ */ C(O, { children: [
447
447
  /* @__PURE__ */ a("div", { ref: k, onContextMenu: y, style: { display: "contents" }, children: o }),
448
- l && C(
448
+ l && X(
449
449
  /* @__PURE__ */ a(
450
450
  "div",
451
451
  {
package/dist/style.css ADDED
@@ -0,0 +1,7 @@
1
+ /* Auto-generated by scripts/postbuild-style.mjs — do not edit */
2
+ @import './index.css';
3
+ @import './charts.css';
4
+ @import './NiceForm.css';
5
+ @import './NiceModuleLifecyclePanel.css';
6
+ @import './NicePinCodeInput.css';
7
+ @import './NiceSavedQueryPanel.css';
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@nice2dev/ui",
3
- "version": "1.0.12",
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.12",
99
- "@nice2dev/ui-core": "^1.0.12",
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": {