@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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-BCqBaFxm.cjs";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-DV2K-9lE.cjs";
|
|
3
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
4
|
+
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
|
+
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
6
|
+
|
|
7
|
+
//#region src/components/SearchResultsContent/utils.d.ts
|
|
8
|
+
interface SearchResult {
|
|
9
|
+
products: SearchResponseProduct[];
|
|
10
|
+
filters: string[];
|
|
11
|
+
generatedQuery?: string;
|
|
12
|
+
totalProductCount: number;
|
|
13
|
+
searchResponseId: string;
|
|
14
|
+
}
|
|
15
|
+
declare const enum SearchResultsState {
|
|
16
|
+
Loading = 0,
|
|
17
|
+
Results = 1,
|
|
18
|
+
NoResults = 2,
|
|
19
|
+
}
|
|
20
|
+
declare const getSearchResultsState: (isLoadingSearch: boolean, searchData: SearchResult | null) => SearchResultsState;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/SearchResultsContent/SearchResultsContent.d.ts
|
|
23
|
+
interface SearchResultsContentProps {
|
|
24
|
+
searchResultsState: SearchResultsState;
|
|
25
|
+
productList: SearchResponseProductAttributes['attributes'][];
|
|
26
|
+
productCardConfig: ProductCardConfig;
|
|
27
|
+
merchantShortName: string;
|
|
28
|
+
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
29
|
+
productGridVariant: ProductGridVariant;
|
|
30
|
+
productGridClasses: string;
|
|
31
|
+
containerXPaddingClasses: string;
|
|
32
|
+
selectedFilterOptions: SelectedFilterOption[];
|
|
33
|
+
availableDynamicFilters: {
|
|
34
|
+
name: string;
|
|
35
|
+
displayName: string;
|
|
36
|
+
}[];
|
|
37
|
+
searchResponseId: string;
|
|
38
|
+
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
39
|
+
onToggleDynamicFilter: ({
|
|
40
|
+
filter,
|
|
41
|
+
dynamicFilterDisplayName
|
|
42
|
+
}: {
|
|
43
|
+
filter: string;
|
|
44
|
+
dynamicFilterDisplayName: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
noResultsFoundText?: string;
|
|
47
|
+
}
|
|
48
|
+
declare const SearchResultsContent: ({
|
|
49
|
+
searchResultsState,
|
|
50
|
+
productList,
|
|
51
|
+
productCardConfig,
|
|
52
|
+
merchantShortName,
|
|
53
|
+
searchFilterSidebarVariant,
|
|
54
|
+
productGridVariant,
|
|
55
|
+
productGridClasses,
|
|
56
|
+
containerXPaddingClasses,
|
|
57
|
+
selectedFilterOptions,
|
|
58
|
+
availableDynamicFilters,
|
|
59
|
+
searchResponseId,
|
|
60
|
+
onRemoveFilter,
|
|
61
|
+
onToggleDynamicFilter,
|
|
62
|
+
noResultsFoundText
|
|
63
|
+
}: SearchResultsContentProps) => react_jsx_runtime10.JSX.Element;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { SearchResult, SearchResultsContent, SearchResultsState, getSearchResultsState };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-DO4ksBrm.js";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-D8gHW7ox.js";
|
|
3
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
4
|
+
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
|
+
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
6
|
+
|
|
7
|
+
//#region src/components/SearchResultsContent/utils.d.ts
|
|
8
|
+
interface SearchResult {
|
|
9
|
+
products: SearchResponseProduct[];
|
|
10
|
+
filters: string[];
|
|
11
|
+
generatedQuery?: string;
|
|
12
|
+
totalProductCount: number;
|
|
13
|
+
searchResponseId: string;
|
|
14
|
+
}
|
|
15
|
+
declare const enum SearchResultsState {
|
|
16
|
+
Loading = 0,
|
|
17
|
+
Results = 1,
|
|
18
|
+
NoResults = 2,
|
|
19
|
+
}
|
|
20
|
+
declare const getSearchResultsState: (isLoadingSearch: boolean, searchData: SearchResult | null) => SearchResultsState;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/components/SearchResultsContent/SearchResultsContent.d.ts
|
|
23
|
+
interface SearchResultsContentProps {
|
|
24
|
+
searchResultsState: SearchResultsState;
|
|
25
|
+
productList: SearchResponseProductAttributes['attributes'][];
|
|
26
|
+
productCardConfig: ProductCardConfig;
|
|
27
|
+
merchantShortName: string;
|
|
28
|
+
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
29
|
+
productGridVariant: ProductGridVariant;
|
|
30
|
+
productGridClasses: string;
|
|
31
|
+
containerXPaddingClasses: string;
|
|
32
|
+
selectedFilterOptions: SelectedFilterOption[];
|
|
33
|
+
availableDynamicFilters: {
|
|
34
|
+
name: string;
|
|
35
|
+
displayName: string;
|
|
36
|
+
}[];
|
|
37
|
+
searchResponseId: string;
|
|
38
|
+
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
39
|
+
onToggleDynamicFilter: ({
|
|
40
|
+
filter,
|
|
41
|
+
dynamicFilterDisplayName
|
|
42
|
+
}: {
|
|
43
|
+
filter: string;
|
|
44
|
+
dynamicFilterDisplayName: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
noResultsFoundText?: string;
|
|
47
|
+
}
|
|
48
|
+
declare const SearchResultsContent: ({
|
|
49
|
+
searchResultsState,
|
|
50
|
+
productList,
|
|
51
|
+
productCardConfig,
|
|
52
|
+
merchantShortName,
|
|
53
|
+
searchFilterSidebarVariant,
|
|
54
|
+
productGridVariant,
|
|
55
|
+
productGridClasses,
|
|
56
|
+
containerXPaddingClasses,
|
|
57
|
+
selectedFilterOptions,
|
|
58
|
+
availableDynamicFilters,
|
|
59
|
+
searchResponseId,
|
|
60
|
+
onRemoveFilter,
|
|
61
|
+
onToggleDynamicFilter,
|
|
62
|
+
noResultsFoundText
|
|
63
|
+
}: SearchResultsContentProps) => react_jsx_runtime13.JSX.Element;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { SearchResult, SearchResultsContent, SearchResultsState, getSearchResultsState };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../Text-Bod4OMPk.js";
|
|
3
|
+
import "../Text-BMsncrpY.js";
|
|
4
|
+
import "../Headline-BkOW1lQj.js";
|
|
5
|
+
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
6
|
+
import "../ProductCard-DCFMFwCH.js";
|
|
7
|
+
import "../Spinner-BgGihEfJ.js";
|
|
8
|
+
import "../ProductGrid-BoJzUK_H.js";
|
|
9
|
+
import "../colorsConfig-BQlaCfxi.js";
|
|
10
|
+
import "../searchFilterSidebarVariants-BWQyiKwS.js";
|
|
11
|
+
import "../DynamicFiltersScrollbar-CCwh0QW4.js";
|
|
12
|
+
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-CEi_RHna.js";
|
|
13
|
+
import "../SparkleAnimation-fQHP7b-R.js";
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
|
|
16
|
+
//#region src/components/SearchResultsContent/utils.ts
|
|
17
|
+
let SearchResultsState = /* @__PURE__ */ function(SearchResultsState$1) {
|
|
18
|
+
SearchResultsState$1[SearchResultsState$1["Loading"] = 0] = "Loading";
|
|
19
|
+
SearchResultsState$1[SearchResultsState$1["Results"] = 1] = "Results";
|
|
20
|
+
SearchResultsState$1[SearchResultsState$1["NoResults"] = 2] = "NoResults";
|
|
21
|
+
return SearchResultsState$1;
|
|
22
|
+
}({});
|
|
23
|
+
const getSearchResultsState = (isLoadingSearch, searchData) => {
|
|
24
|
+
if (isLoadingSearch) return SearchResultsState.Loading;
|
|
25
|
+
if (searchData) return SearchResultsState.Results;
|
|
26
|
+
return SearchResultsState.NoResults;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/SearchResultsContent/SearchResultsContent.tsx
|
|
31
|
+
const SearchResultsContent = ({ searchResultsState, productList, productCardConfig, merchantShortName, searchFilterSidebarVariant, productGridVariant, productGridClasses, containerXPaddingClasses, selectedFilterOptions, availableDynamicFilters, searchResponseId, onRemoveFilter, onToggleDynamicFilter, noResultsFoundText }) => {
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
33
|
+
searchResultsState === SearchResultsState.NoResults && /* @__PURE__ */ jsx(NoSearchResultsFound, {
|
|
34
|
+
containerPaddingClasses: containerXPaddingClasses,
|
|
35
|
+
includeBottomMargin: true,
|
|
36
|
+
noResultsFoundText
|
|
37
|
+
}),
|
|
38
|
+
searchResultsState === SearchResultsState.Results && /* @__PURE__ */ jsx(SearchResultsGrid, {
|
|
39
|
+
searchFilterSidebarVariant,
|
|
40
|
+
productCardConfig,
|
|
41
|
+
merchantShortName,
|
|
42
|
+
productList,
|
|
43
|
+
productGridVariant,
|
|
44
|
+
productGridClasses,
|
|
45
|
+
containerXPaddingClasses,
|
|
46
|
+
selectedFilterOptions,
|
|
47
|
+
availableDynamicFilters,
|
|
48
|
+
searchResponseId,
|
|
49
|
+
onRemoveFilter,
|
|
50
|
+
onToggleDynamicFilter
|
|
51
|
+
}),
|
|
52
|
+
searchResultsState === SearchResultsState.Loading && /* @__PURE__ */ jsx(SearchResultsLoadingGrid, {
|
|
53
|
+
productGridVariant,
|
|
54
|
+
productGridClasses
|
|
55
|
+
})
|
|
56
|
+
] });
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
export { SearchResultsContent, SearchResultsState, getSearchResultsState };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
|
|
3
|
-
require('../
|
|
4
|
-
require('../
|
|
5
|
-
require('../ButtonBase-
|
|
6
|
-
const require_SearchFilter = require('../SearchFilter-
|
|
2
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
3
|
+
require('../Text-MQjxqgZZ.cjs');
|
|
4
|
+
const require_ButtonBase = require('../ButtonBase-DGpQBeLR.cjs');
|
|
5
|
+
require('../ButtonBase-DbWQ25n-.cjs');
|
|
6
|
+
const require_SearchFilter = require('../SearchFilter-B8jliRly.cjs');
|
|
7
7
|
require('../colorsConfig-DCvy_dV4.cjs');
|
|
8
8
|
const require_searchFilterSidebarVariants = require('../searchFilterSidebarVariants-D08jyA7U.cjs');
|
|
9
9
|
let react = require("react");
|
|
@@ -32,7 +32,6 @@ const SearchResultsFilter = ({ productCount, isOpen, setIsOpen, searchFilters, s
|
|
|
32
32
|
radioButtonFillColor,
|
|
33
33
|
radioButtonHoverColor,
|
|
34
34
|
radioButtonUncheckedBorderColor,
|
|
35
|
-
filterCloseIconVariant,
|
|
36
35
|
headerContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchFilter.SearchFilterHeader, {
|
|
37
36
|
closeModal: () => setIsOpen(false),
|
|
38
37
|
productCount,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
|
|
3
|
-
export { CloseIconVariant, SearchFilter, SearchFilterItem, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
1
|
+
import { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses } from "../index-DV2K-9lE.cjs";
|
|
2
|
+
export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
|
|
3
|
-
export { CloseIconVariant, SearchFilter, SearchFilterItem, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
1
|
+
import { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses } from "../index-D8gHW7ox.js";
|
|
2
|
+
export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import "../ButtonBase-
|
|
5
|
-
import { SearchFilter, SearchFilterHeader } from "../SearchFilter-
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../Text-Bod4OMPk.js";
|
|
3
|
+
import { ButtonBase } from "../ButtonBase-DGbSm0SJ.js";
|
|
4
|
+
import "../ButtonBase-C_uKnl48.js";
|
|
5
|
+
import { SearchFilter, SearchFilterHeader } from "../SearchFilter-Da6SL9mU.js";
|
|
6
6
|
import "../colorsConfig-BQlaCfxi.js";
|
|
7
7
|
import { searchFilterSidebarVariantClasses } from "../searchFilterSidebarVariants-BWQyiKwS.js";
|
|
8
8
|
import { useCallback } from "react";
|
|
@@ -28,7 +28,6 @@ const SearchResultsFilter = ({ productCount, isOpen, setIsOpen, searchFilters, s
|
|
|
28
28
|
radioButtonFillColor,
|
|
29
29
|
radioButtonHoverColor,
|
|
30
30
|
radioButtonUncheckedBorderColor,
|
|
31
|
-
filterCloseIconVariant,
|
|
32
31
|
headerContent: /* @__PURE__ */ jsx(SearchFilterHeader, {
|
|
33
32
|
closeModal: () => setIsOpen(false),
|
|
34
33
|
productCount,
|
|
@@ -1,126 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
require('../
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('../Headline-iP_MckEO.cjs');
|
|
1
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
|
+
require('../Text-MQjxqgZZ.cjs');
|
|
3
|
+
require('../Text-C8t_iEj6.cjs');
|
|
4
|
+
require('../Headline-QpruZlcg.cjs');
|
|
6
5
|
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
7
|
-
|
|
6
|
+
require('../ProductCard-BYjPKgX3.cjs');
|
|
8
7
|
require('../Spinner-DzdIkS6t.cjs');
|
|
9
|
-
|
|
8
|
+
require('../ProductGrid-CJmmGxBQ.cjs');
|
|
10
9
|
require('../colorsConfig-DCvy_dV4.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
require('../
|
|
14
|
-
|
|
15
|
-
framer_motion = require_chunk.__toESM(framer_motion);
|
|
16
|
-
let classnames = require("classnames");
|
|
17
|
-
classnames = require_chunk.__toESM(classnames);
|
|
18
|
-
let __envive_ai_react_toolkit_Text = require("@envive-ai/react-toolkit/Text");
|
|
19
|
-
__envive_ai_react_toolkit_Text = require_chunk.__toESM(__envive_ai_react_toolkit_Text);
|
|
20
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
22
|
-
let __envive_ai_react_icons_Sparkles = require("@envive-ai/react-icons/Sparkles");
|
|
23
|
-
__envive_ai_react_icons_Sparkles = require_chunk.__toESM(__envive_ai_react_icons_Sparkles);
|
|
10
|
+
require('../searchFilterSidebarVariants-D08jyA7U.cjs');
|
|
11
|
+
require('../DynamicFiltersScrollbar-U9-CmTKd.cjs');
|
|
12
|
+
const require_SearchResultsStates = require('../SearchResultsStates-CJYgUA66.cjs');
|
|
13
|
+
require('../SparkleAnimation-BY5iw7s0.cjs');
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
29
|
-
className: containerClasses,
|
|
30
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
31
|
-
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
32
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_Sparkles.default, {
|
|
33
|
-
className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]",
|
|
34
|
-
style: { color: sparkleIconColor }
|
|
35
|
-
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
36
|
-
variant: "body2",
|
|
37
|
-
children: noResultsFoundText || "I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query."
|
|
38
|
-
})]
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.tsx
|
|
45
|
-
const SearchResultsGrid = ({ productList, productCardConfig, merchantShortName, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, searchResponseId, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter }) => {
|
|
46
|
-
const sharedFilterBarClasses = (0, classnames.default)("spiffy-suggestion-bar", "spiffy-tw-no-scrollbar", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-gap-2", "spiffy-tw-mb-[16px]", "spiffy-tw-overflow-x-scroll", containerXPaddingClasses);
|
|
47
|
-
const filterBarClasses = (0, classnames.default)(sharedFilterBarClasses, "spiffy-tw-mt-[24px]");
|
|
48
|
-
const appliedFilterBarClasses = (0, classnames.default)(sharedFilterBarClasses, "spiffy-tw-mb-[32px]", "spiffy-tw-mt-[8px]");
|
|
49
|
-
const { filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses } = require_searchFilterSidebarVariants.searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
50
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(framer_motion.motion.div, {
|
|
51
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
52
|
-
initial: { opacity: 0 },
|
|
53
|
-
animate: { opacity: 1 },
|
|
54
|
-
exit: { opacity: 0 },
|
|
55
|
-
transition: { duration: .2 },
|
|
56
|
-
children: [
|
|
57
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DynamicFiltersScrollbar.AppliedFiltersScrollbar, {
|
|
58
|
-
selectedFilterOptions,
|
|
59
|
-
filterBarClassNames: appliedFilterBarClasses,
|
|
60
|
-
filterDefaultClasses,
|
|
61
|
-
filterHoverClasses,
|
|
62
|
-
appliedFilterBackgroundClasses,
|
|
63
|
-
onRemoveFilter
|
|
64
|
-
}),
|
|
65
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DynamicFiltersScrollbar.DynamicFiltersScrollbar, {
|
|
66
|
-
availableDynamicFilters,
|
|
67
|
-
filterBarClassNames: filterBarClasses,
|
|
68
|
-
filterDefaultClasses,
|
|
69
|
-
filterHoverClasses,
|
|
70
|
-
onToggleDynamicFilter
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductGrid.ProductGrid, {
|
|
73
|
-
productList,
|
|
74
|
-
productGridVariant,
|
|
75
|
-
productGridClasses,
|
|
76
|
-
productCardConfig,
|
|
77
|
-
merchantShortName,
|
|
78
|
-
searchResponseId
|
|
79
|
-
})
|
|
80
|
-
]
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
//#endregion
|
|
85
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx
|
|
86
|
-
const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
87
|
-
const { productCardLayoutVariant, productCardImageAspectRatio } = require_ProductGrid.productGridVariantClasses[productGridVariant];
|
|
88
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
89
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
90
|
-
initial: { opacity: 0 },
|
|
91
|
-
animate: { opacity: 1 },
|
|
92
|
-
exit: { opacity: 0 },
|
|
93
|
-
transition: { duration: .2 },
|
|
94
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
95
|
-
className: "spiffy-tw-mt-6 spiffy-tw-w-full",
|
|
96
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
97
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-mb-4",
|
|
98
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
99
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 spiffy-tw-ml-[16px] md:spiffy-tw-ml-[80px]",
|
|
100
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
101
|
-
className: "spiffy-tw-width-[24px]",
|
|
102
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SparkleAnimation.SparkleAnimation, {
|
|
103
|
-
color: sparkleIconColor,
|
|
104
|
-
animate: true
|
|
105
|
-
})
|
|
106
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_Text.Text, {
|
|
107
|
-
variant: "body2",
|
|
108
|
-
children: "Finding the best options for you..."
|
|
109
|
-
})]
|
|
110
|
-
})
|
|
111
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
112
|
-
className: productGridClasses,
|
|
113
|
-
children: Array.from({ length: 8 }).map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductCard.ProductCardSkeleton, {
|
|
114
|
-
layoutVariant: productCardLayoutVariant,
|
|
115
|
-
aspectRatio: productCardImageAspectRatio,
|
|
116
|
-
growWithContainer: true
|
|
117
|
-
}, index))
|
|
118
|
-
})]
|
|
119
|
-
})
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
//#endregion
|
|
124
|
-
exports.NoSearchResultsFound = NoSearchResultsFound;
|
|
125
|
-
exports.SearchResultsGrid = SearchResultsGrid;
|
|
126
|
-
exports.SearchResultsLoadingGrid = SearchResultsLoadingGrid;
|
|
15
|
+
exports.NoSearchResultsFound = require_SearchResultsStates.NoSearchResultsFound;
|
|
16
|
+
exports.SearchResultsGrid = require_SearchResultsStates.SearchResultsGrid;
|
|
17
|
+
exports.SearchResultsLoadingGrid = require_SearchResultsStates.SearchResultsLoadingGrid;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import { SearchFilterSidebarVariant } from "../index-CQlBDGTL.cjs";
|
|
6
|
-
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant } from "../index-BCqBaFxm.cjs";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-DV2K-9lE.cjs";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
7
5
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
8
6
|
|
|
9
7
|
//#region src/components/SearchResultsStates/NoSearchResultsFound.d.ts
|
|
@@ -18,7 +16,7 @@ declare const NoSearchResultsFound: ({
|
|
|
18
16
|
includeBottomMargin,
|
|
19
17
|
noResultsFoundText,
|
|
20
18
|
sparkleIconColor
|
|
21
|
-
}: NoSearchResultsFoundProps) =>
|
|
19
|
+
}: NoSearchResultsFoundProps) => react_jsx_runtime0.JSX.Element;
|
|
22
20
|
//#endregion
|
|
23
21
|
//#region src/components/SearchResultsStates/SearchResultsGrid.d.ts
|
|
24
22
|
interface SearchResultsGridProps {
|
|
@@ -57,7 +55,7 @@ declare const SearchResultsGrid: ({
|
|
|
57
55
|
productGridClasses,
|
|
58
56
|
onRemoveFilter,
|
|
59
57
|
onToggleDynamicFilter
|
|
60
|
-
}: SearchResultsGridProps) =>
|
|
58
|
+
}: SearchResultsGridProps) => react_jsx_runtime0.JSX.Element;
|
|
61
59
|
//#endregion
|
|
62
60
|
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts
|
|
63
61
|
declare const SearchResultsLoadingGrid: ({
|
|
@@ -68,6 +66,6 @@ declare const SearchResultsLoadingGrid: ({
|
|
|
68
66
|
productGridVariant: ProductGridVariant;
|
|
69
67
|
productGridClasses: string;
|
|
70
68
|
sparkleIconColor?: string;
|
|
71
|
-
}) =>
|
|
69
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
72
70
|
//#endregion
|
|
73
71
|
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import { SearchFilterSidebarVariant } from "../index-B0oln9VD.js";
|
|
6
|
-
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant } from "../index-DO4ksBrm.js";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-D8gHW7ox.js";
|
|
3
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
4
|
+
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
7
5
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
8
6
|
|
|
9
7
|
//#region src/components/SearchResultsStates/NoSearchResultsFound.d.ts
|
|
@@ -18,7 +16,7 @@ declare const NoSearchResultsFound: ({
|
|
|
18
16
|
includeBottomMargin,
|
|
19
17
|
noResultsFoundText,
|
|
20
18
|
sparkleIconColor
|
|
21
|
-
}: NoSearchResultsFoundProps) =>
|
|
19
|
+
}: NoSearchResultsFoundProps) => react_jsx_runtime6.JSX.Element;
|
|
22
20
|
//#endregion
|
|
23
21
|
//#region src/components/SearchResultsStates/SearchResultsGrid.d.ts
|
|
24
22
|
interface SearchResultsGridProps {
|
|
@@ -57,7 +55,7 @@ declare const SearchResultsGrid: ({
|
|
|
57
55
|
productGridClasses,
|
|
58
56
|
onRemoveFilter,
|
|
59
57
|
onToggleDynamicFilter
|
|
60
|
-
}: SearchResultsGridProps) =>
|
|
58
|
+
}: SearchResultsGridProps) => react_jsx_runtime6.JSX.Element;
|
|
61
59
|
//#endregion
|
|
62
60
|
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts
|
|
63
61
|
declare const SearchResultsLoadingGrid: ({
|
|
@@ -68,6 +66,6 @@ declare const SearchResultsLoadingGrid: ({
|
|
|
68
66
|
productGridVariant: ProductGridVariant;
|
|
69
67
|
productGridClasses: string;
|
|
70
68
|
sparkleIconColor?: string;
|
|
71
|
-
}) =>
|
|
69
|
+
}) => react_jsx_runtime6.JSX.Element;
|
|
72
70
|
//#endregion
|
|
73
71
|
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,118 +1,15 @@
|
|
|
1
|
-
import "../textVariantClasses-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "../Headline-
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../Text-Bod4OMPk.js";
|
|
3
|
+
import "../Text-BMsncrpY.js";
|
|
4
|
+
import "../Headline-BkOW1lQj.js";
|
|
5
5
|
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
6
|
-
import
|
|
6
|
+
import "../ProductCard-DCFMFwCH.js";
|
|
7
7
|
import "../Spinner-BgGihEfJ.js";
|
|
8
|
-
import
|
|
8
|
+
import "../ProductGrid-BoJzUK_H.js";
|
|
9
9
|
import "../colorsConfig-BQlaCfxi.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
14
|
-
import classNames from "classnames";
|
|
15
|
-
import { Text } from "@envive-ai/react-toolkit/Text";
|
|
16
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
-
import Sparkles from "@envive-ai/react-icons/Sparkles";
|
|
10
|
+
import "../searchFilterSidebarVariants-BWQyiKwS.js";
|
|
11
|
+
import "../DynamicFiltersScrollbar-CCwh0QW4.js";
|
|
12
|
+
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-CEi_RHna.js";
|
|
13
|
+
import "../SparkleAnimation-fQHP7b-R.js";
|
|
18
14
|
|
|
19
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.tsx
|
|
20
|
-
const NoSearchResultsFound = ({ containerPaddingClasses, includeBottomMargin = false, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
21
|
-
const containerClasses = classNames(containerPaddingClasses, includeBottomMargin ? "spiffy-tw-mb-[100vh]" : "", "spiffy-tw-mt-6");
|
|
22
|
-
return /* @__PURE__ */ jsx("div", {
|
|
23
|
-
className: containerClasses,
|
|
24
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
25
|
-
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
26
|
-
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Sparkles, {
|
|
27
|
-
className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]",
|
|
28
|
-
style: { color: sparkleIconColor }
|
|
29
|
-
}) }), /* @__PURE__ */ jsx(Text$1, {
|
|
30
|
-
variant: "body2",
|
|
31
|
-
children: noResultsFoundText || "I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query."
|
|
32
|
-
})]
|
|
33
|
-
})
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.tsx
|
|
39
|
-
const SearchResultsGrid = ({ productList, productCardConfig, merchantShortName, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, searchResponseId, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter }) => {
|
|
40
|
-
const sharedFilterBarClasses = classNames("spiffy-suggestion-bar", "spiffy-tw-no-scrollbar", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-gap-2", "spiffy-tw-mb-[16px]", "spiffy-tw-overflow-x-scroll", containerXPaddingClasses);
|
|
41
|
-
const filterBarClasses = classNames(sharedFilterBarClasses, "spiffy-tw-mt-[24px]");
|
|
42
|
-
const appliedFilterBarClasses = classNames(sharedFilterBarClasses, "spiffy-tw-mb-[32px]", "spiffy-tw-mt-[8px]");
|
|
43
|
-
const { filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
44
|
-
return /* @__PURE__ */ jsxs(motion.div, {
|
|
45
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
46
|
-
initial: { opacity: 0 },
|
|
47
|
-
animate: { opacity: 1 },
|
|
48
|
-
exit: { opacity: 0 },
|
|
49
|
-
transition: { duration: .2 },
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ jsx(AppliedFiltersScrollbar, {
|
|
52
|
-
selectedFilterOptions,
|
|
53
|
-
filterBarClassNames: appliedFilterBarClasses,
|
|
54
|
-
filterDefaultClasses,
|
|
55
|
-
filterHoverClasses,
|
|
56
|
-
appliedFilterBackgroundClasses,
|
|
57
|
-
onRemoveFilter
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ jsx(DynamicFiltersScrollbar, {
|
|
60
|
-
availableDynamicFilters,
|
|
61
|
-
filterBarClassNames: filterBarClasses,
|
|
62
|
-
filterDefaultClasses,
|
|
63
|
-
filterHoverClasses,
|
|
64
|
-
onToggleDynamicFilter
|
|
65
|
-
}),
|
|
66
|
-
/* @__PURE__ */ jsx(ProductGrid, {
|
|
67
|
-
productList,
|
|
68
|
-
productGridVariant,
|
|
69
|
-
productGridClasses,
|
|
70
|
-
productCardConfig,
|
|
71
|
-
merchantShortName,
|
|
72
|
-
searchResponseId
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx
|
|
80
|
-
const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
81
|
-
const { productCardLayoutVariant, productCardImageAspectRatio } = productGridVariantClasses[productGridVariant];
|
|
82
|
-
return /* @__PURE__ */ jsx(motion.div, {
|
|
83
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
84
|
-
initial: { opacity: 0 },
|
|
85
|
-
animate: { opacity: 1 },
|
|
86
|
-
exit: { opacity: 0 },
|
|
87
|
-
transition: { duration: .2 },
|
|
88
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
89
|
-
className: "spiffy-tw-mt-6 spiffy-tw-w-full",
|
|
90
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
91
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-mb-4",
|
|
92
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
93
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 spiffy-tw-ml-[16px] md:spiffy-tw-ml-[80px]",
|
|
94
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
95
|
-
className: "spiffy-tw-width-[24px]",
|
|
96
|
-
children: /* @__PURE__ */ jsx(SparkleAnimation, {
|
|
97
|
-
color: sparkleIconColor,
|
|
98
|
-
animate: true
|
|
99
|
-
})
|
|
100
|
-
}), /* @__PURE__ */ jsx(Text, {
|
|
101
|
-
variant: "body2",
|
|
102
|
-
children: "Finding the best options for you..."
|
|
103
|
-
})]
|
|
104
|
-
})
|
|
105
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
106
|
-
className: productGridClasses,
|
|
107
|
-
children: Array.from({ length: 8 }).map((_, index) => /* @__PURE__ */ jsx(ProductCardSkeleton, {
|
|
108
|
-
layoutVariant: productCardLayoutVariant,
|
|
109
|
-
aspectRatio: productCardImageAspectRatio,
|
|
110
|
-
growWithContainer: true
|
|
111
|
-
}, index))
|
|
112
|
-
})]
|
|
113
|
-
})
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
//#endregion
|
|
118
15
|
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|