@levo-so/react 0.1.0 → 0.1.2

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.
Files changed (37) hide show
  1. package/dist/{CheckboxWidget-CD4lv7B4.js → CheckboxWidget-BV2nPDdB.js} +1 -1
  2. package/dist/{CollectionFormBuilder-a0pzMkWL.js → CollectionFormBuilder-uvr15jvu.js} +96 -82
  3. package/dist/{CurrencyWidget-DRMqUgbP.js → CurrencyWidget-VzBWDdzQ.js} +1 -1
  4. package/dist/DateTimeWidget-QmZXdxzS.js +80 -0
  5. package/dist/{DefaultFormVariant-BzHB74Ie.js → DefaultFormVariant-DyyCGXvB.js} +2 -2
  6. package/dist/{DropdownWidget-CW0GSjwE.js → DropdownWidget-CxWQF6r3.js} +1 -1
  7. package/dist/EmailWidget-BxxtgUGU.js +41 -0
  8. package/dist/{GeocoderWidget-Ib15NJcx.js → GeocoderWidget-lh46EUHn.js} +1 -1
  9. package/dist/{MultiGeocoderWidget-BuW8i48_.js → MultiGeocoderWidget-C84ZYxpR.js} +2 -2
  10. package/dist/{PhoneWidget-COo3SBNU.js → PhoneWidget-_-cBcZ_D.js} +9 -8
  11. package/dist/{RadioWidget-C8syq1dO.js → RadioWidget-BJ1qwTRO.js} +1 -1
  12. package/dist/{RichTextWidget-B5qxi5OE.js → RichTextWidget-CC6uShje.js} +14 -13
  13. package/dist/{StepsFormVariant-NSTSIoVV.js → StepsFormVariant-BxANsU4Z.js} +2 -2
  14. package/dist/{SwitchWidget-C-p7lICr.js → SwitchWidget-CbCYweyx.js} +1 -1
  15. package/dist/TextWidget-CfEeuyFV.js +33 -0
  16. package/dist/{TextareaWidget-D0TbFUjX.js → TextareaWidget-Dqt4CVV-.js} +1 -1
  17. package/dist/{ToggleCheckboxWidget-BbVq_dAC.js → ToggleCheckboxWidget-D8CxllEX.js} +1 -1
  18. package/dist/{URLWidget-00u8Svwt.js → URLWidget-C07DCMOd.js} +2 -2
  19. package/dist/{UploadWidget-Dim2TEFc.js → UploadWidget-DoY_CPLy.js} +1 -1
  20. package/dist/collection/components/renderer/RenderCommonField.d.ts.map +1 -1
  21. package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +3 -5
  22. package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +1 -1
  23. package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts +2 -3
  24. package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts.map +1 -1
  25. package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts.map +1 -1
  26. package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts.map +1 -1
  27. package/dist/collection/components/widgets/textWidget/TextWidget.d.ts +2 -3
  28. package/dist/collection/components/widgets/textWidget/TextWidget.d.ts.map +1 -1
  29. package/dist/collection/index.js +1 -1
  30. package/dist/collection/utils/formHelpers.d.ts +2 -2
  31. package/dist/index.js +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/{useLevoForm-CR3q-L5Z.js → useLevoForm-B4Dmf73H.js} +1 -1
  34. package/package.json +20 -14
  35. package/dist/DateTimeWidget-FmBvE_lk.js +0 -103
  36. package/dist/EmailWidget-Nyc76pT8.js +0 -42
  37. package/dist/TextWidget-BtZp3DRk.js +0 -34
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levo-so/react",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "author": "Levo Engineering <devs@theinternetfolks.com>",
5
5
  "description": "Levo suite for React based applications",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "peerDependencies": {
17
17
  "react": "^18.3.1",
18
18
  "react-dom": "^18.3.1",
19
- "@levo-so/core": "0.1.0"
19
+ "@levo-so/core": "0.1.2"
20
20
  },
