@levo-so/react 0.1.17 → 0.1.21

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 (38) hide show
  1. package/dist/{CheckboxWidget-CZWSPzDj.js → CheckboxWidget-C4hO5xNP.js} +1 -1
  2. package/dist/{CollectionFormBuilder-nZcXob6G.js → CollectionFormBuilder-nJWTPHeL.js} +161 -165
  3. package/dist/{CurrencyWidget-CvosXYBi.js → CurrencyWidget-CZC10BuG.js} +1 -1
  4. package/dist/{DateTimeWidget-CE0EPFkl.js → DateTimeWidget-C7PJ3I0X.js} +1 -1
  5. package/dist/{DefaultFormVariant-DiaIcOyu.js → DefaultFormVariant-CMwBglKk.js} +3 -3
  6. package/dist/{DropdownWidget-BquZdGIL.js → DropdownWidget-6t1Azs7b.js} +1 -1
  7. package/dist/{EmailWidget-KnkQjB4I.js → EmailWidget-pAm9hnZ9.js} +2 -2
  8. package/dist/FormCaptcha-D2AaDZdK.js +187 -0
  9. package/dist/{GeocoderWidget-DNkRmCVB.js → GeocoderWidget-TZBlYaeC.js} +2 -2
  10. package/dist/{MultiGeocoderWidget-D2Vh9SuR.js → MultiGeocoderWidget-B-zhvJVk.js} +3 -3
  11. package/dist/{MultiTextWidget-Ktmx0-ou.js → MultiTextWidget-Ciy7yoNk.js} +1 -1
  12. package/dist/{PhoneWidget-2JMw1hQ-.js → PhoneWidget-C_JKm3Kf.js} +1 -1
  13. package/dist/{RadioWidget-CsMqjCtP.js → RadioWidget-CXHvRIFJ.js} +2 -2
  14. package/dist/{RichTextWidget-CesaOZze.js → RichTextWidget-B8_J6aM2.js} +2 -2
  15. package/dist/{Spinner-Bzu2xCFZ.js → Spinner-BnrQ9e_i.js} +58 -57
  16. package/dist/{StepsFormVariant-FXwgPUG0.js → StepsFormVariant-gZTiDsQs.js} +3 -3
  17. package/dist/{SwitchWidget-W7FLoMLu.js → SwitchWidget-1ca0o1kt.js} +1 -1
  18. package/dist/{TextWidget-B6Y4Jjld.js → TextWidget-BttCChJt.js} +1 -1
  19. package/dist/{TextareaWidget-TszSrgEj.js → TextareaWidget-DsWOpkGn.js} +1 -1
  20. package/dist/{ToggleCheckboxWidget-sJoiRMME.js → ToggleCheckboxWidget-yJcUcHpk.js} +1 -1
  21. package/dist/{URLWidget-BjFx8Uf7.js → URLWidget-DPTwLvbi.js} +2 -2
  22. package/dist/{UploadWidget-Dzop6rEv.js → UploadWidget-Cg6EJDMD.js} +2 -2
  23. package/dist/audience/components/page.d.ts.map +1 -1
  24. package/dist/audience/index.js +1 -1
  25. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +1 -1
  26. package/dist/collection/index.js +1 -1
  27. package/dist/collection/lib/SaveDraftValues.d.ts.map +1 -1
  28. package/dist/components/Dialog.d.ts +3 -1
  29. package/dist/components/Dialog.d.ts.map +1 -1
  30. package/dist/components/Sonner.d.ts +1 -1
  31. package/dist/components/Sonner.d.ts.map +1 -1
  32. package/dist/components/index.js +29 -28
  33. package/dist/index.js +50 -49
  34. package/dist/membership/components/Popup.d.ts.map +1 -1
  35. package/dist/page-sR2SWtb2.js +189 -0
  36. package/package.json +4 -4
  37. package/dist/FormCaptcha-DNPGf2xY.js +0 -197
  38. package/dist/page-BKyDlf0z.js +0 -212
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useController as j } from "react-hook-form";
3
3
  import { NumericFormat as F } from "react-number-format";
4
4
  import { c as w } from "./cn-C9QoOYNG.js";
