@plitzi/plitzi-ui 1.6.18 → 1.6.20

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 (40) hide show
  1. package/dist/components/Accordion/helpers/AccordionManager.js +2 -1
  2. package/dist/components/Button/Button.js +21 -19
  3. package/dist/components/Cache/CacheProvider.js +7 -4
  4. package/dist/components/Card/CardHeader.js +19 -17
  5. package/dist/components/Checkbox/Checkbox.js +2 -2
  6. package/dist/components/CodeMirror/CodeMirror.js +21 -21
  7. package/dist/components/ContainerDraggable/ContainerDraggable.js +9 -9
  8. package/dist/components/ContainerFloating/ContainerFloating.js +15 -15
  9. package/dist/components/ContainerResizable/ContainerResizable.js +9 -7
  10. package/dist/components/ContainerShadow/ContainerShadowStyle.js +8 -5
  11. package/dist/components/FileUpload/FileUpload.js +1 -1
  12. package/dist/components/FileUpload/components/DrawTypes/DrawTypes.js +16 -13
  13. package/dist/components/FileUpload/components/FileUploadMessage/FileUploadMessage.js +24 -21
  14. package/dist/components/Flex/Flex.styles.d.ts +2 -2
  15. package/dist/components/Form/index.js +6 -6
  16. package/dist/components/Input/Input.js +2 -2
  17. package/dist/components/Input/InputContainer.js +11 -9
  18. package/dist/components/KVInput/KVInput.js +2 -2
  19. package/dist/components/MenuList/MenuItem.js +23 -21
  20. package/dist/components/MenuList/MenuList.js +14 -12
  21. package/dist/components/MenuList/MenuListContainer.js +8 -6
  22. package/dist/components/MetricInput/MetricInput.js +1 -4
  23. package/dist/components/Modal/ModalProvider.js +5 -5
  24. package/dist/components/Popup/PopupProvider.js +61 -61
  25. package/dist/components/Provider/providers/ThemeProvider/ThemeProvider.js +12 -12
  26. package/dist/components/QueryBuilder/QueryBuilderProvider.js +47 -47
  27. package/dist/components/QueryBuilder/Rule.js +4 -4
  28. package/dist/components/QueryBuilder/RuleValue.js +7 -1
  29. package/dist/components/QueryBuilder/helpers/QueryBuilderEvaluator.js +1 -5
  30. package/dist/components/Sidebar/Sidebar.js +22 -20
  31. package/dist/components/Sidebar/SidebarProvider.js +7 -4
  32. package/dist/components/Switch/Switch.js +2 -2
  33. package/dist/components/TextArea/TextArea.js +2 -2
  34. package/dist/components/Toast/ToastProvider.js +2 -2
  35. package/dist/components/index.js +249 -249
  36. package/dist/helpers/formatDate.js +5 -1
  37. package/dist/helpers/lodash/throttle.js +3 -2
  38. package/dist/hooks/useStorage/useStorageHelper.js +1 -1
  39. package/dist/index.js +112 -112
  40. package/package.json +1313 -70
@@ -27,7 +27,8 @@ var e = class {
27
27
  flexBasis: ""
28
28
  }), n.hasManualSize = !1;
29
29
  break;
30
- } else if (n.active) {
30
+ }
31
+ if (n.active) {
31
32
  e = !0;
32
33
  break;
33
34
  }
