@loczer/storefront-sdk 0.194.0 → 0.195.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 (64) hide show
  1. package/dist/chunks/pkg/ui/dist/{Button-CxG2fSpA.js → Button-Cr_u8vnh.js} +1 -1
  2. package/dist/chunks/pkg/ui/dist/{Dialog-4leTWiev.js → Dialog-CczmPDwY.js} +1 -1
  3. package/dist/chunks/pkg/ui/dist/Drawer/{index-DA5V7R_q.js → index-CSvSVP_J.js} +1 -1
  4. package/dist/chunks/pkg/ui/dist/Map/{MapContent-BmKjdWmq.js → MapContent-CDeWtwKa.js} +1 -1
  5. package/dist/chunks/pkg/ui/dist/{Map-CsOTdTtL.js → Map-Cs7wgtH9.js} +2 -2
  6. package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-CfEqkJ0y.js → MorphingModalWizard-j1CgFGLe.js} +4 -3
  7. package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-C6IWYoIg.js → ResponsiveDialog-BVwhTZQo.js} +3 -3
  8. package/dist/chunks/pkg/ui/dist/{ScrollArea-Bjwo84cv.js → ScrollArea-BqLd0xZj.js} +1 -1
  9. package/dist/chunks/pkg/ui/dist/Spinner/{index-DzMEU0iA.js → index-Cgi70z_E.js} +1 -1
  10. package/dist/chunks/pkg/ui/dist/lib/utils-DXB19bzk.js +8 -0
  11. package/dist/components/BikeProductCard/index.js +6 -6
  12. package/dist/components/BookingBikeVariantDialog/index.js +7 -7
  13. package/dist/components/BookingFlowSteps/index.js +11 -11
  14. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  15. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  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/BookingHourPickerField.d.ts +1 -1
  19. package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -1
  20. package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.js +16 -18
  21. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts +36 -0
  22. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts.map +1 -0
  23. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +830 -0
  24. package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.d.ts +2 -0
  25. package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.d.ts.map +1 -0
  26. package/dist/components/BookingPeriodSelector/components/internal/useIsTouchDevice.js +21 -0
  27. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +1 -1
  28. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  29. package/dist/components/ContactSection/index.js +35 -35
  30. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +4 -4
  31. package/dist/components/ContractSaleDocument/ThumbnailSidebar.js +1 -1
  32. package/dist/components/DeliveryAddressSelector/index.js +5 -5
  33. package/dist/components/Footer/index.js +11 -11
  34. package/dist/components/FulfillmentSection/index.js +9 -9
  35. package/dist/components/Header/index.js +61 -61
  36. package/dist/components/Map/index.js +1 -1
  37. package/dist/components/PoweredByLoczerBadge/index.js +5 -5
  38. package/dist/components/ProductPriceBadge/index.js +73 -73
  39. package/dist/components/StorefrontCancellationPolicyNotice/index.js +6 -6
  40. package/dist/components/StorefrontCartPanel/index.js +8 -8
  41. package/dist/components/StorefrontInsuranceNotice/index.js +6 -6
  42. package/dist/components/StorefrontPopupMessages/index.js +8 -8
  43. package/dist/components/payment/MollieCardFieldsForm.js +1 -1
  44. package/dist/components/payment/StripeCardFieldsForm.js +1 -1
  45. package/dist/index.d.ts +10 -3
  46. package/dist/lib/utils.d.ts +3 -1
  47. package/dist/lib/utils.d.ts.map +1 -1
  48. package/dist/lib/utils.js +9 -5
  49. package/dist/pages/BookingPage.js +8 -8
  50. package/dist/pages/CheckoutPaymentPage.js +1 -1
  51. package/dist/pages/ContractSaleDocumentPage.js +15 -15
  52. package/dist/pages/HomePage.js +19 -19
  53. package/dist/pages/PaymentLinkPage.js +1 -1
  54. package/dist/pages/PaymentLinkSuccessPage.js +1 -1
  55. package/dist/pages/ProductPage.js +143 -143
  56. package/dist/pages/checkout/components/CheckoutCouponCard.js +5 -5
  57. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
  58. package/package.json +5 -1
  59. package/dist/chunks/node_modules/clsx/dist/clsx-CdyIqUTr.js +0 -16
  60. package/dist/chunks/node_modules/tailwind-merge/dist/bundle-mjs-CF4QheV5.js +0 -1608
  61. package/dist/chunks/pkg/ui/dist/lib/utils-BN5KOMSm.js +0 -8
  62. package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts +0 -22
  63. package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts.map +0 -1
  64. package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +0 -342
