@loczer/storefront-sdk 0.212.0 → 0.214.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.
Files changed (62) hide show
  1. package/dist/StorefrontContext.d.ts +18 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -1
  3. package/dist/StorefrontProvider.d.ts +9 -0
  4. package/dist/StorefrontProvider.d.ts.map +1 -1
  5. package/dist/chunks/pkg/ui/dist/Drawer/{index-CSvSVP_J.js → index-Dp62Y2o5.js} +10 -7
  6. package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-BVwhTZQo.js → ResponsiveDialog-BJ0RG6gh.js} +1 -1
  7. package/dist/components/BikeProductCard/index.d.ts.map +1 -1
  8. package/dist/components/BikeProductCard/index.js +5 -5
  9. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  10. package/dist/components/BookingBikeVariantDialog/index.js +23 -27
  11. package/dist/components/BookingFlowSteps/index.d.ts.map +1 -1
  12. package/dist/components/BookingFlowSteps/index.js +73 -32
  13. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  14. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  15. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +16 -16
  16. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  17. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  18. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +2 -2
  19. package/dist/components/BookingPeriodSelector/index.js +3 -3
  20. package/dist/components/Footer/index.d.ts +2 -1
  21. package/dist/components/Footer/index.d.ts.map +1 -1
  22. package/dist/components/Footer/index.js +64 -58
  23. package/dist/components/FulfillmentSection/index.js +10 -4
  24. package/dist/components/Header/index.d.ts.map +1 -1
  25. package/dist/components/Header/index.js +205 -100
  26. package/dist/components/Layout/index.d.ts.map +1 -1
  27. package/dist/components/Layout/index.js +3 -2
  28. package/dist/components/PlatformFooter/index.js +6 -6
  29. package/dist/components/ProductPriceBadge/index.js +16 -10
  30. package/dist/components/StorefrontCancellationPolicyNotice/index.js +1 -1
  31. package/dist/components/StorefrontInsuranceNotice/index.js +1 -1
  32. package/dist/components/StorefrontPopupMessages/index.js +1 -1
  33. package/dist/i18n/en.d.ts +13 -4
  34. package/dist/i18n/en.d.ts.map +1 -1
  35. package/dist/i18n/en.js +13 -4
  36. package/dist/i18n/fr.d.ts +13 -4
  37. package/dist/i18n/fr.d.ts.map +1 -1
  38. package/dist/i18n/fr.js +13 -4
  39. package/dist/index.d.ts +88 -11
  40. package/dist/index.js +69 -68
  41. package/dist/lib/cart.d.ts +6 -2
  42. package/dist/lib/cart.d.ts.map +1 -1
  43. package/dist/lib/cart.js +45 -23
  44. package/dist/lib/checkoutSubmit.d.ts +3 -0
  45. package/dist/lib/checkoutSubmit.d.ts.map +1 -1
  46. package/dist/lib/checkoutSubmit.js +14 -2
  47. package/dist/pages/BookingPage.d.ts.map +1 -1
  48. package/dist/pages/BookingPage.js +8 -2
  49. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  50. package/dist/pages/CheckoutPage.js +235 -245
  51. package/dist/pages/HomePage.d.ts.map +1 -1
  52. package/dist/pages/HomePage.js +253 -235
  53. package/dist/pages/RentalTermsPage.d.ts +2 -0
  54. package/dist/pages/RentalTermsPage.d.ts.map +1 -0
  55. package/dist/pages/RentalTermsPage.js +52 -0
  56. package/dist/routes.d.ts.map +1 -1
  57. package/dist/routes.js +14 -10
  58. package/dist/storefront.css +1 -1
  59. package/dist/storefrontSchemas.d.ts +19 -0
  60. package/dist/storefrontSchemas.d.ts.map +1 -1
  61. package/dist/storefrontSchemas.js +39 -35
  62. package/package.json +1 -1
@@ -3,180 +3,285 @@ import { getLocalizedValue as t } from "../../localization.js";
3
3
  import { useStorefrontCart as n } from "../../lib/cart.js";
4
4
  import { buildStorefrontImageUrl as r } from "../../lib/storefrontImage.js";
5
5
  import i from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
