@asteby/storefront-react 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/account.cjs +9 -1
- package/dist/account.cjs.map +1 -1
- package/dist/account.css +8 -0
- package/dist/account.d.cts +3 -1
- package/dist/account.d.ts +3 -1
- package/dist/account.js +9 -2
- package/dist/account.js.map +1 -1
- package/package.json +2 -2
package/dist/account.css
CHANGED
|
@@ -259,6 +259,14 @@
|
|
|
259
259
|
border-top: 1px solid var(--sf-account-line, color-mix(in srgb, currentColor 14%, transparent));
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
/* Paquetería sobre el nombre del envío (el texto lo escribe `shipment.carrier`). */
|
|
263
|
+
[data-sf-shipment-eyebrow] {
|
|
264
|
+
display: block;
|
|
265
|
+
font-size: 0.75em;
|
|
266
|
+
font-weight: 500;
|
|
267
|
+
color: var(--sf-account-muted, color-mix(in srgb, currentColor 72%, transparent));
|
|
268
|
+
}
|
|
269
|
+
|
|
262
270
|
/*
|
|
263
271
|
* <ProductThumb>, <ProductPreview>, <ProductThumbStack>: la foto del producto y la línea de producto de la tienda.
|
|
264
272
|
* CSS plano sobre los tokens de la tienda (--foreground, --background, --border, --muted-foreground, --radius); en tema
|
package/dist/account.d.cts
CHANGED
|
@@ -521,6 +521,8 @@ declare function PendingPaymentList({ payments, voucherHref, shopName, className
|
|
|
521
521
|
*/
|
|
522
522
|
|
|
523
523
|
type PaymentMethodKey = 'card' | 'credit_card' | 'debit_card' | 'cash_voucher' | 'oxxo' | 'spei' | 'transfer' | 'bank_deposit' | 'wallet' | 'cash' | 'other';
|
|
524
|
+
/** The method family of a payment (`card`, `oxxo`, `spei`...), for the store's own icon or styling; `null` when unknown. */
|
|
525
|
+
declare function paymentMethodKey(p: PaymentInfo): PaymentMethodKey | null;
|
|
524
526
|
type PaymentLabelOptions = {
|
|
525
527
|
/** The store's own words for a payment (by organization, provider...). Return a string to use it; `null`/`undefined` falls through to the SDK's. */
|
|
526
528
|
override?: (payment: PaymentInfo) => string | null | undefined;
|
|
@@ -655,4 +657,4 @@ declare function barcodeGeometry(value: string, opts?: {
|
|
|
655
657
|
height?: number;
|
|
656
658
|
}): BarcodeGeometry | null;
|
|
657
659
|
|
|
658
|
-
export { AccountAuth, type AccountAuthClassNames, type AccountAuthMessages, type AccountAuthProps, type AccountAuthView, type AccountFormProps, type AccountMessageKey, type AccountMessages, type AccountStatus, type AccountTextProps, AuthActionData, AuthErrorCode, AuthStep, Barcode, type BarcodeGeometry, type BarcodeProps, InvoiceList, type InvoiceListClassNames, type InvoiceListProps, NextActionBar, type NextActionBarClassNames, type NextActionBarProps, OrderCard, type OrderCardClassNames, type OrderCardProps, OrderLines, type OrderLinesClassNames, type OrderLinesProps, OrderList, type OrderListClassNames, type OrderListProps, OrderProductsStack, OrderProgress, type OrderProgressClassNames, type OrderProgressProps, OrderStatusBadge, type OrderStatusBadgeProps, type OrderTone, type PaymentLabelOptions, type PaymentMethodKey, PaymentSummary, type PaymentSummaryProps, PendingPaymentCard, type PendingPaymentCardClassNames, type PendingPaymentCardProps, PendingPaymentList, type PendingPaymentListProps, PostPurchaseAccountPrompt, type PostPurchaseAccountPromptClassNames, type PostPurchaseAccountPromptMessages, type PostPurchaseAccountPromptProps, RefundList, type RefundListClassNames, type RefundListProps, ShipmentCard, type ShipmentCardClassNames, type ShipmentCardProps, type ShipmentMapSlotProps, type UseConnectionResult, type UseCustomerOrderOptions, type UseCustomerOrderResult, type UseCustomerOrdersOptions, type UsePendingPaymentsOptions, type VoucherView, accountAuthMessages, accountMessages, barcodeGeometry, barcodeValue, code128Modules, enumText, lineImage, paymentLabel, postPurchaseAccountPromptMessages, stageTone, useCustomerOrder, useCustomerOrders, usePendingPayments, voucherOf };
|
|
660
|
+
export { AccountAuth, type AccountAuthClassNames, type AccountAuthMessages, type AccountAuthProps, type AccountAuthView, type AccountFormProps, type AccountMessageKey, type AccountMessages, type AccountStatus, type AccountTextProps, AuthActionData, AuthErrorCode, AuthStep, Barcode, type BarcodeGeometry, type BarcodeProps, InvoiceList, type InvoiceListClassNames, type InvoiceListProps, NextActionBar, type NextActionBarClassNames, type NextActionBarProps, OrderCard, type OrderCardClassNames, type OrderCardProps, OrderLines, type OrderLinesClassNames, type OrderLinesProps, OrderList, type OrderListClassNames, type OrderListProps, OrderProductsStack, OrderProgress, type OrderProgressClassNames, type OrderProgressProps, OrderStatusBadge, type OrderStatusBadgeProps, type OrderTone, type PaymentLabelOptions, type PaymentMethodKey, PaymentSummary, type PaymentSummaryProps, PendingPaymentCard, type PendingPaymentCardClassNames, type PendingPaymentCardProps, PendingPaymentList, type PendingPaymentListProps, PostPurchaseAccountPrompt, type PostPurchaseAccountPromptClassNames, type PostPurchaseAccountPromptMessages, type PostPurchaseAccountPromptProps, RefundList, type RefundListClassNames, type RefundListProps, ShipmentCard, type ShipmentCardClassNames, type ShipmentCardProps, type ShipmentMapSlotProps, type UseConnectionResult, type UseCustomerOrderOptions, type UseCustomerOrderResult, type UseCustomerOrdersOptions, type UsePendingPaymentsOptions, type VoucherView, accountAuthMessages, accountMessages, barcodeGeometry, barcodeValue, code128Modules, enumText, lineImage, paymentLabel, paymentMethodKey, postPurchaseAccountPromptMessages, stageTone, useCustomerOrder, useCustomerOrders, usePendingPayments, voucherOf };
|
package/dist/account.d.ts
CHANGED
|
@@ -521,6 +521,8 @@ declare function PendingPaymentList({ payments, voucherHref, shopName, className
|
|
|
521
521
|
*/
|
|
522
522
|
|
|
523
523
|
type PaymentMethodKey = 'card' | 'credit_card' | 'debit_card' | 'cash_voucher' | 'oxxo' | 'spei' | 'transfer' | 'bank_deposit' | 'wallet' | 'cash' | 'other';
|
|
524
|
+
/** The method family of a payment (`card`, `oxxo`, `spei`...), for the store's own icon or styling; `null` when unknown. */
|
|
525
|
+
declare function paymentMethodKey(p: PaymentInfo): PaymentMethodKey | null;
|
|
524
526
|
type PaymentLabelOptions = {
|
|
525
527
|
/** The store's own words for a payment (by organization, provider...). Return a string to use it; `null`/`undefined` falls through to the SDK's. */
|
|
526
528
|
override?: (payment: PaymentInfo) => string | null | undefined;
|
|
@@ -655,4 +657,4 @@ declare function barcodeGeometry(value: string, opts?: {
|
|
|
655
657
|
height?: number;
|
|
656
658
|
}): BarcodeGeometry | null;
|
|
657
659
|
|
|
658
|
-
export { AccountAuth, type AccountAuthClassNames, type AccountAuthMessages, type AccountAuthProps, type AccountAuthView, type AccountFormProps, type AccountMessageKey, type AccountMessages, type AccountStatus, type AccountTextProps, AuthActionData, AuthErrorCode, AuthStep, Barcode, type BarcodeGeometry, type BarcodeProps, InvoiceList, type InvoiceListClassNames, type InvoiceListProps, NextActionBar, type NextActionBarClassNames, type NextActionBarProps, OrderCard, type OrderCardClassNames, type OrderCardProps, OrderLines, type OrderLinesClassNames, type OrderLinesProps, OrderList, type OrderListClassNames, type OrderListProps, OrderProductsStack, OrderProgress, type OrderProgressClassNames, type OrderProgressProps, OrderStatusBadge, type OrderStatusBadgeProps, type OrderTone, type PaymentLabelOptions, type PaymentMethodKey, PaymentSummary, type PaymentSummaryProps, PendingPaymentCard, type PendingPaymentCardClassNames, type PendingPaymentCardProps, PendingPaymentList, type PendingPaymentListProps, PostPurchaseAccountPrompt, type PostPurchaseAccountPromptClassNames, type PostPurchaseAccountPromptMessages, type PostPurchaseAccountPromptProps, RefundList, type RefundListClassNames, type RefundListProps, ShipmentCard, type ShipmentCardClassNames, type ShipmentCardProps, type ShipmentMapSlotProps, type UseConnectionResult, type UseCustomerOrderOptions, type UseCustomerOrderResult, type UseCustomerOrdersOptions, type UsePendingPaymentsOptions, type VoucherView, accountAuthMessages, accountMessages, barcodeGeometry, barcodeValue, code128Modules, enumText, lineImage, paymentLabel, postPurchaseAccountPromptMessages, stageTone, useCustomerOrder, useCustomerOrders, usePendingPayments, voucherOf };
|
|
660
|
+
export { AccountAuth, type AccountAuthClassNames, type AccountAuthMessages, type AccountAuthProps, type AccountAuthView, type AccountFormProps, type AccountMessageKey, type AccountMessages, type AccountStatus, type AccountTextProps, AuthActionData, AuthErrorCode, AuthStep, Barcode, type BarcodeGeometry, type BarcodeProps, InvoiceList, type InvoiceListClassNames, type InvoiceListProps, NextActionBar, type NextActionBarClassNames, type NextActionBarProps, OrderCard, type OrderCardClassNames, type OrderCardProps, OrderLines, type OrderLinesClassNames, type OrderLinesProps, OrderList, type OrderListClassNames, type OrderListProps, OrderProductsStack, OrderProgress, type OrderProgressClassNames, type OrderProgressProps, OrderStatusBadge, type OrderStatusBadgeProps, type OrderTone, type PaymentLabelOptions, type PaymentMethodKey, PaymentSummary, type PaymentSummaryProps, PendingPaymentCard, type PendingPaymentCardClassNames, type PendingPaymentCardProps, PendingPaymentList, type PendingPaymentListProps, PostPurchaseAccountPrompt, type PostPurchaseAccountPromptClassNames, type PostPurchaseAccountPromptMessages, type PostPurchaseAccountPromptProps, RefundList, type RefundListClassNames, type RefundListProps, ShipmentCard, type ShipmentCardClassNames, type ShipmentCardProps, type ShipmentMapSlotProps, type UseConnectionResult, type UseCustomerOrderOptions, type UseCustomerOrderResult, type UseCustomerOrdersOptions, type UsePendingPaymentsOptions, type VoucherView, accountAuthMessages, accountMessages, barcodeGeometry, barcodeValue, code128Modules, enumText, lineImage, paymentLabel, paymentMethodKey, postPurchaseAccountPromptMessages, stageTone, useCustomerOrder, useCustomerOrders, usePendingPayments, voucherOf };
|
package/dist/account.js
CHANGED
|
@@ -1006,6 +1006,10 @@ function ShipmentCard({ shipment, testMode = "hide", eventsPreview = 3, renderCa
|
|
|
1006
1006
|
/* @__PURE__ */ jsxs("header", { className: cx.header, "data-sf-shipment-header": true, children: [
|
|
1007
1007
|
renderCarrierMark && !test ? /* @__PURE__ */ jsx("span", { "data-sf-shipment-mark": true, children: renderCarrierMark(shipment) }) : null,
|
|
1008
1008
|
/* @__PURE__ */ jsxs(Heading, { id: titleId, className: cx.carrier, "data-sf-shipment-title": true, children: [
|
|
1009
|
+
carrier && !test ? /* @__PURE__ */ jsxs("span", { "data-sf-shipment-eyebrow": true, children: [
|
|
1010
|
+
m["shipment.carrier"],
|
|
1011
|
+
/* @__PURE__ */ jsx(Hidden, { children: ": " })
|
|
1012
|
+
] }) : null,
|
|
1009
1013
|
isReturn ? m["shipment.return"] : carrier ?? m["shipment.title"],
|
|
1010
1014
|
isReturn && carrier ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1011
1015
|
" \xB7 ",
|
|
@@ -1279,6 +1283,9 @@ var KEYWORDS = [
|
|
|
1279
1283
|
];
|
|
1280
1284
|
var BRANDS = { visa: "Visa", mastercard: "Mastercard", master: "Mastercard", amex: "American Express", american_express: "American Express", carnet: "Carnet", discover: "Discover" };
|
|
1281
1285
|
var RAW = /^[A-Za-z0-9_.:-]+(?: [A-Za-z0-9_.:-]+)?$/;
|
|
1286
|
+
function paymentMethodKey(p) {
|
|
1287
|
+
return keyOf(p);
|
|
1288
|
+
}
|
|
1282
1289
|
function keyOf(p) {
|
|
1283
1290
|
const fam = typeof p.family === "string" ? p.family.toLowerCase() : "";
|
|
1284
1291
|
const byLabel = () => {
|
|
@@ -1355,7 +1362,7 @@ function PaymentSummary({ payments, headingLevel = 3, methodLabel, classNames: c
|
|
|
1355
1362
|
const Heading = `h${headingLevel}`;
|
|
1356
1363
|
return /* @__PURE__ */ jsxs("section", { className: cx.root, "aria-labelledby": titleId, "data-sf-payments": true, children: [
|
|
1357
1364
|
/* @__PURE__ */ jsx(Heading, { id: titleId, className: cx.title, children: m["payment.title"] }),
|
|
1358
|
-
/* @__PURE__ */ jsx("ul", { className: cx.list, children: items.map((p, i) => /* @__PURE__ */ jsxs("li", { className: cx.item, "data-sf-payment": true, "data-sf-payment-status": typeof p.status === "string" ? p.status : "unknown", children: [
|
|
1365
|
+
/* @__PURE__ */ jsx("ul", { className: cx.list, children: items.map((p, i) => /* @__PURE__ */ jsxs("li", { className: cx.item, "data-sf-payment": true, "data-sf-payment-method-key": paymentMethodKey(p) ?? "unknown", "data-sf-payment-status": typeof p.status === "string" ? p.status : "unknown", children: [
|
|
1359
1366
|
/* @__PURE__ */ jsx("span", { "data-sf-payment-method": true, children: paymentLabel(p, m, methodLabel ? { override: methodLabel } : {}) }),
|
|
1360
1367
|
moneyText(p.amount, locale) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1361
1368
|
" \xB7 ",
|
|
@@ -1504,6 +1511,6 @@ function useCustomerOrder(id, { client, initial, poll } = {}) {
|
|
|
1504
1511
|
return { status: mine ? state.status : "loading", order, error: mine ? state.error : null, refreshing: mine && refreshing, reload };
|
|
1505
1512
|
}
|
|
1506
1513
|
|
|
1507
|
-
export { AccountAuth, Barcode, InvoiceList, NextActionBar, OrderCard, OrderLines, OrderList, OrderProductsStack, OrderProgress, OrderStatusBadge, PaymentSummary, PendingPaymentCard, PendingPaymentList, PostPurchaseAccountPrompt, RefundList, ShipmentCard, accountAuthMessages, accountMessages, enumText, lineImage, paymentLabel, postPurchaseAccountPromptMessages, stageTone, useCustomerOrder, useCustomerOrders, usePendingPayments };
|
|
1514
|
+
export { AccountAuth, Barcode, InvoiceList, NextActionBar, OrderCard, OrderLines, OrderList, OrderProductsStack, OrderProgress, OrderStatusBadge, PaymentSummary, PendingPaymentCard, PendingPaymentList, PostPurchaseAccountPrompt, RefundList, ShipmentCard, accountAuthMessages, accountMessages, enumText, lineImage, paymentLabel, paymentMethodKey, postPurchaseAccountPromptMessages, stageTone, useCustomerOrder, useCustomerOrders, usePendingPayments };
|
|
1508
1515
|
//# sourceMappingURL=account.js.map
|
|
1509
1516
|
//# sourceMappingURL=account.js.map
|