@@ -1,4 +1,4 @@
1
- import { cn as e } from "./lib/utils-BN5KOMSm.js";
1
+ import { cn as e } from "./lib/utils-DXB19bzk.js";
2
2
  import { Slot as t } from "./lib/slot-FQrvG282.js";
3
3
  import * as n from "react";
4
4
  import { jsx as r } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { cn as e } from "./lib/utils-BN5KOMSm.js";
1
+ import { cn as e } from "./lib/utils-DXB19bzk.js";
2
2
  import { composeRefs as t, createAutoFocusHandler as n } from "./lib/slot-FQrvG282.js";
3
3
  import { useBodyPointerEventsLock as r } from "./lib/body-pointer-events-DLBTed3C.js";
4
4
  import { SsrHydratablePortal as i } from "./SsrHydratablePortal/index-eGyYZilF.js";
@@ -1,4 +1,4 @@
1
- import { cn as e } from "../lib/utils-BN5KOMSm.js";
1
+ import { cn as e } from "../lib/utils-DXB19bzk.js";
2
2
  import { useBodyPointerEventsLock as t } from "../lib/body-pointer-events-DLBTed3C.js";
3
3
  import { SsrHydratablePortal as n } from "../SsrHydratablePortal/index-eGyYZilF.js";
4
4
  import * as r from "react";
@@ -1,5 +1,5 @@
1
1
  import { __toESM as e } from "../../../../_virtual/_rolldown/runtime-CkxIErRK.js";
2
- import { cn as t } from "../lib/utils-BN5KOMSm.js";
2
+ import { cn as t } from "../lib/utils-DXB19bzk.js";
3
3
  import { DEFAULT_MAP_SKELETON_COLOR as n } from "./constants-BNmiJXfg.js";
4
4
  import { DEFAULT_MAP_CENTER as r } from "../static/strings-1T2w7LqX.js";
5
5
  import { classifyMapboxError as i, toSanitizedMapboxError as a } from "./mapboxError-oRn0l3EE.js";
@@ -1,4 +1,4 @@
1
- import { cn as e } from "./lib/utils-BN5KOMSm.js";
1
+ import { cn as e } from "./lib/utils-DXB19bzk.js";
2
2
  import { isAutomationRuntime as t } from "./lib/isAutomationRuntime-CZ6KXlyz.js";
3
3
  import { Suspense as n, lazy as r, useEffect as i, useRef as a, useState as o } from "react";
4
4
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -14,7 +14,7 @@ var l = ({ className: t, style: n, color: r }) => /* @__PURE__ */ c("div", {
14
14
  style: { backgroundColor: r ?? "rgb(201 221 176)" }
15
15
  })
16
16
  }), /* @__PURE__ */ s("div", { className: "h-full w-full transition-opacity duration-500 ease-out pointer-events-none opacity-0" })]
