@levo-so/studio 0.1.115 → 0.2.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.
- package/{BillingStep-DjNmSVkY.js → BillingStep-mq3o5Hrf.js} +1 -1
- package/Button-DIDhszPV.js +505 -0
- package/{CollectionField-DrJuHNsg.js → CollectionField-CD6ok1A3.js} +29 -77
- package/{DateTimeWidget-CzBq92zC.js → DateTimeWidget-DHUmirf1.js} +9 -9
- package/{EntryCard-C2KA5HMX.js → EntryCard-DiMic9hv.js} +4 -4
- package/{KBChatWidget-CPrg_etS.js → KBChatWidget-hquzCtvm.js} +388 -360
- package/{LoginCard-S_2jls6v.js → LoginCard-Cs9X8LC8.js} +3 -3
- package/{LoginForm-DeYsk4kd.js → LoginForm-CLUpD3qG.js} +1 -1
- package/{LoginModal-BbDfB4S9.js → LoginModal-D9jhZlJr.js} +4 -4
- package/{MessageCard-x6jPClGi.js → MessageCard-CJltLT2a.js} +2 -2
- package/{MessageFooter-CHuPnL_D.js → MessageFooter-CrhrI-su.js} +2 -2
- package/{ModalManager-DQVNPEuG.js → ModalManager-7Nhr8gTs.js} +1 -1
- package/{PendingApprovalCard-C06B_Tg-.js → PendingApprovalCard-wW8Ko-w8.js} +3 -3
- package/{PhoneWidget-DdX8_-2v.js → PhoneWidget-BQEfbyV4.js} +5 -5
- package/{PopupRenderer-Bncp54gB-DysCmUdR.js → PopupRenderer-Bncp54gB-CQloeJYR.js} +15 -16
- package/{ProfileCard-DGanb4BY.js → ProfileCard-BhnTmQaE.js} +9 -8
- package/RichTextWidget-CStx2PMn.js +748 -0
- package/{RteThemeProvider-LFGzAYi1.js → RteThemeProvider-DxYOzcck.js} +1 -1
- package/Spinner-HCqR1eGW.js +7 -0
- package/{StripePaymentModal-BsYNQ4MB.js → StripePaymentModal-Cw-AlxTS.js} +1 -1
- package/{VerifyButton-6BIXAEGp.js → VerifyButton-kdxRhJWI.js} +1 -1
- package/{bookingCard-CUv7WgqT.js → bookingCard-BSRCH57N.js} +74 -73
- package/cn-BL52QQS4.js +6 -0
- package/{dialog-LRLdr3kq.js → dialog-RrTP-MGm.js} +1 -1
- package/{dist-D-y51gmU.js → dist-D3lGqLBP.js} +1106 -1264
- package/index.d.ts +0 -2
- package/index.js +1969 -1519
- package/kbChat-g2bupQqp.js +163 -0
- package/{nodeAlignment-BC_Uferw.js → nodeAlignment-DS9_DLGB.js} +31 -23
- package/package.json +6 -9
- package/pillChrome-Cx8qlbsn.js +16 -0
- package/studio.css +1 -1
- package/{useLogin-B2HHZxTi.js → useLogin-BhysESLW.js} +1 -1
- package/Button-Uwxgkriw.js +0 -1657
- package/RichTextWidget-BfZ3sCcx.js +0 -113
- package/Toolbar-6IXR9qAh.js +0 -645
- package/collection.d.ts +0 -500
- package/collection.js +0 -30
- package/inlineRteTheme-abXxag3B.js +0 -9
- package/kbChat-DCrdcXir.js +0 -166
- package/pillChrome-CQoJfFk3.js +0 -16
- package/utils-NDllPDUz.js +0 -5
- /package/{AuthProvider-C6bvedwF.js → AuthProvider-CFQqiIf1.js} +0 -0
- /package/{Beams-DboMUgCv.js → Beams-DVEhileN.js} +0 -0
- /package/{CollectionInput-CG-Pu_51.js → CollectionInput-DyNbxIZ8.js} +0 -0
- /package/{Dots-a8xSboDv.js → Dots-vp0H1Md3.js} +0 -0
- /package/{Gradient-NacpoDCM.js → Gradient-_5G8Qm5s.js} +0 -0
- /package/{Grid-BJQvxnks.js → Grid-D694XUrO.js} +0 -0
- /package/{Popover-C_IQMM8H.js → Popover-V2O1gz6N.js} +0 -0
- /package/{Tooltip-DreKXbTO.js → Tooltip-DTnCNEcE.js} +0 -0
- /package/{Waves-DUuT_IFr.js → Waves-DeNoq6Bo.js} +0 -0
- /package/{card-D5fPArfa.js → card-Cb4m0p4i.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as e } from "./Button-lUfKisu8.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as t } from "./nodeAlignment-DS9_DLGB.js";
|
|
3
3
|
import { t as n } from "./theme.cssm-2YTdd8Yh.js";
|
|
4
4
|
import { c as r } from "react/compiler-runtime";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { t as e } from "./cn-BL52QQS4.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Loader2 as n } from "lucide-react";
|
|
4
|
+
//#region src/components/Spinner.tsx
|
|
5
|
+
var r = ({ className: r }) => /* @__PURE__ */ t(n, { className: e("h-8 w-8 animate-spin font-light", r) });
|
|
6
|
+
//#endregion
|
|
7
|
+
export { r as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { i as e, n as t, o as n, t as r } from "./Dialog-IrII0ugb.js";
|
|
3
3
|
import { t as i } from "./Button-lUfKisu8.js";
|
|
4
|
-
import { t as a } from "./CollectionInput-
|
|
4
|
+
import { t as a } from "./CollectionInput-DyNbxIZ8.js";
|
|
5
5
|
import { c as o } from "react/compiler-runtime";
|
|
6
6
|
import { errorToast as s, successToast as c, useLevo as l } from "@levo-so/react";
|
|
7
7
|
import { useEffect as u, useState as d } from "react";
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "./Button-
|
|
3
|
-
import { n as t } from "./AuthProvider-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { t as e } from "./Button-DIDhszPV.js";
|
|
3
|
+
import { n as t } from "./AuthProvider-CFQqiIf1.js";
|
|
4
|
+
import { t as n } from "./cn-BL52QQS4.js";
|
|
5
|
+
import { n as r, t as i } from "./StripePaymentModal-Cw-AlxTS.js";
|
|
6
|
+
import { BillingStep as a } from "./BillingStep-mq3o5Hrf.js";
|
|
7
|
+
import { errorHandler as o, useLevo as s } from "@levo-so/react";
|
|
7
8
|
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
8
9
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
-
import m from "
|
|
10
|
-
import
|
|
11
|
-
import { useRazorpay as
|
|
10
|
+
import { Calendar as m, CheckCircle2 as h, Clock as g, CreditCard as ee, Download as te, Loader2 as ne, Pencil as re, RefreshCw as ie, ShieldCheck as _, Ticket as ae, XCircle as oe } from "lucide-react";
|
|
11
|
+
import v from "dayjs";
|
|
12
|
+
import { useRazorpay as se } from "react-razorpay";
|
|
12
13
|
//#region src/components/bookingCard/BookingCard.tsx
|
|
13
|
-
var
|
|
14
|
-
let [
|
|
14
|
+
var y = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
15
|
+
let [r, i] = u(!1), a = l(null);
|
|
15
16
|
if (c(() => {
|
|
16
|
-
if (!
|
|
17
|
+
if (!r) return;
|
|
17
18
|
let e = (e) => {
|
|
18
|
-
|
|
19
|
+
a.current && !a.current.contains(e.target) && i(!1);
|
|
19
20
|
};
|
|
20
21
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21
|
-
}, [
|
|
22
|
-
className:
|
|
22
|
+
}, [r]), e.length === 0) return /* @__PURE__ */ f("span", {
|
|
23
|
+
className: n("text-gray-900", t),
|
|
23
24
|
children: "-"
|
|
24
25
|
});
|
|
25
26
|
let o = String(e[0] ?? "-"), s = e.length - 1;
|
|
26
27
|
return /* @__PURE__ */ p("div", {
|
|
27
|
-
ref:
|
|
28
|
+
ref: a,
|
|
28
29
|
className: "relative inline-block",
|
|
29
|
-
onMouseEnter: () =>
|
|
30
|
-
onMouseLeave: () =>
|
|
30
|
+
onMouseEnter: () => i(!0),
|
|
31
|
+
onMouseLeave: () => i(!1),
|
|
31
32
|
children: [/* @__PURE__ */ p("button", {
|
|
32
33
|
type: "button",
|
|
33
|
-
onClick: () =>
|
|
34
|
-
className:
|
|
34
|
+
onClick: () => i((e) => !e),
|
|
35
|
+
className: n("cursor-pointer text-right font-medium text-gray-900 underline decoration-gray-300 decoration-dotted underline-offset-2 hover:decoration-gray-500", t),
|
|
35
36
|
children: [o, s > 0 && /* @__PURE__ */ p("span", {
|
|
36
37
|
className: "ml-1 font-normal text-gray-500",
|
|
37
38
|
children: [
|
|
@@ -40,7 +41,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
40
41
|
" more"
|
|
41
42
|
]
|
|
42
43
|
})]
|
|
43
|
-
}),
|
|
44
|
+
}), r && /* @__PURE__ */ f("div", {
|
|
44
45
|
className: "absolute right-0 z-20 mt-1.5 min-w-[200px] max-w-[280px] rounded-md border border-gray-200 bg-white p-2.5 shadow-lg",
|
|
45
46
|
children: /* @__PURE__ */ f("ul", {
|
|
46
47
|
className: "space-y-1.5 text-left",
|
|
@@ -54,15 +55,15 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
54
55
|
})
|
|
55
56
|
})]
|
|
56
57
|
});
|
|
57
|
-
},
|
|
58
|
-
let
|
|
58
|
+
}, b = ({ summary: c, billingDetails: b, onBillingEdit: x, onComplete: S, className: ce }) => {
|
|
59
|
+
let C = s(), { workspace: w } = t(), { Razorpay: le } = se(), { stripePromise: ue, config: T, isOpen: E, openStripeCheckout: de, closeStripeCheckout: D, setOnComplete: fe } = r(), [O, k] = u("summary"), [A, j] = u(null), [pe, M] = u(!1), [me, N] = u(null), [he, ge] = u("razorpay"), P = l(!1), F = l(null), I = l(null), L = (e, t) => {
|
|
59
60
|
let n = t && t.trim() ? t : "INR", r = e / 100;
|
|
60
61
|
return new Intl.NumberFormat("en-IN", {
|
|
61
62
|
style: "currency",
|
|
62
63
|
currency: n,
|
|
63
64
|
minimumFractionDigits: 0
|
|
64
65
|
}).format(r);
|
|
65
|
-
}, R = (e) => e ?
|
|
66
|
+
}, R = (e) => e ? v(e).format("D MMM YYYY") : null, z = (e) => e ? v(e).format("h:mm A") : null, B = (e) => e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (e) => e.toUpperCase()), V = (e) => e == null ? "-" : typeof e == "boolean" ? e ? "Yes" : "No" : Array.isArray(e) ? e.join(", ") : typeof e == "object" ? JSON.stringify(e) : String(e), H = () => {
|
|
66
67
|
try {
|
|
67
68
|
Object.keys(localStorage).forEach((e) => {
|
|
68
69
|
e.startsWith("levo_collection_cart_") && localStorage.removeItem(e);
|
|
@@ -73,18 +74,18 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
73
74
|
}, U = Object.entries(c.form_data || {}).filter(([e, t]) => t != null && t !== ""), W = () => {
|
|
74
75
|
if (!I.current) return;
|
|
75
76
|
let e = I.current;
|
|
76
|
-
|
|
77
|
-
e?.content?.data ? (N(e.content.data),
|
|
77
|
+
C?.fetch?.url(`/v1/payment/booking/${c._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post({ session_id: e })?.json().then((e) => {
|
|
78
|
+
e?.content?.data ? (N(e.content.data), k("confirmed"), H()) : (j("Payment received but confirmation failed. Please contact support."), k("failed")), D(), I.current = null;
|
|
78
79
|
}).catch((e) => {
|
|
79
|
-
console.error("Failed to confirm booking after Stripe payment:", e), o(e), j("Payment received but confirmation failed. Please contact support."),
|
|
80
|
+
console.error("Failed to confirm booking after Stripe payment:", e), o(e), j("Payment received but confirmation failed. Please contact support."), D(), I.current = null, k("failed");
|
|
80
81
|
});
|
|
81
82
|
}, G = async () => {
|
|
82
|
-
|
|
83
|
+
k("processing"), j(null);
|
|
83
84
|
try {
|
|
84
|
-
let e =
|
|
85
|
+
let e = b || c.billing_details, t = e ? { billing_details: e } : {}, n = await C?.fetch?.url(`/v1/payment/booking/${c._id}/pay`)?.options({ headers: { Origin: w?.id || "" } })?.post(t).json();
|
|
85
86
|
if (n?.status && n?.content?.meta?.key) {
|
|
86
87
|
let e = n.content.meta;
|
|
87
|
-
ge(e.provider || "razorpay"), e.provider === "stripe" && e.client_secret ? (I.current = e.session_id || null,
|
|
88
|
+
ge(e.provider || "razorpay"), e.provider === "stripe" && e.client_secret ? (I.current = e.session_id || null, fe(W), await de({
|
|
88
89
|
key: e.key,
|
|
89
90
|
client_secret: e.client_secret,
|
|
90
91
|
amount: e.amount,
|
|
@@ -92,9 +93,9 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
92
93
|
provider: "stripe",
|
|
93
94
|
reference_id: e.reference_id
|
|
94
95
|
})) : _e(e);
|
|
95
|
-
} else j("Unable to initiate payment. Please try again."),
|
|
96
|
+
} else j("Unable to initiate payment. Please try again."), k("failed");
|
|
96
97
|
} catch (e) {
|
|
97
|
-
console.error("Initiate payment error:", e), o(e), j("Unable to initiate payment. Please check your connection and try again."),
|
|
98
|
+
console.error("Initiate payment error:", e), o(e), j("Unable to initiate payment. Please check your connection and try again."), k("failed");
|
|
98
99
|
}
|
|
99
100
|
}, _e = (e) => {
|
|
100
101
|
P.current = !1, F.current = null;
|
|
@@ -103,7 +104,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
103
104
|
amount: e.amount,
|
|
104
105
|
currency: e.currency,
|
|
105
106
|
order_id: e.order_id,
|
|
106
|
-
name:
|
|
107
|
+
name: w?.name ?? "",
|
|
107
108
|
description: X || "Booking Payment",
|
|
108
109
|
handler: (e) => {
|
|
109
110
|
ve({
|
|
@@ -115,25 +116,25 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
115
116
|
theme: { color: "#FC751A" }
|
|
116
117
|
};
|
|
117
118
|
t.modal = { ondismiss: () => {
|
|
118
|
-
P.current ? (j(F.current || "Payment failed. Please try again."),
|
|
119
|
+
P.current ? (j(F.current || "Payment failed. Please try again."), k("failed")) : k("summary");
|
|
119
120
|
} };
|
|
120
|
-
let n = new
|
|
121
|
+
let n = new le(t);
|
|
121
122
|
n.on("payment.failed", () => {
|
|
122
123
|
P.current = !0, F.current = "Payment was declined. Please try a different payment method.";
|
|
123
124
|
}), n.open();
|
|
124
125
|
}, ve = async (e) => {
|
|
125
126
|
try {
|
|
126
|
-
let t = await
|
|
127
|
-
t?.status && t?.content?.data ? (N(t.content.data),
|
|
127
|
+
let t = await C?.fetch?.url(`/v1/payment/booking/${c._id}/confirm`)?.options({ headers: { Origin: w?.id || "" } })?.post(e).json();
|
|
128
|
+
t?.status && t?.content?.data ? (N(t.content.data), k("confirmed"), H()) : (j("Payment received but confirmation failed. Please contact support."), k("failed"));
|
|
128
129
|
} catch (e) {
|
|
129
|
-
console.error("Confirm payment error:", e), o(e), j("Payment received but confirmation failed. Please contact support."),
|
|
130
|
+
console.error("Confirm payment error:", e), o(e), j("Payment received but confirmation failed. Please contact support."), k("failed");
|
|
130
131
|
}
|
|
131
132
|
}, K = !c.total_amount || c.total_amount === 0, q = c.line_items || [], J = q[0], Y = q.length > 1, X = Y ? c.context_label || "Booking" : J?.instance_label || c.context_label || "Booking", Z = J?.cover_image?.location || null, Q = J?.starts_at || null, $ = J?.ends_at || null;
|
|
132
133
|
return /* @__PURE__ */ p(d, { children: [
|
|
133
134
|
/* @__PURE__ */ p("div", {
|
|
134
|
-
className:
|
|
135
|
+
className: n("overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm", ce),
|
|
135
136
|
children: [
|
|
136
|
-
|
|
137
|
+
O === "summary" && /* @__PURE__ */ p("div", {
|
|
137
138
|
className: "flex flex-col",
|
|
138
139
|
children: [Z && /* @__PURE__ */ p("div", {
|
|
139
140
|
className: "relative h-44 w-full overflow-hidden bg-gray-100",
|
|
@@ -159,10 +160,10 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
159
160
|
className: "mx-auto mb-5 flex w-full max-w-lg flex-wrap justify-center gap-4 rounded-lg bg-orange-50 px-4 py-3",
|
|
160
161
|
children: [Q && /* @__PURE__ */ p("div", {
|
|
161
162
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
162
|
-
children: [/* @__PURE__ */ f(
|
|
163
|
+
children: [/* @__PURE__ */ f(m, { className: "size-4 text-orange-500" }), /* @__PURE__ */ f("span", { children: R(Q) })]
|
|
163
164
|
}), Q && /* @__PURE__ */ p("div", {
|
|
164
165
|
className: "flex items-center gap-2 text-gray-700 text-sm",
|
|
165
|
-
children: [/* @__PURE__ */ f(
|
|
166
|
+
children: [/* @__PURE__ */ f(g, { className: "size-4 text-orange-500" }), /* @__PURE__ */ f("span", { children: z(Q) })]
|
|
166
167
|
})]
|
|
167
168
|
}),
|
|
168
169
|
U.length > 0 && /* @__PURE__ */ p("div", {
|
|
@@ -179,7 +180,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
179
180
|
children: [/* @__PURE__ */ f("span", {
|
|
180
181
|
className: "text-gray-500 text-sm",
|
|
181
182
|
children: B(e)
|
|
182
|
-
}), Array.isArray(t) ? /* @__PURE__ */ f(
|
|
183
|
+
}), Array.isArray(t) ? /* @__PURE__ */ f(y, {
|
|
183
184
|
items: t,
|
|
184
185
|
textSizeClass: "text-sm"
|
|
185
186
|
}) : /* @__PURE__ */ f("span", {
|
|
@@ -191,7 +192,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
191
192
|
})]
|
|
192
193
|
}),
|
|
193
194
|
(() => {
|
|
194
|
-
let e =
|
|
195
|
+
let e = b || c.billing_details;
|
|
195
196
|
return e ? /* @__PURE__ */ p("div", {
|
|
196
197
|
className: "mx-auto mb-5 w-full max-w-lg",
|
|
197
198
|
children: [/* @__PURE__ */ p("div", {
|
|
@@ -199,7 +200,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
199
200
|
children: [/* @__PURE__ */ f("h4", {
|
|
200
201
|
className: "text-center font-medium text-gray-500 text-xs uppercase tracking-wider",
|
|
201
202
|
children: "Billing Details"
|
|
202
|
-
}),
|
|
203
|
+
}), x && /* @__PURE__ */ f("button", {
|
|
203
204
|
type: "button",
|
|
204
205
|
onClick: () => M(!0),
|
|
205
206
|
className: "text-orange-500 hover:text-orange-600",
|
|
@@ -314,22 +315,22 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
314
315
|
/* @__PURE__ */ f(e, {
|
|
315
316
|
elementKey: "booking-pay-btn",
|
|
316
317
|
onClick: K ? () => {
|
|
317
|
-
|
|
318
|
+
k("confirmed"), H();
|
|
318
319
|
} : G,
|
|
319
320
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
320
321
|
children: /* @__PURE__ */ f("span", {
|
|
321
322
|
className: "flex items-center justify-center gap-2",
|
|
322
|
-
children: K ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(
|
|
323
|
+
children: K ? /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(h, { className: "size-5" }), /* @__PURE__ */ f("span", { children: "Confirm Booking" })] }) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(ee, { className: "size-5" }), /* @__PURE__ */ p("span", { children: ["Pay ", L(c.total_amount, c.currency)] })] })
|
|
323
324
|
})
|
|
324
325
|
}),
|
|
325
326
|
!K && /* @__PURE__ */ p("div", {
|
|
326
327
|
className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs",
|
|
327
|
-
children: [/* @__PURE__ */ f(
|
|
328
|
+
children: [/* @__PURE__ */ f(_, { className: "size-3.5" }), /* @__PURE__ */ f("span", { children: "Secure payment" })]
|
|
328
329
|
})
|
|
329
330
|
]
|
|
330
331
|
})]
|
|
331
332
|
}),
|
|
332
|
-
|
|
333
|
+
O === "processing" && /* @__PURE__ */ p("div", {
|
|
333
334
|
className: "flex flex-col items-center justify-center px-6 py-16",
|
|
334
335
|
children: [
|
|
335
336
|
/* @__PURE__ */ p("div", {
|
|
@@ -363,7 +364,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
363
364
|
})
|
|
364
365
|
]
|
|
365
366
|
}),
|
|
366
|
-
|
|
367
|
+
O === "failed" && /* @__PURE__ */ p("div", {
|
|
367
368
|
className: "flex flex-col",
|
|
368
369
|
children: [/* @__PURE__ */ f("div", {
|
|
369
370
|
className: "bg-gradient-to-br from-red-50 to-orange-50 px-6 py-6",
|
|
@@ -372,7 +373,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
372
373
|
children: [
|
|
373
374
|
/* @__PURE__ */ f("div", {
|
|
374
375
|
className: "mb-3 flex size-14 items-center justify-center rounded-full bg-red-100",
|
|
375
|
-
children: /* @__PURE__ */ f(
|
|
376
|
+
children: /* @__PURE__ */ f(oe, { className: "size-8 text-red-500" })
|
|
376
377
|
}),
|
|
377
378
|
/* @__PURE__ */ f("h3", {
|
|
378
379
|
className: "mb-1 font-semibold text-gray-900 text-lg",
|
|
@@ -380,7 +381,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
380
381
|
}),
|
|
381
382
|
/* @__PURE__ */ f("p", {
|
|
382
383
|
className: "text-center text-gray-600 text-sm",
|
|
383
|
-
children:
|
|
384
|
+
children: A || "Something went wrong. Please try again."
|
|
384
385
|
})
|
|
385
386
|
]
|
|
386
387
|
})
|
|
@@ -398,10 +399,10 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
398
399
|
className: "mx-auto mb-4 flex w-full max-w-lg flex-wrap justify-center gap-4 rounded-lg bg-gray-50 px-4 py-2.5",
|
|
399
400
|
children: [Q && /* @__PURE__ */ p("div", {
|
|
400
401
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
401
|
-
children: [/* @__PURE__ */ f(
|
|
402
|
+
children: [/* @__PURE__ */ f(m, { className: "size-4 text-gray-400" }), /* @__PURE__ */ f("span", { children: R(Q) })]
|
|
402
403
|
}), Q && /* @__PURE__ */ p("div", {
|
|
403
404
|
className: "flex items-center gap-2 text-gray-600 text-sm",
|
|
404
|
-
children: [/* @__PURE__ */ f(
|
|
405
|
+
children: [/* @__PURE__ */ f(g, { className: "size-4 text-gray-400" }), /* @__PURE__ */ f("span", { children: z(Q) })]
|
|
405
406
|
})]
|
|
406
407
|
}),
|
|
407
408
|
U.length > 0 && /* @__PURE__ */ f("div", {
|
|
@@ -413,7 +414,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
413
414
|
children: [/* @__PURE__ */ f("span", {
|
|
414
415
|
className: "text-gray-500",
|
|
415
416
|
children: B(e)
|
|
416
|
-
}), Array.isArray(t) ? /* @__PURE__ */ f(
|
|
417
|
+
}), Array.isArray(t) ? /* @__PURE__ */ f(y, {
|
|
417
418
|
items: t,
|
|
418
419
|
textSizeClass: "text-sm"
|
|
419
420
|
}) : /* @__PURE__ */ f("span", {
|
|
@@ -451,12 +452,12 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
451
452
|
className: "mx-auto w-full max-w-lg rounded-lg px-4 py-3.5 font-semibold",
|
|
452
453
|
children: /* @__PURE__ */ p("span", {
|
|
453
454
|
className: "flex items-center justify-center gap-2",
|
|
454
|
-
children: [/* @__PURE__ */ f(
|
|
455
|
+
children: [/* @__PURE__ */ f(ie, { className: "size-5" }), /* @__PURE__ */ f("span", { children: "Try Again" })]
|
|
455
456
|
})
|
|
456
457
|
}),
|
|
457
458
|
/* @__PURE__ */ p("div", {
|
|
458
459
|
className: "mx-auto mt-4 flex w-full max-w-lg items-center justify-center gap-1.5 text-gray-400 text-xs",
|
|
459
|
-
children: [/* @__PURE__ */ f(
|
|
460
|
+
children: [/* @__PURE__ */ f(_, { className: "size-3.5" }), /* @__PURE__ */ p("span", { children: ["Secured by ", he === "stripe" ? "Stripe" : "Razorpay"] })]
|
|
460
461
|
}),
|
|
461
462
|
/* @__PURE__ */ f("p", {
|
|
462
463
|
className: "mx-auto mt-3 w-full max-w-lg text-center text-gray-400 text-xs",
|
|
@@ -465,7 +466,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
465
466
|
]
|
|
466
467
|
})]
|
|
467
468
|
}),
|
|
468
|
-
|
|
469
|
+
O === "confirmed" && /* @__PURE__ */ p("div", {
|
|
469
470
|
className: "flex flex-col",
|
|
470
471
|
children: [/* @__PURE__ */ f("div", {
|
|
471
472
|
className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-8",
|
|
@@ -476,7 +477,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
476
477
|
className: "relative mb-4",
|
|
477
478
|
children: [/* @__PURE__ */ f("div", { className: "absolute -inset-2 animate-pulse rounded-full bg-green-200/50" }), /* @__PURE__ */ f("div", {
|
|
478
479
|
className: "relative flex size-16 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
|
|
479
|
-
children: /* @__PURE__ */ f(
|
|
480
|
+
children: /* @__PURE__ */ f(h, { className: "size-9 text-green-600" })
|
|
480
481
|
})]
|
|
481
482
|
}),
|
|
482
483
|
/* @__PURE__ */ f("h3", {
|
|
@@ -504,7 +505,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
504
505
|
className: "mb-4 flex items-start gap-3",
|
|
505
506
|
children: [/* @__PURE__ */ f("div", {
|
|
506
507
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-orange-100",
|
|
507
|
-
children: /* @__PURE__ */ f(
|
|
508
|
+
children: /* @__PURE__ */ f(ae, { className: "size-5 text-orange-600" })
|
|
508
509
|
}), /* @__PURE__ */ f("div", {
|
|
509
510
|
className: "min-w-0 flex-1",
|
|
510
511
|
children: /* @__PURE__ */ f("p", {
|
|
@@ -541,7 +542,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
541
542
|
className: "flex items-center justify-between",
|
|
542
543
|
children: [/* @__PURE__ */ p("div", {
|
|
543
544
|
className: "flex items-center gap-2 text-gray-500 text-sm",
|
|
544
|
-
children: [/* @__PURE__ */ f(
|
|
545
|
+
children: [/* @__PURE__ */ f(m, { className: "size-4" }), /* @__PURE__ */ f("span", { children: "Date & Time" })]
|
|
545
546
|
}), /* @__PURE__ */ p("p", {
|
|
546
547
|
className: "font-medium text-gray-900 text-sm",
|
|
547
548
|
children: [
|
|
@@ -555,7 +556,7 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
555
556
|
children: [/* @__PURE__ */ f("span", {
|
|
556
557
|
className: "text-gray-500 text-sm",
|
|
557
558
|
children: B(e)
|
|
558
|
-
}), Array.isArray(t) ? /* @__PURE__ */ f(
|
|
559
|
+
}), Array.isArray(t) ? /* @__PURE__ */ f(y, {
|
|
559
560
|
items: t,
|
|
560
561
|
textSizeClass: "text-sm"
|
|
561
562
|
}) : /* @__PURE__ */ f("span", {
|
|
@@ -589,11 +590,11 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
589
590
|
})
|
|
590
591
|
]
|
|
591
592
|
}),
|
|
592
|
-
|
|
593
|
+
S && /* @__PURE__ */ f("div", {
|
|
593
594
|
className: "mx-auto mt-5 max-w-lg",
|
|
594
595
|
children: /* @__PURE__ */ f(e, {
|
|
595
596
|
elementKey: "booking-done-btn",
|
|
596
|
-
onClick:
|
|
597
|
+
onClick: S,
|
|
597
598
|
className: "flex w-full items-center justify-center gap-2 rounded-lg bg-gray-900 px-4 py-3.5 font-semibold text-white transition-colors hover:bg-gray-800",
|
|
598
599
|
children: "Done"
|
|
599
600
|
})
|
|
@@ -607,30 +608,30 @@ var b = ({ items: e, textSizeClass: t = "text-sm" }) => {
|
|
|
607
608
|
})
|
|
608
609
|
]
|
|
609
610
|
}),
|
|
610
|
-
pe &&
|
|
611
|
+
pe && x && /* @__PURE__ */ f("div", {
|
|
611
612
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
612
613
|
children: /* @__PURE__ */ f("div", {
|
|
613
614
|
className: "max-h-[90vh] w-full max-w-lg overflow-auto rounded-xl bg-white shadow-xl",
|
|
614
|
-
children: /* @__PURE__ */ f(
|
|
615
|
+
children: /* @__PURE__ */ f(a, {
|
|
615
616
|
isEdit: !0,
|
|
616
|
-
prefillData:
|
|
617
|
+
prefillData: b || c.billing_details,
|
|
617
618
|
onSubmit: (e) => {
|
|
618
|
-
|
|
619
|
+
x(e), M(!1);
|
|
619
620
|
},
|
|
620
621
|
onClose: () => M(!1)
|
|
621
622
|
})
|
|
622
623
|
})
|
|
623
624
|
}),
|
|
624
|
-
|
|
625
|
-
isOpen:
|
|
625
|
+
E && T && /* @__PURE__ */ f(i, {
|
|
626
|
+
isOpen: E,
|
|
626
627
|
onClose: () => {
|
|
627
|
-
|
|
628
|
+
D(), k("summary");
|
|
628
629
|
},
|
|
629
|
-
stripePromise:
|
|
630
|
-
clientSecret:
|
|
630
|
+
stripePromise: ue,
|
|
631
|
+
clientSecret: T.clientSecret,
|
|
631
632
|
onComplete: W
|
|
632
633
|
})
|
|
633
634
|
] });
|
|
634
635
|
};
|
|
635
636
|
//#endregion
|
|
636
|
-
export {
|
|
637
|
+
export { b as BookingCard };
|
package/cn-BL52QQS4.js
ADDED