@levo-so/react 0.1.0 → 0.1.1
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-CD4lv7B4.js → CheckboxWidget-ComdVcZ_.js} +1 -1
- package/dist/{CollectionFormBuilder-a0pzMkWL.js → CollectionFormBuilder-jwwjyIpv.js} +69 -65
- package/dist/{CurrencyWidget-DRMqUgbP.js → CurrencyWidget-DVqD_lsY.js} +1 -1
- package/dist/DateTimeWidget-CvgzwY1U.js +80 -0
- package/dist/{DefaultFormVariant-BzHB74Ie.js → DefaultFormVariant-CbRB9O_e.js} +2 -2
- package/dist/{DropdownWidget-CW0GSjwE.js → DropdownWidget-C2YaM9Cf.js} +1 -1
- package/dist/EmailWidget-BBthwF68.js +41 -0
- package/dist/{GeocoderWidget-Ib15NJcx.js → GeocoderWidget-Dht_2vi6.js} +1 -1
- package/dist/{MultiGeocoderWidget-BuW8i48_.js → MultiGeocoderWidget-paCFW0QZ.js} +2 -2
- package/dist/{PhoneWidget-COo3SBNU.js → PhoneWidget-CP2T2JDx.js} +1 -1
- package/dist/{RadioWidget-C8syq1dO.js → RadioWidget-BuFPz7kK.js} +1 -1
- package/dist/{RichTextWidget-B5qxi5OE.js → RichTextWidget-DGFNZ1jl.js} +14 -13
- package/dist/{StepsFormVariant-NSTSIoVV.js → StepsFormVariant-5_c3f2Vk.js} +2 -2
- package/dist/{SwitchWidget-C-p7lICr.js → SwitchWidget-t8iwhxk9.js} +1 -1
- package/dist/TextWidget-D0UBxTxe.js +33 -0
- package/dist/{TextareaWidget-D0TbFUjX.js → TextareaWidget-CG6J_plD.js} +1 -1
- package/dist/{ToggleCheckboxWidget-BbVq_dAC.js → ToggleCheckboxWidget-dl8ks4VX.js} +1 -1
- package/dist/{URLWidget-00u8Svwt.js → URLWidget-CHeUEUXl.js} +2 -2
- package/dist/{UploadWidget-Dim2TEFc.js → UploadWidget-CzYGViqE.js} +1 -1
- package/dist/collection/components/renderer/RenderCommonField.d.ts.map +1 -1
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +3 -5
- package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts +2 -3
- package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts.map +1 -1
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts +2 -3
- package/dist/collection/components/widgets/textWidget/TextWidget.d.ts.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/utils/formHelpers.d.ts +1 -1
- package/dist/collection/utils/formHelpers.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useLevoForm-CR3q-L5Z.js → useLevoForm-BcN8f66y.js} +1 -1
- package/package.json +20 -14
- package/dist/DateTimeWidget-FmBvE_lk.js +0 -103
- package/dist/EmailWidget-Nyc76pT8.js +0 -42
- package/dist/TextWidget-BtZp3DRk.js +0 -34
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import y from "react";
|
|
3
|
-
import { useController as C } from "react-hook-form";
|
|
4
|
-
import { G as F } from "./Spinner-CuUosd-S.js";
|
|
5
|
-
import { h as I, j as R, k as V } from "./CollectionFormBuilder-a0pzMkWL.js";
|
|
6
|
-
import { I as b } from "./Input-2CvZ90f8.js";
|
|
7
|
-
function w(e) {
|
|
8
|
-
return F({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M1.75 3h20.5c.966 0 1.75.784 1.75 1.75v14a1.75 1.75 0 0 1-1.75 1.75H1.75A1.75 1.75 0 0 1 0 18.75v-14C0 3.784.784 3 1.75 3ZM1.5 7.412V18.75c0 .138.112.25.25.25h20.5a.25.25 0 0 0 .25-.25V7.412l-9.52 6.433c-.592.4-1.368.4-1.96 0Zm0-2.662v.852l10.36 7a.25.25 0 0 0 .28 0l10.36-7V4.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z" }, child: [] }] })(e);
|
|
9
|
-
}
|
|
10
|
-
const E = ({ field: e, ...c }) => {
|
|
11
|
-
var l;
|
|
12
|
-
const { key: u = "", label: s = "", helper_text: d = "", readonly: p = !1 } = e, r = u, {
|
|
13
|
-
field: { value: h, onBlur: x, onChange: g, ...f },
|
|
14
|
-
fieldState: a
|
|
15
|
-
} = C({
|
|
16
|
-
name: r,
|
|
17
|
-
rules: I(e)
|
|
18
|
-
}), j = !!(e != null && e.required), v = (l = a == null ? void 0 : a.error) == null ? void 0 : l.message;
|
|
19
|
-
return /* @__PURE__ */ t.jsxs(R, { error: v, helperText: d, children: [
|
|
20
|
-
s && /* @__PURE__ */ t.jsx(V, { htmlFor: r, isRequired: j, children: s }),
|
|
21
|
-
/* @__PURE__ */ t.jsx(
|
|
22
|
-
b,
|
|
23
|
-
{
|
|
24
|
-
id: r,
|
|
25
|
-
type: "email",
|
|
26
|
-
leftIcon: /* @__PURE__ */ t.jsx("div", { className: "w-full h-full flex items-center justify-center bg-muted", children: /* @__PURE__ */ t.jsx(w, { size: "20px", className: "text-muted-foreground" }) }),
|
|
27
|
-
value: h || "",
|
|
28
|
-
onChange: (o) => {
|
|
29
|
-
var n, m, i;
|
|
30
|
-
return g((i = (m = (n = o == null ? void 0 : o.target) == null ? void 0 : n.value) == null ? void 0 : m.trim()) == null ? void 0 : i.toLocaleLowerCase());
|
|
31
|
-
},
|
|
32
|
-
onBlur: x,
|
|
33
|
-
readOnly: p,
|
|
34
|
-
...f,
|
|
35
|
-
...c
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
] });
|
|
39
|
-
}, k = y.memo(E);
|
|
40
|
-
export {
|
|
41
|
-
k as default
|
|
42
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import * as g from "react";
|
|
3
|
-
import { useFormContext as j, get as h } from "react-hook-form";
|
|
4
|
-
import { j as F, k as b, l as f } from "./CollectionFormBuilder-a0pzMkWL.js";
|
|
5
|
-
import { I as y } from "./Input-2CvZ90f8.js";
|
|
6
|
-
import { c as R } from "./cn-C9QoOYNG.js";
|
|
7
|
-
const T = ({
|
|
8
|
-
field: e,
|
|
9
|
-
inputStyles: a,
|
|
10
|
-
...m
|
|
11
|
-
}) => {
|
|
12
|
-
var o;
|
|
13
|
-
const {
|
|
14
|
-
register: n,
|
|
15
|
-
formState: { errors: i, disabled: c }
|
|
16
|
-
} = j(), { key: p = "", label: s = "", helper_text: l = "", readonly: x = !1 } = e, r = p, d = !!(e != null && e.required), u = (o = h(i, r)) == null ? void 0 : o.message;
|
|
17
|
-
return /* @__PURE__ */ t.jsxs(F, { error: u, helperText: l, children: [
|
|
18
|
-
s && /* @__PURE__ */ t.jsx(b, { htmlFor: r, isRequired: d, children: s }),
|
|
19
|
-
/* @__PURE__ */ t.jsx(
|
|
20
|
-
y,
|
|
21
|
-
{
|
|
22
|
-
id: r,
|
|
23
|
-
className: R(a),
|
|
24
|
-
readOnly: x,
|
|
25
|
-
disabled: c,
|
|
26
|
-
...n(r, { ...f(e) }),
|
|
27
|
-
...m
|
|
28
|
-
}
|
|
29
|
-
)
|
|
30
|
-
] });
|
|
31
|
-
}, E = g.memo(T);
|
|
32
|
-
export {
|
|
33
|
-
E as default
|
|
34
|
-
};
|