@propeller-commerce/propeller-v2-react-ui 0.24.0 → 0.25.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/dist/index.d.cts CHANGED
@@ -3530,6 +3530,8 @@ interface CartOverviewProps {
3530
3530
  code: string;
3531
3531
  name: string;
3532
3532
  }[];
3533
+ /** Maps a lowercased payment-method code to its display name. Falls back to the raw value. */
3534
+ paymethodLabels?: Record<string, string>;
3533
3535
  /** Logged-in user — used for the purchase-authorization check. Resolved from PropellerProvider when omitted. */
3534
3536
  user?: Contact | Customer | null;
3535
3537
  /** Active company ID — used for the purchase-authorization check. Resolved from PropellerProvider when omitted. */
package/dist/index.d.ts CHANGED
@@ -3530,6 +3530,8 @@ interface CartOverviewProps {
3530
3530
  code: string;
3531
3531
  name: string;
3532
3532
  }[];
3533
+ /** Maps a lowercased payment-method code to its display name. Falls back to the raw value. */
3534
+ paymethodLabels?: Record<string, string>;
3533
3535
  /** Logged-in user — used for the purchase-authorization check. Resolved from PropellerProvider when omitted. */
3534
3536
  user?: Contact | Customer | null;
3535
3537
  /** Active company ID — used for the purchase-authorization check. Resolved from PropellerProvider when omitted. */
package/dist/index.js CHANGED
@@ -7334,6 +7334,8 @@ function CartItemDelete(props = {}) {
7334
7334
  className: props.className ?? "propeller-cart-item__delete h-8 w-8 p-0 ml-auto inline-flex items-center justify-center rounded-control text-foreground-subtle hover:text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
7335
7335
  onClick: () => handlers.onDelete(),
7336
7336
  disabled: state.deleting,
7337
+ "aria-label": getLabel(resolved.labels, "deleteLabel", "Remove item"),
7338
+ title: getLabel(resolved.labels, "deleteLabel", "Remove item"),
7337
7339
  children: [
7338
7340
  state.deleting ? /* @__PURE__ */ jsx("div", { className: "w-4 h-4 border-2 border-foreground-subtle border-t-transparent rounded-full animate-spin" }) : null,
7339
7341
  !state.deleting ? /* @__PURE__ */ jsxs(
@@ -7714,7 +7716,8 @@ function CartOverview(rawProps) {
7714
7716
  const invoiceAddress = props.cart?.invoiceAddress;
7715
7717
  const deliveryAddress = props.cart?.deliveryAddress;
7716
7718
  const getCountryName$1 = (code) => getCountryName(code, props.countries);
7717
- const paymentMethod = props.cart?.paymentData?.method || "";
7719
+ const rawPaymentMethod = props.cart?.paymentData?.method || "";
7720
+ const paymentMethod = rawPaymentMethod ? props.paymethodLabels?.[rawPaymentMethod.toLowerCase()] || rawPaymentMethod : "";
7718
7721
  const carrierName = props.cart?.postageData?.carrier || "";
7719
7722
  function requestDate() {
7720
7723
  const date = props.cart?.postageData?.requestDate;