@loczer/storefront-sdk 0.170.0 → 0.172.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 (36) hide show
  1. package/dist/chunks/ui/dist/{Dialog-CR_9vgBQ.js → Dialog-Dick1QiI.js} +3 -3
  2. package/dist/chunks/ui/dist/Drawer/{index-BxM7gmh_.js → index-C1-jGB62.js} +3 -3
  3. package/dist/chunks/ui/dist/{MorphingModalWizard-CPLr3dh2.js → MorphingModalWizard-V0zTc513.js} +1 -1
  4. package/dist/chunks/ui/dist/{ResponsiveDialog-DhFgsW_0.js → ResponsiveDialog-CYvYFO09.js} +2 -2
  5. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/popup/{DialogPopup-Ce1MaHNd.js → DialogPopup-BcVKH4Ue.js} +1 -1
  6. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/portal/{DialogPortal-DCoXyUCa.js → DialogPortal-DrO6okKE.js} +1 -1
  7. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/root/{DialogRoot-DYrthiUT.js → DialogRoot-BknOXghA.js} +1 -1
  8. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/root/{useDialogRoot-Dmki7CJG.js → useDialogRoot-B-GtnDcK.js} +1 -1
  9. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/drawer/popup/{DrawerPopup-BXOe4Llu.js → DrawerPopup-CQgmpMbk.js} +1 -1
  10. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/drawer/portal/{DrawerPortal-BfTFM1p8.js → DrawerPortal-CU-cCvvG.js} +1 -1
  11. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/drawer/root/{DrawerRoot-DuO16Hl3.js → DrawerRoot-BKYspE2s.js} +1 -1
  12. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/{FloatingFocusManager-B-v_gyUI.js → FloatingFocusManager-CVchZf30.js} +2 -2
  13. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/{FloatingPortal-6JOqLjHM.js → FloatingPortal-CFYgcT1n.js} +1 -1
  14. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/{useDismiss-BzvyAPc1.js → useDismiss-CZ9KGH30.js} +13 -13
  15. package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/{tabbable-BUkXLKOZ.js → tabbable-Cepxs8CW.js} +9 -9
  16. package/dist/components/BookingBikeVariantDialog/index.js +1 -1
  17. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +3 -3
  18. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  19. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +38 -38
  20. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +3 -3
  21. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  22. package/dist/components/PoweredByLoczerBadge/index.js +22 -22
  23. package/dist/components/ProductWarningNotice/index.js +6 -6
  24. package/dist/components/StorefrontCancellationPolicyNotice/index.js +1 -1
  25. package/dist/components/StorefrontPopupMessages/index.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/pages/CheckoutPaymentPage.js +1 -1
  28. package/dist/pages/HomePage.d.ts.map +1 -1
  29. package/dist/pages/HomePage.js +19 -11
  30. package/dist/pages/PaymentLinkSuccessPage.js +1 -1
  31. package/dist/storefront.css +1 -1
  32. package/dist/ui/day-picker.d.ts.map +1 -1
  33. package/dist/ui/day-picker.js +16 -21
  34. package/dist/ui/drawer.d.ts.map +1 -1
  35. package/dist/ui/drawer.js +59 -64
  36. package/package.json +3 -3
@@ -1,21 +1,21 @@
1
1
  import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
2
  import { useId as h } from "react";
3
- import { cn as C } from "@rpcbase/ui";
3
+ import { cn as n } from "@rpcbase/ui";
4
4
  import { useTranslation as c } from "react-i18next";
5
5
  import { I18nProvider as p } from "../../i18n/I18nProvider.js";
6
6
  const f = "https://loczer.com";
