@ecomiq/storefront 3.1.1 → 3.3.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.
Files changed (84) hide show
  1. package/README.md +17 -0
  2. package/dist/{account-CZZ-ku6L.js → account-DMM0ZZYb.js} +25 -8
  3. package/dist/account.d.ts +1 -0
  4. package/dist/{address-defaults-BqjRhS82.js → address-defaults-Bj8j8noq.js} +2 -1
  5. package/dist/address-defaults.d.ts +1 -0
  6. package/dist/analytics/{config-DN5B1GOG.js → config-rY3DYQyP.js} +1 -1
  7. package/dist/{bank-accounts-MpKIxHaX.js → bank-accounts-CktJ_34-.js} +1 -1
  8. package/dist/buyer-rules-DBhUoaZX.js +20 -0
  9. package/dist/buyer-rules.d.ts +13 -0
  10. package/dist/{captcha-CZkpghTO.js → captcha-BgiQrAfa.js} +1 -1
  11. package/dist/{cart-actions-IKRYGqfj.js → cart-actions-C2Csh1k0.js} +1 -1
  12. package/dist/{catalog-hooks-DjmpXROv.js → catalog-hooks-Dk_58L_I.js} +1 -1
  13. package/dist/{checkout-DsI1MY14.js → checkout-DnfQ8WhP.js} +29 -14
  14. package/dist/{complaint-book-aAQfGBvo.js → complaint-book-DvxhgbsM.js} +11 -6
  15. package/dist/{culqi-authentication-DHxjPJRE.js → culqi-authentication-CThvkZYc.js} +1 -1
  16. package/dist/{customer-document-fields-BzLdztjM.js → customer-document-fields-CkydNlq2.js} +2 -2
  17. package/dist/{customer-login-form-k_q7_7FX.js → customer-login-form-CnXH_JcT.js} +2 -2
  18. package/dist/{customer-registration-form-PrBqUuI9.js → customer-registration-form-CwwytTsq.js} +10 -2
  19. package/dist/{documents-T1mzc_j8.js → documents-Ka-EL9m0.js} +29 -1
  20. package/dist/entries/account.js +5 -5
  21. package/dist/entries/analytics.js +1 -1
  22. package/dist/entries/cart.js +2 -2
  23. package/dist/entries/checkout.d.ts +4 -1
  24. package/dist/entries/checkout.js +11 -8
  25. package/dist/entries/order.js +7 -7
  26. package/dist/index.d.ts +3 -2
  27. package/dist/index.js +32 -31
  28. package/dist/{invoice-fields-BzDfV1nR.js → invoice-fields-BPRnSo_s.js} +3 -3
  29. package/dist/{mercadopago-dialog-CpGlgKBl.js → mercadopago-dialog-C8pRoGAB.js} +2 -2
  30. package/dist/{order-display-CUXVESaF.js → order-display-CK-5wCsa.js} +1 -1
  31. package/dist/{order-draft-D8sqUUNp.js → order-draft-XI7gDVeO.js} +1 -1
  32. package/dist/{order-payment-continuation-CS6omD7E.js → order-payment-continuation-DEGeYVyv.js} +3 -3
  33. package/dist/{order-payment-in-review-D5Y8bjGA.js → order-payment-in-review-D81gcAOe.js} +1 -1
  34. package/dist/{order-status-QsmEO-89.js → order-status-C61ywW-E.js} +2 -2
  35. package/dist/{page-seo-BKG-Ta6t.js → page-seo-BdyKwykI.js} +3 -3
  36. package/dist/{pages-DyItxkdE.js → pages-ClOPuk55.js} +3 -3
  37. package/dist/{payment-dialog-frame-xtidt_eM.js → payment-dialog-frame-C2n--N7s.js} +1 -1
  38. package/dist/{personalization-fields-CwBR8oGr.js → personalization-fields-BtNqpVpB.js} +1 -1
  39. package/dist/phone-B350moyr.js +13 -0
  40. package/dist/phone-field-D4io3zeV.js +141 -0
  41. package/dist/phone-field.d.ts +44 -0
  42. package/dist/phone.d.ts +2 -0
  43. package/dist/{preview-JWdMO6kX.js → preview-GypCcfup.js} +2 -2
  44. package/dist/{preview-address-bvieGEKb.js → preview-address-BobkvMlP.js} +1 -1
  45. package/dist/{preview-cart-COIP3Vfh.js → preview-cart-CRSPTs6g.js} +1 -1
  46. package/dist/{public-pages-Byh01h-6.js → public-pages-BZXH5gt9.js} +2 -2
  47. package/dist/{registration-h_00PAhj.js → registration-BmWt3-eT.js} +9 -4
  48. package/dist/registration.d.ts +1 -0
  49. package/dist/{route-text-B6pWdevi.js → route-text-CkupKB1b.js} +1 -1
  50. package/dist/{section-preview-BiYfeE-d.js → section-preview-C7QbWAzE.js} +2 -2
  51. package/dist/sections/account-addresses.js +20 -9
  52. package/dist/sections/account-order.js +4 -4
  53. package/dist/sections/account-orders.js +3 -3
  54. package/dist/sections/account-profile.d.ts +1 -0
  55. package/dist/sections/account-profile.js +21 -11
  56. package/dist/sections/checkout.js +63 -26
  57. package/dist/sections/complaint-book.js +39 -18
  58. package/dist/sections/design-system.js +1 -1
  59. package/dist/sections/draft-invoice.js +3 -3
  60. package/dist/sections/order-tracking.js +1 -1
  61. package/dist/{sections-CgpjubkB.js → sections-BkjGSM28.js} +1 -1
  62. package/dist/{seo-D9UdUMg9.js → seo-Cz1O5oxh.js} +2 -2
  63. package/dist/{session-DR_9-bcf.js → session-CsuzPSJs.js} +6 -6
  64. package/dist/{settings-B0NO2A6Y.js → settings-CiW3OroM.js} +20 -14
  65. package/dist/settings.d.ts +2 -1
  66. package/dist/{store-uU2gWdMY.js → store-BGDvRGNS.js} +14 -6
  67. package/dist/store.d.ts +8 -4
  68. package/dist/{storefront-language-Bnt-TU2F.js → storefront-language-20hJejSi.js} +5 -2
  69. package/dist/{storefront-text-Co7iUnLM.js → storefront-text-ClFfYMVk.js} +2 -2
  70. package/dist/{storefront-text-en-DzYmdOuY.js → storefront-text-en-DTTFnk6W.js} +8 -0
  71. package/dist/{storefront-text-pt-CizClH0I.js → storefront-text-pt-DuXQ0rti.js} +8 -0
  72. package/dist/{stripe-dialog-D88qfkUS.js → stripe-dialog-vlflY1WI.js} +2 -2
  73. package/dist/{telemetry-HuZXWBPi.js → telemetry-k9sM5iBG.js} +3 -0
  74. package/dist/{templates-AgGupnPA.js → templates-BM3WvMlA.js} +2 -2
  75. package/dist/{urls-D4uinJVd.js → urls-BR4wv2K2.js} +1 -1
  76. package/dist/{use-checkout-Jdk8P12A.js → use-checkout-BmVOLp_x.js} +1 -1
  77. package/dist/{use-checkout-payment-BGX-BE6D.js → use-checkout-payment-C2t511ck.js} +1 -1
  78. package/dist/{voucher-payment-B3o9ybg6.js → voucher-payment-Cbq4DRiL.js} +1 -1
  79. package/dist/{worker-cbXmLvfR.js → worker-BxlCSjSF.js} +3 -3
  80. package/package.json +4 -2
  81. package/src/sections/account-addresses.tsx +11 -7
  82. package/src/sections/account-profile.tsx +12 -7
  83. package/src/sections/checkout.tsx +45 -9
  84. package/src/sections/complaint-book.tsx +15 -4
