@levo-so/react 0.1.1 → 0.1.4
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-ComdVcZ_.js → CheckboxWidget-Bnx-S2j2.js} +7 -7
- package/dist/{CollectionFormBuilder-jwwjyIpv.js → CollectionFormBuilder-B_dXpvPN.js} +114 -105
- package/dist/{CurrencyWidget-DVqD_lsY.js → CurrencyWidget-6Ov8DZpo.js} +6 -6
- package/dist/{DateTimeWidget-CvgzwY1U.js → DateTimeWidget-DI98zHMn.js} +7 -7
- package/dist/{DefaultFormVariant-CbRB9O_e.js → DefaultFormVariant-Bxbh1yc0.js} +22 -22
- package/dist/{DropdownWidget-C2YaM9Cf.js → DropdownWidget-DrMkD9vK.js} +2 -2
- package/dist/{EmailWidget-BBthwF68.js → EmailWidget-DHjXwVCL.js} +2 -2
- package/dist/{GeocoderWidget-Dht_2vi6.js → GeocoderWidget-D8GsLWkV.js} +83 -82
- package/dist/LevoProvider-Cp0CKrgY.js +212 -0
- package/dist/{MultiGeocoderWidget-paCFW0QZ.js → MultiGeocoderWidget-WzlKESyZ.js} +8 -8
- package/dist/{PhoneWidget-CP2T2JDx.js → PhoneWidget-DQSo_DPX.js} +9 -8
- package/dist/{RadioWidget-BuFPz7kK.js → RadioWidget-C8sTnz9B.js} +3 -3
- package/dist/{RichTextWidget-DGFNZ1jl.js → RichTextWidget-DOMiJ9pX.js} +2 -2
- package/dist/{Spinner-CuUosd-S.js → Spinner-DzGH5rKe.js} +49 -49
- package/dist/{StepsFormVariant-5_c3f2Vk.js → StepsFormVariant-CzS2wbMD.js} +8 -8
- package/dist/{SwitchWidget-t8iwhxk9.js → SwitchWidget-CBottoNO.js} +1 -1
- package/dist/TextWidget-Dg-ZYJI2.js +33 -0
- package/dist/{TextareaWidget-CG6J_plD.js → TextareaWidget-wsUSnO28.js} +6 -6
- package/dist/{ToggleCheckboxWidget-dl8ks4VX.js → ToggleCheckboxWidget-IeHYCie0.js} +1 -1
- package/dist/{URLWidget-CHeUEUXl.js → URLWidget-BsIEpzV3.js} +2 -2
- package/dist/{UploadWidget-CzYGViqE.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/renderer/RenderCommonField.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 +2 -1
- 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-BcN8f66y.js → useLevoForm-HS_d5OoW.js} +7 -7
- package/package.json +72 -71
- package/dist/LevoProvider-DNbYyEaf.js +0 -21
- package/dist/TextWidget-D0UBxTxe.js +0 -33
- package/dist/page-CxaKoH22.js +0 -205
- package/dist/style.css +0 -1
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var j = Object.defineProperty;
|
|
3
|
+
var D = (r, l, o) => l in r ? j(r, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[l] = o;
|
|
4
|
+
var v = (r, l, o) => D(r, typeof l != "symbol" ? l + "" : l, o);
|
|
5
|
+
import { j as B } from "./jsx-runtime-B6kdoens.js";
|
|
6
|
+
import k from "wretch";
|
|
7
|
+
import { createContext as G, useContext as W } from "react";
|
|
8
|
+
var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
|
+
function z(r) {
|
|
10
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
11
|
+
}
|
|
12
|
+
var T = class {
|
|
13
|
+
constructor(r) {
|
|
14
|
+
v(this, "client");
|
|
15
|
+
this.client = r;
|
|
16
|
+
}
|
|
17
|
+
}, F = { exports: {} };
|
|
18
|
+
(function(r) {
|
|
19
|
+
(function(l, o) {
|
|
20
|
+
r.exports ? r.exports = o() : l.log = o();
|
|
21
|
+
})(q, function() {
|
|
22
|
+
var l = function() {
|
|
23
|
+
}, o = "undefined", b = typeof window !== o && typeof window.navigator !== o && /Trident\/|MSIE /.test(window.navigator.userAgent), y = [
|
|
24
|
+
"trace",
|
|
25
|
+
"debug",
|
|
26
|
+
"info",
|
|
27
|
+
"warn",
|
|
28
|
+
"error"
|
|
29
|
+
], c = {}, i = null;
|
|
30
|
+
function w(t, s) {
|
|
31
|
+
var e = t[s];
|
|
32
|
+
if (typeof e.bind == "function")
|
|
33
|
+
return e.bind(t);
|
|
34
|
+
try {
|
|
35
|
+
return Function.prototype.bind.call(e, t);
|
|
36
|
+
} catch {
|
|
37
|
+
return function() {
|
|
38
|
+
return Function.prototype.apply.apply(e, [t, arguments]);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function S() {
|
|
43
|
+
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
44
|
+
}
|
|
45
|
+
function U(t) {
|
|
46
|
+
return t === "debug" && (t = "log"), typeof console === o ? !1 : t === "trace" && b ? S : console[t] !== void 0 ? w(console, t) : console.log !== void 0 ? w(console, "log") : l;
|
|
47
|
+
}
|
|
48
|
+
function g() {
|
|
49
|
+
for (var t = this.getLevel(), s = 0; s < y.length; s++) {
|
|
50
|
+
var e = y[s];
|
|
51
|
+
this[e] = s < t ? l : this.methodFactory(e, t, this.name);
|
|
52
|
+
}
|
|
53
|
+
if (this.log = this.debug, typeof console === o && t < this.levels.SILENT)
|
|
54
|
+
return "No console available for logging";
|
|
55
|
+
}
|
|
56
|
+
function A(t) {
|
|
57
|
+
return function() {
|
|
58
|
+
typeof console !== o && (g.call(this), this[t].apply(this, arguments));
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function M(t, s, e) {
|
|
62
|
+
return U(t) || A.apply(this, arguments);
|
|
63
|
+
}
|
|
64
|
+
function E(t, s) {
|
|
65
|
+
var e = this, h, m, f, u = "loglevel";
|
|
66
|
+
typeof t == "string" ? u += ":" + t : typeof t == "symbol" && (u = void 0);
|
|
67
|
+
function O(n) {
|
|
68
|
+
var a = (y[n] || "silent").toUpperCase();
|
|
69
|
+
if (!(typeof window === o || !u)) {
|
|
70
|
+
try {
|
|
71
|
+
window.localStorage[u] = a;
|
|
72
|
+
return;
|
|
73
|
+
} catch {
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
window.document.cookie = encodeURIComponent(u) + "=" + a + ";";
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function C() {
|
|
82
|
+
var n;
|
|
83
|
+
if (!(typeof window === o || !u)) {
|
|
84
|
+
try {
|
|
85
|
+
n = window.localStorage[u];
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
if (typeof n === o)
|
|
89
|
+
try {
|
|
90
|
+
var a = window.document.cookie, L = encodeURIComponent(u), I = a.indexOf(L + "=");
|
|
91
|
+
I !== -1 && (n = /^([^;]+)/.exec(
|
|
92
|
+
a.slice(I + L.length + 1)
|
|
93
|
+
)[1]);
|
|
94
|
+
} catch {
|
|
95
|
+
}
|
|
96
|
+
return e.levels[n] === void 0 && (n = void 0), n;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function P() {
|
|
100
|
+
if (!(typeof window === o || !u)) {
|
|
101
|
+
try {
|
|
102
|
+
window.localStorage.removeItem(u);
|
|
103
|
+
} catch {
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
window.document.cookie = encodeURIComponent(u) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
107
|
+
} catch {
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function d(n) {
|
|
112
|
+
var a = n;
|
|
113
|
+
if (typeof a == "string" && e.levels[a.toUpperCase()] !== void 0 && (a = e.levels[a.toUpperCase()]), typeof a == "number" && a >= 0 && a <= e.levels.SILENT)
|
|
114
|
+
return a;
|
|
115
|
+
throw new TypeError("log.setLevel() called with invalid level: " + n);
|
|
116
|
+
}
|
|
117
|
+
e.name = t, e.levels = {
|
|
118
|
+
TRACE: 0,
|
|
119
|
+
DEBUG: 1,
|
|
120
|
+
INFO: 2,
|
|
121
|
+
WARN: 3,
|
|
122
|
+
ERROR: 4,
|
|
123
|
+
SILENT: 5
|
|
124
|
+
}, e.methodFactory = s || M, e.getLevel = function() {
|
|
125
|
+
return f ?? m ?? h;
|
|
126
|
+
}, e.setLevel = function(n, a) {
|
|
127
|
+
return f = d(n), a !== !1 && O(f), g.call(e);
|
|
128
|
+
}, e.setDefaultLevel = function(n) {
|
|
129
|
+
m = d(n), C() || e.setLevel(n, !1);
|
|
130
|
+
}, e.resetLevel = function() {
|
|
131
|
+
f = null, P(), g.call(e);
|
|
132
|
+
}, e.enableAll = function(n) {
|
|
133
|
+
e.setLevel(e.levels.TRACE, n);
|
|
134
|
+
}, e.disableAll = function(n) {
|
|
135
|
+
e.setLevel(e.levels.SILENT, n);
|
|
136
|
+
}, e.rebuild = function() {
|
|
137
|
+
if (i !== e && (h = d(i.getLevel())), g.call(e), i === e)
|
|
138
|
+
for (var n in c)
|
|
139
|
+
c[n].rebuild();
|
|
140
|
+
}, h = d(
|
|
141
|
+
i ? i.getLevel() : "WARN"
|
|
142
|
+
);
|
|
143
|
+
var x = C();
|
|
144
|
+
x != null && (f = d(x)), g.call(e);
|
|
145
|
+
}
|
|
146
|
+
i = new E(), i.getLogger = function(s) {
|
|
147
|
+
if (typeof s != "symbol" && typeof s != "string" || s === "")
|
|
148
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
149
|
+
var e = c[s];
|
|
150
|
+
return e || (e = c[s] = new E(
|
|
151
|
+
s,
|
|
152
|
+
i.methodFactory
|
|
153
|
+
)), e;
|
|
154
|
+
};
|
|
155
|
+
var N = typeof window !== o ? window.log : void 0;
|
|
156
|
+
return i.noConflict = function() {
|
|
157
|
+
return typeof window !== o && window.log === i && (window.log = N), i;
|
|
158
|
+
}, i.getLoggers = function() {
|
|
159
|
+
return c;
|
|
160
|
+
}, i.default = i, i;
|
|
161
|
+
});
|
|
162
|
+
})(F);
|
|
163
|
+
var J = F.exports;
|
|
164
|
+
const p = /* @__PURE__ */ z(J);
|
|
165
|
+
var K = class extends T {
|
|
166
|
+
constructor(l) {
|
|
167
|
+
super(l);
|
|
168
|
+
v(this, "logger", p);
|
|
169
|
+
p.setLevel(
|
|
170
|
+
this.client.NODE_ENV === "production" ? p.levels.INFO : p.levels.DEBUG
|
|
171
|
+
), p.methodFactory = (o, b, y) => (c, i = {}) => {
|
|
172
|
+
k().url(`${this.client.apiUrl}/v1/apm/logs/json`).post({
|
|
173
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
174
|
+
level: o,
|
|
175
|
+
message: c,
|
|
176
|
+
...i
|
|
177
|
+
}).res().catch((w) => console.error(w));
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}, V = class extends T {
|
|
181
|
+
constructor() {
|
|
182
|
+
super(...arguments);
|
|
183
|
+
v(this, "mediaBulkUpload", (l, o = {}) => this.client.fetch.url("/v1/assets/media/bulk").options(o).post(l).json());
|
|
184
|
+
v(this, "getAllMedia", async (l = {}) => await this.client.fetch.url("/v1/assets/media/query").post(l).json());
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const R = G(null), X = ({
|
|
188
|
+
children: r,
|
|
189
|
+
client: l,
|
|
190
|
+
...o
|
|
191
|
+
}) => /* @__PURE__ */ B.jsx(
|
|
192
|
+
R.Provider,
|
|
193
|
+
{
|
|
194
|
+
value: {
|
|
195
|
+
client: l,
|
|
196
|
+
media: new V(l),
|
|
197
|
+
logger: new K(l),
|
|
198
|
+
...o
|
|
199
|
+
},
|
|
200
|
+
children: r
|
|
201
|
+
}
|
|
202
|
+
), Z = () => {
|
|
203
|
+
const r = W(R);
|
|
204
|
+
if (!r)
|
|
205
|
+
throw new Error("useLevo must be used within LevoProvider");
|
|
206
|
+
return r;
|
|
207
|
+
};
|
|
208
|
+
export {
|
|
209
|
+
X as L,
|
|
210
|
+
q as c,
|
|
211
|
+
Z as u
|
|
212
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { GeocoderWidget as d } from "./GeocoderWidget-
|
|
7
|
-
import { B as p } from "./Spinner-
|
|
3
|
+
import { Plus as m } from "lucide-react";
|
|
4
|
+
import { useFieldArray as n } from "react-hook-form";
|
|
5
|
+
import { k as c } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
6
|
+
import { GeocoderWidget as d } from "./GeocoderWidget-D8GsLWkV.js";
|
|
7
|
+
import { B as p } from "./Spinner-DzGH5rKe.js";
|
|
8
8
|
const g = ({
|
|
9
9
|
field: l
|
|
10
10
|
}) => {
|
|
11
|
-
const { key: s = "", label: o = "" } = l, { fields: r, ...i } =
|
|
11
|
+
const { key: s = "", label: o = "" } = l, { fields: r, ...i } = n({
|
|
12
12
|
name: s
|
|
13
13
|
});
|
|
14
14
|
return /* @__PURE__ */ e.jsxs("div", { className: "w-full relative", children: [
|
|
15
|
-
o && /* @__PURE__ */ e.jsx(
|
|
15
|
+
o && /* @__PURE__ */ e.jsx(c, { htmlFor: s, children: o }),
|
|
16
16
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
17
17
|
r == null ? void 0 : r.map((a, t) => /* @__PURE__ */ e.jsx(
|
|
18
18
|
d,
|
|
@@ -35,7 +35,7 @@ const g = ({
|
|
|
35
35
|
i.append(null);
|
|
36
36
|
},
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ e.jsx(
|
|
38
|
+
/* @__PURE__ */ e.jsx(m, { className: "inline-block mr-1", size: "14px" }),
|
|
39
39
|
"Add"
|
|
40
40
|
]
|
|
41
41
|
}
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
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
|
-
import { h as x, j as v, k as j } from "./CollectionFormBuilder-jwwjyIpv.js";
|
|
6
5
|
import { c as l } from "./cn-C9QoOYNG.js";
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { h as x, j as v, k as j } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
7
|
+
const k = ({ field: e }) => {
|
|
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 },
|
|
10
10
|
fieldState: { error: r }
|
|
11
11
|
} = f({
|
|
12
12
|
name: s,
|
|
13
13
|
rules: x(e)
|
|
14
14
|
}), p = !!(e != null && e.required), h = r == null ? void 0 : r.message;
|
|
15
|
-
return /* @__PURE__ */ o.jsxs(v, { error: h, helperText: c, readOnly:
|
|
16
|
-
|
|
15
|
+
return /* @__PURE__ */ o.jsxs(v, { error: h, helperText: c, readOnly: n, children: [
|
|
16
|
+
t && /* @__PURE__ */ o.jsx(j, { htmlFor: s, isRequired: p, children: t }),
|
|
17
17
|
/* @__PURE__ */ o.jsx(
|
|
18
18
|
g,
|
|
19
19
|
{
|
|
@@ -21,7 +21,7 @@ const q = ({ field: e }) => {
|
|
|
21
21
|
value: d,
|
|
22
22
|
className: l(
|
|
23
23
|
"w-full",
|
|
24
|
-
|
|
24
|
+
n ? "focus-visible:ring-0 pointer-events-none" : ""
|
|
25
25
|
),
|
|
26
26
|
inputClassName: l(
|
|
27
27
|
"w-full border border-input bg-transparent text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
|
|
@@ -36,12 +36,13 @@ const q = ({ field: e }) => {
|
|
|
36
36
|
"--react-international-phone-height": "2.25rem",
|
|
37
37
|
"--react-international-phone-border-radius": "calc(var(--radius) - 2px)"
|
|
38
38
|
},
|
|
39
|
+
disableDialCodePrefill: !0,
|
|
39
40
|
...m
|
|
40
41
|
}
|
|
41
42
|
)
|
|
42
43
|
] });
|
|
43
44
|
};
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
k as PhoneWidget,
|
|
47
|
+
k as default
|
|
47
48
|
};
|
|
@@ -3,10 +3,10 @@ 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 E } from "./Spinner-
|
|
7
|
-
import { h as G, j as V, k as f } from "./CollectionFormBuilder-jwwjyIpv.js";
|
|
8
|
-
import { I as q } from "./Input-2CvZ90f8.js";
|
|
6
|
+
import { G as E } from "./Spinner-DzGH5rKe.js";
|
|
9
7
|
import { c as N } from "./cn-C9QoOYNG.js";
|
|
8
|
+
import { h as G, j as V, k as f } from "./CollectionFormBuilder-B_dXpvPN.js";
|
|
9
|
+
import { I as q } from "./Input-2CvZ90f8.js";
|
|
10
10
|
function B(s) {
|
|
11
11
|
return E({ 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);
|
|
12
12
|
}
|
|
@@ -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 D, useEffect as G } from "react";
|
|
19
19
|
import { useController as q } from "react-hook-form";
|
|
20
|
-
import { G as p, e as J, f as V, g as W, h as Z, i as _, j as P, k as K, l as Q, m as X, n as Y, o as $, p as nn } from "./Spinner-
|
|
21
|
-
import { h as ln, j as en, k as sn } from "./CollectionFormBuilder-jwwjyIpv.js";
|
|
20
|
+
import { G as p, e as J, f as V, g as W, h as Z, i as _, j as P, k as K, l as Q, m as X, n as Y, o as $, p as nn } from "./Spinner-DzGH5rKe.js";
|
|
22
21
|
import { c as j } from "./cn-C9QoOYNG.js";
|
|
22
|
+
import { h as ln, j as en, k as sn } from "./CollectionFormBuilder-B_dXpvPN.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
|
}
|
|
@@ -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
|
{
|