@vtex/faststore 0.0.8 → 0.0.11
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/CHANGELOG.md +101 -0
- package/README.md +0 -1
- package/dist/actions.json +48 -1
- package/dist/catalog.json +1397 -1594
- package/dist/cli/index.d.ts +66 -28
- package/dist/cli/index.js +7371 -512
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/server-runtime.js +41 -60
- package/dist/cli/server-runtime.js.map +1 -1
- package/dist/client.d.ts +3 -3
- package/dist/client.js +2 -2
- package/dist/components.d.ts +67 -56
- package/dist/components.js +64 -53
- package/dist/content-types.json +5886 -555
- package/dist/core/dist/define-component.d.ts +7 -2
- package/dist/core/dist/define-content-type.d.ts +50 -2
- package/dist/core/dist/define-content-type.js +107 -3
- package/dist/core/dist/define-content-type.js.map +1 -1
- package/dist/core/dist/index.d.ts +2 -2
- package/dist/docs/access-code-field.md +1 -1
- package/dist/docs/access-code-sign-in.md +126 -77
- package/dist/docs/account-address-book.md +210 -95
- package/dist/docs/account-entry-point.md +4 -4
- package/dist/docs/account-menu.md +16 -17
- package/dist/docs/account-saved-cards.md +306 -0
- package/dist/docs/alert-dialog.md +3 -1
- package/dist/docs/avatar.md +4 -2
- package/dist/docs/billing-address.md +99 -30
- package/dist/docs/binding-switcher.md +157 -0
- package/dist/docs/buy-button.md +7 -8
- package/dist/docs/card-entry.md +42 -29
- package/dist/docs/card-summary.md +185 -0
- package/dist/docs/cardholder-document.md +5 -3
- package/dist/docs/carousel.md +5 -4
- package/dist/docs/cart-destination.md +251 -0
- package/dist/docs/cart-item.md +48 -15
- package/dist/docs/cart-totalizer.md +8 -6
- package/dist/docs/cart.md +240 -39
- package/dist/docs/challenge-return.md +135 -0
- package/dist/docs/client-preferences-fieldset.md +10 -5
- package/dist/docs/client-preferences.md +31 -8
- package/dist/docs/client-profile-fieldset.md +20 -6
- package/dist/docs/client-profile.md +12 -3
- package/dist/docs/copy-text.md +9 -7
- package/dist/docs/document-field.md +1 -1
- package/dist/docs/email-field.md +2 -1
- package/dist/docs/email-identification.md +12 -2
- package/dist/docs/footer-copyright.md +4 -2
- package/dist/docs/footer-social.md +1 -1
- package/dist/docs/form.md +54 -18
- package/dist/docs/free-shipping-progress.md +18 -13
- package/dist/docs/identity-edit.md +8 -2
- package/dist/docs/identity-summary.md +18 -5
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/installments.md +46 -32
- package/dist/docs/logo.md +1 -1
- package/dist/docs/my-account-profile.md +16 -11
- package/dist/docs/navigation-link.md +5 -3
- package/dist/docs/order-cancel.md +3 -1
- package/dist/docs/order-delivery-address.md +7 -5
- package/dist/docs/order-delivery-group.md +1 -3
- package/dist/docs/order-details-back.md +1 -1
- package/dist/docs/order-details-header.md +1 -4
- package/dist/docs/order-invoice-download.md +60 -0
- package/dist/docs/order-list-row.md +1 -1
- package/dist/docs/order-list-search.md +13 -20
- package/dist/docs/order-list-views.md +11 -17
- package/dist/docs/order-list.md +12 -5
- package/dist/docs/order-payment.md +9 -7
- package/dist/docs/order-placed-date.md +1 -1
- package/dist/docs/order-placed-payment-summary.md +28 -15
- package/dist/docs/order-placed.md +49 -14
- package/dist/docs/order-progress.md +1 -1
- package/dist/docs/order-status-badge.md +20 -9
- package/dist/docs/order-summary.md +2 -2
- package/dist/docs/order-tracking-link.md +58 -0
- package/dist/docs/payment-method-badges.md +32 -6
- package/dist/docs/payment-methods.md +2 -2
- package/dist/docs/payment.md +36 -17
- package/dist/docs/phone-field.md +4 -4
- package/dist/docs/place-order.md +84 -36
- package/dist/docs/postal-code-field.md +3 -1
- package/dist/docs/pricing.md +21 -23
- package/dist/docs/product-gallery.md +19 -20
- package/dist/docs/product-information.md +14 -10
- package/dist/docs/product-list.md +7 -6
- package/dist/docs/product-shelf.md +7 -1
- package/dist/docs/promotion.md +4 -2
- package/dist/docs/region.md +23 -15
- package/dist/docs/save-card.md +7 -6
- package/dist/docs/saved-cards.md +65 -36
- package/dist/docs/select.md +3 -4
- package/dist/docs/shipping-address.md +57 -21
- package/dist/docs/shipping-simulator.md +53 -15
- package/dist/docs/sign-in-disclosure.md +176 -0
- package/dist/docs/sign-in-form.md +78 -47
- package/dist/docs/sign-in-redirect.md +5 -3
- package/dist/docs/sign-in.md +173 -0
- package/dist/docs/toast.md +45 -16
- package/dist/docs/variant-selector.md +15 -11
- package/dist/graphql/types.d.ts +4 -14
- package/dist/index.d.ts +3 -2
- package/dist/internal/client.d.ts +4 -3
- package/dist/internal/client.js +5 -2
- package/dist/internal/server.d.ts +10 -5
- package/dist/internal/server.js +9 -4
- package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +250 -66
- package/dist/matter/access-code-sign-in/access-code-sign-in.js +459 -188
- package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-delete.d.ts +78 -40
- package/dist/matter/account-address-book/account-address-book-delete.js +86 -50
- package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +21 -4
- package/dist/matter/account-address-book/account-address-book-deliverability.js +45 -17
- package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +74 -19
- package/dist/matter/account-address-book/account-address-book-form-parts.js +77 -26
- package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +27 -6
- package/dist/matter/account-address-book/account-address-book-profile-notice.js +55 -28
- package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book.d.ts +67 -14
- package/dist/matter/account-address-book/account-address-book.js +74 -33
- package/dist/matter/account-address-book/account-address-book.js.map +1 -1
- package/dist/matter/account-address-book/account-address-country-switch.js +3 -3
- package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -1
- package/dist/matter/account-address-book/account-address-country.d.ts +66 -20
- package/dist/matter/account-address-book/account-address-country.js +83 -49
- package/dist/matter/account-address-book/account-address-country.js.map +1 -1
- package/dist/matter/account-address-book/account-address-form-context.d.ts +8 -4
- package/dist/matter/account-address-book/account-address-form-context.js.map +1 -1
- package/dist/matter/account-address-book/account-address-form.d.ts +468 -45
- package/dist/matter/account-address-book/account-address-form.js +518 -155
- package/dist/matter/account-address-book/account-address-form.js.map +1 -1
- package/dist/matter/account-address-book/account-address-record.d.ts +27 -6
- package/dist/matter/account-address-book/account-address-record.js +32 -17
- package/dist/matter/account-address-book/account-address-record.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +34 -17
- package/dist/matter/account-menu/account-menu.js +46 -54
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-menu-identity/account-menu-identity.js +1 -1
- package/dist/matter/account-saved-cards/account-saved-cards.d.ts +463 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js +1011 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
- package/dist/matter/billing-address/billing-address.d.ts +156 -74
- package/dist/matter/billing-address/billing-address.js +227 -156
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/breadcrumb/breadcrumb.d.ts +21 -3
- package/dist/matter/breadcrumb/breadcrumb.js +24 -9
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/matter/buy-button/buy-button.d.ts +8 -11
- package/dist/matter/buy-button/buy-button.js +10 -19
- package/dist/matter/buy-button/buy-button.js.map +1 -1
- package/dist/matter/card-entry/card-capture.js +12 -4
- package/dist/matter/card-entry/card-capture.js.map +1 -1
- package/dist/matter/card-entry/card-entry.d.ts +123 -32
- package/dist/matter/card-entry/card-entry.js +348 -221
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cart/cart-namespace.d.ts +11 -1
- package/dist/matter/cart/cart-namespace.js +11 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +416 -45
- package/dist/matter/cart/cart.js +782 -101
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +233 -0
- package/dist/matter/cart-destination/cart-destination.js +703 -0
- package/dist/matter/cart-destination/cart-destination.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +145 -16
- package/dist/matter/cart-item/cart-item.js +230 -54
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/cart-item-compositions/cart-item-compositions.js +1 -1
- package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -1
- package/dist/matter/cart-item-customizations/cart-item-customizations.js +1 -1
- package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -1
- package/dist/matter/cart-item-discounts/cart-item-discounts.js +1 -1
- package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -1
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +1 -1
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -1
- package/dist/matter/cart-item-variations/cart-item-variations.js +1 -1
- package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -1
- package/dist/matter/cart-totalizer/cart-totalizer.d.ts +43 -9
- package/dist/matter/cart-totalizer/cart-totalizer.js +49 -19
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
- package/dist/matter/challenge-return/challenge-return.d.ts +62 -0
- package/dist/matter/challenge-return/challenge-return.js +241 -0
- package/dist/matter/challenge-return/challenge-return.js.map +1 -0
- package/dist/matter/client-preferences/client-preferences-fieldset.d.ts +86 -17
- package/dist/matter/client-preferences/client-preferences-fieldset.js +126 -54
- package/dist/matter/client-preferences/client-preferences-fieldset.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences.d.ts +50 -7
- package/dist/matter/client-preferences/client-preferences.js +84 -15
- package/dist/matter/client-preferences/client-preferences.js.map +1 -1
- package/dist/matter/client-profile/client-profile.d.ts +44 -9
- package/dist/matter/client-profile/client-profile.js +64 -24
- package/dist/matter/client-profile/client-profile.js.map +1 -1
- package/dist/matter/client-profile-form/client-profile-fieldset.d.ts +119 -22
- package/dist/matter/client-profile-form/client-profile-fieldset.js +161 -73
- package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
- package/dist/matter/delivery-options/delivery-options-accordion.d.ts +49 -4
- package/dist/matter/delivery-options/delivery-options-accordion.js +67 -14
- package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -1
- package/dist/matter/delivery-options/delivery-options-controller.d.ts +69 -9
- package/dist/matter/delivery-options/delivery-options-controller.js +80 -14
- package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -1
- package/dist/matter/delivery-options/delivery-options.d.ts +37 -2
- package/dist/matter/delivery-options/delivery-options.js +75 -12
- package/dist/matter/delivery-options/delivery-options.js.map +1 -1
- package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +1 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js +1 -1
- package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -1
- package/dist/matter/email-identification/email-identification.d.ts +25 -3
- package/dist/matter/email-identification/email-identification.js +49 -12
- package/dist/matter/email-identification/email-identification.js.map +1 -1
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +85 -10
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +153 -53
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
- package/dist/matter/identity-edit/identity-edit.d.ts +52 -10
- package/dist/matter/identity-edit/identity-edit.js +47 -19
- package/dist/matter/identity-edit/identity-edit.js.map +1 -1
- package/dist/matter/identity-summary/identity-summary.d.ts +76 -22
- package/dist/matter/identity-summary/identity-summary.js +95 -45
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/installments/installments-select.d.ts +98 -16
- package/dist/matter/installments/installments-select.js +156 -48
- package/dist/matter/installments/installments-select.js.map +1 -1
- package/dist/matter/installments/installments.d.ts +96 -16
- package/dist/matter/installments/installments.js +115 -40
- package/dist/matter/installments/installments.js.map +1 -1
- package/dist/matter/installments/use-installments-selection.d.ts +1 -0
- package/dist/matter/installments/use-installments-selection.js +8 -3
- package/dist/matter/installments/use-installments-selection.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +358 -103
- package/dist/matter/my-account-profile/my-account-profile.js +370 -174
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/order-cancel/order-cancel.d.ts +65 -19
- package/dist/matter/order-cancel/order-cancel.js +118 -51
- package/dist/matter/order-cancel/order-cancel.js.map +1 -1
- package/dist/matter/order-delivery-address/order-delivery-address.d.ts +8 -18
- package/dist/matter/order-delivery-address/order-delivery-address.js +14 -23
- package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -1
- package/dist/matter/order-delivery-group/order-delivery-group.d.ts +40 -24
- package/dist/matter/order-delivery-group/order-delivery-group.js +64 -74
- package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -1
- package/dist/matter/order-details-header/order-details-header.d.ts +32 -15
- package/dist/matter/order-details-header/order-details-header.js +66 -58
- package/dist/matter/order-details-header/order-details-header.js.map +1 -1
- package/dist/matter/order-invoice-download/order-invoice-download.d.ts +78 -0
- package/dist/matter/order-invoice-download/order-invoice-download.js +173 -0
- package/dist/matter/order-invoice-download/order-invoice-download.js.map +1 -0
- package/dist/matter/order-list/order-list.d.ts +164 -19
- package/dist/matter/order-list/order-list.js +229 -87
- package/dist/matter/order-list/order-list.js.map +1 -1
- package/dist/matter/order-list-row/order-list-row.d.ts +6 -1
- package/dist/matter/order-list-row/order-list-row.js +3 -2
- package/dist/matter/order-list-row/order-list-row.js.map +1 -1
- package/dist/matter/order-list-search/order-list-search.d.ts +18 -26
- package/dist/matter/order-list-search/order-list-search.js +30 -69
- package/dist/matter/order-list-search/order-list-search.js.map +1 -1
- package/dist/matter/order-list-views/order-list-views.d.ts +15 -22
- package/dist/matter/order-list-views/order-list-views.js +22 -68
- package/dist/matter/order-list-views/order-list-views.js.map +1 -1
- package/dist/matter/order-payment/order-payment.d.ts +33 -10
- package/dist/matter/order-payment/order-payment.js +44 -39
- package/dist/matter/order-payment/order-payment.js.map +1 -1
- package/dist/matter/order-placed/order-placed-deliveries.d.ts +144 -12
- package/dist/matter/order-placed/order-placed-deliveries.js +115 -40
- package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -1
- package/dist/matter/order-placed/order-placed.d.ts +198 -31
- package/dist/matter/order-placed/order-placed.js +230 -139
- package/dist/matter/order-placed/order-placed.js.map +1 -1
- package/dist/matter/order-placed-date/order-placed-date.d.ts +5 -8
- package/dist/matter/order-placed-date/order-placed-date.js +7 -8
- package/dist/matter/order-placed-date/order-placed-date.js.map +1 -1
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +90 -17
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +93 -117
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
- package/dist/matter/order-progress/order-progress.d.ts +19 -8
- package/dist/matter/order-progress/order-progress.js +37 -45
- package/dist/matter/order-progress/order-progress.js.map +1 -1
- package/dist/matter/order-summary/order-summary.d.ts +19 -9
- package/dist/matter/order-summary/order-summary.js +38 -44
- package/dist/matter/order-summary/order-summary.js.map +1 -1
- package/dist/matter/order-tracking-link/order-tracking-link.d.ts +43 -0
- package/dist/matter/order-tracking-link/order-tracking-link.js +107 -0
- package/dist/matter/order-tracking-link/order-tracking-link.js.map +1 -0
- package/dist/matter/payment/payment-card-capture.js +17 -10
- package/dist/matter/payment/payment-card-capture.js.map +1 -1
- package/dist/matter/payment/payment-controller.d.ts +4 -2
- package/dist/matter/payment/payment-controller.js +30 -9
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment-method-badges.js +1 -1
- package/dist/matter/payment/payment.d.ts +69 -19
- package/dist/matter/payment/payment.js +101 -35
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/payment/use-payment-method-selection.d.ts +25 -4
- package/dist/matter/payment/use-payment-method-selection.js +94 -32
- package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
- package/dist/matter/payment/use-payment-submit-gate.d.ts +14 -3
- package/dist/matter/payment/use-payment-submit-gate.js +47 -8
- package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
- package/dist/matter/place-order/place-order.d.ts +171 -57
- package/dist/matter/place-order/place-order.js +376 -185
- package/dist/matter/place-order/place-order.js.map +1 -1
- package/dist/matter/pricing/pricing.d.ts +152 -13
- package/dist/matter/pricing/pricing.js +153 -52
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/product-information/product-information.d.ts +27 -4
- package/dist/matter/product-information/product-information.js +32 -15
- package/dist/matter/product-information/product-information.js.map +1 -1
- package/dist/matter/product-list/product-list.d.ts +24 -6
- package/dist/matter/product-list/product-list.js +32 -26
- package/dist/matter/product-list/product-list.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +8 -3
- package/dist/matter/product-shelf/product-shelf.js +111 -10
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- package/dist/matter/region/region.d.ts +33 -16
- package/dist/matter/region/region.js +59 -52
- package/dist/matter/region/region.js.map +1 -1
- package/dist/matter/save-card/save-card.d.ts +43 -8
- package/dist/matter/save-card/save-card.js +61 -23
- package/dist/matter/save-card/save-card.js.map +1 -1
- package/dist/matter/saved-cards/saved-cards.d.ts +113 -21
- package/dist/matter/saved-cards/saved-cards.js +349 -77
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/shipping-address/address-payload.js +25 -0
- package/dist/matter/shipping-address/address-payload.js.map +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +71 -71
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
- package/dist/matter/shipping-address/library-country-descriptors.js +136 -0
- package/dist/matter/shipping-address/library-country-descriptors.js.map +1 -0
- package/dist/matter/shipping-address/shipping-address.d.ts +312 -45
- package/dist/matter/shipping-address/shipping-address.js +443 -188
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +251 -25
- package/dist/matter/shipping-simulator/shipping-simulator.js +261 -51
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/matter/sign-in/sign-in.d.ts +108 -0
- package/dist/matter/sign-in/sign-in.js +285 -0
- package/dist/matter/sign-in/sign-in.js.map +1 -0
- package/dist/matter/sign-in-disclosure/sign-in-disclosure.d.ts +81 -0
- package/dist/matter/sign-in-disclosure/sign-in-disclosure.js +232 -0
- package/dist/matter/sign-in-disclosure/sign-in-disclosure.js.map +1 -0
- package/dist/matter/sign-in-form/sign-in-form.d.ts +93 -62
- package/dist/matter/sign-in-form/sign-in-form.js +134 -144
- package/dist/matter/sign-in-form/sign-in-form.js.map +1 -1
- package/dist/particles/binding-switcher/binding-switcher.d.ts +59 -0
- package/dist/particles/binding-switcher/binding-switcher.js +194 -0
- package/dist/particles/binding-switcher/binding-switcher.js.map +1 -0
- package/dist/particles/card-summary/card-network.d.ts +17 -0
- package/dist/particles/card-summary/card-network.js +25 -0
- package/dist/particles/card-summary/card-network.js.map +1 -0
- package/dist/particles/card-summary/card-summary.d.ts +113 -0
- package/dist/particles/card-summary/card-summary.js +221 -0
- package/dist/particles/card-summary/card-summary.js.map +1 -0
- package/dist/particles/carousel/carousel.d.ts +99 -11
- package/dist/particles/carousel/carousel.js +103 -35
- package/dist/particles/carousel/carousel.js.map +1 -1
- package/dist/particles/copy-text/copy-text.js +5 -15
- package/dist/particles/copy-text/copy-text.js.map +1 -1
- package/dist/particles/dialog/dialog.d.ts +14 -6
- package/dist/particles/dialog/dialog.js +6 -3
- package/dist/particles/dialog/dialog.js.map +1 -1
- package/dist/particles/drawer/drawer.js +1 -1
- package/dist/particles/drawer/drawer.js.map +1 -1
- package/dist/particles/email-field/email-field.d.ts +2 -1
- package/dist/particles/email-field/email-field.js +2 -1
- package/dist/particles/email-field/email-field.js.map +1 -1
- package/dist/particles/footer-link-group/footer-link-group.js +1 -0
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
- package/dist/particles/footer-social/footer-social.d.ts +1 -1
- package/dist/particles/footer-social/footer-social.js +1 -1
- package/dist/particles/footer-social/footer-social.js.map +1 -1
- package/dist/particles/form/form.d.ts +85 -13
- package/dist/particles/form/form.js +91 -42
- package/dist/particles/form/form.js.map +1 -1
- package/dist/particles/gallery/gallery.d.ts +129 -12
- package/dist/particles/gallery/gallery.js +121 -34
- package/dist/particles/gallery/gallery.js.map +1 -1
- package/dist/particles/incentives/incentives.d.ts +1 -1
- package/dist/particles/incentives/incentives.js +1 -1
- package/dist/particles/incentives/incentives.js.map +1 -1
- package/dist/particles/order-details-back/order-details-back.d.ts +5 -3
- package/dist/particles/order-details-back/order-details-back.js +8 -10
- package/dist/particles/order-details-back/order-details-back.js.map +1 -1
- package/dist/particles/order-status-badge/order-status-badge.d.ts +3 -3
- package/dist/particles/order-status-badge/order-status-badge.js +4 -20
- package/dist/particles/order-status-badge/order-status-badge.js.map +1 -1
- package/dist/particles/password-field/password-field.d.ts +1 -1
- package/dist/particles/password-field/password-field.js +2 -4
- package/dist/particles/password-field/password-field.js.map +1 -1
- package/dist/particles/payment-methods/payment-methods.d.ts +1 -1
- package/dist/particles/payment-methods/payment-methods.js +1 -1
- package/dist/particles/payment-methods/payment-methods.js.map +1 -1
- package/dist/particles/phone-field/phone-field.d.ts +4 -4
- package/dist/particles/phone-field/phone-field.js +8 -11
- package/dist/particles/phone-field/phone-field.js.map +1 -1
- package/dist/particles/spinner/spinner.d.ts +24 -4
- package/dist/particles/spinner/spinner.js +25 -9
- package/dist/particles/spinner/spinner.js.map +1 -1
- package/dist/particles/switch/switch.d.ts +4 -1
- package/dist/particles/switch/switch.js +3 -1
- package/dist/particles/switch/switch.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +49 -9
- package/dist/particles/toast/toast.js +81 -15
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +461 -89
- package/dist/sdk/actions/index.d.ts +3 -1
- package/dist/sdk/actions/index.js +3 -1
- package/dist/sdk/actions/locale-action-provider.d.ts +16 -0
- package/dist/sdk/actions/locale-action-provider.js +20 -0
- package/dist/sdk/actions/locale-action-provider.js.map +1 -0
- package/dist/sdk/actions/saved-card-action-provider.d.ts +12 -0
- package/dist/sdk/actions/saved-card-action-provider.js +16 -0
- package/dist/sdk/actions/saved-card-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +6 -2
- package/dist/sdk/address/address-fields.js +4 -4
- package/dist/sdk/address/address-fields.js.map +1 -1
- package/dist/sdk/address/constants.js +1 -6
- package/dist/sdk/address/constants.js.map +1 -1
- package/dist/sdk/address/messages.js +44 -44
- package/dist/sdk/address/messages.js.map +1 -1
- package/dist/sdk/address/postal-code.js +15 -2
- package/dist/sdk/address/postal-code.js.map +1 -1
- package/dist/sdk/address/types.d.ts +5 -3
- package/dist/sdk/address/validate-address.js +3 -3
- package/dist/sdk/address/validate-address.js.map +1 -1
- package/dist/sdk/analytics/use-analytics-actions.d.ts +1 -1
- package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
- package/dist/sdk/cache/storefront-cache.js +2 -1
- package/dist/sdk/cache/storefront-cache.js.map +1 -1
- package/dist/sdk/cart/operations.d.ts +2 -1
- package/dist/sdk/cart/operations.js +55 -1
- package/dist/sdk/cart/operations.js.map +1 -1
- package/dist/sdk/cart/optimistic.d.ts +30 -7
- package/dist/sdk/cart/optimistic.js +78 -41
- package/dist/sdk/cart/optimistic.js.map +1 -1
- package/dist/sdk/cart/use-cart-actions.d.ts +7 -0
- package/dist/sdk/cart/use-cart-actions.js +61 -15
- package/dist/sdk/cart/use-cart-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-sync-sales-channel.js +70 -0
- package/dist/sdk/cart/use-cart-sync-sales-channel.js.map +1 -0
- package/dist/sdk/data/index.js +2 -2
- package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
- package/dist/sdk/generated/gql.js +16 -12
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +197 -51
- package/dist/sdk/generated/graphql.js +2318 -91
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/format-error-code.js +23 -0
- package/dist/sdk/i18n/format-error-code.js.map +1 -0
- package/dist/sdk/i18n/message-formatter.d.ts +22 -0
- package/dist/sdk/i18n/message-formatter.js +140 -0
- package/dist/sdk/i18n/message-formatter.js.map +1 -0
- package/dist/sdk/i18n/use-message-formatter.d.ts +8 -0
- package/dist/sdk/i18n/use-message-formatter.js +18 -0
- package/dist/sdk/i18n/use-message-formatter.js.map +1 -0
- package/dist/sdk/identity/use-identity-actions.js.map +1 -1
- package/dist/sdk/locale/binding-switch-provider.d.ts +13 -0
- package/dist/sdk/locale/binding-switch-provider.js +20 -0
- package/dist/sdk/locale/binding-switch-provider.js.map +1 -0
- package/dist/sdk/locale/use-locale-actions.d.ts +16 -0
- package/dist/sdk/locale/use-locale-actions.js +70 -0
- package/dist/sdk/locale/use-locale-actions.js.map +1 -0
- package/dist/sdk/navigation/binding-switch.d.ts +39 -0
- package/dist/sdk/navigation/binding-switch.js +129 -0
- package/dist/sdk/navigation/binding-switch.js.map +1 -0
- package/dist/sdk/navigation/decode-route-params.d.ts +11 -0
- package/dist/sdk/navigation/decode-route-params.js +32 -0
- package/dist/sdk/navigation/decode-route-params.js.map +1 -0
- package/dist/sdk/navigation/redirect.d.ts +2 -0
- package/dist/sdk/navigation/redirect.js +19 -1
- package/dist/sdk/navigation/redirect.js.map +1 -1
- package/dist/sdk/navigation/types.d.ts +13 -0
- package/dist/sdk/payment/bin-format.js +20 -0
- package/dist/sdk/payment/bin-format.js.map +1 -0
- package/dist/sdk/payment/challenge-return.js +37 -0
- package/dist/sdk/payment/challenge-return.js.map +1 -0
- package/dist/sdk/payment/confirmation-last-four.js +39 -0
- package/dist/sdk/payment/confirmation-last-four.js.map +1 -0
- package/dist/sdk/payment/gateway.d.ts +1 -1
- package/dist/sdk/payment/gateway.js +8 -2
- package/dist/sdk/payment/gateway.js.map +1 -1
- package/dist/sdk/payment/operations.d.ts +1 -0
- package/dist/sdk/payment/operations.js +28 -6
- package/dist/sdk/payment/operations.js.map +1 -1
- package/dist/sdk/payment/resumed-purchase.d.ts +1 -0
- package/dist/sdk/payment/resumed-purchase.js +119 -0
- package/dist/sdk/payment/resumed-purchase.js.map +1 -0
- package/dist/sdk/payment/security-code-mask.js +16 -23
- package/dist/sdk/payment/security-code-mask.js.map +1 -1
- package/dist/sdk/payment/submission-registry.js +6 -2
- package/dist/sdk/payment/submission-registry.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.d.ts +18 -3
- package/dist/sdk/payment/use-payment-actions.js +23 -3
- package/dist/sdk/payment/use-payment-actions.js.map +1 -1
- package/dist/sdk/payment/use-place-order.d.ts +10 -2
- package/dist/sdk/payment/use-place-order.js +138 -76
- package/dist/sdk/payment/use-place-order.js.map +1 -1
- package/dist/sdk/provider/storefront-provider.d.ts +1 -7
- package/dist/sdk/provider/storefront-provider.js +4 -11
- package/dist/sdk/provider/storefront-provider.js.map +1 -1
- package/dist/sdk/saved-cards/operations.d.ts +16 -0
- package/dist/sdk/saved-cards/operations.js +41 -0
- package/dist/sdk/saved-cards/operations.js.map +1 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.d.ts +26 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js +86 -0
- package/dist/sdk/saved-cards/use-saved-card-actions.js.map +1 -0
- package/dist/sdk/seo/entity-landing.d.ts +24 -0
- package/dist/sdk/seo/entity-landing.js +30 -0
- package/dist/sdk/seo/entity-landing.js.map +1 -0
- package/dist/sdk/seo/page-alternates.d.ts +8 -5
- package/dist/sdk/seo/page-alternates.js +11 -14
- package/dist/sdk/seo/page-alternates.js.map +1 -1
- package/dist/sdk/seo/search-landing.d.ts +42 -0
- package/dist/sdk/seo/search-landing.js +85 -0
- package/dist/sdk/seo/search-landing.js.map +1 -0
- package/dist/sdk/session/mock-session.d.ts +9 -0
- package/dist/sdk/session/mock-session.js +31 -0
- package/dist/sdk/session/mock-session.js.map +1 -0
- package/dist/sdk/session/read-server-session.d.ts +3 -0
- package/dist/sdk/session/read-server-session.js +5 -0
- package/dist/sdk/session/read-server-session.js.map +1 -1
- package/dist/sdk/session/return-path-segment.d.ts +10 -0
- package/dist/sdk/session/return-path-segment.js +15 -0
- package/dist/sdk/session/return-path-segment.js.map +1 -0
- package/dist/sdk/session/use-session-actions.js.map +1 -1
- package/dist/sdk/shipping/shipping-operations.d.ts +1 -1
- package/dist/sdk/shipping/shipping-operations.js +13 -0
- package/dist/sdk/shipping/shipping-operations.js.map +1 -1
- package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -1
- package/dist/sdk/state/cart.d.ts +9 -2
- package/dist/sdk/state/cart.js +9 -2
- package/dist/sdk/state/cart.js.map +1 -1
- package/dist/utils/safe-href.d.ts +2 -0
- package/package.json +4 -3
- package/skills/storefront-asset/SKILL.md +2 -2
- package/skills/storefront-asset/references/api-side.md +27 -14
- package/skills/storefront-asset/references/findings.md +5 -2
- package/src/styles/tailwind.css +9 -2
- package/dist/matter/shipping-address/country-descriptors.d.ts +0 -1
- package/dist/message-locales.json +0 -7
- package/dist/sdk/i18n/client.d.ts +0 -4
- package/dist/sdk/i18n/client.js +0 -4
- package/dist/sdk/i18n/locales.d.ts +0 -8
- package/dist/sdk/i18n/locales.js +0 -57
- package/dist/sdk/i18n/locales.js.map +0 -1
- package/dist/sdk/i18n/messages/en-US.js +0 -164
- package/dist/sdk/i18n/messages/en-US.js.map +0 -1
- package/dist/sdk/i18n/messages/en-US.json +0 -159
- package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -163
- package/dist/sdk/i18n/messages/es-ES.js +0 -164
- package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
- package/dist/sdk/i18n/messages/es-ES.json +0 -159
- package/dist/sdk/i18n/messages/pt-BR.js +0 -164
- package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
- package/dist/sdk/i18n/messages/pt-BR.json +0 -159
- package/dist/sdk/i18n/provider.d.ts +0 -1
- package/dist/sdk/i18n/provider.js +0 -30
- package/dist/sdk/i18n/provider.js.map +0 -1
- package/dist/sdk/i18n/server.d.ts +0 -28
- package/dist/sdk/i18n/server.js +0 -59
- package/dist/sdk/i18n/server.js.map +0 -1
- package/dist/utils/resolve-authored-copy.js +0 -18
- package/dist/utils/resolve-authored-copy.js.map +0 -1
- package/dist/utils/substitute-template.js +0 -33
- package/dist/utils/substitute-template.js.map +0 -1
|
@@ -30,7 +30,7 @@ Use `AccountAddressBook` and `AccountAddressForm` (not `ShippingAddress` or `Bil
|
|
|
30
30
|
## When NOT to use
|
|
31
31
|
|
|
32
32
|
- Changing the country of a saved address — an edit keeps its country.
|
|
33
|
-
- Giving an address a name of its own — a saved address has no name field. The SDK's field model (`AccountFieldName
|
|
33
|
+
- Giving an address a name of its own — a saved address has no name field. The SDK's field model (`AccountFieldName`) still lists `name`, so adding it later does not change the model, but no component renders or saves it.
|
|
34
34
|
- The address a shopper picks or types during checkout — use `ShippingAddress` / `BillingAddress`.
|
|
35
35
|
- A single address summary with no saved list behind it — compose `AddressSummary` directly.
|
|
36
36
|
- The signed-out prompt — compose `SignInForm` next to a `SessionGuard`. The root renders nothing for a shopper who is not logged in.
|
|
@@ -60,7 +60,7 @@ SessionRoot (required ancestor; must resolve t
|
|
|
60
60
|
├── AccountAddressBookDeleteConfirm (optional; the one alert dialog every delete trigger opens)
|
|
61
61
|
├── AccountAddressBookAddTrigger (optional; opens the form in add mode; shown in every state)
|
|
62
62
|
└── AccountAddressBookFormSlot (or AccountAddressBookFormDialog; shows the form while one is open)
|
|
63
|
-
└── AccountAddressFormRoot (the form;
|
|
63
|
+
└── AccountAddressFormRoot (the form; renders only its children, composed in this order)
|
|
64
64
|
├── AddressCountryControl (own data; the country list, or the country as text)
|
|
65
65
|
├── AccountAddressCountryNotice (what a country change left behind)
|
|
66
66
|
├── AccountAddressFormRecipientName
|
|
@@ -88,7 +88,7 @@ The form opens where you place it. `AccountAddressBookFormSlot` shows it in plac
|
|
|
88
88
|
|
|
89
89
|
Deleting needs two parts: an `AccountAddressBookDeleteTrigger` inside each entry, and one `AccountAddressBookDeleteConfirm` under the root. The confirmation is an alert dialog, so wherever you place it, it shows over the page.
|
|
90
90
|
|
|
91
|
-
To let the shopper choose the country of a new address, compose `AddressCountryControl` explicitly under `AccountAddressFormRoot`, with `AccountAddressCountryNotice` right after it. The control reads where the store ships through its own fragment, and that fragment joins the page query only when the control is in the schema.
|
|
91
|
+
To let the shopper choose the country of a new address, compose `AddressCountryControl` explicitly under `AccountAddressFormRoot`, with `AccountAddressCountryNotice` right after it. The control reads where the store ships through its own fragment, and that fragment joins the page query only when the control is in the schema.
|
|
92
92
|
|
|
93
93
|
---
|
|
94
94
|
|
|
@@ -112,7 +112,7 @@ To let the shopper choose the country of a new address, compose `AddressCountryC
|
|
|
112
112
|
- **The notice says what stayed behind.** After a change, `AccountAddressCountryNotice` names the fields the new country left out, with the labels the old country showed, and says they come back on switching back. It is a polite live region that stays mounted, and it is empty when the change carried everything. It changes only with the next country change, never on typing or a blocked save.
|
|
113
113
|
- **The whole address is checked on every save.** The server checks the whole record, so an untouched gap in a saved address blocks the save too. A saved address with gaps shows them when the form opens, without moving focus.
|
|
114
114
|
- **A blocked save names the fields.** The form marks each field in error, moves focus to the first one in form order, keeps what was typed, and announces "Address not saved" and how many fields need attention through a polite status region that stays mounted.
|
|
115
|
-
- **The server's refusal lands on the field it names.** Its message is never shown; the field shows
|
|
115
|
+
- **The server's refusal lands on the field it names.** Its message is never shown; the field shows its part's `requiredError` or `invalidError` message for the code. A refusal that names a field the form does not show, no field at all, or a country, shows an error about the whole form, so a save never fails silently. Each of `NOT_FOUND`, `UNAUTHORIZED`, `UNSUPPORTED_COUNTRY` (the store does not deliver to the country), and the rest has its own message.
|
|
116
116
|
- **What is sent.** An add sends the country and every field on screen that has text; the values kept for another country are never sent. An edit sends the address id and only the fields that changed; a field the shopper cleared goes as an empty string, which erases it. An edit with no change closes without a call. A second submit while one is in flight does nothing.
|
|
117
117
|
- **Only Save submits.** Enter in a text field does not save, so a shopper who presses it mid-address is not sent a half-typed one. Enter on the Save button still saves.
|
|
118
118
|
- **On success.** A toast confirms, the form closes, and the list shows the result with no reload.
|
|
@@ -127,6 +127,8 @@ To let the shopper choose the country of a new address, compose `AddressCountryC
|
|
|
127
127
|
|
|
128
128
|
## Components
|
|
129
129
|
|
|
130
|
+
Each part with copy reads it only from its own `$content`, whose fields are ICU messages; no part takes a copy prop. A missing message renders empty and logs an error. `AccountAddressFormRoot` has no default parts, since a part it rendered itself would have no `$content`: compose them.
|
|
131
|
+
|
|
130
132
|
### AccountAddressBookRoot
|
|
131
133
|
|
|
132
134
|
No props beyond `className`. Fetches `customerAddressBook` (the address ids) with `fetchStrategy: 'reactive'`, requires `session`, provides `account-address-book`, and declares a skeleton.
|
|
@@ -145,39 +147,49 @@ No props beyond `className`. Renders one `<p>` per address line.
|
|
|
145
147
|
|
|
146
148
|
### AccountAddressBookLoading
|
|
147
149
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
|
150
|
+
Content type `account-address-book-loading`:
|
|
151
|
+
|
|
152
|
+
| Content field | Description |
|
|
153
|
+
|---|---|
|
|
154
|
+
| message | Loading message |
|
|
151
155
|
|
|
152
156
|
### AccountAddressBookEmpty
|
|
153
157
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
|
158
|
+
Content type `account-address-book-empty`:
|
|
159
|
+
|
|
160
|
+
| Content field | Description |
|
|
161
|
+
|---|---|
|
|
162
|
+
| message | Empty message |
|
|
157
163
|
|
|
158
164
|
### AccountAddressBookError
|
|
159
165
|
|
|
160
|
-
|
|
161
|
-
|------|------|---------|-------|
|
|
162
|
-
| `message` | string | catalog copy | Error message. A blank value falls back to the catalog. |
|
|
163
|
-
| `retryLabel` | string | catalog copy | Retry button label. A blank value falls back to the catalog. |
|
|
166
|
+
Content type `account-address-book-error`:
|
|
164
167
|
|
|
165
|
-
|
|
168
|
+
| Content field | Description |
|
|
169
|
+
|---|---|
|
|
170
|
+
| message | Error message |
|
|
171
|
+
| retryLabel | Retry button label |
|
|
166
172
|
|
|
167
|
-
|
|
168
|
-
|------|------|---------|-------|
|
|
169
|
-
| `label` | string | catalog copy | Button text. A blank value falls back to the catalog. |
|
|
173
|
+
### AccountAddressBookAddTrigger
|
|
170
174
|
|
|
171
175
|
A button that opens the form in add mode. It shows in every state of the book, the empty one too.
|
|
172
176
|
|
|
173
|
-
|
|
177
|
+
Content type `account-address-book-add-trigger`:
|
|
174
178
|
|
|
175
|
-
|
|
|
176
|
-
|
|
177
|
-
|
|
|
179
|
+
| Content field | Description |
|
|
180
|
+
|---|---|
|
|
181
|
+
| label | Button text |
|
|
182
|
+
|
|
183
|
+
### AccountAddressBookEditTrigger
|
|
178
184
|
|
|
179
185
|
A button inside `AccountAddressBookItem` that opens the form in edit mode for that entry. Its accessible name is the visible text followed by the address's first line, so each button in a list is told apart.
|
|
180
186
|
|
|
187
|
+
Content type `account-address-book-edit-trigger`:
|
|
188
|
+
|
|
189
|
+
| Content field | Description |
|
|
190
|
+
|---|---|
|
|
191
|
+
| label | Visible text |
|
|
192
|
+
|
|
181
193
|
### AccountAddressBookFormSlot
|
|
182
194
|
|
|
183
195
|
No props of its own; `className` and the other `div` attributes land on its element. Shows its children in place while a form is open, and nothing otherwise. Each open starts a new draft.
|
|
@@ -186,49 +198,70 @@ No props of its own; `className` and the other `div` attributes land on its elem
|
|
|
186
198
|
|
|
187
199
|
| Prop | Type | Default | Notes |
|
|
188
200
|
|------|------|---------|-------|
|
|
189
|
-
| `title` | string | catalog copy for the mode | Dialog title. A blank value falls back to the catalog. |
|
|
190
201
|
| `className` | string | none | Goes on the dialog's popup. The dialog renders in a portal outside the page, so this is the element a store sizes and places. |
|
|
191
202
|
|
|
192
203
|
Shows its children in a modal dialog while a form is open. Escape and the close button cancel the form.
|
|
193
204
|
|
|
194
|
-
|
|
205
|
+
Content type `account-address-book-form-dialog`:
|
|
195
206
|
|
|
196
|
-
|
|
|
197
|
-
|
|
198
|
-
|
|
|
207
|
+
| Content field | Description |
|
|
208
|
+
|---|---|
|
|
209
|
+
| titleAdd | Title in add mode |
|
|
210
|
+
| titleEdit | Title in edit mode |
|
|
211
|
+
| closeLabel | Close button's accessible name |
|
|
212
|
+
|
|
213
|
+
### AccountAddressBookDeleteTrigger
|
|
199
214
|
|
|
200
215
|
A button inside `AccountAddressBookItem` that asks to delete that entry's address. It deletes nothing by itself. Its accessible name is the visible text followed by the address's first line, so each button in a list is told apart.
|
|
201
216
|
|
|
217
|
+
Content type `account-address-book-delete-trigger`:
|
|
218
|
+
|
|
219
|
+
| Content field | Description |
|
|
220
|
+
|---|---|
|
|
221
|
+
| label | Visible text |
|
|
222
|
+
|
|
202
223
|
### AccountAddressBookDeleteConfirm
|
|
203
224
|
|
|
204
225
|
| Prop | Type | Default | Notes |
|
|
205
226
|
|------|------|---------|-------|
|
|
206
|
-
| `title` | string | catalog copy | The question. |
|
|
207
|
-
| `description` | string | catalog copy | What deleting means. The address's first line always shows before it. |
|
|
208
|
-
| `cancelLabel` | string | catalog copy | The control that backs out. |
|
|
209
|
-
| `confirmLabel` | string | catalog copy | The control that deletes. |
|
|
210
|
-
| `deletedMessage` | string | catalog copy | Toast after the address is deleted. |
|
|
211
|
-
| `failedMessage` | string | catalog copy | Shown in the dialog when the address was not deleted. |
|
|
212
|
-
| `unauthorizedMessage` | string | catalog copy | Shown in the dialog when the session expired. |
|
|
213
227
|
| `className` | string | none | Goes on the dialog's popup. The dialog renders in a portal outside the page, so this is the element a store sizes and places. |
|
|
214
228
|
|
|
215
229
|
One per address book, under `AccountAddressBookRoot`. It opens for the entry whose trigger was activated, and it needs a `ToastProvider` ancestor.
|
|
216
230
|
|
|
231
|
+
Content type `account-address-book-delete-confirm`:
|
|
232
|
+
|
|
233
|
+
| Content field | Description |
|
|
234
|
+
|---|---|
|
|
235
|
+
| title | The question |
|
|
236
|
+
| description | What deleting means. The address's first line always shows before it. |
|
|
237
|
+
| cancelLabel | The control that backs out |
|
|
238
|
+
| confirmLabel | The control that deletes |
|
|
239
|
+
| deletedMessage | Toast after the address is deleted |
|
|
240
|
+
| failedMessage | Shown when the address was not deleted |
|
|
241
|
+
| unauthorizedMessage | Shown when the session expired |
|
|
242
|
+
|
|
217
243
|
### AccountAddressFormRoot
|
|
218
244
|
|
|
219
245
|
| Prop | Type | Default | Notes |
|
|
220
246
|
|------|------|---------|-------|
|
|
221
247
|
| `defaultCountry` | string | `BRA` | ISO 3166-1 alpha-3 code of the country a new address prefers: taken when the store ships there or its list is unknown. A blank value falls back to `BRA`. |
|
|
222
|
-
| `addedMessage` | string | catalog copy | Toast after an address is added. |
|
|
223
|
-
| `savedMessage` | string | catalog copy | Toast after an address is saved. |
|
|
224
|
-
| `blockedMessage` | string | catalog copy | What the status region announces when a save is blocked. |
|
|
225
248
|
| `returnHref` | link | `{ standard: 'address' }` | Where leaving the form goes on its own page: a page reference, or a site-relative string (an off-site string is refused). Ignored under an address book. |
|
|
226
249
|
|
|
227
|
-
Requires `session`, provides `account-address-form`, and declares `actions: { address: ['create', 'update'] }`. Needs a `ToastProvider` ancestor.
|
|
250
|
+
Requires `session`, provides `account-address-form`, and declares `actions: { address: ['create', 'update'] }`. Needs a `ToastProvider` ancestor. It renders only its children; with none, the form is empty.
|
|
228
251
|
|
|
229
252
|
The address to edit comes from the book's open edit form, else from an `AccountAddressRecord` above it, else the form opens empty to add.
|
|
230
253
|
|
|
231
|
-
It renders the shared `FormRoot` and registers itself as the form's only fieldset, so react-hook-form holds the draft. Each field part registers under the `accountAddress` namespace while it is on screen. The address rules still decide what is valid and what is sent: the root checks the draft with the country's rules on Save and never hands a rule to react-hook-form. The form particle's `FormClear`, `FormReset` and `FormError` are not part of this anatomy; `AccountAddressFormCancel` and `AccountAddressFormError` cover them.
|
|
254
|
+
It renders the shared `FormRoot` and registers itself as the form's only fieldset, so react-hook-form holds the draft. Each field part registers under the `accountAddress` namespace while it is on screen. The address rules still decide what is valid and what is sent: the root checks the draft with the country's rules on Save and never hands a rule to react-hook-form. The form particle's `FormClear`, `FormReset` and `FormError` are not part of this anatomy; `AccountAddressFormCancel` and `AccountAddressFormError` cover them. A `FormError` composed anyway shows this form's own status message (`statusFields` or `statusFailed`) for a blocked or refused save, never the server's text.
|
|
255
|
+
|
|
256
|
+
Content type `account-address-form`:
|
|
257
|
+
|
|
258
|
+
| Content field | Description |
|
|
259
|
+
|---|---|
|
|
260
|
+
| addedMessage | Toast after an address is added |
|
|
261
|
+
| savedMessage | Toast after an address is saved |
|
|
262
|
+
| statusFilled | Announces the fields a postal code filled, a plural on `count` |
|
|
263
|
+
| statusFields | Announces a save blocked by fields, a plural on `count` |
|
|
264
|
+
| statusFailed | Announces a save that failed |
|
|
232
265
|
|
|
233
266
|
### AccountAddressRecord
|
|
234
267
|
|
|
@@ -238,81 +271,147 @@ An id that is not the shopper's and an id that never existed are the same respon
|
|
|
238
271
|
|
|
239
272
|
### AccountAddressRecordError
|
|
240
273
|
|
|
241
|
-
| Prop | Type | Default | Notes |
|
|
242
|
-
|------|------|---------|-------|
|
|
243
|
-
| `message` | string | catalog copy | Shown when the address could not be read. |
|
|
244
|
-
| `retryLabel` | string | catalog copy | The retry control's text. Retry reloads the page. |
|
|
245
|
-
|
|
246
274
|
Visible only when the read failed and no address resolved, as an alert. Must be inside `AccountAddressRecord`.
|
|
247
275
|
|
|
248
|
-
|
|
276
|
+
Content type `account-address-record-error`:
|
|
249
277
|
|
|
250
|
-
|
|
|
251
|
-
|
|
252
|
-
|
|
|
278
|
+
| Content field | Description |
|
|
279
|
+
|---|---|
|
|
280
|
+
| message | Shown when the address could not be read |
|
|
281
|
+
| retryLabel | The retry control's text. Retry reloads the page. |
|
|
282
|
+
|
|
283
|
+
### AddressCountryControl
|
|
253
284
|
|
|
254
285
|
Fetches `shippingCountries` (`countries` and `source`) with `fetchStrategy: 'reactive'`, requires `account-address-form`, and declares a skeleton. In add mode with two or more countries it renders a list; with one it renders nothing; in edit mode, or with no list, it renders the country as text.
|
|
255
286
|
|
|
287
|
+
Content type `address-country-control`:
|
|
288
|
+
|
|
289
|
+
| Content field | Description |
|
|
290
|
+
|---|---|
|
|
291
|
+
| label | The list's label |
|
|
292
|
+
|
|
256
293
|
### AccountAddressCountryNotice
|
|
257
294
|
|
|
258
|
-
|
|
259
|
-
|------|------|---------|-------|
|
|
260
|
-
| `message` | string | catalog copy | Replaces the whole sentence. Takes the ICU arguments `count`, `country`, `previous`, and `fields`. A blank or malformed value falls back to the catalog. |
|
|
295
|
+
Requires `account-address-form`. An `<output aria-live="polite">` that stays mounted, empty until a country change leaves fields behind. Its `fields` argument lists the left-behind fields with the labels of `AccountAddressFormFields`' content; with no Fields part mounted it is empty.
|
|
261
296
|
|
|
262
|
-
|
|
297
|
+
Content type `account-address-country-notice`:
|
|
263
298
|
|
|
264
|
-
|
|
299
|
+
| Content field | Description |
|
|
300
|
+
|---|---|
|
|
301
|
+
| message | The sentence, with the `count`, `country`, `fields` and `previous` arguments |
|
|
265
302
|
|
|
266
|
-
|
|
267
|
-
|------|------|---------|-------|
|
|
268
|
-
| `label` | string | catalog copy | Field label. A blank value falls back to the catalog. |
|
|
303
|
+
### AccountAddressFormRecipientName and AccountAddressFormReference
|
|
269
304
|
|
|
270
305
|
The recipient name is required for every country. The reference is optional.
|
|
271
306
|
|
|
307
|
+
Content type `account-address-form-recipient-name` (AccountAddressFormRecipientName):
|
|
308
|
+
|
|
309
|
+
| Content field | Description |
|
|
310
|
+
|---|---|
|
|
311
|
+
| label | Field label |
|
|
312
|
+
| requiredError | Error when the field is empty |
|
|
313
|
+
| invalidError | Error when the value is refused |
|
|
314
|
+
| tooLongError | Error past the length limit, with the `maxLength` argument |
|
|
315
|
+
|
|
316
|
+
Content type `account-address-form-reference` (AccountAddressFormReference):
|
|
317
|
+
|
|
318
|
+
| Content field | Description |
|
|
319
|
+
|---|---|
|
|
320
|
+
| label | Field label |
|
|
321
|
+
| requiredError | Error when the field is empty |
|
|
322
|
+
| invalidError | Error when the value is refused |
|
|
323
|
+
| tooLongError | Error past the length limit, with the `maxLength` argument |
|
|
324
|
+
|
|
272
325
|
### AccountAddressFormFields
|
|
273
326
|
|
|
274
327
|
No props beyond `className`, which goes on every field's wrapper. One field per field the country asks for, in the country's order.
|
|
275
328
|
|
|
276
|
-
|
|
329
|
+
Content type `account-address-form-fields`:
|
|
330
|
+
|
|
331
|
+
| Content field | Description |
|
|
332
|
+
|---|---|
|
|
333
|
+
| cepLabel | Label of the `cep` field |
|
|
334
|
+
| cityLabel | Label of the `city` field |
|
|
335
|
+
| communeLabel | Label of the `commune` field |
|
|
336
|
+
| complementLabel | Label of the `complement` field |
|
|
337
|
+
| countyLabel | Label of the `county` field |
|
|
338
|
+
| departmentLabel | Label of the `department` field |
|
|
339
|
+
| districtLabel | Label of the `district` field |
|
|
340
|
+
| municipalityLabel | Label of the `municipality` field |
|
|
341
|
+
| neighborhoodLabel | Label of the `neighborhood` field |
|
|
342
|
+
| numberLabel | Label of the `number` field |
|
|
343
|
+
| postalCodeLabel | Label of the `postalCode` field |
|
|
344
|
+
| postcodeLabel | Label of the `postcode` field |
|
|
345
|
+
| provinceLabel | Label of the `province` field |
|
|
346
|
+
| regionLabel | Label of the `region` field |
|
|
347
|
+
| stateLabel | Label of the `state` field |
|
|
348
|
+
| streetLabel | Label of the `street` field |
|
|
349
|
+
| townLabel | Label of the `town` field |
|
|
350
|
+
| postalCodePlaceholder | Postal code hint, with the `example` argument |
|
|
351
|
+
| streetPlaceholder | Street hint |
|
|
352
|
+
| cepError | Invalid CEP error, with the `example` argument |
|
|
353
|
+
| postalCodeError | Invalid postal code error, with the `example` argument |
|
|
354
|
+
| requiredError | Error when the field is empty |
|
|
355
|
+
| invalidError | Error when the value is refused |
|
|
356
|
+
| tooLongError | Error past the length limit, with the `maxLength` argument |
|
|
277
357
|
|
|
278
|
-
|
|
279
|
-
|------|------|---------|-------|
|
|
280
|
-
| `unrenderedFieldMessage` | string | catalog copy | A refusal on a field the form does not show. |
|
|
281
|
-
| `notFoundMessage` | string | catalog copy | The address no longer exists. |
|
|
282
|
-
| `unauthorizedMessage` | string | catalog copy | The session expired. |
|
|
283
|
-
| `saveFailedMessage` | string | catalog copy | The save failed for any other reason. |
|
|
284
|
-
| `rulesFailedMessage` | string | catalog copy | The country's rules did not load. |
|
|
285
|
-
| `countrySwitchFailedMessage` | string | catalog copy | A country change could not load. |
|
|
286
|
-
| `unsupportedCountryMessage` | string | catalog copy | The store does not deliver to the country. |
|
|
358
|
+
### AccountAddressFormError
|
|
287
359
|
|
|
288
360
|
An alert for the whole form. Renders nothing when there is no error.
|
|
289
361
|
|
|
290
|
-
|
|
362
|
+
Content type `account-address-form-error`:
|
|
291
363
|
|
|
292
|
-
|
|
|
293
|
-
|
|
294
|
-
|
|
|
364
|
+
| Content field | Description |
|
|
365
|
+
|---|---|
|
|
366
|
+
| unrenderedFieldMessage | A refusal on a field the form does not show |
|
|
367
|
+
| notFoundMessage | The address no longer exists |
|
|
368
|
+
| unauthorizedMessage | The session expired |
|
|
369
|
+
| saveFailedMessage | The save failed for any other reason |
|
|
370
|
+
| rulesFailedMessage | The country's rules did not load |
|
|
371
|
+
| countrySwitchFailedMessage | A country change could not load |
|
|
372
|
+
| unsupportedCountryMessage | The store does not deliver to the country |
|
|
373
|
+
|
|
374
|
+
### AccountAddressFormSubmit and AccountAddressFormCancel
|
|
295
375
|
|
|
296
376
|
Submit is disabled until the rules load, while a country change loads, and while a save is in flight, and is marked busy then. Cancel closes the form, or, on its own page, goes to the form root's `returnHref`. Cancel is disabled while a save is in flight, and under a book's `AccountAddressBookFormDialog` Escape and the close control wait for the save to settle, so a refusal is never lost.
|
|
297
377
|
|
|
378
|
+
Content type `account-address-form-submit` (AccountAddressFormSubmit):
|
|
379
|
+
|
|
380
|
+
| Content field | Description |
|
|
381
|
+
|---|---|
|
|
382
|
+
| label | Button text |
|
|
383
|
+
|
|
384
|
+
Content type `account-address-form-cancel` (AccountAddressFormCancel):
|
|
385
|
+
|
|
386
|
+
| Content field | Description |
|
|
387
|
+
|---|---|
|
|
388
|
+
| label | Button text |
|
|
389
|
+
|
|
298
390
|
### AccountAddressBookProfileNotice
|
|
299
391
|
|
|
300
392
|
| Prop | Type | Default | Notes |
|
|
301
393
|
|------|------|---------|-------|
|
|
302
394
|
| `href` | link | `{ standard: 'profile' }` | Where the link goes: a page reference, or a site-relative string. |
|
|
303
|
-
| `message` | string | catalog copy | Notice text. |
|
|
304
|
-
| `linkLabel` | string | catalog copy | Link label. |
|
|
305
395
|
|
|
306
396
|
Fetches `customerProfile` with `fetchStrategy: 'reactive'` and requires `session`.
|
|
307
397
|
|
|
308
|
-
|
|
398
|
+
Content type `account-address-book-profile-notice`:
|
|
309
399
|
|
|
310
|
-
|
|
|
311
|
-
|
|
312
|
-
|
|
|
400
|
+
| Content field | Description |
|
|
401
|
+
|---|---|
|
|
402
|
+
| message | Notice text |
|
|
403
|
+
| linkLabel | Link label |
|
|
404
|
+
|
|
405
|
+
### AccountAddressBookItemDeliverability
|
|
313
406
|
|
|
314
407
|
Fetches `shippingCountries` with `fetchStrategy: 'reactive'` and requires `account-address-book-item`. Renders one `<p>` when it marks an address, and nothing otherwise.
|
|
315
408
|
|
|
409
|
+
Content type `account-address-book-deliverability`:
|
|
410
|
+
|
|
411
|
+
| Content field | Description |
|
|
412
|
+
|---|---|
|
|
413
|
+
| message | Marker text |
|
|
414
|
+
|
|
316
415
|
---
|
|
317
416
|
|
|
318
417
|
## Canonical schema example
|
|
@@ -335,7 +434,7 @@ Fetches `shippingCountries` with `fetchStrategy: 'reactive'` and requires `accou
|
|
|
335
434
|
|
|
336
435
|
`address-item` appears once in the schema and renders once per saved address. Do not repeat it.
|
|
337
436
|
|
|
338
|
-
With the form, the same book adds an add trigger, an edit trigger inside the item, and a slot holding the form root.
|
|
437
|
+
With the form, the same book adds an add trigger, an edit trigger inside the item, and a slot holding the form root. The root renders only its children, which the next example defines:
|
|
339
438
|
|
|
340
439
|
```json
|
|
341
440
|
{
|
|
@@ -356,13 +455,26 @@ With the form, the same book adds an add trigger, an edit trigger inside the ite
|
|
|
356
455
|
"address-country": { "type": "AddressSummaryCountry", "children": [] },
|
|
357
456
|
"address-edit": { "type": "AccountAddressBookEditTrigger", "children": [] },
|
|
358
457
|
"address-form-slot": { "type": "AccountAddressBookFormSlot", "children": ["address-form"] },
|
|
359
|
-
"address-form": {
|
|
458
|
+
"address-form": {
|
|
459
|
+
"type": "AccountAddressFormRoot",
|
|
460
|
+
"props": { "defaultCountry": "BRA" },
|
|
461
|
+
"children": [
|
|
462
|
+
"form-country",
|
|
463
|
+
"form-country-notice",
|
|
464
|
+
"form-recipient",
|
|
465
|
+
"form-fields",
|
|
466
|
+
"form-reference",
|
|
467
|
+
"form-error",
|
|
468
|
+
"form-submit",
|
|
469
|
+
"form-cancel"
|
|
470
|
+
]
|
|
471
|
+
}
|
|
360
472
|
}
|
|
361
473
|
```
|
|
362
474
|
|
|
363
475
|
To open the form in a dialog, swap `AccountAddressBookFormSlot` for `AccountAddressBookFormDialog`. The page needs a `ToastProvider` above it.
|
|
364
476
|
|
|
365
|
-
|
|
477
|
+
The form root's parts, with the country control first so the shopper can choose the country:
|
|
366
478
|
|
|
367
479
|
```json
|
|
368
480
|
{
|
|
@@ -447,7 +559,7 @@ To mark the addresses the store does not ship to, add an `AccountAddressBookItem
|
|
|
447
559
|
- **Placing `AccountAddressBookItemDeliverability` outside `AccountAddressBookItem`.** It needs the country that the entry hands it, and throws without it.
|
|
448
560
|
- **Expecting the marker to appear when the store ships to one country.** Under the single-country fallback it renders nothing on purpose: one guessed country cannot tell a deliverable address from an undeliverable one.
|
|
449
561
|
- **Listing the form's fields in the schema.** `AccountAddressFormFields` renders the ones the country asks for. Do not compose a field per country.
|
|
450
|
-
- **
|
|
562
|
+
- **Leaving `AccountAddressFormRoot` with no children.** It has no default parts, so the form renders empty. Compose its parts, with `AddressCountryControl` first to offer the countries the store ships to.
|
|
451
563
|
- **Placing `AddressCountryControl` or `AccountAddressCountryNotice` outside `AccountAddressFormRoot`.** Both need the form; the hook throws without it.
|
|
452
564
|
- **Using `ShippingAddress*` for the account form.** Those parts are the checkout form.
|
|
453
565
|
|
|
@@ -459,27 +571,27 @@ To mark the addresses the store does not ship to, add an `AccountAddressBookItem
|
|
|
459
571
|
|---|---|---|
|
|
460
572
|
| `AccountAddressBookRoot` | `[data-fs-account-address-book]`; carries `-state` | `flex flex-col gap-4` |
|
|
461
573
|
| `AccountAddressBookList` | `[data-fs-account-address-book-list]`, items via `[data-fs-account-address-book-list-item]` | `flex flex-col gap-4` |
|
|
462
|
-
| `AccountAddressBookItem` | `[data-fs-account-address-book-item]` | `flex flex-col gap-1 rounded-md border border-[
|
|
463
|
-
| `AccountAddressBookItemLines` | each line `[data-fs-account-address-book-line]` | `text-[14px] text-[
|
|
574
|
+
| `AccountAddressBookItem` | `[data-fs-account-address-book-item]` | `flex flex-col gap-1 rounded-md border border-[var(--color-border-strong)] p-4` |
|
|
575
|
+
| `AccountAddressBookItemLines` | each line `[data-fs-account-address-book-line]` | `text-[14px] text-[var(--color-text-secondary)]` |
|
|
464
576
|
| `AccountAddressBookLoading` | `[data-fs-account-address-book-loading]`, message via `-loading-message` | Leave the message as is: it is already `sr-only` |
|
|
465
577
|
| `AccountAddressBookSkeleton` | `[data-fs-account-address-book-skeleton]`, lines via `-skeleton-line` | `animate-pulse` |
|
|
466
578
|
| `AccountAddressBookEmpty` | `[data-fs-account-address-book-empty]` | `text-[14px] text-[#737373]` |
|
|
467
|
-
| `AccountAddressBookError` | `[data-fs-account-address-book-error]`, message via `-error-message`, button via `[data-fs-account-address-book-retry]` | `flex flex-col gap-2 text-[
|
|
468
|
-
| `AccountAddressBookAddTrigger` | `[data-fs-account-address-book-add]` | `rounded-md bg-[
|
|
469
|
-
| `AccountAddressBookEditTrigger` | `[data-fs-account-address-book-edit]` | `text-[14px] font-semibold text-[
|
|
470
|
-
| `AccountAddressBookFormSlot` | `[data-fs-account-address-book-form-slot]` | `rounded-md border border-[
|
|
579
|
+
| `AccountAddressBookError` | `[data-fs-account-address-book-error]`, message via `-error-message`, button via `[data-fs-account-address-book-retry]` | `flex flex-col gap-2 text-[var(--color-feedback-danger)]` |
|
|
580
|
+
| `AccountAddressBookAddTrigger` | `[data-fs-account-address-book-add]` | `rounded-md bg-[var(--color-blue-surface)] px-4 py-2 font-semibold text-white` |
|
|
581
|
+
| `AccountAddressBookEditTrigger` | `[data-fs-account-address-book-edit]` | `text-[14px] font-semibold text-[var(--color-blue-surface)]` |
|
|
582
|
+
| `AccountAddressBookFormSlot` | `[data-fs-account-address-book-form-slot]` | `rounded-md border border-[var(--color-border-strong)] p-4` |
|
|
471
583
|
| `AccountAddressBookFormDialog` | popup via `[data-fs-account-address-book-form-dialog]`, with the `Dialog` particle's own `data-fs-dialog-*` attributes | `w-full max-w-md rounded-md bg-white p-6` |
|
|
472
|
-
| `AccountAddressBookDeleteTrigger` | `[data-fs-account-address-book-delete]` | `text-[14px] font-semibold text-[
|
|
584
|
+
| `AccountAddressBookDeleteTrigger` | `[data-fs-account-address-book-delete]` | `text-[14px] font-semibold text-[var(--color-feedback-danger)]` |
|
|
473
585
|
| `AccountAddressBookDeleteConfirm` | popup via `[data-fs-account-address-book-delete-confirm]`, with the `AlertDialog` particle's own `data-fs-alert-dialog-*` attributes; the address via `-delete-address`; the refusal via `-delete-error`; the confirming button via `-delete-submit` | `w-full max-w-md rounded-md bg-white p-6` |
|
|
474
586
|
| `AccountAddressFormRoot` | `[data-fs-account-address-form]`, with the form particle's own `data-fs-form` and `data-fs-form-pending`; carries `-mode` (`add` or `edit`); status region via `-status` | `flex flex-col gap-3` |
|
|
475
|
-
| `AddressCountryControl` | `[data-fs-address-country-control]`; carries `-mode` (`select` or `text`) and `-pending` while a change loads; the text via `-text`; the list's trigger via `[data-fs-account-address-form-control]` | `flex flex-col gap-1 text-[14px] text-[
|
|
476
|
-
| `AccountAddressCountryNotice` | `[data-fs-account-address-country-notice]` | `text-[14px] text-[
|
|
587
|
+
| `AddressCountryControl` | `[data-fs-address-country-control]`; carries `-mode` (`select` or `text`) and `-pending` while a change loads; the text via `-text`; the list's trigger via `[data-fs-account-address-form-control]` | `flex flex-col gap-1 text-[14px] text-[var(--color-text-secondary)]` |
|
|
588
|
+
| `AccountAddressCountryNotice` | `[data-fs-account-address-country-notice]` | `text-[14px] text-[var(--color-text-secondary)]` |
|
|
477
589
|
| `AccountAddressFormRecipientName`, `AccountAddressFormFields`, `AccountAddressFormReference` | each field's wrapper `[data-fs-account-address-form-field="<name>"]`; a list field's error via `-field-error` | `flex flex-col gap-1` |
|
|
478
|
-
| `AccountAddressFormError` | `[data-fs-account-address-form-error]`, whose value is the kind of error | `text-[14px] text-[
|
|
479
|
-
| `AccountAddressFormSubmit` | `[data-fs-account-address-form-submit]` | `rounded-md bg-[
|
|
480
|
-
| `AccountAddressFormCancel` | `[data-fs-account-address-form-cancel]` | `rounded-md border border-[
|
|
590
|
+
| `AccountAddressFormError` | `[data-fs-account-address-form-error]`, whose value is the kind of error | `text-[14px] text-[var(--color-feedback-danger)]` |
|
|
591
|
+
| `AccountAddressFormSubmit` | `[data-fs-account-address-form-submit]` | `rounded-md bg-[var(--color-blue-surface)] px-4 py-2 font-semibold text-white` |
|
|
592
|
+
| `AccountAddressFormCancel` | `[data-fs-account-address-form-cancel]` | `rounded-md border border-[var(--color-border-strong)] px-4 py-2` |
|
|
481
593
|
| `AccountAddressBookProfileNotice` | `[data-fs-account-address-book-profile-notice]`, text via `-message`, link via `-link` | `rounded-md border border-[#FBBF24] bg-[#FFFBEB] p-3 text-[14px]` |
|
|
482
|
-
| `AccountAddressBookItemDeliverability` | `[data-fs-account-address-book-item-deliverability]` | `text-[14px] text-[
|
|
594
|
+
| `AccountAddressBookItemDeliverability` | `[data-fs-account-address-book-item-deliverability]` | `text-[14px] text-[var(--color-feedback-warning)]` |
|
|
483
595
|
|
|
484
596
|
```json
|
|
485
597
|
{
|
|
@@ -490,19 +602,22 @@ To mark the addresses the store does not ship to, add an `AccountAddressBookItem
|
|
|
490
602
|
},
|
|
491
603
|
"address-item": {
|
|
492
604
|
"type": "AccountAddressBookItem",
|
|
493
|
-
"style": ["flex", "flex-col", "gap-[4px]", "rounded-[6px]", "border", "border-[
|
|
605
|
+
"style": ["flex", "flex-col", "gap-[4px]", "rounded-[6px]", "border", "border-[var(--color-border-strong)]", "p-[16px]"],
|
|
494
606
|
"children": []
|
|
495
607
|
}
|
|
496
608
|
}
|
|
497
609
|
```
|
|
498
610
|
|
|
611
|
+
The role colors above are the foundation's `visualIdentity` roles (`--color-feedback-danger`, `--color-feedback-warning`), so they follow the store when it changes them.
|
|
612
|
+
|
|
613
|
+
The colors that several elements share are variables of the page or layout `theme`, which declares them: `{"--color-border-strong": "#D4D4D4", "--color-text-secondary": "#404040", "--color-blue-surface": "#2563EB"}`. A color used once stays a hex.
|
|
614
|
+
|
|
499
615
|
---
|
|
500
616
|
|
|
501
617
|
## Known gaps
|
|
502
618
|
|
|
503
619
|
- **A failed profile read fails the whole book.** The notice and the book share one page query, and both roots are non-null. If the profile read fails, the list also goes to its error state. The same limit applies to any later part that joins the page query.
|
|
504
620
|
- **The deliverability marker reads the store's shipping countries when the page loads.** It does not refresh until the page loads again, and it stays silent if that first read failed.
|
|
505
|
-
- **The default form offers no country choice.** A childless form root shows `defaultCountry` as text, because only a control placed in the schema joins the page query. Compose `AddressCountryControl` to offer the choice.
|
|
506
621
|
- **The shipping countries are read once per page.** The list comes with the page; a store that changes where it ships shows the change on the next page load.
|
|
507
622
|
- **The postal code has no mask.** It is a plain text field. After the shopper stops typing for 400 ms, a complete code fills the state, city, neighborhood and street the country shows (Argentina, Brazil, Canada, France, Mexico, Spain and the United States). A field the shopper typed or saved is never changed, and a select the shopper's own city depends on is left alone. A field an earlier code filled and the new code does not cover is cleared. A reply for a code or country that changed meanwhile is dropped. A code the platform does not know and a lookup that fails change nothing and say nothing. The merchant cannot turn the fill off.
|
|
508
623
|
- **The fill remembers only the last code asked.** Typing the same code again after another one asks again.
|
|
@@ -53,10 +53,10 @@ Content model (`account-entry-point`) fields, edited in the CMS:
|
|
|
53
53
|
|-------|------|----------|-------|
|
|
54
54
|
| `signedOutLabel` | string | no | Cleared or absent keeps the authored prop |
|
|
55
55
|
| `signedInLabel` | string | no | Same |
|
|
56
|
-
| `icon` | string | no | Same, but the name must be listed in `
|
|
56
|
+
| `icon` | string | no | Same, but the name must be listed in `foundation.json → icons.include` — see below |
|
|
57
57
|
| `loadingLabel` | string | no | Same |
|
|
58
58
|
|
|
59
|
-
**An icon chosen in the CMS has to be declared in the store first.** Icon references resolve at compile time: the compiler collects every value of every `icon`-typed prop across the page and layout schemas and emits one sprite per route. A name that arrives at runtime from a CMS entry is never seen by that pass, so it renders a `<use>` pointing at a symbol the route's sprite does not carry — no build error, no runtime error, no glyph. For a merchant to be able to pick the icon in the Admin, the store must list the candidates under `
|
|
59
|
+
**An icon chosen in the CMS has to be declared in the store first.** Icon references resolve at compile time: the compiler collects every value of every `icon`-typed prop across the page and layout schemas and emits one sprite per route. A name that arrives at runtime from a CMS entry is never seen by that pass, so it renders a `<use>` pointing at a symbol the route's sprite does not carry — no build error, no runtime error, no glyph. For a merchant to be able to pick the icon in the Admin, the store must list the candidates under `foundation.json → icons.include`, which puts them in the root sprite regardless of what any schema references.
|
|
60
60
|
|
|
61
61
|
**One element, two links, chosen by the session.** `loggedIn` renders the signed-in link; `anonymous` and `identified` both render the signed-out one, because an identified but unauthenticated shopper cannot reach their account yet. There is no prop that selects between them — the merchant authors one element and the session decides.
|
|
62
62
|
|
|
@@ -98,7 +98,7 @@ Bound to a CMS entry, the element authors no content props at all — the entry
|
|
|
98
98
|
- **Placing it outside a `SessionRoot`.** The compiler rejects it, and the runtime throws.
|
|
99
99
|
- **Authoring `$content` in the schema.** `$content` is compiler-injected from the page's or layout's content entry; naming it in `props` fails the build.
|
|
100
100
|
- **Expecting a default glyph.** The base icon dialect has no account icon, so a store that authors no `icon` gets a label-only link. Author one from the store's own collection.
|
|
101
|
-
- **Letting a merchant pick the icon without declaring it.** An `icon` supplied by a CMS entry renders nothing at all unless the store lists the name in `
|
|
101
|
+
- **Letting a merchant pick the icon without declaring it.** An `icon` supplied by a CMS entry renders nothing at all unless the store lists the name in `foundation.json → icons.include`: the compiler builds each route's sprite from the schemas, and a runtime value never reaches that pass.
|
|
102
102
|
- **Hiding the announced text with `display:none`.** That removes it from the accessibility tree and defeats the announcement; use a clipping technique instead.
|
|
103
103
|
|
|
104
104
|
---
|
|
@@ -123,7 +123,7 @@ Bound to a CMS entry, the element authors no content props at all — the entry
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
The glyph carries a fixed intrinsic size, so reach it through the root when the header needs another.
|
|
126
|
-
Author that once per store as the `AccountEntryPoint` base swatch in `
|
|
126
|
+
Author that once per store as the `AccountEntryPoint` base swatch in `foundation.json → styles`:
|
|
127
127
|
|
|
128
128
|
```json
|
|
129
129
|
{
|
|
@@ -72,9 +72,11 @@ Two kinds of entry are excluded from the match entirely: one marked `external`,
|
|
|
72
72
|
|
|
73
73
|
### AccountMenuList
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
|
75
|
+
Content model (`account-menu-list`) field, an ICU message with no package default:
|
|
76
|
+
|
|
77
|
+
| Field | Type | Source (English) | Notes |
|
|
78
|
+
|-------|------|------------------|-------|
|
|
79
|
+
| `label` | message | `Account` | Accessible name of the navigation landmark. |
|
|
78
80
|
|
|
79
81
|
It takes no children: one `<li>` per resolved section is what it renders. With no sections to render it renders nothing at all, rather than an empty landmark for a screen-reader user to land in.
|
|
80
82
|
|
|
@@ -89,15 +91,14 @@ Exposed as `AccountMenu.IndexRedirect`. The account's root has no section of its
|
|
|
89
91
|
| Prop | Type | Default | Notes |
|
|
90
92
|
|------|------|---------|-------|
|
|
91
93
|
| `loadingLabel` | string | — | Announced while the first section opens. |
|
|
92
|
-
| `emptyMessage` | string | `'No account section is configured.'` | What the root says when there is no section to open. |
|
|
93
94
|
| `className` | string | — | Applied to whichever element renders. |
|
|
94
95
|
|
|
95
|
-
Content model (`account-menu-index-redirect`) fields, edited in the CMS
|
|
96
|
+
Content model (`account-menu-index-redirect`) fields, edited in the CMS:
|
|
96
97
|
|
|
97
98
|
| Field | Type | Required | Notes |
|
|
98
99
|
|-------|------|----------|-------|
|
|
99
|
-
| `loadingLabel` | string | no | The waiting announcement |
|
|
100
|
-
| `emptyMessage` |
|
|
100
|
+
| `loadingLabel` | string | no | The waiting announcement; wins over its prop when published, and a blank field falls through |
|
|
101
|
+
| `emptyMessage` | message | no | The no-section message (source `No account section is configured.`); no package default |
|
|
101
102
|
|
|
102
103
|
**It replaces the current history entry with the first section that stays in the account.** It reads the Root's resolved list and skips, in order: an entry marked `external`, a destination the allowlist refused, a destination that is not site-relative even though the merchant did not flag it, and the root itself in any spelling that matches it. Replace, never push: back from the section leaves the account instead of bouncing through its root.
|
|
103
104
|
|
|
@@ -113,16 +114,14 @@ Exposed as `AccountMenu.SignOut`. A button that ends the session and leaves the
|
|
|
113
114
|
|
|
114
115
|
| Prop | Type | Default | Notes |
|
|
115
116
|
|------|------|---------|-------|
|
|
116
|
-
| `label` | string | `'Sign out'` | The button's text. |
|
|
117
|
-
| `errorMessage` | string | `"We couldn't sign you out. Please try again."` | Shown when the sign-out did not happen. |
|
|
118
117
|
| `className` | string | — | Applied to the wrapper. |
|
|
119
118
|
|
|
120
|
-
Content model (`account-menu-sign-out`) fields,
|
|
119
|
+
Content model (`account-menu-sign-out`) fields, ICU messages with no package default:
|
|
121
120
|
|
|
122
|
-
| Field | Type |
|
|
123
|
-
|
|
124
|
-
| `label` |
|
|
125
|
-
| `errorMessage` |
|
|
121
|
+
| Field | Type | Source (English) | Notes |
|
|
122
|
+
|-------|------|------------------|-------|
|
|
123
|
+
| `label` | message | `Sign out` | The button's text |
|
|
124
|
+
| `errorMessage` | message | `We couldn't sign you out. Please try again.` | The failure message |
|
|
126
125
|
|
|
127
126
|
The component declares `actions: { session: ['logout'] }` and writes only through `$actions.session.logout()`.
|
|
128
127
|
|
|
@@ -161,7 +160,7 @@ Returns `{ items, current }` — the resolved sections and the current one as `{
|
|
|
161
160
|
|
|
162
161
|
Bound to a CMS entry, the Root authors no `items` at all — the entry supplies the whole list.
|
|
163
162
|
|
|
164
|
-
No part carries a `style` reference: each takes its type's `base` swatch from `
|
|
163
|
+
No part carries a `style` reference: each takes its type's `base` swatch from `foundation.json → styles` on its own. Reference a named swatch only when the store defines one, since a `$name` the store does not define expands to nothing, without an error.
|
|
165
164
|
|
|
166
165
|
The account root's page, whose only content is the redirect:
|
|
167
166
|
|
|
@@ -178,7 +177,7 @@ The account root's page, whose only content is the redirect:
|
|
|
178
177
|
|
|
179
178
|
- **Placing the Root beside the slot instead of around it.** The layout's own consumers would be satisfied and the page's would not: a context reaches only descendants. Context-constraint validation reports it as a build error rather than as an empty menu at runtime.
|
|
180
179
|
- **Putting the `<nav>` around the section's content.** That is what the two-part split exists to prevent; do not wrap the slot in `AccountMenuList`.
|
|
181
|
-
- **Leaving `label` unauthored.**
|
|
180
|
+
- **Leaving `label` unauthored.** There is no package default: an unauthored label leaves the landmark nameless, and a landmark's name is how a screen-reader user tells it from every other one.
|
|
182
181
|
- **Styling the current item and nothing else.** The hook exists beside `aria-current`, never instead of it. Removing the programmatic signal leaves position conveyed by appearance alone.
|
|
183
182
|
- **Publishing an empty list and expecting the defaults.** Empty is a configuration, not an absence. The account's root then has no section to open, and says so.
|
|
184
183
|
- **Placing `AccountMenuIndexRedirect` on a section's page.** It navigates away from whatever page hosts it; it belongs on the account page alone.
|
|
@@ -207,7 +206,7 @@ The account root's page, whose only content is the redirect:
|
|
|
207
206
|
| Sign-out button | `data-fs-account-menu-sign-out-button` is the `<button>`; style `:disabled` for the wait | `text-left text-sm underline` |
|
|
208
207
|
| Sign-out failure | `data-fs-account-menu-sign-out-error` is the alert | `text-sm text-red-600` |
|
|
209
208
|
|
|
210
|
-
The vertical-to-horizontal switch and the scroll affordance are one DOM styled two ways, in CSS alone. A store authors them as `AccountMenuList.base` in `
|
|
209
|
+
The vertical-to-horizontal switch and the scroll affordance are one DOM styled two ways, in CSS alone. A store authors them as `AccountMenuList.base` in `foundation.json → styles`, abridged here:
|
|
211
210
|
|
|
212
211
|
```json
|
|
213
212
|
{
|