package/dist/index.js CHANGED
@@ -1,50 +1,51 @@
1
- import { createRequestHandler, worker } from "./worker-cbXmLvfR.js";
2
- import { collectionImageCandidates, found, readCountries, store, withImages } from "./store-uU2gWdMY.js";
1
+ import { createRequestHandler, worker } from "./worker-BxlCSjSF.js";
2
+ import { collectionImageCandidates, found, readCountries, store, withImages } from "./store-BGDvRGNS.js";
3
3
  import { cartCookie, cartToken, readCart } from "./cart-D7DxZ2lD.js";
4
- import { MAX_CART_QUANTITY, cartAction, loadCart } from "./cart-actions-IKRYGqfj.js";
5
- import { checkoutAction, checkoutAddressDefaults, checkoutProgress, checkoutStep, defaultPaymentMethod, loadCheckout, needsShipping } from "./checkout-DsI1MY14.js";
4
+ import { MAX_CART_QUANTITY, cartAction, loadCart } from "./cart-actions-C2Csh1k0.js";
5
+ import { checkoutAction, checkoutAddressDefaults, checkoutProgress, checkoutStep, defaultPaymentMethod, loadCheckout, needsShipping } from "./checkout-DnfQ8WhP.js";
6
6
  import { paymentMethodSaving } from "./payment-methods-B8ocTgFZ.js";
7
- import { useCheckout } from "./use-checkout-Jdk8P12A.js";
8
- import { addressAction, loadAccount, loadAddresses, loadOrder, loadOrders, loadProfile, profileAction, readCustomerAddress } from "./account-CZZ-ku6L.js";
9
- import { loadGeo, loadPage, loadReview, loadSearchSuggestions, loadTracking, productReviewAction, readPage, reviewAction } from "./public-pages-Byh01h-6.js";
10
- import { hasOrderPaymentContinuation, loadOrderStatus, orderPaymentAction, orderProgress, orderStepTitle } from "./order-status-QsmEO-89.js";
11
- import { isOrderDraftPayable, loadOrderDraft, orderDraftAction } from "./order-draft-D8sqUUNp.js";
7
+ import { useCheckout } from "./use-checkout-BmVOLp_x.js";
8
+ import { addressAction, loadAccount, loadAddresses, loadOrder, loadOrders, loadProfile, profileAction, readCustomerAddress } from "./account-DMM0ZZYb.js";
9
+ import { loadGeo, loadPage, loadReview, loadSearchSuggestions, loadTracking, productReviewAction, readPage, reviewAction } from "./public-pages-BZXH5gt9.js";
10
+ import { hasOrderPaymentContinuation, loadOrderStatus, orderPaymentAction, orderProgress, orderStepTitle } from "./order-status-C61ywW-E.js";
11
+ import { isOrderDraftPayable, loadOrderDraft, orderDraftAction } from "./order-draft-XI7gDVeO.js";
12
12
  import { useOrderPayment } from "./use-order-payment-BKIz_IO0.js";
13
- import { OrderPaymentContinuation } from "./order-payment-continuation-CS6omD7E.js";
14
- import { OrderPaymentInReview } from "./order-payment-in-review-D5Y8bjGA.js";
13
+ import { OrderPaymentContinuation } from "./order-payment-continuation-DEGeYVyv.js";
14
+ import { OrderPaymentInReview } from "./order-payment-in-review-D81gcAOe.js";
15
15
  import { discountPercent, isVariantAvailable, pickVariant, variantOptions, variantSwatches } from "./product-variants-BNDHvs1y.js";
16
- import { SORT_OPTIONS, activeFilterChips, activeFilterCount, clearedFiltersHref, filterLabel, filterValueLabel, isSingleChoiceFilter, pageItems, selectedFacetCount, useFacets, useGeoCascade, usePagination, useSearchSuggestions, useSort } from "./catalog-hooks-DjmpXROv.js";
17
- import { completeCustomerLogin, customer, customerCsrfToken, customerHeaders, logout, requireCustomer, requireCustomerRegistration, startCustomerLogin, submitCustomerLogin } from "./session-DR_9-bcf.js";
16
+ import { SORT_OPTIONS, activeFilterChips, activeFilterCount, clearedFiltersHref, filterLabel, filterValueLabel, isSingleChoiceFilter, pageItems, selectedFacetCount, useFacets, useGeoCascade, usePagination, useSearchSuggestions, useSort } from "./catalog-hooks-Dk_58L_I.js";
17
+ import { completeCustomerLogin, customer, customerCsrfToken, customerHeaders, logout, requireCustomer, requireCustomerRegistration, startCustomerLogin, submitCustomerLogin } from "./session-CsuzPSJs.js";
18
18
  import { CustomerCsrfField, useCustomerCsrfToken } from "./customer-csrf-C1oDX-Py.js";
19
19
  import { CUSTOMER_CSRF_FIELD, FORM_CONTRACTS } from "./form-contracts-0R112spH.js";
20
20
  import { culqiSourceKey } from "./culqi-three-ds-HP3mfrvV.js";
21
21
  import { readCatalog, shouldRevalidateCatalogRoot } from "./catalog-7gJ-l5hW.js";