5
- import { z as C, A as B, B as N } from "./CollectionFormBuilder-nZcXob6G.js";
5
+ import { z as C, A as B, B as N } from "./CollectionFormBuilder-nJWTPHeL.js";
6
6
  const V = ({
7
7
  field: r,
8
8
  ...m
@@ -4,7 +4,7 @@ import { Calendar as w, X as N } from "lucide-react";
4
4
  import * as l from "react-datepicker";
5
5
  import { useController as v } from "react-hook-form";
6
6
  import { c as p } from "./cn-C9QoOYNG.js";
7
- import { z as M, A as D, B as C } from "./CollectionFormBuilder-nZcXob6G.js";
7
+ import { z as M, A as D, B as C } from "./CollectionFormBuilder-nJWTPHeL.js";
8
8
  import { I as F } from "./Input-2CvZ90f8.js";
9
9
  const T = l.default.default || l.default || l, I = (e) => {
10
10
  if (e) {
@@ -1,9 +1,9 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
2
  import { FormProvider as y } from "react-hook-form";
3
3
  import { c as t } from "./cn-C9QoOYNG.js";
4
- import { D as F, F as g } from "./CollectionFormBuilder-nZcXob6G.js";
5
- import { u as w, S as N, F as b } from "./FormCaptcha-DNPGf2xY.js";
6
- import { B as D } from "./Spinner-Bzu2xCFZ.js";
4
+ import { D as F, F as g } from "./CollectionFormBuilder-nJWTPHeL.js";
5
+ import { u as w, S as N, F as b } from "./FormCaptcha-D2AaDZdK.js";
6
+ import { B as D } from "./Spinner-BnrQ9e_i.js";
7
7
  const _ = () => {
8
8
  var n;
9
9
  const {
@@ -4,7 +4,7 @@ import { useState as x, useEffect as w } from "react";
4
4
  import { useController as B } from "react-hook-form";
5
5
  import D from "react-select";
6
6
  import { c as y } from "./cn-C9QoOYNG.js";
7
- import { z as N, A as k, B as q } from "./CollectionFormBuilder-nZcXob6G.js";
7
+ import { z as N, A as k, B as q } from "./CollectionFormBuilder-nJWTPHeL.js";
8
8
  import { I as L } from "./Input-2CvZ90f8.js";
9
9
  const G = ({
10
10
  field: s,
@@ -1,7 +1,7 @@
1
1
  import { j as r } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useController as y } from "react-hook-form";
3
- import { G as C } from "./Spinner-Bzu2xCFZ.js";
4
- import { z as F, A as I, B as V } from "./CollectionFormBuilder-nZcXob6G.js";
3
+ import { G as C } from "./Spinner-BnrQ9e_i.js";
4
+ import { z as F, A as I, B as V } from "./CollectionFormBuilder-nJWTPHeL.js";
5
5
  import { I as b } from "./Input-2CvZ90f8.js";
6
6
  function w(e) {
7
7
  return C({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M1.75 3h20.5c.966 0 1.75.784 1.75 1.75v14a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 18.75v-14C0 3.784.784 3 1.75 3ZM1.5 7.412V18.75c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25V7.412l-9.52 6.433c-.592.4-1.368.4-1.96 0Zm0-2.662v.852l10.36 7a.25.25 0 0 0 .28 0l10.36-7V4.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z" }, child: [] }] })(e);
@@ -0,0 +1,187 @@
1
+ "use client";
2
+ import { useEffect as k, useState as b, useRef as J } from "react";
3
+ import { useFormContext as W, useWatch as Y, useForm as B, useController as G } from "react-hook-form";
4
+ import { useDebouncedCallback as H } from "use-debounce";
5
+ import { u as x } from "./LevoProvider-BAZy7_tP.js";
6
+ import { D as C, s as z, h as Q, c as X, A as Z } from "./CollectionFormBuilder-nJWTPHeL.js";
7
+ import { s as m } from "./Sonner-t6JVKA0a.js";
8
+ import { e as D } from "./errorHandler-_34Yv8wA.js";
9
+ import { a as h } from "./isEmptyObject-C5s4GzLE.js";
10
+ import { j as U } from "./jsx-runtime-B6kdoens.js";
11
+ import "altcha";
12
+ const R = {
13
+ FORM_DIRTY: "form-dirty",
14
+ FORM_VALUES: "form-values"
15
+ }, tt = (t) => {
16
+ const s = localStorage.getItem(`${t}-${R.FORM_VALUES}`);
17
+ return s ? JSON.parse(s) : {};
18
+ }, et = (t, s) => {
19
+ localStorage.setItem(
20
+ `${t}-${R.FORM_VALUES}`,
21
+ JSON.stringify(s)
22
+ );
23
+ }, M = (t) => {
24
+ localStorage.removeItem(`${t}-${R.FORM_VALUES}`);
25
+ }, dt = ({ currentValues: t, isError: s, getContentId: g }) => {
26
+ var O;
27
+ const { schema: n, isLoggedIn: a } = C(), e = W(), l = Y(), { client: S } = x(), I = H((v) => {
28
+ n != null && n.key && !s && n != null && n.allow_draft && (a ? fetch(`${S.apiUrl}/v1/bevy/content/${n == null ? void 0 : n.key}/save-entry`, {
29
+ method: "POST",
30
+ body: JSON.stringify({ ...v }),
31
+ headers: {
32
+ "Content-Type": "application/json"
33
+ }
34
+ }).then((o) => o.json()).then((o) => {
35
+ var _, V, c, E;
36
+ (V = (_ = o == null ? void 0 : o.content) == null ? void 0 : _.data) != null && V._id && g((E = (c = o == null ? void 0 : o.content) == null ? void 0 : c.data) == null ? void 0 : E._id);
37
+ }).catch(() => {
38
+ console.error("saving entry failed");
39
+ }) : et(n == null ? void 0 : n.key, v));
40
+ }, 2500);
41
+ return k(() => {
42
+ var v, o;
43
+ s || (v = e == null ? void 0 : e.formState) != null && v.isDirty && ((o = Object == null ? void 0 : Object.keys(l || {})) == null ? void 0 : o.length) > 0 && (I.cancel(), I({
44
+ ...t,
45
+ ...l
46
+ }));
47
+ }, [(O = e == null ? void 0 : e.formState) == null ? void 0 : O.isDirty, s, a, l]), null;
48
+ }, yt = ({
49
+ schema: t,
50
+ saveToRemote: s,
51
+ onSubmit: g,
52
+ onSubmitSuccess: n,
53
+ onSubmitError: a
54
+ }) => {
55
+ const { collection: e } = x(), {
56
+ toastConfig: l,
57
+ onSuccess: S,
58
+ onError: I,
59
+ isLoggedIn: O,
60
+ isDisabled: v,
61
+ externalInitialValues: o = {}
62
+ } = C(), [_, V] = b({}), [c, E] = b(null), [N, $] = b(!1), [P, A] = b(!1), r = J({}), F = B({
63
+ mode: "all",
64
+ disabled: v,
65
+ defaultValues: _,
66
+ values: _,
67
+ resetOptions: {
68
+ keepErrors: !0
69
+ }
70
+ }), q = F.handleSubmit(async (d) => {
71
+ var L, p, y, i, j, T;
72
+ if (r.current = {
73
+ ...r.current || {},
74
+ ...d
75
+ }, s && e) {
76
+ if (t)
77
+ try {
78
+ const f = z(r == null ? void 0 : r.current, t);
79
+ let u = null;
80
+ if (c ? u = await (e == null ? void 0 : e.submitDraftEntry(t == null ? void 0 : t.key, f).catch((w) => (D(w), null))) : u = await (e == null ? void 0 : e.saveCollectionData({
81
+ collection_id: t == null ? void 0 : t.id,
82
+ data: f
83
+ }).catch((w) => (D(w), null))), (L = u == null ? void 0 : u.content) != null && L.data)
84
+ return l != null && l.showSuccessToast && m(
85
+ l.successToastText || "Form submitted successfully."
86
+ ), r.current = h(o) ? {} : { ...o }, M(t == null ? void 0 : t.key), E(null), S && S({
87
+ schemaId: t == null ? void 0 : t.id,
88
+ response: (p = u == null ? void 0 : u.content) == null ? void 0 : p.data
89
+ }), n && n(), F.reset(), F.clearErrors(), !0;
90
+ throw new Error("Failed to save form details, API response invalid");
91
+ } catch (f) {
92
+ const u = (j = (i = (y = f == null ? void 0 : f.response) == null ? void 0 : y.data) == null ? void 0 : i.content) == null ? void 0 : j.errors;
93
+ return Q(u, F.setError), a && a(u), I && I(((T = f == null ? void 0 : f.response) == null ? void 0 : T.data) || f), !1;
94
+ }
95
+ return !1;
96
+ }
97
+ d && g && g(d);
98
+ }), K = (d) => {
99
+ d && d !== c && E(d);
100
+ };
101
+ return k(() => {
102
+ if (t && e) {
103
+ const d = X(t);
104
+ if (r.current = {
105
+ ...d,
106
+ ...o || {},
107
+ ...r.current || {}
108
+ }, !c && t != null && t.allow_draft) {
109
+ if (O) {
110
+ $(!0), e == null || e.getDraftEntry(t == null ? void 0 : t.key).then((p) => {
111
+ if (p === null) {
112
+ A(!0);
113
+ return;
114
+ }
115
+ A(!1);
116
+ const y = Array.isArray(p) ? p == null ? void 0 : p.filter((i) => (i == null ? void 0 : i._status) === "draft") : [];
117
+ if ((y == null ? void 0 : y.length) > 0) {
118
+ const i = (y == null ? void 0 : y[0]) || {};
119
+ i != null && i._id && (r.current = {
120
+ ...r.current || {},
121
+ ...i
122
+ }, E(i == null ? void 0 : i._id));
123
+ }
124
+ }).catch(() => null).finally(() => {
125
+ V({
126
+ ...r == null ? void 0 : r.current
127
+ }), $(!1);
128
+ });
129
+ return;
130
+ }
131
+ const L = tt(t == null ? void 0 : t.key);
132
+ L && (r.current = {
133
+ ...r.current || {},
134
+ ...L
135
+ });
136
+ }
137
+ V({
138
+ ...(r == null ? void 0 : r.current) || {}
139
+ });
140
+ }
141
+ }, [t]), k(() => {
142
+ t && c && M(t == null ? void 0 : t.key);
143
+ }, [c]), {
144
+ methods: F,
145
+ isLoading: N,
146
+ isError: P,
147
+ contentId: c,
148
+ allFormValues: r.current,
149
+ handleContentId: K,
150
+ handleSubmit: q
151
+ };
152
+ }, pt = () => {
153
+ const { isInternal: t } = C(), { client: s } = x(), g = J(null), {
154
+ field: { onChange: n },
155
+ fieldState: { error: a }
156
+ } = G({
157
+ name: "__captcha",
158
+ rules: {
159
+ required: t ? !1 : "Verification is required"
160
+ }
161
+ });
162
+ return k(() => {
163
+ const e = (S) => {
164
+ "detail" in S && n(S.detail.state || null);
165
+ }, { current: l } = g;
166
+ if (l)
167
+ return l.addEventListener("statechange", e), () => l.removeEventListener("statechange", e);
168
+ }, []), /* @__PURE__ */ U.jsx(Z, { error: a == null ? void 0 : a.message, children: /* @__PURE__ */ U.jsx(
169
+ "altcha-widget",
170
+ {
171
+ ref: g,
172
+ style: {
173
+ "--altcha-max-width": "100%"
174
+ },
175
+ hidelogo: !0,
176
+ auto: "onfocus",
177
+ hidefooter: !0,
178
+ challengeurl: `${s.apiUrl}/v1/identity/captcha/create-challenge`,
179
+ verifyurl: `${s.apiUrl}/v1/identity/captcha/verify-challenge`
180
+ }
181
+ ) });
182
+ };
183
+ export {
184
+ pt as F,
185
+ dt as S,
186
+ yt as u
187
+ };
@@ -2,8 +2,8 @@
2
2
  import { j as o } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useState as p, useEffect as v } from "react";
4
4
  import { useController as z } from "react-hook-form";
5
- import { n as T } from "./Spinner-Bzu2xCFZ.js";
6
- import { z as k, A as q, B as A } from "./CollectionFormBuilder-nZcXob6G.js";
5
+ import { o as T } from "./Spinner-BnrQ9e_i.js";
6
+ import { z as k, A as q, B as A } from "./CollectionFormBuilder-nJWTPHeL.js";
7
7
  import { I as E } from "./Input-2CvZ90f8.js";
8
8
  import { u as O } from "./LevoProvider-BAZy7_tP.js";
9
9
  const $ = ({ field: t }) => {
@@ -2,9 +2,9 @@
2
2
  import { j as e } from "./jsx-runtime-B6kdoens.js";
3
3
  import { Plus as m } from "lucide-react";
4
4
  import { useFieldArray as n } from "react-hook-form";
5
- import { B as c } from "./CollectionFormBuilder-nZcXob6G.js";
6
- import { GeocoderWidget as d } from "./GeocoderWidget-DNkRmCVB.js";
7
- import { B as p } from "./Spinner-Bzu2xCFZ.js";
5
+ import { B as c } from "./CollectionFormBuilder-nJWTPHeL.js";
6
+ import { GeocoderWidget as d } from "./GeocoderWidget-TZBlYaeC.js";
7
+ import { B as p } from "./Spinner-BnrQ9e_i.js";
8
8
  const k = ({
9
9
  field: l
10
10
  }) => {
@@ -1,6 +1,6 @@
1
1
  import { j as a } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useController as A } from "react-hook-form";
3
- import { z as C, A as b, B as q } from "./CollectionFormBuilder-nZcXob6G.js";
3
+ import { z as C, A as b, B as q } from "./CollectionFormBuilder-nJWTPHeL.js";
4
4
  import { I } from "./Input-2CvZ90f8.js";
5
5
  const f = ({ field: r }) => {
6
6
  var l;
@@ -3,7 +3,7 @@ import { j as o } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useController as f } from "react-hook-form";
4
4
  import { PhoneInput as g } from "react-international-phone";
5
5
  import { c as l } from "./cn-C9QoOYNG.js";
6
- import { z as x, A as v, B as y } from "./CollectionFormBuilder-nZcXob6G.js";
6
+ import { z as x, A as v, B as y } from "./CollectionFormBuilder-nJWTPHeL.js";
7
7
  const P = ({ field: e }) => {
8
8
  const { key: u = "", label: t = "", helper_text: c = "", readonly: n = !1 } = e, s = u, {
9
9
  field: { value: d, onBlur: a, onChange: i, ...m },
@@ -3,9 +3,9 @@ import { j as r } from "./jsx-runtime-B6kdoens.js";
3
3
  import * as n from "@radix-ui/react-radio-group";
4
4
  import * as d from "react";
5
5
  import { useController as F } from "react-hook-form";
6
- import { G as B } from "./Spinner-Bzu2xCFZ.js";
6
+ import { G as B } from "./Spinner-BnrQ9e_i.js";
7
7
  import { c as N } from "./cn-C9QoOYNG.js";
8
- import { z as E, A as G, B as f } from "./CollectionFormBuilder-nZcXob6G.js";
8
+ import { z as E, A as G, B as f } from "./CollectionFormBuilder-nJWTPHeL.js";
9
9
  import { I as V } from "./Input-2CvZ90f8.js";
10
10
  function q(s) {
11
11
  return B({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M416 128 192 384l-96-96" }, child: [] }] })(s);
@@ -17,9 +17,9 @@ import F from "@tiptap/extension-underline";
17
17
  import { useEditor as I, EditorContent as E } from "@tiptap/react";
18
18
  import { useState as q, useEffect as D } from "react";
19
19
  import { useController as G } from "react-hook-form";
20
- import { G as p, o as J, p as V, q as W, r as Z, s as _, t as P, u as K, v as Q, w as X, x as Y, y as $, z as nn } from "./Spinner-Bzu2xCFZ.js";
20
+ import { G as p, p as J, q as V, r as W, s as Z, t as _, u as P, v as K, w as Q, x as X, y as Y, z as $, A as nn } from "./Spinner-BnrQ9e_i.js";
21
21
  import { c as j } from "./cn-C9QoOYNG.js";
22
- import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-nZcXob6G.js";
22
+ import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-nJWTPHeL.js";
23
23
  function an(n) {
24
24
  return p({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 0 1-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 0 1-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 0 0-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z" }, child: [] }] })(n);
25
25
  }
@@ -3,7 +3,7 @@ import { j as i } from "./jsx-runtime-B6kdoens.js";
3
3
  import * as m from "@radix-ui/react-tabs";
4
4
  import * as u from "react";
5
5
  import f from "react";
6
- import { c as l } from "./cn-C9QoOYNG.js";
6
+ import { c } from "./cn-C9QoOYNG.js";
7
7
  import { Slot as D } from "@radix-ui/react-slot";
8
8
  import { twMerge as M } from "tailwind-merge";
9
9
  import { cva as L } from "class-variance-authority";
@@ -16,17 +16,17 @@ var y = {
16
16
  style: void 0,
17
17
  attr: void 0
18
18
  }, b = f.createContext && /* @__PURE__ */ f.createContext(y), T = ["attr", "size", "title"];
19
- function S(t, e) {
19
+ function E(t, e) {
20
20
  if (t == null) return {};
21
- var a = k(t, e), r, s;
21
+ var a = S(t, e), r, s;
22
22
  if (Object.getOwnPropertySymbols) {
23
- var c = Object.getOwnPropertySymbols(t);
24
- for (s = 0; s < c.length; s++)
25
- r = c[s], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (a[r] = t[r]);
23
+ var l = Object.getOwnPropertySymbols(t);
24
+ for (s = 0; s < l.length; s++)
25
+ r = l[s], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (a[r] = t[r]);
26
26
  }
27
27
  return a;
28
28
  }
29
- function k(t, e) {
29
+ function S(t, e) {
30
30
  if (t == null) return {};
31
31
  var a = {};
32
32
  for (var r in t)
@@ -60,14 +60,14 @@ function p(t) {
60
60
  for (var e = 1; e < arguments.length; e++) {
61
61
  var a = arguments[e] != null ? arguments[e] : {};
62
62
  e % 2 ? x(Object(a), !0).forEach(function(r) {
63
- E(t, r, a[r]);
63
+ k(t, r, a[r]);
64
64
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : x(Object(a)).forEach(function(r) {
65
65
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(a, r));
66
66
  });
67
67
  }
68
68
  return t;
69
69
  }
70
- function E(t, e, a) {
70
+ function k(t, e, a) {
71
71
  return e = _(e), e in t ? Object.defineProperty(t, e, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = a, t;
72
72
  }
73
73
  function _(t) {
@@ -99,8 +99,8 @@ function V(t) {
99
99
  var {
100
100
  attr: r,
101
101
  size: s,
102
- title: c
103
- } = t, g = S(t, T), h = s || a.size || "1em", d;
102
+ title: l
103
+ } = t, g = E(t, T), h = s || a.size || "1em", d;
104
104
  return a.className && (d = a.className), t.className && (d = (d ? d + " " : "") + t.className), /* @__PURE__ */ f.createElement("svg", v({
105
105
  stroke: "currentColor",
106
106
  fill: "currentColor",
@@ -113,7 +113,7 @@ function V(t) {
113
113
  height: h,
114
114
  width: h,
115
115
  xmlns: "http://www.w3.org/2000/svg"
116
- }), c && /* @__PURE__ */ f.createElement("title", null, c), t.children);
116
+ }), l && /* @__PURE__ */ f.createElement("title", null, l), t.children);
117
117
  };
118
118
  return b !== void 0 ? /* @__PURE__ */ f.createElement(b.Consumer, null, (a) => e(a)) : e(y);
119
119
  }
@@ -166,7 +166,7 @@ const vt = m.Root, I = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__
166
166
  m.List,
167
167
  {
168
168
  ref: a,
169
- className: l(
169
+ className: c(
170
170
  "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
171
171
  t
172
172
  ),
@@ -178,7 +178,7 @@ const W = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
178
178
  m.Trigger,
179
179
  {
180
180
  ref: a,
181
- className: l(
181
+ className: c(
182
182
  "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
183
183
  t
184
184
  ),
@@ -191,7 +191,7 @@ const F = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
191
191
  m.Content,
192
192
  {
193
193
  ref: a,
194
- className: l(
194
+ className: c(
195
195
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
196
196
  t
197
197
  ),
@@ -240,21 +240,21 @@ const U = L(
240
240
  size: a,
241
241
  rounded: r,
242
242
  asChild: s = !1,
243
- isLoading: c = !1,
243
+ isLoading: l = !1,
244
244
  loadingText: g,
245
245
  disabled: h,
246
246
  ...d
247
- }, P) => {
248
- const C = s ? D : "button";
247
+ }, C) => {
248
+ const P = s ? D : "button";
249
249
  return /* @__PURE__ */ i.jsx(
250
- C,
250
+ P,
251
251
  {
252
- className: l(U({ variant: e, size: a, rounded: r, className: t })),
253
- ref: P,
254
- disabled: h || c,
252
+ className: c(U({ variant: e, size: a, rounded: r, className: t })),
253
+ ref: C,
254
+ disabled: h || l,
255
255
  type: "button",
256
256
  ...d,
257
- children: c ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
257
+ children: l ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
258
258
  /* @__PURE__ */ i.jsx(
259
259
  z,
260
260
  {
@@ -271,11 +271,11 @@ const U = L(
271
271
  }
272
272
  );
273
273
  G.displayName = "Button";
274
- const q = o.Root, pt = o.Trigger, J = o.Portal, j = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
274
+ const q = o.Root, pt = o.Trigger, J = o.Portal, bt = o.Close, j = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
275
275
  o.Overlay,
276
276
  {
277
277
  ref: a,
278
- className: l(
278
+ className: c(
279
279
  "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
280
280
  t
281
281
  ),
@@ -283,17 +283,17 @@ const q = o.Root, pt = o.Trigger, J = o.Portal, j = u.forwardRef(({ className: t
283
283
  }
284
284
  ));
285
285
  j.displayName = o.Overlay.displayName;
286
- const N = u.forwardRef(({ className: t, children: e, hideCloseButton: a, ...r }, s) => /* @__PURE__ */ i.jsxs(J, { children: [
287
- /* @__PURE__ */ i.jsx(j, {}),
286
+ const N = u.forwardRef(({ className: t, children: e, hideCloseButton: a, overlayStyles: r, ...s }, l) => /* @__PURE__ */ i.jsxs(J, { children: [
287
+ /* @__PURE__ */ i.jsx(j, { className: r }),
288
288
  /* @__PURE__ */ i.jsxs(
289
289
  o.Content,
290
290
  {
291
- ref: s,
292
- className: l(
291
+ ref: l,
292
+ className: c(
293
293
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",
294
294
  t
295
295
  ),
296
- ...r,
296
+ ...s,
297
297
  children: [
298
298
  e,
299
299
  !a && /* @__PURE__ */ i.jsxs(o.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
@@ -311,7 +311,7 @@ const H = ({
311
311
  }) => /* @__PURE__ */ i.jsx(
312
312
  "div",
313
313
  {
314
- className: l(
314
+ className: c(
315
315
  "flex flex-col space-y-1.5 text-center sm:text-left",
316
316
  t
317
317
  ),
@@ -325,7 +325,7 @@ const K = ({
325
325
  }) => /* @__PURE__ */ i.jsx(
326
326
  "div",
327
327
  {
328
- className: l(
328
+ className: c(
329
329
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
330
330
  t
331
331
  ),
@@ -337,7 +337,7 @@ const O = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
337
337
  o.Title,
338
338
  {
339
339
  ref: a,
340
- className: l(
340
+ className: c(
341
341
  "text-lg font-semibold leading-none tracking-tight",
342
342
  t
343
343
  ),
@@ -349,32 +349,33 @@ const B = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
349
349
  o.Description,
350
350
  {
351
351
  ref: a,
352
- className: l("text-sm text-muted-foreground", t),
352
+ className: c("text-sm text-muted-foreground", t),
353
353
  ...e
354
354
  }
355
355
  ));
356
356
  B.displayName = o.Description.displayName;
357
- const bt = ({
357
+ const xt = ({
358
358
  isOpen: t,
359
359
  onClose: e,
360
360
  children: a,
361
361
  title: r,
362
362
  contentClassName: s,
363
- modal: c = !0
364
- }) => /* @__PURE__ */ i.jsx(q, { open: t, onOpenChange: e, modal: c, children: /* @__PURE__ */ i.jsxs(N, { className: s, children: [
363
+ modal: l = !0
364
+ }) => /* @__PURE__ */ i.jsx(q, { open: t, onOpenChange: e, modal: l, children: /* @__PURE__ */ i.jsxs(N, { className: s, children: [
365
365
  r && /* @__PURE__ */ i.jsxs(H, { className: "flex-1 font-medium", children: [
366
366
  /* @__PURE__ */ i.jsx(O, { children: r }),
367
367
  /* @__PURE__ */ i.jsx(B, {})
368
368
  ] }),
369
369
  /* @__PURE__ */ i.jsx("div", { className: "w-full", children: a })
370
- ] }) }), xt = ({ className: t }) => /* @__PURE__ */ i.jsx(z, { className: l("h-8 w-8 animate-spin font-light", t) });
370
+ ] }) }), yt = ({ className: t }) => /* @__PURE__ */ i.jsx(z, { className: c("h-8 w-8 animate-spin font-light", t) });
371
371
  export {
372
- ot as A,
372
+ at as A,
373
373
  G as B,
374
- lt as C,
374
+ ot as C,
375
375
  q as D,
376
+ lt as E,
376
377
  n as G,
377
- xt as S,
378
+ yt as S,
378
379
  vt as T,
379
380
  J as a,
380
381
  U as b,
@@ -386,20 +387,20 @@ export {
386
387
  O as h,
387
388
  B as i,
388
389
  bt as j,
389
- I as k,
390
- W as l,
391
- F as m,
392
- z as n,
393
- st as o,
394
- ct as p,
395
- gt as q,
396
- mt as r,
397
- ft as s,
398
- ut as t,
399
- dt as u,
400
- ht as v,
401
- rt as w,
402
- it as x,
403
- nt as y,
404
- at as z
390
+ xt as k,
391
+ I as l,
392
+ W as m,
393
+ F as n,
394
+ z as o,
395
+ st as p,
396
+ ct as q,
397
+ gt as r,
398
+ mt as s,
399
+ ft as t,
400
+ ut as u,
401
+ dt as v,
402
+ ht as w,
403
+ rt as x,
404
+ it as y,
405
+ nt as z
405
406
  };
@@ -3,9 +3,9 @@ import { j as t } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useState as I, useMemo as y } from "react";
4
4
  import { FormProvider as T } from "react-hook-form";
5
5
  import { c as F } from "./cn-C9QoOYNG.js";
6
- import { D as N, F as _ } from "./CollectionFormBuilder-nZcXob6G.js";
7
- import { u as C, S as H, F as M } from "./FormCaptcha-DNPGf2xY.js";
8
- import { B as g } from "./Spinner-Bzu2xCFZ.js";
6
+ import { D as N, F as _ } from "./CollectionFormBuilder-nJWTPHeL.js";
7
+ import { u as C, S as H, F as M } from "./FormCaptcha-D2AaDZdK.js";
8
+ import { B as g } from "./Spinner-BnrQ9e_i.js";
9
9
  const Y = () => {
10
10
  const [n, a] = I(0), { containerStyles: m } = N(), l = () => {
11
11
  a((o) => o - 1);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { j as r } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useController as k } from "react-hook-form";
4
- import { z as w, A as j, B as v } from "./CollectionFormBuilder-nZcXob6G.js";
4
+ import { z as w, A as j, B as v } from "./CollectionFormBuilder-nJWTPHeL.js";
5
5
  import * as c from "@radix-ui/react-switch";
6
6
  import * as y from "react";
7
7
  import { c as d } from "./cn-C9QoOYNG.js";
@@ -1,7 +1,7 @@
1
1
  import { j as t } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useFormContext as g, get as h } from "react-hook-form";
3
3
  import { c as j } from "./cn-C9QoOYNG.js";
4
- import { A as F, B as b, z as y } from "./CollectionFormBuilder-nZcXob6G.js";
4
+ import { A as F, B as b, z as y } from "./CollectionFormBuilder-nJWTPHeL.js";
5
5
  import { I as f } from "./Input-2CvZ90f8.js";
6
6
  const k = ({
7
7
  field: r,
@@ -1,7 +1,7 @@
1
1
  import { j as s } from "./jsx-runtime-B6kdoens.js";
2
2
  import { useFormContext as u, get as x } from "react-hook-form";
3
3
  import { c as b } from "./cn-C9QoOYNG.js";
4
- import { A as g, B as f, z as h } from "./CollectionFormBuilder-nZcXob6G.js";
4
+ import { A as g, B as f, z as h } from "./CollectionFormBuilder-nJWTPHeL.js";
5
5
  const w = ({ field: e }) => {
6
6
  var a;
7
7
  const {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { j as r } from "./jsx-runtime-B6kdoens.js";
3
3
  import { useController as p } from "react-hook-form";
4
- import { z as u, A as g, B as C } from "./CollectionFormBuilder-nZcXob6G.js";
4
+ import { z as u, A as g, B as C } from "./CollectionFormBuilder-nJWTPHeL.js";
5
5
  import { C as f } from "./Checbox-sq-atGlJ.js";
6
6
  const y = ({
7
7
  field: e
@@ -1,6 +1,6 @@
1
1
  import { j as e } from "./jsx-runtime-B6kdoens.js";
2
- import { H as s } from "./CollectionFormBuilder-nZcXob6G.js";
3
- import r from "./TextWidget-B6Y4Jjld.js";
2
+ import { H as s } from "./CollectionFormBuilder-nJWTPHeL.js";
3
+ import r from "./TextWidget-BttCChJt.js";
4
4
  const a = (t) => /* @__PURE__ */ e.jsx(
5
5
  r,
6
6
  {
@@ -4,8 +4,8 @@ import { MediaKindList as F } from "@levo-so/core";
4
4
  import { X, Upload as O, ExternalLink as aa } from "lucide-react";
5
5
  import { useMemo as J, useState as U, useRef as ra, useEffect as M } from "react";
6
6
  import { useController as ta } from "react-hook-form";
7
- import { G as H, B as P, S as G, j as sa, T as ea, k as oa, l as $, m as V } from "./Spinner-Bzu2xCFZ.js";
8
- import { t as na, g as ca, z as la, w as C, A as da, B as ia } from "./CollectionFormBuilder-nZcXob6G.js";
7
+ import { G as H, B as P, S as G, k as sa, T as ea, l as oa, m as $, n as V } from "./Spinner-BnrQ9e_i.js";
8
+ import { t as na, g as ca, z as la, w as C, A as da, B as ia } from "./CollectionFormBuilder-nJWTPHeL.js";
9
9
  import { u as k } from "./LevoProvider-BAZy7_tP.js";
10
10
  import { e as Y } from "./errorHandler-_34Yv8wA.js";
11
11
  import { I as K } from "./Input-2CvZ90f8.js";