@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
@@ -236,6 +236,15 @@ export declare function useStorefrontConfig(): {
236
236
  autoTranslated?: boolean | undefined;
237
237
  }> | undefined;
238
238
  } | undefined;
239
+ information?: {
240
+ rentalTerms?: {
241
+ version: 1;
242
+ json: string;
243
+ html: string;
244
+ text: string;
245
+ } | undefined;
246
+ rentalTermsUpdatedAt?: string | null | undefined;
247
+ } | undefined;
239
248
  modules?: {
240
249
  reviews?: {
241
250
  enabled: boolean;
@@ -463,6 +472,15 @@ export declare function useStorefrontConfig(): {
463
472
  autoTranslated?: boolean | undefined;
464
473
  }> | undefined;
465
474
  } | undefined;
475
+ information?: {
476
+ rentalTerms?: {
477
+ version: 1;
478
+ json: string;
479
+ html: string;
480
+ text: string;
481
+ } | undefined;
482
+ rentalTermsUpdatedAt?: string | null | undefined;
483
+ } | undefined;
466
484
  modules?: {
467
485
  reviews?: {
468
486
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"StorefrontContext.d.ts","sourceRoot":"","sources":["../src/StorefrontContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAGzG,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;IAChC,WAAW,EAAE,0BAA0B,EAAE,CAAA;IACzC,mBAAmB,EAAE,0BAA0B,EAAE,CAAA;CAClD,CAAA;AAUD,eAAO,MAAM,iBAAiB,6CAEmC,CAAA;AAKjE,wBAAgB,aAAa,2BAQ5B;AAED,wBAAgB,qBAAqB,uCAEpC;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C;AAED,wBAAgB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvC"}
1
+ {"version":3,"file":"StorefrontContext.d.ts","sourceRoot":"","sources":["../src/StorefrontContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AAGzG,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;IAChC,WAAW,EAAE,0BAA0B,EAAE,CAAA;IACzC,mBAAmB,EAAE,0BAA0B,EAAE,CAAA;CAClD,CAAA;AAUD,eAAO,MAAM,iBAAiB,6CAEmC,CAAA;AAKjE,wBAAgB,aAAa,2BAQ5B;AAED,wBAAgB,qBAAqB,uCAEpC;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C;AAED,wBAAgB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvC"}
@@ -217,6 +217,15 @@ export declare const loader: ({ ctx, params }: import('@rpcbase/client').LoaderA
217
217
  autoTranslated?: boolean | undefined;
218
218
  }> | undefined;
219
219
  } | undefined;
220
+ information?: {
221
+ rentalTerms?: {
222
+ version: 1;
223
+ json: string;
224
+ html: string;
225
+ text: string;
226
+ } | undefined;
227
+ rentalTermsUpdatedAt?: string | null | undefined;
228
+ } | undefined;
220
229
  modules?: {
221
230
  reviews?: {
222
231
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../src/StorefrontProvider.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFA,CAAA;AAGnB,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAqBzC;AAED,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"StorefrontProvider.d.ts","sourceRoot":"","sources":["../src/StorefrontProvider.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiFA,CAAA;AAGnB,MAAM,CAAC,OAAO,UAAU,kBAAkB,4CAqBzC;AAED,cAAc,qBAAqB,CAAA"}
@@ -69,11 +69,14 @@ var h = r.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s.Backdrop
69
69
  }));
70
70
  h.displayName = "DrawerOverlay";
71
71
  var g = r.forwardRef(({ className: u, children: d, overlayClassName: f, showHandle: m = !0, ...g }, _) => {
72
- let v = r.useContext(c), y = r.useContext(l);
73
- t(y.open && y.modal === !0);
74
- let b = e("bg-background pointer-events-auto fixed z-50 flex flex-col gap-4 shadow-lg outline-none", "group/drawer-content data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=top]:slide-in-from-top data-[vaul-drawer-direction=top]:data-[closed]:slide-out-to-top", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:max-h-[95dvh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=bottom]:slide-in-from-bottom data-[vaul-drawer-direction=bottom]:data-[closed]:slide-out-to-bottom", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:slide-in-from-right data-[vaul-drawer-direction=right]:data-[closed]:slide-out-to-right data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:slide-in-from-left data-[vaul-drawer-direction=left]:data-[closed]:slide-out-to-left data-[vaul-drawer-direction=left]:sm:max-w-sm", u), x = m ? /* @__PURE__ */ a("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }) : null;
72
+ let v = r.useContext(c), y = r.useContext(l), [b, x] = r.useState(y.open);
73
+ r.useEffect(() => {
74
+ y.open && x(!0);
75
+ }, [y.open]), t(y.open && y.modal === !0);
76
+ let S = e("bg-background pointer-events-auto fixed z-50 flex flex-col gap-4 shadow-lg outline-none", "group/drawer-content data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=top]:slide-in-from-top data-[vaul-drawer-direction=top]:data-[closed]:slide-out-to-top", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:max-h-[95dvh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=bottom]:slide-in-from-bottom data-[vaul-drawer-direction=bottom]:data-[closed]:slide-out-to-bottom", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:slide-in-from-right data-[vaul-drawer-direction=right]:data-[closed]:slide-out-to-right data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:slide-in-from-left data-[vaul-drawer-direction=left]:data-[closed]:slide-out-to-left data-[vaul-drawer-direction=left]:sm:max-w-sm", u), C = m ? /* @__PURE__ */ a("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }) : null;
75
77
  return /* @__PURE__ */ a(n, {
76
78
  enabled: y.open,
79
+ keepMounted: b,
77
80
  inline: /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("div", {
78
81
  "data-slot": "drawer-overlay",
79
82
  className: e("pointer-events-auto fixed inset-0 z-50 bg-black/80 outline-none data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0", f),
@@ -87,11 +90,11 @@ var g = r.forwardRef(({ className: u, children: d, overlayClassName: f, showHand
87
90
  role: "dialog",
88
91
  "aria-modal": "true",
89
92
  "data-vaul-drawer-direction": v,
90
- className: b,
93
+ className: S,
91
94
  "data-open": "",
92
95
  "data-state": "open",
93
96
  ...g,
94
- children: [x, /* @__PURE__ */ a("div", {
97
+ children: [C, /* @__PURE__ */ a("div", {
95
98
  "data-slot": "drawer-content-inner",
96
99
  children: d
97
100
  })]
@@ -107,13 +110,13 @@ var g = r.forwardRef(({ className: u, children: d, overlayClassName: f, showHand
107
110
  role: "dialog",
108
111
  "aria-modal": "true",
109
112
  "data-vaul-drawer-direction": v,
110
- className: b,
113
+ className: S,
111
114
  render: (e, t) => /* @__PURE__ */ a("div", {
112
115
  ...e,
113
116
  "data-state": t.open ? "open" : "closed"
114
117
  }),
115
118
  ...g,
116
- children: [x, /* @__PURE__ */ a(s.Content, {
119
+ children: [C, /* @__PURE__ */ a(s.Content, {
117
120
  "data-slot": "drawer-content-inner",
118
121
  children: d
119
122
  })]
@@ -1,6 +1,6 @@
1
1
  import { cn as e } from "./lib/utils-DXB19bzk.js";
2
2
  import { Dialog as t, DialogClose as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, DialogTrigger as c } from "./Dialog-CczmPDwY.js";
3
- import { Drawer as l, DrawerClose as u, DrawerContent as d, DrawerDescription as f, DrawerFooter as p, DrawerHeader as m, DrawerTitle as h, DrawerTrigger as g } from "./Drawer/index-CSvSVP_J.js";
3
+ import { Drawer as l, DrawerClose as u, DrawerContent as d, DrawerDescription as f, DrawerFooter as p, DrawerHeader as m, DrawerTitle as h, DrawerTrigger as g } from "./Drawer/index-Dp62Y2o5.js";
4
4
  import { useMediaQuery as _ } from "./lib/useMediaQuery-CrZFwD6A.js";
5
5
  import * as v from "react";
6
6
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BikeProductCard/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AASrD,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,cAA8B,EAC9B,QAAQ,EACR,cAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,OAAmB,EACnB,MAAM,GACP,EAAE,oBAAoB,2CAoFtB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BikeProductCard/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AASrD,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,cAA8B,EAC9B,QAAQ,EACR,cAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,OAAmB,EACnB,MAAM,GACP,EAAE,oBAAoB,2CAuFtB"}
@@ -13,14 +13,14 @@ import { ArrowRight as f, Bike as p, Plus as m } from "lucide-react";
13
13
  function h({ bike: h, className: g, detailsPath: _, productDetailsLinkState: v, actionLabelKey: y = "product_cta", onAction: b, actionDisabled: x = !1, availabilityLabel: S, fallbackLanguage: C, variant: w = "default", testId: T }) {
14
14
  let { t: E, i18n: D } = u(), O = e(h.name, D.language, C), k = e(h.description, D.language, C), A = typeof h.images?.[0] == "string" ? h.images[0].trim() : "", j = a(h.primaryImageStyle), M = t(h.availabilityStatus), N = w === "booking", P = h.availabilityStatus === "OUT_OF_STOCK";
15
15
  return /* @__PURE__ */ c("div", {
16
- className: d("flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm", g),
16
+ className: d("flex h-full min-w-0 flex-col gap-3 rounded-xl border border-slate-200 bg-white p-3 shadow-sm", g),
17
17
  "data-testid": T,
18
18
  children: [/* @__PURE__ */ c("div", {
19
- className: "flex flex-1 items-stretch gap-4",
19
+ className: "flex min-w-0 flex-1 flex-col gap-3 sm:flex-row sm:items-stretch sm:gap-4",
20
20
  children: [/* @__PURE__ */ s("div", {
21
- className: "w-24 shrink-0 sm:w-28",
21
+ className: "w-full min-w-0 sm:w-28 sm:shrink-0",
22
22
  children: /* @__PURE__ */ c("div", {
23
- className: d("relative h-full min-h-20 overflow-hidden rounded-xl", j.className),
23
+ className: d("relative aspect-[1618/1000] min-h-20 overflow-hidden rounded-xl sm:h-full sm:aspect-auto", j.className),
24
24
  style: j.style,
25
25
  children: [A ? /* @__PURE__ */ s("img", {
26
26
  src: A,
@@ -48,7 +48,7 @@ function h({ bike: h, className: g, detailsPath: _, productDetailsLinkState: v,
48
48
  }),
49
49
  /* @__PURE__ */ s(i, {
50
50
  prices: h.prices,
51
- className: "self-start"
51
+ className: "max-w-full self-start"
52
52
  }),
53
53
  /* @__PURE__ */ s("p", {
54
54
  className: "line-clamp-2 text-xs text-slate-600",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeVariantDialog/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAiB3D,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,kBAAkB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAA;CAChE,CAAA;AAWD,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,iCAAiC,GAAG,IAAI,CAAA;IACjD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,2BAA2B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClE,sBAAsB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IACvD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5D,CAAA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,2BAA2B,EAC3B,sBAAsB,EACtB,WAAmB,EACnB,YAAY,GACb,EAAE,6BAA6B,kDAiO/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeVariantDialog/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAiB3D,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,kBAAkB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAA;CAChE,CAAA;AAWD,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,iCAAiC,GAAG,IAAI,CAAA;IACjD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,2BAA2B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClE,sBAAsB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IACvD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5D,CAAA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,2BAA2B,EAC3B,sBAAsB,EACtB,WAAmB,EACnB,YAAY,GACb,EAAE,6BAA6B,kDA2O/B"}
@@ -4,7 +4,7 @@ import { getAvailabilityVariant as i } from "../../lib/utils.js";
4
4
  import { Badge as a } from "../../ui/badge.js";
5
5
  import { Button as o } from "../../ui/button.js";
6
6
  import { useStorefrontWorkspaceLanguage as s } from "../../StorefrontContext.js";
7
- import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as c, ResponsiveDialog as l, ResponsiveDialogContent as u, ResponsiveDialogDescription as d, ResponsiveDialogFooter as f, ResponsiveDialogHeader as p, ResponsiveDialogTitle as m } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
7
+ import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as c, ResponsiveDialog as l, ResponsiveDialogContent as u, ResponsiveDialogDescription as d, ResponsiveDialogFooter as f, ResponsiveDialogHeader as p, ResponsiveDialogTitle as m } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BJ0RG6gh.js";
8
8
  import { Input as h } from "../../ui/input.js";
9
9
  import { ProductWarningNotice as g } from "../ProductWarningNotice/index.js";
10
10
  import { ProductPriceBadge as _ } from "../ProductPriceBadge/index.js";
@@ -30,7 +30,7 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
30
30
  ...n,
31
31
  [e]: t
32
32
  }));
33
- }, G = r(j.name, z.language, V), K = r(j.description, z.language, V), q = r(j.warning, z.language, V), J = typeof j.images?.[0] == "string" ? j.images[0].trim() : "", Y = v(j.primaryImageStyle), X = i(j.availabilityStatus), Z = j.features?.slice(0, 4) ?? [], Q = j.productVariants ?? [], $ = Q.some((t) => !!e(t, "size")) ? R("product_size_label") : R("product_variant_label");
33
+ }, G = r(j.name, z.language, V), K = r(j.description, z.language, V), q = r(j.warning, z.language, V), J = typeof j.images?.[0] == "string" ? j.images[0].trim() : "", Y = v(j.primaryImageStyle), X = i(j.availabilityStatus), Z = j.features ?? [], Q = Z.slice(0, 4), $ = j.productVariants ?? [], ee = $.some((t) => !!e(t, "size")) ? R("product_size_label") : R("product_variant_label");
34
34
  return /* @__PURE__ */ x(l, {
35
35
  open: h,
36
36
  onOpenChange: N,
@@ -41,10 +41,10 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
41
41
  mobileClassName: "max-h-[95dvh] gap-0",
42
42
  children: /* @__PURE__ */ S("div", {
43
43
  "data-testid": "storefront-booking-bike-dialog",
44
- className: "flex max-h-[92dvh] flex-col",
44
+ className: "flex max-h-[calc(95dvh-1.5rem)] min-h-0 flex-col sm:max-h-[92dvh]",
45
45
  children: [
46
46
  /* @__PURE__ */ S(p, {
47
- className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
47
+ className: "shrink-0 border-b border-slate-200 px-5 py-4 text-left sm:px-6",
48
48
  children: [/* @__PURE__ */ x(m, {
49
49
  className: "text-left text-lg font-semibold text-slate-950",
50
50
  children: /* @__PURE__ */ x("span", { children: G })
@@ -54,7 +54,8 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
54
54
  })]
55
55
  }),
56
56
  /* @__PURE__ */ x("div", {
57
- className: "overflow-y-auto",
57
+ className: "min-h-0 overflow-y-auto",
58
+ "data-testid": "storefront-booking-bike-dialog-scroll",
58
59
  children: /* @__PURE__ */ S("div", {
59
60
  className: "grid gap-5 px-5 py-5 sm:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)] sm:px-6",
60
61
  children: [/* @__PURE__ */ S("div", {
@@ -89,14 +90,14 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
89
90
  openOnHover: j.kind !== "accessory"
90
91
  })]
91
92
  }),
92
- !B && Z.length > 0 ? /* @__PURE__ */ S("div", {
93
+ !B && Q.length > 0 ? /* @__PURE__ */ S("div", {
93
94
  className: "grid gap-2",
94
95
  children: [/* @__PURE__ */ x("p", {
95
96
  className: "text-sm font-semibold text-slate-950",
96
97
  children: /* @__PURE__ */ x("span", { children: R("product_features_title") })
97
98
  }), /* @__PURE__ */ x("ul", {
98
99
  className: "grid gap-1.5 text-sm text-slate-700",
99
- children: Z.map((e, t) => /* @__PURE__ */ S("li", {
100
+ children: Q.map((e, t) => /* @__PURE__ */ S("li", {
100
101
  className: "inline-flex items-start gap-2",
101
102
  children: [/* @__PURE__ */ x(D, {
102
103
  className: "mt-0.5 h-4 w-4 text-success",
@@ -121,39 +122,33 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
121
122
  })]
122
123
  }) : null,
123
124
  B && Z.length > 0 ? /* @__PURE__ */ S("details", {
124
- className: "group rounded-2xl border border-slate-200 bg-slate-50",
125
+ className: "w-full",
125
126
  children: [/* @__PURE__ */ S("summary", {
126
- className: "flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2.5 text-sm font-semibold text-slate-950 [&::-webkit-details-marker]:hidden",
127
+ className: "flex cursor-pointer list-none items-center justify-between gap-2 border-b border-slate-200 pb-2 text-left text-base font-semibold text-slate-950 transition-colors hover:text-primary [&::-webkit-details-marker]:hidden",
127
128
  children: [/* @__PURE__ */ x("span", { children: R("product_features_title") }), /* @__PURE__ */ x(k, {
128
- className: "h-4 w-4 shrink-0 transition-transform group-open:rotate-45",
129
+ className: "h-4 w-4 shrink-0",
129
130
  "aria-hidden": "true"
130
131
  })]
131
132
  }), /* @__PURE__ */ x("div", {
132
- className: "border-t border-slate-200 px-3 py-3",
133
+ className: "pt-3",
133
134
  children: /* @__PURE__ */ x("ul", {
134
- className: "grid gap-1.5 text-sm text-slate-700",
135
- children: Z.map((e, t) => /* @__PURE__ */ S("li", {
136
- className: "inline-flex items-start gap-2",
137
- children: [/* @__PURE__ */ x(D, {
138
- className: "mt-0.5 h-4 w-4 text-success",
139
- "aria-hidden": "true"
140
- }), /* @__PURE__ */ x("span", { children: r(e, z.language, V) })]
141
- }, `${j.id}-mobile-${t}`))
135
+ className: "list-inside list-disc space-y-1 text-base text-slate-600",
136
+ children: Z.map((e, t) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ x("span", { children: r(e, z.language, V) }) }, `${j.id}-mobile-${t}`))
142
137
  })
143
138
  })]
144
139
  }) : null,
145
140
  B ? /* @__PURE__ */ x(g, { warning: q }) : null,
146
141
  /* @__PURE__ */ x("p", {
147
142
  className: "text-2xs font-medium uppercase tracking-[0.18em] text-slate-500",
148
- children: /* @__PURE__ */ x("span", { children: $ })
143
+ children: /* @__PURE__ */ x("span", { children: ee })
149
144
  }),
150
145
  /* @__PURE__ */ x("div", {
151
- className: "grid gap-2",
152
- children: Q.map((e) => {
146
+ className: "grid sm:gap-2",
147
+ children: $.map((e) => {
153
148
  let r = `storefront-booking-bike-dialog-variant-option-${j.id}-${e.id}`.toLowerCase(), { label: i, description: s } = t(e), c = n(e), l = H[e.id] ?? "1", u = F?.(e.id) === !0, d = P?.(e.id) ?? null;
154
149
  return /* @__PURE__ */ S("div", {
155
150
  "data-testid": r,
156
- className: T("flex flex-col gap-3 rounded-2xl border p-3 sm:flex-row sm:items-center sm:justify-between", "border-slate-200 bg-slate-50"),
151
+ className: T("flex items-center justify-between gap-3 border-b border-slate-100 py-1.5 last:border-b-0", "sm:rounded-2xl sm:border sm:border-slate-200 sm:bg-slate-50 sm:px-3 sm:py-2.5 sm:last:border-b"),
157
152
  children: [/* @__PURE__ */ S("div", {
158
153
  className: "flex min-w-0 flex-1 flex-col gap-0.5",
159
154
  children: [
@@ -181,7 +176,7 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
181
176
  }) : null
182
177
  ]
183
178
  }), /* @__PURE__ */ S("div", {
184
- className: "flex flex-wrap items-center gap-2 sm:justify-end",
179
+ className: "flex shrink-0 items-center sm:gap-2",
185
180
  children: [/* @__PURE__ */ x(M, {
186
181
  quantity: l,
187
182
  ariaLabel: R("quantity_label"),
@@ -189,7 +184,8 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
189
184
  testIdPrefix: `storefront-booking-bike-dialog-variant-quantity-${j.id}-${e.id}`.toLowerCase()
190
185
  }), /* @__PURE__ */ S(o, {
191
186
  type: "button",
192
- className: "gap-1.5 rounded-xl",
187
+ size: "sm",
188
+ className: T("h-8 shrink-0 gap-1 rounded-l-none px-2 text-xs", "sm:h-9 sm:gap-1.5 sm:rounded-xl sm:px-3 sm:text-sm"),
193
189
  "data-testid": `storefront-booking-bike-dialog-variant-add-${j.id}-${e.id}`.toLowerCase(),
194
190
  disabled: I,
195
191
  onClick: () => {
@@ -209,7 +205,7 @@ function j({ open: h, product: j, onOpenChange: N, getVariantAvailabilityLabel:
209
205
  })
210
206
  }),
211
207
  /* @__PURE__ */ x(f, {
212
- className: "border-t border-slate-200 px-5 py-4 sm:px-6",
208
+ className: "shrink-0 border-t border-slate-200 px-5 py-4 sm:px-6",
213
209
  children: /* @__PURE__ */ x(o, {
214
210
  type: "button",
215
211
  variant: "outline",
@@ -236,7 +232,7 @@ function M({ ariaLabel: e, onQuantityChange: t, quantity: n, testIdPrefix: r })
236
232
  t(n ? String(A(n)) : "");
237
233
  },
238
234
  onBlur: () => t(String(A(n))),
239
- className: "h-9 w-16 text-center",
235
+ className: T("h-8 w-9 rounded-r-none border-r-0 px-1 text-center text-sm focus-visible:z-10", "sm:h-9 sm:w-16 sm:rounded-md sm:border-r sm:px-3 sm:text-base"),
240
236
  "aria-label": e,
241
237
  "data-testid": `${r}-value`
242
238
  })
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingFlowSteps/index.tsx"],"names":[],"mappings":"AAKA,KAAK,qBAAqB,GAAG;IAC3B,WAAW,EAAE,SAAS,GAAG,UAAU,CAAA;IACnC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AA4CD,eAAO,MAAM,gBAAgB,GAAI,6DAAoE,qBAAqB,4CAwBzH,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingFlowSteps/index.tsx"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAAG;IAC3B,WAAW,EAAE,SAAS,GAAG,UAAU,CAAA;IACnC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AA4CD,eAAO,MAAM,gBAAgB,GAAI,6DAAoE,qBAAqB,4CAuFzH,CAAA"}
@@ -1,45 +1,86 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { Link as n } from "@rpcbase/router";
3
- import { useTranslation as r } from "react-i18next";
4
- import { cn as i } from "@rpcbase/ui";
1
+ import { useEffect as e, useRef as t, useState as n } from "react";
2
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ import { Link as a } from "@rpcbase/router";
4
+ import { useTranslation as o } from "react-i18next";
5
+ import { cn as s } from "@rpcbase/ui";
5
6
  //#region src/components/BookingFlowSteps/index.tsx
6
- var a = ({ index: r, label: a, state: o, href: s }) => {
7
- let c = /* @__PURE__ */ t("span", {
8
- className: i("inline-flex items-center gap-2 rounded-full border px-3 py-1.5 text-xs font-medium sm:text-sm", o === "active" && "border-slate-900 bg-slate-900 text-white", o === "done" && "border-slate-300 bg-white text-slate-900", o === "pending" && "border-slate-200 bg-slate-50 text-slate-500"),
9
- children: [/* @__PURE__ */ e("span", {
10
- className: i("inline-flex h-5 w-5 items-center justify-center rounded-full text-xs font-semibold", o === "active" && "bg-white/20 text-white", o === "done" && "bg-slate-100 text-slate-800", o === "pending" && "bg-slate-200 text-slate-600"),
11
- children: r
12
- }), /* @__PURE__ */ e("span", { children: a })]
7
+ var c = ({ index: e, label: t, state: n, href: o }) => {
8
+ let c = /* @__PURE__ */ i("span", {
9
+ className: s("inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-full border px-3 py-1.5 text-xs font-medium sm:text-sm", n === "active" && "border-slate-900 bg-slate-900 text-white", n === "done" && "border-slate-300 bg-white text-slate-900", n === "pending" && "border-slate-200 bg-slate-50 text-slate-500"),
10
+ children: [/* @__PURE__ */ r("span", {
11
+ className: s("inline-flex h-5 w-5 items-center justify-center rounded-full text-xs font-semibold", n === "active" && "bg-white/20 text-white", n === "done" && "bg-slate-100 text-slate-800", n === "pending" && "bg-slate-200 text-slate-600"),
12
+ children: e
13
+ }), /* @__PURE__ */ r("span", { children: t })]
13
14
  });
14
- return !s || o === "active" ? c : /* @__PURE__ */ e(n, {
15
- to: s,
16
- className: "inline-flex",
15
+ return !o || n === "active" ? c : /* @__PURE__ */ r(a, {
16
+ to: o,
17
+ className: "inline-flex shrink-0",
17
18
  children: c
18
19
  });
19
- }, o = ({ currentStep: n, bookingPath: i, checkoutPath: o, checkoutEnabled: s = !0 }) => {
20
- let { t: c } = r(), l = n === "booking" ? "active" : "done", u = n === "checkout" ? "active" : "pending";
21
- return /* @__PURE__ */ t("div", {
22
- className: "flex flex-wrap items-center gap-2",
20
+ }, l = ({ currentStep: a, bookingPath: l, checkoutPath: u, checkoutEnabled: d = !0 }) => {
21
+ let { t: f } = o(), p = a === "booking" ? "active" : "done", m = a === "checkout" ? "active" : "pending", h = t(null), g = t(null), [_, v] = n({
22
+ left: !1,
23
+ right: !1
24
+ });
25
+ return e(() => {
26
+ let e = h.current, t = g.current;
27
+ if (!e || !t) return;
28
+ e.scrollLeft = a === "checkout" ? e.scrollWidth - e.clientWidth : 0;
29
+ let n = () => {
30
+ let t = Math.max(0, e.scrollWidth - e.clientWidth), n = {
31
+ left: e.scrollLeft > 1,
32
+ right: e.scrollLeft < t - 1
33
+ };
34
+ v((e) => e.left === n.left && e.right === n.right ? e : n);
35
+ };
36
+ n(), e.addEventListener("scroll", n, { passive: !0 });
37
+ let r = new ResizeObserver(n);
38
+ return r.observe(e), r.observe(t), () => {
39
+ e.removeEventListener("scroll", n), r.disconnect();
40
+ };
41
+ }, [a]), /* @__PURE__ */ i("div", {
42
+ className: "relative w-full min-w-0 max-w-full",
23
43
  children: [
24
- /* @__PURE__ */ e(a, {
25
- index: 1,
26
- label: c("flow_step_booking"),
27
- state: l,
28
- href: n === "checkout" ? i : void 0
44
+ /* @__PURE__ */ r("div", {
45
+ ref: h,
46
+ className: "w-full max-w-full touch-pan-x overflow-x-auto overflow-y-hidden overscroll-x-contain scroll-smooth [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
47
+ "data-testid": "booking-flow-steps-scroll",
48
+ children: /* @__PURE__ */ i("div", {
49
+ ref: g,
50
+ className: "flex w-max min-w-full flex-nowrap items-center gap-2",
51
+ children: [
52
+ /* @__PURE__ */ r(c, {
53
+ index: 1,
54
+ label: f("flow_step_booking"),
55
+ state: p,
56
+ href: a === "checkout" ? l : void 0
57
+ }),
58
+ /* @__PURE__ */ r("span", {
59
+ className: "shrink-0 text-slate-300",
60
+ "aria-hidden": "true",
61
+ children: "/"
62
+ }),
63
+ /* @__PURE__ */ r(c, {
64
+ index: 2,
65
+ label: f("flow_step_checkout"),
66
+ state: m,
67
+ href: a === "booking" && d ? u : void 0
68
+ })
69
+ ]
70
+ })
29
71
  }),
30
- /* @__PURE__ */ e("span", {
31
- className: "text-slate-300",
72
+ /* @__PURE__ */ r("span", {
32
73
  "aria-hidden": "true",
33
- children: "/"
74
+ "data-testid": "booking-flow-steps-fade-left",
75
+ className: s("pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r from-background to-transparent transition-opacity", _.left ? "opacity-100" : "opacity-0")
34
76
  }),
35
- /* @__PURE__ */ e(a, {
36
- index: 2,
37
- label: c("flow_step_checkout"),
38
- state: u,
39
- href: n === "booking" && s ? o : void 0
77
+ /* @__PURE__ */ r("span", {
78
+ "aria-hidden": "true",
79
+ "data-testid": "booking-flow-steps-fade-right",
80
+ className: s("pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l from-background to-transparent transition-opacity", _.right ? "opacity-100" : "opacity-0")
40
81
  })
41
82
  ]
42
83
  });
43
84
  };
44
85
  //#endregion
45
- export { o as BookingFlowSteps };
86
+ export { l as BookingFlowSteps };
@@ -241,7 +241,7 @@ var A = () => {
241
241
  B && f(!0);
242
242
  };
243
243
  return /* @__PURE__ */ _("div", {
244
- className: y("group/form-item relative flex-grow", B && "cursor-pointer rounded-md"),
244
+ className: y("group/form-item relative min-w-0 w-full", B && "cursor-pointer rounded-md"),
245
245
  onPointerDownCapture: $,
246
246
  onClick: $,
247
247
  children: [
@@ -52,7 +52,7 @@ var d = (e, t, n) => new Intl.NumberFormat(t, {
52
52
  y,
53
53
  g
54
54
  ]), /* @__PURE__ */ l("div", {
55
- className: "group/form-item relative min-w-0 w-[150px] md:shrink-0",
55
+ className: "group/form-item relative w-full min-w-0",
56
56
  children: [
57
57
  /* @__PURE__ */ c(n, {
58
58
  htmlFor: "end-time-picker",
@@ -1,7 +1,7 @@
1
1
  import { Button as e, buttonVariants as t } from "../../../ui/button.js";
2
- import { useBookingPeriod as n } from "../BookingPeriodContext.js";
3
- import { DayPicker as r } from "../../../ui/day-picker.js";
4
- import { Drawer as i, DrawerContent as a, DrawerHeader as o, DrawerTitle as s } from "../../../ui/drawer.js";
2
+ import { Drawer as n, DrawerContent as r, DrawerHeader as i, DrawerTitle as a } from "../../../ui/drawer.js";
3
+ import { useBookingPeriod as o } from "../BookingPeriodContext.js";
4
+ import { DayPicker as s } from "../../../ui/day-picker.js";
5
5
  import { BookingTimeSlotsStatus as c } from "./BookingTimeSlotsStatus.js";
6
6
  import { addMonths as l, differenceInCalendarDays as u, endOfMonth as d, isSameDay as f, startOfMonth as p } from "date-fns";
7
7
  import { useEffect as m, useRef as h, useState as g } from "react";
@@ -29,7 +29,7 @@ var x = b, S = 1, C = y(t({ variant: "outline" }), "z-10 h-11 w-11 bg-background
29
29
  }, D = (e, t, n) => e ? f(e, d(e)) ? l(p(e), 1) : p(e) : p(t ?? n), O = (e) => {
30
30
  if (!(!e || !f(e, d(e)))) return l(p(e), 1);
31
31
  }, k = () => {
32
- let { labels: t, startDate: l, endDate: d, selectStartDate: b, selectEndDate: C, isStartDatePopoverOpen: k, setIsStartDatePopoverOpen: A, isEndDatePopoverOpen: j, setIsEndDatePopoverOpen: M, resetHoveredEndDate: N, dateLocale: P, isMobile: F, withMobileDateDrawer: I, minSelectableDate: L, canCommitTimeSlots: R } = n(), z = I && F && (k || j), B = j && !k ? "end" : "start", V = T(L), H = T(D(l, d, L)), [U, W] = g(() => p(L)), [G, K] = g(() => E(H)), q = h(!0), J = h(!1), Y = l && (d ?? l) >= l ? u(d ?? l, l) + 1 : null, X = d ?? l;
32
+ let { labels: t, startDate: l, endDate: d, selectStartDate: b, selectEndDate: C, isStartDatePopoverOpen: k, setIsStartDatePopoverOpen: A, isEndDatePopoverOpen: j, setIsEndDatePopoverOpen: M, resetHoveredEndDate: N, dateLocale: P, isMobile: F, withMobileDateDrawer: I, minSelectableDate: L, canCommitTimeSlots: R } = o(), z = I && F && (k || j), B = j && !k ? "end" : "start", V = T(L), H = T(D(l, d, L)), [U, W] = g(() => p(L)), [G, K] = g(() => E(H)), q = h(!0), J = h(!1), Y = l && (d ?? l) >= l ? u(d ?? l, l) + 1 : null, X = d ?? l;
33
33
  if (m(() => {
34
34
  !z || B !== "start" || W(p(L));
35
35
  }, [
@@ -66,19 +66,19 @@ var x = b, S = 1, C = y(t({ variant: "outline" }), "z-10 h-11 w-11 bg-background
66
66
  }, Q = () => {
67
67
  A(!1), M(!1), N();
68
68
  };
69
- return /* @__PURE__ */ _(i, {
69
+ return /* @__PURE__ */ _(n, {
70
70
  open: z,
71
71
  lockScroll: !1,
72
72
  onOpenChange: (e) => {
73
73
  e || Q();
74
74
  },
75
- children: /* @__PURE__ */ v(a, {
75
+ children: /* @__PURE__ */ v(r, {
76
76
  className: "overflow-hidden",
77
77
  closeLabel: t.closeDrawer,
78
78
  showCloseButton: !0,
79
- children: [/* @__PURE__ */ v(o, {
80
- className: "border-b px-16 pb-3 pt-4 text-left",
81
- children: [/* @__PURE__ */ _(s, {
79
+ children: [/* @__PURE__ */ v(i, {
80
+ className: "border-b pb-3 pl-4 pr-16 pt-4 text-left",
81
+ children: [/* @__PURE__ */ _(a, {
82
82
  className: "sr-only",
83
83
  children: B === "start" ? t.startDate : t.endDate
84
84
  }), /* @__PURE__ */ v("div", {
@@ -92,28 +92,28 @@ var x = b, S = 1, C = y(t({ variant: "outline" }), "z-10 h-11 w-11 bg-background
92
92
  /* @__PURE__ */ _("button", {
93
93
  type: "button",
94
94
  "aria-pressed": B === "start",
95
- className: y("relative z-10 h-9 rounded px-3 text-sm font-medium transition-colors", B === "start" ? "text-foreground" : "text-muted-foreground"),
95
+ className: y("relative z-10 h-9 rounded px-2 text-xs font-medium transition-colors min-[360px]:text-sm", B === "start" ? "text-foreground" : "text-muted-foreground"),
96
96
  onClick: () => Z("start"),
97
97
  children: t.startDate
98
98
  }),
99
99
  /* @__PURE__ */ _("button", {
100
100
  type: "button",
101
101
  "aria-pressed": B === "end",
102
- className: y("relative z-10 h-9 rounded px-3 text-sm font-medium transition-colors", B === "end" ? "text-foreground" : "text-muted-foreground"),
102
+ className: y("relative z-10 h-9 rounded px-2 text-xs font-medium transition-colors min-[360px]:text-sm", B === "end" ? "text-foreground" : "text-muted-foreground"),
103
103
  onClick: () => Z("end"),
104
104
  children: t.endDate
105
105
  })
106
106
  ]
107
107
  })]
108
108
  }), /* @__PURE__ */ _("div", {
109
- className: "overflow-hidden px-4 py-4",
109
+ className: "overflow-clip px-4 py-4",
110
110
  children: /* @__PURE__ */ v("div", {
111
111
  className: y("flex w-[200%] transition-transform duration-300 ease-out", B === "end" && "-translate-x-1/2"),
112
112
  children: [/* @__PURE__ */ _("section", {
113
113
  className: "max-h-[calc(95dvh-9rem)] w-1/2 shrink-0 overflow-y-auto pr-4",
114
114
  children: /* @__PURE__ */ v("div", {
115
115
  className: "flex flex-col gap-4",
116
- children: [/* @__PURE__ */ _(r, {
116
+ children: [/* @__PURE__ */ _(s, {
117
117
  id: "start-date-calendar",
118
118
  mode: "single",
119
119
  locale: P,
@@ -134,7 +134,7 @@ var x = b, S = 1, C = y(t({ variant: "outline" }), "z-10 h-11 w-11 bg-background
134
134
  commit: !1
135
135
  });
136
136
  },
137
- autoFocus: !0,
137
+ autoFocus: B === "start",
138
138
  "data-testid": "start-date-calendar",
139
139
  className: "w-full p-0",
140
140
  classNames: w
@@ -154,7 +154,7 @@ var x = b, S = 1, C = y(t({ variant: "outline" }), "z-10 h-11 w-11 bg-background
154
154
  children: /* @__PURE__ */ v("div", {
155
155
  className: "flex flex-col gap-4",
156
156
  children: [
157
- /* @__PURE__ */ _(r, {
157
+ /* @__PURE__ */ _(s, {
158
158
  id: "end-date-calendar",
159
159
  mode: "range",
160
160
  locale: P,
@@ -173,7 +173,7 @@ var x = b, S = 1, C = y(t({ variant: "outline" }), "z-10 h-11 w-11 bg-background
173
173
  commit: !1
174
174
  });
175
175
  },
176
- autoFocus: !0,
176
+ autoFocus: B === "end",
177
177
  "data-testid": "end-date-calendar",
178
178
  className: "w-full p-0",
179
179
  classNames: w,
@@ -74,7 +74,7 @@ var h = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), g = (e) =>
74
74
  I && w(!0);
75
75
  };
76
76
  return /* @__PURE__ */ u("div", {
77
- className: f("group/form-item relative flex-grow", I && "cursor-pointer rounded-md"),
77
+ className: f("group/form-item relative min-w-0 w-full", I && "cursor-pointer rounded-md"),
78
78
  onPointerDownCapture: W,
79
79
  onClick: W,
80
80
  children: [
@@ -53,7 +53,7 @@ var d = (e, t, n) => new Intl.NumberFormat(t, {
53
53
  g,
54
54
  h
55
55
  ]), /* @__PURE__ */ l("div", {
56
- className: "group/form-item relative min-w-0 w-[150px] md:shrink-0",
56
+ className: "group/form-item relative w-full min-w-0",
57
57
  children: [
58
58
  /* @__PURE__ */ c(n, {
59
59
  htmlFor: "start-time-picker",
@@ -516,7 +516,7 @@ function E({ id: s, value: l, onChange: u, onValueUpdate: d, options: f, placeho
516
516
  disabled: v,
517
517
  "data-testid": E,
518
518
  "data-hydrated": O ? "true" : void 0,
519
- className: e("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", !l && "text-muted-foreground", H && "ring-2 ring-primary ring-offset-2", _),
519
+ className: e("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", !l && "text-muted-foreground", H && "ring-2 ring-primary ring-offset-2", _),
520
520
  onClick: () => {
521
521
  v || y || U(!H);
522
522
  },
@@ -583,7 +583,7 @@ function E({ id: s, value: l, onChange: u, onValueUpdate: d, options: f, placeho
583
583
  "data-value": t.value,
584
584
  "data-state": o ? "checked" : "unchecked",
585
585
  "data-disabled": t.disabled ? "" : void 0,
586
- className: e("relative flex w-full select-none items-center justify-center rounded-sm px-2 py-1.5 text-center text-sm outline-none cursor-pointer", t.disabled && "pointer-events-none opacity-50", s && "bg-accent text-accent-foreground"),
586
+ className: e("relative flex min-h-11 w-full cursor-pointer select-none items-center justify-center rounded-sm px-2 py-2 text-center text-base outline-none", t.disabled && "pointer-events-none opacity-50", s && "bg-accent text-accent-foreground"),
587
587
  onMouseDown: (e) => {
588
588
  e.preventDefault();
589
589
  },