@loczer/storefront-sdk 0.218.0 → 0.219.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 (53) hide show
  1. package/dist/components/BookingFlowPageLayout/index.d.ts +13 -0
  2. package/dist/components/BookingFlowPageLayout/index.d.ts.map +1 -0
  3. package/dist/components/BookingFlowPageLayout/index.js +35 -0
  4. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.d.ts.map +1 -1
  5. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +10 -33
  6. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.d.ts.map +1 -1
  7. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -4
  8. package/dist/components/BookingPeriodSelector/index.d.ts +1 -1
  9. package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
  10. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +0 -5
  11. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  12. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +150 -159
  13. package/dist/components/Footer/BusinessHours.d.ts +2 -1
  14. package/dist/components/Footer/BusinessHours.d.ts.map +1 -1
  15. package/dist/components/Footer/BusinessHours.js +19 -18
  16. package/dist/components/Footer/businessHoursStatus.d.ts +25 -0
  17. package/dist/components/Footer/businessHoursStatus.d.ts.map +1 -0
  18. package/dist/components/Footer/businessHoursStatus.js +99 -0
  19. package/dist/components/Footer/businessHoursUtils.d.ts +2 -1
  20. package/dist/components/Footer/businessHoursUtils.d.ts.map +1 -1
  21. package/dist/components/Footer/businessHoursUtils.js +52 -45
  22. package/dist/components/Footer/index.d.ts +2 -1
  23. package/dist/components/Footer/index.d.ts.map +1 -1
  24. package/dist/components/Footer/index.js +26 -25
  25. package/dist/components/Layout/index.d.ts.map +1 -1
  26. package/dist/components/Layout/index.js +2 -1
  27. package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
  28. package/dist/components/StorefrontCancellationPolicyNotice/index.js +89 -86
  29. package/dist/components/StorefrontCartPanel/index.js +4 -4
  30. package/dist/components/StorefrontInsuranceNotice/index.d.ts +2 -1
  31. package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -1
  32. package/dist/components/StorefrontInsuranceNotice/index.js +155 -162
  33. package/dist/i18n/en.d.ts +7 -1
  34. package/dist/i18n/en.d.ts.map +1 -1
  35. package/dist/i18n/en.js +8 -2
  36. package/dist/i18n/fr.d.ts +7 -1
  37. package/dist/i18n/fr.d.ts.map +1 -1
  38. package/dist/i18n/fr.js +8 -2
  39. package/dist/index.d.ts +24 -9
  40. package/dist/index.js +66 -66
  41. package/dist/lib/pricing.d.ts.map +1 -1
  42. package/dist/lib/pricing.js +3 -1
  43. package/dist/lib/products.d.ts +6 -0
  44. package/dist/lib/products.d.ts.map +1 -1
  45. package/dist/lib/products.js +36 -32
  46. package/dist/pages/BookingPage.d.ts.map +1 -1
  47. package/dist/pages/BookingPage.js +306 -335
  48. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  49. package/dist/pages/CheckoutPage.js +154 -168
  50. package/dist/pages/HomePage.d.ts.map +1 -1
  51. package/dist/pages/HomePage.js +435 -378
  52. package/dist/storefront.css +1 -1
  53. package/package.json +1 -1
