@loczer/storefront-sdk 0.182.0 → 0.183.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 (77) hide show
  1. package/dist/StorefrontProvider.d.ts +18 -15
  2. package/dist/StorefrontProvider.d.ts.map +1 -1
  3. package/dist/StorefrontProvider.js +24 -34
  4. package/dist/chunks/booking-engine/dist/models/{Product.shared-CJ6vPb6n.js → Product.shared-CTuk4fiR.js} +2 -2
  5. package/dist/chunks/booking-engine/dist/schemas/{base-asset-PqhtKnZA.js → base-asset-B_Dm8_Vk.js} +1 -1
  6. package/dist/chunks/booking-engine/dist/schemas/{base-booking-BM3jZzqu.js → base-booking-DW8AEPKo.js} +1 -1
  7. package/dist/chunks/booking-engine/dist/schemas/{base-product-BJd4ttMP.js → base-product-1H8l2aUv.js} +1 -1
  8. package/dist/chunks/booking-engine/dist/{schemas-BNlwu75Z.js → schemas-34QQv0EH.js} +4 -4
  9. package/dist/chunks/ui/dist/Map/{MapContent--PwVTg2W.js → MapContent-QPkuTBvK.js} +2 -2
  10. package/dist/chunks/ui/dist/Map/{constants-DqrK8UkE.js → constants-BNmiJXfg.js} +1 -1
  11. package/dist/chunks/ui/dist/{Map-B45AxZ-D.js → Map-BXmRf5Ep.js} +3 -3
  12. package/dist/chunks/ui/dist/static/strings-1T2w7LqX.js +4 -0
  13. package/dist/components/AboutSection/index.d.ts +1 -6
  14. package/dist/components/AboutSection/index.d.ts.map +1 -1
  15. package/dist/components/AboutSection/index.js +43 -39
  16. package/dist/components/ContactSection/index.d.ts +1 -3
  17. package/dist/components/ContactSection/index.d.ts.map +1 -1
  18. package/dist/components/ContactSection/index.js +222 -164
  19. package/dist/components/Footer/index.d.ts +3 -4
  20. package/dist/components/Footer/index.d.ts.map +1 -1
  21. package/dist/components/Footer/index.js +98 -69
  22. package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
  23. package/dist/components/FulfillmentSection/index.js +17 -16
  24. package/dist/components/Header/index.d.ts +1 -3
  25. package/dist/components/Header/index.d.ts.map +1 -1
  26. package/dist/components/Header/index.js +77 -72
  27. package/dist/components/Layout/index.d.ts +3 -1
  28. package/dist/components/Layout/index.d.ts.map +1 -1
  29. package/dist/components/Layout/index.js +45 -47
  30. package/dist/components/Map/index.js +1 -1
  31. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  32. package/dist/components/ProductPriceBadge/index.js +68 -60
  33. package/dist/i18n/I18nProvider.js +1 -1
  34. package/dist/i18n/fr.js +1 -1
  35. package/dist/index.d.ts +151 -150
  36. package/dist/index.js +62 -62
  37. package/dist/lib/cart.d.ts +4 -1
  38. package/dist/lib/cart.d.ts.map +1 -1
  39. package/dist/lib/cart.js +64 -40
  40. package/dist/lib/cartSummary.d.ts.map +1 -1
  41. package/dist/lib/cartSummary.js +4 -3
  42. package/dist/lib/checkoutSubmit.js +2 -2
  43. package/dist/lib/productVariants.d.ts.map +1 -1
  44. package/dist/lib/productVariants.js +20 -9
  45. package/dist/lib/storefrontAddress.d.ts +5 -0
  46. package/dist/lib/storefrontAddress.d.ts.map +1 -0
  47. package/dist/lib/storefrontAddress.js +24 -0
  48. package/dist/lib/storefrontAvailability.d.ts +6 -6
  49. package/dist/lib/storefrontContact.d.ts +10 -0
  50. package/dist/lib/storefrontContact.d.ts.map +1 -0
  51. package/dist/lib/storefrontContact.js +24 -0
  52. package/dist/lib/storefrontMissingValues.d.ts +5 -0
  53. package/dist/lib/storefrontMissingValues.d.ts.map +1 -0
  54. package/dist/lib/storefrontMissingValues.js +4 -0
  55. package/dist/lib/storefrontProducts.d.ts +23 -21
  56. package/dist/lib/storefrontProducts.d.ts.map +1 -1
  57. package/dist/lib/storefrontProducts.js +7 -5
  58. package/dist/lib/whatsapp.d.ts +8 -6
  59. package/dist/lib/whatsapp.d.ts.map +1 -1
  60. package/dist/lib/whatsapp.js +16 -43
  61. package/dist/pages/BookingPage.js +36 -36
  62. package/dist/pages/HomePage.d.ts.map +1 -1
  63. package/dist/pages/HomePage.js +126 -128
  64. package/dist/pages/ProductPage.js +160 -160
  65. package/dist/storefront.css +1 -1
  66. package/dist/storefrontSchemas.d.ts +14 -12
  67. package/dist/storefrontSchemas.d.ts.map +1 -1
  68. package/dist/storefrontSchemas.js +3 -2
  69. package/dist/ui/radio-group.d.ts +1 -1
  70. package/package.json +7 -6
  71. package/dist/chunks/ui/dist/static/strings-CPnO-KbA.js +0 -4
  72. package/dist/data/config.d.ts +0 -15
  73. package/dist/data/config.d.ts.map +0 -1
  74. package/dist/data/config.js +0 -24
  75. package/dist/static/strings.d.ts +0 -2
  76. package/dist/static/strings.d.ts.map +0 -1
  77. package/dist/static/strings.js +0 -4
