@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.
Files changed (45) hide show
  1. package/dist/components/Footer/businessHoursUtils.d.ts.map +1 -1
  2. package/dist/components/Footer/businessHoursUtils.js +16 -16
  3. package/dist/components/StorefrontCartPanel/index.d.ts +2 -1
  4. package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
  5. package/dist/components/StorefrontCartPanel/index.js +68 -63
  6. package/dist/i18n/en.d.ts +1 -0
  7. package/dist/i18n/en.d.ts.map +1 -1
  8. package/dist/i18n/en.js +1 -0
  9. package/dist/i18n/fr.d.ts +1 -0
  10. package/dist/i18n/fr.d.ts.map +1 -1
  11. package/dist/i18n/fr.js +1 -0
  12. package/dist/index.d.ts +48 -32
  13. package/dist/index.js +103 -100
  14. package/dist/lib/checkoutVerifyCoupon.d.ts +1 -0
  15. package/dist/lib/checkoutVerifyCoupon.d.ts.map +1 -1
  16. package/dist/lib/checkoutVerifyCoupon.js +1 -0
  17. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  18. package/dist/pages/CheckoutPage.js +56 -51
  19. package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +2 -2
  20. package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
  21. package/dist/pages/checkout/components/CheckoutSummaryColumn.js +16 -14
  22. package/dist/storefront.css +1 -1
  23. package/dist/ui/button.d.ts +1 -1
  24. package/dist/ui/button.js +17 -17
  25. package/dist/ui/card.d.ts.map +1 -1
  26. package/dist/ui/card.js +8 -11
  27. package/dist/ui/form.d.ts +1 -1
  28. package/dist/ui/form.d.ts.map +1 -1
  29. package/dist/ui/form.js +52 -86
  30. package/dist/ui/radio-group.d.ts +10 -7
  31. package/dist/ui/radio-group.d.ts.map +1 -1
  32. package/dist/ui/radio-group.js +63 -45
  33. package/dist/ui/select.d.ts +29 -15
  34. package/dist/ui/select.d.ts.map +1 -1
  35. package/dist/ui/select.js +158 -232
  36. package/dist/ui/slot.d.ts +3 -7
  37. package/dist/ui/slot.d.ts.map +1 -1
  38. package/dist/ui/slot.js +47 -27
  39. package/dist/ui/theme.d.ts +9 -0
  40. package/dist/ui/theme.d.ts.map +1 -0
  41. package/dist/ui/theme.js +24 -0
  42. package/dist/ui/tooltip.d.ts +30 -13
  43. package/dist/ui/tooltip.d.ts.map +1 -1
  44. package/dist/ui/tooltip.js +89 -60
  45. 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;AAMD,eAAO,MAAM,uBAAuB,GAClC,OAAO,qBAAqB,EAAE,EAC9B,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,KACjE,wBAAwB,EA4C1B,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 c = (s) => s === 0 ? 6 : s - 1, g = (s) => s >= 1 && s <= 5, h = (s) => s === 6 || s === 0, p = (s, r) => {
2
- const o = [...s].sort((e, d) => c(e.weekday) - c(d.weekday)), l = o.filter((e) => g(e.weekday)), u = o.filter((e) => h(e.weekday)), k = [];
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 < l.length; ) {
5
- const e = l[a], d = e.value;
6
- let n = a;
7
- for (; n + 1 < l.length && l[n + 1].value === d; )
8
- n += 1;
9
- const t = l.slice(a, n + 1), y = t.length === 1 ? `${e.weekday}` : `${e.weekday}-${t[t.length - 1].weekday}`;
10
- k.push({
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: t.map((i) => i.weekday),
13
- label: t.length === 1 ? e.label : r(e.label, t[t.length - 1].label),
14
- value: d
15
- }), a = n + 1;
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 w = u.map((e) => ({
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 [...k, ...w];
23
+ return [...o, ...u];
24
24
  };
25
25
  export {
26
- p as groupBusinessHoursItems
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,EAA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 } from "react/jsx-runtime";
2
- import { Link as B } from "@rpcbase/router";
3
- import { cn as c } from "@rpcbase/ui";
4
- import { Trash2 as F, ArrowRight as S } from "lucide-react";
5
- import { useTranslation as W } from "react-i18next";
6
- import { formatPriceMinor as i } from "../../lib/utils.js";
7
- import { Badge as d } from "../../ui/badge.js";
8
- import { Button as m } from "../../ui/button.js";
9
- import { Card as D } from "../../ui/card.js";
10
- import { Input as T } from "../../ui/input.js";
11
- import { ProductWarningNotice as E } from "../ProductWarningNotice/index.js";
12
- function A({
13
- lines: r,
14
- itemCount: y,
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: o,
17
- estimatedTotalMinor: p,
18
- discountedEstimatedTotalMinor: _,
19
- discountAmountMinor: n,
20
- couponCode: w,
16
+ estimatedDays: p,
17
+ estimatedTotalMinor: h,
18
+ discountedEstimatedTotalMinor: w,
19
+ discountAmountMinor: i,
20
+ lateReturnSurchargeMinor: c,
21
+ couponCode: k,
21
22
  durationLabel: u,
22
- title: k,
23
- description: h,
24
- checkoutPath: x,
25
- showCheckoutAction: j = !1,
26
- showClearAction: q = !1,
27
- editable: C = !0,
28
- stickyTopClassName: V = "top-24",
29
- onQuantityChange: f,
30
- onRemove: b,
31
- onClear: N
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 } = W();
34
- return /* @__PURE__ */ l(D, { className: c("sticky border-slate-200 bg-white shadow-sm", V), children: [
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: k ?? t("cart_title") }) }),
38
- /* @__PURE__ */ e(d, { variant: "outline", className: "border-slate-200 bg-white text-slate-700", children: /* @__PURE__ */ e("span", { children: t("cart_items_count", { count: y }) }) })
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
- h ? /* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: h }) }) : null
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
- r.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: r.map((a) => {
44
- const L = i(a.unitPriceMinor, s.language), P = a.insufficientCapacity === !0, z = a.availabilityIssue === "quantity_unavailable" ? t("availability_quantity_unavailable") : t("availability_out_of_stock");
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(E, { warning: a.productWarning }),
55
- /* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: t("cart_line_meta", { quantity: a.quantity, price: L }) }) }),
56
- P ? /* @__PURE__ */ e("div", { className: "flex flex-col items-start gap-1 pt-1", children: /* @__PURE__ */ e(d, { variant: "destructive", children: /* @__PURE__ */ e("span", { children: z }) }) }) : null
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
- C ? /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
59
- f ? /* @__PURE__ */ e(
60
- T,
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 g = Number(I.target.value);
68
- f(a.key, Number.isFinite(g) ? g : 0);
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
- b ? /* @__PURE__ */ e(
75
- m,
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: () => b(a.key),
82
+ onClick: () => N(a.key),
82
83
  "aria-label": t("remove_from_cart"),
83
- children: /* @__PURE__ */ e(F, { className: "h-4 w-4", "aria-hidden": "true" })
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: i(v, s.language) }) })
95
+ /* @__PURE__ */ e("p", { className: "font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: r(v, s.language) }) })
95
96
  ] }),