@@ -3,10 +3,9 @@ import { ResponsiveDialog as t, ResponsiveDialogContent as n, ResponsiveDialogDe
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";
6
- import { cn as d } from "@rpcbase/ui";
7
- import { CheckCircle2 as f, Info as p } from "lucide-react";
6
+ import { CheckCircle2 as d, Info as f } from "lucide-react";
8
7
  //#region src/components/StorefrontCancellationPolicyNotice/index.tsx
9
- var m = .95, h = "show_cancellation_policy_modal", g = (e) => e.tiers.length === 0 ? [] : [...e.tiers].sort((e, t) => e.upToHours - t.upToHours), _ = (e) => g(e).find((e) => e.refundPercentage >= m) ?? null, v = (e, t) => {
8
+ var p = .95, m = "show_cancellation_policy_modal", h = (e) => e.tiers.length === 0 ? [] : [...e.tiers].sort((e, t) => e.upToHours - t.upToHours), g = (e) => h(e).find((e) => e.refundPercentage >= p) ?? null, _ = (e, t) => {
10
9
  try {
11
10
  return new Intl.NumberFormat(t, {
12
11
  style: "percent",
@@ -16,108 +15,112 @@ var m = .95, h = "show_cancellation_policy_modal", g = (e) => e.tiers.length ===
16
15
  return `${Number.parseFloat((e * 100).toFixed(2))}%`;
17
16
  }
18
17
  };
19
- function y({ policy: m, className: y }) {
20
- let { t: b, i18n: x } = u(), [S, C] = l(), w = S.get(h) === "true", T = g(m), E = _(m), D = (e) => {
21
- let t = new URLSearchParams(S);
22
- e ? t.set(h, "true") : t.delete(h), C(t, { replace: !0 });
18
+ function v({ policy: p, className: v }) {
19
+ let { t: y, i18n: b } = u(), [x, S] = l(), C = x.get(m) === "true", w = h(p), T = g(p), E = (e) => {
20
+ let t = new URLSearchParams(x);
21
+ e ? t.set(m, "true") : t.delete(m), S(t, { replace: !0 });
23
22
  };
24
- if (!E) return null;
25
- let O = (e) => {
23
+ if (!T) return null;
24
+ let D = (e) => {
26
25
  let t = Math.max(1, Math.round(e));
27
- return t >= 72 && t % 24 == 0 ? b("cancellation_policy_duration_days", { count: t / 24 }) : b("cancellation_policy_duration_hours", { count: t });
26
+ return t >= 72 && t % 24 == 0 ? y("cancellation_policy_duration_days", { count: t / 24 }) : y("cancellation_policy_duration_hours", { count: t });
28
27
  };
29
28
  return /* @__PURE__ */ c("li", {
30
- className: d("flex items-start gap-3", y),
29
+ className: v,
31
30
  "data-testid": "storefront-cancellation-policy-notice",
32
- children: [
33
- /* @__PURE__ */ s(f, {
31
+ children: [/* @__PURE__ */ c("button", {
32
+ type: "button",
33
+ className: "group flex w-full cursor-pointer items-start gap-3 rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2",
34
+ "aria-label": y("cancellation_policy_info_aria_label"),
35
+ "aria-haspopup": "dialog",
36
+ "aria-expanded": C,
37
+ onClick: () => E(!0),
38
+ children: [/* @__PURE__ */ s(d, {
34
39
  className: "mt-0.5 h-5 w-5 shrink-0 text-success",
35
40
  "aria-hidden": "true"
36
- }),
37
- /* @__PURE__ */ c("div", {
41
+ }), /* @__PURE__ */ c("span", {
38
42
  className: "min-w-0 flex-1",
39
- children: [/* @__PURE__ */ c("div", {
43
+ children: [/* @__PURE__ */ c("span", {
40
44
  className: "flex min-w-0 items-start gap-1.5",
41
- children: [/* @__PURE__ */ s("p", {
45
+ children: [/* @__PURE__ */ s("span", {
42
46
  className: "min-w-0 text-sm font-medium text-slate-950",
43
- children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_teaser", { duration: O(E.upToHours) }) })
44
- }), /* @__PURE__ */ s("button", {
45
- type: "button",
46
- className: "mt-[-1px] inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-500 transition hover:bg-slate-100 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2",
47
- "aria-label": b("cancellation_policy_info_aria_label"),
48
- onClick: () => D(!0),
49
- children: /* @__PURE__ */ s(p, {
47
+ children: y("cancellation_policy_teaser", { duration: D(T.upToHours) })
48
+ }), /* @__PURE__ */ s("span", {
49
+ className: "mt-[-1px] inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-500 transition group-hover:bg-slate-100 group-hover:text-slate-950 group-focus-visible:bg-slate-100 group-focus-visible:text-slate-950",
50
+ children: /* @__PURE__ */ s(f, {
50
51
  className: "h-3.5 w-3.5",
51
52
  "aria-hidden": "true"
52
53
  })
53
54
  })]
54
- }), /* @__PURE__ */ s("p", {
55
- className: "text-xs text-slate-600",
56
- children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_teaser_description", { duration: O(E.upToHours) }) })
55
+ }), /* @__PURE__ */ s("span", {
56
+ className: "block text-xs text-slate-600",
57
+ children: y("cancellation_policy_teaser_description", { duration: D(T.upToHours) })
57
58
  })]
58
- }),
59
- /* @__PURE__ */ s(t, {
60
- open: w,
61
- onOpenChange: D,
62
- children: /* @__PURE__ */ s(n, {
63
- "data-testid": "storefront-cancellation-policy-modal",
64
- className: "overflow-hidden border-slate-200 bg-white p-0",
65
- desktopClassName: "max-w-lg gap-0",
66
- mobileClassName: "max-h-[92dvh] gap-0",
67
- children: /* @__PURE__ */ c("div", {
68
- className: "flex max-h-[90dvh] w-full min-w-0 flex-col",
69
- children: [
70
- /* @__PURE__ */ s(a, {
71
- className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
72
- children: /* @__PURE__ */ c("div", {
73
- className: "flex items-start gap-3",
74
- children: [/* @__PURE__ */ s(p, {
75
- className: "mt-0.5 h-5 w-5 shrink-0 text-success",
76
- "aria-hidden": "true"
77
- }), /* @__PURE__ */ c("span", {
78
- className: "min-w-0 space-y-1",
79
- children: [/* @__PURE__ */ s(o, {
80
- className: "text-left text-lg font-semibold leading-6 text-slate-950",
81
- children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_title") })
82
- }), /* @__PURE__ */ s(r, {
83
- className: "text-left text-sm text-slate-600",
84
- children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_description") })
85
- })]
59
+ })]
60
+ }), /* @__PURE__ */ s(t, {
61
+ open: C,
62
+ onOpenChange: E,
63
+ children: /* @__PURE__ */ s(n, {
64
+ "data-testid": "storefront-cancellation-policy-modal",
65
+ className: "overflow-hidden border-slate-200 bg-white p-0",
66
+ desktopClassName: "max-w-lg gap-0",
67
+ mobileClassName: "max-h-[92dvh] gap-0",
68
+ children: /* @__PURE__ */ c("div", {
69
+ className: "flex max-h-[90dvh] w-full min-w-0 flex-col",
70
+ children: [
71
+ /* @__PURE__ */ s(a, {
72
+ className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
73
+ children: /* @__PURE__ */ c("div", {
74
+ className: "flex items-start gap-3",
75
+ children: [/* @__PURE__ */ s(f, {
76
+ className: "mt-0.5 h-5 w-5 shrink-0 text-success",
77
+ "aria-hidden": "true"
78
+ }), /* @__PURE__ */ c("span", {
79
+ className: "min-w-0 space-y-1",
80
+ children: [/* @__PURE__ */ s(o, {
81
+ className: "text-left text-lg font-semibold leading-6 text-slate-950",
82
+ children: /* @__PURE__ */ s("span", { children: y("cancellation_policy_modal_title") })
83
+ }), /* @__PURE__ */ s(r, {
84
+ className: "text-left text-sm text-slate-600",
85
+ children: /* @__PURE__ */ s("span", { children: y("cancellation_policy_modal_description") })
86
86
  })]
87
- })
88
- }),
89
- /* @__PURE__ */ s("div", {
90
- className: "overflow-y-auto px-5 py-5 sm:px-6",
91
- children: /* @__PURE__ */ s("dl", {
92
- className: "grid gap-3",
93
- children: T.map((e) => /* @__PURE__ */ c("div", {
94
- className: "rounded-lg border border-slate-200 bg-slate-50 px-4 py-3",
95
- children: [/* @__PURE__ */ s("dt", {
96
- className: "text-sm font-medium text-slate-950",
97
- children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_tier_deadline", { duration: O(e.upToHours) }) })
98
- }), /* @__PURE__ */ s("dd", {
99
- className: "mt-1 text-sm text-slate-600",
100
- children: /* @__PURE__ */ s("span", { children: b("cancellation_policy_modal_tier_refund", { percentage: v(e.refundPercentage, x.language) }) })
101
- })]
102
- }, `${e.upToHours}-${e.refundPercentage}`))
103
- })
104
- }),
105
- /* @__PURE__ */ s(i, {
106
- className: "border-t border-slate-200 px-5 py-4 sm:px-6",
107
- children: /* @__PURE__ */ s(e, {
108
- type: "button",
109
- variant: "outline",
110
- className: "h-11 w-full rounded-xl sm:w-auto",
111
- onClick: () => D(!1),
112
- children: /* @__PURE__ */ s("span", { children: b("close_modal") })
113
- })
87
+ })]
114
88
  })
115
- ]
116
- })
89
+ }),
90
+ /* @__PURE__ */ c("div", {
91
+ className: "overflow-y-auto",
92
+ children: [/* @__PURE__ */ s("dl", {
93
+ className: "divide-y divide-slate-200 border-b border-slate-200 bg-slate-50",
94
+ children: w.map((e) => /* @__PURE__ */ c("div", {
95
+ className: "px-5 py-4 sm:px-6",
96
+ children: [/* @__PURE__ */ s("dt", {
97
+ className: "text-sm font-medium text-slate-950",
98
+ children: /* @__PURE__ */ s("span", { children: y("cancellation_policy_modal_tier_deadline", { duration: D(e.upToHours) }) })
99
+ }), /* @__PURE__ */ s("dd", {
100
+ className: "mt-1 text-sm text-slate-600",
101
+ children: /* @__PURE__ */ s("span", { children: y("cancellation_policy_modal_tier_refund", { percentage: _(e.refundPercentage, b.language) }) })
102
+ })]
103
+ }, `${e.upToHours}-${e.refundPercentage}`))
104
+ }), /* @__PURE__ */ s("p", {
105
+ className: "px-5 py-4 text-base leading-6 text-slate-500 sm:px-6",
106
+ children: /* @__PURE__ */ s("span", { children: y("cancellation_policy_modal_disclaimer") })
107
+ })]
108
+ }),
109
+ /* @__PURE__ */ s(i, {
110
+ className: "border-t border-slate-200 px-5 py-4 sm:px-6",
111
+ children: /* @__PURE__ */ s(e, {
112
+ type: "button",
113
+ variant: "outline",
114
+ className: "h-11 w-full rounded-xl sm:w-auto",
115
+ onClick: () => E(!1),
116
+ children: /* @__PURE__ */ s("span", { children: y("close_modal") })
117
+ })
118
+ })
119
+ ]
117
120
  })
118
121
  })
119
- ]
122
+ })]
120
123
  });
121
124
  }
122
125
  //#endregion
123
- export { y as StorefrontCancellationPolicyNotice, _ as resolveStorefrontCancellationPolicyTeaserTier };
126
+ export { v as StorefrontCancellationPolicyNotice, g as resolveStorefrontCancellationPolicyTeaserTier };
@@ -36,12 +36,12 @@ function m({ lines: m, itemCount: h, totalPerBaseUnitMinor: g, baseUnitLabel: _,
36
36
  m.length === 0 ? /* @__PURE__ */ s("p", {
37
37
  className: "text-sm text-slate-600",
38
38
  children: /* @__PURE__ */ s("span", { children: F("cart_empty") })
39
- }) : /* @__PURE__ */ s("div", {
40
- className: "grid gap-3",
39
+ }) : /* @__PURE__ */ s("ul", {
40
+ className: "divide-y divide-slate-200",
41
41
  children: m.map((i) => {
42
42
  let o = e(i.unitPriceMinor, I.language), l = i.insufficientCapacity === !0, u = i.availabilityIssue === "quantity_unavailable" ? F("availability_quantity_unavailable") : F("availability_out_of_stock");
43
- return /* @__PURE__ */ c("div", {
44
- className: "flex items-start justify-between gap-3 rounded-xl border border-slate-200 p-3",
43
+ return /* @__PURE__ */ c("li", {
44
+ className: "flex items-start justify-between gap-3 py-4 first:pt-0 last:pb-0",
45
45
  children: [/* @__PURE__ */ c("div", {
46
46
  className: "flex min-w-0 flex-1 flex-col gap-1",
47
47
  children: [
@@ -2,8 +2,9 @@ import { BikeProduct } from '../../lib/products';
2
2
  type StorefrontInsuranceNoticeProps = {
3
3
  bikes: BikeProduct[];
4
4
  currency: string;
5
+ fallbackLanguage?: string;
5
6
  className?: string;
6
7
  };
7
- export declare function StorefrontInsuranceNotice({ bikes, currency, className, }: StorefrontInsuranceNoticeProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function StorefrontInsuranceNotice({ bikes, currency, fallbackLanguage, className, }: StorefrontInsuranceNoticeProps): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -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,2CA+KhC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInsuranceNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAsC,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAOzF,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,GACV,EAAE,8BAA8B,2CA2KhC"}
@@ -1,187 +1,180 @@
1
- import { formatStorefrontPriceMinor as e } from "../../lib/pricing.js";
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-BJ0RG6gh.js";
4
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
- import { useSearchParams as u } from "@rpcbase/router";
6
- import { useTranslation as d } from "react-i18next";
7
- import { cn as f } from "@rpcbase/ui";
8
- import { CheckCircle2 as p, Info as m, Umbrella as h } from "lucide-react";
1
+ import { getLocalizedValue as e } from "../../localization.js";
2
+ import { findStorefrontInsurancePricingBike as t } from "../../lib/products.js";
3
+ import { formatStorefrontPriceMinor as n } from "../../lib/pricing.js";
4
+ import { Button as r } from "../../ui/button.js";
5
+ import { ResponsiveDialog as i, ResponsiveDialogContent as a, ResponsiveDialogDescription as o, ResponsiveDialogFooter as s, ResponsiveDialogHeader as c, ResponsiveDialogTitle as l } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BJ0RG6gh.js";
6
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ import { useSearchParams as f } from "@rpcbase/router";
8
+ import { useTranslation as p } from "react-i18next";
9
+ import { CheckCircle2 as m, Info as h, Umbrella as g } from "lucide-react";
9
10
  //#region src/components/StorefrontInsuranceNotice/index.tsx
10
- var g = "show_insurance_modal", _ = (e, t) => {
11
- let n = e.filter((e) => e.kind === t && e.insurance?.enabled).map((e) => e.insurance?.pricePerDayMinor).filter((e) => typeof e == "number");
12
- return [...new Set(n)].sort((e, t) => e - t);
13
- };
14
- function v({ bikes: v, currency: y, className: b }) {
15
- let { t: x, i18n: S } = d(), [C, w] = u(), T = C.get(g) === "true", E = (e) => {
16
- let t = new URLSearchParams(C);
17
- e ? t.set(g, "true") : t.delete(g), w(t, { replace: !0 });
18
- }, D = (t) => {
19
- let n = _(v, t);
20
- if (n.length === 0) return x("insurance_modal_price_unavailable");
21
- let r = n[0], i = n[n.length - 1], a = e(r, S.language, { currency: y });
22
- return r === i ? x("insurance_modal_price_per_day", { price: a }) : x("insurance_modal_price_range_per_day", {
23
- minimum_price: a,
24
- maximum_price: e(i, S.language, { currency: y })
25
- });
26
- }, O = [{
27
- kind: "bike",
28
- label: x("insurance_modal_muscular_bike"),
29
- price: D("bike")
30
- }, {
31
- kind: "e-bike",
32
- label: x("insurance_modal_electric_bike"),
33
- price: D("e-bike")
34
- }];
35
- return /* @__PURE__ */ l("li", {
36
- className: f("flex items-start gap-3", b),
11
+ var _ = "show_insurance_modal";
12
+ function v({ bikes: v, currency: y, fallbackLanguage: b, className: x }) {
13
+ let { t: S, i18n: C } = p(), [w, T] = f(), E = w.get(_) === "true", D = (e) => {
14
+ let t = new URLSearchParams(w);
15
+ e ? t.set(_, "true") : t.delete(_), T(t, { replace: !0 });
16
+ }, O = (r, i) => {
17
+ let a = t(v, r), o = a?.insurance?.pricePerDayMinor;
18
+ return {
19
+ kind: r,
20
+ label: (a ? e(a.name, C.language, b).trim() : "") || i,
21
+ price: typeof o == "number" ? S("insurance_modal_price_per_day", { price: n(o, C.language, { currency: y }) }) : S("insurance_modal_price_unavailable")
22
+ };
23
+ }, k = [O("bike", S("insurance_modal_muscular_bike")), O("e-bike", S("insurance_modal_electric_bike"))];
24
+ return /* @__PURE__ */ d("li", {
25
+ className: x,
37
26
  "data-testid": "storefront-insurance-notice",
38
- children: [
39
- /* @__PURE__ */ c(h, {
27
+ children: [/* @__PURE__ */ d("button", {
28
+ type: "button",
29
+ className: "group flex w-full cursor-pointer items-start gap-3 rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2",
30
+ "aria-label": S("insurance_info_aria_label"),
31
+ "aria-haspopup": "dialog",
32
+ "aria-expanded": E,
33
+ onClick: () => D(!0),
34
+ children: [/* @__PURE__ */ u(g, {
40
35
  className: "mt-0.5 h-5 w-5 shrink-0 text-success",
41
36
  "aria-hidden": "true"
42
- }),
43
- /* @__PURE__ */ l("div", {
37
+ }), /* @__PURE__ */ d("span", {
44
38
  className: "min-w-0 flex-1",
45
- children: [/* @__PURE__ */ l("div", {
39
+ children: [/* @__PURE__ */ d("span", {
46
40
  className: "flex min-w-0 items-start gap-1.5",
47
- children: [/* @__PURE__ */ c("p", {
41
+ children: [/* @__PURE__ */ u("span", {
48
42
  className: "min-w-0 text-sm font-medium text-slate-950",
49
- children: /* @__PURE__ */ c("span", { children: x("feature_guarantee_insurance_title") })
50
- }), /* @__PURE__ */ c("button", {
51
- type: "button",
52
- className: "mt-[-1px] inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-500 transition hover:bg-slate-100 hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2",
53
- "aria-label": x("insurance_info_aria_label"),
54
- onClick: () => E(!0),
55
- children: /* @__PURE__ */ c(m, {
43
+ children: S("feature_guarantee_insurance_title")
44
+ }), /* @__PURE__ */ u("span", {
45
+ className: "mt-[-1px] inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-slate-500 transition group-hover:bg-slate-100 group-hover:text-slate-950 group-focus-visible:bg-slate-100 group-focus-visible:text-slate-950",
46
+ children: /* @__PURE__ */ u(h, {
56
47
  className: "h-3.5 w-3.5",
57
48
  "aria-hidden": "true"
58
49
  })
59
50
  })]
60
- }), /* @__PURE__ */ c("p", {
61
- className: "text-xs text-slate-600",
62
- children: /* @__PURE__ */ c("span", { children: x("feature_guarantee_insurance_description") })
51
+ }), /* @__PURE__ */ u("span", {
52
+ className: "block text-xs text-slate-600",
53
+ children: S("feature_guarantee_insurance_description")
63
54
  })]
64
- }),
65
- /* @__PURE__ */ c(n, {
66
- open: T,
67
- onOpenChange: E,
68
- children: /* @__PURE__ */ c(r, {
69
- "data-testid": "storefront-insurance-modal",
70
- className: "overflow-hidden border-slate-200 bg-white p-0",
71
- desktopClassName: "max-w-xl gap-0",
72
- mobileClassName: "max-h-[92dvh] gap-0",
73
- children: /* @__PURE__ */ l("div", {
74
- className: "flex max-h-[90dvh] w-full min-w-0 flex-col",
75
- children: [
76
- /* @__PURE__ */ c(o, {
77
- className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
78
- children: /* @__PURE__ */ l("div", {
79
- className: "flex items-start gap-3",
80
- children: [/* @__PURE__ */ c(m, {
81
- className: "mt-0.5 h-5 w-5 shrink-0 text-success",
82
- "aria-hidden": "true"
83
- }), /* @__PURE__ */ l("span", {
84
- className: "min-w-0 space-y-1",
85
- children: [/* @__PURE__ */ c(s, {
86
- className: "text-left text-lg font-semibold leading-6 text-slate-950",
87
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_title") })
88
- }), /* @__PURE__ */ c(i, {
89
- className: "text-left text-sm text-slate-600",
90
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_description") })
91
- })]
55
+ })]
56
+ }), /* @__PURE__ */ u(i, {
57
+ open: E,
58
+ onOpenChange: D,
59
+ children: /* @__PURE__ */ u(a, {
60
+ "data-testid": "storefront-insurance-modal",
61
+ className: "overflow-hidden border-slate-200 bg-white p-0",
62
+ desktopClassName: "max-w-xl gap-0",
63
+ mobileClassName: "max-h-[92dvh] gap-0",
64
+ children: /* @__PURE__ */ d("div", {
65
+ className: "flex max-h-[90dvh] w-full min-w-0 flex-col",
66
+ children: [
67
+ /* @__PURE__ */ u(c, {
68
+ className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
69
+ children: /* @__PURE__ */ d("div", {
70
+ className: "flex items-start gap-3",
71
+ children: [/* @__PURE__ */ u(h, {
72
+ className: "mt-0.5 h-5 w-5 shrink-0 text-success",
73
+ "aria-hidden": "true"
74
+ }), /* @__PURE__ */ d("span", {
75
+ className: "min-w-0 space-y-1",
76
+ children: [/* @__PURE__ */ u(l, {
77
+ className: "text-left text-lg font-semibold leading-6 text-slate-950",
78
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_title") })
79
+ }), /* @__PURE__ */ u(o, {
80
+ className: "text-left text-sm text-slate-600",
81
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_description") })
92
82
  })]
93
- })
94
- }),
95
- /* @__PURE__ */ l("div", {
96
- className: "overflow-y-auto px-5 py-5 sm:px-6",
97
- children: [
98
- /* @__PURE__ */ l("section", { children: [
99
- /* @__PURE__ */ c("h3", {
100
- className: "text-sm font-semibold text-slate-950",
101
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_pricing_title") })
102
- }),
103
- /* @__PURE__ */ c("p", {
83
+ })]
84
+ })
85
+ }),
86
+ /* @__PURE__ */ d("div", {
87
+ className: "overflow-y-auto",
88
+ children: [
89
+ /* @__PURE__ */ d("section", {
90
+ className: "border-b border-slate-200 bg-slate-50",
91
+ "data-testid": "storefront-insurance-pricing-section",
92
+ children: [/* @__PURE__ */ d("div", {
93
+ className: "px-5 py-4 sm:px-6",
94
+ children: [/* @__PURE__ */ u("h3", {
95
+ className: "text-base font-semibold text-slate-950",
96
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_pricing_title") })
97
+ }), /* @__PURE__ */ u("p", {
104
98
  className: "mt-1 text-sm text-slate-600",
105
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_pricing_description") })
106
- }),
107
- /* @__PURE__ */ c("dl", {
108
- className: "mt-3 grid gap-3 sm:grid-cols-2",
109
- children: O.map((e) => /* @__PURE__ */ l("div", {
110
- className: "rounded-lg border border-slate-200 bg-slate-50 px-4 py-3",
111
- "data-testid": `storefront-insurance-price-${e.kind}`,
112
- children: [/* @__PURE__ */ c("dt", {
113
- className: "text-sm font-medium text-slate-950",
114
- children: /* @__PURE__ */ c("span", { children: e.label })
115
- }), /* @__PURE__ */ c("dd", {
116
- className: "mt-1 text-sm text-slate-600",
117
- children: /* @__PURE__ */ c("span", { children: e.price })
118
- })]
119
- }, e.kind))
120
- })
121
- ] }),
122
- /* @__PURE__ */ l("section", {
123
- className: "mt-5",
124
- children: [/* @__PURE__ */ c("h3", {
125
- className: "text-sm font-semibold text-slate-950",
126
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_coverage_title") })
127
- }), /* @__PURE__ */ c("ul", {
128
- className: "mt-2 grid gap-2",
129
- children: [
130
- x("insurance_modal_coverage_accidental_damage"),
131
- x("insurance_modal_coverage_assault_or_break_in"),
132
- x("insurance_modal_coverage_secured_bike_theft")
133
- ].map((e) => /* @__PURE__ */ l("li", {
134
- className: "flex items-start gap-2 text-sm text-slate-600",
135
- children: [/* @__PURE__ */ c(p, {
136
- className: "mt-0.5 h-4 w-4 shrink-0 text-success",
137
- "aria-hidden": "true"
138
- }), /* @__PURE__ */ c("span", { children: e })]
139
- }, e))
99
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_pricing_description") })
140
100
  })]
141
- }),
142
- /* @__PURE__ */ l("div", {
143
- className: "mt-5 grid gap-4 sm:grid-cols-2",
144
- children: [/* @__PURE__ */ l("section", {
145
- className: "rounded-lg border border-slate-200 px-4 py-3",
146
- children: [/* @__PURE__ */ c("h3", {
147
- className: "text-sm font-semibold text-slate-950",
148
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_claim_title") })
149
- }), /* @__PURE__ */ c("p", {
150
- className: "mt-1 text-sm text-slate-600",
151
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_claim_description") })
152
- })]
153
- }), /* @__PURE__ */ l("section", {
154
- className: "rounded-lg border border-slate-200 px-4 py-3",
155
- children: [/* @__PURE__ */ c("h3", {
156
- className: "text-sm font-semibold text-slate-950",
157
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_exclusions_title") })
158
- }), /* @__PURE__ */ c("p", {
101
+ }), /* @__PURE__ */ u("dl", {
102
+ className: "grid divide-y divide-slate-200 border-t border-slate-200 sm:grid-cols-2 sm:divide-x sm:divide-y-0",
103
+ children: k.map((e) => /* @__PURE__ */ d("div", {
104
+ className: "px-5 py-4 sm:px-6",
105
+ "data-testid": `storefront-insurance-price-${e.kind}`,
106
+ children: [/* @__PURE__ */ u("dt", {
107
+ className: "text-sm font-medium text-slate-950",
108
+ children: /* @__PURE__ */ u("span", { children: e.label })
109
+ }), /* @__PURE__ */ u("dd", {
159
110
  className: "mt-1 text-sm text-slate-600",
160
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_exclusions_description") })
111
+ children: /* @__PURE__ */ u("span", { children: e.price })
161
112
  })]
113
+ }, e.kind))
114
+ })]
115
+ }),
116
+ /* @__PURE__ */ d("section", {
117
+ className: "border-b border-slate-200 px-5 py-5 sm:px-6",
118
+ children: [/* @__PURE__ */ u("h3", {
119
+ className: "text-base font-semibold text-slate-950",
120
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_coverage_title") })
121
+ }), /* @__PURE__ */ u("ul", {
122
+ className: "mt-3 grid gap-2.5",
123
+ children: [
124
+ S("insurance_modal_coverage_accidental_damage"),
125
+ S("insurance_modal_coverage_assault_or_break_in"),
126
+ S("insurance_modal_coverage_secured_bike_theft")
127
+ ].map((e) => /* @__PURE__ */ d("li", {
128
+ className: "flex items-start gap-2 text-sm leading-5 text-slate-600",
129
+ children: [/* @__PURE__ */ u(m, {
130
+ className: "mt-0.5 h-4 w-4 shrink-0 text-success",
131
+ "aria-hidden": "true"
132
+ }), /* @__PURE__ */ u("span", { children: e })]
133
+ }, e))
134
+ })]
135
+ }),
136
+ /* @__PURE__ */ d("div", {
137
+ className: "grid divide-y divide-slate-200 border-b border-slate-200 sm:grid-cols-2 sm:divide-x sm:divide-y-0",
138
+ children: [/* @__PURE__ */ d("section", {
139
+ className: "px-5 py-5 sm:px-6",
140
+ children: [/* @__PURE__ */ u("h3", {
141
+ className: "text-base font-semibold text-slate-950",
142
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_claim_title") })
143
+ }), /* @__PURE__ */ u("p", {
144
+ className: "mt-2 text-sm leading-5 text-slate-600",
145
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_claim_description") })
146
+ })]
147
+ }), /* @__PURE__ */ d("section", {
148
+ className: "px-5 py-5 sm:px-6",
149
+ children: [/* @__PURE__ */ u("h3", {
150
+ className: "text-base font-semibold text-slate-950",
151
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_exclusions_title") })
152
+ }), /* @__PURE__ */ u("p", {
153
+ className: "mt-2 text-sm leading-5 text-slate-600",
154
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_exclusions_description") })
162
155
  })]
163
- }),
164
- /* @__PURE__ */ c("p", {
165
- className: "mt-4 rounded-lg bg-slate-100 px-4 py-3 text-xs leading-5 text-slate-600",
166
- children: /* @__PURE__ */ c("span", { children: x("insurance_modal_terms_note") })
167
- })
168
- ]
169
- }),
170
- /* @__PURE__ */ c(a, {
171
- className: "border-t border-slate-200 px-5 py-4 sm:px-6",
172
- children: /* @__PURE__ */ c(t, {
173
- type: "button",
174
- variant: "outline",
175
- className: "h-11 w-full rounded-xl sm:w-auto",
176
- onClick: () => E(!1),
177
- children: /* @__PURE__ */ c("span", { children: x("close_modal") })
156
+ })]
157
+ }),
158
+ /* @__PURE__ */ u("p", {
159
+ className: "bg-slate-50 px-5 py-4 text-base leading-6 text-slate-600 sm:px-6",
160
+ children: /* @__PURE__ */ u("span", { children: S("insurance_modal_terms_note") })
178
161
  })
162
+ ]
163
+ }),
164
+ /* @__PURE__ */ u(s, {
165
+ className: "border-t border-slate-200 px-5 py-4 sm:px-6",
166
+ children: /* @__PURE__ */ u(r, {
167
+ type: "button",
168
+ variant: "outline",
169
+ className: "h-11 w-full rounded-xl sm:w-auto",
170
+ onClick: () => D(!1),
171
+ children: /* @__PURE__ */ u("span", { children: S("close_modal") })
179
172
  })
180
- ]
181
- })
173
+ })
174
+ ]
182
175
  })
183
176
  })
184
- ]
177
+ })]
185
178
  });
186
179
  }
187
180
  //#endregion
package/dist/i18n/en.d.ts CHANGED
@@ -19,6 +19,12 @@ export declare const storefront: {
19
19
  checkout_button: string;
20
20
  storefront_popup_title_fallback: string;
21
21
  status_open: string;
22
+ status_closed: string;
23
+ status_hours_unavailable: string;
24
+ status_opens_at: string;
25
+ status_opens_at_tomorrow: string;
26
+ status_opens_on: string;
27
+ status_opens_on_date: string;
22
28
  business_hours_modal_title: string;
23
29
  business_hours_modal_description: string;
24
30
  business_hours_google_maps_note: string;
@@ -40,7 +46,6 @@ export declare const storefront: {
40
46
  insurance_modal_muscular_bike: string;
41
47
  insurance_modal_electric_bike: string;
42
48
  insurance_modal_price_per_day: string;
43
- insurance_modal_price_range_per_day: string;
44
49
  insurance_modal_price_unavailable: string;
45
50
  insurance_modal_coverage_title: string;
46
51
  insurance_modal_coverage_accidental_damage: string;
@@ -58,6 +63,7 @@ export declare const storefront: {
58
63
  cancellation_policy_modal_description: string;
59
64
  cancellation_policy_modal_tier_deadline: string;
60
65
  cancellation_policy_modal_tier_refund: string;
66
+ cancellation_policy_modal_disclaimer: string;
61
67
  cancellation_policy_duration_hours_one: string;
62
68
  cancellation_policy_duration_hours_other: string;
63
69
  cancellation_policy_duration_days_one: string;
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ftB,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmgBtB,CAAA"}