@@ -1,248 +1,306 @@
1
1
  import { ROUTE as e, responseSchema as t } from "../../lib/contactForm.js";
2
- import { resolveStorefrontWhatsAppContact as n } from "../../lib/whatsapp.js";
3
- import r from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
4
- import { Button as i } from "../../ui/button.js";
5
- import { Input as a } from "../../ui/input.js";
6
- import { useStorefront as o } from "../../StorefrontProvider.js";
7
- import { COORDS as s } from "../../static/strings.js";
8
- import { Form as c, FormControl as l, FormField as u, FormItem as d, FormLabel as f, FormMessage as p } from "../../ui/form.js";
9
- import { Textarea as m } from "../../ui/textarea.js";
10
- import { createMarkerElement as h } from "../Map/createMarkerElement.js";
11
- import { Map as g } from "../Map/index.js";
12
- import { z as _ } from "zod";
13
- import { useMemo as v } from "react";
14
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
15
- import { PhoneNumberInput as x, cn as S } from "@rpcbase/ui";
16
- import { toast as C } from "@rpcbase/client";
17
- import { useTranslation as w } from "react-i18next";
18
- import { Mail as T, MapPin as E, Phone as D } from "lucide-react";
19
- import { useForm as O, zodResolver as k } from "@rpcbase/form";
2
+ import { resolveStorefrontMapsHref as n, resolveStorefrontPhoneContact as r } from "../../lib/storefrontContact.js";
3
+ import { resolveStorefrontWhatsAppContact as i } from "../../lib/whatsapp.js";
4
+ import a from "../../chunks/assets/whatsapp-m5e0vjnZ.js";
5
+ import { MISSING_SHOP_ADDRESS as o, MISSING_SHOP_EMAIL as s, MISSING_SHOP_PHONE_NUMBER as c, UNCONFIGURED_SHOP_MAP_CENTER as l } from "../../lib/storefrontMissingValues.js";
6
+ import { Button as u } from "../../ui/button.js";
7
+ import { Input as d } from "../../ui/input.js";
8
+ import { useStorefront as f } from "../../StorefrontProvider.js";
9
+ import { Form as p, FormControl as m, FormField as h, FormItem as g, FormLabel as _, FormMessage as v } from "../../ui/form.js";
10
+ import { Textarea as y } from "../../ui/textarea.js";
11
+ import { createMarkerElement as b } from "../Map/createMarkerElement.js";
12
+ import { Map as x } from "../Map/index.js";
13
+ import { z as S } from "zod";
14
+ import { useMemo as C } from "react";
15
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
16
+ import { PhoneNumberInput as ee, cn as E } from "@rpcbase/ui";
17
+ import { toast as D } from "@rpcbase/client";
18
+ import { useTranslation as O } from "react-i18next";
19
+ import { Mail as k, MapPin as A, Phone as j } from "lucide-react";
20
+ import { useForm as M, zodResolver as N } from "@rpcbase/form";
20
21
  //#region src/components/ContactSection/index.tsx