21
21
  "dependencies": {
22
22
  "@radix-ui/react-checkbox": "^1.1.1",
@@ -29,20 +29,20 @@
29
29
  "@theinternetfolks/mate": "^1.0.4",
30
30
  "@theinternetfolks/snowflake": "^1.3.0",
31
31
  "@tiptap/extension-bold": "^2.5.8",
32
- "@tiptap/extension-bullet-list": "^2.5.8",
33
- "@tiptap/extension-document": "^2.5.8",
32
+ "@tiptap/extension-bullet-list": "^2.6.4",
33
+ "@tiptap/extension-document": "^2.6.4",
34
34
  "@tiptap/extension-hard-break": "^2.5.8",
35
35
  "@tiptap/extension-history": "^2.5.8",
36
36
  "@tiptap/extension-italic": "^2.5.8",
37
- "@tiptap/extension-link": "^2.5.8",
37
+ "@tiptap/extension-link": "^2.6.4",
38
38
  "@tiptap/extension-list-item": "^2.5.8",
39
- "@tiptap/extension-ordered-list": "^2.5.8",
40
- "@tiptap/extension-paragraph": "^2.5.8",
39
+ "@tiptap/extension-ordered-list": "^2.6.4",
40
+ "@tiptap/extension-paragraph": "^2.6.4",
41
41
  "@tiptap/extension-strike": "^2.5.8",
42
42
  "@tiptap/extension-text": "^2.5.8",
43
- "@tiptap/extension-text-align": "^2.5.8",
44
- "@tiptap/extension-underline": "^2.5.8",
45
- "@tiptap/react": "^2.5.8",
43
+ "@tiptap/extension-text-align": "^2.6.4",
44
+ "@tiptap/extension-underline": "^2.6.4",
45
+ "@tiptap/react": "^2.6.4",
46
46
  "class-variance-authority": "^0.7.0",
47
47
  "clsx": "^2.1.1",
48
48
  "google-libphonenumber": "^3.2.38",
@@ -50,9 +50,9 @@
50
50
  "lodash-es": "^4.17.21",
51
51
  "lucide-react": "^0.424.0",
52
52
  "react": "18.3.1",
53
+ "react-datepicker": "^7.3.0",
53
54
  "react-dom": "18.3.1",
54
55
  "react-dropzone": "^14.2.3",
55
- "react-flatpickr": "^3.10.13",
56
56
  "react-google-autocomplete": "^2.7.3",
57
57
  "react-hook-form": "^7.52.2",
58
58
  "react-icons": "^5.2.1",
@@ -71,11 +71,10 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/google-libphonenumber": "^7.4.30",
74
- "@types/lodash-es": "^4.17.12",
75
74
  "@types/google.maps": "^3.58.0",
75
+ "@types/lodash-es": "^4.17.12",
76
76
  "@types/react": "^18.3.3",
77
77
  "@types/react-dom": "^18.3.0",
78
- "@types/react-flatpickr": "^3.8.11",
79
78
  "@types/validator": "^13.12.0",
80
79
  "@types/validatorjs": "^3.15.5",
81
80
  "@vitejs/plugin-react": "^4.3.1",
@@ -85,7 +84,13 @@
85
84
  "typescript": "^5.5.4",
86
85
  "vite": "^5.4.3",
87
86
  "vite-plugin-dts": "^4.1.0",
88
- "@levo/ts-config": "0.0.0"
87
+ "autoprefixer": "^10.4.16",
88
+ "postcss": "^8.4.41",
89
+ "postcss-import": "^16.1.0",
90
+ "tailwindcss": "^3.4.1",
91
+ "tailwindcss-animate": "^1.0.7",
92
+ "@levo/ts-config": "0.0.0",
93
+ "@levo/tw-config": "0.0.0"
89
94
  },
90
95
  "main": "./dist/index.js",
91
96
  "module": "./dist/index.js",
@@ -95,6 +100,7 @@
95
100
  "types": "./dist/index.d.ts",
96
101
  "default": "./dist/index.js"
97
102
  },
