@levo-so/studio 0.1.102 → 0.1.104

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 (59) hide show
  1. package/{AuthProvider-56TywIOB.js → AuthProvider-C6bvedwF.js} +16 -16
  2. package/{BillingStep-BTRobf00.js → BillingStep-2cKT5Pir.js} +1 -1
  3. package/{Button-DTrN8kki.js → Button-DtPwDEN0.js} +240 -143
  4. package/Button-lUfKisu8.js +116 -0
  5. package/CollectionField-xa-jed3_.js +232 -0
  6. package/{CollectionInput-lHOvWWav.js → CollectionInput-CpNGIXJx.js} +32 -32
  7. package/DateTimeWidget-DPHIhkAi.js +256 -0
  8. package/Dialog-IrII0ugb.js +130 -0
  9. package/{EntryCard-CqZlbw1Z.js → EntryCard-j4uZb2cE.js} +6 -6
  10. package/{LoginCard-DWLnYJJU.js → LoginCard-asvOHIRg.js} +3 -3
  11. package/{LoginForm-CEUbBeE3.js → LoginForm-BdsPVHdO.js} +200 -200
  12. package/{LoginModal-AWNLO49X.js → LoginModal-CyvbEK26.js} +4 -4
  13. package/{MessageCard-C5ULcfuw.js → MessageCard-lrXKEsBP.js} +2 -2
  14. package/{MessageFooter-CATwNJJU.js → MessageFooter-D-dCrzJH.js} +2 -2
  15. package/{ModalManager-DQXhkmyC.js → ModalManager-BcPk4sbK.js} +1 -1
  16. package/{PendingApprovalCard-BowwZMBu.js → PendingApprovalCard-hYkupl9A.js} +3 -3
  17. package/PhoneWidget-BOFhs8Ra.js +100 -0
  18. package/{Popover-Du4iigVw.js → Popover-O1poOHk2.js} +19 -20
  19. package/PopupRenderer-C7OHYphU-IWM6d7gW.js +2668 -0
  20. package/{RichTextWidget-iYdVRBGB.js → RichTextWidget-18XLL8wW.js} +27 -25
  21. package/RteThemeProvider-Cfepkyer.js +20 -0
  22. package/{StripePaymentModal-DC-ySB_o.js → StripePaymentModal-DrLMN18M.js} +17 -17
  23. package/Toolbar-Y6JtgPFn.js +645 -0
  24. package/Tooltip-NEMQqPyr.js +67 -0
  25. package/VerifyButton-TNkt-SDu.js +177 -0
  26. package/bookingCard-BdV2YSkq.js +636 -0
  27. package/collection.js +8 -8
  28. package/{dialog-CCWrvmHd.js → dialog-C8-iHixJ.js} +32 -32
  29. package/dist-CsX9NP5P.js +3188 -0
  30. package/generateRadiusScale-BpcgkGtN.js +71 -0
  31. package/getFieldValidations-CSkSV2hW.js +90 -0
  32. package/index.d.ts +53 -2
  33. package/index.js +5867 -7655
  34. package/inlineRteTheme-Ajq9PNpQ.js +9 -0
  35. package/{nodeAlignment-DoVbjk29.js → nodeAlignment-DKCIjzlR.js} +3 -3
  36. package/package.json +60 -76
  37. package/rolldown-runtime-CAFD8bLK.js +11 -0
  38. package/studio.css +1 -1
  39. package/{useLogin-D2VCOHYI.js → useLogin-B2qE8710.js} +23 -23
  40. package/{utils-Bh9uGjo1.js → utils-CZLafTgN.js} +1 -1
  41. package/{widgets-CG5Z_dk7.js → widgets-eu5zXTf-.js} +38 -105
  42. package/CollectionField-7uXvhxYK.js +0 -274
  43. package/DateTimeWidget-BHCP5osb.js +0 -255
  44. package/PhoneWidget-C6uZmrk8.js +0 -100
  45. package/Toolbar-BHi_B-nE.js +0 -737
  46. package/Tooltip-K_gFzjOa.js +0 -68
  47. package/VerifyButton-D21AOIX3.js +0 -273
  48. package/bookingCard--NlgtcJs.js +0 -577
  49. package/dist-x5VFEnQl.js +0 -3185
  50. package/getFieldValidations-DZnDgNI0.js +0 -159
  51. package/inlineRteTheme-Cn_Vqgsm.js +0 -23
  52. /package/{Beams-DkcjMVZl.js → Beams-DEybrmUZ.js} +0 -0
  53. /package/{Dots-BrEPvoj3.js → Dots-CMyy77GM.js} +0 -0
  54. /package/{Gradient-B4Er9hym.js → Gradient-DBn_zXzI.js} +0 -0
  55. /package/{Grid-B4XWU9eL.js → Grid-kGCr-6by.js} +0 -0
  56. /package/{Waves-kW-EBDdJ.js → Waves-DjLcbiBu.js} +0 -0
  57. /package/{authentication-fXmNYss1.js → authentication-hnV1BI8s.js} +0 -0
  58. /package/{card-BwNr7kQS.js → card-5ooLmYSr.js} +0 -0
  59. /package/{theme.cssm-2YTdd8Yh.js → theme.cssm-BXDp-ojp.js} +0 -0
