@vtex/faststore 0.0.1
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 +18 -0
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/dist/actions.json +334 -0
- package/dist/catalog.json +6615 -0
- package/dist/client.d.ts +17 -0
- package/dist/client.js +8 -0
- package/dist/components.d.ts +87 -0
- package/dist/components.js +87 -0
- package/dist/content-types.json +684 -0
- package/dist/core/dist/actions/mock-action.d.ts +24 -0
- package/dist/core/dist/actions/mock-action.js +28 -0
- package/dist/core/dist/actions/mock-action.js.map +1 -0
- package/dist/core/dist/actions/registry.d.ts +24 -0
- package/dist/core/dist/actions/registry.js +28 -0
- package/dist/core/dist/actions/registry.js.map +1 -0
- package/dist/core/dist/define-component.d.ts +100 -0
- package/dist/core/dist/define-component.js +8 -0
- package/dist/core/dist/define-component.js.map +1 -0
- package/dist/core/dist/define-content-type.d.ts +95 -0
- package/dist/core/dist/define-content-type.js +283 -0
- package/dist/core/dist/define-content-type.js.map +1 -0
- package/dist/core/dist/index.d.ts +7 -0
- package/dist/core/dist/index.js +5 -0
- package/dist/core/dist/schema/generated/schema.d.ts +28 -0
- package/dist/core/dist/types.d.ts +1 -0
- package/dist/docs/access-code-field.md +100 -0
- package/dist/docs/access-code-sign-in.md +174 -0
- package/dist/docs/account-entry-point.md +155 -0
- package/dist/docs/address-summary.md +50 -0
- package/dist/docs/buy-button.md +162 -0
- package/dist/docs/carousel.md +105 -0
- package/dist/docs/cart-item.md +162 -0
- package/dist/docs/cart-totalizer.md +197 -0
- package/dist/docs/cart.md +495 -0
- package/dist/docs/client-preferences.md +184 -0
- package/dist/docs/client-profile-form.md +192 -0
- package/dist/docs/client-profile.md +117 -0
- package/dist/docs/container.md +97 -0
- package/dist/docs/document-field.md +97 -0
- package/dist/docs/email-field.md +93 -0
- package/dist/docs/email-identification.md +102 -0
- package/dist/docs/footer-copyright.md +112 -0
- package/dist/docs/footer-link-group.md +162 -0
- package/dist/docs/footer-root.md +145 -0
- package/dist/docs/footer-social.md +151 -0
- package/dist/docs/free-shipping-progress.md +87 -0
- package/dist/docs/gallery.md +84 -0
- package/dist/docs/header-root.md +150 -0
- package/dist/docs/identity-edit.md +88 -0
- package/dist/docs/identity-summary.md +106 -0
- package/dist/docs/incentives.md +151 -0
- package/dist/docs/logo.md +135 -0
- package/dist/docs/meter.md +67 -0
- package/dist/docs/navigation-link-list.md +171 -0
- package/dist/docs/navigation-link.md +163 -0
- package/dist/docs/navigation-menu.md +264 -0
- package/dist/docs/payment-methods.md +139 -0
- package/dist/docs/phone-field.md +106 -0
- package/dist/docs/postal-code-field.md +126 -0
- package/dist/docs/pricing.md +499 -0
- package/dist/docs/product-gallery.md +409 -0
- package/dist/docs/product-information.md +295 -0
- package/dist/docs/product-list.md +170 -0
- package/dist/docs/product-quantity.md +88 -0
- package/dist/docs/product-shelf.md +141 -0
- package/dist/docs/promotion.md +109 -0
- package/dist/docs/region.md +225 -0
- package/dist/docs/session.md +123 -0
- package/dist/docs/shipping-address.md +390 -0
- package/dist/docs/shipping-simulator.md +147 -0
- package/dist/docs/sign-in-form.md +117 -0
- package/dist/docs/tabs.md +176 -0
- package/dist/docs/toast.md +124 -0
- package/dist/docs/variant-selector.md +450 -0
- package/dist/graphql/define-subgraph.d.ts +12 -0
- package/dist/graphql/define-subgraph.js +15 -0
- package/dist/graphql/define-subgraph.js.map +1 -0
- package/dist/graphql/gql.d.ts +10 -0
- package/dist/graphql/gql.js +16 -0
- package/dist/graphql/gql.js.map +1 -0
- package/dist/graphql/types.d.ts +88 -0
- package/dist/graphql.d.ts +4 -0
- package/dist/graphql.js +3 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +5 -0
- package/dist/internal/client.d.ts +24 -0
- package/dist/internal/client.js +23 -0
- package/dist/internal/content.d.ts +2 -0
- package/dist/internal/content.js +2 -0
- package/dist/internal/server.d.ts +7 -0
- package/dist/internal/server.js +6 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.d.ts +111 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.js +387 -0
- package/dist/matter/access-code-sign-in/access-code-sign-in.js.map +1 -0
- package/dist/matter/account-entry-point/account-entry-point.d.ts +64 -0
- package/dist/matter/account-entry-point/account-entry-point.js +151 -0
- package/dist/matter/account-entry-point/account-entry-point.js.map +1 -0
- package/dist/matter/breadcrumb/breadcrumb.d.ts +40 -0
- package/dist/matter/breadcrumb/breadcrumb.js +155 -0
- package/dist/matter/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/matter/buy-button/buy-button.d.ts +95 -0
- package/dist/matter/buy-button/buy-button.js +259 -0
- package/dist/matter/buy-button/buy-button.js.map +1 -0
- package/dist/matter/cart/cart-namespace.d.ts +48 -0
- package/dist/matter/cart/cart-namespace.js +50 -0
- package/dist/matter/cart/cart-namespace.js.map +1 -0
- package/dist/matter/cart/cart.d.ts +312 -0
- package/dist/matter/cart/cart.js +1034 -0
- package/dist/matter/cart/cart.js.map +1 -0
- package/dist/matter/cart-item/cart-item.d.ts +103 -0
- package/dist/matter/cart-item/cart-item.js +672 -0
- package/dist/matter/cart-item/cart-item.js.map +1 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.d.ts +49 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.js +165 -0
- package/dist/matter/cart-item-compositions/cart-item-compositions.js.map +1 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.d.ts +28 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.js +73 -0
- package/dist/matter/cart-item-customizations/cart-item-customizations.js.map +1 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.d.ts +33 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.js +70 -0
- package/dist/matter/cart-item-discounts/cart-item-discounts.js.map +1 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.d.ts +24 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js +54 -0
- package/dist/matter/cart-item-seller-info/cart-item-seller-info.js.map +1 -0
- package/dist/matter/cart-item-variations/cart-item-variations.d.ts +27 -0
- package/dist/matter/cart-item-variations/cart-item-variations.js +69 -0
- package/dist/matter/cart-item-variations/cart-item-variations.js.map +1 -0
- package/dist/matter/cart-totalizer/cart-totalizer.d.ts +78 -0
- package/dist/matter/cart-totalizer/cart-totalizer.js +220 -0
- package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -0
- package/dist/matter/client-preferences/client-preferences.d.ts +50 -0
- package/dist/matter/client-preferences/client-preferences.js +206 -0
- package/dist/matter/client-preferences/client-preferences.js.map +1 -0
- package/dist/matter/client-profile/client-profile.d.ts +59 -0
- package/dist/matter/client-profile/client-profile.js +185 -0
- package/dist/matter/client-profile/client-profile.js.map +1 -0
- package/dist/matter/client-profile-form/client-profile-form.d.ts +126 -0
- package/dist/matter/client-profile-form/client-profile-form.js +660 -0
- package/dist/matter/client-profile-form/client-profile-form.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options-accordion.d.ts +30 -0
- package/dist/matter/delivery-options/delivery-options-accordion.js +189 -0
- package/dist/matter/delivery-options/delivery-options-accordion.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options-controller.d.ts +49 -0
- package/dist/matter/delivery-options/delivery-options-controller.js +203 -0
- package/dist/matter/delivery-options/delivery-options-controller.js.map +1 -0
- package/dist/matter/delivery-options/delivery-options.d.ts +31 -0
- package/dist/matter/delivery-options/delivery-options.js +103 -0
- package/dist/matter/delivery-options/delivery-options.js.map +1 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.d.ts +9 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js +76 -0
- package/dist/matter/delivery-options/use-delivery-option-selection.js.map +1 -0
- package/dist/matter/email-identification/email-identification.d.ts +37 -0
- package/dist/matter/email-identification/email-identification.js +111 -0
- package/dist/matter/email-identification/email-identification.js.map +1 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +44 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.js +170 -0
- package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -0
- package/dist/matter/identity-edit/identity-edit.d.ts +52 -0
- package/dist/matter/identity-edit/identity-edit.js +148 -0
- package/dist/matter/identity-edit/identity-edit.js.map +1 -0
- package/dist/matter/identity-summary/identity-summary.d.ts +128 -0
- package/dist/matter/identity-summary/identity-summary.js +344 -0
- package/dist/matter/identity-summary/identity-summary.js.map +1 -0
- package/dist/matter/pricing/pricing.d.ts +162 -0
- package/dist/matter/pricing/pricing.js +793 -0
- package/dist/matter/pricing/pricing.js.map +1 -0
- package/dist/matter/product-gallery/product-gallery.d.ts +23 -0
- package/dist/matter/product-gallery/product-gallery.js +188 -0
- package/dist/matter/product-gallery/product-gallery.js.map +1 -0
- package/dist/matter/product-information/product-information.d.ts +61 -0
- package/dist/matter/product-information/product-information.js +355 -0
- package/dist/matter/product-information/product-information.js.map +1 -0
- package/dist/matter/product-list/product-list.d.ts +86 -0
- package/dist/matter/product-list/product-list.js +342 -0
- package/dist/matter/product-list/product-list.js.map +1 -0
- package/dist/matter/product-quantity/product-quantity.d.ts +50 -0
- package/dist/matter/product-quantity/product-quantity.js +111 -0
- package/dist/matter/product-quantity/product-quantity.js.map +1 -0
- package/dist/matter/product-shelf/product-shelf.d.ts +125 -0
- package/dist/matter/product-shelf/product-shelf.js +376 -0
- package/dist/matter/product-shelf/product-shelf.js.map +1 -0
- package/dist/matter/region/region.d.ts +211 -0
- package/dist/matter/region/region.js +579 -0
- package/dist/matter/region/region.js.map +1 -0
- package/dist/matter/session/session.d.ts +58 -0
- package/dist/matter/session/session.js +112 -0
- package/dist/matter/session/session.js.map +1 -0
- package/dist/matter/shipping-address/country-descriptors.js +101 -0
- package/dist/matter/shipping-address/country-descriptors.js.map +1 -0
- package/dist/matter/shipping-address/shipping-address.d.ts +284 -0
- package/dist/matter/shipping-address/shipping-address.js +1036 -0
- package/dist/matter/shipping-address/shipping-address.js.map +1 -0
- package/dist/matter/shipping-simulator/shipping-simulator.d.ts +143 -0
- package/dist/matter/shipping-simulator/shipping-simulator.js +644 -0
- package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -0
- package/dist/matter/sign-in-form/sign-in-form.d.ts +79 -0
- package/dist/matter/sign-in-form/sign-in-form.js +226 -0
- package/dist/matter/sign-in-form/sign-in-form.js.map +1 -0
- package/dist/matter/variant-selector/variant-selector.d.ts +183 -0
- package/dist/matter/variant-selector/variant-selector.js +840 -0
- package/dist/matter/variant-selector/variant-selector.js.map +1 -0
- package/dist/message-locales.json +7 -0
- package/dist/particles/access-code-field/access-code-field.d.ts +33 -0
- package/dist/particles/access-code-field/access-code-field.js +95 -0
- package/dist/particles/access-code-field/access-code-field.js.map +1 -0
- package/dist/particles/accordion/accordion.d.ts +45 -0
- package/dist/particles/accordion/accordion.js +156 -0
- package/dist/particles/accordion/accordion.js.map +1 -0
- package/dist/particles/address-summary/address-summary.d.ts +50 -0
- package/dist/particles/address-summary/address-summary.js +129 -0
- package/dist/particles/address-summary/address-summary.js.map +1 -0
- package/dist/particles/badge/badge.d.ts +10 -0
- package/dist/particles/badge/badge.js +27 -0
- package/dist/particles/badge/badge.js.map +1 -0
- package/dist/particles/button/button.d.ts +18 -0
- package/dist/particles/button/button.js +37 -0
- package/dist/particles/button/button.js.map +1 -0
- package/dist/particles/carousel/carousel.d.ts +60 -0
- package/dist/particles/carousel/carousel.js +335 -0
- package/dist/particles/carousel/carousel.js.map +1 -0
- package/dist/particles/checkbox/checkbox.d.ts +40 -0
- package/dist/particles/checkbox/checkbox.js +82 -0
- package/dist/particles/checkbox/checkbox.js.map +1 -0
- package/dist/particles/container/container.d.ts +20 -0
- package/dist/particles/container/container.js +36 -0
- package/dist/particles/container/container.js.map +1 -0
- package/dist/particles/dialog/dialog.d.ts +54 -0
- package/dist/particles/dialog/dialog.js +192 -0
- package/dist/particles/dialog/dialog.js.map +1 -0
- package/dist/particles/document-field/document-field.d.ts +61 -0
- package/dist/particles/document-field/document-field.js +146 -0
- package/dist/particles/document-field/document-field.js.map +1 -0
- package/dist/particles/drawer/drawer.d.ts +52 -0
- package/dist/particles/drawer/drawer.js +183 -0
- package/dist/particles/drawer/drawer.js.map +1 -0
- package/dist/particles/email-field/email-field.d.ts +37 -0
- package/dist/particles/email-field/email-field.js +106 -0
- package/dist/particles/email-field/email-field.js.map +1 -0
- package/dist/particles/field/field.d.ts +50 -0
- package/dist/particles/field/field.js +133 -0
- package/dist/particles/field/field.js.map +1 -0
- package/dist/particles/fieldset/fieldset.d.ts +16 -0
- package/dist/particles/fieldset/fieldset.js +52 -0
- package/dist/particles/fieldset/fieldset.js.map +1 -0
- package/dist/particles/footer-copyright/footer-copyright.d.ts +32 -0
- package/dist/particles/footer-copyright/footer-copyright.js +50 -0
- package/dist/particles/footer-copyright/footer-copyright.js.map +1 -0
- package/dist/particles/footer-link-group/footer-link-group.d.ts +66 -0
- package/dist/particles/footer-link-group/footer-link-group.js +154 -0
- package/dist/particles/footer-link-group/footer-link-group.js.map +1 -0
- package/dist/particles/footer-root/footer-root.d.ts +21 -0
- package/dist/particles/footer-root/footer-root.js +38 -0
- package/dist/particles/footer-root/footer-root.js.map +1 -0
- package/dist/particles/footer-social/footer-social.d.ts +79 -0
- package/dist/particles/footer-social/footer-social.js +176 -0
- package/dist/particles/footer-social/footer-social.js.map +1 -0
- package/dist/particles/gallery/gallery.d.ts +181 -0
- package/dist/particles/gallery/gallery.js +920 -0
- package/dist/particles/gallery/gallery.js.map +1 -0
- package/dist/particles/header-root/header-root.d.ts +21 -0
- package/dist/particles/header-root/header-root.js +38 -0
- package/dist/particles/header-root/header-root.js.map +1 -0
- package/dist/particles/icon/icon.d.ts +22 -0
- package/dist/particles/icon/icon.js +48 -0
- package/dist/particles/icon/icon.js.map +1 -0
- package/dist/particles/image/image.d.ts +13 -0
- package/dist/particles/image/image.js +59 -0
- package/dist/particles/image/image.js.map +1 -0
- package/dist/particles/incentives/incentives.d.ts +85 -0
- package/dist/particles/incentives/incentives.js +200 -0
- package/dist/particles/incentives/incentives.js.map +1 -0
- package/dist/particles/input/input.d.ts +9 -0
- package/dist/particles/input/input.js +28 -0
- package/dist/particles/input/input.js.map +1 -0
- package/dist/particles/logo/logo.d.ts +55 -0
- package/dist/particles/logo/logo.js +96 -0
- package/dist/particles/logo/logo.js.map +1 -0
- package/dist/particles/menu/menu.d.ts +103 -0
- package/dist/particles/menu/menu.js +409 -0
- package/dist/particles/menu/menu.js.map +1 -0
- package/dist/particles/menubar/menubar.d.ts +18 -0
- package/dist/particles/menubar/menubar.js +42 -0
- package/dist/particles/menubar/menubar.js.map +1 -0
- package/dist/particles/meter/meter.d.ts +36 -0
- package/dist/particles/meter/meter.js +132 -0
- package/dist/particles/meter/meter.js.map +1 -0
- package/dist/particles/navigation-link/navigation-link.d.ts +43 -0
- package/dist/particles/navigation-link/navigation-link.js +82 -0
- package/dist/particles/navigation-link/navigation-link.js.map +1 -0
- package/dist/particles/navigation-link-list/navigation-link-list.d.ts +59 -0
- package/dist/particles/navigation-link-list/navigation-link-list.js +103 -0
- package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -0
- package/dist/particles/navigation-menu/navigation-menu.d.ts +78 -0
- package/dist/particles/navigation-menu/navigation-menu.js +295 -0
- package/dist/particles/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/particles/number-field/number-field.d.ts +46 -0
- package/dist/particles/number-field/number-field.js +169 -0
- package/dist/particles/number-field/number-field.js.map +1 -0
- package/dist/particles/password-field/password-field.d.ts +31 -0
- package/dist/particles/password-field/password-field.js +109 -0
- package/dist/particles/password-field/password-field.js.map +1 -0
- package/dist/particles/payment-methods/payment-methods.d.ts +72 -0
- package/dist/particles/payment-methods/payment-methods.js +151 -0
- package/dist/particles/payment-methods/payment-methods.js.map +1 -0
- package/dist/particles/phone-field/phone-field.d.ts +67 -0
- package/dist/particles/phone-field/phone-field.js +250 -0
- package/dist/particles/phone-field/phone-field.js.map +1 -0
- package/dist/particles/popover/popover.d.ts +68 -0
- package/dist/particles/popover/popover.js +284 -0
- package/dist/particles/popover/popover.js.map +1 -0
- package/dist/particles/postal-code-field/postal-code-field.d.ts +75 -0
- package/dist/particles/postal-code-field/postal-code-field.js +169 -0
- package/dist/particles/postal-code-field/postal-code-field.js.map +1 -0
- package/dist/particles/promotion/promotion.d.ts +46 -0
- package/dist/particles/promotion/promotion.js +78 -0
- package/dist/particles/promotion/promotion.js.map +1 -0
- package/dist/particles/quantity-selector/quantity-selector.d.ts +30 -0
- package/dist/particles/quantity-selector/quantity-selector.js +116 -0
- package/dist/particles/quantity-selector/quantity-selector.js.map +1 -0
- package/dist/particles/radio/radio.d.ts +36 -0
- package/dist/particles/radio/radio.js +76 -0
- package/dist/particles/radio/radio.js.map +1 -0
- package/dist/particles/scroll-area/scroll-area.d.ts +36 -0
- package/dist/particles/scroll-area/scroll-area.js +145 -0
- package/dist/particles/scroll-area/scroll-area.js.map +1 -0
- package/dist/particles/select/select.d.ts +125 -0
- package/dist/particles/select/select.js +478 -0
- package/dist/particles/select/select.js.map +1 -0
- package/dist/particles/separator/separator.d.ts +12 -0
- package/dist/particles/separator/separator.js +33 -0
- package/dist/particles/separator/separator.js.map +1 -0
- package/dist/particles/shared/input-mask.d.ts +5 -0
- package/dist/particles/shared/input-mask.js +58 -0
- package/dist/particles/shared/input-mask.js.map +1 -0
- package/dist/particles/spinner/spinner.d.ts +13 -0
- package/dist/particles/spinner/spinner.js +31 -0
- package/dist/particles/spinner/spinner.js.map +1 -0
- package/dist/particles/switch/switch.d.ts +27 -0
- package/dist/particles/switch/switch.js +59 -0
- package/dist/particles/switch/switch.js.map +1 -0
- package/dist/particles/tabs/tabs.d.ts +45 -0
- package/dist/particles/tabs/tabs.js +164 -0
- package/dist/particles/tabs/tabs.js.map +1 -0
- package/dist/particles/text/text.d.ts +24 -0
- package/dist/particles/text/text.js +40 -0
- package/dist/particles/text/text.js.map +1 -0
- package/dist/particles/toast/toast.d.ts +83 -0
- package/dist/particles/toast/toast.js +194 -0
- package/dist/particles/toast/toast.js.map +1 -0
- package/dist/particles/toggle/toggle.d.ts +26 -0
- package/dist/particles/toggle/toggle.js +61 -0
- package/dist/particles/toggle/toggle.js.map +1 -0
- package/dist/particles/tooltip/tooltip.d.ts +61 -0
- package/dist/particles/tooltip/tooltip.js +240 -0
- package/dist/particles/tooltip/tooltip.js.map +1 -0
- package/dist/schema.graphql +2953 -0
- package/dist/sdk/actions/cart-action-provider.d.ts +19 -0
- package/dist/sdk/actions/cart-action-provider.js +23 -0
- package/dist/sdk/actions/cart-action-provider.js.map +1 -0
- package/dist/sdk/actions/identity-action-provider.d.ts +15 -0
- package/dist/sdk/actions/identity-action-provider.js +19 -0
- package/dist/sdk/actions/identity-action-provider.js.map +1 -0
- package/dist/sdk/actions/index.d.ts +7 -0
- package/dist/sdk/actions/index.js +6 -0
- package/dist/sdk/actions/inject-actions.d.ts +14 -0
- package/dist/sdk/actions/inject-actions.js +36 -0
- package/dist/sdk/actions/inject-actions.js.map +1 -0
- package/dist/sdk/actions/region-action-provider.d.ts +15 -0
- package/dist/sdk/actions/region-action-provider.js +19 -0
- package/dist/sdk/actions/region-action-provider.js.map +1 -0
- package/dist/sdk/actions/session-action-provider.d.ts +15 -0
- package/dist/sdk/actions/session-action-provider.js +19 -0
- package/dist/sdk/actions/session-action-provider.js.map +1 -0
- package/dist/sdk/actions/shipping-action-provider.d.ts +15 -0
- package/dist/sdk/actions/shipping-action-provider.js +19 -0
- package/dist/sdk/actions/shipping-action-provider.js.map +1 -0
- package/dist/sdk/actions/types.d.ts +21 -0
- package/dist/sdk/cache/storefront-cache.js +35 -0
- package/dist/sdk/cache/storefront-cache.js.map +1 -0
- package/dist/sdk/cart/operations.d.ts +31 -0
- package/dist/sdk/cart/operations.js +215 -0
- package/dist/sdk/cart/operations.js.map +1 -0
- package/dist/sdk/cart/optimistic.d.ts +24 -0
- package/dist/sdk/cart/optimistic.js +164 -0
- package/dist/sdk/cart/optimistic.js.map +1 -0
- package/dist/sdk/cart/use-cart-actions.d.ts +56 -0
- package/dist/sdk/cart/use-cart-actions.js +348 -0
- package/dist/sdk/cart/use-cart-actions.js.map +1 -0
- package/dist/sdk/cart/use-cart-validate-on-open.js +50 -0
- package/dist/sdk/cart/use-cart-validate-on-open.js.map +1 -0
- package/dist/sdk/cart/write-gate.js +54 -0
- package/dist/sdk/cart/write-gate.js.map +1 -0
- package/dist/sdk/client/assert-api-url.js +20 -0
- package/dist/sdk/client/assert-api-url.js.map +1 -0
- package/dist/sdk/client/create-client.d.ts +23 -0
- package/dist/sdk/client/create-client.js +46 -0
- package/dist/sdk/client/create-client.js.map +1 -0
- package/dist/sdk/client/fetch-page-data.d.ts +39 -0
- package/dist/sdk/client/fetch-page-data.js +33 -0
- package/dist/sdk/client/fetch-page-data.js.map +1 -0
- package/dist/sdk/client/register-preload-query.d.ts +24 -0
- package/dist/sdk/client/register-preload-query.js +33 -0
- package/dist/sdk/client/register-preload-query.js.map +1 -0
- package/dist/sdk/content/create-content-runtime.d.ts +68 -0
- package/dist/sdk/content/create-content-runtime.js +503 -0
- package/dist/sdk/content/create-content-runtime.js.map +1 -0
- package/dist/sdk/context/headers.d.ts +15 -0
- package/dist/sdk/context/headers.js +21 -0
- package/dist/sdk/context/headers.js.map +1 -0
- package/dist/sdk/context/storefront-context.d.ts +11 -0
- package/dist/sdk/context/storefront-context.js +29 -0
- package/dist/sdk/context/storefront-context.js.map +1 -0
- package/dist/sdk/data/data-override-context.d.ts +12 -0
- package/dist/sdk/data/data-override-context.js +19 -0
- package/dist/sdk/data/data-override-context.js.map +1 -0
- package/dist/sdk/data/entity-subscriber.js +28 -0
- package/dist/sdk/data/entity-subscriber.js.map +1 -0
- package/dist/sdk/data/hot-data-provider.d.ts +19 -0
- package/dist/sdk/data/hot-data-provider.js +33 -0
- package/dist/sdk/data/hot-data-provider.js.map +1 -0
- package/dist/sdk/data/index.d.ts +8 -0
- package/dist/sdk/data/index.js +8 -0
- package/dist/sdk/data/list-item-ref-context.d.ts +20 -0
- package/dist/sdk/data/list-item-ref-context.js +11 -0
- package/dist/sdk/data/list-item-ref-context.js.map +1 -0
- package/dist/sdk/data/multiple-reactive-data-provider.d.ts +32 -0
- package/dist/sdk/data/multiple-reactive-data-provider.js +20 -0
- package/dist/sdk/data/multiple-reactive-data-provider.js.map +1 -0
- package/dist/sdk/data/page-reactive-data-root.d.ts +53 -0
- package/dist/sdk/data/page-reactive-data-root.js +153 -0
- package/dist/sdk/data/page-reactive-data-root.js.map +1 -0
- package/dist/sdk/data/reactive-data-provider.d.ts +25 -0
- package/dist/sdk/data/reactive-data-provider.js +24 -0
- package/dist/sdk/data/reactive-data-provider.js.map +1 -0
- package/dist/sdk/data/reactive-list-item-data-provider.d.ts +26 -0
- package/dist/sdk/data/reactive-list-item-data-provider.js +42 -0
- package/dist/sdk/data/reactive-list-item-data-provider.js.map +1 -0
- package/dist/sdk/data/use-reactive-entity.js +40 -0
- package/dist/sdk/data/use-reactive-entity.js.map +1 -0
- package/dist/sdk/format/client.d.ts +12 -0
- package/dist/sdk/format/client.js +20 -0
- package/dist/sdk/format/client.js.map +1 -0
- package/dist/sdk/format/formatters.d.ts +32 -0
- package/dist/sdk/format/formatters.js +45 -0
- package/dist/sdk/format/formatters.js.map +1 -0
- package/dist/sdk/generated/fragment-types.js +23 -0
- package/dist/sdk/generated/fragment-types.js.map +1 -0
- package/dist/sdk/generated/gql.js +51 -0
- package/dist/sdk/generated/gql.js.map +1 -0
- package/dist/sdk/generated/graphql.d.ts +622 -0
- package/dist/sdk/generated/graphql.js +11917 -0
- package/dist/sdk/generated/graphql.js.map +1 -0
- package/dist/sdk/graphql-tag.d.ts +10 -0
- package/dist/sdk/graphql-tag.js +21 -0
- package/dist/sdk/graphql-tag.js.map +1 -0
- package/dist/sdk/i18n/client.d.ts +4 -0
- package/dist/sdk/i18n/client.js +4 -0
- package/dist/sdk/i18n/locales.d.ts +8 -0
- package/dist/sdk/i18n/locales.js +57 -0
- package/dist/sdk/i18n/locales.js.map +1 -0
- package/dist/sdk/i18n/messages/en-US.js +24 -0
- package/dist/sdk/i18n/messages/en-US.js.map +1 -0
- package/dist/sdk/i18n/messages/en-US.json +19 -0
- package/dist/sdk/i18n/messages/en-US.json.d.ts +23 -0
- package/dist/sdk/i18n/messages/es-ES.js +24 -0
- package/dist/sdk/i18n/messages/es-ES.js.map +1 -0
- package/dist/sdk/i18n/messages/es-ES.json +19 -0
- package/dist/sdk/i18n/messages/pt-BR.js +24 -0
- package/dist/sdk/i18n/messages/pt-BR.js.map +1 -0
- package/dist/sdk/i18n/messages/pt-BR.json +19 -0
- package/dist/sdk/i18n/provider.d.ts +1 -0
- package/dist/sdk/i18n/provider.js +30 -0
- package/dist/sdk/i18n/provider.js.map +1 -0
- package/dist/sdk/i18n/server.d.ts +28 -0
- package/dist/sdk/i18n/server.js +59 -0
- package/dist/sdk/i18n/server.js.map +1 -0
- package/dist/sdk/identity/operations.d.ts +34 -0
- package/dist/sdk/identity/operations.js +78 -0
- package/dist/sdk/identity/operations.js.map +1 -0
- package/dist/sdk/identity/use-identity-actions.d.ts +62 -0
- package/dist/sdk/identity/use-identity-actions.js +180 -0
- package/dist/sdk/identity/use-identity-actions.js.map +1 -0
- package/dist/sdk/provider/index.d.ts +2 -0
- package/dist/sdk/provider/index.js +2 -0
- package/dist/sdk/provider/storefront-provider.d.ts +32 -0
- package/dist/sdk/provider/storefront-provider.js +111 -0
- package/dist/sdk/provider/storefront-provider.js.map +1 -0
- package/dist/sdk/region/operations.d.ts +6 -0
- package/dist/sdk/region/region-operations.d.ts +30 -0
- package/dist/sdk/region/region-operations.js +23 -0
- package/dist/sdk/region/region-operations.js.map +1 -0
- package/dist/sdk/region/use-region-actions.d.ts +23 -0
- package/dist/sdk/region/use-region-actions.js +66 -0
- package/dist/sdk/region/use-region-actions.js.map +1 -0
- package/dist/sdk/seller.js +11 -0
- package/dist/sdk/seller.js.map +1 -0
- package/dist/sdk/session/auth-operations.d.ts +47 -0
- package/dist/sdk/session/auth-operations.js +79 -0
- package/dist/sdk/session/auth-operations.js.map +1 -0
- package/dist/sdk/session/operations.d.ts +6 -0
- package/dist/sdk/session/use-session-actions.d.ts +27 -0
- package/dist/sdk/session/use-session-actions.js +126 -0
- package/dist/sdk/session/use-session-actions.js.map +1 -0
- package/dist/sdk/shipping/cart-operations.d.ts +3 -0
- package/dist/sdk/shipping/cart-operations.js +33 -0
- package/dist/sdk/shipping/cart-operations.js.map +1 -0
- package/dist/sdk/shipping/operations.d.ts +3 -0
- package/dist/sdk/shipping/operations.js +33 -0
- package/dist/sdk/shipping/operations.js.map +1 -0
- package/dist/sdk/shipping/option-select-operations.d.ts +24 -0
- package/dist/sdk/shipping/option-select-operations.js +45 -0
- package/dist/sdk/shipping/option-select-operations.js.map +1 -0
- package/dist/sdk/shipping/request-timeout.js +41 -0
- package/dist/sdk/shipping/request-timeout.js.map +1 -0
- package/dist/sdk/shipping/shipping-operations.d.ts +38 -0
- package/dist/sdk/shipping/shipping-operations.js +77 -0
- package/dist/sdk/shipping/shipping-operations.js.map +1 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.d.ts +7 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.js +72 -0
- package/dist/sdk/shipping/use-cart-shipping-simulation.js.map +1 -0
- package/dist/sdk/shipping/use-shipping-actions.d.ts +27 -0
- package/dist/sdk/shipping/use-shipping-actions.js +113 -0
- package/dist/sdk/shipping/use-shipping-actions.js.map +1 -0
- package/dist/sdk/shipping/use-shipping-simulation.d.ts +7 -0
- package/dist/sdk/shipping/use-shipping-simulation.js +72 -0
- package/dist/sdk/shipping/use-shipping-simulation.js.map +1 -0
- package/dist/sdk/state/cart.d.ts +42 -0
- package/dist/sdk/state/cart.js +64 -0
- package/dist/sdk/state/cart.js.map +1 -0
- package/dist/sdk/state/index.js +3 -0
- package/dist/sdk/state/variant-selector.d.ts +17 -0
- package/dist/sdk/state/variant-selector.js +14 -0
- package/dist/sdk/state/variant-selector.js.map +1 -0
- package/dist/utils/safe-href.js +63 -0
- package/dist/utils/safe-href.js.map +1 -0
- package/package.json +84 -0
- package/src/styles/tailwind.css +32 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# FooterRoot
|
|
2
|
+
|
|
3
|
+
**Category:** layout
|
|
4
|
+
**Purpose:** The footer landmark. Renders the `<footer>` element that wraps the store's footer sections, giving the region one accessibility landmark (`contentinfo`) and one styling hook. Carries no content and no commerce data of its own.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
The band that closes the page, usually separated from the page content by a background-color change, a top border, or a block of generous padding. It is a container rather than a visible widget: what you see are the blocks inside it. The image is the source of truth for layout.
|
|
11
|
+
|
|
12
|
+
Reach for `FooterRoot` when:
|
|
13
|
+
|
|
14
|
+
- The bottom of the image holds a **grouped band of store information** — link columns, payment icons, social icons, a logo, or a copyright line — visually set apart from the page's main content.
|
|
15
|
+
- That band spans the full width and reads as one region, even when its inner blocks are laid out in columns.
|
|
16
|
+
|
|
17
|
+
One `FooterRoot` per page. Do not add a second one for a subdivision of the band.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
- As the wrapper for the footer band, placed at the **top level of a layout schema** so the footer is shared by every page that references the layout.
|
|
24
|
+
- Any time the page needs a `contentinfo` landmark, so assistive technology can jump to the store information in one gesture.
|
|
25
|
+
|
|
26
|
+
## When NOT to use
|
|
27
|
+
|
|
28
|
+
- As a generic centered layout wrapper — that is `Container`. `FooterRoot` is a landmark and should appear once.
|
|
29
|
+
- Inside `article`, `aside`, `main`, `nav`, or `section`. Nested there, the element still renders but the browser exposes **no** `contentinfo` landmark, which defeats the reason it exists.
|
|
30
|
+
- For the header or any other page chrome. `FooterRoot` renders a `<footer>` element specifically.
|
|
31
|
+
- As a styled box with a background unrelated to the page's footer region — use a plain element with a class.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Composition
|
|
36
|
+
|
|
37
|
+
`FooterRoot` is a passthrough wrapper: it renders a `<footer>` and places its children inside, in order. It has no required parent and no required children — anything valid in the schema can be a child, and child order reflects visual order.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Container ← the layout's root element
|
|
41
|
+
├── Slot ← where the page's own tree is injected
|
|
42
|
+
└── FooterRoot
|
|
43
|
+
├── Container ← groups the footer's inner blocks
|
|
44
|
+
│ ├── Text
|
|
45
|
+
│ └── NavigationLink
|
|
46
|
+
└── FooterCopyright ← legal notice, the band's last line
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
A layout's `root` names an element, and `FooterRoot` sits among that root's children as a **sibling** of the single `Slot` every layout must declare — never inside it. Keeping it at that level, outside any `section` or `nav`, is what makes the element a `contentinfo` landmark. `Slot` is a reserved layout element type rather than a catalog component, so it is the one `type` that will not be found in `catalog.json`.
|
|
50
|
+
|
|
51
|
+
`FooterRoot` provides no data context, so any commerce-aware block placed inside it still needs its own provider ancestor.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Components
|
|
56
|
+
|
|
57
|
+
### FooterRoot
|
|
58
|
+
|
|
59
|
+
No props. It accepts only standard `<footer>` attributes (e.g. `className`).
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Canonical schema example
|
|
64
|
+
|
|
65
|
+
A layout whose root holds the page `Slot` and a `FooterRoot` beside it, with a link column and a copyright line inside the footer:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"frame": {
|
|
70
|
+
"type": "Container",
|
|
71
|
+
"children": ["slot", "footer"]
|
|
72
|
+
},
|
|
73
|
+
"slot": {
|
|
74
|
+
"type": "Slot"
|
|
75
|
+
},
|
|
76
|
+
"footer": {
|
|
77
|
+
"type": "FooterRoot",
|
|
78
|
+
"style": ["bg-[#F5F5F5]", "px-[32px]", "py-[40px]"],
|
|
79
|
+
"children": ["footer-inner", "footer-copyright"]
|
|
80
|
+
},
|
|
81
|
+
"footer-inner": {
|
|
82
|
+
"type": "Container",
|
|
83
|
+
"style": ["flex", "gap-[48px]"],
|
|
84
|
+
"children": ["footer-links-help-title", "footer-links-help-faq"]
|
|
85
|
+
},
|
|
86
|
+
"footer-links-help-title": {
|
|
87
|
+
"type": "Text",
|
|
88
|
+
"props": { "as": "h3" },
|
|
89
|
+
"style": ["text-[14px]", "font-semibold", "text-[#1A1A1A]"]
|
|
90
|
+
},
|
|
91
|
+
"footer-links-help-faq": {
|
|
92
|
+
"type": "NavigationLink",
|
|
93
|
+
"props": { "href": "/faq" },
|
|
94
|
+
"style": ["text-[14px]", "text-[#666666]"]
|
|
95
|
+
},
|
|
96
|
+
"footer-copyright": {
|
|
97
|
+
"type": "FooterCopyright",
|
|
98
|
+
"style": ["text-[12px]", "text-[#8A8A8A]", "mt-[32px]"]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Element ids double as content keys for content-backed children, so name them for the section (`footer-links-help`) rather than for its current styling (`footer-column-2`).
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Common mistakes
|
|
108
|
+
|
|
109
|
+
- **`Footer`, `FooterSection`, `PageFooter`, or `SiteFooter`.** The correct name is `FooterRoot`.
|
|
110
|
+
- **Using `Container` for the footer band.** `Container` renders a `<div>` with no landmark. Use `FooterRoot` for the band and `Container` for grouping inside it.
|
|
111
|
+
- **Nesting `FooterRoot` inside a `section` or inside the page-content slot.** It must sit at the top level of the layout, as a sibling of the `Slot`, or the `contentinfo` landmark disappears.
|
|
112
|
+
- **Adding a `FooterRoot` per page.** The footer belongs in the shared layout so every page inherits one copy; a page that should carry no footer references a layout that defines none.
|
|
113
|
+
- **Expecting props for the footer's content.** `FooterRoot` has none — the copy lives in the child elements.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Styling
|
|
118
|
+
|
|
119
|
+
| Component | What you style | Plausible classes |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `FooterRoot` | The footer band: background, full-width padding, top border, and the stacking of its inner blocks | `bg-[#F5F5F5] px-[32px] py-[40px] border-t border-[#E5E5E5] flex flex-col gap-[32px]` |
|
|
122
|
+
|
|
123
|
+
The hook is `data-fs-footer`, so a store-level swatch can target the whole region without touching the sections inside it.
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"footer": {
|
|
128
|
+
"type": "FooterRoot",
|
|
129
|
+
"style": ["bg-[#111111]", "text-[#FFFFFF]", "px-[32px]", "py-[48px]", "flex", "flex-col", "gap-[32px]"],
|
|
130
|
+
"children": ["footer-copyright"]
|
|
131
|
+
},
|
|
132
|
+
"footer-copyright": {
|
|
133
|
+
"type": "FooterCopyright",
|
|
134
|
+
"style": ["text-[12px]", "text-[#B3B3B3]"]
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Related
|
|
142
|
+
|
|
143
|
+
- [[container]] — the generic centered layout wrapper; renders a `<div>` with no landmark, and groups blocks *inside* `FooterRoot`.
|
|
144
|
+
- [[footer-copyright]] — the CMS-editable legal notice that closes the band.
|
|
145
|
+
- `Text`, `NavigationLink`, `Icon`, `Image`, and `Separator` — the shipped primitives the footer band is built from. They carry no `.md` of their own; read their schemas from `catalog.json`.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# FooterSocial
|
|
2
|
+
|
|
3
|
+
**Category:** navigation
|
|
4
|
+
**Purpose:** Links to the store's official social profiles, rendered as a row of platform icons with an optional heading, both editable in the CMS. The content arrives through the compiler-injected `$content` prop, backed by the `footer-social` content model declared next to the component; the `heading` and `entries` props are the authored fallback for stores with no CMS binding. One element renders the whole row.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
The image is the source of truth for layout. A FooterSocial row is present when you see:
|
|
11
|
+
|
|
12
|
+
- A **short row of social brand marks** — the Instagram camera, the Facebook `f`, the LinkedIn `in`, the YouTube play button, a TikTok note — usually monochrome, often circled or squared, and all the same size.
|
|
13
|
+
- Often a **short heading above or beside them**: *Siga a gente*, *Follow us*, *Redes sociais*.
|
|
14
|
+
- The glyphs are **platform marks that are links**, not card flags and not text. Rounded rectangles reading Visa or Mastercard are a different component.
|
|
15
|
+
- Usually **four to six marks**, far fewer than a payment strip carries.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## When to use
|
|
20
|
+
|
|
21
|
+
- The row of social profile links in a footer, or in any band that points shoppers at the brand's own accounts.
|
|
22
|
+
- One instance per row. Every profile in the row is one item of this component's content, not its own element.
|
|
23
|
+
|
|
24
|
+
## When NOT to use
|
|
25
|
+
|
|
26
|
+
- A row of **accepted payment brands** (Visa, Pix, Boleto) → use `PaymentMethods`; card flags rather than platform marks, and no links.
|
|
27
|
+
- **Share this product** buttons on a PDP → those act on the current page rather than linking to the store's own profiles, and they are not this display row.
|
|
28
|
+
- A **feed or embed** of the brand's posts → that reads a platform API; this component only links out.
|
|
29
|
+
- Institutional or editorial **text links** (Contact, Returns) → use `FooterLinkGroup`, which renders labelled text links in a headed column.
|
|
30
|
+
- The **value-proposition strip** (free shipping, secure purchase) → use [[incentives]]; those items pair an icon with a line or two of copy.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Composition
|
|
35
|
+
|
|
36
|
+
`FooterSocial` is a leaf in the schema — it has no sub-components and takes no children. The profiles come from content, not from child elements.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
FooterRoot
|
|
40
|
+
├── FooterLinkGroup ← "Ajuda" (siblings; order is visual order)
|
|
41
|
+
├── FooterLinkGroup ← "Institucional"
|
|
42
|
+
├── FooterSocial ← the social row
|
|
43
|
+
├── PaymentMethods ← the flag strip
|
|
44
|
+
└── FooterCopyright
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Content, then prop, per field.** The heading resolves from the CMS entry first and the `heading` prop second; the list resolves the same way, independently. The list is replaced whole rather than merged — an entry supplying an empty list wins over an authored list, because a merchant who cleared the row cleared it. When no entry survives the filter below, the component renders `null` (self-hide) and the footer omits the row. Non-compiler hosts (Storybook, tests) pass a typed `$content` fixture directly.
|
|
48
|
+
|
|
49
|
+
**Nothing in the model is required, so a half-filled entry still renders.** An entry with only a heading keeps the authored `entries` prop under the merchant's heading, and vice versa. What the component drops is per profile, never the whole row: a profile is skipped when its label is blank, or when it carries neither a `platform` nor an `iconUrl` — an icon nobody can name is the one thing this must not ship.
|
|
50
|
+
|
|
51
|
+
**Every link opens in a new tab**, unconditionally, and therefore always carries `rel="noopener noreferrer"`. There is no authorable target: an official profile is always outbound. The component writes no "(opens in new tab)" cue, because a hardcoded English string cannot be overridden in a store that is not written in English — a merchant who wants the cue writes it into the label, which is the only channel that carries their language.
|
|
52
|
+
|
|
53
|
+
**A destination the allowlist refuses renders as text.** Every `url` passes through the shared render-time check, which admits `http:`, `https:`, `mailto:`, `tel:`, and site-relative paths. A refused one — a `javascript:` value, a protocol-relative `//host`, or a URL not yet pasted — renders the profile's label as visible text with no link and no glyph, rather than a mark that looks clickable and goes nowhere. The rejection logs once with the entry index and a bounded reason.
|
|
54
|
+
|
|
55
|
+
**Every predefined name must be registered.** A `platform` resolves to a sprite symbol the store's build has to include; the store's `global.json` writes the names out under `icons.include` — it is JSON, so it cannot import `SOCIAL_PLATFORM_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 mark. `linkedin` and `youtube` need provisioned icon data as well: unlike the other three they have no embedded fallback, so a store that registers them without running `sukima icon-data fetch` fails to build.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Components
|
|
60
|
+
|
|
61
|
+
### FooterSocial
|
|
62
|
+
|
|
63
|
+
| Prop | Type | Required | Notes |
|
|
64
|
+
|-------|------|----------|-------|
|
|
65
|
+
| `heading` | string | no | Authored fallback. Ignored when a CMS entry supplies a heading |
|
|
66
|
+
| `entries` | array | no | Authored fallback list of `{ label, url, platform?, iconUrl? }`. Ignored when a CMS entry supplies `entries` |
|
|
67
|
+
|
|
68
|
+
Content model (`footer-social`) fields, edited in the CMS:
|
|
69
|
+
|
|
70
|
+
| Field | Type | Required | Notes |
|
|
71
|
+
|-------|------|----------|-------|
|
|
72
|
+
| `heading` | string | no | Optional row heading. When set it also names the list for assistive tech; when blank or absent the list is left unnamed rather than given an invented English default |
|
|
73
|
+
| `entries` | array | no | Ordered profiles. Reordering here reorders the row with no deployment. Optional so a heading-only entry falls back to the authored list. Declares `minItems: 1` and no ceiling — Admin-form guidance only, unenforced on the read path, so an empty list still reaches the component and self-hides there |
|
|
74
|
+
| `entries[].platform` | enum | no | One of `facebook`, `instagram`, `linkedin`, `pinterest`, `youtube`. Renders the sprite glyph, decorative, with the label beside it as screen-reader-only text |
|
|
75
|
+
| `entries[].url` | string | yes | The profile's address. Opens in a new tab. A value the allowlist refuses renders the label as plain text instead of a link |
|
|
76
|
+
| `entries[].label` | string | yes | The platform's name. Names the link for assistive tech on both glyph paths; a blank label drops the profile |
|
|
77
|
+
| `entries[].iconUrl` | string | no | An uploaded image, for a platform with no predefined name (TikTok, WhatsApp, X). Wins over `platform` when both are set |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Canonical schema example
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"footer-social": {
|
|
86
|
+
"type": "FooterSocial",
|
|
87
|
+
"style": ["flex", "flex-col", "gap-[12px]"]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The element id is the content key, so name it for the section rather than its styling. Renaming it orphans the merchant's entry: the profiles stay in the Content Platform while the component reads a key nobody writes.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Common mistakes
|
|
97
|
+
|
|
98
|
+
- **`SocialLinks`, `SocialIcons`, `FooterSocialLinks`, `SocialMedia`.** The correct name is `FooterSocial`.
|
|
99
|
+
- **One element per platform.** The most common wrong answer by far: a row of bare `Icon` elements, one per network, is not this component. It is not editable, the marks are not links, and none of them carries an accessible name. One `FooterSocial` element renders the whole row and each profile is an item in its content.
|
|
100
|
+
- **Reaching for `NavigationLink` around an `Icon`.** That is what this component already does per entry; composing it by hand loses the content model, the link check, and the accessible name.
|
|
101
|
+
- **Expecting a `tiktok`, `whatsapp`, or `x` platform.** None of those names resolves — and `x` is the close icon, not the brand. Upload a mark through `iconUrl` and give the entry a `label`.
|
|
102
|
+
- **Expecting a `twitter` platform.** Deliberately absent: both icon vocabularies still draw the old bird, so the mark rides `iconUrl` like the others rather than being frozen into the enum.
|
|
103
|
+
- **Setting `iconUrl` and `platform` and expecting the glyph.** The upload wins; drop `iconUrl` to get the sprite glyph back.
|
|
104
|
+
- **Giving it children.** It is a leaf; the profiles are content, which is what makes adding one a CMS save instead of a deployment.
|
|
105
|
+
- **Adding an `alt` field beside `label`.** One label names the link on both paths. Two fields for one accessible name is how the legacy footer ended up announcing the icon's own name instead of the merchant's.
|
|
106
|
+
- **Authoring a `target`.** Every link opens in a new tab already; there is no setting, because there is only one correct value.
|
|
107
|
+
- **Shipping without the icon size swatch.** Predefined glyphs default to 24×24 and uploaded images to their natural size, so a mixed row renders ragged until `data-fs-footer-social-icon` is sized.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Styling
|
|
112
|
+
|
|
113
|
+
`FooterSocial` renders one root you style directly, plus per-part hooks. The glyph hook covers both the `<svg>` and the `<img>` path, which is what makes a mixed row line up.
|
|
114
|
+
|
|
115
|
+
| Component | What you style | Plausible classes |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `FooterSocial` | Stacks the heading over the row | `flex flex-col gap-[12px]` |
|
|
118
|
+
| `data-fs-footer-social-heading` | The row heading | `text-[14px] font-bold uppercase text-[#1a1a1a]` |
|
|
119
|
+
| `data-fs-footer-social-list` | The mark row, wrapping on narrow screens | `flex flex-wrap items-center gap-[12px] list-none p-0 m-0` |
|
|
120
|
+
| `data-fs-footer-social-item` | The box one mark occupies | `flex items-center` |
|
|
121
|
+
| `data-fs-footer-social-link` | The tap target around one mark | `flex items-center justify-center w-[32px] h-[32px] rounded-full` |
|
|
122
|
+
| `data-fs-footer-social-icon` | Both glyph paths, sized to match | `w-[24px] h-[24px] object-contain` |
|
|
123
|
+
| `data-fs-footer-social-text` | The fallback for a refused destination | `text-[14px] text-[#767676]` |
|
|
124
|
+
|
|
125
|
+
The list carries an explicit `role="list"`. Keep it: WebKit drops the implicit list role from a `<ul>` whose computed `list-style` is `none`, and `list-none` is exactly what the row needs, so the attribute is what holds the semantics the named list was chosen for.
|
|
126
|
+
|
|
127
|
+
`data-fs-footer-social-platform` carries the enum member on each item with a predefined platform — `[data-fs-footer-social-platform="instagram"]` targets one brand, for a mark that needs its own color. It is absent on items with no `platform`.
|
|
128
|
+
|
|
129
|
+
Styled example:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"footer-social": {
|
|
134
|
+
"type": "FooterSocial",
|
|
135
|
+
"style": ["flex", "flex-col", "gap-[12px]"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Related
|
|
143
|
+
|
|
144
|
+
- [[footer-root]] — the `<footer>` landmark the row usually sits inside.
|
|
145
|
+
- [[payment-methods]] — the flag strip beside it; same `$content` mechanics and the same two glyph paths, card brands instead of platform marks, and no links.
|
|
146
|
+
- [[footer-link-group]] — the headed link columns; same `$content` mechanics and the same link check, text links instead of glyphs.
|
|
147
|
+
- [[footer-copyright]] — the legal line below it; same `$content` mechanics, plain text.
|
|
148
|
+
- [[incentives]] — the benefit strip in the same band; also icon-driven, but each item pairs its glyph with copy and links nowhere.
|
|
149
|
+
- `Icon` — the particle each predefined mark renders. It carries no `.md` of its own; read its schema from `catalog.json`.
|
|
150
|
+
- `Image` — the particle an uploaded mark renders. It carries no `.md` of its own; read its schema from `catalog.json`.
|
|
151
|
+
- `NavigationLink` — the particle wrapping each mark. It carries no `.md` of its own; read its schema from `catalog.json`.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# FreeShippingProgress
|
|
2
|
+
|
|
3
|
+
**Category:** commerce
|
|
4
|
+
**Purpose:** Reactive progress bar for the cart's nearest free-shipping goal. Reads `cart.freeShippingProgress` and the reactive `cart.total`, then renders one of three states: below-threshold ("faltam {value} para frete grátis" + a partially filled bar), earned ("você ganhou frete grátis!" + a full bar), or absent (renders nothing). Composed at the **top of a cart / mini-cart drawer** to nudge the shopper to add a bit more.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
Look for a **strip at the top of an open cart or mini-cart** with a horizontal progress bar and a short line of copy such as "Faltam R$ 72,00 para frete grátis" or "Você ganhou frete grátis!". The bar fills left-to-right toward a goal. Examples:
|
|
11
|
+
|
|
12
|
+
- A thin bar plus a one-line message above the cart item list.
|
|
13
|
+
- A "free shipping" banner with a fill indicator that grows as the cart total rises.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The three states
|
|
18
|
+
|
|
19
|
+
| State | Condition | Renders |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Below threshold | `qualified === false`, cart total below `threshold` | Below-threshold message + a bar filled to `cartTotal / threshold` |
|
|
22
|
+
| Earned | field `qualified === true`, OR the reactive cart total reaches `threshold` | Earned message + a full bar |
|
|
23
|
+
| Absent (self-hide) | `cart.freeShippingProgress === null` (no destination, no eligible promotion, empty cart, still loading, or degraded) | **Nothing** — no bar, no message, no wrapper |
|
|
24
|
+
|
|
25
|
+
## Reactive fill (no extra calls)
|
|
26
|
+
|
|
27
|
+
`freeShippingProgress` is a lazy field kept out of `CartFragment`, so its cached value (`threshold`, `qualified`) does not refresh on cart mutations. The bar therefore derives the **live** fill and remaining from the reactive `cart.total` — which *is* fresh via cache-write propagation — against the fetched `threshold`:
|
|
28
|
+
|
|
29
|
+
- `isQualified = qualified || (threshold != null && cartTotal >= threshold)` — the field flag covers the already-earned case (where `threshold` is `null`); the reactive comparison flips it at the boundary between page loads.
|
|
30
|
+
- `liveRemaining = isQualified ? 0 : max(threshold − cartTotal, 0)`
|
|
31
|
+
- `fill = isQualified ? 1 : clamp(cartTotal / threshold, 0..1)`
|
|
32
|
+
|
|
33
|
+
The bar updates instantly on every add/remove with **no** refetch of `freeShippingProgress`. `threshold` refreshes only on a full page re-sync. `Money.amount` is a string at runtime and is always `Number()`-coerced before math/formatting.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## When to use
|
|
38
|
+
|
|
39
|
+
- As the **first child of `cart-filled`** — the top strip of an open mini-cart drawer, above the item list, where a free-shipping bar drives "add a bit more". The americanas `default.json` uses this placement.
|
|
40
|
+
- Alongside `CartRoot` / `CartTotalizerRoot` on the same page — all three select the same top-level `cart {}` field, so the compiler merges them into one query (no double fetch).
|
|
41
|
+
|
|
42
|
+
## When NOT to use
|
|
43
|
+
|
|
44
|
+
- On an empty cart — there is nothing to ship and the field is `null` there anyway (the component self-hides).
|
|
45
|
+
- As a general-purpose progress bar — use the `Meter` particle directly for non-free-shipping meters.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Composition
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
FreeShippingProgressRoot ← reactive provider; self-hides on null/loading
|
|
53
|
+
├── FreeShippingProgressMessage ← below-threshold vs earned copy (front-formatted)
|
|
54
|
+
└── FreeShippingProgressBar ← composes the Meter particle at value = fill * 100
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Key components
|
|
58
|
+
|
|
59
|
+
| Component | Props | Notes |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `FreeShippingProgressRoot` | `$data` | Provides `FreeShippingProgressContext`; the copy formats from the active storefront context; renders nothing when the field is `null` |
|
|
62
|
+
| `FreeShippingProgressMessage` | `label?`, `qualifiedLabel?` | `label` is a `{value}`-token template (default `"faltam {value} para frete grátis"`); `qualifiedLabel` default `"você ganhou frete grátis!"`; `children` overrides the text |
|
|
63
|
+
| `FreeShippingProgressBar` | — | Renders a `Meter` bar; `aria-valuetext` mirrors the visible copy |
|
|
64
|
+
|
|
65
|
+
Copy is front-localized and front-formatted from the Root's `locale`/`currency` (default `pt-BR`/`BRL`), not the payload `currencyCode`.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Schema
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"free-shipping-progress": {
|
|
74
|
+
"type": "FreeShippingProgressRoot",
|
|
75
|
+
"children": ["free-shipping-progress-message", "free-shipping-progress-bar"]
|
|
76
|
+
},
|
|
77
|
+
"free-shipping-progress-message": {
|
|
78
|
+
"type": "FreeShippingProgressMessage",
|
|
79
|
+
"props": { "label": "faltam {value} para frete grátis", "qualifiedLabel": "você ganhou frete grátis!" }
|
|
80
|
+
},
|
|
81
|
+
"free-shipping-progress-bar": {
|
|
82
|
+
"type": "FreeShippingProgressBar"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Place `free-shipping-progress` as the **first child of `cart-filled`** (before `unavailable-recovery`) so it sits at the top of the open drawer.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Gallery
|
|
2
|
+
|
|
3
|
+
**Category:** content
|
|
4
|
+
**Purpose:** Generic media gallery. Manages selected index, fullscreen, and zoom state. Receives media items directly via prop — no GraphQL fragment. Use on non-PDP contexts where media comes from a custom source.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
- Any page that needs a gallery but is **not** a PDP (e.g. editorial content, lookbooks, custom landing pages).
|
|
11
|
+
- Stories and editor preview where static media fixtures are passed directly.
|
|
12
|
+
- When you need to compose a gallery with data that does not come from `productBySlug`.
|
|
13
|
+
|
|
14
|
+
## When NOT to use
|
|
15
|
+
|
|
16
|
+
- PDP product media → use `ProductGalleryRoot` instead. It declares the GraphQL fragment automatically and passes data as `$data`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Difference from ProductGalleryRoot
|
|
21
|
+
|
|
22
|
+
| | `GalleryRoot` | `ProductGalleryRoot` |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| Data source | `media` prop (manual) | GraphQL fragment on `productBySlug` |
|
|
25
|
+
| Page type | Non-PDP | PDP |
|
|
26
|
+
| Sub-components | Same | Same |
|
|
27
|
+
|
|
28
|
+
On a PDP, always prefer `ProductGalleryRoot`. On any other context, use `GalleryRoot` and pass a `media` array.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
| Prop | Type | Default | Notes |
|
|
35
|
+
|------|------|---------|-------|
|
|
36
|
+
| `media` | `GalleryMediaItem[]` | `[]` | Array of image or video items to display |
|
|
37
|
+
| `defaultIndex` | number | `0` | Initially selected media index |
|
|
38
|
+
| `selectOnHover` | boolean | `false` | Hovering a thumbnail selects it without clicking |
|
|
39
|
+
| `thumbnailOpensFullscreen` | boolean | `false` | Clicking any thumbnail opens fullscreen |
|
|
40
|
+
|
|
41
|
+
`GalleryMediaItem` shape:
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
{ type: 'image' | 'video'; url: string; altText: string; previewImageUrl?: string }
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Composition and sub-components
|
|
50
|
+
|
|
51
|
+
`GalleryRoot` accepts the same children as `ProductGalleryRoot`. Refer to [[product-gallery]] for the full composition guide, layout patterns (thumbnail alignment, slider, fullscreen, zoom), props for each sub-component, canonical schema examples, and common mistakes.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Minimal schema example
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"gallery": {
|
|
60
|
+
"type": "GalleryRoot",
|
|
61
|
+
"props": { "defaultIndex": 0 },
|
|
62
|
+
"children": ["gallery-main", "gallery-thumbnails"]
|
|
63
|
+
},
|
|
64
|
+
"gallery-main": {
|
|
65
|
+
"type": "GalleryMainMedia",
|
|
66
|
+
"props": { "objectFit": "contain", "aspectRatio": "1 / 1" }
|
|
67
|
+
},
|
|
68
|
+
"gallery-thumbnails": {
|
|
69
|
+
"type": "GalleryThumbnails",
|
|
70
|
+
"props": { "maxVisible": 5 },
|
|
71
|
+
"children": ["gallery-thumbnail"]
|
|
72
|
+
},
|
|
73
|
+
"gallery-thumbnail": {
|
|
74
|
+
"type": "GalleryThumbnail",
|
|
75
|
+
"props": { "objectFit": "contain", "aspectRatio": "1 / 1" }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Related
|
|
83
|
+
|
|
84
|
+
- [[product-gallery]] — PDP variant with GraphQL fragment; full sub-component documentation lives here.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# HeaderRoot
|
|
2
|
+
|
|
3
|
+
**Category:** layout
|
|
4
|
+
**Purpose:** The header landmark. Renders the `<header>` element that wraps the store's header chrome, giving the region one accessibility landmark (`banner`) and one styling hook. Carries no content and no commerce data of its own.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Visual cues (how to identify in an image)
|
|
9
|
+
|
|
10
|
+
The band that opens the page, usually separated from the page content by a bottom border, a background-color change, or a block of generous padding. It is a container rather than a visible widget: what you see are the blocks inside it. The image is the source of truth for layout.
|
|
11
|
+
|
|
12
|
+
Reach for `HeaderRoot` when:
|
|
13
|
+
|
|
14
|
+
- The top of the image holds a **grouped band of store chrome** — a logo, a navigation row, a postal-code or region control, a search field, a cart icon, or a sign-in entry point — visually set apart from the page's main content.
|
|
15
|
+
- That band spans the full width and reads as one region, even when its inner blocks sit on two rows (brand row above, navigation row below).
|
|
16
|
+
|
|
17
|
+
One `HeaderRoot` per page. Do not add a second one for the navigation row or any other subdivision of the band.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## When to use
|
|
22
|
+
|
|
23
|
+
- As the wrapper for the header band, placed at the **top level of a layout schema** so the header is shared by every page that references the layout.
|
|
24
|
+
- Any time the page needs a `banner` landmark, so assistive technology can jump to the store chrome in one gesture.
|
|
25
|
+
|
|
26
|
+
## When NOT to use
|
|
27
|
+
|
|
28
|
+
- As a generic full-width layout wrapper — that is `Container`. `HeaderRoot` is a landmark and should appear once.
|
|
29
|
+
- Inside `article`, `aside`, `main`, `nav`, or `section`. Nested there, the element still renders but the browser exposes **no** `banner` landmark, which defeats the reason it exists.
|
|
30
|
+
- For the footer or any other page chrome. `HeaderRoot` renders a `<header>` element specifically.
|
|
31
|
+
- For a section heading block inside the page content — that is a heading and a `Container`, not a landmark.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Composition
|
|
36
|
+
|
|
37
|
+
`HeaderRoot` is a passthrough wrapper: it renders a `<header>` and places its children inside, in order. It has no required parent and no required children — anything valid in the schema can be a child, and child order reflects visual order.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Container ← the layout's root element
|
|
41
|
+
├── HeaderRoot
|
|
42
|
+
│ ├── Logo ← the brand, linking home
|
|
43
|
+
│ ├── Container ← the navigation surface for one breakpoint
|
|
44
|
+
│ │ └── NavigationMenuRoot
|
|
45
|
+
│ │ └── NavigationLinkList
|
|
46
|
+
│ └── Container ← the actions cluster
|
|
47
|
+
│ ├── RegionRoot
|
|
48
|
+
│ └── AccountEntryPoint
|
|
49
|
+
└── Slot ← where the page's own tree is injected
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
A layout's `root` names an element, and `HeaderRoot` sits among that root's children as a **sibling** of the single `Slot` every layout must declare — never inside it. Keeping it at that level, outside any `section` or `nav`, is what makes the element a `banner` landmark. `Slot` is a reserved layout element type rather than a catalog component, so it is the one `type` that will not be found in `catalog.json`.
|
|
53
|
+
|
|
54
|
+
`HeaderRoot` provides no data context, so any commerce-aware block placed inside it still needs its own provider ancestor. An `AccountEntryPoint` in the header needs a `SessionRoot` above the header, and a `RegionTrigger` needs a `RegionRoot` between it and the header.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Components
|
|
59
|
+
|
|
60
|
+
### HeaderRoot
|
|
61
|
+
|
|
62
|
+
No props. It accepts only standard `<header>` attributes (e.g. `className`).
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Canonical schema example
|
|
67
|
+
|
|
68
|
+
A layout whose root holds a `HeaderRoot` and the page `Slot` beside it, with a logo and a navigation row inside the header:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"frame": {
|
|
73
|
+
"type": "Container",
|
|
74
|
+
"children": ["header", "slot"]
|
|
75
|
+
},
|
|
76
|
+
"header": {
|
|
77
|
+
"type": "HeaderRoot",
|
|
78
|
+
"style": ["w-full", "flex", "items-center", "gap-[24px]", "px-[16px]", "border-b", "border-[#E5E5E5]"],
|
|
79
|
+
"children": ["header-logo", "header-nav"]
|
|
80
|
+
},
|
|
81
|
+
"header-logo": {
|
|
82
|
+
"type": "Logo",
|
|
83
|
+
"props": { "src": "/logo.svg", "alt": "Loja XYZ", "href": "/" }
|
|
84
|
+
},
|
|
85
|
+
"header-nav": {
|
|
86
|
+
"type": "NavigationMenuRoot",
|
|
87
|
+
"children": ["header-nav-links"]
|
|
88
|
+
},
|
|
89
|
+
"header-nav-links": {
|
|
90
|
+
"type": "NavigationLinkList",
|
|
91
|
+
"props": {
|
|
92
|
+
"links": [
|
|
93
|
+
{ "label": "Ofertas", "href": "/ofertas" },
|
|
94
|
+
{ "label": "Novidades", "href": "/novidades" }
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"slot": {
|
|
99
|
+
"type": "Slot"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Element ids double as content keys for content-backed children, so name them for the sub-feature (`header-nav-links`) rather than for its current placement (`header-item-2`).
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Common mistakes
|
|
109
|
+
|
|
110
|
+
- **`Header`, `HeaderSection`, `PageHeader`, `SiteHeader`, or `Navbar`.** The correct name is `HeaderRoot`.
|
|
111
|
+
- **Using `Container` for the header band.** `Container` renders a `<div>` with no landmark. Use `HeaderRoot` for the band and `Container` for grouping inside it.
|
|
112
|
+
- **Nesting `HeaderRoot` inside a `section` or inside the page-content slot.** It must sit at the top level of the layout, as a sibling of the `Slot`, or the `banner` landmark disappears.
|
|
113
|
+
- **Adding a `HeaderRoot` per page.** The header belongs in the shared layout so every page inherits one copy; a page that should carry no header references a layout that defines none.
|
|
114
|
+
- **Wrapping the navigation row in a second `HeaderRoot`.** Two of them means two `banner` landmarks. Group extra rows with `Container` inside the one header.
|
|
115
|
+
- **Expecting props for the header's content.** `HeaderRoot` has none — the logo, links and labels live in the child elements.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Styling
|
|
120
|
+
|
|
121
|
+
| Component | What you style | Plausible classes |
|
|
122
|
+
|---|---|---|
|
|
123
|
+
| `HeaderRoot` | The header band: background, full-width padding, bottom border, and the arrangement of its inner blocks | `w-full flex items-center gap-[24px] px-[16px] py-[12px] border-b border-[#E5E5E5] bg-white` |
|
|
124
|
+
|
|
125
|
+
The hook is `data-fs-header`, so a store-level swatch can target the whole region without touching the sub-features inside it.
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"header": {
|
|
130
|
+
"type": "HeaderRoot",
|
|
131
|
+
"style": ["sticky", "top-0", "z-10", "w-full", "flex", "items-center", "gap-[24px]", "bg-white", "px-[16px]"],
|
|
132
|
+
"children": ["header-logo"]
|
|
133
|
+
},
|
|
134
|
+
"header-logo": {
|
|
135
|
+
"type": "Logo",
|
|
136
|
+
"props": { "src": "/logo.svg", "alt": "Loja XYZ" }
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Related
|
|
144
|
+
|
|
145
|
+
- [[footer-root]] — the same idea at the other end of the page; renders `<footer>` and exposes `contentinfo`.
|
|
146
|
+
- [[container]] — the generic layout wrapper; renders a `<div>` with no landmark, and groups blocks *inside* `HeaderRoot`.
|
|
147
|
+
- [[logo]] — the brand mark that opens the header and links home.
|
|
148
|
+
- [[navigation-link-list]] — the CMS-editable link collection the navigation row renders.
|
|
149
|
+
- [[region]] — the postal-code control that sits in the header's actions cluster.
|
|
150
|
+
- [[account-entry-point]] — the session-aware sign-in / my-account control, which needs a `SessionRoot` above the header.
|