@levo-so/react 0.1.14 → 0.1.15
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-BGS61gcL.js +124 -0
- package/dist/CollectionFormBuilder-BIvx_z08.js +1197 -0
- package/dist/{CurrencyWidget-COoMkfsA.js → CurrencyWidget-sD8ijLvw.js} +5 -5
- package/dist/{DateTimeWidget-DcbQ3smI.js → DateTimeWidget-KrcsxgEF.js} +3 -3
- package/dist/DefaultFormVariant-j1HgVDiI.js +127 -0
- package/dist/DropdownWidget-rm5oUqOE.js +113 -0
- package/dist/{EmailWidget-CG9oNUM5.js → EmailWidget-CvZKOywL.js} +11 -11
- package/dist/GeocoderWidget-CSsp_-hW.js +68 -0
- package/dist/{LevoProvider-BI6g_T4E.js → LevoProvider-Do3jjJ4j.js} +0 -1
- package/dist/{MultiGeocoderWidget-D3Xmv8g4.js → MultiGeocoderWidget-Blqz-lHX.js} +6 -6
- package/dist/{MultiTextWidget-CyQRcWC8.js → MultiTextWidget-CxVpyf06.js} +14 -14
- package/dist/{PhoneWidget-C1Jt7kXL.js → PhoneWidget-DezcchSP.js} +5 -5
- package/dist/{RadioWidget-BrLNF-I2.js → RadioWidget-SfD1fFDG.js} +9 -9
- package/dist/{RichTextWidget-BogYcPtS.js → RichTextWidget-Cg3RizdO.js} +21 -21
- package/dist/Spinner-Bzu2xCFZ.js +405 -0
- package/dist/{StepsFormVariant-Bx-jdciC.js → StepsFormVariant-D35dFYK6.js} +9 -9
- package/dist/{SwitchWidget-BT0-waP9.js → SwitchWidget-Id6BNlPe.js} +5 -5
- package/dist/{TextWidget-Bvsz-hey.js → TextWidget-CtFaQde1.js} +7 -7
- package/dist/{TextareaWidget-8SLym--T.js → TextareaWidget-BKzAeMod.js} +3 -3
- package/dist/{ToggleCheckboxWidget-VrCQBF5C.js → ToggleCheckboxWidget-nSlie9sE.js} +7 -7
- package/dist/Tooltip-DEBnSqlo.js +36 -0
- package/dist/{URLWidget-B99nKr6N.js → URLWidget-DtJai3xY.js} +2 -2
- package/dist/UploadWidget-Dxx2_FYo.js +616 -0
- package/dist/audience/components/page.d.ts.map +1 -1
- package/dist/audience/index.js +1 -1
- package/dist/collection/components/Altcha.d.ts +10 -0
- package/dist/collection/components/Altcha.d.ts.map +1 -0
- package/dist/collection/components/renderer/RenderCommonField.d.ts.map +1 -1
- package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts +1 -1
- package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts +7 -0
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +1 -0
- package/dist/collection/components/widgets/collectionWidget/{CollectionWidget.d.ts → CollectionWidgetM2O.d.ts} +1 -1
- package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2O.d.ts.map +1 -0
- package/dist/collection/components/widgets/collectionWidget/SelectedCollectionItems.d.ts +8 -0
- package/dist/collection/components/widgets/collectionWidget/SelectedCollectionItems.d.ts.map +1 -0
- package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts +11 -0
- package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +1 -0
- 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/ImportFromAssets.d.ts.map +1 -1
- package/dist/collection/index.js +13 -12
- package/dist/collection/lib/hooks/useLevoForm.d.ts +2 -1
- package/dist/collection/lib/hooks/useLevoForm.d.ts.map +1 -1
- package/dist/collection/lib/variants/DefaultFormVariant.d.ts.map +1 -1
- package/dist/collection/utils/formHelpers.d.ts.map +1 -1
- package/dist/collection/utils/index.d.ts +2 -0
- package/dist/collection/utils/index.d.ts.map +1 -1
- package/dist/components/Table.d.ts +11 -0
- package/dist/components/Table.d.ts.map +1 -0
- package/dist/components/index.js +29 -29
- package/dist/constants/fileUploadPresets.d.ts +4 -2
- package/dist/constants/fileUploadPresets.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +75 -75
- package/dist/membership/index.js +1 -1
- package/dist/page-DgqTELmZ.js +212 -0
- package/dist/useLevoForm-3jSJ9I6v.js +170 -0
- package/package.json +8 -7
- package/dist/CheckboxWidget-BctVOZiO.js +0 -118
- package/dist/CollectionFormBuilder-B6CAVKhg.js +0 -772
- package/dist/DefaultFormVariant-C6zbKgwB.js +0 -80
- package/dist/DropdownWidget-DszCTSWr.js +0 -115
- package/dist/GeocoderWidget-CXu17A7y.js +0 -310
- package/dist/Spinner-DzGH5rKe.js +0 -297
- package/dist/Tooltip-CI4i4mYr.js +0 -144
- package/dist/UploadWidget-ZebPWZZZ.js +0 -505
- package/dist/collection/components/widgets/collectionWidget/CollectionWidget.d.ts.map +0 -1
- package/dist/fileUploadPresets-2raQmHT0.js +0 -74
- package/dist/page-yeiAPg3O.js +0 -200
- package/dist/useLevoForm-DjvUas25.js +0 -166
|
@@ -3,8 +3,8 @@ import { j as l } from "./jsx-runtime-B6kdoens.js";
|
|
|
3
3
|
import B from "@tiptap/extension-bold";
|
|
4
4
|
import d from "@tiptap/extension-bullet-list";
|
|
5
5
|
import w from "@tiptap/extension-document";
|
|
6
|
-
import { HardBreak as
|
|
7
|
-
import
|
|
6
|
+
import { HardBreak as z } from "@tiptap/extension-hard-break";
|
|
7
|
+
import y from "@tiptap/extension-history";
|
|
8
8
|
import S from "@tiptap/extension-italic";
|
|
9
9
|
import R from "@tiptap/extension-link";
|
|
10
10
|
import M from "@tiptap/extension-list-item";
|
|
@@ -15,11 +15,11 @@ import N from "@tiptap/extension-text";
|
|
|
15
15
|
import O from "@tiptap/extension-text-align";
|
|
16
16
|
import F from "@tiptap/extension-underline";
|
|
17
17
|
import { useEditor as I, EditorContent as E } from "@tiptap/react";
|
|
18
|
-
import { useState as
|
|
19
|
-
import { useController as
|
|
20
|
-
import { G as p,
|
|
18
|
+
import { useState as q, useEffect as D } from "react";
|
|
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";
|
|
21
21
|
import { c as j } from "./cn-C9QoOYNG.js";
|
|
22
|
-
import {
|
|
22
|
+
import { z as ln, A as en, B as sn } from "./CollectionFormBuilder-BIvx_z08.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
|
}
|
|
@@ -224,13 +224,13 @@ const e = ({
|
|
|
224
224
|
] });
|
|
225
225
|
}, Rn = ({ field: n }) => {
|
|
226
226
|
var b;
|
|
227
|
-
const [c, t] =
|
|
228
|
-
field: { value:
|
|
229
|
-
fieldState:
|
|
230
|
-
} =
|
|
227
|
+
const [c, t] = q(!1), { key: i = "", label: u = "", helper_text: r = "", readonly: x = !1 } = n, o = i, {
|
|
228
|
+
field: { value: g, onBlur: k, onChange: A, ...m },
|
|
229
|
+
fieldState: h
|
|
230
|
+
} = G({
|
|
231
231
|
name: o,
|
|
232
232
|
rules: ln(n)
|
|
233
|
-
}),
|
|
233
|
+
}), L = !!(n != null && n.required), v = (b = h == null ? void 0 : h.error) == null ? void 0 : b.message, s = I({
|
|
234
234
|
extensions: [
|
|
235
235
|
w,
|
|
236
236
|
T,
|
|
@@ -242,7 +242,7 @@ const e = ({
|
|
|
242
242
|
U,
|
|
243
243
|
d,
|
|
244
244
|
M,
|
|
245
|
-
|
|
245
|
+
z,
|
|
246
246
|
R.configure({
|
|
247
247
|
HTMLAttributes: {
|
|
248
248
|
target: "_blank"
|
|
@@ -252,30 +252,30 @@ const e = ({
|
|
|
252
252
|
O.configure({
|
|
253
253
|
types: ["heading", "paragraph"]
|
|
254
254
|
}),
|
|
255
|
-
|
|
255
|
+
y
|
|
256
256
|
],
|
|
257
|
-
content:
|
|
258
|
-
editable: !m.disabled && !
|
|
257
|
+
content: g,
|
|
258
|
+
editable: !m.disabled && !x,
|
|
259
259
|
onBlur: () => {
|
|
260
260
|
k();
|
|
261
261
|
},
|
|
262
262
|
onUpdate: ({ editor: f }) => {
|
|
263
263
|
const C = f.getHTML();
|
|
264
|
-
|
|
264
|
+
A(C);
|
|
265
265
|
},
|
|
266
266
|
immediatelyRender: !1
|
|
267
267
|
});
|
|
268
|
-
return
|
|
269
|
-
s != null && s.commands && !c && (s.commands.setContent(
|
|
270
|
-
}, [
|
|
271
|
-
u && /* @__PURE__ */ l.jsx(sn, { htmlFor: o, isRequired:
|
|
268
|
+
return D(() => {
|
|
269
|
+
s != null && s.commands && !c && (s.commands.setContent(g || ""), t(!0));
|
|
270
|
+
}, [g]), /* @__PURE__ */ l.jsxs(en, { error: v, helperText: r, readOnly: x, children: [
|
|
271
|
+
u && /* @__PURE__ */ l.jsx(sn, { htmlFor: o, isRequired: L, children: u }),
|
|
272
272
|
/* @__PURE__ */ l.jsxs(
|
|
273
273
|
"div",
|
|
274
274
|
{
|
|
275
275
|
className: j(
|
|
276
276
|
"w-full rounded-md border border-input placeholder:text-muted-foreground focus-within:outline-none focus-within:ring-1 focus-within:ring-ring overflow-hidden",
|
|
277
277
|
(m == null ? void 0 : m.disabled) && "cursor-not-allowed opacity-50 pointer-events-none",
|
|
278
|
-
|
|
278
|
+
x && "focus-visible:ring-0 pointer-events-none"
|
|
279
279
|
),
|
|
280
280
|
children: [
|
|
281
281
|
/* @__PURE__ */ l.jsx(rn, { editor: s }),
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as i } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
+
import * as m from "@radix-ui/react-tabs";
|
|
4
|
+
import * as u from "react";
|
|
5
|
+
import f from "react";
|
|
6
|
+
import { c as l } from "./cn-C9QoOYNG.js";
|
|
7
|
+
import { Slot as D } from "@radix-ui/react-slot";
|
|
8
|
+
import { twMerge as M } from "tailwind-merge";
|
|
9
|
+
import { cva as L } from "class-variance-authority";
|
|
10
|
+
import * as o from "@radix-ui/react-dialog";
|
|
11
|
+
import { X as R } from "lucide-react";
|
|
12
|
+
var y = {
|
|
13
|
+
color: void 0,
|
|
14
|
+
size: void 0,
|
|
15
|
+
className: void 0,
|
|
16
|
+
style: void 0,
|
|
17
|
+
attr: void 0
|
|
18
|
+
}, b = f.createContext && /* @__PURE__ */ f.createContext(y), T = ["attr", "size", "title"];
|
|
19
|
+
function S(t, e) {
|
|
20
|
+
if (t == null) return {};
|
|
21
|
+
var a = k(t, e), r, s;
|
|
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]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
}
|
|
29
|
+
function k(t, e) {
|
|
30
|
+
if (t == null) return {};
|
|
31
|
+
var a = {};
|
|
32
|
+
for (var r in t)
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(t, r)) {
|
|
34
|
+
if (e.indexOf(r) >= 0) continue;
|
|
35
|
+
a[r] = t[r];
|
|
36
|
+
}
|
|
37
|
+
return a;
|
|
38
|
+
}
|
|
39
|
+
function v() {
|
|
40
|
+
return v = Object.assign ? Object.assign.bind() : function(t) {
|
|
41
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
42
|
+
var a = arguments[e];
|
|
43
|
+
for (var r in a)
|
|
44
|
+
Object.prototype.hasOwnProperty.call(a, r) && (t[r] = a[r]);
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
}, v.apply(this, arguments);
|
|
48
|
+
}
|
|
49
|
+
function x(t, e) {
|
|
50
|
+
var a = Object.keys(t);
|
|
51
|
+
if (Object.getOwnPropertySymbols) {
|
|
52
|
+
var r = Object.getOwnPropertySymbols(t);
|
|
53
|
+
e && (r = r.filter(function(s) {
|
|
54
|
+
return Object.getOwnPropertyDescriptor(t, s).enumerable;
|
|
55
|
+
})), a.push.apply(a, r);
|
|
56
|
+
}
|
|
57
|
+
return a;
|
|
58
|
+
}
|
|
59
|
+
function p(t) {
|
|
60
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
61
|
+
var a = arguments[e] != null ? arguments[e] : {};
|
|
62
|
+
e % 2 ? x(Object(a), !0).forEach(function(r) {
|
|
63
|
+
E(t, r, a[r]);
|
|
64
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : x(Object(a)).forEach(function(r) {
|
|
65
|
+
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(a, r));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return t;
|
|
69
|
+
}
|
|
70
|
+
function E(t, e, a) {
|
|
71
|
+
return e = _(e), e in t ? Object.defineProperty(t, e, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = a, t;
|
|
72
|
+
}
|
|
73
|
+
function _(t) {
|
|
74
|
+
var e = A(t, "string");
|
|
75
|
+
return typeof e == "symbol" ? e : e + "";
|
|
76
|
+
}
|
|
77
|
+
function A(t, e) {
|
|
78
|
+
if (typeof t != "object" || !t) return t;
|
|
79
|
+
var a = t[Symbol.toPrimitive];
|
|
80
|
+
if (a !== void 0) {
|
|
81
|
+
var r = a.call(t, e || "default");
|
|
82
|
+
if (typeof r != "object") return r;
|
|
83
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
84
|
+
}
|
|
85
|
+
return (e === "string" ? String : Number)(t);
|
|
86
|
+
}
|
|
87
|
+
function w(t) {
|
|
88
|
+
return t && t.map((e, a) => /* @__PURE__ */ f.createElement(e.tag, p({
|
|
89
|
+
key: a
|
|
90
|
+
}, e.attr), w(e.child)));
|
|
91
|
+
}
|
|
92
|
+
function n(t) {
|
|
93
|
+
return (e) => /* @__PURE__ */ f.createElement(V, v({
|
|
94
|
+
attr: p({}, t.attr)
|
|
95
|
+
}, e), w(t.child));
|
|
96
|
+
}
|
|
97
|
+
function V(t) {
|
|
98
|
+
var e = (a) => {
|
|
99
|
+
var {
|
|
100
|
+
attr: r,
|
|
101
|
+
size: s,
|
|
102
|
+
title: c
|
|
103
|
+
} = t, g = S(t, T), h = s || a.size || "1em", d;
|
|
104
|
+
return a.className && (d = a.className), t.className && (d = (d ? d + " " : "") + t.className), /* @__PURE__ */ f.createElement("svg", v({
|
|
105
|
+
stroke: "currentColor",
|
|
106
|
+
fill: "currentColor",
|
|
107
|
+
strokeWidth: "0"
|
|
108
|
+
}, a.attr, r, g, {
|
|
109
|
+
className: d,
|
|
110
|
+
style: p(p({
|
|
111
|
+
color: t.color || a.color
|
|
112
|
+
}, a.style), t.style),
|
|
113
|
+
height: h,
|
|
114
|
+
width: h,
|
|
115
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
116
|
+
}), c && /* @__PURE__ */ f.createElement("title", null, c), t.children);
|
|
117
|
+
};
|
|
118
|
+
return b !== void 0 ? /* @__PURE__ */ f.createElement(b.Consumer, null, (a) => e(a)) : e(y);
|
|
119
|
+
}
|
|
120
|
+
function at(t) {
|
|
121
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 7h16v2H4zm0-4h16v2H4zm0 8h16v2H4zm0 4h16v2H4zm2 4h12v2H6z" }, child: [] }] })(t);
|
|
122
|
+
}
|
|
123
|
+
function rt(t) {
|
|
124
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm0-4h11v2H4zm0-4h16v2H4zm0-8h16v2H4zm0 4h11v2H4z" }, child: [] }] })(t);
|
|
125
|
+
}
|
|
126
|
+
function it(t) {
|
|
127
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm3-4h10v2H7zm-3-4h16v2H4zm0-8h16v2H4zm3 4h10v2H7z" }, child: [] }] })(t);
|
|
128
|
+
}
|
|
129
|
+
function nt(t) {
|
|
130
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm5-4h11v2H9zm-5-4h16v2H4zm0-8h16v2H4zm5 4h11v2H9z" }, child: [] }] })(t);
|
|
131
|
+
}
|
|
132
|
+
function st(t) {
|
|
133
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M17.061 11.22A4.46 4.46 0 0 0 18 8.5C18 6.019 15.981 4 13.5 4H6v15h8c2.481 0 4.5-2.019 4.5-4.5a4.48 4.48 0 0 0-1.439-3.28zM13.5 7c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5H9V7h4.5zm.5 9H9v-3h5c.827 0 1.5.673 1.5 1.5S14.827 16 14 16z" }, child: [] }] })(t);
|
|
134
|
+
}
|
|
135
|
+
function ot(t) {
|
|
136
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M13.293 6.293 7.586 12l5.707 5.707 1.414-1.414L10.414 12l4.293-4.293z" }, child: [] }] })(t);
|
|
137
|
+
}
|
|
138
|
+
function lt(t) {
|
|
139
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M10.707 17.707 16.414 12l-5.707-5.707-1.414 1.414L13.586 12l-4.293 4.293z" }, child: [] }] })(t);
|
|
140
|
+
}
|
|
141
|
+
function ct(t) {
|
|
142
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 7V4H9v3h2.868L9.012 17H5v3h10v-3h-2.868l2.856-10z" }, child: [] }] })(t);
|
|
143
|
+
}
|
|
144
|
+
function dt(t) {
|
|
145
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.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.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z" }, child: [] }, { tag: "path", attr: { d: "m12 4.929-.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.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z" }, child: [] }] })(t);
|
|
146
|
+
}
|
|
147
|
+
function ut(t) {
|
|
148
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5.282 12.064c-.428.328-.72.609-.875.851-.155.24-.249.498-.279.768h2.679v-.748H5.413c.081-.081.152-.151.212-.201.062-.05.182-.142.361-.27.303-.218.511-.42.626-.604.116-.186.173-.375.173-.578a.898.898 0 0 0-.151-.512.892.892 0 0 0-.412-.341c-.174-.076-.419-.111-.733-.111-.3 0-.537.038-.706.114a.889.889 0 0 0-.396.338c-.094.143-.159.346-.194.604l.894.076c.025-.188.074-.317.147-.394a.375.375 0 0 1 .279-.108c.11 0 .2.035.272.108a.344.344 0 0 1 .108.258.55.55 0 0 1-.108.297c-.074.102-.241.254-.503.453zm.055 6.386a.398.398 0 0 1-.282-.105c-.074-.07-.128-.195-.162-.378L4 18.085c.059.204.142.372.251.506.109.133.248.235.417.306.168.069.399.103.692.103.3 0 .541-.047.725-.14a1 1 0 0 0 .424-.403c.098-.175.146-.354.146-.544a.823.823 0 0 0-.088-.393.708.708 0 0 0-.249-.261 1.015 1.015 0 0 0-.286-.11.943.943 0 0 0 .345-.299.673.673 0 0 0 .113-.383.747.747 0 0 0-.281-.596c-.187-.159-.49-.238-.909-.238-.365 0-.648.072-.847.219-.2.143-.334.353-.404.626l.844.151c.023-.162.067-.274.133-.338s.151-.098.257-.098a.33.33 0 0 1 .241.089c.059.06.087.139.087.238 0 .104-.038.193-.117.27s-.177.112-.293.112a.907.907 0 0 1-.116-.011l-.045.649a1.13 1.13 0 0 1 .289-.056c.132 0 .237.041.313.126.077.082.115.199.115.352 0 .146-.04.266-.119.354a.394.394 0 0 1-.301.134zm.948-10.083V5h-.739a1.47 1.47 0 0 1-.394.523c-.168.142-.404.262-.708.365v.754a2.595 2.595 0 0 0 .937-.48v2.206h.904zM9 6h11v2H9zm0 5h11v2H9zm0 5h11v2H9z" }, child: [] }] })(t);
|
|
149
|
+
}
|
|
150
|
+
function ft(t) {
|
|
151
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4zm16-8V6H8.023v2H18.8zM8 11h12v2H8zm0 5h12v2H8z" }, child: [] }] })(t);
|
|
152
|
+
}
|
|
153
|
+
function z(t) {
|
|
154
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22c5.421 0 10-4.579 10-10h-2c0 4.337-3.663 8-8 8s-8-3.663-8-8c0-4.336 3.663-8 8-8V2C6.579 2 2 6.58 2 12c0 5.421 4.579 10 10 10z" }, child: [] }] })(t);
|
|
155
|
+
}
|
|
156
|
+
function mt(t) {
|
|
157
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 11h-8c-4 0-4-1.816-4-2.5C8 7.882 8 6 12 6c2.8 0 2.99 1.678 3 2.014L16 8h1c0-1.384-1.045-4-5-4-5.416 0-6 3.147-6 4.5 0 .728.148 1.667.736 2.5H4v2h16v-2zm-8 7c-3.793 0-3.99-1.815-4-2H6c0 .04.069 4 6 4 5.221 0 6-2.819 6-4.5 0-.146-.009-.317-.028-.5h-2.006c.032.2.034.376.034.5 0 .684 0 2.5-4 2.5z" }, child: [] }] })(t);
|
|
158
|
+
}
|
|
159
|
+
function gt(t) {
|
|
160
|
+
return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5 18h14v2H5zM6 4v6c0 3.309 2.691 6 6 6s6-2.691 6-6V4h-2v6c0 2.206-1.794 4-4 4s-4-1.794-4-4V4H6z" }, child: [] }] })(t);
|
|
161
|
+
}
|
|
162
|
+
function ht(t) {
|
|
163
|
+
return n({ 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);
|
|
164
|
+
}
|
|
165
|
+
const vt = m.Root, I = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
166
|
+
m.List,
|
|
167
|
+
{
|
|
168
|
+
ref: a,
|
|
169
|
+
className: l(
|
|
170
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
171
|
+
t
|
|
172
|
+
),
|
|
173
|
+
...e
|
|
174
|
+
}
|
|
175
|
+
));
|
|
176
|
+
I.displayName = m.List.displayName;
|
|
177
|
+
const W = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
178
|
+
m.Trigger,
|
|
179
|
+
{
|
|
180
|
+
ref: a,
|
|
181
|
+
className: l(
|
|
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
|
+
t
|
|
184
|
+
),
|
|
185
|
+
"data-levo-studio-interactive": "true",
|
|
186
|
+
...e
|
|
187
|
+
}
|
|
188
|
+
));
|
|
189
|
+
W.displayName = m.Trigger.displayName;
|
|
190
|
+
const F = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
191
|
+
m.Content,
|
|
192
|
+
{
|
|
193
|
+
ref: a,
|
|
194
|
+
className: l(
|
|
195
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
196
|
+
t
|
|
197
|
+
),
|
|
198
|
+
...e
|
|
199
|
+
}
|
|
200
|
+
));
|
|
201
|
+
F.displayName = m.Content.displayName;
|
|
202
|
+
const U = L(
|
|
203
|
+
"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",
|
|
204
|
+
{
|
|
205
|
+
variants: {
|
|
206
|
+
variant: {
|
|
207
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
208
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
209
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
210
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
211
|
+
secondaryOutline: "bg-transparent border-[1px] border-solid border-white hover:bg-white hover:border-input",
|
|
212
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
213
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
214
|
+
},
|
|
215
|
+
size: {
|
|
216
|
+
default: "h-10 px-4 py-2",
|
|
217
|
+
xs: "h-8 px-3 text-xs",
|
|
218
|
+
sm: "h-9 px-3",
|
|
219
|
+
lg: "h-11 px-8",
|
|
220
|
+
icon: "h-10 w-10",
|
|
221
|
+
"icon-small": "h-8 w-8"
|
|
222
|
+
},
|
|
223
|
+
rounded: {
|
|
224
|
+
small: "rounded",
|
|
225
|
+
default: "rounded-md",
|
|
226
|
+
large: "rounded-lg",
|
|
227
|
+
full: "rounded-full"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
defaultVariants: {
|
|
231
|
+
variant: "default",
|
|
232
|
+
size: "default",
|
|
233
|
+
rounded: "default"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
), G = u.forwardRef(
|
|
237
|
+
({
|
|
238
|
+
className: t,
|
|
239
|
+
variant: e,
|
|
240
|
+
size: a,
|
|
241
|
+
rounded: r,
|
|
242
|
+
asChild: s = !1,
|
|
243
|
+
isLoading: c = !1,
|
|
244
|
+
loadingText: g,
|
|
245
|
+
disabled: h,
|
|
246
|
+
...d
|
|
247
|
+
}, P) => {
|
|
248
|
+
const C = s ? D : "button";
|
|
249
|
+
return /* @__PURE__ */ i.jsx(
|
|
250
|
+
C,
|
|
251
|
+
{
|
|
252
|
+
className: l(U({ variant: e, size: a, rounded: r, className: t })),
|
|
253
|
+
ref: P,
|
|
254
|
+
disabled: h || c,
|
|
255
|
+
type: "button",
|
|
256
|
+
...d,
|
|
257
|
+
children: c ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
258
|
+
/* @__PURE__ */ i.jsx(
|
|
259
|
+
z,
|
|
260
|
+
{
|
|
261
|
+
className: M(
|
|
262
|
+
"h-4 w-4 animate-spin",
|
|
263
|
+
g ? "mr-2" : ""
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
g
|
|
268
|
+
] }) : d.children
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
);
|
|
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(
|
|
275
|
+
o.Overlay,
|
|
276
|
+
{
|
|
277
|
+
ref: a,
|
|
278
|
+
className: l(
|
|
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
|
+
t
|
|
281
|
+
),
|
|
282
|
+
...e
|
|
283
|
+
}
|
|
284
|
+
));
|
|
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, {}),
|
|
288
|
+
/* @__PURE__ */ i.jsxs(
|
|
289
|
+
o.Content,
|
|
290
|
+
{
|
|
291
|
+
ref: s,
|
|
292
|
+
className: l(
|
|
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
|
+
t
|
|
295
|
+
),
|
|
296
|
+
...r,
|
|
297
|
+
children: [
|
|
298
|
+
e,
|
|
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: [
|
|
300
|
+
/* @__PURE__ */ i.jsx(R, { className: "h-4 w-4" }),
|
|
301
|
+
/* @__PURE__ */ i.jsx("span", { className: "sr-only", children: "Close" })
|
|
302
|
+
] })
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
] }));
|
|
307
|
+
N.displayName = o.Content.displayName;
|
|
308
|
+
const H = ({
|
|
309
|
+
className: t,
|
|
310
|
+
...e
|
|
311
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
312
|
+
"div",
|
|
313
|
+
{
|
|
314
|
+
className: l(
|
|
315
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
316
|
+
t
|
|
317
|
+
),
|
|
318
|
+
...e
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
H.displayName = "DialogHeader";
|
|
322
|
+
const K = ({
|
|
323
|
+
className: t,
|
|
324
|
+
...e
|
|
325
|
+
}) => /* @__PURE__ */ i.jsx(
|
|
326
|
+
"div",
|
|
327
|
+
{
|
|
328
|
+
className: l(
|
|
329
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
330
|
+
t
|
|
331
|
+
),
|
|
332
|
+
...e
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
K.displayName = "DialogFooter";
|
|
336
|
+
const O = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
337
|
+
o.Title,
|
|
338
|
+
{
|
|
339
|
+
ref: a,
|
|
340
|
+
className: l(
|
|
341
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
342
|
+
t
|
|
343
|
+
),
|
|
344
|
+
...e
|
|
345
|
+
}
|
|
346
|
+
));
|
|
347
|
+
O.displayName = o.Title.displayName;
|
|
348
|
+
const B = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
349
|
+
o.Description,
|
|
350
|
+
{
|
|
351
|
+
ref: a,
|
|
352
|
+
className: l("text-sm text-muted-foreground", t),
|
|
353
|
+
...e
|
|
354
|
+
}
|
|
355
|
+
));
|
|
356
|
+
B.displayName = o.Description.displayName;
|
|
357
|
+
const bt = ({
|
|
358
|
+
isOpen: t,
|
|
359
|
+
onClose: e,
|
|
360
|
+
children: a,
|
|
361
|
+
title: r,
|
|
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: [
|
|
365
|
+
r && /* @__PURE__ */ i.jsxs(H, { className: "flex-1 font-medium", children: [
|
|
366
|
+
/* @__PURE__ */ i.jsx(O, { children: r }),
|
|
367
|
+
/* @__PURE__ */ i.jsx(B, {})
|
|
368
|
+
] }),
|
|
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) });
|
|
371
|
+
export {
|
|
372
|
+
ot as A,
|
|
373
|
+
G as B,
|
|
374
|
+
lt as C,
|
|
375
|
+
q as D,
|
|
376
|
+
n as G,
|
|
377
|
+
xt as S,
|
|
378
|
+
vt as T,
|
|
379
|
+
J as a,
|
|
380
|
+
U as b,
|
|
381
|
+
j as c,
|
|
382
|
+
pt as d,
|
|
383
|
+
N as e,
|
|
384
|
+
H as f,
|
|
385
|
+
K as g,
|
|
386
|
+
O as h,
|
|
387
|
+
B as i,
|
|
388
|
+
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
|
|
405
|
+
};
|
|
@@ -3,9 +3,9 @@ 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
5
|
import { c as N } from "./cn-C9QoOYNG.js";
|
|
6
|
-
import {
|
|
7
|
-
import { u as H, S as M } from "./useLevoForm-
|
|
8
|
-
import { B as y } from "./Spinner-
|
|
6
|
+
import { D as g, F as T } from "./CollectionFormBuilder-BIvx_z08.js";
|
|
7
|
+
import { u as H, S as M } from "./useLevoForm-3jSJ9I6v.js";
|
|
8
|
+
import { B as y } from "./Spinner-Bzu2xCFZ.js";
|
|
9
9
|
const X = () => {
|
|
10
10
|
const [n, l] = A(0), { containerStyles: m } = g(), a = () => {
|
|
11
11
|
l((o) => o - 1);
|
|
@@ -42,8 +42,8 @@ const X = () => {
|
|
|
42
42
|
handleSubmit: w,
|
|
43
43
|
isLoading: E,
|
|
44
44
|
handleContentId: L,
|
|
45
|
-
isError:
|
|
46
|
-
allFormValues:
|
|
45
|
+
isError: D,
|
|
46
|
+
allFormValues: P
|
|
47
47
|
} = H({
|
|
48
48
|
schema: F,
|
|
49
49
|
saveToRemote: u,
|
|
@@ -64,15 +64,15 @@ const X = () => {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}), {
|
|
67
|
-
formState: { isSubmitting:
|
|
67
|
+
formState: { isSubmitting: k }
|
|
68
68
|
} = p;
|
|
69
69
|
return /* @__PURE__ */ t.jsxs(I, { ...p, children: [
|
|
70
70
|
/* @__PURE__ */ t.jsx(
|
|
71
71
|
M,
|
|
72
72
|
{
|
|
73
73
|
getContentId: (e) => L(e),
|
|
74
|
-
isError:
|
|
75
|
-
currentValues:
|
|
74
|
+
isError: D,
|
|
75
|
+
currentValues: P
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
78
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -120,7 +120,7 @@ const X = () => {
|
|
|
120
120
|
type: "submit",
|
|
121
121
|
loadingText: "Saving",
|
|
122
122
|
size: "sm",
|
|
123
|
-
isLoading:
|
|
123
|
+
isLoading: k,
|
|
124
124
|
disabled: o,
|
|
125
125
|
className: i == null ? void 0 : i.styles,
|
|
126
126
|
children: u ? (i == null ? void 0 : i.text) ?? "Save" : "Next"
|
|
@@ -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 {
|
|
4
|
+
import { z as w, A as j, B as v } from "./CollectionFormBuilder-BIvx_z08.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";
|
|
@@ -27,20 +27,20 @@ const m = y.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ r.jsx(
|
|
|
27
27
|
m.displayName = c.Root.displayName;
|
|
28
28
|
const C = ({ field: e }) => {
|
|
29
29
|
var l;
|
|
30
|
-
const { key: t = "", label: s = "", helper_text: u = "", readonly:
|
|
31
|
-
field: { value:
|
|
30
|
+
const { key: t = "", label: s = "", helper_text: u = "", readonly: p = !1 } = e, o = t, {
|
|
31
|
+
field: { value: h, onBlur: a, onChange: i, ...b },
|
|
32
32
|
fieldState: n
|
|
33
33
|
} = k({
|
|
34
34
|
name: o,
|
|
35
35
|
rules: w(e)
|
|
36
36
|
}), f = !!(e != null && e.required), x = (l = n == null ? void 0 : n.error) == null ? void 0 : l.message;
|
|
37
|
-
return /* @__PURE__ */ r.jsx(j, { error: x, helperText: u, readOnly:
|
|
37
|
+
return /* @__PURE__ */ r.jsx(j, { error: x, helperText: u, readOnly: p, children: /* @__PURE__ */ r.jsxs("div", { className: "w-full flex items-center justify-between max-w-[300px]", children: [
|
|
38
38
|
s && /* @__PURE__ */ r.jsx(v, { htmlFor: o, isRequired: f, className: "!mb-0", children: s }),
|
|
39
39
|
/* @__PURE__ */ r.jsx(
|
|
40
40
|
m,
|
|
41
41
|
{
|
|
42
42
|
id: o,
|
|
43
|
-
checked:
|
|
43
|
+
checked: h,
|
|
44
44
|
onCheckedChange: (g) => i == null ? void 0 : i(g),
|
|
45
45
|
onBlur: () => a == null ? void 0 : a(),
|
|
46
46
|
...b
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { useFormContext as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
2
|
+
import { useFormContext as g, get as h } from "react-hook-form";
|
|
3
|
+
import { c as j } from "./cn-C9QoOYNG.js";
|
|
4
|
+
import { A as F, B as b, z as y } from "./CollectionFormBuilder-BIvx_z08.js";
|
|
5
5
|
import { I as f } from "./Input-2CvZ90f8.js";
|
|
6
|
-
const
|
|
6
|
+
const k = ({
|
|
7
7
|
field: r,
|
|
8
8
|
inputStyles: a,
|
|
9
9
|
...m
|
|
@@ -12,14 +12,14 @@ const W = ({
|
|
|
12
12
|
const {
|
|
13
13
|
register: n,
|
|
14
14
|
formState: { errors: i, disabled: p }
|
|
15
|
-
} =
|
|
15
|
+
} = g(), { key: c = "", label: s = "", helper_text: l = "", readonly: x = !1 } = r, e = c, d = !!(r != null && r.required), u = (o = h(i, e)) == null ? void 0 : o.message;
|
|
16
16
|
return /* @__PURE__ */ t.jsxs(F, { error: u, helperText: l, children: [
|
|
17
17
|
s && /* @__PURE__ */ t.jsx(b, { htmlFor: e, isRequired: d, children: s }),
|
|
18
18
|
/* @__PURE__ */ t.jsx(
|
|
19
19
|
f,
|
|
20
20
|
{
|
|
21
21
|
id: e,
|
|
22
|
-
className:
|
|
22
|
+
className: j(a),
|
|
23
23
|
readOnly: x,
|
|
24
24
|
disabled: p,
|
|
25
25
|
...n(e, { ...y(r) }),
|
|
@@ -29,5 +29,5 @@ const W = ({
|
|
|
29
29
|
] });
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
k as default
|
|
33
33
|
};
|
|
@@ -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 {
|
|
4
|
+
import { A as g, B as f, z as h } from "./CollectionFormBuilder-BIvx_z08.js";
|
|
5
5
|
const w = ({ field: e }) => {
|
|
6
6
|
var a;
|
|
7
7
|
const {
|
|
@@ -9,7 +9,7 @@ const w = ({ field: e }) => {
|
|
|
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
11
|
return /* @__PURE__ */ s.jsxs(g, { error: p, helperText: m, children: [
|
|
12
|
-
o && /* @__PURE__ */ s.jsx(
|
|
12
|
+
o && /* @__PURE__ */ s.jsx(f, { htmlFor: r, isRequired: c, children: o }),
|
|
13
13
|
/* @__PURE__ */ s.jsx(
|
|
14
14
|
"textarea",
|
|
15
15
|
{
|
|
@@ -20,7 +20,7 @@ const w = ({ field: e }) => {
|
|
|
20
20
|
),
|
|
21
21
|
readOnly: t,
|
|
22
22
|
disabled: l,
|
|
23
|
-
...i(r,
|
|
23
|
+
...i(r, h(e))
|
|
24
24
|
}
|
|
25
25
|
)
|
|
26
26
|
] });
|