22
- import { categorySeo, collectionSeo, homeSeo, pageSeo, productSeo, seoMeta } from "./page-seo-BKG-Ta6t.js";
23
- import { canonicalUrl, loadCategory, loadProduct, requireCanonical, resolveUrl } from "./urls-D4uinJVd.js";
24
- import { collectionPage, productPage, productReviews, resolvePage } from "./pages-DyItxkdE.js";
22
+ import { categorySeo, collectionSeo, homeSeo, pageSeo, productSeo, seoMeta } from "./page-seo-BdyKwykI.js";
23
+ import { canonicalUrl, loadCategory, loadProduct, requireCanonical, resolveUrl } from "./urls-BR4wv2K2.js";
24
+ import { collectionPage, productPage, productReviews, resolvePage } from "./pages-ClOPuk55.js";
25
25
  import { money } from "./money-DtGOtDri.js";
26
26
  import { readPlace } from "./place-CmW4hBWY.js";
27
27
  import { optional, safeNext, text } from "./form-BtQcbXlJ.js";
28
- import { pickProducts, section, setting } from "./settings-B0NO2A6Y.js";
28
+ import { pickProducts, pickProductsWithReviews, section, setting } from "./settings-CiW3OroM.js";
29
29
  import { Favicon } from "./favicon-YpyhVJ9H.js";
30
30
  import { Hidden } from "./hidden-CCWtOWKR.js";
31
31
  import { SourceProvider, source, sourceValue } from "./sources-B-3JFJfb.js";
32
32
  import { RichText } from "./rich-text-M-Ju8RL4.js";
33
- import { loadSections, sectionKey, useSection, withSectionBoundary, withSections } from "./sections-CgpjubkB.js";
34
- import { templateComponent, templateName, templatePath, templated } from "./templates-AgGupnPA.js";
35
- import { SectionPreview, sectionPreview, sectionPreviewMeta } from "./section-preview-BiYfeE-d.js";
33
+ import { loadSections, sectionKey, useSection, withSectionBoundary, withSections } from "./sections-BkjGSM28.js";
34
+ import { templateComponent, templateName, templatePath, templated } from "./templates-BM3WvMlA.js";
35
+ import { SectionPreview, sectionPreview, sectionPreviewMeta } from "./section-preview-C7QbWAzE.js";
36
36
  import { StorefrontAnchor, StorefrontLink, readStorefrontLayout, readStorefrontLinks, storefrontHref, useStorefrontLinkPublished } from "./links-kFxBZfdb.js";
37
37
  import { PaymentLogo, paymentLogoCodes } from "./payment-logo-BoPaGJc_.js";
38
- import { BankAccountList } from "./bank-accounts-MpKIxHaX.js";
38
+ import { BankAccountList } from "./bank-accounts-CktJ_34-.js";
39
39
  import { CustomerAvatar } from "./customer-avatar-CJXSDroK.js";
40
- import { CustomerLoginForm } from "./customer-login-form-k_q7_7FX.js";
41
- import { Captcha } from "./captcha-CZkpghTO.js";
42
- import { COMPLAINT_DOCUMENT_TYPES, IDENTITY_DOCUMENT_TYPES, identityDocumentRule } from "./documents-T1mzc_j8.js";
43
- import { complaintBookAction, complaintBookAttachmentError, complaintBookLinks, complaintBookNumber, loadComplaintBook } from "./complaint-book-aAQfGBvo.js";
44
- import { loadCustomerRegistration, submitCustomerRegistration } from "./registration-h_00PAhj.js";
45
- import { CustomerRegistrationForm } from "./customer-registration-form-PrBqUuI9.js";
40
+ import { CustomerLoginForm } from "./customer-login-form-CnXH_JcT.js";
41
+ import { Captcha } from "./captcha-BgiQrAfa.js";
42
+ import { COMPLAINT_DOCUMENT_TYPES, IDENTITY_DOCUMENT_TYPES, identityDocumentRule } from "./documents-Ka-EL9m0.js";
43
+ import { complaintBookAction, complaintBookAttachmentError, complaintBookLinks, complaintBookNumber, loadComplaintBook } from "./complaint-book-DvxhgbsM.js";
44
+ import { loadCustomerRegistration, submitCustomerRegistration } from "./registration-BmWt3-eT.js";
45
+ import { CustomerRegistrationForm } from "./customer-registration-form-CwwytTsq.js";
46
+ import { PhoneField } from "./phone-field-D4io3zeV.js";
46
47
  import { storefrontContact } from "./store-contact--hY6CoFb.js";