96
- typeof o == "number" && typeof p == "number" ? /* @__PURE__ */ l($, { children: [
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: o }) }) }),
99
- u ? /* @__PURE__ */ e(d, { variant: "outline", className: "border-slate-200 bg-white text-slate-700", children: /* @__PURE__ */ e("span", { children: u }) }) : null
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 n == "number" && n > 0 ? /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 text-sm", children: [
102
- /* @__PURE__ */ e("p", { className: "text-emerald-700", children: /* @__PURE__ */ e("span", { children: t("checkout_coupon_discount", { code: w ?? "" }) }) }),
103
- /* @__PURE__ */ e("p", { className: "font-semibold text-emerald-700", children: /* @__PURE__ */ e("span", { children: `-${i(n, s.language)}` }) })
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: i(_ ?? p, s.language) }) })
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
- j && x ? /* @__PURE__ */ e(B, { to: x, className: c(r.length > 0 ? "block" : "hidden"), children: /* @__PURE__ */ l(m, { className: "w-full gap-2", children: [
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(S, { className: "h-4 w-4", "aria-hidden": "true" })
118
+ /* @__PURE__ */ e(D, { className: "h-4 w-4", "aria-hidden": "true" })
114
119
  ] }) }) : null,
115
- q && N ? /* @__PURE__ */ e(
116
- m,
120
+ C && g ? /* @__PURE__ */ e(
121
+ o,
117
122
  {
118
123
  type: "button",
119
124
  variant: "outline",
120
- className: c(r.length > 0 ? "w-full gap-2" : "hidden"),
121
- onClick: N,
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
- A as StorefrontCartPanel
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;
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2YtB,CAAA"}
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;
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2YtB,CAAA"}
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" | "sm" | "lg" | "icon" | null | undefined;
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, children, style, ...props }: React_2.ComponentProps<"p">): JSX.Element;
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 function RadioGroup<Value extends string = string>({ className, onValueChange, ...props }: RadioGroupProps<Value>): JSX.Element;
2428
-
2429
- export declare function RadioGroupItem({ className, ...props }: React_2.ComponentProps<typeof Radio.Root>): JSX.Element;
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 type RadioGroupProps<Value extends string = string> = Omit<RadioGroup_2.Props<Value>, "onValueChange"> & {
2432
- onValueChange?: (value: Value) => void;
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<Value extends string = string>({ onValueChange, ...props }: SelectProps<Value>): JSX.Element;
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<Omit<Omit<Omit<SelectPopupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "children"> & Pick<Omit<Omit<SelectPositionerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "side" | "positionMethod" | "sideOffset" | "align" | "alignOffset" | "collisionBoundary" | "collisionPadding"> & {
2499
- position?: "item-aligned" | "popper";
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<Omit<SelectGroupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
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 SelectItem: React_2.ForwardRefExoticComponent<Omit<Omit<SelectItemProps, "ref"> & React_2.RefAttributes<HTMLElement>, "ref"> & React_2.RefAttributes<HTMLElement>>;
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<Omit<Omit<SelectGroupLabelProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
2512
+ export declare const SelectLabel: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
2510
2513
 
2511
- declare type SelectProps<Value extends string = string> = Omit<Select_2.Root.Props<Value>, "onValueChange"> & {
2512
- onValueChange?: (value: Value) => void;
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<Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
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
- export declare const SelectTrigger: React_2.ForwardRefExoticComponent<Omit<Omit<SelectTriggerProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
2532
+ declare type SelectTriggerProps = React_2.ButtonHTMLAttributes<HTMLButtonElement>;
2522
2533
 
2523
- export declare const SelectValue: React_2.ForwardRefExoticComponent<Omit<SelectValueProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
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;