103
+ "./index.css": "./dist/style.css",
98
104
  "./components": {
99
105
  "types": "./dist/components/index.d.ts",
100
106
  "default": "./dist/components/index.js"
@@ -1,103 +0,0 @@
1
- import { j as e } from "./jsx-runtime-B6kdoens.js";
2
- import { Calendar as w, X as F } from "lucide-react";
3
- import { useRef as y } from "react";
4
- import k from "react-flatpickr";
5
- import { useController as C } from "react-hook-form";
6
- import { h as N, j as z, k as R } from "./CollectionFormBuilder-a0pzMkWL.js";
7
- import { c as l } from "./cn-C9QoOYNG.js";
8
- const D = ({
9
- field: r,
10
- enableTime: x,
11
- ...b
12
- }) => {
13
- var p;
14
- const { key: h = "", label: a = "", helper_text: v = "", readonly: d = !1 } = r, o = h, {
15
- field: { value: u, onBlur: m, onChange: s, ...g },
16
- fieldState: i
17
- } = C({
18
- name: o,
19
- rules: N(r)
20
- }), j = !!(r != null && r.required), c = (p = i == null ? void 0 : i.error) == null ? void 0 : p.message, n = y(null);
21
- return /* @__PURE__ */ e.jsxs(z, { helperText: v, readOnly: d, error: c, children: [
22
- a && /* @__PURE__ */ e.jsx(R, { htmlFor: o, isRequired: j, children: a }),
23
- /* @__PURE__ */ e.jsxs(
24
- "div",
25
- {
26
- ref: n,
27
- className: "h-9 w-full relative rounded-md [&_.flatpickr-wrapper]:w-full [&_.flatpickr-calendar]:z-50",
28
- children: [
29
- /* @__PURE__ */ e.jsx(
30
- "div",
31
- {
32
- className: l(
33
- "absolute left-0 top-0 bottom-0 w-9 flex items-center justify-center rounded-l-md overflow-hidden pointer-events-none"
34
- ),
35
- children: /* @__PURE__ */ e.jsx(w, { size: "20px", className: "text-muted-foreground" })
36
- }
37
- ),
38
- /* @__PURE__ */ e.jsx(
39
- k,
40
- {
41
- id: o,
42
- className: l(
43
- "flex h-9 w-full relative rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 pl-10 !max-w-none",
44
- c && "border-destructive focus-visible:ring-destructive",
45
- d && "focus-visible:ring-0"
46
- ),
47
- options: x ? {
48
- dateFormat: "F j, Y h:i K",
49
- position: "auto",
50
- enableTime: !0,
51
- allowInput: !0,
52
- static: !1,
53
- positionElement: n.current ?? void 0
54
- } : {
55
- altInput: !0,
56
- altFormat: "F j, Y",
57
- dateFormat: "d-m-Y",
58
- position: "auto",
59
- static: !1,
60
- positionElement: n.current ?? void 0
61
- },
62
- value: u,
63
- onChange: (t) => {
64
- var f;
65
- s && s((f = t[0]) == null ? void 0 : f.toISOString());
66
- },
67
- onBlur: () => {
68
- m && m();
69
- },
70
- autoComplete: "off",
71
- "aria-autocomplete": "none",
72
- autoSave: "off",
73
- ...g,
74
- ...b
75
- }
76
- ),
77
- u && /* @__PURE__ */ e.jsx(
78
- "div",
79
- {
80
- className: l(
81
- "absolute right-0 top-0 bottom-0 w-9 z-10 flex items-center justify-center rounded-l-md overflow-hidden"
82
- ),
83
- children: /* @__PURE__ */ e.jsx(
84
- "button",
85
- {
86
- type: "button",
87
- onClick: (t) => {
88
- t == null || t.preventDefault(), t == null || t.stopPropagation(), s && s(o, null);
89
- },
90
- children: /* @__PURE__ */ e.jsx(F, { size: "20px", className: "text-muted-foreground" })
91
- }
92
- )
93
- }
94
- )
95
- ]
96
- }
97
- )
98
- ] });
99
- };
100
- export {
101
- D as DateTimeWidget,
102
- D as default
103
- };
@@ -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
- };