@envive-ai/react-widgets 0.1.2-arthur-3 → 0.1.3
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/SearchResults/SearchResults.cjs +86 -0
- package/dist/SearchResults/SearchResults.js +84 -0
- package/dist/SearchResults/SearchResultsWidget.cjs +34 -0
- package/dist/SearchResults/SearchResultsWidget.js +33 -0
- package/dist/SearchResults/index.cjs +2 -122
- package/dist/SearchResults/index.d.cts +2 -0
- package/dist/SearchResults/index.d.ts +2 -0
- package/dist/SearchResults/index.js +1 -119
- package/dist/SearchResults/withSearchResults.cjs +18 -0
- package/dist/SearchResults/withSearchResults.js +17 -0
- package/dist/SearchZeroState/SearchIcon.cjs +48 -0
- package/dist/SearchZeroState/SearchIcon.js +45 -0
- package/dist/SearchZeroState/SearchOverlay.cjs +42 -0
- package/dist/SearchZeroState/SearchOverlay.js +39 -0
- package/dist/SearchZeroState/SearchZeroState.cjs +173 -0
- package/dist/SearchZeroState/SearchZeroState.d.cts +7 -0
- package/dist/SearchZeroState/SearchZeroState.d.ts +7 -0
- package/dist/SearchZeroState/SearchZeroState.js +171 -0
- package/dist/SearchZeroState/SearchZeroStateWidget.cjs +23 -0
- package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +15 -0
- package/dist/SearchZeroState/SearchZeroStateWidget.d.ts +15 -0
- package/dist/SearchZeroState/SearchZeroStateWidget.js +22 -0
- package/dist/SearchZeroState/components/RecommendedProducts.cjs +74 -0
- package/dist/SearchZeroState/components/RecommendedProducts.js +72 -0
- package/dist/SearchZeroState/index.cjs +4 -2996
- package/dist/SearchZeroState/index.d.cts +4 -0
- package/dist/SearchZeroState/index.d.ts +4 -0
- package/dist/SearchZeroState/index.js +2 -2991
- package/dist/SearchZeroState/overlay/overlayHostLocator.cjs +21 -0
- package/dist/SearchZeroState/overlay/overlayHostLocator.js +20 -0
- package/dist/SearchZeroState/types.d.cts +10 -0
- package/dist/SearchZeroState/types.d.ts +10 -0
- package/dist/SearchZeroState/zeroStateSearchVariants.cjs +21 -0
- package/dist/SearchZeroState/zeroStateSearchVariants.js +20 -0
- package/dist/SuggestionBar/SuggestionBar.cjs +74 -0
- package/dist/SuggestionBar/{index-DZU9kbWS.d.cts → SuggestionBar.d.cts} +4 -9
- package/dist/SuggestionBar/{index-DyXd4-b7.d.ts → SuggestionBar.d.ts} +6 -11
- package/dist/SuggestionBar/SuggestionBar.js +72 -0
- package/dist/SuggestionBar/index.cjs +3 -3
- package/dist/SuggestionBar/index.d.cts +3 -0
- package/dist/SuggestionBar/index.d.ts +3 -0
- package/dist/SuggestionBar/index.js +2 -2
- package/dist/SuggestionBar/types.cjs +10 -0
- package/dist/SuggestionBar/types.d.cts +7 -0
- package/dist/SuggestionBar/types.d.ts +7 -0
- package/dist/SuggestionBar/types.js +9 -0
- package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +76 -0
- package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +6 -0
- package/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +6 -0
- package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +75 -0
- package/dist/SuggestionButtonContainer/index.cjs +1 -1
- package/dist/SuggestionButtonContainer/index.d.cts +3 -0
- package/dist/SuggestionButtonContainer/index.d.ts +3 -0
- package/dist/SuggestionButtonContainer/index.js +1 -1
- package/dist/SuggestionButtonContainer/{index-B_X537jw.d.cts → types.d.cts} +1 -4
- package/dist/SuggestionButtonContainer/{index-vwelzDzM.d.ts → types.d.ts} +1 -4
- package/dist/_virtual/rolldown_runtime.cjs +33 -0
- package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
- package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
- package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
- package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
- package/dist/node_modules/react-icons/md/index.cjs +35 -0
- package/dist/node_modules/react-icons/md/index.js +35 -0
- package/dist/{SuggestionBar-BOThXJvJ.cjs → node_modules/react-indiana-drag-scroll/dist/index.cjs} +6 -139
- package/dist/node_modules/uuid/dist/native.js +6 -0
- package/dist/node_modules/uuid/dist/rng.js +13 -0
- package/dist/node_modules/uuid/dist/stringify.js +9 -0
- package/dist/node_modules/uuid/dist/v4.js +27 -0
- package/dist/node_modules/uuid/dist-node/native.cjs +8 -0
- package/dist/node_modules/uuid/dist-node/rng.cjs +16 -0
- package/dist/node_modules/uuid/dist-node/stringify.cjs +10 -0
- package/dist/node_modules/uuid/dist-node/v4.cjs +27 -0
- package/dist/packages/components/dist/components/Accordion/Accordion.cjs +80 -0
- package/dist/packages/components/dist/components/Accordion/Accordion.js +78 -0
- package/dist/packages/components/dist/components/Accordion/index.cjs +1 -0
- package/dist/packages/components/dist/components/Accordion/index.js +1 -0
- package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.cjs +30 -0
- package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.js +29 -0
- package/dist/packages/components/dist/components/ButtonBase/ButtonBase.cjs +56 -0
- package/dist/packages/components/dist/components/ButtonBase/ButtonBase.js +54 -0
- package/dist/packages/components/dist/components/ButtonBase/index.cjs +2 -0
- package/dist/packages/components/dist/components/ButtonBase/index.js +2 -0
- package/dist/packages/components/dist/components/ButtonBase/types.cjs +11 -0
- package/dist/packages/components/dist/components/ButtonBase/types.js +10 -0
- package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.cjs +45 -0
- package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.js +42 -0
- package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +33 -0
- package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +30 -0
- package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.cjs +45 -0
- package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.js +42 -0
- package/dist/packages/components/dist/components/ImageWithFallback/index.cjs +1 -0
- package/dist/packages/components/dist/components/ImageWithFallback/index.js +1 -0
- package/dist/packages/components/dist/components/ModalSheet/ModalSheet.cjs +30 -0
- package/dist/packages/components/dist/components/ModalSheet/ModalSheet.js +29 -0
- package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.cjs +26 -0
- package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.js +24 -0
- package/dist/packages/components/dist/components/ModalSheet/desktop/index.cjs +122 -0
- package/dist/packages/components/dist/components/ModalSheet/desktop/index.js +120 -0
- package/dist/packages/components/dist/components/ModalSheet/index.cjs +1 -0
- package/dist/packages/components/dist/components/ModalSheet/index.js +1 -0
- package/dist/packages/components/dist/components/ModalSheet/mobile/index.cjs +116 -0
- package/dist/packages/components/dist/components/ModalSheet/mobile/index.js +114 -0
- package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.cjs +38 -0
- package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.js +36 -0
- package/dist/packages/components/dist/components/ProductCard/ProductCard.cjs +153 -0
- package/dist/packages/components/dist/components/ProductCard/ProductCard.js +149 -0
- package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.cjs +33 -0
- package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.js +31 -0
- package/dist/packages/components/dist/components/ProductCard/index.cjs +4 -0
- package/dist/packages/components/dist/components/ProductCard/index.js +4 -0
- package/dist/packages/components/dist/components/ProductCard/productCardVariants.cjs +49 -0
- package/dist/packages/components/dist/components/ProductCard/productCardVariants.js +45 -0
- package/dist/packages/components/dist/components/ProductCard/types.cjs +10 -0
- package/dist/packages/components/dist/components/ProductCard/types.js +9 -0
- package/dist/packages/components/dist/components/ProductGrid/ProductGrid.cjs +43 -0
- package/dist/packages/components/dist/components/ProductGrid/ProductGrid.js +41 -0
- package/dist/packages/components/dist/components/ProductGrid/index.cjs +2 -0
- package/dist/packages/components/dist/components/ProductGrid/index.js +2 -0
- package/dist/packages/components/dist/components/ProductGrid/productGridVariants.cjs +21 -0
- package/dist/packages/components/dist/components/ProductGrid/productGridVariants.js +20 -0
- package/dist/packages/components/dist/components/RadioButton/RadioButton.cjs +74 -0
- package/dist/packages/components/dist/components/RadioButton/RadioButton.js +72 -0
- package/dist/packages/components/dist/components/RadioButton/index.cjs +1 -0
- package/dist/packages/components/dist/components/RadioButton/index.js +1 -0
- package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.cjs +42 -0
- package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.js +39 -0
- package/dist/packages/components/dist/components/RadioButtonGroup/index.cjs +1 -0
- package/dist/packages/components/dist/components/RadioButtonGroup/index.js +1 -0
- package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.cjs +53 -0
- package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.js +51 -0
- package/dist/packages/components/dist/components/RecommendedProducts/index.cjs +3 -0
- package/dist/packages/components/dist/components/RecommendedProducts/index.js +3 -0
- package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +72 -0
- package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.js +69 -0
- package/dist/packages/components/dist/components/SearchAutocomplete/index.cjs +1 -0
- package/dist/packages/components/dist/components/SearchAutocomplete/index.js +1 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilter.cjs +134 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilter.js +132 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.cjs +48 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.js +46 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.cjs +42 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.js +40 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.cjs +6 -0
- package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.js +4 -0
- package/dist/packages/components/dist/components/SearchFilter/index.cjs +5 -0
- package/dist/packages/components/dist/components/SearchFilter/index.js +5 -0
- package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.cjs +27 -0
- package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.js +26 -0
- package/dist/packages/components/dist/components/SearchFilter/utils.cjs +11 -0
- package/dist/packages/components/dist/components/SearchFilter/utils.js +9 -0
- package/dist/packages/components/dist/components/SearchInput/SearchInput.cjs +81 -0
- package/dist/packages/components/dist/components/SearchInput/SearchInput.js +78 -0
- package/dist/packages/components/dist/components/SearchInput/index.cjs +2 -0
- package/dist/packages/components/dist/components/SearchInput/index.js +2 -0
- package/dist/packages/components/dist/components/SearchInput/searchInputVariants.cjs +15 -0
- package/dist/packages/components/dist/components/SearchInput/searchInputVariants.js +15 -0
- package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.cjs +57 -0
- package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.js +55 -0
- package/dist/packages/components/dist/components/SearchInputForm/index.cjs +1 -0
- package/dist/packages/components/dist/components/SearchInputForm/index.js +1 -0
- package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.cjs +52 -0
- package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.js +50 -0
- package/dist/packages/components/dist/components/SearchResultsContent/index.cjs +1 -0
- package/dist/packages/components/dist/components/SearchResultsContent/index.js +1 -0
- package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +24 -0
- package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +23 -0
- package/dist/packages/components/dist/components/SearchResultsFilterButton/index.cjs +3 -0
- package/dist/packages/components/dist/components/SearchResultsFilterButton/index.js +3 -0
- package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +36 -0
- package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +35 -0
- package/dist/packages/components/dist/components/SearchResultsFilterModal/index.cjs +3 -0
- package/dist/packages/components/dist/components/SearchResultsFilterModal/index.js +3 -0
- package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +9 -0
- package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.js +9 -0
- package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.cjs +2 -0
- package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.js +2 -0
- package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs +34 -0
- package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +34 -0
- package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +56 -0
- package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.js +54 -0
- package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.cjs +53 -0
- package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.js +51 -0
- package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +52 -0
- package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +51 -0
- package/dist/packages/components/dist/components/SearchResultsStates/index.cjs +3 -0
- package/dist/packages/components/dist/components/SearchResultsStates/index.js +3 -0
- package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +60 -0
- package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +57 -0
- package/dist/packages/components/dist/components/SearchResultsToolbar/index.cjs +3 -0
- package/dist/packages/components/dist/components/SearchResultsToolbar/index.js +3 -0
- package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.cjs +77 -0
- package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.js +75 -0
- package/dist/packages/components/dist/components/SparkleAnimation/index.cjs +2 -0
- package/dist/packages/components/dist/components/SparkleAnimation/index.js +2 -0
- package/dist/packages/components/dist/components/SparkleAnimation/types.cjs +12 -0
- package/dist/packages/components/dist/components/SparkleAnimation/types.js +11 -0
- package/dist/packages/components/dist/components/Spinner/Spinner.cjs +40 -0
- package/dist/packages/components/dist/components/Spinner/Spinner.js +38 -0
- package/dist/packages/components/dist/components/Spinner/index.cjs +1 -0
- package/dist/packages/components/dist/components/Spinner/index.js +1 -0
- package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.cjs +193 -0
- package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.js +188 -0
- package/dist/packages/components/dist/components/SuggestionButton/index.cjs +1 -0
- package/dist/packages/components/dist/components/SuggestionButton/index.js +1 -0
- package/dist/packages/components/dist/components/TextInput/TextInput.cjs +34 -0
- package/dist/packages/components/dist/components/TextInput/TextInput.js +31 -0
- package/dist/packages/components/dist/components/TextInput/index.cjs +1 -0
- package/dist/packages/components/dist/components/TextInput/index.js +1 -0
- package/dist/packages/components/dist/components/ToggleButton/ToggleButton.cjs +63 -0
- package/dist/packages/components/dist/components/ToggleButton/ToggleButton.js +61 -0
- package/dist/packages/components/dist/components/ToggleButton/index.cjs +1 -0
- package/dist/packages/components/dist/components/ToggleButton/index.js +1 -0
- package/dist/packages/components/dist/components/Typography/Typography.cjs +53 -0
- package/dist/packages/components/dist/components/Typography/Typography.js +50 -0
- package/dist/packages/components/dist/components/Typography/index.cjs +2 -0
- package/dist/packages/components/dist/components/Typography/index.js +2 -0
- package/dist/packages/components/dist/components/Typography/typographyVariantClasses.cjs +99 -0
- package/dist/packages/components/dist/components/Typography/typographyVariantClasses.js +96 -0
- package/dist/packages/components/dist/components/Typography/util.cjs +10 -0
- package/dist/packages/components/dist/components/Typography/util.js +10 -0
- package/dist/packages/components/dist/logging/logger.cjs +20 -0
- package/dist/packages/components/dist/logging/logger.js +19 -0
- package/dist/packages/components/dist/models/colorsConfig.cjs +28 -0
- package/dist/packages/components/dist/models/colorsConfig.js +26 -0
- package/dist/packages/components/dist/util/formatPrice.cjs +14 -0
- package/dist/packages/components/dist/util/formatPrice.js +13 -0
- package/dist/packages/components/dist/util/index.cjs +3 -0
- package/dist/packages/components/dist/util/index.js +3 -0
- package/dist/packages/components/dist/util/useScrollDirection.cjs +39 -0
- package/dist/packages/components/dist/util/useScrollDirection.js +38 -0
- package/dist/packages/components/dist/util/useStickyVisibility.cjs +38 -0
- package/dist/packages/components/dist/util/useStickyVisibility.js +37 -0
- package/dist/packages/icons/dist/AiSearchBold.cjs +38 -0
- package/dist/packages/icons/dist/AiSearchBold.js +38 -0
- package/dist/packages/icons/dist/AiSearchThin.cjs +35 -0
- package/dist/packages/icons/dist/AiSearchThin.js +35 -0
- package/dist/packages/icons/dist/ChevronDown.cjs +23 -0
- package/dist/packages/icons/dist/ChevronDown.js +23 -0
- package/dist/packages/icons/dist/FourPointStar.cjs +22 -0
- package/dist/packages/icons/dist/FourPointStar.js +22 -0
- package/dist/packages/icons/dist/IconClose.cjs +26 -0
- package/dist/packages/icons/dist/IconClose.js +26 -0
- package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
- package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
- package/dist/packages/icons/dist/MagnifyingGlassStarVariant.cjs +39 -0
- package/dist/packages/icons/dist/MagnifyingGlassStarVariant.js +39 -0
- package/dist/packages/icons/dist/OutlinedStar.cjs +22 -0
- package/dist/packages/icons/dist/OutlinedStar.js +22 -0
- package/dist/packages/icons/dist/SettingsVariant.cjs +72 -0
- package/dist/packages/icons/dist/SettingsVariant.js +72 -0
- package/dist/packages/icons/dist/Sparkles.cjs +43 -0
- package/dist/packages/icons/dist/Sparkles.js +43 -0
- package/dist/{chunk-DWy1uDak.cjs → packages/icons/dist/_virtual/rolldown_runtime.cjs} +4 -14
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +27 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
- package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
- package/dist/util/useHorizontalScrollAnimation.cjs +88 -0
- package/dist/util/useHorizontalScrollAnimation.js +87 -0
- package/dist/util/useReducedMotionWithOverride.cjs +15 -0
- package/dist/util/useReducedMotionWithOverride.js +14 -0
- package/package.json +14 -8
- package/src/SearchResults/SearchResults.tsx +2 -4
- package/src/SearchResults/SearchResultsWidget.tsx +1 -1
- package/src/SearchResults/types.ts +0 -3
- package/src/SearchZeroState/SearchIcon.tsx +16 -9
- package/src/SearchZeroState/SearchOverlay.tsx +3 -2
- package/src/SearchZeroState/SearchZeroState.tsx +15 -18
- package/src/SearchZeroState/SearchZeroStateWidget.tsx +17 -8
- package/src/SearchZeroState/components/RecommendedProducts.tsx +8 -3
- package/src/SearchZeroState/overlay/overlayHostLocator.ts +2 -4
- package/src/SearchZeroState/types.ts +4 -1
- package/src/SearchZeroState/zeroStateSearchVariants.ts +14 -5
- package/src/SuggestionBar/SuggestionBar.tsx +12 -20
- package/src/SuggestionBar/types.ts +3 -3
- package/src/SuggestionButtonContainer/SuggestionButtonContainer.tsx +8 -17
- package/src/SuggestionButtonContainer/types.ts +3 -4
- package/src/stories/SearchResults.stories.tsx +1 -1
- package/src/stories/SearchZeroState.stories.tsx +10 -2
- package/src/stories/SuggestionBar.stories.tsx +1 -2
- package/src/util/useHorizontalScrollAnimation.ts +1 -1
- package/dist/SearchZeroState/index-19CiYvee.d.cts +0 -27
- package/dist/SearchZeroState/index-6EaGWYP4.d.ts +0 -27
- package/dist/SuggestionBar-DeMmAK4M.js +0 -131
- package/dist/SuggestionButtonContainer-BeWPpeQk.cjs +0 -173
- package/dist/SuggestionButtonContainer-CZhOkZaJ.js +0 -167
- /package/dist/SearchResults/{index-D8nrHueo.d.ts → SearchResultsWidget.d.cts} +0 -0
- /package/dist/SearchResults/{index-D52sX_I2.d.cts → SearchResultsWidget.d.ts} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { TypographyVariantMap } from "./typographyVariantClasses.js";
|
|
2
|
+
import { getElementTypeFromVariant } from "./util.js";
|
|
3
|
+
import React, { useCallback, useMemo } from "react";
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
|
|
6
|
+
//#region ../components/dist/components/Typography/Typography.js
|
|
7
|
+
const Typography = ({ children, className, style, noOfLines, testId, elementType, variant = "body3", id }) => {
|
|
8
|
+
const variantClassNames = variant ? TypographyVariantMap[variant] : {};
|
|
9
|
+
const isHeadline = useCallback(() => [
|
|
10
|
+
"t1",
|
|
11
|
+
"t2",
|
|
12
|
+
"t3",
|
|
13
|
+
"h1",
|
|
14
|
+
"h2",
|
|
15
|
+
"h3",
|
|
16
|
+
"h4"
|
|
17
|
+
].includes(variant), [variant]);
|
|
18
|
+
const renderedElementType = useMemo(() => {
|
|
19
|
+
if (elementType) return elementType;
|
|
20
|
+
if (!elementType) {
|
|
21
|
+
if (isHeadline()) return getElementTypeFromVariant(variant, isHeadline());
|
|
22
|
+
}
|
|
23
|
+
return "span";
|
|
24
|
+
}, [
|
|
25
|
+
isHeadline,
|
|
26
|
+
variant,
|
|
27
|
+
elementType
|
|
28
|
+
]);
|
|
29
|
+
const textClassNames = classNames(className, variantClassNames, {
|
|
30
|
+
"spiffy-tw-font-[Poppins,sans-serif]": isHeadline(),
|
|
31
|
+
"spiffy-tw-font-[\"Inter Variable,sans-serif\"]": !isHeadline(),
|
|
32
|
+
"spiffy-tw-line-clamp-1": noOfLines === 1,
|
|
33
|
+
"spiffy-tw-line-clamp-2": noOfLines === 2,
|
|
34
|
+
"spiffy-tw-line-clamp-3": noOfLines === 3,
|
|
35
|
+
"spiffy-tw-line-clamp-4": noOfLines === 4,
|
|
36
|
+
"spiffy-tw-line-clamp-5": noOfLines === 5,
|
|
37
|
+
"spiffy-tw-line-clamp-6": noOfLines === 6,
|
|
38
|
+
"spiffy-tw-line-clamp-7": noOfLines === 7
|
|
39
|
+
});
|
|
40
|
+
const renderElement = (elementTypeToRender) => React.createElement(elementTypeToRender, {
|
|
41
|
+
"data-testid": testId,
|
|
42
|
+
className: textClassNames,
|
|
43
|
+
style,
|
|
44
|
+
id
|
|
45
|
+
}, children);
|
|
46
|
+
return renderElement(renderedElementType);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Typography };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../components/dist/components/Typography/typographyVariantClasses.js
|
|
3
|
+
const TypographyDomVariantMap = {
|
|
4
|
+
["h1"]: {
|
|
5
|
+
"spiffy-headline": true,
|
|
6
|
+
"spiffy-headline-1": true,
|
|
7
|
+
"spiffy-tw-text-[20px]": true,
|
|
8
|
+
"spiffy-tw-font-normal": true,
|
|
9
|
+
"spiffy-tw-leading-[120%]": true
|
|
10
|
+
},
|
|
11
|
+
["h2"]: {
|
|
12
|
+
"spiffy-headline": true,
|
|
13
|
+
"spiffy-headline-2": true,
|
|
14
|
+
"spiffy-tw-text-[16px]": true,
|
|
15
|
+
"spiffy-tw-font-normal": true,
|
|
16
|
+
"spiffy-tw-leading-[124%]": true
|
|
17
|
+
},
|
|
18
|
+
["h3"]: {
|
|
19
|
+
"spiffy-headline": true,
|
|
20
|
+
"spiffy-headline-3": true,
|
|
21
|
+
"spiffy-tw-text-[15px]": true,
|
|
22
|
+
"spiffy-tw-font-medium": true,
|
|
23
|
+
"spiffy-tw-leading-[124%]": true
|
|
24
|
+
},
|
|
25
|
+
["h4"]: {
|
|
26
|
+
"spiffy-headline": true,
|
|
27
|
+
"spiffy-headline-4": true,
|
|
28
|
+
"spiffy-tw-text-[14px]": true,
|
|
29
|
+
"spiffy-tw-font-medium": true,
|
|
30
|
+
"spiffy-tw-leading-[124%]": true
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const TypographyVariantMap = {
|
|
34
|
+
...TypographyDomVariantMap,
|
|
35
|
+
["t1"]: {
|
|
36
|
+
"spiffy-headline": true,
|
|
37
|
+
"spiffy-headline-1": true,
|
|
38
|
+
"spiffy-tw-text-[32px]": true,
|
|
39
|
+
"spiffy-tw-font-medium": true,
|
|
40
|
+
"spiffy-tw-leading-[124%]": true
|
|
41
|
+
},
|
|
42
|
+
["t2"]: {
|
|
43
|
+
"spiffy-headline": true,
|
|
44
|
+
"spiffy-headline-1": true,
|
|
45
|
+
"spiffy-tw-text-[16px]": true,
|
|
46
|
+
"spiffy-tw-font-medium": true,
|
|
47
|
+
"spiffy-tw-leading-[124%]": true
|
|
48
|
+
},
|
|
49
|
+
["t3"]: {
|
|
50
|
+
"spiffy-headline": true,
|
|
51
|
+
"spiffy-headline-1": true,
|
|
52
|
+
"spiffy-tw-text-[24px]": true,
|
|
53
|
+
"spiffy-tw-leading-[120%]": true
|
|
54
|
+
},
|
|
55
|
+
["body1"]: {
|
|
56
|
+
"spiffy-body-text": true,
|
|
57
|
+
"spiffy-body-1": true,
|
|
58
|
+
"spiffy-tw-text-[20px]": true,
|
|
59
|
+
"spiffy-tw-font-normal": true,
|
|
60
|
+
"spiffy-tw-line-height-[120%]": true
|
|
61
|
+
},
|
|
62
|
+
["body2"]: {
|
|
63
|
+
"spiffy-body-text": true,
|
|
64
|
+
"spiffy-body-2": true,
|
|
65
|
+
"spiffy-tw-text-[16px]": true,
|
|
66
|
+
"spiffy-tw-font-normal": true,
|
|
67
|
+
"spiffy-tw-line-height-[148%]": true
|
|
68
|
+
},
|
|
69
|
+
["body3"]: {
|
|
70
|
+
"spiffy-body-text": true,
|
|
71
|
+
"spiffy-body-3": true,
|
|
72
|
+
"spiffy-tw-text-sm": true,
|
|
73
|
+
"spiffy-tw-font-normal": true,
|
|
74
|
+
"spiffy-tw-leading-[140%]": true
|
|
75
|
+
},
|
|
76
|
+
["body4"]: {
|
|
77
|
+
"spiffy-body-text": true,
|
|
78
|
+
"spiffy-body-4": true,
|
|
79
|
+
"spiffy-tw-text-xs": true,
|
|
80
|
+
"spiffy-tw-font-medium": true,
|
|
81
|
+
"spiffy-tw-leading-[130%]": true
|
|
82
|
+
},
|
|
83
|
+
["body5"]: {
|
|
84
|
+
"spiffy-body-text": true,
|
|
85
|
+
"spiffy-body-5": true,
|
|
86
|
+
"spiffy-tw-text-[10px]": true,
|
|
87
|
+
"spiffy-tw-font-normal": true
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
|
|
91
|
+
if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
|
|
92
|
+
else acc[`${key}-placeholder`] = classes[key];
|
|
93
|
+
return acc;
|
|
94
|
+
}, {});
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
exports.TypographyDomVariantMap = TypographyDomVariantMap;
|
|
98
|
+
exports.TypographyVariantMap = TypographyVariantMap;
|
|
99
|
+
exports.getVariantPlaceholderClassNames = getVariantPlaceholderClassNames;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
//#region ../components/dist/components/Typography/typographyVariantClasses.js
|
|
2
|
+
const TypographyDomVariantMap = {
|
|
3
|
+
["h1"]: {
|
|
4
|
+
"spiffy-headline": true,
|
|
5
|
+
"spiffy-headline-1": true,
|
|
6
|
+
"spiffy-tw-text-[20px]": true,
|
|
7
|
+
"spiffy-tw-font-normal": true,
|
|
8
|
+
"spiffy-tw-leading-[120%]": true
|
|
9
|
+
},
|
|
10
|
+
["h2"]: {
|
|
11
|
+
"spiffy-headline": true,
|
|
12
|
+
"spiffy-headline-2": true,
|
|
13
|
+
"spiffy-tw-text-[16px]": true,
|
|
14
|
+
"spiffy-tw-font-normal": true,
|
|
15
|
+
"spiffy-tw-leading-[124%]": true
|
|
16
|
+
},
|
|
17
|
+
["h3"]: {
|
|
18
|
+
"spiffy-headline": true,
|
|
19
|
+
"spiffy-headline-3": true,
|
|
20
|
+
"spiffy-tw-text-[15px]": true,
|
|
21
|
+
"spiffy-tw-font-medium": true,
|
|
22
|
+
"spiffy-tw-leading-[124%]": true
|
|
23
|
+
},
|
|
24
|
+
["h4"]: {
|
|
25
|
+
"spiffy-headline": true,
|
|
26
|
+
"spiffy-headline-4": true,
|
|
27
|
+
"spiffy-tw-text-[14px]": true,
|
|
28
|
+
"spiffy-tw-font-medium": true,
|
|
29
|
+
"spiffy-tw-leading-[124%]": true
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const TypographyVariantMap = {
|
|
33
|
+
...TypographyDomVariantMap,
|
|
34
|
+
["t1"]: {
|
|
35
|
+
"spiffy-headline": true,
|
|
36
|
+
"spiffy-headline-1": true,
|
|
37
|
+
"spiffy-tw-text-[32px]": true,
|
|
38
|
+
"spiffy-tw-font-medium": true,
|
|
39
|
+
"spiffy-tw-leading-[124%]": true
|
|
40
|
+
},
|
|
41
|
+
["t2"]: {
|
|
42
|
+
"spiffy-headline": true,
|
|
43
|
+
"spiffy-headline-1": true,
|
|
44
|
+
"spiffy-tw-text-[16px]": true,
|
|
45
|
+
"spiffy-tw-font-medium": true,
|
|
46
|
+
"spiffy-tw-leading-[124%]": true
|
|
47
|
+
},
|
|
48
|
+
["t3"]: {
|
|
49
|
+
"spiffy-headline": true,
|
|
50
|
+
"spiffy-headline-1": true,
|
|
51
|
+
"spiffy-tw-text-[24px]": true,
|
|
52
|
+
"spiffy-tw-leading-[120%]": true
|
|
53
|
+
},
|
|
54
|
+
["body1"]: {
|
|
55
|
+
"spiffy-body-text": true,
|
|
56
|
+
"spiffy-body-1": true,
|
|
57
|
+
"spiffy-tw-text-[20px]": true,
|
|
58
|
+
"spiffy-tw-font-normal": true,
|
|
59
|
+
"spiffy-tw-line-height-[120%]": true
|
|
60
|
+
},
|
|
61
|
+
["body2"]: {
|
|
62
|
+
"spiffy-body-text": true,
|
|
63
|
+
"spiffy-body-2": true,
|
|
64
|
+
"spiffy-tw-text-[16px]": true,
|
|
65
|
+
"spiffy-tw-font-normal": true,
|
|
66
|
+
"spiffy-tw-line-height-[148%]": true
|
|
67
|
+
},
|
|
68
|
+
["body3"]: {
|
|
69
|
+
"spiffy-body-text": true,
|
|
70
|
+
"spiffy-body-3": true,
|
|
71
|
+
"spiffy-tw-text-sm": true,
|
|
72
|
+
"spiffy-tw-font-normal": true,
|
|
73
|
+
"spiffy-tw-leading-[140%]": true
|
|
74
|
+
},
|
|
75
|
+
["body4"]: {
|
|
76
|
+
"spiffy-body-text": true,
|
|
77
|
+
"spiffy-body-4": true,
|
|
78
|
+
"spiffy-tw-text-xs": true,
|
|
79
|
+
"spiffy-tw-font-medium": true,
|
|
80
|
+
"spiffy-tw-leading-[130%]": true
|
|
81
|
+
},
|
|
82
|
+
["body5"]: {
|
|
83
|
+
"spiffy-body-text": true,
|
|
84
|
+
"spiffy-body-5": true,
|
|
85
|
+
"spiffy-tw-text-[10px]": true,
|
|
86
|
+
"spiffy-tw-font-normal": true
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
|
|
90
|
+
if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
|
|
91
|
+
else acc[`${key}-placeholder`] = classes[key];
|
|
92
|
+
return acc;
|
|
93
|
+
}, {});
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
export { TypographyDomVariantMap, TypographyVariantMap, getVariantPlaceholderClassNames };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_typographyVariantClasses = require('./typographyVariantClasses.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../components/dist/components/Typography/util.js
|
|
4
|
+
const getElementTypeFromVariant = (variant, isHeadline) => {
|
|
5
|
+
if (isHeadline) return (require_typographyVariantClasses.TypographyDomVariantMap[variant] ? variant : null) || "h3";
|
|
6
|
+
return "span";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.getElementTypeFromVariant = getElementTypeFromVariant;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TypographyDomVariantMap } from "./typographyVariantClasses.js";
|
|
2
|
+
|
|
3
|
+
//#region ../components/dist/components/Typography/util.js
|
|
4
|
+
const getElementTypeFromVariant = (variant, isHeadline) => {
|
|
5
|
+
if (isHeadline) return (TypographyDomVariantMap[variant] ? variant : null) || "h3";
|
|
6
|
+
return "span";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { getElementTypeFromVariant };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../components/dist/logging/logger.js
|
|
3
|
+
var Logger = class {
|
|
4
|
+
static logInfo(message, ...args) {
|
|
5
|
+
console.info(`INFO: ${message}`, ...args);
|
|
6
|
+
}
|
|
7
|
+
static logDebug(message, ...args) {
|
|
8
|
+
console.debug(`DEBUG: ${message}`, ...args);
|
|
9
|
+
}
|
|
10
|
+
static logError(message, error, ...args) {
|
|
11
|
+
console.error(`ERROR: ${message} error=${error}`, args);
|
|
12
|
+
}
|
|
13
|
+
static logWarn(message, error, ...args) {
|
|
14
|
+
console.warn(`WARN: ${message} error=${error}`, args);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var logger_default = Logger;
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.logger_default = logger_default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region ../components/dist/logging/logger.js
|
|
2
|
+
var Logger = class {
|
|
3
|
+
static logInfo(message, ...args) {
|
|
4
|
+
console.info(`INFO: ${message}`, ...args);
|
|
5
|
+
}
|
|
6
|
+
static logDebug(message, ...args) {
|
|
7
|
+
console.debug(`DEBUG: ${message}`, ...args);
|
|
8
|
+
}
|
|
9
|
+
static logError(message, error, ...args) {
|
|
10
|
+
console.error(`ERROR: ${message} error=${error}`, args);
|
|
11
|
+
}
|
|
12
|
+
static logWarn(message, error, ...args) {
|
|
13
|
+
console.warn(`WARN: ${message} error=${error}`, args);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var logger_default = Logger;
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { logger_default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../components/dist/models/colorsConfig.js
|
|
3
|
+
var ColorNames = /* @__PURE__ */ function(ColorNames$1) {
|
|
4
|
+
ColorNames$1["TextPrimary"] = "text-primary";
|
|
5
|
+
ColorNames$1["TextSecondary"] = "text-secondary";
|
|
6
|
+
ColorNames$1["TextAccent"] = "text-accent";
|
|
7
|
+
ColorNames$1["TextLink"] = "text-link";
|
|
8
|
+
ColorNames$1["TextLight"] = "text-light";
|
|
9
|
+
ColorNames$1["BackgroundPrimary"] = "background-primary";
|
|
10
|
+
ColorNames$1["BackgroundSecondary"] = "background-secondary";
|
|
11
|
+
ColorNames$1["BackgroundSecondaryDark"] = "background-secondary-dark";
|
|
12
|
+
ColorNames$1["BackgroundTertiary"] = "background-tertiary";
|
|
13
|
+
ColorNames$1["BackgroundDark"] = "background-dark";
|
|
14
|
+
ColorNames$1["BackgroundLight"] = "background-light";
|
|
15
|
+
ColorNames$1["BackgroundSaturated"] = "background-saturated";
|
|
16
|
+
ColorNames$1["BorderLight"] = "border-light";
|
|
17
|
+
ColorNames$1["BorderMedium"] = "border-medium";
|
|
18
|
+
ColorNames$1["BorderDark"] = "border-dark";
|
|
19
|
+
ColorNames$1["BorderOutline"] = "border-outline";
|
|
20
|
+
ColorNames$1["AccentPrimary"] = "accent-primary";
|
|
21
|
+
ColorNames$1["AccentSecondary"] = "accent-secondary";
|
|
22
|
+
return ColorNames$1;
|
|
23
|
+
}(ColorNames || {});
|
|
24
|
+
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.ColorNames = ColorNames;
|
|
28
|
+
exports.colorVar = colorVar;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region ../components/dist/models/colorsConfig.js
|
|
2
|
+
var ColorNames = /* @__PURE__ */ function(ColorNames$1) {
|
|
3
|
+
ColorNames$1["TextPrimary"] = "text-primary";
|
|
4
|
+
ColorNames$1["TextSecondary"] = "text-secondary";
|
|
5
|
+
ColorNames$1["TextAccent"] = "text-accent";
|
|
6
|
+
ColorNames$1["TextLink"] = "text-link";
|
|
7
|
+
ColorNames$1["TextLight"] = "text-light";
|
|
8
|
+
ColorNames$1["BackgroundPrimary"] = "background-primary";
|
|
9
|
+
ColorNames$1["BackgroundSecondary"] = "background-secondary";
|
|
10
|
+
ColorNames$1["BackgroundSecondaryDark"] = "background-secondary-dark";
|
|
11
|
+
ColorNames$1["BackgroundTertiary"] = "background-tertiary";
|
|
12
|
+
ColorNames$1["BackgroundDark"] = "background-dark";
|
|
13
|
+
ColorNames$1["BackgroundLight"] = "background-light";
|
|
14
|
+
ColorNames$1["BackgroundSaturated"] = "background-saturated";
|
|
15
|
+
ColorNames$1["BorderLight"] = "border-light";
|
|
16
|
+
ColorNames$1["BorderMedium"] = "border-medium";
|
|
17
|
+
ColorNames$1["BorderDark"] = "border-dark";
|
|
18
|
+
ColorNames$1["BorderOutline"] = "border-outline";
|
|
19
|
+
ColorNames$1["AccentPrimary"] = "accent-primary";
|
|
20
|
+
ColorNames$1["AccentSecondary"] = "accent-secondary";
|
|
21
|
+
return ColorNames$1;
|
|
22
|
+
}(ColorNames || {});
|
|
23
|
+
const colorVar = (color) => `var(--spiffy-colors-${color})`;
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ColorNames, colorVar };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../components/dist/util/formatPrice.js
|
|
3
|
+
const formatPrice = (price, currency = "$") => {
|
|
4
|
+
if (price == null) return "";
|
|
5
|
+
const options = {};
|
|
6
|
+
if (!Number.isInteger(price)) {
|
|
7
|
+
options.minimumFractionDigits = 2;
|
|
8
|
+
options.maximumFractionDigits = 2;
|
|
9
|
+
}
|
|
10
|
+
return `${currency}${price.toLocaleString("en-US", options)}`;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.formatPrice = formatPrice;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region ../components/dist/util/formatPrice.js
|
|
2
|
+
const formatPrice = (price, currency = "$") => {
|
|
3
|
+
if (price == null) return "";
|
|
4
|
+
const options = {};
|
|
5
|
+
if (!Number.isInteger(price)) {
|
|
6
|
+
options.minimumFractionDigits = 2;
|
|
7
|
+
options.maximumFractionDigits = 2;
|
|
8
|
+
}
|
|
9
|
+
return `${currency}${price.toLocaleString("en-US", options)}`;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { formatPrice };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let react = require("react");
|
|
3
|
+
|
|
4
|
+
//#region ../components/dist/util/useScrollDirection.js
|
|
5
|
+
const useScrollDirection = (scrollContainerRef) => {
|
|
6
|
+
const [scrollDirection, setScrollDirection] = (0, react.useState)(null);
|
|
7
|
+
const touchStartY = (0, react.useRef)(0);
|
|
8
|
+
(0, react.useEffect)(() => {
|
|
9
|
+
const container = scrollContainerRef?.current || window;
|
|
10
|
+
const touchTarget = scrollContainerRef?.current || document;
|
|
11
|
+
const handleWheel = (e) => {
|
|
12
|
+
if (e.deltaY > 0) setScrollDirection("down");
|
|
13
|
+
else setScrollDirection("up");
|
|
14
|
+
};
|
|
15
|
+
const handleTouchStart = (e) => {
|
|
16
|
+
touchStartY.current = e.touches[0].clientY;
|
|
17
|
+
};
|
|
18
|
+
const handleTouchMove = (e) => {
|
|
19
|
+
const currentTouchY = e.touches[0].clientY;
|
|
20
|
+
const deltaY = touchStartY.current - currentTouchY;
|
|
21
|
+
if (Math.abs(deltaY) < 10) return;
|
|
22
|
+
if (deltaY > 0) setScrollDirection("down");
|
|
23
|
+
else setScrollDirection("up");
|
|
24
|
+
touchStartY.current = currentTouchY;
|
|
25
|
+
};
|
|
26
|
+
container.addEventListener("wheel", handleWheel, { passive: true });
|
|
27
|
+
touchTarget.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
28
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
29
|
+
return () => {
|
|
30
|
+
container.removeEventListener("wheel", handleWheel);
|
|
31
|
+
touchTarget.removeEventListener("touchstart", handleTouchStart);
|
|
32
|
+
touchTarget.removeEventListener("touchmove", handleTouchMove);
|
|
33
|
+
};
|
|
34
|
+
}, [scrollContainerRef]);
|
|
35
|
+
return scrollDirection;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.useScrollDirection = useScrollDirection;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
//#region ../components/dist/util/useScrollDirection.js
|
|
4
|
+
const useScrollDirection = (scrollContainerRef) => {
|
|
5
|
+
const [scrollDirection, setScrollDirection] = useState(null);
|
|
6
|
+
const touchStartY = useRef(0);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const container = scrollContainerRef?.current || window;
|
|
9
|
+
const touchTarget = scrollContainerRef?.current || document;
|
|
10
|
+
const handleWheel = (e) => {
|
|
11
|
+
if (e.deltaY > 0) setScrollDirection("down");
|
|
12
|
+
else setScrollDirection("up");
|
|
13
|
+
};
|
|
14
|
+
const handleTouchStart = (e) => {
|
|
15
|
+
touchStartY.current = e.touches[0].clientY;
|
|
16
|
+
};
|
|
17
|
+
const handleTouchMove = (e) => {
|
|
18
|
+
const currentTouchY = e.touches[0].clientY;
|
|
19
|
+
const deltaY = touchStartY.current - currentTouchY;
|
|
20
|
+
if (Math.abs(deltaY) < 10) return;
|
|
21
|
+
if (deltaY > 0) setScrollDirection("down");
|
|
22
|
+
else setScrollDirection("up");
|
|
23
|
+
touchStartY.current = currentTouchY;
|
|
24
|
+
};
|
|
25
|
+
container.addEventListener("wheel", handleWheel, { passive: true });
|
|
26
|
+
touchTarget.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
27
|
+
touchTarget.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
28
|
+
return () => {
|
|
29
|
+
container.removeEventListener("wheel", handleWheel);
|
|
30
|
+
touchTarget.removeEventListener("touchstart", handleTouchStart);
|
|
31
|
+
touchTarget.removeEventListener("touchmove", handleTouchMove);
|
|
32
|
+
};
|
|
33
|
+
}, [scrollContainerRef]);
|
|
34
|
+
return scrollDirection;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { useScrollDirection };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_useScrollDirection = require('./useScrollDirection.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
|
|
5
|
+
//#region ../components/dist/util/useStickyVisibility.js
|
|
6
|
+
const useStickyVisibility = () => {
|
|
7
|
+
const [isVisible, setIsVisible] = (0, react.useState)(true);
|
|
8
|
+
const toolbarRef = (0, react.useRef)(null);
|
|
9
|
+
const [toolbarHeight, setToolbarHeight] = (0, react.useState)(0);
|
|
10
|
+
const [scrollY, setScrollY] = (0, react.useState)(0);
|
|
11
|
+
const scrollDirection = require_useScrollDirection.useScrollDirection();
|
|
12
|
+
(0, react.useEffect)(() => {
|
|
13
|
+
const handleScroll = () => {
|
|
14
|
+
setScrollY(window.scrollY);
|
|
15
|
+
};
|
|
16
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
17
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
18
|
+
}, []);
|
|
19
|
+
(0, react.useEffect)(() => {
|
|
20
|
+
if (toolbarRef.current) setToolbarHeight(toolbarRef.current.offsetHeight);
|
|
21
|
+
}, []);
|
|
22
|
+
(0, react.useEffect)(() => {
|
|
23
|
+
if (scrollDirection === "down" && scrollY > toolbarHeight && toolbarHeight > 0) setIsVisible(false);
|
|
24
|
+
else setIsVisible(true);
|
|
25
|
+
}, [
|
|
26
|
+
scrollDirection,
|
|
27
|
+
toolbarHeight,
|
|
28
|
+
scrollY
|
|
29
|
+
]);
|
|
30
|
+
return {
|
|
31
|
+
toolbarRef,
|
|
32
|
+
isVisible,
|
|
33
|
+
toolbarHeight
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.useStickyVisibility = useStickyVisibility;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useScrollDirection } from "./useScrollDirection.js";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
|
|
4
|
+
//#region ../components/dist/util/useStickyVisibility.js
|
|
5
|
+
const useStickyVisibility = () => {
|
|
6
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
7
|
+
const toolbarRef = useRef(null);
|
|
8
|
+
const [toolbarHeight, setToolbarHeight] = useState(0);
|
|
9
|
+
const [scrollY, setScrollY] = useState(0);
|
|
10
|
+
const scrollDirection = useScrollDirection();
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const handleScroll = () => {
|
|
13
|
+
setScrollY(window.scrollY);
|
|
14
|
+
};
|
|
15
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
16
|
+
return () => window.removeEventListener("scroll", handleScroll);
|
|
17
|
+
}, []);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (toolbarRef.current) setToolbarHeight(toolbarRef.current.offsetHeight);
|
|
20
|
+
}, []);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (scrollDirection === "down" && scrollY > toolbarHeight && toolbarHeight > 0) setIsVisible(false);
|
|
23
|
+
else setIsVisible(true);
|
|
24
|
+
}, [
|
|
25
|
+
scrollDirection,
|
|
26
|
+
toolbarHeight,
|
|
27
|
+
scrollY
|
|
28
|
+
]);
|
|
29
|
+
return {
|
|
30
|
+
toolbarRef,
|
|
31
|
+
isVisible,
|
|
32
|
+
toolbarHeight
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useStickyVisibility };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_jsx_runtime$1 = require('./node_modules/react/jsx-runtime.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../icons/dist/AiSearchBold.js
|
|
5
|
+
var import_jsx_runtime = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_jsx_runtime$1.require_jsx_runtime());
|
|
6
|
+
const SvgAiSearchBold = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
|
|
7
|
+
width: 32,
|
|
8
|
+
height: 32,
|
|
9
|
+
viewBox: "0 0 32 32",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
15
|
+
d: "M25.3445 3.27148L26.448 6.14076C26.6275 6.60736 26.7172 6.84066 26.8568 7.0369C26.9804 7.21083 27.1324 7.36279 27.3063 7.48646C27.5026 7.626 27.7359 7.71573 28.2025 7.89519L31.0717 8.99876L28.2025 10.1023C27.7359 10.2818 27.5026 10.3715 27.3063 10.5111C27.1324 10.6347 26.9804 10.7867 26.8568 10.9606C26.7172 11.1569 26.6275 11.3902 26.448 11.8568L25.3445 14.726L24.2409 11.8568C24.0614 11.3902 23.9717 11.1569 23.8322 10.9606C23.7085 10.7867 23.5565 10.6347 23.3826 10.5111C23.1864 10.3715 22.9531 10.2818 22.4865 10.1023L19.6172 8.99876L22.4865 7.89519C22.9531 7.71573 23.1864 7.626 23.3826 7.48646C23.5565 7.36279 23.7085 7.21083 23.8322 7.0369C23.9717 6.84066 24.0614 6.60736 24.2409 6.14076L25.3445 3.27148Z",
|
|
16
|
+
fill: "#AB1212",
|
|
17
|
+
stroke: "#AB1212",
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round"
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
22
|
+
d: "M18.8072 5.46891C17.3865 4.5308 15.6938 3.96698 13.8663 3.92165C8.67511 3.79287 4.3624 7.89679 4.23363 13.088C4.10485 18.2792 8.20877 22.592 13.4 22.7207C17.8631 22.8314 21.6768 19.8136 22.7407 15.6659",
|
|
23
|
+
stroke: "#111111",
|
|
24
|
+
strokeWidth: 2,
|
|
25
|
+
strokeLinecap: "round"
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
28
|
+
d: "M19.312 21.2498L24.1245 26.4999",
|
|
29
|
+
stroke: "#111111",
|
|
30
|
+
strokeWidth: 2,
|
|
31
|
+
strokeLinecap: "round"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
var AiSearchBold_default = SvgAiSearchBold;
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.AiSearchBold_default = AiSearchBold_default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __toESM } from "./_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_jsx_runtime } from "./node_modules/react/jsx-runtime.js";
|
|
3
|
+
|
|
4
|
+
//#region ../icons/dist/AiSearchBold.js
|
|
5
|
+
var import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime());
|
|
6
|
+
const SvgAiSearchBold = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
|
|
7
|
+
width: 32,
|
|
8
|
+
height: 32,
|
|
9
|
+
viewBox: "0 0 32 32",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
...props,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
15
|
+
d: "M25.3445 3.27148L26.448 6.14076C26.6275 6.60736 26.7172 6.84066 26.8568 7.0369C26.9804 7.21083 27.1324 7.36279 27.3063 7.48646C27.5026 7.626 27.7359 7.71573 28.2025 7.89519L31.0717 8.99876L28.2025 10.1023C27.7359 10.2818 27.5026 10.3715 27.3063 10.5111C27.1324 10.6347 26.9804 10.7867 26.8568 10.9606C26.7172 11.1569 26.6275 11.3902 26.448 11.8568L25.3445 14.726L24.2409 11.8568C24.0614 11.3902 23.9717 11.1569 23.8322 10.9606C23.7085 10.7867 23.5565 10.6347 23.3826 10.5111C23.1864 10.3715 22.9531 10.2818 22.4865 10.1023L19.6172 8.99876L22.4865 7.89519C22.9531 7.71573 23.1864 7.626 23.3826 7.48646C23.5565 7.36279 23.7085 7.21083 23.8322 7.0369C23.9717 6.84066 24.0614 6.60736 24.2409 6.14076L25.3445 3.27148Z",
|
|
16
|
+
fill: "#AB1212",
|
|
17
|
+
stroke: "#AB1212",
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round"
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
22
|
+
d: "M18.8072 5.46891C17.3865 4.5308 15.6938 3.96698 13.8663 3.92165C8.67511 3.79287 4.3624 7.89679 4.23363 13.088C4.10485 18.2792 8.20877 22.592 13.4 22.7207C17.8631 22.8314 21.6768 19.8136 22.7407 15.6659",
|
|
23
|
+
stroke: "#111111",
|
|
24
|
+
strokeWidth: 2,
|
|
25
|
+
strokeLinecap: "round"
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
28
|
+
d: "M19.312 21.2498L24.1245 26.4999",
|
|
29
|
+
stroke: "#111111",
|
|
30
|
+
strokeWidth: 2,
|
|
31
|
+
strokeLinecap: "round"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
var AiSearchBold_default = SvgAiSearchBold;
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
38
|
+
export { AiSearchBold_default };
|