@asteby/storefront-react 0.10.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-DSZVJ2PW.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';
@@ -103,6 +103,11 @@ function mercadoPagoBricksAdapter(options = {}) {
103
103
  paymentMethods: { minInstallments: 1, ...card?.max_installments ? { maxInstallments: card.max_installments } : {} },
104
104
  visual: {
105
105
  hidePaymentButton: true,
106
+ // El encabezado del Brick ("Tarjeta de crédito o débito" + banderas de tarjetas
107
+ // aceptadas) lo dibuja Mercado Pago, repite lo que la tienda ya muestra en su propia
108
+ // fila de método de pago y se veía cortado (p. ej. AMEX partido). hideFormTitle oculta
109
+ // la línea del título y las banderas.
110
+ hideFormTitle: true,
106
111
  style: { theme: "default", ...opts.theme && Object.keys(opts.theme).length ? { customVariables: opts.theme } : {} }
107
112
  }
108
113
  },
@@ -833,6 +838,7 @@ function PaymentMethodSection(props) {
833
838
  const slot = choice.option ?? "plain";
834
839
  const icon = icons?.[slot] ?? (brandMarks ? defaultIcon(choice) : null);
835
840
  const marks = brandMarks ? rowMarks(choice, cardBrands) : [];
841
+ const brandMarkIcon = !icons?.[slot] && brandMarks && choice.option !== "card" && choice.option !== "cash" && !!findBrand(choice.methodKey);
836
842
  return /* @__PURE__ */ jsxs("div", { className: cx.choice, "data-sf-pay-choice": true, children: [
837
843
  /* @__PURE__ */ jsxs("label", { className: cx.radioLabel, children: [
838
844
  /* @__PURE__ */ jsx(
@@ -850,7 +856,11 @@ function PaymentMethodSection(props) {
850
856
  ...tid("method")
851
857
  }
852
858
  ),
853
- 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,
854
864
  /* @__PURE__ */ jsxs("span", { className: cx.labelText, children: [
855
865
  rowLabel,
856
866
  hint ? /* @__PURE__ */ jsxs("span", { className: cx.hint, children: [