@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,31 @@
|
|
|
1
|
+
import { defineComponent } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/particles/spinner/spinner.tsx
|
|
5
|
+
const SpinnerDefinition = defineComponent({
|
|
6
|
+
name: "Spinner",
|
|
7
|
+
importPath: "@vtex/faststore/components",
|
|
8
|
+
component: Spinner,
|
|
9
|
+
editor: {
|
|
10
|
+
label: "Spinner",
|
|
11
|
+
category: "feedback"
|
|
12
|
+
},
|
|
13
|
+
schema: { label: {
|
|
14
|
+
type: "string",
|
|
15
|
+
default: "Loading",
|
|
16
|
+
label: "Label"
|
|
17
|
+
} },
|
|
18
|
+
guideline: "Loading indicator — use standalone or composed inside Button for loading states. Purely structural with no built-in animation CSS."
|
|
19
|
+
});
|
|
20
|
+
function Spinner({ label = "Loading", className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("output", {
|
|
22
|
+
...props,
|
|
23
|
+
"aria-label": label,
|
|
24
|
+
className,
|
|
25
|
+
"data-fs-spinner": ""
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Spinner, SpinnerDefinition };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","names":[],"sources":["../../../src/particles/spinner/spinner.tsx"],"sourcesContent":["import { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef } from 'react';\n\n/** Props for {@link Spinner}. Extends all native `<output>` attributes. */\nexport type SpinnerProps = Omit<ComponentPropsWithRef<'output'>, 'children'> & {\n /** Accessible label. Defaults to `'Loading'`. */\n label?: string;\n};\n\nexport const SpinnerDefinition = defineComponent<SpinnerProps>({\n name: 'Spinner',\n importPath: '@vtex/faststore/components',\n component: Spinner,\n editor: { label: 'Spinner', category: 'feedback' },\n schema: {\n label: { type: 'string', default: 'Loading', label: 'Label' },\n },\n guideline:\n 'Loading indicator — use standalone or composed inside Button for loading states. Purely structural with no built-in animation CSS.',\n});\n\nexport function Spinner({ label = 'Loading', className, ...props }: SpinnerProps) {\n return <output {...props} aria-label={label} className={className} data-fs-spinner=\"\" />;\n}\n"],"mappings":";;;;AASA,MAAa,oBAAoB,gBAA8B;CAC7D,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAW,UAAU;CAAW;CACjD,QAAQ,EACN,OAAO;EAAE,MAAM;EAAU,SAAS;EAAW,OAAO;CAAQ,EAC9D;CACA,WACE;AACJ,CAAC;AAED,SAAgB,QAAQ,EAAE,QAAQ,WAAW,WAAW,GAAG,SAAuB;CAChF,OAAO,oBAAC,UAAD;EAAQ,GAAI;EAAO,cAAY;EAAkB;EAAW,mBAAgB;CAAI,CAAA;AACzF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentDefinition } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
+
//#region src/particles/switch/switch.d.ts
|
|
5
|
+
export type SwitchRootProps = {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
name?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
export type SwitchThumbProps = ComponentPropsWithRef<'span'>;
|
|
18
|
+
export declare const SwitchRootDefinition: ComponentDefinition<SwitchRootProps>;
|
|
19
|
+
export declare const SwitchThumbDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
|
|
20
|
+
export declare function SwitchRoot({ checked, defaultChecked, onCheckedChange, disabled, readOnly, required, name, id, className, children }: SwitchRootProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function SwitchThumb({ className, children, ...props }: SwitchThumbProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Switch: {
|
|
23
|
+
Root: typeof SwitchRoot;
|
|
24
|
+
Thumb: typeof SwitchThumb;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { defineComponent } from "../../core/dist/define-component.js";
|
|
3
|
+
import "../../core/dist/index.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Switch } from "@base-ui/react/switch";
|
|
6
|
+
//#region src/particles/switch/switch.tsx
|
|
7
|
+
const SwitchRootDefinition = defineComponent({
|
|
8
|
+
name: "SwitchRoot",
|
|
9
|
+
importPath: "@vtex/faststore/components",
|
|
10
|
+
component: SwitchRoot,
|
|
11
|
+
editor: {
|
|
12
|
+
label: "Switch Root",
|
|
13
|
+
category: "action"
|
|
14
|
+
},
|
|
15
|
+
schema: {},
|
|
16
|
+
guideline: "On/off control for settings and preferences. Always wraps a Switch.Thumb. Unlike Checkbox, implies immediate effect without form submission. Style the checked state via data-checked."
|
|
17
|
+
});
|
|
18
|
+
const SwitchThumbDefinition = defineComponent({
|
|
19
|
+
name: "SwitchThumb",
|
|
20
|
+
importPath: "@vtex/faststore/components",
|
|
21
|
+
component: SwitchThumb,
|
|
22
|
+
editor: {
|
|
23
|
+
label: "Switch Thumb",
|
|
24
|
+
category: "layout"
|
|
25
|
+
},
|
|
26
|
+
schema: {},
|
|
27
|
+
guideline: "Sliding visual indicator inside Switch.Root. Moves position based on the checked state managed by Base UI."
|
|
28
|
+
});
|
|
29
|
+
function SwitchRoot({ checked, defaultChecked, onCheckedChange, disabled, readOnly, required, name, id, className, children }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(Switch.Root, {
|
|
31
|
+
checked,
|
|
32
|
+
defaultChecked,
|
|
33
|
+
onCheckedChange,
|
|
34
|
+
disabled,
|
|
35
|
+
readOnly,
|
|
36
|
+
required,
|
|
37
|
+
name,
|
|
38
|
+
id,
|
|
39
|
+
className,
|
|
40
|
+
"data-fs-switch-root": "",
|
|
41
|
+
children
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function SwitchThumb({ className, children, ...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsx(Switch.Thumb, {
|
|
46
|
+
...props,
|
|
47
|
+
className,
|
|
48
|
+
"data-fs-switch-thumb": "",
|
|
49
|
+
children
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
const Switch$1 = {
|
|
53
|
+
Root: SwitchRoot,
|
|
54
|
+
Thumb: SwitchThumb
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
export { Switch$1 as Switch, SwitchRoot, SwitchRootDefinition, SwitchThumb, SwitchThumbDefinition };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","names":["BaseSwitch","Switch"],"sources":["../../../src/particles/switch/switch.tsx"],"sourcesContent":["'use client';\nimport { Switch as BaseSwitch } from '@base-ui/react/switch';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\n\nexport type SwitchRootProps = {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n className?: string;\n children?: ReactNode;\n};\n\nexport type SwitchThumbProps = ComponentPropsWithRef<'span'>;\n\nexport const SwitchRootDefinition = defineComponent<SwitchRootProps>({\n name: 'SwitchRoot',\n importPath: '@vtex/faststore/components',\n component: SwitchRoot,\n editor: { label: 'Switch Root', category: 'action' },\n schema: {},\n guideline:\n 'On/off control for settings and preferences. Always wraps a Switch.Thumb. Unlike Checkbox, implies immediate effect without form submission. Style the checked state via data-checked.',\n});\n\nexport const SwitchThumbDefinition = defineComponent<SwitchThumbProps>({\n name: 'SwitchThumb',\n importPath: '@vtex/faststore/components',\n component: SwitchThumb,\n editor: { label: 'Switch Thumb', category: 'layout' },\n schema: {},\n guideline:\n 'Sliding visual indicator inside Switch.Root. Moves position based on the checked state managed by Base UI.',\n});\n\nexport function SwitchRoot({\n checked,\n defaultChecked,\n onCheckedChange,\n disabled,\n readOnly,\n required,\n name,\n id,\n className,\n children,\n}: SwitchRootProps) {\n return (\n <BaseSwitch.Root\n checked={checked}\n defaultChecked={defaultChecked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n name={name}\n id={id}\n className={className}\n data-fs-switch-root=\"\"\n >\n {children}\n </BaseSwitch.Root>\n );\n}\n\nexport function SwitchThumb({ className, children, ...props }: SwitchThumbProps) {\n return (\n <BaseSwitch.Thumb {...props} className={className} data-fs-switch-thumb=\"\">\n {children}\n </BaseSwitch.Thumb>\n );\n}\n\nexport const Switch = {\n Root: SwitchRoot,\n Thumb: SwitchThumb,\n};\n"],"mappings":";;;;;;AAoBA,MAAa,uBAAuB,gBAAiC;CACnE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAe,UAAU;CAAS;CACnD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,MAAa,wBAAwB,gBAAkC;CACrE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAgB,UAAU;CAAS;CACpD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,SAAgB,WAAW,EACzB,SACA,gBACA,iBACA,UACA,UACA,UACA,MACA,IACA,WACA,YACkB;CAClB,OACE,oBAACA,OAAW,MAAZ;EACW;EACO;EACC;EACP;EACA;EACA;EACJ;EACF;EACO;EACX,uBAAoB;EAEnB;CACc,CAAA;AAErB;AAEA,SAAgB,YAAY,EAAE,WAAW,UAAU,GAAG,SAA2B;CAC/E,OACE,oBAACA,OAAW,OAAZ;EAAkB,GAAI;EAAkB;EAAW,wBAAqB;EACrE;CACe,CAAA;AAEtB;AAEA,MAAaC,WAAS;CACpB,MAAM;CACN,OAAO;AACT"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ComponentDefinition } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
+
//#region src/particles/tabs/tabs.d.ts
|
|
5
|
+
export type TabsOrientation = 'horizontal' | 'vertical';
|
|
6
|
+
export type TabsRootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> & {
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
orientation?: TabsOrientation;
|
|
11
|
+
};
|
|
12
|
+
export type TabsListProps = ComponentPropsWithRef<'div'> & {
|
|
13
|
+
loopFocus?: boolean;
|
|
14
|
+
activateOnFocus?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type TabsTabProps = ComponentPropsWithRef<'button'> & {
|
|
17
|
+
value: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type TabsPanelProps = ComponentPropsWithRef<'div'> & {
|
|
21
|
+
value: string;
|
|
22
|
+
keepMounted?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type TabsIndicatorProps = ComponentPropsWithRef<'span'> & {
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
};
|
|
27
|
+
export declare const TabsRootDefinition: ComponentDefinition<TabsRootProps>;
|
|
28
|
+
export declare const TabsListDefinition: ComponentDefinition<TabsListProps>;
|
|
29
|
+
export declare const TabsTabDefinition: ComponentDefinition<TabsTabProps>;
|
|
30
|
+
export declare const TabsPanelDefinition: ComponentDefinition<TabsPanelProps>;
|
|
31
|
+
export declare const TabsIndicatorDefinition: ComponentDefinition<TabsIndicatorProps>;
|
|
32
|
+
export declare function TabsRoot({ defaultValue, value, onValueChange, orientation, className, children, ...props }: TabsRootProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function TabsList({ loopFocus, activateOnFocus, className, children, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare function TabsTab({ value, disabled, className, children, ...props }: TabsTabProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function TabsPanel({ value, keepMounted, className, children, ...props }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function TabsIndicator({ className, children, ...props }: TabsIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const Tabs: {
|
|
38
|
+
Root: typeof TabsRoot;
|
|
39
|
+
List: typeof TabsList;
|
|
40
|
+
Tab: typeof TabsTab;
|
|
41
|
+
Panel: typeof TabsPanel;
|
|
42
|
+
Indicator: typeof TabsIndicator;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
//# sourceMappingURL=tabs.d.ts.map
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { defineComponent } from "../../core/dist/define-component.js";
|
|
3
|
+
import "../../core/dist/index.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
6
|
+
//#region src/particles/tabs/tabs.tsx
|
|
7
|
+
const TabsRootDefinition = defineComponent({
|
|
8
|
+
name: "TabsRoot",
|
|
9
|
+
importPath: "@vtex/faststore/components",
|
|
10
|
+
component: TabsRoot,
|
|
11
|
+
editor: {
|
|
12
|
+
label: "Tabs Root",
|
|
13
|
+
category: "layout"
|
|
14
|
+
},
|
|
15
|
+
schema: {
|
|
16
|
+
defaultValue: {
|
|
17
|
+
type: "string",
|
|
18
|
+
label: "Default Value"
|
|
19
|
+
},
|
|
20
|
+
orientation: {
|
|
21
|
+
type: ["horizontal", "vertical"],
|
|
22
|
+
default: "horizontal",
|
|
23
|
+
label: "Orientation"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
guideline: "Root of the tabs. Groups tabs and the corresponding panels. Compose as: TabsRoot > TabsList > TabsTab[] + TabsPanel[]. Set defaultValue to the value of the tab that should be active on first render; otherwise the first tab is selected. Orientation controls arrow-key navigation axis."
|
|
27
|
+
});
|
|
28
|
+
const TabsListDefinition = defineComponent({
|
|
29
|
+
name: "TabsList",
|
|
30
|
+
importPath: "@vtex/faststore/components",
|
|
31
|
+
component: TabsList,
|
|
32
|
+
editor: {
|
|
33
|
+
label: "Tabs List",
|
|
34
|
+
category: "layout"
|
|
35
|
+
},
|
|
36
|
+
schema: {
|
|
37
|
+
loopFocus: {
|
|
38
|
+
type: "boolean",
|
|
39
|
+
default: true,
|
|
40
|
+
label: "Loop Focus"
|
|
41
|
+
},
|
|
42
|
+
activateOnFocus: {
|
|
43
|
+
type: "boolean",
|
|
44
|
+
default: false,
|
|
45
|
+
label: "Activate On Focus"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
guideline: "Groups the individual tab buttons inside TabsRoot. Owns roving tabindex and arrow-key navigation. Set activateOnFocus=true to switch the active panel as soon as a tab gets keyboard focus."
|
|
49
|
+
});
|
|
50
|
+
const TabsTabDefinition = defineComponent({
|
|
51
|
+
name: "TabsTab",
|
|
52
|
+
importPath: "@vtex/faststore/components",
|
|
53
|
+
component: TabsTab,
|
|
54
|
+
editor: {
|
|
55
|
+
label: "Tabs Tab",
|
|
56
|
+
category: "action"
|
|
57
|
+
},
|
|
58
|
+
schema: {
|
|
59
|
+
value: {
|
|
60
|
+
type: "string",
|
|
61
|
+
label: "Value"
|
|
62
|
+
},
|
|
63
|
+
disabled: {
|
|
64
|
+
type: "boolean",
|
|
65
|
+
default: false,
|
|
66
|
+
label: "Disabled"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
guideline: "Individual tab button inside TabsList. Requires a unique `value` within the enclosing TabsRoot. Base UI sets data-active='' on the active tab and manages ARIA attributes automatically."
|
|
70
|
+
});
|
|
71
|
+
const TabsPanelDefinition = defineComponent({
|
|
72
|
+
name: "TabsPanel",
|
|
73
|
+
importPath: "@vtex/faststore/components",
|
|
74
|
+
component: TabsPanel,
|
|
75
|
+
editor: {
|
|
76
|
+
label: "Tabs Panel",
|
|
77
|
+
category: "layout"
|
|
78
|
+
},
|
|
79
|
+
schema: {
|
|
80
|
+
value: {
|
|
81
|
+
type: "string",
|
|
82
|
+
label: "Value"
|
|
83
|
+
},
|
|
84
|
+
keepMounted: {
|
|
85
|
+
type: "boolean",
|
|
86
|
+
default: false,
|
|
87
|
+
label: "Keep Mounted"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
guideline: "Content panel rendered when its `value` matches the active TabsRoot value. Place inside TabsRoot (anywhere — not necessarily inside TabsList). Set keepMounted=true to keep hidden panels in the DOM (useful for forms or expensive trees that need to preserve state)."
|
|
91
|
+
});
|
|
92
|
+
const TabsIndicatorDefinition = defineComponent({
|
|
93
|
+
name: "TabsIndicator",
|
|
94
|
+
importPath: "@vtex/faststore/components",
|
|
95
|
+
component: TabsIndicator,
|
|
96
|
+
editor: {
|
|
97
|
+
label: "Tabs Indicator",
|
|
98
|
+
category: "layout"
|
|
99
|
+
},
|
|
100
|
+
schema: {},
|
|
101
|
+
guideline: "Optional visual indicator that animates between active tabs. Place inside TabsList. Base UI sets CSS custom properties for the active tab position and size — style with width/height and translate based on those vars."
|
|
102
|
+
});
|
|
103
|
+
function TabsRoot({ defaultValue, value, onValueChange, orientation = "horizontal", className, children, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsx(Tabs.Root, {
|
|
105
|
+
...props,
|
|
106
|
+
defaultValue,
|
|
107
|
+
value,
|
|
108
|
+
onValueChange: onValueChange ? (next) => onValueChange(next) : void 0,
|
|
109
|
+
orientation,
|
|
110
|
+
className,
|
|
111
|
+
"data-fs-tabs-root": "",
|
|
112
|
+
"data-fs-tabs-root-orientation": orientation,
|
|
113
|
+
children
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function TabsList({ loopFocus = true, activateOnFocus = false, className, children, ...props }) {
|
|
117
|
+
return /* @__PURE__ */ jsx(Tabs.List, {
|
|
118
|
+
...props,
|
|
119
|
+
loopFocus,
|
|
120
|
+
activateOnFocus,
|
|
121
|
+
className,
|
|
122
|
+
"data-fs-tabs-list": "",
|
|
123
|
+
children
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function TabsTab({ value, disabled = false, className, children, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
128
|
+
...props,
|
|
129
|
+
value,
|
|
130
|
+
disabled,
|
|
131
|
+
className,
|
|
132
|
+
"data-fs-tabs-tab": "",
|
|
133
|
+
children
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function TabsPanel({ value, keepMounted = false, className, children, ...props }) {
|
|
137
|
+
return /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
138
|
+
...props,
|
|
139
|
+
value,
|
|
140
|
+
keepMounted,
|
|
141
|
+
className,
|
|
142
|
+
"data-fs-tabs-panel": "",
|
|
143
|
+
children
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function TabsIndicator({ className, children, ...props }) {
|
|
147
|
+
return /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
148
|
+
...props,
|
|
149
|
+
className,
|
|
150
|
+
"data-fs-tabs-indicator": "",
|
|
151
|
+
children
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
const Tabs$1 = {
|
|
155
|
+
Root: TabsRoot,
|
|
156
|
+
List: TabsList,
|
|
157
|
+
Tab: TabsTab,
|
|
158
|
+
Panel: TabsPanel,
|
|
159
|
+
Indicator: TabsIndicator
|
|
160
|
+
};
|
|
161
|
+
//#endregion
|
|
162
|
+
export { Tabs$1 as Tabs, TabsIndicator, TabsIndicatorDefinition, TabsList, TabsListDefinition, TabsPanel, TabsPanelDefinition, TabsRoot, TabsRootDefinition, TabsTab, TabsTabDefinition };
|
|
163
|
+
|
|
164
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","names":["BaseTabs","Tabs"],"sources":["../../../src/particles/tabs/tabs.tsx"],"sourcesContent":["'use client';\nimport { Tabs as BaseTabs } from '@base-ui/react/tabs';\nimport { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\n\nexport type TabsOrientation = 'horizontal' | 'vertical';\n\nexport type TabsRootProps = Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> & {\n defaultValue?: string;\n value?: string;\n onValueChange?: (value: string) => void;\n orientation?: TabsOrientation;\n};\n\nexport type TabsListProps = ComponentPropsWithRef<'div'> & {\n loopFocus?: boolean;\n activateOnFocus?: boolean;\n};\n\nexport type TabsTabProps = ComponentPropsWithRef<'button'> & {\n value: string;\n disabled?: boolean;\n};\n\nexport type TabsPanelProps = ComponentPropsWithRef<'div'> & {\n value: string;\n keepMounted?: boolean;\n};\n\nexport type TabsIndicatorProps = ComponentPropsWithRef<'span'> & {\n children?: ReactNode;\n};\n\nexport const TabsRootDefinition = defineComponent<TabsRootProps>({\n name: 'TabsRoot',\n importPath: '@vtex/faststore/components',\n component: TabsRoot,\n editor: { label: 'Tabs Root', category: 'layout' },\n schema: {\n defaultValue: { type: 'string', label: 'Default Value' },\n orientation: { type: ['horizontal', 'vertical'] as const, default: 'horizontal', label: 'Orientation' },\n },\n guideline:\n 'Root of the tabs. Groups tabs and the corresponding panels. Compose as: TabsRoot > TabsList > TabsTab[] + TabsPanel[]. Set defaultValue to the value of the tab that should be active on first render; otherwise the first tab is selected. Orientation controls arrow-key navigation axis.',\n});\n\nexport const TabsListDefinition = defineComponent<TabsListProps>({\n name: 'TabsList',\n importPath: '@vtex/faststore/components',\n component: TabsList,\n editor: { label: 'Tabs List', category: 'layout' },\n schema: {\n loopFocus: { type: 'boolean', default: true, label: 'Loop Focus' },\n activateOnFocus: { type: 'boolean', default: false, label: 'Activate On Focus' },\n },\n guideline:\n 'Groups the individual tab buttons inside TabsRoot. Owns roving tabindex and arrow-key navigation. Set activateOnFocus=true to switch the active panel as soon as a tab gets keyboard focus.',\n});\n\nexport const TabsTabDefinition = defineComponent<TabsTabProps>({\n name: 'TabsTab',\n importPath: '@vtex/faststore/components',\n component: TabsTab,\n editor: { label: 'Tabs Tab', category: 'action' },\n schema: {\n value: { type: 'string', label: 'Value' },\n disabled: { type: 'boolean', default: false, label: 'Disabled' },\n },\n guideline:\n \"Individual tab button inside TabsList. Requires a unique `value` within the enclosing TabsRoot. Base UI sets data-active='' on the active tab and manages ARIA attributes automatically.\",\n});\n\nexport const TabsPanelDefinition = defineComponent<TabsPanelProps>({\n name: 'TabsPanel',\n importPath: '@vtex/faststore/components',\n component: TabsPanel,\n editor: { label: 'Tabs Panel', category: 'layout' },\n schema: {\n value: { type: 'string', label: 'Value' },\n keepMounted: { type: 'boolean', default: false, label: 'Keep Mounted' },\n },\n guideline:\n 'Content panel rendered when its `value` matches the active TabsRoot value. Place inside TabsRoot (anywhere — not necessarily inside TabsList). Set keepMounted=true to keep hidden panels in the DOM (useful for forms or expensive trees that need to preserve state).',\n});\n\nexport const TabsIndicatorDefinition = defineComponent<TabsIndicatorProps>({\n name: 'TabsIndicator',\n importPath: '@vtex/faststore/components',\n component: TabsIndicator,\n editor: { label: 'Tabs Indicator', category: 'layout' },\n schema: {},\n guideline:\n 'Optional visual indicator that animates between active tabs. Place inside TabsList. Base UI sets CSS custom properties for the active tab position and size — style with width/height and translate based on those vars.',\n});\n\nexport function TabsRoot({\n defaultValue,\n value,\n onValueChange,\n orientation = 'horizontal',\n className,\n children,\n ...props\n}: TabsRootProps) {\n return (\n <BaseTabs.Root\n {...props}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange ? (next) => onValueChange(next as string) : undefined}\n orientation={orientation}\n className={className}\n data-fs-tabs-root=\"\"\n data-fs-tabs-root-orientation={orientation}\n >\n {children}\n </BaseTabs.Root>\n );\n}\n\nexport function TabsList({ loopFocus = true, activateOnFocus = false, className, children, ...props }: TabsListProps) {\n return (\n <BaseTabs.List\n {...props}\n loopFocus={loopFocus}\n activateOnFocus={activateOnFocus}\n className={className}\n data-fs-tabs-list=\"\"\n >\n {children}\n </BaseTabs.List>\n );\n}\n\nexport function TabsTab({ value, disabled = false, className, children, ...props }: TabsTabProps) {\n return (\n <BaseTabs.Tab {...props} value={value} disabled={disabled} className={className} data-fs-tabs-tab=\"\">\n {children}\n </BaseTabs.Tab>\n );\n}\n\nexport function TabsPanel({ value, keepMounted = false, className, children, ...props }: TabsPanelProps) {\n return (\n <BaseTabs.Panel {...props} value={value} keepMounted={keepMounted} className={className} data-fs-tabs-panel=\"\">\n {children}\n </BaseTabs.Panel>\n );\n}\n\nexport function TabsIndicator({ className, children, ...props }: TabsIndicatorProps) {\n return (\n <BaseTabs.Indicator {...props} className={className} data-fs-tabs-indicator=\"\">\n {children}\n </BaseTabs.Indicator>\n );\n}\n\nexport const Tabs = {\n Root: TabsRoot,\n List: TabsList,\n Tab: TabsTab,\n Panel: TabsPanel,\n Indicator: TabsIndicator,\n};\n"],"mappings":";;;;;;AAiCA,MAAa,qBAAqB,gBAA+B;CAC/D,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAa,UAAU;CAAS;CACjD,QAAQ;EACN,cAAc;GAAE,MAAM;GAAU,OAAO;EAAgB;EACvD,aAAa;GAAE,MAAM,CAAC,cAAc,UAAU;GAAY,SAAS;GAAc,OAAO;EAAc;CACxG;CACA,WACE;AACJ,CAAC;AAED,MAAa,qBAAqB,gBAA+B;CAC/D,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAa,UAAU;CAAS;CACjD,QAAQ;EACN,WAAW;GAAE,MAAM;GAAW,SAAS;GAAM,OAAO;EAAa;EACjE,iBAAiB;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAAoB;CACjF;CACA,WACE;AACJ,CAAC;AAED,MAAa,oBAAoB,gBAA8B;CAC7D,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAY,UAAU;CAAS;CAChD,QAAQ;EACN,OAAO;GAAE,MAAM;GAAU,OAAO;EAAQ;EACxC,UAAU;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAAW;CACjE;CACA,WACE;AACJ,CAAC;AAED,MAAa,sBAAsB,gBAAgC;CACjE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAc,UAAU;CAAS;CAClD,QAAQ;EACN,OAAO;GAAE,MAAM;GAAU,OAAO;EAAQ;EACxC,aAAa;GAAE,MAAM;GAAW,SAAS;GAAO,OAAO;EAAe;CACxE;CACA,WACE;AACJ,CAAC;AAED,MAAa,0BAA0B,gBAAoC;CACzE,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAkB,UAAU;CAAS;CACtD,QAAQ,CAAC;CACT,WACE;AACJ,CAAC;AAED,SAAgB,SAAS,EACvB,cACA,OACA,eACA,cAAc,cACd,WACA,UACA,GAAG,SACa;CAChB,OACE,oBAACA,KAAS,MAAV;EACE,GAAI;EACU;EACP;EACP,eAAe,iBAAiB,SAAS,cAAc,IAAc,IAAI,KAAA;EAC5D;EACF;EACX,qBAAkB;EAClB,iCAA+B;EAE9B;CACY,CAAA;AAEnB;AAEA,SAAgB,SAAS,EAAE,YAAY,MAAM,kBAAkB,OAAO,WAAW,UAAU,GAAG,SAAwB;CACpH,OACE,oBAACA,KAAS,MAAV;EACE,GAAI;EACO;EACM;EACN;EACX,qBAAkB;EAEjB;CACY,CAAA;AAEnB;AAEA,SAAgB,QAAQ,EAAE,OAAO,WAAW,OAAO,WAAW,UAAU,GAAG,SAAuB;CAChG,OACE,oBAACA,KAAS,KAAV;EAAc,GAAI;EAAc;EAAiB;EAAqB;EAAW,oBAAiB;EAC/F;CACW,CAAA;AAElB;AAEA,SAAgB,UAAU,EAAE,OAAO,cAAc,OAAO,WAAW,UAAU,GAAG,SAAyB;CACvG,OACE,oBAACA,KAAS,OAAV;EAAgB,GAAI;EAAc;EAAoB;EAAwB;EAAW,sBAAmB;EACzG;CACa,CAAA;AAEpB;AAEA,SAAgB,cAAc,EAAE,WAAW,UAAU,GAAG,SAA6B;CACnF,OACE,oBAACA,KAAS,WAAV;EAAoB,GAAI;EAAkB;EAAW,0BAAuB;EACzE;CACiB,CAAA;AAExB;AAEA,MAAaC,SAAO;CAClB,MAAM;CACN,MAAM;CACN,KAAK;CACL,OAAO;CACP,WAAW;AACb"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentDefinition } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import { ComponentPropsWithRef, ElementType } from "react";
|
|
4
|
+
//#region src/particles/text/text.d.ts
|
|
5
|
+
type TextOwnProps<T extends ElementType = 'p'> = {
|
|
6
|
+
/** Override the rendered element. Defaults to `'p'`. */
|
|
7
|
+
as?: T;
|
|
8
|
+
};
|
|
9
|
+
/** Props for {@link Text}. Extends all native attributes of the rendered element. */
|
|
10
|
+
export type TextProps<T extends ElementType = 'p'> = TextOwnProps<T> & Omit<ComponentPropsWithRef<T>, keyof TextOwnProps<T>>;
|
|
11
|
+
/**
|
|
12
|
+
* Polymorphic text component.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <Text>Paragraph content</Text>
|
|
17
|
+
* <Text as="h1">Hero title</Text>
|
|
18
|
+
* <Text as="span">Inline text</Text>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const TextDefinition: ComponentDefinition<TextProps<ElementType>>;
|
|
22
|
+
export declare function Text<T extends ElementType = 'p'>({ as, className, children, ...props }: TextProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/particles/text/text.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Polymorphic text component.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Text>Paragraph content</Text>
|
|
11
|
+
* <Text as="h1">Hero title</Text>
|
|
12
|
+
* <Text as="span">Inline text</Text>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
const TextDefinition = defineComponent({
|
|
16
|
+
name: "Text",
|
|
17
|
+
importPath: "@vtex/faststore/components",
|
|
18
|
+
component: Text,
|
|
19
|
+
editor: {
|
|
20
|
+
label: "Text",
|
|
21
|
+
category: "content"
|
|
22
|
+
},
|
|
23
|
+
schema: { as: {
|
|
24
|
+
type: "string",
|
|
25
|
+
label: "HTML Element"
|
|
26
|
+
} },
|
|
27
|
+
guideline: "Universal typography — use the as prop to control the rendered HTML element (h1, h2, p, span, label, code, etc.)."
|
|
28
|
+
});
|
|
29
|
+
function Text({ as, className, children, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(as ?? "p", {
|
|
31
|
+
...props,
|
|
32
|
+
className,
|
|
33
|
+
"data-fs-text": "",
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Text, TextDefinition };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../../../src/particles/text/text.tsx"],"sourcesContent":["import { defineComponent } from '@vtex/fs-core';\nimport type { ComponentPropsWithRef, ElementType } from 'react';\n\ntype TextOwnProps<T extends ElementType = 'p'> = {\n /** Override the rendered element. Defaults to `'p'`. */\n as?: T;\n};\n\n/** Props for {@link Text}. Extends all native attributes of the rendered element. */\nexport type TextProps<T extends ElementType = 'p'> = TextOwnProps<T> &\n Omit<ComponentPropsWithRef<T>, keyof TextOwnProps<T>>;\n\n/**\n * Polymorphic text component.\n *\n * @example\n * ```tsx\n * <Text>Paragraph content</Text>\n * <Text as=\"h1\">Hero title</Text>\n * <Text as=\"span\">Inline text</Text>\n * ```\n */\nexport const TextDefinition = defineComponent({\n name: 'Text',\n importPath: '@vtex/faststore/components',\n component: Text,\n editor: { label: 'Text', category: 'content' },\n schema: {\n as: { type: 'string', label: 'HTML Element' },\n },\n guideline:\n 'Universal typography — use the as prop to control the rendered HTML element (h1, h2, p, span, label, code, etc.).',\n});\n\nexport function Text<T extends ElementType = 'p'>({ as, className, children, ...props }: TextProps<T>) {\n const Component = as ?? 'p';\n\n return (\n <Component {...props} className={className} data-fs-text=\"\">\n {children}\n </Component>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAa,iBAAiB,gBAAgB;CAC5C,MAAM;CACN,YAAY;CACZ,WAAW;CACX,QAAQ;EAAE,OAAO;EAAQ,UAAU;CAAU;CAC7C,QAAQ,EACN,IAAI;EAAE,MAAM;EAAU,OAAO;CAAe,EAC9C;CACA,WACE;AACJ,CAAC;AAED,SAAgB,KAAkC,EAAE,IAAI,WAAW,UAAU,GAAG,SAAuB;CAGrG,OACE,oBAHgB,MAAM,KAGtB;EAAW,GAAI;EAAkB;EAAW,gBAAa;EACtD;CACQ,CAAA;AAEf"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { ComponentDefinition } from "../../core/dist/define-component.js";
|
|
2
|
+
import "../../core/dist/index.js";
|
|
3
|
+
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
+
import { Toast, ToastManager, ToastManager as ToastManager$1, ToastRootToastObject } from "@base-ui/react/toast";
|
|
5
|
+
//#region src/particles/toast/toast.d.ts
|
|
6
|
+
/** The queued toast object `useToast().toasts` returns and `ToastRoot` renders. */
|
|
7
|
+
export type ToastObject = ToastRootToastObject;
|
|
8
|
+
type SwipeDirection = 'up' | 'down' | 'left' | 'right';
|
|
9
|
+
export type ToastProviderProps = Readonly<{
|
|
10
|
+
/** Max concurrent toasts before older ones are marked limited. */
|
|
11
|
+
limit?: number;
|
|
12
|
+
/** Default auto-dismiss delay (ms); `0` disables. */
|
|
13
|
+
timeout?: number;
|
|
14
|
+
/** External manager for triggering toasts outside React (e.g. a non-component module). */
|
|
15
|
+
toastManager?: ToastManager;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export type ToastPortalProps = Readonly<{
|
|
19
|
+
className?: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
export type ToastViewportProps = ComponentPropsWithRef<'div'>;
|
|
23
|
+
export type ToastRootProps = Readonly<{
|
|
24
|
+
/** The queued toast to render, from `useToast().toasts`. */
|
|
25
|
+
toast: ToastObject;
|
|
26
|
+
/** Directions the toast can be swiped to dismiss. @default ['down', 'right'] */
|
|
27
|
+
swipeDirection?: SwipeDirection | SwipeDirection[];
|
|
28
|
+
className?: string;
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
}>;
|
|
31
|
+
export type ToastTitleProps = ComponentPropsWithRef<'h2'>;
|
|
32
|
+
export type ToastDescriptionProps = ComponentPropsWithRef<'p'>;
|
|
33
|
+
export type ToastActionProps = ComponentPropsWithRef<'button'>;
|
|
34
|
+
export type ToastCloseProps = ComponentPropsWithRef<'button'>;
|
|
35
|
+
export declare const ToastProviderDefinition: ComponentDefinition<Readonly<{
|
|
36
|
+
/** Max concurrent toasts before older ones are marked limited. */
|
|
37
|
+
limit?: number;
|
|
38
|
+
/** Default auto-dismiss delay (ms); `0` disables. */
|
|
39
|
+
timeout?: number;
|
|
40
|
+
/** External manager for triggering toasts outside React (e.g. a non-component module). */
|
|
41
|
+
toastManager?: ToastManager;
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
}>>;
|
|
44
|
+
export declare const ToastPortalDefinition: ComponentDefinition<Readonly<{
|
|
45
|
+
className?: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
}>>;
|
|
48
|
+
export declare const ToastViewportDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>>;
|
|
49
|
+
export declare const ToastRootDefinition: ComponentDefinition<Readonly<{
|
|
50
|
+
/** The queued toast to render, from `useToast().toasts`. */
|
|
51
|
+
toast: ToastObject;
|
|
52
|
+
/** Directions the toast can be swiped to dismiss. @default ['down', 'right'] */
|
|
53
|
+
swipeDirection?: SwipeDirection | SwipeDirection[];
|
|
54
|
+
className?: string;
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
}>>;
|
|
57
|
+
export declare const ToastTitleDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>>;
|
|
58
|
+
export declare const ToastDescriptionDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>>;
|
|
59
|
+
export declare const ToastActionDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
60
|
+
export declare const ToastCloseDefinition: ComponentDefinition<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
|
61
|
+
export declare function ToastProvider({ limit, timeout, toastManager, children }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare function ToastPortal({ className, children }: ToastPortalProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare function ToastViewport({ className, children, ...props }: ToastViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare function ToastRoot({ toast, swipeDirection, className, children }: ToastRootProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare function ToastTitle({ className, children, ...props }: ToastTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function ToastDescription({ className, children, ...props }: ToastDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
export declare function ToastAction({ className, children, ...props }: ToastActionProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
export declare function ToastClose({ className, children, ...props }: ToastCloseProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
/** Thin re-export of Base UI's `useToastManager()` — see Key Decision 1 in the spec. */
|
|
70
|
+
export declare const useToast: typeof Toast.useToastManager;
|
|
71
|
+
declare const Toast$1: {
|
|
72
|
+
Provider: typeof ToastProvider;
|
|
73
|
+
Portal: typeof ToastPortal;
|
|
74
|
+
Viewport: typeof ToastViewport;
|
|
75
|
+
Root: typeof ToastRoot;
|
|
76
|
+
Title: typeof ToastTitle;
|
|
77
|
+
Description: typeof ToastDescription;
|
|
78
|
+
Action: typeof ToastAction;
|
|
79
|
+
Close: typeof ToastClose;
|
|
80
|
+
};
|
|
81
|
+
//#endregion
|
|
82
|
+
export { Toast$1 as Toast, type ToastManager$1 as ToastManager };
|
|
83
|
+
//# sourceMappingURL=toast.d.ts.map
|