@@ -27,25 +27,27 @@ var u = ({ ref: u, children: d, testId: f, className: p = "", iconPlacement: m =
27
27
  e.contentChildren = n;
28
28
  return;
29
29
  }
30
- if (i(n)) if (n.type === t) {
31
- let t = n.props;
32
- e.iconChildren = r(n, {
33
- className: l(T.icon, t.className),
34
- size: v,
35
- testId: f ? `${f}-icon` : void 0,
36
- ...t,
37
- intent: t.intent ?? "custom"
38
- });
39
- } else if (n.type === "i") {
40
- let t = n.props;
41
- e.iconChildren = r(n, {
42
- className: l(T.icon, t.className),
43
- size: v,
44
- "data-testid": f ? `${f}-icon` : void 0,
45
- ...t,
46
- intent: t.intent ?? "custom"
47
- });
48
- } else e.contentChildren = n;
30
+ if (i(n)) {
31
+ if (n.type === t) {
32
+ let t = n.props;
33
+ e.iconChildren = r(n, {
34
+ className: l(T.icon, t.className),
35
+ size: v,
36
+ testId: f ? `${f}-icon` : void 0,
37
+ ...t,
38
+ intent: t.intent ?? "custom"
39
+ });
40
+ } else if (n.type === "i") {
41
+ let t = n.props;
42
+ e.iconChildren = r(n, {
43
+ className: l(T.icon, t.className),
44
+ size: v,
45
+ "data-testid": f ? `${f}-icon` : void 0,
46
+ ...t,
47
+ intent: t.intent ?? "custom"
48
+ });
49
+ } else e.contentChildren = n;
50
+ }
49
51
  }), e;
