@loczer/storefront-sdk 0.194.0 → 0.196.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.
- package/dist/chunks/pkg/ui/dist/{Button-CxG2fSpA.js → Button-Cr_u8vnh.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{Dialog-4leTWiev.js → Dialog-CczmPDwY.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Drawer/{index-DA5V7R_q.js → index-CSvSVP_J.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Map/{MapContent-BmKjdWmq.js → MapContent-CDeWtwKa.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{Map-CsOTdTtL.js → Map-Cs7wgtH9.js} +2 -2
- package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-CfEqkJ0y.js → MorphingModalWizard-j1CgFGLe.js} +4 -3
- package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-C6IWYoIg.js → ResponsiveDialog-BVwhTZQo.js} +3 -3
- package/dist/chunks/pkg/ui/dist/{ScrollArea-Bjwo84cv.js → ScrollArea-BqLd0xZj.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Spinner/{index-DzMEU0iA.js → index-Cgi70z_E.js} +1 -1
- package/dist/chunks/pkg/ui/dist/lib/utils-DXB19bzk.js +8 -0
- package/dist/components/BikeProductCard/index.js +6 -6
- package/dist/components/BookingBikeVariantDialog/index.js +7 -7
- package/dist/components/BookingFlowSteps/index.js +11 -11
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +16 -15
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +16 -15
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.js +20 -23
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts +39 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts.map +1 -0
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +830 -0
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +52 -46
- package/dist/components/ContactSection/index.js +35 -35
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +4 -4
- package/dist/components/ContractSaleDocument/ThumbnailSidebar.js +1 -1
- package/dist/components/DeliveryAddressSelector/index.js +5 -5
- package/dist/components/Footer/index.js +11 -11
- package/dist/components/FulfillmentSection/index.js +9 -9
- package/dist/components/Header/index.js +61 -61
- package/dist/components/Map/index.js +1 -1
- package/dist/components/PoweredByLoczerBadge/index.js +5 -5
- package/dist/components/ProductPriceBadge/index.js +73 -73
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +6 -6
- package/dist/components/StorefrontCartPanel/index.js +8 -8
- package/dist/components/StorefrontInsuranceNotice/index.js +6 -6
- package/dist/components/StorefrontPopupMessages/index.js +8 -8
- package/dist/components/payment/MollieCardFieldsForm.js +1 -1
- package/dist/components/payment/StripeCardFieldsForm.js +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/lib/utils.d.ts +3 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +9 -5
- package/dist/pages/BookingPage.js +8 -8
- package/dist/pages/CheckoutPaymentPage.js +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +15 -15
- package/dist/pages/HomePage.js +19 -19
- package/dist/pages/PaymentLinkPage.js +1 -1
- package/dist/pages/PaymentLinkSuccessPage.js +1 -1
- package/dist/pages/ProductPage.js +143 -143
- package/dist/pages/checkout/components/CheckoutCouponCard.js +5 -5
- package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
- package/dist/storefront.css +1 -1
- package/package.json +5 -1
- package/dist/chunks/node_modules/clsx/dist/clsx-CdyIqUTr.js +0 -16
- package/dist/chunks/node_modules/tailwind-merge/dist/bundle-mjs-CF4QheV5.js +0 -1608
- package/dist/chunks/pkg/ui/dist/lib/utils-BN5KOMSm.js +0 -8
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts +0 -22
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts.map +0 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +0 -342
|
@@ -5,15 +5,15 @@ import { Input as r } from "../../ui/input.js";
|
|
|
5
5
|
import { Card as i } from "../../ui/card.js";
|
|
6
6
|
import { ProductWarningNotice as a } from "../ProductWarningNotice/index.js";
|
|
7
7
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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, Trash2 as p } from "lucide-react";
|
|
12
12
|
//#region src/components/StorefrontCartPanel/index.tsx
|
|
13
13
|
function m({ lines: m, itemCount: h, totalPerDayMinor: g, estimatedDays: _, estimatedTotalMinor: v, discountedEstimatedTotalMinor: y, discountAmountMinor: b, lateReturnSurchargeMinor: x, couponCode: S, durationLabel: C, title: w, description: T, checkoutPath: E, showCheckoutAction: D = !1, showClearAction: O = !1, editable: k = !0, summaryAddon: A, stickyTopClassName: j = "top-24", onQuantityChange: M, onRemove: N, onClear: P }) {
|
|
14
|
-
let { t: F, i18n: I } =
|
|
14
|
+
let { t: F, i18n: I } = u();
|
|
15
15
|
return /* @__PURE__ */ c(i, {
|
|
16
|
-
className:
|
|
16
|
+
className: d("sticky border-slate-200 bg-white shadow-sm", j),
|
|
17
17
|
children: [/* @__PURE__ */ c("div", {
|
|
18
18
|
className: "border-b border-slate-200 px-4 py-4",
|
|
19
19
|
children: [/* @__PURE__ */ c("div", {
|
|
@@ -158,9 +158,9 @@ function m({ lines: m, itemCount: h, totalPerDayMinor: g, estimatedDays: _, esti
|
|
|
158
158
|
] }) : null,
|
|
159
159
|
/* @__PURE__ */ c("div", {
|
|
160
160
|
className: "grid gap-2",
|
|
161
|
-
children: [D && E ? /* @__PURE__ */ s(
|
|
161
|
+
children: [D && E ? /* @__PURE__ */ s(l, {
|
|
162
162
|
to: E,
|
|
163
|
-
className:
|
|
163
|
+
className: d(m.length > 0 ? "block" : "hidden"),
|
|
164
164
|
children: /* @__PURE__ */ c(n, {
|
|
165
165
|
className: "w-full gap-2",
|
|
166
166
|
children: [/* @__PURE__ */ s("span", { children: F("checkout_button") }), /* @__PURE__ */ s(f, {
|
|
@@ -171,7 +171,7 @@ function m({ lines: m, itemCount: h, totalPerDayMinor: g, estimatedDays: _, esti
|
|
|
171
171
|
}) : null, O && P ? /* @__PURE__ */ s(n, {
|
|
172
172
|
type: "button",
|
|
173
173
|
variant: "outline",
|
|
174
|
-
className:
|
|
174
|
+
className: d(m.length > 0 ? "w-full gap-2" : "hidden"),
|
|
175
175
|
onClick: P,
|
|
176
176
|
children: /* @__PURE__ */ s("span", { children: F("cart_clear") })
|
|
177
177
|
}) : null]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { formatStorefrontPriceMinor as e } from "../../lib/pricing.js";
|
|
2
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-
|
|
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-BVwhTZQo.js";
|
|
4
4
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
8
|
import { CheckCircle2 as p, Info as m, Umbrella as h } from "lucide-react";
|
|
9
9
|
//#region src/components/StorefrontInsuranceNotice/index.tsx
|
|
10
10
|
var g = "show_insurance_modal", _ = (e, t) => {
|
|
@@ -12,7 +12,7 @@ var g = "show_insurance_modal", _ = (e, t) => {
|
|
|
12
12
|
return [...new Set(n)].sort((e, t) => e - t);
|
|
13
13
|
};
|
|
14
14
|
function v({ bikes: v, currency: y, className: b }) {
|
|
15
|
-
let { t: x, i18n: S } =
|
|
15
|
+
let { t: x, i18n: S } = d(), [C, w] = u(), T = C.get(g) === "true", E = (e) => {
|
|
16
16
|
let t = new URLSearchParams(C);
|
|
17
17
|
e ? t.set(g, "true") : t.delete(g), w(t, { replace: !0 });
|
|
18
18
|
}, D = (t) => {
|
|
@@ -33,7 +33,7 @@ function v({ bikes: v, currency: y, className: b }) {
|
|
|
33
33
|
price: D("e-bike")
|
|
34
34
|
}];
|
|
35
35
|
return /* @__PURE__ */ l("li", {
|
|
36
|
-
className:
|
|
36
|
+
className: f("flex items-start gap-3", b),
|
|
37
37
|
"data-testid": "storefront-insurance-notice",
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ c(h, {
|
|
@@ -2,12 +2,12 @@ import { getLocalizedEntry as e, getLocalizedValue as t } from "../../localizati
|
|
|
2
2
|
import { buildStorefrontImageUrl as n } from "../../lib/storefrontImage.js";
|
|
3
3
|
import { Button as r } from "../../ui/button.js";
|
|
4
4
|
import { isAutomationRuntime as i } from "../../lib/isAutomationRuntime.js";
|
|
5
|
-
import { ResponsiveDialog as a, ResponsiveDialogContent as o, ResponsiveDialogDescription as s, ResponsiveDialogFooter as c, ResponsiveDialogHeader as l, ResponsiveDialogTitle as u } from "../../chunks/pkg/ui/dist/ResponsiveDialog-
|
|
5
|
+
import { ResponsiveDialog as a, ResponsiveDialogContent as o, ResponsiveDialogDescription as s, ResponsiveDialogFooter as c, ResponsiveDialogHeader as l, ResponsiveDialogTitle as u } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
|
|
6
6
|
import { useEffect as d, useState as f } from "react";
|
|
7
7
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import { useLocation as h, useParams as g } from "@rpcbase/router";
|
|
9
|
+
import { useTranslation as _ } from "react-i18next";
|
|
10
|
+
import { cn as v } from "@rpcbase/ui";
|
|
11
11
|
import { Info as y, X as b } from "lucide-react";
|
|
12
12
|
//#region src/components/StorefrontPopupMessages/index.tsx
|
|
13
13
|
var x = "loczer-storefront-popup-message-dismissed", S = (e, t) => `${x}:${e || "storefront"}:${t}`, C = (e) => {
|
|
@@ -58,7 +58,7 @@ var x = "loczer-storefront-popup-message-dismissed", S = (e, t) => `${x}:${e ||
|
|
|
58
58
|
};
|
|
59
59
|
}, A = "absolute right-5 top-5 z-10 flex h-9 w-9 items-center justify-center rounded-full bg-white/12 text-white/75 ring-1 ring-white/75 backdrop-blur-lg transition hover:bg-white/18 hover:text-white/85 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/85";
|
|
60
60
|
function j({ storefrontConfiguration: e }) {
|
|
61
|
-
let { t, i18n: n } =
|
|
61
|
+
let { t, i18n: n } = _(), { storeSlug: x } = g(), S = h(), [C, E] = f(null), [j, M] = f(() => /* @__PURE__ */ new Set()), N = x?.trim() || e?.storeSlug || "", P = new URLSearchParams(S.search).get("popup_e2e") === "1", F = i() && !P ? [] : e?.content?.modalMessages ?? [];
|
|
62
62
|
d(() => {
|
|
63
63
|
let t = () => {
|
|
64
64
|
E(D(e?.shop.timeZone));
|
|
@@ -126,7 +126,7 @@ function j({ storefrontConfiguration: e }) {
|
|
|
126
126
|
className: "max-w-[28rem] text-left text-3xl font-semibold leading-tight text-white",
|
|
127
127
|
children: /* @__PURE__ */ p("span", { children: I.title })
|
|
128
128
|
}), /* @__PURE__ */ p(s, {
|
|
129
|
-
className:
|
|
129
|
+
className: v("mt-2 max-w-[30rem] text-left text-sm leading-6 text-white/85", !I.subtitle && "sr-only"),
|
|
130
130
|
children: /* @__PURE__ */ p("span", { children: V })
|
|
131
131
|
})]
|
|
132
132
|
})
|
|
@@ -148,7 +148,7 @@ function j({ storefrontConfiguration: e }) {
|
|
|
148
148
|
className: "text-left text-lg font-semibold leading-6 text-slate-950",
|
|
149
149
|
children: /* @__PURE__ */ p("span", { children: I.title })
|
|
150
150
|
}), /* @__PURE__ */ p(s, {
|
|
151
|
-
className:
|
|
151
|
+
className: v("text-left text-sm text-slate-600", !I.subtitle && "sr-only"),
|
|
152
152
|
children: /* @__PURE__ */ p("span", { children: V })
|
|
153
153
|
})]
|
|
154
154
|
})]
|
|
@@ -170,7 +170,7 @@ function j({ storefrontConfiguration: e }) {
|
|
|
170
170
|
})
|
|
171
171
|
}, e))
|
|
172
172
|
}) : null, I.messageHtml ? /* @__PURE__ */ p("div", {
|
|
173
|
-
className:
|
|
173
|
+
className: v("text-sm leading-6 text-slate-700 [&_a]:text-slate-950 [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:border-slate-300 [&_blockquote]:pl-4 [&_h1]:text-2xl [&_h1]:font-semibold [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:text-lg [&_h3]:font-semibold [&_li]:my-1 [&_ol]:list-decimal [&_ol]:pl-6 [&_p]:my-2 [&_ul]:list-disc [&_ul]:pl-6", !I.subtitle && "text-base leading-7"),
|
|
174
174
|
dangerouslySetInnerHTML: { __html: I.messageHtml }
|
|
175
175
|
}) : null]
|
|
176
176
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button as e } from "../../ui/button.js";
|
|
2
2
|
import { Label as t } from "../../ui/label.js";
|
|
3
|
-
import { Spinner as n } from "../../chunks/pkg/ui/dist/Spinner/index-
|
|
3
|
+
import { Spinner as n } from "../../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
4
4
|
import { getMollieCardStyles as r } from "../../lib/mollieComponentStyles.js";
|
|
5
5
|
import { useEffect as i, useRef as a, useState as o } from "react";
|
|
6
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as e } from "../../ui/button.js";
|
|
2
2
|
import { Label as t } from "../../ui/label.js";
|
|
3
3
|
import { Input as n } from "../../ui/input.js";
|
|
4
|
-
import { Spinner as r } from "../../chunks/pkg/ui/dist/Spinner/index-
|
|
4
|
+
import { Spinner as r } from "../../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
5
5
|
import { useState as i } from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import { useTranslation as s } from "react-i18next";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
-
import {
|
|
2
|
+
import { ClassValue } from 'clsx';
|
|
3
3
|
import { ComponentPropsWithoutRef } from 'react';
|
|
4
4
|
import { ControllerProps } from '@rpcbase/form';
|
|
5
5
|
import { FieldError } from 'react-hook-form';
|
|
6
6
|
import { FieldPath } from '@rpcbase/form';
|
|
7
7
|
import { FieldValues } from '@rpcbase/form';
|
|
8
8
|
import { FormProviderProps } from 'react-hook-form';
|
|
9
|
-
import { HourPickerOption } from '@rpcbase/ui';
|
|
10
9
|
import { JSX } from 'react/jsx-runtime';
|
|
11
10
|
import { LoaderArgs } from '@rpcbase/client';
|
|
12
11
|
import { Locale } from 'date-fns';
|
|
@@ -1003,7 +1002,7 @@ export declare type CatalogProductSortOptions = {
|
|
|
1003
1002
|
|
|
1004
1003
|
export declare type CatalogProductSortPriceUnit = StorefrontPublicProductPrice["unit"];
|
|
1005
1004
|
|
|
1006
|
-
export
|
|
1005
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
1007
1006
|
|
|
1008
1007
|
export declare function compareCatalogProducts<T extends SortableCatalogProduct>(left: T, right: T, options?: CatalogProductSortOptions): number;
|
|
1009
1008
|
|
|
@@ -2008,6 +2007,15 @@ declare type HeaderProps = {
|
|
|
2008
2007
|
whatsappPhoneDisplay?: string;
|
|
2009
2008
|
};
|
|
2010
2009
|
|
|
2010
|
+
declare type HourPickerOption = {
|
|
2011
|
+
value: string;
|
|
2012
|
+
label: string;
|
|
2013
|
+
selectedLabel?: React_2.ReactNode;
|
|
2014
|
+
compactSelectedLabel?: React_2.ReactNode;
|
|
2015
|
+
disabled?: boolean;
|
|
2016
|
+
description?: React_2.ReactNode;
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2011
2019
|
export declare const Input: React_2.ForwardRefExoticComponent<Omit<React_2.DetailedHTMLProps<React_2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React_2.RefAttributes<HTMLInputElement>>;
|
|
2012
2020
|
|
|
2013
2021
|
export declare type InsuranceProvider = z.infer<typeof insuranceProviderSchema>;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
1
2
|
type MoneyMinor = number;
|
|
3
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
2
4
|
export declare const formatPriceMinor: (valueMinor: MoneyMinor, language: string, { currency, minimumFractionDigits, maximumFractionDigits, }?: {
|
|
3
5
|
currency?: string;
|
|
4
6
|
minimumFractionDigits?: number;
|
|
@@ -12,5 +14,5 @@ export declare const getAvailabilityVariant: (status: string | undefined) => {
|
|
|
12
14
|
labelKey: string;
|
|
13
15
|
variant: "secondary" | "outline" | "destructive";
|
|
14
16
|
};
|
|
15
|
-
export {
|
|
17
|
+
export {};
|
|
16
18
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAA;AAGxB,eAAO,MAAM,gBAAgB,GAC3B,YAAY,UAAU,EACtB,UAAU,MAAM,EAChB,8DAIG;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC1B,KACL,MAYF,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAQ,KAAK,CAAC;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,KAAG,UAAU,GAAG,IAMvG,CAAA;AAED,eAAO,MAAM,sBAAsB,GACjC,QAAQ,MAAM,GAAG,SAAS,KACzB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,CAAA;CAItE,CAAA
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAI5C,KAAK,UAAU,GAAG,MAAM,CAAA;AAGxB,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAGD,eAAO,MAAM,gBAAgB,GAC3B,YAAY,UAAU,EACtB,UAAU,MAAM,EAChB,8DAIG;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC1B,KACL,MAYF,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAQ,KAAK,CAAC;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,KAAG,UAAU,GAAG,IAMvG,CAAA;AAED,eAAO,MAAM,sBAAsB,GACjC,QAAQ,MAAM,GAAG,SAAS,KACzB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,aAAa,CAAA;CAItE,CAAA"}
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { clsx as e } from "clsx";
|
|
2
|
+
import { twMerge as t } from "tailwind-merge";
|
|
2
3
|
//#region src/lib/utils.ts
|
|
3
|
-
|
|
4
|
+
function n(...n) {
|
|
5
|
+
return t(e(n));
|
|
6
|
+
}
|
|
7
|
+
var r = (e, t, { currency: n = "EUR", minimumFractionDigits: r, maximumFractionDigits: i } = {}) => {
|
|
4
8
|
let a = e / 100;
|
|
5
9
|
try {
|
|
6
10
|
return new Intl.NumberFormat(t, {
|
|
@@ -12,10 +16,10 @@ var t = (e, t, { currency: n = "EUR", minimumFractionDigits: r, maximumFractionD
|
|
|
12
16
|
} catch {
|
|
13
17
|
return `${a}€`;
|
|
14
18
|
}
|
|
15
|
-
},
|
|
19
|
+
}, i = (e) => {
|
|
16
20
|
let t = e.filter((e) => typeof e?.value == "number" && (e?.unit ?? "day") === "day").map((e) => e.value);
|
|
17
21
|
return t.length === 0 ? null : Math.min(...t);
|
|
18
|
-
},
|
|
22
|
+
}, a = (e) => e === "OUT_OF_STOCK" ? {
|
|
19
23
|
labelKey: "availability_out_of_stock",
|
|
20
24
|
variant: "destructive"
|
|
21
25
|
} : e === "LOW_STOCK" ? {
|
|
@@ -26,4 +30,4 @@ var t = (e, t, { currency: n = "EUR", minimumFractionDigits: r, maximumFractionD
|
|
|
26
30
|
variant: "secondary"
|
|
27
31
|
};
|
|
28
32
|
//#endregion
|
|
29
|
-
export {
|
|
33
|
+
export { n as cn, r as formatPriceMinor, a as getAvailabilityVariant, i as getMinDayPriceMinor };
|
|
@@ -24,9 +24,9 @@ import { FulfillmentSection as _e } from "../components/FulfillmentSection/index
|
|
|
24
24
|
import { BookingBikeVariantDialog as ve } from "../components/BookingBikeVariantDialog/index.js";
|
|
25
25
|
import { useEffect as b, useMemo as x, useState as S } from "react";
|
|
26
26
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
27
|
-
import {
|
|
28
|
-
import { Link as E, useLocation as ye, useParams as be, useSearchParams as xe } from "@rpcbase/router";
|
|
27
|
+
import { Link as T, useLocation as ye, useParams as be, useSearchParams as xe } from "@rpcbase/router";
|
|
29
28
|
import { useTranslation as Se } from "react-i18next";
|
|
29
|
+
import { cn as E } from "@rpcbase/ui";
|
|
30
30
|
import { ArrowLeft as Ce, ArrowRight as we, Bike as Te, ShoppingCart as Ee } from "lucide-react";
|
|
31
31
|
//#region src/pages/BookingPage.tsx
|
|
32
32
|
var D = (e) => String(e).padStart(2, "0"), O = "product_modal", De = (e) => `${e.getFullYear()}-${D(e.getMonth() + 1)}-${D(e.getDate())}`, Oe = (e) => {
|
|
@@ -87,7 +87,7 @@ function Fe({ product: e, selectedVariantId: t, onSelect: n, onConfirm: r, onCan
|
|
|
87
87
|
return /* @__PURE__ */ w("label", {
|
|
88
88
|
htmlFor: r,
|
|
89
89
|
"data-testid": i,
|
|
90
|
-
className:
|
|
90
|
+
className: E("flex items-start gap-3 rounded-xl border p-3 transition", t === n.id ? "border-slate-900 bg-white" : "border-slate-200 bg-white"),
|
|
91
91
|
children: [/* @__PURE__ */ C(y, {
|
|
92
92
|
id: r,
|
|
93
93
|
value: n.id,
|
|
@@ -397,16 +397,16 @@ function A() {
|
|
|
397
397
|
}),
|
|
398
398
|
/* @__PURE__ */ w("div", {
|
|
399
399
|
className: "flex items-center justify-between gap-3",
|
|
400
|
-
children: [/* @__PURE__ */ w(
|
|
400
|
+
children: [/* @__PURE__ */ w(T, {
|
|
401
401
|
to: lt,
|
|
402
402
|
className: "inline-flex items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950",
|
|
403
403
|
children: [/* @__PURE__ */ C(Ce, {
|
|
404
404
|
className: "h-4 w-4",
|
|
405
405
|
"aria-hidden": "true"
|
|
406
406
|
}), /* @__PURE__ */ C("span", { children: o("back_to_home") })]
|
|
407
|
-
}), /* @__PURE__ */ C(
|
|
407
|
+
}), /* @__PURE__ */ C(T, {
|
|
408
408
|
to: dt,
|
|
409
|
-
className:
|
|
409
|
+
className: E(F > 0 && X ? "inline-flex" : "hidden"),
|
|
410
410
|
children: /* @__PURE__ */ w(g, {
|
|
411
411
|
size: "sm",
|
|
412
412
|
className: "gap-2",
|
|
@@ -499,7 +499,7 @@ function A() {
|
|
|
499
499
|
className: "flex h-full flex-col gap-2 p-3",
|
|
500
500
|
children: [
|
|
501
501
|
/* @__PURE__ */ w("div", {
|
|
502
|
-
className:
|
|
502
|
+
className: E("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
|
|
503
503
|
style: a.style,
|
|
504
504
|
children: [i ? /* @__PURE__ */ C("img", {
|
|
505
505
|
src: i,
|
|
@@ -556,7 +556,7 @@ function A() {
|
|
|
556
556
|
}) : null,
|
|
557
557
|
/* @__PURE__ */ w("div", {
|
|
558
558
|
className: "mt-auto flex items-center gap-2",
|
|
559
|
-
children: [/* @__PURE__ */ C(
|
|
559
|
+
children: [/* @__PURE__ */ C(T, {
|
|
560
560
|
to: c,
|
|
561
561
|
state: ft,
|
|
562
562
|
className: "text-xs font-medium text-slate-700 hover:text-slate-950",
|
|
@@ -3,7 +3,7 @@ import { useStorefrontCart as t } from "../lib/cart.js";
|
|
|
3
3
|
import { Button as n } from "../ui/button.js";
|
|
4
4
|
import { Card as r } from "../ui/card.js";
|
|
5
5
|
import { apiPost as i } from "../lib/apiCall.js";
|
|
6
|
-
import { Spinner as a } from "../chunks/pkg/ui/dist/Spinner/index-
|
|
6
|
+
import { Spinner as a } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
7
7
|
import { ROUTE as o, responseSchema as ee } from "../lib/checkoutPaymentSession.js";
|
|
8
8
|
import { MollieCardFieldsForm as s } from "../components/payment/MollieCardFieldsForm.js";
|
|
9
9
|
import { StripeCardFieldsForm as c } from "../components/payment/StripeCardFieldsForm.js";
|
|
@@ -4,14 +4,14 @@ import { Card as n } from "../ui/card.js";
|
|
|
4
4
|
import { ContractSaleDocument as r } from "../components/ContractSaleDocument/Invoice.js";
|
|
5
5
|
import "../components/ContractSaleDocument/index.js";
|
|
6
6
|
import { apiGet as i, apiPost as a } from "../lib/apiCall.js";
|
|
7
|
-
import { Spinner as o } from "../chunks/pkg/ui/dist/Spinner/index-
|
|
7
|
+
import { Spinner as o } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
8
8
|
import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as s, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as c, GET_CONTRACT_SALE_DOCUMENT_ROUTE as l, acceptContractSaleDocumentResponseSchema as u, contractSaleDocumentApiSchema as d, getContractSaleDocumentResponseSchema as f } from "../lib/contractSaleDocumentApi.js";
|
|
9
9
|
import { useEffect as p, useState as m } from "react";
|
|
10
10
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { toast as _ } from "@rpcbase/client";
|
|
12
|
+
import { Link as v, useLoaderData as y, useLocation as b, useNavigate as x } from "@rpcbase/router";
|
|
13
|
+
import { useTranslation as S } from "react-i18next";
|
|
14
|
+
import { cn as C } from "@rpcbase/ui";
|
|
15
15
|
import { ArrowLeft as w, ChevronDown as T, Download as E } from "lucide-react";
|
|
16
16
|
import { Menu as D } from "@base-ui/react/menu";
|
|
17
17
|
//#region src/pages/ContractSaleDocumentPage.tsx
|
|
@@ -55,7 +55,7 @@ var O = (e) => new URLSearchParams(e).get("pdf") === "1", k = (e) => t(new URLSe
|
|
|
55
55
|
labelKey: "docs_contract_sale_language_option_fr"
|
|
56
56
|
};
|
|
57
57
|
function R({ selectedLanguage: t, onChange: n }) {
|
|
58
|
-
let { t: r } =
|
|
58
|
+
let { t: r } = S(), [i, a] = m(!1), o = I.find((e) => e.code === t) ?? L;
|
|
59
59
|
return /* @__PURE__ */ g(D.Root, {
|
|
60
60
|
open: i,
|
|
61
61
|
onOpenChange: a,
|
|
@@ -96,7 +96,7 @@ function R({ selectedLanguage: t, onChange: n }) {
|
|
|
96
96
|
t.defaultPrevented || (n(e.code), a(!1));
|
|
97
97
|
},
|
|
98
98
|
"data-testid": `contract-sale-document-language-option-${e.code}`,
|
|
99
|
-
className:
|
|
99
|
+
className: C("relative flex cursor-pointer select-none items-center justify-between gap-3 whitespace-nowrap rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground", t === e.code && "bg-accent"),
|
|
100
100
|
children: [/* @__PURE__ */ h("span", { children: r(e.labelKey) }), /* @__PURE__ */ h("span", {
|
|
101
101
|
className: "text-2xs uppercase text-muted-foreground",
|
|
102
102
|
children: e.code
|
|
@@ -157,7 +157,7 @@ var z = (async ({ ctx: e, params: t }) => {
|
|
|
157
157
|
return t.success ? t.data : null;
|
|
158
158
|
};
|
|
159
159
|
function V() {
|
|
160
|
-
let { t: i, i18n: o } =
|
|
160
|
+
let { t: i, i18n: o } = S(), c = y(), l = b(), d = x(), { storeSlug: f, referenceId: C, saleDocumentId: T } = c, D = c.pdfMode || O(l.search), [A, j] = m(B(c.document)), [I, L] = m(null), [z, V] = m(!1), [H, U] = m(c.error), W = k(l.search) ?? t(A?.language?.customer) ?? c.documentLanguage ?? t(o.language) ?? "fr", G = f && C && T ? M(f, C, T, W) : null, K = f && C && T ? N(f, C, T, W) : "";
|
|
161
161
|
p(() => {
|
|
162
162
|
j(B(c.document)), U(c.error);
|
|
163
163
|
}, [c.document, c.error]), p(() => {
|
|
@@ -186,7 +186,7 @@ function V() {
|
|
|
186
186
|
className: "text-sm text-destructive",
|
|
187
187
|
children: /* @__PURE__ */ h("span", { children: H ?? i("docs_contract_sale_load_error") })
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */ h(
|
|
189
|
+
/* @__PURE__ */ h(v, {
|
|
190
190
|
to: `/${f ?? ""}`,
|
|
191
191
|
children: /* @__PURE__ */ g(e, {
|
|
192
192
|
className: "gap-2",
|
|
@@ -211,7 +211,7 @@ function V() {
|
|
|
211
211
|
let J = async () => {
|
|
212
212
|
if (!G || z) return;
|
|
213
213
|
V(!0);
|
|
214
|
-
let e =
|
|
214
|
+
let e = _.loading(i("docs_contract_sale_preparing_pdf"), { icon: F() });
|
|
215
215
|
try {
|
|
216
216
|
let t = await fetch(G, {
|
|
217
217
|
method: "GET",
|
|
@@ -219,11 +219,11 @@ function V() {
|
|
|
219
219
|
});
|
|
220
220
|
if (!t.ok) throw Error(`PDF request failed with status ${t.status}`);
|
|
221
221
|
let n = await t.blob(), r = window.URL.createObjectURL(n), i = window.document.createElement("a");
|
|
222
|
-
i.href = r, i.download = P(t.headers.get("content-disposition"), A.saleDocumentNumber, A.kind), window.document.body.appendChild(i), i.click(), i.remove(),
|
|
222
|
+
i.href = r, i.download = P(t.headers.get("content-disposition"), A.saleDocumentNumber, A.kind), window.document.body.appendChild(i), i.click(), i.remove(), _.dismiss(e), window.setTimeout(() => {
|
|
223
223
|
window.URL.revokeObjectURL(r);
|
|
224
224
|
}, 0);
|
|
225
225
|
} catch (t) {
|
|
226
|
-
console.error("Failed to download storefront contract sale document PDF", t),
|
|
226
|
+
console.error("Failed to download storefront contract sale document PDF", t), _.dismiss(e), _.error(i("docs_contract_sale_download_pdf_error"));
|
|
227
227
|
} finally {
|
|
228
228
|
V(!1);
|
|
229
229
|
}
|
|
@@ -232,7 +232,7 @@ function V() {
|
|
|
232
232
|
className: "flex h-dvh min-h-0 flex-col overflow-hidden bg-gradient-to-br from-slate-100 via-slate-100 to-slate-200",
|
|
233
233
|
children: [/* @__PURE__ */ g("div", {
|
|
234
234
|
className: "fixed inset-x-0 top-0 z-40 flex h-14 items-center justify-between gap-3 border-b border-border bg-background/70 px-4 backdrop-blur-xl backdrop-saturate-125 supports-[backdrop-filter]:bg-background/55 sm:px-6",
|
|
235
|
-
children: [/* @__PURE__ */ g(
|
|
235
|
+
children: [/* @__PURE__ */ g(v, {
|
|
236
236
|
to: `/${f ?? ""}`,
|
|
237
237
|
className: "inline-flex items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950",
|
|
238
238
|
children: [/* @__PURE__ */ h(w, {
|
|
@@ -291,12 +291,12 @@ function V() {
|
|
|
291
291
|
publicDocumentUrl: K,
|
|
292
292
|
onAccept: async (e) => {
|
|
293
293
|
let t = e.mode === "signature" ? i("docs_contract_sale_signature_submit_error") : i("docs_contract_sale_acceptance_submit_error");
|
|
294
|
-
if (!f || !
|
|
294
|
+
if (!f || !C || !T) throw Error(t);
|
|
295
295
|
L(e.mode);
|
|
296
296
|
try {
|
|
297
297
|
let n = await a(s, {
|
|
298
298
|
storeSlug: f,
|
|
299
|
-
referenceId:
|
|
299
|
+
referenceId: C,
|
|
300
300
|
saleDocumentId: T,
|
|
301
301
|
lang: W,
|
|
302
302
|
acceptance: e.mode === "signature" ? {
|
package/dist/pages/HomePage.js
CHANGED
|
@@ -30,10 +30,10 @@ import { createStorefrontTimeSlotsFetcher as xe } from "../lib/fetchStorefrontTi
|
|
|
30
30
|
import { FulfillmentSection as Se } from "../components/FulfillmentSection/index.js";
|
|
31
31
|
import { useEffect as p, useMemo as m, useRef as Ce, useState as h } from "react";
|
|
32
32
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
33
|
-
import { cn as y } from "@rpcbase/ui";
|
|
34
33
|
import { useMediaQuery as we } from "@rpcbase/client";
|
|
35
|
-
import { Link as
|
|
34
|
+
import { Link as y, useLocation as Te, useNavigate as Ee, useParams as De, useSearchParams as Oe } from "@rpcbase/router";
|
|
36
35
|
import { useTranslation as ke } from "react-i18next";
|
|
36
|
+
import { cn as b } from "@rpcbase/ui";
|
|
37
37
|
import { ArrowRight as x, Bike as Ae, Clock as je, MapPin as Me, ShieldCheck as Ne, Truck as Pe } from "lucide-react";
|
|
38
38
|
//#region src/pages/HomePage.tsx
|
|
39
39
|
var S = (e) => String(e).padStart(2, "0"), Fe = "text-2xs font-semibold uppercase tracking-wide text-slate-600", Ie = "h-10", C = 6, w = 5, Le = [
|
|
@@ -56,7 +56,7 @@ var S = (e) => String(e).padStart(2, "0"), Fe = "text-2xs font-semibold uppercas
|
|
|
56
56
|
let { hasConfirmedTimeSlots: i, startTime: a, endTime: o } = d();
|
|
57
57
|
return /* @__PURE__ */ v(u, {
|
|
58
58
|
ref: e,
|
|
59
|
-
className:
|
|
59
|
+
className: b("gap-2", t),
|
|
60
60
|
disabled: !i || !a || !o,
|
|
61
61
|
onClick: r,
|
|
62
62
|
children: [/* @__PURE__ */ _("span", { children: n }), /* @__PURE__ */ _(x, {
|
|
@@ -171,7 +171,7 @@ function O() {
|
|
|
171
171
|
}), /* @__PURE__ */ _("span", { children: d("status_open") })]
|
|
172
172
|
}), /* @__PURE__ */ v(l, {
|
|
173
173
|
variant: "outline",
|
|
174
|
-
className:
|
|
174
|
+
className: b(!T && "border-destructive/40 text-destructive"),
|
|
175
175
|
children: [/* @__PURE__ */ _(Me, {
|
|
176
176
|
className: "h-3 w-3",
|
|
177
177
|
"aria-hidden": "true"
|
|
@@ -187,9 +187,9 @@ function O() {
|
|
|
187
187
|
children: /* @__PURE__ */ _("span", { children: d("hero_description") })
|
|
188
188
|
}),
|
|
189
189
|
/* @__PURE__ */ _("div", {
|
|
190
|
-
className:
|
|
190
|
+
className: b("mt-6", !J && "rounded-xl border bg-white/70 p-3"),
|
|
191
191
|
children: /* @__PURE__ */ v("ul", {
|
|
192
|
-
className:
|
|
192
|
+
className: b("space-y-3", J && "space-y-2"),
|
|
193
193
|
"data-testid": "storefront-home-trust-features",
|
|
194
194
|
children: [
|
|
195
195
|
/* @__PURE__ */ v("li", {
|
|
@@ -211,10 +211,10 @@ function O() {
|
|
|
211
211
|
}),
|
|
212
212
|
/* @__PURE__ */ _(ye, {
|
|
213
213
|
policy: w.bookingEngine.cancellationPolicy,
|
|
214
|
-
className:
|
|
214
|
+
className: b(!J && "border-t border-slate-200/70 pt-3")
|
|
215
215
|
}),
|
|
216
216
|
P ? /* @__PURE__ */ v("li", {
|
|
217
|
-
className:
|
|
217
|
+
className: b("flex items-start gap-3", !J && "border-t border-slate-200/70 pt-3"),
|
|
218
218
|
"data-testid": "storefront-delivery-notice",
|
|
219
219
|
children: [/* @__PURE__ */ _(Pe, {
|
|
220
220
|
className: "mt-0.5 h-5 w-5 text-slate-900",
|
|
@@ -233,7 +233,7 @@ function O() {
|
|
|
233
233
|
/* @__PURE__ */ _(be, {
|
|
234
234
|
bikes: k,
|
|
235
235
|
currency: w.bookingEngine.currency,
|
|
236
|
-
className:
|
|
236
|
+
className: b(!J && "border-t border-slate-200/70 pt-3")
|
|
237
237
|
})
|
|
238
238
|
]
|
|
239
239
|
})
|
|
@@ -348,7 +348,7 @@ function O() {
|
|
|
348
348
|
]
|
|
349
349
|
})
|
|
350
350
|
}), $ = (w.content?.galleryImageIds ?? []).map((e) => c(e, S ?? w.storeSlug)).filter((e) => e.length > 0), yt = [...k, ...Be].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), bt = ze($.length > 0 ? $ : yt), xt = $[0] ?? "data:image/svg+xml,%3csvg%20width='1600'%20height='1066'%20viewBox='0%200%201600%201066'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230F172A'/%3e%3cstop%20offset='1'%20stop-color='%23164E63'/%3e%3c/linearGradient%3e%3clinearGradient%20id='road'%20x1='0'%20y1='740'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23334155'/%3e%3cstop%20offset='1'%20stop-color='%230F172A'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20width='1600'%20height='1066'%20fill='url(%23bg)'/%3e%3cpath%20d='M0%20675C233%20555%20420%20530%20590%20551C752%20571%20930%20635%201088%20632C1252%20629%201423%20559%201600%20498V1066H0V675Z'%20fill='%231E293B'%20opacity='0.7'/%3e%3cpath%20d='M0%20792C213%20710%20393%20686%20573%20697C760%20708%20945%20760%201123%20761C1286%20762%201437%20722%201600%20666V1066H0V792Z'%20fill='url(%23road)'/%3e%3ccircle%20cx='440'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3ccircle%20cx='740'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3cpath%20d='M440%20620L560%20520L650%20620H740M560%20520L610%20445M595%20470H665'%20stroke='%23F8FAFC'%20stroke-width='18'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20cx='980'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3ccircle%20cx='1240'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3cpath%20d='M980%20700L1078%20616L1156%20700H1240M1078%20616L1122%20556M1112%20574H1172'%20stroke='%23E2E8F0'%20stroke-width='14'%20stroke-linecap='round'%20stroke-linejoin='round'%20opacity='0.7'/%3e%3c/svg%3e", St = q ? /* @__PURE__ */ _("style", { children: "\n @keyframes storefront-hero-marquee-up {\n 0% { transform: translateY(0); }\n 100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n }\n @keyframes storefront-hero-marquee-down {\n 0% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n 100% { transform: translateY(0); }\n }\n .storefront-hero-marquee-track {\n animation: storefront-hero-marquee-up var(--storefront-hero-marquee-duration, 32s) linear infinite;\n will-change: transform;\n }\n .storefront-hero-marquee-track-reverse {\n animation-name: storefront-hero-marquee-down;\n }\n @media (prefers-reduced-motion: reduce) {\n .storefront-hero-marquee-track,\n .storefront-hero-marquee-track-reverse {\n animation: none !important;\n transform: none !important;\n }\n }\n " }) : null, Ct = (e) => /* @__PURE__ */ _("div", {
|
|
351
|
-
className:
|
|
351
|
+
className: b("relative h-full min-h-[340px] overflow-hidden", e),
|
|
352
352
|
style: {
|
|
353
353
|
WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
354
354
|
maskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
|
|
@@ -363,9 +363,9 @@ function O() {
|
|
|
363
363
|
children: bt.map((e, t) => {
|
|
364
364
|
let n = Le[t % Le.length] ?? 32, r = [...e, ...e];
|
|
365
365
|
return /* @__PURE__ */ _("div", {
|
|
366
|
-
className:
|
|
366
|
+
className: b("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
|
|
367
367
|
children: /* @__PURE__ */ _("div", {
|
|
368
|
-
className:
|
|
368
|
+
className: b("storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]", t % 2 == 1 && "storefront-hero-marquee-track-reverse"),
|
|
369
369
|
style: {
|
|
370
370
|
"--storefront-hero-marquee-duration": `${n}s`,
|
|
371
371
|
"--storefront-hero-marquee-gap": "0.75rem"
|
|
@@ -443,7 +443,7 @@ function O() {
|
|
|
443
443
|
})
|
|
444
444
|
}) : null]
|
|
445
445
|
}), /* @__PURE__ */ v("div", {
|
|
446
|
-
className:
|
|
446
|
+
className: b("lg:col-span-7", !q && "lg:pt-4"),
|
|
447
447
|
children: [Tt, at ? null : /* @__PURE__ */ _("div", {
|
|
448
448
|
className: "mt-4",
|
|
449
449
|
children: vt
|
|
@@ -475,7 +475,7 @@ function O() {
|
|
|
475
475
|
className: "text-sm text-slate-600",
|
|
476
476
|
children: /* @__PURE__ */ _("span", { children: d("featured_description") })
|
|
477
477
|
})]
|
|
478
|
-
}), /* @__PURE__ */ v(
|
|
478
|
+
}), /* @__PURE__ */ v(y, {
|
|
479
479
|
className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
|
|
480
480
|
to: `/${S ?? ""}/booking${lt}`,
|
|
481
481
|
children: [/* @__PURE__ */ _("span", { children: d("featured_view_all") }), /* @__PURE__ */ _(x, {
|
|
@@ -490,12 +490,12 @@ function O() {
|
|
|
490
490
|
return /* @__PURE__ */ v("div", {
|
|
491
491
|
className: "group flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
|
|
492
492
|
children: [
|
|
493
|
-
/* @__PURE__ */ _(
|
|
493
|
+
/* @__PURE__ */ _(y, {
|
|
494
494
|
to: u,
|
|
495
495
|
state: Z,
|
|
496
496
|
className: "block",
|
|
497
497
|
children: /* @__PURE__ */ _("span", {
|
|
498
|
-
className:
|
|
498
|
+
className: b("relative block aspect-[1618/1000] overflow-hidden rounded-xl", o.className),
|
|
499
499
|
style: o.style,
|
|
500
500
|
children: a ? /* @__PURE__ */ _("img", {
|
|
501
501
|
src: a,
|
|
@@ -514,7 +514,7 @@ function O() {
|
|
|
514
514
|
/* @__PURE__ */ v("span", {
|
|
515
515
|
className: "flex flex-1 flex-col gap-1",
|
|
516
516
|
children: [
|
|
517
|
-
/* @__PURE__ */ _(
|
|
517
|
+
/* @__PURE__ */ _(y, {
|
|
518
518
|
to: u,
|
|
519
519
|
state: Z,
|
|
520
520
|
className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
|
|
@@ -541,7 +541,7 @@ function O() {
|
|
|
541
541
|
className: "text-slate-400",
|
|
542
542
|
children: "·"
|
|
543
543
|
}),
|
|
544
|
-
/* @__PURE__ */ _(
|
|
544
|
+
/* @__PURE__ */ _(y, {
|
|
545
545
|
to: u,
|
|
546
546
|
state: Z,
|
|
547
547
|
className: "text-xs font-medium text-slate-700 hover:text-slate-950",
|
|
@@ -605,7 +605,7 @@ function O() {
|
|
|
605
605
|
className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
|
|
606
606
|
children: [
|
|
607
607
|
/* @__PURE__ */ _("div", {
|
|
608
|
-
className:
|
|
608
|
+
className: b("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
|
|
609
609
|
style: a.style,
|
|
610
610
|
children: i ? /* @__PURE__ */ _("img", {
|
|
611
611
|
src: i,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as e } from "../ui/button.js";
|
|
2
2
|
import { Card as t } from "../ui/card.js";
|
|
3
3
|
import { apiGet as n, apiPost as r } from "../lib/apiCall.js";
|
|
4
|
-
import { Spinner as i } from "../chunks/pkg/ui/dist/Spinner/index-
|
|
4
|
+
import { Spinner as i } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
5
5
|
import { GET_MOLLIE_SECURE_PAYMENT_SESSION_ROUTE as a, GET_SECURE_PAYMENT_LINK_ROUTE as o, GET_STRIPE_SECURE_PAYMENT_SESSION_ROUTE as s, getMollieSecurePaymentSessionResponseSchema as c, getSecurePaymentLinkResponseSchema as l, getStripeSecurePaymentSessionResponseSchema as u } from "../lib/securePaymentLink.js";
|
|
6
6
|
import { MollieCardFieldsForm as d } from "../components/payment/MollieCardFieldsForm.js";
|
|
7
7
|
import { StripeCardFieldsForm as f } from "../components/payment/StripeCardFieldsForm.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as e } from "../ui/button.js";
|
|
2
2
|
import { Card as t } from "../ui/card.js";
|
|
3
3
|
import { apiGet as n } from "../lib/apiCall.js";
|
|
4
|
-
import { Spinner as r } from "../chunks/pkg/ui/dist/Spinner/index-
|
|
4
|
+
import { Spinner as r } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
5
5
|
import { GET_SECURE_PAYMENT_LINK_ROUTE as i, getSecurePaymentLinkResponseSchema as a } from "../lib/securePaymentLink.js";
|
|
6
6
|
import { useEffect as o, useRef as s, useState as c } from "react";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|