@envive-ai/react-toolkit 0.1.6 → 0.1.8
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/Accordion/index.cjs +6 -5
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Accordion/index.js +4 -2
- package/dist/AppliedFiltersScrollbar/index.cjs +50 -0
- package/dist/AppliedFiltersScrollbar/index.d.cts +22 -0
- package/dist/AppliedFiltersScrollbar/index.d.ts +22 -0
- package/dist/AppliedFiltersScrollbar/index.js +46 -0
- package/dist/ButtonBase/index.cjs +4 -4
- package/dist/ButtonBase/index.d.cts +3 -3
- package/dist/ButtonBase/index.d.ts +3 -3
- package/dist/ButtonBase/index.js +4 -4
- package/dist/{ButtonBase-BIAu5fIG.js → ButtonBase-DGbSm0SJ.js} +1 -1
- package/dist/{ButtonBase-DcyxOe2v.cjs → ButtonBase-DGpQBeLR.cjs} +1 -1
- package/dist/DynamicFiltersScrollbar/index.cjs +38 -0
- package/dist/DynamicFiltersScrollbar/index.d.cts +28 -0
- package/dist/DynamicFiltersScrollbar/index.d.ts +28 -0
- package/dist/DynamicFiltersScrollbar/index.js +34 -0
- package/dist/{DynamicFiltersScrollbar-BmPTqym5.js → DynamicFiltersScrollbar-CCwh0QW4.js} +1 -1
- package/dist/{DynamicFiltersScrollbar-BTopFhyl.cjs → DynamicFiltersScrollbar-U9-CmTKd.cjs} +1 -1
- package/dist/FilterScrollbar/index.cjs +3 -3
- package/dist/FilterScrollbar/index.d.cts +4 -4
- package/dist/FilterScrollbar/index.d.ts +4 -4
- package/dist/FilterScrollbar/index.js +3 -3
- package/dist/Headline/index.cjs +2 -2
- package/dist/Headline/index.d.cts +2 -2
- package/dist/Headline/index.d.ts +2 -2
- package/dist/Headline/index.js +2 -2
- package/dist/{Headline-XpaAeTSR.js → Headline-BkOW1lQj.js} +1 -1
- package/dist/{Headline-iP_MckEO.cjs → Headline-QpruZlcg.cjs} +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ProductCard/index.cjs +4 -4
- package/dist/ProductCard/index.d.cts +2 -3
- package/dist/ProductCard/index.d.ts +2 -3
- package/dist/ProductCard/index.js +4 -4
- package/dist/{ProductCard-DZZKutY-.cjs → ProductCard-BYjPKgX3.cjs} +2 -2
- package/dist/{ProductCard-SF8-lXlT.js → ProductCard-DCFMFwCH.js} +2 -2
- package/dist/ProductGrid/index.cjs +5 -5
- package/dist/ProductGrid/index.d.cts +6 -5
- package/dist/ProductGrid/index.d.ts +6 -5
- package/dist/ProductGrid/index.js +5 -5
- package/dist/{ProductGrid-DTUhH219.js → ProductGrid-BoJzUK_H.js} +3 -28
- package/dist/{ProductGrid-BSSmPr7K.cjs → ProductGrid-CJmmGxBQ.cjs} +3 -28
- package/dist/SearchFilter/index.cjs +4 -4
- package/dist/SearchFilter/index.d.cts +71 -2
- package/dist/SearchFilter/index.d.ts +71 -2
- package/dist/SearchFilter/index.js +4 -4
- package/dist/{SearchFilter-B15tybnV.cjs → SearchFilter-B8jliRly.cjs} +8 -5
- package/dist/{SearchFilter-D427M2UE.js → SearchFilter-Da6SL9mU.js} +8 -5
- package/dist/SearchInput/index.cjs +3 -3
- package/dist/SearchInput/index.d.cts +4 -4
- package/dist/SearchInput/index.d.ts +4 -4
- package/dist/SearchInput/index.js +3 -3
- package/dist/{SearchInput-D6UW79wT.cjs → SearchInput-BFlu_3iT.cjs} +1 -1
- package/dist/{SearchInput-C0wB4hSV.js → SearchInput-DxDC1mcq.js} +1 -1
- package/dist/SearchInputForm/index.cjs +3 -3
- package/dist/SearchInputForm/index.d.cts +1 -1
- package/dist/SearchInputForm/index.d.ts +1 -1
- package/dist/SearchInputForm/index.js +3 -3
- package/dist/SearchResultsContent/index.cjs +64 -0
- package/dist/SearchResultsContent/index.d.cts +65 -0
- package/dist/SearchResultsContent/index.d.ts +65 -0
- package/dist/SearchResultsContent/index.js +60 -0
- package/dist/SearchResultsFilterSidebar/index.cjs +5 -6
- package/dist/SearchResultsFilterSidebar/index.d.cts +2 -3
- package/dist/SearchResultsFilterSidebar/index.d.ts +2 -3
- package/dist/SearchResultsFilterSidebar/index.js +5 -6
- package/dist/SearchResultsStates/index.cjs +13 -122
- package/dist/SearchResultsStates/index.d.cts +7 -9
- package/dist/SearchResultsStates/index.d.ts +7 -9
- package/dist/SearchResultsStates/index.js +10 -113
- package/dist/SearchResultsStates-CEi_RHna.js +112 -0
- package/dist/SearchResultsStates-CJYgUA66.cjs +134 -0
- package/dist/SparkleAnimation/index.cjs +1 -1
- package/dist/SparkleAnimation/index.d.cts +2 -2
- package/dist/SparkleAnimation/index.d.ts +2 -2
- package/dist/SparkleAnimation/index.js +1 -1
- package/dist/{SparkleAnimation-BhyeL26m.cjs → SparkleAnimation-BY5iw7s0.cjs} +5 -5
- package/dist/{SparkleAnimation-BdOjC8l-.js → SparkleAnimation-fQHP7b-R.js} +1 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/SuggestionButton/index.cjs +9 -9
- package/dist/SuggestionButton/index.d.cts +3 -3
- package/dist/SuggestionButton/index.d.ts +3 -3
- package/dist/SuggestionButton/index.js +5 -5
- package/dist/Text/index.cjs +3 -3
- package/dist/Text/index.d.cts +3 -3
- package/dist/Text/index.d.ts +3 -3
- package/dist/Text/index.js +3 -3
- package/dist/{Text-BMg3d10t.js → Text-Bod4OMPk.js} +1 -1
- package/dist/{Text-CgOYTs8D.cjs → Text-MQjxqgZZ.cjs} +1 -1
- package/dist/TextInput/index.cjs +2 -2
- package/dist/TextInput/index.d.cts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +2 -2
- package/dist/{TextInput-CRMqBW3X.js → TextInput-BFPXhSAY.js} +1 -1
- package/dist/{TextInput-C6fF9cSB.cjs → TextInput-DLSgpP6b.cjs} +1 -1
- package/dist/{index-CcnuEYQN.d.ts → index-BCqBaFxm.d.cts} +10 -60
- package/dist/{index-BHNzU-Pc.d.ts → index-B_tehqNH.d.ts} +2 -2
- package/dist/{index-BNCrvswP.d.cts → index-D4n-kZvz.d.cts} +2 -2
- package/dist/{index-B0oln9VD.d.ts → index-D8gHW7ox.d.ts} +5 -16
- package/dist/{index-wYn2mEDm.d.cts → index-DO4ksBrm.d.ts} +10 -60
- package/dist/{index-CQlBDGTL.d.cts → index-DV2K-9lE.d.cts} +5 -16
- package/package.json +15 -2
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/AppliedFiltersScrollbar/index.ts +1 -0
- package/src/components/ButtonBase/types.ts +1 -1
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +1 -1
- package/src/components/DynamicFiltersScrollbar/index.ts +1 -0
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +3 -4
- package/src/components/ProductCard/ProductCardSkeleton.tsx +1 -7
- package/src/components/ProductCard/types.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +3 -2
- package/src/components/SearchFilter/SearchFilter.tsx +4 -4
- package/src/components/SearchFilter/index.ts +0 -1
- package/src/components/SearchFilter/types.ts +22 -26
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +1 -1
- package/src/components/SearchResultsContent/index.ts +2 -0
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +5 -4
- package/src/components/SearchResultsFilterSidebar/types.ts +0 -13
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +2 -1
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +1 -1
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +1 -1
- package/src/components/SuggestionButton/SuggestionButton.tsx +3 -3
- package/dist/index-B125udRj.d.cts +0 -78
- package/dist/index-DMXTg_9L.d.ts +0 -78
- package/dist/types-BQYpWDJ4.d.cts +0 -6
- package/dist/types-Bm-qQyO3.d.ts +0 -8
- package/dist/types-BruEHw-X.d.ts +0 -6
- package/dist/types-C-Jrlw5Z.d.cts +0 -8
- /package/dist/{ButtonBase-BRfuPPzN.js → ButtonBase-C_uKnl48.js} +0 -0
- /package/dist/{ButtonBase-BleAVeo-.cjs → ButtonBase-DbWQ25n-.cjs} +0 -0
- /package/dist/{Text-CV9pv8ds.js → Text-BMsncrpY.js} +0 -0
- /package/dist/{Text-DDT3sqY1.cjs → Text-C8t_iEj6.cjs} +0 -0
- /package/dist/{textVariantClasses-C8OCWZAw.d.ts → textVariantClasses-B0gNjzl4.d.cts} +0 -0
- /package/dist/{textVariantClasses-CnjwO2Fv.js → textVariantClasses-D77TGEy1.js} +0 -0
- /package/dist/{textVariantClasses-BnV4wXaw.cjs → textVariantClasses-Dgz7Zaql.cjs} +0 -0
- /package/dist/{textVariantClasses-Cdg-UUHi.d.cts → textVariantClasses-ypYGLq0h.d.ts} +0 -0
|
@@ -1,53 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
|
+
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
2
3
|
import { FC } from "react";
|
|
3
|
-
import
|
|
4
|
+
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
4
5
|
|
|
5
|
-
//#region src/config/chatElementDisplayLocation.d.ts
|
|
6
|
-
declare enum ChatElementDisplayLocation {
|
|
7
|
-
IN_CHAT = "in_chat",
|
|
8
|
-
CHAT_PREVIEW = "chat_preview",
|
|
9
|
-
FLOATING_BUTTON = "floating_button",
|
|
10
|
-
HELP_ME_CHOOSE = "help_me_choose",
|
|
11
|
-
PLP_IMAGE_BANNER = "plp_image_banner",
|
|
12
|
-
TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
|
|
13
|
-
BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
|
|
14
|
-
BLOCK_BACK_BUTTON = "block_back_button",
|
|
15
|
-
SWITCH_TO_AGENT = "switch_to_agent",
|
|
16
|
-
CONVERSATIONAL_SEARCH = "conversational_search",
|
|
17
|
-
GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
|
|
18
|
-
SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
|
|
19
|
-
SEARCH_PROMPT = "search_prompt",
|
|
20
|
-
SEARCH_PROMPT_BUTTON = "search_prompt_button",
|
|
21
|
-
PRODUCT_GRID = "product_grid",
|
|
22
|
-
UNSPECIFIED = "unspecified",
|
|
23
|
-
FILTER_MODAL = "filter_modal",
|
|
24
|
-
PROMPT_CARD = "prompt_card",
|
|
25
|
-
WINDOW_API_CALL = "window_api_call",
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/types/external.d.ts
|
|
29
|
-
declare enum ResponseCategory {
|
|
30
|
-
Product = "product",
|
|
31
|
-
}
|
|
32
|
-
interface SearchResponseProduct {
|
|
33
|
-
id: string;
|
|
34
|
-
title: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
price?: number;
|
|
37
|
-
currency?: string;
|
|
38
|
-
imageUrl?: string;
|
|
39
|
-
brand?: string;
|
|
40
|
-
category?: string;
|
|
41
|
-
availability?: string;
|
|
42
|
-
url: string;
|
|
43
|
-
responseId?: string;
|
|
44
|
-
originalPrice?: number;
|
|
45
|
-
salePrice?: number;
|
|
46
|
-
averageRating?: number;
|
|
47
|
-
numberReviews?: number;
|
|
48
|
-
[key: string]: unknown;
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
6
|
//#region src/util/trim.d.ts
|
|
52
7
|
/**
|
|
53
8
|
* Remove spaces from the left side.
|
|
@@ -270,7 +225,7 @@ type ProductGridVariant = 'standard' | 'square';
|
|
|
270
225
|
type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
|
|
271
226
|
type ProductCardHoverVariant = 'backgroundDark' | 'none';
|
|
272
227
|
type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
|
|
273
|
-
type ProductCardImageAspectRatio = '
|
|
228
|
+
type ProductCardImageAspectRatio = '3:4' | 'square' | 'none';
|
|
274
229
|
interface ProductCardConfig {
|
|
275
230
|
variant: ProductCardVariant;
|
|
276
231
|
hoverVariant: ProductCardHoverVariant;
|
|
@@ -281,7 +236,7 @@ interface SearchResponseProductAttributes {
|
|
|
281
236
|
category: ResponseCategory.Product;
|
|
282
237
|
attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
|
|
283
238
|
}
|
|
284
|
-
interface ProductCardSkeletonProps
|
|
239
|
+
interface ProductCardSkeletonProps {
|
|
285
240
|
layoutVariant: ProductCardLayoutVariant;
|
|
286
241
|
aspectRatio: ProductCardImageAspectRatio;
|
|
287
242
|
growWithContainer?: boolean;
|
|
@@ -306,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
306
261
|
stars,
|
|
307
262
|
reviewCount,
|
|
308
263
|
className
|
|
309
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime15.JSX.Element;
|
|
310
265
|
interface PriceSectionProps {
|
|
311
266
|
originalPrice?: string;
|
|
312
267
|
salePrice?: string;
|
|
@@ -316,7 +271,7 @@ declare const PriceSection: ({
|
|
|
316
271
|
originalPrice,
|
|
317
272
|
salePrice,
|
|
318
273
|
pricePrefix
|
|
319
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime15.JSX.Element;
|
|
320
275
|
interface ProductCardProps extends TestProps {
|
|
321
276
|
productCardConfig?: ProductCardConfig;
|
|
322
277
|
merchantShortName: string;
|
|
@@ -324,7 +279,7 @@ interface ProductCardProps extends TestProps {
|
|
|
324
279
|
url: string;
|
|
325
280
|
searchResponseId?: string;
|
|
326
281
|
productResponseId?: string;
|
|
327
|
-
cardDisplayLocation:
|
|
282
|
+
cardDisplayLocation: string;
|
|
328
283
|
imageUrl?: string;
|
|
329
284
|
originalPrice?: number;
|
|
330
285
|
averageRating?: number;
|
|
@@ -357,14 +312,9 @@ declare const ProductCard: ({
|
|
|
357
312
|
aspectRatio,
|
|
358
313
|
growWithContainer,
|
|
359
314
|
handleClick
|
|
360
|
-
}: ProductCardProps) =>
|
|
315
|
+
}: ProductCardProps) => react_jsx_runtime15.JSX.Element;
|
|
361
316
|
//#endregion
|
|
362
317
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
363
|
-
interface ProductCardSkeletonProps {
|
|
364
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
365
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
366
|
-
growWithContainer?: boolean;
|
|
367
|
-
}
|
|
368
318
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
369
319
|
//#endregion
|
|
370
320
|
//#region src/components/ProductCard/productCardVariants.d.ts
|
|
@@ -376,4 +326,4 @@ declare const variantHoverClassMap: Map<ProductCardHoverVariant, string[]>;
|
|
|
376
326
|
declare const variantTitleColorMap: Map<ProductCardVariant, string>;
|
|
377
327
|
declare const productCardLayoutVariantClasses: Record<ProductCardLayoutVariant, Record<string, string[]>>;
|
|
378
328
|
//#endregion
|
|
379
|
-
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps
|
|
329
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, RatingSummaryProps, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SearchInputForm/types.d.ts
|
|
4
4
|
type SearchInputVariant = 'standard';
|
|
@@ -31,6 +31,6 @@ declare const SearchInputForm: ({
|
|
|
31
31
|
onSearchInputChange,
|
|
32
32
|
onSearchSubmit,
|
|
33
33
|
searchInputDataTestId
|
|
34
|
-
}: SearchInputFormProps) =>
|
|
34
|
+
}: SearchInputFormProps) => react_jsx_runtime9.JSX.Element;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { SearchInputForm, SearchInputVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SearchInputForm/types.d.ts
|
|
4
4
|
type SearchInputVariant = 'standard';
|
|
@@ -31,6 +31,6 @@ declare const SearchInputForm: ({
|
|
|
31
31
|
onSearchInputChange,
|
|
32
32
|
onSearchSubmit,
|
|
33
33
|
searchInputDataTestId
|
|
34
|
-
}: SearchInputFormProps) =>
|
|
34
|
+
}: SearchInputFormProps) => react_jsx_runtime13.JSX.Element;
|
|
35
35
|
//#endregion
|
|
36
36
|
export { SearchInputForm, SearchInputVariant };
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
|
+
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
5
5
|
type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
|
|
6
6
|
type CloseIconVariant = 'light' | 'tertiary' | 'dark';
|
|
7
|
-
type SearchFilter = {
|
|
8
|
-
id: string;
|
|
9
|
-
displayName: string;
|
|
10
|
-
items: SearchFilterItem[];
|
|
11
|
-
};
|
|
12
|
-
type SearchFilterItem = {
|
|
13
|
-
id: string;
|
|
14
|
-
displayName: string;
|
|
15
|
-
value: string;
|
|
16
|
-
isSelected: boolean;
|
|
17
|
-
};
|
|
18
7
|
//#endregion
|
|
19
8
|
//#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts
|
|
20
9
|
interface SearchFilterSidebarVariantClasses {
|
|
@@ -37,7 +26,7 @@ type SearchResultsFilterProps = {
|
|
|
37
26
|
productCount: number;
|
|
38
27
|
isOpen: boolean;
|
|
39
28
|
setIsOpen: (isOpen: boolean) => void;
|
|
40
|
-
searchFilters:
|
|
29
|
+
searchFilters: SearchFilterDatum[];
|
|
41
30
|
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
42
31
|
searchText: string;
|
|
43
32
|
onSelectFilterItem: SelectFilterItem;
|
|
@@ -53,6 +42,6 @@ declare const SearchResultsFilter: ({
|
|
|
53
42
|
onSelectFilterItem,
|
|
54
43
|
onClearAllFilters,
|
|
55
44
|
filterButtonText
|
|
56
|
-
}: SearchResultsFilterProps) =>
|
|
45
|
+
}: SearchResultsFilterProps) => react_jsx_runtime15.JSX.Element;
|
|
57
46
|
//#endregion
|
|
58
|
-
export { CloseIconVariant,
|
|
47
|
+
export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
@@ -1,53 +1,8 @@
|
|
|
1
|
-
import { TestProps } from "./types-BQYpWDJ4.cjs";
|
|
2
|
-
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
1
|
import { FC } from "react";
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
|
+
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
4
|
+
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
4
5
|
|
|
5
|
-
//#region src/config/chatElementDisplayLocation.d.ts
|
|
6
|
-
declare enum ChatElementDisplayLocation {
|
|
7
|
-
IN_CHAT = "in_chat",
|
|
8
|
-
CHAT_PREVIEW = "chat_preview",
|
|
9
|
-
FLOATING_BUTTON = "floating_button",
|
|
10
|
-
HELP_ME_CHOOSE = "help_me_choose",
|
|
11
|
-
PLP_IMAGE_BANNER = "plp_image_banner",
|
|
12
|
-
TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
|
|
13
|
-
BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
|
|
14
|
-
BLOCK_BACK_BUTTON = "block_back_button",
|
|
15
|
-
SWITCH_TO_AGENT = "switch_to_agent",
|
|
16
|
-
CONVERSATIONAL_SEARCH = "conversational_search",
|
|
17
|
-
GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
|
|
18
|
-
SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
|
|
19
|
-
SEARCH_PROMPT = "search_prompt",
|
|
20
|
-
SEARCH_PROMPT_BUTTON = "search_prompt_button",
|
|
21
|
-
PRODUCT_GRID = "product_grid",
|
|
22
|
-
UNSPECIFIED = "unspecified",
|
|
23
|
-
FILTER_MODAL = "filter_modal",
|
|
24
|
-
PROMPT_CARD = "prompt_card",
|
|
25
|
-
WINDOW_API_CALL = "window_api_call",
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/types/external.d.ts
|
|
29
|
-
declare enum ResponseCategory {
|
|
30
|
-
Product = "product",
|
|
31
|
-
}
|
|
32
|
-
interface SearchResponseProduct {
|
|
33
|
-
id: string;
|
|
34
|
-
title: string;
|
|
35
|
-
description?: string;
|
|
36
|
-
price?: number;
|
|
37
|
-
currency?: string;
|
|
38
|
-
imageUrl?: string;
|
|
39
|
-
brand?: string;
|
|
40
|
-
category?: string;
|
|
41
|
-
availability?: string;
|
|
42
|
-
url: string;
|
|
43
|
-
responseId?: string;
|
|
44
|
-
originalPrice?: number;
|
|
45
|
-
salePrice?: number;
|
|
46
|
-
averageRating?: number;
|
|
47
|
-
numberReviews?: number;
|
|
48
|
-
[key: string]: unknown;
|
|
49
|
-
}
|
|
50
|
-
//#endregion
|
|
51
6
|
//#region src/util/trim.d.ts
|
|
52
7
|
/**
|
|
53
8
|
* Remove spaces from the left side.
|
|
@@ -270,7 +225,7 @@ type ProductGridVariant = 'standard' | 'square';
|
|
|
270
225
|
type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparentBordered';
|
|
271
226
|
type ProductCardHoverVariant = 'backgroundDark' | 'none';
|
|
272
227
|
type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
|
|
273
|
-
type ProductCardImageAspectRatio = '
|
|
228
|
+
type ProductCardImageAspectRatio = '3:4' | 'square' | 'none';
|
|
274
229
|
interface ProductCardConfig {
|
|
275
230
|
variant: ProductCardVariant;
|
|
276
231
|
hoverVariant: ProductCardHoverVariant;
|
|
@@ -281,7 +236,7 @@ interface SearchResponseProductAttributes {
|
|
|
281
236
|
category: ResponseCategory.Product;
|
|
282
237
|
attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
|
|
283
238
|
}
|
|
284
|
-
interface ProductCardSkeletonProps
|
|
239
|
+
interface ProductCardSkeletonProps {
|
|
285
240
|
layoutVariant: ProductCardLayoutVariant;
|
|
286
241
|
aspectRatio: ProductCardImageAspectRatio;
|
|
287
242
|
growWithContainer?: boolean;
|
|
@@ -306,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
306
261
|
stars,
|
|
307
262
|
reviewCount,
|
|
308
263
|
className
|
|
309
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime16.JSX.Element;
|
|
310
265
|
interface PriceSectionProps {
|
|
311
266
|
originalPrice?: string;
|
|
312
267
|
salePrice?: string;
|
|
@@ -316,7 +271,7 @@ declare const PriceSection: ({
|
|
|
316
271
|
originalPrice,
|
|
317
272
|
salePrice,
|
|
318
273
|
pricePrefix
|
|
319
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime16.JSX.Element;
|
|
320
275
|
interface ProductCardProps extends TestProps {
|
|
321
276
|
productCardConfig?: ProductCardConfig;
|
|
322
277
|
merchantShortName: string;
|
|
@@ -324,7 +279,7 @@ interface ProductCardProps extends TestProps {
|
|
|
324
279
|
url: string;
|
|
325
280
|
searchResponseId?: string;
|
|
326
281
|
productResponseId?: string;
|
|
327
|
-
cardDisplayLocation:
|
|
282
|
+
cardDisplayLocation: string;
|
|
328
283
|
imageUrl?: string;
|
|
329
284
|
originalPrice?: number;
|
|
330
285
|
averageRating?: number;
|
|
@@ -357,14 +312,9 @@ declare const ProductCard: ({
|
|
|
357
312
|
aspectRatio,
|
|
358
313
|
growWithContainer,
|
|
359
314
|
handleClick
|
|
360
|
-
}: ProductCardProps) =>
|
|
315
|
+
}: ProductCardProps) => react_jsx_runtime16.JSX.Element;
|
|
361
316
|
//#endregion
|
|
362
317
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
363
|
-
interface ProductCardSkeletonProps {
|
|
364
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
365
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
366
|
-
growWithContainer?: boolean;
|
|
367
|
-
}
|
|
368
318
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
369
319
|
//#endregion
|
|
370
320
|
//#region src/components/ProductCard/productCardVariants.d.ts
|
|
@@ -376,4 +326,4 @@ declare const variantHoverClassMap: Map<ProductCardHoverVariant, string[]>;
|
|
|
376
326
|
declare const variantTitleColorMap: Map<ProductCardVariant, string>;
|
|
377
327
|
declare const productCardLayoutVariantClasses: Record<ProductCardLayoutVariant, Record<string, string[]>>;
|
|
378
328
|
//#endregion
|
|
379
|
-
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps
|
|
329
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, RatingSummaryProps, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
2
|
+
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
5
5
|
type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
|
|
6
6
|
type CloseIconVariant = 'light' | 'tertiary' | 'dark';
|
|
7
|
-
type SearchFilter = {
|
|
8
|
-
id: string;
|
|
9
|
-
displayName: string;
|
|
10
|
-
items: SearchFilterItem[];
|
|
11
|
-
};
|
|
12
|
-
type SearchFilterItem = {
|
|
13
|
-
id: string;
|
|
14
|
-
displayName: string;
|
|
15
|
-
value: string;
|
|
16
|
-
isSelected: boolean;
|
|
17
|
-
};
|
|
18
7
|
//#endregion
|
|
19
8
|
//#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts
|
|
20
9
|
interface SearchFilterSidebarVariantClasses {
|
|
@@ -37,7 +26,7 @@ type SearchResultsFilterProps = {
|
|
|
37
26
|
productCount: number;
|
|
38
27
|
isOpen: boolean;
|
|
39
28
|
setIsOpen: (isOpen: boolean) => void;
|
|
40
|
-
searchFilters:
|
|
29
|
+
searchFilters: SearchFilterDatum[];
|
|
41
30
|
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
42
31
|
searchText: string;
|
|
43
32
|
onSelectFilterItem: SelectFilterItem;
|
|
@@ -53,6 +42,6 @@ declare const SearchResultsFilter: ({
|
|
|
53
42
|
onSelectFilterItem,
|
|
54
43
|
onClearAllFilters,
|
|
55
44
|
filterButtonText
|
|
56
|
-
}: SearchResultsFilterProps) =>
|
|
45
|
+
}: SearchResultsFilterProps) => react_jsx_runtime23.JSX.Element;
|
|
57
46
|
//#endregion
|
|
58
|
-
export { CloseIconVariant,
|
|
47
|
+
export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envive-ai/react-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "React component library for Envive services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepublish": "npm run build"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@envive-ai/react-hooks": "^0.1.
|
|
27
|
+
"@envive-ai/react-hooks": "^0.1.3",
|
|
28
28
|
"@envive-ai/react-icons": "0.1.1",
|
|
29
29
|
"classnames": "^2.5.1",
|
|
30
30
|
"framer-motion": "^12.23.12",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"react-dom": "^18.3.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
+
"@types/react": "^19.1.12",
|
|
39
40
|
"tsdown": "^0.14.2",
|
|
40
41
|
"typescript": "~5.8.3"
|
|
41
42
|
},
|
|
@@ -44,10 +45,18 @@
|
|
|
44
45
|
"import": "./dist/Accordion/index.js",
|
|
45
46
|
"require": "./dist/Accordion/index.cjs"
|
|
46
47
|
},
|
|
48
|
+
"./AppliedFiltersScrollbar": {
|
|
49
|
+
"import": "./dist/AppliedFiltersScrollbar/index.js",
|
|
50
|
+
"require": "./dist/AppliedFiltersScrollbar/index.cjs"
|
|
51
|
+
},
|
|
47
52
|
"./ButtonBase": {
|
|
48
53
|
"import": "./dist/ButtonBase/index.js",
|
|
49
54
|
"require": "./dist/ButtonBase/index.cjs"
|
|
50
55
|
},
|
|
56
|
+
"./DynamicFiltersScrollbar": {
|
|
57
|
+
"import": "./dist/DynamicFiltersScrollbar/index.js",
|
|
58
|
+
"require": "./dist/DynamicFiltersScrollbar/index.cjs"
|
|
59
|
+
},
|
|
51
60
|
"./FilterScrollbar": {
|
|
52
61
|
"import": "./dist/FilterScrollbar/index.js",
|
|
53
62
|
"require": "./dist/FilterScrollbar/index.cjs"
|
|
@@ -84,6 +93,10 @@
|
|
|
84
93
|
"import": "./dist/SearchInputForm/index.js",
|
|
85
94
|
"require": "./dist/SearchInputForm/index.cjs"
|
|
86
95
|
},
|
|
96
|
+
"./SearchResultsContent": {
|
|
97
|
+
"import": "./dist/SearchResultsContent/index.js",
|
|
98
|
+
"require": "./dist/SearchResultsContent/index.cjs"
|
|
99
|
+
},
|
|
87
100
|
"./SearchResultsFilterSidebar": {
|
|
88
101
|
"import": "./dist/SearchResultsFilterSidebar/index.js",
|
|
89
102
|
"require": "./dist/SearchResultsFilterSidebar/index.cjs"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { motion } from 'framer-motion';
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { Text } from '
|
|
4
|
+
import { Text } from 'src/components/Text';
|
|
5
5
|
import ChevronDown from '@envive-ai/react-icons/ChevronDown';
|
|
6
6
|
|
|
7
7
|
interface AccordionProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import ScrollContainer from 'react-indiana-drag-scroll';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Text } from 'src/components/Text';
|
|
4
|
+
import { SelectedFilterOption } from '@envive-ai/react-hooks/atoms/search';
|
|
5
5
|
|
|
6
6
|
interface AppliedFiltersScrollbarProps {
|
|
7
7
|
selectedFilterOptions: SelectedFilterOption[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AppliedFiltersScrollbar';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import ScrollContainer from 'react-indiana-drag-scroll';
|
|
3
|
-
import { Text } from '
|
|
3
|
+
import { Text } from 'src/components/Text';
|
|
4
4
|
|
|
5
5
|
interface DynamicFiltersScrollbarProps {
|
|
6
6
|
availableDynamicFilters: { name: string; displayName: string }[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DynamicFiltersScrollbar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { SelectedFilterOption } from '@envive-ai/react-hooks/atoms/search';
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import ScrollContainer from 'react-indiana-drag-scroll';
|
|
3
4
|
import { Text } from 'src/components/Text/Text';
|
|
4
|
-
import type { SelectedFilterOption } from 'src/atoms/search/types';
|
|
5
5
|
|
|
6
6
|
interface AppliedFiltersScrollbarProps {
|
|
7
7
|
selectedFilterOptions: SelectedFilterOption[];
|
|
@@ -6,9 +6,7 @@ import {
|
|
|
6
6
|
productCardLayoutVariantClasses,
|
|
7
7
|
variantTitleColorMap,
|
|
8
8
|
} from './productCardVariants';
|
|
9
|
-
import { ChatElementDisplayLocation } from 'src/config/chatElementDisplayLocation';
|
|
10
9
|
import Logger from 'src/logging/logger';
|
|
11
|
-
import { TestProps } from 'src/test/types';
|
|
12
10
|
import { Headline } from '../Headline';
|
|
13
11
|
import { ImageWithFallback } from '../ImageWithFallback';
|
|
14
12
|
import { Spinner } from '../Spinner';
|
|
@@ -21,13 +19,14 @@ import {
|
|
|
21
19
|
import { Text } from 'src/components/Text/Text';
|
|
22
20
|
import { formatPrice } from 'src/util/formatPrice';
|
|
23
21
|
import { useImageResolver } from '@envive-ai/react-hooks/hooks';
|
|
22
|
+
import { TestProps } from '@envive-ai/react-hooks/types';
|
|
24
23
|
|
|
25
24
|
const formatReviews = (stars: number) =>
|
|
26
25
|
String(
|
|
27
26
|
Number(stars).toLocaleString('en-US', { minimumFractionDigits: 1, maximumFractionDigits: 1 }),
|
|
28
27
|
);
|
|
29
28
|
|
|
30
|
-
interface RatingSummaryProps {
|
|
29
|
+
export interface RatingSummaryProps {
|
|
31
30
|
stars: number;
|
|
32
31
|
reviewCount: number;
|
|
33
32
|
className?: string;
|
|
@@ -118,7 +117,7 @@ interface ProductCardProps extends TestProps {
|
|
|
118
117
|
url: string;
|
|
119
118
|
searchResponseId?: string;
|
|
120
119
|
productResponseId?: string;
|
|
121
|
-
cardDisplayLocation:
|
|
120
|
+
cardDisplayLocation: string;
|
|
122
121
|
imageUrl?: string;
|
|
123
122
|
originalPrice?: number;
|
|
124
123
|
averageRating?: number;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { ProductCardSkeletonOverrides,
|
|
3
|
+
import { ProductCardSkeletonOverrides, ProductCardSkeletonProps } from './types';
|
|
4
4
|
import { productCardLayoutVariantClasses } from './productCardVariants';
|
|
5
5
|
|
|
6
|
-
interface ProductCardSkeletonProps {
|
|
7
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
8
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
9
|
-
growWithContainer?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
6
|
export const ProductCardSkeleton: FC<ProductCardSkeletonProps> = ({
|
|
13
7
|
layoutVariant,
|
|
14
8
|
aspectRatio,
|
|
@@ -18,7 +18,7 @@ export type ProductCardVariant = 'filled' | 'bordered' | 'minimal' | 'transparen
|
|
|
18
18
|
export type ProductCardHoverVariant = 'backgroundDark' | 'none';
|
|
19
19
|
|
|
20
20
|
export type ProductCardLayoutVariant = 'normal' | 'tall' | 'square';
|
|
21
|
-
export type ProductCardImageAspectRatio = '
|
|
21
|
+
export type ProductCardImageAspectRatio = '3:4' | 'square' | 'none';
|
|
22
22
|
|
|
23
23
|
export interface ProductCardConfig {
|
|
24
24
|
variant: ProductCardVariant;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ChatElementDisplayLocation } from 'src/config/chatElementDisplayLocation';
|
|
2
1
|
import { ProductGridVariant, ProductCardConfig, ProductCard } from '../ProductCard';
|
|
3
2
|
import { productGridVariantClasses } from './productGridVariants';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -13,6 +12,7 @@ interface ProductGridProps {
|
|
|
13
12
|
merchantShortName: string;
|
|
14
13
|
searchResponseId: string;
|
|
15
14
|
cardsGrowWithContainer?: boolean;
|
|
15
|
+
cardDisplayLocation: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const ProductGrid = ({
|
|
@@ -23,6 +23,7 @@ export const ProductGrid = ({
|
|
|
23
23
|
merchantShortName,
|
|
24
24
|
searchResponseId,
|
|
25
25
|
cardsGrowWithContainer = true,
|
|
26
|
+
cardDisplayLocation,
|
|
26
27
|
}: ProductGridProps) => {
|
|
27
28
|
const {
|
|
28
29
|
productCardVariant,
|
|
@@ -56,7 +57,7 @@ export const ProductGrid = ({
|
|
|
56
57
|
salePrice={camelCasedProduct.salePrice}
|
|
57
58
|
averageRating={camelCasedProduct.averageRating}
|
|
58
59
|
numberReviews={camelCasedProduct.numberReviews}
|
|
59
|
-
cardDisplayLocation={
|
|
60
|
+
cardDisplayLocation={cardDisplayLocation}
|
|
60
61
|
layoutVariant={productCardLayoutVariant}
|
|
61
62
|
variant={productCardVariant}
|
|
62
63
|
hoverVariant={productCardHoverVariant}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { SearchFilterItem } from './SearchFilterItem';
|
|
3
|
-
import type { SearchFilterProps } from './types';
|
|
4
3
|
import { Text } from 'src/components/Text/Text';
|
|
5
4
|
import { ButtonBase } from 'src/components/ButtonBase/ButtonBase';
|
|
5
|
+
import { SearchFilterProps } from './types';
|
|
6
6
|
|
|
7
7
|
export const SearchFilter = ({
|
|
8
8
|
isOpen,
|
|
@@ -47,15 +47,15 @@ export const SearchFilter = ({
|
|
|
47
47
|
{headerContent}
|
|
48
48
|
<div className="spiffy-tw-flex-1 spiffy-tw-px-4 spiffy-tw-py-6">
|
|
49
49
|
{filters.map((filter) => (
|
|
50
|
-
<div key={filter.
|
|
50
|
+
<div key={filter.filterId} className="spiffy-tw-mb-6">
|
|
51
51
|
<Text variant="body2" className="spiffy-tw-font-medium spiffy-tw-mb-3">
|
|
52
52
|
{filter.displayName}
|
|
53
53
|
</Text>
|
|
54
54
|
<ul>
|
|
55
55
|
{filter.items.map((item) => (
|
|
56
56
|
<SearchFilterItem
|
|
57
|
-
key={item.
|
|
58
|
-
filterItem={item}
|
|
57
|
+
key={item.filterItemId}
|
|
58
|
+
filterItem={{ ...item, filterId: filter.filterId }}
|
|
59
59
|
onSelectFilterItem={selectFilterItem}
|
|
60
60
|
radioButtonFillColor={radioButtonFillColor}
|
|
61
61
|
radioButtonHoverColor={radioButtonHoverColor}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
SearchFilterDatum,
|
|
3
|
+
SearchFilterItemDatum,
|
|
4
|
+
SelectFilterItem,
|
|
5
|
+
} from '@envive-ai/react-hooks/types';
|
|
2
6
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
isSelected: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type SearchFilter = {
|
|
11
|
-
id: string;
|
|
12
|
-
displayName: string;
|
|
13
|
-
items: SearchFilterItem[];
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type SelectFilterItem = (filterItem: SearchFilterItem) => void;
|
|
7
|
+
export interface SearchFilterItem extends SearchFilterItemDatum {
|
|
8
|
+
filterId: string;
|
|
9
|
+
filterItemId: string;
|
|
10
|
+
}
|
|
17
11
|
|
|
18
12
|
export interface SearchFilterItemProps {
|
|
19
13
|
filterItem: SearchFilterItem;
|
|
@@ -30,19 +24,21 @@ export interface SearchFilterHeaderProps {
|
|
|
30
24
|
filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
|
|
31
25
|
}
|
|
32
26
|
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
setIsOpen: (isOpen: boolean) => void;
|
|
36
|
-
filters: SearchFilter[];
|
|
37
|
-
productCount: number;
|
|
27
|
+
export type SearchFilterProps = {
|
|
28
|
+
filters: SearchFilterDatum[];
|
|
38
29
|
selectFilterItem: SelectFilterItem;
|
|
39
30
|
clearAllFilters: () => void;
|
|
31
|
+
productCount: number;
|
|
32
|
+
isOpen: boolean;
|
|
33
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
40
34
|
applyFiltersUnchangedClasses: string;
|
|
41
35
|
applyFiltersChangedClasses: string;
|
|
42
|
-
|
|
36
|
+
headerContent?: React.ReactNode;
|
|
37
|
+
footerContent?: React.ReactNode;
|
|
38
|
+
filterButtonText?: string; // New prop for custom button text
|
|
39
|
+
headerClassName?: string;
|
|
43
40
|
radioButtonFillColor: string;
|
|
44
|
-
radioButtonHoverColor
|
|
45
|
-
radioButtonUncheckedBorderColor
|
|
46
|
-
filterCloseIconVariant:
|
|
47
|
-
|
|
48
|
-
}
|
|
41
|
+
radioButtonHoverColor?: string;
|
|
42
|
+
radioButtonUncheckedBorderColor?: string;
|
|
43
|
+
// filterCloseIconVariant: CloseIconVariant;
|
|
44
|
+
};
|