50
52
  }, [
51
53
  d,
@@ -2,9 +2,12 @@ import e from "./CacheContext.js";
2
2
  import { useMemo as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region src/components/Cache/CacheProvider.tsx
5
- var r = ({ children: r, cacheId: i = "" }) => /* @__PURE__ */ n(e, {
6
- value: t(() => ({ cacheId: i }), [i]),
7
- children: r
8
- });
5
+ var r = ({ children: r, cacheId: i = "" }) => {
6
+ let a = t(() => ({ cacheId: i }), [i]);
7
+ return /* @__PURE__ */ n(e, {
8
+ value: a,
9
+ children: r
10
+ });
11
+ };
9
12
  //#endregion
10
13
  export { r as default };
@@ -25,23 +25,25 @@ var l = ({ ref: l, className: u, children: d, closeable: f, testId: p, intent: m
25
25
  e.content.push(t);
26
26
  return;
27
27
  }
28
- if (a(t)) if (t.type === n) {
29
- let n = t.props;
30
- e.icon = i(t, {
31
- testId: p ? `${p}-icon` : void 0,
32
- ...n,
33
- intent: n.intent ?? "custom",
34
- size: h
35
- });
36
- } else if (t.type === "i") {
37
- let n = t.props;
38
- e.icon = i(t, {
39
- "data-testid": p ? `${p}-icon` : void 0,
40
- ...n,
41
- intent: n.intent ?? "custom",
42
- size: h
43
- });
44
- } else e.content.push(t);
28
+ if (a(t)) {
29
+ if (t.type === n) {
30
+ let n = t.props;
31
+ e.icon = i(t, {
32
+ testId: p ? `${p}-icon` : void 0,
33
+ ...n,
34
+ intent: n.intent ?? "custom",
35
+ size: h
36
+ });
37
+ } else if (t.type === "i") {
38
+ let n = t.props;
39
+ e.icon = i(t, {
40
+ "data-testid": p ? `${p}-icon` : void 0,
41
+ ...n,
42
+ intent: n.intent ?? "custom",
43
+ size: h
44
+ });
45
+ } else e.content.push(t);
46
+ }
45
47
  }), e;
46
48
  }, [
47
49
  d,
@@ -21,9 +21,9 @@ var s = r(({ ref: r, children: s, id: c, loading: l = !1, disabled: u = !1, clas
21
21
  disabled: u,
22
22
  error: !!p
23
23
  }
24
- });
24
+ }), y = i(() => e(v, ["input"]), [v]);
25
25
  return /* @__PURE__ */ o(n, {
26
- className: i(() => e(v, ["input"]), [v]),
26
+ className: y,
27
27
  id: c,
28
28
  label: f,
29
29
  error: p,
@@ -102,22 +102,22 @@ var _ = [], v = ({ ref: v, className: y, id: b, label: x = "", loading: S = !1,
102
102
  e = !1;
103
103
  };
104
104
  }, [D, J]);
105
- let { editorRef: Z } = r({
106
- extensions: o(() => {
107
- let e = [
108
- K(),
109
- g.of([{
110
- key: "Tab",
111
- run: u
112
- }]),
113
- g.of([f])
114
- ];
115
- return Y && e.push(...Y), M && e.push(h.lineWrapping), e;
116
- }, [
117
- K,
118
- M,
119
- Y
120
- ]),
105
+ let Z = o(() => {
106
+ let e = [
107
+ K(),
108
+ g.of([{
109
+ key: "Tab",
110
+ run: u
111
+ }]),
112
+ g.of([f])
113
+ ];
114
+ return Y && e.push(...Y), M && e.push(h.lineWrapping), e;
115
+ }, [
116
+ K,
117
+ M,
118
+ Y
119
+ ]), { editorRef: Q } = r({
120
+ extensions: Z,
121
121
  theme: O,
122
122
  style: W,
123
123
  basicSetup: U,
@@ -127,9 +127,9 @@ var _ = [], v = ({ ref: v, className: y, id: b, label: x = "", loading: S = !1,
127
127
  value: T,
128
128
  onChange: A,
129
129
  ref: v
130
- }), Q = i((e) => {
130
+ }), $ = i((e) => {
131
131
  e.stopPropagation();
132
- }, []);
132
+ }, []), ee = i(() => A?.(""), [A]);
133
133
  return /* @__PURE__ */ l(n, {
134
134
  className: H,
135
135
  id: b,
@@ -141,11 +141,11 @@ var _ = [], v = ({ ref: v, className: y, id: b, label: x = "", loading: S = !1,
141
141
  loading: S,
142
142
  clearable: w,
143
143
  value: T,
144
- onClear: i(() => A?.(""), [A]),
144
+ onClear: ee,
145
145
  children: /* @__PURE__ */ l("div", {
146
146
  className: V.input,
147
- ref: Z,
148
- onKeyDown: Q,
147
+ ref: Q,
148
+ onKeyDown: $,
149
149
  onBlur: j
150
150
  })
151
151
  });
@@ -20,14 +20,14 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
20
20
  }), se = c(void 0), M = c(void 0), N = c(!1), P = c(m), F = c(h), [I, L] = l(!1), [R, z] = l(m), [B, V] = l(h), [H, U] = l(0), [W, G] = l(0), [ce, K] = l(!1), [le] = l(g), [ue] = l(_ - v), [q, de] = l({
21
21
  width: 0,
22
22
  height: 0
23
- }), J = o(() => !C?.current && typeof document < "u" ? document.body : C?.current, [C]), fe = c(e(o(() => {
23
+ }), J = o(() => !C?.current && typeof document < "u" ? document.body : C?.current, [C]), fe = o(() => {
24
24
  if (!N.current) {
25
25
  let e = M.current.getBoundingClientRect(), t = P.current, n = F.current;
26
26
  e.x + e.width > window.innerWidth ? t = window.innerWidth - e.width : e.x < 0 && (t = 0), e.y + e.height > window.innerHeight ? n = window.innerHeight - e.height : e.y < 0 && (n = 0), (P.current !== t || F.current !== n) && (P.current = t, F.current = n, z(t), V(n));
27
27
  }
28
- }, []), 250));
28
+ }, []), pe = c(e(fe, 250));
29
29
  s(() => {
30
- let e = fe.current;
30
+ let e = pe.current;
31
31
  return window.addEventListener("resize", e), () => {
32
32
  N.current = !0, window.removeEventListener("resize", e);
33
33
  };
@@ -52,7 +52,7 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
52
52
  s(() => (I && (window.addEventListener("mousemove", Y, !1), window.addEventListener("mouseup", X, !1), window.addEventListener("touchmove", Z, !1), window.addEventListener("touchend", Q, !1)), () => {
53
53
  I && (window.removeEventListener("mousemove", Y, !1), window.removeEventListener("mouseup", X, !1), window.removeEventListener("touchmove", Z, !1), window.removeEventListener("touchend", Q, !1));
54
54
  }), [I, q]);
55
- let pe = (e) => {
55
+ let me = (e) => {
56
56
  let t;
57
57
  p === "parent" ? (M.current.parentNode || (t = {
58
58
  height: window.innerHeight,
@@ -61,7 +61,7 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
61
61
  height: window.innerHeight,
62
62
  width: window.innerWidth
63
63
  }, e.button === 0 ? (J()?.classList.add("moving"), L(!0), de(t), U(e.clientX), G(e.clientY), D?.(e)) : (L(!1), z(P.current), V(F.current));
64
- }, me = () => K((e) => !e), Z = o((e) => {
64
+ }, he = () => K((e) => !e), Z = o((e) => {
65
65
  if (e.stopPropagation(), e.changedTouches.length > 1 && e.preventDefault(), I) {
66
66
  let t = M.current.getBoundingClientRect(), { clientX: n, clientY: r } = e.touches[0], i = R + n - H, a = B + r - W;
67
67
  i + t.width > window.innerWidth ? i = window.innerWidth - t.width : i < 0 && (i = 0), a + t.height > window.innerHeight ? a = window.innerHeight - t.height : a < 0 && (a = 0), P.current = i, F.current = a, M.current.style.left = `${i}px`, M.current.style.top = `${a}px`;
@@ -74,11 +74,11 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
74
74
  B
75
75
  ]), Q = o(() => {
76
76
  L(!1), z(P.current), V(F.current);
77
- }, []), he = o((e) => {
77
+ }, []), ge = o((e) => {
78
78
  e.stopPropagation(), L(!0), U(e.touches[0].clientX), G(e.touches[0].clientY), D?.(e);
79
79
  }, [D]);
80
80
  if (ce) return /* @__PURE__ */ u(r, {
81
- onClose: me,
81
+ onClose: he,
82
82
  width: g,
83
83
  height: _ - v,
84
84
  top: F.current,
@@ -119,8 +119,8 @@ var ne = ["se"], re = [], d = ({ icon: d, title: ie = "Title", className: ae = "
119
119
  setExternalWindow: K,
120
120
  onClose: E,
121
121
  onCollapse: O,
122
- onMouseDown: pe,
123
- onTouchStart: he
122
+ onMouseDown: me,
123
+ onTouchStart: ge
124
124
  }), /* @__PURE__ */ u(i, {
125
125
  ref: se,
126
126
  parentRef: C,
@@ -49,23 +49,23 @@ var m = ({ ref: m, children: h, containerTopOffset: g = 0, containerLeftOffset:
49
49
  C,
50
50
  A,
51
51
  j
52
+ ]), P = l(() => ({
53
+ placement: C,
54
+ triggerRef: A,
55
+ container: w,
56
+ containerTopOffset: g,
57
+ containerLeftOffset: _,
58
+ setOpen: O
59
+ }), [
60
+ C,
61
+ A,
62
+ w,
63
+ g,
64
+ _,
65
+ O
52
66
  ]);
53
67
  return /* @__PURE__ */ p(d, { children: [M, /* @__PURE__ */ f(e, {
54
- value: l(() => ({
55
- placement: C,
56
- triggerRef: A,
57
- container: w,
58
- containerTopOffset: g,
59
- containerLeftOffset: _,
60
- setOpen: O
61
- }), [
62
- C,
63
- A,
64
- w,
65
- g,
66
- _,
67
- O
68
- ]),
68
+ value: P,
69
69
  children: /* @__PURE__ */ f(t, {
70
70
  ref: E,
71
71
  open: D,
@@ -14,12 +14,14 @@ var f = ["se"], p = ({ ref: p, className: m, parentRef: h, hoverMode: g = !1, au
14
14
  o(p, () => W.current, [W]);
15
15
  let G = c(null), K = s(() => A ? e(A, 150) : void 0, [A]), q = i(() => !h?.current && typeof document < "u" ? document.body : h?.current, [h]), J = i((e, t, n = !1) => {
16
16
  let [r, i] = [[T, E], [D, O]];
17
- if (w) if (t === F) {
18
- let n = N / F;
19
- t = e / n, e = t * n;
20
- } else {
21
- let n = F / N;
22
- e = t / n, t = e * n;
17
+ if (w) {
18
+ if (t === F) {
19
+ let n = N / F;
20
+ t = e / n, e = t * n;
21
+ } else {
22
+ let n = F / N;
23
+ e = t / n, t = e * n;
24
+ }
23
25
  }
24
26
  r[0] && r[1] && (e = Math.max(r[0], e), t = Math.max(r[1], t)), i[0] && i[1] && (e = Math.min(i[0], e), t = Math.min(i[1], t));
25
27
  let a = W.current?.getBoundingClientRect();
@@ -37,7 +39,7 @@ var f = ["se"], p = ({ ref: p, className: m, parentRef: h, hoverMode: g = !1, au
37
39
  let t = e.clientX, n = e.clientY, i = (t - L) / S, a = (n - U) / S, o = (C === "both" || C === "x") && ["n", "s"].indexOf(z ?? "") === -1, s = (C === "both" || C === "y") && ["e", "w"].indexOf(z ?? "") === -1, c = z?.includes("w") || z?.includes("n");
38
40
  if (Array.isArray(b) && ([i, a] = r(i, a, b), !i && !a)) return;
39
41
  let l = V + (o ? i : 0), u = H + (s ? a : 0);
40
- c && (l = V - (o ? i : 0), u = H - (s ? a : 0)), !(l === V && u === H) && ([l, u] = J(l, u, c), K?.(l, u), V !== Infinity && G.current && (G.current.style.width = `${l}px`), H !== Infinity && G.current && (G.current.style.height = `${u}px`));
42
+ c && (l = V - (o ? i : 0), u = H - (s ? a : 0)), (l !== V || u !== H) && ([l, u] = J(l, u, c), K?.(l, u), V !== Infinity && G.current && (G.current.style.width = `${l}px`), H !== Infinity && G.current && (G.current.style.height = `${u}px`));
41
43
  }, [
42
44
  C,
43
45
  L,
@@ -1,10 +1,13 @@
1
1
  import { useRef as e } from "react";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  //#region src/components/ContainerShadow/ContainerShadowStyle.tsx
4
- var n = ({ children: n, ...r }) => /* @__PURE__ */ t("style", {
5
- ref: e(null),
6
- ...r,
7
- children: n
8
- });
4
+ var n = ({ children: n, ...r }) => {
5
+ let i = e(null);
6
+ return /* @__PURE__ */ t("style", {
7
+ ref: i,
8
+ ...r,
9
+ children: n
10
+ });
11
+ };
9
12
  //#endregion
10
13
  export { n as default };
@@ -49,7 +49,7 @@ var y = [
49
49
  let r = e[n];
50
50
  t = !K(r) || t;
51
51
  }
52
- return t ? !1 : (d.multiple, d.onChange?.(e), R?.(void 0), !0);
52
+ return !t && (d.multiple, d.onChange?.(e), R?.(void 0), !0);
53
53
  }
54
54
  return !1;
55
55
  }, [
@@ -6,24 +6,27 @@ var r = [
6
6
  "jpeg",
7
7
  "jpg",
8
8
  "png"
9
- ], i = ({ className: i = "", minSize: a = 0, maxSize: o = Infinity, types: s = r }) => /* @__PURE__ */ n("div", {
10
- title: t(() => {
9
+ ], i = ({ className: i = "", minSize: a = 0, maxSize: o = Infinity, types: s = r }) => {
10
+ let c = t(() => {
11
11
  let t = [];
12
12
  return o && t.push(`Max size: ${e(o)}`), a && t.push(`Min size: ${e(a)}`), t.push(`types: ${s.join(", ")}`), t.join(" | ");
13
13
  }, [
14
14
  o,
15
15
  a,
16
16
  s
17
- ]),
18
- className: i,
19
- children: [s.join(", "), o && o !== Infinity && /* @__PURE__ */ n("span", {
20
- className: "inline-block uppercase mx-1 text-inherit",
21
- children: [
22
- "(",
23
- e(o),
24
- ")"
25
- ]
26
- })]
27
- });
17
+ ]);
18
+ return /* @__PURE__ */ n("div", {
19
+ title: c,
20
+ className: i,
21
+ children: [s.join(", "), o && o !== Infinity && /* @__PURE__ */ n("span", {
22
+ className: "inline-block uppercase mx-1 text-inherit",
23
+ children: [
24
+ "(",
25
+ e(o),
26
+ ")"
27
+ ]
28
+ })]
29
+ });
30
+ };
28
31
  //#endregion
29
32
  export { i as default };
@@ -1,8 +1,8 @@
1
1
  import e from "../../../../hooks/useTheme/index.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region src/components/FileUpload/components/FileUploadMessage/FileUploadMessage.tsx
4
- var r = ({ className: r = "", label: i = "", hasFiles: a = !1, disabled: o = !1, error: s, intent: c, size: l, canDragAndDrop: u }) => /* @__PURE__ */ n("div", {
5
- className: e("FileUpload", {
4
+ var r = ({ className: r = "", label: i = "", hasFiles: a = !1, disabled: o = !1, error: s, intent: c, size: l, canDragAndDrop: u }) => {
5
+ let d = e("FileUpload", {
6
6
  className: r,
7
7
  componentKey: ["label"],
8
8
  variants: {
@@ -12,25 +12,28 @@ var r = ({ className: r = "", label: i = "", hasFiles: a = !1, disabled: o = !1,
12
12
  disabled: o,
13
13
  canDragAndDrop: u
14
14
  }
15
- }).label,
16
- children: [
17
- i && /* @__PURE__ */ t("span", {
18
- className: "text-inherit",
19
- children: i
20
- }),
21
- /* @__PURE__ */ n("span", {
22
- className: "text-inherit",
23
- children: [/* @__PURE__ */ t("span", {
24
- className: "font-bold underline text-inherit",
25
- children: "Click to Upload"
26
- }), /* @__PURE__ */ t("span", {
15
+ });
16
+ return /* @__PURE__ */ n("div", {
17
+ className: d.label,
18
+ children: [
19
+ i && /* @__PURE__ */ t("span", {
27
20
  className: "text-inherit",
28
- children: " or drop a file here"
29
- })]
30
- }),
31
- a && /* @__PURE__ */ t("span", { children: "Added Successfully!. Add another?" }),
32
- s && /* @__PURE__ */ t("span", { children: typeof s == "boolean" ? "This field is invalid" : s })
33
- ]
34
- });
21
+ children: i
22
+ }),
23
+ /* @__PURE__ */ n("span", {
24
+ className: "text-inherit",
25
+ children: [/* @__PURE__ */ t("span", {
26
+ className: "font-bold underline text-inherit",
27
+ children: "Click to Upload"
28
+ }), /* @__PURE__ */ t("span", {
29
+ className: "text-inherit",
30
+ children: " or drop a file here"
31
+ })]
32
+ }),
33
+ a && /* @__PURE__ */ t("span", { children: "Added Successfully!. Add another?" }),
34
+ s && /* @__PURE__ */ t("span", { children: typeof s == "boolean" ? "This field is invalid" : s })
35
+ ]
36
+ });
37
+ };
35
38
  //#endregion
36
39
  export { r as default };
@@ -14,11 +14,11 @@ declare const _default: {
14
14
  root: (props?: ({
15
15
  direction?: "column" | "row" | "row-reverse" | "col-reverse" | null | undefined;
16
16
  grow?: boolean | null | undefined;
17
- basis?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | "auto" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full" | null | undefined;
17
+ basis?: 0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96 | "auto" | "px" | "0.5" | "1.5" | "2.5" | "3.5" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full" | null | undefined;
18
18
  wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
19
19
  items?: "start" | "end" | "center" | "baseline" | "stretch" | null | undefined;
20
20
  justify?: "start" | "end" | "center" | "stretch" | "normal" | "between" | "around" | "evenly" | null | undefined;
21
- gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 1.5 | null | undefined;
21
+ gap?: 0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 1.5 | null | undefined;
22
22
  shrink?: 0 | 1 | null | undefined;
23
23
  alignItems?: "start" | "end" | "center" | "baseline" | "stretch" | null | undefined;
24
24
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -9,12 +9,12 @@ import s from "./fields/FormSelect2.js";
9
9
  import c from "./fields/FormSwitch.js";
10
10
  import l from "./fields/FormTextArea.js";
11
11
  import { fields_exports as u } from "./fields/index.js";
12
- import d from "./Form.js";
13
- import f from "./Form.styles.js";
14
- import p from "./hooks/useForm.js";
15
- import m from "./hooks/useFormWatch.js";
12
+ import d from "./hooks/useForm.js";
13
+ import f from "./hooks/useFormWatch.js";
14
+ import p from "./Form.js";
15
+ import m from "./Form.styles.js";
16
16
  import { useFieldArray as h, useFormContext as g } from "react-hook-form";
17
17
  //#region src/components/Form/index.ts
18
- var _ = d;
18
+ var _ = p;
19
19
  //#endregion
20
- export { e as Checkbox, t as Color, n as Conditional, r as Custom, i as FileUpload, a as Input, o as Select, s as Select2, c as Switch, l as TextArea, _ as default, u as fields, f as formTheme, h as useFieldArray, p as useForm, g as useFormContext, m as useFormWatch };
20
+ export { e as Checkbox, t as Color, n as Conditional, r as Custom, i as FileUpload, a as Input, o as Select, s as Select2, c as Switch, l as TextArea, _ as default, u as fields, m as formTheme, h as useFieldArray, d as useForm, g as useFormContext, f as useFormWatch };
@@ -14,7 +14,7 @@ var s = Object.assign(r(({ ref: t, children: r, className: s = "", id: c, label:
14
14
  error: !!b,
15
15
  inline: m
16
16
  }
17
- }), T = i((e) => S?.(e.target.value), [S]);
17
+ }), T = i((e) => S?.(e.target.value), [S]), E = i(() => S?.(""), [S]);
18
18
  return /* @__PURE__ */ o(n, {
19
19
  className: s,
20
20
  id: c,
@@ -27,7 +27,7 @@ var s = Object.assign(r(({ ref: t, children: r, className: s = "", id: c, label:
27
27
  error: b,
28
28
  intent: v,
29
29
  size: _,
30
- onClear: i(() => S?.(""), [S]),
30
+ onClear: E,
31
31
  ...x,
32
32
  children: [r, /* @__PURE__ */ a("input", {
33
33
  ref: t,
@@ -31,15 +31,17 @@ var f = ({ ref: f, className: p, id: m, label: h, error: g, disabled: _, intent:
31
31
  inputChildren: []
32
32
  };
33
33
  return i.forEach(x, (n) => {
34
- if (o(n)) if (n.type === t) {
35
- let t = n.props;
36
- e.iconChildren = a(n, {
37
- className: d(O.icon, t.className),
38
- size: y,
39
- ...t,
40
- intent: t.intent ?? "custom"
41
- });
42
- } else e.inputChildren.push(n);
34
+ if (o(n)) {
35
+ if (n.type === t) {
36
+ let t = n.props;
37
+ e.iconChildren = a(n, {
38
+ className: d(O.icon, t.className),
39
+ size: y,
40
+ ...t,
41
+ intent: t.intent ?? "custom"
42
+ });
43
+ } else e.inputChildren.push(n);
44
+ }
43
45
  }), e;
44
46
  }, [
45
47
  x,
@@ -27,8 +27,8 @@ var u = ({ className: u, id: d, size: f, value: p, disabled: m = !1, label: h, e
27
27
  w
28
28
  ]), O = o((e) => {
29
29
  if (!b) return;
30
- let t = E.filter((t, n) => n !== e), r = n(t.map(([e, t]) => [...e.split("."), t]));
31
- w?.(t, r);
30
+ let t = E.filter((t, n) => n !== e), r = t.map(([e, t]) => [...e.split("."), t]), i = n(r);
31
+ w?.(t, i);
32
32
  }, [
33
33
  E,
34
34
  b,
@@ -35,27 +35,29 @@ var v = ({ className: v, children: y, value: b, disabled: x, testId: S, onSelect
35
35
  e.content.push(n);
36
36
  return;
37
37
  }
38
- if (c(n)) if (n.type === t) {
39
- let t = n.props;
40
- e.icon = s(n, {
41
- testId: S ? `${S}-icon` : void 0,
42
- ...t,
43
- intent: "custom"
44
- });
45
- } else if (n.type === a) {
46
- let t = n.props;
47
- e.subMenu = s(n, {
48
- testId: S ? `${S}-menu` : void 0,
49
- ...t,
50
- onSelect: C
51
- });
52
- } else {
53
- let t = n.props;
54
- e.content.push(s(n, {
55
- key: r,
56
- testId: S ? `${S}-${r}` : void 0,
57
- ...t
58
- }));
38
+ if (c(n)) {
39
+ if (n.type === t) {
40
+ let t = n.props;
41
+ e.icon = s(n, {
42
+ testId: S ? `${S}-icon` : void 0,
43
+ ...t,
44
+ intent: "custom"
45
+ });
46
+ } else if (n.type === a) {
47
+ let t = n.props;
48
+ e.subMenu = s(n, {
49
+ testId: S ? `${S}-menu` : void 0,
50
+ ...t,
51
+ onSelect: C
52
+ });
53
+ } else {
54
+ let t = n.props;
55
+ e.content.push(s(n, {
56
+ key: r,
57
+ testId: S ? `${S}-${r}` : void 0,
58
+ ...t
59
+ }));
60
+ }
59
61
  }
60
62
  }), e;
61
63
  }, [
@@ -42,21 +42,23 @@ var v = ({ ref: e, className: r, children: v, open: y, disabled: b = !1, testId:
42
42
  A,
43
43
  x
44
44
  ]);
45
- return u(() => {
45
+ u(() => {
46
46
  if (T) return document.addEventListener("mousedown", k), () => {
47
47
  document.removeEventListener("mousedown", k);
48
48
  };
49
- }, [k, T]), /* @__PURE__ */ _(h, { children: [j, /* @__PURE__ */ g(t, {
50
- value: f(() => ({
51
- open: T,
52
- placement: S,
53
- triggerRef: D,
54
- container: C
55
- }), [
56
- T,
57
- S,
58
- C
59
- ]),
49
+ }, [k, T]);
50
+ let N = f(() => ({
51
+ open: T,
52
+ placement: S,
53
+ triggerRef: D,
54
+ container: C
55
+ }), [
56
+ T,
57
+ S,
58
+ C
59
+ ]);
60
+ return /* @__PURE__ */ _(h, { children: [j, /* @__PURE__ */ g(t, {
61
+ value: N,
60
62
  children: /* @__PURE__ */ g(n, {
61
63
  open: T,
62
64
  className: r,