17
- }), u = r(() => import("./Map/MapContent-BmKjdWmq.js")), d = (e) => {
17
+ }), u = r(() => import("./Map/MapContent-CDeWtwKa.js")), d = (e) => {
18
18
  let r = a(null), [c, d] = o(!1);
19
19
  i(() => {
20
20
  if (t()) return;
@@ -1,6 +1,7 @@
1
- import "./Dialog-4leTWiev.js";
2
- import "./ScrollArea-Bjwo84cv.js";
3
- import "./Button-CxG2fSpA.js";
1
+ import "./lib/utils-DXB19bzk.js";
2
+ import "./Dialog-CczmPDwY.js";
3
+ import "./ScrollArea-BqLd0xZj.js";
4
+ import "./Button-Cr_u8vnh.js";
4
5
  import { createContext as e, useContext as t } from "react";
5
6
  import "react/jsx-runtime";
6
7
  import "lucide-react";
@@ -1,6 +1,6 @@
1
- import { cn as e } from "./lib/utils-BN5KOMSm.js";
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-4leTWiev.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-DA5V7R_q.js";
1
+ import { cn as e } from "./lib/utils-DXB19bzk.js";
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";
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,4 +1,4 @@
1
- import { cn as e } from "./lib/utils-BN5KOMSm.js";
1
+ import { cn as e } from "./lib/utils-DXB19bzk.js";
2
2
  import "react";
3
3
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
4
  import { ScrollArea as r } from "@base-ui/react/scroll-area";
@@ -1,4 +1,4 @@
1
- import { cn as e } from "../lib/utils-BN5KOMSm.js";
1
+ import { cn as e } from "../lib/utils-DXB19bzk.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  //#region ../ui/dist/Spinner/index.js
4
4
  function r({ className: r, ...i }) {
@@ -0,0 +1,8 @@
1
+ import { clsx as e } from "clsx";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ //#region ../ui/dist/lib/utils.js
4
+ function n(...n) {
5
+ return t(e(n));
6
+ }
7
+ //#endregion
8
+ export { n as cn };
@@ -5,13 +5,13 @@ import { Button as r } from "../../ui/button.js";
5
5
  import { ProductPriceBadge as i } from "../ProductPriceBadge/index.js";
6
6
  import { resolveProductImageContainerStyle as a } from "../../lib/productImageStyles.js";
7
7
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import { cn as l } from "@rpcbase/ui";
9
- import { Link as u } from "@rpcbase/router";
10
- import { useTranslation as d } from "react-i18next";
8
+ import { Link as l } from "@rpcbase/router";
9
+ import { useTranslation as u } from "react-i18next";
10
+ import { cn as d } from "@rpcbase/ui";
11
11
  import { ArrowRight as f, Bike as p } from "lucide-react";
12
12
  //#region src/components/BikeProductCard/index.tsx
13
13
  function m({ bike: m, detailsPath: h, productDetailsLinkState: g, actionLabelKey: _ = "product_cta", onAction: v, actionDisabled: y = !1, availabilityLabel: b, fallbackLanguage: x, variant: S = "default", testId: C }) {
14
- let { t: w, i18n: T } = d(), E = t(m.name, T.language, x), D = t(m.description, T.language, x), O = typeof m.images?.[0] == "string" ? m.images[0].trim() : "", k = a(m.primaryImageStyle), A = e(m.availabilityStatus), j = S === "booking", M = m.availabilityStatus === "OUT_OF_STOCK";
14
+ let { t: w, i18n: T } = u(), E = t(m.name, T.language, x), D = t(m.description, T.language, x), O = typeof m.images?.[0] == "string" ? m.images[0].trim() : "", k = a(m.primaryImageStyle), A = e(m.availabilityStatus), j = S === "booking", M = m.availabilityStatus === "OUT_OF_STOCK";
15
15
  return /* @__PURE__ */ c("div", {
16
16
  className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
17
17
  "data-testid": C,
@@ -20,7 +20,7 @@ function m({ bike: m, detailsPath: h, productDetailsLinkState: g, actionLabelKey
20
20
  children: [/* @__PURE__ */ s("div", {
21
21
  className: "w-24 shrink-0 sm:w-28",
22
22
  children: /* @__PURE__ */ c("div", {
23
- className: l("relative h-full min-h-20 overflow-hidden rounded-xl", k.className),
23
+ className: d("relative h-full min-h-20 overflow-hidden rounded-xl", k.className),
24
24
  style: k.style,
25
25
  children: [O ? /* @__PURE__ */ s("img", {
26
26
  src: O,
@@ -66,7 +66,7 @@ function m({ bike: m, detailsPath: h, productDetailsLinkState: g, actionLabelKey
66
66
  className: "text-slate-400",
67
67
  children: "·"
68
68
  })] }),
69
- /* @__PURE__ */ s(u, {
69
+ /* @__PURE__ */ s(l, {
70
70
  to: h,
71
71
  state: g,
72
72
  className: "text-xs font-medium text-slate-700 hover:text-slate-950",
@@ -3,7 +3,7 @@ import { getAvailabilityVariant as n } from "../../lib/utils.js";
3
3
  import { getLocalizedValue as r } from "../../localization.js";
4
4
  import { Badge as i } from "../../ui/badge.js";
5
5
  import { Button as a } from "../../ui/button.js";
6
- import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as o, ResponsiveDialog as s, ResponsiveDialogContent as c, ResponsiveDialogDescription as l, ResponsiveDialogFooter as u, ResponsiveDialogHeader as d, ResponsiveDialogTitle as f } from "../../chunks/pkg/ui/dist/ResponsiveDialog-C6IWYoIg.js";
6
+ import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as o, ResponsiveDialog as s, ResponsiveDialogContent as c, ResponsiveDialogDescription as l, ResponsiveDialogFooter as u, ResponsiveDialogHeader as d, ResponsiveDialogTitle as f } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
7
7
  import { Input as p } from "../../ui/input.js";
8
8
  import { useStorefrontWorkspaceLanguage as m } from "../../StorefrontProvider.js";
9
9
  import { ProductWarningNotice as h } from "../ProductWarningNotice/index.js";
@@ -11,13 +11,13 @@ import { ProductPriceBadge as g } from "../ProductPriceBadge/index.js";
11
11
  import { resolveProductImageContainerStyle as _ } from "../../lib/productImageStyles.js";
12
12
  import { useEffect as v, useState as y } from "react";
13
13
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
14
- import { cn as S } from "@rpcbase/ui";
15
- import { useMediaQuery as C } from "@rpcbase/client";
16
- import { useTranslation as w } from "react-i18next";
14
+ import { useMediaQuery as S } from "@rpcbase/client";
15
+ import { useTranslation as C } from "react-i18next";
16
+ import { cn as w } from "@rpcbase/ui";
17
17
  import { Bike as T, CheckCircle2 as E, Plus as D } from "lucide-react";
18
18
  //#region src/components/BookingBikeVariantDialog/index.tsx
19
19
  function O({ open: p, product: O, onOpenChange: A, getVariantAvailabilityLabel: j, isVariantOutOfCapacity: M, addDisabled: N = !1, onAddVariant: P }) {
20
- let { t: F, i18n: I } = w(), L = C(o), R = m(), [z, B] = y({});
20
+ let { t: F, i18n: I } = C(), L = S(o), R = m(), [z, B] = y({});
21
21
  if (v(() => {
22
22
  !O || !p || B((O.productVariants ?? []).reduce((e, t) => (e[t.id] = 1, e), {}));
23
23
  }, [p, O]), !O) return null;
@@ -57,7 +57,7 @@ function O({ open: p, product: O, onOpenChange: A, getVariantAvailabilityLabel:
57
57
  className: "grid gap-4",
58
58
  children: [
59
59
  /* @__PURE__ */ b("div", {
60
- className: S("relative aspect-[1618/1000] overflow-hidden rounded-2xl", K.className),
60
+ className: w("relative aspect-[1618/1000] overflow-hidden rounded-2xl", K.className),
61
61
  style: K.style,
62
62
  children: G ? /* @__PURE__ */ b("img", {
63
63
  src: G,
@@ -140,7 +140,7 @@ function O({ open: p, product: O, onOpenChange: A, getVariantAvailabilityLabel:
140
140
  let n = `storefront-booking-bike-dialog-variant-option-${O.id}-${e.id}`.toLowerCase(), { label: r, description: o } = t(e), s = z[e.id] ?? 1, c = M?.(e.id) === !0, l = j?.(e.id) ?? null;
141
141
  return /* @__PURE__ */ x("div", {
142
142
  "data-testid": n,
143
- className: S("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"),
143
+ className: w("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"),
144
144
  children: [/* @__PURE__ */ x("div", {
145
145
  className: "flex min-w-0 flex-1 flex-col gap-0.5",
146
146
  children: [
@@ -1,23 +1,23 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { cn as n } from "@rpcbase/ui";
3
- import { Link as r } from "@rpcbase/router";
4
- import { useTranslation as i } from "react-i18next";
2
+ import { Link as n } from "@rpcbase/router";
3
+ import { useTranslation as r } from "react-i18next";
4
+ import { cn as i } from "@rpcbase/ui";
5
5
  //#region src/components/BookingFlowSteps/index.tsx
6
- var a = ({ index: i, label: a, state: o, href: s }) => {
6
+ var a = ({ index: r, label: a, state: o, href: s }) => {
7
7
  let c = /* @__PURE__ */ t("span", {
8
- className: n("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"),
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
9
  children: [/* @__PURE__ */ e("span", {
10
- className: n("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: i
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
12
  }), /* @__PURE__ */ e("span", { children: a })]
13
13
  });
14
- return !s || o === "active" ? c : /* @__PURE__ */ e(r, {
14
+ return !s || o === "active" ? c : /* @__PURE__ */ e(n, {
15
15
  to: s,
16
16
  className: "inline-flex",
17
17
  children: c
18
18
  });
19
- }, o = ({ currentStep: n, bookingPath: r, checkoutPath: o, checkoutEnabled: s = !0 }) => {
20
- let { t: c } = i(), l = n === "booking" ? "active" : "done", u = n === "checkout" ? "active" : "pending";
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
21
  return /* @__PURE__ */ t("div", {
22
22
  className: "flex flex-wrap items-center gap-2",
23
23
  children: [
@@ -25,7 +25,7 @@ var a = ({ index: i, label: a, state: o, href: s }) => {
25
25
  index: 1,
26
26
  label: c("flow_step_booking"),
27
27
  state: l,
28
- href: n === "checkout" ? r : void 0
28
+ href: n === "checkout" ? i : void 0
29
29
  }),
30
30
  /* @__PURE__ */ e("span", {
31
31
  className: "text-slate-300",
@@ -1,6 +1,6 @@
1
1
  import { Content as e, Provider as t, Root as n, TooltipTrigger as r } from "../../../ui/tooltip.js";
2
2
  import { useBookingPeriod as i } from "../BookingPeriodContext.js";
3
- import { useMorphingModalWizardOverlayLayer as a } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-CfEqkJ0y.js";
3
+ import { useMorphingModalWizardOverlayLayer as a } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
4
4
  import { DayPicker as o } from "../../../ui/day-picker.js";
5
5
  import { Label as s } from "../../../ui/label.js";
6
6
  import { BookingPeriodFieldErrorMessage as c } from "./BookingPeriodFieldErrorMessage.js";
@@ -1,5 +1,5 @@
1
1
  import { useBookingPeriod as e } from "../BookingPeriodContext.js";
2
- import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-CfEqkJ0y.js";
2
+ import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
3
3
  import { Label as n } from "../../../ui/label.js";
4
4
  import { BookingPeriodFieldErrorMessage as r } from "./BookingPeriodFieldErrorMessage.js";
5
5
  import { BookingHourPickerField as i } from "./internal/BookingHourPickerField.js";
@@ -1,5 +1,5 @@
1
1
  import { useBookingPeriod as e } from "../BookingPeriodContext.js";
2
- import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-CfEqkJ0y.js";
2
+ import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
3
3
  import { DayPicker as n } from "../../../ui/day-picker.js";
4
4
  import { Label as r } from "../../../ui/label.js";
5
5
  import { BookingPeriodFieldErrorMessage as i } from "./BookingPeriodFieldErrorMessage.js";
@@ -1,5 +1,5 @@
1
1
  import { useBookingPeriod as e } from "../BookingPeriodContext.js";
2
- import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-CfEqkJ0y.js";
2
+ import { useMorphingModalWizardOverlayLayer as t } from "../../../chunks/pkg/ui/dist/MorphingModalWizard-j1CgFGLe.js";
3
3
  import { Label as n } from "../../../ui/label.js";
4
4
  import { BookingPeriodFieldErrorMessage as r } from "./BookingPeriodFieldErrorMessage.js";
5
5
  import { BookingHourPickerField as i } from "./internal/BookingHourPickerField.js";
@@ -1,4 +1,4 @@
1
- import { HourPickerFieldProps } from '@rpcbase/ui';
1
+ import { HourPickerFieldProps } from './StorefrontHourPickerField';
2
2
  type BookingHourPickerFieldProps = HourPickerFieldProps & {
3
3
  portalContainer?: HTMLElement | null;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BookingHourPickerField.d.ts","sourceRoot":"","sources":["../../../../../src/components/BookingPeriodSelector/components/internal/BookingHourPickerField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAA;AAKpB,KAAK,2BAA2B,GAAG,oBAAoB,GAAG;IACxD,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,mEAMpC,2BAA2B,4CA2B7B,CAAA"}
1
+ {"version":3,"file":"BookingHourPickerField.d.ts","sourceRoot":"","sources":["../../../../../src/components/BookingPeriodSelector/components/internal/BookingHourPickerField.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,6BAA6B,CAAA;AAIpC,KAAK,2BAA2B,GAAG,oBAAoB,GAAG;IACxD,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,mEAMpC,2BAA2B,4CAuB7B,CAAA"}
@@ -1,29 +1,27 @@
1
- import { ModalHourPickerField as e } from "./ModalHourPickerField.js";
2
- import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
- import { HourPickerField as i, cn as a } from "@rpcbase/ui";
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { HourPickerField as t } from "./StorefrontHourPickerField.js";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
4
  //#region src/components/BookingPeriodSelector/components/internal/BookingHourPickerField.tsx
5
- var o = ({ options: o, className: s, inputClassName: c, portalContainer: l, ...u }) => {
6
- let d = o.map((e) => ({
5
+ var a = ({ options: a, className: o, inputClassName: s, portalContainer: c, ...l }) => {
6
+ let u = a.map((e) => ({
7
7
  ...e,
8
- selectedLabel: /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("span", {
8
+ selectedLabel: /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("span", {
9
9
  "data-slot": "booking-hour-picker-mobile-selected-label",
10
10
  className: "md:hidden",
11
11
  children: e.value
12
- }), /* @__PURE__ */ n("span", {
12
+ }), /* @__PURE__ */ r("span", {
13
13
  "data-slot": "booking-hour-picker-desktop-selected-label",
14
14
  className: "hidden md:inline",
15
15
  children: e.label
16
16
  })] })
17
- })), f = {
18
- ...u,
19
- options: d,
20
- className: a("w-full min-w-0", s),
21
- inputClassName: a("min-w-0", c)
22
- };
23
- return l ? /* @__PURE__ */ n(e, {
24
- ...f,
25
- portalContainer: l
26
- }) : /* @__PURE__ */ n(i, { ...f });
17
+ }));
18
+ return /* @__PURE__ */ r(t, {
19
+ ...l,
20
+ options: u,
21
+ className: e("w-full min-w-0", o),
22
+ inputClassName: e("min-w-0", s),
23
+ portalContainer: c
24
+ });
27
25
  };
28
26
  //#endregion
29
- export { o as BookingHourPickerField };
27
+ export { a as BookingHourPickerField };
@@ -0,0 +1,36 @@
1
+ import * as React from "react";
2
+ export type HourPickerOption = {
3
+ value: string;
4
+ label: string;
5
+ selectedLabel?: React.ReactNode;
6
+ disabled?: boolean;
7
+ description?: React.ReactNode;
8
+ };
9
+ export type HourPickerInputProps = {
10
+ id?: string;
11
+ value: string | null;
12
+ onChange: (value: string | null) => void;
13
+ onValueUpdate?: (value: string | null) => void;
14
+ options: HourPickerOption[];
15
+ placeholder?: string;
16
+ className?: string;
17
+ inputClassName?: string;
18
+ disabled?: boolean;
19
+ readOnly?: boolean;
20
+ open?: boolean;
21
+ onOpenChange?: (open: boolean) => void;
22
+ triggerTestId?: string;
23
+ contentTestId?: string;
24
+ isHydrated?: boolean;
25
+ portalContainer?: HTMLElement | null;
26
+ };
27
+ export declare function HourPickerInput({ id, value, onChange, onValueUpdate, options, placeholder, className, inputClassName, disabled, readOnly, open: openProp, onOpenChange, triggerTestId, contentTestId, isHydrated, portalContainer, }: HourPickerInputProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare namespace HourPickerInput {
29
+ var displayName: string;
30
+ }
31
+ export type HourPickerFieldProps = HourPickerInputProps;
32
+ export declare function HourPickerField(props: HourPickerFieldProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare namespace HourPickerField {
34
+ var displayName: string;
35
+ }
36
+ //# sourceMappingURL=StorefrontHourPickerField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorefrontHourPickerField.d.ts","sourceRoot":"","sources":["../../../../../src/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC9B,CAAA;AAyYD,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;CACrC,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,EAAE,EACF,KAAK,EACL,QAAQ,EACR,aAAa,EACb,OAAO,EACP,WAA2B,EAC3B,SAAS,EACT,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,IAAI,EAAE,QAAQ,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,eAAe,GAChB,EAAE,oBAAoB,2CA6ctB;yBA9de,eAAe;;;AAke/B,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAA;AA0YvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAQ1D;yBARe,eAAe"}