6
- import { MISSING_SHOP_EMAIL as a } from "../../lib/storefrontMissingValues.js";
7
- import { formatStorefrontAddressTagline as o } from "../../lib/storefrontAddress.js";
8
- import { Badge as s } from "../../ui/badge.js";
9
- import { Button as c } from "../../ui/button.js";
10
- import { useOptionalStorefront as l } from "../../StorefrontContext.js";
11
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
12
- import { useMediaQuery as f, useThrottledMeasure as p } from "@rpcbase/client";
13
- import { Link as m, useLocation as h, useParams as g } from "@rpcbase/router";
14
- import { useTranslation as _ } from "react-i18next";
15
- import { cn as v, useScrollHideOnDown as y } from "@rpcbase/ui";
16
- import { ArrowRight as b, ShoppingCart as ee } from "lucide-react";
6
+ import { MISSING_SHOP_EMAIL as ee } from "../../lib/storefrontMissingValues.js";
7
+ import { formatStorefrontAddressTagline as a } from "../../lib/storefrontAddress.js";
8
+ import { Badge as o } from "../../ui/badge.js";
9
+ import { Button as s } from "../../ui/button.js";
10
+ import { Drawer as te, DrawerClose as c, DrawerContent as ne, DrawerDescription as re, DrawerHeader as ie, DrawerTitle as ae, DrawerTrigger as oe } from "../../ui/drawer.js";
11
+ import { useOptionalStorefront as se } from "../../StorefrontContext.js";
12
+ import { useState as ce } from "react";
13
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
14
+ import { useMediaQuery as d, useThrottledMeasure as f } from "@rpcbase/client";
15
+ import { Link as p, useLocation as m, useParams as h } from "@rpcbase/router";
16
+ import { useTranslation as g } from "react-i18next";
17
+ import { cn as _, useScrollHideOnDown as le } from "@rpcbase/ui";
18
+ import { ArrowRight as v, Menu as ue, ShoppingCart as de } from "lucide-react";
17
19
  //#region src/components/Header/index.tsx
