@loczer/storefront-sdk 0.219.0 → 0.221.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loczer/storefront-sdk",
3
- "version": "0.219.0",
3
+ "version": "0.221.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,24 +0,0 @@
1
- import { CheckoutSelectedPaymentMethod } from '../types';
2
- type CheckoutPaymentSummaryCardProps = {
3
- estimatedTotalLabel: string;
4
- couponCode?: string;
5
- discountAmountLabel?: string | null;
6
- totalExcludingTaxLabel: string;
7
- vatAmountLabel: string;
8
- vatRateLabel: string;
9
- insuranceAmountLabel?: string;
10
- depositAmountLabel: string | null;
11
- amountToCollectMinor: number;
12
- amountToCollectLabel: string;
13
- paymentSummaryHelper: string | null;
14
- paymentDecisionLoading: boolean;
15
- paymentDecisionError: string | null;
16
- canChoosePaymentMethod: boolean;
17
- showAmountDueNowRow: boolean;
18
- selectedPaymentMethod: CheckoutSelectedPaymentMethod;
19
- submitting: boolean;
20
- onSelectPaymentMethod: (method: CheckoutSelectedPaymentMethod) => void;
21
- };
22
- export declare function CheckoutPaymentSummaryCard({ estimatedTotalLabel, couponCode, discountAmountLabel, totalExcludingTaxLabel, vatAmountLabel, vatRateLabel, insuranceAmountLabel, depositAmountLabel, amountToCollectMinor, amountToCollectLabel, paymentSummaryHelper, paymentDecisionLoading, paymentDecisionError, canChoosePaymentMethod, showAmountDueNowRow, selectedPaymentMethod, submitting, onSelectPaymentMethod, }: CheckoutPaymentSummaryCardProps): import("react/jsx-runtime").JSX.Element;
23
- export {};
24
- //# sourceMappingURL=CheckoutPaymentSummaryCard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckoutPaymentSummaryCard.d.ts","sourceRoot":"","sources":["../../../../src/pages/checkout/components/CheckoutPaymentSummaryCard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAK7D,KAAK,+BAA+B,GAAG;IACrC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE,MAAM,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,oBAAoB,EAAE,MAAM,CAAA;IAC5B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE,OAAO,CAAA;IAC/B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,sBAAsB,EAAE,OAAO,CAAA;IAC/B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,qBAAqB,EAAE,6BAA6B,CAAA;IACpD,UAAU,EAAE,OAAO,CAAA;IACnB,qBAAqB,EAAE,CAAC,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAA;CACvE,CAAA;AAED,wBAAgB,0BAA0B,CAAC,EACzC,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACV,qBAAqB,GACtB,EAAE,+BAA+B,2CA8IjC"}
@@ -1,158 +0,0 @@
1
- import { Button as e } from "../../../ui/button.js";
2
- import { Card as t } from "../../../ui/card.js";
3
- import { Spinner as n } from "../../../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { useTranslation as a } from "react-i18next";
6
- import { AlertTriangle as o } from "lucide-react";
7
- //#region src/pages/checkout/components/CheckoutPaymentSummaryCard.tsx
8
- function s({ estimatedTotalLabel: s, couponCode: c, discountAmountLabel: l, totalExcludingTaxLabel: u, vatAmountLabel: d, vatRateLabel: f, insuranceAmountLabel: p, depositAmountLabel: m, amountToCollectMinor: h, amountToCollectLabel: g, paymentSummaryHelper: _, paymentDecisionLoading: v, paymentDecisionError: y, canChoosePaymentMethod: b, showAmountDueNowRow: x, selectedPaymentMethod: S, submitting: C, onSelectPaymentMethod: w }) {
9
- let { t: T } = a(), E = [
10
- {
11
- id: "card",
12
- label: T("checkout_payment_method_card")
13
- },
14
- {
15
- id: "apple_pay",
16
- label: T("checkout_payment_method_apple_pay")
17
- },
18
- {
19
- id: "other",
20
- label: T("checkout_payment_method_other")
21
- }
22
- ];
23
- return /* @__PURE__ */ i(t, {
24
- className: "border-slate-200 bg-white shadow-sm",
25
- children: [/* @__PURE__ */ i("div", {
26
- className: "border-b border-slate-200 px-4 py-4",
27
- children: [/* @__PURE__ */ r("p", {
28
- className: "text-sm font-semibold text-slate-950",
29
- children: /* @__PURE__ */ r("span", { children: T("checkout_payment_totals_title") })
30
- }), b ? /* @__PURE__ */ r("p", {
31
- className: "mt-1 text-xs text-slate-600",
32
- children: /* @__PURE__ */ r("span", { children: T("checkout_payment_totals_description") })
33
- }) : null]
34
- }), /* @__PURE__ */ i("div", {
35
- className: "grid gap-4 px-4 py-4",
36
- children: [
37
- /* @__PURE__ */ i("dl", {
38
- className: "grid text-sm",
39
- children: [
40
- /* @__PURE__ */ i("div", {
41
- className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 py-2",
42
- children: [/* @__PURE__ */ r("dt", {
43
- className: "text-slate-700",
44
- children: /* @__PURE__ */ r("span", { children: T("checkout_estimated_total") })
45
- }), /* @__PURE__ */ r("dd", {
46
- className: "font-semibold tabular-nums text-slate-900",
47
- children: /* @__PURE__ */ r("span", { children: s })
48
- })]
49
- }),
50
- l ? /* @__PURE__ */ i("div", {
51
- className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
52
- children: [/* @__PURE__ */ r("dt", {
53
- className: "text-success",
54
- children: /* @__PURE__ */ r("span", { children: T("checkout_coupon_discount", { code: c ?? "" }) })
55
- }), /* @__PURE__ */ r("dd", {
56
- className: "font-medium tabular-nums text-success",
57
- children: /* @__PURE__ */ r("span", { children: l })
58
- })]
59
- }) : null,
60
- p ? /* @__PURE__ */ i("div", {
61
- className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
62
- children: [
63
- /* @__PURE__ */ r("dt", {
64
- className: "text-slate-600",
65
- children: /* @__PURE__ */ r("span", { children: T("checkout_insurance_exempt_line") })
66
- }),
67
- /* @__PURE__ */ r("dd", {
68
- className: "font-medium tabular-nums text-slate-700",
69
- children: /* @__PURE__ */ r("span", { children: p })
70
- }),
71
- /* @__PURE__ */ r("dd", {
72
- className: "col-span-2 mt-1 text-[11px] text-slate-500",
73
- children: /* @__PURE__ */ r("span", { children: T("checkout_insurance_tax_notice") })
74
- })
75
- ]
76
- }) : null,
77
- /* @__PURE__ */ i("div", {
78
- className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
79
- children: [/* @__PURE__ */ r("dt", {
80
- className: "text-slate-600",
81
- children: /* @__PURE__ */ r("span", { children: T("checkout_payment_total_excluding_tax") })
82
- }), /* @__PURE__ */ r("dd", {
83
- className: "font-medium tabular-nums text-slate-700",
84
- children: /* @__PURE__ */ r("span", { children: u })
85
- })]
86
- }),
87
- /* @__PURE__ */ i("div", {
88
- className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
89
- children: [/* @__PURE__ */ r("dt", {
90
- className: "text-slate-600",
91
- children: /* @__PURE__ */ r("span", { children: T("checkout_payment_vat", { rate: f }) })
92
- }), /* @__PURE__ */ r("dd", {
93
- className: "font-medium tabular-nums text-slate-700",
94
- children: /* @__PURE__ */ r("span", { children: d })
95
- })]
96
- }),
97
- m ? /* @__PURE__ */ i("div", {
98
- className: "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-100 py-2.5",
99
- children: [/* @__PURE__ */ r("dt", {
100
- className: "text-slate-700",
101
- children: /* @__PURE__ */ r("span", { children: T("checkout_payment_deposit_amount") })
102
- }), /* @__PURE__ */ r("dd", {
103
- className: "font-medium tabular-nums text-slate-900",
104
- children: /* @__PURE__ */ r("span", { children: m })
105
- })]
106
- }) : null,
107
- x ? /* @__PURE__ */ i("div", {
108
- className: "mt-1 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-4 border-t border-slate-200 pt-3",
109
- children: [/* @__PURE__ */ r("dt", {
110
- className: "text-sm font-semibold text-slate-900",
111
- children: /* @__PURE__ */ r("span", { children: T("checkout_payment_amount_due_now") })
112
- }), /* @__PURE__ */ r("dd", {
113
- className: `text-base font-bold tabular-nums tracking-tight ${h > 0 ? "text-slate-950" : "text-slate-800"}`,
114
- children: /* @__PURE__ */ r("span", { children: g })
115
- })]
116
- }) : null
117
- ]
118
- }),
119
- _ ? /* @__PURE__ */ r("p", {
120
- className: "text-xs text-slate-600",
121
- children: /* @__PURE__ */ r("span", { children: _ })
122
- }) : null,
123
- v ? /* @__PURE__ */ i("div", {
124
- className: "flex items-center gap-2 text-sm text-slate-600",
125
- children: [/* @__PURE__ */ r(n, {
126
- className: "size-4",
127
- "aria-hidden": "true"
128
- }), /* @__PURE__ */ r("span", { children: T("checkout_payment_loading") })]
129
- }) : null,
130
- y ? /* @__PURE__ */ r("div", {
131
- className: "grid gap-3 rounded-md bg-destructive p-3 text-destructive-foreground shadow-sm",
132
- children: /* @__PURE__ */ i("div", {
133
- className: "flex items-start gap-2 text-sm",
134
- children: [/* @__PURE__ */ r(o, {
135
- className: "mt-0.5 h-4 w-4",
136
- "aria-hidden": "true"
137
- }), /* @__PURE__ */ r("span", { children: y })]
138
- })
139
- }) : null,
140
- !v && !y && b ? /* @__PURE__ */ r("div", {
141
- className: "grid gap-2 sm:grid-cols-3",
142
- children: E.map((t) => /* @__PURE__ */ r(e, {
143
- type: "button",
144
- variant: S === t.id ? "default" : "outline",
145
- disabled: C,
146
- className: "h-9 px-4 text-xs",
147
- onClick: () => {
148
- w(t.id);
149
- },
150
- children: /* @__PURE__ */ r("span", { children: t.label })
151
- }, t.id))
152
- }) : null
153
- ]
154
- })]
155
- });
156
- }
157
- //#endregion
158
- export { s as CheckoutPaymentSummaryCard };