7
- function m({ className: r }) {
8
- const t = h();
7
+ function m({ className: t }) {
8
+ const r = h();
9
9
  return /* @__PURE__ */ o(
10
10
  "svg",
11
11
  {
12
12
  viewBox: "0 0 128 128",
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
- className: r,
14
+ className: t,
15
15
  "aria-hidden": "true",
16
16
  focusable: "false",
17
17
  children: [
18
- /* @__PURE__ */ e("rect", { width: "128", height: "128", rx: "28", fill: `url(#${t})` }),
18
+ /* @__PURE__ */ e("rect", { width: "128", height: "128", rx: "28", fill: `url(#${r})` }),
19
19
  /* @__PURE__ */ e(
20
20
  "path",
21
21
  {
@@ -23,26 +23,26 @@ function m({ className: r }) {
23
23
  fill: "white"
24
24
  }
25
25
  ),
26
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ o("linearGradient", { id: t, x1: "0", y1: "0", x2: "128", y2: "128", gradientUnits: "userSpaceOnUse", children: [
27
- /* @__PURE__ */ e("stop", { stopColor: "#193CB8" }),
28
- /* @__PURE__ */ e("stop", { offset: "1", stopColor: "#193CB8", stopOpacity: "0.7" })
26
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ o("linearGradient", { id: r, x1: "0", y1: "0", x2: "128", y2: "128", gradientUnits: "userSpaceOnUse", children: [
27
+ /* @__PURE__ */ e("stop", { stopColor: "hsl(var(--brand-primary))" }),
28
+ /* @__PURE__ */ e("stop", { offset: "1", stopColor: "hsl(var(--brand-primary))", stopOpacity: "0.7" })
29
29
  ] }) })
30
30
  ]
31
31
  }
32
32
  );
33
33
  }
34
34
  function v({
35
- language: r,
36
- ...t
35
+ language: t,
36
+ ...r
37
37
  }) {
38
- return /* @__PURE__ */ e(p, { initialLanguage: r, children: /* @__PURE__ */ e(w, { ...t }) });
38
+ return /* @__PURE__ */ e(p, { initialLanguage: t, children: /* @__PURE__ */ e(w, { ...r }) });
39
39
  }
40
40
  function w({
41
- className: r,
42
- href: t = f,
43
- markClassName: n,
44
- rel: s = "noopener noreferrer",
45
- showTagline: a = !0,
41
+ className: t,
42
+ href: r = f,
43
+ markClassName: C,
44
+ rel: a = "noopener noreferrer",
45
+ showTagline: s = !0,
46
46
  target: l = "_blank",
47
47
  ...d
48
48
  }) {
@@ -50,19 +50,19 @@ function w({
50
50
  return /* @__PURE__ */ o(
51
51
  "a",
52
52
  {
53
- className: C(
53
+ className: n(
54
54
  "group inline-flex w-fit items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-3 py-2 shadow-sm transition hover:border-white/20 hover:bg-white/10",
55
- r
55
+ t
56
56
  ),
57
- href: t,
57
+ href: r,
58
58
  target: l,
59
- rel: s,
59
+ rel: a,
60
60
  ...d,
61
61
  children: [
62
- /* @__PURE__ */ e(m, { className: C("h-8 w-8 flex-shrink-0", n) }),
62
+ /* @__PURE__ */ e(m, { className: n("h-8 w-8 flex-shrink-0", C) }),
63
63
  /* @__PURE__ */ o("span", { className: "flex flex-col items-start leading-tight text-left", children: [
64
64
  /* @__PURE__ */ e("span", { className: "font-medium text-white/90 group-hover:text-white", children: i("platform_footer_powered_by") }),
65
- a ? /* @__PURE__ */ e("span", { className: "text-xs text-white/60 group-hover:text-white/80", children: i("platform_footer_tagline") }) : null
65
+ s ? /* @__PURE__ */ e("span", { className: "text-xs text-white/60 group-hover:text-white/80", children: i("platform_footer_tagline") }) : null
66
66
  ] })
67
67
  ]
68
68
  }
@@ -1,14 +1,14 @@
1
1
  import { jsxs as t, jsx as n } from "react/jsx-runtime";
2
2
  import { AlertCircle as a } from "lucide-react";
3
- import { cn as o } from "@rpcbase/ui";
4
- function c({ warning: e, className: i }) {
5
- const r = e?.trim();
3
+ import { cn as l } from "@rpcbase/ui";
4
+ function c({ warning: i, className: e }) {
5
+ const r = i?.trim();
6
6
  return r ? /* @__PURE__ */ t(
7
7
  "p",
8
8
  {
9
- className: o(
10
- "text-xs leading-snug text-orange-700",
11
- i
9
+ className: l(
10
+ "text-xs leading-snug text-warning",
11
+ e
12
12
  ),
13
13
  children: [
14
14
  /* @__PURE__ */ n(a, { className: "mr-1 inline h-3.5 w-3.5 align-[-0.125em]", "aria-hidden": "true" }),
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as f } from "react";
3
- import { ResponsiveDialog as x, ResponsiveDialogContent as g, ResponsiveDialogHeader as _, ResponsiveDialogTitle as N, ResponsiveDialogDescription as b, ResponsiveDialogFooter as y } from "../../chunks/ui/dist/ResponsiveDialog-DhFgsW_0.js";
3
+ import { ResponsiveDialog as x, ResponsiveDialogContent as g, ResponsiveDialogHeader as _, ResponsiveDialogTitle as N, ResponsiveDialogDescription as b, ResponsiveDialogFooter as y } from "../../chunks/ui/dist/ResponsiveDialog-CYvYFO09.js";
4
4
  import { cn as v } from "@rpcbase/ui";
5
5
  import { CheckCircle2 as w, Info as d } from "lucide-react";
6
6
  import { useTranslation as T } from "react-i18next";
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
2
  import { useState as S, useEffect as $ } from "react";
3
- import { ResponsiveDialog as R, ResponsiveDialogContent as E, ResponsiveDialogHeader as D, ResponsiveDialogTitle as I, ResponsiveDialogDescription as P, ResponsiveDialogFooter as O } from "../../chunks/ui/dist/ResponsiveDialog-DhFgsW_0.js";
3
+ import { ResponsiveDialog as R, ResponsiveDialogContent as E, ResponsiveDialogHeader as D, ResponsiveDialogTitle as I, ResponsiveDialogDescription as P, ResponsiveDialogFooter as O } from "../../chunks/ui/dist/ResponsiveDialog-CYvYFO09.js";
4
4
  import { useParams as j, useLocation as z } from "@rpcbase/router";
5
5
  import { cn as x } from "@rpcbase/ui";
6
6
  import { X as H, Info as L } from "lucide-react";
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ import "react-i18next";
43
43
  import { getLocalizedEntry as gt, getLocalizedValue as Pt } from "./localization.js";
44
44
  import { Badge as xt, badgeVariants as Ct } from "./ui/badge.js";
45
45
  import { Button as Dt, buttonVariants as At } from "./ui/button.js";
46
- import "./chunks/ui/dist/ResponsiveDialog-DhFgsW_0.js";
46
+ import "./chunks/ui/dist/ResponsiveDialog-CYvYFO09.js";
47
47
  import { Card as Et, CardAction as bt, CardContent as Bt, CardDescription as kt, CardFooter as yt, CardHeader as It, CardTitle as _t } from "./ui/card.js";
48
48
  import { loader as Mt, useOptionalStorefront as Lt, useStorefront as Ut, useStorefrontBookingProducts as vt, useStorefrontConfig as Nt, useStorefrontProducts as qt, useStorefrontWorkspaceLanguage as Vt } from "./StorefrontProvider.js";
49
49
  import { RadioGroup as zt, RadioGroupItem as Ht } from "./ui/radio-group.js";
@@ -149,7 +149,7 @@ function Be() {
149
149
  ] }),
150
150
  /* @__PURE__ */ e(N, { to: v, children: /* @__PURE__ */ e(S, { variant: "outline", children: /* @__PURE__ */ e("span", { children: t("checkout_payment_return_back_to_checkout") }) }) })
151
151
  ] }) }) });
152
- const B = typeof r.amountMinor == "number" && r.currency ? ge(r.amountMinor, r.currency, u.language) : null, w = o === "authorized" || o === "succeeded", L = o === "failed" || o === "cancelled", Y = w ? re : L ? se : ne, H = w ? "text-emerald-600" : L ? "text-destructive" : "text-amber-600";
152
+ const B = typeof r.amountMinor == "number" && r.currency ? ge(r.amountMinor, r.currency, u.language) : null, w = o === "authorized" || o === "succeeded", L = o === "failed" || o === "cancelled", Y = w ? re : L ? se : ne, H = w ? "text-emerald-600" : L ? "text-destructive" : "text-warning";
153
153
  return /* @__PURE__ */ e("div", { className: "mx-auto max-w-5xl px-4 py-10 sm:px-6", children: /* @__PURE__ */ n("div", { className: "grid gap-6 lg:grid-cols-[1fr_1fr]", children: [
154
154
  /* @__PURE__ */ e(y, { className: "border-slate-200 bg-white p-5 shadow-sm", children: /* @__PURE__ */ n("div", { className: "space-y-5", children: [
155
155
  /* @__PURE__ */ n("div", { className: "inline-flex items-center gap-2 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700", children: [
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA6GA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAyqB/B"}
1
+ {"version":3,"file":"HomePage.d.ts","sourceRoot":"","sources":["../../src/pages/HomePage.tsx"],"names":[],"mappings":"AA6GA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CA6qB/B"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs as r, jsx as e, Fragment as oe } from "react/jsx-runtime";
2
- import { useMemo as h, useState as b, useRef as Ue, useEffect as je } from "react";
2
+ import { useMemo as h, useState as b, useRef as je, useEffect as Ue } from "react";
3
3
  import { useMediaQuery as Ve } from "@rpcbase/client";
4
4
  import { useParams as ze, useLocation as Ye, useSearchParams as Qe, useNavigate as We, Link as M } from "@rpcbase/router";
5
5
  import { cn as m } from "@rpcbase/ui";
@@ -74,7 +74,7 @@ function da() {
74
74
  ), [F, Pe] = b(() => f.get("start_time") ?? c.start_time), [O, Ce] = b(() => {
75
75
  const t = E(f.get("start_date")) ?? N;
76
76
  return E(f.get("end_date")) ?? t ?? ye;
77
- }), [$, De] = b(() => f.get("end_time") ?? c.end_time), [S, I] = b(() => q.start_address), [P, H] = b(() => q.end_address), U = Ue(null), Ae = h(() => u.slice(0, 4), [u]), { heroMode: X } = kt(), C = X === "vertical_marquee_hero", _ = X === "booking_bar_overlay_hero" || C, Z = Ve("(min-width: 1024px)"), Ee = _t(l), Be = h(
77
+ }), [$, De] = b(() => f.get("end_time") ?? c.end_time), [S, I] = b(() => q.start_address), [P, H] = b(() => q.end_address), j = je(null), Ae = h(() => u.slice(0, 4), [u]), { heroMode: X } = kt(), C = X === "vertical_marquee_hero", _ = X === "booking_bar_overlay_hero" || C, Z = Ve("(min-width: 1024px)"), Ee = _t(l), Be = h(
78
78
  () => ({
79
79
  startDate: a("booking_start_date"),
80
80
  pickStartDate: a("booking_start_date"),
@@ -109,7 +109,7 @@ function da() {
109
109
  L,
110
110
  F
111
111
  ]), ee = B.toString(), Te = ee ? `?${ee}` : "";
112
- je(() => {
112
+ Ue(() => {
113
113
  Nt(l, B);
114
114
  }, [B, l]);
115
115
  const Me = {
@@ -122,13 +122,13 @@ function da() {
122
122
  endTime: $,
123
123
  onEndTimeChange: De,
124
124
  onEndTimeCommit: () => {
125
- U.current?.focus({ preventScroll: !0 });
125
+ j.current?.focus({ preventScroll: !0 });
126
126
  },
127
127
  bookingPeriodConfig: ke,
128
128
  fetchTimeSlots: Ee,
129
129
  labels: Be,
130
130
  localeCode: i.language
131
- }, j = () => {
131
+ }, U = () => {
132
132
  const t = new URLSearchParams(R);
133
133
  for (const [n, s] of B.entries())
134
134
  t.set(n, s);
@@ -187,7 +187,7 @@ function da() {
187
187
  /* @__PURE__ */ e(ht, {}),
188
188
  /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(pt, {}) }),
189
189
  /* @__PURE__ */ e(gt, {}),
190
- n ? /* @__PURE__ */ r(me, { ref: U, className: m("gap-2", s), onClick: j, children: [
190
+ n ? /* @__PURE__ */ r(me, { ref: j, className: m("gap-2", s), onClick: U, children: [
191
191
  /* @__PURE__ */ e("span", { children: a("booking_submit") }),
192
192
  /* @__PURE__ */ e(z, { className: "h-4 w-4", "aria-hidden": "true" })
193
193
  ] }) : null
@@ -233,10 +233,18 @@ function da() {
233
233
  }),
234
234
  Re,
235
235
  /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("booking_minimum_duration", { hours: 4 }) }) }),
236
- /* @__PURE__ */ r(me, { ref: U, className: "h-11 rounded-xl text-sm font-semibold gap-2", onClick: j, children: [
237
- /* @__PURE__ */ e("span", { children: a("booking_submit") }),
238
- /* @__PURE__ */ e(z, { className: "h-4 w-4", "aria-hidden": "true" })
239
- ] })
236
+ /* @__PURE__ */ r(
237
+ me,
238
+ {
239
+ ref: j,
240
+ className: "h-11 w-fit justify-self-start rounded-xl text-sm font-semibold gap-2",
241
+ onClick: U,
242
+ children: [
243
+ /* @__PURE__ */ e("span", { children: a("booking_submit") }),
244
+ /* @__PURE__ */ e(z, { className: "h-4 w-4", "aria-hidden": "true" })
245
+ ]
246
+ }
247
+ )
240
248
  ] })
241
249
  ] }), ie = /* @__PURE__ */ e(he, { className: "border-slate-200 bg-white/95 shadow-xl", children: /* @__PURE__ */ r("div", { className: "grid gap-3 p-4", children: [
242
250
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
@@ -477,7 +485,7 @@ function da() {
477
485
  detailsPath: te(t.slug),
478
486
  productDetailsLinkState: T,
479
487
  fallbackLanguage: o,
480
- onAction: j
488
+ onAction: U
481
489
  },
482
490
  t.id
483
491
  )) })
@@ -116,7 +116,7 @@ function J() {
116
116
  /* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: s("secure_payment_link.confirmation_loading_description") }) })
117
117
  ] })
118
118
  ] }) : /* @__PURE__ */ i("div", { className: "space-y-6 text-center", children: [
119
- /* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(n === "succeeded" || n === "authorized" ? K : n === "failed" || n === "cancelled" ? R : T, { className: `h-6 w-6 ${n === "succeeded" || n === "authorized" ? "text-emerald-600" : n === "failed" || n === "cancelled" ? "text-destructive" : "text-amber-600"}`, "aria-hidden": "true" }) }),
119
+ /* @__PURE__ */ e("div", { className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-slate-100", children: /* @__PURE__ */ e(n === "succeeded" || n === "authorized" ? K : n === "failed" || n === "cancelled" ? R : T, { className: `h-6 w-6 ${n === "succeeded" || n === "authorized" ? "text-emerald-600" : n === "failed" || n === "cancelled" ? "text-destructive" : "text-warning"}`, "aria-hidden": "true" }) }),
120
120
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
121
121
  /* @__PURE__ */ e("h1", { className: "text-2xl font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: s(`secure_payment_link.success_titles.${n}`) }) }),
122
122
  /* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: s(`secure_payment_link.statuses.${n}`) }) })