@loczer/storefront-sdk 0.153.0 → 0.154.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/components/Footer/businessHoursUtils.d.ts.map +1 -1
- package/dist/components/Footer/businessHoursUtils.js +16 -16
- package/dist/components/StorefrontCartPanel/index.d.ts +2 -1
- package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
- package/dist/components/StorefrontCartPanel/index.js +68 -63
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +1 -0
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +1 -0
- package/dist/index.d.ts +48 -32
- package/dist/index.js +103 -100
- package/dist/lib/checkoutVerifyCoupon.d.ts +1 -0
- package/dist/lib/checkoutVerifyCoupon.d.ts.map +1 -1
- package/dist/lib/checkoutVerifyCoupon.js +1 -0
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +56 -51
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +2 -2
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.js +16 -14
- package/dist/storefront.css +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +17 -17
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +8 -11
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +52 -86
- package/dist/ui/radio-group.d.ts +10 -7
- package/dist/ui/radio-group.d.ts.map +1 -1
- package/dist/ui/radio-group.js +63 -45
- package/dist/ui/select.d.ts +29 -15
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +158 -232
- package/dist/ui/slot.d.ts +3 -7
- package/dist/ui/slot.d.ts.map +1 -1
- package/dist/ui/slot.js +47 -27
- package/dist/ui/theme.d.ts +9 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +24 -0
- package/dist/ui/tooltip.d.ts +30 -13
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +89 -60
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"businessHoursUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/businessHoursUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAGvD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;
|
|
1
|
+
{"version":3,"file":"businessHoursUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/businessHoursUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAGvD,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAOD,eAAO,MAAM,uBAAuB,GAClC,OAAO,qBAAqB,EAAE,EAC9B,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,KACjE,wBAAwB,EA4C1B,CAAA"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const i = (s) => s <= 4, g = (s) => s === 5 || s === 6, h = (s, w) => {
|
|
2
|
+
const k = [...s].sort((e, n) => e.weekday - n.weekday), t = k.filter((e) => i(e.weekday)), c = k.filter((e) => g(e.weekday)), o = [];
|
|
3
3
|
let a = 0;
|
|
4
|
-
for (; a <
|
|
5
|
-
const e =
|
|
6
|
-
let
|
|
7
|
-
for (;
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
4
|
+
for (; a < t.length; ) {
|
|
5
|
+
const e = t[a], n = e.value;
|
|
6
|
+
let d = a;
|
|
7
|
+
for (; d + 1 < t.length && t[d + 1].value === n; )
|
|
8
|
+
d += 1;
|
|
9
|
+
const l = t.slice(a, d + 1), y = l.length === 1 ? `${e.weekday}` : `${e.weekday}-${l[l.length - 1].weekday}`;
|
|
10
|
+
o.push({
|
|
11
11
|
id: `weekday-${y}`,
|
|
12
|
-
weekdays:
|
|
13
|
-
label:
|
|
14
|
-
value:
|
|
15
|
-
}), a =
|
|
12
|
+
weekdays: l.map((r) => r.weekday),
|
|
13
|
+
label: l.length === 1 ? e.label : w(e.label, l[l.length - 1].label),
|
|
14
|
+
value: n
|
|
15
|
+
}), a = d + 1;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const u = c.map((e) => ({
|
|
18
18
|
id: `weekend-${e.weekday}`,
|
|
19
19
|
weekdays: [e.weekday],
|
|
20
20
|
label: e.label,
|
|
21
21
|
value: e.value
|
|
22
22
|
}));
|
|
23
|
-
return [...
|
|
23
|
+
return [...o, ...u];
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
h as groupBusinessHoursItems
|
|
27
27
|
};
|
|
@@ -7,6 +7,7 @@ type StorefrontCartPanelProps = {
|
|
|
7
7
|
estimatedTotalMinor?: number;
|
|
8
8
|
discountedEstimatedTotalMinor?: number;
|
|
9
9
|
discountAmountMinor?: number;
|
|
10
|
+
lateReturnSurchargeMinor?: number;
|
|
10
11
|
couponCode?: string;
|
|
11
12
|
durationLabel?: string;
|
|
12
13
|
title?: string;
|
|
@@ -20,6 +21,6 @@ type StorefrontCartPanelProps = {
|
|
|
20
21
|
onRemove?: (key: string) => void;
|
|
21
22
|
onClear?: () => void;
|
|
22
23
|
};
|
|
23
|
-
export declare function StorefrontCartPanel({ lines, itemCount, totalPerDayMinor, estimatedDays, estimatedTotalMinor, discountedEstimatedTotalMinor, discountAmountMinor, couponCode, durationLabel, title, description, checkoutPath, showCheckoutAction, showClearAction, editable, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function StorefrontCartPanel({ lines, itemCount, totalPerDayMinor, estimatedDays, estimatedTotalMinor, discountedEstimatedTotalMinor, discountAmountMinor, lateReturnSurchargeMinor, couponCode, durationLabel, title, description, checkoutPath, showCheckoutAction, showClearAction, editable, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
24
25
|
export {};
|
|
25
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCartPanel/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAQtE,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,yBAAyB,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,6BAA6B,CAAC,EAAE,MAAM,CAAA;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,UAAU,EACV,aAAa,EACb,KAAK,EACL,WAAW,EACX,YAAY,EACZ,kBAA0B,EAC1B,eAAuB,EACvB,QAAe,EACf,kBAA6B,EAC7B,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCartPanel/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAQtE,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,yBAAyB,EAAE,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,6BAA6B,CAAC,EAAE,MAAM,CAAA;IACtC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,6BAA6B,EAC7B,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,aAAa,EACb,KAAK,EACL,WAAW,EACX,YAAY,EACZ,kBAA0B,EAC1B,eAAuB,EACvB,QAAe,EACf,kBAA6B,EAC7B,gBAAgB,EAChB,QAAQ,EACR,OAAO,GACR,EAAE,wBAAwB,2CAwL1B"}
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e, Fragment as
|
|
2
|
-
import { Link as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Trash2 as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { formatPriceMinor as
|
|
7
|
-
import { Badge as
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Card as
|
|
10
|
-
import { Input as
|
|
11
|
-
import { ProductWarningNotice as
|
|
12
|
-
function
|
|
13
|
-
lines:
|
|
14
|
-
itemCount:
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { Link as F } from "@rpcbase/router";
|
|
3
|
+
import { cn as d } from "@rpcbase/ui";
|
|
4
|
+
import { Trash2 as W, ArrowRight as D } from "lucide-react";
|
|
5
|
+
import { useTranslation as T } from "react-i18next";
|
|
6
|
+
import { formatPriceMinor as r } from "../../lib/utils.js";
|
|
7
|
+
import { Badge as m } from "../../ui/badge.js";
|
|
8
|
+
import { Button as o } from "../../ui/button.js";
|
|
9
|
+
import { Card as E } from "../../ui/card.js";
|
|
10
|
+
import { Input as G } from "../../ui/input.js";
|
|
11
|
+
import { ProductWarningNotice as H } from "../ProductWarningNotice/index.js";
|
|
12
|
+
function M({
|
|
13
|
+
lines: n,
|
|
14
|
+
itemCount: _,
|
|
15
15
|
totalPerDayMinor: v,
|
|
16
|
-
estimatedDays:
|
|
17
|
-
estimatedTotalMinor:
|
|
18
|
-
discountedEstimatedTotalMinor:
|
|
19
|
-
discountAmountMinor:
|
|
20
|
-
|
|
16
|
+
estimatedDays: p,
|
|
17
|
+
estimatedTotalMinor: h,
|
|
18
|
+
discountedEstimatedTotalMinor: w,
|
|
19
|
+
discountAmountMinor: i,
|
|
20
|
+
lateReturnSurchargeMinor: c,
|
|
21
|
+
couponCode: k,
|
|
21
22
|
durationLabel: u,
|
|
22
|
-
title:
|
|
23
|
-
description:
|
|
24
|
-
checkoutPath:
|
|
25
|
-
showCheckoutAction:
|
|
26
|
-
showClearAction:
|
|
27
|
-
editable:
|
|
28
|
-
stickyTopClassName:
|
|
29
|
-
onQuantityChange:
|
|
30
|
-
onRemove:
|
|
31
|
-
onClear:
|
|
23
|
+
title: j,
|
|
24
|
+
description: x,
|
|
25
|
+
checkoutPath: f,
|
|
26
|
+
showCheckoutAction: q = !1,
|
|
27
|
+
showClearAction: C = !1,
|
|
28
|
+
editable: V = !0,
|
|
29
|
+
stickyTopClassName: L = "top-24",
|
|
30
|
+
onQuantityChange: b,
|
|
31
|
+
onRemove: N,
|
|
32
|
+
onClear: g
|
|
32
33
|
}) {
|
|
33
|
-
const { t, i18n: s } =
|
|
34
|
-
return /* @__PURE__ */ l(
|
|
34
|
+
const { t, i18n: s } = T();
|
|
35
|
+
return /* @__PURE__ */ l(E, { className: d("sticky border-slate-200 bg-white shadow-sm", L), children: [
|
|
35
36
|
/* @__PURE__ */ l("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
36
37
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
|
|
37
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
38
|
-
/* @__PURE__ */ e(
|
|
38
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: j ?? t("cart_title") }) }),
|
|
39
|
+
/* @__PURE__ */ e(m, { variant: "outline", className: "border-slate-200 bg-white text-slate-700", children: /* @__PURE__ */ e("span", { children: t("cart_items_count", { count: _ }) }) })
|
|
39
40
|
] }),
|
|
40
|
-
|
|
41
|
+
x ? /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: x }) }) : null
|
|
41
42
|
] }),
|
|
42
43
|
/* @__PURE__ */ l("div", { className: "grid gap-3 p-4", children: [
|
|
43
|
-
|
|
44
|
-
const
|
|
44
|
+
n.length === 0 ? /* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: t("cart_empty") }) }) : /* @__PURE__ */ e("div", { className: "grid gap-3", children: n.map((a) => {
|
|
45
|
+
const P = r(a.unitPriceMinor, s.language), $ = a.insufficientCapacity === !0, z = a.availabilityIssue === "quantity_unavailable" ? t("availability_quantity_unavailable") : t("availability_out_of_stock");
|
|
45
46
|
return /* @__PURE__ */ l(
|
|
46
47
|
"div",
|
|
47
48
|
{
|
|
@@ -51,36 +52,36 @@ function A({
|
|
|
51
52
|
/* @__PURE__ */ e("p", { className: "truncate text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a.productName }) }),
|
|
52
53
|
a.productVariantLabel ? /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: `${t(a.productVariantIsSize ? "product_size_label" : "product_variant_label")}: ${a.productVariantLabel}` }) }) : null,
|
|
53
54
|
a.productVariantDescription ? /* @__PURE__ */ e("p", { className: "text-xs text-slate-500", children: /* @__PURE__ */ e("span", { children: a.productVariantDescription }) }) : null,
|
|
54
|
-
/* @__PURE__ */ e(
|
|
55
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: t("cart_line_meta", { quantity: a.quantity, price:
|
|
56
|
-
|
|
55
|
+
/* @__PURE__ */ e(H, { warning: a.productWarning }),
|
|
56
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: t("cart_line_meta", { quantity: a.quantity, price: P }) }) }),
|
|
57
|
+
$ ? /* @__PURE__ */ e("div", { className: "flex flex-col items-start gap-1 pt-1", children: /* @__PURE__ */ e(m, { variant: "destructive", children: /* @__PURE__ */ e("span", { children: z }) }) }) : null
|
|
57
58
|
] }),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
V ? /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
60
|
+
b ? /* @__PURE__ */ e(
|
|
61
|
+
G,
|
|
61
62
|
{
|
|
62
63
|
type: "number",
|
|
63
64
|
min: 1,
|
|
64
65
|
max: 99,
|
|
65
66
|
value: a.quantity,
|
|
66
67
|
onChange: (I) => {
|
|
67
|
-
const
|
|
68
|
-
|
|
68
|
+
const y = Number(I.target.value);
|
|
69
|
+
b(a.key, Number.isFinite(y) ? y : 0);
|
|
69
70
|
},
|
|
70
71
|
className: "h-9 w-16",
|
|
71
72
|
"aria-label": t("quantity_label")
|
|
72
73
|
}
|
|
73
74
|
) : null,
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
N ? /* @__PURE__ */ e(
|
|
76
|
+
o,
|
|
76
77
|
{
|
|
77
78
|
type: "button",
|
|
78
79
|
variant: "ghost",
|
|
79
80
|
size: "icon",
|
|
80
81
|
className: "h-8 w-8 text-slate-500 hover:bg-slate-50 hover:text-slate-700",
|
|
81
|
-
onClick: () =>
|
|
82
|
+
onClick: () => N(a.key),
|
|
82
83
|
"aria-label": t("remove_from_cart"),
|
|
83
|
-
children: /* @__PURE__ */ e(
|
|
84
|
+
children: /* @__PURE__ */ e(W, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
84
85
|
}
|
|
85
86
|
) : null
|
|
86
87
|
] }) : null
|
|
@@ -91,34 +92,38 @@ function A({
|
|
|
91
92
|
}) }),
|
|
92
93
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 border-t border-slate-200 pt-3 text-sm", children: [
|
|
93
94
|
/* @__PURE__ */ e("p", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("cart_total_per_day") }) }),
|
|
94
|
-
/* @__PURE__ */ e("p", { className: "font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
95
|
+
/* @__PURE__ */ e("p", { className: "font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: r(v, s.language) }) })
|
|
95
96
|
] }),
|
|
96
|
-
typeof
|
|
97
|
+
typeof p == "number" && typeof h == "number" ? /* @__PURE__ */ l(B, { children: [
|
|
97
98
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
98
|
-
/* @__PURE__ */ e("p", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_estimated_days", { count:
|
|
99
|
-
u ? /* @__PURE__ */ e(
|
|
99
|
+
/* @__PURE__ */ e("p", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_estimated_days", { count: p }) }) }),
|
|
100
|
+
u ? /* @__PURE__ */ e(m, { variant: "outline", className: "border-slate-200 bg-white text-slate-700", children: /* @__PURE__ */ e("span", { children: u }) }) : null
|
|
100
101
|
] }),
|
|
101
|
-
typeof
|
|
102
|
-
/* @__PURE__ */ e("p", { className: "text-emerald-700", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_discount", { code:
|
|
103
|
-
/* @__PURE__ */ e("p", { className: "font-semibold text-emerald-700", children: /* @__PURE__ */ e("span", { children: `-${i
|
|
102
|
+
typeof i == "number" && i > 0 ? /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
103
|
+
/* @__PURE__ */ e("p", { className: "text-emerald-700", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_discount", { code: k ?? "" }) }) }),
|
|
104
|
+
/* @__PURE__ */ e("p", { className: "font-semibold text-emerald-700", children: /* @__PURE__ */ e("span", { children: `-${r(i, s.language)}` }) })
|
|
105
|
+
] }) : null,
|
|
106
|
+
typeof c == "number" && c > 0 ? /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
107
|
+
/* @__PURE__ */ e("p", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_late_return_fee") }) }),
|
|
108
|
+
/* @__PURE__ */ e("p", { className: "font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: `+${r(c, s.language)}` }) })
|
|
104
109
|
] }) : null,
|
|
105
110
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
106
111
|
/* @__PURE__ */ e("p", { className: "text-slate-700", children: /* @__PURE__ */ e("span", { children: t("checkout_estimated_total") }) }),
|
|
107
|
-
/* @__PURE__ */ e("p", { className: "font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
112
|
+
/* @__PURE__ */ e("p", { className: "font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: r(w ?? h, s.language) }) })
|
|
108
113
|
] })
|
|
109
114
|
] }) : null,
|
|
110
115
|
/* @__PURE__ */ l("div", { className: "grid gap-2", children: [
|
|
111
|
-
|
|
116
|
+
q && f ? /* @__PURE__ */ e(F, { to: f, className: d(n.length > 0 ? "block" : "hidden"), children: /* @__PURE__ */ l(o, { className: "w-full gap-2", children: [
|
|
112
117
|
/* @__PURE__ */ e("span", { children: t("checkout_button") }),
|
|
113
|
-
/* @__PURE__ */ e(
|
|
118
|
+
/* @__PURE__ */ e(D, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
114
119
|
] }) }) : null,
|
|
115
|
-
|
|
116
|
-
|
|
120
|
+
C && g ? /* @__PURE__ */ e(
|
|
121
|
+
o,
|
|
117
122
|
{
|
|
118
123
|
type: "button",
|
|
119
124
|
variant: "outline",
|
|
120
|
-
className:
|
|
121
|
-
onClick:
|
|
125
|
+
className: d(n.length > 0 ? "w-full gap-2" : "hidden"),
|
|
126
|
+
onClick: g,
|
|
122
127
|
children: /* @__PURE__ */ e("span", { children: t("cart_clear") })
|
|
123
128
|
}
|
|
124
129
|
) : null
|
|
@@ -127,5 +132,5 @@ function A({
|
|
|
127
132
|
] });
|
|
128
133
|
}
|
|
129
134
|
export {
|
|
130
|
-
|
|
135
|
+
M as StorefrontCartPanel
|
|
131
136
|
};
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ export declare const storefront: {
|
|
|
150
150
|
checkout_coupon_apply: string;
|
|
151
151
|
checkout_coupon_remove: string;
|
|
152
152
|
checkout_coupon_discount: string;
|
|
153
|
+
checkout_late_return_fee: string;
|
|
153
154
|
checkout_coupon_applied: string;
|
|
154
155
|
checkout_coupon_auto_applied: string;
|
|
155
156
|
checkout_coupon_manual_applied: string;
|
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4YtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -150,6 +150,7 @@ const e = {
|
|
|
150
150
|
checkout_coupon_apply: "Apply",
|
|
151
151
|
checkout_coupon_remove: "Remove coupon",
|
|
152
152
|
checkout_coupon_discount: "Discount {{code}}",
|
|
153
|
+
checkout_late_return_fee: "Late return fee",
|
|
153
154
|
checkout_coupon_applied: "{{code}} applied: {{amount}} off",
|
|
154
155
|
checkout_coupon_auto_applied: "{{code}} was applied automatically.",
|
|
155
156
|
checkout_coupon_manual_applied: "Coupon applied.",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -150,6 +150,7 @@ export declare const storefront: {
|
|
|
150
150
|
checkout_coupon_apply: string;
|
|
151
151
|
checkout_coupon_remove: string;
|
|
152
152
|
checkout_coupon_discount: string;
|
|
153
|
+
checkout_late_return_fee: string;
|
|
153
154
|
checkout_coupon_applied: string;
|
|
154
155
|
checkout_coupon_auto_applied: string;
|
|
155
156
|
checkout_coupon_manual_applied: string;
|
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4YtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -150,6 +150,7 @@ const e = {
|
|
|
150
150
|
checkout_coupon_apply: "Appliquer",
|
|
151
151
|
checkout_coupon_remove: "Retirer le coupon",
|
|
152
152
|
checkout_coupon_discount: "Remise {{code}}",
|
|
153
|
+
checkout_late_return_fee: "Supplément retour tardif",
|
|
153
154
|
checkout_coupon_applied: "{{code}} appliqué : {{amount}} de remise",
|
|
154
155
|
checkout_coupon_auto_applied: "{{code}} a été appliqué automatiquement.",
|
|
155
156
|
checkout_coupon_manual_applied: "Coupon appliqué.",
|
package/dist/index.d.ts
CHANGED
|
@@ -11,19 +11,9 @@ import { JSX } from 'react/jsx-runtime';
|
|
|
11
11
|
import { LoaderArgs } from '@rpcbase/client';
|
|
12
12
|
import { Locale } from 'date-fns';
|
|
13
13
|
import { MouseEventHandler } from 'react';
|
|
14
|
-
import { Radio } from '@base-ui/react/radio';
|
|
15
|
-
import { RadioGroup as RadioGroup_2 } from '@base-ui/react/radio-group';
|
|
16
14
|
import * as React_2 from 'react';
|
|
17
15
|
import { ReactNode } from 'react';
|
|
18
16
|
import { RefObject } from 'react';
|
|
19
|
-
import { Select as Select_2 } from '@base-ui/react/select';
|
|
20
|
-
import { SelectGroupLabelProps } from '@base-ui/react';
|
|
21
|
-
import { SelectGroupProps } from '@base-ui/react';
|
|
22
|
-
import { SelectItemProps } from '@base-ui/react';
|
|
23
|
-
import { SelectPopupProps } from '@base-ui/react';
|
|
24
|
-
import { SelectPositionerProps } from '@base-ui/react';
|
|
25
|
-
import { SelectTriggerProps } from '@base-ui/react';
|
|
26
|
-
import { SelectValueProps } from '@base-ui/react';
|
|
27
17
|
import { TFunction } from 'i18next';
|
|
28
18
|
import { VariantProps } from 'class-variance-authority';
|
|
29
19
|
import { z } from 'zod';
|
|
@@ -774,7 +764,7 @@ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLBu
|
|
|
774
764
|
|
|
775
765
|
export declare const buttonVariants: (props?: ({
|
|
776
766
|
variant?: "default" | "link" | "secondary" | "outline" | "destructive" | "ghost" | null | undefined;
|
|
777
|
-
size?: "default" | "
|
|
767
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
778
768
|
} & ClassProp) | undefined) => string;
|
|
779
769
|
|
|
780
770
|
export declare function calculateDailyPriceForQuantity(prices: StorefrontPublicProductPrice[] | undefined, dayCount: number): number | null;
|
|
@@ -1485,7 +1475,7 @@ export declare function FormItem({ className, ...props }: React_2.ComponentProps
|
|
|
1485
1475
|
|
|
1486
1476
|
export declare function FormLabel({ className, ...props }: React_2.ComponentProps<typeof Label>): JSX.Element;
|
|
1487
1477
|
|
|
1488
|
-
export declare function FormMessage({ className,
|
|
1478
|
+
export declare function FormMessage({ className, ...props }: React_2.ComponentProps<"p">): JSX.Element | null;
|
|
1489
1479
|
|
|
1490
1480
|
export declare type FulfillmentMode = z.infer<typeof fulfillmentModeSchema>;
|
|
1491
1481
|
|
|
@@ -2424,13 +2414,17 @@ export declare const publicCheckoutDynamicOptionsSchema: z.ZodObject<{
|
|
|
2424
2414
|
sameDayCutoff: z.ZodOptional<z.ZodString>;
|
|
2425
2415
|
}, z.core.$strict>;
|
|
2426
2416
|
|
|
2427
|
-
export declare
|
|
2428
|
-
|
|
2429
|
-
|
|
2417
|
+
export declare const RadioGroup: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> & {
|
|
2418
|
+
value?: string;
|
|
2419
|
+
defaultValue?: string;
|
|
2420
|
+
onValueChange?: (value: string) => void;
|
|
2421
|
+
disabled?: boolean;
|
|
2422
|
+
name?: string;
|
|
2423
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
2430
2424
|
|
|
2431
|
-
declare
|
|
2432
|
-
|
|
2433
|
-
}
|
|
2425
|
+
export declare const RadioGroupItem: React_2.ForwardRefExoticComponent<Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, "value" | "onChange"> & {
|
|
2426
|
+
value: string;
|
|
2427
|
+
} & React_2.RefAttributes<HTMLButtonElement>>;
|
|
2434
2428
|
|
|
2435
2429
|
export declare const readBookingSearchParamsFromSessionStorage: (storeSlug?: string) => URLSearchParams;
|
|
2436
2430
|
|
|
@@ -2493,34 +2487,53 @@ export declare const richTextVersionSchema: z.ZodLiteral<1>;
|
|
|
2493
2487
|
|
|
2494
2488
|
export declare const ROUTE = "/api/public/storefront/contact-form";
|
|
2495
2489
|
|
|
2496
|
-
export declare function Select
|
|
2490
|
+
export declare function Select({ value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, children, }: SelectProps): JSX.Element;
|
|
2497
2491
|
|
|
2498
|
-
export declare const SelectContent: React_2.ForwardRefExoticComponent<
|
|
2499
|
-
position?: "
|
|
2492
|
+
export declare const SelectContent: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & {
|
|
2493
|
+
position?: "popper" | "item-aligned";
|
|
2500
2494
|
autoScroll?: "firstEnabled" | "firstEnabledWithContext";
|
|
2501
|
-
footer?: React_2.ReactNode;
|
|
2502
|
-
children?: React_2.ReactNode;
|
|
2503
2495
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
2504
2496
|
|
|
2505
|
-
export declare const SelectGroup: React_2.ForwardRefExoticComponent<
|
|
2497
|
+
export declare const SelectGroup: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
2498
|
+
|
|
2499
|
+
export declare const SelectIcon: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLElement> & {
|
|
2500
|
+
asChild?: boolean;
|
|
2501
|
+
} & React_2.RefAttributes<HTMLElement>>;
|
|
2502
|
+
|
|
2503
|
+
export declare const SelectItem: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & {
|
|
2504
|
+
value: string;
|
|
2505
|
+
disabled?: boolean;
|
|
2506
|
+
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
2507
|
+
|
|
2508
|
+
export declare const SelectItemIndicator: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLSpanElement> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
2506
2509
|
|
|
2507
|
-
export declare const
|
|
2510
|
+
export declare const SelectItemText: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
2508
2511
|
|
|
2509
|
-
export declare const SelectLabel: React_2.ForwardRefExoticComponent<
|
|
2512
|
+
export declare const SelectLabel: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
2510
2513
|
|
|
2511
|
-
declare type SelectProps
|
|
2512
|
-
|
|
2514
|
+
declare type SelectProps = {
|
|
2515
|
+
value?: string;
|
|
2516
|
+
defaultValue?: string;
|
|
2517
|
+
onValueChange?: (value: string) => void;
|
|
2518
|
+
open?: boolean;
|
|
2519
|
+
defaultOpen?: boolean;
|
|
2520
|
+
onOpenChange?: (open: boolean) => void;
|
|
2521
|
+
children?: React_2.ReactNode;
|
|
2513
2522
|
};
|
|
2514
2523
|
|
|
2515
2524
|
export declare const SelectScrollDownButton: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
2516
2525
|
|
|
2517
2526
|
export declare const SelectScrollUpButton: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
2518
2527
|
|
|
2519
|
-
export declare const SelectSeparator: React_2.ForwardRefExoticComponent<
|
|
2528
|
+
export declare const SelectSeparator: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
2529
|
+
|
|
2530
|
+
export declare const SelectTrigger: React_2.ForwardRefExoticComponent<SelectTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
2520
2531
|
|
|
2521
|
-
|
|
2532
|
+
declare type SelectTriggerProps = React_2.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2522
2533
|
|
|
2523
|
-
export declare const SelectValue: React_2.ForwardRefExoticComponent<
|
|
2534
|
+
export declare const SelectValue: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLSpanElement> & {
|
|
2535
|
+
placeholder?: React_2.ReactNode;
|
|
2536
|
+
} & React_2.RefAttributes<HTMLSpanElement>>;
|
|
2524
2537
|
|
|
2525
2538
|
export declare type ShopConfiguration = z.infer<typeof shopConfigurationSchema>;
|
|
2526
2539
|
|
|
@@ -2746,7 +2759,7 @@ export declare type StorefrontCartItem = {
|
|
|
2746
2759
|
quantity: number;
|
|
2747
2760
|
};
|
|
2748
2761
|
|
|
2749
|
-
export declare function StorefrontCartPanel({ lines, itemCount, totalPerDayMinor, estimatedDays, estimatedTotalMinor, discountedEstimatedTotalMinor, discountAmountMinor, couponCode, durationLabel, title, description, checkoutPath, showCheckoutAction, showClearAction, editable, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): JSX.Element;
|
|
2762
|
+
export declare function StorefrontCartPanel({ lines, itemCount, totalPerDayMinor, estimatedDays, estimatedTotalMinor, discountedEstimatedTotalMinor, discountAmountMinor, lateReturnSurchargeMinor, couponCode, durationLabel, title, description, checkoutPath, showCheckoutAction, showClearAction, editable, stickyTopClassName, onQuantityChange, onRemove, onClear, }: StorefrontCartPanelProps): JSX.Element;
|
|
2750
2763
|
|
|
2751
2764
|
declare type StorefrontCartPanelProps = {
|
|
2752
2765
|
lines: StorefrontCartSummaryLine[];
|
|
@@ -2756,6 +2769,7 @@ declare type StorefrontCartPanelProps = {
|
|
|
2756
2769
|
estimatedTotalMinor?: number;
|
|
2757
2770
|
discountedEstimatedTotalMinor?: number;
|
|
2758
2771
|
discountAmountMinor?: number;
|
|
2772
|
+
lateReturnSurchargeMinor?: number;
|
|
2759
2773
|
couponCode?: string;
|
|
2760
2774
|
durationLabel?: string;
|
|
2761
2775
|
title?: string;
|
|
@@ -3448,6 +3462,7 @@ export declare const storefrontEn: {
|
|
|
3448
3462
|
checkout_coupon_apply: string;
|
|
3449
3463
|
checkout_coupon_remove: string;
|
|
3450
3464
|
checkout_coupon_discount: string;
|
|
3465
|
+
checkout_late_return_fee: string;
|
|
3451
3466
|
checkout_coupon_applied: string;
|
|
3452
3467
|
checkout_coupon_auto_applied: string;
|
|
3453
3468
|
checkout_coupon_manual_applied: string;
|
|
@@ -3876,6 +3891,7 @@ export declare const storefrontFr: {
|
|
|
3876
3891
|
checkout_coupon_apply: string;
|
|
3877
3892
|
checkout_coupon_remove: string;
|
|
3878
3893
|
checkout_coupon_discount: string;
|
|
3894
|
+
checkout_late_return_fee: string;
|
|
3879
3895
|
checkout_coupon_applied: string;
|
|
3880
3896
|
checkout_coupon_auto_applied: string;
|
|
3881
3897
|
checkout_coupon_manual_applied: string;
|