@levo-so/react 0.1.18 → 0.1.22

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 (47) hide show
  1. package/dist/{CheckboxWidget-Dp9IAz5Q.js → CheckboxWidget-nJO8XlGD.js} +1 -1
  2. package/dist/{CollectionFormBuilder-DpTePTDd.js → CollectionFormBuilder-DeGyMEXJ.js} +162 -166
  3. package/dist/{CurrencyWidget-BfnmQP9S.js → CurrencyWidget-BaMho9Pw.js} +1 -1
  4. package/dist/{DateTimeWidget-CqjC2iYx.js → DateTimeWidget-VCmX__cv.js} +1 -1
  5. package/dist/{DefaultFormVariant-CG7WUPV3.js → DefaultFormVariant-fTWKRYI_.js} +7 -7
  6. package/dist/{DropdownWidget-15oYGYnv.js → DropdownWidget-zAr9v_IY.js} +18 -18
  7. package/dist/{EmailWidget-mGeLzigY.js → EmailWidget-d3hSxbAS.js} +2 -2
  8. package/dist/{FormCaptcha-CbLdFHHY.js → FormCaptcha-YeElu90S.js} +16 -16
  9. package/dist/{GeocoderWidget-BXv8P8Y1.js → GeocoderWidget-BOqaJMm1.js} +2 -2
  10. package/dist/{MultiGeocoderWidget-eCOGwc1m.js → MultiGeocoderWidget-BTffSkJX.js} +3 -3
  11. package/dist/{MultiTextWidget-DpT1gLmr.js → MultiTextWidget-L2Eoz2Zv.js} +1 -1
  12. package/dist/{PhoneWidget-DisB02Ll.js → PhoneWidget-CnDhiovx.js} +1 -1
  13. package/dist/{RadioWidget-DjWXEZQx.js → RadioWidget-CG01ys9E.js} +2 -2
  14. package/dist/{RichTextWidget-BnqTjA-v.js → RichTextWidget-DCX1Vpw4.js} +2 -2
  15. package/dist/{Spinner-Bzu2xCFZ.js → Spinner-BnrQ9e_i.js} +58 -57
  16. package/dist/{StepsFormVariant-BYzPBT2c.js → StepsFormVariant-eW9O8rik.js} +22 -22
  17. package/dist/{SwitchWidget-DQ2OHpuP.js → SwitchWidget-CstjQ_nx.js} +1 -1
  18. package/dist/{TextWidget-qHY9_hkz.js → TextWidget-D4uLMuLS.js} +1 -1
  19. package/dist/{TextareaWidget-BP5mJR7j.js → TextareaWidget-CHgyJUuy.js} +1 -1
  20. package/dist/{ToggleCheckboxWidget-CzXZ9l_k.js → ToggleCheckboxWidget-Cfwlrjn7.js} +1 -1
  21. package/dist/{Tooltip-DEBnSqlo.js → Tooltip-DPzkfrjl.js} +15 -14
  22. package/dist/{URLWidget-BcZQVzW7.js → URLWidget-CZE68DgS.js} +2 -2
  23. package/dist/UploadWidget-Dstuk_qo.js +656 -0
  24. package/dist/audience/components/page.d.ts.map +1 -1
  25. package/dist/audience/index.js +1 -1
  26. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +1 -1
  27. package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts +11 -0
  28. package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts.map +1 -0
  29. package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +1 -1
  30. package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +1 -1
  31. package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +1 -1
  32. package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +1 -1
  33. package/dist/collection/index.js +1 -1
  34. package/dist/components/Dialog.d.ts +3 -1
  35. package/dist/components/Dialog.d.ts.map +1 -1
  36. package/dist/components/Sonner.d.ts +1 -1
  37. package/dist/components/Sonner.d.ts.map +1 -1
  38. package/dist/components/Tooltip.d.ts +1 -0
  39. package/dist/components/Tooltip.d.ts.map +1 -1
  40. package/dist/components/index.js +29 -28
  41. package/dist/index.css +1 -1
  42. package/dist/index.js +50 -49
  43. package/dist/membership/components/Popup.d.ts.map +1 -1
  44. package/dist/page-sR2SWtb2.js +189 -0
  45. package/package.json +4 -4
  46. package/dist/UploadWidget-BNdydN68.js +0 -616
  47. 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-DpTePTDd.js";
