@faststore/components 3.11.2 → 3.11.4
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/dist/cjs/atoms/Button/index.d.ts +1 -1
- package/dist/cjs/atoms/Link/Link.d.ts +1 -1
- package/dist/cjs/atoms/Link/Link.js.map +1 -1
- package/dist/cjs/atoms/List/List.js.map +1 -1
- package/dist/cjs/atoms/Loader/Loader.d.ts +2 -2
- package/dist/cjs/atoms/Slider/Slider.js.map +1 -1
- package/dist/cjs/hooks/UIProvider.js.map +1 -1
- package/dist/cjs/hooks/useSKUMatrix.js.map +1 -1
- package/dist/cjs/hooks/useScrollDirection.js.map +1 -1
- package/dist/cjs/hooks/useSearch.js.map +1 -1
- package/dist/cjs/hooks/useSlideVisibility.js.map +1 -1
- package/dist/cjs/hooks/useSlider.js.map +1 -1
- package/dist/cjs/hooks/useTrapFocus.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Accordion/Accordion.js.map +1 -1
- package/dist/cjs/molecules/Accordion/AccordionButton.js.map +1 -1
- package/dist/cjs/molecules/Accordion/AccordionItem.js.map +1 -1
- package/dist/cjs/molecules/Alert/Alert.d.ts +1 -1
- package/dist/cjs/molecules/Alert/Alert.js.map +1 -1
- package/dist/cjs/molecules/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/cjs/molecules/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/cjs/molecules/Breadcrumb/BreadcrumbBase.d.ts +2 -2
- package/dist/cjs/molecules/Breadcrumb/BreadcrumbBase.js.map +1 -1
- package/dist/cjs/molecules/Breadcrumb/Divider.d.ts +3 -3
- package/dist/cjs/molecules/Breadcrumb/Divider.js +1 -1
- package/dist/cjs/molecules/Breadcrumb/Divider.js.map +1 -1
- package/dist/cjs/molecules/Breadcrumb/ListItem.d.ts +2 -2
- package/dist/cjs/molecules/Breadcrumb/ListItem.js.map +1 -1
- package/dist/cjs/molecules/Card/Card.d.ts +11 -11
- package/dist/cjs/molecules/Card/Card.js.map +1 -1
- package/dist/cjs/molecules/Carousel/Carousel.js +2 -2
- package/dist/cjs/molecules/Carousel/Carousel.js.map +1 -1
- package/dist/cjs/molecules/Carousel/CarouselItem.d.ts +1 -1
- package/dist/cjs/molecules/Carousel/CarouselItem.js.map +1 -1
- package/dist/cjs/molecules/CartItem/CartItem.d.ts +5 -5
- package/dist/cjs/molecules/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/cjs/molecules/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/cjs/molecules/DiscountBadge/DiscountBadge.d.ts +1 -1
- package/dist/cjs/molecules/DiscountBadge/DiscountBadge.js.map +1 -1
- package/dist/cjs/molecules/Dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/molecules/Dropdown/DropdownButton.d.ts +2 -2
- package/dist/cjs/molecules/Dropdown/DropdownButton.js.map +1 -1
- package/dist/cjs/molecules/Dropdown/DropdownMenu.js +1 -1
- package/dist/cjs/molecules/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/cjs/molecules/Dropdown/hooks/useDropdown.js.map +1 -1
- package/dist/cjs/molecules/Dropdown/hooks/useDropdownItem.js.map +1 -1
- package/dist/cjs/molecules/Dropdown/hooks/useDropdownPosition.js +3 -3
- package/dist/cjs/molecules/Dropdown/hooks/useDropdownPosition.js.map +1 -1
- package/dist/cjs/molecules/LinkButton/LinkButton.js.map +1 -1
- package/dist/cjs/molecules/Modal/Modal.d.ts +1 -1
- package/dist/cjs/molecules/Modal/Modal.js.map +1 -1
- package/dist/cjs/molecules/Modal/ModalBody.d.ts +1 -1
- package/dist/cjs/molecules/Modal/ModalBody.js.map +1 -1
- package/dist/cjs/molecules/Modal/ModalHeader.d.ts +2 -2
- package/dist/cjs/molecules/Modal/ModalHeader.js.map +1 -1
- package/dist/cjs/molecules/OrderSummary/OrderSummary.js +1 -1
- package/dist/cjs/molecules/OrderSummary/OrderSummary.js.map +1 -1
- package/dist/cjs/molecules/ProductCard/ProductCardContent.d.ts +1 -1
- package/dist/cjs/molecules/ProductCard/ProductCardImage.js +1 -1
- package/dist/cjs/molecules/ProductTitle/ProductTitle.d.ts +1 -1
- package/dist/cjs/molecules/ProductTitle/ProductTitle.js.map +1 -1
- package/dist/cjs/molecules/QuantitySelector/QuantitySelector.js.map +1 -1
- package/dist/cjs/molecules/RadioGroup/useRadioGroup.js.map +1 -1
- package/dist/cjs/molecules/Rating/Rating.d.ts +1 -1
- package/dist/cjs/molecules/Rating/Rating.js.map +1 -1
- package/dist/cjs/molecules/SearchAutoComplete/SearchAutoComplete.d.ts +1 -1
- package/dist/cjs/molecules/SearchAutoComplete/SearchAutoComplete.js.map +1 -1
- package/dist/cjs/molecules/SearchAutoComplete/SearchAutoCompleteTerm.d.ts +2 -2
- package/dist/cjs/molecules/SearchAutoComplete/SearchAutoCompleteTerm.js.map +1 -1
- package/dist/cjs/molecules/SearchDropdown/SearchDropdown.js +1 -1
- package/dist/cjs/molecules/SearchDropdown/SearchDropdown.js.map +1 -1
- package/dist/cjs/molecules/SearchHistory/SearchHistory.d.ts +1 -1
- package/dist/cjs/molecules/SearchHistory/SearchHistory.js.map +1 -1
- package/dist/cjs/molecules/SearchHistory/SearchHistoryTerm.d.ts +2 -2
- package/dist/cjs/molecules/SearchHistory/SearchHistoryTerm.js.map +1 -1
- package/dist/cjs/molecules/SearchInputField/SearchInputField.js.map +1 -1
- package/dist/cjs/molecules/SearchProducts/SearchProductItem.d.ts +1 -1
- package/dist/cjs/molecules/SearchProducts/SearchProductItem.js.map +1 -1
- package/dist/cjs/molecules/SearchProducts/SearchProducts.d.ts +1 -1
- package/dist/cjs/molecules/SearchProducts/SearchProducts.js +1 -1
- package/dist/cjs/molecules/SearchProducts/SearchProducts.js.map +1 -1
- package/dist/cjs/molecules/SearchTop/SearchTop.js.map +1 -1
- package/dist/cjs/molecules/SearchTop/SearchTopTerm.d.ts +1 -1
- package/dist/cjs/molecules/SearchTop/SearchTopTerm.js.map +1 -1
- package/dist/cjs/molecules/SkuSelector/SkuSelector.d.ts +2 -2
- package/dist/cjs/molecules/SkuSelector/SkuSelector.js +3 -2
- package/dist/cjs/molecules/SkuSelector/SkuSelector.js.map +1 -1
- package/dist/cjs/molecules/SkuSelector/useDefineVariant.d.ts +1 -1
- package/dist/cjs/molecules/SkuSelector/useDefineVariant.js.map +1 -1
- package/dist/cjs/molecules/SkuSelector/useSkuSlug.d.ts +1 -1
- package/dist/cjs/molecules/SkuSelector/useSkuSlug.js.map +1 -1
- package/dist/cjs/molecules/Tag/Tag.d.ts +1 -1
- package/dist/cjs/molecules/Tag/Tag.js.map +1 -1
- package/dist/cjs/molecules/Toast/Toast.js.map +1 -1
- package/dist/cjs/organisms/BannerText/BannerText.js.map +1 -1
- package/dist/cjs/organisms/CartSidebar/CartSidebar.d.ts +2 -2
- package/dist/cjs/organisms/CartSidebar/CartSidebarFooter.d.ts +1 -1
- package/dist/cjs/organisms/CartSidebar/CartSidebarFooter.js.map +1 -1
- package/dist/cjs/organisms/CartSidebar/CartSidebarList.d.ts +1 -1
- package/dist/cjs/organisms/CartSidebar/CartSidebarList.js.map +1 -1
- package/dist/cjs/organisms/Filter/Filter.d.ts +1 -1
- package/dist/cjs/organisms/Filter/Filter.js.map +1 -1
- package/dist/cjs/organisms/Filter/FilterFacetBoolean.d.ts +1 -1
- package/dist/cjs/organisms/Filter/FilterFacetBoolean.js.map +1 -1
- package/dist/cjs/organisms/Filter/FilterFacetBooleanItem.d.ts +1 -1
- package/dist/cjs/organisms/Filter/FilterFacetRange.d.ts +1 -1
- package/dist/cjs/organisms/Filter/FilterFacets.d.ts +1 -1
- package/dist/cjs/organisms/Filter/FilterFacets.js.map +1 -1
- package/dist/cjs/organisms/Filter/FilterSlider.d.ts +2 -2
- package/dist/cjs/organisms/Hero/Hero.js.map +1 -1
- package/dist/cjs/organisms/ImageGallery/ImageGallerySelector.js.map +1 -1
- package/dist/cjs/organisms/PriceRange/PriceRange.js.map +1 -1
- package/dist/cjs/organisms/SKUMatrix/SKUMatrix.d.ts +1 -1
- package/dist/cjs/organisms/SKUMatrix/SKUMatrix.js.map +1 -1
- package/dist/cjs/organisms/SKUMatrix/SKUMatrixSidebar.d.ts +2 -2
- package/dist/cjs/organisms/SKUMatrix/SKUMatrixSidebar.js.map +1 -1
- package/dist/cjs/organisms/SKUMatrix/provider/SKUMatrixProvider.d.ts +1 -1
- package/dist/cjs/organisms/SKUMatrix/provider/SKUMatrixProvider.js.map +1 -1
- package/dist/cjs/organisms/SearchInput/SearchInput.d.ts +1 -1
- package/dist/cjs/organisms/SearchInput/SearchInput.js.map +1 -1
- package/dist/cjs/organisms/ShippingSimulation/ShippingSimulation.d.ts +1 -1
- package/dist/cjs/organisms/SlideOver/SlideOverHeader.d.ts +2 -2
- package/dist/cjs/organisms/SlideOver/SlideOverHeader.js.map +1 -1
- package/dist/cjs/organisms/SlideOver/index.d.ts +1 -1
- package/dist/cjs/organisms/SlideOver/index.js.map +1 -1
- package/dist/esm/atoms/Button/index.d.ts +1 -1
- package/dist/esm/atoms/Link/Link.d.ts +1 -1
- package/dist/esm/atoms/Link/Link.js.map +1 -1
- package/dist/esm/atoms/List/List.js.map +1 -1
- package/dist/esm/atoms/Loader/Loader.d.ts +2 -2
- package/dist/esm/atoms/Slider/Slider.js.map +1 -1
- package/dist/esm/hooks/UIProvider.js.map +1 -1
- package/dist/esm/hooks/useSKUMatrix.js.map +1 -1
- package/dist/esm/hooks/useScrollDirection.js.map +1 -1
- package/dist/esm/hooks/useSearch.js.map +1 -1
- package/dist/esm/hooks/useSlideVisibility.js.map +1 -1
- package/dist/esm/hooks/useSlider.js.map +1 -1
- package/dist/esm/hooks/useTrapFocus.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/molecules/Accordion/Accordion.js.map +1 -1
- package/dist/esm/molecules/Accordion/AccordionButton.js.map +1 -1
- package/dist/esm/molecules/Accordion/AccordionItem.js.map +1 -1
- package/dist/esm/molecules/Alert/Alert.d.ts +1 -1
- package/dist/esm/molecules/Alert/Alert.js.map +1 -1
- package/dist/esm/molecules/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/esm/molecules/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/esm/molecules/Breadcrumb/BreadcrumbBase.d.ts +2 -2
- package/dist/esm/molecules/Breadcrumb/BreadcrumbBase.js.map +1 -1
- package/dist/esm/molecules/Breadcrumb/Divider.d.ts +3 -3
- package/dist/esm/molecules/Breadcrumb/Divider.js +2 -2
- package/dist/esm/molecules/Breadcrumb/Divider.js.map +1 -1
- package/dist/esm/molecules/Breadcrumb/ListItem.d.ts +2 -2
- package/dist/esm/molecules/Breadcrumb/ListItem.js.map +1 -1
- package/dist/esm/molecules/Card/Card.d.ts +11 -11
- package/dist/esm/molecules/Card/Card.js.map +1 -1
- package/dist/esm/molecules/Carousel/Carousel.js +2 -2
- package/dist/esm/molecules/Carousel/Carousel.js.map +1 -1
- package/dist/esm/molecules/Carousel/CarouselItem.d.ts +1 -1
- package/dist/esm/molecules/Carousel/CarouselItem.js.map +1 -1
- package/dist/esm/molecules/CartItem/CartItem.d.ts +5 -5
- package/dist/esm/molecules/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/esm/molecules/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/esm/molecules/DiscountBadge/DiscountBadge.d.ts +1 -1
- package/dist/esm/molecules/DiscountBadge/DiscountBadge.js.map +1 -1
- package/dist/esm/molecules/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/molecules/Dropdown/DropdownButton.d.ts +2 -2
- package/dist/esm/molecules/Dropdown/DropdownButton.js.map +1 -1
- package/dist/esm/molecules/Dropdown/DropdownMenu.js +1 -1
- package/dist/esm/molecules/Dropdown/DropdownMenu.js.map +1 -1
- package/dist/esm/molecules/Dropdown/hooks/useDropdown.js.map +1 -1
- package/dist/esm/molecules/Dropdown/hooks/useDropdownItem.js.map +1 -1
- package/dist/esm/molecules/Dropdown/hooks/useDropdownPosition.js +3 -3
- package/dist/esm/molecules/Dropdown/hooks/useDropdownPosition.js.map +1 -1
- package/dist/esm/molecules/LinkButton/LinkButton.js.map +1 -1
- package/dist/esm/molecules/Modal/Modal.d.ts +1 -1
- package/dist/esm/molecules/Modal/Modal.js.map +1 -1
- package/dist/esm/molecules/Modal/ModalBody.d.ts +1 -1
- package/dist/esm/molecules/Modal/ModalBody.js.map +1 -1
- package/dist/esm/molecules/Modal/ModalHeader.d.ts +2 -2
- package/dist/esm/molecules/Modal/ModalHeader.js.map +1 -1
- package/dist/esm/molecules/OrderSummary/OrderSummary.js +1 -1
- package/dist/esm/molecules/OrderSummary/OrderSummary.js.map +1 -1
- package/dist/esm/molecules/ProductCard/ProductCardContent.d.ts +1 -1
- package/dist/esm/molecules/ProductCard/ProductCardImage.js +1 -1
- package/dist/esm/molecules/ProductTitle/ProductTitle.d.ts +1 -1
- package/dist/esm/molecules/ProductTitle/ProductTitle.js.map +1 -1
- package/dist/esm/molecules/QuantitySelector/QuantitySelector.js.map +1 -1
- package/dist/esm/molecules/RadioGroup/useRadioGroup.js.map +1 -1
- package/dist/esm/molecules/Rating/Rating.d.ts +1 -1
- package/dist/esm/molecules/Rating/Rating.js +1 -1
- package/dist/esm/molecules/Rating/Rating.js.map +1 -1
- package/dist/esm/molecules/SearchAutoComplete/SearchAutoComplete.d.ts +1 -1
- package/dist/esm/molecules/SearchAutoComplete/SearchAutoComplete.js.map +1 -1
- package/dist/esm/molecules/SearchAutoComplete/SearchAutoCompleteTerm.d.ts +2 -2
- package/dist/esm/molecules/SearchAutoComplete/SearchAutoCompleteTerm.js.map +1 -1
- package/dist/esm/molecules/SearchDropdown/SearchDropdown.js +1 -1
- package/dist/esm/molecules/SearchDropdown/SearchDropdown.js.map +1 -1
- package/dist/esm/molecules/SearchHistory/SearchHistory.d.ts +1 -1
- package/dist/esm/molecules/SearchHistory/SearchHistory.js.map +1 -1
- package/dist/esm/molecules/SearchHistory/SearchHistoryTerm.d.ts +2 -2
- package/dist/esm/molecules/SearchHistory/SearchHistoryTerm.js.map +1 -1
- package/dist/esm/molecules/SearchInputField/SearchInputField.js.map +1 -1
- package/dist/esm/molecules/SearchProducts/SearchProductItem.d.ts +1 -1
- package/dist/esm/molecules/SearchProducts/SearchProductItem.js.map +1 -1
- package/dist/esm/molecules/SearchProducts/SearchProducts.d.ts +1 -1
- package/dist/esm/molecules/SearchProducts/SearchProducts.js +1 -1
- package/dist/esm/molecules/SearchProducts/SearchProducts.js.map +1 -1
- package/dist/esm/molecules/SearchTop/SearchTop.js.map +1 -1
- package/dist/esm/molecules/SearchTop/SearchTopTerm.d.ts +1 -1
- package/dist/esm/molecules/SearchTop/SearchTopTerm.js.map +1 -1
- package/dist/esm/molecules/SkuSelector/SkuSelector.d.ts +2 -2
- package/dist/esm/molecules/SkuSelector/SkuSelector.js +3 -2
- package/dist/esm/molecules/SkuSelector/SkuSelector.js.map +1 -1
- package/dist/esm/molecules/SkuSelector/useDefineVariant.d.ts +1 -1
- package/dist/esm/molecules/SkuSelector/useDefineVariant.js.map +1 -1
- package/dist/esm/molecules/SkuSelector/useSkuSlug.d.ts +1 -1
- package/dist/esm/molecules/SkuSelector/useSkuSlug.js.map +1 -1
- package/dist/esm/molecules/Tag/Tag.d.ts +1 -1
- package/dist/esm/molecules/Tag/Tag.js.map +1 -1
- package/dist/esm/molecules/Toast/Toast.js.map +1 -1
- package/dist/esm/organisms/BannerText/BannerText.js.map +1 -1
- package/dist/esm/organisms/CartSidebar/CartSidebar.d.ts +2 -2
- package/dist/esm/organisms/CartSidebar/CartSidebarFooter.d.ts +1 -1
- package/dist/esm/organisms/CartSidebar/CartSidebarFooter.js.map +1 -1
- package/dist/esm/organisms/CartSidebar/CartSidebarList.d.ts +1 -1
- package/dist/esm/organisms/CartSidebar/CartSidebarList.js.map +1 -1
- package/dist/esm/organisms/Filter/Filter.d.ts +1 -1
- package/dist/esm/organisms/Filter/Filter.js.map +1 -1
- package/dist/esm/organisms/Filter/FilterFacetBoolean.d.ts +1 -1
- package/dist/esm/organisms/Filter/FilterFacetBoolean.js.map +1 -1
- package/dist/esm/organisms/Filter/FilterFacetBooleanItem.d.ts +1 -1
- package/dist/esm/organisms/Filter/FilterFacetRange.d.ts +1 -1
- package/dist/esm/organisms/Filter/FilterFacets.d.ts +1 -1
- package/dist/esm/organisms/Filter/FilterFacets.js.map +1 -1
- package/dist/esm/organisms/Filter/FilterSlider.d.ts +2 -2
- package/dist/esm/organisms/Hero/Hero.js.map +1 -1
- package/dist/esm/organisms/ImageGallery/ImageGallerySelector.js.map +1 -1
- package/dist/esm/organisms/PriceRange/PriceRange.js.map +1 -1
- package/dist/esm/organisms/SKUMatrix/SKUMatrix.d.ts +1 -1
- package/dist/esm/organisms/SKUMatrix/SKUMatrix.js.map +1 -1
- package/dist/esm/organisms/SKUMatrix/SKUMatrixSidebar.d.ts +2 -2
- package/dist/esm/organisms/SKUMatrix/SKUMatrixSidebar.js.map +1 -1
- package/dist/esm/organisms/SKUMatrix/provider/SKUMatrixProvider.d.ts +1 -1
- package/dist/esm/organisms/SKUMatrix/provider/SKUMatrixProvider.js +1 -1
- package/dist/esm/organisms/SKUMatrix/provider/SKUMatrixProvider.js.map +1 -1
- package/dist/esm/organisms/SearchInput/SearchInput.d.ts +1 -1
- package/dist/esm/organisms/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/organisms/ShippingSimulation/ShippingSimulation.d.ts +1 -1
- package/dist/esm/organisms/SlideOver/SlideOverHeader.d.ts +2 -2
- package/dist/esm/organisms/SlideOver/SlideOverHeader.js.map +1 -1
- package/dist/esm/organisms/SlideOver/index.d.ts +1 -1
- package/dist/esm/organisms/SlideOver/index.js +1 -1
- package/dist/esm/organisms/SlideOver/index.js.map +1 -1
- package/package.json +3 -5
- package/src/atoms/Button/index.ts +6 -1
- package/src/atoms/Link/Link.tsx +4 -1
- package/src/atoms/List/List.tsx +2 -4
- package/src/atoms/Loader/Loader.tsx +2 -2
- package/src/index.ts +3 -7
- package/src/molecules/Accordion/AccordionItem.tsx +3 -3
- package/src/molecules/Alert/Alert.tsx +1 -1
- package/src/molecules/Breadcrumb/Breadcrumb.tsx +2 -2
- package/src/molecules/Breadcrumb/BreadcrumbBase.tsx +5 -5
- package/src/molecules/Breadcrumb/Divider.tsx +17 -14
- package/src/molecules/Breadcrumb/ListItem.tsx +2 -2
- package/src/molecules/Card/Card.tsx +39 -28
- package/src/molecules/Carousel/Carousel.tsx +2 -2
- package/src/molecules/Carousel/CarouselItem.tsx +5 -4
- package/src/molecules/CartItem/CartItem.tsx +6 -6
- package/src/molecules/CheckboxField/CheckboxField.tsx +1 -1
- package/src/molecules/DiscountBadge/DiscountBadge.tsx +3 -3
- package/src/molecules/Dropdown/DropdownButton.tsx +5 -2
- package/src/molecules/Dropdown/DropdownMenu.tsx +13 -13
- package/src/molecules/Dropdown/hooks/useDropdown.ts +6 -2
- package/src/molecules/Dropdown/hooks/useDropdownPosition.ts +10 -5
- package/src/molecules/Modal/Modal.tsx +1 -1
- package/src/molecules/Modal/ModalBody.tsx +1 -1
- package/src/molecules/Modal/ModalHeader.tsx +2 -2
- package/src/molecules/OrderSummary/OrderSummary.tsx +2 -2
- package/src/molecules/ProductCard/ProductCardContent.tsx +2 -2
- package/src/molecules/ProductCard/ProductCardImage.tsx +1 -1
- package/src/molecules/ProductTitle/ProductTitle.tsx +1 -1
- package/src/molecules/Rating/Rating.tsx +6 -1
- package/src/molecules/SearchAutoComplete/SearchAutoComplete.tsx +1 -2
- package/src/molecules/SearchAutoComplete/SearchAutoCompleteTerm.tsx +2 -2
- package/src/molecules/SearchDropdown/SearchDropdown.tsx +5 -7
- package/src/molecules/SearchHistory/SearchHistory.tsx +1 -2
- package/src/molecules/SearchHistory/SearchHistoryTerm.tsx +2 -2
- package/src/molecules/SearchInputField/SearchInputField.tsx +1 -1
- package/src/molecules/SearchProducts/SearchProductItem.tsx +1 -1
- package/src/molecules/SearchProducts/SearchProducts.tsx +2 -2
- package/src/molecules/SearchProvider/index.ts +1 -1
- package/src/molecules/SearchTop/SearchTop.tsx +5 -11
- package/src/molecules/SearchTop/SearchTopTerm.tsx +1 -1
- package/src/molecules/SkuSelector/SkuSelector.tsx +16 -6
- package/src/molecules/SkuSelector/useDefineVariant.ts +9 -6
- package/src/molecules/SkuSelector/useSkuSlug.ts +1 -1
- package/src/molecules/Tag/Tag.tsx +1 -1
- package/src/organisms/CartSidebar/CartSidebar.tsx +2 -2
- package/src/organisms/CartSidebar/CartSidebarFooter.tsx +1 -1
- package/src/organisms/CartSidebar/CartSidebarList.tsx +1 -1
- package/src/organisms/Filter/Filter.tsx +1 -1
- package/src/organisms/Filter/FilterFacetBoolean.tsx +1 -1
- package/src/organisms/Filter/FilterFacetBooleanItem.tsx +1 -1
- package/src/organisms/Filter/FilterFacetRange.tsx +1 -1
- package/src/organisms/Filter/FilterFacets.tsx +1 -1
- package/src/organisms/Filter/FilterSlider.tsx +3 -3
- package/src/organisms/Filter/index.ts +0 -1
- package/src/organisms/PriceRange/PriceRange.tsx +2 -1
- package/src/organisms/SKUMatrix/SKUMatrix.tsx +1 -1
- package/src/organisms/SKUMatrix/SKUMatrixSidebar.tsx +2 -2
- package/src/organisms/SKUMatrix/provider/SKUMatrixProvider.tsx +10 -7
- package/src/organisms/SearchInput/SearchInput.tsx +10 -8
- package/src/organisms/ShippingSimulation/ShippingSimulation.tsx +2 -2
- package/src/organisms/SlideOver/SlideOverHeader.tsx +2 -2
- package/src/organisms/SlideOver/index.ts +5 -3
- package/src/typings/PolymorphicGenerics.ts +4 -4
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { BreadcrumbBaseProps } from
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import type { BreadcrumbBaseProps } from './BreadcrumbBase'
|
|
3
3
|
|
|
4
|
-
const Divider = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return
|
|
4
|
+
const Divider = ({
|
|
5
|
+
divider,
|
|
6
|
+
testId,
|
|
7
|
+
}: Omit<BreadcrumbBaseProps, 'breadcrumbList'>) => {
|
|
8
|
+
const props = {
|
|
9
|
+
'data-fs-breadcrumb-divider': true,
|
|
10
|
+
'aria-hidden': true,
|
|
11
|
+
'data-testid': `${testId}-divider`,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (React.isValidElement(divider)) {
|
|
15
|
+
return React.cloneElement(divider, props)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return <span {...props}>{divider ?? '/'}</span>
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
export default Divider
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react'
|
|
2
|
-
import { BreadcrumbBaseProps } from './BreadcrumbBase'
|
|
1
|
+
import React, { type ReactNode } from 'react'
|
|
2
|
+
import type { BreadcrumbBaseProps } from './BreadcrumbBase'
|
|
3
3
|
import Divider from './Divider'
|
|
4
4
|
|
|
5
5
|
type ListItemProps = {
|
|
@@ -1,53 +1,64 @@
|
|
|
1
|
-
import type { HTMLAttributes } from
|
|
1
|
+
import type { HTMLAttributes } from 'react'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
3
|
|
|
4
4
|
import { IconButton, Icon } from '../..'
|
|
5
5
|
|
|
6
|
-
export interface CardProps
|
|
6
|
+
export interface CardProps
|
|
7
|
+
extends Omit<HTMLAttributes<HTMLDivElement>, 'role'> {
|
|
7
8
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
* Specifies the text to be loaded into the header.
|
|
10
|
+
*/
|
|
10
11
|
title: string
|
|
11
12
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
14
|
+
*/
|
|
14
15
|
testId?: string
|
|
15
16
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
* Specifies the card max width.
|
|
18
|
+
*/
|
|
18
19
|
maxWidth?: string
|
|
19
20
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
* Specifies what icon to use following the FastStore Icon sheet.
|
|
22
|
+
*/
|
|
22
23
|
iconName?: string
|
|
23
24
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
* Function that should be executed when the icon is clicked
|
|
26
|
+
*/
|
|
26
27
|
iconAction?: () => void
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
const Card = forwardRef<HTMLDivElement, CardProps>(function Card(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
const Card = forwardRef<HTMLDivElement, CardProps>(function Card(
|
|
31
|
+
{
|
|
32
|
+
title,
|
|
33
|
+
maxWidth,
|
|
34
|
+
testId = 'fs-card',
|
|
35
|
+
iconName,
|
|
36
|
+
iconAction,
|
|
37
|
+
children,
|
|
38
|
+
...otherProps
|
|
39
|
+
},
|
|
40
|
+
ref
|
|
41
|
+
) {
|
|
38
42
|
return (
|
|
39
|
-
<section
|
|
43
|
+
<section
|
|
44
|
+
data-testid={testId}
|
|
45
|
+
ref={ref}
|
|
46
|
+
data-fs-card
|
|
47
|
+
style={{ maxWidth: `${maxWidth}` }}
|
|
48
|
+
{...otherProps}
|
|
49
|
+
>
|
|
40
50
|
<div data-fs-card-header>
|
|
41
51
|
<div data-fs-card-title>{title}</div>
|
|
42
52
|
{iconName && (
|
|
43
|
-
<IconButton
|
|
44
|
-
|
|
53
|
+
<IconButton
|
|
54
|
+
icon={<Icon name={iconName} width={20} height={20} />}
|
|
55
|
+
aria-label={`${title} action`}
|
|
56
|
+
onClick={iconAction}
|
|
57
|
+
/>
|
|
45
58
|
)}
|
|
46
59
|
</div>
|
|
47
|
-
<div data-fs-card-body>
|
|
48
|
-
|
|
49
|
-
</div>
|
|
50
|
-
</section >
|
|
60
|
+
<div data-fs-card-body>{children}</div>
|
|
61
|
+
</section>
|
|
51
62
|
)
|
|
52
63
|
})
|
|
53
64
|
|
|
@@ -135,7 +135,7 @@ function Carousel({
|
|
|
135
135
|
setMarginRight(getComputedStyle(item).getPropertyValue('margin-right'))
|
|
136
136
|
|
|
137
137
|
setCarouselItemsWidth(
|
|
138
|
-
Number(item.clientWidth) + parseInt(marginRight, 10) + 1
|
|
138
|
+
Number(item.clientWidth) + Number.parseInt(marginRight, 10) + 1
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
}, [carouselItemsWidth])
|
|
@@ -270,7 +270,7 @@ function Carousel({
|
|
|
270
270
|
return
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
|
|
273
|
+
const scrollOffset = index * carouselItemsWidth * itemsPerPage
|
|
274
274
|
|
|
275
275
|
carouselTrackRef.current?.scrollTo({
|
|
276
276
|
left: scrollOffset,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, HTMLAttributes, PropsWithChildren } from 'react'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import { SliderState, useSlideVisibility } from '../../hooks'
|
|
3
|
+
import { type SliderState, useSlideVisibility } from '../../hooks'
|
|
4
4
|
|
|
5
5
|
export interface CarouselItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
6
6
|
index: number
|
|
@@ -34,9 +34,10 @@ function CarouselItem({
|
|
|
34
34
|
})`,
|
|
35
35
|
} as CSSProperties
|
|
36
36
|
|
|
37
|
-
const style =
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const style =
|
|
38
|
+
isScrollCarousel && state.itemsPerPage > 1
|
|
39
|
+
? { ...scrollCarouselStyle }
|
|
40
|
+
: { ...defaultStyle }
|
|
40
41
|
|
|
41
42
|
const shouldDisplayItem =
|
|
42
43
|
isScrollCarousel || shouldRenderItem(index - Number(infiniteMode))
|
|
@@ -4,7 +4,7 @@ import React, { forwardRef } from 'react'
|
|
|
4
4
|
import {
|
|
5
5
|
Icon,
|
|
6
6
|
IconButton,
|
|
7
|
-
IconButtonProps,
|
|
7
|
+
type IconButtonProps,
|
|
8
8
|
ProductPrice,
|
|
9
9
|
QuantitySelector,
|
|
10
10
|
} from '../../'
|
|
@@ -25,14 +25,14 @@ export interface CartItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
*/
|
|
26
26
|
quantity?: number
|
|
27
27
|
/**
|
|
28
|
-
* Controls by how many units the value advances
|
|
28
|
+
* Controls by how many units the value advances
|
|
29
29
|
**/
|
|
30
30
|
unitMultiplier?: number
|
|
31
|
-
|
|
32
|
-
* Controls wheter you use or not the unitMultiplier
|
|
33
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Controls wheter you use or not the unitMultiplier
|
|
33
|
+
*/
|
|
34
34
|
useUnitMultiplier?: boolean
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
36
|
* Specifies that this product is unavailable.
|
|
37
37
|
*/
|
|
38
38
|
unavailable?: boolean
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react'
|
|
2
|
-
import Checkbox, { CheckboxProps } from '../../atoms/Checkbox'
|
|
2
|
+
import Checkbox, { type CheckboxProps } from '../../atoms/Checkbox'
|
|
3
3
|
import Label from '../../atoms/Label'
|
|
4
4
|
|
|
5
5
|
export interface CheckboxFieldProps extends CheckboxProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { Badge, BadgeProps } from '../..'
|
|
2
|
+
import { Badge, type BadgeProps } from '../..'
|
|
3
3
|
|
|
4
4
|
import { useDiscountPercent } from '../DiscountBadge/useDiscountPercent'
|
|
5
5
|
|
|
@@ -45,8 +45,8 @@ const DiscountBadge = ({
|
|
|
45
45
|
discountPercent <= thresholdLow
|
|
46
46
|
? 'low'
|
|
47
47
|
: discountPercent <= thresholdHigh
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
? 'medium'
|
|
49
|
+
: 'high'
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<Badge
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import React, { cloneElement, forwardRef, ReactNode } from 'react'
|
|
2
|
-
import Button, {
|
|
1
|
+
import React, { cloneElement, forwardRef, type ReactNode } from 'react'
|
|
2
|
+
import Button, {
|
|
3
|
+
type ButtonProps,
|
|
4
|
+
type ButtonIconPosition,
|
|
5
|
+
} from '../../atoms/Button'
|
|
3
6
|
import { useDropdownTrigger } from './hooks/useDropdownTrigger'
|
|
4
7
|
|
|
5
8
|
export interface DropdownButtonProps
|
|
@@ -62,7 +62,8 @@ const DropdownMenu = ({
|
|
|
62
62
|
id,
|
|
63
63
|
} = useDropdown()
|
|
64
64
|
|
|
65
|
-
const { loading: loadingPosition, ...dropdownPosition } =
|
|
65
|
+
const { loading: loadingPosition, ...dropdownPosition } =
|
|
66
|
+
useDropdownPosition(align)
|
|
66
67
|
|
|
67
68
|
const childrenLength = React.Children.toArray(children).length
|
|
68
69
|
|
|
@@ -102,24 +103,23 @@ const DropdownMenu = ({
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
const handleKeyNavigatePress = (key: string) => {
|
|
105
|
-
const dropdownItems = dropdownItemsRef?.current ?? []
|
|
106
|
-
const selectedIndex = selectedDropdownItemIndexRef!.current
|
|
107
|
-
|
|
106
|
+
const dropdownItems = dropdownItemsRef?.current ?? []
|
|
107
|
+
const selectedIndex = selectedDropdownItemIndexRef!.current
|
|
108
|
+
|
|
108
109
|
const rearrangedDropdownItems = [
|
|
109
110
|
...dropdownItems.slice(selectedIndex + 1),
|
|
110
111
|
...dropdownItems.slice(0, selectedIndex + 1),
|
|
111
|
-
]
|
|
112
|
-
|
|
112
|
+
]
|
|
113
|
+
|
|
113
114
|
const matchItem = rearrangedDropdownItems.find(
|
|
114
115
|
(item) => item.textContent?.[0]?.toLowerCase() === key.toLowerCase()
|
|
115
|
-
)
|
|
116
|
-
|
|
116
|
+
)
|
|
117
|
+
|
|
117
118
|
if (matchItem) {
|
|
118
|
-
selectedDropdownItemIndexRef!.current = dropdownItems.indexOf(matchItem)
|
|
119
|
-
matchItem.focus()
|
|
119
|
+
selectedDropdownItemIndexRef!.current = dropdownItems.indexOf(matchItem)
|
|
120
|
+
matchItem.focus()
|
|
120
121
|
}
|
|
121
|
-
}
|
|
122
|
-
|
|
122
|
+
}
|
|
123
123
|
|
|
124
124
|
const handleBackdropKeyDown = (event: KeyboardEvent) => {
|
|
125
125
|
if (event.defaultPrevented || event.key === 'Enter' || event.key === ' ') {
|
|
@@ -158,7 +158,7 @@ const DropdownMenu = ({
|
|
|
158
158
|
return null
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
return
|
|
161
|
+
return isOpen && !loadingPosition
|
|
162
162
|
? createPortal(
|
|
163
163
|
<div
|
|
164
164
|
role="presentation"
|
|
@@ -7,8 +7,12 @@ import DropdownContext from '../contexts/DropdownContext'
|
|
|
7
7
|
* Hook to use the Dropdown context.
|
|
8
8
|
* @returns Dropdown context.
|
|
9
9
|
*/
|
|
10
|
-
export const useDropdown = <
|
|
11
|
-
|
|
10
|
+
export const useDropdown = <
|
|
11
|
+
T extends HTMLElement = HTMLElement,
|
|
12
|
+
E extends HTMLElement = HTMLElement,
|
|
13
|
+
>() => {
|
|
14
|
+
const context =
|
|
15
|
+
useContext<DropdownContextState<HTMLElement, HTMLElement>>(DropdownContext)
|
|
12
16
|
|
|
13
17
|
if (context === undefined) {
|
|
14
18
|
throw new Error('Do not use useDropdown hook outside the Dropdown context.')
|
|
@@ -3,13 +3,18 @@ import { useDropdown } from './useDropdown'
|
|
|
3
3
|
|
|
4
4
|
type DropdownPosition = {
|
|
5
5
|
loading: boolean
|
|
6
|
-
} & Pick<
|
|
6
|
+
} & Pick<
|
|
7
|
+
React.CSSProperties,
|
|
8
|
+
'position' | 'top' | 'left' | 'right' | 'transform'
|
|
9
|
+
>
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* Hook used to find the DropdownMenu position in relation to DropdownButton
|
|
10
13
|
* @returns Style with positions.
|
|
11
14
|
*/
|
|
12
|
-
export const useDropdownPosition = (
|
|
15
|
+
export const useDropdownPosition = (
|
|
16
|
+
align: 'left' | 'center' | 'right' = 'left'
|
|
17
|
+
): DropdownPosition => {
|
|
13
18
|
const { dropdownTriggerRef, isOpen } = useDropdown()
|
|
14
19
|
|
|
15
20
|
const [positionProps, setPositionProps] = useState({
|
|
@@ -17,7 +22,7 @@ export const useDropdownPosition = (align: 'left' | 'center' | 'right' = 'left')
|
|
|
17
22
|
left: 0 as React.CSSProperties['left'],
|
|
18
23
|
right: 'auto',
|
|
19
24
|
transform: 'none',
|
|
20
|
-
loading: true
|
|
25
|
+
loading: true,
|
|
21
26
|
})
|
|
22
27
|
|
|
23
28
|
useEffect(() => {
|
|
@@ -47,7 +52,7 @@ export const useDropdownPosition = (align: 'left' | 'center' | 'right' = 'left')
|
|
|
47
52
|
rightPosition = `${document.documentElement.clientWidth - leftLevel - buttonWidth}px`
|
|
48
53
|
leftPosition = 'auto'
|
|
49
54
|
} else if (align === 'center') {
|
|
50
|
-
leftPosition = leftLevel +
|
|
55
|
+
leftPosition = leftLevel + buttonWidth / 2 + scrollLeft
|
|
51
56
|
transform = 'translateX(-50%)'
|
|
52
57
|
}
|
|
53
58
|
|
|
@@ -56,7 +61,7 @@ export const useDropdownPosition = (align: 'left' | 'center' | 'right' = 'left')
|
|
|
56
61
|
left: leftPosition,
|
|
57
62
|
right: rightPosition,
|
|
58
63
|
transform,
|
|
59
|
-
loading: false
|
|
64
|
+
loading: false,
|
|
60
65
|
})
|
|
61
66
|
}
|
|
62
67
|
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import { createPortal } from 'react-dom'
|
|
9
9
|
|
|
10
|
-
import { Overlay, OverlayProps } from '../..'
|
|
10
|
+
import { Overlay, type OverlayProps } from '../..'
|
|
11
11
|
import { useFadeEffect, useUI } from '../../hooks'
|
|
12
12
|
import type { ModalContentProps } from './ModalContent'
|
|
13
13
|
import ModalContent from './ModalContent'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react'
|
|
1
|
+
import React, { type HTMLAttributes } from 'react'
|
|
2
2
|
import Icon from '../../atoms/Icon'
|
|
3
|
-
import IconButton, { IconButtonProps } from '../IconButton'
|
|
3
|
+
import IconButton, { type IconButtonProps } from '../IconButton'
|
|
4
4
|
|
|
5
5
|
export interface ModalHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/**
|
|
@@ -54,7 +54,7 @@ const OrderSummary = forwardRef<HTMLUListElement, OrderSummaryProps>(
|
|
|
54
54
|
totalLabel = 'Total',
|
|
55
55
|
totalValue,
|
|
56
56
|
includeTaxes = false,
|
|
57
|
-
includeTaxesLabel =
|
|
57
|
+
includeTaxesLabel = 'Tax included',
|
|
58
58
|
...otherProps
|
|
59
59
|
},
|
|
60
60
|
ref
|
|
@@ -116,7 +116,7 @@ const OrderSummary = forwardRef<HTMLUListElement, OrderSummaryProps>(
|
|
|
116
116
|
<li data-fs-order-summary-taxes-label>
|
|
117
117
|
<Label>{includeTaxesLabel}</Label>
|
|
118
118
|
</li>
|
|
119
|
-
|
|
119
|
+
)}
|
|
120
120
|
</List>
|
|
121
121
|
)
|
|
122
122
|
}
|
|
@@ -29,7 +29,7 @@ const ProductCardImage = forwardRef<HTMLDivElement, ProductCardImageProps>(
|
|
|
29
29
|
data-testid={testId}
|
|
30
30
|
style={
|
|
31
31
|
{
|
|
32
|
-
'--fs-product-card-image-aspect-ratio': aspectRatio
|
|
32
|
+
'--fs-product-card-image-aspect-ratio': aspectRatio,
|
|
33
33
|
} as React.CSSProperties
|
|
34
34
|
}
|
|
35
35
|
{...otherProps}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
type HTMLAttributes,
|
|
4
|
+
type ReactNode,
|
|
5
|
+
useState,
|
|
6
|
+
} from 'react'
|
|
2
7
|
|
|
3
8
|
import { Icon, IconButton } from '../..'
|
|
4
9
|
import List from '../../atoms/List'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react'
|
|
1
|
+
import React, { type HTMLAttributes } from 'react'
|
|
2
2
|
import { List, useSearch } from '../..'
|
|
3
3
|
|
|
4
4
|
export interface SearchAutoCompleteProps
|
|
@@ -14,7 +14,6 @@ const SearchAutoComplete = ({
|
|
|
14
14
|
children,
|
|
15
15
|
...otherProps
|
|
16
16
|
}: SearchAutoCompleteProps) => {
|
|
17
|
-
|
|
18
17
|
const { inContext, values } = useSearch()
|
|
19
18
|
|
|
20
19
|
if (inContext && (values.terms.length <= 0 || values.term.length <= 0)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react'
|
|
2
|
-
import React, { Fragment, HTMLAttributes } from 'react'
|
|
3
|
-
import { Icon, Link, LinkElementType, LinkProps } from '../..'
|
|
2
|
+
import React, { Fragment, type HTMLAttributes } from 'react'
|
|
3
|
+
import { Icon, Link, type LinkElementType, type LinkProps } from '../..'
|
|
4
4
|
|
|
5
5
|
function formatSearchTerm(
|
|
6
6
|
indexSubstring: number,
|
|
@@ -16,7 +16,9 @@ const SearchLoading = () => {
|
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
18
|
<>
|
|
19
|
-
{
|
|
19
|
+
{inContext && values.isLoading && (
|
|
20
|
+
<p data-fs-search-dropdown-loading-text>Loading...</p>
|
|
21
|
+
)}
|
|
20
22
|
</>
|
|
21
23
|
)
|
|
22
24
|
}
|
|
@@ -25,17 +27,13 @@ const SearchDropdown = forwardRef<
|
|
|
25
27
|
HTMLDivElement,
|
|
26
28
|
PropsWithChildren<SearchDropdownProps>
|
|
27
29
|
>(function SearchDropdown(
|
|
28
|
-
{
|
|
29
|
-
testId = 'fs-search-dropdown',
|
|
30
|
-
children,
|
|
31
|
-
...otherProps
|
|
32
|
-
},
|
|
30
|
+
{ testId = 'fs-search-dropdown', children, ...otherProps },
|
|
33
31
|
ref
|
|
34
32
|
) {
|
|
35
33
|
return (
|
|
36
34
|
<div ref={ref} data-fs-search-dropdown data-testid={testId} {...otherProps}>
|
|
37
35
|
<section>
|
|
38
|
-
<SearchLoading/>
|
|
36
|
+
<SearchLoading />
|
|
39
37
|
{children}
|
|
40
38
|
</section>
|
|
41
39
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react'
|
|
1
|
+
import React, { type HTMLAttributes } from 'react'
|
|
2
2
|
import { List, Button, useSearch } from '../..'
|
|
3
3
|
|
|
4
4
|
export interface SearchHistoryProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -28,7 +28,6 @@ const SearchHistory = ({
|
|
|
28
28
|
children,
|
|
29
29
|
...otherProps
|
|
30
30
|
}: SearchHistoryProps) => {
|
|
31
|
-
|
|
32
31
|
const { inContext, values } = useSearch()
|
|
33
32
|
|
|
34
33
|
if (inContext && (values.term.length !== 0 || values.isLoading)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react'
|
|
2
|
-
import React, { HTMLAttributes } from 'react'
|
|
3
|
-
import { Icon, Link, LinkElementType, LinkProps } from '../..'
|
|
2
|
+
import React, { type HTMLAttributes } from 'react'
|
|
3
|
+
import { Icon, Link, type LinkElementType, type LinkProps } from '../..'
|
|
4
4
|
|
|
5
5
|
export interface SearchHistoryTermProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
3
|
|
|
4
|
-
import { Link, LinkElementType, LinkProps } from '../..'
|
|
4
|
+
import { Link, type LinkElementType, type LinkProps } from '../..'
|
|
5
5
|
|
|
6
6
|
export interface SearchProductItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react'
|
|
1
|
+
import React, { type HTMLAttributes } from 'react'
|
|
2
2
|
import { List, useSearch } from '../..'
|
|
3
3
|
|
|
4
4
|
export interface SearchProductsProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -20,7 +20,7 @@ const SearchProductsProps = ({
|
|
|
20
20
|
}: SearchProductsProps) => {
|
|
21
21
|
const { inContext, values } = useSearch()
|
|
22
22
|
|
|
23
|
-
if (inContext &&
|
|
23
|
+
if (inContext && values.products.length <= 0) {
|
|
24
24
|
return null
|
|
25
25
|
}
|
|
26
26
|
return (
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './SearchProvider'
|
|
2
|
-
export type { SearchProviderContextValue } from './SearchProvider'
|
|
2
|
+
export type { SearchProviderContextValue } from './SearchProvider'
|
|
@@ -16,15 +16,9 @@ export interface SearchTopProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const SearchTop = forwardRef<HTMLDivElement, SearchTopProps>(function SearchTop(
|
|
19
|
-
{
|
|
20
|
-
testId = 'fs-top-search',
|
|
21
|
-
title = 'Top Search',
|
|
22
|
-
children,
|
|
23
|
-
...otherProps
|
|
24
|
-
},
|
|
19
|
+
{ testId = 'fs-top-search', title = 'Top Search', children, ...otherProps },
|
|
25
20
|
ref
|
|
26
21
|
) {
|
|
27
|
-
|
|
28
22
|
const { inContext, values } = useSearch()
|
|
29
23
|
|
|
30
24
|
if (inContext && (values.term.length !== 0 || values.isLoading)) {
|
|
@@ -33,10 +27,10 @@ const SearchTop = forwardRef<HTMLDivElement, SearchTopProps>(function SearchTop(
|
|
|
33
27
|
|
|
34
28
|
return (
|
|
35
29
|
<section ref={ref} data-testid={testId} data-fs-search-top {...otherProps}>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
<header data-fs-search-top-header>
|
|
31
|
+
<p data-fs-search-top-title>{title}</p>
|
|
32
|
+
</header>
|
|
33
|
+
<List as="ol">{children}</List>
|
|
40
34
|
</section>
|
|
41
35
|
)
|
|
42
36
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react'
|
|
2
2
|
import React, { forwardRef } from 'react'
|
|
3
3
|
|
|
4
|
-
import { Badge, Link, LinkElementType, LinkProps } from '../../'
|
|
4
|
+
import { Badge, Link, type LinkElementType, type LinkProps } from '../../'
|
|
5
5
|
|
|
6
6
|
export interface SearchTopTermProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/**
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
/* eslint-disable @next/next/no-img-element */
|
|
2
1
|
import type { FunctionComponent, HTMLAttributes } from 'react'
|
|
3
|
-
import React
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { forwardRef } from 'react'
|
|
4
|
+
import {
|
|
5
|
+
Label,
|
|
6
|
+
SROnly,
|
|
7
|
+
Link,
|
|
8
|
+
type LinkProps,
|
|
9
|
+
type LinkElementType,
|
|
10
|
+
} from '../..'
|
|
11
|
+
import { useDefineVariant, type Variant } from './useDefineVariant'
|
|
6
12
|
import { useSkuSlug } from './useSkuSlug'
|
|
7
13
|
|
|
8
|
-
|
|
9
14
|
// TODO: Change by ImageComponent when it be right
|
|
10
15
|
const ImageComponentFallback: SkuSelectorProps['ImageComponent'] = ({
|
|
11
16
|
src,
|
|
@@ -108,7 +113,12 @@ const SkuSelector = forwardRef<HTMLDivElement, SkuSelectorProps>(
|
|
|
108
113
|
|
|
109
114
|
const variant = useDefineVariant(options, variantProp)
|
|
110
115
|
|
|
111
|
-
const { getItemHref } = useSkuSlug(
|
|
116
|
+
const { getItemHref } = useSkuSlug(
|
|
117
|
+
activeVariations,
|
|
118
|
+
slugsMap,
|
|
119
|
+
skuPropertyName,
|
|
120
|
+
getItemHrefProp
|
|
121
|
+
)
|
|
112
122
|
|
|
113
123
|
return (
|
|
114
124
|
<div
|