@seekora-ai/ui-sdk-react 0.2.11 → 0.2.13
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/components/InfiniteHits.d.ts +2 -0
- package/dist/components/InfiniteHits.d.ts.map +1 -1
- package/dist/components/InfiniteHits.js +6 -3
- package/dist/components/QuerySuggestions.d.ts +2 -0
- package/dist/components/QuerySuggestions.d.ts.map +1 -1
- package/dist/components/QuerySuggestions.js +4 -3
- package/dist/components/QuerySuggestionsDropdown.d.ts +1 -1
- package/dist/components/QuerySuggestionsDropdown.d.ts.map +1 -1
- package/dist/components/QuerySuggestionsDropdown.js +4 -4
- package/dist/components/Recommendations.d.ts +6 -0
- package/dist/components/Recommendations.d.ts.map +1 -1
- package/dist/components/Recommendations.js +12 -6
- package/dist/components/RichQuerySuggestions.d.ts +4 -0
- package/dist/components/RichQuerySuggestions.d.ts.map +1 -1
- package/dist/components/RichQuerySuggestions.js +2 -3
- package/dist/components/SearchBar.d.ts +2 -0
- package/dist/components/SearchBar.d.ts.map +1 -1
- package/dist/components/SearchBar.js +5 -9
- package/dist/components/SearchResults.d.ts +2 -0
- package/dist/components/SearchResults.d.ts.map +1 -1
- package/dist/components/SearchResults.js +4 -2
- package/dist/components/primitives/ActionButtons.d.ts +27 -0
- package/dist/components/primitives/ActionButtons.d.ts.map +1 -0
- package/dist/components/primitives/ActionButtons.js +78 -0
- package/dist/components/primitives/AnalyticsProvider.d.ts +22 -0
- package/dist/components/primitives/AnalyticsProvider.d.ts.map +1 -0
- package/dist/components/primitives/AnalyticsProvider.js +87 -0
- package/dist/components/primitives/BadgeList.d.ts +14 -0
- package/dist/components/primitives/BadgeList.d.ts.map +1 -0
- package/dist/components/primitives/BadgeList.js +45 -0
- package/dist/components/primitives/ImageDisplay.d.ts +10 -1
- package/dist/components/primitives/ImageDisplay.d.ts.map +1 -1
- package/dist/components/primitives/ImageDisplay.js +49 -9
- package/dist/components/primitives/ImageZoom.d.ts +33 -0
- package/dist/components/primitives/ImageZoom.d.ts.map +1 -0
- package/dist/components/primitives/ImageZoom.js +357 -0
- package/dist/components/primitives/PriceDisplay.d.ts +21 -0
- package/dist/components/primitives/PriceDisplay.d.ts.map +1 -0
- package/dist/components/primitives/PriceDisplay.js +44 -0
- package/dist/components/primitives/RatingDisplay.d.ts +43 -0
- package/dist/components/primitives/RatingDisplay.d.ts.map +1 -0
- package/dist/components/primitives/RatingDisplay.js +114 -0
- package/dist/components/primitives/VariantSelector.d.ts +30 -0
- package/dist/components/primitives/VariantSelector.d.ts.map +1 -0
- package/dist/components/primitives/VariantSelector.js +162 -0
- package/dist/components/primitives/VariantSwatches.d.ts +28 -0
- package/dist/components/primitives/VariantSwatches.d.ts.map +1 -0
- package/dist/components/primitives/VariantSwatches.js +173 -0
- package/dist/components/primitives/index.d.ts +9 -0
- package/dist/components/primitives/index.d.ts.map +1 -1
- package/dist/components/primitives/index.js +9 -0
- package/dist/components/primitives/withAnalytics.d.ts +24 -0
- package/dist/components/primitives/withAnalytics.d.ts.map +1 -0
- package/dist/components/primitives/withAnalytics.js +73 -0
- package/dist/components/product-page/ProductInfo.d.ts +25 -2
- package/dist/components/product-page/ProductInfo.d.ts.map +1 -1
- package/dist/components/product-page/ProductInfo.js +20 -5
- package/dist/components/section-primitives/SectionItemGrid.d.ts +3 -1
- package/dist/components/section-primitives/SectionItemGrid.d.ts.map +1 -1
- package/dist/components/section-primitives/SectionItemGrid.js +3 -2
- package/dist/components/suggestions/AmazonDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/AmazonDropdown.js +2 -2
- package/dist/components/suggestions/GoogleDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/GoogleDropdown.js +2 -2
- package/dist/components/suggestions/MinimalDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/MinimalDropdown.js +2 -2
- package/dist/components/suggestions/MobileSheetDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/MobileSheetDropdown.js +2 -2
- package/dist/components/suggestions/PinterestDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/PinterestDropdown.js +2 -2
- package/dist/components/suggestions/ShopifyDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/ShopifyDropdown.js +2 -2
- package/dist/components/suggestions/SpotlightDropdown.d.ts.map +1 -1
- package/dist/components/suggestions/SpotlightDropdown.js +2 -2
- package/dist/components/suggestions/SuggestionSearchBar.d.ts.map +1 -1
- package/dist/components/suggestions/SuggestionSearchBar.js +1 -0
- package/dist/components/suggestions/types.d.ts +26 -0
- package/dist/components/suggestions/types.d.ts.map +1 -1
- package/dist/components/suggestions/utils.d.ts +37 -0
- package/dist/components/suggestions/utils.d.ts.map +1 -1
- package/dist/components/suggestions/utils.js +118 -0
- package/dist/components/suggestions-primitives/ItemCard.d.ts +10 -1
- package/dist/components/suggestions-primitives/ItemCard.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/ItemCard.js +20 -6
- package/dist/components/suggestions-primitives/ProductCard.d.ts +27 -3
- package/dist/components/suggestions-primitives/ProductCard.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/ProductCard.js +124 -17
- package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts +44 -0
- package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/ProductCardLayouts.js +105 -0
- package/dist/components/suggestions-primitives/ProductGrid.d.ts +6 -1
- package/dist/components/suggestions-primitives/ProductGrid.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/ProductGrid.js +2 -2
- package/dist/components/suggestions-primitives/SuggestionList.d.ts +8 -1
- package/dist/components/suggestions-primitives/SuggestionList.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/SuggestionList.js +7 -4
- package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.js +0 -2
- package/dist/docsearch/components/Results.d.ts +3 -1
- package/dist/docsearch/components/Results.d.ts.map +1 -1
- package/dist/docsearch/components/Results.js +6 -2
- package/dist/hooks/useProductAnalytics.d.ts +49 -0
- package/dist/hooks/useProductAnalytics.d.ts.map +1 -0
- package/dist/hooks/useProductAnalytics.js +116 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.js +2 -1
- package/dist/hooks/useSuggestionsAnalytics.d.ts.map +1 -1
- package/dist/hooks/useSuggestionsAnalytics.js +6 -0
- package/dist/hooks/useVariantSelection.d.ts +28 -0
- package/dist/hooks/useVariantSelection.d.ts.map +1 -0
- package/dist/hooks/useVariantSelection.js +44 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.umd.js +1 -1
- package/dist/src/index.d.ts +1138 -681
- package/dist/src/index.esm.js +2407 -723
- package/dist/src/index.esm.js.map +1 -1
- package/dist/src/index.js +2423 -722
- package/dist/src/index.js.map +1 -1
- package/package.json +3 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, CSSProperties } from 'react';
|
|
3
3
|
import { SearchOptions, SearchResponse, SeekoraClient, SearchContext, DataTypesEventPayload, ExtendedEventPayload } from '@seekora-ai/search-sdk';
|
|
4
4
|
import * as _seekora_ai_ui_sdk_types from '@seekora-ai/ui-sdk-types';
|
|
5
|
-
import { ResultItem, ViewMode, FieldMapping, ThemeConfig, Theme, QuerySuggestionsEventHandlers, HighlightConfig, KeyboardNavConfig, AnimationConfig, QuerySuggestionsClassNames, SuggestionItem as SuggestionItem$3, RecentSearch, DropdownSectionConfig, SuggestionCategory, TrendingSearch, ProductItem, PopularBrand, FilteredTab, QuerySuggestionsVariant, QuerySuggestionsResponse, DropdownRecommendations, TopSearch, RelatedSearch } from '@seekora-ai/ui-sdk-types';
|
|
6
|
-
export { FieldMapping, ResultItem, Theme, ThemeConfig, ViewMode } from '@seekora-ai/ui-sdk-types';
|
|
5
|
+
import { ResultItem, ViewMode, FieldMapping, ThemeConfig, Theme, QuerySuggestionsEventHandlers, HighlightConfig, KeyboardNavConfig, AnimationConfig, QuerySuggestionsClassNames, SuggestionItem as SuggestionItem$3, RecentSearch, DropdownSectionConfig, SuggestionCategory, TrendingSearch, ProductItem, PopularBrand, FilteredTab, QuerySuggestionsVariant, QuerySuggestionsResponse, DropdownRecommendations, TopSearch, RelatedSearch, PriceRange, ProductBadge, ProductOption, ProductVariant } from '@seekora-ai/ui-sdk-types';
|
|
6
|
+
export { FieldMapping, PriceRange, ProductBadge, ProductOption, ProductVariant, ResultItem, Theme, ThemeConfig, ViewMode } from '@seekora-ai/ui-sdk-types';
|
|
7
7
|
import { SearchStateManagerConfig, SearchStateManager, HighlightPart, SearchState } from '@seekora-ai/ui-sdk-core';
|
|
8
8
|
export { Fingerprint, FingerprintComponents, FingerprintConfig, FingerprintResult, getFingerprint, mergeThemes } from '@seekora-ai/ui-sdk-core';
|
|
9
9
|
|
|
@@ -41,6 +41,8 @@ interface SearchBarProps {
|
|
|
41
41
|
className?: string;
|
|
42
42
|
style?: React__default.CSSProperties;
|
|
43
43
|
theme?: SearchBarTheme;
|
|
44
|
+
/** Show loading state when fetching and no previous suggestions (default false: show previous results until new render) */
|
|
45
|
+
showLoadingState?: boolean;
|
|
44
46
|
renderSuggestion?: (suggestion: string, index: number) => React__default.ReactNode;
|
|
45
47
|
renderLoading?: () => React__default.ReactNode;
|
|
46
48
|
}
|
|
@@ -75,6 +77,8 @@ interface SearchResultsProps {
|
|
|
75
77
|
onResultClick?: (result: ResultItem, index: number) => void;
|
|
76
78
|
renderResult?: (result: ResultItem, index: number, isActive?: boolean) => React__default.ReactNode;
|
|
77
79
|
renderEmpty?: () => React__default.ReactNode;
|
|
80
|
+
/** Show loading state when fetching and no previous results (default false: show previous results until new render) */
|
|
81
|
+
showLoadingState?: boolean;
|
|
78
82
|
renderLoading?: () => React__default.ReactNode;
|
|
79
83
|
renderError?: (error: Error) => React__default.ReactNode;
|
|
80
84
|
className?: string;
|
|
@@ -533,6 +537,8 @@ interface InfiniteHitsProps {
|
|
|
533
537
|
renderHit?: (hit: ResultItem, index: number) => React__default.ReactNode;
|
|
534
538
|
/** Custom render for empty state */
|
|
535
539
|
renderEmpty?: () => React__default.ReactNode;
|
|
540
|
+
/** Show initial loading when fetching and no hits yet (default false: no loading screen) */
|
|
541
|
+
showInitialLoading?: boolean;
|
|
536
542
|
/** Custom render for loading state */
|
|
537
543
|
renderLoading?: () => React__default.ReactNode;
|
|
538
544
|
/** Custom render for "Show More" button */
|
|
@@ -888,6 +894,8 @@ interface RelatedProductsProps extends BaseRecommendationProps {
|
|
|
888
894
|
items?: RecommendationItem[];
|
|
889
895
|
/** Loading state */
|
|
890
896
|
loading?: boolean;
|
|
897
|
+
/** Show loading state when fetching and no previous items (default false: show previous results until new render) */
|
|
898
|
+
showLoadingState?: boolean;
|
|
891
899
|
}
|
|
892
900
|
declare const RelatedProducts: React__default.FC<RelatedProductsProps>;
|
|
893
901
|
interface TrendingItemsProps extends BaseRecommendationProps {
|
|
@@ -895,6 +903,8 @@ interface TrendingItemsProps extends BaseRecommendationProps {
|
|
|
895
903
|
items?: RecommendationItem[];
|
|
896
904
|
/** Loading state */
|
|
897
905
|
loading?: boolean;
|
|
906
|
+
/** Show loading state when fetching and no previous items (default false: show previous results until new render) */
|
|
907
|
+
showLoadingState?: boolean;
|
|
898
908
|
/** Facet name for trending (if using facet data) */
|
|
899
909
|
facetName?: string;
|
|
900
910
|
}
|
|
@@ -906,6 +916,8 @@ interface FrequentlyBoughtTogetherProps extends BaseRecommendationProps {
|
|
|
906
916
|
items?: RecommendationItem[];
|
|
907
917
|
/** Loading state */
|
|
908
918
|
loading?: boolean;
|
|
919
|
+
/** Show loading state when fetching and no previous items (default false: show previous results until new render) */
|
|
920
|
+
showLoadingState?: boolean;
|
|
909
921
|
/** Show "Add all to cart" button */
|
|
910
922
|
showAddAllButton?: boolean;
|
|
911
923
|
/** Callback when "Add all" is clicked */
|
|
@@ -952,6 +964,8 @@ interface QuerySuggestionsProps {
|
|
|
952
964
|
minQueryLength?: number;
|
|
953
965
|
onSuggestionClick?: (suggestion: string) => void;
|
|
954
966
|
renderSuggestion?: (suggestion: SuggestionItem$2, index: number) => React__default.ReactNode;
|
|
967
|
+
/** Show loading state when fetching and no previous suggestions (default false: show previous results until new render) */
|
|
968
|
+
showLoadingState?: boolean;
|
|
955
969
|
renderLoading?: () => React__default.ReactNode;
|
|
956
970
|
renderEmpty?: () => React__default.ReactNode;
|
|
957
971
|
showTitle?: boolean;
|
|
@@ -991,7 +1005,7 @@ interface QuerySuggestionsDropdownProps extends QuerySuggestionsEventHandlers {
|
|
|
991
1005
|
maxRecentSearches?: number;
|
|
992
1006
|
/** Show suggestion counts */
|
|
993
1007
|
showCounts?: boolean;
|
|
994
|
-
/** Show loading state */
|
|
1008
|
+
/** Show loading state (default false: show previous results until new results render) */
|
|
995
1009
|
showLoading?: boolean;
|
|
996
1010
|
/** Show empty state when no results */
|
|
997
1011
|
showEmptyState?: boolean;
|
|
@@ -1104,6 +1118,10 @@ interface RichQuerySuggestionsProps extends QuerySuggestionsEventHandlers {
|
|
|
1104
1118
|
header?: React__default.ReactNode;
|
|
1105
1119
|
/** Custom footer content */
|
|
1106
1120
|
footer?: React__default.ReactNode;
|
|
1121
|
+
/** Show loading overlay when fetching (default false: show previous results until new results render) */
|
|
1122
|
+
showLoadingOverlay?: boolean;
|
|
1123
|
+
/** Custom render for loading overlay (only when showLoadingOverlay is true) */
|
|
1124
|
+
renderLoading?: () => React__default.ReactNode;
|
|
1107
1125
|
/** Dropdown width */
|
|
1108
1126
|
width?: string | number;
|
|
1109
1127
|
/** Dropdown max height */
|
|
@@ -1586,6 +1604,13 @@ interface SuggestionListProps {
|
|
|
1586
1604
|
className?: string;
|
|
1587
1605
|
style?: React__default.CSSProperties;
|
|
1588
1606
|
listClassName?: string;
|
|
1607
|
+
/**
|
|
1608
|
+
* When true, show a loading state when fetching and no previous suggestions exist.
|
|
1609
|
+
* When false (default), show previous results until new results render; no loading screen.
|
|
1610
|
+
*/
|
|
1611
|
+
showLoadingState?: boolean;
|
|
1612
|
+
/** Custom render for loading state (only when showLoadingState is true and loading with no items). */
|
|
1613
|
+
renderLoading?: () => React__default.ReactNode;
|
|
1589
1614
|
/**
|
|
1590
1615
|
* When true (default), suggestion text with <mark>...</mark> is rendered
|
|
1591
1616
|
* with those segments highlighted. When false, plain text is shown.
|
|
@@ -1596,7 +1621,7 @@ interface SuggestionListProps {
|
|
|
1596
1621
|
highlightMarkupOptions?: HighlightMarkupOptions;
|
|
1597
1622
|
renderItem?: (suggestion: _seekora_ai_ui_sdk_types.SuggestionItem, index: number, isActive: boolean, onSelect: () => void) => React__default.ReactNode;
|
|
1598
1623
|
}
|
|
1599
|
-
declare function SuggestionList({ maxItems, className, style, listClassName, enableHighlightMarkup, highlightMarkupOptions, renderItem, }: SuggestionListProps): React__default.JSX.Element | null;
|
|
1624
|
+
declare function SuggestionList({ maxItems, className, style, listClassName, showLoadingState, renderLoading, enableHighlightMarkup, highlightMarkupOptions, renderItem, }: SuggestionListProps): React__default.JSX.Element | null;
|
|
1600
1625
|
|
|
1601
1626
|
/**
|
|
1602
1627
|
* SuggestionItem – single text suggestion row (primitive)
|
|
@@ -1627,6 +1652,33 @@ interface SuggestionItemProps {
|
|
|
1627
1652
|
}
|
|
1628
1653
|
declare function SuggestionItem$1({ suggestion, index, isActive, onSelect, className, style, enableHighlightMarkup, highlightMarkupOptions, renderHighlight, }: SuggestionItemProps): React__default.JSX.Element;
|
|
1629
1654
|
|
|
1655
|
+
/**
|
|
1656
|
+
* ActionButtons – card action buttons (add to cart, wishlist, buy now, quick view)
|
|
1657
|
+
*
|
|
1658
|
+
* Renders a set of action buttons for product cards. Can be positioned absolutely
|
|
1659
|
+
* over the image (on hover) or inline below the card content.
|
|
1660
|
+
*/
|
|
1661
|
+
|
|
1662
|
+
type ActionButtonType = 'addToCart' | 'wishlist' | 'buyNow' | 'quickView' | 'compare';
|
|
1663
|
+
interface ActionButton {
|
|
1664
|
+
type: ActionButtonType;
|
|
1665
|
+
label?: string;
|
|
1666
|
+
icon?: React__default.ReactNode;
|
|
1667
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
1668
|
+
disabled?: boolean;
|
|
1669
|
+
loading?: boolean;
|
|
1670
|
+
}
|
|
1671
|
+
interface ActionButtonsProps {
|
|
1672
|
+
buttons: ActionButton[];
|
|
1673
|
+
layout?: 'horizontal' | 'vertical' | 'overlay';
|
|
1674
|
+
position?: 'top-right' | 'bottom-center' | 'inline';
|
|
1675
|
+
showLabels?: boolean;
|
|
1676
|
+
size?: 'small' | 'medium' | 'large';
|
|
1677
|
+
className?: string;
|
|
1678
|
+
style?: React__default.CSSProperties;
|
|
1679
|
+
}
|
|
1680
|
+
declare function ActionButtons({ buttons, layout, position, showLabels, size, className, style, }: ActionButtonsProps): React__default.JSX.Element;
|
|
1681
|
+
|
|
1630
1682
|
/**
|
|
1631
1683
|
* ItemCard – generic item tile (primitive)
|
|
1632
1684
|
*
|
|
@@ -1663,8 +1715,16 @@ interface ItemCardProps {
|
|
|
1663
1715
|
asLink?: boolean;
|
|
1664
1716
|
/** When multiple images, use ImageDisplay with this variant */
|
|
1665
1717
|
imageVariant?: ImageDisplayVariant$1;
|
|
1718
|
+
/** Layout direction: vertical (default) or horizontal (image left, content right) */
|
|
1719
|
+
layout?: 'vertical' | 'horizontal';
|
|
1720
|
+
/** Action buttons (add to cart, wishlist, etc.) */
|
|
1721
|
+
actionButtons?: ActionButton[];
|
|
1722
|
+
/** Action buttons position */
|
|
1723
|
+
actionButtonsPosition?: 'overlay-top-right' | 'overlay-bottom' | 'inline';
|
|
1724
|
+
/** Show action button labels */
|
|
1725
|
+
showActionLabels?: boolean;
|
|
1666
1726
|
}
|
|
1667
|
-
declare function ItemCard({ item, position, onSelect, className, style, asLink, imageVariant, }: ItemCardProps): React__default.JSX.Element;
|
|
1727
|
+
declare function ItemCard({ item, position, onSelect, className, style, asLink, imageVariant, layout, actionButtons, actionButtonsPosition, showActionLabels, }: ItemCardProps): React__default.JSX.Element;
|
|
1668
1728
|
|
|
1669
1729
|
/**
|
|
1670
1730
|
* ItemGrid – generic grid of items (primitive)
|
|
@@ -1693,770 +1753,1055 @@ interface ItemGridProps<T = GenericItem> {
|
|
|
1693
1753
|
}
|
|
1694
1754
|
declare function ItemGrid<T = GenericItem>({ items, onItemClick, getItemId, getItemTitle, getItemImage, getItemDescription, getItemUrl, renderItem, maxItems, columns, className, style, gridClassName, }: ItemGridProps<T>): React__default.JSX.Element | null;
|
|
1695
1755
|
|
|
1696
|
-
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
className?: string;
|
|
1711
|
-
style?: React__default.CSSProperties;
|
|
1712
|
-
imageVariant?: ProductCardImageVariant;
|
|
1756
|
+
/** Maps client's data fields to component expected fields */
|
|
1757
|
+
interface SuggestionFieldMapping {
|
|
1758
|
+
/** Field path for suggestion text (e.g., "query", "searchTerm", "text") */
|
|
1759
|
+
query: string;
|
|
1760
|
+
/** Field path for suggestion count/popularity */
|
|
1761
|
+
count?: string;
|
|
1762
|
+
/** Field path for object ID */
|
|
1763
|
+
id?: string;
|
|
1764
|
+
/** Field path for categories array */
|
|
1765
|
+
categories?: string;
|
|
1766
|
+
/** Field path for highlighted text */
|
|
1767
|
+
highlighted?: string;
|
|
1768
|
+
/** Custom field mappings */
|
|
1769
|
+
custom?: Record<string, string>;
|
|
1713
1770
|
}
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
/**
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
*/
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
/**
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1771
|
+
/** Maps client's product fields to component expected fields */
|
|
1772
|
+
interface ProductFieldMapping {
|
|
1773
|
+
/** Field path for product ID */
|
|
1774
|
+
id: string;
|
|
1775
|
+
/** Field path for product title/name */
|
|
1776
|
+
title: string;
|
|
1777
|
+
/** Field path for product image URL */
|
|
1778
|
+
image?: string;
|
|
1779
|
+
/** Field path for product price */
|
|
1780
|
+
price?: string;
|
|
1781
|
+
/** Field path for original/compare price */
|
|
1782
|
+
comparePrice?: string;
|
|
1783
|
+
/** Field path for product URL */
|
|
1784
|
+
url?: string;
|
|
1785
|
+
/** Field path for brand name */
|
|
1786
|
+
brand?: string;
|
|
1787
|
+
/** Field path for category */
|
|
1788
|
+
category?: string;
|
|
1789
|
+
/** Field path for rating */
|
|
1790
|
+
rating?: string;
|
|
1791
|
+
/** Field path for review count */
|
|
1792
|
+
reviewCount?: string;
|
|
1793
|
+
/** Field path for discount percentage */
|
|
1794
|
+
discount?: string;
|
|
1795
|
+
/** Field path for availability/in stock */
|
|
1796
|
+
inStock?: string;
|
|
1797
|
+
/** Field path for currency */
|
|
1798
|
+
currency?: string;
|
|
1799
|
+
/** Field path for multiple images */
|
|
1800
|
+
images?: string;
|
|
1801
|
+
/** Field path for original/compare price (alias) */
|
|
1802
|
+
originalPrice?: string;
|
|
1803
|
+
/** Field path for availability */
|
|
1804
|
+
available?: string;
|
|
1805
|
+
/** Field path for product options (Color, Size axes) */
|
|
1806
|
+
options?: string;
|
|
1807
|
+
/** Field path for product variants */
|
|
1808
|
+
variants?: string;
|
|
1809
|
+
/** Field path for product tags */
|
|
1810
|
+
tags?: string;
|
|
1811
|
+
/** Custom field mappings */
|
|
1812
|
+
custom?: Record<string, string>;
|
|
1730
1813
|
}
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
interface CategoriesTabsProps {
|
|
1740
|
-
className?: string;
|
|
1741
|
-
style?: React__default.CSSProperties;
|
|
1742
|
-
tabClassName?: string;
|
|
1814
|
+
/** Maps client's category/tab fields */
|
|
1815
|
+
interface CategoryFieldMapping {
|
|
1816
|
+
id: string;
|
|
1817
|
+
label: string;
|
|
1818
|
+
count?: string;
|
|
1819
|
+
icon?: string;
|
|
1820
|
+
image?: string;
|
|
1743
1821
|
}
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
*/
|
|
1751
|
-
|
|
1752
|
-
interface RecentSearchesListProps {
|
|
1753
|
-
title?: string;
|
|
1754
|
-
maxItems?: number;
|
|
1755
|
-
className?: string;
|
|
1756
|
-
style?: React__default.CSSProperties;
|
|
1757
|
-
listClassName?: string;
|
|
1758
|
-
renderItem?: (search: RecentSearch, index: number, onSelect: () => void) => React__default.ReactNode;
|
|
1822
|
+
/** Maps client's brand fields */
|
|
1823
|
+
interface BrandFieldMapping {
|
|
1824
|
+
id?: string;
|
|
1825
|
+
name: string;
|
|
1826
|
+
logo?: string;
|
|
1827
|
+
count?: string;
|
|
1759
1828
|
}
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
*/
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
style
|
|
1773
|
-
|
|
1774
|
-
|
|
1829
|
+
type DropdownLayout = 'list' | 'two-column' | 'three-column' | 'grid' | 'hero' | 'full-width' | 'mobile-sheet' | 'overlay';
|
|
1830
|
+
type ProductCardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1831
|
+
type ProductCardStyle = 'minimal' | 'standard' | 'detailed' | 'compact' | 'horizontal';
|
|
1832
|
+
/** Available dropdown variants */
|
|
1833
|
+
type SuggestionDropdownVariant$1 = 'amazon' | 'google' | 'pinterest' | 'spotlight' | 'shopify' | 'mobile-sheet' | 'minimal';
|
|
1834
|
+
interface VisualConfig {
|
|
1835
|
+
/** Overall dropdown layout */
|
|
1836
|
+
layout?: DropdownLayout;
|
|
1837
|
+
/** Show/hide shadows */
|
|
1838
|
+
shadows?: boolean;
|
|
1839
|
+
/** Border radius (px or CSS value) */
|
|
1840
|
+
borderRadius?: number | string;
|
|
1841
|
+
/** Animation style */
|
|
1842
|
+
animation?: 'none' | 'fade' | 'slide' | 'scale' | 'spring';
|
|
1843
|
+
/** Animation duration in ms */
|
|
1844
|
+
animationDuration?: number;
|
|
1845
|
+
/** Blur background when open */
|
|
1846
|
+
backdropBlur?: boolean;
|
|
1847
|
+
/** Show dividers between sections */
|
|
1848
|
+
showDividers?: boolean;
|
|
1849
|
+
/** Compact mode (reduced padding) */
|
|
1850
|
+
compact?: boolean;
|
|
1775
1851
|
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
/**
|
|
1779
|
-
|
|
1780
|
-
*/
|
|
1781
|
-
|
|
1782
|
-
|
|
1852
|
+
type SectionType = 'suggestions' | 'recent' | 'trending' | 'products' | 'categories' | 'brands' | 'collections' | 'pages' | 'custom';
|
|
1853
|
+
interface SectionConfig {
|
|
1854
|
+
/** Section identifier */
|
|
1855
|
+
id: SectionType | string;
|
|
1856
|
+
/** Section title (can be ReactNode for custom rendering) */
|
|
1857
|
+
title?: string | ReactNode;
|
|
1858
|
+
/** Whether section is enabled */
|
|
1859
|
+
enabled?: boolean;
|
|
1860
|
+
/** Maximum items to show */
|
|
1861
|
+
maxItems?: number;
|
|
1862
|
+
/** Section display order (lower = higher) */
|
|
1863
|
+
order?: number;
|
|
1864
|
+
/** Section-specific layout override */
|
|
1865
|
+
layout?: 'list' | 'grid' | 'horizontal-scroll' | 'chips';
|
|
1866
|
+
/** Number of columns for grid layout */
|
|
1867
|
+
columns?: number;
|
|
1868
|
+
/** Show "View All" link */
|
|
1869
|
+
showViewAll?: boolean;
|
|
1870
|
+
/** View All link URL or handler */
|
|
1871
|
+
viewAllLink?: string;
|
|
1872
|
+
/** Custom CSS class */
|
|
1783
1873
|
className?: string;
|
|
1784
|
-
|
|
1785
|
-
|
|
1874
|
+
/** Custom styles */
|
|
1875
|
+
style?: CSSProperties;
|
|
1876
|
+
/** Custom renderer for entire section */
|
|
1877
|
+
render?: (data: any[], config: SectionConfig) => ReactNode;
|
|
1878
|
+
/** Custom renderer for individual items */
|
|
1879
|
+
renderItem?: (item: any, index: number) => ReactNode;
|
|
1880
|
+
/** Empty state message */
|
|
1881
|
+
emptyMessage?: string;
|
|
1882
|
+
/** Icon for section header */
|
|
1883
|
+
icon?: ReactNode;
|
|
1786
1884
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1885
|
+
interface ProductDisplayConfig {
|
|
1886
|
+
/** Card size */
|
|
1887
|
+
size?: ProductCardSize;
|
|
1888
|
+
/** Card style */
|
|
1889
|
+
style?: ProductCardStyle;
|
|
1890
|
+
/** Show product image */
|
|
1891
|
+
showImage?: boolean;
|
|
1892
|
+
/** Image aspect ratio */
|
|
1893
|
+
imageAspectRatio?: '1:1' | '4:3' | '3:4' | '16:9' | 'auto';
|
|
1894
|
+
/** Show price */
|
|
1895
|
+
showPrice?: boolean;
|
|
1896
|
+
/** Show compare/original price */
|
|
1897
|
+
showComparePrice?: boolean;
|
|
1898
|
+
/** Show discount badge */
|
|
1899
|
+
showDiscount?: boolean;
|
|
1900
|
+
/** Show brand */
|
|
1901
|
+
showBrand?: boolean;
|
|
1902
|
+
/** Show rating */
|
|
1903
|
+
showRating?: boolean;
|
|
1904
|
+
/** Show stock status */
|
|
1905
|
+
showStock?: boolean;
|
|
1906
|
+
/** Show add to cart button */
|
|
1907
|
+
showAddToCart?: boolean;
|
|
1908
|
+
/** Currency symbol */
|
|
1909
|
+
currency?: string;
|
|
1910
|
+
/** Currency position */
|
|
1911
|
+
currencyPosition?: 'before' | 'after';
|
|
1912
|
+
/** Decimal places for price */
|
|
1913
|
+
priceDecimals?: number;
|
|
1914
|
+
/** Truncate title after N lines */
|
|
1915
|
+
titleLines?: number;
|
|
1916
|
+
/** Hover effect */
|
|
1917
|
+
hoverEffect?: 'none' | 'lift' | 'glow' | 'scale' | 'border';
|
|
1918
|
+
/** Image placeholder */
|
|
1919
|
+
imagePlaceholder?: ReactNode;
|
|
1920
|
+
/** Lazy load images */
|
|
1921
|
+
lazyLoadImages?: boolean;
|
|
1922
|
+
/** Show variant swatches on card */
|
|
1923
|
+
showVariants?: boolean;
|
|
1924
|
+
/** Which option names to show as swatches (e.g., ['Color']). Default: all */
|
|
1925
|
+
variantOptionsToShow?: string[];
|
|
1926
|
+
/** Max variant values before "+N more" (default: 5) */
|
|
1927
|
+
maxVariantValues?: number;
|
|
1928
|
+
/** Show price range when variants have different prices */
|
|
1929
|
+
showPriceRange?: boolean;
|
|
1930
|
+
/** Show badges (sale, new, sold out, etc.) */
|
|
1931
|
+
showBadges?: boolean;
|
|
1932
|
+
/** Custom badge extractor from tags */
|
|
1933
|
+
badgeExtractor?: (tags?: string[], product?: any) => _seekora_ai_ui_sdk_types.ProductBadge[];
|
|
1797
1934
|
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
*/
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1935
|
+
interface SuggestionDisplayConfig {
|
|
1936
|
+
/** Show search icon */
|
|
1937
|
+
showIcon?: boolean;
|
|
1938
|
+
/** Custom icon */
|
|
1939
|
+
icon?: ReactNode;
|
|
1940
|
+
/** Show hit count */
|
|
1941
|
+
showCount?: boolean;
|
|
1942
|
+
/** Show categories inline */
|
|
1943
|
+
showCategories?: boolean;
|
|
1944
|
+
/** Max categories to show */
|
|
1945
|
+
maxCategories?: number;
|
|
1946
|
+
/** Highlight matching text */
|
|
1947
|
+
highlightMatches?: boolean;
|
|
1948
|
+
/** Highlight style */
|
|
1949
|
+
highlightStyle?: CSSProperties;
|
|
1950
|
+
/** Show arrow on hover */
|
|
1951
|
+
showArrow?: boolean;
|
|
1952
|
+
/** Category click behavior */
|
|
1953
|
+
categoryClickable?: boolean;
|
|
1954
|
+
}
|
|
1955
|
+
interface DropdownThemeConfig {
|
|
1956
|
+
/** Light/dark mode */
|
|
1957
|
+
mode?: 'light' | 'dark' | 'auto';
|
|
1958
|
+
/** Primary brand color */
|
|
1959
|
+
primaryColor?: string;
|
|
1960
|
+
/** Background color */
|
|
1961
|
+
backgroundColor?: string;
|
|
1962
|
+
/** Surface color (cards, sections) */
|
|
1963
|
+
surfaceColor?: string;
|
|
1964
|
+
/** Text color */
|
|
1965
|
+
textColor?: string;
|
|
1966
|
+
/** Secondary text color */
|
|
1967
|
+
textSecondaryColor?: string;
|
|
1968
|
+
/** Border color */
|
|
1969
|
+
borderColor?: string;
|
|
1970
|
+
/** Hover background */
|
|
1971
|
+
hoverColor?: string;
|
|
1972
|
+
/** Highlight/match color */
|
|
1973
|
+
highlightColor?: string;
|
|
1974
|
+
/** Success color (in stock, etc.) */
|
|
1975
|
+
successColor?: string;
|
|
1976
|
+
/** Error color (out of stock, etc.) */
|
|
1977
|
+
errorColor?: string;
|
|
1978
|
+
/** Font family */
|
|
1979
|
+
fontFamily?: string;
|
|
1980
|
+
/** Base font size */
|
|
1981
|
+
fontSize?: number | string;
|
|
1982
|
+
/** Border radius */
|
|
1983
|
+
borderRadius?: number | string;
|
|
1984
|
+
/** Box shadow */
|
|
1985
|
+
boxShadow?: string;
|
|
1986
|
+
/** Custom CSS variables */
|
|
1987
|
+
cssVariables?: Record<string, string>;
|
|
1988
|
+
}
|
|
1989
|
+
interface AnalyticsConfig {
|
|
1990
|
+
/** Enable analytics */
|
|
1991
|
+
enabled?: boolean;
|
|
1992
|
+
/** Track suggestion clicks */
|
|
1993
|
+
trackSuggestionClicks?: boolean;
|
|
1994
|
+
/** Track product clicks */
|
|
1995
|
+
trackProductClicks?: boolean;
|
|
1996
|
+
/** Track impressions */
|
|
1997
|
+
trackImpressions?: boolean;
|
|
1998
|
+
/** Impression debounce time (ms) */
|
|
1999
|
+
impressionDebounce?: number;
|
|
2000
|
+
/** Track category clicks */
|
|
2001
|
+
trackCategoryClicks?: boolean;
|
|
2002
|
+
/** Track brand clicks */
|
|
2003
|
+
trackBrandClicks?: boolean;
|
|
2004
|
+
/** Track search submissions */
|
|
2005
|
+
trackSearchSubmit?: boolean;
|
|
2006
|
+
/** Custom analytics tags */
|
|
2007
|
+
tags?: string[];
|
|
2008
|
+
/** User ID for personalization */
|
|
2009
|
+
userId?: string;
|
|
2010
|
+
/** Session ID */
|
|
2011
|
+
sessionId?: string;
|
|
2012
|
+
/** Custom event handler */
|
|
2013
|
+
onEvent?: (eventType: string, data: any) => void;
|
|
2014
|
+
}
|
|
2015
|
+
interface DropdownEventHandlers<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> {
|
|
2016
|
+
/** Suggestion selected */
|
|
2017
|
+
onSuggestionSelect?: (suggestion: TSuggestion, index: number) => void;
|
|
2018
|
+
/** Product clicked */
|
|
2019
|
+
onProductClick?: (product: TProduct, index: number) => void;
|
|
2020
|
+
/** Category clicked */
|
|
2021
|
+
onCategoryClick?: (category: TCategory, suggestion?: TSuggestion) => void;
|
|
2022
|
+
/** Brand clicked */
|
|
2023
|
+
onBrandClick?: (brand: TBrand) => void;
|
|
2024
|
+
/** Tab/filter changed */
|
|
2025
|
+
onTabChange?: (tabId: string, tab?: any) => void;
|
|
2026
|
+
/** Recent search clicked */
|
|
2027
|
+
onRecentClick?: (query: string) => void;
|
|
2028
|
+
/** Recent search removed */
|
|
2029
|
+
onRecentRemove?: (query: string) => void;
|
|
2030
|
+
/** Clear all recent searches */
|
|
2031
|
+
onRecentClearAll?: () => void;
|
|
2032
|
+
/** View all clicked */
|
|
2033
|
+
onViewAll?: (section: SectionType | string) => void;
|
|
2034
|
+
/** Search submitted */
|
|
2035
|
+
onSearchSubmit?: (query: string) => void;
|
|
2036
|
+
/** Dropdown opened */
|
|
2037
|
+
onOpen?: () => void;
|
|
2038
|
+
/** Dropdown closed */
|
|
2039
|
+
onClose?: () => void;
|
|
2040
|
+
/** Keyboard navigation */
|
|
2041
|
+
onNavigate?: (direction: 'up' | 'down' | 'left' | 'right', index: number) => void;
|
|
2042
|
+
/** Add to cart clicked (if enabled) */
|
|
2043
|
+
onAddToCart?: (product: TProduct) => void;
|
|
2044
|
+
}
|
|
2045
|
+
interface AccessibilityConfig {
|
|
2046
|
+
/** ARIA label for dropdown */
|
|
2047
|
+
ariaLabel?: string;
|
|
2048
|
+
/** ARIA labelledby */
|
|
2049
|
+
ariaLabelledBy?: string;
|
|
2050
|
+
/** Announce selection to screen readers */
|
|
2051
|
+
announceSelection?: boolean;
|
|
2052
|
+
/** Custom announcement text */
|
|
2053
|
+
getAnnouncementText?: (item: any, type: string) => string;
|
|
2054
|
+
/** Keyboard navigation enabled */
|
|
2055
|
+
keyboardNavigation?: boolean;
|
|
2056
|
+
/** Focus trap (keep focus within dropdown) */
|
|
2057
|
+
focusTrap?: boolean;
|
|
2058
|
+
/** Auto focus first item */
|
|
2059
|
+
autoFocus?: boolean;
|
|
2060
|
+
/** Close on escape */
|
|
2061
|
+
closeOnEscape?: boolean;
|
|
2062
|
+
/** Close on click outside */
|
|
2063
|
+
closeOnClickOutside?: boolean;
|
|
2064
|
+
}
|
|
2065
|
+
interface BaseDropdownProps<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> extends DropdownEventHandlers<TSuggestion, TProduct, TCategory, TBrand> {
|
|
2066
|
+
/** Current search query */
|
|
2067
|
+
query: string;
|
|
2068
|
+
/** Whether dropdown is open/visible */
|
|
2069
|
+
isOpen?: boolean;
|
|
2070
|
+
/** Loading state */
|
|
2071
|
+
loading?: boolean;
|
|
2072
|
+
/** Error state */
|
|
2073
|
+
error?: Error | string | null;
|
|
2074
|
+
/** Suggestion items */
|
|
2075
|
+
suggestions?: TSuggestion[];
|
|
2076
|
+
/** Product items */
|
|
2077
|
+
products?: TProduct[];
|
|
2078
|
+
/** Category/filter tabs */
|
|
2079
|
+
categories?: TCategory[];
|
|
2080
|
+
/** Brand items */
|
|
2081
|
+
brands?: TBrand[];
|
|
2082
|
+
/** Recent searches (strings or objects) */
|
|
2083
|
+
recentSearches?: string[] | Array<{
|
|
2084
|
+
query: string;
|
|
2085
|
+
timestamp?: number;
|
|
2086
|
+
}>;
|
|
2087
|
+
/** Trending searches */
|
|
2088
|
+
trendingSearches?: string[] | TSuggestion[];
|
|
2089
|
+
/** Filtered tabs with products */
|
|
2090
|
+
filteredTabs?: Array<{
|
|
2091
|
+
id: string;
|
|
2092
|
+
label: string;
|
|
2093
|
+
products?: TProduct[];
|
|
2094
|
+
nb_hits?: number;
|
|
2095
|
+
filter?: string;
|
|
2096
|
+
}>;
|
|
2097
|
+
/** Currently active tab ID */
|
|
2098
|
+
activeTab?: string;
|
|
2099
|
+
/** Map suggestion data fields */
|
|
2100
|
+
suggestionFields?: SuggestionFieldMapping;
|
|
2101
|
+
/** Map product data fields */
|
|
2102
|
+
productFields?: ProductFieldMapping;
|
|
2103
|
+
/** Map category data fields */
|
|
2104
|
+
categoryFields?: CategoryFieldMapping;
|
|
2105
|
+
/** Map brand data fields */
|
|
2106
|
+
brandFields?: BrandFieldMapping;
|
|
2107
|
+
/** Section configurations */
|
|
2108
|
+
sections?: SectionConfig[];
|
|
2109
|
+
/** Product display config */
|
|
2110
|
+
productDisplay?: ProductDisplayConfig;
|
|
2111
|
+
/** Suggestion display config */
|
|
2112
|
+
suggestionDisplay?: SuggestionDisplayConfig;
|
|
2113
|
+
/** Visual/layout config */
|
|
2114
|
+
visual?: VisualConfig;
|
|
2115
|
+
/** Theme config */
|
|
2116
|
+
theme?: DropdownThemeConfig;
|
|
2117
|
+
/** Analytics config */
|
|
2118
|
+
analytics?: AnalyticsConfig;
|
|
2119
|
+
/** Accessibility config */
|
|
2120
|
+
accessibility?: AccessibilityConfig;
|
|
2121
|
+
/** Dropdown width */
|
|
2122
|
+
width?: string | number;
|
|
2123
|
+
/** Dropdown max height */
|
|
2124
|
+
maxHeight?: string | number;
|
|
2125
|
+
/** Dropdown min height */
|
|
2126
|
+
minHeight?: string | number;
|
|
2127
|
+
/** Z-index */
|
|
2128
|
+
zIndex?: number;
|
|
2129
|
+
/** Root CSS class */
|
|
2130
|
+
className?: string;
|
|
2131
|
+
/** Root inline styles */
|
|
2132
|
+
style?: CSSProperties;
|
|
2133
|
+
/** CSS classes for parts */
|
|
2134
|
+
classNames?: Partial<DropdownClassNames>;
|
|
2135
|
+
/** Inline styles for parts */
|
|
2136
|
+
styles?: Partial<DropdownStyles>;
|
|
2137
|
+
/** Custom header */
|
|
2138
|
+
header?: ReactNode;
|
|
2139
|
+
/** Custom footer */
|
|
2140
|
+
footer?: ReactNode;
|
|
2141
|
+
/** Custom loading state */
|
|
2142
|
+
/** Show loading state when fetching and no previous items (default false: show previous results until new render) */
|
|
2143
|
+
showLoadingState?: boolean;
|
|
2144
|
+
renderLoading?: () => ReactNode;
|
|
2145
|
+
/** Custom empty state */
|
|
2146
|
+
renderEmpty?: (query: string) => ReactNode;
|
|
2147
|
+
/** Custom error state */
|
|
2148
|
+
renderError?: (error: Error | string) => ReactNode;
|
|
2149
|
+
/** Reference to input element (for focus management) */
|
|
2150
|
+
inputRef?: React.RefObject<HTMLInputElement>;
|
|
2151
|
+
}
|
|
2152
|
+
interface DropdownClassNames {
|
|
2153
|
+
root: string;
|
|
2154
|
+
container: string;
|
|
2155
|
+
header: string;
|
|
2156
|
+
content: string;
|
|
2157
|
+
footer: string;
|
|
2158
|
+
section: string;
|
|
2159
|
+
sectionHeader: string;
|
|
2160
|
+
sectionTitle: string;
|
|
2161
|
+
sectionContent: string;
|
|
2162
|
+
sectionViewAll: string;
|
|
2163
|
+
suggestionsList: string;
|
|
2164
|
+
suggestionItem: string;
|
|
2165
|
+
suggestionItemActive: string;
|
|
2166
|
+
suggestionIcon: string;
|
|
2167
|
+
suggestionText: string;
|
|
2168
|
+
suggestionHighlight: string;
|
|
2169
|
+
suggestionCount: string;
|
|
2170
|
+
suggestionCategories: string;
|
|
2171
|
+
suggestionCategory: string;
|
|
2172
|
+
suggestionArrow: string;
|
|
2173
|
+
productsList: string;
|
|
2174
|
+
productCard: string;
|
|
2175
|
+
productCardHover: string;
|
|
2176
|
+
productImage: string;
|
|
2177
|
+
productImagePlaceholder: string;
|
|
2178
|
+
productInfo: string;
|
|
2179
|
+
productTitle: string;
|
|
2180
|
+
productBrand: string;
|
|
2181
|
+
productPrice: string;
|
|
2182
|
+
productComparePrice: string;
|
|
2183
|
+
productDiscount: string;
|
|
2184
|
+
productRating: string;
|
|
2185
|
+
productStock: string;
|
|
2186
|
+
productAddToCart: string;
|
|
2187
|
+
categoriesList: string;
|
|
2188
|
+
categoryItem: string;
|
|
2189
|
+
categoryItemActive: string;
|
|
2190
|
+
categoryIcon: string;
|
|
2191
|
+
categoryLabel: string;
|
|
2192
|
+
categoryCount: string;
|
|
2193
|
+
brandsList: string;
|
|
2194
|
+
brandItem: string;
|
|
2195
|
+
brandLogo: string;
|
|
2196
|
+
brandName: string;
|
|
2197
|
+
recentList: string;
|
|
2198
|
+
recentItem: string;
|
|
2199
|
+
recentIcon: string;
|
|
2200
|
+
recentText: string;
|
|
2201
|
+
recentRemove: string;
|
|
2202
|
+
recentClearAll: string;
|
|
2203
|
+
trendingList: string;
|
|
2204
|
+
trendingItem: string;
|
|
2205
|
+
trendingIcon: string;
|
|
2206
|
+
tabsList: string;
|
|
2207
|
+
tabItem: string;
|
|
2208
|
+
tabItemActive: string;
|
|
2209
|
+
tabCount: string;
|
|
2210
|
+
loading: string;
|
|
2211
|
+
loadingSpinner: string;
|
|
2212
|
+
empty: string;
|
|
2213
|
+
emptyIcon: string;
|
|
2214
|
+
emptyText: string;
|
|
2215
|
+
error: string;
|
|
2216
|
+
errorIcon: string;
|
|
2217
|
+
errorText: string;
|
|
2218
|
+
keyboard: string;
|
|
2219
|
+
keyboardHint: string;
|
|
2220
|
+
keyboardKey: string;
|
|
2221
|
+
}
|
|
2222
|
+
interface DropdownStyles {
|
|
2223
|
+
root: CSSProperties;
|
|
2224
|
+
container: CSSProperties;
|
|
2225
|
+
header: CSSProperties;
|
|
2226
|
+
content: CSSProperties;
|
|
2227
|
+
footer: CSSProperties;
|
|
2228
|
+
section: CSSProperties;
|
|
2229
|
+
suggestionItem: CSSProperties;
|
|
2230
|
+
productCard: CSSProperties;
|
|
2231
|
+
categoryItem: CSSProperties;
|
|
2232
|
+
brandItem: CSSProperties;
|
|
2233
|
+
}
|
|
2234
|
+
interface DropdownRef {
|
|
2235
|
+
/** Get currently active/focused index */
|
|
2236
|
+
getActiveIndex: () => number;
|
|
2237
|
+
/** Set active index */
|
|
2238
|
+
setActiveIndex: (index: number) => void;
|
|
2239
|
+
/** Select currently active item */
|
|
2240
|
+
selectActive: () => void;
|
|
2241
|
+
/** Navigate to next item */
|
|
2242
|
+
navigateNext: () => void;
|
|
2243
|
+
/** Navigate to previous item */
|
|
2244
|
+
navigatePrevious: () => void;
|
|
2245
|
+
/** Focus the dropdown */
|
|
2246
|
+
focus: () => void;
|
|
2247
|
+
/** Close the dropdown */
|
|
2248
|
+
close: () => void;
|
|
2249
|
+
/** Get active tab ID (if tabs exist) */
|
|
2250
|
+
getActiveTab?: () => string | null;
|
|
2251
|
+
/** Set active tab */
|
|
2252
|
+
setActiveTab?: (tabId: string) => void;
|
|
2253
|
+
/** Scroll to item */
|
|
2254
|
+
scrollToItem?: (index: number) => void;
|
|
1820
2255
|
}
|
|
1821
|
-
declare function SuggestionsDropdownComposition({ showRecentSearches, showTrending, showTabs, showProducts, placeholder, ...providerProps }: SuggestionsDropdownCompositionProps): React__default.JSX.Element;
|
|
1822
2256
|
|
|
1823
2257
|
/**
|
|
1824
|
-
*
|
|
2258
|
+
* ProductCard – one product tile (primitive)
|
|
1825
2259
|
*
|
|
1826
|
-
*
|
|
1827
|
-
*
|
|
2260
|
+
* Without displayConfig: renders the original minimal layout (image, title, price).
|
|
2261
|
+
* With displayConfig: renders layout variants (minimal, standard, detailed, compact, horizontal).
|
|
1828
2262
|
*/
|
|
1829
2263
|
|
|
1830
|
-
type
|
|
1831
|
-
interface
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
2264
|
+
type ProductCardImageVariant = 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
|
|
2265
|
+
interface ProductCardProps {
|
|
2266
|
+
product: ProductItem;
|
|
2267
|
+
position: number;
|
|
2268
|
+
section?: string;
|
|
2269
|
+
tabId?: string;
|
|
2270
|
+
onSelect: () => void;
|
|
1835
2271
|
className?: string;
|
|
1836
2272
|
style?: React__default.CSSProperties;
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
2273
|
+
imageVariant?: ProductCardImageVariant;
|
|
2274
|
+
/** Product display configuration for layout variants */
|
|
2275
|
+
displayConfig?: ProductDisplayConfig;
|
|
2276
|
+
/** Callback when a variant swatch is hovered (e.g., to swap card image) */
|
|
2277
|
+
onVariantHover?: (optionName: string, value: string) => void;
|
|
2278
|
+
/** Callback when a variant swatch is clicked (e.g., to swap card image permanently) */
|
|
2279
|
+
onVariantClick?: (optionName: string, value: string) => void;
|
|
2280
|
+
/** Currently selected variant values (e.g., { Color: 'Black', Size: 'M' }) */
|
|
2281
|
+
selectedVariants?: Record<string, string>;
|
|
2282
|
+
/** Render as link when true and product.url exists */
|
|
2283
|
+
asLink?: boolean;
|
|
2284
|
+
/** Action buttons (add to cart, wishlist, etc.) */
|
|
2285
|
+
actionButtons?: ActionButton[];
|
|
2286
|
+
/** Action buttons position */
|
|
2287
|
+
actionButtonsPosition?: 'overlay-top-right' | 'overlay-bottom' | 'inline';
|
|
2288
|
+
/** Show action button labels */
|
|
2289
|
+
showActionLabels?: boolean;
|
|
2290
|
+
/** Enable image zoom functionality */
|
|
2291
|
+
enableImageZoom?: boolean;
|
|
2292
|
+
/** Image zoom mode: 'hover' (Amazon-style), 'lens', 'click' (lightbox), 'both' (hover + click) */
|
|
2293
|
+
imageZoomMode?: 'hover' | 'lens' | 'click' | 'both';
|
|
2294
|
+
/** Image zoom magnification level (2 = 200%, 3 = 300%) */
|
|
2295
|
+
imageZoomLevel?: number;
|
|
2296
|
+
}
|
|
2297
|
+
declare function ProductCard({ product, position, section, tabId, onSelect, className, style, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, asLink, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }: ProductCardProps): React__default.JSX.Element;
|
|
1841
2298
|
|
|
1842
2299
|
/**
|
|
1843
|
-
*
|
|
2300
|
+
* ProductGrid – grid of product cards from context (primitive)
|
|
1844
2301
|
*
|
|
1845
|
-
*
|
|
1846
|
-
* query/filters change. Does not use global SearchStateManager. Use for menus,
|
|
1847
|
-
* sidebar, front-page blocks (e.g. "New arrivals", "On sale").
|
|
2302
|
+
* Uses trendingProducts or active tab products; each click calls context selectProduct.
|
|
1848
2303
|
*/
|
|
1849
2304
|
|
|
1850
|
-
interface
|
|
1851
|
-
field: string;
|
|
1852
|
-
value: string;
|
|
1853
|
-
}
|
|
1854
|
-
interface SectionSearchProviderProps {
|
|
1855
|
-
children: React__default.ReactNode;
|
|
1856
|
-
query: string;
|
|
1857
|
-
refinements?: RefinementInput[];
|
|
2305
|
+
interface ProductGridProps {
|
|
1858
2306
|
maxItems?: number;
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
2307
|
+
/** 'trending' | tab id for filtered tab products */
|
|
2308
|
+
source?: 'trending' | string;
|
|
2309
|
+
columns?: number;
|
|
2310
|
+
className?: string;
|
|
2311
|
+
style?: React__default.CSSProperties;
|
|
2312
|
+
gridClassName?: string;
|
|
2313
|
+
/** Product display configuration passed through to each ProductCard */
|
|
2314
|
+
displayConfig?: ProductDisplayConfig;
|
|
2315
|
+
/** Callback when a variant swatch is hovered on a card */
|
|
2316
|
+
onVariantHover?: (optionName: string, value: string) => void;
|
|
1862
2317
|
}
|
|
1863
|
-
declare function
|
|
2318
|
+
declare function ProductGrid({ maxItems, source, columns, className, style, gridClassName, displayConfig, onVariantHover, }: ProductGridProps): React__default.JSX.Element | null;
|
|
1864
2319
|
|
|
1865
2320
|
/**
|
|
1866
|
-
*
|
|
2321
|
+
* CategoriesTabs – horizontal tabs (e.g. filtered tabs) (primitive)
|
|
1867
2322
|
*
|
|
1868
|
-
*
|
|
2323
|
+
* Active tab from context; on select updates context and tracks analytics.
|
|
1869
2324
|
*/
|
|
1870
2325
|
|
|
1871
|
-
interface
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
totalCount: number;
|
|
1876
|
-
sectionId?: string;
|
|
1877
|
-
trackClick: (item: unknown, position: number) => void;
|
|
2326
|
+
interface CategoriesTabsProps {
|
|
2327
|
+
className?: string;
|
|
2328
|
+
style?: React__default.CSSProperties;
|
|
2329
|
+
tabClassName?: string;
|
|
1878
2330
|
}
|
|
1879
|
-
declare function
|
|
2331
|
+
declare function CategoriesTabs({ className, style, tabClassName }: CategoriesTabsProps): React__default.JSX.Element | null;
|
|
1880
2332
|
|
|
1881
2333
|
/**
|
|
1882
|
-
*
|
|
2334
|
+
* RecentSearchesList – list of recent queries (primitive)
|
|
2335
|
+
*
|
|
2336
|
+
* Reads recentSearches from context; each click calls selectRecentSearch. Optional title/render.
|
|
1883
2337
|
*/
|
|
1884
2338
|
|
|
1885
|
-
interface
|
|
1886
|
-
|
|
2339
|
+
interface RecentSearchesListProps {
|
|
2340
|
+
title?: string;
|
|
1887
2341
|
maxItems?: number;
|
|
1888
2342
|
className?: string;
|
|
1889
2343
|
style?: React__default.CSSProperties;
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
getItemImage?: (item: unknown) => string | undefined;
|
|
1893
|
-
getItemDescription?: (item: unknown) => string | undefined;
|
|
1894
|
-
getItemUrl?: (item: unknown) => string | undefined;
|
|
1895
|
-
renderItem?: (item: unknown, index: number) => React__default.ReactNode;
|
|
2344
|
+
listClassName?: string;
|
|
2345
|
+
renderItem?: (search: RecentSearch, index: number, onSelect: () => void) => React__default.ReactNode;
|
|
1896
2346
|
}
|
|
1897
|
-
declare function
|
|
2347
|
+
declare function RecentSearchesList({ title, maxItems, className, style, listClassName, renderItem, }: RecentSearchesListProps): React__default.JSX.Element | null;
|
|
1898
2348
|
|
|
1899
2349
|
/**
|
|
1900
|
-
*
|
|
2350
|
+
* TrendingList – list of trending searches (primitive)
|
|
2351
|
+
*
|
|
2352
|
+
* Reads trendingSearches from context; each click calls selectTrendingSearch. Optional title/render.
|
|
1901
2353
|
*/
|
|
1902
2354
|
|
|
1903
|
-
interface
|
|
2355
|
+
interface TrendingListProps {
|
|
2356
|
+
title?: string;
|
|
2357
|
+
maxItems?: number;
|
|
1904
2358
|
className?: string;
|
|
1905
2359
|
style?: React__default.CSSProperties;
|
|
1906
|
-
|
|
2360
|
+
listClassName?: string;
|
|
2361
|
+
renderItem?: (trending: TrendingSearch, index: number, onSelect: () => void) => React__default.ReactNode;
|
|
1907
2362
|
}
|
|
1908
|
-
declare function
|
|
2363
|
+
declare function TrendingList({ title, maxItems, className, style, listClassName, renderItem, }: TrendingListProps): React__default.JSX.Element | null;
|
|
1909
2364
|
|
|
1910
2365
|
/**
|
|
1911
|
-
*
|
|
2366
|
+
* SuggestionsLoading – loading indicator (primitive)
|
|
1912
2367
|
*/
|
|
1913
2368
|
|
|
1914
|
-
interface
|
|
2369
|
+
interface SuggestionsLoadingProps {
|
|
1915
2370
|
className?: string;
|
|
1916
2371
|
style?: React__default.CSSProperties;
|
|
1917
|
-
|
|
2372
|
+
text?: string;
|
|
1918
2373
|
}
|
|
1919
|
-
declare function
|
|
2374
|
+
declare function SuggestionsLoading({ className, style, text }: SuggestionsLoadingProps): React__default.JSX.Element | null;
|
|
1920
2375
|
|
|
1921
2376
|
/**
|
|
1922
|
-
*
|
|
1923
|
-
*
|
|
1924
|
-
* Uses ImageDisplay with configurable variant (carousel, thumbStrip, etc.).
|
|
1925
|
-
* For use on individual product page.
|
|
2377
|
+
* SuggestionsError – error message (primitive)
|
|
1926
2378
|
*/
|
|
1927
2379
|
|
|
1928
|
-
interface
|
|
1929
|
-
images: string[];
|
|
1930
|
-
variant?: ImageDisplayVariant;
|
|
1931
|
-
alt?: string;
|
|
2380
|
+
interface SuggestionsErrorProps {
|
|
1932
2381
|
className?: string;
|
|
1933
2382
|
style?: React__default.CSSProperties;
|
|
1934
|
-
|
|
1935
|
-
carouselIntervalMs?: number;
|
|
2383
|
+
render?: (error: Error) => React__default.ReactNode;
|
|
1936
2384
|
}
|
|
1937
|
-
declare function
|
|
2385
|
+
declare function SuggestionsError({ className, style, render }: SuggestionsErrorProps): React__default.JSX.Element | null;
|
|
1938
2386
|
|
|
1939
2387
|
/**
|
|
1940
|
-
*
|
|
2388
|
+
* SuggestionsDropdownComposition – reference composition
|
|
1941
2389
|
*
|
|
1942
|
-
*
|
|
1943
|
-
*
|
|
2390
|
+
* Example layout built from primitives: SearchInput + DropdownPanel containing
|
|
2391
|
+
* RecentSearchesList (when query empty), SuggestionList, CategoriesTabs, ProductGrid, TrendingList.
|
|
2392
|
+
* Wrap with SearchProvider and SuggestionsProvider. Use as reference or replace
|
|
2393
|
+
* with your own arrangement of the same primitives.
|
|
1944
2394
|
*/
|
|
1945
2395
|
|
|
1946
|
-
interface
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
/**
|
|
1952
|
-
|
|
1953
|
-
/**
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
2396
|
+
interface SuggestionsDropdownCompositionProps extends Omit<SuggestionsProviderProps, 'children'> {
|
|
2397
|
+
/** Show recent searches when query is empty */
|
|
2398
|
+
showRecentSearches?: boolean;
|
|
2399
|
+
/** Show trending list */
|
|
2400
|
+
showTrending?: boolean;
|
|
2401
|
+
/** Show categories/filtered tabs */
|
|
2402
|
+
showTabs?: boolean;
|
|
2403
|
+
/** Show product grid */
|
|
2404
|
+
showProducts?: boolean;
|
|
2405
|
+
/** SearchInput placeholder */
|
|
2406
|
+
placeholder?: string;
|
|
1957
2407
|
}
|
|
1958
|
-
declare function
|
|
2408
|
+
declare function SuggestionsDropdownComposition({ showRecentSearches, showTrending, showTabs, showProducts, placeholder, ...providerProps }: SuggestionsDropdownCompositionProps): React__default.JSX.Element;
|
|
1959
2409
|
|
|
1960
2410
|
/**
|
|
1961
|
-
*
|
|
2411
|
+
* ImageZoom – zoom on hover and click (Amazon-style magnifier + lightbox)
|
|
1962
2412
|
*
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
1965
|
-
*
|
|
2413
|
+
* Supports three zoom modes:
|
|
2414
|
+
* - hover: Magnified view in a separate panel on the right (Amazon style)
|
|
2415
|
+
* - lens: Magnifying glass that follows cursor
|
|
2416
|
+
* - click: Full-screen lightbox modal
|
|
1966
2417
|
*/
|
|
1967
2418
|
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
2419
|
+
type ImageZoomMode = 'hover' | 'lens' | 'click' | 'both';
|
|
2420
|
+
interface ImageZoomProps {
|
|
2421
|
+
src: string;
|
|
2422
|
+
alt?: string;
|
|
2423
|
+
mode?: ImageZoomMode;
|
|
2424
|
+
zoomLevel?: number;
|
|
1974
2425
|
className?: string;
|
|
1975
2426
|
style?: React__default.CSSProperties;
|
|
1976
|
-
|
|
2427
|
+
/** Show zoom indicator icon */
|
|
2428
|
+
showZoomIndicator?: boolean;
|
|
2429
|
+
/** Lens size in pixels (for lens mode) */
|
|
2430
|
+
lensSize?: number;
|
|
2431
|
+
/** Zoom panel size (for hover mode) */
|
|
2432
|
+
zoomPanelSize?: {
|
|
2433
|
+
width: number;
|
|
2434
|
+
height: number;
|
|
2435
|
+
};
|
|
2436
|
+
/** Multiple images for lightbox carousel */
|
|
2437
|
+
images?: string[];
|
|
2438
|
+
/** Current image index (for multi-image support) */
|
|
2439
|
+
currentIndex?: number;
|
|
1977
2440
|
}
|
|
1978
|
-
declare function
|
|
2441
|
+
declare function ImageZoom({ src, alt, mode, zoomLevel, className, style, showZoomIndicator, lensSize, zoomPanelSize, images, currentIndex, }: ImageZoomProps): React__default.JSX.Element;
|
|
1979
2442
|
|
|
1980
2443
|
/**
|
|
1981
|
-
*
|
|
2444
|
+
* ImageDisplay – configurable multi-image display (primitive)
|
|
1982
2445
|
*
|
|
1983
|
-
*
|
|
2446
|
+
* Variants: single, carousel, hover, thumbStrip, thumbList. Use in ItemCard,
|
|
2447
|
+
* ProductCard, ProductGallery. Overridable via className/style.
|
|
1984
2448
|
*/
|
|
1985
2449
|
|
|
1986
|
-
|
|
1987
|
-
interface
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
count?: string;
|
|
1992
|
-
/** Field path for object ID */
|
|
1993
|
-
id?: string;
|
|
1994
|
-
/** Field path for categories array */
|
|
1995
|
-
categories?: string;
|
|
1996
|
-
/** Field path for highlighted text */
|
|
1997
|
-
highlighted?: string;
|
|
1998
|
-
/** Custom field mappings */
|
|
1999
|
-
custom?: Record<string, string>;
|
|
2000
|
-
}
|
|
2001
|
-
/** Maps client's product fields to component expected fields */
|
|
2002
|
-
interface ProductFieldMapping {
|
|
2003
|
-
/** Field path for product ID */
|
|
2004
|
-
id: string;
|
|
2005
|
-
/** Field path for product title/name */
|
|
2006
|
-
title: string;
|
|
2007
|
-
/** Field path for product image URL */
|
|
2008
|
-
image?: string;
|
|
2009
|
-
/** Field path for product price */
|
|
2010
|
-
price?: string;
|
|
2011
|
-
/** Field path for original/compare price */
|
|
2012
|
-
comparePrice?: string;
|
|
2013
|
-
/** Field path for product URL */
|
|
2014
|
-
url?: string;
|
|
2015
|
-
/** Field path for brand name */
|
|
2016
|
-
brand?: string;
|
|
2017
|
-
/** Field path for category */
|
|
2018
|
-
category?: string;
|
|
2019
|
-
/** Field path for rating */
|
|
2020
|
-
rating?: string;
|
|
2021
|
-
/** Field path for review count */
|
|
2022
|
-
reviewCount?: string;
|
|
2023
|
-
/** Field path for discount percentage */
|
|
2024
|
-
discount?: string;
|
|
2025
|
-
/** Field path for availability/in stock */
|
|
2026
|
-
inStock?: string;
|
|
2027
|
-
/** Field path for currency */
|
|
2028
|
-
currency?: string;
|
|
2029
|
-
/** Custom field mappings */
|
|
2030
|
-
custom?: Record<string, string>;
|
|
2031
|
-
}
|
|
2032
|
-
/** Maps client's category/tab fields */
|
|
2033
|
-
interface CategoryFieldMapping {
|
|
2034
|
-
id: string;
|
|
2035
|
-
label: string;
|
|
2036
|
-
count?: string;
|
|
2037
|
-
icon?: string;
|
|
2038
|
-
image?: string;
|
|
2039
|
-
}
|
|
2040
|
-
/** Maps client's brand fields */
|
|
2041
|
-
interface BrandFieldMapping {
|
|
2042
|
-
id?: string;
|
|
2043
|
-
name: string;
|
|
2044
|
-
logo?: string;
|
|
2045
|
-
count?: string;
|
|
2046
|
-
}
|
|
2047
|
-
type DropdownLayout = 'list' | 'two-column' | 'three-column' | 'grid' | 'hero' | 'full-width' | 'mobile-sheet' | 'overlay';
|
|
2048
|
-
type ProductCardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2049
|
-
type ProductCardStyle = 'minimal' | 'standard' | 'detailed' | 'compact' | 'horizontal';
|
|
2050
|
-
/** Available dropdown variants */
|
|
2051
|
-
type SuggestionDropdownVariant$1 = 'amazon' | 'google' | 'pinterest' | 'spotlight' | 'shopify' | 'mobile-sheet' | 'minimal';
|
|
2052
|
-
interface VisualConfig {
|
|
2053
|
-
/** Overall dropdown layout */
|
|
2054
|
-
layout?: DropdownLayout;
|
|
2055
|
-
/** Show/hide shadows */
|
|
2056
|
-
shadows?: boolean;
|
|
2057
|
-
/** Border radius (px or CSS value) */
|
|
2058
|
-
borderRadius?: number | string;
|
|
2059
|
-
/** Animation style */
|
|
2060
|
-
animation?: 'none' | 'fade' | 'slide' | 'scale' | 'spring';
|
|
2061
|
-
/** Animation duration in ms */
|
|
2062
|
-
animationDuration?: number;
|
|
2063
|
-
/** Blur background when open */
|
|
2064
|
-
backdropBlur?: boolean;
|
|
2065
|
-
/** Show dividers between sections */
|
|
2066
|
-
showDividers?: boolean;
|
|
2067
|
-
/** Compact mode (reduced padding) */
|
|
2068
|
-
compact?: boolean;
|
|
2069
|
-
}
|
|
2070
|
-
type SectionType = 'suggestions' | 'recent' | 'trending' | 'products' | 'categories' | 'brands' | 'collections' | 'pages' | 'custom';
|
|
2071
|
-
interface SectionConfig {
|
|
2072
|
-
/** Section identifier */
|
|
2073
|
-
id: SectionType | string;
|
|
2074
|
-
/** Section title (can be ReactNode for custom rendering) */
|
|
2075
|
-
title?: string | ReactNode;
|
|
2076
|
-
/** Whether section is enabled */
|
|
2077
|
-
enabled?: boolean;
|
|
2078
|
-
/** Maximum items to show */
|
|
2079
|
-
maxItems?: number;
|
|
2080
|
-
/** Section display order (lower = higher) */
|
|
2081
|
-
order?: number;
|
|
2082
|
-
/** Section-specific layout override */
|
|
2083
|
-
layout?: 'list' | 'grid' | 'horizontal-scroll' | 'chips';
|
|
2084
|
-
/** Number of columns for grid layout */
|
|
2085
|
-
columns?: number;
|
|
2086
|
-
/** Show "View All" link */
|
|
2087
|
-
showViewAll?: boolean;
|
|
2088
|
-
/** View All link URL or handler */
|
|
2089
|
-
viewAllLink?: string;
|
|
2090
|
-
/** Custom CSS class */
|
|
2450
|
+
type ImageDisplayVariant = 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
|
|
2451
|
+
interface ImageDisplayProps {
|
|
2452
|
+
images: string[];
|
|
2453
|
+
variant?: ImageDisplayVariant;
|
|
2454
|
+
alt?: string;
|
|
2091
2455
|
className?: string;
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
interface ProductDisplayConfig {
|
|
2104
|
-
/** Card size */
|
|
2105
|
-
size?: ProductCardSize;
|
|
2106
|
-
/** Card style */
|
|
2107
|
-
style?: ProductCardStyle;
|
|
2108
|
-
/** Show product image */
|
|
2109
|
-
showImage?: boolean;
|
|
2110
|
-
/** Image aspect ratio */
|
|
2111
|
-
imageAspectRatio?: '1:1' | '4:3' | '3:4' | '16:9' | 'auto';
|
|
2112
|
-
/** Show price */
|
|
2113
|
-
showPrice?: boolean;
|
|
2114
|
-
/** Show compare/original price */
|
|
2115
|
-
showComparePrice?: boolean;
|
|
2116
|
-
/** Show discount badge */
|
|
2117
|
-
showDiscount?: boolean;
|
|
2118
|
-
/** Show brand */
|
|
2119
|
-
showBrand?: boolean;
|
|
2120
|
-
/** Show rating */
|
|
2121
|
-
showRating?: boolean;
|
|
2122
|
-
/** Show stock status */
|
|
2123
|
-
showStock?: boolean;
|
|
2124
|
-
/** Show add to cart button */
|
|
2125
|
-
showAddToCart?: boolean;
|
|
2126
|
-
/** Currency symbol */
|
|
2127
|
-
currency?: string;
|
|
2128
|
-
/** Currency position */
|
|
2129
|
-
currencyPosition?: 'before' | 'after';
|
|
2130
|
-
/** Decimal places for price */
|
|
2131
|
-
priceDecimals?: number;
|
|
2132
|
-
/** Truncate title after N lines */
|
|
2133
|
-
titleLines?: number;
|
|
2134
|
-
/** Hover effect */
|
|
2135
|
-
hoverEffect?: 'none' | 'lift' | 'glow' | 'scale' | 'border';
|
|
2136
|
-
/** Image placeholder */
|
|
2137
|
-
imagePlaceholder?: ReactNode;
|
|
2138
|
-
/** Lazy load images */
|
|
2139
|
-
lazyLoadImages?: boolean;
|
|
2140
|
-
}
|
|
2141
|
-
interface SuggestionDisplayConfig {
|
|
2142
|
-
/** Show search icon */
|
|
2143
|
-
showIcon?: boolean;
|
|
2144
|
-
/** Custom icon */
|
|
2145
|
-
icon?: ReactNode;
|
|
2146
|
-
/** Show hit count */
|
|
2147
|
-
showCount?: boolean;
|
|
2148
|
-
/** Show categories inline */
|
|
2149
|
-
showCategories?: boolean;
|
|
2150
|
-
/** Max categories to show */
|
|
2151
|
-
maxCategories?: number;
|
|
2152
|
-
/** Highlight matching text */
|
|
2153
|
-
highlightMatches?: boolean;
|
|
2154
|
-
/** Highlight style */
|
|
2155
|
-
highlightStyle?: CSSProperties;
|
|
2156
|
-
/** Show arrow on hover */
|
|
2157
|
-
showArrow?: boolean;
|
|
2158
|
-
/** Category click behavior */
|
|
2159
|
-
categoryClickable?: boolean;
|
|
2456
|
+
style?: React__default.CSSProperties;
|
|
2457
|
+
carouselAutoplay?: boolean;
|
|
2458
|
+
carouselIntervalMs?: number;
|
|
2459
|
+
/** Enable zoom functionality */
|
|
2460
|
+
enableZoom?: boolean;
|
|
2461
|
+
/** Zoom mode: 'hover' (Amazon-style), 'lens', 'click' (lightbox), 'both' (hover + click) */
|
|
2462
|
+
zoomMode?: ImageZoomMode;
|
|
2463
|
+
/** Zoom magnification level (2 = 200%, 3 = 300%) */
|
|
2464
|
+
zoomLevel?: number;
|
|
2465
|
+
/** Show navigation dots for carousel */
|
|
2466
|
+
showDots?: boolean;
|
|
2160
2467
|
}
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2468
|
+
declare function ImageDisplay({ images, variant, alt, className, style, carouselAutoplay, carouselIntervalMs, enableZoom, zoomMode, zoomLevel, showDots, }: ImageDisplayProps): React__default.JSX.Element;
|
|
2469
|
+
|
|
2470
|
+
/**
|
|
2471
|
+
* PriceDisplay – reusable price display primitive
|
|
2472
|
+
*
|
|
2473
|
+
* Handles single price, compare price with strikethrough, discount percentage,
|
|
2474
|
+
* and price range display.
|
|
2475
|
+
*/
|
|
2476
|
+
|
|
2477
|
+
interface PriceDisplayProps {
|
|
2478
|
+
price?: number;
|
|
2479
|
+
comparePrice?: number;
|
|
2480
|
+
priceRange?: PriceRange | null;
|
|
2481
|
+
currency?: string;
|
|
2482
|
+
currencyPosition?: 'before' | 'after';
|
|
2483
|
+
priceDecimals?: number;
|
|
2484
|
+
showDiscount?: boolean;
|
|
2485
|
+
className?: string;
|
|
2486
|
+
style?: React__default.CSSProperties;
|
|
2487
|
+
}
|
|
2488
|
+
declare function PriceDisplay({ price, comparePrice, priceRange, currency, currencyPosition, priceDecimals, showDiscount, className, style, }: PriceDisplayProps): React__default.JSX.Element | null;
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* BadgeList – renders product badges (sale, new, sold out, custom)
|
|
2492
|
+
*/
|
|
2493
|
+
|
|
2494
|
+
interface BadgeListProps {
|
|
2495
|
+
badges: ProductBadge[];
|
|
2496
|
+
maxBadges?: number;
|
|
2497
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inline';
|
|
2498
|
+
className?: string;
|
|
2499
|
+
style?: React__default.CSSProperties;
|
|
2500
|
+
}
|
|
2501
|
+
declare function BadgeList({ badges, maxBadges, position, className, style, }: BadgeListProps): React__default.JSX.Element | null;
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* RatingDisplay – star rating display with review count
|
|
2505
|
+
*
|
|
2506
|
+
* Supports multiple variants: stars-only, compact, full, inline.
|
|
2507
|
+
* Can be read-only (display) or interactive (for reviews).
|
|
2508
|
+
*/
|
|
2509
|
+
|
|
2510
|
+
type RatingVariant = 'stars-only' | 'compact' | 'full' | 'inline';
|
|
2511
|
+
type RatingSize = 'small' | 'medium' | 'large';
|
|
2512
|
+
interface RatingDisplayProps {
|
|
2513
|
+
/** Rating value (0-5) */
|
|
2514
|
+
rating: number;
|
|
2515
|
+
/** Total number of reviews */
|
|
2516
|
+
reviewCount?: number;
|
|
2517
|
+
/** Display variant */
|
|
2518
|
+
variant?: RatingVariant;
|
|
2519
|
+
/** Size of stars */
|
|
2520
|
+
size?: RatingSize;
|
|
2521
|
+
/** Maximum rating (default: 5) */
|
|
2522
|
+
maxRating?: number;
|
|
2523
|
+
/** Show decimal rating number */
|
|
2524
|
+
showNumeric?: boolean;
|
|
2525
|
+
/** Show half stars */
|
|
2526
|
+
showHalfStars?: boolean;
|
|
2527
|
+
/** Interactive mode (for leaving reviews) */
|
|
2528
|
+
interactive?: boolean;
|
|
2529
|
+
/** Callback when rating is clicked (interactive mode) */
|
|
2530
|
+
onRatingChange?: (rating: number) => void;
|
|
2531
|
+
/** Custom star color */
|
|
2532
|
+
starColor?: string;
|
|
2533
|
+
/** Custom empty star color */
|
|
2534
|
+
emptyStarColor?: string;
|
|
2535
|
+
/** Custom text color */
|
|
2171
2536
|
textColor?: string;
|
|
2172
|
-
/**
|
|
2173
|
-
|
|
2174
|
-
/**
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
/** Highlight/match color */
|
|
2179
|
-
highlightColor?: string;
|
|
2180
|
-
/** Success color (in stock, etc.) */
|
|
2181
|
-
successColor?: string;
|
|
2182
|
-
/** Error color (out of stock, etc.) */
|
|
2183
|
-
errorColor?: string;
|
|
2184
|
-
/** Font family */
|
|
2185
|
-
fontFamily?: string;
|
|
2186
|
-
/** Base font size */
|
|
2187
|
-
fontSize?: number | string;
|
|
2188
|
-
/** Border radius */
|
|
2189
|
-
borderRadius?: number | string;
|
|
2190
|
-
/** Box shadow */
|
|
2191
|
-
boxShadow?: string;
|
|
2192
|
-
/** Custom CSS variables */
|
|
2193
|
-
cssVariables?: Record<string, string>;
|
|
2537
|
+
/** Show review count in parentheses */
|
|
2538
|
+
showReviewCount?: boolean;
|
|
2539
|
+
/** Custom review count format */
|
|
2540
|
+
reviewCountFormat?: (count: number) => string;
|
|
2541
|
+
className?: string;
|
|
2542
|
+
style?: React__default.CSSProperties;
|
|
2194
2543
|
}
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2544
|
+
declare function RatingDisplay({ rating, reviewCount, variant, size, maxRating, showNumeric, showHalfStars, interactive, onRatingChange, starColor, emptyStarColor, textColor, showReviewCount, reviewCountFormat, className, style, }: RatingDisplayProps): React__default.JSX.Element | null;
|
|
2545
|
+
|
|
2546
|
+
/**
|
|
2547
|
+
* VariantSwatches – inline variant indicators for card display
|
|
2548
|
+
*
|
|
2549
|
+
* Shows color dots, size labels, and "+N more" overflow for compact card views.
|
|
2550
|
+
*/
|
|
2551
|
+
|
|
2552
|
+
interface VariantSwatchesProps {
|
|
2553
|
+
options: ProductOption[];
|
|
2554
|
+
/** Which option names to show (default: all) */
|
|
2555
|
+
visibleOptions?: string[];
|
|
2556
|
+
/** Max values per option before "+N more" (default: 5) */
|
|
2557
|
+
maxValues?: number;
|
|
2558
|
+
/** Map option value names to CSS color strings */
|
|
2559
|
+
colorMap?: Record<string, string>;
|
|
2560
|
+
/** Currently selected value per option (e.g., { Color: 'Black', Size: 'M' }) */
|
|
2561
|
+
selectedValues?: Record<string, string>;
|
|
2562
|
+
/** Product variants for availability checking */
|
|
2563
|
+
variants?: ProductVariant[];
|
|
2564
|
+
/** Show availability cross-out for unavailable combos (default: true) */
|
|
2565
|
+
showAvailability?: boolean;
|
|
2566
|
+
onSwatchHover?: (optionName: string, value: string) => void;
|
|
2567
|
+
onSwatchClick?: (optionName: string, value: string) => void;
|
|
2568
|
+
className?: string;
|
|
2569
|
+
style?: React__default.CSSProperties;
|
|
2220
2570
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
onAddToCart?: (product: TProduct) => void;
|
|
2571
|
+
declare function VariantSwatches({ options, visibleOptions, maxValues, colorMap, selectedValues, variants, showAvailability, onSwatchHover, onSwatchClick, className, style, }: VariantSwatchesProps): React__default.JSX.Element | null;
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* VariantSelector – full variant selector for product detail pages
|
|
2575
|
+
*
|
|
2576
|
+
* Three render modes per option:
|
|
2577
|
+
* - swatch: color circles (auto-detected for "Color" option or when colorMap provided)
|
|
2578
|
+
* - button: rectangular buttons (default for most options)
|
|
2579
|
+
* - dropdown: <select> for options with many values
|
|
2580
|
+
*/
|
|
2581
|
+
|
|
2582
|
+
interface VariantSelectorProps {
|
|
2583
|
+
options: ProductOption[];
|
|
2584
|
+
variants: ProductVariant[];
|
|
2585
|
+
selections: Record<string, string>;
|
|
2586
|
+
onSelectionChange: (optionName: string, value: string) => void;
|
|
2587
|
+
/** Override render mode per option name */
|
|
2588
|
+
optionRenderModes?: Record<string, 'swatch' | 'button' | 'dropdown'>;
|
|
2589
|
+
/** Auto-switch to dropdown when values exceed this count (default: 8) */
|
|
2590
|
+
dropdownThreshold?: number;
|
|
2591
|
+
/** Map value names to CSS colors */
|
|
2592
|
+
colorMap?: Record<string, string>;
|
|
2593
|
+
/** Show availability cross-out for unavailable combos */
|
|
2594
|
+
showAvailability?: boolean;
|
|
2595
|
+
/** Currently matched variant (for display) */
|
|
2596
|
+
selectedVariant?: ProductVariant | null;
|
|
2597
|
+
className?: string;
|
|
2598
|
+
style?: React__default.CSSProperties;
|
|
2250
2599
|
}
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
/**
|
|
2259
|
-
|
|
2260
|
-
/**
|
|
2261
|
-
|
|
2262
|
-
/**
|
|
2263
|
-
|
|
2264
|
-
/**
|
|
2265
|
-
|
|
2266
|
-
/**
|
|
2267
|
-
|
|
2268
|
-
/** Close on click outside */
|
|
2269
|
-
closeOnClickOutside?: boolean;
|
|
2600
|
+
declare function VariantSelector({ options, variants, selections, onSelectionChange, optionRenderModes, dropdownThreshold, colorMap, showAvailability, selectedVariant: _selectedVariant, className, style, }: VariantSelectorProps): React__default.JSX.Element | null;
|
|
2601
|
+
|
|
2602
|
+
/**
|
|
2603
|
+
* withAnalytics – HOC that wraps any React component to inject analytics tracking
|
|
2604
|
+
*/
|
|
2605
|
+
|
|
2606
|
+
interface WithAnalyticsConfig {
|
|
2607
|
+
/** Track clicks on the component */
|
|
2608
|
+
trackClick?: boolean;
|
|
2609
|
+
/** Track impressions (visibility) */
|
|
2610
|
+
trackImpression?: boolean;
|
|
2611
|
+
/** Custom event name for click */
|
|
2612
|
+
clickEventName?: string;
|
|
2613
|
+
/** Extract product/item data from props */
|
|
2614
|
+
getProductFromProps?: (props: any) => ProductItem | null;
|
|
2615
|
+
/** Extract position from props */
|
|
2616
|
+
getPositionFromProps?: (props: any) => number;
|
|
2270
2617
|
}
|
|
2271
|
-
interface
|
|
2272
|
-
|
|
2618
|
+
interface WithAnalyticsInjectedProps {
|
|
2619
|
+
seekoraClient?: SeekoraClient;
|
|
2620
|
+
seekoraContext?: SearchContext | Partial<SearchContext>;
|
|
2621
|
+
}
|
|
2622
|
+
declare function withAnalytics<P extends object>(Component: React__default.ComponentType<P>, config?: WithAnalyticsConfig): React__default.ComponentType<P & WithAnalyticsInjectedProps>;
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* AnalyticsProvider – context + delegated event listener for data-seekora-* attribute-based analytics
|
|
2626
|
+
*
|
|
2627
|
+
* Installs a delegated click listener on a container. Any descendant with
|
|
2628
|
+
* data-seekora-track="click"|"add-to-cart" and data-seekora-product-id="..."
|
|
2629
|
+
* automatically fires analytics events without React wiring.
|
|
2630
|
+
*/
|
|
2631
|
+
|
|
2632
|
+
interface AnalyticsProviderProps {
|
|
2633
|
+
client: SeekoraClient;
|
|
2634
|
+
context?: SearchContext | Partial<SearchContext>;
|
|
2635
|
+
children: React__default.ReactNode;
|
|
2636
|
+
}
|
|
2637
|
+
interface AnalyticsContextValue {
|
|
2638
|
+
client: SeekoraClient;
|
|
2639
|
+
context?: SearchContext | Partial<SearchContext>;
|
|
2640
|
+
}
|
|
2641
|
+
declare const useAnalyticsProvider: () => AnalyticsContextValue | null;
|
|
2642
|
+
declare function AnalyticsProvider({ client, context, children }: AnalyticsProviderProps): React__default.JSX.Element;
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* SectionSearchProvider – preset query + filter section
|
|
2646
|
+
*
|
|
2647
|
+
* Runs client.search(query, { refinements, hitsPerPage, sortBy }) on mount and when
|
|
2648
|
+
* query/filters change. Does not use global SearchStateManager. Use for menus,
|
|
2649
|
+
* sidebar, front-page blocks (e.g. "New arrivals", "On sale").
|
|
2650
|
+
*/
|
|
2651
|
+
|
|
2652
|
+
interface RefinementInput {
|
|
2653
|
+
field: string;
|
|
2654
|
+
value: string;
|
|
2655
|
+
}
|
|
2656
|
+
interface SectionSearchProviderProps {
|
|
2657
|
+
children: React__default.ReactNode;
|
|
2273
2658
|
query: string;
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
/** Map suggestion data fields */
|
|
2306
|
-
suggestionFields?: SuggestionFieldMapping;
|
|
2307
|
-
/** Map product data fields */
|
|
2308
|
-
productFields?: ProductFieldMapping;
|
|
2309
|
-
/** Map category data fields */
|
|
2310
|
-
categoryFields?: CategoryFieldMapping;
|
|
2311
|
-
/** Map brand data fields */
|
|
2312
|
-
brandFields?: BrandFieldMapping;
|
|
2313
|
-
/** Section configurations */
|
|
2314
|
-
sections?: SectionConfig[];
|
|
2315
|
-
/** Product display config */
|
|
2316
|
-
productDisplay?: ProductDisplayConfig;
|
|
2317
|
-
/** Suggestion display config */
|
|
2318
|
-
suggestionDisplay?: SuggestionDisplayConfig;
|
|
2319
|
-
/** Visual/layout config */
|
|
2320
|
-
visual?: VisualConfig;
|
|
2321
|
-
/** Theme config */
|
|
2322
|
-
theme?: DropdownThemeConfig;
|
|
2323
|
-
/** Analytics config */
|
|
2324
|
-
analytics?: AnalyticsConfig;
|
|
2325
|
-
/** Accessibility config */
|
|
2326
|
-
accessibility?: AccessibilityConfig;
|
|
2327
|
-
/** Dropdown width */
|
|
2328
|
-
width?: string | number;
|
|
2329
|
-
/** Dropdown max height */
|
|
2330
|
-
maxHeight?: string | number;
|
|
2331
|
-
/** Dropdown min height */
|
|
2332
|
-
minHeight?: string | number;
|
|
2333
|
-
/** Z-index */
|
|
2334
|
-
zIndex?: number;
|
|
2335
|
-
/** Root CSS class */
|
|
2659
|
+
refinements?: RefinementInput[];
|
|
2660
|
+
maxItems?: number;
|
|
2661
|
+
sortBy?: string;
|
|
2662
|
+
enabled?: boolean;
|
|
2663
|
+
sectionId?: string;
|
|
2664
|
+
}
|
|
2665
|
+
declare function SectionSearchProvider({ children, query, refinements, maxItems, sortBy, enabled, sectionId, }: SectionSearchProviderProps): React__default.JSX.Element;
|
|
2666
|
+
|
|
2667
|
+
/**
|
|
2668
|
+
* SectionSearchContext – preset query/filter section state
|
|
2669
|
+
*
|
|
2670
|
+
* For menus, sidebar, front-page blocks. Independent of main search state.
|
|
2671
|
+
*/
|
|
2672
|
+
|
|
2673
|
+
interface SectionSearchContextValue {
|
|
2674
|
+
items: unknown[];
|
|
2675
|
+
loading: boolean;
|
|
2676
|
+
error: Error | null;
|
|
2677
|
+
totalCount: number;
|
|
2678
|
+
sectionId?: string;
|
|
2679
|
+
trackClick: (item: unknown, position: number) => void;
|
|
2680
|
+
}
|
|
2681
|
+
declare function useSectionSearchContext(): SectionSearchContextValue;
|
|
2682
|
+
|
|
2683
|
+
/**
|
|
2684
|
+
* SectionItemGrid – generic grid of items from SectionSearchProvider (primitive)
|
|
2685
|
+
*/
|
|
2686
|
+
|
|
2687
|
+
interface SectionItemGridProps {
|
|
2688
|
+
columns?: number;
|
|
2689
|
+
maxItems?: number;
|
|
2336
2690
|
className?: string;
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
footer?: ReactNode;
|
|
2347
|
-
/** Custom loading state */
|
|
2348
|
-
renderLoading?: () => ReactNode;
|
|
2349
|
-
/** Custom empty state */
|
|
2350
|
-
renderEmpty?: (query: string) => ReactNode;
|
|
2351
|
-
/** Custom error state */
|
|
2352
|
-
renderError?: (error: Error | string) => ReactNode;
|
|
2353
|
-
/** Reference to input element (for focus management) */
|
|
2354
|
-
inputRef?: React.RefObject<HTMLInputElement>;
|
|
2691
|
+
style?: React__default.CSSProperties;
|
|
2692
|
+
/** Show loading state when fetching and no previous items (default false: show previous results until new render) */
|
|
2693
|
+
showLoadingState?: boolean;
|
|
2694
|
+
getItemId?: (item: unknown) => string;
|
|
2695
|
+
getItemTitle?: (item: unknown) => string;
|
|
2696
|
+
getItemImage?: (item: unknown) => string | undefined;
|
|
2697
|
+
getItemDescription?: (item: unknown) => string | undefined;
|
|
2698
|
+
getItemUrl?: (item: unknown) => string | undefined;
|
|
2699
|
+
renderItem?: (item: unknown, index: number) => React__default.ReactNode;
|
|
2355
2700
|
}
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
sectionViewAll: string;
|
|
2367
|
-
suggestionsList: string;
|
|
2368
|
-
suggestionItem: string;
|
|
2369
|
-
suggestionItemActive: string;
|
|
2370
|
-
suggestionIcon: string;
|
|
2371
|
-
suggestionText: string;
|
|
2372
|
-
suggestionHighlight: string;
|
|
2373
|
-
suggestionCount: string;
|
|
2374
|
-
suggestionCategories: string;
|
|
2375
|
-
suggestionCategory: string;
|
|
2376
|
-
suggestionArrow: string;
|
|
2377
|
-
productsList: string;
|
|
2378
|
-
productCard: string;
|
|
2379
|
-
productCardHover: string;
|
|
2380
|
-
productImage: string;
|
|
2381
|
-
productImagePlaceholder: string;
|
|
2382
|
-
productInfo: string;
|
|
2383
|
-
productTitle: string;
|
|
2384
|
-
productBrand: string;
|
|
2385
|
-
productPrice: string;
|
|
2386
|
-
productComparePrice: string;
|
|
2387
|
-
productDiscount: string;
|
|
2388
|
-
productRating: string;
|
|
2389
|
-
productStock: string;
|
|
2390
|
-
productAddToCart: string;
|
|
2391
|
-
categoriesList: string;
|
|
2392
|
-
categoryItem: string;
|
|
2393
|
-
categoryItemActive: string;
|
|
2394
|
-
categoryIcon: string;
|
|
2395
|
-
categoryLabel: string;
|
|
2396
|
-
categoryCount: string;
|
|
2397
|
-
brandsList: string;
|
|
2398
|
-
brandItem: string;
|
|
2399
|
-
brandLogo: string;
|
|
2400
|
-
brandName: string;
|
|
2401
|
-
recentList: string;
|
|
2402
|
-
recentItem: string;
|
|
2403
|
-
recentIcon: string;
|
|
2404
|
-
recentText: string;
|
|
2405
|
-
recentRemove: string;
|
|
2406
|
-
recentClearAll: string;
|
|
2407
|
-
trendingList: string;
|
|
2408
|
-
trendingItem: string;
|
|
2409
|
-
trendingIcon: string;
|
|
2410
|
-
tabsList: string;
|
|
2411
|
-
tabItem: string;
|
|
2412
|
-
tabItemActive: string;
|
|
2413
|
-
tabCount: string;
|
|
2414
|
-
loading: string;
|
|
2415
|
-
loadingSpinner: string;
|
|
2416
|
-
empty: string;
|
|
2417
|
-
emptyIcon: string;
|
|
2418
|
-
emptyText: string;
|
|
2419
|
-
error: string;
|
|
2420
|
-
errorIcon: string;
|
|
2421
|
-
errorText: string;
|
|
2422
|
-
keyboard: string;
|
|
2423
|
-
keyboardHint: string;
|
|
2424
|
-
keyboardKey: string;
|
|
2701
|
+
declare function SectionItemGrid({ columns, maxItems, className, style, showLoadingState, getItemId, getItemTitle, getItemImage, getItemDescription, getItemUrl, renderItem, }: SectionItemGridProps): React__default.JSX.Element;
|
|
2702
|
+
|
|
2703
|
+
/**
|
|
2704
|
+
* SectionLoading – loading state for section (primitive)
|
|
2705
|
+
*/
|
|
2706
|
+
|
|
2707
|
+
interface SectionLoadingProps {
|
|
2708
|
+
className?: string;
|
|
2709
|
+
style?: React__default.CSSProperties;
|
|
2710
|
+
text?: string;
|
|
2425
2711
|
}
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
brandItem: CSSProperties;
|
|
2712
|
+
declare function SectionLoading({ className, style, text }: SectionLoadingProps): React__default.JSX.Element | null;
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* SectionError – error state for section (primitive)
|
|
2716
|
+
*/
|
|
2717
|
+
|
|
2718
|
+
interface SectionErrorProps {
|
|
2719
|
+
className?: string;
|
|
2720
|
+
style?: React__default.CSSProperties;
|
|
2721
|
+
render?: (error: Error) => React__default.ReactNode;
|
|
2437
2722
|
}
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2723
|
+
declare function SectionError({ className, style, render }: SectionErrorProps): React__default.JSX.Element | null;
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* ProductGallery – product detail image gallery (primitive)
|
|
2727
|
+
*
|
|
2728
|
+
* Uses ImageDisplay with configurable variant (carousel, thumbStrip, etc.).
|
|
2729
|
+
* For use on individual product page.
|
|
2730
|
+
*/
|
|
2731
|
+
|
|
2732
|
+
interface ProductGalleryProps {
|
|
2733
|
+
images: string[];
|
|
2734
|
+
variant?: ImageDisplayVariant;
|
|
2735
|
+
alt?: string;
|
|
2736
|
+
className?: string;
|
|
2737
|
+
style?: React__default.CSSProperties;
|
|
2738
|
+
carouselAutoplay?: boolean;
|
|
2739
|
+
carouselIntervalMs?: number;
|
|
2740
|
+
}
|
|
2741
|
+
declare function ProductGallery({ images, variant, alt, className, style, carouselAutoplay, carouselIntervalMs, }: ProductGalleryProps): React__default.JSX.Element;
|
|
2742
|
+
|
|
2743
|
+
/**
|
|
2744
|
+
* ProductInfo – product detail block (primitive)
|
|
2745
|
+
*
|
|
2746
|
+
* Title, description, price, optional variant selector and CTA. Minimal layout;
|
|
2747
|
+
* override with className/style. For use on individual product page.
|
|
2748
|
+
*
|
|
2749
|
+
* When options/variants/selections/onSelectionChange are provided and
|
|
2750
|
+
* renderVariantSelector is NOT provided, renders the built-in VariantSelector.
|
|
2751
|
+
* renderVariantSelector still takes priority as an override.
|
|
2752
|
+
*/
|
|
2753
|
+
|
|
2754
|
+
interface ProductInfoProps {
|
|
2755
|
+
title: string;
|
|
2756
|
+
description?: string;
|
|
2757
|
+
price?: number | string;
|
|
2758
|
+
currency?: string;
|
|
2759
|
+
/** Compare/original price for strikethrough display */
|
|
2760
|
+
comparePrice?: number | string;
|
|
2761
|
+
/** Product brand */
|
|
2762
|
+
brand?: string;
|
|
2763
|
+
/** Whether product is available */
|
|
2764
|
+
available?: boolean;
|
|
2765
|
+
/** Badges to display */
|
|
2766
|
+
badges?: ProductBadge[];
|
|
2767
|
+
/** Product option axes (Color, Size, etc.) */
|
|
2768
|
+
options?: ProductOption[];
|
|
2769
|
+
/** Product variants */
|
|
2770
|
+
variants?: ProductVariant[];
|
|
2771
|
+
/** Currently selected variant */
|
|
2772
|
+
selectedVariant?: ProductVariant | null;
|
|
2773
|
+
/** Current option selections */
|
|
2774
|
+
selections?: Record<string, string>;
|
|
2775
|
+
/** Called when an option value is selected */
|
|
2776
|
+
onSelectionChange?: (optionName: string, value: string) => void;
|
|
2777
|
+
/** Optional variant selector override (takes priority over built-in) */
|
|
2778
|
+
renderVariantSelector?: () => React__default.ReactNode;
|
|
2779
|
+
/** Optional CTA (e.g. Add to cart) */
|
|
2780
|
+
renderCTA?: () => React__default.ReactNode;
|
|
2781
|
+
className?: string;
|
|
2782
|
+
style?: React__default.CSSProperties;
|
|
2783
|
+
}
|
|
2784
|
+
declare function ProductInfo({ title, description, price, currency, comparePrice, brand, available, badges, options, variants, selectedVariant: _selectedVariant, selections, onSelectionChange, renderVariantSelector, renderCTA, className, style, }: ProductInfoProps): React__default.JSX.Element;
|
|
2785
|
+
|
|
2786
|
+
/**
|
|
2787
|
+
* ProductRecommendations – related / frequently bought (primitive)
|
|
2788
|
+
*
|
|
2789
|
+
* Renders a section of recommended items (generic ItemGrid or product list).
|
|
2790
|
+
* Pass items and onItemClick; or wrap SectionSearchProvider with preset query for "related".
|
|
2791
|
+
* For use on individual product page.
|
|
2792
|
+
*/
|
|
2793
|
+
|
|
2794
|
+
interface ProductRecommendationsProps {
|
|
2795
|
+
title?: string;
|
|
2796
|
+
items: GenericItem[] | unknown[];
|
|
2797
|
+
onItemClick?: (item: unknown, index: number) => void;
|
|
2798
|
+
maxItems?: number;
|
|
2799
|
+
columns?: number;
|
|
2800
|
+
className?: string;
|
|
2801
|
+
style?: React__default.CSSProperties;
|
|
2802
|
+
renderItem?: (item: unknown, index: number) => React__default.ReactNode;
|
|
2459
2803
|
}
|
|
2804
|
+
declare function ProductRecommendations({ title, items, onItemClick, maxItems, columns, className, style, renderItem, }: ProductRecommendationsProps): React__default.JSX.Element | null;
|
|
2460
2805
|
|
|
2461
2806
|
/**
|
|
2462
2807
|
* MinimalDropdown - Ultra-Clean Minimalist Style
|
|
@@ -2805,6 +3150,12 @@ declare const extractProduct: (item: any, mapping?: ProductFieldMapping) => {
|
|
|
2805
3150
|
discount: any;
|
|
2806
3151
|
inStock: any;
|
|
2807
3152
|
currency: any;
|
|
3153
|
+
images: any;
|
|
3154
|
+
originalPrice: any;
|
|
3155
|
+
available: any;
|
|
3156
|
+
options: any;
|
|
3157
|
+
variants: any;
|
|
3158
|
+
tags: any;
|
|
2808
3159
|
_raw: any;
|
|
2809
3160
|
};
|
|
2810
3161
|
/**
|
|
@@ -2840,6 +3191,36 @@ declare const highlightText: (text: string, query: string, options?: {
|
|
|
2840
3191
|
className?: string;
|
|
2841
3192
|
style?: CSSProperties;
|
|
2842
3193
|
}) => string;
|
|
3194
|
+
/**
|
|
3195
|
+
* Extract badges from product tags (Shopify convention: "badge:new", "badge:limited")
|
|
3196
|
+
* and auto-generate sale/soldOut badges from product data.
|
|
3197
|
+
*/
|
|
3198
|
+
declare const extractBadges: (tags?: string[], product?: {
|
|
3199
|
+
price?: number;
|
|
3200
|
+
original_price?: number;
|
|
3201
|
+
compare_at_price?: number;
|
|
3202
|
+
available?: boolean;
|
|
3203
|
+
}) => ProductBadge[];
|
|
3204
|
+
/**
|
|
3205
|
+
* Compute min/max price from variants. Returns null if all variants have the same price.
|
|
3206
|
+
*/
|
|
3207
|
+
declare const getPriceRange: (variants?: ProductVariant[]) => PriceRange | null;
|
|
3208
|
+
/**
|
|
3209
|
+
* Format a price range like "$54.00 - $72.00"
|
|
3210
|
+
*/
|
|
3211
|
+
declare const formatPriceRange: (range: PriceRange, config?: Pick<ProductDisplayConfig, "currency" | "currencyPosition" | "priceDecimals">) => string;
|
|
3212
|
+
/**
|
|
3213
|
+
* Given current selections, return which values for an option are still available
|
|
3214
|
+
* based on variant availability.
|
|
3215
|
+
*/
|
|
3216
|
+
declare const getAvailableValuesForOption: (optionName: string, options: ProductOption[], variants: ProductVariant[], selections: Record<string, string>) => {
|
|
3217
|
+
value: string;
|
|
3218
|
+
available: boolean;
|
|
3219
|
+
}[];
|
|
3220
|
+
/**
|
|
3221
|
+
* Find the exact variant matching all selected options.
|
|
3222
|
+
*/
|
|
3223
|
+
declare const findVariantBySelections: (options: ProductOption[], variants: ProductVariant[], selections: Record<string, string>) => ProductVariant | null;
|
|
2843
3224
|
declare const getRecentSearches: (storeId?: string) => string[];
|
|
2844
3225
|
declare const addRecentSearch: (query: string, storeId?: string) => string[];
|
|
2845
3226
|
declare const removeRecentSearch: (query: string, storeId?: string) => string[];
|
|
@@ -3523,6 +3904,82 @@ declare function useNaturalLanguageFilters(options?: NaturalLanguageFiltersOptio
|
|
|
3523
3904
|
*/
|
|
3524
3905
|
declare function formatParsedFilters(filters: ParsedFilter[]): string;
|
|
3525
3906
|
|
|
3907
|
+
/**
|
|
3908
|
+
* useVariantSelection – manages variant selection state
|
|
3909
|
+
*
|
|
3910
|
+
* Single source of truth for variant interactions on product pages.
|
|
3911
|
+
* Cards display variants passively; product pages use this hook.
|
|
3912
|
+
*/
|
|
3913
|
+
|
|
3914
|
+
interface UseVariantSelectionOptions {
|
|
3915
|
+
options?: ProductOption[];
|
|
3916
|
+
variants?: ProductVariant[];
|
|
3917
|
+
initialSelections?: Record<string, string>;
|
|
3918
|
+
onVariantChange?: (variant: ProductVariant | null, selections: Record<string, string>) => void;
|
|
3919
|
+
}
|
|
3920
|
+
interface UseVariantSelectionReturn {
|
|
3921
|
+
selections: Record<string, string>;
|
|
3922
|
+
setSelection: (optionName: string, value: string) => void;
|
|
3923
|
+
resetSelections: () => void;
|
|
3924
|
+
selectedVariant: ProductVariant | null;
|
|
3925
|
+
availableValues: Record<string, {
|
|
3926
|
+
value: string;
|
|
3927
|
+
available: boolean;
|
|
3928
|
+
}[]>;
|
|
3929
|
+
isComplete: boolean;
|
|
3930
|
+
effectivePrice: number | null;
|
|
3931
|
+
effectiveComparePrice: number | null;
|
|
3932
|
+
}
|
|
3933
|
+
declare function useVariantSelection({ options, variants, initialSelections, onVariantChange, }?: UseVariantSelectionOptions): UseVariantSelectionReturn;
|
|
3934
|
+
|
|
3935
|
+
/**
|
|
3936
|
+
* useProductAnalytics – analytics event binding hook for custom components
|
|
3937
|
+
*
|
|
3938
|
+
* Returns event handler props ready to spread onto any element, plus imperative
|
|
3939
|
+
* tracking methods. Builds on existing useAnalytics infrastructure.
|
|
3940
|
+
*/
|
|
3941
|
+
|
|
3942
|
+
interface UseProductAnalyticsOptions {
|
|
3943
|
+
client: SeekoraClient;
|
|
3944
|
+
product: ProductItem;
|
|
3945
|
+
position?: number;
|
|
3946
|
+
section?: string;
|
|
3947
|
+
tabId?: string;
|
|
3948
|
+
query?: string;
|
|
3949
|
+
context?: SearchContext | Partial<SearchContext>;
|
|
3950
|
+
enabled?: boolean;
|
|
3951
|
+
}
|
|
3952
|
+
interface UseProductAnalyticsReturn {
|
|
3953
|
+
/** Spread onto any clickable element to track product click */
|
|
3954
|
+
clickProps: {
|
|
3955
|
+
onClick: (e?: React.MouseEvent) => void;
|
|
3956
|
+
'data-seekora-product-id': string;
|
|
3957
|
+
'data-seekora-position': number;
|
|
3958
|
+
};
|
|
3959
|
+
/** Spread onto any element to track variant selection */
|
|
3960
|
+
variantSelectProps: (optionName: string, value: string) => {
|
|
3961
|
+
onClick: (e?: React.MouseEvent) => void;
|
|
3962
|
+
'data-seekora-variant-option': string;
|
|
3963
|
+
'data-seekora-variant-value': string;
|
|
3964
|
+
};
|
|
3965
|
+
/** Spread onto any element to track add-to-cart */
|
|
3966
|
+
addToCartProps: (variant?: ProductVariant) => {
|
|
3967
|
+
onClick: (e?: React.MouseEvent) => void;
|
|
3968
|
+
'data-seekora-action': 'add-to-cart';
|
|
3969
|
+
};
|
|
3970
|
+
/** Spread onto any element to track impression (uses IntersectionObserver) */
|
|
3971
|
+
impressionRef: React.RefCallback<HTMLElement>;
|
|
3972
|
+
/** Imperative: track product click */
|
|
3973
|
+
trackClick: () => void;
|
|
3974
|
+
/** Imperative: track variant select */
|
|
3975
|
+
trackVariantSelect: (optionName: string, value: string) => void;
|
|
3976
|
+
/** Imperative: track add to cart */
|
|
3977
|
+
trackAddToCart: (variant?: ProductVariant) => void;
|
|
3978
|
+
/** Imperative: track custom event with product context */
|
|
3979
|
+
trackCustomEvent: (eventName: string, metadata?: Record<string, any>) => void;
|
|
3980
|
+
}
|
|
3981
|
+
declare function useProductAnalytics({ client, product, position, section, tabId, query, context, enabled, }: UseProductAnalyticsOptions): UseProductAnalyticsReturn;
|
|
3982
|
+
|
|
3526
3983
|
/**
|
|
3527
3984
|
* Default Theme
|
|
3528
3985
|
*/
|
|
@@ -3660,5 +4117,5 @@ declare function updateSuggestionsStyles(theme: SuggestionsThemeVariables): void
|
|
|
3660
4117
|
|
|
3661
4118
|
declare const createTheme: (config: ThemeConfig) => _seekora_ai_ui_sdk_types.Theme;
|
|
3662
4119
|
|
|
3663
|
-
export { AmazonDropdown, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, ImageDisplay, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem$1 as SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsCache, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, parseHighlightMarkup, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext };
|
|
3664
|
-
export type { AnalyticsConfig, AnalyticsEventPayload, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoriesTabsProps, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DocSearchAction, DocSearchButtonProps, DocSearchHit, DocSearchProps, DocSearchResponse, DocSearchState, DocSearchSuggestion, DocSearchSuggestionsResponse, DocSearchTranslations, DropdownClassNames, DropdownEventHandlers, DropdownPanelProps, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, GenericItem, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightMarkupOptions, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, ImageDisplayProps, ImageDisplayVariant, InfiniteHitsProps, InfiniteHitsTheme, ImageDisplayVariant$1 as ItemCardImageVariant, ItemCardProps, ItemGridProps, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, ProductCardImageVariant, ProductCardProps, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, ProductGalleryProps, ProductGridProps, ProductInfoProps, ProductRecommendationsProps, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RecentSearchesListProps, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RefinementInput, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchInputProps, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SearchSource, SectionConfig, SectionErrorProps, SectionItemGridProps, SectionLoadingProps, SectionSearchContextValue, SectionSearchProviderProps, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItemProps, SuggestionListProps, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsContextValue, SuggestionsDropdownCompositionProps, SuggestionsErrorProps, SuggestionsLoadingProps, SuggestionsProviderProps, SuggestionsThemeVariables, TrendingItemsProps, TrendingListProps, UseAnalyticsOptions, UseAnalyticsReturn, UseSeekoraSearchOptions$1 as UseDocSearchSeekoraSearchOptions, UseSeekoraSearchResult as UseDocSearchSeekoraSearchResult, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn };
|
|
4120
|
+
export { ActionButtons, AmazonDropdown, AnalyticsProvider, BadgeList, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, ImageDisplay, ImageZoom, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, PriceDisplay, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RatingDisplay, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem$1 as SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsCache, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, VariantSelector, VariantSwatches, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBadges, extractBrand, extractCategory, extractProduct, extractSuggestion, findVariantBySelections, formatParsedFilters, formatPriceRange, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getAvailableValuesForOption, getPriceRange, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, parseHighlightMarkup, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useAnalyticsProvider, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useProductAnalytics, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext, useVariantSelection, withAnalytics };
|
|
4121
|
+
export type { ActionButton, ActionButtonType, ActionButtonsProps, AnalyticsConfig, AnalyticsEventPayload, AnalyticsProviderProps, BadgeListProps, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoriesTabsProps, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DocSearchAction, DocSearchButtonProps, DocSearchHit, DocSearchProps, DocSearchResponse, DocSearchState, DocSearchSuggestion, DocSearchSuggestionsResponse, DocSearchTranslations, DropdownClassNames, DropdownEventHandlers, DropdownPanelProps, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, GenericItem, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightMarkupOptions, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, ImageDisplayProps, ImageDisplayVariant, ImageZoomMode, ImageZoomProps, InfiniteHitsProps, InfiniteHitsTheme, ImageDisplayVariant$1 as ItemCardImageVariant, ItemCardProps, ItemGridProps, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, PriceDisplayProps, ProductCardImageVariant, ProductCardProps, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, ProductGalleryProps, ProductGridProps, ProductInfoProps, ProductRecommendationsProps, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RatingDisplayProps, RatingSize, RatingVariant, RecentSearchesListProps, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RefinementInput, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchInputProps, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SearchSource, SectionConfig, SectionErrorProps, SectionItemGridProps, SectionLoadingProps, SectionSearchContextValue, SectionSearchProviderProps, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItemProps, SuggestionListProps, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsContextValue, SuggestionsDropdownCompositionProps, SuggestionsErrorProps, SuggestionsLoadingProps, SuggestionsProviderProps, SuggestionsThemeVariables, TrendingItemsProps, TrendingListProps, UseAnalyticsOptions, UseAnalyticsReturn, UseSeekoraSearchOptions$1 as UseDocSearchSeekoraSearchOptions, UseSeekoraSearchResult as UseDocSearchSeekoraSearchResult, UseProductAnalyticsOptions, UseProductAnalyticsReturn, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn, UseVariantSelectionOptions, UseVariantSelectionReturn, VariantSelectorProps, VariantSwatchesProps, WithAnalyticsConfig, WithAnalyticsInjectedProps };
|