18
- var te = 36, x = (e, t) => {
20
+ var fe = 36, y = (e, t) => {
19
21
  let n = e?.trim() ?? "";
20
22
  return n ? r(n, t ?? "") : "";
21
23
  };
22
- function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay: C }) {
23
- let { t: w, i18n: T } = _(), E = l(), { storeSlug: D } = g(), O = h(), { itemCount: k } = n(), A = f("(max-width: 640px)"), [ne, re] = p(), j = re?.height ?? te, M = y({
24
- enabled: A,
25
- thresholdPx: j
26
- }), N = A && M ? `translateY(-${j}px)` : "translateY(0)", P = () => {
27
- let e = T.language.startsWith("fr") ? "en" : "fr";
28
- T.changeLanguage(e);
29
- }, F = `/${D ?? ""}`, I = e(new URLSearchParams(O.search), D), L = I.toString(), R = !!(I.get("start_time")?.trim() && I.get("end_time")?.trim()), z = L ? `?${L}` : "", B = `${F}/booking${z}`, V = `${F}/checkout${z}`, H = r?.shop.name?.trim() ?? "", U = r?.shop.emailAddress?.trim() ?? "", W = r?.workspace?.workspaceLanguage, G = t(r?.content?.tagline, T.language, W).trim(), K = o(r?.shop), q = G || K || "[Missing shop address]", J = !G && !K, Y = t(r?.content?.topBannerMessage, T.language, W).trim() || w("top_bar_message"), X = x(r?.content?.logoWideImageId, D), Z = x(r?.shop.logoImageId ?? r?.content?.logoSquareImageId, D), Q = X.length > 0, $ = Z.length > 0;
30
- return /* @__PURE__ */ d("div", {
24
+ function b({ storefrontConfiguration: r, whatsappHref: b, whatsappPhoneDisplay: x }) {
25
+ let { t: S, i18n: C } = g(), w = se(), { storeSlug: T } = h(), E = m(), { itemCount: D } = n(), O = d("(max-width: 640px)"), [k, A] = ce(!1), [j, M] = f(), N = M?.height ?? fe, P = le({
26
+ enabled: O,
27
+ thresholdPx: N
28
+ }), F = O && P ? `translateY(-${N}px)` : "translateY(0)", I = () => {
29
+ let e = C.language.startsWith("fr") ? "en" : "fr";
30
+ C.changeLanguage(e);
31
+ }, L = `/${T ?? ""}`, R = e(new URLSearchParams(E.search), T), z = R.toString(), B = !!(R.get("start_time")?.trim() && R.get("end_time")?.trim()), V = z ? `?${z}` : "", H = `${L}/booking${V}`, pe = `${L}/checkout${V}`, U = r?.shop.name?.trim() ?? "", W = r?.shop.emailAddress?.trim() ?? "", G = r?.workspace?.workspaceLanguage, K = t(r?.content?.tagline, C.language, G).trim(), q = a(r?.shop), J = K || q || "[Missing shop address]", Y = !K && !q, me = t(r?.content?.topBannerMessage, C.language, G).trim() || S("top_bar_message"), X = y(r?.content?.logoWideImageId, T), Z = y(r?.shop.logoImageId ?? r?.content?.logoSquareImageId, T), Q = X.length > 0, $ = Z.length > 0, he = [
32
+ {
33
+ label: S("nav_categories"),
34
+ to: `${L}${V}#categories`
35
+ },
36
+ {
37
+ label: S("nav_featured"),
38
+ to: `${L}${V}#featured`
39
+ },
40
+ {
41
+ label: S("nav_products"),
42
+ to: H
43
+ },
44
+ ...(w?.itineraries.length ?? 0) > 0 ? [{
45
+ label: S("nav_itineraries"),
46
+ to: `${L}/itineraries`
47
+ }] : [],
48
+ {
49
+ label: S("nav_contact"),
50
+ to: `${L}${V}#contact`
51
+ }
52
+ ];
53
+ return /* @__PURE__ */ u("div", {
31
54
  className: "sticky top-0 z-30",
32
- children: [/* @__PURE__ */ u("div", {
55
+ children: [/* @__PURE__ */ l("div", {
33
56
  className: "transition-transform duration-300",
34
- style: { transform: N },
35
- children: /* @__PURE__ */ u("div", {
36
- ref: ne,
57
+ style: { transform: F },
58
+ children: /* @__PURE__ */ l("div", {
59
+ ref: j,
37
60
  className: "bg-slate-950 text-white",
38
- children: /* @__PURE__ */ d("div", {
39
- className: "mx-auto flex max-w-7xl items-center justify-between gap-3 px-4 py-2 text-xs sm:px-6",
40
- children: [/* @__PURE__ */ u("p", {
41
- className: "flex items-center gap-2",
42
- children: /* @__PURE__ */ u("span", { children: Y })
43
- }), /* @__PURE__ */ d("div", {
61
+ children: /* @__PURE__ */ u("div", {
62
+ className: "mx-auto flex max-w-7xl items-center justify-start gap-3 px-4 py-2 text-left text-xs leading-4 sm:justify-between sm:px-6",
63
+ children: [/* @__PURE__ */ l("p", {
64
+ className: "w-full min-w-0 break-words sm:w-auto",
65
+ children: /* @__PURE__ */ l("span", { children: me })
66
+ }), /* @__PURE__ */ u("div", {
44
67
  className: "hidden items-center gap-4 sm:flex",
45
- children: [S ? /* @__PURE__ */ d("a", {
68
+ children: [b ? /* @__PURE__ */ u("a", {
46
69
  className: "inline-flex items-center gap-2 rounded-md px-2 py-1 text-white/90 hover:bg-white/10 hover:text-white",
47
- href: S,
70
+ href: b,
48
71
  target: "_blank",
49
72
  rel: "noreferrer",
50
- "aria-label": `WhatsApp${C ? ` ${C}` : ""}`,
51
- children: [/* @__PURE__ */ u("img", {
73
+ "aria-label": `WhatsApp${x ? ` ${x}` : ""}`,
74
+ children: [/* @__PURE__ */ l("img", {
52
75
  src: i,
53
76
  className: "h-5 w-5 shrink-0",
54
77
  alt: "",
55
78
  "aria-hidden": "true"
56
- }), C ? /* @__PURE__ */ u("span", { children: C }) : null]
57
- }) : null, U ? /* @__PURE__ */ u("a", {
79
+ }), x ? /* @__PURE__ */ l("span", { children: x }) : null]
80
+ }) : null, W ? /* @__PURE__ */ l("a", {
58
81
  className: "inline-flex items-center gap-2 rounded-md px-2 py-1 text-white/90 hover:bg-white/10 hover:text-white",
59
- href: `mailto:${U}`,
60
- "aria-label": U,
61
- children: /* @__PURE__ */ u("span", { children: U })
62
- }) : /* @__PURE__ */ u("span", {
82
+ href: `mailto:${W}`,
83
+ "aria-label": W,
84
+ children: /* @__PURE__ */ l("span", { children: W })
85
+ }) : /* @__PURE__ */ l("span", {
63
86
  className: "inline-flex items-center rounded-md px-2 py-1 text-destructive",
64
- children: a
87
+ children: ee
65
88
  })]
66
89
  })]
67
90
  })
68
91
  })
69
- }), /* @__PURE__ */ u("header", {
92
+ }), /* @__PURE__ */ l("header", {
70
93
  className: "sticky top-0 z-30 border-b bg-white/90 backdrop-blur transition-transform duration-300",
71
- style: { transform: N },
72
- children: /* @__PURE__ */ d("div", {
73
- className: "mx-auto flex max-w-7xl items-center justify-between gap-4 px-4 py-3 sm:px-6",
94
+ style: { transform: F },
95
+ children: /* @__PURE__ */ u("div", {
96
+ className: "mx-auto flex max-w-7xl min-w-0 items-center gap-2 px-4 py-3 sm:gap-4 sm:px-6",
74
97
  children: [
75
- /* @__PURE__ */ d(m, {
76
- to: F,
77
- className: "flex min-w-0 items-center gap-3",
78
- children: [$ ? /* @__PURE__ */ u("span", {
98
+ /* @__PURE__ */ u(p, {
99
+ to: L,
100
+ className: "flex min-w-0 flex-1 items-center gap-2 sm:gap-3",
101
+ children: [$ ? /* @__PURE__ */ l("span", {
79
102
  className: "inline-flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-slate-200 bg-white",
80
- children: /* @__PURE__ */ u("img", {
103
+ children: /* @__PURE__ */ l("img", {
81
104
  src: Z,
82
105
  alt: "",
83
106
  className: "h-full w-full object-contain",
84
107
  "aria-hidden": "true"
85
108
  })
86
- }) : Q ? null : /* @__PURE__ */ u("span", {
109
+ }) : Q ? null : /* @__PURE__ */ l("span", {
87
110
  className: "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border-2 border-dashed border-slate-300 bg-slate-50 text-slate-400",
88
- children: /* @__PURE__ */ u("span", {
111
+ children: /* @__PURE__ */ l("span", {
89
112
  className: "text-lg font-semibold leading-none",
90
113
  "aria-hidden": "true",
91
114
  children: "?"
92
115
  })
93
- }), /* @__PURE__ */ d("span", {
116
+ }), /* @__PURE__ */ u("span", {
94
117
  className: "flex min-w-0 flex-col leading-tight",
95
- children: [Q && !$ ? /* @__PURE__ */ u("img", {
118
+ children: [Q && !$ ? /* @__PURE__ */ l("img", {
96
119
  src: X,
97
- alt: H,
120
+ alt: U,
98
121
  className: "h-8 max-w-[10rem] object-contain object-left sm:max-w-[14rem]"
99
- }) : /* @__PURE__ */ u("span", {
122
+ }) : /* @__PURE__ */ l("span", {
100
123
  className: "truncate text-sm font-semibold",
101
- children: H
102
- }), /* @__PURE__ */ u("span", {
103
- className: v("truncate text-xs text-slate-600", J && "text-destructive"),
104
- children: q
124
+ children: U
125
+ }), /* @__PURE__ */ l("span", {
126
+ className: _("truncate text-xs text-slate-600", Y && "text-destructive"),
127
+ children: J
105
128
  })]
106
129
  })]
107
130
  }),
108
- /* @__PURE__ */ d("nav", {
131
+ /* @__PURE__ */ u("nav", {
109
132
  className: "hidden items-center gap-6 text-sm font-medium text-slate-700 md:flex",
110
133
  children: [
111
- /* @__PURE__ */ u(m, {
134
+ /* @__PURE__ */ l(p, {
112
135
  className: "hover:text-slate-950",
113
- to: `${F}${z}#categories`,
114
- children: /* @__PURE__ */ u("span", { children: w("nav_categories") })
136
+ to: `${L}${V}#categories`,
137
+ children: /* @__PURE__ */ l("span", { children: S("nav_categories") })
115
138
  }),
116
- /* @__PURE__ */ u(m, {
139
+ /* @__PURE__ */ l(p, {
117
140
  className: "hover:text-slate-950",
118
- to: `${F}${z}#featured`,
119
- children: /* @__PURE__ */ u("span", { children: w("nav_featured") })
141
+ to: `${L}${V}#featured`,
142
+ children: /* @__PURE__ */ l("span", { children: S("nav_featured") })
120
143
  }),
121
- /* @__PURE__ */ u(m, {
144
+ /* @__PURE__ */ l(p, {
122
145
  className: "hover:text-slate-950",
123
- to: B,
124
- children: /* @__PURE__ */ u("span", { children: w("nav_products") })
146
+ to: H,
147
+ children: /* @__PURE__ */ l("span", { children: S("nav_products") })
125
148
  }),
126
- (E?.itineraries.length ?? 0) > 0 ? /* @__PURE__ */ u(m, {
149
+ (w?.itineraries.length ?? 0) > 0 ? /* @__PURE__ */ l(p, {
127
150
  className: "hover:text-slate-950",
128
- to: `${F}/itineraries`,
129
- children: /* @__PURE__ */ u("span", { children: w("nav_itineraries") })
151
+ to: `${L}/itineraries`,
152
+ children: /* @__PURE__ */ l("span", { children: S("nav_itineraries") })
130
153
  }) : null,
131
- /* @__PURE__ */ u(m, {
154
+ /* @__PURE__ */ l(p, {
132
155
  className: "hover:text-slate-950",
133
- to: `${F}${z}#contact`,
134
- children: /* @__PURE__ */ u("span", { children: w("nav_contact") })
156
+ to: `${L}${V}#contact`,
157
+ children: /* @__PURE__ */ l("span", { children: S("nav_contact") })
135
158
  })
136
159
  ]
137
160
  }),
138
- /* @__PURE__ */ d("div", {
139
- className: "flex items-center gap-2",
161
+ /* @__PURE__ */ u("div", {
162
+ className: "flex shrink-0 items-center gap-1.5 sm:gap-2",
140
163
  children: [
141
- /* @__PURE__ */ u(c, {
164
+ /* @__PURE__ */ l(s, {
142
165
  variant: "outline",
143
166
  size: "sm",
144
167
  className: "hidden sm:inline-flex",
145
- onClick: P,
146
- children: /* @__PURE__ */ u("span", { children: w("language_toggle") })
168
+ onClick: I,
169
+ children: /* @__PURE__ */ l("span", { children: S("language_toggle") })
147
170
  }),
148
- /* @__PURE__ */ u(c, {
171
+ /* @__PURE__ */ l(s, {
149
172
  asChild: !0,
150
173
  variant: "outline",
151
174
  size: "sm",
152
- className: v("relative gap-2", k > 0 && R ? "inline-flex" : "hidden"),
153
- children: /* @__PURE__ */ d(m, {
154
- to: V,
155
- state: { showCheckoutSummary: !0 },
175
+ className: _("relative h-9 w-9 gap-2 px-0 sm:w-auto sm:px-3", D > 0 && B ? "inline-flex" : "hidden"),
176
+ children: /* @__PURE__ */ u(p, {
177
+ to: pe,
178
+ "aria-label": `${S("cart_button")} (${D})`,
156
179
  children: [
157
- /* @__PURE__ */ u(ee, {
180
+ /* @__PURE__ */ l(de, {
158
181
  className: "h-4 w-4",
159
182
  "aria-hidden": "true"
160
183
  }),
161
- /* @__PURE__ */ u("span", { children: w("cart_button") }),
162
- /* @__PURE__ */ u(s, {
184
+ /* @__PURE__ */ l("span", {
185
+ className: "hidden sm:inline",
186
+ children: S("cart_button")
187
+ }),
188
+ /* @__PURE__ */ l(o, {
163
189
  className: "absolute -right-2 -top-2 h-5 min-w-5 rounded-full px-1.5 text-xs",
164
- children: /* @__PURE__ */ u("span", { children: k })
190
+ children: /* @__PURE__ */ l("span", { children: D })
165
191
  })
166
192
  ]
167
193
  })
168
194
  }),
169
- /* @__PURE__ */ u(c, {
195
+ /* @__PURE__ */ l(s, {
170
196
  asChild: !0,
171
197
  size: "sm",
172
- className: "gap-2",
173
- children: /* @__PURE__ */ d(m, {
174
- to: B,
175
- children: [/* @__PURE__ */ u("span", { children: w("cta_book_now") }), /* @__PURE__ */ u(b, {
176
- className: "h-4 w-4",
177
- "aria-hidden": "true"
178
- })]
198
+ className: "h-9 gap-1.5 px-2 sm:gap-2 sm:px-3",
199
+ children: /* @__PURE__ */ u(p, {
200
+ to: H,
201
+ "aria-label": S("cta_book_now"),
202
+ children: [
203
+ /* @__PURE__ */ l("span", {
204
+ className: "sm:hidden",
205
+ children: S("cta_book_short")
206
+ }),
207
+ /* @__PURE__ */ l("span", {
208
+ className: "hidden sm:inline",
209
+ children: S("cta_book_now")
210
+ }),
211
+ /* @__PURE__ */ l(v, {
212
+ className: "h-4 w-4",
213
+ "aria-hidden": "true"
214
+ })
215
+ ]
179
216
  })
217
+ }),
218
+ /* @__PURE__ */ u(te, {
219
+ open: k,
220
+ onOpenChange: A,
221
+ direction: "right",
222
+ children: [/* @__PURE__ */ l(oe, {
223
+ asChild: !0,
224
+ children: /* @__PURE__ */ l(s, {
225
+ type: "button",
226
+ variant: "outline",
227
+ size: "icon",
228
+ className: "h-9 w-9 md:hidden",
229
+ "aria-label": S("mobile_menu_open"),
230
+ children: /* @__PURE__ */ l(ue, {
231
+ className: "h-4 w-4",
232
+ "aria-hidden": "true"
233
+ })
234
+ })
235
+ }), /* @__PURE__ */ u(ne, {
236
+ className: "w-[min(22rem,calc(100vw-1.5rem))] bg-white",
237
+ "aria-label": S("mobile_menu_label"),
238
+ closeLabel: S("mobile_menu_close"),
239
+ showCloseButton: !0,
240
+ children: [
241
+ /* @__PURE__ */ u(ie, {
242
+ className: "border-b border-slate-200 px-5 pb-4 pt-6 text-left",
243
+ children: [/* @__PURE__ */ l(ae, { children: U }), /* @__PURE__ */ l(re, {
244
+ className: "break-words",
245
+ children: J
246
+ })]
247
+ }),
248
+ /* @__PURE__ */ l("nav", {
249
+ className: "grid gap-1 overflow-y-auto p-3",
250
+ "aria-label": S("mobile_menu_label"),
251
+ children: he.map((e) => /* @__PURE__ */ l(c, {
252
+ asChild: !0,
253
+ children: /* @__PURE__ */ l(p, {
254
+ to: e.to,
255
+ className: "flex min-h-11 items-center rounded-lg px-3 py-2 text-sm font-medium text-slate-700 transition-colors hover:bg-slate-100 hover:text-slate-950",
256
+ children: e.label
257
+ })
258
+ }, `${e.to}-${e.label}`))
259
+ }),
260
+ /* @__PURE__ */ u("div", {
261
+ className: "mt-auto grid gap-3 border-t border-slate-200 p-4",
262
+ children: [/* @__PURE__ */ l(c, {
263
+ asChild: !0,
264
+ children: /* @__PURE__ */ l(s, {
265
+ asChild: !0,
266
+ className: "w-full gap-2",
267
+ children: /* @__PURE__ */ u(p, {
268
+ to: H,
269
+ children: [/* @__PURE__ */ l("span", { children: S("cta_book_now") }), /* @__PURE__ */ l(v, {
270
+ className: "h-4 w-4",
271
+ "aria-hidden": "true"
272
+ })]
273
+ })
274
+ })
275
+ }), /* @__PURE__ */ l(s, {
276
+ type: "button",
277
+ variant: "outline",
278
+ className: "w-full",
279
+ onClick: I,
280
+ children: /* @__PURE__ */ l("span", { children: S("language_toggle") })
281
+ })]
282
+ })
283
+ ]
284
+ })]
180
285
  })
181
286
  ]
182
287
  })
@@ -186,4 +291,4 @@ function S({ storefrontConfiguration: r, whatsappHref: S, whatsappPhoneDisplay:
186
291
  });
187
292
  }
188
293
  //#endregion
189
- export { S as Header };
294
+ export { b as Header };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAGvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAItE,KAAK,WAAW,GAAG;IACjB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,kBAAkB,EAAE,6BAA6B,CAAA;CAClD,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,uBAAuB,EACvB,kBAAkB,GACnB,EAAE,WAAW,2CAiEb"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAGvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAItE,KAAK,WAAW,GAAG;IACjB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,kBAAkB,EAAE,6BAA6B,CAAA;CAClD,CAAA;AAED,wBAAgB,MAAM,CAAC,EACrB,uBAAuB,EACvB,kBAAkB,GACnB,EAAE,WAAW,2CAkEb"}
@@ -34,7 +34,7 @@ function b({ storefrontConfiguration: b, storefrontProducts: x }) {
34
34
  storeSlug: S ?? "",
35
35
  products: x,
36
36
  children: /* @__PURE__ */ f("div", {
37
- className: `loczer-storefront flex flex-col bg-background text-foreground ${O && !k ? "h-dvh overflow-hidden" : "min-h-screen"}`,
37
+ className: `loczer-storefront flex w-full min-w-0 flex-col overflow-x-clip bg-background text-foreground ${O && !k ? "h-dvh overflow-hidden" : "min-h-screen"}`,
38
38
  children: O ? /* @__PURE__ */ f("main", {
39
39
  className: `flex-1 ${k ? "bg-white" : "overflow-hidden"}`,
40
40
  children: /* @__PURE__ */ f(h, {})
@@ -45,10 +45,11 @@ function b({ storefrontConfiguration: b, storefrontProducts: x }) {
45
45
  whatsappPhoneDisplay: E?.phoneDisplay
46
46
  }),
47
47
  /* @__PURE__ */ f("main", {
48
- className: "flex-1",
48
+ className: "min-w-0 flex-1",
49
49
  children: /* @__PURE__ */ f(h, {})
50
50
  }),
51
51
  /* @__PURE__ */ f(n, {
52
+ storeSlug: S,
52
53
  shop: b?.shop,
53
54
  whatsappHref: D,
54
55
  whatsappPhoneDisplay: E?.phoneDisplay,
@@ -4,12 +4,12 @@ import { useTranslation as r } from "react-i18next";
4
4
  //#region src/components/PlatformFooter/index.tsx
5
5
  var i = "https://loczer.com", a = 2025, o = {
6
6
  en: {
7
- terms: "terms-of-use",
8
- privacy: "privacy-policy"
7
+ legalMentions: "en/legal-notice",
8
+ privacy: "en/privacy-policy"
9
9
  },
10
10
  fr: {
11
- terms: "conditions-d-utilisation",
12
- privacy: "politique-de-confidentialite"
11
+ legalMentions: "fr/mentions-legales",
12
+ privacy: "fr/politique-de-confidentialite"
13
13
  }
14
14
  };
15
15
  function s() {
@@ -34,10 +34,10 @@ function s() {
34
34
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 sm:justify-end",
35
35
  children: [/* @__PURE__ */ t("a", {
36
36
  className: "hover:text-white",
37
- href: `${i}/${l.terms}`,
37
+ href: `${i}/${l.legalMentions}`,
38
38
  target: "_blank",
39
39
  rel: "noopener noreferrer",
40
- children: /* @__PURE__ */ t("span", { children: s("platform_footer_terms") })
40
+ children: /* @__PURE__ */ t("span", { children: s("platform_footer_legal_mentions") })
41
41
  }), /* @__PURE__ */ t("a", {
42
42
  className: "hover:text-white",
43
43
  href: `${i}/${l.privacy}`,
@@ -65,24 +65,30 @@ var le = 180, h = "(max-width: 767px)", g = "loczer:storefront:product-price-pop
65
65
  j(!1);
66
66
  }, [D]), !V) return typeof b == "number" ? /* @__PURE__ */ l(i, {
67
67
  variant: "outline",
68
- className: f("border-slate-200 bg-white text-slate-700", x),
69
- children: /* @__PURE__ */ l("span", { children: C("price_from", {
70
- price: n(b, w.language),
71
- unit: R
72
- }) })
68
+ className: f("min-w-0 max-w-full border-slate-200 bg-white text-slate-700", x),
69
+ children: /* @__PURE__ */ l("span", {
70
+ className: "truncate",
71
+ children: C("price_from", {
72
+ price: n(b, w.language),
73
+ unit: R
74
+ })
75
+ })
73
76
  }) : null;
74
- let Y = f(a({ 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", x), X = E?.storefrontConfiguration.shop.emailAddress?.trim(), Z = E?.storefrontConfiguration.shop.contactPhone1?.trim(), _e = !!(X || Z), Q = () => /* @__PURE__ */ u(re, { children: [
77
+ let Y = f(a({ variant: "outline" }), "min-w-0 max-w-full 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", x), X = E?.storefrontConfiguration.shop.emailAddress?.trim(), Z = E?.storefrontConfiguration.shop.contactPhone1?.trim(), _e = !!(X || Z), Q = () => /* @__PURE__ */ u(re, { children: [
75
78
  /* @__PURE__ */ l("span", {
76
- className: "font-semibold",
79
+ className: "shrink-0 font-semibold",
77
80
  children: V
78
81
  }),
79
82
  H ? /* @__PURE__ */ u("span", {
80
- className: "inline-flex items-center gap-1 text-slate-500",
83
+ className: "inline-flex min-w-0 items-center gap-1 text-slate-500",
81
84
  children: [/* @__PURE__ */ l(ce, {
82
- className: "h-3 w-3",
85
+ className: "h-3 w-3 shrink-0",
83
86
  strokeWidth: 2.4,
84
87
  "aria-hidden": "true"
85
- }), /* @__PURE__ */ l("span", { children: C("price_then", { price: H }) })]
88
+ }), /* @__PURE__ */ l("span", {
89
+ className: "truncate",
90
+ children: C("price_then", { price: H })
91
+ })]
86
92
  }) : null,
87
93
  B.length > 0 ? /* @__PURE__ */ l("span", {
88
94
  ref: P,
@@ -1,5 +1,5 @@
1
1
  import { Button as e } from "../../ui/button.js";
2
- import { ResponsiveDialog as t, ResponsiveDialogContent as n, ResponsiveDialogDescription as r, ResponsiveDialogFooter as i, ResponsiveDialogHeader as a, ResponsiveDialogTitle as o } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
2
+ import { ResponsiveDialog as t, ResponsiveDialogContent as n, ResponsiveDialogDescription as r, ResponsiveDialogFooter as i, ResponsiveDialogHeader as a, ResponsiveDialogTitle as o } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BJ0RG6gh.js";
3
3
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
4
  import { useSearchParams as l } from "@rpcbase/router";
5
5
  import { useTranslation as u } from "react-i18next";
@@ -1,6 +1,6 @@
1
1
  import { formatStorefrontPriceMinor as e } from "../../lib/pricing.js";
2
2
  import { Button as t } from "../../ui/button.js";
3
- import { ResponsiveDialog as n, ResponsiveDialogContent as r, ResponsiveDialogDescription as i, ResponsiveDialogFooter as a, ResponsiveDialogHeader as o, ResponsiveDialogTitle as s } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
3
+ import { ResponsiveDialog as n, ResponsiveDialogContent as r, ResponsiveDialogDescription as i, ResponsiveDialogFooter as a, ResponsiveDialogHeader as o, ResponsiveDialogTitle as s } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BJ0RG6gh.js";
4
4
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
5
  import { useSearchParams as u } from "@rpcbase/router";
6
6
  import { useTranslation as d } from "react-i18next";
@@ -2,7 +2,7 @@ import { getLocalizedEntry as e, getLocalizedValue as t } from "../../localizati
2
2
  import { buildStorefrontImageUrl as n } from "../../lib/storefrontImage.js";
3
3
  import { Button as r } from "../../ui/button.js";
4
4
  import { isAutomationRuntime as i } from "../../lib/isAutomationRuntime.js";
5
- import { ResponsiveDialog as a, ResponsiveDialogContent as o, ResponsiveDialogDescription as s, ResponsiveDialogFooter as c, ResponsiveDialogHeader as l, ResponsiveDialogTitle as u } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
5
+ import { ResponsiveDialog as a, ResponsiveDialogContent as o, ResponsiveDialogDescription as s, ResponsiveDialogFooter as c, ResponsiveDialogHeader as l, ResponsiveDialogTitle as u } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BJ0RG6gh.js";
6
6
  import { useEffect as d, useState as f } from "react";
7
7
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
8
  import { useLocation as h, useParams as g } from "@rpcbase/router";
package/dist/i18n/en.d.ts CHANGED
@@ -11,6 +11,10 @@ export declare const storefront: {
11
11
  nav_contact: string;
12
12
  language_toggle: string;
13
13
  cta_book_now: string;
14
+ cta_book_short: string;
15
+ mobile_menu_open: string;
16
+ mobile_menu_close: string;
17
+ mobile_menu_label: string;
14
18
  cart_button: string;
15
19
  checkout_button: string;
16
20
  storefront_popup_title_fallback: string;
@@ -75,7 +79,9 @@ export declare const storefront: {
75
79
  booking_time_slots_required: string;
76
80
  booking_selected_days_tooltip_one: string;
77
81
  booking_selected_days_tooltip_other: string;
78
- booking_minimum_duration: string;
82
+ booking_rental_period: string;
83
+ booking_date_drawer_continue: string;
84
+ booking_date_drawer_close: string;
79
85
  booking_submit: string;
80
86
  flow_step_booking: string;
81
87
  flow_step_checkout: string;
@@ -363,8 +369,11 @@ export declare const storefront: {
363
369
  contact_form_validation_phone_invalid: string;
364
370
  contact_form_validation_message_required: string;
365
371
  contact_form_validation_message_too_long: string;
366
- footer_brand_title: string;
367
- footer_brand_description: string;
372
+ footer_information_title: string;
373
+ rental_terms_title: string;
374
+ rental_terms_description: string;
375
+ rental_terms_effective_date: string;
376
+ rental_terms_unavailable: string;
368
377
  footer_contact_title: string;
369
378
  footer_whatsapp_link: string;
370
379
  footer_hours_title: string;
@@ -375,7 +384,7 @@ export declare const storefront: {
375
384
  footer_hours_week: string;
376
385
  footer_hours_weekend: string;
377
386
  platform_footer_powered_by: string;
378
- platform_footer_terms: string;
387
+ platform_footer_legal_mentions: string;
379
388
  platform_footer_privacy: string;
380
389
  platform_footer_tagline: string;
381
390
  secure_payment_link: {
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+etB,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwftB,CAAA"}
package/dist/i18n/en.js CHANGED
@@ -12,6 +12,10 @@ var e = {
12
12
  nav_contact: "Contact",
13
13
  language_toggle: "FR/EN",
14
14
  cta_book_now: "Book now",
15
+ cta_book_short: "Book",
16
+ mobile_menu_open: "Open navigation menu",
17
+ mobile_menu_close: "Close navigation menu",
18
+ mobile_menu_label: "Store navigation",
15
19
  cart_button: "Cart",
16
20
  checkout_button: "Checkout",
17
21
  storefront_popup_title_fallback: "Update",
@@ -76,7 +80,9 @@ var e = {
76
80
  booking_time_slots_required: "Select available start and return times before continuing.",
77
81
  booking_selected_days_tooltip_one: "{{count}} day",
78
82
  booking_selected_days_tooltip_other: "{{count}} days",
79
- booking_minimum_duration: "Minimum booking length: {{hours}} hours.",
83
+ booking_rental_period: "Rental period",
84
+ booking_date_drawer_continue: "Continue",
85
+ booking_date_drawer_close: "Close calendar",
80
86
  booking_submit: "See available bikes",
81
87
  flow_step_booking: "Booking",
82
88
  flow_step_checkout: "Confirmation & Payment",
@@ -364,8 +370,11 @@ var e = {
364
370
  contact_form_validation_phone_invalid: "Invalid phone number.",
365
371
  contact_form_validation_message_required: "Message is required.",
366
372
  contact_form_validation_message_too_long: "Message is too long.",
367
- footer_brand_title: "Need help choosing?",
368
- footer_brand_description: "Contact us and we’ll help you pick the right bikes and accessories.",
373
+ footer_information_title: "Information",
374
+ rental_terms_title: "Rental terms",
375
+ rental_terms_description: "These terms govern bookings and rentals provided by {{shop_name}}.",
376
+ rental_terms_effective_date: "Version in effect on {{date}}.",
377
+ rental_terms_unavailable: "The rental terms have not been published yet.",
369
378
  footer_contact_title: "Contact",
370
379
  footer_whatsapp_link: "WhatsApp",
371
380
  footer_hours_title: "Opening hours",
@@ -376,7 +385,7 @@ var e = {
376
385
  footer_hours_week: "Mon–Fri: 10:00–18:30",
377
386
  footer_hours_weekend: "Sat–Sun: 10:00–18:30",
378
387
  platform_footer_powered_by: "Powered by LOCZER",
379
- platform_footer_terms: "Terms of use",
388
+ platform_footer_legal_mentions: "Legal notice",
380
389
  platform_footer_privacy: "Privacy policy",
381
390
  platform_footer_tagline: "The software that runs bike rental shops.",
382
391
  secure_payment_link: {