@levo-so/react 0.1.2 → 0.1.5
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-BV2nPDdB.js → CheckboxWidget-Bnx-S2j2.js} +7 -7
- package/dist/{CollectionFormBuilder-uvr15jvu.js → CollectionFormBuilder-B_dXpvPN.js} +87 -88
- package/dist/{CurrencyWidget-VzBWDdzQ.js → CurrencyWidget-6Ov8DZpo.js} +6 -6
- package/dist/{DateTimeWidget-QmZXdxzS.js → DateTimeWidget-DI98zHMn.js} +7 -7
- package/dist/{DefaultFormVariant-DyyCGXvB.js → DefaultFormVariant-Bxbh1yc0.js} +22 -22
- package/dist/{DropdownWidget-CxWQF6r3.js → DropdownWidget-DrMkD9vK.js} +2 -2
- package/dist/{EmailWidget-BxxtgUGU.js → EmailWidget-DHjXwVCL.js} +2 -2
- package/dist/{GeocoderWidget-lh46EUHn.js → GeocoderWidget-D8GsLWkV.js} +83 -82
- package/dist/LevoProvider-Cp0CKrgY.js +212 -0
- package/dist/{MultiGeocoderWidget-C84ZYxpR.js → MultiGeocoderWidget-WzlKESyZ.js} +8 -8
- package/dist/{PhoneWidget-_-cBcZ_D.js → PhoneWidget-DQSo_DPX.js} +1 -1
- package/dist/{RadioWidget-BJ1qwTRO.js → RadioWidget-C8sTnz9B.js} +3 -3
- package/dist/{RichTextWidget-CC6uShje.js → RichTextWidget-DOMiJ9pX.js} +2 -2
- package/dist/{Spinner-CuUosd-S.js → Spinner-DzGH5rKe.js} +49 -49
- package/dist/{StepsFormVariant-BxANsU4Z.js → StepsFormVariant-CzS2wbMD.js} +8 -8
- package/dist/{SwitchWidget-CbCYweyx.js → SwitchWidget-CBottoNO.js} +1 -1
- package/dist/TextWidget-Dg-ZYJI2.js +33 -0
- package/dist/{TextareaWidget-Dqt4CVV-.js → TextareaWidget-wsUSnO28.js} +6 -6
- package/dist/{ToggleCheckboxWidget-D8CxllEX.js → ToggleCheckboxWidget-IeHYCie0.js} +1 -1
- package/dist/{URLWidget-C07DCMOd.js → URLWidget-BsIEpzV3.js} +2 -2
- package/dist/{UploadWidget-DoY_CPLy.js → UploadWidget-BJPmoAW-.js} +170 -168
- package/dist/audience/components/component.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/collection/components/CollectionFormBuilder.d.ts.map +1 -1
- package/dist/collection/components/renderer/RenderArrayWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +1 -1
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/textWidget/TextWidget.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/collection/lib/FormBuilder.d.ts.map +1 -1
- package/dist/collection/lib/hooks/useLevoForm.d.ts.map +1 -1
- package/dist/collection/utils/formHelpers.d.ts +1 -0
- package/dist/collection/utils/formHelpers.d.ts.map +1 -1
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{index-wTf_TtOG.js → index-BFJ48R-4.js} +1 -1
- package/dist/index.css +1 -0
- package/dist/index.js +5 -5
- package/dist/libs.css +1 -0
- package/dist/libs.d.ts +1 -0
- package/dist/membership/components/OAuth/Button.d.ts +1 -1
- package/dist/membership/components/OAuth/Button.d.ts.map +1 -1
- package/dist/membership/components/OAuth/Container.d.ts +1 -1
- package/dist/membership/components/OAuth/Container.d.ts.map +1 -1
- package/dist/membership/index.js +1 -1
- package/dist/page-YRcNFGqi.js +205 -0
- package/dist/providers/LevoProvider.d.ts +7 -7
- package/dist/providers/LevoProvider.d.ts.map +1 -1
- package/dist/{useLevoForm-B4Dmf73H.js → useLevoForm-HS_d5OoW.js} +7 -7
- package/package.json +72 -71
- package/dist/LevoProvider-DNbYyEaf.js +0 -21
- package/dist/TextWidget-CfEeuyFV.js +0 -33
- package/dist/page-CxaKoH22.js +0 -205
- package/dist/style.css +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as c } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import
|
|
3
|
+
import * as d from "@radix-ui/react-tabs";
|
|
4
4
|
import * as m from "react";
|
|
5
5
|
import l from "react";
|
|
6
|
+
import { c as u } from "./cn-C9QoOYNG.js";
|
|
7
|
+
import { Slot as B } from "@radix-ui/react-slot";
|
|
6
8
|
import { twMerge as j } from "tailwind-merge";
|
|
7
9
|
import { cva as O } from "class-variance-authority";
|
|
8
|
-
import { c as u } from "./cn-C9QoOYNG.js";
|
|
9
|
-
import * as d from "@radix-ui/react-tabs";
|
|
10
10
|
var x = {
|
|
11
11
|
color: void 0,
|
|
12
12
|
size: void 0,
|
|
@@ -160,7 +160,44 @@ function at(t) {
|
|
|
160
160
|
function it(t) {
|
|
161
161
|
return i({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16.949 14.121 19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0l-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121a2.723 2.723 0 0 1-.844.57L13.414 12l1.414-1.414-.707-.707a4.965 4.965 0 0 0-3.535-1.465c-.235 0-.464.032-.691.066L3.707 2.293 2.293 3.707l18 18 1.414-1.414-5.536-5.536c.277-.184.538-.396.778-.636zm-6.363 3.536a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l1.476-1.475-1.414-1.414L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707z" }, child: [] }] })(t);
|
|
162
162
|
}
|
|
163
|
-
const R =
|
|
163
|
+
const nt = d.Root, R = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
164
|
+
d.List,
|
|
165
|
+
{
|
|
166
|
+
ref: r,
|
|
167
|
+
className: u(
|
|
168
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
169
|
+
t
|
|
170
|
+
),
|
|
171
|
+
...e
|
|
172
|
+
}
|
|
173
|
+
));
|
|
174
|
+
R.displayName = d.List.displayName;
|
|
175
|
+
const T = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
176
|
+
d.Trigger,
|
|
177
|
+
{
|
|
178
|
+
ref: r,
|
|
179
|
+
className: u(
|
|
180
|
+
"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",
|
|
181
|
+
t
|
|
182
|
+
),
|
|
183
|
+
"data-levo-studio-interactive": "true",
|
|
184
|
+
...e
|
|
185
|
+
}
|
|
186
|
+
));
|
|
187
|
+
T.displayName = d.Trigger.displayName;
|
|
188
|
+
const _ = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
189
|
+
d.Content,
|
|
190
|
+
{
|
|
191
|
+
ref: r,
|
|
192
|
+
className: u(
|
|
193
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
194
|
+
t
|
|
195
|
+
),
|
|
196
|
+
...e
|
|
197
|
+
}
|
|
198
|
+
));
|
|
199
|
+
_.displayName = d.Content.displayName;
|
|
200
|
+
const V = O(
|
|
164
201
|
"inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
165
202
|
{
|
|
166
203
|
variants: {
|
|
@@ -194,7 +231,7 @@ const R = O(
|
|
|
194
231
|
rounded: "default"
|
|
195
232
|
}
|
|
196
233
|
}
|
|
197
|
-
),
|
|
234
|
+
), A = m.forwardRef(
|
|
198
235
|
({
|
|
199
236
|
className: t,
|
|
200
237
|
variant: e,
|
|
@@ -210,7 +247,7 @@ const R = O(
|
|
|
210
247
|
return /* @__PURE__ */ c.jsx(
|
|
211
248
|
H,
|
|
212
249
|
{
|
|
213
|
-
className: u(
|
|
250
|
+
className: u(V({ variant: e, size: r, rounded: a, className: t })),
|
|
214
251
|
ref: w,
|
|
215
252
|
disabled: v || o,
|
|
216
253
|
type: "button",
|
|
@@ -231,54 +268,17 @@ const R = O(
|
|
|
231
268
|
);
|
|
232
269
|
}
|
|
233
270
|
);
|
|
234
|
-
|
|
235
|
-
const nt = d.Root, _ = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
236
|
-
d.List,
|
|
237
|
-
{
|
|
238
|
-
ref: r,
|
|
239
|
-
className: u(
|
|
240
|
-
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
241
|
-
t
|
|
242
|
-
),
|
|
243
|
-
...e
|
|
244
|
-
}
|
|
245
|
-
));
|
|
246
|
-
_.displayName = d.List.displayName;
|
|
247
|
-
const V = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
248
|
-
d.Trigger,
|
|
249
|
-
{
|
|
250
|
-
ref: r,
|
|
251
|
-
className: u(
|
|
252
|
-
"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",
|
|
253
|
-
t
|
|
254
|
-
),
|
|
255
|
-
"data-levo-studio-interactive": "true",
|
|
256
|
-
...e
|
|
257
|
-
}
|
|
258
|
-
));
|
|
259
|
-
V.displayName = d.Trigger.displayName;
|
|
260
|
-
const A = m.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ c.jsx(
|
|
261
|
-
d.Content,
|
|
262
|
-
{
|
|
263
|
-
ref: r,
|
|
264
|
-
className: u(
|
|
265
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
266
|
-
t
|
|
267
|
-
),
|
|
268
|
-
...e
|
|
269
|
-
}
|
|
270
|
-
));
|
|
271
|
-
A.displayName = d.Content.displayName;
|
|
271
|
+
A.displayName = "Button";
|
|
272
272
|
const ot = ({ className: t }) => /* @__PURE__ */ c.jsx(y, { className: u("h-8 w-8 animate-spin font-light", t) });
|
|
273
273
|
export {
|
|
274
|
-
|
|
274
|
+
A as B,
|
|
275
275
|
i as G,
|
|
276
276
|
ot as S,
|
|
277
277
|
nt as T,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
278
|
+
R as a,
|
|
279
|
+
V as b,
|
|
280
|
+
T as c,
|
|
281
|
+
_ as d,
|
|
282
282
|
Q as e,
|
|
283
283
|
Z as f,
|
|
284
284
|
at as g,
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
3
3
|
import { useState as A, useMemo as v } from "react";
|
|
4
4
|
import { FormProvider as I } from "react-hook-form";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { B as y } from "./Spinner-
|
|
5
|
+
import { c as N } from "./cn-C9QoOYNG.js";
|
|
6
|
+
import { l as g, F as T } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
7
|
+
import { u as H, S as M } from "./useLevoForm-HS_d5OoW.js";
|
|
8
|
+
import { B as y } from "./Spinner-DzGH5rKe.js";
|
|
9
9
|
const X = () => {
|
|
10
|
-
const [n, l] = A(0), { containerStyles: m } =
|
|
10
|
+
const [n, l] = A(0), { containerStyles: m } = g(), a = () => {
|
|
11
11
|
l((o) => o - 1);
|
|
12
12
|
}, s = () => {
|
|
13
13
|
l((o) => o + 1);
|
|
14
14
|
}, d = (o) => {
|
|
15
15
|
l(o);
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
17
|
+
return /* @__PURE__ */ t.jsx("div", { className: N("w-full", m), children: /* @__PURE__ */ t.jsx(
|
|
18
18
|
q,
|
|
19
19
|
{
|
|
20
20
|
currentSectionIndex: n,
|
|
@@ -25,7 +25,7 @@ const X = () => {
|
|
|
25
25
|
) });
|
|
26
26
|
}, q = ({ currentSectionIndex: n, handleNext: l, handlePrev: m, goToIndex: a }) => {
|
|
27
27
|
var f, j, h;
|
|
28
|
-
const { schema: s, isInternal: d, isDisabled: o, submitButtonConfig: i, uiConfig: c } =
|
|
28
|
+
const { schema: s, isInternal: d, isDisabled: o, submitButtonConfig: i, uiConfig: c } = g(), r = v(
|
|
29
29
|
() => {
|
|
30
30
|
var e;
|
|
31
31
|
return (e = s == null ? void 0 : s.sections) == null ? void 0 : e[n];
|
|
@@ -78,7 +78,7 @@ const X = () => {
|
|
|
78
78
|
/* @__PURE__ */ t.jsxs(
|
|
79
79
|
"form",
|
|
80
80
|
{
|
|
81
|
-
className:
|
|
81
|
+
className: N(
|
|
82
82
|
"w-full bg-white rounded-md border border-[rgb(229, 231, 235)] min-h-12 px-4 md:px-8 py-6",
|
|
83
83
|
E && "opacity-50 pointer-events-none"
|
|
84
84
|
),
|
|
@@ -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 { h as w, j, k as v } from "./CollectionFormBuilder-
|
|
4
|
+
import { h as w, j, k as v } from "./CollectionFormBuilder-B_dXpvPN.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";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
import { useFormContext as h, get as j } from "react-hook-form";
|
|
3
|
+
import { c as g } from "./cn-C9QoOYNG.js";
|
|
4
|
+
import { j as F, k as b, h as y } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
5
|
+
import { I as f } from "./Input-2CvZ90f8.js";
|
|
6
|
+
const W = ({
|
|
7
|
+
field: r,
|
|
8
|
+
inputStyles: a,
|
|
9
|
+
...m
|
|
10
|
+
}) => {
|
|
11
|
+
var o;
|
|
12
|
+
const {
|
|
13
|
+
register: n,
|
|
14
|
+
formState: { errors: i, disabled: p }
|
|
15
|
+
} = h(), { key: c = "", label: s = "", helper_text: l = "", readonly: x = !1 } = r, e = c, d = !!(r != null && r.required), u = (o = j(i, e)) == null ? void 0 : o.message;
|
|
16
|
+
return /* @__PURE__ */ t.jsxs(F, { error: u, helperText: l, children: [
|
|
17
|
+
s && /* @__PURE__ */ t.jsx(b, { htmlFor: e, isRequired: d, children: s }),
|
|
18
|
+
/* @__PURE__ */ t.jsx(
|
|
19
|
+
f,
|
|
20
|
+
{
|
|
21
|
+
id: e,
|
|
22
|
+
className: g(a),
|
|
23
|
+
readOnly: x,
|
|
24
|
+
disabled: p,
|
|
25
|
+
...n(e, { ...y(r) }),
|
|
26
|
+
...m
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
W as default
|
|
33
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
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
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { c as b } from "./cn-C9QoOYNG.js";
|
|
4
|
+
import { j as g, k as h, h as f } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
5
5
|
const w = ({ field: e }) => {
|
|
6
6
|
var a;
|
|
7
7
|
const {
|
|
8
8
|
register: i,
|
|
9
9
|
formState: { errors: n, disabled: l }
|
|
10
10
|
} = u(), { key: d = "", label: o = "", helper_text: m = "", readonly: t = !1 } = e, r = d, c = !!(e != null && e.required), p = (a = x(n, r)) == null ? void 0 : a.message;
|
|
11
|
-
return /* @__PURE__ */ s.jsxs(
|
|
12
|
-
o && /* @__PURE__ */ s.jsx(
|
|
11
|
+
return /* @__PURE__ */ s.jsxs(g, { error: p, helperText: m, children: [
|
|
12
|
+
o && /* @__PURE__ */ s.jsx(h, { htmlFor: r, isRequired: c, children: o }),
|
|
13
13
|
/* @__PURE__ */ s.jsx(
|
|
14
14
|
"textarea",
|
|
15
15
|
{
|
|
16
16
|
id: r,
|
|
17
|
-
className:
|
|
17
|
+
className: b(
|
|
18
18
|
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
19
19
|
t && "focus-visible:ring-0"
|
|
20
20
|
),
|
|
21
21
|
readOnly: t,
|
|
22
22
|
disabled: l,
|
|
23
|
-
...i(r,
|
|
23
|
+
...i(r, f(e))
|
|
24
24
|
}
|
|
25
25
|
)
|
|
26
26
|
] });
|
|
@@ -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 { h as u, j as g, k as j } from "./CollectionFormBuilder-
|
|
4
|
+
import { h as u, j as g, k as j } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
5
5
|
import { C } 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-
|
|
3
|
-
import r from "./TextWidget-
|
|
2
|
+
import { H as s } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
3
|
+
import r from "./TextWidget-Dg-ZYJI2.js";
|
|
4
4
|
const a = (t) => /* @__PURE__ */ e.jsx(
|
|
5
5
|
r,
|
|
6
6
|
{
|