@levo-so/studio 0.1.94 → 0.1.96
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/{BillingStep-o2yIMjLk.js → BillingStep-C3jJkLXQ.js} +1 -1
- package/{Button-_hpg7Rxx.js → Button-CwN6jTXH.js} +17 -12
- package/CollectionField-DnbpB0Z5.js +254 -0
- package/CollectionInput-BoNAc4sq.js +132 -0
- package/DateTimeWidget-IRleQI-3.js +255 -0
- package/{EntryCard-B-feJvrB.js → EntryCard-CZIUBwtE.js} +3 -3
- package/{LoginCard-CF9JbU-y.js → LoginCard-Bthy9dcf.js} +3 -3
- package/{LoginForm-CdpNCQJa.js → LoginForm-CPMtCyMF.js} +4 -0
- package/{LoginModal-ngTHCyli.js → LoginModal-BPI5tOIZ.js} +3 -3
- package/{MessageCard-D2uja800.js → MessageCard-BYxgc9dl.js} +2 -2
- package/{ModalManager-B7pCzvK1.js → ModalManager-BaIL6HG-.js} +1 -1
- package/{PendingApprovalCard-Dut-Xiw1.js → PendingApprovalCard-DEnawzxD.js} +3 -3
- package/PhoneWidget-CjhHfwuG.js +100 -0
- package/Popover-DHVZdJuv.js +56 -0
- package/RichTextWidget-CgT1_zC3.js +1135 -0
- package/Tooltip-ByJRyayB.js +78 -0
- package/VerifyButton-DFKzKYxC.js +283 -0
- package/{bookingCard-CGV9svhn.js → bookingCard-Bw4tvDYh.js} +3 -3
- package/collection.d.ts +81 -46
- package/collection.js +8 -5
- package/dist-D_jY4Tf1.js +3168 -0
- package/getFieldValidations-qVzuq6mv.js +195 -0
- package/index.d.ts +23 -5
- package/index.js +1634 -1420
- package/nodeAlignment-CG3qmAuQ.js +180 -0
- package/package.json +3 -4
- package/studio.css +1 -1
- package/theme.cssm-De_pl52g.js +4 -0
- package/{utils-KqbqLlMF.js → utils-F6eBcsyI.js} +1 -1
- package/widgets-Dvyv5_uj.js +215 -0
- package/dist-DDKHTnIW.js +0 -3653
- package/widgets-B84lq4lO.js +0 -351
- /package/{Beams-CCNNOvfW.js → Beams-Blr-zwvz.js} +0 -0
- /package/{Dots-89WGkd-z.js → Dots-DeBKuibU.js} +0 -0
- /package/{Gradient-vTa_uWCj.js → Gradient-DGFxOjft.js} +0 -0
- /package/{Grid-CrtztrxK.js → Grid-A7HRCQ0T.js} +0 -0
- /package/{MessageFooter-Bu-jyPkJ.js → MessageFooter-C6DivT4m.js} +0 -0
- /package/{StripePaymentModal-CajqohNM.js → StripePaymentModal-BcePXzmC.js} +0 -0
- /package/{Waves-BhA6CLEI.js → Waves-CIT6Ngng.js} +0 -0
- /package/{card-DCbhJCO9.js → card-izMd2DvE.js} +0 -0
- /package/{dialog-CILIXExr.js → dialog-CCWrvmHd.js} +0 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { n as e, t } from "./getFieldValidations-qVzuq6mv.js";
|
|
2
|
+
import { a as n, i as ee, n as r, r as i, t as a } from "./Popover-DHVZdJuv.js";
|
|
3
|
+
import { t as o } from "./CollectionField-DnbpB0Z5.js";
|
|
4
|
+
import { t as s } from "./CollectionInput-BoNAc4sq.js";
|
|
5
|
+
import { useEffect as te, useRef as c, useState as l } from "react";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
import { FieldInterfaces as f } from "@levo-so/core";
|
|
8
|
+
import p from "dayjs";
|
|
9
|
+
import { c as m } from "react/compiler-runtime";
|
|
10
|
+
import h from "clsx";
|
|
11
|
+
import { IconCalendar as ne, IconChevronDown as g, IconChevronLeft as _, IconChevronRight as v, IconX as re } from "@tabler/icons-react";
|
|
12
|
+
import { DayPicker as ie, getDefaultClassNames as ae } from "react-day-picker";
|
|
13
|
+
import { useController as y } from "react-hook-form";
|
|
14
|
+
//#region ../../libraries/react-collection/dist/widgets/dateTimeWidget/DateTimeWidget.cssm.js
|
|
15
|
+
var oe = "rpx4b10", se = "rpx4b11", ce = "rpx4b12", le = "rpx4b14 _6o7s4x0", ue = "rpx4b15", de = "rpx4b17", fe = "rpx4b18", pe = "rpx4b19", me = "rpx4b1a", he = "rpx4b1b", ge = "rpx4b1c", _e = "rpx4b1d", ve = "rpx4b1e", ye = "rpx4b1f", be = "rpx4b1g", xe = "rpx4b1h", Se = "rpx4b1i", Ce = "rpx4b1j", we = "rpx4b1k", Te = "rpx4b1l", Ee = "rpx4b1m", De = "rpx4b1n", Oe = "rpx4b1o", ke = "rpx4b1p", Ae = "rpx4b1q", je = "rpx4b1r", Me = "rpx4b1s", Ne = "rpx4b1t", Pe = "rpx4b1u", Fe = "rpx4b1v", Ie = (e) => {
|
|
16
|
+
if (e) {
|
|
17
|
+
let t = new Date(e);
|
|
18
|
+
return Number.isNaN(t.getTime()) ? null : t;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}, Le = (e, t) => e ? t ? p(e).format("D MMMM, YYYY — h:mm A") : p(e).format("D MMMM, YYYY") : "", Re = (e) => {
|
|
22
|
+
let t = m(19), { value: n, onChange: ee } = e, [r, i] = l(-1), a = c(null), o;
|
|
23
|
+
t[0] === n ? o = t[1] : (o = () => {
|
|
24
|
+
if (!n) return -1;
|
|
25
|
+
let e = n.getHours(), t = n.getMinutes();
|
|
26
|
+
return e * 4 + Math.floor(t / 15);
|
|
27
|
+
}, t[0] = n, t[1] = o);
|
|
28
|
+
let s = o, f, p;
|
|
29
|
+
t[2] === s ? (f = t[3], p = t[4]) : (f = () => {
|
|
30
|
+
let e = s();
|
|
31
|
+
e >= 0 && a.current && a.current.querySelector(`[data-time-index="${e}"]`)?.scrollIntoView({
|
|
32
|
+
block: "center",
|
|
33
|
+
behavior: "smooth"
|
|
34
|
+
});
|
|
35
|
+
}, p = [s], t[2] = s, t[3] = f, t[4] = p), te(f, p);
|
|
36
|
+
let ne;
|
|
37
|
+
t[5] !== ee || t[6] !== n ? (ne = (e, t) => {
|
|
38
|
+
let r = t * 15, a = n ? new Date(n) : /* @__PURE__ */ new Date();
|
|
39
|
+
a.setHours(e, r, 0, 0), ee(a), i(e * 4 + t);
|
|
40
|
+
}, t[5] = ee, t[6] = n, t[7] = ne) : ne = t[7];
|
|
41
|
+
let g = ne, _;
|
|
42
|
+
t[8] !== r || t[9] !== g ? (_ = (e) => {
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
let t = (e) => {
|
|
45
|
+
let t = a.current?.querySelector(`[data-time-index="${e}"]`);
|
|
46
|
+
t?.scrollIntoView({
|
|
47
|
+
block: "center",
|
|
48
|
+
behavior: "smooth"
|
|
49
|
+
}), t?.focus();
|
|
50
|
+
};
|
|
51
|
+
bb48: switch (e.key) {
|
|
52
|
+
case "ArrowUp": {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
let n = r - 1 < 0 ? 95 : r - 1;
|
|
55
|
+
i(n), t(n);
|
|
56
|
+
break bb48;
|
|
57
|
+
}
|
|
58
|
+
case "ArrowDown": {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
let n = r + 1 >= 96 ? 0 : r + 1;
|
|
61
|
+
i(n), t(n);
|
|
62
|
+
break bb48;
|
|
63
|
+
}
|
|
64
|
+
case "Enter":
|
|
65
|
+
e.preventDefault(), r >= 0 && g(Math.floor(r / 4), r % 4);
|
|
66
|
+
break bb48;
|
|
67
|
+
case "Escape": i(-1);
|
|
68
|
+
}
|
|
69
|
+
}, t[8] = r, t[9] = g, t[10] = _) : _ = t[10];
|
|
70
|
+
let v = _, re = s(), ie;
|
|
71
|
+
t[11] === Symbol.for("react.memo_cache_sentinel") ? (ie = /* @__PURE__ */ u("div", {
|
|
72
|
+
className: Ne,
|
|
73
|
+
children: "Time"
|
|
74
|
+
}), t[11] = ie) : ie = t[11];
|
|
75
|
+
let ae;
|
|
76
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (ae = Array.from({ length: 24 }), t[12] = ae) : ae = t[12];
|
|
77
|
+
let y;
|
|
78
|
+
t[13] !== re || t[14] !== g ? (y = ae.map((e, t) => {
|
|
79
|
+
let n = t === 0 ? 12 : t > 12 ? t - 12 : t, ee = t >= 12 ? "PM" : "AM";
|
|
80
|
+
return Array.from({ length: 4 }).map((e, r) => {
|
|
81
|
+
let i = r * 15, a = t * 4 + r, o = a === re, s = `${n}:${i.toString().padStart(2, "0")} ${ee}`;
|
|
82
|
+
return /* @__PURE__ */ u("button", {
|
|
83
|
+
type: "button",
|
|
84
|
+
role: "option",
|
|
85
|
+
"aria-selected": o,
|
|
86
|
+
"data-time-index": a,
|
|
87
|
+
className: h(Fe, o && "rpx4b1w"),
|
|
88
|
+
onClick: () => g(t, r),
|
|
89
|
+
tabIndex: o ? 0 : -1,
|
|
90
|
+
children: s
|
|
91
|
+
}, a);
|
|
92
|
+
});
|
|
93
|
+
}), t[13] = re, t[14] = g, t[15] = y) : y = t[15];
|
|
94
|
+
let oe;
|
|
95
|
+
return t[16] !== v || t[17] !== y ? (oe = /* @__PURE__ */ d("div", {
|
|
96
|
+
className: Me,
|
|
97
|
+
children: [ie, /* @__PURE__ */ u("div", {
|
|
98
|
+
ref: a,
|
|
99
|
+
className: Pe,
|
|
100
|
+
onKeyDown: v,
|
|
101
|
+
tabIndex: 0,
|
|
102
|
+
role: "listbox",
|
|
103
|
+
"aria-label": "Select time",
|
|
104
|
+
children: y
|
|
105
|
+
})]
|
|
106
|
+
}), t[16] = v, t[17] = y, t[18] = oe) : oe = t[18], oe;
|
|
107
|
+
}, ze = (te) => {
|
|
108
|
+
let c = m(160), { field: p } = te, { key: g, label: _, helper_text: v, readonly: Me } = p, Ne = g === void 0 ? "" : g, Pe = _ === void 0 ? "" : _, Fe = v === void 0 ? "" : v, ze = Me === void 0 ? !1 : Me, b = Ne, [Ve, He] = l(!1), x;
|
|
109
|
+
c[0] === p ? x = c[1] : (x = t(p), c[0] = p, c[1] = x);
|
|
110
|
+
let Ue;
|
|
111
|
+
c[2] !== b || c[3] !== x ? (Ue = {
|
|
112
|
+
name: b,
|
|
113
|
+
rules: x
|
|
114
|
+
}, c[2] = b, c[3] = x, c[4] = Ue) : Ue = c[4];
|
|
115
|
+
let { field: We, fieldState: Ge } = y(Ue), S, C, w, T, E;
|
|
116
|
+
c[5] === We ? (S = c[6], C = c[7], w = c[8], T = c[9], E = c[10]) : ({value: E, onBlur: S, onChange: C, ref: w, ...T} = We, c[5] = We, c[6] = S, c[7] = C, c[8] = w, c[9] = T, c[10] = E);
|
|
117
|
+
let Ke = !!p?.required, qe = Ge?.error?.message, D = p?.field_interface === f.DateTimeWidget, O, Je;
|
|
118
|
+
c[11] !== D || c[12] !== E ? (O = Ie(E), Je = Le(O, D), c[11] = D, c[12] = E, c[13] = O, c[14] = Je) : (O = c[13], Je = c[14]);
|
|
119
|
+
let Ye = Je, k, A, j, Xe, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K, q, Ze, Qe, $e, et, tt, nt, J, Y, rt, X, it, at, ot, st, ct, Z, lt, ut, dt, ft, pt, Q, mt;
|
|
120
|
+
if (c[15] !== Ye || c[16] !== D || c[17] !== qe || c[18] !== Fe || c[19] !== Ve || c[20] !== Ke || c[21] !== Pe || c[22] !== b || c[23] !== S || c[24] !== C || c[25] !== ze || c[26] !== w || c[27] !== T || c[28] !== O || c[29] !== E) {
|
|
121
|
+
let e = ae(), t;
|
|
122
|
+
c[73] !== D || c[74] !== C || c[75] !== O ? (t = (e) => {
|
|
123
|
+
e && (D && O && e.setHours(O.getHours(), O.getMinutes(), 0, 0), C(e.toISOString()), D || He(!1));
|
|
124
|
+
}, c[73] = D, c[74] = C, c[75] = O, c[76] = t) : t = c[76];
|
|
125
|
+
let te = t, l;
|
|
126
|
+
c[77] === C ? l = c[78] : (l = (e) => {
|
|
127
|
+
C(e.toISOString());
|
|
128
|
+
}, c[77] = C, c[78] = l), P = l;
|
|
129
|
+
let d;
|
|
130
|
+
c[79] === C ? d = c[80] : (d = (e) => {
|
|
131
|
+
e.preventDefault(), e.stopPropagation(), C(null);
|
|
132
|
+
}, c[79] = C, c[80] = d);
|
|
133
|
+
let f = d;
|
|
134
|
+
N = o, lt = Fe, ut = ze, dt = qe, ft = b, pt = Ke, Q = Pe, M = r, st = Ve, ct = He;
|
|
135
|
+
let p;
|
|
136
|
+
c[81] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ u(ne, { size: 18 }), c[81] = p) : p = c[81];
|
|
137
|
+
let m;
|
|
138
|
+
c[82] !== f || c[83] !== E ? (m = E ? /* @__PURE__ */ u("button", {
|
|
139
|
+
type: "button",
|
|
140
|
+
onClick: f,
|
|
141
|
+
"aria-label": "Clear date",
|
|
142
|
+
className: ce,
|
|
143
|
+
children: /* @__PURE__ */ u(re, { size: 14 })
|
|
144
|
+
}) : void 0, c[82] = f, c[83] = E, c[84] = m) : m = c[84], c[85] !== Ye || c[86] !== b || c[87] !== S || c[88] !== w || c[89] !== T || c[90] !== m ? (Z = /* @__PURE__ */ u(n.Trigger, { render: /* @__PURE__ */ u("div", {
|
|
145
|
+
className: oe,
|
|
146
|
+
children: /* @__PURE__ */ u(s, {
|
|
147
|
+
id: b,
|
|
148
|
+
ref: w,
|
|
149
|
+
value: Ye,
|
|
150
|
+
readOnly: !0,
|
|
151
|
+
leftIcon: p,
|
|
152
|
+
rightIcon: m,
|
|
153
|
+
className: se,
|
|
154
|
+
autoComplete: "off",
|
|
155
|
+
onBlur: S,
|
|
156
|
+
placeholder: "Select date",
|
|
157
|
+
...T
|
|
158
|
+
})
|
|
159
|
+
}) }), c[85] = Ye, c[86] = b, c[87] = S, c[88] = w, c[89] = T, c[90] = m, c[91] = Z) : Z = c[91], Xe = ee, j = i, at = "start", ot = 4, A = a, it = le;
|
|
160
|
+
let g = D && "rpx4b16";
|
|
161
|
+
c[92] === g ? X = c[93] : (X = h(ue, g), c[92] = g, c[93] = X), k = ie, $e = "single", et = O || void 0, tt = te, nt = "dropdown", c[94] === Symbol.for("react.memo_cache_sentinel") ? (J = new Date((/* @__PURE__ */ new Date()).getFullYear() - 100, 0), c[94] = J) : J = c[94], c[95] === Symbol.for("react.memo_cache_sentinel") ? (Y = new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11), c[95] = Y) : Y = c[95], rt = !0, mt = h(e.root, fe), F = pe, I = me, L = h(e.month_caption, he), R = h(ge, e.dropdowns), z = h(ve, e.dropdown), B = h(_e, e.dropdown_root), V = h(ye, e.caption_label), H = h(be, e.nav), U = h(xe, e.button_previous), W = h(Se, e.button_next), G = h(Ce, e.weekdays), K = h(we, e.weekday), q = h(Te, e.week), Ze = h(Ee, e.day), Qe = h(De, e.day_button), c[15] = Ye, c[16] = D, c[17] = qe, c[18] = Fe, c[19] = Ve, c[20] = Ke, c[21] = Pe, c[22] = b, c[23] = S, c[24] = C, c[25] = ze, c[26] = w, c[27] = T, c[28] = O, c[29] = E, c[30] = k, c[31] = A, c[32] = j, c[33] = Xe, c[34] = M, c[35] = N, c[36] = P, c[37] = F, c[38] = I, c[39] = L, c[40] = R, c[41] = z, c[42] = B, c[43] = V, c[44] = H, c[45] = U, c[46] = W, c[47] = G, c[48] = K, c[49] = q, c[50] = Ze, c[51] = Qe, c[52] = $e, c[53] = et, c[54] = tt, c[55] = nt, c[56] = J, c[57] = Y, c[58] = rt, c[59] = X, c[60] = it, c[61] = at, c[62] = ot, c[63] = st, c[64] = ct, c[65] = Z, c[66] = lt, c[67] = ut, c[68] = dt, c[69] = ft, c[70] = pt, c[71] = Q, c[72] = mt;
|
|
162
|
+
} else k = c[30], A = c[31], j = c[32], Xe = c[33], M = c[34], N = c[35], P = c[36], F = c[37], I = c[38], L = c[39], R = c[40], z = c[41], B = c[42], V = c[43], H = c[44], U = c[45], W = c[46], G = c[47], K = c[48], q = c[49], Ze = c[50], Qe = c[51], $e = c[52], et = c[53], tt = c[54], nt = c[55], J = c[56], Y = c[57], rt = c[58], X = c[59], it = c[60], at = c[61], ot = c[62], st = c[63], ct = c[64], Z = c[65], lt = c[66], ut = c[67], dt = c[68], ft = c[69], pt = c[70], Q = c[71], mt = c[72];
|
|
163
|
+
let ht;
|
|
164
|
+
c[96] !== F || c[97] !== I || c[98] !== L || c[99] !== R || c[100] !== z || c[101] !== B || c[102] !== V || c[103] !== H || c[104] !== U || c[105] !== W || c[106] !== G || c[107] !== K || c[108] !== q || c[109] !== Ze || c[110] !== Qe || c[111] !== mt ? (ht = {
|
|
165
|
+
root: mt,
|
|
166
|
+
months: F,
|
|
167
|
+
month: I,
|
|
168
|
+
month_caption: L,
|
|
169
|
+
dropdowns: R,
|
|
170
|
+
dropdown: z,
|
|
171
|
+
dropdown_root: B,
|
|
172
|
+
caption_label: V,
|
|
173
|
+
nav: H,
|
|
174
|
+
button_previous: U,
|
|
175
|
+
button_next: W,
|
|
176
|
+
weekdays: G,
|
|
177
|
+
weekday: K,
|
|
178
|
+
week: q,
|
|
179
|
+
day: Ze,
|
|
180
|
+
day_button: Qe,
|
|
181
|
+
selected: Oe,
|
|
182
|
+
today: ke,
|
|
183
|
+
outside: Ae,
|
|
184
|
+
disabled: je
|
|
185
|
+
}, c[96] = F, c[97] = I, c[98] = L, c[99] = R, c[100] = z, c[101] = B, c[102] = V, c[103] = H, c[104] = U, c[105] = W, c[106] = G, c[107] = K, c[108] = q, c[109] = Ze, c[110] = Qe, c[111] = mt, c[112] = ht) : ht = c[112];
|
|
186
|
+
let gt;
|
|
187
|
+
c[113] === Symbol.for("react.memo_cache_sentinel") ? (gt = { Chevron: Be }, c[113] = gt) : gt = c[113];
|
|
188
|
+
let _t;
|
|
189
|
+
c[114] !== k || c[115] !== $e || c[116] !== et || c[117] !== tt || c[118] !== nt || c[119] !== J || c[120] !== Y || c[121] !== rt || c[122] !== ht ? (_t = /* @__PURE__ */ u(k, {
|
|
190
|
+
mode: $e,
|
|
191
|
+
selected: et,
|
|
192
|
+
onSelect: tt,
|
|
193
|
+
captionLayout: nt,
|
|
194
|
+
startMonth: J,
|
|
195
|
+
endMonth: Y,
|
|
196
|
+
showOutsideDays: rt,
|
|
197
|
+
classNames: ht,
|
|
198
|
+
components: gt
|
|
199
|
+
}), c[114] = k, c[115] = $e, c[116] = et, c[117] = tt, c[118] = nt, c[119] = J, c[120] = Y, c[121] = rt, c[122] = ht, c[123] = _t) : _t = c[123];
|
|
200
|
+
let vt;
|
|
201
|
+
c[124] !== D || c[125] !== P || c[126] !== O ? (vt = D && /* @__PURE__ */ u(Re, {
|
|
202
|
+
value: O,
|
|
203
|
+
onChange: P
|
|
204
|
+
}), c[124] = D, c[125] = P, c[126] = O, c[127] = vt) : vt = c[127];
|
|
205
|
+
let yt;
|
|
206
|
+
c[128] !== X || c[129] !== _t || c[130] !== vt ? (yt = /* @__PURE__ */ d("div", {
|
|
207
|
+
className: X,
|
|
208
|
+
children: [_t, vt]
|
|
209
|
+
}), c[128] = X, c[129] = _t, c[130] = vt, c[131] = yt) : yt = c[131];
|
|
210
|
+
let bt;
|
|
211
|
+
c[132] === Symbol.for("react.memo_cache_sentinel") ? (bt = /* @__PURE__ */ u("div", {
|
|
212
|
+
className: de,
|
|
213
|
+
children: /* @__PURE__ */ u(e, {
|
|
214
|
+
variant: "ghost",
|
|
215
|
+
size: "sm",
|
|
216
|
+
onClick: () => He(!1),
|
|
217
|
+
children: "Done"
|
|
218
|
+
})
|
|
219
|
+
}), c[132] = bt) : bt = c[132];
|
|
220
|
+
let xt;
|
|
221
|
+
c[133] !== A || c[134] !== it || c[135] !== yt ? (xt = /* @__PURE__ */ d(A, {
|
|
222
|
+
className: it,
|
|
223
|
+
children: [yt, bt]
|
|
224
|
+
}), c[133] = A, c[134] = it, c[135] = yt, c[136] = xt) : xt = c[136];
|
|
225
|
+
let St;
|
|
226
|
+
c[137] !== j || c[138] !== at || c[139] !== ot || c[140] !== xt ? (St = /* @__PURE__ */ u(j, {
|
|
227
|
+
align: at,
|
|
228
|
+
sideOffset: ot,
|
|
229
|
+
children: xt
|
|
230
|
+
}), c[137] = j, c[138] = at, c[139] = ot, c[140] = xt, c[141] = St) : St = c[141];
|
|
231
|
+
let Ct;
|
|
232
|
+
c[142] !== Xe || c[143] !== St ? (Ct = /* @__PURE__ */ u(Xe, { children: St }), c[142] = Xe, c[143] = St, c[144] = Ct) : Ct = c[144];
|
|
233
|
+
let $;
|
|
234
|
+
c[145] !== M || c[146] !== st || c[147] !== ct || c[148] !== Z || c[149] !== Ct ? ($ = /* @__PURE__ */ d(M, {
|
|
235
|
+
open: st,
|
|
236
|
+
onOpenChange: ct,
|
|
237
|
+
children: [Z, Ct]
|
|
238
|
+
}), c[145] = M, c[146] = st, c[147] = ct, c[148] = Z, c[149] = Ct, c[150] = $) : $ = c[150];
|
|
239
|
+
let wt;
|
|
240
|
+
return c[151] !== N || c[152] !== lt || c[153] !== ut || c[154] !== dt || c[155] !== ft || c[156] !== pt || c[157] !== Q || c[158] !== $ ? (wt = /* @__PURE__ */ u(N, {
|
|
241
|
+
helperText: lt,
|
|
242
|
+
readOnly: ut,
|
|
243
|
+
error: dt,
|
|
244
|
+
htmlFor: ft,
|
|
245
|
+
isRequired: pt,
|
|
246
|
+
label: Q,
|
|
247
|
+
children: $
|
|
248
|
+
}), c[151] = N, c[152] = lt, c[153] = ut, c[154] = dt, c[155] = ft, c[156] = pt, c[157] = Q, c[158] = $, c[159] = wt) : wt = c[159], wt;
|
|
249
|
+
};
|
|
250
|
+
function Be(e) {
|
|
251
|
+
let { orientation: t } = e;
|
|
252
|
+
return t === "left" ? /* @__PURE__ */ u(_, { size: 16 }) : t === "right" ? /* @__PURE__ */ u(v, { size: 16 }) : /* @__PURE__ */ u(g, { size: 14 });
|
|
253
|
+
}
|
|
254
|
+
//#endregion
|
|
255
|
+
export { ze as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as e } from "./dist-
|
|
2
|
+
import { r as e } from "./dist-D_jY4Tf1.js";
|
|
3
3
|
import { n as t } from "./AuthProvider-56TywIOB.js";
|
|
4
|
-
import { t as n } from "./card-
|
|
5
|
-
import { t as r } from "./MessageFooter-
|
|
4
|
+
import { t as n } from "./card-izMd2DvE.js";
|
|
5
|
+
import { t as r } from "./MessageFooter-C6DivT4m.js";
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
var o = {
|
|
8
8
|
header: "_header_emo7t_1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./LoginForm-
|
|
3
|
-
import { t } from "./card-
|
|
2
|
+
import { t as e } from "./LoginForm-CPMtCyMF.js";
|
|
3
|
+
import { t } from "./card-izMd2DvE.js";
|
|
4
4
|
import { Suspense as n, lazy as r, useState as i } from "react";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
var s = {
|
|
@@ -8,7 +8,7 @@ var s = {
|
|
|
8
8
|
title: "_title_s7k8g_7",
|
|
9
9
|
subtitle: "_subtitle_s7k8g_14",
|
|
10
10
|
formWrapper: "_formWrapper_s7k8g_20"
|
|
11
|
-
}, c = r(() => import("./PendingApprovalCard-
|
|
11
|
+
}, c = r(() => import("./PendingApprovalCard-DEnawzxD.js")), l = ({ logo: r, siteName: l, page: u }) => {
|
|
12
12
|
let [d, f] = i(!1), [p, m] = i(!1), h = u.access?.find((e) => e.kind === "gating" && e.enabled)?.options;
|
|
13
13
|
return p ? /* @__PURE__ */ a(n, {
|
|
14
14
|
fallback: /* @__PURE__ */ a("div", {}),
|
|
@@ -136,11 +136,13 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
|
|
|
136
136
|
}, I = ({ email: e, setEmail: t, otpSent: n, handleReset: r }) => /* @__PURE__ */ l("div", {
|
|
137
137
|
className: F.container,
|
|
138
138
|
children: [/* @__PURE__ */ c("label", {
|
|
139
|
+
htmlFor: "email",
|
|
139
140
|
className: F.label,
|
|
140
141
|
children: "Email"
|
|
141
142
|
}), /* @__PURE__ */ l("div", {
|
|
142
143
|
className: F.inputWrapper,
|
|
143
144
|
children: [/* @__PURE__ */ c("input", {
|
|
145
|
+
id: "email",
|
|
144
146
|
type: "email",
|
|
145
147
|
value: e,
|
|
146
148
|
onChange: (e) => t(e.target.value),
|
|
@@ -148,6 +150,7 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
|
|
|
148
150
|
placeholder: "Enter your email",
|
|
149
151
|
disabled: n
|
|
150
152
|
}), n && /* @__PURE__ */ c(P, {
|
|
153
|
+
type: "button",
|
|
151
154
|
variant: "outline",
|
|
152
155
|
onClick: () => r(),
|
|
153
156
|
className: F.editButton,
|
|
@@ -343,6 +346,7 @@ var T = _.string().required("Email is required").email("Please enter a valid ema
|
|
|
343
346
|
})
|
|
344
347
|
}),
|
|
345
348
|
/* @__PURE__ */ c("button", {
|
|
349
|
+
type: "button",
|
|
346
350
|
onClick: () => {
|
|
347
351
|
r(() => {
|
|
348
352
|
s(30);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as e } from "./AuthProvider-56TywIOB.js";
|
|
3
|
-
import { n as t } from "./ModalManager-
|
|
4
|
-
import { a as n, n as r, o as i, r as a, t as o } from "./dialog-
|
|
5
|
-
import { t as s } from "./LoginForm-
|
|
3
|
+
import { n as t } from "./ModalManager-BaIL6HG-.js";
|
|
4
|
+
import { a as n, n as r, o as i, r as a, t as o } from "./dialog-CCWrvmHd.js";
|
|
5
|
+
import { t as s } from "./LoginForm-CPMtCyMF.js";
|
|
6
6
|
import { useEffect as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
var d = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./card-
|
|
3
|
-
import { t } from "./MessageFooter-
|
|
2
|
+
import { t as e } from "./card-izMd2DvE.js";
|
|
3
|
+
import { t } from "./MessageFooter-C6DivT4m.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/accessCard/MessageCard.tsx
|
|
6
6
|
var i = ({ logo: i, siteName: a, options: o, message: s }) => /* @__PURE__ */ r(e, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Suspense as e, createContext as t, lazy as n, useCallback as r, useContext as i, useState as a } from "react";
|
|
3
3
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
4
|
//#region src/context/ModalManager.tsx
|
|
5
|
-
var c = n(() => import("./LoginModal-
|
|
5
|
+
var c = n(() => import("./LoginModal-BPI5tOIZ.js")), l = t({
|
|
6
6
|
availableModals: ["login"],
|
|
7
7
|
openModals: { key: null },
|
|
8
8
|
openModal: () => ({}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as e } from "./dist-
|
|
3
|
-
import { t } from "./card-
|
|
4
|
-
import { t as n } from "./MessageFooter-
|
|
2
|
+
import { r as e } from "./dist-D_jY4Tf1.js";
|
|
3
|
+
import { t } from "./card-izMd2DvE.js";
|
|
4
|
+
import { t as n } from "./MessageFooter-C6DivT4m.js";
|
|
5
5
|
import { useState as r } from "react";
|
|
6
6
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
var s = {
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "./getFieldValidations-qVzuq6mv.js";
|
|
3
|
+
import { t } from "./CollectionField-DnbpB0Z5.js";
|
|
4
|
+
import { t as n } from "./VerifyButton-DFKzKYxC.js";
|
|
5
|
+
import { t as r } from "./CollectionInput-BoNAc4sq.js";
|
|
6
|
+
import { useState as i } from "react";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
import { c as s } from "react/compiler-runtime";
|
|
9
|
+
import { IconPencil as c } from "@tabler/icons-react";
|
|
10
|
+
import ee, { isSupportedCountry as te } from "react-phone-number-input";
|
|
11
|
+
import { useController as ne } from "react-hook-form";
|
|
12
|
+
//#region ../../libraries/react-collection/dist/widgets/phoneWidget/PhoneWidget.cssm.js
|
|
13
|
+
var re = "_89f1hw0", l = "_89f1hw1", u = "_89f1hw2", ie = "_89f1hw4", d = (d) => {
|
|
14
|
+
let f = s(51), { field: p, settings: ae } = d, { key: m, label: h, helper_text: g, readonly: _, options: v } = p, y = m === void 0 ? "" : m, b = h === void 0 ? "" : h, x = g === void 0 ? "" : g, S = _ === void 0 ? !1 : _, C = y, w = !!v?.verification && !!ae?.enableVerification, [T, E] = i(null), [D, oe] = i(!1), O;
|
|
15
|
+
f[0] !== D || f[1] !== w || f[2] !== T ? (O = (e) => D ? !0 : w && (!T || T !== e) ? "Phone verification required" : !0, f[0] = D, f[1] = w, f[2] = T, f[3] = O) : O = f[3];
|
|
16
|
+
let k;
|
|
17
|
+
f[4] !== p || f[5] !== O ? (k = e(p, O), f[4] = p, f[5] = O, f[6] = k) : k = f[6];
|
|
18
|
+
let A = k, j;
|
|
19
|
+
f[7] !== C || f[8] !== A ? (j = {
|
|
20
|
+
name: C,
|
|
21
|
+
rules: A
|
|
22
|
+
}, f[7] = C, f[8] = A, f[9] = j) : j = f[9];
|
|
23
|
+
let { field: M, fieldState: se } = ne(j), N, P, F, I;
|
|
24
|
+
f[10] === M ? (N = f[11], P = f[12], F = f[13], I = f[14]) : ({value: I, onBlur: N, onChange: P, ...F} = M, f[10] = M, f[11] = N, f[12] = P, f[13] = F, f[14] = I);
|
|
25
|
+
let { error: ce } = se, L = !!p?.required, R = ce?.message, z = !!T && !!I && T === I, B;
|
|
26
|
+
f[15] === v?.country ? B = f[16] : (B = () => {
|
|
27
|
+
let e = v?.country;
|
|
28
|
+
if (e && typeof e == "string") {
|
|
29
|
+
let t = e?.toUpperCase();
|
|
30
|
+
if (te(t)) return t;
|
|
31
|
+
}
|
|
32
|
+
return "IN";
|
|
33
|
+
}, f[15] = v?.country, f[16] = B);
|
|
34
|
+
let V = B, H;
|
|
35
|
+
f[17] === P ? H = f[18] : (H = (e) => {
|
|
36
|
+
E(e), P(e);
|
|
37
|
+
}, f[17] = P, f[18] = H);
|
|
38
|
+
let U = H, W = I ?? "", G;
|
|
39
|
+
f[19] === V ? G = f[20] : (G = V(), f[19] = V, f[20] = G);
|
|
40
|
+
let K;
|
|
41
|
+
f[21] === P ? K = f[22] : (K = (e) => {
|
|
42
|
+
P?.(e ?? "");
|
|
43
|
+
}, f[21] = P, f[22] = K);
|
|
44
|
+
let q;
|
|
45
|
+
f[23] === N ? q = f[24] : (q = () => {
|
|
46
|
+
N?.();
|
|
47
|
+
}, f[23] = N, f[24] = q);
|
|
48
|
+
let J = S || z, Y;
|
|
49
|
+
f[25] === z ? Y = f[26] : (Y = z ? /* @__PURE__ */ a("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
onClick: () => E(null),
|
|
52
|
+
className: ie,
|
|
53
|
+
title: "Change phone number",
|
|
54
|
+
children: /* @__PURE__ */ a(c, { size: 14 })
|
|
55
|
+
}) : null, f[25] = z, f[26] = Y);
|
|
56
|
+
let X;
|
|
57
|
+
f[27] !== F || f[28] !== W || f[29] !== G || f[30] !== K || f[31] !== q || f[32] !== J || f[33] !== Y ? (X = /* @__PURE__ */ a("div", {
|
|
58
|
+
className: u,
|
|
59
|
+
children: /* @__PURE__ */ a(ee, {
|
|
60
|
+
value: W,
|
|
61
|
+
international: !0,
|
|
62
|
+
inputComponent: r,
|
|
63
|
+
defaultCountry: G,
|
|
64
|
+
onChange: K,
|
|
65
|
+
onBlur: q,
|
|
66
|
+
className: re,
|
|
67
|
+
readOnly: J,
|
|
68
|
+
rightIcon: Y,
|
|
69
|
+
...F
|
|
70
|
+
})
|
|
71
|
+
}), f[27] = F, f[28] = W, f[29] = G, f[30] = K, f[31] = q, f[32] = J, f[33] = Y, f[34] = X) : X = f[34];
|
|
72
|
+
let Z;
|
|
73
|
+
f[35] !== U || f[36] !== z || f[37] !== w || f[38] !== I ? (Z = w && /* @__PURE__ */ a("div", {
|
|
74
|
+
className: "_89f1hw3",
|
|
75
|
+
children: /* @__PURE__ */ a(n, {
|
|
76
|
+
value: I,
|
|
77
|
+
type: "phone",
|
|
78
|
+
isVerified: z,
|
|
79
|
+
onVerifySuccess: U,
|
|
80
|
+
onStateChange: oe
|
|
81
|
+
})
|
|
82
|
+
}), f[35] = U, f[36] = z, f[37] = w, f[38] = I, f[39] = Z) : Z = f[39];
|
|
83
|
+
let Q;
|
|
84
|
+
f[40] !== X || f[41] !== Z ? (Q = /* @__PURE__ */ o("div", {
|
|
85
|
+
className: l,
|
|
86
|
+
children: [X, Z]
|
|
87
|
+
}), f[40] = X, f[41] = Z, f[42] = Q) : Q = f[42];
|
|
88
|
+
let $;
|
|
89
|
+
return f[43] !== R || f[44] !== x || f[45] !== L || f[46] !== b || f[47] !== C || f[48] !== S || f[49] !== Q ? ($ = /* @__PURE__ */ a(t, {
|
|
90
|
+
error: R,
|
|
91
|
+
helperText: x,
|
|
92
|
+
readOnly: S,
|
|
93
|
+
label: b,
|
|
94
|
+
htmlFor: C,
|
|
95
|
+
isRequired: L,
|
|
96
|
+
children: Q
|
|
97
|
+
}), f[43] = R, f[44] = x, f[45] = L, f[46] = b, f[47] = C, f[48] = S, f[49] = Q, f[50] = $) : $ = f[50], $;
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { d as PhoneWidget, d as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { i as e, r as t } from "./getFieldValidations-qVzuq6mv.js";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { c as r } from "react/compiler-runtime";
|
|
4
|
+
import i from "clsx";
|
|
5
|
+
import { Popover as a } from "@base-ui/react/popover";
|
|
6
|
+
//#region ../../libraries/levocn/dist/ui/popover/Popover.cssm.js
|
|
7
|
+
var o = "_1tn9uzj0", s = "_1tn9uzj4", c = (e) => {
|
|
8
|
+
let t = r(4), i;
|
|
9
|
+
t[0] === e ? i = t[1] : ({...i} = e, t[0] = e, t[1] = i);
|
|
10
|
+
let o;
|
|
11
|
+
return t[2] === i ? o = t[3] : (o = /* @__PURE__ */ n(a.Root, { ...i }), t[2] = i, t[3] = o), o;
|
|
12
|
+
}, l = (t) => {
|
|
13
|
+
let i = r(5), o;
|
|
14
|
+
i[0] === t ? o = i[1] : ({...o} = t, i[0] = t, i[1] = o);
|
|
15
|
+
let { portalRef: s } = e(), c;
|
|
16
|
+
return i[2] !== s || i[3] !== o ? (c = /* @__PURE__ */ n(a.Portal, {
|
|
17
|
+
container: s,
|
|
18
|
+
...o
|
|
19
|
+
}), i[2] = s, i[3] = o, i[4] = c) : c = i[4], c;
|
|
20
|
+
}, u = (e) => {
|
|
21
|
+
let t = r(8), o, c;
|
|
22
|
+
t[0] === e ? (o = t[1], c = t[2]) : ({className: o, ...c} = e, t[0] = e, t[1] = o, t[2] = c);
|
|
23
|
+
let l;
|
|
24
|
+
t[3] === o ? l = t[4] : (l = i(s, o), t[3] = o, t[4] = l);
|
|
25
|
+
let u;
|
|
26
|
+
return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */ n(a.Positioner, {
|
|
27
|
+
className: l,
|
|
28
|
+
...c
|
|
29
|
+
}), t[5] = c, t[6] = l, t[7] = u) : u = t[7], u;
|
|
30
|
+
}, d = (e) => {
|
|
31
|
+
let t = r(8), s, c;
|
|
32
|
+
t[0] === e ? (s = t[1], c = t[2]) : ({className: s, ...c} = e, t[0] = e, t[1] = s, t[2] = c);
|
|
33
|
+
let l;
|
|
34
|
+
t[3] === s ? l = t[4] : (l = i(o, s), t[3] = s, t[4] = l);
|
|
35
|
+
let u;
|
|
36
|
+
return t[5] !== c || t[6] !== l ? (u = /* @__PURE__ */ n(a.Popup, {
|
|
37
|
+
"data-slot": "popover-content",
|
|
38
|
+
className: l,
|
|
39
|
+
...c
|
|
40
|
+
}), t[5] = c, t[6] = l, t[7] = u) : u = t[7], u;
|
|
41
|
+
}, f = (e) => {
|
|
42
|
+
let o = r(12), s, c, l, u;
|
|
43
|
+
o[0] === e ? (s = o[1], c = o[2], l = o[3], u = o[4]) : ({className: s, variant: u, size: l, ...c} = e, o[0] = e, o[1] = s, o[2] = c, o[3] = l, o[4] = u);
|
|
44
|
+
let d;
|
|
45
|
+
o[5] !== s || o[6] !== l || o[7] !== u ? (d = i(t({
|
|
46
|
+
variant: u,
|
|
47
|
+
size: l
|
|
48
|
+
}), s), o[5] = s, o[6] = l, o[7] = u, o[8] = d) : d = o[8];
|
|
49
|
+
let f;
|
|
50
|
+
return o[9] !== c || o[10] !== d ? (f = /* @__PURE__ */ n(a.Trigger, {
|
|
51
|
+
className: d,
|
|
52
|
+
...c
|
|
53
|
+
}), o[9] = c, o[10] = d, o[11] = f) : f = o[11], f;
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { a, l as i, c as n, f as o, u as r, d as t };
|