@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.
- package/dist/{CheckboxWidget-Dp9IAz5Q.js → CheckboxWidget-nJO8XlGD.js} +1 -1
- package/dist/{CollectionFormBuilder-DpTePTDd.js → CollectionFormBuilder-DeGyMEXJ.js} +162 -166
- package/dist/{CurrencyWidget-BfnmQP9S.js → CurrencyWidget-BaMho9Pw.js} +1 -1
- package/dist/{DateTimeWidget-CqjC2iYx.js → DateTimeWidget-VCmX__cv.js} +1 -1
- package/dist/{DefaultFormVariant-CG7WUPV3.js → DefaultFormVariant-fTWKRYI_.js} +7 -7
- package/dist/{DropdownWidget-15oYGYnv.js → DropdownWidget-zAr9v_IY.js} +18 -18
- package/dist/{EmailWidget-mGeLzigY.js → EmailWidget-d3hSxbAS.js} +2 -2
- package/dist/{FormCaptcha-CbLdFHHY.js → FormCaptcha-YeElu90S.js} +16 -16
- package/dist/{GeocoderWidget-BXv8P8Y1.js → GeocoderWidget-BOqaJMm1.js} +2 -2
- package/dist/{MultiGeocoderWidget-eCOGwc1m.js → MultiGeocoderWidget-BTffSkJX.js} +3 -3
- package/dist/{MultiTextWidget-DpT1gLmr.js → MultiTextWidget-L2Eoz2Zv.js} +1 -1
- package/dist/{PhoneWidget-DisB02Ll.js → PhoneWidget-CnDhiovx.js} +1 -1
- package/dist/{RadioWidget-DjWXEZQx.js → RadioWidget-CG01ys9E.js} +2 -2
- package/dist/{RichTextWidget-BnqTjA-v.js → RichTextWidget-DCX1Vpw4.js} +2 -2
- package/dist/{Spinner-Bzu2xCFZ.js → Spinner-BnrQ9e_i.js} +58 -57
- package/dist/{StepsFormVariant-BYzPBT2c.js → StepsFormVariant-eW9O8rik.js} +22 -22
- package/dist/{SwitchWidget-DQ2OHpuP.js → SwitchWidget-CstjQ_nx.js} +1 -1
- package/dist/{TextWidget-qHY9_hkz.js → TextWidget-D4uLMuLS.js} +1 -1
- package/dist/{TextareaWidget-BP5mJR7j.js → TextareaWidget-CHgyJUuy.js} +1 -1
- package/dist/{ToggleCheckboxWidget-CzXZ9l_k.js → ToggleCheckboxWidget-Cfwlrjn7.js} +1 -1
- package/dist/{Tooltip-DEBnSqlo.js → Tooltip-DPzkfrjl.js} +15 -14
- package/dist/{URLWidget-BcZQVzW7.js → URLWidget-CZE68DgS.js} +2 -2
- package/dist/UploadWidget-Dstuk_qo.js +656 -0
- package/dist/audience/components/page.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts +11 -0
- package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts.map +1 -0
- package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/components/Dialog.d.ts +3 -1
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Sonner.d.ts +1 -1
- package/dist/components/Sonner.d.ts.map +1 -1
- package/dist/components/Tooltip.d.ts +1 -0
- package/dist/components/Tooltip.d.ts.map +1 -1
- package/dist/components/index.js +29 -28
- package/dist/index.css +1 -1
- package/dist/index.js +50 -49
- package/dist/membership/components/Popup.d.ts.map +1 -1
- package/dist/page-sR2SWtb2.js +189 -0
- package/package.json +4 -4
- package/dist/UploadWidget-BNdydN68.js +0 -616
- package/dist/page-BKyDlf0z.js +0 -212
|
@@ -3,13 +3,13 @@ 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-
|
|
7
|
-
import { u as C, S as H, F as M } from "./FormCaptcha-
|
|
8
|
-
import { B as g } from "./Spinner-
|
|
6
|
+
import { D as N, F as _ } from "./CollectionFormBuilder-DeGyMEXJ.js";
|
|
7
|
+
import { u as C, S as H, F as M } from "./FormCaptcha-YeElu90S.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);
|
|
12
|
-
},
|
|
12
|
+
}, e = () => {
|
|
13
13
|
a((o) => o + 1);
|
|
14
14
|
}, c = (o) => {
|
|
15
15
|
a(o);
|
|
@@ -18,26 +18,26 @@ const Y = () => {
|
|
|
18
18
|
q,
|
|
19
19
|
{
|
|
20
20
|
currentSectionIndex: n,
|
|
21
|
-
handleNext:
|
|
21
|
+
handleNext: e,
|
|
22
22
|
handlePrev: l,
|
|
23
23
|
goToIndex: c
|
|
24
24
|
}
|
|
25
25
|
) });
|
|
26
26
|
}, q = ({ currentSectionIndex: n, handleNext: a, handlePrev: m, goToIndex: l }) => {
|
|
27
27
|
var h, j, v;
|
|
28
|
-
const { schema:
|
|
28
|
+
const { schema: e, isInternal: c, isDisabled: o, submitButtonConfig: i, uiConfig: d } = N(), r = y(
|
|
29
29
|
() => {
|
|
30
|
-
var
|
|
31
|
-
return (
|
|
30
|
+
var s;
|
|
31
|
+
return (s = e == null ? void 0 : e.sections) == null ? void 0 : s[n];
|
|
32
32
|
},
|
|
33
33
|
[n]
|
|
34
34
|
), w = y(() => {
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
37
|
-
return r &&
|
|
35
|
+
if (e) {
|
|
36
|
+
const s = { ...e };
|
|
37
|
+
return r && s && (s.sections = [r]), s;
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
|
-
}, [r]), x = n === Number((h =
|
|
40
|
+
}, [r]), x = n === Number((h = e == null ? void 0 : e.sections) == null ? void 0 : h.length) - 1, {
|
|
41
41
|
methods: u,
|
|
42
42
|
handleSubmit: E,
|
|
43
43
|
isLoading: L,
|
|
@@ -53,11 +53,11 @@ const Y = () => {
|
|
|
53
53
|
onSubmitSuccess: () => {
|
|
54
54
|
l(0);
|
|
55
55
|
},
|
|
56
|
-
onSubmitError: (
|
|
56
|
+
onSubmitError: (s) => {
|
|
57
57
|
var S;
|
|
58
|
-
if (Array.isArray(
|
|
59
|
-
const R =
|
|
60
|
-
(S =
|
|
58
|
+
if (Array.isArray(s) && (s != null && s[0])) {
|
|
59
|
+
const R = s == null ? void 0 : s[0];
|
|
60
|
+
(S = e == null ? void 0 : e.sections) == null || S.forEach((p, z) => {
|
|
61
61
|
var b;
|
|
62
62
|
((b = p == null ? void 0 : p.fields) == null ? void 0 : b.find((A) => A.key === R.param)) && l(z);
|
|
63
63
|
});
|
|
@@ -70,7 +70,7 @@ const Y = () => {
|
|
|
70
70
|
/* @__PURE__ */ t.jsx(
|
|
71
71
|
H,
|
|
72
72
|
{
|
|
73
|
-
getContentId: (
|
|
73
|
+
getContentId: (s) => D(s),
|
|
74
74
|
isError: P,
|
|
75
75
|
currentValues: V
|
|
76
76
|
}
|
|
@@ -79,7 +79,7 @@ const Y = () => {
|
|
|
79
79
|
"form",
|
|
80
80
|
{
|
|
81
81
|
className: F(
|
|
82
|
-
"w-full
|
|
82
|
+
"w-full rounded-md border border-[rgb(229, 231, 235)] min-h-12 px-4 md:px-8 py-6",
|
|
83
83
|
L && "opacity-50 pointer-events-none"
|
|
84
84
|
),
|
|
85
85
|
id: "collection-form",
|
|
@@ -91,17 +91,17 @@ const Y = () => {
|
|
|
91
91
|
"Step ",
|
|
92
92
|
n + 1,
|
|
93
93
|
"/",
|
|
94
|
-
((j =
|
|
94
|
+
((j = e == null ? void 0 : e.sections) == null ? void 0 : j.length) || 1
|
|
95
95
|
] })
|
|
96
96
|
] }),
|
|
97
97
|
/* @__PURE__ */ t.jsxs("div", { className: "w-full flex flex-col gap-6", children: [
|
|
98
|
-
(v = r == null ? void 0 : r.fields) == null ? void 0 : v.map((
|
|
98
|
+
(v = r == null ? void 0 : r.fields) == null ? void 0 : v.map((s) => s && !s.hidden ? /* @__PURE__ */ t.jsx(
|
|
99
99
|
_,
|
|
100
100
|
{
|
|
101
|
-
field:
|
|
101
|
+
field: s,
|
|
102
102
|
isInternal: c
|
|
103
103
|
},
|
|
104
|
-
|
|
104
|
+
s == null ? void 0 : s.key
|
|
105
105
|
) : null),
|
|
106
106
|
!c && x && /* @__PURE__ */ t.jsx(M, {})
|
|
107
107
|
] }),
|
|
@@ -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-
|
|
4
|
+
import { z as w, A as j, B as v } from "./CollectionFormBuilder-DeGyMEXJ.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-
|
|
4
|
+
import { A as F, B as b, z as y } from "./CollectionFormBuilder-DeGyMEXJ.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-
|
|
4
|
+
import { A as g, B as f, z as h } from "./CollectionFormBuilder-DeGyMEXJ.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-
|
|
4
|
+
import { z as u, A as g, B as C } from "./CollectionFormBuilder-DeGyMEXJ.js";
|
|
5
5
|
import { C as f } from "./Checbox-sq-atGlJ.js";
|
|
6
6
|
const y = ({
|
|
7
7
|
field: e
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
3
3
|
import * as o from "@radix-ui/react-tooltip";
|
|
4
|
-
import * as
|
|
5
|
-
import { c as
|
|
6
|
-
const
|
|
4
|
+
import * as m from "react";
|
|
5
|
+
import { c as l } from "./cn-C9QoOYNG.js";
|
|
6
|
+
const T = o.Provider, p = o.Root, c = o.Trigger, u = o.Portal, r = m.forwardRef(({ className: a, sideOffset: e = 4, ...s }, i) => /* @__PURE__ */ t.jsx(
|
|
7
7
|
o.Content,
|
|
8
8
|
{
|
|
9
9
|
ref: i,
|
|
10
10
|
sideOffset: e,
|
|
11
|
-
className:
|
|
11
|
+
className: l(
|
|
12
12
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
13
13
|
a
|
|
14
14
|
),
|
|
@@ -16,21 +16,22 @@ const x = o.Provider, l = o.Root, p = o.Trigger, T = o.Portal, r = n.forwardRef(
|
|
|
16
16
|
}
|
|
17
17
|
));
|
|
18
18
|
r.displayName = o.Content.displayName;
|
|
19
|
-
const
|
|
19
|
+
const g = ({
|
|
20
20
|
children: a,
|
|
21
21
|
label: e,
|
|
22
22
|
labelClassName: s,
|
|
23
23
|
contentClassName: i,
|
|
24
|
-
asChild: d = !0
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */ t.jsx(p, {
|
|
24
|
+
asChild: d = !0,
|
|
25
|
+
contentProps: n = {}
|
|
26
|
+
}) => /* @__PURE__ */ t.jsxs(p, { children: [
|
|
27
|
+
e && /* @__PURE__ */ t.jsx(r, { className: s, ...n, children: /* @__PURE__ */ t.jsx("p", { className: i, children: e }) }),
|
|
28
|
+
/* @__PURE__ */ t.jsx(c, { asChild: d, children: a })
|
|
28
29
|
] });
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
g as S,
|
|
32
|
+
p as T,
|
|
33
|
+
c as a,
|
|
33
34
|
r as b,
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
T as c,
|
|
36
|
+
u as d
|
|
36
37
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { H as s } from "./CollectionFormBuilder-
|
|
3
|
-
import r from "./TextWidget-
|
|
2
|
+
import { H as s } from "./CollectionFormBuilder-DeGyMEXJ.js";
|
|
3
|
+
import r from "./TextWidget-D4uLMuLS.js";
|
|
4
4
|
const a = (t) => /* @__PURE__ */ e.jsx(
|
|
5
5
|
r,
|
|
6
6
|
{
|