@envive-ai/react-toolkit 0.2.12 → 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/{Accordion-B0TzPN3m.cjs → Accordion-Bc3o-NjV.cjs} +2 -2
- package/dist/{AnimatedChevron-9xf90bpP.cjs → AnimatedChevron-BKQrUKb5.cjs} +1 -1
- package/dist/{ButtonBase-BMEAmPnS.cjs → ButtonBase-Bm_QOyM1.cjs} +2 -2
- package/dist/{DynamicFiltersScrollbar-DqIydLJu.cjs → DynamicFiltersScrollbar-bT3VoG-D.cjs} +2 -2
- package/dist/{ImageWithFallback-CuPe6XF6.cjs → ImageWithFallback-BiBjNK-9.cjs} +1 -1
- package/dist/{ModalSheet-Be7-bkXK.cjs → ModalSheet-BuCtRDnQ.cjs} +2 -2
- package/dist/{ProductCard-BeY85PBf.cjs → ProductCard-C3seoFWE.cjs} +5 -5
- package/dist/{ProductCard-BoyYu6mI.js → ProductCard-ChitHvuc.js} +1 -1
- package/dist/{ProductGrid-CxKK7w_X.cjs → ProductGrid-Ct2DvLGf.cjs} +2 -2
- package/dist/{ProductGrid-DmtSXfyE.js → ProductGrid-DukHo_KY.js} +1 -1
- package/dist/{RadioButton-Dcdj8pNp.cjs → RadioButton-D4TPq1Aa.cjs} +2 -2
- package/dist/{RadioButtonGroup-hme7gSiQ.js → RadioButtonGroup-BWQ4-m2M.js} +1 -1
- package/dist/{RadioButtonGroup-BnnMx8sE.cjs → RadioButtonGroup-BhZloLH6.cjs} +2 -2
- package/dist/{RecommendedProducts-C2eNVrLo.cjs → RecommendedProducts-Cy-1szYc.cjs} +3 -3
- package/dist/{RecommendedProducts-LalI8aVC.js → RecommendedProducts-DooGvLFT.js} +1 -1
- package/dist/{SearchAutocomplete-A3HXkHwK.cjs → SearchAutocomplete-C1XH39Xx.cjs} +3 -3
- package/dist/{SearchAutocomplete-Rza3A-gs.js → SearchAutocomplete-CuuN0cDu.js} +1 -1
- package/dist/{SearchFilter-DxrQOLx0.cjs → SearchFilter-CnP71PTj.cjs} +8 -8
- package/dist/{SearchFilter-CYY5sNXV.js → SearchFilter-DsYF1A5n.js} +2 -2
- package/dist/{SearchInput-3ppsm2Ke.cjs → SearchInput-Cgsjew8Q.cjs} +2 -2
- package/dist/{SearchInputForm-DrI4WHDt.js → SearchInputForm--CvVrjwl.js} +4 -3
- package/dist/{SearchInputForm-CZz62rOX.cjs → SearchInputForm-CSd4tjts.cjs} +6 -5
- package/dist/{SearchResultsFilterButton-BedTofz5.cjs → SearchResultsFilterButton-BQqm4icD.cjs} +2 -2
- package/dist/{SearchResultsFilterSidebar-Dgz98oyD.cjs → SearchResultsFilterSidebar-U6dFy-Jo.cjs} +3 -3
- package/dist/{SearchResultsFilterSidebar-Bvpk7Uoo.js → SearchResultsFilterSidebar-ydSo1S6h.js} +1 -1
- package/dist/{SearchResultsStates-DrGtw0pM.js → SearchResultsStates-BCeqeo9y.js} +9 -9
- package/dist/{SearchResultsStates-D37wFr9h.cjs → SearchResultsStates-Dp-AsmH8.cjs} +12 -12
- package/dist/{SparkleAnimation-B5A_NCuy.cjs → SparkleAnimation-Bg5qax1t.cjs} +6 -6
- package/dist/{SparkleAnimation-BSI_34HX.js → SparkleAnimation-HY4cgwE3.js} +5 -5
- package/dist/{Spinner-FQpy5bGu.cjs → Spinner-CUrXDajS.cjs} +1 -1
- package/dist/{TextInput-Do5-j1V_.cjs → TextInput-DfCocKVm.cjs} +2 -2
- package/dist/{ToggleButton-CmxTz-ou.cjs → ToggleButton-BhBEOjxO.cjs} +2 -2
- package/dist/{Typography-Ds4gfOJz.cjs → Typography-Csg-nd_w.cjs} +1 -1
- package/dist/{chunk-CUT6urMc.cjs → chunk-CbDLau6x.cjs} +10 -6
- package/dist/components/Accordion/{index-DBEaF9x5.d.ts → index-D_7-KJa0.d.cts} +2 -2
- package/dist/components/Accordion/index.cjs +2 -2
- package/dist/components/AnimatedChevron/{index-Bvff3AGS.d.ts → index-BfdaL9eW.d.cts} +2 -2
- package/dist/components/AnimatedChevron/{index-BwQ6tJL8.d.cts → index-bNdUYDzX.d.ts} +2 -2
- package/dist/components/AnimatedChevron/index.cjs +1 -1
- package/dist/components/AppliedFiltersScrollbar/{index-DADY550R.d.cts → index-B68Mx16E.d.cts} +2 -2
- package/dist/components/AppliedFiltersScrollbar/{index-BKNoroAl.d.ts → index-B9u7XRmf.d.ts} +2 -2
- package/dist/components/AppliedFiltersScrollbar/index.cjs +2 -2
- package/dist/components/ButtonBase/{index-pBSmWoqg.d.cts → index-3ltL6jhO.d.ts} +3 -3
- package/dist/components/ButtonBase/{index-BCw2WQ-2.d.ts → index-CcVRnbuQ.d.cts} +3 -3
- package/dist/components/ButtonBase/index.cjs +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-BvAT64cX.d.ts → index-B483Jhki.d.cts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-X--ALCSa.d.cts → index-B_a6Oebn.d.ts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/index.cjs +2 -2
- package/dist/components/FilterScrollbar/{index-xlg1Q06Q.d.ts → index-BmHm47DA.d.cts} +3 -3
- package/dist/components/FilterScrollbar/{index-DgxXE1ff.d.cts → index-CISEdkBM.d.ts} +3 -3
- package/dist/components/FilterScrollbar/index.cjs +2 -2
- package/dist/components/ImageWithFallback/{index-C8Fqb7AQ.d.cts → index-CCWzf6ZV.d.ts} +2 -2
- package/dist/components/ImageWithFallback/{index-yxDWrUCQ.d.ts → index-Dk89vxqv.d.cts} +2 -2
- package/dist/components/ImageWithFallback/index.cjs +1 -1
- package/dist/components/ModalSheet/{index-Cp_h5dbe.d.ts → index-CI0qFVA7.d.ts} +2 -2
- package/dist/components/ModalSheet/{index-Dnt-aUte.d.cts → index-C_8baIZK.d.cts} +2 -2
- package/dist/components/ModalSheet/index.cjs +2 -2
- package/dist/components/ProductCard/{index-BF8pv46P.d.ts → index-D5om2RVT.d.ts} +1 -1
- package/dist/components/ProductCard/{index-C6TLdXjC.d.cts → index-Djjvdeh7.d.cts} +1 -1
- package/dist/components/ProductCard/index.cjs +4 -4
- package/dist/components/ProductCard/index.js +1 -1
- package/dist/components/ProductGrid/{index-CyDy1V6o.d.ts → index-AxMBGLVk.d.ts} +3 -3
- package/dist/components/ProductGrid/{index-B1eVXjB4.d.cts → index-C4Tz_KWs.d.cts} +3 -3
- package/dist/components/ProductGrid/index.cjs +5 -5
- package/dist/components/ProductGrid/index.js +2 -2
- package/dist/components/RadioButton/{index-BHl3dM6k.d.cts → index-BWo-a19v.d.ts} +2 -2
- package/dist/components/RadioButton/{index-BZrcz8-J.d.ts → index-DsVASVAv.d.cts} +2 -2
- package/dist/components/RadioButton/index.cjs +2 -2
- package/dist/components/RadioButton/index.js +1 -1
- package/dist/components/RadioButtonGroup/{index-DtdjcXo-.d.cts → index-CiljmnzJ.d.cts} +2 -2
- package/dist/components/RadioButtonGroup/index.cjs +3 -3
- package/dist/components/RadioButtonGroup/index.js +2 -2
- package/dist/components/RecommendedProducts/index.cjs +6 -7
- package/dist/components/RecommendedProducts/index.js +3 -4
- package/dist/components/SearchAutocomplete/{index-Br_POGOz.d.ts → index-BBUrFTl5.d.ts} +2 -2
- package/dist/components/SearchAutocomplete/{index-Ce9gkkbU.d.cts → index-OVMqT8K4.d.cts} +2 -2
- package/dist/components/SearchAutocomplete/index.cjs +2 -2
- package/dist/components/SearchAutocomplete/index.js +1 -1
- package/dist/components/SearchFilter/{index-DAR4UKSA.d.cts → index-BDaLJW2Q.d.cts} +5 -5
- package/dist/components/SearchFilter/{index-VygXUBM9.d.ts → index-DESOqSJQ.d.ts} +5 -5
- package/dist/components/SearchFilter/index.cjs +9 -9
- package/dist/components/SearchFilter/index.js +3 -3
- package/dist/components/SearchInput/index.cjs +3 -3
- package/dist/components/SearchInputForm/{index-dlLBivQA.d.cts → index-B3A17s3e.d.cts} +5 -3
- package/dist/components/SearchInputForm/{index-_sR_KugL.d.ts → index-D1F37qNH.d.ts} +3 -1
- package/dist/components/SearchInputForm/index.cjs +5 -5
- package/dist/components/SearchInputForm/index.js +2 -2
- package/dist/components/SearchResultsContent/{index-CayvNVCK.d.cts → index-B66EnbgF.d.cts} +4 -4
- package/dist/components/SearchResultsContent/{index-B_6-7-t-.d.ts → index-BI4Dm7mI.d.ts} +2 -2
- package/dist/components/SearchResultsContent/index.cjs +10 -10
- package/dist/components/SearchResultsContent/index.js +5 -5
- package/dist/components/SearchResultsFilterButton/{index-DuTGqa7-.d.ts → index-CCVZZUTR.d.cts} +2 -2
- package/dist/components/SearchResultsFilterButton/{index-D_u8PzTc.d.cts → index-Cjq_NOxx.d.ts} +2 -2
- package/dist/components/SearchResultsFilterButton/index.cjs +3 -4
- package/dist/components/SearchResultsFilterButton/index.js +0 -1
- package/dist/components/SearchResultsFilterModal/{index-BNZEJiXR.d.cts → index-Ba84MNoM.d.ts} +3 -3
- package/dist/components/SearchResultsFilterModal/{index-CXBAA2-F.d.ts → index-CMWDFJWT.d.cts} +3 -3
- package/dist/components/SearchResultsFilterModal/index.cjs +11 -12
- package/dist/components/SearchResultsFilterModal/index.js +4 -5
- package/dist/components/SearchResultsFilterSidebar/{index-BDcl27l4.d.ts → index-DmO55w4A.d.ts} +1 -1
- package/dist/components/SearchResultsFilterSidebar/{index-DgPB1knO.d.cts → index-Dtr9q9hT.d.cts} +1 -1
- package/dist/components/SearchResultsFilterSidebar/index.cjs +10 -10
- package/dist/components/SearchResultsFilterSidebar/index.js +4 -4
- package/dist/components/SearchResultsStates/{index-CjYl1v-v.d.cts → index-Ba3tQMCI.d.ts} +2 -2
- package/dist/components/SearchResultsStates/{index-DJaUfKjE.d.ts → index-DN1-g87W.d.cts} +6 -6
- package/dist/components/SearchResultsStates/index.cjs +9 -9
- package/dist/components/SearchResultsStates/index.js +5 -5
- package/dist/components/SearchResultsToolbar/{index-CVstdvRQ.d.cts → index-M8RkRW3H.d.cts} +2 -2
- package/dist/components/SearchResultsToolbar/{index-tAB6lEUm.d.ts → index-_hxKcDDT.d.ts} +2 -2
- package/dist/components/SearchResultsToolbar/index.cjs +11 -10
- package/dist/components/SearchResultsToolbar/index.js +6 -5
- package/dist/components/SparkleAnimation/{index-DjRK3Dys.d.ts → index-BMrS1PDU.d.cts} +2 -2
- package/dist/components/SparkleAnimation/{index-BQOC3G_6.d.cts → index-t59eI0td.d.ts} +2 -2
- package/dist/components/SparkleAnimation/index.cjs +1 -1
- package/dist/components/SparkleAnimation/index.js +1 -1
- package/dist/components/Spinner/{index-CIr1izou.d.ts → index-C876igqb.d.ts} +2 -2
- package/dist/components/Spinner/{index-C0pGovHC.d.cts → index-DrYhRG9D.d.cts} +2 -2
- package/dist/components/Spinner/index.cjs +1 -1
- package/dist/components/SuggestionButton/{index-B4J70IPS.d.cts → index-CrGSb18s.d.ts} +2 -2
- package/dist/components/SuggestionButton/{index-D6_y1hTj.d.ts → index-DfQRQGev.d.cts} +2 -2
- package/dist/components/SuggestionButton/index.cjs +3 -3
- package/dist/components/TextInput/index.cjs +2 -2
- package/dist/components/ToggleButton/{index-Dc-cs_tK.d.ts → index-CpURpMq5.d.cts} +2 -2
- package/dist/components/ToggleButton/index.cjs +2 -2
- package/dist/components/Typography/index.cjs +1 -1
- package/dist/{index-CqfgJHj8.d.cts → index-1GZFptEC.d.cts} +4 -4
- package/dist/{index-8cIrhPDk.d.ts → index-CBI4Lqsm.d.cts} +2 -2
- package/dist/{index-Cz6qxTZG.d.ts → index-yDKT5Bem.d.ts} +4 -4
- package/dist/util/index.cjs +1 -1
- package/package.json +15 -2
- package/src/components/Accordion/Accordion.tsx +4 -1
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +5 -2
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +4 -1
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +5 -2
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +4 -1
- package/src/components/ModalSheet/common/closeIcon.tsx +5 -1
- package/src/components/ModalSheet/desktop/index.tsx +1 -1
- package/src/components/ModalSheet/mobile/index.tsx +1 -1
- package/src/components/ModalSheet/mobile/mobileHeader.tsx +4 -1
- package/src/components/ProductCard/ProductCard.tsx +26 -12
- package/src/components/ProductCard/productCardVariants.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +5 -2
- package/src/components/RadioButton/RadioButton.tsx +15 -2
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/src/components/RecommendedProducts/RecommendedProducts.tsx +11 -9
- package/src/components/RecommendedProducts/index.ts +1 -1
- package/src/components/SearchAutocomplete/SearchAutocomplete.tsx +25 -19
- package/src/components/SearchFilter/SearchFilter.tsx +24 -10
- package/src/components/SearchFilter/SearchFilterHeader.tsx +4 -1
- package/src/components/SearchFilter/SearchFilterItem.tsx +3 -3
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +4 -4
- package/src/components/SearchInput/SearchInput.tsx +6 -2
- package/src/components/SearchInput/searchInputVariants.ts +1 -1
- package/src/components/SearchInputForm/SearchInputForm.tsx +7 -7
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +1 -1
- package/src/components/SearchResultsFilterModal/SearchResultsFilterModal.tsx +4 -1
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +1 -1
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +2 -2
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +2 -2
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +9 -5
- package/src/components/SearchResultsToolbar/SearchResultsToolbar.tsx +10 -7
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +17 -8
- package/src/components/SuggestionButton/SuggestionButton.tsx +5 -5
- package/src/components/SuggestionButton/types.ts +1 -1
- package/src/components/TextInput/TextInput.tsx +9 -2
- package/src/components/ToggleButton/ToggleButton.tsx +13 -3
- package/src/components/Typography/Typography.spec.tsx +1 -1
- package/src/components/Typography/util.ts +2 -2
- package/src/models/colorsConfig.ts +2 -1
- package/src/stories/NoSearchResultsFound.stories.tsx +7 -0
- package/src/stories/SearchResultsFilter.stories.tsx +1 -1
- package/src/stories/SparkleAnimation.stories.tsx +5 -2
- package/src/util/camelCasedPropertiesDeep.ts +0 -1
- package/src/util/colorVar.ts +1 -1
- package/src/util/useScrollDirection.ts +1 -1
- package/src/util/useStickyVisibility.ts +1 -1
- /package/dist/{RadioButton-Bm0qK3bX.js → RadioButton-C1w7N40t.js} +0 -0
- /package/dist/components/Accordion/{index-BPofgdcd.d.cts → index-DJOd-3Pi.d.ts} +0 -0
- /package/dist/components/ToggleButton/{index-B2rBwaVX.d.cts → index-DFz4kch0.d.ts} +0 -0
- /package/dist/{index-BKYA7uMB.d.cts → index-pZZXXUG_.d.ts} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
import "../../Typography-xehJH05l.js";
|
|
5
4
|
import "../../ButtonBase-CT397aT3.js";
|
|
6
5
|
import "../../ButtonBase-C9fn-c5h.js";
|
|
7
|
-
import "../../SearchAutocomplete-
|
|
6
|
+
import "../../SearchAutocomplete-CuuN0cDu.js";
|
|
8
7
|
import "../../TextInput-PtrUXoZo.js";
|
|
9
8
|
import "../../colorsConfig-BjdoRtRK.js";
|
|
10
9
|
import "../../SearchInput-DE9Iz7A8.js";
|
|
11
|
-
import { t as SearchInputForm } from "../../SearchInputForm
|
|
10
|
+
import { t as SearchInputForm } from "../../SearchInputForm--CvVrjwl.js";
|
|
12
11
|
import { t as SearchResultsFilterButton } from "../../SearchResultsFilterButton-CV11UTGi.js";
|
|
13
|
-
import React from "react";
|
|
12
|
+
import React, { useRef } from "react";
|
|
14
13
|
import classNames from "classnames";
|
|
15
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
15
|
|
|
17
16
|
//#region src/components/SearchResultsToolbar/SearchResultsToolbar.tsx
|
|
18
17
|
const SearchResultsToolbar = ({ searchInputVariant, searchBoxPlaceholder, searchText, focusedIndex, focusedOptionId, autocompleteResults, filterButtonText, onKeyDown, onSearchInputChange, onSubmitSearch, onAutocompleteSelect, onSearchInputFocus, onSearchInputBlur, shouldShowAutocomplete, setIsFilterOpen, containerXPaddingClasses, toolbarRef, isVisible, className }) => {
|
|
19
18
|
const [hasZIndex, setHasZIndex] = React.useState(false);
|
|
19
|
+
const searchInputRef = useRef(null);
|
|
20
20
|
React.useEffect(() => {
|
|
21
21
|
let timer;
|
|
22
22
|
if (isVisible) {
|
|
@@ -50,7 +50,8 @@ const SearchResultsToolbar = ({ searchInputVariant, searchBoxPlaceholder, search
|
|
|
50
50
|
onSearchInputBlur,
|
|
51
51
|
shouldShowAutocomplete,
|
|
52
52
|
onSearchSubmit: onSubmitSearch,
|
|
53
|
-
onAutocompleteSelect
|
|
53
|
+
onAutocompleteSelect,
|
|
54
|
+
searchInputRef
|
|
54
55
|
}), /* @__PURE__ */ jsx(SearchResultsFilterButton, {
|
|
55
56
|
setIsOpen: setIsFilterOpen,
|
|
56
57
|
filterButtonText
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
4
|
interface SparkleAnimationProps {
|
|
@@ -10,7 +10,7 @@ declare const SparkleAnimation: ({
|
|
|
10
10
|
color,
|
|
11
11
|
className,
|
|
12
12
|
animate
|
|
13
|
-
}: SparkleAnimationProps) =>
|
|
13
|
+
}: SparkleAnimationProps) => react_jsx_runtime20.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/components/SparkleAnimation/types.d.ts
|
|
16
16
|
declare enum SparkleAnimationOverride {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime31 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
4
|
interface SparkleAnimationProps {
|
|
@@ -10,7 +10,7 @@ declare const SparkleAnimation: ({
|
|
|
10
10
|
color,
|
|
11
11
|
className,
|
|
12
12
|
animate
|
|
13
|
-
}: SparkleAnimationProps) =>
|
|
13
|
+
}: SparkleAnimationProps) => react_jsx_runtime31.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/components/SparkleAnimation/types.d.ts
|
|
16
16
|
declare enum SparkleAnimationOverride {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_SparkleAnimation = require('../../SparkleAnimation-
|
|
1
|
+
const require_SparkleAnimation = require('../../SparkleAnimation-Bg5qax1t.cjs');
|
|
2
2
|
|
|
3
3
|
exports.SparkleAnimation = require_SparkleAnimation.SparkleAnimation;
|
|
4
4
|
exports.SparkleAnimationOverride = require_SparkleAnimation.SparkleAnimationOverride;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as SparkleAnimationOverride, t as SparkleAnimation } from "../../SparkleAnimation-
|
|
1
|
+
import { n as SparkleAnimationOverride, t as SparkleAnimation } from "../../SparkleAnimation-HY4cgwE3.js";
|
|
2
2
|
|
|
3
3
|
export { SparkleAnimation, SparkleAnimationOverride };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Spinner/Spinner.d.ts
|
|
4
4
|
type SpinnerProps = {
|
|
@@ -6,6 +6,6 @@ type SpinnerProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Spinner: ({
|
|
8
8
|
className
|
|
9
|
-
}: SpinnerProps) =>
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime5.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Spinner };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Spinner/Spinner.d.ts
|
|
4
4
|
type SpinnerProps = {
|
|
@@ -6,6 +6,6 @@ type SpinnerProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Spinner: ({
|
|
8
8
|
className
|
|
9
|
-
}: SpinnerProps) =>
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime19.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Spinner };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SuggestionButton/types.d.ts
|
|
@@ -30,6 +30,6 @@ declare const SuggestionButton: ({
|
|
|
30
30
|
dataAttributes,
|
|
31
31
|
dataTestId,
|
|
32
32
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
33
|
+
}: SuggestionButtonProps) => react_jsx_runtime13.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SuggestionButton/types.d.ts
|
|
@@ -30,6 +30,6 @@ declare const SuggestionButton: ({
|
|
|
30
30
|
dataAttributes,
|
|
31
31
|
dataTestId,
|
|
32
32
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
33
|
+
}: SuggestionButtonProps) => react_jsx_runtime14.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_chunk = require('../../chunk-
|
|
2
|
-
require('../../Typography-
|
|
3
|
-
const require_ButtonBase = require('../../ButtonBase-
|
|
1
|
+
const require_chunk = require('../../chunk-CbDLau6x.cjs');
|
|
2
|
+
require('../../Typography-Csg-nd_w.cjs');
|
|
3
|
+
const require_ButtonBase = require('../../ButtonBase-Bm_QOyM1.cjs');
|
|
4
4
|
let classnames = require("classnames");
|
|
5
5
|
classnames = require_chunk.__toESM(classnames);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require('../../Typography-
|
|
2
|
-
const require_TextInput = require('../../TextInput-
|
|
1
|
+
require('../../Typography-Csg-nd_w.cjs');
|
|
2
|
+
const require_TextInput = require('../../TextInput-DfCocKVm.cjs');
|
|
3
3
|
|
|
4
4
|
exports.TextInput = require_TextInput.TextInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/ToggleButton/ToggleButton.d.ts
|
|
4
4
|
type ToggleButtonProps = {
|
|
@@ -25,6 +25,6 @@ declare const ToggleButton: ({
|
|
|
25
25
|
icon,
|
|
26
26
|
iconClassName,
|
|
27
27
|
variant
|
|
28
|
-
}: ToggleButtonProps) =>
|
|
28
|
+
}: ToggleButtonProps) => react_jsx_runtime16.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require('../../Typography-
|
|
2
|
-
const require_ToggleButton = require('../../ToggleButton-
|
|
1
|
+
require('../../Typography-Csg-nd_w.cjs');
|
|
2
|
+
const require_ToggleButton = require('../../ToggleButton-BhBEOjxO.cjs');
|
|
3
3
|
|
|
4
4
|
exports.ToggleButton = require_ToggleButton.ToggleButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_Typography = require('../../Typography-
|
|
1
|
+
const require_Typography = require('../../Typography-Csg-nd_w.cjs');
|
|
2
2
|
|
|
3
3
|
exports.Typography = require_Typography.Typography;
|
|
4
4
|
exports.TypographyDomVariantMap = require_Typography.TypographyDomVariantMap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
261
261
|
stars,
|
|
262
262
|
reviewCount,
|
|
263
263
|
className
|
|
264
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime7.JSX.Element;
|
|
265
265
|
interface PriceSectionProps {
|
|
266
266
|
originalPrice?: string;
|
|
267
267
|
salePrice?: string;
|
|
@@ -271,7 +271,7 @@ declare const PriceSection: ({
|
|
|
271
271
|
originalPrice,
|
|
272
272
|
salePrice,
|
|
273
273
|
pricePrefix
|
|
274
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime7.JSX.Element;
|
|
275
275
|
interface ProductCardProps extends TestProps {
|
|
276
276
|
productCardConfig?: ProductCardConfig;
|
|
277
277
|
merchantShortName: string;
|
|
@@ -308,7 +308,7 @@ declare const ProductCard: ({
|
|
|
308
308
|
aspectRatio,
|
|
309
309
|
growWithContainer,
|
|
310
310
|
onClick
|
|
311
|
-
}: ProductCardProps) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime7.JSX.Element;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
314
314
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
2
2
|
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
@@ -41,6 +41,6 @@ declare const SearchResultsFilter: ({
|
|
|
41
41
|
onSelectFilterItem,
|
|
42
42
|
onClearAllFilters,
|
|
43
43
|
filterButtonText
|
|
44
|
-
}: SearchResultsFilterProps) =>
|
|
44
|
+
}: SearchResultsFilterProps) => react_jsx_runtime26.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { SearchFilterSidebarVariant as a, CloseIconVariant$1 as i, SearchResultsFilterProps as n, searchFilterSidebarVariantClasses as r, SearchResultsFilter as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
3
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
4
4
|
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
5
5
|
|
|
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
261
261
|
stars,
|
|
262
262
|
reviewCount,
|
|
263
263
|
className
|
|
264
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime17.JSX.Element;
|
|
265
265
|
interface PriceSectionProps {
|
|
266
266
|
originalPrice?: string;
|
|
267
267
|
salePrice?: string;
|
|
@@ -271,7 +271,7 @@ declare const PriceSection: ({
|
|
|
271
271
|
originalPrice,
|
|
272
272
|
salePrice,
|
|
273
273
|
pricePrefix
|
|
274
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime17.JSX.Element;
|
|
275
275
|
interface ProductCardProps extends TestProps {
|
|
276
276
|
productCardConfig?: ProductCardConfig;
|
|
277
277
|
merchantShortName: string;
|
|
@@ -308,7 +308,7 @@ declare const ProductCard: ({
|
|
|
308
308
|
aspectRatio,
|
|
309
309
|
growWithContainer,
|
|
310
310
|
onClick
|
|
311
|
-
}: ProductCardProps) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime17.JSX.Element;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
314
314
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
package/dist/util/index.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envive-ai/react-toolkit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "React component library for Envive services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "vitest"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@envive-ai/react-hooks": "0.2.
|
|
34
|
+
"@envive-ai/react-hooks": "0.2.9",
|
|
35
35
|
"@tailwindcss/typography": "^0.5.15",
|
|
36
36
|
"classnames": "^2.5.1",
|
|
37
37
|
"react-icons": "^5.0.1",
|
|
@@ -45,16 +45,29 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@chromatic-com/storybook": "^4.1.1",
|
|
47
47
|
"@spiffy-ai/commerce-api-client": "^1.1.0-SNAPSHOT.202510160819",
|
|
48
|
+
"@storybook/addon-a11y": "^9.1.4",
|
|
49
|
+
"@storybook/addon-docs": "^9.1.4",
|
|
50
|
+
"@storybook/addon-styling-webpack": "^2.0.0",
|
|
51
|
+
"@storybook/addon-vitest": "^9.1.10",
|
|
48
52
|
"@storybook/react-vite": "^9.1.4",
|
|
49
53
|
"@types/node": "^24.3.2",
|
|
50
54
|
"@types/react": "^19.1.12",
|
|
55
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
56
|
+
"@vitest/browser": "^3.2.4",
|
|
57
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
58
|
+
"autoprefixer": "^10.4.21",
|
|
59
|
+
"playwright": "^1.56.0",
|
|
51
60
|
"postcss": "^8.5.6",
|
|
52
61
|
"tailwindcss": "^3.4.17",
|
|
53
62
|
"tsdown": "^0.14.2",
|
|
54
63
|
"tsx": "^4.20.6",
|
|
55
64
|
"typescript": "^5.4.3",
|
|
65
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
56
66
|
"vitest": "^3.2.4"
|
|
57
67
|
},
|
|
68
|
+
"optionalDependencies": {
|
|
69
|
+
"@rollup/rollup-linux-x64-gnu": "*"
|
|
70
|
+
},
|
|
58
71
|
"exports": {
|
|
59
72
|
"./Accordion": {
|
|
60
73
|
"import": "./dist/components/Accordion/index.js",
|
|
@@ -46,7 +46,10 @@ export const Accordion = ({ title, content }: AccordionProps) => {
|
|
|
46
46
|
className={titleWrapperClasses}
|
|
47
47
|
onClick={() => setIsOpen(!isOpen)}
|
|
48
48
|
>
|
|
49
|
-
<Typography
|
|
49
|
+
<Typography
|
|
50
|
+
variant="body4"
|
|
51
|
+
className={titleClasses}
|
|
52
|
+
>
|
|
50
53
|
{title}
|
|
51
54
|
</Typography>
|
|
52
55
|
<motion.div
|
|
@@ -37,8 +37,11 @@ export const AppliedFiltersScrollbar = ({
|
|
|
37
37
|
const iconColor = 'currentColor'; // match with text color
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<ScrollContainer
|
|
41
|
-
{
|
|
40
|
+
<ScrollContainer
|
|
41
|
+
className={filterBarClassNames}
|
|
42
|
+
hideScrollbars
|
|
43
|
+
>
|
|
44
|
+
{selectedFilterOptions.map(filter => (
|
|
42
45
|
<button
|
|
43
46
|
key={filter.id}
|
|
44
47
|
className={buttonClasses}
|
|
@@ -23,7 +23,10 @@ export const DynamicFiltersScrollbar = ({
|
|
|
23
23
|
filterHoverClasses,
|
|
24
24
|
onToggleDynamicFilter,
|
|
25
25
|
}: DynamicFiltersScrollbarProps) => (
|
|
26
|
-
<ScrollContainer
|
|
26
|
+
<ScrollContainer
|
|
27
|
+
className={filterBarClassNames}
|
|
28
|
+
hideScrollbars
|
|
29
|
+
>
|
|
27
30
|
{availableDynamicFilters.map(({ name, displayName }) => {
|
|
28
31
|
const buttonClasses = classNames(
|
|
29
32
|
'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
|
|
@@ -37,8 +37,11 @@ export const AppliedFiltersScrollbar = ({
|
|
|
37
37
|
const iconColor = 'currentColor'; // match with text color
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<ScrollContainer
|
|
41
|
-
{
|
|
40
|
+
<ScrollContainer
|
|
41
|
+
className={filterBarClassNames}
|
|
42
|
+
hideScrollbars
|
|
43
|
+
>
|
|
44
|
+
{selectedFilterOptions.map(filter => (
|
|
42
45
|
<button
|
|
43
46
|
key={filter.id}
|
|
44
47
|
className={buttonClasses}
|
|
@@ -23,7 +23,10 @@ export const DynamicFiltersScrollbar = ({
|
|
|
23
23
|
filterHoverClasses,
|
|
24
24
|
onToggleDynamicFilter,
|
|
25
25
|
}: DynamicFiltersScrollbarProps) => (
|
|
26
|
-
<ScrollContainer
|
|
26
|
+
<ScrollContainer
|
|
27
|
+
className={filterBarClassNames}
|
|
28
|
+
hideScrollbars
|
|
29
|
+
>
|
|
27
30
|
{availableDynamicFilters.map(({ name, displayName }) => {
|
|
28
31
|
const buttonClasses = classNames(
|
|
29
32
|
'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
|
|
@@ -33,7 +33,11 @@ export const ModalSheetCloseIcon = ({
|
|
|
33
33
|
|
|
34
34
|
const closeIconContextValue = useMemo(() => ({ size: iconSize }), [iconSize]);
|
|
35
35
|
return (
|
|
36
|
-
<button
|
|
36
|
+
<button
|
|
37
|
+
type="button"
|
|
38
|
+
className={closeIconClassNames}
|
|
39
|
+
onClick={closeModal}
|
|
40
|
+
>
|
|
37
41
|
<IconContext.Provider value={closeIconContextValue}>{closeIcon}</IconContext.Provider>
|
|
38
42
|
</button>
|
|
39
43
|
);
|
|
@@ -97,7 +97,7 @@ export const ModalSheetDesktop = ({
|
|
|
97
97
|
exit={{ right, display: isHidden }}
|
|
98
98
|
transition={{ duration: animationDuration, ease: 'easeIn' }}
|
|
99
99
|
style={{ width: desktopWidth }}
|
|
100
|
-
onClick={
|
|
100
|
+
onClick={e => e.stopPropagation()}
|
|
101
101
|
>
|
|
102
102
|
<div className={contentClassNames}>
|
|
103
103
|
<div className={headerClassNames}>
|
|
@@ -94,7 +94,7 @@ export const ModalSheetMobile = ({
|
|
|
94
94
|
animate={{ bottom, display: isHidden }}
|
|
95
95
|
exit={{ bottom, display: isHidden }}
|
|
96
96
|
transition={{ duration: animationDuration, ease: 'easeIn' }}
|
|
97
|
-
onClick={
|
|
97
|
+
onClick={e => e.stopPropagation()}
|
|
98
98
|
>
|
|
99
99
|
<div className={contentClassNames}>
|
|
100
100
|
<div className={headerClassNames}>
|
|
@@ -35,7 +35,10 @@ export const ModalSheetMobileHeader = ({
|
|
|
35
35
|
onTouchStart={handleHeaderClick}
|
|
36
36
|
onMouseDown={handleHeaderClick}
|
|
37
37
|
>
|
|
38
|
-
<AnimatedChevron
|
|
38
|
+
<AnimatedChevron
|
|
39
|
+
animationKey={animationKey}
|
|
40
|
+
chevronColor={chevronColor}
|
|
41
|
+
/>
|
|
39
42
|
{headerContent}
|
|
40
43
|
</motion.div>
|
|
41
44
|
);
|
|
@@ -7,18 +7,18 @@ import { TestProps } from '@envive-ai/react-hooks/types';
|
|
|
7
7
|
import { useImageResolver } from '@envive-ai/react-hooks/hooks/ImageResolver';
|
|
8
8
|
import { PRODUCT_CARD_TESTID } from '@envive-ai/react-hooks/config';
|
|
9
9
|
import {
|
|
10
|
+
productCardLayoutVariantClasses,
|
|
10
11
|
variantClassMap,
|
|
11
12
|
variantHoverClassMap,
|
|
12
|
-
productCardLayoutVariantClasses,
|
|
13
13
|
variantTitleColorMap,
|
|
14
14
|
} from './productCardVariants';
|
|
15
15
|
import { ImageWithFallback } from '../ImageWithFallback';
|
|
16
16
|
import { Spinner } from '../Spinner';
|
|
17
17
|
import {
|
|
18
18
|
ProductCardConfig,
|
|
19
|
-
ProductCardVariant,
|
|
20
19
|
ProductCardHoverVariant,
|
|
21
20
|
ProductCardLayoutVariant,
|
|
21
|
+
ProductCardVariant,
|
|
22
22
|
} from './types';
|
|
23
23
|
|
|
24
24
|
const formatReviews = (stars: number) =>
|
|
@@ -213,11 +213,11 @@ export const ProductCard = ({
|
|
|
213
213
|
linkClassnames,
|
|
214
214
|
zoomOnHover
|
|
215
215
|
? [
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
'spiffy-tw-transition-transform',
|
|
217
|
+
'spiffy-tw-duration-200',
|
|
218
|
+
'spiffy-tw-origin-top',
|
|
219
|
+
'hover:spiffy-tw-scale-105',
|
|
220
|
+
]
|
|
221
221
|
: [],
|
|
222
222
|
);
|
|
223
223
|
|
|
@@ -264,8 +264,16 @@ export const ProductCard = ({
|
|
|
264
264
|
);
|
|
265
265
|
|
|
266
266
|
return (
|
|
267
|
-
<div
|
|
268
|
-
|
|
267
|
+
<div
|
|
268
|
+
className={containerClassnames}
|
|
269
|
+
data-testid={dataTestId ?? PRODUCT_CARD_TESTID}
|
|
270
|
+
>
|
|
271
|
+
<a
|
|
272
|
+
href={url}
|
|
273
|
+
onClick={() => handleClick()}
|
|
274
|
+
target="_self"
|
|
275
|
+
draggable={false}
|
|
276
|
+
>
|
|
269
277
|
<div className={verticalContainerClassnames}>
|
|
270
278
|
<div className={imageClipContainerClassnames}>
|
|
271
279
|
<div className={imageContainerClassnames}>
|
|
@@ -273,14 +281,17 @@ export const ProductCard = ({
|
|
|
273
281
|
<ImageWithFallback
|
|
274
282
|
src={resolve(imageUrl, layoutVariant === 'tall' ? 300 : 178)}
|
|
275
283
|
alt={title}
|
|
276
|
-
fallback={<Spinner className="spiffy-tw-
|
|
284
|
+
fallback={<Spinner className="spiffy-tw-h-6 spiffy-tw-w-6" />}
|
|
277
285
|
imageClassnames={imageClassnames}
|
|
278
286
|
/>
|
|
279
287
|
)}
|
|
280
288
|
</div>
|
|
281
289
|
</div>
|
|
282
290
|
<div className={contentClassnames}>
|
|
283
|
-
<Typography
|
|
291
|
+
<Typography
|
|
292
|
+
variant="h4"
|
|
293
|
+
className={productTitleClassnames}
|
|
294
|
+
>
|
|
284
295
|
{title}
|
|
285
296
|
</Typography>
|
|
286
297
|
<div className={priceAndRatingContainerClassnames}>
|
|
@@ -292,7 +303,10 @@ export const ProductCard = ({
|
|
|
292
303
|
/>
|
|
293
304
|
)}
|
|
294
305
|
{averageRating && numberReviews && (
|
|
295
|
-
<RatingSummary
|
|
306
|
+
<RatingSummary
|
|
307
|
+
stars={averageRating}
|
|
308
|
+
reviewCount={numberReviews}
|
|
309
|
+
/>
|
|
296
310
|
)}
|
|
297
311
|
</div>
|
|
298
312
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { SearchResponseProductAttributes } from '@envive-ai/react-hooks/application/models';
|
|
3
3
|
import { productGridVariantClasses } from './productGridVariants';
|
|
4
|
-
import {
|
|
4
|
+
import { ProductCard, ProductCardConfig, ProductGridVariant } from '../ProductCard';
|
|
5
5
|
|
|
6
6
|
interface ProductGridProps {
|
|
7
7
|
productList: SearchResponseProductAttributes['attributes'][];
|
|
@@ -38,7 +38,10 @@ export const ProductGrid = ({
|
|
|
38
38
|
return (
|
|
39
39
|
<div className={productGridClasses}>
|
|
40
40
|
{productList.map((product: (typeof productList)[0], index: number) => (
|
|
41
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
key={product.id}
|
|
43
|
+
className={cardContainerClasses}
|
|
44
|
+
>
|
|
42
45
|
<ProductCard
|
|
43
46
|
productCardConfig={productCardConfig}
|
|
44
47
|
merchantShortName={merchantShortName}
|
|
@@ -82,9 +82,22 @@ export const RadioButton = ({
|
|
|
82
82
|
fill="none"
|
|
83
83
|
>
|
|
84
84
|
{/* Outer circle (border). Gray when unchecked */}
|
|
85
|
-
<circle
|
|
85
|
+
<circle
|
|
86
|
+
cx="12"
|
|
87
|
+
cy="12"
|
|
88
|
+
r="11.5"
|
|
89
|
+
fill="white"
|
|
90
|
+
stroke={getFillColor()}
|
|
91
|
+
/>
|
|
86
92
|
{/* Inner filled circle (when checked) */}
|
|
87
|
-
{checked &&
|
|
93
|
+
{checked && (
|
|
94
|
+
<circle
|
|
95
|
+
cx="12"
|
|
96
|
+
cy="12"
|
|
97
|
+
r="9"
|
|
98
|
+
fill={getFillColor()}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
88
101
|
</svg>
|
|
89
102
|
</div>
|
|
90
103
|
<Typography variant="body3">{label}</Typography>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { SearchResponseProductAttributes } from
|
|
2
|
-
import { ProductCardConfig, ProductGridVariant } from
|
|
3
|
-
import classNames from
|
|
4
|
-
import { motion } from
|
|
5
|
-
import { ProductGrid } from
|
|
6
|
-
import { Typography } from
|
|
7
|
-
|
|
1
|
+
import { SearchResponseProductAttributes } from '@envive-ai/react-hooks/application/models';
|
|
2
|
+
import { ProductCardConfig, ProductGridVariant } from '@envive-ai/react-hooks/contexts/types';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { motion } from 'framer-motion';
|
|
5
|
+
import { ProductGrid } from '../ProductGrid';
|
|
6
|
+
import { Typography } from '../Typography';
|
|
8
7
|
|
|
9
8
|
interface RecommendedProductsProps {
|
|
10
9
|
retrievedProducts: SearchResponseProductAttributes['attributes'][];
|
|
@@ -79,7 +78,10 @@ export const RecommendedProducts: React.FC<RecommendedProductsProps> = ({
|
|
|
79
78
|
>
|
|
80
79
|
{heading && (
|
|
81
80
|
<div className={titleContainerClasses}>
|
|
82
|
-
<Typography
|
|
81
|
+
<Typography
|
|
82
|
+
variant="h1"
|
|
83
|
+
className="spiffy-tw-text-[--spiffy-colors-text-accent]"
|
|
84
|
+
>
|
|
83
85
|
{heading}
|
|
84
86
|
</Typography>
|
|
85
87
|
</div>
|
|
@@ -94,4 +96,4 @@ export const RecommendedProducts: React.FC<RecommendedProductsProps> = ({
|
|
|
94
96
|
/>
|
|
95
97
|
</motion.div>
|
|
96
98
|
);
|
|
97
|
-
};
|
|
99
|
+
};
|