@vtex/faststore 0.0.7 → 0.0.10
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 +102 -0
- package/dist/actions.json +194 -1
- package/dist/catalog.json +3449 -1612
- package/dist/cli/index.d.ts +512 -63
- package/dist/cli/index.js +2098 -686
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/server-runtime.js +44 -24
- package/dist/cli/server-runtime.js.map +1 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +5 -1
- package/dist/components.d.ts +42 -10
- package/dist/components.js +47 -15
- package/dist/content-types.json +823 -0
- package/dist/core/dist/define-component.d.ts +12 -2
- package/dist/docs/account-access-gate.md +4 -4
- package/dist/docs/account-address-book.md +519 -0
- package/dist/docs/account-entry-point.md +5 -5
- package/dist/docs/account-menu.md +7 -7
- package/dist/docs/account-saved-cards.md +301 -0
- package/dist/docs/alert-dialog.md +2 -2
- package/dist/docs/billing-address.md +17 -9
- package/dist/docs/binding-switcher.md +154 -0
- package/dist/docs/card-entry.md +38 -7
- package/dist/docs/card-summary.md +175 -0
- package/dist/docs/cardholder-document.md +16 -14
- package/dist/docs/cart-destination.md +238 -0
- package/dist/docs/cart-item.md +22 -4
- package/dist/docs/cart-totalizer.md +1 -1
- package/dist/docs/cart.md +126 -19
- package/dist/docs/client-profile-fieldset.md +7 -5
- package/dist/docs/copy-text.md +84 -0
- package/dist/docs/document-field.md +8 -8
- package/dist/docs/footer-link-group.md +2 -2
- package/dist/docs/footer-social.md +1 -1
- package/dist/docs/free-shipping-progress.md +13 -9
- package/dist/docs/header-root.md +1 -1
- package/dist/docs/incentives.md +4 -4
- package/dist/docs/logo.md +6 -6
- package/dist/docs/my-account-profile.md +4 -4
- package/dist/docs/navigation-link-list.md +2 -2
- package/dist/docs/navigation-link.md +3 -3
- package/dist/docs/order-cancel.md +52 -0
- package/dist/docs/order-delivery-address.md +63 -0
- package/dist/docs/order-delivery-group.md +83 -0
- package/dist/docs/order-details-back.md +41 -0
- package/dist/docs/order-details-header.md +48 -0
- package/dist/docs/order-list-row.md +46 -0
- package/dist/docs/order-list-search.md +101 -0
- package/dist/docs/order-list-views.md +97 -0
- package/dist/docs/order-list.md +94 -0
- package/dist/docs/order-payment.md +94 -0
- package/dist/docs/order-placed-date.md +49 -0
- package/dist/docs/order-placed-payment-summary.md +13 -15
- package/dist/docs/order-placed.md +225 -0
- package/dist/docs/order-progress.md +88 -0
- package/dist/docs/order-status-badge.md +91 -0
- package/dist/docs/order-summary.md +53 -0
- package/dist/docs/payment-method-badges.md +16 -5
- package/dist/docs/payment-methods.md +1 -1
- package/dist/docs/place-order.md +13 -9
- package/dist/docs/product-information.md +2 -2
- package/dist/docs/product-shelf.md +7 -0
- package/dist/docs/saved-cards.md +2 -2
- package/dist/docs/select.md +22 -10
- package/dist/docs/session.md +1 -1
- package/dist/docs/shipping-address.md +1 -1
- package/dist/docs/sign-in-redirect.md +7 -7
- package/dist/docs/toast.md +35 -13
- package/dist/index.d.ts +7 -2
- package/dist/index.js +2 -1
- package/dist/internal/client.d.ts +9 -1
- package/dist/internal/client.js +10 -2
- package/dist/internal/server.d.ts +8 -2
- package/dist/internal/server.js +8 -2
- package/dist/matter/account-access-gate/account-access-gate.d.ts +2 -1
- package/dist/matter/account-access-gate/account-access-gate.js +19 -16
- package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
- package/dist/matter/account-address-book/account-address-book-delete.d.ts +60 -0
- package/dist/matter/account-address-book/account-address-book-delete.js +184 -0
- package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +19 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js +50 -0
- package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +42 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js +146 -0
- package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +25 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js +72 -0
- package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -0
- package/dist/matter/account-address-book/account-address-book.d.ts +120 -0
- package/dist/matter/account-address-book/account-address-book.js +469 -0
- package/dist/matter/account-address-book/account-address-book.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country-switch.js +59 -0
- package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -0
- package/dist/matter/account-address-book/account-address-country.d.ts +36 -0
- package/dist/matter/account-address-book/account-address-country.js +151 -0
- package/dist/matter/account-address-book/account-address-country.js.map +1 -0
- package/dist/matter/account-address-book/account-address-first-line.js +11 -0
- package/dist/matter/account-address-book/account-address-first-line.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form-context.d.ts +55 -0
- package/dist/matter/account-address-book/account-address-form-context.js +14 -0
- package/dist/matter/account-address-book/account-address-form-context.js.map +1 -0
- package/dist/matter/account-address-book/account-address-form.d.ts +85 -0
- package/dist/matter/account-address-book/account-address-form.js +946 -0
- package/dist/matter/account-address-book/account-address-form.js.map +1 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js +189 -0
- package/dist/matter/account-address-book/account-address-postal-autofill.js.map +1 -0
- package/dist/matter/account-address-book/account-address-record.d.ts +26 -0
- package/dist/matter/account-address-book/account-address-record.js +138 -0
- package/dist/matter/account-address-book/account-address-record.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.js +11 -11
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
- package/dist/matter/account-menu/account-menu.d.ts +7 -3
- package/dist/matter/account-menu/account-menu.js +69 -28
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-saved-cards/account-saved-cards.d.ts +383 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js +956 -0
- package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
- package/dist/matter/billing-address/billing-address.d.ts +30 -17
- package/dist/matter/billing-address/billing-address.js +128 -33
- package/dist/matter/billing-address/billing-address.js.map +1 -1
- package/dist/matter/breadcrumb/breadcrumb.js +2 -2
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/matter/card-entry/card-capture.js +4 -3
- package/dist/matter/card-entry/card-capture.js.map +1 -1
- package/dist/matter/card-entry/card-entry.d.ts +5 -3
- package/dist/matter/card-entry/card-entry.js +77 -27
- package/dist/matter/card-entry/card-entry.js.map +1 -1
- package/dist/matter/cardholder-document/cardholder-document.d.ts +10 -9
- package/dist/matter/cardholder-document/cardholder-document.js +36 -16
- package/dist/matter/cardholder-document/cardholder-document.js.map +1 -1
- package/dist/matter/cart/cart-namespace.d.ts +5 -1
- package/dist/matter/cart/cart-namespace.js +5 -1
- package/dist/matter/cart/cart-namespace.js.map +1 -1
- package/dist/matter/cart/cart.d.ts +41 -6
- package/dist/matter/cart/cart.js +267 -54
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-destination/cart-destination.d.ts +222 -0
- package/dist/matter/cart-destination/cart-destination.js +613 -0
- package/dist/matter/cart-destination/cart-destination.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +4 -2
- package/dist/matter/cart-item/cart-item.js +76 -17
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/cart-totalizer/cart-totalizer.js +3 -2
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences-fieldset.js +1 -1
- package/dist/matter/client-profile-form/client-profile-fieldset.js +8 -5
- package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +6 -3
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +76 -33
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
- package/dist/matter/identity-edit/identity-edit.js +3 -3
- package/dist/matter/identity-edit/identity-edit.js.map +1 -1
- package/dist/matter/identity-summary/identity-summary.js +2 -2
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -3
- package/dist/matter/my-account-profile/my-account-profile.js +4 -4
- package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
- package/dist/matter/order-cancel/order-cancel.d.ts +110 -0
- package/dist/matter/order-cancel/order-cancel.js +344 -0
- package/dist/matter/order-cancel/order-cancel.js.map +1 -0
- package/dist/matter/order-delivery-address/order-delivery-address.d.ts +73 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js +172 -0
- package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -0
- package/dist/matter/order-delivery-group/order-delivery-group.d.ts +128 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js +408 -0
- package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -0
- package/dist/matter/order-details-header/order-details-header.d.ts +104 -0
- package/dist/matter/order-details-header/order-details-header.js +190 -0
- package/dist/matter/order-details-header/order-details-header.js.map +1 -0
- package/dist/matter/order-list/customer-orders-filter.d.ts +12 -0
- package/dist/matter/order-list/customer-orders-filter.js +30 -0
- package/dist/matter/order-list/customer-orders-filter.js.map +1 -0
- package/dist/matter/order-list/order-list.d.ts +121 -0
- package/dist/matter/order-list/order-list.js +395 -0
- package/dist/matter/order-list/order-list.js.map +1 -0
- package/dist/matter/order-list-row/order-list-row.d.ts +44 -0
- package/dist/matter/order-list-row/order-list-row.js +127 -0
- package/dist/matter/order-list-row/order-list-row.js.map +1 -0
- package/dist/matter/order-list-search/order-list-search.d.ts +72 -0
- package/dist/matter/order-list-search/order-list-search.js +296 -0
- package/dist/matter/order-list-search/order-list-search.js.map +1 -0
- package/dist/matter/order-list-views/order-list-views.d.ts +65 -0
- package/dist/matter/order-list-views/order-list-views.js +154 -0
- package/dist/matter/order-list-views/order-list-views.js.map +1 -0
- package/dist/matter/order-payment/order-payment.d.ts +83 -0
- package/dist/matter/order-payment/order-payment.js +258 -0
- package/dist/matter/order-payment/order-payment.js.map +1 -0
- package/dist/matter/order-placed/order-placed-deliveries.d.ts +145 -0
- package/dist/matter/order-placed/order-placed-deliveries.js +380 -0
- package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -0
- package/dist/matter/order-placed/order-placed.d.ts +122 -0
- package/dist/matter/order-placed/order-placed.js +452 -0
- package/dist/matter/order-placed/order-placed.js.map +1 -0
- package/dist/matter/order-placed-date/order-placed-date.d.ts +45 -0
- package/dist/matter/order-placed-date/order-placed-date.js +92 -0
- package/dist/matter/order-placed-date/order-placed-date.js.map +1 -0
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +5 -8
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +29 -81
- package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
- package/dist/matter/order-progress/order-progress.d.ts +85 -0
- package/dist/matter/order-progress/order-progress.js +203 -0
- package/dist/matter/order-progress/order-progress.js.map +1 -0
- package/dist/matter/order-summary/order-summary.d.ts +81 -0
- package/dist/matter/order-summary/order-summary.js +192 -0
- package/dist/matter/order-summary/order-summary.js.map +1 -0
- package/dist/matter/payment/cardholder-document-rule.d.ts +35 -0
- package/dist/matter/payment/cardholder-document-rule.js +35 -0
- package/dist/matter/payment/cardholder-document-rule.js.map +1 -0
- package/dist/matter/payment/payment-card-capture.js +38 -23
- package/dist/matter/payment/payment-card-capture.js.map +1 -1
- package/dist/matter/payment/payment-controller.js +11 -0
- package/dist/matter/payment/payment-controller.js.map +1 -1
- package/dist/matter/payment/payment-method-badges.js +4 -2
- package/dist/matter/payment/payment-method-badges.js.map +1 -1
- package/dist/matter/payment/payment.js +11 -0
- package/dist/matter/payment/payment.js.map +1 -1
- package/dist/matter/payment/use-payment-method-selection.d.ts +39 -0
- package/dist/matter/payment/use-payment-method-selection.js +30 -2
- package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
- package/dist/matter/payment/use-payment-submit-gate.d.ts +16 -2
- package/dist/matter/payment/use-payment-submit-gate.js +42 -14
- package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
- package/dist/matter/place-order/place-order.d.ts +12 -7
- package/dist/matter/place-order/place-order.js +126 -103
- package/dist/matter/place-order/place-order.js.map +1 -1
- package/dist/matter/pricing/pricing.js +5 -5
- package/dist/matter/pricing/pricing.js.map +1 -1
- package/dist/matter/product-shelf/product-shelf.d.ts +7 -0
- package/dist/matter/product-shelf/product-shelf.js +115 -1
- package/dist/matter/product-shelf/product-shelf.js.map +1 -1
- package/dist/matter/region/region.js +1 -1
- package/dist/matter/saved-cards/saved-cards.js +26 -15
- package/dist/matter/saved-cards/saved-cards.js.map +1 -1
- package/dist/matter/session/session.js +2 -2
- package/dist/matter/session/session.js.map +1 -1
- package/dist/matter/shipping-address/country-descriptors.d.ts +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +23 -1
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
- package/dist/matter/shipping-address/shipping-address.js +62 -14
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +2 -2
- package/dist/matter/shipping-simulator/shipping-simulator.js +6 -2
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
- package/dist/matter/sign-in-redirect/sign-in-redirect.js +48 -10
- package/dist/matter/sign-in-redirect/sign-in-redirect.js.map +1 -1
- package/dist/matter/variant-selector/variant-selector.js +2 -2
- package/dist/matter/variant-selector/variant-selector.js.map +1 -1
- package/dist/particles/address-summary/address-summary.js +2 -2
- package/dist/particles/address-summary/address-summary.js.map +1 -1
- package/dist/particles/alert-dialog/alert-dialog.d.ts +5 -1
- package/dist/particles/alert-dialog/alert-dialog.js +5 -2
- package/dist/particles/alert-dialog/alert-dialog.js.map +1 -1
- package/dist/particles/binding-switcher/binding-switcher.d.ts +38 -0
- package/dist/particles/binding-switcher/binding-switcher.js +183 -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 +83 -0
- package/dist/particles/card-summary/card-summary.js +188 -0
- package/dist/particles/card-summary/card-summary.js.map +1 -0
- package/dist/particles/copy-text/copy-text.d.ts +28 -0
- package/dist/particles/copy-text/copy-text.js +140 -0
- package/dist/particles/copy-text/copy-text.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +34 -5
- package/dist/particles/document-field/document-field.js +115 -19
- package/dist/particles/document-field/document-field.js.map +1 -1
- package/dist/particles/field/field.js +1 -1
- package/dist/particles/field/field.js.map +1 -1
- package/dist/particles/footer-link-group/footer-link-group.d.ts +6 -2
- package/dist/particles/footer-link-group/footer-link-group.js +18 -7
- 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/incentives/incentives.d.ts +7 -3
- package/dist/particles/incentives/incentives.js +8 -3
- package/dist/particles/incentives/incentives.js.map +1 -1
- package/dist/particles/logo/logo.d.ts +3 -2
- package/dist/particles/logo/logo.js +20 -8
- package/dist/particles/logo/logo.js.map +1 -1
- package/dist/particles/navigation-link/navigation-link.d.ts +2 -3
- package/dist/particles/navigation-link/navigation-link.js +4 -4
- package/dist/particles/navigation-link/navigation-link.js.map +1 -1
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +6 -2
- package/dist/particles/navigation-link-list/navigation-link-list.js +18 -7
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -1
- package/dist/particles/order-details-back/order-details-back.d.ts +28 -0
- package/dist/particles/order-details-back/order-details-back.js +52 -0
- package/dist/particles/order-details-back/order-details-back.js.map +1 -0
- package/dist/particles/order-status-badge/order-status-badge.d.ts +19 -0
- package/dist/particles/order-status-badge/order-status-badge.js +50 -0
- package/dist/particles/order-status-badge/order-status-badge.js.map +1 -0
- 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.js +2 -2
- package/dist/particles/phone-field/phone-field.js.map +1 -1
- package/dist/particles/select/select.js +6 -6
- package/dist/particles/select/select.js.map +1 -1
- package/dist/particles/toast/toast.d.ts +21 -7
- package/dist/particles/toast/toast.js +76 -8
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +1376 -126
- package/dist/sdk/actions/address-action-provider.d.ts +16 -0
- package/dist/sdk/actions/address-action-provider.js +20 -0
- package/dist/sdk/actions/address-action-provider.js.map +1 -0
- package/dist/sdk/actions/analytics-action-provider.js +1 -1
- package/dist/sdk/actions/index.d.ts +5 -1
- package/dist/sdk/actions/index.js +5 -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/order-action-provider.d.ts +12 -0
- package/dist/sdk/actions/order-action-provider.js +16 -0
- package/dist/sdk/actions/order-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 +10 -2
- package/dist/sdk/address/address-fields.js +38 -0
- package/dist/sdk/address/address-fields.js.map +1 -0
- package/dist/sdk/address/checkout-readiness.js +17 -0
- package/dist/sdk/address/checkout-readiness.js.map +1 -0
- package/dist/sdk/address/constants.js +60 -0
- package/dist/sdk/address/constants.js.map +1 -0
- package/dist/sdk/address/country-display.js +19 -0
- package/dist/sdk/address/country-display.js.map +1 -0
- package/dist/sdk/address/country-rules.js +30 -0
- package/dist/sdk/address/country-rules.js.map +1 -0
- package/dist/sdk/address/format-address.js +18 -0
- package/dist/sdk/address/format-address.js.map +1 -0
- package/dist/sdk/address/iso-countries.js +262 -0
- package/dist/sdk/address/iso-countries.js.map +1 -0
- package/dist/sdk/address/layouts.js +56 -0
- package/dist/sdk/address/layouts.js.map +1 -0
- package/dist/sdk/address/messages.js +97 -0
- package/dist/sdk/address/messages.js.map +1 -0
- package/dist/sdk/address/operations.d.ts +54 -0
- package/dist/sdk/address/operations.js +83 -0
- package/dist/sdk/address/operations.js.map +1 -0
- package/dist/sdk/address/postal-code-lookup-operations.js +23 -0
- package/dist/sdk/address/postal-code-lookup-operations.js.map +1 -0
- package/dist/sdk/address/postal-code.js +11 -0
- package/dist/sdk/address/postal-code.js.map +1 -0
- package/dist/sdk/address/schema.js +14 -0
- package/dist/sdk/address/schema.js.map +1 -0
- package/dist/sdk/address/server-fields.js +25 -0
- package/dist/sdk/address/server-fields.js.map +1 -0
- package/dist/sdk/address/switch-country.js +57 -0
- package/dist/sdk/address/switch-country.js.map +1 -0
- package/dist/sdk/address/types.d.ts +26 -0
- package/dist/sdk/address/use-address-actions.d.ts +29 -0
- package/dist/sdk/address/use-address-actions.js +247 -0
- package/dist/sdk/address/use-address-actions.js.map +1 -0
- package/dist/sdk/address/use-address-by-postal-code.js +57 -0
- package/dist/sdk/address/use-address-by-postal-code.js.map +1 -0
- package/dist/sdk/address/validate-address.js +62 -0
- package/dist/sdk/address/validate-address.js.map +1 -0
- package/dist/sdk/cache/storefront-cache.js +30 -4
- 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/client/fetch-page-data.d.ts +11 -0
- package/dist/sdk/client/fetch-page-data.js +12 -1
- package/dist/sdk/client/fetch-page-data.js.map +1 -1
- package/dist/sdk/content/create-content-runtime.js +1 -8
- package/dist/sdk/content/create-content-runtime.js.map +1 -1
- package/dist/sdk/data/failed-fields.js +23 -0
- package/dist/sdk/data/failed-fields.js.map +1 -0
- package/dist/sdk/data/index.js +2 -2
- package/dist/sdk/data/page-reactive-data-root.d.ts +45 -7
- package/dist/sdk/data/page-reactive-data-root.js +88 -12
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
- package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
- package/dist/sdk/generated/fragment-types.js +2 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -1
- package/dist/sdk/generated/gql.js +17 -11
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +185 -46
- package/dist/sdk/generated/graphql.js +2587 -155
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +157 -1
- package/dist/sdk/i18n/messages/en-US.json +157 -1
- package/dist/sdk/i18n/messages/en-US.json.d.ts +156 -0
- package/dist/sdk/i18n/messages/es-ES.js +157 -1
- package/dist/sdk/i18n/messages/es-ES.json +157 -1
- package/dist/sdk/i18n/messages/pt-BR.js +157 -1
- package/dist/sdk/i18n/messages/pt-BR.json +157 -1
- package/dist/sdk/i18n/provider.js +1 -1
- package/dist/sdk/i18n/provider.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/current-page.js +30 -0
- package/dist/sdk/navigation/current-page.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/not-found-log.d.ts +28 -0
- package/dist/sdk/navigation/not-found-log.js +133 -0
- package/dist/sdk/navigation/not-found-log.js.map +1 -0
- package/dist/sdk/navigation/path.js +25 -0
- package/dist/sdk/navigation/path.js.map +1 -0
- package/dist/sdk/navigation/redirect.d.ts +11 -0
- package/dist/sdk/navigation/redirect.js +22 -0
- package/dist/sdk/navigation/redirect.js.map +1 -0
- package/dist/sdk/navigation/report.js +70 -0
- package/dist/sdk/navigation/report.js.map +1 -0
- package/dist/sdk/navigation/resolve-storefront-href.d.ts +12 -0
- package/dist/sdk/navigation/resolve-storefront-href.js +214 -0
- package/dist/sdk/navigation/resolve-storefront-href.js.map +1 -0
- package/dist/sdk/navigation/route-identity-provider.d.ts +11 -0
- package/dist/sdk/navigation/route-identity-provider.js +20 -0
- package/dist/sdk/navigation/route-identity-provider.js.map +1 -0
- package/dist/sdk/navigation/route-map-provider.d.ts +19 -0
- package/dist/sdk/navigation/route-map-provider.js +29 -0
- package/dist/sdk/navigation/route-map-provider.js.map +1 -0
- package/dist/sdk/navigation/storefront-link.d.ts +16 -0
- package/dist/sdk/navigation/storefront-link.js +66 -0
- package/dist/sdk/navigation/storefront-link.js.map +1 -0
- package/dist/sdk/navigation/types.d.ts +45 -0
- package/dist/sdk/navigation/use-storefront-navigation.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-navigation.js +73 -0
- package/dist/sdk/navigation/use-storefront-navigation.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-route.d.ts +26 -0
- package/dist/sdk/navigation/use-storefront-route.js +87 -0
- package/dist/sdk/navigation/use-storefront-route.js.map +1 -0
- package/dist/sdk/navigation/use-storefront-search-params.d.ts +11 -0
- package/dist/sdk/navigation/use-storefront-search-params.js +16 -0
- package/dist/sdk/navigation/use-storefront-search-params.js.map +1 -0
- package/dist/sdk/orders/completion-badge.d.ts +8 -0
- package/dist/sdk/orders/completion-badge.js +47 -0
- package/dist/sdk/orders/completion-badge.js.map +1 -0
- package/dist/sdk/orders/order-operations.d.ts +19 -0
- package/dist/sdk/orders/order-operations.js +21 -0
- package/dist/sdk/orders/order-operations.js.map +1 -0
- package/dist/sdk/orders/use-order-actions.d.ts +23 -0
- package/dist/sdk/orders/use-order-actions.js +62 -0
- package/dist/sdk/orders/use-order-actions.js.map +1 -0
- package/dist/sdk/payment/gateway-origin.js +26 -13
- package/dist/sdk/payment/gateway-origin.js.map +1 -1
- package/dist/sdk/payment/gateway.d.ts +14 -2
- package/dist/sdk/payment/gateway.js +32 -14
- package/dist/sdk/payment/gateway.js.map +1 -1
- package/dist/sdk/payment/operations.js +11 -0
- package/dist/sdk/payment/operations.js.map +1 -1
- package/dist/sdk/payment/submission-registry.d.ts +2 -1
- package/dist/sdk/payment/submission-registry.js +12 -8
- package/dist/sdk/payment/submission-registry.js.map +1 -1
- package/dist/sdk/payment/use-payment-actions.d.ts +5 -3
- package/dist/sdk/payment/use-payment-actions.js +5 -2
- package/dist/sdk/payment/use-payment-actions.js.map +1 -1
- package/dist/sdk/payment/use-place-order.d.ts +6 -3
- package/dist/sdk/payment/use-place-order.js +333 -143
- package/dist/sdk/payment/use-place-order.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/page-alternates.d.ts +57 -0
- package/dist/sdk/seo/page-alternates.js +127 -0
- package/dist/sdk/seo/page-alternates.js.map +1 -0
- 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/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/own-value.js +19 -0
- package/dist/utils/own-value.js.map +1 -0
- package/dist/utils/safe-href.d.ts +4 -4
- package/dist/utils/safe-href.js +31 -22
- package/dist/utils/safe-href.js.map +1 -1
- package/package.json +5 -1
- package/skills/storefront-asset/SKILL.md +111 -0
- package/skills/storefront-asset/references/api-side.md +153 -0
- package/skills/storefront-asset/references/findings.md +40 -0
- package/skills/storefront-asset/references/ui-side.md +94 -0
- package/src/styles/tailwind.css +28 -2
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# OrderProgress
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** Four stages of one order on the order page, placed, payment, processing, and shipping, with a line up to the stage the order is in.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A horizontal row of four short labels such as "Order placed", "Payment", "Processing", "Shipping", each with a small marker (dot, check, or cross) and a line joining the markers.
|
|
11
|
+
- The line is filled up to one marker and faint after it. One stage reads as the current one.
|
|
12
|
+
- A denied payment shows a cross on the second marker. A cancelled order shows a cross on the second marker and faint markers everywhere else.
|
|
13
|
+
- No tracking number, carrier, or date sits on this row.
|
|
14
|
+
|
|
15
|
+
The image is the source of truth for layout.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- The order page, to show how far the order has moved.
|
|
20
|
+
|
|
21
|
+
## When NOT to use
|
|
22
|
+
|
|
23
|
+
- For the status sentence alone → use `OrderStatusBadge`.
|
|
24
|
+
- For the placed date → use `OrderPlacedDate`.
|
|
25
|
+
- For a step indicator outside an order → there is no generic stepper; this matter owns its line.
|
|
26
|
+
- For an approval step → this matter has none. A B2C order never enters approval.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Composition
|
|
31
|
+
|
|
32
|
+
`OrderProgress` is a leaf in the page schema. It renders the four stages and the connectors itself.
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
OrderProgress
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Child order is not applicable. The stage order is fixed.
|
|
39
|
+
|
|
40
|
+
## Components
|
|
41
|
+
|
|
42
|
+
### OrderProgress
|
|
43
|
+
|
|
44
|
+
No schema props. Stage names, state sentences, and the accessible name are content (`order-progress`). A blank field keeps the message catalogue. `failed` and `not-applicable` render no sentence.
|
|
45
|
+
|
|
46
|
+
## Data
|
|
47
|
+
|
|
48
|
+
The fragment reads `customerOrder(id: $orderId)` and selects `completion { view label }` and `progress { stage paymentFailed cancelled }`. `$orderId` is the route param of `/pvt/orders/[orderId]`. The OMS status string is not selected and the matter maps no status code.
|
|
49
|
+
|
|
50
|
+
State per stage, in order:
|
|
51
|
+
|
|
52
|
+
- `cancelled` → payment is `failed`, the other three are `not-applicable`.
|
|
53
|
+
- Before the current stage → `done`. After it → `pending`.
|
|
54
|
+
- The current stage → `failed` when `paymentFailed`, `done` when `completion.view` is `COMPLETED`, otherwise `current`.
|
|
55
|
+
|
|
56
|
+
`$data` is the order itself. A null order renders nothing.
|
|
57
|
+
|
|
58
|
+
## Styling
|
|
59
|
+
|
|
60
|
+
Style the list, each stage, its marker, its label, its state sentence, and the connectors through their hooks. Inline classes only; use arbitrary variants to reach the children from the root class.
|
|
61
|
+
|
|
62
|
+
- `data-fs-order-progress` — the list. `flex w-full items-start list-none p-0`. The stages share the row; a gap here breaks the connector.
|
|
63
|
+
- `data-fs-order-progress-current` — `placed`, `payment`, `processing`, or `shipping`.
|
|
64
|
+
- `data-fs-order-progress-cancelled` — present when the order is cancelled or a cancellation was requested.
|
|
65
|
+
- `data-fs-order-progress-stage` — one stage, `placed`, `payment`, `processing`, or `shipping`. `relative flex min-w-0 flex-1 flex-col items-center gap-[4px] text-center`.
|
|
66
|
+
- `data-fs-order-progress-stage-state` — `done`, `current`, `failed`, `not-applicable`, or `pending`. The `current` stage also carries `aria-current="step"`.
|
|
67
|
+
- `data-fs-order-progress-track` — the marker row. `relative flex w-full items-center justify-center`.
|
|
68
|
+
- `data-fs-order-progress-marker` — the icon slot, empty and `aria-hidden`. `relative z-10 size-[24px] rounded-full border-2 border-[#D1D5DB] bg-white`; fill it per state.
|
|
69
|
+
- `data-fs-order-progress-line` — the connector into this stage, `aria-hidden`, absent on the first stage. It is taken out of flow and runs from the previous marker to this one: `absolute top-1/2 z-0 h-[2px] w-[calc(100%-24px)] -translate-y-1/2 -left-[calc(50%-12px)] bg-[#E5E7EB]`.
|
|
70
|
+
- `data-fs-order-progress-line-state` — `done`, `pending`, or `not-applicable`.
|
|
71
|
+
- `data-fs-order-progress-label` — the stage label. `text-[14px] font-medium text-[#111827]`.
|
|
72
|
+
- `data-fs-order-progress-status` — the state sentence for `done`, `current`, and `pending`. Absent on `failed` and `not-applicable`. `text-[12px] text-[#6B7280]`, or `sr-only` when the marker already says it.
|
|
73
|
+
- `data-fs-order-progress-skeleton` and `data-fs-order-progress-skeleton-stage` — the loading look.
|
|
74
|
+
|
|
75
|
+
## Canonical schema
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"progress": {
|
|
80
|
+
"type": "OrderProgress",
|
|
81
|
+
"props": {},
|
|
82
|
+
"style": {
|
|
83
|
+
"default": "flex gap-[24px] list-none p-0"
|
|
84
|
+
},
|
|
85
|
+
"children": []
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# OrderStatusBadge
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** Shopper-facing order status sentence, with a tone the caller supplies.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A short status sentence inside a compact label, such as "Delivered" or "In progress".
|
|
11
|
+
- The label has one of four tones: neutral, progress, success, or danger.
|
|
12
|
+
- The sentence is always visible. The color does not stand alone.
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- To show the completion label of one order, on the order page or in the order list.
|
|
19
|
+
|
|
20
|
+
## When NOT to use
|
|
21
|
+
|
|
22
|
+
- For a generic count or tag with no order label → use [[badge]] and pass the text as children.
|
|
23
|
+
- For the four-stage progress of an order → use the order progress matter when it exists. This particle is the sentence, not the stages.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Composition
|
|
28
|
+
|
|
29
|
+
`OrderStatusBadge` is a leaf. It renders one sentence and takes no children. A `messages` entry replaces the catalogue sentence for that label. The order details header fills `messages` from its content entry. The order list passes none, so it stays on the catalogue.
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
OrderStatusBadge
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Components
|
|
36
|
+
|
|
37
|
+
### OrderStatusBadge
|
|
38
|
+
|
|
39
|
+
No schema props. The caller passes these at runtime:
|
|
40
|
+
|
|
41
|
+
| Prop | Type | Default | Notes |
|
|
42
|
+
|------|------|---------|-------|
|
|
43
|
+
| `state` | `'ongoing' \| 'completed' \| 'cancelled'` | — | Completion view. Sets `data-fs-order-status-badge-state`. Does not select the sentence. |
|
|
44
|
+
| `label` | string | — | Completion label id. Selects the catalogue sentence. Any other string renders the placeholder. |
|
|
45
|
+
| `tone` | `'neutral' \| 'progress' \| 'success' \| 'danger'` | — | Sets `data-fs-order-status-badge-tone`. Does not select the sentence. |
|
|
46
|
+
|
|
47
|
+
The catalogue ids are `fs/order-status.cancelled`, `fs/order-status.cancellation-requested`, `fs/order-status.in-progress`, `fs/order-status.delivered`, `fs/order-status.shipped`, `fs/order-status.ready-for-pickup`, `fs/order-status.collected`, and `fs/order-status.placeholder`.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Canonical schema example
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"order-status": {
|
|
56
|
+
"type": "OrderStatusBadge",
|
|
57
|
+
"props": {
|
|
58
|
+
"state": "completed",
|
|
59
|
+
"label": "delivered",
|
|
60
|
+
"tone": "success"
|
|
61
|
+
},
|
|
62
|
+
"style": [
|
|
63
|
+
"inline-flex items-center rounded-full px-[8px] py-[2px] text-[12px] font-medium bg-[#DCFCE7] text-[#14532D]"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Common mistakes
|
|
70
|
+
|
|
71
|
+
- **`StatusBadge`.** The correct name is `OrderStatusBadge`.
|
|
72
|
+
- **Passing an OMS code or `statusDescription` as the text.** Pass `label` as a completion label id. The catalogue supplies the sentence.
|
|
73
|
+
- **Nesting a label inside `OrderStatusBadge`.** It does not render children.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Styling
|
|
78
|
+
|
|
79
|
+
The particle sets `data-fs-badge`, `data-fs-order-status-badge`, `data-fs-order-status-badge-state`, and `data-fs-order-status-badge-tone`. It ships no color.
|
|
80
|
+
|
|
81
|
+
| Component | What you style | Plausible classes |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `OrderStatusBadge` | Pill label. Pick the background and text from the tone. | `inline-flex items-center rounded-full px-[8px] py-[2px] text-[12px] font-medium bg-[#DCFCE7] text-[#14532D]` |
|
|
84
|
+
|
|
85
|
+
Tone pairs that meet WCAG AA: neutral `bg-[#F3F4F6] text-[#1F2937]`, progress `bg-[#DBEAFE] text-[#1E3A8A]`, success `bg-[#DCFCE7] text-[#14532D]`, danger `bg-[#FEE2E2] text-[#7F1D1D]`.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Related
|
|
90
|
+
|
|
91
|
+
- [[badge]] — generic label. `OrderStatusBadge` composes it and replaces children with the catalogue sentence.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# OrderSummary
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** The total lines of one placed order and the grand total the API returns.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A short two-column list near the bottom of an order page: a label on the left, a money amount on the right.
|
|
11
|
+
- Three or more rows such as items, shipping, and discounts, then one emphasized total row.
|
|
12
|
+
- A discount row may show a negative amount. A shipping row may show zero.
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- On `/pvt/orders/[orderId]`, where the page query reads `customerOrder`.
|
|
19
|
+
|
|
20
|
+
## When NOT to use
|
|
21
|
+
|
|
22
|
+
- For the cart or checkout totals → use `CartTotalizerRoot` and `CartTotalizerLine`.
|
|
23
|
+
- For how the order was paid → use `OrderPayment`.
|
|
24
|
+
- For the post-checkout recap → use `OrderPlacedPaymentSummary`.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Composition
|
|
29
|
+
|
|
30
|
+
Standalone. The page places it; it has no children.
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
OrderSummary
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Components
|
|
37
|
+
|
|
38
|
+
### OrderSummary
|
|
39
|
+
|
|
40
|
+
No schema props. Every line the order carries renders, in the order the API returned them. The total row is the API's `total`; the component does not add the lines up. The heading, the grand total, and the labels for `Items`, `Shipping`, `Discounts`, `Tax`, `Change`, and `Interest` are content (`order-summary`). A blank field keeps the message catalogue. Any other id shows its upstream `name`. Interest is a total the read appends, not a line this component calculates.
|
|
41
|
+
|
|
42
|
+
## Styling
|
|
43
|
+
|
|
44
|
+
- `data-fs-order-summary` — the region. `flex flex-col gap-[8px]`.
|
|
45
|
+
- `data-fs-order-summary-heading` — the visible title. Content wins; a blank field keeps `fs/order.totals.heading`.
|
|
46
|
+
- `data-fs-order-summary-lines` — the description list.
|
|
47
|
+
- `data-fs-order-summary-line` — one total row. `flex justify-between`.
|
|
48
|
+
- `data-fs-order-summary-line-id` — the total id (`Items`, `Shipping`, `Discounts`, …), for styling one row.
|
|
49
|
+
- `data-fs-order-summary-line-sign` — `negative`, `zero`, or `positive`.
|
|
50
|
+
- `data-fs-order-summary-label`, `data-fs-order-summary-value` — the label and the amount of every row, the total included.
|
|
51
|
+
- `data-fs-order-summary-total` — the total row. `font-semibold border-t pt-[8px]`.
|
|
52
|
+
- `data-fs-order-summary-total-label`, `data-fs-order-summary-total-value` — the total row's own label and amount.
|
|
53
|
+
- `data-fs-order-summary-skeleton`, `data-fs-order-summary-skeleton-line`, `data-fs-order-summary-skeleton-total` — the loading placeholder.
|
|
@@ -94,13 +94,24 @@ compiler's prop-type-driven icon collection never sees it. Same mechanism, same
|
|
|
94
94
|
detected-network icon (see its `.md`, "Store setup: network icon declaration").
|
|
95
95
|
|
|
96
96
|
**Any store composing `PaymentMethodBadges` or `AcceptedPaymentMethodBadges` must declare every name a
|
|
97
|
-
configured method can resolve to in `global.icons.include`.** Either strip can resolve up to
|
|
98
|
-
base-dialect names — `CardEntry`'s
|
|
97
|
+
configured method can resolve to in `global.icons.include`.** Either strip can resolve up to ten
|
|
98
|
+
base-dialect names — `CardEntry`'s six networks plus four wallet glyphs this component adds:
|
|
99
99
|
|
|
100
100
|
```json
|
|
101
101
|
{
|
|
102
102
|
"icons": {
|
|
103
|
-
"include": [
|
|
103
|
+
"include": [
|
|
104
|
+
"amex",
|
|
105
|
+
"diners",
|
|
106
|
+
"discover",
|
|
107
|
+
"elo-card",
|
|
108
|
+
"mastercard",
|
|
109
|
+
"visa",
|
|
110
|
+
"paypal",
|
|
111
|
+
"google-pay",
|
|
112
|
+
"pix",
|
|
113
|
+
"stripe"
|
|
114
|
+
]
|
|
104
115
|
}
|
|
105
116
|
}
|
|
106
117
|
```
|
|
@@ -113,7 +124,7 @@ verbatim can still resolve to a declared key — `"WH Google Pay"` resolves to `
|
|
|
113
124
|
set of names a strip can produce is wider than the store's literal method labels and has to be read off this
|
|
114
125
|
list, not off the payment configuration's screen.
|
|
115
126
|
|
|
116
|
-
**If the store's `
|
|
127
|
+
**If the store's `foundation.json` already has an `icons` object, extend it — do not replace it**, for the same
|
|
117
128
|
reason `card-entry.md` gives: replacing it silently drops `collection` (or any existing `include` entries),
|
|
118
129
|
and every other icon in that store re-resolves through the fallback default with no error to flag it.
|
|
119
130
|
|
|
@@ -191,7 +202,7 @@ and every other icon in that store re-resolves through the fallback default with
|
|
|
191
202
|
|
|
192
203
|
## Styling
|
|
193
204
|
|
|
194
|
-
`PaymentMethodBadges` and `AcceptedPaymentMethodBadges` render one root you style directly, plus per-part hooks — the identical set for both, since both are produced by the same internal render path. Each carries its own catalog name, so each gets its own independent swatch entry in `
|
|
205
|
+
`PaymentMethodBadges` and `AcceptedPaymentMethodBadges` render one root you style directly, plus per-part hooks — the identical set for both, since both are produced by the same internal render path. Each carries its own catalog name, so each gets its own independent swatch entry in `foundation.json`'s `styles` key even though the two emit the same hooks; style each surface separately if it needs to look different.
|
|
195
206
|
|
|
196
207
|
| Component | What you style | Plausible classes |
|
|
197
208
|
|---|---|---|
|
|
@@ -48,7 +48,7 @@ FooterRoot
|
|
|
48
48
|
|
|
49
49
|
**Nothing in the model is required, so a half-filled entry still renders.** An entry with only a heading keeps the authored `methods` prop under the merchant's heading, and vice versa. What the component drops is per item, never the whole strip: an item is skipped when its label is blank, or when it carries neither a `method` nor an `iconUrl` — an icon nobody can name is the one thing this must not ship.
|
|
50
50
|
|
|
51
|
-
**Every predefined name must be registered.** A `method` resolves to a sprite symbol the store's build has to include; the store's `
|
|
51
|
+
**Every predefined name must be registered.** A `method` resolves to a sprite symbol the store's build has to include; the store's `foundation.json` writes the names out under `icons.include` — it is JSON, so it cannot import `PAYMENT_METHOD_NAMES`, and a test that derives the expected set from the exported constant is what keeps the two in step. A name the store never registered renders an empty `<svg>` — no build error and no runtime error, just a missing flag.
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
package/dist/docs/place-order.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# PlaceOrder
|
|
2
2
|
|
|
3
3
|
**Category:** commerce
|
|
4
|
-
**Purpose:** The checkout's place-order CTA. Runs the three-call payment sequence (start transaction, the holder's direct-to-gateway submission, gateway callback), blocks interaction while it runs, and renders one inline outcome — an error message or a success confirmation — once it settles.
|
|
4
|
+
**Purpose:** The checkout's place-order CTA. Runs the three-call payment sequence (start transaction, the holder's direct-to-gateway submission, gateway callback), blocks interaction while it runs, and renders one inline outcome — an error message or a success confirmation — once it settles, plus an optional status message while it runs.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -51,12 +51,13 @@ Child order reflects visual order. `PlaceOrder` composes under **either** paymen
|
|
|
51
51
|
|
|
52
52
|
### PlaceOrder
|
|
53
53
|
|
|
54
|
-
No sub-components. Renders a button and, once the sequence has settled, one inline outcome region (error or success).
|
|
54
|
+
No sub-components. Renders a button, an optional status region while the sequence runs (only when `placingMessage` is authored), and, once the sequence has settled, one inline outcome region (error or success).
|
|
55
55
|
|
|
56
56
|
| Prop | Type | Default | Notes |
|
|
57
57
|
|------|------|---------|-------|
|
|
58
58
|
| `label` | string | `"Place order"` | Button label while idle. |
|
|
59
59
|
| `placingLabel` | string | `"Placing order..."` | Button label while the sequence is in flight. |
|
|
60
|
+
| `placingMessage` | string | *(none)* | Status message in its own `role="status"` region beside the button while the order is being placed. Absent or blank renders nothing. The button text while placing stays `placingLabel`. |
|
|
60
61
|
| `resumeLabel` | string | `"Complete your order"` | Button label while a surviving attempt offers a resume — the card already left the browser (or its fate is unknown) and the next click finalizes it instead of running the full sequence again. |
|
|
61
62
|
| `successMessage` | string | `"Order placed successfully."` | Shown once the sequence settles with no errors. |
|
|
62
63
|
| `missingSubmissionMessage` | string | `"Enter your payment details before placing the order."` | Shown when `placeOrder()` is invoked with no registered submission for the current path (e.g. the shopper never finished entering a card). |
|
|
@@ -68,11 +69,12 @@ No sub-components. Renders a button and, once the sequence has settled, one inli
|
|
|
68
69
|
| `unavailableMethodMessage` | string | `"Choose another payment method before placing the order."` | Shown instead of the two document messages above when the selected method calls for a cardholder document the page is not showing — a method the card form cannot pay with, or one outside the payment root's `group` — so the shopper has to choose another payment method. |
|
|
69
70
|
| `unsavedBillingAddressMessage` | string | `"Save your billing address before placing the order."` | Shown when the shopper declined "same as delivery" but never saved a custom billing address. |
|
|
70
71
|
| `invalidCardDataMessage` | string | `"Enter valid card details before placing the order."` | Shown when the new-card draft itself fails validation before ever reaching the gateway. |
|
|
72
|
+
| `unsupportedNetworkMessage` | string | `"This card is not from a network the store accepts. Use another card or choose another payment method."` | Shown when the typed card number is well-formed but no network the store accepts claims it, whether or not a payment method is selected. |
|
|
71
73
|
| `invalidSecurityCodeMessage` | string | `"Enter a valid security code before placing the order."` | Shown when a saved-card submission is refused for a missing or invalid CVV. |
|
|
72
74
|
| `gatewayErrorMessage` | string | `"Unable to complete the payment. Please try again."` | Shown when the payment gateway itself refuses the submitted card. |
|
|
73
75
|
| `inFlightMessage` | string | `"This order is already being placed. Please wait."` | Shown when a click lands on an order-placement attempt whose own sequence is still running — a transaction this instance did not open, and which nothing here may finalize or re-run. |
|
|
74
76
|
| `unconfirmedMessage` | string | `"We could not confirm your order yet. Your payment may still be processing, so please do not pay again."` | Shown when the payment was handed to the gateway but the order could not be confirmed, so it may still be processing. Renders in its own `role="status"` node, never in the error alert. |
|
|
75
|
-
| `successHref` | string |
|
|
77
|
+
| `successHref` | page reference or string | `{ "standard": "order-placed" }` | Page navigated to after a successful placement. A page reference gets the placed order's group as its `orderGroup` param, percent-encoded. A string is a logical path of this store, navigated as written under the binding's base path. **Success-gated**: the navigation is requested only once an attempt settles with no errors and a non-null order group — never on a refusal. |
|
|
76
78
|
|
|
77
79
|
Every message prop above is resolved by the `code` of the client-synthesized `PaymentUserError` this CTA renders — in its alert, or in its status node for `unconfirmedMessage` — never by which component produced the error. A `PaymentUserError` whose code this component does not author (a server-returned code) renders that error's own `message` unchanged.
|
|
78
80
|
|
|
@@ -96,13 +98,13 @@ Every message prop above is resolved by the `code` of the client-synthesized `Pa
|
|
|
96
98
|
"label": "Place order",
|
|
97
99
|
"placingLabel": "Placing order...",
|
|
98
100
|
"successMessage": "Order placed successfully.",
|
|
99
|
-
"successHref": "
|
|
101
|
+
"successHref": { "standard": "order-placed" }
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
```
|
|
104
106
|
|
|
105
|
-
`successHref` is shown here
|
|
107
|
+
`successHref` is shown here with its default value. A string must be a logical path of this store, such as `/obrigado`; an absolute URL, a protocol-relative URL, or a non-http(s) scheme is refused rather than navigated to.
|
|
106
108
|
|
|
107
109
|
---
|
|
108
110
|
|
|
@@ -118,11 +120,12 @@ Every message prop above is resolved by the `code` of the client-synthesized `Pa
|
|
|
118
120
|
## Known limitations
|
|
119
121
|
|
|
120
122
|
- **A remount reads the surviving attempt instead of losing it — but the attempt itself does not survive a page reload.** T29 (`specs/make-an-order-attempt-survive-a.md`) gave the place-order sequence an identity-and-phase record on the payment context, above this component's own mount, alongside `placing`. Closing and reopening a `Dialog`/`Drawer` popup with no `keepMounted` no longer resets it: a settled attempt renders disabled with no further calls (`succeeded` is derived from the record, not only from this instance's own `attempted`/`userErrors`), and an attempt whose card already reached the gateway before the remount offers a resume (`resumeLabel`) that finalizes the same transaction — never a fresh `startTransaction` or a second card submission. This closes the case this bullet used to attribute to "a settled-order read model that outlives the overlay (T16/T17)": both are merged, and the limitation still stood, because neither one ever touched this component's own mount-scoped guard, which is what actually caused the duplicate-order risk. What is still not covered: a full page reload loses the attempt (no `sessionStorage` or equivalent persists it today — T29's own OQ-3), and the direct-to-gateway POST's abort budget (30s, `sdk/payment/gateway.ts`) is an unconfirmed placeholder pending a number from payments (OQ-7).
|
|
123
|
+
- **A refusal raised before the card POST leaves the CTA on `label`, not `resumeLabel`.** A card form that refuses after the transaction opened but before any request was issued (a missing `sendPayments` action, an origin the gateway builder will not post to, its own draft check) reports `reachedGateway: false`, so the attempt is recorded as refused: nothing was paid, the button keeps its `label`, and the next click opens a fresh transaction. A request that reached the gateway, or that cannot be shown not to have (a rejected request, a holder that throws or resolves a malformed result), stays resume-only and reads `resumeLabel`.
|
|
124
|
+
- **A failed `gatewayCallback` stays on `resumeLabel` today; the retry rule is in place but dormant.** Once the card POST was accepted, the hook only frees the next click for a callback error whose server code is neither `REDIRECT_REQUIRED` nor `MISSING_TRANSACTION_COOKIES` and that carries no `orderId`. The server sends no such code yet (task T225 will), so every callback failure that exists today (a timeout, a network failure, an unreadable result, a bank challenge, a lapsed transaction cookie) stays on `resumeLabel` and only re-issues the callback. A shopper whose card was refused still cannot enter another card without a reload until T225 lands.
|
|
121
125
|
- **Sibling placement (never nested inside `CardEntry`/`SavedCards`) is a convention, not something the compiler enforces.** `requiresContext: 'payment'` only fails a build with no payment-providing ancestor at any depth; it cannot detect that this component was nested one level too deep. Getting this wrong compiles clean and still leaves the other entry path with no CTA at all (see `specs/place-order.md`'s Open items).
|
|
122
|
-
- **`successHref` navigates with `
|
|
123
|
-
- **A `successHref`
|
|
124
|
-
- **
|
|
125
|
-
- **`successHref` is inert until a store authors it.** As of this writing no store composes it — see `specs/navigate-the-shopper-to-the-order.md` for the follow-up that wires Reserva's payment page to it, gated on the confirmation page's read path being fixed first.
|
|
126
|
+
- **`successHref` navigates with `replace`, not `push`.** The payment step is removed from the history stack, so the Back button from the confirmation page returns to whatever preceded payment, not to the payment step itself — deliberate (placing an order is terminal, and a live place-order CTA one Back press away risks a duplicate transaction), but a divergence from this package's other redirect-on-success component, `CartRedirectOnAdd`, which uses `push`.
|
|
127
|
+
- **A string `successHref` that is not a path of this store fails closed.** An absolute URL, a protocol-relative URL (`//host/...`), or a non-http(s) scheme is refused rather than navigated to, with a dev-only `console.warn`. This keeps a store schema from turning the CTA into a redirect off the storefront right after a real purchase. A store without a confirmation page in its route map also stays on the payment page.
|
|
128
|
+
- **Focus moves on a refused click only, never for a result the gateway returned.** When a click is refused because the cardholder document is missing or malformed, or the custom billing address was never saved, `PlaceOrder` asks the payment root to move keyboard focus to that field or form. This applies to any result that did not reach the gateway (`reachedGateway: false`) whose first error carries one of those three codes, including a code a registered submission returned itself after the transaction opened. A refusal carrying any other code, and any result that reached the gateway (a decline included, whatever its code), moves nothing, and neither does a re-render or a remount. The reason stays in the existing outcome alert.
|
|
126
129
|
|
|
127
130
|
## Styling
|
|
128
131
|
|
|
@@ -130,6 +133,7 @@ Every message prop above is resolved by the `code` of the client-synthesized `Pa
|
|
|
130
133
|
|---|---|---|
|
|
131
134
|
| `PlaceOrder` (root `div`) | Layout wrapper stacking the button and the outcome region | `flex flex-col gap-[8px] items-start` |
|
|
132
135
|
| Button (`data-fs-place-order-button`) | The CTA itself — full-width pill, disabled/busy states | `inline-flex items-center justify-center w-full h-[44px] px-[20px] bg-[#C8102E] text-white rounded-[4px] text-[14px] font-bold uppercase cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed` |
|
|
136
|
+
| Placing (`data-fs-place-order-placing`) | The status region, present only while this CTA's own sequence runs and only when `placingMessage` is authored. Every payment leaf is `inert` for as long as it exists. | `text-[13px] text-[#666666]` |
|
|
133
137
|
| Error (`data-fs-place-order-error`) | Inline error line, `role="alert"` | `text-[13px] text-[#C0392B]` |
|
|
134
138
|
| Unconfirmed (`data-fs-place-order-unconfirmed`) | Inline notice that the order could not be confirmed yet, `role="status"` | `text-[13px] text-[#8A6D3B]` |
|
|
135
139
|
| Success (`data-fs-place-order-success`) | Inline success line, `role="status"` | `text-[13px] text-[#1E8E3E]` |
|
|
@@ -96,7 +96,7 @@ Renders the product description, optionally collapsed behind a "show more" toggl
|
|
|
96
96
|
| `moreLabel` | string | `'Show more'` | Trigger label shown when the panel is collapsed. Localize per storefront (e.g. `'mais informações'` for pt-BR). |
|
|
97
97
|
| `lessLabel` | string | `'Show less'` | Trigger label shown when the panel is expanded (e.g. `'menos informações'`). |
|
|
98
98
|
|
|
99
|
-
The wrapper element follows from the resolved branch: plain text renders as `<p>` (semantic body-text exposure for screen-reader paragraph navigation and SEO); rich HTML renders as `<div>` so block-level markup inside `descriptionHtml` (`<p>`, `<ul>`, headings) stays valid DOM. The element that hosts the rendered description text carries `data-fs-text=""` so project-level `Text` typography defined in `
|
|
99
|
+
The wrapper element follows from the resolved branch: plain text renders as `<p>` (semantic body-text exposure for screen-reader paragraph navigation and SEO); rich HTML renders as `<div>` so block-level markup inside `descriptionHtml` (`<p>`, `<ul>`, headings) stays valid DOM. The element that hosts the rendered description text carries `data-fs-text=""` so project-level `Text` typography defined in `foundation.json` cascades to the description automatically — no need to repeat font, size, color, leading, or tracking classes inline on every description node. With `collapse: 'none'` that element is the wrapper itself; with `collapse: 'showMore'` or `'section'` it is the panel (the `Collapsible.Root` and the trigger `<button>` deliberately do not carry it so body typography does not cascade onto the trigger label).
|
|
100
100
|
|
|
101
101
|
Rich HTML is rendered via `dangerouslySetInnerHTML`; Storefront API Core sanitizes `descriptionHtml` upstream, so this is safe for first-party catalogs.
|
|
102
102
|
|
|
@@ -253,7 +253,7 @@ The main heading — large and bold. Typical: `text-[20px] leading-[1.3] font-se
|
|
|
253
253
|
|
|
254
254
|
### ProductInformationDescription
|
|
255
255
|
|
|
256
|
-
Body copy — smaller, lighter, comfortable line height. Typical: `text-[14px] leading-[1.6] font-normal text-[#666666]`. The element that hosts the text carries `data-fs-text=""` in every collapse mode (the wrapper itself for `collapse: 'none'`, the panel for `'showMore'` and `'section'`), so if the project's `
|
|
256
|
+
Body copy — smaller, lighter, comfortable line height. Typical: `text-[14px] leading-[1.6] font-normal text-[#666666]`. The element that hosts the text carries `data-fs-text=""` in every collapse mode (the wrapper itself for `collapse: 'none'`, the panel for `'showMore'` and `'section'`), so if the project's `foundation.json` defines `Text.base` with the body-text typography (font, size, leading, weight, color), those styles cascade to the description automatically and no inline typography classes are needed on the description node.
|
|
257
257
|
|
|
258
258
|
When `collapse` is `'showMore'` or `'section'`, the trigger element is a real `<button>` rendered as a sibling of the panel inside the Collapsible root. Style it via the `data-fs-product-information-description-trigger` attribute hook so the trigger inherits the description's flex container without being centered or stretched. Typical: `[&_[data-fs-product-information-description-trigger]]:self-start [&_[data-fs-product-information-description-trigger]]:text-[14px] [&_[data-fs-product-information-description-trigger]]:font-medium [&_[data-fs-product-information-description-trigger]]:underline`. Pair with the brand's link color via an arbitrary hex (e.g. `[&_[data-fs-product-information-description-trigger]]:text-[#e60014]`).
|
|
259
259
|
|
|
@@ -26,11 +26,14 @@ The image is the source of truth for the heading text, `first`/`itemsPerPage`, a
|
|
|
26
26
|
|
|
27
27
|
- A cross-sell / discovery shelf on the PDP (Related Products), PLP, or Search Results: a facet-scoped, navigable carousel of product cards configured entirely in the VTEX Studio.
|
|
28
28
|
|
|
29
|
+
- A shelf inside a conditional branch that is often not shown, such as the empty state of the cart: use `ProductShelfOnMountRoot`. It is the same shelf, but its data is fetched by the client when the element mounts and never reaches the server HTML or the page query.
|
|
30
|
+
|
|
29
31
|
## When NOT to use
|
|
30
32
|
|
|
31
33
|
- A full-page product listing driven by the route/search → use `ProductListRoot` (prop-driven) with the PLP grid.
|
|
32
34
|
- PDP single-product pricing → use `PricingRoot` (it fetches one `productBySlug`; it cannot price a per-card item in a list).
|
|
33
35
|
- A generic non-product track of children → use the `Carousel` particle directly.
|
|
36
|
+
- `ProductShelfOnMountRoot` above the fold, or anywhere the products must be in the server HTML → use `ProductShelfRoot`.
|
|
34
37
|
|
|
35
38
|
---
|
|
36
39
|
|
|
@@ -66,6 +69,10 @@ The image is the source of truth for the heading text, `first`/`itemsPerPage`, a
|
|
|
66
69
|
| `$data` | slice | — | Compiler-injected fragment result |
|
|
67
70
|
| `products` | `ProductShelfItem[]` | — | Pre-shaped items (stories/tests; bypasses `$data`). Rendered as given: `first` does not limit them |
|
|
68
71
|
|
|
72
|
+
### ProductShelfOnMountRoot
|
|
73
|
+
|
|
74
|
+
`ProductShelfRoot` with `fetchStrategy: 'lazy-on-mount'`. It renders `ProductShelfRoot` and reuses its fragment, `variables` block and props (all of the table above except `$content` and `$data`). The difference is delivery: the page query never selects its `products` field, and the client sends the request, in its own operation, only when the element mounts. The generated page wraps it in a `HotDataProvider` with a `null` fallback, so until the response arrives, and when the request fails or returns no products, it renders nothing (no skeleton). Without that provider and without a `products` prop it has no source and renders the loading skeleton permanently; pass `products` outside a generated page. It has no content model, so its variables come from props only. Place it inside a conditional branch (for example `CartEmpty`), never above the fold; a layout cannot compose it.
|
|
75
|
+
|
|
69
76
|
### Content model `product-shelf`
|
|
70
77
|
|
|
71
78
|
`ProductShelfContent` declares the merchant-facing fields: `first` (number, minimum 1), `sort` (the eight members above), `categoryId`, `brandId`, `collectionId`, `searchTerm` (string) and `availableOnly` (boolean). None is required. In a store with a `cms` binding the merchant fills them in the Content Platform entry keyed by the element id, and the shelf re-queries on the next request with no deploy; an empty field falls to the prop, and an empty facet relaxes the filter.
|
package/dist/docs/saved-cards.md
CHANGED
|
@@ -82,7 +82,7 @@ No props beyond standard container attributes (`className`, `children`). Must be
|
|
|
82
82
|
|
|
83
83
|
### SavedCardCvvField
|
|
84
84
|
|
|
85
|
-
The CVV re-entry field for its row. Renders nothing until that specific row is selected and the card requires a CVV; then renders a numeric input (digits only, capped at 4 characters) whose digits render **obscured** (dots) via an inline `-webkit-text-security: disc` style once the code is fully typed, with a helper line underneath it (`securityCodeDescription`, defaulting to "The 3-4 digit number on your card"; an empty string renders nothing). Wires the direct-to-gateway payment submission for the saved-card path the moment it is composed — the CVV is never sent to the storefront's own backend. A blank or under-three-digit code refuses before the place-order sequence opens a transaction, moving focus back to this input; the message reaches the shopper through the place-order CTA's own alert, not an inline field error here.
|
|
85
|
+
The CVV re-entry field for its row. Renders nothing until that specific row is selected and the card requires a CVV; then renders a numeric input (digits only, capped at 4 characters) whose digits render **obscured** (dots) via an inline `-webkit-text-security: disc` style once the code is fully typed, with a helper line underneath it (`securityCodeDescription`, defaulting to "The 3-4 digit number on your card"; an empty string renders nothing). Wires the direct-to-gateway payment submission for the saved-card path the moment it is composed — the CVV is never sent to the storefront's own backend. A blank or under-three-digit code refuses before the place-order sequence opens a transaction, moving focus back to this input; the message reaches the shopper through the place-order CTA's own alert, not an inline field error here. The typed code is cleared when the submission settles, by any route except that format refusal (which keeps it for the shopper to fix).
|
|
86
86
|
|
|
87
87
|
The mask engages on the third digit and stays on for a fourth. Three, because a saved card carries no per-network security-code length — the row's data has a display network name, not a `cvvMask` — so there is no signal here that tells a 3-digit network apart from Amex's 4, and the field's own accept-either floor is the only length available. Masking at the floor never leaves a complete code legible on either kind of card; a 4-digit code is simply already masked when its last digit arrives. Below three digits the code renders in the clear, so a shopper can read back what they just typed, and backspacing below three reveals what is left. Same rule and same shared predicate as `CardEntry`'s CVV field, which resolves its length from the detected method instead.
|
|
88
88
|
|
|
@@ -162,7 +162,7 @@ Style `SavedCards` as a vertical stack of rows, each row as a horizontal line (r
|
|
|
162
162
|
| `SavedCardOption` | One row — indicator, network, last four, label in a line; muted/dashed when expired | `flex items-center gap-[8px] p-[12px] border border-[#E0E0E0] rounded-[8px] data-[fs-saved-card-option-expired]:opacity-50 data-[fs-saved-card-option-selected]:border-[#000000]` |
|
|
163
163
|
| `SavedCardCvvField` | The short CVV input | `w-[64px] text-[14px] px-[8px] py-[6px] border border-[#CCCCCC] rounded-[4px]` |
|
|
164
164
|
| CVV helper text (`data-fs-saved-card-cvv-description`) | Small muted line next to/under the CVV input | `text-[12px] text-[#666666]` |
|
|
165
|
-
| Placing (`data-fs-saved-cards-placing`) | Present on `SavedCards`' own root while an order-placement sequence is in flight (T28); the whole list — including every `SavedCardOption` row and its `SavedCardCvvField` — is `inert` and `aria-disabled` at that point, transitively, with no attribute of their own | `opacity-60 cursor-not-allowed` |
|
|
165
|
+
| Placing (`data-fs-saved-cards-placing`) | Present on `SavedCards`' own root while an order-placement sequence is in flight (T28), and while the order attempt is resume-only (its card may already have been sent, so the fields do not accept input) until the attempt is freed; the whole list — including every `SavedCardOption` row and its `SavedCardCvvField` — is `inert` and `aria-disabled` at that point, transitively, with no attribute of their own | `opacity-60 cursor-not-allowed` |
|
|
166
166
|
|
|
167
167
|
Styled example:
|
|
168
168
|
|
package/dist/docs/select.md
CHANGED
|
@@ -26,10 +26,9 @@ Signals that distinguish it from other controls:
|
|
|
26
26
|
- A **country/region selector** (ISO codes resolved to display names), a **sort-order dropdown**, or a
|
|
27
27
|
**quantity/unit picker** are the most common PDP/checkout uses.
|
|
28
28
|
|
|
29
|
-
This particle
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
visual pattern for a human reader; it is not wired into image→schema detection.
|
|
29
|
+
This particle is a leaf control with no distinct visual region of its own, and the bound `FieldSelect.*`
|
|
30
|
+
parts cannot be generated from a screenshot without the bound Control that consumes them
|
|
31
|
+
(`ShippingAddressCountryControl`). This section documents the visual pattern for a human reader.
|
|
33
32
|
|
|
34
33
|
---
|
|
35
34
|
|
|
@@ -197,21 +196,34 @@ Positions the popup relative to the trigger.
|
|
|
197
196
|
| Prop | Type | Default | Notes |
|
|
198
197
|
|------|------|---------|-------|
|
|
199
198
|
| `side` | `'top' \| 'bottom' \| 'left' \| 'right'` | `'bottom'` | |
|
|
200
|
-
| `align` | `'start' \| 'center' \| 'end'` | `'
|
|
199
|
+
| `align` | `'start' \| 'center' \| 'end'` | `'start'` | Starts the popup at the trigger's start edge, so a popup wider than the trigger overhangs only the far side. |
|
|
201
200
|
| `sideOffset` | number | `0` | |
|
|
202
|
-
| `alignItemWithTrigger` | boolean | `
|
|
201
|
+
| `alignItemWithTrigger` | boolean | `false` | `true` makes the popup cover the trigger so the selected item sits on it. |
|
|
202
|
+
|
|
203
|
+
By default the popup opens below the trigger and leaves the trigger and its label readable. When there is no room
|
|
204
|
+
below, Base UI falls back to the top of the trigger by itself. The positioner exposes `--anchor-width`, so a popup can
|
|
205
|
+
match the trigger's width with `min-width: var(--anchor-width)`.
|
|
203
206
|
|
|
204
207
|
### SelectPopup
|
|
205
208
|
|
|
206
209
|
Visible container for the list. Style background, border, shadow here.
|
|
207
210
|
|
|
211
|
+
The base stylesheet bounds it to the viewport: `max-height: var(--available-height)` (Base UI publishes
|
|
212
|
+
`--available-height` on the positioner) and a column flex layout, so the list takes the leftover height; Tailwind's
|
|
213
|
+
preflight already makes the popup `border-box`, so its border counts inside the bound. The bound lives in the
|
|
214
|
+
stylesheet, not inline, so a utility such as `max-h-60` overrides it. `overflow-hidden` on the popup is harmless and
|
|
215
|
+
worth keeping: the list is the scroll container, so the popup only clips what pokes past its rounded corners (a
|
|
216
|
+
highlighted row's background).
|
|
217
|
+
|
|
208
218
|
### SelectArrow
|
|
209
219
|
|
|
210
220
|
Pointing arrow attached to the popup. Optional — omit when the design has no anchor arrow.
|
|
211
221
|
|
|
212
222
|
### SelectList
|
|
213
223
|
|
|
214
|
-
Scrollable container for `SelectItem`s (and, when grouped, `SelectGroup`s).
|
|
224
|
+
Scrollable container for `SelectItem`s (and, when grouped, `SelectGroup`s). It is the scroll container: the base
|
|
225
|
+
stylesheet gives it `min-height: 0` and `overflow-y: auto`, so it scrolls inside the popup's bound. A utility such as
|
|
226
|
+
`overflow-visible` overrides it.
|
|
215
227
|
|
|
216
228
|
### SelectItem
|
|
217
229
|
|
|
@@ -419,7 +431,7 @@ do.
|
|
|
419
431
|
| `SelectValue` | The chosen label / placeholder text | `flex-1 text-left` (target `data-placeholder:text-gray-400` for the empty state) |
|
|
420
432
|
| `SelectIcon` | The trailing glyph | `text-gray-400` |
|
|
421
433
|
| `SelectPopup` | The floating panel | `bg-white border border-gray-200 rounded-md shadow-lg overflow-hidden` |
|
|
422
|
-
| `SelectList` | The
|
|
434
|
+
| `SelectList` | The list (scrolls on its own) | `py-1 max-h-60` |
|
|
423
435
|
| `SelectItem` | One option row | `flex items-center gap-2 px-3 py-2 text-sm cursor-default hover:bg-blue-50 data-highlighted:bg-blue-50 data-selected:text-blue-600` |
|
|
424
436
|
| `SelectGroupLabel` | A group heading inside the list | `px-3 py-1 text-xs font-semibold text-gray-500 uppercase tracking-wide` |
|
|
425
437
|
| `SelectSeparator` | The divider between groups | `my-1 border-t border-gray-100` |
|
|
@@ -429,7 +441,7 @@ The four `FieldSelect.*` parts render alongside their generic counterpart's own
|
|
|
429
441
|
class names above; the bound `data-fs-field-select-*` attributes exist for a brand that specifically
|
|
430
442
|
needs to target *the bound select* without touching every generic select in the app.
|
|
431
443
|
|
|
432
|
-
Styled bound example (the `BoundRecomposed` story):
|
|
444
|
+
Styled bound example (the `FieldSelect.Root` of the `BoundRecomposed` story, verbatim):
|
|
433
445
|
|
|
434
446
|
```tsx
|
|
435
447
|
<FieldSelect.Root>
|
|
@@ -440,7 +452,7 @@ Styled bound example (the `BoundRecomposed` story):
|
|
|
440
452
|
<SelectPortal>
|
|
441
453
|
<SelectPositioner>
|
|
442
454
|
<SelectPopup className="bg-white border border-gray-200 rounded-md shadow-lg overflow-hidden">
|
|
443
|
-
<SelectList className="py-1 max-h-60
|
|
455
|
+
<SelectList className="py-1 max-h-60">
|
|
444
456
|
<FieldSelect.Options className="flex items-center gap-2 px-3 py-2 text-sm cursor-default hover:bg-blue-50 data-highlighted:bg-blue-50 data-selected:text-blue-600">
|
|
445
457
|
<SelectItemIndicator className="w-4 text-blue-600">✓</SelectItemIndicator>
|
|
446
458
|
</FieldSelect.Options>
|
package/dist/docs/session.md
CHANGED
|
@@ -101,7 +101,7 @@ Shared layout with `SessionRoot` as the root, above both the header and the `Slo
|
|
|
101
101
|
"props": { "when": ["identified", "loggedIn"] },
|
|
102
102
|
"children": ["orders-link"]
|
|
103
103
|
},
|
|
104
|
-
"orders-link": { "type": "NavigationLink", "props": { "href": "
|
|
104
|
+
"orders-link": { "type": "NavigationLink", "props": { "href": { "standard": "orders" }, "children": "Meus pedidos" } },
|
|
105
105
|
"slot": { "type": "Slot", "props": {}, "children": [] }
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -93,7 +93,7 @@ Registers under the `shippingAddress` namespace with an ancestor `FormRoot`; ren
|
|
|
93
93
|
- Compose `FormSubmit` and `FormError` as siblings, not children — the fieldset renders no submit or error part.
|
|
94
94
|
- Only one `ShippingAddressFieldset` per `FormRoot`; a second one under the same `shippingAddress` namespace throws at mount.
|
|
95
95
|
|
|
96
|
-
**Overriding a control's text:** every field Control also takes optional `label` and `placeholder` props. Absence means the platform's value — the active country descriptor's label where one exists (e.g. "cidade" for `CityControl`), the
|
|
96
|
+
**Overriding a control's text:** every field Control also takes optional `label` and `placeholder` props. Absence means the platform's value — the active country descriptor's label where one exists (e.g. "cidade" for `CityControl`), and for `CountryControl` the descriptor's `countryLabel` ("país" for Brazil, "country" for the United States). The required message follows the same rule: `<label> <requiredSuffix>` with the descriptor's suffix ("é obrigatório", "is required"), so an authored `label` renames the field in its message too. Neither has a schema default, so an author only sets one when the platform copy is wrong for their store.
|
|
97
97
|
|
|
98
98
|
**Recomposing a control's anatomy:** every field Control declares `providesContext: 'field'` (RFC:503), so a `Field.*` part composed inside one is not a context-constraint-violation. Given children, a field Control renders them in place of its default `Field.Label` / `Field.Control` / `Field.Error` (or, for `CountryControl`, `Field.Label` / `FieldSelect.Root` / `Field.Error`) — useful to reorder the label against the input or insert an icon. The binding underneath is unchanged either way.
|
|
99
99
|
|