21
- var A = (e) => e.startsWith("fr") ? "FR" : "US", j = "text-sm font-normal text-current decoration-current underline-offset-4 group-hover:underline", M = "group flex items-start gap-3 text-slate-600 transition-colors hover:text-slate-800";
22
- function N({ preset: N, storeSlug: P }) {
23
- let { t: F, i18n: I } = w(), { storefrontConfiguration: L, mapboxToken: R } = o(), z = `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(N.address)}`, B = n({
24
- preset: N,
25
- storefrontConfiguration: L,
26
- language: I.language
27
- }), V = B?.href, H = O({
28
- resolver: k(v(() => _.object({
29
- name: _.string().trim().min(1, F("contact_form_validation_name_required")),
30
- emailAddress: _.string().trim().email(F("contact_form_validation_email_invalid")),
31
- phoneNumber: _.string().trim().min(6, F("contact_form_validation_phone_invalid")),
32
- message: _.string().trim().min(1, F("contact_form_validation_message_required")).max(8192, F("contact_form_validation_message_too_long"))
33
- }), [F, I.language])),
22
+ var P = (e) => e.startsWith("fr") ? "FR" : "US", F = "text-sm font-normal text-current decoration-current underline-offset-4 group-hover:underline", I = "group flex items-start gap-3 text-slate-600 transition-colors hover:text-slate-800";
23
+ function L({ storeSlug: L }) {
24
+ let { t: R, i18n: z } = O(), { storefrontConfiguration: B, mapboxToken: V } = f(), { shop: H } = B, U = r(H), W = H.emailAddress?.trim() ?? "", G = H.address?.trim() ?? "", K = n(H), q = i({
25
+ storefrontConfiguration: B,
26
+ language: z.language
27
+ }), J = q?.href, Y = M({
28
+ resolver: N(C(() => S.object({
29
+ name: S.string().trim().min(1, R("contact_form_validation_name_required")),
30
+ emailAddress: S.string().trim().email(R("contact_form_validation_email_invalid")),
31
+ phoneNumber: S.string().trim().min(6, R("contact_form_validation_phone_invalid")),
32
+ message: S.string().trim().min(1, R("contact_form_validation_message_required")).max(8192, R("contact_form_validation_message_too_long"))
33
+ }), [R, z.language])),
34
34
  defaultValues: {
35
35
  name: "",
36
36
  emailAddress: "",
37
37
  phoneNumber: "",
38
38
  message: ""
39
39
  }
40
- }), U = v(() => {
41
- let e = L.shop.gpsCoordinates;
42
- return e ? [e[1], e[0]] : s;
43
- }, [L.shop.gpsCoordinates]), W = v(() => h(), []), G = v(() => ({
44
- coords: U,
45
- element: W || void 0,
40
+ }), X = C(() => {
41
+ let e = H.gpsCoordinates;
42
+ return e ? [e[1], e[0]] : null;
43
+ }, [H.gpsCoordinates]), Z = X ?? l, Q = C(() => b(), []), $ = C(() => X ? {
44
+ coords: X,
45
+ element: Q || void 0,
46
46
  offset: [0, -25.5],
47
- popupHTML: N.address,
47
+ popupHTML: G || "[Missing shop address]",
48
48
  popupCloseButton: !1
49
- }), [
50
- N.address,
51
- U,
52
- W
53
- ]), K = v(() => [G], [G]), q = H.handleSubmit(async (n) => {
49
+ } : null, [
50
+ G,
51
+ X,
52
+ Q
53
+ ]), te = C(() => $ ? [$] : [], [$]), ne = Y.handleSubmit(async (n) => {
54
54
  let r = await fetch(e, {
55
55
  method: "POST",
56
56
  headers: { "Content-Type": "application/json" },
57
57
  body: JSON.stringify({
58
- storeSlug: P,
58
+ storeSlug: L,
59
59
  ...n
60
60
  })
61
61
  }), i = await r.json().then((e) => t.safeParse(e)).catch(() => ({ success: !1 }));
62
62
  if (r.ok && "success" in i && i.success && i.data.success) {
63
- C.success(F("contact_form_success_toast")), H.reset();
63
+ D.success(R("contact_form_success_toast")), Y.reset();
64
64
  return;
65
65
  }
66
- let a = "success" in i && i.success && i.data.error ? i.data.error : F("contact_form_error_toast");
67
- C.error(a);
66
+ let a = "success" in i && i.success && i.data.error ? i.data.error : R("contact_form_error_toast");
67
+ D.error(a);
68
68
  });
69
- return /* @__PURE__ */ y("section", {
69
+ return /* @__PURE__ */ w("section", {
70
70
  id: "contact",
71
71
  className: "border-t bg-slate-50 py-12 scroll-mt-16 sm:scroll-mt-20 sm:py-16",
72
72
  "data-testid": "storefront-contact-form",
73
- children: /* @__PURE__ */ b("div", {
73
+ children: /* @__PURE__ */ T("div", {
74
74
  className: "mx-auto max-w-7xl px-4 sm:px-6",
75
- children: [/* @__PURE__ */ b("div", {
75
+ children: [/* @__PURE__ */ T("div", {
76
76
  className: "mx-auto max-w-2xl text-center",
77
- children: [/* @__PURE__ */ y("h2", {
77
+ children: [/* @__PURE__ */ w("h2", {
78
78
  className: "text-3xl font-semibold tracking-tight text-slate-950",
79
- children: F("contact_section_title")
80
- }), /* @__PURE__ */ y("p", {
79
+ children: R("contact_section_title")
80
+ }), /* @__PURE__ */ w("p", {
81
81
  className: "mt-3 text-sm text-slate-600 sm:text-base",
82
- children: F("contact_section_subtitle")
82
+ children: R("contact_section_subtitle")
83
83
  })]
84
- }), /* @__PURE__ */ b("div", {
84
+ }), /* @__PURE__ */ T("div", {
85
85
  className: "mt-8 grid gap-6 rounded-xl border border-slate-200 bg-white p-4 shadow-sm lg:grid-cols-2 lg:p-6",
86
- children: [/* @__PURE__ */ b("div", {
86
+ children: [/* @__PURE__ */ T("div", {
87
87
  className: "flex flex-col gap-6 lg:border-r lg:border-slate-200 lg:pr-6",
88
88
  children: [
89
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
89
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
90
90
  className: "text-lg font-semibold text-slate-950",
91
- children: F("contact_section_info_title")
92
- }), /* @__PURE__ */ y("p", {
91
+ children: R("contact_section_info_title")
92
+ }), /* @__PURE__ */ w("p", {
93
93
  className: "mt-2 text-sm text-slate-600",
94
- children: F(V ? "contact_section_info_description" : "contact_section_info_description_without_whatsapp")
94
+ children: R(J ? "contact_section_info_description" : "contact_section_info_description_without_whatsapp")
95
95
  })] }),
96
- /* @__PURE__ */ b("div", {
96
+ /* @__PURE__ */ T("div", {
97
97
  className: "grid gap-5",
98
98
  children: [
99
- B ? /* @__PURE__ */ b("a", {
100
- className: M,
101
- href: B.href,
99
+ q ? /* @__PURE__ */ T("a", {
100
+ className: I,
101
+ href: q.href,
102
102
  target: "_blank",
103
103
  rel: "noreferrer",
104
- children: [/* @__PURE__ */ y("span", {
104
+ children: [/* @__PURE__ */ w("span", {
105
105
  className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
106
- children: /* @__PURE__ */ y("img", {
107
- src: r,
106
+ children: /* @__PURE__ */ w("img", {
107
+ src: a,
108
108
  className: "h-6 w-6",
109
109
  alt: "",
110
110
  "aria-hidden": "true"
111
111
  })
112
- }), /* @__PURE__ */ b("span", {
112
+ }), /* @__PURE__ */ T("span", {
113
113
  className: "flex min-w-0 flex-col gap-1",
114
- children: [/* @__PURE__ */ y("span", {
114
+ children: [/* @__PURE__ */ w("span", {
115
115
  className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
116
- children: F("contact_section_whatsapp_label")
117
- }), /* @__PURE__ */ y("span", {
118
- className: j,
119
- children: B.phoneDisplay
116
+ children: R("contact_section_whatsapp_label")
117
+ }), /* @__PURE__ */ w("span", {
118
+ className: F,
119
+ children: q.phoneDisplay
120
120
  })]
121
121
  })]
122
122
  }) : null,
123
- /* @__PURE__ */ b("a", {
124
- className: M,
125
- href: N.phone_href,
126
- children: [/* @__PURE__ */ y("span", {
123
+ U ? /* @__PURE__ */ T("a", {
124
+ className: I,
125
+ href: U.href,
126
+ children: [/* @__PURE__ */ w("span", {
127
127
  className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
128
- children: /* @__PURE__ */ y(D, {
128
+ children: /* @__PURE__ */ w(j, {
129
129
  className: "h-5 w-5",
130
130
  "aria-hidden": "true"
131
131
  })
132
- }), /* @__PURE__ */ b("span", {
132
+ }), /* @__PURE__ */ T("span", {
133
133
  className: "flex min-w-0 flex-col gap-1",
134
- children: [/* @__PURE__ */ y("span", {
134
+ children: [/* @__PURE__ */ w("span", {
135
135
  className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
136
- children: F("contact_section_phone_label")
137
- }), /* @__PURE__ */ y("span", {
138
- className: j,
139
- children: N.phone_display
136
+ children: R("contact_section_phone_label")
137
+ }), /* @__PURE__ */ w("span", {
138
+ className: F,
139
+ children: U.phoneDisplay
140
+ })]
141
+ })]
142
+ }) : /* @__PURE__ */ T("div", {
143
+ className: "flex items-start gap-3 text-destructive",
144
+ children: [/* @__PURE__ */ w("span", {
145
+ className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current",
146
+ children: /* @__PURE__ */ w(j, {
147
+ className: "h-5 w-5",
148
+ "aria-hidden": "true"
149
+ })
150
+ }), /* @__PURE__ */ T("span", {
151
+ className: "flex min-w-0 flex-col gap-1",
152
+ children: [/* @__PURE__ */ w("span", {
153
+ className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
154
+ children: R("contact_section_phone_label")
155
+ }), /* @__PURE__ */ w("span", {
156
+ className: "text-sm font-normal",
157
+ children: c
140
158
  })]
141
159
  })]
142
160
  }),
143
- /* @__PURE__ */ b("a", {
144
- className: M,
145
- href: `mailto:${N.email}`,
146
- children: [/* @__PURE__ */ y("span", {
161
+ W ? /* @__PURE__ */ T("a", {
162
+ className: I,
163
+ href: `mailto:${W}`,
164
+ children: [/* @__PURE__ */ w("span", {
147
165
  className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
148
- children: /* @__PURE__ */ y(T, {
166
+ children: /* @__PURE__ */ w(k, {
149
167
  className: "h-5 w-5",
150
168
  "aria-hidden": "true"
151
169
  })
152
- }), /* @__PURE__ */ b("span", {
170
+ }), /* @__PURE__ */ T("span", {
153
171
  className: "flex min-w-0 flex-col gap-1",
154
- children: [/* @__PURE__ */ y("span", {
172
+ children: [/* @__PURE__ */ w("span", {
155
173
  className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
156
- children: F("contact_section_email_label")
157
- }), /* @__PURE__ */ y("span", {
158
- className: j,
159
- children: N.email
174
+ children: R("contact_section_email_label")
175
+ }), /* @__PURE__ */ w("span", {
176
+ className: F,
177
+ children: W
178
+ })]
179
+ })]
180
+ }) : /* @__PURE__ */ T("div", {
181
+ className: "flex items-start gap-3 text-destructive",
182
+ children: [/* @__PURE__ */ w("span", {
183
+ className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current",
184
+ children: /* @__PURE__ */ w(k, {
185
+ className: "h-5 w-5",
186
+ "aria-hidden": "true"
187
+ })
188
+ }), /* @__PURE__ */ T("span", {
189
+ className: "flex min-w-0 flex-col gap-1",
190
+ children: [/* @__PURE__ */ w("span", {
191
+ className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
192
+ children: R("contact_section_email_label")
193
+ }), /* @__PURE__ */ w("span", {
194
+ className: "text-sm font-normal",
195
+ children: s
160
196
  })]
161
197
  })]
162
198
  }),
163
- /* @__PURE__ */ b("a", {
164
- className: M,
165
- href: z,
199
+ K && G ? /* @__PURE__ */ T("a", {
200
+ className: I,
201
+ href: K,
166
202
  target: "_blank",
167
203
  rel: "noreferrer",
168
- children: [/* @__PURE__ */ y("span", {
204
+ children: [/* @__PURE__ */ w("span", {
169
205
  className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current transition-colors",
170
- children: /* @__PURE__ */ y(E, {
206
+ children: /* @__PURE__ */ w(A, {
171
207
  className: "h-5 w-5",
172
208
  "aria-hidden": "true"
173
209
  })
174
- }), /* @__PURE__ */ b("span", {
210
+ }), /* @__PURE__ */ T("span", {
175
211
  className: "flex min-w-0 flex-col gap-1",
176
- children: [/* @__PURE__ */ y("span", {
212
+ children: [/* @__PURE__ */ w("span", {
177
213
  className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
178
- children: F("contact_section_address_label")
179
- }), /* @__PURE__ */ y("span", {
180
- className: j,
181
- children: N.address
214
+ children: R("contact_section_address_label")
215
+ }), /* @__PURE__ */ w("span", {
216
+ className: F,
217
+ children: G
218
+ })]
219
+ })]
220
+ }) : /* @__PURE__ */ T("div", {
221
+ className: "flex items-start gap-3 text-destructive",
222
+ children: [/* @__PURE__ */ w("span", {
223
+ className: "mt-0.5 inline-flex h-8 w-8 items-center justify-center text-current",
224
+ children: /* @__PURE__ */ w(A, {
225
+ className: "h-5 w-5",
226
+ "aria-hidden": "true"
227
+ })
228
+ }), /* @__PURE__ */ T("span", {
229
+ className: "flex min-w-0 flex-col gap-1",
230
+ children: [/* @__PURE__ */ w("span", {
231
+ className: "text-2xs font-medium uppercase tracking-[0.08em] text-slate-500",
232
+ children: R("contact_section_address_label")
233
+ }), /* @__PURE__ */ w("span", {
234
+ className: "text-sm font-normal",
235
+ children: o
182
236
  })]
183
237
  })]
184
238
  })
185
239
  ]
186
240
  }),
187
- /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y(g, {
188
- mapboxToken: R,
189
- initialCenter: U,
190
- initialZoom: 10,
191
- markers: K,
192
- showNavigationControl: !1,
193
- className: "overflow-clip w-full h-52 rounded-lg"
194
- }) })
241
+ /* @__PURE__ */ w("div", {
242
+ className: "relative",
243
+ "data-testid": "storefront-contact-map",
244
+ children: /* @__PURE__ */ w(x, {
245
+ mapboxToken: V,
246
+ initialCenter: Z,
247
+ initialZoom: X ? 10 : 1,
248
+ markers: te,
249
+ showNavigationControl: !1,
250
+ className: "overflow-clip w-full h-52 rounded-lg"
251
+ })
252
+ })
195
253
  ]
196
- }), /* @__PURE__ */ b("div", { children: [
197
- /* @__PURE__ */ y("h3", {
254
+ }), /* @__PURE__ */ T("div", { children: [
255
+ /* @__PURE__ */ w("h3", {
198
256
  className: "text-lg font-semibold text-slate-950",
199
- children: F("contact_section_form_title")
257
+ children: R("contact_section_form_title")
200
258
  }),
201
- /* @__PURE__ */ y("p", {
259
+ /* @__PURE__ */ w("p", {
202
260
  className: "mt-2 text-sm text-slate-600",
203
- children: F("contact_section_form_description")
261
+ children: R("contact_section_form_description")
204
262
  }),
205
- /* @__PURE__ */ y("div", {
263
+ /* @__PURE__ */ w("div", {
206
264
  className: "mt-6",
207
- children: /* @__PURE__ */ y(c, {
208
- ...H,
209
- children: /* @__PURE__ */ b("form", {
210
- onSubmit: q,
265
+ children: /* @__PURE__ */ w(p, {
266
+ ...Y,
267
+ children: /* @__PURE__ */ T("form", {
268
+ onSubmit: ne,
211
269
  className: "grid gap-4",
212
270
  children: [
213
- /* @__PURE__ */ y(u, {
214
- control: H.control,
271
+ /* @__PURE__ */ w(h, {
272
+ control: Y.control,
215
273
  name: "name",
216
- render: ({ field: e }) => /* @__PURE__ */ b(d, { children: [
217
- /* @__PURE__ */ y(f, { children: F("contact_form_name_label") }),
218
- /* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(a, {
274
+ render: ({ field: e }) => /* @__PURE__ */ T(g, { children: [
275
+ /* @__PURE__ */ w(_, { children: R("contact_form_name_label") }),
276
+ /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(d, {
219
277
  ...e,
220
- placeholder: F("contact_form_name_placeholder"),
278
+ placeholder: R("contact_form_name_placeholder"),
221
279
  className: "h-11"
222
280
  }) }),
223
- /* @__PURE__ */ y(p, {})
281
+ /* @__PURE__ */ w(v, {})
224
282
  ] })
225
283
  }),
226
- /* @__PURE__ */ y(u, {
227
- control: H.control,
284
+ /* @__PURE__ */ w(h, {
285
+ control: Y.control,
228
286
  name: "emailAddress",
229
- render: ({ field: e }) => /* @__PURE__ */ b(d, { children: [
230
- /* @__PURE__ */ y(f, { children: F("contact_form_email_label") }),
231
- /* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(a, {
287
+ render: ({ field: e }) => /* @__PURE__ */ T(g, { children: [
288
+ /* @__PURE__ */ w(_, { children: R("contact_form_email_label") }),
289
+ /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(d, {
232
290
  ...e,
233
291
  type: "email",
234
- placeholder: F("contact_form_email_placeholder"),
292
+ placeholder: R("contact_form_email_placeholder"),
235
293
  className: "h-11"
236
294
  }) }),
237
- /* @__PURE__ */ y(p, {})
295
+ /* @__PURE__ */ w(v, {})
238
296
  ] })
239
297
  }),
240
- /* @__PURE__ */ y(u, {
241
- control: H.control,
298
+ /* @__PURE__ */ w(h, {
299
+ control: Y.control,
242
300
  name: "phoneNumber",
243
- render: ({ field: e, fieldState: t }) => /* @__PURE__ */ b(d, { children: [
244
- /* @__PURE__ */ y(f, { children: F("contact_form_phone_label") }),
245
- /* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(x, {
301
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ T(g, { children: [
302
+ /* @__PURE__ */ w(_, { children: R("contact_form_phone_label") }),
303
+ /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(ee, {
246
304
  name: e.name,
247
305
  value: e.value ?? "",
248
306
  onBlur: e.onBlur,
@@ -250,42 +308,42 @@ function N({ preset: N, storeSlug: P }) {
250
308
  let n = t.e164 || t.formattedInternational || t.rawInput || "";
251
309
  e.onChange(n);
252
310
  },
253
- defaultCountry: A(I.language),
254
- locale: I.language,
255
- placeholder: F("contact_form_phone_placeholder"),
311
+ defaultCountry: P(z.language),
312
+ locale: z.language,
313
+ placeholder: R("contact_form_phone_placeholder"),
256
314
  className: "relative",
257
- inputClassName: S("flex h-11 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", t.error && "border-destructive focus-visible:ring-destructive"),
258
- renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ y(p, {
315
+ inputClassName: E("flex h-11 w-full rounded-md border border-input bg-background py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", t.error && "border-destructive focus-visible:ring-destructive"),
316
+ renderValidationMessage: ({ message: e }) => t.error?.message ? null : /* @__PURE__ */ w(v, {
259
317
  style: { top: "100%" },
260
- children: /* @__PURE__ */ y("span", { children: e })
318
+ children: /* @__PURE__ */ w("span", { children: e })
261
319
  })
262
320
  }) }),
263
- t.error?.message ? /* @__PURE__ */ y(p, {}) : null
321
+ t.error?.message ? /* @__PURE__ */ w(v, {}) : null
264
322
  ] })
265
323
  }),
266
- /* @__PURE__ */ y(u, {
267
- control: H.control,
324
+ /* @__PURE__ */ w(h, {
325
+ control: Y.control,
268
326
  name: "message",
269
- render: ({ field: e }) => /* @__PURE__ */ b(d, { children: [
270
- /* @__PURE__ */ y(f, { children: F("contact_form_message_label") }),
271
- /* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(m, {
327
+ render: ({ field: e }) => /* @__PURE__ */ T(g, { children: [
328
+ /* @__PURE__ */ w(_, { children: R("contact_form_message_label") }),
329
+ /* @__PURE__ */ w(m, { children: /* @__PURE__ */ w(y, {
272
330
  ...e,
273
331
  rows: 5,
274
- placeholder: F("contact_form_message_placeholder"),
332
+ placeholder: R("contact_form_message_placeholder"),
275
333
  className: "min-h-[132px]"
276
334
  }) }),
277
- /* @__PURE__ */ y(p, {})
335
+ /* @__PURE__ */ w(v, {})
278
336
  ] })
279
337
  }),
280
- /* @__PURE__ */ b("div", {
338
+ /* @__PURE__ */ T("div", {
281
339
  className: "mt-2 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
282
- children: [/* @__PURE__ */ y("p", {
340
+ children: [/* @__PURE__ */ w("p", {
283
341
  className: "text-xs text-slate-500",
284
- children: F("contact_form_privacy_hint")
285
- }), /* @__PURE__ */ y(i, {
342
+ children: R("contact_form_privacy_hint")
343
+ }), /* @__PURE__ */ w(u, {
286
344
  type: "submit",
287
- disabled: H.formState.isSubmitting,
288
- children: H.formState.isSubmitting ? F("contact_form_submitting_button") : F("contact_form_submit_button")
345
+ disabled: Y.formState.isSubmitting,
346
+ children: Y.formState.isSubmitting ? R("contact_form_submitting_button") : R("contact_form_submit_button")
289
347
  })]
290
348
  })
291
349
  ]
@@ -298,4 +356,4 @@ function N({ preset: N, storeSlug: P }) {
298
356
  });
299
357
  }
300
358
  //#endregion
301
- export { N as ContactSection };
359
+ export { L as ContactSection };
@@ -1,12 +1,11 @@
1
- import { StorefrontPreset } from '../../data/config';
2
- import { StorefrontConfiguration } from '../../storefrontSchemas';
1
+ import { StorefrontConfiguration, StorefrontShop } from '../../storefrontSchemas';
3
2
  type FooterProps = {
4
- preset: StorefrontPreset;
3
+ shop?: StorefrontShop;
5
4
  whatsappHref?: string;
6
5
  whatsappPhoneDisplay?: string;
7
6
  openingHours?: StorefrontConfiguration["bookingEngine"]["shop"]["openingHours"];
8
7
  openingHoursOverrides?: StorefrontConfiguration["bookingEngine"]["shop"]["openingHoursOverrides"];
9
8
  };
10
- export declare function Footer({ preset, whatsappHref, whatsappPhoneDisplay, openingHours, openingHoursOverrides, }: FooterProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Footer({ shop, whatsappHref, whatsappPhoneDisplay, openingHours, openingHoursOverrides, }: FooterProps): import("react/jsx-runtime").JSX.Element;
11
10
  export {};
12
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAMzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAStE,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,gBAAgB,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAA;IAC/E,qBAAqB,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,uBAAuB,CAAC,CAAA;CAClG,CAAA;AAyCD,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,GACtB,EAAE,WAAW,2CAiGb"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAStF,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,cAAc,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAA;IAC/E,qBAAqB,CAAC,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC,uBAAuB,CAAC,CAAA;CAClG,CAAA;AAyCD,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,GACtB,EAAE,WAAW,2CA8Ib"}