@vtex/faststore 0.0.10 → 0.0.12
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 +55 -0
- package/README.md +0 -1
- package/dist/_virtual/_rolldown/runtime.js +4 -0
- package/dist/actions.json +6 -1
- package/dist/catalog.json +789 -1701
- 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 +63 -57
- package/dist/components.js +60 -54
- package/dist/content-types.json +5785 -754
- package/dist/core/dist/define-component.d.ts +1 -1
- 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-menu.md +14 -15
- package/dist/docs/account-saved-cards.md +44 -39
- 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 +5 -2
- package/dist/docs/buy-button.md +7 -8
- package/dist/docs/card-entry.md +39 -26
- package/dist/docs/card-summary.md +18 -8
- package/dist/docs/cardholder-document.md +5 -3
- package/dist/docs/carousel.md +5 -4
- package/dist/docs/cart-destination.md +39 -26
- package/dist/docs/cart-item.md +29 -14
- package/dist/docs/cart-totalizer.md +7 -5
- package/dist/docs/cart.md +135 -41
- 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/form.md +54 -18
- package/dist/docs/free-shipping-progress.md +6 -5
- package/dist/docs/identity-edit.md +8 -2
- package/dist/docs/identity-summary.md +18 -5
- package/dist/docs/installments.md +46 -32
- 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 +30 -4
- package/dist/docs/payment-methods.md +1 -1
- 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 +13 -9
- package/dist/docs/product-list.md +7 -6
- package/dist/docs/product-shelf.md +0 -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/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 +4 -2
- package/dist/docs/sign-in.md +173 -0
- package/dist/docs/toast.md +15 -4
- package/dist/docs/variant-selector.md +15 -11
- package/dist/domain-logic/dist/checkout/rules.js +33 -0
- package/dist/domain-logic/dist/checkout/rules.js.map +1 -0
- package/dist/graphql/types.d.ts +4 -14
- package/dist/index.d.ts +2 -2
- package/dist/internal/client.d.ts +1 -3
- package/dist/internal/client.js +1 -1
- package/dist/internal/server.d.ts +7 -4
- package/dist/internal/server.js +7 -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 +108 -28
- package/dist/matter/account-saved-cards/account-saved-cards.js +177 -122
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -1
- 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 +7 -1
- package/dist/matter/cart/cart-namespace.js +7 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +402 -61
- package/dist/matter/cart/cart.js +624 -153
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +30 -19
- package/dist/matter/cart-destination/cart-destination.js +160 -70
- package/dist/matter/cart-destination/cart-destination.js.map +1 -1
- package/dist/matter/cart-item/cart-item.d.ts +144 -17
- package/dist/matter/cart-item/cart-item.js +166 -49
- 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 +46 -17
- 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 +79 -7
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +77 -20
- 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 +1 -3
- package/dist/matter/product-shelf/product-shelf.js +2 -15
- 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 +250 -24
- package/dist/matter/shipping-simulator/shipping-simulator.js +257 -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 +29 -8
- package/dist/particles/binding-switcher/binding-switcher.js +37 -26
- package/dist/particles/binding-switcher/binding-switcher.js.map +1 -1
- package/dist/particles/card-summary/card-summary.d.ts +38 -8
- package/dist/particles/card-summary/card-summary.js +55 -22
- package/dist/particles/card-summary/card-summary.js.map +1 -1
- 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/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/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/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 +29 -3
- package/dist/particles/toast/toast.js +34 -10
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +164 -56
- 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/cart/use-cart-actions.js.map +1 -1
- 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 +1 -1
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +20 -5
- package/dist/sdk/generated/graphql.js +6 -0
- 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/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 +21 -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 -4
- 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/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 +3 -2
- package/dist/sdk/seo/page-alternates.js +4 -2
- 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/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/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 +8 -0
- 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 -183
- package/dist/sdk/i18n/messages/en-US.js.map +0 -1
- package/dist/sdk/i18n/messages/en-US.json +0 -178
- package/dist/sdk/i18n/messages/en-US.json.d.ts +0 -182
- package/dist/sdk/i18n/messages/es-ES.js +0 -183
- package/dist/sdk/i18n/messages/es-ES.js.map +0 -1
- package/dist/sdk/i18n/messages/es-ES.json +0 -178
- package/dist/sdk/i18n/messages/pt-BR.js +0 -183
- package/dist/sdk/i18n/messages/pt-BR.js.map +0 -1
- package/dist/sdk/i18n/messages/pt-BR.json +0 -178
- 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
|
@@ -39,9 +39,9 @@ AccountSavedCardsRoot ← requires 'session'; provides 'account-save
|
|
|
39
39
|
├── AccountSavedCardsEmpty
|
|
40
40
|
└── AccountSavedCardsList ← provides 'account-saved-card'
|
|
41
41
|
└── AccountSavedCardItem ← one row per card; provides 'card-summary', 'account-saved-card-data'
|
|
42
|
-
├── CardSummary
|
|
43
|
-
├── AccountSavedCardExpiry
|
|
44
|
-
└── AccountSavedCardRemove
|
|
42
|
+
├── CardSummary
|
|
43
|
+
├── AccountSavedCardExpiry
|
|
44
|
+
└── AccountSavedCardRemove ← provides 'account-saved-card-remove'
|
|
45
45
|
└── AlertDialogRoot
|
|
46
46
|
├── AccountSavedCardRemoveTrigger
|
|
47
47
|
└── AlertDialogPortal > AlertDialogBackdrop + AlertDialogViewport > AlertDialogPopup
|
|
@@ -51,8 +51,6 @@ AccountSavedCardsRoot ← requires 'session'; provides 'account-save
|
|
|
51
51
|
└── AccountSavedCardRemoveConfirm
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
`AccountSavedCardRemove` with no children renders the prompt shown under it.
|
|
55
|
-
|
|
56
54
|
The Root renders nothing unless the session is `loggedIn`, and no chrome: no navigation, no page title, no landmark. It derives one state and exposes it on `data-fs-account-saved-cards-state`:
|
|
57
55
|
|
|
58
56
|
| State | When | Renders |
|
|
@@ -73,7 +71,7 @@ The heading and the removal feedback render in every state. Every part except th
|
|
|
73
71
|
|
|
74
72
|
Reads the card ids (`customerSavedCards`, reactive) and publishes the section state. No schema props.
|
|
75
73
|
|
|
76
|
-
It also holds the section's removal: which card is being removed (one at a time) and how the last removal ended. It declares `actions: { savedCard: ['remove'] }`, so every remove control inside reaches the action
|
|
74
|
+
It also holds the section's removal: which card is being removed (one at a time) and how the last removal ended. It declares `actions: { savedCard: ['remove'] }`, so every remove control inside reaches the action.
|
|
77
75
|
|
|
78
76
|
### AccountSavedCardsHeading
|
|
79
77
|
|
|
@@ -103,9 +101,9 @@ A `<ul>` repeating its child once per card.
|
|
|
103
101
|
|
|
104
102
|
### AccountSavedCardItem
|
|
105
103
|
|
|
106
|
-
A `<li>` that provides its card to the CardSummary parts, `AccountSavedCardExpiry`, and `AccountSavedCardRemove`.
|
|
104
|
+
A `<li>` that provides its card to the CardSummary parts, `AccountSavedCardExpiry`, and `AccountSavedCardRemove`. It renders only its children; with none, the row is empty. It shows no label: the account's read does not return one.
|
|
107
105
|
|
|
108
|
-
An expired card's row carries `data-fs-account-saved-card-expired`, and an unusable one's `data-fs-account-saved-card-unusable`, so a swatch can dim it. A working card's row carries neither. While its card is being removed, the row carries `data-fs-account-saved-card-removing`. Compose
|
|
106
|
+
An expired card's row carries `data-fs-account-saved-card-expired`, and an unusable one's `data-fs-account-saved-card-unusable`, so a swatch can dim it. A working card's row carries neither. While its card is being removed, the row carries `data-fs-account-saved-card-removing`. Compose `CardSummary`, `AccountSavedCardExpiry` and `AccountSavedCardRemove` as children, in the order the row needs. Leave `AccountSavedCardRemove` out only for a read-only list.
|
|
109
107
|
|
|
110
108
|
### AccountSavedCardExpiry
|
|
111
109
|
|
|
@@ -123,7 +121,7 @@ The label is in `data-fs-account-saved-card-expiry-label`, the `MM/YY` date in `
|
|
|
123
121
|
|
|
124
122
|
### AccountSavedCardRemove
|
|
125
123
|
|
|
126
|
-
The controller for one row's removal prompt. It owns the prompt's open state and passes it to its single `AlertDialogRoot` child; the schema never sets `open`. With no children it renders
|
|
124
|
+
The controller for one row's removal prompt. It owns the prompt's open state and passes it to its single `AlertDialogRoot` child; the schema never sets `open`. With no children it renders nothing. No schema props.
|
|
127
125
|
|
|
128
126
|
Opening the prompt dispatches nothing. Confirm dispatches `savedCard.remove` with the row's card id. The prompt then stays open until the server answers, and Escape and Cancel cannot close it meanwhile. On success the row leaves the list, and the prompt goes with it. On failure the prompt closes, focus returns to the trigger, and the row stays. An expired or unusable card is removed like any other.
|
|
129
127
|
|
|
@@ -133,7 +131,7 @@ The row's control that opens the prompt. Its visible text is short ("Remove"); a
|
|
|
133
131
|
|
|
134
132
|
### AccountSavedCardRemoveTitle, AccountSavedCardRemoveDescription
|
|
135
133
|
|
|
136
|
-
The prompt's title and accessible description. With no children, the description renders the card's `CardSummary` before its text, so the prompt names the card it removes
|
|
134
|
+
The prompt's title and accessible description. With no children, the description renders the card's `CardSummary` before its text, so the prompt names the card it removes; that `CardSummary` reads the description's `cardEndingIn` message as its `endingIn`.
|
|
137
135
|
|
|
138
136
|
### AccountSavedCardRemoveCancel
|
|
139
137
|
|
|
@@ -158,23 +156,26 @@ The status region stays mounted so screen readers announce it. No message disapp
|
|
|
158
156
|
|
|
159
157
|
## Text
|
|
160
158
|
|
|
161
|
-
Every text
|
|
159
|
+
Every text is `children` or else the part's own message field (`$content`). A missing message, absent or blank, renders empty and logs an error; no part falls back to other text.
|
|
162
160
|
|
|
163
|
-
| Part |
|
|
164
|
-
|
|
165
|
-
| `AccountSavedCardsHeading` | `text` |
|
|
166
|
-
| `AccountSavedCardsEmpty` | `text` |
|
|
167
|
-
| `AccountSavedCardsLoading` | `text` |
|
|
168
|
-
| `AccountSavedCardsError` | `text`, `sessionExpiredText`, `signInLabel` |
|
|
169
|
-
| `AccountSavedCardExpiry` | `expiresLabel`, `expiredLabel`, `expiredText`, `unusableText` |
|
|
170
|
-
| `
|
|
171
|
-
| `
|
|
172
|
-
| `
|
|
173
|
-
| `
|
|
174
|
-
| `
|
|
175
|
-
| `
|
|
176
|
-
|
|
177
|
-
|
|
161
|
+
| Part | Message fields |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `AccountSavedCardsHeading` | `text` |
|
|
164
|
+
| `AccountSavedCardsEmpty` | `text` |
|
|
165
|
+
| `AccountSavedCardsLoading` | `text` |
|
|
166
|
+
| `AccountSavedCardsError` | `text`, `sessionExpiredText`, `signInLabel` |
|
|
167
|
+
| `AccountSavedCardExpiry` | `expiresLabel`, `expiredLabel`, `expiredText`, `unusableText` |
|
|
168
|
+
| `CardSummary` | `endingIn` (`lastDigits`) |
|
|
169
|
+
| `AccountSavedCardRemoveTrigger` | `text`, `cardEndingIn` (`lastDigits`) |
|
|
170
|
+
| `AccountSavedCardRemoveTitle` | `text` |
|
|
171
|
+
| `AccountSavedCardRemoveDescription` | `text`, `cardEndingIn` (`lastDigits`) |
|
|
172
|
+
| `AccountSavedCardRemoveCancel` | `text` |
|
|
173
|
+
| `AccountSavedCardRemoveConfirm` | `text`, `pendingText` |
|
|
174
|
+
| `AccountSavedCardsRemoveFeedback` | `successText`, `failureText`, `sessionExpiredText`, `signInLabel` |
|
|
175
|
+
|
|
176
|
+
Every field is an ICU message (`format: 'icu-message'`). The trigger's hidden card name is the card's name followed by its `cardEndingIn` message.
|
|
177
|
+
|
|
178
|
+
`AccountSavedCardExpiry` and `AccountSavedCardsRemoveFeedback` take no children. `expiresLabel` and `expiredLabel` precede the date, which the component always places; `expiredText` and `unusableText` stand alone. The trigger's hidden card name follows its text whatever the source. Children on the Confirm replace only its idle label. Only a part placed in the schema has `$content`, so the Item and `AccountSavedCardRemove` have no default parts. The `CardSummary` that `AccountSavedCardRemoveDescription` renders with no children is the exception: the description passes it its own `cardEndingIn` message.
|
|
178
179
|
|
|
179
180
|
## Canonical schema example
|
|
180
181
|
|
|
@@ -196,8 +197,7 @@ Every text resolves in this order: `children`, then the part's CMS entry (`$cont
|
|
|
196
197
|
"saved-cards-loading": { "type": "AccountSavedCardsLoading" },
|
|
197
198
|
"saved-cards-error": { "type": "AccountSavedCardsError" },
|
|
198
199
|
"saved-cards-empty": { "type": "AccountSavedCardsEmpty" },
|
|
199
|
-
"saved-cards-list": { "type": "AccountSavedCardsList", "children": ["saved-card-item"] }
|
|
200
|
-
"saved-card-item": { "type": "AccountSavedCardItem" }
|
|
200
|
+
"saved-cards-list": { "type": "AccountSavedCardsList", "children": ["saved-card-item"] }
|
|
201
201
|
}
|
|
202
202
|
```
|
|
203
203
|
|
|
@@ -209,7 +209,7 @@ Nested inside another account page, with a lower heading:
|
|
|
209
209
|
}
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
The row, composed part by part, since the Item and `AccountSavedCardRemove` render only their children:
|
|
213
213
|
|
|
214
214
|
```json
|
|
215
215
|
{
|
|
@@ -251,13 +251,14 @@ With the row composed, so the expiry line and the removal prompt can be reworded
|
|
|
251
251
|
|
|
252
252
|
- **`AccountSavedCards`, `SavedCardsList`, `MyCards`.** The Root is `AccountSavedCardsRoot`; the list is `AccountSavedCardsList`.
|
|
253
253
|
- **Using `SavedCards` or `SavedCardOption` in the account.** Those are the checkout's cart-scoped picker and need a payment section.
|
|
254
|
+
- **Using `AccountSavedCardRemove` or its parts in the checkout's saved-card list.** They need `AccountSavedCardsRoot` and read the `CustomerSavedCard` entity, which a checkout row is not. The checkout removes an expired card with `SavedCardRemove` inside `SavedCardOption` (see [[saved-cards]]), which calls the same `savedCard.remove` action with the account-side id.
|
|
254
255
|
- **Placing `AccountSavedCardItem` directly in the Root.** It must be inside `AccountSavedCardsList`.
|
|
255
256
|
- **Composing `AccountSavedCardsEmpty` as the only state part.** Compose Loading and Error too, or a slow or failed read shows nothing under the heading.
|
|
256
257
|
- **Setting `as: "h1"`.** Not accepted; the page title belongs to the page shell.
|
|
257
|
-
- **
|
|
258
|
+
- **Leaving a message field blank.** Nothing falls back: the part renders that text empty and logs an error.
|
|
258
259
|
- **Placing the Root outside the `my-account` layout.** It requires `session`; without a `SessionRoot` the build fails.
|
|
259
260
|
- **Giving the Item custom children without `AccountSavedCardExpiry`.** The row then hides when the card expires and whether it can be used.
|
|
260
|
-
- **
|
|
261
|
+
- **Leaving an Item or `AccountSavedCardRemove` with no children.** Neither has a default: the row renders empty and the prompt never appears. Place `CardSummary`, `AccountSavedCardExpiry` and the `AccountSavedCardRemove` composition explicitly.
|
|
261
262
|
- **Giving the Item custom children without `AccountSavedCardRemove`.** The shopper can no longer remove the card. Do it only for a read-only list.
|
|
262
263
|
- **Leaving out `AccountSavedCardsRemoveFeedback`.** A removal then ends with no message: a success only drops the row, and a failure says nothing.
|
|
263
264
|
- **Placing the feedback inside the Item.** A removed card's row unmounts, taking the message with it.
|
|
@@ -273,24 +274,28 @@ With the row composed, so the expiry line and the removal prompt can be reworded
|
|
|
273
274
|
| `AccountSavedCardsRoot` | Section spacing | `flex flex-col gap-[16px]` |
|
|
274
275
|
| `AccountSavedCardsHeading` | Heading typography | `text-[20px] font-semibold text-[#1F1F1F]` |
|
|
275
276
|
| `AccountSavedCardsList` | Row stack | `flex flex-col gap-[8px]` |
|
|
276
|
-
| `AccountSavedCardItem` | Row box; dim expired and unusable rows | `rounded-[8px] border border-[
|
|
277
|
-
| `AccountSavedCardExpiry` | Line typography; color by state | `mt-[4px] text-[13px] text-[
|
|
278
|
-
| `AccountSavedCardsEmpty` | Statement typography | `text-[14px] text-[
|
|
277
|
+
| `AccountSavedCardItem` | Row box; dim expired and unusable rows | `rounded-[8px] border border-[var(--color-border)] p-[12px] data-[fs-account-saved-card-expired]:opacity-60 data-[fs-account-saved-card-unusable]:opacity-60` |
|
|
278
|
+
| `AccountSavedCardExpiry` | Line typography; color by state | `mt-[4px] text-[13px] text-[var(--color-text-muted)] data-[fs-account-saved-card-expiry-status=expired]:text-[var(--color-feedback-danger)] data-[fs-account-saved-card-expiry-status=unusable]:text-[var(--color-feedback-danger)]` |
|
|
279
|
+
| `AccountSavedCardsEmpty` | Statement typography | `text-[14px] text-[var(--color-text-muted)]` |
|
|
279
280
|
| `AccountSavedCardsLoading` | Placeholder stack; rows via `[&_[data-fs-account-saved-cards-loading-row]]` | `flex flex-col gap-[8px] [&_[data-fs-account-saved-cards-loading-row]]:h-[48px] [&_[data-fs-account-saved-cards-loading-row]]:rounded-[8px] [&_[data-fs-account-saved-cards-loading-row]]:bg-[#F0F0F0]` |
|
|
280
|
-
| `AccountSavedCardsError` | Alert box and link | `rounded-[8px] bg-[#FDECEC] p-[12px] text-[14px] text-[
|
|
281
|
+
| `AccountSavedCardsError` | Alert box and link | `rounded-[8px] bg-[#FDECEC] p-[12px] text-[14px] text-[var(--color-feedback-danger)] [&_a]:underline` |
|
|
281
282
|
| `AccountSavedCardItem` (removing) | Fade the row while it is removed | `data-[fs-account-saved-card-removing]:opacity-60` |
|
|
282
|
-
| `AccountSavedCardRemoveTrigger` | Link-like control | `mt-[8px] text-[13px] text-[
|
|
283
|
+
| `AccountSavedCardRemoveTrigger` | Link-like control | `mt-[8px] text-[13px] text-[var(--color-feedback-danger)] underline disabled:opacity-50` |
|
|
283
284
|
| `AlertDialogPopup` | Prompt box (style the AlertDialog parts directly) | `w-full max-w-[420px] rounded-[12px] bg-white p-[24px] shadow-xl` |
|
|
284
|
-
| `AccountSavedCardRemoveConfirm` | Destructive button; dim while pending | `rounded-[6px] bg-[
|
|
285
|
-
| `AccountSavedCardsRemoveFeedback` | Message typography; alert color | `text-[14px] [&_[role=alert]]:text-[
|
|
285
|
+
| `AccountSavedCardRemoveConfirm` | Destructive button; dim while pending | `rounded-[6px] bg-[var(--color-feedback-danger)] px-[16px] py-[8px] text-white aria-disabled:opacity-70` |
|
|
286
|
+
| `AccountSavedCardsRemoveFeedback` | Message typography; alert color | `text-[14px] [&_[role=alert]]:text-[var(--color-feedback-danger)] [&_a]:underline` |
|
|
286
287
|
|
|
287
288
|
```json
|
|
288
289
|
{
|
|
289
290
|
"saved-cards": { "type": "AccountSavedCardsRoot", "style": ["flex", "flex-col", "gap-[16px]"] },
|
|
290
|
-
"saved-card-item": { "type": "AccountSavedCardItem", "style": ["rounded-[8px]", "border", "border-[
|
|
291
|
+
"saved-card-item": { "type": "AccountSavedCardItem", "style": ["rounded-[8px]", "border", "border-[var(--color-border)]", "p-[12px]"] }
|
|
291
292
|
}
|
|
292
293
|
```
|
|
293
294
|
|
|
295
|
+
The role colors above are the foundation's `visualIdentity` roles (`--color-feedback-danger`), so they follow the store when it changes them.
|
|
296
|
+
|
|
297
|
+
The colors that several elements share are variables of the page or layout `theme`, which declares them: `{"--color-border": "#E5E5E5", "--color-text-muted": "#6B6B6B"}`. A color used once stays a hex.
|
|
298
|
+
|
|
294
299
|
---
|
|
295
300
|
|
|
296
301
|
## Related
|
|
@@ -185,7 +185,7 @@ A delete-address confirmation. The confirm `Button` is inert here: in a store, t
|
|
|
185
185
|
|
|
186
186
|
| Component | What you style | Plausible classes |
|
|
187
187
|
|---|---|---|
|
|
188
|
-
| `AlertDialogTrigger` | The button that opens the prompt | `px-[16px] py-[8px] text-[14px] font-medium text-[
|
|
188
|
+
| `AlertDialogTrigger` | The button that opens the prompt | `px-[16px] py-[8px] text-[14px] font-medium text-[var(--color-feedback-danger)] border border-[#FDA29B] rounded-[6px]` |
|
|
189
189
|
| `AlertDialogBackdrop` | The dimmed layer over the page | `fixed inset-0 bg-black/40` |
|
|
190
190
|
| `AlertDialogViewport` | Fixed positioning and centering of the popup | `fixed inset-0 flex items-center justify-center p-[16px]` |
|
|
191
191
|
| `AlertDialogPopup` | The card: layout, background, radius, shadow, and its enter and exit | `flex flex-col gap-[8px] w-full max-w-[448px] p-[24px] bg-white rounded-[12px] shadow-xl data-[starting-style]:opacity-0 data-[ending-style]:opacity-0` |
|
|
@@ -195,6 +195,8 @@ A delete-address confirmation. The confirm `Button` is inert here: in a store, t
|
|
|
195
195
|
|
|
196
196
|
`AlertDialogRoot` and `AlertDialogPortal` have no styling surface. Base UI sets `data-open`, `data-closed`, `data-starting-style`, and `data-ending-style` on the popup and the backdrop, so enter and exit animations key on those attributes.
|
|
197
197
|
|
|
198
|
+
The role colors above are the foundation's `visualIdentity` roles (`--color-feedback-danger`), so they follow the store when it changes them.
|
|
199
|
+
|
|
198
200
|
---
|
|
199
201
|
|
|
200
202
|
## Related
|
package/dist/docs/avatar.md
CHANGED
|
@@ -77,7 +77,7 @@ The fallback shows whenever there is no image, the image is still loading, or it
|
|
|
77
77
|
|
|
78
78
|
| Component | What you style | Plausible classes |
|
|
79
79
|
|---|---|---|
|
|
80
|
-
| `Avatar` | `data-fs-avatar` is the circle: size, shape, background, and the initials' type | `inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[
|
|
80
|
+
| `Avatar` | `data-fs-avatar` is the circle: size, shape, background, and the initials' type | `inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[var(--color-surface-strong)] text-[14px] font-medium` |
|
|
81
81
|
| Image | `data-fs-avatar-image` is the `<img>` once loaded | `size-full object-cover` |
|
|
82
82
|
| Initials | `data-fs-avatar-fallback` is the initials span | `uppercase` |
|
|
83
83
|
|
|
@@ -88,12 +88,14 @@ The fallback shows whenever there is no image, the image is still loading, or it
|
|
|
88
88
|
"props": { "name": "Jane Doe", "alt": "Jane Doe" },
|
|
89
89
|
"style": [
|
|
90
90
|
"inline-flex", "size-10", "shrink-0", "items-center", "justify-center", "overflow-hidden",
|
|
91
|
-
"rounded-full", "bg-[
|
|
91
|
+
"rounded-full", "bg-[var(--color-surface-strong)]", "text-[14px]", "font-medium", "[&_img]:size-full", "[&_img]:object-cover"
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
+
The colors that several elements share are variables of the page or layout `theme`, which declares them: `{"--color-surface-strong": "#E5E7EB"}`. A color used once stays a hex.
|
|
98
|
+
|
|
97
99
|
---
|
|
98
100
|
|
|
99
101
|
## Related
|
|
@@ -90,27 +90,37 @@ a form the shopper cannot see.
|
|
|
90
90
|
|
|
91
91
|
| Prop | Type | Default | Notes |
|
|
92
92
|
|------|------|---------|-------|
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `countryLabel` | string | `"Country"` | Label for the country selector inside the custom form. |
|
|
96
|
-
| `recipientNameLabel` | string | `"Recipient's name"` | Label for the recipient-name descriptor field. Not rendered by the custom-address form today — the write contract has no matching input slot — kept for parity with the other seven field labels. |
|
|
97
|
-
| `streetLabel` | string | `"Street"` | Label for the street descriptor field. |
|
|
98
|
-
| `numberLabel` | string | `"Number"` | Label for the street-number descriptor field. |
|
|
99
|
-
| `complementLabel` | string | `"Complement (optional)"` | Label for the complement descriptor field. Its "(optional)" suffix is the only signal that the field is not required — the actual `required` attribute is driven independently, so authoring this without the suffix loses the visual cue, not the behavior. |
|
|
100
|
-
| `neighborhoodLabel` | string | `"Neighborhood"` | Label for the neighborhood descriptor field. Unused when the active country's descriptor has no `neighborhood` field (e.g. USA). |
|
|
101
|
-
| `cityLabel` | string | `"City"` | Label for the city descriptor field. |
|
|
102
|
-
| `stateLabel` | string | `"State"` | Label for the state descriptor field. |
|
|
103
|
-
| `postalCodeLabel` | string | `"Postal code"` | Label for the postal-code descriptor field. |
|
|
104
|
-
| `submitLabel` | string | `"Save billing address"` | Label for the button that persists a custom address. |
|
|
105
|
-
| `submitPendingLabel` | string | `"Saving..."` | Submit button's label while the write is in flight. |
|
|
106
|
-
| `requiredNoticeLabel` | string | `"This payment method requires a billing address."` | Shown when the selected method's validator marks a billing address required. |
|
|
107
|
-
| `unsavedAddressNoticeLabel` | string | `"No billing address has been saved yet — the delivery address will be used unless you save one below."` | Shown, `role="status"`, while the custom-address form is open and no address has been persisted yet. |
|
|
108
|
-
| `billingMatchNoticeLabel` | string | `"Your billing address must match the one on your card or bank statement, or your bank may decline the order."` | Always-on billing-match disclaimer. Gated only by this prop and `billingMatchNoticeVisible` — unlike the two notices above, it never changes with the toggle, the form, `billingAddressRequired`, or a saved address. |
|
|
109
|
-
| `billingMatchNoticeVisible` | boolean | `true` | Switches the billing-match disclaimer above on or off. A blank `billingMatchNoticeLabel` also renders nothing, even while this is `true` — the two rules never combine into an empty element. |
|
|
110
|
-
| `fieldRequiredMessage` | string | `"This field is required."` | Shown as an inline field error under a required, blank address field once it has been touched (T38) — see Accessibility Contract below. One prop, not one per field: every rendered field but `complement` shares the same rule. An authored empty or whitespace-only string falls back to this default. |
|
|
111
|
-
| `postalCodeInvalidMessage` | string | `"Enter a valid postal code."` | Shown as an inline field error under a touched, non-blank postal code that does not match the selected country's format (the descriptor's `rule.pattern`, the same one the delivery form enforces). Only the postal code reads this prop; the English default matches every other default on this form, so an author localises it with the rest. A blank postal code reads `fieldRequiredMessage` instead, never this. The message never contains the typed value. An authored empty or whitespace-only string falls back to this default. |
|
|
93
|
+
| `defaultCountry` | string | `"BRA"` | Initial country selected when the custom form first mounts: `BRA`, `USA`, `CAN` or `MEX`. The store authors it; the form does not follow the store's own country. A code with no descriptor falls back to the first available country (`BRA`); `CAN` and `MEX` are kept while their descriptor is still loading, and the form shows the country and no fields until it arrives. |
|
|
94
|
+
| `billingMatchNoticeVisible` | boolean | `true` | Switches the billing-match disclaimer on or off. A blank `billingMatchNoticeLabel` message also renders nothing, even while this is `true` — the two rules never combine into an empty element. |
|
|
112
95
|
| `disabled` | boolean | `false` | Disables the toggle, every form field, the country selector, and the submit button. |
|
|
113
96
|
|
|
97
|
+
**Content (`billing-address`):** every word of the form is a message field the store authors in `$content`; a missing or blank one renders empty and logs `message.missing`. Country names in the selector are not copy: they come from `Intl.DisplayNames` in the store locale ("Brazil" in `en-US`, "Brasil" in `pt-BR`).
|
|
98
|
+
|
|
99
|
+
| Field | Source (English) | Notes |
|
|
100
|
+
|-------|------------------|-------|
|
|
101
|
+
| `sameAsDeliveryLabel` | `Billing address same as delivery address` | The toggle's own label text. |
|
|
102
|
+
| `countryLabel` | `Country` | Label for the country selector inside the custom form. |
|
|
103
|
+
| `recipientNameLabel` | `Recipient's name` | Label for the recipient-name descriptor field. Not rendered by the custom-address form today — the write contract has no matching input slot — kept for parity with the other seven field labels. |
|
|
104
|
+
| `streetLabel` | `Street` | Label for the street descriptor field. |
|
|
105
|
+
| `numberLabel` | `Number` | Label for the street-number descriptor field. |
|
|
106
|
+
| `complementLabel` | `Complement (optional)` | Label for the complement descriptor field. Its "(optional)" suffix is the only signal that the field is not required — the actual `required` attribute is driven independently, so authoring this without the suffix loses the visual cue, not the behavior. |
|
|
107
|
+
| `neighborhoodLabel` | `Neighborhood` | Label for the neighborhood descriptor field. Unused when the active country's descriptor has no `neighborhood` field (e.g. USA or Canada). |
|
|
108
|
+
| `cityLabel` | `City` | Label for the city descriptor field. |
|
|
109
|
+
| `stateLabel` | `State` | Label for the state descriptor field. |
|
|
110
|
+
| `postalCodeLabel` | `Postal code` | Label for the postal-code descriptor field. |
|
|
111
|
+
| `submitLabel` | `Save billing address` | Label for the button that persists a custom address. |
|
|
112
|
+
| `submitPendingLabel` | `Saving...` | Submit button's label while the write is in flight. |
|
|
113
|
+
| `requiredNoticeLabel` | `This payment method requires a billing address.` | Shown when the selected method's validator marks a billing address required. |
|
|
114
|
+
| `unsavedAddressNoticeLabel` | `No billing address has been saved yet — the delivery address will be used unless you save one below.` | Shown, `role="status"`, while the custom-address form is open and no address has been persisted yet. |
|
|
115
|
+
| `billingMatchNoticeLabel` | `Your billing address must match the one on your card or bank statement, or your bank may decline the order.` | Always-on billing-match disclaimer. Gated only by this message and `billingMatchNoticeVisible` — unlike the two notices above, it never changes with the toggle, the form, `billingAddressRequired`, or a saved address. |
|
|
116
|
+
| `fieldRequiredMessage` | `This field is required.` | Shown as an inline field error under a required, blank address field once it has been touched (T38) — see Accessibility Contract below. One field, not one per address field: every rendered field but `complement` shares the same rule. |
|
|
117
|
+
| `postalCodeInvalidMessage` | `Enter a valid postal code.` | Shown as an inline field error under a touched, non-blank postal code that does not match the selected country's format (the descriptor's `rule.pattern`, the same one the delivery form enforces). Only the postal code reads it. A blank postal code reads `fieldRequiredMessage` instead, never this. The message never contains the typed value. |
|
|
118
|
+
| `missingFieldsMessage` | `Fill in the postal code and the country of your billing address.` | Inline alert when the server refuses the address without a postal code or country (`MISSING_BILLING_ADDRESS_FIELDS`). |
|
|
119
|
+
| `invalidCountryMessage` | `Choose a valid country for your billing address.` | Inline alert when the server refuses the country (`INVALID_COUNTRY_CODE`). |
|
|
120
|
+
| `genericErrorMessage` | `Unable to save your billing address. Please try again.` | Inline alert for `MISSING_CART_CONTEXT`, `CART_NOT_FOUND` and `NETWORK_ERROR`. A code the package does not know (one a newer server added) shows it too and logs `message.unknown-code`. |
|
|
121
|
+
|
|
122
|
+
A field a library-backed descriptor adds with no label field here shows its canonical field name.
|
|
123
|
+
|
|
114
124
|
**Data:** declares no fragment and no `fetchStrategy`, so it fetches no shopper data. It reads only the
|
|
115
125
|
payment context (`requiresContext: 'payment'`): the selected method's validator and the shared payment
|
|
116
126
|
draft. **Nothing prefills the custom-address form** — there is no server field that echoes back an
|
|
@@ -147,7 +157,7 @@ the blocking themselves; both stay exactly as advisory as described above.
|
|
|
147
157
|
**A third notice, `billingMatchNoticeLabel`, is configuration-driven, not state-driven like the two
|
|
148
158
|
above.** The required-note and the unsaved-notice each appear and disappear by runtime state (the
|
|
149
159
|
selected method's validator; the form being open with nothing saved yet). This one does not: its
|
|
150
|
-
presence is a pure function of `billingMatchNoticeLabel` and `billingMatchNoticeVisible` alone, and it
|
|
160
|
+
presence is a pure function of the `billingMatchNoticeLabel` message and `billingMatchNoticeVisible` alone, and it
|
|
151
161
|
renders before the toggle field on every render — including the default state, where "same as delivery"
|
|
152
162
|
stays checked and the shopper never opens the form. It never reacts to the toggle, to
|
|
153
163
|
`billingAddressRequired`, to a saved address, or to order placement; a merchant switches it off with
|
|
@@ -158,10 +168,49 @@ static disclaimer, not a live region reacting to an event.
|
|
|
158
168
|
**Focus on refusal:** while the custom-address form is open, it registers itself so that when `PlaceOrder` refuses an order because the address was never saved, keyboard focus moves into the form: to the first rendered required field that is still blank; if none is blank, to the first rendered field whose value fails its country's format (a postal code `123` for BRA); and only when every field is filled and well-formed, to the submit control. The field the focus lands on, blank or malformed, is marked touched, so its message (`required` for a blank field, `format` for a malformed one) shows with the focus and no blur is needed. The country selector is never the target, and a disabled field or a disabled submit control (for example while saving) takes no focus. The reason stays in `PlaceOrder`'s existing alert and this component's unsaved-address notice. Focus moves only on the refused click.
|
|
159
169
|
|
|
160
170
|
**Country adaptivity is entirely data-driven**, reusing the same country descriptors the delivery
|
|
161
|
-
address step uses: Brazil shows a neighborhood/bairro field, the United States
|
|
162
|
-
new country anywhere in this codebase is a data-only
|
|
163
|
-
— never a code change here.
|
|
164
|
-
|
|
171
|
+
address step uses: Brazil shows a neighborhood/bairro field, the United States and Canada do not, Mexico
|
|
172
|
+
shows a neighborhood and a number, and adding a new country anywhere in this codebase is a data-only
|
|
173
|
+
change that this component picks up automatically — never a code change here. Brazil and the United
|
|
174
|
+
States are written in the descriptor table; Canada and Mexico are read from `@vtex/country-forms` when
|
|
175
|
+
the form mounts, so the selector lists them (Brazil, United States, Canada, Mexico) once they have
|
|
176
|
+
loaded. The postal code's format is the same data: the descriptor's `rule` (a pattern for Brazil and the
|
|
177
|
+
United States, the library's own verdict for Canada and Mexico) gates the submit button and the field
|
|
178
|
+
error, so a country's format is defined once for both forms. A Canadian or Mexican postal code is
|
|
179
|
+
submitted in the library's stored form (`K1A 0B1`), not as typed.
|
|
180
|
+
|
|
181
|
+
### Countries and postal codes
|
|
182
|
+
|
|
183
|
+
The selector lists the same countries for every store. It is not filtered by the countries the store ships
|
|
184
|
+
to, because a card's billing country does not depend on where the store delivers.
|
|
185
|
+
|
|
186
|
+
Canada and Mexico take their field set and required flags from `@vtex/country-forms` (the pinned 1.14.0),
|
|
187
|
+
and the repository holds no regular expression, list or mask for either. Only the English copy is written
|
|
188
|
+
in `packages/faststore/src/matter/shipping-address/library-country-descriptors.ts`. Canada has no number
|
|
189
|
+
or neighborhood field, so a Canadian shopper types the house number inside the street. Mexico adds both,
|
|
190
|
+
and the neighborhood is required: every rendered field except the complement is, so a Mexican shopper
|
|
191
|
+
without one cannot save. The state is free text for both countries, although the library lists 13
|
|
192
|
+
provinces and 32 states.
|
|
193
|
+
|
|
194
|
+
The postal code rules are the library's. Canada refuses a first letter of D, F, I, O, Q, U or W and
|
|
195
|
+
ignores case and the space, but accepts a Z in first position and D, F, I, O, Q or U later in the code, so
|
|
196
|
+
it is looser than Canada Post's alphabet. Mexico takes five digits and refuses a value below `01000`.
|
|
197
|
+
Both judge the trimmed value, so ` 06600 ` passes. The Brazilian and US patterns test the raw value, so a
|
|
198
|
+
leading or trailing space fails them. The US pattern accepts a ZIP+4 with or without the hyphen
|
|
199
|
+
(`021011234`), and a Brazilian or US postal code is submitted exactly as typed.
|
|
200
|
+
|
|
201
|
+
Other countries need more than a data entry. The library covers `ARG`, `CHL`, `COL`, `ECU` and `PER` with a
|
|
202
|
+
select whose options depend on another field (a city or neighborhood chosen by state), which a descriptor
|
|
203
|
+
cannot express. A country with a flat field list joins by adding its ISO code to `LIBRARY_COUNTRIES` with a
|
|
204
|
+
copy row there.
|
|
205
|
+
|
|
206
|
+
If a country's chunk fails to load, it is left out of the selector, the form keeps working with the others,
|
|
207
|
+
nothing is shown about it, and the next mount retries it.
|
|
208
|
+
|
|
209
|
+
The server does not back the client rule. `paymentBillingAddressUpdate` checks only that `postalCode` and
|
|
210
|
+
`country` are present and that the country is three capital letters, so this verdict is the only postal
|
|
211
|
+
code guard for billing. Two answers were not measured on a live Canadian or Mexican account: which `state`
|
|
212
|
+
value the Checkout expects (`ON` or `Ontario`, `CMX` or `Ciudad de México`), and whether a card issuer's
|
|
213
|
+
address check wants the Canadian postal code with or without the space.
|
|
165
214
|
|
|
166
215
|
---
|
|
167
216
|
|
|
@@ -175,7 +224,25 @@ gates the submit button and the field error, so a country's format is defined on
|
|
|
175
224
|
},
|
|
176
225
|
"billing-address": {
|
|
177
226
|
"type": "BillingAddress",
|
|
178
|
-
"props": {
|
|
227
|
+
"props": {
|
|
228
|
+
"sameAsDeliveryLabel": "Billing address same as delivery address",
|
|
229
|
+
"countryLabel": "Country",
|
|
230
|
+
"streetLabel": "Street",
|
|
231
|
+
"numberLabel": "Number",
|
|
232
|
+
"complementLabel": "Complement (optional)",
|
|
233
|
+
"neighborhoodLabel": "Neighborhood",
|
|
234
|
+
"cityLabel": "City",
|
|
235
|
+
"stateLabel": "State",
|
|
236
|
+
"postalCodeLabel": "Postal code",
|
|
237
|
+
"recipientNameLabel": "Recipient's name",
|
|
238
|
+
"submitLabel": "Save billing address",
|
|
239
|
+
"submitPendingLabel": "Saving...",
|
|
240
|
+
"requiredNoticeLabel": "This payment method requires a billing address.",
|
|
241
|
+
"unsavedAddressNoticeLabel": "No billing address has been saved yet — the delivery address will be used unless you save one below.",
|
|
242
|
+
"billingMatchNoticeLabel": "Your billing address must match the one on your card or bank statement, or your bank may decline the order.",
|
|
243
|
+
"fieldRequiredMessage": "This field is required.",
|
|
244
|
+
"postalCodeInvalidMessage": "Enter a valid postal code."
|
|
245
|
+
},
|
|
179
246
|
"style": ["flex", "flex-col", "gap-3"]
|
|
180
247
|
}
|
|
181
248
|
}
|
|
@@ -229,13 +296,15 @@ while the box is unchecked, and an optional inline error.
|
|
|
229
296
|
| Same as delivery (`data-fs-billing-address-same-as-delivery`) | Present on the root while the box is checked, absent while it is unchecked. It sits on the node the style array styles, so target it as `data-[fs-billing-address-same-as-delivery]:…`, never with a descendant variant | `data-[fs-billing-address-same-as-delivery]:gap-[8px]` |
|
|
230
297
|
| Panel (`data-fs-billing-address-panel`) | Always present, right after the toggle field, and the toggle's `aria-controls` target. `hidden` and empty while the box is checked; holds the custom-form wrapper while unchecked. Never give it a display utility (`flex`, `grid`, `block`, …): one defeats `hidden` | none — style the form inside it |
|
|
231
298
|
| Custom-form wrapper (`data-fs-billing-address-form`), inside the panel | Field grid | `grid grid-cols-2 gap-[8px]` |
|
|
232
|
-
| Required-billing-address note (`data-fs-billing-address-required-note`) | De-emphasized helper text | `text-[12px] text-[
|
|
233
|
-
| Unsaved-address notice (`data-fs-billing-address-unsaved-notice`) | De-emphasized, non-error helper text | `text-[12px] text-[
|
|
234
|
-
| Billing-match disclaimer (`data-fs-billing-address-match-notice`) | De-emphasized helper text, first child of the root | `text-[12px] text-[
|
|
235
|
-
| Field error (`data-fs-field-error`) | Per-field validation message, shown once a field is touched: a blank required field, or a non-blank postal code that fails the country's format (T38); a refused submit that focuses the field touches it without a blur | `text-[12px] font-medium
|
|
236
|
-
| Inline error (`data-fs-billing-address-error`) | Warning-toned alert text | `text-[12px] font-medium
|
|
299
|
+
| Required-billing-address note (`data-fs-billing-address-required-note`) | De-emphasized helper text | `text-[12px] text-[color-mix(in_srgb,var(--color-ink)_60%,transparent)]` |
|
|
300
|
+
| Unsaved-address notice (`data-fs-billing-address-unsaved-notice`) | De-emphasized, non-error helper text | `text-[12px] text-[color-mix(in_srgb,var(--color-ink)_60%,transparent)]` |
|
|
301
|
+
| Billing-match disclaimer (`data-fs-billing-address-match-notice`) | De-emphasized helper text, first child of the root | `text-[12px] text-[color-mix(in_srgb,var(--color-ink)_60%,transparent)]` |
|
|
302
|
+
| Field error (`data-fs-field-error`) | Per-field validation message, shown once a field is touched: a blank required field, or a non-blank postal code that fails the country's format (T38); a refused submit that focuses the field touches it without a blur | `text-[12px] font-medium` |
|
|
303
|
+
| Inline error (`data-fs-billing-address-error`) | Warning-toned alert text | `text-[12px] font-medium` |
|
|
237
304
|
| Placing (`data-fs-billing-address-placing`) | Present while an order-placement sequence is in flight (T28) — distinct from `data-fs-billing-address-pending`, which this component already emits for its own local submit dispatch; the root is also `inert` and `aria-disabled` while placing | `opacity-60 cursor-not-allowed` |
|
|
238
305
|
|
|
306
|
+
A status color is a `visualIdentity` feedback role of the foundation: when the store declares them, color the error row `text-[var(--color-feedback-danger)]`, the success row `text-[var(--color-feedback-success)]` and the notice row `text-[var(--color-feedback-warning)]`, never with a hex.
|
|
307
|
+
|
|
239
308
|
Styled example:
|
|
240
309
|
|
|
241
310
|
```json
|
|
@@ -41,8 +41,11 @@ Renders a host `div` (`data-fs-binding-switcher`). No fragment. Declares `action
|
|
|
41
41
|
| Prop | Type | Default | Notes |
|
|
42
42
|
|------|------|---------|-------|
|
|
43
43
|
| `bindings` | object | — | `foundation.json` `localization.bindings`, keyed by binding id. No library default. The store passes `$data.Global.localization.bindings`. |
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
|
|
45
|
+
Copy comes from `$content` (content type `binding-switcher`):
|
|
46
|
+
|
|
47
|
+
- **`label`:** the accessible name, rendered as the select label.
|
|
48
|
+
- **`notice`:** shown when the page loaded with `fs_notice=no-equivalent`. Inline `<output>` (implicit `status` role).
|
|
46
49
|
|
|
47
50
|
---
|
|
48
51
|
|
package/dist/docs/buy-button.md
CHANGED
|
@@ -75,12 +75,9 @@ Root data provider. Declares the GraphQL fragment and exposes product/variant co
|
|
|
75
75
|
|
|
76
76
|
### BuyButtonButton
|
|
77
77
|
|
|
78
|
-
The rendered button. Dispatches `$actions.cart.addItem(...)` on click.
|
|
78
|
+
The rendered button. Dispatches `$actions.cart.addItem(...)` on click. No props.
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|------|------|---------|-------|
|
|
82
|
-
| `availableLabel` | string | `"Comprar"` | Label shown when the variant is available for sale |
|
|
83
|
-
| `unavailableLabel` | string | `"Indisponivel"` | Label shown when the variant is not available |
|
|
80
|
+
**Content model** (`buy-button-labels`): `availableLabel` (shown when the variant is available for sale) and `unavailableLabel` (shown when it is not), both ICU messages read only from `$content`. A missing message renders empty and logs `message.missing`. `children` replaces the label, and then no message is formatted.
|
|
84
81
|
|
|
85
82
|
**Actions:** declares `actions: { cart: ['addItem'] }`; the compiler threads the `addItem` handler in via `$actions.cart`. Renders `null` when `BuyButtonRoot` has no valid variant data. Disabled (and `aria-busy`) while the add is in-flight (the button tracks its own pending state). Must be a descendant of `BuyButtonRoot`.
|
|
86
83
|
|
|
@@ -132,9 +129,9 @@ Fill each element's `style` array with Tailwind classes read off the image. Typi
|
|
|
132
129
|
| Component | What you style | Plausible classes |
|
|
133
130
|
|---|---|---|
|
|
134
131
|
| `BuyButtonRoot` | Layout wrapper only — it renders no box of its own | `block w-full mt-[8px]` |
|
|
135
|
-
| `BuyButtonButton` | The CTA: full-width pill in the brand color, with hover and disabled states | `inline-flex items-center justify-center w-full h-[44px] px-[20px] bg-[
|
|
132
|
+
| `BuyButtonButton` | The CTA: full-width pill in the brand color, with hover and disabled states | `inline-flex items-center justify-center w-full h-[44px] px-[20px] bg-[var(--color-primary)] text-white rounded-[4px] text-[14px] font-bold uppercase cursor-pointer transition-colors hover:bg-[var(--color-primary-hover)] disabled:opacity-50 disabled:cursor-not-allowed` |
|
|
136
133
|
|
|
137
|
-
|
|
134
|
+
The button's fill is the brand color, so write it as the role's variable (`bg-[var(--color-primary)]`), never as the hex read off the image. Its hover and active shades are slightly darker values that several elements of the page share, so declare them in the page or layout `theme` (`--color-primary-hover`, `--color-primary-active`). Always include `disabled:` styling — the button auto-disables when the variant is unavailable.
|
|
138
135
|
|
|
139
136
|
Styled example:
|
|
140
137
|
|
|
@@ -148,11 +145,13 @@ Styled example:
|
|
|
148
145
|
"buy-button-action": {
|
|
149
146
|
"type": "BuyButtonButton",
|
|
150
147
|
"props": { "availableLabel": "Comprar", "unavailableLabel": "Indisponível" },
|
|
151
|
-
"style": ["inline-flex", "items-center", "justify-center", "w-full", "h-[44px]", "px-[20px]", "bg-[
|
|
148
|
+
"style": ["inline-flex", "items-center", "justify-center", "w-full", "h-[44px]", "px-[20px]", "bg-[var(--color-primary)]", "text-white", "rounded-[4px]", "text-[14px]", "font-bold", "tracking-[0.06em]", "uppercase", "cursor-pointer", "transition-colors", "duration-150", "hover:bg-[var(--color-primary-hover)]", "active:bg-[var(--color-primary-active)]", "disabled:opacity-50", "disabled:cursor-not-allowed"]
|
|
152
149
|
}
|
|
153
150
|
}
|
|
154
151
|
```
|
|
155
152
|
|
|
153
|
+
The page or layout `theme` that declares the shades: `{"--color-primary-hover": "#A50D26", "--color-primary-active": "#8A0B20"}`.
|
|
154
|
+
|
|
156
155
|
---
|
|
157
156
|
|
|
158
157
|
## Related
|