@propeller-commerce/propeller-v2-vue-ui 0.3.21 → 0.3.22
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/CHANGELOG.md +20 -0
- package/dist/components/CartPaymethods.vue.d.ts +3 -0
- package/dist/index.cjs +66 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +66 -54
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,26 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
|
|
|
8
8
|
between minor versions; breaking changes are called out below and in
|
|
9
9
|
[MIGRATION.md](./MIGRATION.md).
|
|
10
10
|
|
|
11
|
+
## [0.3.22] - 2026-06-25
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Payment-method logos in `CartPaymethods`.** The component now renders each
|
|
16
|
+
method's `logo` (SDK `CartPaymethod.logo`, available in
|
|
17
|
+
`@propeller-commerce/propeller-sdk-v2` `^0.11.3`) as a square tile — logo on
|
|
18
|
+
top, name below — matching the carrier tiles. Falls back to the method name
|
|
19
|
+
when a method has no logo. New `showPaymethodLogo?: boolean` prop (default
|
|
20
|
+
`true`) mirrors `CartCarriers`' `showCarrierLogo`. Mirrors React UI 0.4.13.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **`CartPaymethods` and `CartCarriers` now lay out as a square logo grid**
|
|
25
|
+
(`grid-cols-2 sm:3 lg:4`, `aspect-square` tiles, centered logo + name, price
|
|
26
|
+
badge in the corner) instead of the previous single-column name rows. Same
|
|
27
|
+
selection behaviour, BEM classes, and `data-selected` hooks.
|
|
28
|
+
- **Bumped `@propeller-commerce/propeller-sdk-v2` to `^0.11.3`** — adds the
|
|
29
|
+
`logo` field to `CartPaymethod`.
|
|
30
|
+
|
|
11
31
|
## [0.3.21] - 2026-06-24
|
|
12
32
|
|
|
13
33
|
### Changed
|
|
@@ -10,6 +10,8 @@ export interface CartPaymethodsProps {
|
|
|
10
10
|
paymentsContainerClass?: string;
|
|
11
11
|
/** Display the on account payment method for anonymous users */
|
|
12
12
|
showOnAccountForGuests?: boolean;
|
|
13
|
+
/** Display the payment method logo (default: true). Falls back to the name when no logo is set. */
|
|
14
|
+
showPaymethodLogo?: boolean;
|
|
13
15
|
/** Action when a payment method is selected */
|
|
14
16
|
onPaymethodSelect?: (paymethod: CartPaymethod) => void;
|
|
15
17
|
/** Custom price formatting function */
|
|
@@ -19,5 +21,6 @@ export interface CartPaymethodsProps {
|
|
|
19
21
|
}
|
|
20
22
|
declare const _default: import('vue').DefineComponent<CartPaymethodsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CartPaymethodsProps> & Readonly<{}>, {
|
|
21
23
|
showOnAccountForGuests: boolean;
|
|
24
|
+
showPaymethodLogo: boolean;
|
|
22
25
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
26
|
export default _default;
|
package/dist/index.cjs
CHANGED
|
@@ -3054,7 +3054,7 @@ const _hoisted_6$I = {
|
|
|
3054
3054
|
};
|
|
3055
3055
|
const _hoisted_7$I = ["value", "placeholder", "disabled"];
|
|
3056
3056
|
const _hoisted_8$E = { class: "propeller-login-form__field space-y-2" };
|
|
3057
|
-
const _hoisted_9$
|
|
3057
|
+
const _hoisted_9$C = { class: "flex items-center justify-between" };
|
|
3058
3058
|
const _hoisted_10$A = {
|
|
3059
3059
|
for: "login-password",
|
|
3060
3060
|
class: "propeller-login-form__label text-sm font-medium leading-none"
|
|
@@ -3242,7 +3242,7 @@ const _sfc_main$U = /* @__PURE__ */ vue.defineComponent({
|
|
|
3242
3242
|
displayForgotPassword: __props.displayForgotPasswordLink !== false && !__props.accountHeaderLoginForm
|
|
3243
3243
|
}, () => [
|
|
3244
3244
|
vue.createElementVNode("div", _hoisted_8$E, [
|
|
3245
|
-
vue.createElementVNode("div", _hoisted_9$
|
|
3245
|
+
vue.createElementVNode("div", _hoisted_9$C, [
|
|
3246
3246
|
vue.createElementVNode("label", _hoisted_10$A, vue.toDisplayString(passwordLabel.value), 1),
|
|
3247
3247
|
showForgotPassword.value && !__props.accountHeaderLoginForm ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
3248
3248
|
key: 0,
|
|
@@ -3386,7 +3386,7 @@ const _hoisted_5$I = { class: "propeller-account-menu__user-name font-medium tex
|
|
|
3386
3386
|
const _hoisted_6$H = { class: "propeller-account-menu__nav py-2" };
|
|
3387
3387
|
const _hoisted_7$H = { class: "propeller-account-menu__list space-y-0.5" };
|
|
3388
3388
|
const _hoisted_8$D = ["onClick", "data-active"];
|
|
3389
|
-
const _hoisted_9$
|
|
3389
|
+
const _hoisted_9$B = { class: "propeller-account-menu__logout-wrapper px-4 py-3 border-t border-border" };
|
|
3390
3390
|
const _hoisted_10$z = ["aria-label", "data-open"];
|
|
3391
3391
|
const _hoisted_11$v = {
|
|
3392
3392
|
fill: "none",
|
|
@@ -3594,7 +3594,7 @@ const _sfc_main$T = /* @__PURE__ */ vue.defineComponent({
|
|
|
3594
3594
|
}), 128))
|
|
3595
3595
|
])
|
|
3596
3596
|
]),
|
|
3597
|
-
vue.createElementVNode("div", _hoisted_9$
|
|
3597
|
+
vue.createElementVNode("div", _hoisted_9$B, [
|
|
3598
3598
|
vue.createElementVNode("button", {
|
|
3599
3599
|
type: "button",
|
|
3600
3600
|
class: "propeller-account-menu__logout-btn flex w-full items-center gap-3 px-3 py-2 text-sm font-medium text-primary hover:bg-secondary/5 rounded-[var(--radius-control)] transition-colors",
|
|
@@ -3719,7 +3719,7 @@ const _hoisted_8$C = {
|
|
|
3719
3719
|
key: 1,
|
|
3720
3720
|
class: "flex gap-2"
|
|
3721
3721
|
};
|
|
3722
|
-
const _hoisted_9$
|
|
3722
|
+
const _hoisted_9$A = ["value", "placeholder", "disabled"];
|
|
3723
3723
|
const _hoisted_10$y = ["disabled"];
|
|
3724
3724
|
const _hoisted_11$u = {
|
|
3725
3725
|
key: 2,
|
|
@@ -3853,7 +3853,7 @@ const _sfc_main$S = /* @__PURE__ */ vue.defineComponent({
|
|
|
3853
3853
|
onKeydown: _cache[2] || (_cache[2] = async (e) => handleKeyDown(e)),
|
|
3854
3854
|
placeholder: getLabel("placeholder", "Enter action code"),
|
|
3855
3855
|
disabled: vue.unref(loading)
|
|
3856
|
-
}, null, 40, _hoisted_9$
|
|
3856
|
+
}, null, 40, _hoisted_9$A),
|
|
3857
3857
|
vue.createElementVNode("button", {
|
|
3858
3858
|
type: "button",
|
|
3859
3859
|
class: "propeller-action-code__submit bg-secondary text-primary-foreground text-sm font-medium px-4 py-2 rounded-[var(--radius-control)] hover:bg-secondary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed whitespace-nowrap",
|
|
@@ -3885,7 +3885,7 @@ const _hoisted_5$G = ["min", "step", "value"];
|
|
|
3885
3885
|
const _hoisted_6$F = ["disabled"];
|
|
3886
3886
|
const _hoisted_7$F = ["min", "step", "value"];
|
|
3887
3887
|
const _hoisted_8$B = ["disabled"];
|
|
3888
|
-
const _hoisted_9$
|
|
3888
|
+
const _hoisted_9$z = {
|
|
3889
3889
|
class: "propeller-add-to-cart__icon w-[1.1em] h-[1.1em] flex-shrink-0",
|
|
3890
3890
|
viewBox: "0 0 24 24",
|
|
3891
3891
|
fill: "none",
|
|
@@ -4239,7 +4239,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
|
|
|
4239
4239
|
onClick: _cache[4] || (_cache[4] = async (event) => handleAddToCart()),
|
|
4240
4240
|
disabled: vue.unref(loading)
|
|
4241
4241
|
}, [
|
|
4242
|
-
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_9$
|
|
4242
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_9$z, [..._cache[11] || (_cache[11] = [
|
|
4243
4243
|
vue.createElementVNode("circle", {
|
|
4244
4244
|
cx: "8",
|
|
4245
4245
|
cy: "21",
|
|
@@ -4453,7 +4453,7 @@ const _hoisted_5$F = {
|
|
|
4453
4453
|
const _hoisted_6$E = { class: "propeller-add-to-favorite__modal-content bg-card rounded-[var(--radius-container)] max-w-md w-full shadow-lg border" };
|
|
4454
4454
|
const _hoisted_7$E = { class: "propeller-add-to-favorite__modal-header flex justify-between items-center p-6 pb-4" };
|
|
4455
4455
|
const _hoisted_8$A = { class: "propeller-add-to-favorite__modal-title text-xl font-bold" };
|
|
4456
|
-
const _hoisted_9$
|
|
4456
|
+
const _hoisted_9$y = { class: "propeller-add-to-favorite__modal-body px-6 pb-6 space-y-4" };
|
|
4457
4457
|
const _hoisted_10$w = { class: "propeller-add-to-favorite__member-lists space-y-2" };
|
|
4458
4458
|
const _hoisted_11$s = ["onClick", "disabled"];
|
|
4459
4459
|
const _hoisted_12$s = { class: "text-sm font-medium" };
|
|
@@ -4652,7 +4652,7 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
|
|
|
4652
4652
|
], -1)
|
|
4653
4653
|
])])
|
|
4654
4654
|
]),
|
|
4655
|
-
vue.createElementVNode("div", _hoisted_9$
|
|
4655
|
+
vue.createElementVNode("div", _hoisted_9$y, [
|
|
4656
4656
|
getMemberLists().length > 0 ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4657
4657
|
vue.createElementVNode("div", _hoisted_10$w, [
|
|
4658
4658
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getMemberLists(), (list, index2) => {
|
|
@@ -4766,7 +4766,7 @@ const _hoisted_8$z = {
|
|
|
4766
4766
|
key: 1,
|
|
4767
4767
|
class: "propeller-address-card__city text-muted-foreground"
|
|
4768
4768
|
};
|
|
4769
|
-
const _hoisted_9$
|
|
4769
|
+
const _hoisted_9$x = { class: "propeller-address-card__country text-muted-foreground" };
|
|
4770
4770
|
const _hoisted_10$v = {
|
|
4771
4771
|
key: 4,
|
|
4772
4772
|
class: "propeller-address-card__email text-muted-foreground"
|
|
@@ -5144,7 +5144,7 @@ const _sfc_main$P = /* @__PURE__ */ vue.defineComponent({
|
|
|
5144
5144
|
address: addr.value,
|
|
5145
5145
|
countryName: getCountryName(addr.value?.country)
|
|
5146
5146
|
}, () => [
|
|
5147
|
-
vue.createElementVNode("div", _hoisted_9$
|
|
5147
|
+
vue.createElementVNode("div", _hoisted_9$x, vue.toDisplayString(getCountryName(addr.value?.country)), 1)
|
|
5148
5148
|
]) : vue.createCommentVNode("", true),
|
|
5149
5149
|
!!__props.showEmail && addr.value?.email ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_10$v, vue.toDisplayString(addr.value?.email), 1)) : vue.createCommentVNode("", true),
|
|
5150
5150
|
!!__props.showPhone && addr.value?.phone ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11$r, vue.toDisplayString(addr.value?.phone), 1)) : vue.createCommentVNode("", true),
|
|
@@ -5668,7 +5668,7 @@ const _hoisted_5$D = {
|
|
|
5668
5668
|
const _hoisted_6$C = { class: "propeller-address-selector__list grid grid-cols-2 gap-4" };
|
|
5669
5669
|
const _hoisted_7$C = ["onClick", "data-selected"];
|
|
5670
5670
|
const _hoisted_8$y = { class: "propeller-address-selector__modal-actions flex justify-end mt-6 pt-4 border-t border-border-subtle" };
|
|
5671
|
-
const _hoisted_9$
|
|
5671
|
+
const _hoisted_9$w = ["disabled"];
|
|
5672
5672
|
const _hoisted_10$u = {
|
|
5673
5673
|
key: 0,
|
|
5674
5674
|
fill: "none",
|
|
@@ -5837,7 +5837,7 @@ const _sfc_main$O = /* @__PURE__ */ vue.defineComponent({
|
|
|
5837
5837
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
5838
5838
|
vue.createTextVNode(vue.toDisplayString(getLabel("useThisAddress", "Use this address")), 1)
|
|
5839
5839
|
], 64))
|
|
5840
|
-
], 8, _hoisted_9$
|
|
5840
|
+
], 8, _hoisted_9$w)
|
|
5841
5841
|
])
|
|
5842
5842
|
], 64)) : vue.createCommentVNode("", true)
|
|
5843
5843
|
])
|
|
@@ -5864,7 +5864,7 @@ const _hoisted_7$B = {
|
|
|
5864
5864
|
class: "propeller-cart-bonus-item__sku font-mono text-xs text-foreground-subtle"
|
|
5865
5865
|
};
|
|
5866
5866
|
const _hoisted_8$x = { class: "propeller-cart-bonus-item__title font-semibold text-sm md:text-base text-foreground line-clamp-2" };
|
|
5867
|
-
const _hoisted_9$
|
|
5867
|
+
const _hoisted_9$v = { class: "propeller-cart-bonus-item__qty text-sm text-muted-foreground whitespace-nowrap" };
|
|
5868
5868
|
const _hoisted_10$t = { class: "propeller-cart-bonus-item__price font-semibold text-foreground whitespace-nowrap" };
|
|
5869
5869
|
const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
5870
5870
|
__name: "CartBonusItems",
|
|
@@ -5926,7 +5926,7 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
5926
5926
|
item.product?.sku ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$B, vue.toDisplayString(getLabel("sku", "SKU")) + ": " + vue.toDisplayString(item.product.sku), 1)) : vue.createCommentVNode("", true),
|
|
5927
5927
|
vue.createElementVNode("p", _hoisted_8$x, vue.toDisplayString(getItemName(item)), 1)
|
|
5928
5928
|
]),
|
|
5929
|
-
vue.createElementVNode("div", _hoisted_9$
|
|
5929
|
+
vue.createElementVNode("div", _hoisted_9$v, vue.toDisplayString(item.quantity) + " × ", 1),
|
|
5930
5930
|
vue.createElementVNode("div", _hoisted_10$t, vue.toDisplayString(getItemTotal(item)), 1)
|
|
5931
5931
|
]);
|
|
5932
5932
|
}), 128))
|
|
@@ -5937,22 +5937,24 @@ const _sfc_main$N = /* @__PURE__ */ vue.defineComponent({
|
|
|
5937
5937
|
});
|
|
5938
5938
|
const _hoisted_1$H = {
|
|
5939
5939
|
key: 0,
|
|
5940
|
-
class: "propeller-cart-carriers__grid grid grid-cols-
|
|
5940
|
+
class: "propeller-cart-carriers__grid grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3"
|
|
5941
5941
|
};
|
|
5942
5942
|
const _hoisted_2$G = ["onClick", "data-selected"];
|
|
5943
|
-
const _hoisted_3$G = {
|
|
5944
|
-
const _hoisted_4$C = { class: "flex items-center gap-2" };
|
|
5945
|
-
const _hoisted_5$B = ["src", "alt"];
|
|
5946
|
-
const _hoisted_6$A = { class: "propeller-cart-carriers__carrier-name font-medium" };
|
|
5947
|
-
const _hoisted_7$A = {
|
|
5943
|
+
const _hoisted_3$G = {
|
|
5948
5944
|
key: 0,
|
|
5949
|
-
class: "propeller-cart-carriers__carrier-price text-xs bg-surface-hover text-muted-foreground px-2 py-
|
|
5945
|
+
class: "propeller-cart-carriers__carrier-price absolute top-2 right-2 text-xs bg-surface-hover text-muted-foreground px-2 py-0.5 rounded-full"
|
|
5950
5946
|
};
|
|
5951
|
-
const
|
|
5952
|
-
key:
|
|
5947
|
+
const _hoisted_4$C = {
|
|
5948
|
+
key: 1,
|
|
5949
|
+
class: "propeller-cart-carriers__carrier-logo-wrap flex items-center justify-center h-10 w-full"
|
|
5950
|
+
};
|
|
5951
|
+
const _hoisted_5$B = ["src", "alt"];
|
|
5952
|
+
const _hoisted_6$A = { class: "propeller-cart-carriers__carrier-name font-medium text-sm" };
|
|
5953
|
+
const _hoisted_7$A = {
|
|
5954
|
+
key: 2,
|
|
5953
5955
|
class: "propeller-cart-carriers__carrier-deadline text-xs text-muted-foreground"
|
|
5954
5956
|
};
|
|
5955
|
-
const
|
|
5957
|
+
const _hoisted_8$w = {
|
|
5956
5958
|
key: 1,
|
|
5957
5959
|
class: "propeller-cart-carriers__empty text-muted-foreground italic"
|
|
5958
5960
|
};
|
|
@@ -6024,25 +6026,22 @@ const _sfc_main$M = /* @__PURE__ */ vue.defineComponent({
|
|
|
6024
6026
|
key: `${carrier.name}-${index2}`,
|
|
6025
6027
|
onClick: async (event) => handleSelect(carrier),
|
|
6026
6028
|
"data-selected": selectedName.value === carrier.name ? "true" : "false",
|
|
6027
|
-
class: vue.normalizeClass(`propeller-cart-carriers__carrier cursor-pointer border
|
|
6029
|
+
class: vue.normalizeClass(`propeller-cart-carriers__carrier relative cursor-pointer border rounded-[var(--radius-container)] p-3 flex flex-col items-center justify-center gap-2 text-center aspect-square transition-all ${selectedName.value === carrier.name ? "border-secondary bg-secondary/5 shadow-sm" : "border-border hover:border-secondary/30"}`)
|
|
6028
6030
|
}, [
|
|
6029
|
-
vue.
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
__props.showPrice !== false ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_7$A, vue.toDisplayString(formatCarrierPrice(carrier.price)), 1)) : vue.createCommentVNode("", true)
|
|
6040
|
-
]),
|
|
6041
|
-
carrier.deliveryDeadline ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_8$w, vue.toDisplayString(getLabel("deliveryDeadline", "Delivery deadline:")) + vue.toDisplayString(carrier.deliveryDeadline), 1)) : vue.createCommentVNode("", true)
|
|
6031
|
+
__props.showPrice !== false ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$G, vue.toDisplayString(formatCarrierPrice(carrier.price)), 1)) : vue.createCommentVNode("", true),
|
|
6032
|
+
showLogo.value && getLogoUrl(carrier) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$C, [
|
|
6033
|
+
vue.createElementVNode("img", {
|
|
6034
|
+
class: "propeller-cart-carriers__carrier-logo max-h-10 max-w-[80%] w-auto object-contain",
|
|
6035
|
+
src: getLogoUrl(carrier),
|
|
6036
|
+
alt: carrier.name
|
|
6037
|
+
}, null, 8, _hoisted_5$B)
|
|
6038
|
+
])) : vue.createCommentVNode("", true),
|
|
6039
|
+
vue.createElementVNode("span", _hoisted_6$A, vue.toDisplayString(carrier.name), 1),
|
|
6040
|
+
carrier.deliveryDeadline ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_7$A, vue.toDisplayString(getLabel("deliveryDeadline", "Delivery deadline:")) + vue.toDisplayString(carrier.deliveryDeadline), 1)) : vue.createCommentVNode("", true)
|
|
6042
6041
|
], 10, _hoisted_2$G);
|
|
6043
6042
|
}), 128))
|
|
6044
6043
|
])) : vue.createCommentVNode("", true),
|
|
6045
|
-
carriers.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("p",
|
|
6044
|
+
carriers.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_8$w, vue.toDisplayString(getLabel("noCarriers", "No carriers available.")), 1)) : vue.createCommentVNode("", true)
|
|
6046
6045
|
], 2);
|
|
6047
6046
|
};
|
|
6048
6047
|
}
|
|
@@ -7550,16 +7549,19 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
|
|
|
7550
7549
|
});
|
|
7551
7550
|
const _hoisted_1$D = {
|
|
7552
7551
|
key: 0,
|
|
7553
|
-
class: "propeller-cart-paymethods__grid grid grid-cols-
|
|
7552
|
+
class: "propeller-cart-paymethods__grid grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3"
|
|
7554
7553
|
};
|
|
7555
7554
|
const _hoisted_2$C = ["onClick", "data-selected"];
|
|
7556
|
-
const _hoisted_3$C = {
|
|
7557
|
-
const _hoisted_4$y = { class: "flex items-center gap-2" };
|
|
7558
|
-
const _hoisted_5$x = { class: "propeller-cart-paymethods__method-name font-medium" };
|
|
7559
|
-
const _hoisted_6$w = {
|
|
7555
|
+
const _hoisted_3$C = {
|
|
7560
7556
|
key: 0,
|
|
7561
|
-
class: "propeller-cart-paymethods__method-price text-xs bg-surface-hover text-muted-foreground px-2 py-
|
|
7557
|
+
class: "propeller-cart-paymethods__method-price absolute top-2 right-2 text-xs bg-surface-hover text-muted-foreground px-2 py-0.5 rounded-full"
|
|
7562
7558
|
};
|
|
7559
|
+
const _hoisted_4$y = {
|
|
7560
|
+
key: 1,
|
|
7561
|
+
class: "propeller-cart-paymethods__method-logo-wrap flex items-center justify-center h-10 w-full"
|
|
7562
|
+
};
|
|
7563
|
+
const _hoisted_5$x = ["src", "alt"];
|
|
7564
|
+
const _hoisted_6$w = { class: "propeller-cart-paymethods__method-name font-medium text-sm" };
|
|
7563
7565
|
const _hoisted_7$w = {
|
|
7564
7566
|
key: 1,
|
|
7565
7567
|
class: "propeller-cart-paymethods__empty text-muted-foreground italic"
|
|
@@ -7572,6 +7574,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7572
7574
|
user: {},
|
|
7573
7575
|
paymentsContainerClass: {},
|
|
7574
7576
|
showOnAccountForGuests: { type: Boolean, default: false },
|
|
7577
|
+
showPaymethodLogo: { type: Boolean, default: true },
|
|
7575
7578
|
onPaymethodSelect: {},
|
|
7576
7579
|
formatPrice: {},
|
|
7577
7580
|
labels: {}
|
|
@@ -7586,6 +7589,9 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7586
7589
|
const showOnAccountForGuests = vue.computed(() => {
|
|
7587
7590
|
return props.showOnAccountForGuests !== void 0 ? props.showOnAccountForGuests : false;
|
|
7588
7591
|
});
|
|
7592
|
+
const showLogo = vue.computed(() => {
|
|
7593
|
+
return props.showPaymethodLogo !== void 0 ? props.showPaymethodLogo : true;
|
|
7594
|
+
});
|
|
7589
7595
|
const isGuest = vue.computed(() => {
|
|
7590
7596
|
return !infra.user;
|
|
7591
7597
|
});
|
|
@@ -7627,6 +7633,9 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7627
7633
|
}
|
|
7628
7634
|
return index.formatPrice(price || 0, { symbol: infra.currency ?? "€" });
|
|
7629
7635
|
}
|
|
7636
|
+
function getLogoUrl(method) {
|
|
7637
|
+
return method.logo || "";
|
|
7638
|
+
}
|
|
7630
7639
|
function handleSelect(method) {
|
|
7631
7640
|
selectedCode.value = method.code;
|
|
7632
7641
|
if (props.onPaymethodSelect) {
|
|
@@ -7643,14 +7652,17 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
|
|
|
7643
7652
|
key: method.code,
|
|
7644
7653
|
onClick: async (event) => handleSelect(method),
|
|
7645
7654
|
"data-selected": selectedCode.value === method.code ? "true" : "false",
|
|
7646
|
-
class: vue.normalizeClass(`propeller-cart-paymethods__method cursor-pointer border
|
|
7655
|
+
class: vue.normalizeClass(`propeller-cart-paymethods__method relative cursor-pointer border rounded-[var(--radius-container)] p-3 flex flex-col items-center justify-center gap-2 text-center aspect-square transition-all ${selectedCode.value === method.code ? "border-secondary bg-secondary/5 shadow-sm" : "border-border hover:border-secondary/30"}`)
|
|
7647
7656
|
}, [
|
|
7648
|
-
vue.
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7657
|
+
method.price > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$C, vue.toDisplayString(formatMethodPrice(method.price)), 1)) : vue.createCommentVNode("", true),
|
|
7658
|
+
showLogo.value && getLogoUrl(method) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$y, [
|
|
7659
|
+
vue.createElementVNode("img", {
|
|
7660
|
+
class: "propeller-cart-paymethods__method-logo max-h-10 max-w-[80%] w-auto object-contain",
|
|
7661
|
+
src: getLogoUrl(method),
|
|
7662
|
+
alt: method.name || method.code
|
|
7663
|
+
}, null, 8, _hoisted_5$x)
|
|
7664
|
+
])) : vue.createCommentVNode("", true),
|
|
7665
|
+
vue.createElementVNode("span", _hoisted_6$w, vue.toDisplayString(method.name || method.code), 1)
|
|
7654
7666
|
], 10, _hoisted_2$C);
|
|
7655
7667
|
}), 128))
|
|
7656
7668
|
])) : vue.createCommentVNode("", true),
|