47
- import { loadStorefrontTranslations, storefrontText } from "./storefront-text-Co7iUnLM.js";
48
- import { StorefrontLanguageProvider, useStorefrontLocale, useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
49
- import { storefrontRouteText } from "./route-text-B6pWdevi.js";
50
- export { BankAccountList, COMPLAINT_DOCUMENT_TYPES, CUSTOMER_CSRF_FIELD, Captcha, CustomerAvatar, CustomerCsrfField, CustomerLoginForm, CustomerRegistrationForm, FORM_CONTRACTS, Favicon, Hidden, IDENTITY_DOCUMENT_TYPES, MAX_CART_QUANTITY, OrderPaymentContinuation, OrderPaymentInReview, PaymentLogo, RichText, SORT_OPTIONS, SectionPreview, SourceProvider, StorefrontAnchor, StorefrontLanguageProvider, StorefrontLink, activeFilterChips, activeFilterCount, addressAction, canonicalUrl, cartAction, cartCookie, cartToken, categorySeo, checkoutAction, checkoutAddressDefaults, checkoutProgress, checkoutStep, clearedFiltersHref, collectionImageCandidates, collectionPage, collectionSeo, complaintBookAction, complaintBookAttachmentError, complaintBookLinks, complaintBookNumber, completeCustomerLogin, createRequestHandler, culqiSourceKey, customer, customerCsrfToken, customerHeaders, defaultPaymentMethod, discountPercent, filterLabel, filterValueLabel, found, hasOrderPaymentContinuation, homeSeo, identityDocumentRule, isOrderDraftPayable, isSingleChoiceFilter, isVariantAvailable, loadAccount, loadAddresses, loadCart, loadCategory, loadCheckout, loadComplaintBook, loadCustomerRegistration, loadGeo, loadOrder, loadOrderDraft, loadOrderStatus, loadOrders, loadPage, loadProduct, loadProfile, loadReview, loadSearchSuggestions, loadSections, loadStorefrontTranslations, loadTracking, logout, money, needsShipping, optional, orderDraftAction, orderPaymentAction, orderProgress, orderStepTitle, pageItems, pageSeo, paymentLogoCodes, paymentMethodSaving, pickProducts, pickVariant, productPage, productReviewAction, productReviews, productSeo, profileAction, readCart, readCatalog, readCountries, readCustomerAddress, readPage, readPlace, readStorefrontLayout, readStorefrontLinks, requireCanonical, requireCustomer, requireCustomerRegistration, resolvePage, resolveUrl, reviewAction, safeNext, section, sectionKey, sectionPreview, sectionPreviewMeta, selectedFacetCount, seoMeta, setting, shouldRevalidateCatalogRoot, source, sourceValue, startCustomerLogin, store, storefrontContact, storefrontHref, storefrontRouteText, storefrontText, submitCustomerLogin, submitCustomerRegistration, templateComponent, templateName, templatePath, templated, text, useCheckout, useCustomerCsrfToken, useFacets, useGeoCascade, useOrderPayment, usePagination, useSearchSuggestions, useSection, useSort, useStorefrontLinkPublished, useStorefrontLocale, useStorefrontText, variantOptions, variantSwatches, withImages, withSectionBoundary, withSections, worker };
48
+ import { loadStorefrontTranslations, storefrontText } from "./storefront-text-ClFfYMVk.js";
49
+ import { StorefrontLanguageProvider, useStorefrontLocale, useStorefrontText } from "./storefront-language-20hJejSi.js";
50
+ import { storefrontRouteText } from "./route-text-CkupKB1b.js";
51
+ export { BankAccountList, COMPLAINT_DOCUMENT_TYPES, CUSTOMER_CSRF_FIELD, Captcha, CustomerAvatar, CustomerCsrfField, CustomerLoginForm, CustomerRegistrationForm, FORM_CONTRACTS, Favicon, Hidden, IDENTITY_DOCUMENT_TYPES, MAX_CART_QUANTITY, OrderPaymentContinuation, OrderPaymentInReview, PaymentLogo, PhoneField, RichText, SORT_OPTIONS, SectionPreview, SourceProvider, StorefrontAnchor, StorefrontLanguageProvider, StorefrontLink, activeFilterChips, activeFilterCount, addressAction, canonicalUrl, cartAction, cartCookie, cartToken, categorySeo, checkoutAction, checkoutAddressDefaults, checkoutProgress, checkoutStep, clearedFiltersHref, collectionImageCandidates, collectionPage, collectionSeo, complaintBookAction, complaintBookAttachmentError, complaintBookLinks, complaintBookNumber, completeCustomerLogin, createRequestHandler, culqiSourceKey, customer, customerCsrfToken, customerHeaders, defaultPaymentMethod, discountPercent, filterLabel, filterValueLabel, found, hasOrderPaymentContinuation, homeSeo, identityDocumentRule, isOrderDraftPayable, isSingleChoiceFilter, isVariantAvailable, loadAccount, loadAddresses, loadCart, loadCategory, loadCheckout, loadComplaintBook, loadCustomerRegistration, loadGeo, loadOrder, loadOrderDraft, loadOrderStatus, loadOrders, loadPage, loadProduct, loadProfile, loadReview, loadSearchSuggestions, loadSections, loadStorefrontTranslations, loadTracking, logout, money, needsShipping, optional, orderDraftAction, orderPaymentAction, orderProgress, orderStepTitle, pageItems, pageSeo, paymentLogoCodes, paymentMethodSaving, pickProducts, pickProductsWithReviews, pickVariant, productPage, productReviewAction, productReviews, productSeo, profileAction, readCart, readCatalog, readCountries, readCustomerAddress, readPage, readPlace, readStorefrontLayout, readStorefrontLinks, requireCanonical, requireCustomer, requireCustomerRegistration, resolvePage, resolveUrl, reviewAction, safeNext, section, sectionKey, sectionPreview, sectionPreviewMeta, selectedFacetCount, seoMeta, setting, shouldRevalidateCatalogRoot, source, sourceValue, startCustomerLogin, store, storefrontContact, storefrontHref, storefrontRouteText, storefrontText, submitCustomerLogin, submitCustomerRegistration, templateComponent, templateName, templatePath, templated, text, useCheckout, useCustomerCsrfToken, useFacets, useGeoCascade, useOrderPayment, usePagination, useSearchSuggestions, useSection, useSort, useStorefrontLinkPublished, useStorefrontLocale, useStorefrontText, variantOptions, variantSwatches, withImages, withSectionBoundary, withSections, worker };
@@ -1,5 +1,5 @@
1
- import { useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
2
- import { IDENTITY_DOCUMENT_TYPES, identityDocumentError, identityDocumentRule, isIdentityDocumentType } from "./documents-T1mzc_j8.js";
1
+ import { useStorefrontText } from "./storefront-language-20hJejSi.js";
2
+ import { IDENTITY_DOCUMENT_TYPES, buyerDocumentError, identityDocumentRule, isIdentityDocumentType } from "./documents-Ka-EL9m0.js";
3
3
  import { useState } from "react";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
5
  // src/invoice-fields.tsx
@@ -14,7 +14,7 @@ function useDocumentInput(type, countryCode, initial) {
14
14
  const [value, setValue] = useState(initial);
15
15
  const [checked, setChecked] = useState(false);
16
16
  const translate = useStorefrontText();
17
- const failure = identityDocumentError(type, countryCode, value);
17
+ const failure = buyerDocumentError(type, countryCode, value);
18
18
  const error = failure === null ? null : translate(failure);
19
19
  const rule = identityDocumentRule(type);
20
20
  return {
@@ -1,8 +1,8 @@
1
- import { useStorefrontLocale, useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
1
+ import { useStorefrontLocale, useStorefrontText } from "./storefront-language-20hJejSi.js";
2
2
  import { loadMercadoPago } from "./mercadopago-checkout-DC7RXa8k.js";
3
3
  import { money } from "./money-DtGOtDri.js";
4
4
  import { PaymentLogo } from "./payment-logo-BoPaGJc_.js";
5
- import { PaymentDialogFrame } from "./payment-dialog-frame-xtidt_eM.js";
5
+ import { PaymentDialogFrame } from "./payment-dialog-frame-C2n--N7s.js";
6
6
  import { useEffect, useId, useRef, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  // src/mercadopago-dialog.tsx
@@ -1,7 +1,7 @@
1
1
  import { orderStepLabel, orderStepOf, paymentLabel } from "./order-view-9IlBg5AF.js";
2
2
  import { cartModifiers } from "./personalization-BSVlktZP.js";
3
3
  import { PaymentLogo, hasPaymentLogo } from "./payment-logo-BoPaGJc_.js";
4
- import { useStorefrontLocale, useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
4
+ import { useStorefrontLocale, useStorefrontText } from "./storefront-language-20hJejSi.js";
5
5
  import { Form } from "react-router";
6
6
  import { formatOrderDate } from "@ecomiq/core";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { found, store } from "./store-uU2gWdMY.js";
1
+ import { found, store } from "./store-BGDvRGNS.js";
2
2
  import { data, redirect } from "react-router";
3
3
  import { ApiError } from "@ecomiq/core";
4
4
  // src/order-draft.ts
@@ -1,7 +1,7 @@
1
- import { useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
2
- import { VoucherPayment } from "./voucher-payment-B3o9ybg6.js";
1
+ import { useStorefrontText } from "./storefront-language-20hJejSi.js";
2
+ import { VoucherPayment } from "./voucher-payment-Cbq4DRiL.js";
3
3
  import { useCulqiCheckout } from "./use-culqi-checkout-CrjLAipU.js";
4
- import { CulqiAuthentication } from "./culqi-authentication-DHxjPJRE.js";
4
+ import { CulqiAuthentication } from "./culqi-authentication-CThvkZYc.js";
5
5
  import { useRevalidator } from "react-router";
6
6
  import { useEffect, useRef, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { money } from "./money-DtGOtDri.js";
2
- import { useStorefrontLocale, useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
2
+ import { useStorefrontLocale, useStorefrontText } from "./storefront-language-20hJejSi.js";
3
3
  import { Link, useLocation, useRevalidator } from "react-router";
4
4
  import { useEffect, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import { orderAnalytics } from "./analytics/events-CWmKY7oX.js";
2
2
  import { text } from "./form-BtQcbXlJ.js";
3
- import { found, store } from "./store-uU2gWdMY.js";
4
- import { worker } from "./worker-cbXmLvfR.js";
3
+ import { found, store } from "./store-BGDvRGNS.js";
4
+ import { worker } from "./worker-BxlCSjSF.js";
5
5
  import { PAYMENT_RETURN_CONFIRMING, PAYMENT_RETURN_PARAM } from "./payment-return-5cjypwIw.js";
6
6
  import { data, redirect } from "react-router";
7
7
  import { ApiError, AuthenticateOrderPaymentInputSchema } from "@ecomiq/core";
@@ -1,6 +1,6 @@
1
- import { loadStorefrontTranslations, storefrontText } from "./storefront-text-Co7iUnLM.js";
2
- import { store } from "./store-uU2gWdMY.js";
3
- import { absoluteUrl, canonicalOrigin, requestUrl } from "./urls-D4uinJVd.js";
1
+ import { loadStorefrontTranslations, storefrontText } from "./storefront-text-ClFfYMVk.js";
2
+ import { store } from "./store-BGDvRGNS.js";
3
+ import { absoluteUrl, canonicalOrigin, requestUrl } from "./urls-BR4wv2K2.js";
4
4
  // src/page-seo.ts
5
5
  const DESCRIPTION_LENGTH = 160;
6
6
  const TITLE_LENGTH = 65;
@@ -1,8 +1,8 @@
1
1
  import { categoryAnalytics, collectionAnalytics, productAnalytics } from "./analytics/events-CWmKY7oX.js";
2
2
  import { readCatalog } from "./catalog-7gJ-l5hW.js";
3
- import { store } from "./store-uU2gWdMY.js";
4
- import { requestUrl, requireCanonical } from "./urls-D4uinJVd.js";
5
- import { worker } from "./worker-cbXmLvfR.js";
3
+ import { store } from "./store-BGDvRGNS.js";
4
+ import { requestUrl, requireCanonical } from "./urls-BR4wv2K2.js";
5
+ import { worker } from "./worker-BxlCSjSF.js";
6
6
  import { data, redirect } from "react-router";
7
7
  import { CategoryDetailSchema, CollectionSchema, GraphQLResponseError, ProductDetailSchema, ProductSummarySchema, ProductsResponseSchema, graphQLSelection, sanitizeHtml } from "@ecomiq/core";
8
8
  import { z } from "zod";
@@ -1,4 +1,4 @@
1
- import { useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
1
+ import { useStorefrontText } from "./storefront-language-20hJejSi.js";
2
2
  import { useEffect, useRef } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  // src/payment-dialog-frame.tsx
@@ -1,5 +1,5 @@
1
1
  import { modifierOptionField, modifierQuantityField, modifierValueField } from "./personalization-BSVlktZP.js";
2
- import { useStorefrontText } from "./storefront-language-Bnt-TU2F.js";
2
+ import { useStorefrontText } from "./storefront-language-20hJejSi.js";
3
3
  import { modifierLabel } from "@ecomiq/core";
4
4
  import { useId, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,13 @@
1
+ import { isSupportedCountry, isValidPhoneNumber } from "libphonenumber-js/min";
2
+ // src/phone.ts
3
+ const PHONE_ERROR = "Revisa tu celular: ese número no es válido para el país elegido.";
4
+ const MAX_LENGTH = 20;
5
+ const PHONE_SHAPE = /^[\s(]*\+?[\d\s().-]+$/;
6
+ function phoneError(value, countryCode) {
7
+ const phone = value.replace(/\p{Cf}/gu, "");
8
+ if (phone.trim() === "") return null;
9
+ if (phone.length > MAX_LENGTH || !PHONE_SHAPE.test(phone)) return PHONE_ERROR;
10
+ const country = countryCode.toUpperCase();
11
+ return isValidPhoneNumber(phone.replace(/[()]/g, ""), isSupportedCountry(country) ? country : void 0) ? null : PHONE_ERROR;
12
+ }
13
+ export { PHONE_ERROR, phoneError };
@@ -0,0 +1,141 @@
1
+ import { phoneError } from "./phone-B350moyr.js";
2
+ import { useStorefrontLanguage, useStorefrontText } from "./storefront-language-20hJejSi.js";
3
+ import { createElement, useEffect, useMemo, useRef, useState } from "react";
4
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
+ import PhoneInput, { getCountries, getCountryCallingCode, isSupportedCountry, parsePhoneNumber } from "react-phone-number-input/min";
6
+ // src/phone-field.tsx
7
+ const COUNTRY_SELECT = "rounded-s-md border border-e-0 border-input bg-background px-3 text-foreground focus-within:border-ring focus-within:ring-1 focus-within:ring-ring";
8
+ let loadedFlags = null;
9
+ function useFlags() {
10
+ const [flags, setFlags] = useState(loadedFlags);
11
+ useEffect(() => {
12
+ if (flags !== null) return;
13
+ import("react-phone-number-input/flags").then((module) => {
14
+ loadedFlags = module.default;
15
+ setFlags(module.default);
16
+ });
17
+ }, [flags]);
18
+ return flags;
19
+ }
20
+ function PhoneCountrySelect({ value, onChange, options, disabled, className, "aria-label": label }) {
21
+ const flags = useFlags();
22
+ const Flag = value === void 0 ? void 0 : flags?.[value];
23
+ return /* @__PURE__ */ jsxs("span", {
24
+ className: `relative flex shrink-0 items-center gap-1.5 ${className ?? ""}`,
25
+ children: [
26
+ /* @__PURE__ */ jsx("span", {
27
+ className: "flex h-4 w-6 shrink-0 overflow-hidden rounded-[2px] bg-muted [&_svg]:size-full",
28
+ children: Flag ? /* @__PURE__ */ jsx(Flag, { title: label ?? "" }) : null
29
+ }),
30
+ /* @__PURE__ */ jsx("span", {
31
+ className: "text-sm tabular-nums",
32
+ children: value === void 0 ? "+" : `+${getCountryCallingCode(value)}`
33
+ }),
34
+ /* @__PURE__ */ jsx("svg", {
35
+ "aria-hidden": "true",
36
+ viewBox: "0 0 24 24",
37
+ className: "size-3.5 text-muted-foreground",
38
+ fill: "none",
39
+ stroke: "currentColor",
40
+ strokeWidth: 2,
41
+ children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
42
+ }),
43
+ /* @__PURE__ */ jsx("select", {
44
+ "aria-label": label,
45
+ value: value ?? "",
46
+ disabled,
47
+ onChange: (event) => onChange(isSupportedCountry(event.target.value) ? event.target.value : void 0),
48
+ className: "absolute inset-0 cursor-pointer opacity-0",
49
+ children: options.map((option) => /* @__PURE__ */ jsx("option", {
50
+ value: option.value ?? "",
51
+ children: option.value === void 0 ? option.label : `${option.label} (+${getCountryCallingCode(option.value)})`
52
+ }, option.value ?? ""))
53
+ })
54
+ ]
55
+ });
56
+ }
57
+ function PhoneNumberInput({ selectClassName = COUNTRY_SELECT, inputClassName, defaultCountry, ref, ...props }) {
58
+ return /* @__PURE__ */ createElement(PhoneInput, {
59
+ ...props,
60
+ ref,
61
+ key: defaultCountry,
62
+ defaultCountry,
63
+ addInternationalOption: false,
64
+ initialValueFormat: "national",
65
+ smartCaret: false,
66
+ countrySelectComponent: PhoneCountrySelect,
67
+ countrySelectProps: { className: selectClassName },
68
+ numberInputProps: { className: inputClassName }
69
+ });
70
+ }
71
+ function submittedPhone(value, country) {
72
+ if (value === void 0) return "";
73
+ const parsed = parsePhoneNumber(value);
74
+ return parsed !== void 0 && parsed.country === country ? parsed.nationalNumber : value;
75
+ }
76
+ function usePhoneField(countryCode, initial, name = "phone") {
77
+ const upperCode = countryCode.toUpperCase();
78
+ const country = isSupportedCountry(upperCode) ? upperCode : void 0;
79
+ const [value, setValue] = useState(() => parsePhoneNumber(initial, country)?.number);
80
+ const [valueCountry, setValueCountry] = useState(country);
81
+ const [checked, setChecked] = useState(initial !== "");
82
+ if (valueCountry !== country) {
83
+ setValueCountry(country);
84
+ setValue(parsePhoneNumber(submittedPhone(value, valueCountry), country)?.number);
85
+ }
86
+ const translate = useStorefrontText();
87
+ const language = useStorefrontLanguage();
88
+ const labels = useMemo(() => {
89
+ const names = new Intl.DisplayNames([language], { type: "region" });
90
+ const countries = {};
91
+ for (const code of getCountries()) countries[code] = names.of(code) ?? code;
92
+ return countries;
93
+ }, [language]);
94
+ const submitted = submittedPhone(value, country);
95
+ const failure = phoneError(submitted, countryCode);
96
+ const error = failure === null ? null : translate(failure);
97
+ const ref = useRef(null);
98
+ useEffect(() => {
99
+ ref.current?.setCustomValidity(error ?? "");
100
+ });
101
+ return {
102
+ error: checked ? error : null,
103
+ hidden: {
104
+ name,
105
+ value: submitted
106
+ },
107
+ input: {
108
+ ref,
109
+ value,
110
+ "aria-invalid": checked && error !== null,
111
+ onChange: (next) => setValue(next),
112
+ onBlur: () => setChecked(true),
113
+ defaultCountry: country,
114
+ labels: {
115
+ ...labels,
116
+ country: translate("País del celular")
117
+ },
118
+ locales: language
119
+ }
120
+ };
121
+ }
122
+ function PhoneField({ countryCode, initial, name = "phone", id = name, className, errorClassName = "text-sm text-destructive", ...props }) {
123
+ const phone = usePhoneField(countryCode, initial, name);
124
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
125
+ /* @__PURE__ */ jsx("input", {
126
+ type: "hidden",
127
+ ...phone.hidden
128
+ }),
129
+ /* @__PURE__ */ jsx(PhoneNumberInput, {
130
+ ...phone.input,
131
+ ...props,
132
+ id,
133
+ className: `flex ${className ?? ""}`
134
+ }),
135
+ phone.error ? /* @__PURE__ */ jsx("p", {
136
+ className: errorClassName,
137
+ children: phone.error
138
+ }) : null
139
+ ] });
140
+ }
141
+ export { PhoneField, PhoneNumberInput, usePhoneField };
@@ -0,0 +1,44 @@
1
+ import { ComponentProps, ElementType, FocusEvent } from "react";
2
+ import PhoneInput, { Country, Value } from "react-phone-number-input/min";
3
+ type Labels = NonNullable<ComponentProps<typeof PhoneInput>["labels"]>;
4
+ export type PhoneNumberInputProps = {
5
+ value?: Value;
6
+ onChange: (value?: Value) => void;
7
+ onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
8
+ defaultCountry?: Country;
9
+ labels?: Labels;
10
+ locales?: string;
11
+ required?: boolean;
12
+ id?: string;
13
+ className?: string;
14
+ selectClassName?: string;
15
+ inputClassName?: string;
16
+ inputComponent?: ElementType;
17
+ ref?: ComponentProps<"input">["ref"];
18
+ };
19
+ export declare function PhoneNumberInput({ selectClassName, inputClassName, defaultCountry, ref, ...props }: PhoneNumberInputProps): import("react").JSX.Element;
20
+ export type PhoneFieldState = {
21
+ error: string | null;
22
+ hidden: {
23
+ name: string;
24
+ value: string;
25
+ };
26
+ input: Pick<PhoneNumberInputProps, "value" | "onChange" | "onBlur" | "defaultCountry" | "labels" | "locales" | "ref"> & {
27
+ "aria-invalid": boolean;
28
+ };
29
+ };
30
+ export declare function usePhoneField(countryCode: string, initial: string, name?: string): PhoneFieldState;
31
+ export type PhoneFieldProps = {
32
+ countryCode: string;
33
+ initial: string;
34
+ name?: string;
35
+ id?: string;
36
+ required?: boolean;
37
+ className?: string;
38
+ selectClassName?: string;
39
+ inputClassName?: string;
40
+ errorClassName?: string;
41
+ inputComponent?: ElementType;
42
+ };
43
+ export declare function PhoneField({ countryCode, initial, name, id, className, errorClassName, ...props }: PhoneFieldProps): import("react").JSX.Element;
44
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const PHONE_ERROR = "Revisa tu celular: ese número no es válido para el país elegido.";
2
+ export declare function phoneError(value: string, countryCode: string): string | null;
@@ -1,5 +1,5 @@
1
- import { previewAddress } from "./preview-address-bvieGEKb.js";
2
- import { paymentMethods, previewCart } from "./preview-cart-COIP3Vfh.js";
1
+ import { previewAddress } from "./preview-address-BobkvMlP.js";
2
+ import { paymentMethods, previewCart } from "./preview-cart-CRSPTs6g.js";
3
3
  // src/preview.ts
4
4
  const PREVIEW_TOKEN = "ecomiq-editor-preview";
5
5
  const PREVIEW_REVIEW = "preview-review";
@@ -1,4 +1,4 @@
1
- import { loadStorefrontTranslations, storefrontText } from "./storefront-text-Co7iUnLM.js";
1
+ import { loadStorefrontTranslations, storefrontText } from "./storefront-text-ClFfYMVk.js";
2
2
  // src/preview-address.ts
3
3
  async function previewAddress(store) {
4
4
  const translations = await loadStorefrontTranslations(store.language);
@@ -1,4 +1,4 @@
1
- import { previewAddress } from "./preview-address-bvieGEKb.js";
1
+ import { previewAddress } from "./preview-address-BobkvMlP.js";
2
2
  // src/preview-cart.ts
3
3
  const PREVIEW_CART_TOKEN = "ecomiq-editor-preview-cart";
4
4
  const BUYER = {
@@ -1,6 +1,6 @@
1
1
  import { text } from "./form-BtQcbXlJ.js";
2
- import { customer, customerHeaders } from "./session-DR_9-bcf.js";
3
- import { found, store, storeHeaders } from "./store-uU2gWdMY.js";
2
+ import { customer, customerHeaders } from "./session-CsuzPSJs.js";
3
+ import { found, store, storeHeaders } from "./store-BGDvRGNS.js";
4
4
  import { data, redirect } from "react-router";
5
5
  import { ApiError, getOrderReviewContext, getOrderTracking, sanitizeHtml } from "@ecomiq/core";
6
6
  import { z } from "zod";
@@ -1,8 +1,9 @@
1
1
  import { safeNext, text } from "./form-BtQcbXlJ.js";
2
+ import { PHONE_ERROR, phoneError } from "./phone-B350moyr.js";
2
3
  import { rejectCrossOriginAction, rejectCustomerCsrf } from "./request-security-CRsRMgwj.js";
3
- import { customer, customerHeaders } from "./session-DR_9-bcf.js";
4
- import { store } from "./store-uU2gWdMY.js";
5
- import { worker } from "./worker-cbXmLvfR.js";
4
+ import { customer, customerHeaders } from "./session-CsuzPSJs.js";
5
+ import { store } from "./store-BGDvRGNS.js";
6
+ import { worker } from "./worker-BxlCSjSF.js";
6
7
  import { data, redirect } from "react-router";
7
8
  import { ApiError, CustomerRegistrationInputSchema } from "@ecomiq/core";
8
9
  // src/registration.ts
@@ -32,7 +33,8 @@ async function registrationData(registration, next, context, error = null, statu
32
33
  next,
33
34
  storeName: settings.store.name,
34
35
  error,
35
- today: await registrationToday(context)
36
+ today: await registrationToday(context),
37
+ countryCode: settings.store.countryCode
36
38
  }, {
37
39
  status,
38
40
  headers: PRIVATE_HEADERS
@@ -74,6 +76,8 @@ async function submitCustomerRegistration(request, context) {
74
76
  const parsed = CustomerRegistrationInputSchema.safeParse(input);
75
77
  if (!parsed.success) return registrationData(submitted, next, context, "Revisa los datos ingresados y vuelve a intentar.", 400);
76
78
  for (const field of FIELDS) if (registration.fields[field] === "required" && !submitted[field]?.trim()) return registrationData(submitted, next, context, "Completa los datos obligatorios para continuar.", 400);
79
+ const { store: settings } = await client.getSettings();
80
+ if (input.phone && phoneError(input.phone, settings.countryCode) !== null) return registrationData(submitted, next, context, PHONE_ERROR, 400);
77
81
  if (input.dateOfBirth && input.dateOfBirth > await registrationToday(context)) return registrationData(submitted, next, context, "La fecha de nacimiento no puede ser futura.", 400);
78
82
  try {
79
83
  const completed = await client.completeCustomerRegistration(parsed.data, options);
@@ -85,6 +89,7 @@ async function submitCustomerRegistration(request, context) {
85
89
  } catch (error) {
86
90
  let message = "No pudimos guardar tus datos. Intenta de nuevo.";
87
91
  if (error instanceof ApiError && error.status === 400) message = error.message;
92
+ if (error instanceof ApiError && error.code === "Customers.InvalidPhone") message = PHONE_ERROR;
88
93
  return registrationData(submitted, next, context, message, 400);
89
94
  }
90
95
  }
@@ -6,6 +6,7 @@ export type CustomerRegistrationData = {
6
6
  next: string;
7
7
  error: string | null;
8
8
  today: string;
9
+ countryCode: string;
9
10
  };
10
11
  /** The session exists at this stage; profile completion must not guard its own route. */
11
12
  export declare function loadCustomerRegistration(request: Request, context: Readonly<RouterContextProvider>): Promise<Response | ReturnType<typeof data<CustomerRegistrationData>>>;
@@ -1,4 +1,4 @@
1
- import { storefrontText } from "./storefront-text-Co7iUnLM.js";
1
+ import { storefrontText } from "./storefront-text-ClFfYMVk.js";
2
2
  import { z } from "zod";
3
3
  // src/route-text.ts
4
4
  const RootLanguage = z.object({ shop: z.object({ translations: z.record(z.string(), z.string()).default({}) }) });
@@ -1,5 +1,5 @@
1
- import { loadSections, withSections } from "./sections-CgpjubkB.js";
2
- import { worker } from "./worker-cbXmLvfR.js";
1
+ import { loadSections, withSections } from "./sections-BkjGSM28.js";
2
+ import { worker } from "./worker-BxlCSjSF.js";
3
3
  import { data, useLoaderData } from "react-router";
4
4
  import { createElement, useState } from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -1,7 +1,8 @@
1
- import { useStorefrontText } from "../storefront-language-Bnt-TU2F.js";
1
+ import { PhoneField } from "../phone-field-D4io3zeV.js";
2
+ import { useStorefrontText } from "../storefront-language-20hJejSi.js";
2
3
  import { AddressForm } from "../account-forms-AVk71ko7.js";
3
- import { addressDefaults } from "../address-defaults-BqjRhS82.js";
4
- import { placeValue, useGeoCascade } from "../catalog-hooks-DjmpXROv.js";
4
+ import { addressDefaults } from "../address-defaults-Bj8j8noq.js";
5
+ import { placeValue, useGeoCascade } from "../catalog-hooks-Dk_58L_I.js";
5
6
  import { useNavigation } from "react-router";
6
7
  import { useState } from "react";
7
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -64,6 +65,12 @@ function PlaceSelect({ name, label, items, value, disabled, onChange }) {
64
65
  onChange
65
66
  });
66
67
  }
68
+ function PhoneInputBox(props) {
69
+ return /* @__PURE__ */ jsx(Input, {
70
+ ...props,
71
+ className: "min-w-0 flex-1 rounded-s-none"
72
+ });
73
+ }
67
74
  function AddressFields({ countries, defaults, label }) {
68
75
  const storefrontTranslate = useStorefrontText();
69
76
  const geo = useGeoCascade({
@@ -129,6 +136,7 @@ function AddressFields({ countries, defaults, label }) {
129
136
  children: /* @__PURE__ */ jsx(Input, {
130
137
  name: "department",
131
138
  defaultValue: defaults.department ?? "",
139
+ maxLength: 100,
132
140
  required: true
133
141
  })
134
142
  }), /* @__PURE__ */ jsx(Labeled, {
@@ -136,6 +144,7 @@ function AddressFields({ countries, defaults, label }) {
136
144
  children: /* @__PURE__ */ jsx(Input, {
137
145
  name: "district",
138
146
  defaultValue: defaults.district ?? "",
147
+ maxLength: 100,
139
148
  required: true
140
149
  })
141
150
  })] }),
@@ -146,6 +155,7 @@ function AddressFields({ countries, defaults, label }) {
146
155
  name: "line",
147
156
  autoComplete: "street-address",
148
157
  defaultValue: defaults.line ?? "",
158
+ maxLength: 200,
149
159
  required: true
150
160
  })
151
161
  }),
@@ -153,16 +163,17 @@ function AddressFields({ countries, defaults, label }) {
153
163
  label: storefrontTranslate("Referencia (opcional)"),
154
164
  children: /* @__PURE__ */ jsx(Input, {
155
165
  name: "reference",
156
- defaultValue: defaults.reference ?? ""
166
+ defaultValue: defaults.reference ?? "",
167
+ maxLength: 500
157
168
  })
158
169
  }),
159
170
  /* @__PURE__ */ jsx(Labeled, {
160
171
  label: storefrontTranslate("Celular"),
161
- children: /* @__PURE__ */ jsx(Input, {
162
- name: "phone",
163
- type: "tel",
164
- autoComplete: "tel",
165
- defaultValue: defaults.phone ?? ""
172
+ children: /* @__PURE__ */ jsx(PhoneField, {
173
+ countryCode: geo.country,
174
+ initial: defaults.phone ?? "",
175
+ required: true,
176
+ inputComponent: PhoneInputBox
166
177
  })
167
178
  })
168
179
  ]
@@ -1,11 +1,11 @@
1
1
  import { CustomerCsrfField } from "../customer-csrf-C1oDX-Py.js";
2
2
  import { money } from "../money-DtGOtDri.js";
3
- import { orderProgress } from "../order-status-QsmEO-89.js";
4
- import { useStorefrontLocale, useStorefrontText } from "../storefront-language-Bnt-TU2F.js";
5
- import { PayButton, PaymentPreview, ReorderButton, useOrderStepDetail } from "../order-display-CUXVESaF.js";
3
+ import { orderProgress } from "../order-status-C61ywW-E.js";
4
+ import { useStorefrontLocale, useStorefrontText } from "../storefront-language-20hJejSi.js";
5
+ import { PayButton, PaymentPreview, ReorderButton, useOrderStepDetail } from "../order-display-CK-5wCsa.js";
6
6
  import { orderStepLabel, orderStepOf, paymentStatusLabel } from "../order-view-9IlBg5AF.js";
7
7
  import { orderSummaryLines } from "../cart-summary-B6vtRGBO.js";
8
- import { ItemPersonalization } from "../personalization-fields-CwBR8oGr.js";
8
+ import { ItemPersonalization } from "../personalization-fields-BtNqpVpB.js";
9
9
  import { Form, Link, useNavigation } from "react-router";
10
10
  import { formatOrderDate, lineUnitPrice } from "@ecomiq/core";
11
11
  import { useEffect, useState } from "react";
@@ -1,8 +1,8 @@
1
1
  import { money } from "../money-DtGOtDri.js";
2
- import { useStorefrontLocale, useStorefrontText } from "../storefront-language-Bnt-TU2F.js";
3
- import { PayButton, PaymentPreview, ReorderButton, useOrderHeadline, useOrderStepDetail } from "../order-display-CUXVESaF.js";
2
+ import { useStorefrontLocale, useStorefrontText } from "../storefront-language-20hJejSi.js";
3
+ import { PayButton, PaymentPreview, ReorderButton, useOrderHeadline, useOrderStepDetail } from "../order-display-CK-5wCsa.js";
4
4
  import { mainPayment, orderStepLabel, orderStepOf } from "../order-view-9IlBg5AF.js";
5
- import { orderFiltersQuery } from "../account-CZZ-ku6L.js";
5
+ import { orderFiltersQuery } from "../account-DMM0ZZYb.js";
6
6
  import { useOrderPages } from "../order-pages-Dm6l5m0m.js";
7
7
  import { Form, Link, useLocation, useNavigate } from "react-router";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";