@loczer/storefront-sdk 0.198.0 → 0.200.0
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/StorefrontContext.d.ts +483 -0
- package/dist/StorefrontContext.d.ts.map +1 -0
- package/dist/StorefrontContext.js +39 -0
- package/dist/StorefrontProvider.d.ts +6 -486
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/StorefrontProvider.js +34 -67
- package/dist/components/AboutSection/index.js +5 -5
- package/dist/components/BikeProductCard/index.d.ts.map +1 -1
- package/dist/components/BikeProductCard/index.js +27 -27
- package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.js +54 -61
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +129 -116
- package/dist/components/ContactSection/index.js +107 -107
- package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/Invoice.js +117 -111
- package/dist/components/Header/index.js +4 -4
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +47 -40
- package/dist/components/ProductPriceBadge/index.d.ts +2 -1
- package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.js +72 -70
- package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +3 -6
- package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -1
- package/dist/components/StorefrontInsuranceNotice/index.js +3 -6
- package/dist/components/TestimonialsSection/index.js +1 -1
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +1 -0
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +1 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.js +59 -58
- package/dist/lib/cartSummary.js +7 -7
- package/dist/lib/productVariants.d.ts +1 -0
- package/dist/lib/productVariants.d.ts.map +1 -1
- package/dist/lib/productVariants.js +27 -15
- package/dist/lib/products.d.ts +6 -0
- package/dist/lib/products.d.ts.map +1 -1
- package/dist/lib/products.js +36 -32
- package/dist/lib/toast.d.ts +9 -0
- package/dist/lib/toast.d.ts.map +1 -0
- package/dist/lib/toast.js +13 -0
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/BookingPage.js +143 -138
- package/dist/pages/CheckoutPage.js +217 -217
- package/dist/pages/CheckoutPaymentPage.js +124 -124
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +83 -83
- package/dist/pages/HomePage.js +6 -3
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +177 -165
- package/package.json +2 -1
|
@@ -1,102 +1,104 @@
|
|
|
1
1
|
import { buildDailyPriceRows as e, buildPriceTierLabels as t, formatStorefrontPriceMinor as n } from "../../lib/pricing.js";
|
|
2
2
|
import { Badge as r, badgeVariants as i } from "../../ui/badge.js";
|
|
3
|
-
import { useOptionalStorefront as a } from "../../
|
|
3
|
+
import { useOptionalStorefront as a } from "../../StorefrontContext.js";
|
|
4
4
|
import { useEffect as o, useId as ee, useRef as s, useState as c } from "react";
|
|
5
5
|
import { Fragment as te, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
6
|
import { useMediaQuery as d } from "@rpcbase/client";
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import { cn as
|
|
9
|
-
import { Info as
|
|
7
|
+
import { useTranslation as ne } from "react-i18next";
|
|
8
|
+
import { cn as f } from "@rpcbase/ui";
|
|
9
|
+
import { Info as re, Mail as p, Phone as m, TrendingDown as h } from "lucide-react";
|
|
10
10
|
import { Drawer as g } from "@base-ui/react/drawer";
|
|
11
11
|
import { Popover as _ } from "@base-ui/react/popover";
|
|
12
12
|
//#region src/components/ProductPriceBadge/index.tsx
|
|
13
13
|
var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-popover-open", y = (e) => typeof Node < "u" && e instanceof Node, b = (e) => {
|
|
14
14
|
typeof window > "u" || window.dispatchEvent(new CustomEvent(v, { detail: { id: e } }));
|
|
15
|
-
}, x = ({ prices: x, minPriceMinor: S, className: C }) => {
|
|
16
|
-
let { t:
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
}, W = () => {
|
|
21
|
-
H(), A(null);
|
|
15
|
+
}, x = ({ prices: x, minPriceMinor: S, className: C, openOnHover: w = !0 }) => {
|
|
16
|
+
let { t: T, i18n: E } = ne(), D = ee(), O = a(), oe = d(ae), se = d("(hover: none), (pointer: coarse)"), k = !!(oe || se), [A, j] = c(null), [M, N] = c(!1), P = s(null), F = s(null), I = s(null), L = s(null), R = A !== null, z = t(x, E.language, T), B = e(x, E.language), V = z[0], H = z[1], U = () => {
|
|
17
|
+
P.current &&= (clearTimeout(P.current), null);
|
|
18
|
+
}, W = (e) => {
|
|
19
|
+
k || (U(), j((t) => t === "click" ? t : e), b(D));
|
|
22
20
|
}, G = () => {
|
|
23
|
-
|
|
21
|
+
U(), j(null);
|
|
24
22
|
}, ce = () => {
|
|
25
|
-
|
|
23
|
+
U(), N(!0), b(D);
|
|
26
24
|
}, le = () => {
|
|
27
|
-
|
|
28
|
-
}, ue = (
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
N(!1);
|
|
26
|
+
}, ue = () => {
|
|
27
|
+
!w || R || W("hover");
|
|
28
|
+
}, de = (e) => y(e) ? !!(F.current?.contains(e) || L.current?.contains(e)) : !1, K = (e) => y(e) ? !!(I.current?.contains(e) || L.current?.contains(e)) : !1, q = (e) => {
|
|
29
|
+
A !== "hover" || K(e) || (U(), P.current = setTimeout(() => {
|
|
30
|
+
j((e) => e === "hover" ? null : e), P.current = null;
|
|
31
31
|
}, ie));
|
|
32
32
|
}, J = (e) => {
|
|
33
33
|
q(e?.relatedTarget);
|
|
34
|
-
},
|
|
34
|
+
}, fe = (e) => {
|
|
35
35
|
let t = e.relatedTarget ?? document.activeElement;
|
|
36
|
-
|
|
36
|
+
de(t) || G();
|
|
37
37
|
};
|
|
38
38
|
if (o(() => {
|
|
39
39
|
if (typeof window > "u") return () => {
|
|
40
|
-
|
|
40
|
+
U();
|
|
41
41
|
};
|
|
42
42
|
let e = (e) => {
|
|
43
|
-
e.detail?.id !==
|
|
43
|
+
e.detail?.id !== D && (U(), j(null), N(!1));
|
|
44
44
|
};
|
|
45
45
|
return window.addEventListener(v, e), () => {
|
|
46
|
-
window.removeEventListener(v, e),
|
|
46
|
+
window.removeEventListener(v, e), U();
|
|
47
47
|
};
|
|
48
|
-
}, [
|
|
49
|
-
if (
|
|
48
|
+
}, [D]), o(() => {
|
|
49
|
+
if (A !== "hover" || typeof window > "u") return;
|
|
50
50
|
let e = (e) => {
|
|
51
51
|
if (K(e.target)) {
|
|
52
|
-
|
|
52
|
+
U();
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
P.current || q(e.target);
|
|
56
56
|
};
|
|
57
57
|
return window.addEventListener("pointermove", e, { passive: !0 }), window.addEventListener("mousemove", e, { passive: !0 }), () => {
|
|
58
58
|
window.removeEventListener("pointermove", e), window.removeEventListener("mousemove", e);
|
|
59
59
|
};
|
|
60
|
-
}, [
|
|
61
|
-
if (
|
|
62
|
-
|
|
60
|
+
}, [A]), o(() => {
|
|
61
|
+
if (k) {
|
|
62
|
+
U(), j(null);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
}, [
|
|
65
|
+
N(!1);
|
|
66
|
+
}, [k]), !V) return typeof S == "number" ? /* @__PURE__ */ l(r, {
|
|
67
67
|
variant: "outline",
|
|
68
|
-
className:
|
|
69
|
-
children: /* @__PURE__ */ l("span", { children:
|
|
68
|
+
className: f("border-slate-200 bg-white text-slate-700", C),
|
|
69
|
+
children: /* @__PURE__ */ l("span", { children: T("price_from", { price: n(S, E.language) }) })
|
|
70
70
|
}) : null;
|
|
71
|
-
let Y =
|
|
71
|
+
let Y = f(i({ variant: "outline" }), "gap-1.5 border-slate-200 bg-white text-slate-700 outline-none transition hover:border-slate-300 hover:text-slate-950 focus:border-slate-200 focus:outline-none focus:ring-0 focus:ring-transparent focus:ring-offset-0 focus-visible:border-slate-200 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-transparent focus-visible:ring-offset-0", B.length > 0 && "cursor-pointer", C), X = O?.storefrontConfiguration.shop.emailAddress?.trim(), Z = O?.storefrontConfiguration.shop.contactPhone1?.trim(), pe = !!(X || Z), Q = () => /* @__PURE__ */ u(te, { children: [
|
|
72
72
|
/* @__PURE__ */ l("span", {
|
|
73
73
|
className: "font-semibold",
|
|
74
|
-
children:
|
|
74
|
+
children: V
|
|
75
75
|
}),
|
|
76
|
-
|
|
76
|
+
H ? /* @__PURE__ */ u("span", {
|
|
77
77
|
className: "inline-flex items-center gap-1 text-slate-500",
|
|
78
78
|
children: [/* @__PURE__ */ l(h, {
|
|
79
79
|
className: "h-3 w-3",
|
|
80
80
|
strokeWidth: 2.4,
|
|
81
81
|
"aria-hidden": "true"
|
|
82
|
-
}), /* @__PURE__ */ l("span", { children:
|
|
82
|
+
}), /* @__PURE__ */ l("span", { children: T("price_then", { price: H }) })]
|
|
83
83
|
}) : null,
|
|
84
|
-
|
|
85
|
-
ref:
|
|
84
|
+
B.length > 0 ? /* @__PURE__ */ l("span", {
|
|
85
|
+
ref: I,
|
|
86
86
|
className: "inline-flex shrink-0 items-center text-slate-500",
|
|
87
|
-
onMouseEnter: () =>
|
|
88
|
-
|
|
87
|
+
onMouseEnter: () => {
|
|
88
|
+
w && W("hover");
|
|
89
|
+
},
|
|
90
|
+
onMouseMove: ue,
|
|
89
91
|
onMouseLeave: J,
|
|
90
|
-
children: /* @__PURE__ */ l(
|
|
92
|
+
children: /* @__PURE__ */ l(re, {
|
|
91
93
|
className: "h-3 w-3",
|
|
92
94
|
"aria-hidden": "true"
|
|
93
95
|
})
|
|
94
96
|
}) : null
|
|
95
|
-
] }),
|
|
97
|
+
] }), me = () => pe ? /* @__PURE__ */ u("div", {
|
|
96
98
|
className: "border-t border-slate-200 pt-2 text-slate-600",
|
|
97
99
|
children: [/* @__PURE__ */ l("p", {
|
|
98
100
|
className: "leading-snug",
|
|
99
|
-
children: /* @__PURE__ */ l("span", { children:
|
|
101
|
+
children: /* @__PURE__ */ l("span", { children: T("price_table_contact_prompt") })
|
|
100
102
|
}), /* @__PURE__ */ u("div", {
|
|
101
103
|
className: "mt-2 flex flex-wrap gap-x-3 gap-y-1",
|
|
102
104
|
children: [Z ? /* @__PURE__ */ u("a", {
|
|
@@ -112,7 +114,7 @@ var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-po
|
|
|
112
114
|
}) : null, X ? /* @__PURE__ */ u("a", {
|
|
113
115
|
className: "inline-flex min-w-0 items-center gap-1 font-medium text-slate-800 underline-offset-4 hover:underline",
|
|
114
116
|
href: `mailto:${X}`,
|
|
115
|
-
children: [/* @__PURE__ */ l(
|
|
117
|
+
children: [/* @__PURE__ */ l(p, {
|
|
116
118
|
className: "h-3 w-3 shrink-0",
|
|
117
119
|
"aria-hidden": "true"
|
|
118
120
|
}), /* @__PURE__ */ l("span", {
|
|
@@ -122,16 +124,16 @@ var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-po
|
|
|
122
124
|
}) : null]
|
|
123
125
|
})]
|
|
124
126
|
}) : null, $ = (e, t) => /* @__PURE__ */ u("div", {
|
|
125
|
-
className:
|
|
127
|
+
className: f("grid gap-2", t === "popover" ? "text-xs" : "text-base"),
|
|
126
128
|
children: [
|
|
127
129
|
e ? /* @__PURE__ */ l("p", {
|
|
128
130
|
className: "font-semibold uppercase tracking-[0.12em] text-slate-500",
|
|
129
|
-
children: /* @__PURE__ */ l("span", { children:
|
|
131
|
+
children: /* @__PURE__ */ l("span", { children: T("price_table_title") })
|
|
130
132
|
}) : null,
|
|
131
133
|
/* @__PURE__ */ l("ul", {
|
|
132
|
-
className:
|
|
133
|
-
children:
|
|
134
|
-
let i =
|
|
134
|
+
className: f("grid gap-1 text-slate-600", t === "drawer" && "gap-1.5"),
|
|
135
|
+
children: B.map(({ dayCount: e, totalPriceLabel: n, perDayPriceLabel: r }) => {
|
|
136
|
+
let i = T("price_table_day", { count: e }), a = T("price_table_per_day", { price: r });
|
|
135
137
|
return /* @__PURE__ */ l("li", { children: /* @__PURE__ */ u("div", {
|
|
136
138
|
className: "flex items-baseline gap-2",
|
|
137
139
|
children: [
|
|
@@ -146,7 +148,7 @@ var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-po
|
|
|
146
148
|
/* @__PURE__ */ u("span", {
|
|
147
149
|
className: "shrink-0 font-medium leading-tight text-slate-950",
|
|
148
150
|
children: [n, /* @__PURE__ */ u("span", {
|
|
149
|
-
className:
|
|
151
|
+
className: f("ml-1 font-medium text-slate-500", t === "popover" ? "text-xs" : "text-sm"),
|
|
150
152
|
children: [
|
|
151
153
|
/* @__PURE__ */ l("span", { children: "(" }),
|
|
152
154
|
/* @__PURE__ */ l("span", { children: a }),
|
|
@@ -158,21 +160,21 @@ var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-po
|
|
|
158
160
|
}) }, e);
|
|
159
161
|
})
|
|
160
162
|
}),
|
|
161
|
-
|
|
163
|
+
me()
|
|
162
164
|
]
|
|
163
165
|
});
|
|
164
|
-
return
|
|
165
|
-
open:
|
|
166
|
+
return k ? /* @__PURE__ */ u(g.Root, {
|
|
167
|
+
open: M,
|
|
166
168
|
onOpenChange: (e) => {
|
|
167
|
-
e ?
|
|
169
|
+
e ? ce() : le();
|
|
168
170
|
},
|
|
169
171
|
swipeDirection: "down",
|
|
170
172
|
children: [/* @__PURE__ */ l(g.Trigger, {
|
|
171
|
-
ref:
|
|
173
|
+
ref: F,
|
|
172
174
|
type: "button",
|
|
173
175
|
className: Y,
|
|
174
|
-
"aria-label":
|
|
175
|
-
"aria-expanded":
|
|
176
|
+
"aria-label": T("price_details_aria_label", { price: V }),
|
|
177
|
+
"aria-expanded": M,
|
|
176
178
|
onClick: (e) => {
|
|
177
179
|
e.stopPropagation();
|
|
178
180
|
},
|
|
@@ -193,7 +195,7 @@ var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-po
|
|
|
193
195
|
className: "border-b border-slate-200 px-4 py-4 text-left",
|
|
194
196
|
children: /* @__PURE__ */ l(g.Title, {
|
|
195
197
|
className: "text-left text-lg font-semibold text-slate-950",
|
|
196
|
-
children: /* @__PURE__ */ l("span", { children:
|
|
198
|
+
children: /* @__PURE__ */ l("span", { children: T("price_table_title") })
|
|
197
199
|
})
|
|
198
200
|
}), /* @__PURE__ */ l("div", {
|
|
199
201
|
className: "flex-1 overflow-y-auto px-4 pb-6 pt-3",
|
|
@@ -203,41 +205,41 @@ var ie = 180, ae = "(max-width: 767px)", v = "loczer:storefront:product-price-po
|
|
|
203
205
|
})
|
|
204
206
|
})] })]
|
|
205
207
|
}) : /* @__PURE__ */ u(_.Root, {
|
|
206
|
-
open:
|
|
208
|
+
open: R,
|
|
207
209
|
onOpenChange: (e) => {
|
|
208
|
-
e ?
|
|
210
|
+
e ? W("click") : G();
|
|
209
211
|
},
|
|
210
212
|
children: [/* @__PURE__ */ l(_.Trigger, {
|
|
211
|
-
ref:
|
|
213
|
+
ref: F,
|
|
212
214
|
type: "button",
|
|
213
215
|
className: Y,
|
|
214
|
-
"aria-label":
|
|
215
|
-
"aria-expanded":
|
|
216
|
-
onBlur:
|
|
216
|
+
"aria-label": T("price_details_aria_label", { price: V }),
|
|
217
|
+
"aria-expanded": R,
|
|
218
|
+
onBlur: fe,
|
|
217
219
|
onClick: (e) => {
|
|
218
|
-
e.preventDefault(), e.stopPropagation(),
|
|
220
|
+
e.preventDefault(), e.stopPropagation(), A === "click" ? G() : W("click");
|
|
219
221
|
},
|
|
220
222
|
onPointerDown: (e) => {
|
|
221
223
|
e.stopPropagation();
|
|
222
224
|
},
|
|
223
225
|
children: Q()
|
|
224
|
-
}),
|
|
226
|
+
}), B.length > 0 ? /* @__PURE__ */ l(_.Portal, { children: /* @__PURE__ */ l(_.Positioner, {
|
|
225
227
|
side: "top",
|
|
226
228
|
align: "end",
|
|
227
229
|
sideOffset: 8,
|
|
228
230
|
collisionPadding: 12,
|
|
229
231
|
className: "pointer-events-auto z-[70] outline-none",
|
|
230
232
|
children: /* @__PURE__ */ l(_.Popup, {
|
|
231
|
-
ref:
|
|
233
|
+
ref: L,
|
|
232
234
|
initialFocus: !1,
|
|
233
235
|
className: "w-64 rounded-xl border border-slate-200 bg-white p-3 text-slate-950 shadow-xl outline-none data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:zoom-out-95 data-[open]:animate-in data-[open]:fade-in-0 data-[open]:zoom-in-95",
|
|
234
236
|
onPointerDown: (e) => {
|
|
235
|
-
e.stopPropagation(),
|
|
237
|
+
e.stopPropagation(), U();
|
|
236
238
|
},
|
|
237
239
|
onClick: (e) => {
|
|
238
240
|
e.stopPropagation();
|
|
239
241
|
},
|
|
240
|
-
onMouseEnter:
|
|
242
|
+
onMouseEnter: U,
|
|
241
243
|
onMouseLeave: J,
|
|
242
244
|
children: $(!0, "popover")
|
|
243
245
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCancellationPolicyNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAOtE,KAAK,kBAAkB,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAAA;AACxF,KAAK,sBAAsB,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,KAAK,uCAAuC,GAAG;IAC7C,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAOD,eAAO,MAAM,6CAA6C,GACxD,QAAQ,kBAAkB,KACzB,sBAAsB,GAAG,IAG3B,CAAA;AAaD,wBAAgB,kCAAkC,CAAC,EACjD,MAAM,EACN,SAAS,GACV,EAAE,uCAAuC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCancellationPolicyNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAOtE,KAAK,kBAAkB,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAAA;AACxF,KAAK,sBAAsB,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,KAAK,uCAAuC,GAAG;IAC7C,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAOD,eAAO,MAAM,6CAA6C,GACxD,QAAQ,kBAAkB,KACzB,sBAAsB,GAAG,IAG3B,CAAA;AAaD,wBAAgB,kCAAkC,CAAC,EACjD,MAAM,EACN,SAAS,GACV,EAAE,uCAAuC,kDA4GzC"}
|
|
@@ -71,12 +71,9 @@ function y({ policy: m, className: y }) {
|
|
|
71
71
|
className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
|
|
72
72
|
children: /* @__PURE__ */ c("div", {
|
|
73
73
|
className: "flex items-start gap-3",
|
|
74
|
-
children: [/* @__PURE__ */ s(
|
|
75
|
-
className: "mt-0.5
|
|
76
|
-
|
|
77
|
-
className: "h-4 w-4",
|
|
78
|
-
"aria-hidden": "true"
|
|
79
|
-
})
|
|
74
|
+
children: [/* @__PURE__ */ s(p, {
|
|
75
|
+
className: "mt-0.5 h-5 w-5 shrink-0 text-success",
|
|
76
|
+
"aria-hidden": "true"
|
|
80
77
|
}), /* @__PURE__ */ c("span", {
|
|
81
78
|
className: "min-w-0 space-y-1",
|
|
82
79
|
children: [/* @__PURE__ */ s(o, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInsuranceNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAOrD,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAWD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInsuranceNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAOrD,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAWD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,8BAA8B,2CA+KhC"}
|
|
@@ -77,12 +77,9 @@ function v({ bikes: v, currency: y, className: b }) {
|
|
|
77
77
|
className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
|
|
78
78
|
children: /* @__PURE__ */ l("div", {
|
|
79
79
|
className: "flex items-start gap-3",
|
|
80
|
-
children: [/* @__PURE__ */ c(
|
|
81
|
-
className: "mt-0.5
|
|
82
|
-
|
|
83
|
-
className: "h-4 w-4",
|
|
84
|
-
"aria-hidden": "true"
|
|
85
|
-
})
|
|
80
|
+
children: [/* @__PURE__ */ c(m, {
|
|
81
|
+
className: "mt-0.5 h-5 w-5 shrink-0 text-success",
|
|
82
|
+
"aria-hidden": "true"
|
|
86
83
|
}), /* @__PURE__ */ l("span", {
|
|
87
84
|
className: "min-w-0 space-y-1",
|
|
88
85
|
children: [/* @__PURE__ */ c(s, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import { useStorefront as t } from "../../
|
|
2
|
+
import { useStorefront as t } from "../../StorefrontContext.js";
|
|
3
3
|
import { ROUTE as n, responseSchema as r } from "../../lib/storefrontReviews.js";
|
|
4
4
|
import { formatInitialsWithPeriods as i, getNameInitials as a } from "../../lib/nameInitials.js";
|
|
5
5
|
import o from "react";
|
package/dist/i18n/en.d.ts
CHANGED
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ctB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -123,6 +123,7 @@ var e = {
|
|
|
123
123
|
product_cta: "Reserve",
|
|
124
124
|
add_to_cart: "Add to cart",
|
|
125
125
|
add_short: "Add",
|
|
126
|
+
product_added_to_cart_successfully: "{{quantity}} × “{{productName}}” added to your cart.",
|
|
126
127
|
cart_title: "Cart",
|
|
127
128
|
cart_items_count_one: "{{count}} item",
|
|
128
129
|
cart_items_count_other: "{{count}} items",
|
package/dist/i18n/fr.d.ts
CHANGED
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ctB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -123,6 +123,7 @@ var e = {
|
|
|
123
123
|
product_cta: "Réserver",
|
|
124
124
|
add_to_cart: "Ajouter au panier",
|
|
125
125
|
add_short: "Ajouter",
|
|
126
|
+
product_added_to_cart_successfully: "{{quantity}} × « {{productName}} » dans votre panier.",
|
|
126
127
|
cart_title: "Panier",
|
|
127
128
|
cart_items_count_zero: "{{count}} articles",
|
|
128
129
|
cart_items_count_one: "{{count}} article",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
3
|
import { ComponentPropsWithoutRef } from 'react';
|
|
4
|
+
import { Context } from 'react';
|
|
4
5
|
import { ControllerProps } from '@rpcbase/form';
|
|
5
6
|
import { FieldError } from 'react-hook-form';
|
|
6
7
|
import { FieldPath } from '@rpcbase/form';
|
|
@@ -1997,6 +1998,13 @@ export declare function getStorefrontBaseDailyRateMinor(prices: StorefrontPublic
|
|
|
1997
1998
|
|
|
1998
1999
|
export declare const getStorefrontCheckoutProductId: (product: Pick<StorefrontProduct, "id" | "checkoutProductId">) => string;
|
|
1999
2000
|
|
|
2001
|
+
export declare const getStorefrontProductSelectionDisplayName: ({ product, productVariantId, language, fallbackLanguage, }: {
|
|
2002
|
+
product: StorefrontProduct;
|
|
2003
|
+
productVariantId?: string;
|
|
2004
|
+
language: string;
|
|
2005
|
+
fallbackLanguage?: string;
|
|
2006
|
+
}) => string;
|
|
2007
|
+
|
|
2000
2008
|
export declare const getStorefrontRepresentedVariantId: (product: Pick<StorefrontProduct, "representedVariantId">) => string | undefined;
|
|
2001
2009
|
|
|
2002
2010
|
export declare function Header({ storefrontConfiguration, whatsappHref, whatsappPhoneDisplay }: HeaderProps): JSX.Element;
|
|
@@ -2415,12 +2423,13 @@ export declare const productKindSchema: z.ZodEnum<{
|
|
|
2415
2423
|
"e-bike": "e-bike";
|
|
2416
2424
|
}>;
|
|
2417
2425
|
|
|
2418
|
-
export declare const ProductPriceBadge: ({ prices, minPriceMinor, className }: ProductPriceBadgeProps) => JSX.Element | null;
|
|
2426
|
+
export declare const ProductPriceBadge: ({ prices, minPriceMinor, className, openOnHover, }: ProductPriceBadgeProps) => JSX.Element | null;
|
|
2419
2427
|
|
|
2420
2428
|
declare type ProductPriceBadgeProps = {
|
|
2421
2429
|
prices?: StorefrontPublicProductPrice[];
|
|
2422
2430
|
minPriceMinor?: number;
|
|
2423
2431
|
className?: string;
|
|
2432
|
+
openOnHover?: boolean;
|
|
2424
2433
|
};
|
|
2425
2434
|
|
|
2426
2435
|
export declare const productSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -3766,7 +3775,9 @@ export declare const storefrontContentSchema: z.ZodObject<{
|
|
|
3766
3775
|
}, z.core.$strip>>;
|
|
3767
3776
|
}, z.core.$strip>;
|
|
3768
3777
|
|
|
3769
|
-
declare
|
|
3778
|
+
export declare const StorefrontContext: Context<StorefrontContextValue | undefined>;
|
|
3779
|
+
|
|
3780
|
+
export declare type StorefrontContextValue = {
|
|
3770
3781
|
storeSlug: string;
|
|
3771
3782
|
storefrontConfiguration: StorefrontConfiguration;
|
|
3772
3783
|
bikes: BikeProduct[];
|
|
@@ -3901,6 +3912,7 @@ export declare const storefrontEn: {
|
|
|
3901
3912
|
product_cta: string;
|
|
3902
3913
|
add_to_cart: string;
|
|
3903
3914
|
add_short: string;
|
|
3915
|
+
product_added_to_cart_successfully: string;
|
|
3904
3916
|
cart_title: string;
|
|
3905
3917
|
cart_items_count_one: string;
|
|
3906
3918
|
cart_items_count_other: string;
|
|
@@ -4392,6 +4404,7 @@ export declare const storefrontFr: {
|
|
|
4392
4404
|
product_cta: string;
|
|
4393
4405
|
add_to_cart: string;
|
|
4394
4406
|
add_short: string;
|
|
4407
|
+
product_added_to_cart_successfully: string;
|
|
4395
4408
|
cart_title: string;
|
|
4396
4409
|
cart_items_count_zero: string;
|
|
4397
4410
|
cart_items_count_one: string;
|