@@ -1,159 +0,0 @@
1
- import { createContext as e, useContext as t, useEffect as n, useMemo as r, useRef as i } from "react";
2
- import { jsx as a } from "react/jsx-runtime";
3
- import { FieldInterfaces as o } from "@levo-so/core";
4
- import { c as s } from "react/compiler-runtime";
5
- import c from "clsx";
6
- import { isValidPhoneNumber as l } from "react-phone-number-input";
7
- import * as u from "yup";
8
- //#region ../../libraries/levocn/dist/styles/reset.cssm.js
9
- var d = "_1er5g5a0", f = /* @__PURE__ */ new Set(), p = {}, m = e(null), h = () => {
10
- let e = s(1), n = t(m);
11
- if (!n) {
12
- let t;
13
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
14
- portalRef: { current: null },
15
- classes: f,
16
- overrides: p
17
- }, e[0] = t) : t = e[0], t;
18
- }
19
- return n;
20
- }, g = ({ children: e, cssReset: o, className: s, style: l, portalToThemeRoot: u, ...h }) => {
21
- let g = t(m), _ = i(null), v = !g && o !== !1 ? d : "", y = g?.classes ?? f, b = g?.overrides ?? p, x = r(() => {
22
- let e = s ? s.split(/\s+/).filter(Boolean) : [], t = new Set(y);
23
- for (let n of e) t.add(n);
24
- return {
25
- portalRef: _,
26
- classes: t,
27
- overrides: {
28
- ...b,
29
- ...l
30
- }
31
- };
32
- }, [
33
- y,
34
- s,
35
- b,
36
- l
37
- ]);
38
- n(() => {
39
- if (u) return;
40
- let e = document.createElement("div");
41
- return document.body.appendChild(e), _.current = e, () => {
42
- document.body.removeChild(e), _.current = null;
43
- };
44
- }, [u]), n(() => {
45
- if (u) return;
46
- let e = _.current;
47
- if (!e) return;
48
- e.className = c(v, ...x.classes), e.style.cssText = "";
49
- let t = {
50
- display: "contents",
51
- ...x.overrides
52
- };
53
- for (let [n, r] of Object.entries(t)) r != null && e.style.setProperty(n, String(r));
54
- }, [
55
- x.classes,
56
- x.overrides,
57
- v,
58
- u
59
- ]);
60
- let S = c(v, ...s ? s.split(/\s+/).filter((e) => e && !y.has(e)) : []);
61
- return /* @__PURE__ */ a(m.Provider, {
62
- value: x,
63
- children: /* @__PURE__ */ a("div", {
64
- ...u ? { ref: _ } : {},
65
- ...S ? { className: S } : {},
66
- style: {
67
- display: "contents",
68
- ...l
69
- },
70
- ...h,
71
- children: e
72
- })
73
- });
74
- }, _ = (e, t) => {
75
- let n = (e?.label || e?.key || "")?.replace(/_/g, " ");
76
- if (n?.endsWith("Id") && (n = n?.replace("Id", "")), n.includes(".")) {
77
- let [e] = n.split(".");
78
- e && (n = e);
79
- }
80
- let r = (t) => {
81
- let r = t;
82
- return e.max !== void 0 && e.max !== null && e.max !== "" && (r = r.max(Number(e.max), `The ${n} value is too large (max ${e.max})`)), e.min !== void 0 && e.min !== null && e.min !== "" && (r = r.min(Number(e.min), `The ${n} value is too small (min ${e.min})`)), r;
83
- }, i;
84
- switch (e.field_interface) {
85
- case o.NumberWidget:
86
- i = r(u.number());
87
- break;
88
- case o.ArrayWidget:
89
- i = r(u.array().typeError("The field must be an array"));
90
- break;
91
- case o.RecordWidget:
92
- i = u.object();
93
- break;
94
- case o.EmailWidget:
95
- i = r(u.string().email("The email address is not valid"));
96
- break;
97
- case o.PhoneWidget:
98
- i = r(u.string().test("phone", "The phone number has incorrect format", (e) => {
99
- if (e) try {
100
- return l(e);
101
- } catch {
102
- return !1;
103
- }
104
- return !0;
105
- }));
106
- break;
107
- case o.URLWidget:
108
- i = r(u.string().matches(/^(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+(?:\.[a-zA-Z]{2,})+(?:\/[^\s?#]*)?(?:\?[^\s]*)?$/, "The URL is not valid"));
109
- break;
110
- case o.ImageUploadWidget:
111
- case o.FileUploadWidget:
112
- case o.GeocoderWidget:
113
- i = u.object();
114
- break;
115
- case o.MultiImageUploadWidget:
116
- case o.MultiFileUploadWidget:
117
- case o.MultiGeocoderWidget:
118
- i = u.array().of(u.object());
119
- break;
120
- case o.JSONWidget:
121
- case o.DropdownWidget:
122
- i = u.string();
123
- break;
124
- case o.MultiTextWidget:
125
- case o.MultiDropdownWidget:
126
- case o.CheckboxWidget:
127
- i = u.array().of(u.string());
128
- break;
129
- case o.ToggleCheckboxWidget:
130
- i = u.boolean();
131
- break;
132
- case o.CollectionWidget:
133
- i = e.options.current_have_many_connected ? u.array() : u.object();
134
- break;
135
- default:
136
- i = r(u.string());
137
- break;
138
- }
139
- if (e.options?.validationsPresets && Array.isArray(e.options.validationsPresets)) {
140
- let t = e.options.validationsPresets;
141
- (e.field_interface === o.TextWidget || e.field_interface === o.TextareaWidget) && (t.includes("exclude_special_chars") && (i = i.matches(/^[a-zA-Z0-9\s]*$/, "Special characters are not allowed")), t.includes("exclude_numbers") && (i = i.matches(/^[^0-9]*$/, "Numbers are not allowed")));
142
- }
143
- return {
144
- required: {
145
- value: !!e?.required,
146
- message: `The ${n} field is required`
147
- },
148
- validate: (n) => {
149
- if (e?.options?.disableValidation || n === "" || n == null) return !0;
150
- try {
151
- return i.validateSync(n), t ? t(n) : !0;
152
- } catch (e) {
153
- return e instanceof u.ValidationError ? e.message : !0;
154
- }
155
- }
156
- };
157
- };
158
- //#endregion
159
- export { h as n, g as r, _ as t };
@@ -1,23 +0,0 @@
1
- import { r as e } from "./getFieldValidations-DZnDgNI0.js";
2
- import { n as t, t as n } from "./theme.cssm-2YTdd8Yh.js";
3
- import { jsx as r } from "react/jsx-runtime";
4
- import { c as i } from "react/compiler-runtime";
5
- import a from "clsx";
6
- //#region ../../libraries/rich-text/dist/styles/content.cssm.js
7
- var o = "_1b7up5r0", s = "jfprpn0", c = {
8
- baseSpacing: "var(--oox3jg0)",
9
- highlight: "var(--oox3jg1)",
10
- highlightForeground: "var(--oox3jg2)"
11
- }, l = (t) => {
12
- let o = i(7), { children: c, theme: l } = t, u = l?.className, d;
13
- o[0] === u ? d = o[1] : (d = a(n, s, u), o[0] = u, o[1] = d);
14
- let f = l?.style, p = l?.portalToThemeRoot, m;
15
- return o[2] !== c || o[3] !== d || o[4] !== f || o[5] !== p ? (m = /* @__PURE__ */ r(e, {
16
- className: d,
17
- style: f,
18
- portalToThemeRoot: p,
19
- children: c
20
- }), o[2] = c, o[3] = d, o[4] = f, o[5] = p, o[6] = m) : m = o[6], m;
21
- }, u = t(c);
22
- //#endregion
23
- export { l as n, o as r, u as t };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes