@asteby/storefront-react 0.11.0 → 0.11.1

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/payments.css CHANGED
@@ -45,6 +45,14 @@
45
45
  display: inline-block;
46
46
  vertical-align: middle;
47
47
  }
48
+ /* The mark of a provider row (Mercado Pago…) is as wide as its logo: in line between the radio and the text, never over them. */
49
+ [data-sf-pay-method] [data-sf-pay-icon='mark'] {
50
+ display: inline-flex;
51
+ flex: none;
52
+ align-items: center;
53
+ width: auto;
54
+ height: auto;
55
+ }
48
56
  /* The open cash row already lists every point with its mark: the preview would repeat them. */
49
57
  [data-sf-pay-method] [data-sf-pay-choice]:has(input[name='payment_choice']:checked) [data-sf-pay-brands='cash'] {
50
58
  display: none;
package/dist/payments.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { isSafeCssValue } from './chunk-672OTUM2.js';
2
- import { BrandMark, findBrand } from './chunk-3ZJTDFHE.js';
2
+ import { findBrand, BrandMark } from './chunk-ODIQR6TG.js';
3
3
  export { buildPayChoices, cashProviderData, checkoutToAttempt, choiceValue, parseChoice, payErrorResponse, paymentCsp, paymentCspHeaderName, paymentCspHeaders, paymentCspMode, paymentNonce, paymentNonceFromHeaders, voucherRows } from './chunk-ISEOCKIR.js';
4
4
  import { useModalDialog } from './chunk-ZBH7JYU4.js';
5
5
  import { useResolvedLocale } from './chunk-T52H5HL3.js';
@@ -838,6 +838,7 @@ function PaymentMethodSection(props) {
838
838
  const slot = choice.option ?? "plain";
839
839
  const icon = icons?.[slot] ?? (brandMarks ? defaultIcon(choice) : null);
840
840
  const marks = brandMarks ? rowMarks(choice, cardBrands) : [];
841
+ const brandMarkIcon = !icons?.[slot] && brandMarks && choice.option !== "card" && choice.option !== "cash" && !!findBrand(choice.methodKey);
841
842
  return /* @__PURE__ */ jsxs("div", { className: cx.choice, "data-sf-pay-choice": true, children: [
842
843
  /* @__PURE__ */ jsxs("label", { className: cx.radioLabel, children: [
843
844
  /* @__PURE__ */ jsx(
@@ -855,7 +856,11 @@ function PaymentMethodSection(props) {
855
856
  ...tid("method")
856
857
  }
857
858
  ),
858
- icon ? /* @__PURE__ */ jsx("span", { className: cx.icon, "aria-hidden": "true", children: icon }) : null,
859
+ icon ? (
860
+ // The default mark of a provider row is as wide as its logo: it does not take the shop's `icon` box (a fixed
861
+ // square would let the logo spill over the radio and the text).
862
+ /* @__PURE__ */ jsx("span", { className: brandMarkIcon ? void 0 : cx.icon, "data-sf-pay-icon": brandMarkIcon ? "mark" : void 0, "aria-hidden": "true", children: icon })
863
+ ) : null,
859
864
  /* @__PURE__ */ jsxs("span", { className: cx.labelText, children: [
860
865
  rowLabel,
861
866
  hint ? /* @__PURE__ */ jsxs("span", { className: cx.hint, children: [