5
+ import { z as C, A as B, B as N } from "./CollectionFormBuilder-DeGyMEXJ.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-DpTePTDd.js";
7
+ import { z as M, A as D, B as C } from "./CollectionFormBuilder-DeGyMEXJ.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-DpTePTDd.js";
5
- import { u as w, S as N, F as b } from "./FormCaptcha-CbLdFHHY.js";
6
- import { B as D } from "./Spinner-Bzu2xCFZ.js";
4
+ import { D as F, F as N } from "./CollectionFormBuilder-DeGyMEXJ.js";
5
+ import { u as g, S as w, F as b } from "./FormCaptcha-YeElu90S.js";
6
+ import { B as D } from "./Spinner-BnrQ9e_i.js";
7
7
  const _ = () => {
8
8
  var n;
9
9
  const {
@@ -20,7 +20,7 @@ const _ = () => {
20
20
  isLoading: u,
21
21
  handleContentId: f,
22
22
  handleSubmit: j
23
- } = w({
23
+ } = g({
24
24
  schema: l,
25
25
  saveToRemote: !0
26
26
  }), {
@@ -28,7 +28,7 @@ const _ = () => {
28
28
  } = o, S = o.watch("__captcha");
29
29
  return /* @__PURE__ */ e.jsxs(y, { ...o, children: [
30
30
  /* @__PURE__ */ e.jsx(
31
- N,
31
+ w,
32
32
  {
33
33
  getContentId: (s) => f(s),
34
34
  isError: h,
@@ -39,7 +39,7 @@ const _ = () => {
39
39
  "form",
40
40
  {
41
41
  className: t(
42
- "w-full bg-white rounded-md flex flex-col gap-6 px-4 md:px-8 py-6",
42
+ "w-full rounded-md flex flex-col gap-6 px-4 md:px-8 py-6",
43
43
  u && "opacity-50 pointer-events-none"
44
44
  ),
45
45
  id: "collection-form",
@@ -50,7 +50,7 @@ const _ = () => {
50
50
  return /* @__PURE__ */ e.jsxs("div", { className: "w-full", children: [
51
51
  !(m != null && m.hideSectionHeadings) && /* @__PURE__ */ e.jsx("p", { className: t("mb-4 text-lg font-semibold"), children: s == null ? void 0 : s.label }),
52
52
  /* @__PURE__ */ e.jsx("div", { className: t("flex flex-col gap-4"), children: (i = s == null ? void 0 : s.fields) == null ? void 0 : i.map((r) => r && !r.hidden ? /* @__PURE__ */ e.jsx(
53
- g,
53
+ N,
54
54
  {
55
55
  field: r,
56
56
  isInternal: d
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import { j as d } from "./jsx-runtime-B6kdoens.js";
3
- import { useState as x, useEffect as w } from "react";
4
- import { useController as B } from "react-hook-form";
5
- import D from "react-select";
3
+ import { useState as f, useEffect as w } from "react";
4
+ import { useController as R } from "react-hook-form";
5
+ import B 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-DpTePTDd.js";
7
+ import { z as D, A as N, B as q } from "./CollectionFormBuilder-DeGyMEXJ.js";
8
8
  import { I as L } from "./Input-2CvZ90f8.js";
9
9
  const G = ({
10
10
  field: s,
11
11
  ...o
12
12
  }) => {
13
13
  var j;
14
- const [t, I] = x([]), [h, g] = x(""), [p, i] = x(!1), {
14
+ const [t, I] = f([]), [h, g] = f(""), [p, i] = f(!1), {
15
15
  key: C = "",
16
16
  label: v = "",
17
17
  helper_text: S = "",
@@ -19,12 +19,12 @@ const G = ({
19
19
  values: n = [],
20
20
  options: c = {}
21
21
  } = s, u = C, {
22
- field: { value: l, onBlur: E, onChange: a, disabled: F, ...M },
23
- fieldState: f
24
- } = B({
22
+ field: { value: l, onBlur: k, onChange: a, disabled: E, ...F },
23
+ fieldState: x
24
+ } = R({
25
25
  name: u,
26
- rules: N(s)
27
- }), P = !!(s != null && s.required), R = (j = f == null ? void 0 : f.error) == null ? void 0 : j.message, m = !!(c != null && c.custom_input);
26
+ rules: D(s)
27
+ }), M = !!(s != null && s.required), P = (j = x == null ? void 0 : x.error) == null ? void 0 : j.message, m = !!(c != null && c.custom_input);
28
28
  return w(() => {
29
29
  if (n != null && n.length) {
30
30
  const r = [...n == null ? void 0 : n.map((b) => ({
@@ -40,10 +40,10 @@ const G = ({
40
40
  !(o != null && o.isMulti) && m && typeof l == "string" && l && ((t == null ? void 0 : t.findIndex(
41
41
  (r) => (r == null ? void 0 : r.value) !== "Other" && (r == null ? void 0 : r.value) === l
42
42
  )) === -1 ? (i(!0), g(l)) : i(!1));
43
- }, [l, t]), /* @__PURE__ */ d.jsxs(k, { error: R, helperText: S, readOnly: O, children: [
44
- v && /* @__PURE__ */ d.jsx(q, { htmlFor: u, isRequired: P, children: v }),
43
+ }, [l, t]), /* @__PURE__ */ d.jsxs(N, { error: P, helperText: S, readOnly: O, children: [
44
+ v && /* @__PURE__ */ d.jsx(q, { htmlFor: u, isRequired: M, children: v }),
45
45
  /* @__PURE__ */ d.jsx(
46
- D,
46
+ B,
47
47
  {
48
48
  id: u,
49
49
  value: p ? {
@@ -55,17 +55,17 @@ const G = ({
55
55
  onChange: (e) => {
56
56
  m && (e == null ? void 0 : e.value) === "Other" && (e == null ? void 0 : e.label) === "Other, Please Specify" ? (i(!0), a(h)) : (i(!1), o != null && o.isMulti ? a(e == null ? void 0 : e.map((r) => r == null ? void 0 : r.value)) : a(e == null ? void 0 : e.value));
57
57
  },
58
- onBlur: () => E(),
58
+ onBlur: () => k(),
59
59
  options: t,
60
- isDisabled: F,
60
+ isDisabled: E,
61
61
  menuPlacement: "auto",
62
- ...M,
62
+ ...F,
63
63
  ...o,
64
64
  unstyled: !0,
65
65
  classNames: {
66
66
  container: () => y("w-full min-w-none h-auto min-h-none"),
67
67
  control: ({ isFocused: e, isMulti: r, isDisabled: b }) => y(
68
- "w-full pl-3",
68
+ "w-full pl-3 text-black/80",
69
69
  r ? "!min-h-9 h-auto" : "h-9 !min-h-none",
70
70
  "rounded-md border bg-transparent hover:cursor-pointer border-input text-sm shadow-sm transition-colors",
71
71
  "flex ",
@@ -87,7 +87,7 @@ const G = ({
87
87
  groupHeading: () => "ml-3 mt-2 mb-1 text-gray-500 text-sm",
88
88
  placeholder: () => "text-gray-500 pl-1 py-0.5",
89
89
  option: ({ isSelected: e, isFocused: r }) => y(
90
- "text-sm font-medium hover:cursor-pointer px-3 py-2 rounded",
90
+ "text-black/80 text-sm font-medium hover:cursor-pointer px-3 py-2 rounded",
91
91
  r && "bg-gray-100 active:bg-gray-200",
92
92
  e && "text-white bg-primary/80"
93
93
  ),
@@ -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-DpTePTDd.js";
3
+ import { G as C } from "./Spinner-BnrQ9e_i.js";
4
+ import { z as F, A as I, B as V } from "./CollectionFormBuilder-DeGyMEXJ.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);
@@ -3,7 +3,7 @@ import { useEffect as k, useState as b, useRef as J } from "react";
3
3
  import { useFormContext as W, useWatch as Y, useForm as B, useController as G } from "react-hook-form";
4
4
  import { useDebouncedCallback as H } from "use-debounce";
5
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-DpTePTDd.js";
6
+ import { D as C, s as z, h as Q, c as X, A as Z } from "./CollectionFormBuilder-DeGyMEXJ.js";
7
7
  import { s as m } from "./Sonner-t6JVKA0a.js";
8
8
  import { e as D } from "./errorHandler-_34Yv8wA.js";
9
9
  import { a as h } from "./isEmptyObject-C5s4GzLE.js";
@@ -22,7 +22,7 @@ const R = {
22
22
  );
23
23
  }, M = (t) => {
24
24
  localStorage.removeItem(`${t}-${R.FORM_VALUES}`);
25
- }, dt = ({ currentValues: t, isError: s, getContentId: p }) => {
25
+ }, dt = ({ currentValues: t, isError: s, getContentId: g }) => {
26
26
  var O;
27
27
  const { schema: n, isLoggedIn: a } = C(), e = W(), l = Y(), { client: S } = x(), I = H((v) => {
28
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`, {
@@ -33,9 +33,9 @@ const R = {
33
33
  }
34
34
  }).then((o) => o.json()).then((o) => {
35
35
  var _, V, c, E;
36
- (V = (_ = o == null ? void 0 : o.content) == null ? void 0 : _.data) != null && V._id && p((E = (c = o == null ? void 0 : o.content) == null ? void 0 : c.data) == null ? void 0 : E._id);
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
37
  }).catch(() => {
38
- console.log("saving entry failed");
38
+ console.error("saving entry failed");
39
39
  }) : et(n == null ? void 0 : n.key, v));
40
40
  }, 2500);
41
41
  return k(() => {
@@ -48,7 +48,7 @@ const R = {
48
48
  }, yt = ({
49
49
  schema: t,
50
50
  saveToRemote: s,
51
- onSubmit: p,
51
+ onSubmit: g,
52
52
  onSubmitSuccess: n,
53
53
  onSubmitError: a
54
54
  }) => {
@@ -68,7 +68,7 @@ const R = {
68
68
  keepErrors: !0
69
69
  }
70
70
  }), q = F.handleSubmit(async (d) => {
71
- var L, g, y, i, j, T;
71
+ var L, p, y, i, j, T;
72
72
  if (r.current = {
73
73
  ...r.current || {},
74
74
  ...d
@@ -85,7 +85,7 @@ const R = {
85
85
  l.successToastText || "Form submitted successfully."
86
86
  ), r.current = h(o) ? {} : { ...o }, M(t == null ? void 0 : t.key), E(null), S && S({
87
87
  schemaId: t == null ? void 0 : t.id,
88
- response: (g = u == null ? void 0 : u.content) == null ? void 0 : g.data
88
+ response: (p = u == null ? void 0 : u.content) == null ? void 0 : p.data
89
89
  }), n && n(), F.reset(), F.clearErrors(), !0;
90
90
  throw new Error("Failed to save form details, API response invalid");
91
91
  } catch (f) {
@@ -94,7 +94,7 @@ const R = {
94
94
  }
95
95
  return !1;
96
96
  }
97
- d && p && p(d);
97
+ d && g && g(d);
98
98
  }), K = (d) => {
99
99
  d && d !== c && E(d);
100
100
  };
@@ -107,13 +107,13 @@ const R = {
107
107
  ...r.current || {}
108
108
  }, !c && t != null && t.allow_draft) {
109
109
  if (O) {
110
- $(!0), e == null || e.getDraftEntry(t == null ? void 0 : t.key).then((g) => {
111
- if (g === null) {
110
+ $(!0), e == null || e.getDraftEntry(t == null ? void 0 : t.key).then((p) => {
111
+ if (p === null) {
112
112
  A(!0);
113
113
  return;
114
114
  }
115
115
  A(!1);
116
- const y = Array.isArray(g) ? g == null ? void 0 : g.filter((i) => (i == null ? void 0 : i._status) === "draft") : [];
116
+ const y = Array.isArray(p) ? p == null ? void 0 : p.filter((i) => (i == null ? void 0 : i._status) === "draft") : [];
117
117
  if ((y == null ? void 0 : y.length) > 0) {
118
118
  const i = (y == null ? void 0 : y[0]) || {};
119
119
  i != null && i._id && (r.current = {
@@ -149,8 +149,8 @@ const R = {
149
149
  handleContentId: K,
150
150
  handleSubmit: q
151
151
  };
152
- }, gt = () => {
153
- const { isInternal: t } = C(), { client: s } = x(), p = J(null), {
152
+ }, pt = () => {
153
+ const { isInternal: t } = C(), { client: s } = x(), g = J(null), {
154
154
  field: { onChange: n },
155
155
  fieldState: { error: a }
156
156
  } = G({
@@ -162,13 +162,13 @@ const R = {
162
162
  return k(() => {
163
163
  const e = (S) => {
164
164
  "detail" in S && n(S.detail.state || null);
165
- }, { current: l } = p;
165
+ }, { current: l } = g;
166
166
  if (l)
167
167
  return l.addEventListener("statechange", e), () => l.removeEventListener("statechange", e);
168
168
  }, []), /* @__PURE__ */ U.jsx(Z, { error: a == null ? void 0 : a.message, children: /* @__PURE__ */ U.jsx(
169
169
  "altcha-widget",
170
170
  {
171
- ref: p,
171
+ ref: g,
172
172
  style: {
173
173
  "--altcha-max-width": "100%"
174
174
  },
@@ -181,7 +181,7 @@ const R = {
181
181
  ) });
182
182
  };
183
183
  export {
184
- gt as F,
184
+ pt as F,
185
185
  dt as S,
186
186
  yt as u
187
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-DpTePTDd.js";
5
+ import { o as T } from "./Spinner-BnrQ9e_i.js";
6
+ import { z as k, A as q, B as A } from "./CollectionFormBuilder-DeGyMEXJ.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-DpTePTDd.js";
6
- import { GeocoderWidget as d } from "./GeocoderWidget-BXv8P8Y1.js";
7
- import { B as p } from "./Spinner-Bzu2xCFZ.js";
5
+ import { B as c } from "./CollectionFormBuilder-DeGyMEXJ.js";
6
+ import { GeocoderWidget as d } from "./GeocoderWidget-BOqaJMm1.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-DpTePTDd.js";
3
+ import { z as C, A as b, B as q } from "./CollectionFormBuilder-DeGyMEXJ.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-DpTePTDd.js";
6
+ import { z as x, A as v, B as y } from "./CollectionFormBuilder-DeGyMEXJ.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-DpTePTDd.js";
8
+ import { z as E, A as G, B as f } from "./CollectionFormBuilder-DeGyMEXJ.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-DpTePTDd.js";
22
+ import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-DeGyMEXJ.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
  };