@vtex/faststore 0.0.6 → 0.0.8
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 +99 -0
- package/dist/actions.json +152 -1
- package/dist/catalog.json +2541 -1278
- package/dist/cli/UnreachableCaseError-Crd168Vu.js +10 -0
- package/dist/cli/UnreachableCaseError-Crd168Vu.js.map +1 -0
- package/dist/cli/cacheControl-CEojH_TM.js +158 -0
- package/dist/cli/cacheControl-CEojH_TM.js.map +1 -0
- package/dist/cli/cachePolicy-m2vASMRW.js +26 -0
- package/dist/cli/cachePolicy-m2vASMRW.js.map +1 -0
- package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js +10 -0
- package/dist/cli/computeCoreSchemaHash-DPJZj-qJ.js.map +1 -0
- package/dist/cli/default-BCQHcwbL.js +253 -0
- package/dist/cli/default-BCQHcwbL.js.map +1 -0
- package/dist/cli/disableSuggestions-yO9UqiWn.js +21 -0
- package/dist/cli/disableSuggestions-yO9UqiWn.js.map +1 -0
- package/dist/cli/dist-C1JhdHfo.js +2001 -0
- package/dist/cli/dist-C1JhdHfo.js.map +1 -0
- package/dist/cli/graphql-DG9thCDG.js +14589 -0
- package/dist/cli/graphql-DG9thCDG.js.map +1 -0
- package/dist/cli/index.d.ts +799 -0
- package/dist/cli/index.js +36459 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/index.min-BsIHDfFK.js +613 -0
- package/dist/cli/index.min-BsIHDfFK.js.map +1 -0
- package/dist/cli/inlineTrace-uLgOJ3TH.js +52 -0
- package/dist/cli/inlineTrace-uLgOJ3TH.js.map +1 -0
- package/dist/cli/internalPlugin-DnuwN4_4.js +11 -0
- package/dist/cli/internalPlugin-DnuwN4_4.js.map +1 -0
- package/dist/cli/packageVersion-DQAnIEil.js +6 -0
- package/dist/cli/packageVersion-DQAnIEil.js.map +1 -0
- package/dist/cli/rolldown-runtime-BMI-E3GI.js +44 -0
- package/dist/cli/schemaIsSubgraph-DoGh3OYj.js +17 -0
- package/dist/cli/schemaIsSubgraph-DoGh3OYj.js.map +1 -0
- package/dist/cli/schemaReporting-K-me-3-v.js +199 -0
- package/dist/cli/schemaReporting-K-me-3-v.js.map +1 -0
- package/dist/cli/server-runtime.js +49879 -0
- package/dist/cli/server-runtime.js.map +1 -0
- package/dist/cli/traceTreeBuilder-BIcV2U7b.js +9118 -0
- package/dist/cli/traceTreeBuilder-BIcV2U7b.js.map +1 -0
- package/dist/cli/usageReporting-Bpl8vSZX.js +10201 -0
- package/dist/cli/usageReporting-Bpl8vSZX.js.map +1 -0
- package/dist/cli/v4-CBhFvC49.js +42 -0
- package/dist/cli/v4-CBhFvC49.js.map +1 -0
- package/dist/client.d.ts +5 -1
- package/dist/client.js +5 -1
- package/dist/components.d.ts +38 -9
- package/dist/components.js +42 -13
- package/dist/content-types.json +616 -0
- package/dist/core/dist/define-component.d.ts +43 -1
- package/dist/core/dist/index.d.ts +2 -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 +1 -1
- package/dist/docs/account-menu-identity.md +160 -0
- package/dist/docs/account-menu.md +107 -24
- package/dist/docs/alert-dialog.md +2 -2
- package/dist/docs/avatar.md +103 -0
- package/dist/docs/billing-address.md +17 -9
- package/dist/docs/card-entry.md +37 -6
- package/dist/docs/cardholder-document.md +16 -14
- package/dist/docs/cart-item.md +1 -1
- package/dist/docs/cart.md +8 -8
- 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/header-root.md +1 -1
- package/dist/docs/incentives.md +2 -2
- package/dist/docs/logo.md +5 -5
- package/dist/docs/my-account-profile.md +5 -5
- 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 +14 -3
- package/dist/docs/place-order.md +13 -9
- package/dist/docs/product-shelf.md +20 -13
- package/dist/docs/saved-cards.md +2 -2
- package/dist/docs/select.md +19 -6
- package/dist/docs/session.md +1 -1
- package/dist/docs/shipping-address.md +1 -1
- package/dist/docs/sign-in-redirect.md +6 -6
- package/dist/docs/toast.md +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +2 -1
- package/dist/internal/client.d.ts +6 -1
- package/dist/internal/client.js +8 -3
- package/dist/internal/content.d.ts +2 -2
- package/dist/internal/server.d.ts +8 -1
- package/dist/internal/server.js +8 -1
- 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 +77 -3
- package/dist/matter/account-menu/account-menu.js +252 -19
- package/dist/matter/account-menu/account-menu.js.map +1 -1
- package/dist/matter/account-menu/sign-out-failure.js +50 -0
- package/dist/matter/account-menu/sign-out-failure.js.map +1 -0
- package/dist/matter/account-menu-identity/account-menu-identity.d.ts +21 -0
- package/dist/matter/account-menu-identity/account-menu-identity.js +88 -0
- package/dist/matter/account-menu-identity/account-menu-identity.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 +78 -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.d.ts +7 -2
- package/dist/matter/cart/cart.js +29 -26
- package/dist/matter/cart/cart.js.map +1 -1
- package/dist/matter/cart-item/cart-item.js +2 -2
- package/dist/matter/cart-item/cart-item.js.map +1 -1
- package/dist/matter/client-preferences/client-preferences-fieldset.js +2 -2
- package/dist/matter/client-profile-form/client-profile-fieldset.js +9 -6
- package/dist/matter/client-profile-form/client-profile-fieldset.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 +4 -3
- package/dist/matter/identity-summary/identity-summary.js.map +1 -1
- package/dist/matter/my-account-profile/my-account-profile.d.ts +6 -3
- package/dist/matter/my-account-profile/my-account-profile.js +6 -5
- 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 +12 -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 +12 -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 +61 -31
- package/dist/matter/product-shelf/product-shelf.js +157 -57
- 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 +27 -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 +63 -15
- package/dist/matter/shipping-address/shipping-address.js.map +1 -1
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +1 -1
- 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/avatar/avatar.d.ts +17 -0
- package/dist/particles/avatar/avatar.js +65 -0
- package/dist/particles/avatar/avatar.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/incentives/incentives.d.ts +6 -2
- package/dist/particles/incentives/incentives.js +7 -2
- 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/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 +1 -1
- package/dist/particles/toast/toast.js +32 -6
- package/dist/particles/toast/toast.js.map +1 -1
- package/dist/schema.graphql +1079 -54
- 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 +3 -1
- package/dist/sdk/actions/index.js +3 -1
- 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/types.d.ts +6 -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/analytics/use-analytics-actions.js +2 -1
- package/dist/sdk/analytics/use-analytics-actions.js.map +1 -1
- package/dist/sdk/cache/storefront-cache.js +29 -4
- package/dist/sdk/cache/storefront-cache.js.map +1 -1
- package/dist/sdk/cart/use-cart-actions.js +9 -8
- package/dist/sdk/cart/use-cart-actions.js.map +1 -1
- package/dist/sdk/cart/use-cart-validate-on-open.js +2 -1
- package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -1
- 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.d.ts +22 -1
- package/dist/sdk/content/create-content-runtime.js +90 -9
- package/dist/sdk/content/create-content-runtime.js.map +1 -1
- package/dist/sdk/data/empty-content-value.js +16 -0
- package/dist/sdk/data/empty-content-value.js.map +1 -0
- package/dist/sdk/data/failed-fields.js +23 -0
- package/dist/sdk/data/failed-fields.js.map +1 -0
- package/dist/sdk/data/hot-data-provider.js +2 -1
- package/dist/sdk/data/hot-data-provider.js.map +1 -1
- package/dist/sdk/data/index.js +1 -1
- 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/variables-from-content.d.ts +43 -0
- package/dist/sdk/data/variables-from-content.js +57 -0
- package/dist/sdk/data/variables-from-content.js.map +1 -0
- 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 +4 -1
- package/dist/sdk/generated/gql.js.map +1 -1
- package/dist/sdk/generated/graphql.d.ts +8 -0
- package/dist/sdk/generated/graphql.js +296 -1
- package/dist/sdk/generated/graphql.js.map +1 -1
- package/dist/sdk/i18n/messages/en-US.js +138 -1
- package/dist/sdk/i18n/messages/en-US.json +138 -1
- package/dist/sdk/i18n/messages/en-US.json.d.ts +137 -0
- package/dist/sdk/i18n/messages/es-ES.js +138 -1
- package/dist/sdk/i18n/messages/es-ES.json +138 -1
- package/dist/sdk/i18n/messages/pt-BR.js +138 -1
- package/dist/sdk/i18n/messages/pt-BR.json +138 -1
- package/dist/sdk/identity/use-identity-actions.js +5 -4
- package/dist/sdk/identity/use-identity-actions.js.map +1 -1
- package/dist/sdk/navigation/current-page.js +30 -0
- package/dist/sdk/navigation/current-page.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 +6 -3
- 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 +334 -144
- package/dist/sdk/payment/use-place-order.js.map +1 -1
- package/dist/sdk/region/use-region-actions.js +2 -1
- package/dist/sdk/region/use-region-actions.js.map +1 -1
- package/dist/sdk/seo/page-alternates.d.ts +55 -0
- package/dist/sdk/seo/page-alternates.js +132 -0
- package/dist/sdk/seo/page-alternates.js.map +1 -0
- package/dist/sdk/session/read-server-session.d.ts +21 -0
- package/dist/sdk/session/read-server-session.js +61 -0
- package/dist/sdk/session/read-server-session.js.map +1 -0
- package/dist/sdk/session/use-session-actions.js +5 -4
- package/dist/sdk/session/use-session-actions.js.map +1 -1
- package/dist/sdk/session/use-session-revalidation.js +2 -1
- package/dist/sdk/session/use-session-revalidation.js.map +1 -1
- package/dist/sdk/shipping/use-shipping-actions.js +3 -2
- package/dist/sdk/shipping/use-shipping-actions.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 +11 -0
- package/dist/utils/safe-href.js +31 -22
- package/dist/utils/safe-href.js.map +1 -1
- package/package.json +17 -2
- 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 +27 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# AccountMenuIdentity
|
|
2
|
+
|
|
3
|
+
**Category:** identity
|
|
4
|
+
**Purpose:** The signed-in shopper's name and initials avatar, shown beside the account's section list so they can confirm whose account they are looking at.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A small circle with one or two capital letters (`JD`) next to a person's full name, above or beside a column of account section links.
|
|
11
|
+
- It is shown only where the section list is a vertical column. On a narrow screen, where the same sections read as a horizontal row of pills, it is absent.
|
|
12
|
+
- A name only, never an email address, phone number, or edit control next to it (unless the account has no saved name, when the email stands in for it).
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- In the account's shared layout, beside the section list, to show whose account it is.
|
|
19
|
+
|
|
20
|
+
## When NOT to use
|
|
21
|
+
|
|
22
|
+
- For a profile form or any editable field → use `MyAccountProfileRoot` and its controls.
|
|
23
|
+
- For a read-only identity card with e-mail, phone, and document → use `IdentitySummaryRoot`.
|
|
24
|
+
- For the header's sign-in or account control → use [[account-entry-point]].
|
|
25
|
+
- For a bare avatar with no account data → use [[avatar]].
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Composition
|
|
30
|
+
|
|
31
|
+
`AccountMenuIdentity` is a leaf that declares its own data read. It needs a `SessionRoot` ancestor and nothing else: it reads nothing from the menu, so it is valid anywhere under a session. In the `my-account` layout it is placed under `AccountAccessGate`, inside `AccountMenuRoot`, beside `AccountMenuList`.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
SessionRoot
|
|
35
|
+
└── AccountAccessGate
|
|
36
|
+
└── AccountMenuRoot
|
|
37
|
+
├── AccountMenuIdentity ← beside the list, never inside it
|
|
38
|
+
├── AccountMenuList
|
|
39
|
+
└── Slot ← the section's own page
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Place it in the layout, never on a page.** It is `reactive`: its fragment joins the layout's query, which runs in the browser where the shopper's cookie is, and the profile is fetched once and reused as the shopper moves between sections.
|
|
43
|
+
|
|
44
|
+
**A missing profile costs only this block.** `customerProfile` is nullable. It answers `null` with no error for an anonymous visitor, and `null` with an error at its own path (`UNAUTHORIZED`, `UPSTREAM_ERROR`) when the read fails. The rest of the layout query, the session included, resolves as usual, so the gate and the menu are unaffected.
|
|
45
|
+
|
|
46
|
+
**Keep it outside `AccountMenuList`.** The list is the navigation landmark and surrounds its items alone; the identity block is not navigation.
|
|
47
|
+
|
|
48
|
+
The profile is optional to the menu, so it lives in its own component with its own fragment. A store that does not compose this block does not fetch the profile for the menu.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Components
|
|
53
|
+
|
|
54
|
+
### AccountMenuIdentity
|
|
55
|
+
|
|
56
|
+
No props in the schema. It accepts standard `<div>` attributes (`className`, `id`), and takes no children.
|
|
57
|
+
|
|
58
|
+
The block renders:
|
|
59
|
+
|
|
60
|
+
| State | What renders |
|
|
61
|
+
|---|---|
|
|
62
|
+
| Session not `loggedIn`, or still loading | Nothing |
|
|
63
|
+
| `loggedIn`, layout query pending | An `aria-hidden` skeleton (`data-fs-account-menu-identity-skeleton`) |
|
|
64
|
+
| `loggedIn`, `customerProfile` is `null` | Nothing |
|
|
65
|
+
| `loggedIn`, profile has neither a name nor an email | Nothing |
|
|
66
|
+
| `loggedIn`, profile resolved | The avatar and the name |
|
|
67
|
+
|
|
68
|
+
**The name** is the first and last names, each trimmed, joined with a space. With neither, the trimmed email stands in for it. **The avatar** shows initials derived from that same name: the first letters of the first and last words, or one letter for a single word. It shows initials only, because the profile has no photo field.
|
|
69
|
+
|
|
70
|
+
The avatar is hidden from assistive technology, so the name is announced once, as text.
|
|
71
|
+
|
|
72
|
+
### AccountMenuIdentitySkeleton
|
|
73
|
+
|
|
74
|
+
The loading placeholder `AccountMenuIdentity` renders while the profile read is pending. No props. It needs no context.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Canonical schema example
|
|
79
|
+
|
|
80
|
+
The my-account layout, with the identity block beside the section list:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"account-session": { "type": "SessionRoot", "children": ["account-gate"] },
|
|
85
|
+
"account-gate": { "type": "AccountAccessGate", "children": ["account-menu"] },
|
|
86
|
+
"account-menu": {
|
|
87
|
+
"type": "AccountMenuRoot",
|
|
88
|
+
"children": ["account-sidebar", "account-slot"]
|
|
89
|
+
},
|
|
90
|
+
"account-sidebar": {
|
|
91
|
+
"type": "Container",
|
|
92
|
+
"children": ["account-identity", "account-menu-list"]
|
|
93
|
+
},
|
|
94
|
+
"account-identity": {
|
|
95
|
+
"type": "AccountMenuIdentity",
|
|
96
|
+
"style": ["$account-menu-identity"]
|
|
97
|
+
},
|
|
98
|
+
"account-menu-list": { "type": "AccountMenuList", "props": { "label": "Account" } },
|
|
99
|
+
"account-slot": { "type": "Slot" }
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Common mistakes
|
|
104
|
+
|
|
105
|
+
- **Putting it inside `AccountMenuList`.** The list takes no children; the block sits beside it, outside the landmark.
|
|
106
|
+
- **Composing it on a page instead of the layout.** A page-scoped query runs on the server; the layout's runs in the browser with the shopper's cookie and is reused across sections.
|
|
107
|
+
- **Omitting `SessionRoot`.** The block reads the session and throws without one.
|
|
108
|
+
- **Expecting a photo.** It shows initials only. The profile has no photo field, so there is nothing to pass.
|
|
109
|
+
- **Reaching for `IdentitySummaryRoot`.** That is checkout's order-form identity card and needs a cart. The account sidebar reads the persistent profile.
|
|
110
|
+
- **Hiding it with a component prop.** There is none. Hide it below `md` through the swatch (`max-md:hidden`).
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Styling
|
|
115
|
+
|
|
116
|
+
| Component | What you style | Plausible classes |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| `AccountMenuIdentity` | `data-fs-account-menu-identity` is the block: lays the avatar beside the name and hides it on narrow screens | `max-md:hidden flex items-center gap-3` |
|
|
119
|
+
| Avatar | `data-fs-avatar`, with `data-fs-account-menu-identity-avatar`, is the circle | `size-10 rounded-full bg-gray-200 text-sm font-medium` |
|
|
120
|
+
| Name | `data-fs-account-menu-identity-name` is the name text | `m-0 truncate font-semibold` |
|
|
121
|
+
| Skeleton | `data-fs-account-menu-identity-skeleton`, with `-avatar` and `-line` parts, holds the block's place | `flex items-center gap-3` |
|
|
122
|
+
|
|
123
|
+
The avatar is composed inside the block, so it is not a schema element a swatch can name. Its look reaches it through descendant selectors on the block's hooks, as a store's swatch does:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"AccountMenuIdentity": {
|
|
128
|
+
"account-menu-identity": [
|
|
129
|
+
"max-md:hidden",
|
|
130
|
+
"flex",
|
|
131
|
+
"items-center",
|
|
132
|
+
"gap-3",
|
|
133
|
+
"[&_[data-fs-avatar]]:inline-flex",
|
|
134
|
+
"[&_[data-fs-avatar]]:size-10",
|
|
135
|
+
"[&_[data-fs-avatar]]:shrink-0",
|
|
136
|
+
"[&_[data-fs-avatar]]:items-center",
|
|
137
|
+
"[&_[data-fs-avatar]]:justify-center",
|
|
138
|
+
"[&_[data-fs-avatar]]:overflow-hidden",
|
|
139
|
+
"[&_[data-fs-avatar]]:rounded-full",
|
|
140
|
+
"[&_[data-fs-avatar]]:bg-gray-200",
|
|
141
|
+
"[&_[data-fs-avatar]]:text-sm",
|
|
142
|
+
"[&_[data-fs-avatar]]:font-medium",
|
|
143
|
+
"[&_[data-fs-account-menu-identity-name]]:m-0",
|
|
144
|
+
"[&_[data-fs-account-menu-identity-name]]:truncate",
|
|
145
|
+
"[&_[data-fs-account-menu-identity-name]]:font-semibold"
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
`max-md:hidden` is `display: none` below the `md` breakpoint, which removes the block from the layout and from the accessibility tree.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Related
|
|
156
|
+
|
|
157
|
+
- [[avatar]] — the particle the block composes for its initials circle.
|
|
158
|
+
- [[account-menu]] — the section list the block sits beside.
|
|
159
|
+
- [[account-access-gate]] — the gate the layout places above both.
|
|
160
|
+
- `IdentitySummaryRoot` — checkout's read-only identity card, which reads the order form rather than the persistent profile.
|
|
@@ -28,12 +28,14 @@ The image is the source of truth for layout.
|
|
|
28
28
|
|
|
29
29
|
## Composition
|
|
30
30
|
|
|
31
|
-
Two parts, and the split is the point. `AccountMenuRoot` is the provider and `AccountMenuList` is the landmark.
|
|
31
|
+
Two parts, and the split is the point. `AccountMenuRoot` is the provider and `AccountMenuList` is the landmark. A third, `AccountMenuIndexRedirect`, is the account root's only content and lives inside the slot. A fourth, `AccountMenuSignOut`, is the sidebar's way out and sits beside the list.
|
|
32
32
|
|
|
33
33
|
```text
|
|
34
34
|
AccountMenuRoot
|
|
35
35
|
├── AccountMenuList
|
|
36
|
+
├── AccountMenuSignOut ← beside the list, outside the landmark
|
|
36
37
|
└── Slot ← the section's own page
|
|
38
|
+
└── AccountMenuIndexRedirect ← on the account page only
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
**The Root wraps the section's content; the landmark does not.** The Root's context has to reach consumers that live inside the slot — the account root's redirect, the sibling breadcrumb — and a context reaches only its descendants. A `<nav>` stretched that far would put every section's content inside a navigation region: a screen reader would announce the page as navigation and "skip to navigation" would skip nothing. So the Root wraps, and the `<nav>` stays around the items alone.
|
|
@@ -55,14 +57,14 @@ Content model (`account-menu`) fields, edited in the CMS:
|
|
|
55
57
|
|-------|------|----------|-------|
|
|
56
58
|
| `items` | array | no | One entry per section, in the order they should appear |
|
|
57
59
|
| `items[].label` | string | yes | The section's name |
|
|
58
|
-
| `items[].href` | string | yes | Its destination; `http(s)`, `mailto:`, `tel:`, or a site-relative path |
|
|
60
|
+
| `items[].href` | page reference or string | yes | Its destination; a page reference such as `{ "page": "orders" }`, or `http(s)`, `mailto:`, `tel:`, or a logical site-relative path |
|
|
59
61
|
| `items[].external` | boolean | no | The entry leaves the account; it is never marked current |
|
|
60
62
|
|
|
61
|
-
**The list comes from three channels, in order: a published entry, the authored `items` prop, then the library's five.** The default is Profile, Orders, Address, Payments, and Security,
|
|
63
|
+
**The list comes from three channels, in order: a published entry, the authored `items` prop, then the library's five.** The default is Profile, Orders, Address, Payments, and Security, the page references `{ standard: 'profile' }` and its siblings — the set the PRD names. The route map resolves each one for the current binding, for example `/pt-BR/pvt/profile`. Presence decides, not emptiness: a channel supplying an empty list resolves to empty rather than falling through, because a merchant who cleared the list cleared it and the defaults must not override a deliberate publication.
|
|
62
64
|
|
|
63
|
-
**The current section is derived, never authored.** The component reads the current path and matches each entry's destination on segment boundaries. At most one entry is current: among the matches, the one with the longest destination wins, which makes an exact match beat every ancestor without a second rule. `/
|
|
65
|
+
**The current section is derived, never authored.** The component reads the current logical path, without the binding's base path, and matches each entry's logical destination on segment boundaries. At most one entry is current: among the matches, the one with the longest destination wins, which makes an exact match beat every ancestor without a second rule. `/pvt/order` is not a match for `/pvt/orders` — a prefix that does not land on a segment boundary is not a match at all.
|
|
64
66
|
|
|
65
|
-
**An exact match announces `aria-current="page"`; an ancestor match announces `aria-current="true"`.** Inside `/
|
|
67
|
+
**An exact match announces `aria-current="page"`; an ancestor match announces `aria-current="true"`.** Inside `/pvt/orders/123`, Orders is the current item of its set but not the current page. That claim belongs to the breadcrumb's deep entry, and two surfaces announcing "current page" for two different things is worse than the menu claiming only its set.
|
|
66
68
|
|
|
67
69
|
Two kinds of entry are excluded from the match entirely: one marked `external`, and one whose destination is not site-relative. A destination of `/` is excluded from ancestor matching alone — a root destination is an ancestor of every account path, so a merchant listing the storefront's home beside the sections would otherwise see it current on every page. It still matches the path `/` exactly.
|
|
68
70
|
|
|
@@ -80,6 +82,58 @@ It takes no children: one `<li>` per resolved section is what it renders. With n
|
|
|
80
82
|
|
|
81
83
|
A refused destination keeps its label and loses its anchor, rendering as text under `data-fs-account-menu-text`. A blank label drops the entry outright: an anchor with no accessible name is a WCAG failure.
|
|
82
84
|
|
|
85
|
+
### AccountMenuIndexRedirect
|
|
86
|
+
|
|
87
|
+
Exposed as `AccountMenu.IndexRedirect`. The account's root has no section of its own, and which section is first is the merchant's call, so the root is a page holding this part alone.
|
|
88
|
+
|
|
89
|
+
| Prop | Type | Default | Notes |
|
|
90
|
+
|------|------|---------|-------|
|
|
91
|
+
| `loadingLabel` | string | — | Announced while the first section opens. |
|
|
92
|
+
| `emptyMessage` | string | `'No account section is configured.'` | What the root says when there is no section to open. |
|
|
93
|
+
| `className` | string | — | Applied to whichever element renders. |
|
|
94
|
+
|
|
95
|
+
Content model (`account-menu-index-redirect`) fields, edited in the CMS, each winning over its prop when published; a blank field falls through:
|
|
96
|
+
|
|
97
|
+
| Field | Type | Required | Notes |
|
|
98
|
+
|-------|------|----------|-------|
|
|
99
|
+
| `loadingLabel` | string | no | The waiting announcement |
|
|
100
|
+
| `emptyMessage` | string | no | The no-section message |
|
|
101
|
+
|
|
102
|
+
**It replaces the current history entry with the first section that stays in the account.** It reads the Root's resolved list and skips, in order: an entry marked `external`, a destination the allowlist refused, a destination that is not site-relative even though the merchant did not flag it, and the root itself in any spelling that matches it. Replace, never push: back from the section leaves the account instead of bouncing through its root.
|
|
103
|
+
|
|
104
|
+
**While a destination exists it renders the access gate's loading look**, `AccountAccessGateLoading`, with `data-fs-account-menu-index-redirect` beside the part's own hook. The list itself never loads — the Root resolves it synchronously — so what the look covers is the navigation: the frame before the replace is issued and the time the section takes to land. In the `my-account` layout the gate's own wait for the session comes first, so the shopper sees one look throughout.
|
|
105
|
+
|
|
106
|
+
**With nothing to open, the root is terminal.** A published empty list, or one holding external entries only, navigates nowhere and renders the message instead, under `data-fs-account-menu-index-redirect-empty`. The shell and the sidebar stay. The library's five defaults do not come back: the Root's presence rule is what keeps a published empty list empty, and this part reads the Root's result rather than choosing a channel of its own.
|
|
107
|
+
|
|
108
|
+
It inherits the menu's V0 assumption that public paths carry no binding prefix. Where a store's public base path is its binding id, the root's own entry is not recognized as the current page and the replace targets an unprefixed destination.
|
|
109
|
+
|
|
110
|
+
### AccountMenuSignOut
|
|
111
|
+
|
|
112
|
+
Exposed as `AccountMenu.SignOut`. A button that ends the session and leaves the account for the home page. It reads nothing from the Root, so it works anywhere under the `my-account` layout's gate; the sidebar is where shoppers look for it.
|
|
113
|
+
|
|
114
|
+
| Prop | Type | Default | Notes |
|
|
115
|
+
|------|------|---------|-------|
|
|
116
|
+
| `label` | string | `'Sign out'` | The button's text. |
|
|
117
|
+
| `errorMessage` | string | `"We couldn't sign you out. Please try again."` | Shown when the sign-out did not happen. |
|
|
118
|
+
| `className` | string | — | Applied to the wrapper. |
|
|
119
|
+
|
|
120
|
+
Content model (`account-menu-sign-out`) fields, edited in the CMS, each winning over its prop when published; a blank field falls through:
|
|
121
|
+
|
|
122
|
+
| Field | Type | Required | Notes |
|
|
123
|
+
|-------|------|----------|-------|
|
|
124
|
+
| `label` | string | no | The button's text |
|
|
125
|
+
| `errorMessage` | string | no | The failure message |
|
|
126
|
+
|
|
127
|
+
The component declares `actions: { session: ['logout'] }` and writes only through `$actions.session.logout()`.
|
|
128
|
+
|
|
129
|
+
**It declares the sign-out intent before it awaits the logout.** The logout's payload flips the session to signed out in place, before any navigation can start. A gate that saw that session with no intent would read it as an expired session and send the shopper to sign in for the account they just left. With the intent declared first, the gate stands down — it renders nothing — from the click until the document is gone. The shopper sees the page empty while the request runs; that is the gate's look, not this part's.
|
|
130
|
+
|
|
131
|
+
**Success is a document load of `/`.** It uses `location.assign`, not the router, so no client cache keeps the account behind the back control. What the browser's back-forward cache restores is the gate's to revalidate: it withdraws the intent on a restored page and re-reads the session. This part adds no `pageshow` handling of its own.
|
|
132
|
+
|
|
133
|
+
**Failure keeps the shopper where they are.** When the logout reports any error, rejects, or has no handler to run, the part withdraws the intent, the gate brings the account back, and the message renders under `role="alert"`. A logout that reports an error is a sign-out that did not happen, so the shopper is never sent home still signed in. The failure is held outside the component, because the gate unmounts the part for the length of the attempt and mounts it anew on withdrawal. The next click clears it.
|
|
134
|
+
|
|
135
|
+
**One activation, one logout.** While an attempt runs, a second click neither declares again nor dispatches a second mutation. The button is also disabled and `aria-busy` while any sign-out intent stands, so a second sign-out control on the page stops too.
|
|
136
|
+
|
|
83
137
|
### useAccountMenu()
|
|
84
138
|
|
|
85
139
|
Returns `{ items, current }` — the resolved sections and the current one as `{ index, match }`. It throws outside an `AccountMenuRoot`. This is the contract the account root's redirect and the sibling breadcrumb read, so the two surfaces cannot disagree about which section is current.
|
|
@@ -92,26 +146,45 @@ Returns `{ items, current }` — the resolved sections and the current one as `{
|
|
|
92
146
|
{
|
|
93
147
|
"account-menu": {
|
|
94
148
|
"type": "AccountMenuRoot",
|
|
95
|
-
"children": ["account-menu-list", "account-slot"]
|
|
96
|
-
"style": ["$account-menu"]
|
|
149
|
+
"children": ["account-menu-list", "account-menu-sign-out", "account-slot"]
|
|
97
150
|
},
|
|
98
151
|
"account-menu-list": {
|
|
99
152
|
"type": "AccountMenuList",
|
|
100
|
-
"props": { "label": "Minha conta" }
|
|
101
|
-
|
|
153
|
+
"props": { "label": "Minha conta" }
|
|
154
|
+
},
|
|
155
|
+
"account-menu-sign-out": {
|
|
156
|
+
"type": "AccountMenuSignOut",
|
|
157
|
+
"props": { "label": "Sair", "errorMessage": "Não conseguimos encerrar sua sessão. Tente novamente." }
|
|
102
158
|
}
|
|
103
159
|
}
|
|
104
160
|
```
|
|
105
161
|
|
|
106
162
|
Bound to a CMS entry, the Root authors no `items` at all — the entry supplies the whole list.
|
|
107
163
|
|
|
164
|
+
No part carries a `style` reference: each takes its type's `base` swatch from `global.json → styles` on its own. Reference a named swatch only when the store defines one, since a `$name` the store does not define expands to nothing, without an error.
|
|
165
|
+
|
|
166
|
+
The account root's page, whose only content is the redirect:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"account-index-redirect": {
|
|
171
|
+
"type": "AccountMenuIndexRedirect",
|
|
172
|
+
"props": { "loadingLabel": "Abrindo sua conta…", "emptyMessage": "Nenhuma seção configurada." }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
108
177
|
## Common mistakes
|
|
109
178
|
|
|
110
179
|
- **Placing the Root beside the slot instead of around it.** The layout's own consumers would be satisfied and the page's would not: a context reaches only descendants. Context-constraint validation reports it as a build error rather than as an empty menu at runtime.
|
|
111
180
|
- **Putting the `<nav>` around the section's content.** That is what the two-part split exists to prevent; do not wrap the slot in `AccountMenuList`.
|
|
112
181
|
- **Leaving `label` unauthored.** The default is `Account`; a store with its own wording should say so, because a landmark's name is how a screen-reader user tells it from every other one.
|
|
113
182
|
- **Styling the current item and nothing else.** The hook exists beside `aria-current`, never instead of it. Removing the programmatic signal leaves position conveyed by appearance alone.
|
|
114
|
-
- **Publishing an empty list and expecting the defaults.** Empty is a configuration, not an absence. The account's root then has no section to open.
|
|
183
|
+
- **Publishing an empty list and expecting the defaults.** Empty is a configuration, not an absence. The account's root then has no section to open, and says so.
|
|
184
|
+
- **Placing `AccountMenuIndexRedirect` on a section's page.** It navigates away from whatever page hosts it; it belongs on the account page alone.
|
|
185
|
+
- **Putting an external entry first and expecting the root to follow it.** It is skipped, as is an absolute destination left unflagged; the root opens the first section that stays in the account.
|
|
186
|
+
- **Placing `AccountMenuSignOut` outside the gate.** Nothing stands down while the logout runs, so the page shows the signed-out session for the moment before it leaves. Compose it under the `my-account` layout's gate.
|
|
187
|
+
- **Signing out with the router, or adding `pageshow` handling to the control.** The document load is what keeps the account off the back control, and the gate owns the back-forward cache.
|
|
115
188
|
- **Authoring `$content` in the schema.** `$content` is compiler-injected from the page's or layout's content entry; naming it in `props` fails the build.
|
|
116
189
|
- **Expecting the default five to resolve.** Their routes exist only in a store that authored the account's route family; until then the default is correct in the example store alone.
|
|
117
190
|
|
|
@@ -128,37 +201,47 @@ Bound to a CMS entry, the Root authors no `items` at all — the entry supplies
|
|
|
128
201
|
| Current item | `data-fs-account-menu-item-current` marks the current row | `font-semibold` |
|
|
129
202
|
| Link | `data-fs-account-menu-link` is the anchor | `block rounded-md px-3 py-2 text-sm` |
|
|
130
203
|
| Refused text | `data-fs-account-menu-text` replaces the anchor for a refused destination | `block px-3 py-2 text-gray-400` |
|
|
204
|
+
| `AccountMenuIndexRedirect` | `data-fs-account-menu-index-redirect` is on both of its looks; the wait also carries the gate's `data-fs-account-access-gate-loading` | `text-sm text-gray-600` |
|
|
205
|
+
| No-section message | `data-fs-account-menu-index-redirect-empty` marks the terminal state | `flex-1 p-6` |
|
|
206
|
+
| `AccountMenuSignOut` | `data-fs-account-menu-sign-out` is the wrapper; `data-fs-account-menu-sign-out-pending` is on it while a sign-out runs | `flex flex-col gap-2 px-3` |
|
|
207
|
+
| Sign-out button | `data-fs-account-menu-sign-out-button` is the `<button>`; style `:disabled` for the wait | `text-left text-sm underline` |
|
|
208
|
+
| Sign-out failure | `data-fs-account-menu-sign-out-error` is the alert | `text-sm text-red-600` |
|
|
131
209
|
|
|
132
|
-
The vertical-to-horizontal switch and the scroll affordance are one DOM styled two ways,
|
|
210
|
+
The vertical-to-horizontal switch and the scroll affordance are one DOM styled two ways, in CSS alone. A store authors them as `AccountMenuList.base` in `global.json → styles`, abridged here:
|
|
133
211
|
|
|
134
212
|
```json
|
|
135
213
|
{
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"flex",
|
|
139
|
-
"flex-col",
|
|
140
|
-
"gap-6",
|
|
141
|
-
"md:flex-row",
|
|
142
|
-
"md:gap-8",
|
|
214
|
+
"AccountMenuList": {
|
|
215
|
+
"base": [
|
|
143
216
|
"[&_[data-fs-account-menu-items]]:flex",
|
|
144
|
-
"[&_[data-fs-account-menu-items]]:gap-2",
|
|
145
|
-
"[&_[data-fs-account-menu-items]]:overflow-x-auto",
|
|
146
217
|
"md:[&_[data-fs-account-menu-items]]:flex-col",
|
|
147
|
-
"md:[&_[data-fs-account-menu-items]]:overflow-
|
|
148
|
-
"[&_[data-fs-account-menu-
|
|
149
|
-
"[&_[data-fs-account-menu-
|
|
218
|
+
"max-md:[&_[data-fs-account-menu-items]]:overflow-x-auto",
|
|
219
|
+
"max-md:[&_[data-fs-account-menu-items]]:scroll-pe-[32px]",
|
|
220
|
+
"max-md:[&_[data-fs-account-menu-items]]:mask-[linear-gradient(to_right,#000_calc(100%-32px),transparent)]",
|
|
221
|
+
"max-md:[&_[data-fs-account-menu-item]:last-child]:pe-[32px]",
|
|
222
|
+
"[&_[data-fs-account-menu-item]]:shrink-0",
|
|
223
|
+
"[&_[data-fs-account-menu-link]]:whitespace-nowrap",
|
|
224
|
+
"[&_[data-fs-account-menu-link]]:border-transparent",
|
|
225
|
+
"max-md:[&_[data-fs-account-menu-link]]:border-b-2",
|
|
226
|
+
"md:[&_[data-fs-account-menu-link]]:border-l-2",
|
|
227
|
+
"[&_[data-fs-account-menu-item-current]_[data-fs-account-menu-link]]:border-gray-900"
|
|
150
228
|
]
|
|
151
229
|
}
|
|
152
230
|
}
|
|
153
231
|
```
|
|
154
232
|
|
|
155
|
-
The
|
|
233
|
+
- **The masked edge needs space as wide as its fade.** Give the last item a trailing padding and the `<ul>` a `scroll-padding-inline-end` equal to the fade width. Without the padding, a row scrolled to its end leaves the last label under the fade. Without the scroll padding, bringing a current last item into view parks it there.
|
|
234
|
+
- **Reserve the current rule on every link in `transparent`.** Becoming current then changes a color, never a width, so the row does not shift on a route change.
|
|
235
|
+
- **The current-item look reaches the anchor through the row**, since the hook is on the `<li>` and the anchor is its child.
|
|
236
|
+
- **Keep the list's rules off the Root.** The Root wraps the section's content, so a descendant rule there reaches into every page. The Root's own classes and the layout's wrappers place the sidebar beside the section.
|
|
156
237
|
|
|
157
238
|
---
|
|
158
239
|
|
|
159
240
|
## Related
|
|
160
241
|
|
|
161
242
|
- [[account-entry-point]] — the header control that links into the account.
|
|
243
|
+
- [[account-access-gate]] — the loading look the root's redirect reuses, and the gate it runs under.
|
|
244
|
+
- [[account-menu-identity]] — the shopper's name and avatar, composed beside the list inside the Root.
|
|
162
245
|
- [[navigation-link]] — the client-side link each item composes.
|
|
163
246
|
- [[navigation-link-list]] — the general-purpose CMS-driven list this one is patterned on.
|
|
164
247
|
- `BreadcrumbRoot` — the sibling trail that keeps the "current page" claim for the deep page.
|
|
@@ -72,9 +72,9 @@ No props.
|
|
|
72
72
|
|
|
73
73
|
### AlertDialogPortal
|
|
74
74
|
|
|
75
|
-
Teleports its children to `<body>`.
|
|
75
|
+
Teleports its children. With no `container`, they go to `<body>`. Pass `container` when a parent swatch has to reach the overlay.
|
|
76
76
|
|
|
77
|
-
No
|
|
77
|
+
No `className`.
|
|
78
78
|
|
|
79
79
|
### AlertDialogBackdrop
|
|
80
80
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Avatar
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** A person or account marker: an image with an initials fallback derived from a name. It carries no account data of its own.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
- A small circle, usually 32–48px, holding one or two capital letters — `JD`, `A` — on a flat tinted background.
|
|
11
|
+
- Or the same circle holding a round photo of a person.
|
|
12
|
+
- It sits beside a person's name, in a comment, a profile header, or an account sidebar.
|
|
13
|
+
|
|
14
|
+
The image is the source of truth for layout.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- Wherever a person or account needs a compact visual marker beside their name.
|
|
19
|
+
- When there may be no photo: the initials are the fallback, not a separate component.
|
|
20
|
+
|
|
21
|
+
## When NOT to use
|
|
22
|
+
|
|
23
|
+
- For a product or content image → use `Image`.
|
|
24
|
+
- For a status or count label → use `Badge`.
|
|
25
|
+
- For a logo → use `Logo`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Composition
|
|
30
|
+
|
|
31
|
+
`Avatar` is a leaf. It renders one `<span>` holding the image, when there is one, and the initials fallback. It has no children and requires no ancestor.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Container
|
|
35
|
+
└── Avatar
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Components
|
|
41
|
+
|
|
42
|
+
### Avatar
|
|
43
|
+
|
|
44
|
+
| Prop | Type | Default | Notes |
|
|
45
|
+
|------|------|---------|-------|
|
|
46
|
+
| `name` | string | — | Whose avatar this is. The initials derive from it: the first letters of the first and last words, or one letter for a single word. |
|
|
47
|
+
| `src` | string | — | Image URL. Absent or empty, the initials show. |
|
|
48
|
+
| `alt` | string | — | Accessible name. Without it the avatar is decorative and hidden from assistive technology. |
|
|
49
|
+
|
|
50
|
+
The fallback shows whenever there is no image, the image is still loading, or it failed to load. The image replaces it only once it has loaded.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Canonical schema example
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"shopper-avatar": {
|
|
59
|
+
"type": "Avatar",
|
|
60
|
+
"props": { "name": "Jane Doe", "alt": "Jane Doe" },
|
|
61
|
+
"style": ["inline-flex", "size-10", "items-center", "justify-center", "rounded-full", "bg-gray-200", "text-sm", "font-medium"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Common mistakes
|
|
67
|
+
|
|
68
|
+
- **Leaving `alt` off a standalone avatar.** Without `alt` it is hidden from assistive technology, which is right beside text that already names the person and wrong anywhere else. Give it an `alt`.
|
|
69
|
+
- **Giving it an `alt` beside the person's name.** The name is then announced twice.
|
|
70
|
+
- **Expecting a photo from `name` alone.** `name` only derives initials; a photo needs `src`.
|
|
71
|
+
- **Inventing `ProfilePicture` or `UserIcon`.** The component is `Avatar`.
|
|
72
|
+
- **Styling without a size and shape.** The particle ships no look: give it a size, `rounded-full`, and overflow hidden, or the image and initials render unconstrained.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Styling
|
|
77
|
+
|
|
78
|
+
| Component | What you style | Plausible classes |
|
|
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-[#E5E7EB] text-[14px] font-medium` |
|
|
81
|
+
| Image | `data-fs-avatar-image` is the `<img>` once loaded | `size-full object-cover` |
|
|
82
|
+
| Initials | `data-fs-avatar-fallback` is the initials span | `uppercase` |
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"shopper-avatar": {
|
|
87
|
+
"type": "Avatar",
|
|
88
|
+
"props": { "name": "Jane Doe", "alt": "Jane Doe" },
|
|
89
|
+
"style": [
|
|
90
|
+
"inline-flex", "size-10", "shrink-0", "items-center", "justify-center", "overflow-hidden",
|
|
91
|
+
"rounded-full", "bg-[#E5E7EB]", "text-[14px]", "font-medium", "[&_img]:size-full", "[&_img]:object-cover"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Related
|
|
100
|
+
|
|
101
|
+
- [[badge]] — a status or count label; distinct from a person marker.
|
|
102
|
+
- `Image` — a content image with no fallback or initials.
|
|
103
|
+
- [[account-menu-identity]] — the account sidebar's name-and-avatar block, which composes `Avatar`.
|
|
@@ -108,6 +108,7 @@ a form the shopper cannot see.
|
|
|
108
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
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
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. |
|
|
111
112
|
| `disabled` | boolean | `false` | Disables the toggle, every form field, the country selector, and the submit button. |
|
|
112
113
|
|
|
113
114
|
**Data:** declares no fragment and no `fetchStrategy`, so it fetches no shopper data. It reads only the
|
|
@@ -132,9 +133,9 @@ fields does not prevent that either — there is no `<form>` element anywhere in
|
|
|
132
133
|
`required` is real for assistive technology but not wired to anything that blocks a click on a
|
|
133
134
|
different button in a different component. Since T38 each rendered field (all but `complement`) does
|
|
134
135
|
announce its own validity once touched — see Accessibility Contract below — but that announcement is
|
|
135
|
-
driven by a local
|
|
136
|
-
gate the submit control; the submit gate is
|
|
137
|
-
own `disabled`.
|
|
136
|
+
driven by a local touched-field state (blur, or a refused submit focusing the field), never by
|
|
137
|
+
`required`'s own native validity, and it still does not gate the submit control; the submit gate is
|
|
138
|
+
`isBillingAddressFormValid`, read at the submit button's own `disabled`.
|
|
138
139
|
|
|
139
140
|
**The hard block itself lives elsewhere.** This component also publishes the exact same fact the notice
|
|
140
141
|
renders from onto the shared payment draft (`billingAddressUnsaved`), and T24's submit gate
|
|
@@ -154,10 +155,13 @@ stays checked and the shopper never opens the form. It never reacts to the toggl
|
|
|
154
155
|
`data-fs-billing-address-match-notice`, and renders as a plain paragraph with no ARIA role — it is a
|
|
155
156
|
static disclaimer, not a live region reacting to an event.
|
|
156
157
|
|
|
158
|
+
**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
|
+
|
|
157
160
|
**Country adaptivity is entirely data-driven**, reusing the same country descriptors the delivery
|
|
158
161
|
address step uses: Brazil shows a neighborhood/bairro field, the United States does not, and adding a
|
|
159
162
|
new country anywhere in this codebase is a data-only change that this component picks up automatically
|
|
160
|
-
— never a code change here.
|
|
163
|
+
— never a code change here. The postal code's format is the same data: the descriptor's `rule.pattern`
|
|
164
|
+
gates the submit button and the field error, so a country's format is defined once for both forms.
|
|
161
165
|
|
|
162
166
|
---
|
|
163
167
|
|
|
@@ -228,7 +232,7 @@ while the box is unchecked, and an optional inline error.
|
|
|
228
232
|
| Required-billing-address note (`data-fs-billing-address-required-note`) | De-emphasized helper text | `text-[12px] text-[#666666]` |
|
|
229
233
|
| Unsaved-address notice (`data-fs-billing-address-unsaved-notice`) | De-emphasized, non-error helper text | `text-[12px] text-[#666666]` |
|
|
230
234
|
| Billing-match disclaimer (`data-fs-billing-address-match-notice`) | De-emphasized helper text, first child of the root | `text-[12px] text-[#666666]` |
|
|
231
|
-
| Field error (`data-fs-field-error`) | Per-field validation message, shown once a
|
|
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 text-[#B00020]` |
|
|
232
236
|
| Inline error (`data-fs-billing-address-error`) | Warning-toned alert text | `text-[12px] font-medium text-[#B00020]` |
|
|
233
237
|
| 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` |
|
|
234
238
|
|
|
@@ -252,10 +256,14 @@ There is no per-field styling hook beyond the particles' own `data-fs-checkbox-*
|
|
|
252
256
|
## Accessibility Contract
|
|
253
257
|
|
|
254
258
|
**What the platform promises:** every rendered custom-address field (all but `complement`) announces
|
|
255
|
-
its own validity once the shopper has touched it
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
its own validity once the shopper has touched it. A field is touched when the shopper blurs it, or when a
|
|
260
|
+
refused submit moves focus to it (no blur ever comes there). Focus, type nothing, and blur a required
|
|
261
|
+
field, and it carries `aria-invalid="true"` plus an error message (`fieldRequiredMessage`) associated
|
|
262
|
+
through `aria-describedby`; nothing is marked invalid before it is touched, and `complement` — the one
|
|
263
|
+
optional field — is never marked invalid. A postal code that is non-blank but not in the selected country's format
|
|
264
|
+
is marked the same way, with `postalCodeInvalidMessage` as its error; switching country re-judges the
|
|
265
|
+
typed value at once. Blank wins over format: a blank postal code reads `fieldRequiredMessage`, never the
|
|
266
|
+
format message. This mirrors `CardEntry`'s own field-level validity mechanism exactly.
|
|
259
267
|
Each field also carries its own `Field.Label`, authorable per field. A default `:focus-visible` outline
|
|
260
268
|
is painted from the platform's own stylesheet on every field in this component.
|
|
261
269
|
|