@envive-ai/react-toolkit 0.2.13-arthur-1 → 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-DPUaEXiE.cjs → Accordion-Bc3o-NjV.cjs} +5 -23
- package/dist/{Accordion-8zFBEEaN.js → Accordion-D8Vm8J1y.js} +2 -21
- package/dist/{AnimatedChevron-CPW5KPLr.cjs → AnimatedChevron-BKQrUKb5.cjs} +1 -1
- package/dist/{ButtonBase-C44g6llb.cjs → ButtonBase-Bm_QOyM1.cjs} +2 -2
- package/dist/{DynamicFiltersScrollbar-IO886VXD.cjs → DynamicFiltersScrollbar-bT3VoG-D.cjs} +2 -2
- package/dist/{ImageWithFallback-C-ZQn7tR.cjs → ImageWithFallback-BiBjNK-9.cjs} +1 -1
- package/dist/{ModalSheet-JZerJZ1T.cjs → ModalSheet-BuCtRDnQ.cjs} +2 -2
- package/dist/{ModalSheet-C5f5abw1.js → ModalSheet-DVrY7Mw0.js} +1 -1
- package/dist/{ProductCard-C7rZyWpj.cjs → ProductCard-C3seoFWE.cjs} +5 -5
- package/dist/{ProductCard-GxpFxjh0.js → ProductCard-ChitHvuc.js} +3 -3
- package/dist/{ProductGrid-0A8vml2y.cjs → ProductGrid-Ct2DvLGf.cjs} +2 -2
- package/dist/{ProductGrid-DAwc9dKV.js → ProductGrid-DukHo_KY.js} +1 -1
- package/dist/{RadioButton-DpF1wymL.cjs → RadioButton-D4TPq1Aa.cjs} +2 -2
- package/dist/{RadioButtonGroup-YQIxmR7j.js → RadioButtonGroup-BWQ4-m2M.js} +1 -1
- package/dist/{RadioButtonGroup-ByzTXNAb.cjs → RadioButtonGroup-BhZloLH6.cjs} +2 -2
- package/dist/{RecommendedProducts-qkPxXVJn.cjs → RecommendedProducts-Cy-1szYc.cjs} +3 -3
- package/dist/{RecommendedProducts-C6dLpLPP.js → RecommendedProducts-DooGvLFT.js} +1 -1
- package/dist/{SearchAutocomplete-BdTWETDB.cjs → SearchAutocomplete-C1XH39Xx.cjs} +6 -5
- package/dist/{SearchAutocomplete-DNe193EV.js → SearchAutocomplete-CuuN0cDu.js} +3 -3
- package/dist/{SearchFilter-BRtCSuAn.cjs → SearchFilter-CnP71PTj.cjs} +8 -8
- package/dist/{SearchFilter-DvJx0b0W.js → SearchFilter-DsYF1A5n.js} +6 -6
- package/dist/{SearchInput-CImlqrau.cjs → SearchInput-Cgsjew8Q.cjs} +9 -63
- package/dist/{SearchInput-kLhxkpgq.js → SearchInput-DE9Iz7A8.js} +6 -62
- package/dist/{SearchInputForm-CFm_hUvX.js → SearchInputForm--CvVrjwl.js} +2 -2
- package/dist/{SearchInputForm-ZgNNEX6E.cjs → SearchInputForm-CSd4tjts.cjs} +3 -3
- package/dist/SearchResultsFilterButton-BQqm4icD.cjs +29 -0
- package/dist/SearchResultsFilterButton-CV11UTGi.js +22 -0
- package/dist/{SearchResultsFilterSidebar-BRFONIEq.cjs → SearchResultsFilterSidebar-U6dFy-Jo.cjs} +4 -4
- package/dist/{SearchResultsFilterSidebar-DLzQoFGD.js → SearchResultsFilterSidebar-ydSo1S6h.js} +3 -3
- package/dist/{SearchResultsStates-D7HfsLeZ.js → SearchResultsStates-BCeqeo9y.js} +13 -52
- package/dist/{SearchResultsStates-CQR5Il4l.cjs → SearchResultsStates-Dp-AsmH8.cjs} +16 -54
- package/dist/{SparkleAnimation-BikAiAmb.cjs → SparkleAnimation-Bg5qax1t.cjs} +11 -10
- package/dist/{SparkleAnimation-szzXiTam.js → SparkleAnimation-HY4cgwE3.js} +9 -9
- package/dist/{Spinner-7HblFCja.cjs → Spinner-CUrXDajS.cjs} +1 -1
- package/dist/{TextInput-CaynCoDf.cjs → TextInput-DfCocKVm.cjs} +2 -2
- package/dist/{ToggleButton-Dxk3U1hR.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-Dd_9XeqA.d.ts → index-DJOd-3Pi.d.ts} +2 -2
- package/dist/components/Accordion/index.cjs +2 -3
- package/dist/components/Accordion/index.js +1 -2
- package/dist/components/AnimatedChevron/{index-BwQ6tJL8.d.cts → index-BfdaL9eW.d.cts} +2 -2
- package/dist/components/AnimatedChevron/{index-DZdGWikh.d.ts → index-bNdUYDzX.d.ts} +2 -2
- package/dist/components/AnimatedChevron/index.cjs +1 -1
- package/dist/components/AnimatedChevron/index.js +1 -1
- package/dist/components/AppliedFiltersScrollbar/{index-Dcyc-5Bv.d.ts → index-B68Mx16E.d.cts} +2 -2
- package/dist/components/AppliedFiltersScrollbar/index.cjs +2 -2
- package/dist/components/ButtonBase/{index-Bxdhf_O8.d.cts → index-3ltL6jhO.d.ts} +3 -3
- package/dist/components/ButtonBase/{index-VoanK6Pr.d.ts → index-CcVRnbuQ.d.cts} +3 -3
- package/dist/components/ButtonBase/index.cjs +3 -3
- package/dist/components/ButtonBase/index.js +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-CHzxQmaW.d.cts → index-B483Jhki.d.cts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/{index-vVNOOaOF.d.ts → index-B_a6Oebn.d.ts} +2 -2
- package/dist/components/DynamicFiltersScrollbar/index.cjs +2 -2
- package/dist/components/FilterScrollbar/{index-DXcZLcQi.d.cts → index-BmHm47DA.d.cts} +3 -3
- package/dist/components/FilterScrollbar/{index-DwLyxqQl.d.ts → index-CISEdkBM.d.ts} +3 -3
- package/dist/components/FilterScrollbar/index.cjs +2 -2
- package/dist/components/FilterScrollbar/index.js +1 -1
- package/dist/components/ImageWithFallback/{index-BLbkDyG8.d.cts → index-CCWzf6ZV.d.ts} +2 -2
- package/dist/components/ImageWithFallback/{index-NJZsMOXc.d.ts → index-Dk89vxqv.d.cts} +2 -2
- package/dist/components/ImageWithFallback/index.cjs +1 -1
- package/dist/components/ImageWithFallback/index.js +1 -1
- package/dist/components/ModalSheet/{index-B5q4MHdq.d.cts → index-CI0qFVA7.d.ts} +2 -2
- package/dist/components/ModalSheet/{index-BN20-QS0.d.ts → index-C_8baIZK.d.cts} +2 -2
- package/dist/components/ModalSheet/index.cjs +2 -2
- package/dist/components/ModalSheet/index.js +2 -2
- package/dist/components/ProductCard/{index-CglXQ3wh.d.ts → index-D5om2RVT.d.ts} +1 -1
- package/dist/components/ProductCard/{index-XVlN6iMl.d.cts → index-Djjvdeh7.d.cts} +1 -1
- package/dist/components/ProductCard/index.cjs +4 -4
- package/dist/components/ProductCard/index.js +3 -3
- package/dist/components/ProductGrid/{index-D_YpwJCd.d.ts → index-AxMBGLVk.d.ts} +3 -3
- package/dist/components/ProductGrid/{index-BPBgwFsa.d.cts → index-C4Tz_KWs.d.cts} +3 -3
- package/dist/components/ProductGrid/index.cjs +5 -5
- package/dist/components/ProductGrid/index.js +4 -4
- package/dist/components/RadioButton/{index-BeOT_AlW.d.cts → index-BWo-a19v.d.ts} +2 -2
- package/dist/components/RadioButton/{index-CxluCaJw.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-KeOIiYNW.d.ts → index-CiljmnzJ.d.cts} +2 -2
- package/dist/components/RadioButtonGroup/{index-BOhV-rG3.d.cts → index-DdyMuFCX.d.ts} +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 +5 -6
- package/dist/components/SearchAutocomplete/{index-Br_POGOz.d.ts → index-BBUrFTl5.d.ts} +2 -2
- package/dist/components/SearchAutocomplete/{index-BcnHcv7Q.d.cts → index-OVMqT8K4.d.cts} +2 -2
- package/dist/components/SearchAutocomplete/index.cjs +2 -4
- package/dist/components/SearchAutocomplete/index.js +1 -3
- package/dist/components/SearchFilter/{index-BbIqmoO8.d.ts → index-BDaLJW2Q.d.cts} +5 -5
- package/dist/components/SearchFilter/{index-DAL3Wl6U.d.cts → index-DESOqSJQ.d.ts} +5 -5
- package/dist/components/SearchFilter/index.cjs +10 -11
- package/dist/components/SearchFilter/index.js +9 -10
- package/dist/components/SearchInput/{index-C0H51Flv.d.ts → index-UY0W77Y0.d.ts} +2 -2
- package/dist/components/SearchInput/index.cjs +4 -5
- package/dist/components/SearchInput/index.js +3 -4
- package/dist/components/SearchInputForm/{index-Cleto06d.d.cts → index-B3A17s3e.d.cts} +2 -2
- package/dist/components/SearchInputForm/{index-DjjoY7MQ.d.ts → index-D1F37qNH.d.ts} +3 -3
- package/dist/components/SearchInputForm/index.cjs +6 -8
- package/dist/components/SearchInputForm/index.js +5 -7
- package/dist/components/SearchResultsContent/{index-KdFf9yzs.d.ts → index-B66EnbgF.d.cts} +5 -5
- package/dist/components/SearchResultsContent/{index-C4qsTFUd.d.cts → index-BI4Dm7mI.d.ts} +5 -5
- package/dist/components/SearchResultsContent/index.cjs +12 -14
- package/dist/components/SearchResultsContent/index.js +10 -12
- package/dist/components/SearchResultsFilterButton/{index-zgQsT6vz.d.cts → index-CCVZZUTR.d.cts} +2 -2
- package/dist/components/SearchResultsFilterButton/{index-BvntKdyC.d.ts → index-Cjq_NOxx.d.ts} +2 -2
- package/dist/components/SearchResultsFilterButton/index.cjs +4 -6
- package/dist/components/SearchResultsFilterButton/index.js +3 -5
- package/dist/components/SearchResultsFilterModal/{index-CNBQ1ikL.d.ts → index-Ba84MNoM.d.ts} +3 -3
- package/dist/components/SearchResultsFilterModal/{index-mRcnKysU.d.cts → index-CMWDFJWT.d.cts} +3 -3
- package/dist/components/SearchResultsFilterModal/index.cjs +14 -16
- package/dist/components/SearchResultsFilterModal/index.js +12 -14
- package/dist/components/SearchResultsFilterSidebar/{index-C7PE9z5a.d.ts → index-DmO55w4A.d.ts} +1 -1
- package/dist/components/SearchResultsFilterSidebar/{index-DKzEKFV3.d.cts → index-Dtr9q9hT.d.cts} +1 -1
- package/dist/components/SearchResultsFilterSidebar/index.cjs +13 -14
- package/dist/components/SearchResultsFilterSidebar/index.js +12 -13
- package/dist/components/SearchResultsStates/{index-RVgPTFiH.d.cts → index-Ba3tQMCI.d.ts} +2 -2
- package/dist/components/SearchResultsStates/{index-Dugoegtn.d.ts → index-DN1-g87W.d.cts} +6 -6
- package/dist/components/SearchResultsStates/index.cjs +11 -13
- package/dist/components/SearchResultsStates/index.js +10 -12
- package/dist/components/SearchResultsToolbar/{index-PYr086HM.d.cts → index-M8RkRW3H.d.cts} +2 -2
- package/dist/components/SearchResultsToolbar/{index-CIvuccni.d.ts → index-_hxKcDDT.d.ts} +2 -2
- package/dist/components/SearchResultsToolbar/index.cjs +13 -14
- package/dist/components/SearchResultsToolbar/index.js +12 -13
- package/dist/components/SparkleAnimation/{index-BFqUibyY.d.ts → index-BMrS1PDU.d.cts} +2 -2
- package/dist/components/SparkleAnimation/index.cjs +1 -3
- package/dist/components/SparkleAnimation/index.js +1 -3
- package/dist/components/Spinner/{index-TKsPifGM.d.ts → index-C876igqb.d.ts} +2 -2
- package/dist/components/Spinner/index.cjs +1 -1
- package/dist/components/Spinner/index.js +1 -1
- package/dist/components/SuggestionButton/{index-BioM3QHW.d.ts → index-DfQRQGev.d.cts} +2 -2
- package/dist/components/SuggestionButton/index.cjs +9 -8
- package/dist/components/SuggestionButton/index.js +5 -6
- package/dist/components/TextInput/{index-DAhxej1K.d.ts → index-CkQtHiR9.d.ts} +2 -2
- package/dist/components/TextInput/index.cjs +2 -2
- package/dist/components/TextInput/index.js +1 -1
- package/dist/components/ToggleButton/{index-eLDrp4ic.d.cts → index-CpURpMq5.d.cts} +2 -2
- package/dist/components/ToggleButton/{index-pFQuGdoj.d.ts → index-DFz4kch0.d.ts} +2 -2
- package/dist/components/ToggleButton/index.cjs +2 -2
- package/dist/components/ToggleButton/index.js +1 -1
- package/dist/components/Typography/{index-ymH7f3jB.d.ts → index-DE1Nhjra.d.ts} +2 -2
- package/dist/components/Typography/index.cjs +1 -1
- package/dist/{index-BCBtAzCc.d.ts → index-1GZFptEC.d.cts} +5 -5
- package/dist/{index-BiKhzraQ.d.cts → index-CBI4Lqsm.d.cts} +2 -2
- package/dist/{index-DXGw5Z56.d.ts → index-Cr8VXccr.d.ts} +1 -1
- package/dist/{index-DK0xpfMg.d.ts → index-pZZXXUG_.d.ts} +2 -2
- package/dist/{index-CzbumwVZ.d.cts → index-yDKT5Bem.d.ts} +5 -5
- package/dist/{searchFilterSidebarVariants-CjyRGKK_.cjs → searchFilterSidebarVariants-C61Byr1S.cjs} +1 -1
- package/dist/{searchFilterSidebarVariants-gkgkflXx.js → searchFilterSidebarVariants-DcwlBfvY.js} +1 -1
- 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 +4 -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/FourPointStar-3DqnYmfN.js +0 -21
- package/dist/FourPointStar-AQ9OSu0S.cjs +0 -26
- package/dist/OutlinedStar-CC0V_jAK.cjs +0 -26
- package/dist/OutlinedStar-WWs3gRwt.js +0 -21
- package/dist/SearchResultsFilterButton-D929tRt9.cjs +0 -96
- package/dist/SearchResultsFilterButton-Dk7u7rgn.js +0 -90
- package/dist/jsx-runtime-Dg2m6dxZ-B-pkyyHT.cjs +0 -2586
- package/dist/jsx-runtime-Dg2m6dxZ-CU_SzTu4.js +0 -2580
- /package/dist/{AnimatedChevron-DO_jcnJg.js → AnimatedChevron-DghLnmlM.js} +0 -0
- /package/dist/{ButtonBase-Cb6Iec6f.cjs → ButtonBase-BIXx56hq.cjs} +0 -0
- /package/dist/{ButtonBase-D2eXuapk.js → ButtonBase-C9fn-c5h.js} +0 -0
- /package/dist/{ButtonBase-Cjo-fBg2.js → ButtonBase-CT397aT3.js} +0 -0
- /package/dist/{DynamicFiltersScrollbar-s5yfmMau.js → DynamicFiltersScrollbar-CibstqNd.js} +0 -0
- /package/dist/{ImageWithFallback-DjDNefaG.js → ImageWithFallback-_QZT0EKI.js} +0 -0
- /package/dist/{RadioButton-DOc8g47U.js → RadioButton-C1w7N40t.js} +0 -0
- /package/dist/{Spinner-OFbXMms8.js → Spinner-CDDFWySo.js} +0 -0
- /package/dist/{TextInput-CsdOvLBQ.js → TextInput-PtrUXoZo.js} +0 -0
- /package/dist/{ToggleButton-D8--AKKK.js → ToggleButton-BTz_zIdc.js} +0 -0
- /package/dist/{colorsConfig-CFI1KN8R.js → colorsConfig-BjdoRtRK.js} +0 -0
- /package/dist/{colorsConfig-Dp7w5LPb.cjs → colorsConfig-D-MZuBvt.cjs} +0 -0
- /package/dist/components/AppliedFiltersScrollbar/{index-VbXAIfym.d.cts → index-B9u7XRmf.d.ts} +0 -0
- /package/dist/components/SparkleAnimation/{index-CSBR76H5.d.cts → index-t59eI0td.d.ts} +0 -0
- /package/dist/components/SuggestionButton/{index-CjV6Ar4Y.d.cts → index-CrGSb18s.d.ts} +0 -0
- /package/dist/{types-D6fl4HOx.d.ts → types-CQpdBL3M.d.ts} +0 -0
- /package/dist/{typographyVariantClasses-_oNpv-aN.d.ts → typographyVariantClasses-CrT5OfVw.d.ts} +0 -0
|
@@ -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
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react/no-array-index-key */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { motion } from 'framer-motion';
|
|
3
4
|
import classNames from 'classnames';
|
|
@@ -39,7 +40,10 @@ export const SearchAutocomplete = ({
|
|
|
39
40
|
{parts.map((part, index) => {
|
|
40
41
|
const isMatch = part.toLowerCase() === searchQuery.toLowerCase();
|
|
41
42
|
return isMatch ? (
|
|
42
|
-
<strong
|
|
43
|
+
<strong
|
|
44
|
+
key={index}
|
|
45
|
+
className="spiffy-tw-font-bold"
|
|
46
|
+
>
|
|
43
47
|
{part}
|
|
44
48
|
</strong>
|
|
45
49
|
) : (
|
|
@@ -50,21 +54,19 @@ export const SearchAutocomplete = ({
|
|
|
50
54
|
);
|
|
51
55
|
};
|
|
52
56
|
|
|
53
|
-
const containerClasses = classNames(
|
|
54
|
-
'spiffy-tw-mt-[16px]',
|
|
55
|
-
'spiffy-tw-mb-[8px]',
|
|
56
|
-
);
|
|
57
|
+
const containerClasses = classNames('spiffy-tw-mt-[16px]', 'spiffy-tw-mb-[8px]');
|
|
57
58
|
|
|
58
|
-
const getListElementClasses = (index: number) =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
const getListElementClasses = (index: number) =>
|
|
60
|
+
classNames(
|
|
61
|
+
'spiffy-tw-flex',
|
|
62
|
+
'spiffy-tw-items-center',
|
|
63
|
+
'spiffy-tw-cursor-pointer',
|
|
64
|
+
'spiffy-tw-py-[8px]',
|
|
65
|
+
'spiffy-tw-pl-[16px]',
|
|
66
|
+
'spiffy-tw-text-[--spiffy-colors-text-primary]',
|
|
67
|
+
'hover:spiffy-tw-bg-neutral-100',
|
|
68
|
+
{ 'spiffy-tw-bg-neutral-200': focusedIndex === index },
|
|
69
|
+
);
|
|
68
70
|
|
|
69
71
|
return (
|
|
70
72
|
<motion.div
|
|
@@ -74,7 +76,11 @@ export const SearchAutocomplete = ({
|
|
|
74
76
|
exit={{ opacity: 0, y: -10 }}
|
|
75
77
|
transition={{ duration: 0.2 }}
|
|
76
78
|
>
|
|
77
|
-
<ul
|
|
79
|
+
<ul
|
|
80
|
+
id={id}
|
|
81
|
+
role="listbox"
|
|
82
|
+
className={containerClasses}
|
|
83
|
+
>
|
|
78
84
|
{results.map((result, index) => (
|
|
79
85
|
<li
|
|
80
86
|
key={index}
|
|
@@ -83,14 +89,14 @@ export const SearchAutocomplete = ({
|
|
|
83
89
|
aria-selected={index === focusedIndex}
|
|
84
90
|
className={getListElementClasses(index)}
|
|
85
91
|
onClick={() => onSuggestionSelect(result, index)}
|
|
86
|
-
onKeyDown={
|
|
92
|
+
onKeyDown={event => {
|
|
87
93
|
if (event.key === 'Enter' || event.keyCode === 13) {
|
|
88
94
|
onSuggestionSelect(result, index);
|
|
89
95
|
}
|
|
90
96
|
}}
|
|
91
97
|
>
|
|
92
98
|
<OutlinedStar
|
|
93
|
-
className="spiffy-tw-
|
|
99
|
+
className="spiffy-tw-mr-[16px] spiffy-tw-h-[16px] spiffy-tw-w-[16px]"
|
|
94
100
|
fill={iconColor}
|
|
95
101
|
/>
|
|
96
102
|
{highlightMatchingText(result, searchText)}
|
|
@@ -99,4 +105,4 @@ export const SearchAutocomplete = ({
|
|
|
99
105
|
</ul>
|
|
100
106
|
</motion.div>
|
|
101
107
|
);
|
|
102
|
-
};
|
|
108
|
+
};
|
|
@@ -20,7 +20,7 @@ const SortFilter = ({
|
|
|
20
20
|
}: FilterProps) => {
|
|
21
21
|
const filterTitle = filter.displayName;
|
|
22
22
|
|
|
23
|
-
const options = filter.items.map(
|
|
23
|
+
const options = filter.items.map(item => ({
|
|
24
24
|
label: item.displayName,
|
|
25
25
|
value: item.filterItemId,
|
|
26
26
|
isSelected: item.isSelected,
|
|
@@ -30,8 +30,8 @@ const SortFilter = ({
|
|
|
30
30
|
<RadioButtonGroup
|
|
31
31
|
options={options}
|
|
32
32
|
name={filterTitle}
|
|
33
|
-
onChange={
|
|
34
|
-
const selectedItem = filter.items.find(
|
|
33
|
+
onChange={value => {
|
|
34
|
+
const selectedItem = filter.items.find(item => item.filterItemId === value);
|
|
35
35
|
selectFilterItem({
|
|
36
36
|
filterId: filter.filterId,
|
|
37
37
|
filterItemId: value,
|
|
@@ -41,14 +41,19 @@ const SortFilter = ({
|
|
|
41
41
|
}}
|
|
42
42
|
gap="large"
|
|
43
43
|
textButtonGap="large"
|
|
44
|
-
value={filter.items.find(
|
|
44
|
+
value={filter.items.find(item => item.isSelected)?.filterItemId}
|
|
45
45
|
fillColor={radioButtonFillColor}
|
|
46
46
|
hoverColor={radioButtonHoverColor}
|
|
47
47
|
uncheckedBorderColor={radioButtonUncheckedBorderColor}
|
|
48
48
|
/>
|
|
49
49
|
);
|
|
50
50
|
|
|
51
|
-
return
|
|
51
|
+
return (
|
|
52
|
+
<Accordion
|
|
53
|
+
title={filterTitle}
|
|
54
|
+
content={content}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
52
57
|
};
|
|
53
58
|
|
|
54
59
|
const FilterItem = ({ filterId, filterItem, selectFilterItem }: FilterItemProps) => (
|
|
@@ -82,7 +87,7 @@ const Filter = ({ filter, selectFilterItem }: FilterProps) => {
|
|
|
82
87
|
selectedFilterItems > 0 ? `${filter.displayName} (${selectedFilterItems})` : filter.displayName;
|
|
83
88
|
const content = (
|
|
84
89
|
<div className={filterContentClassName}>
|
|
85
|
-
{filter.items.map(
|
|
90
|
+
{filter.items.map(item => (
|
|
86
91
|
<FilterItem
|
|
87
92
|
key={item.filterItemId}
|
|
88
93
|
filterId={filter.filterId}
|
|
@@ -92,7 +97,12 @@ const Filter = ({ filter, selectFilterItem }: FilterProps) => {
|
|
|
92
97
|
))}
|
|
93
98
|
</div>
|
|
94
99
|
);
|
|
95
|
-
return
|
|
100
|
+
return (
|
|
101
|
+
<Accordion
|
|
102
|
+
title={filterTitle}
|
|
103
|
+
content={content}
|
|
104
|
+
/>
|
|
105
|
+
);
|
|
96
106
|
};
|
|
97
107
|
|
|
98
108
|
export const SearchFilter = ({
|
|
@@ -157,8 +167,8 @@ export const SearchFilter = ({
|
|
|
157
167
|
>
|
|
158
168
|
<div className={filterWrapperClassName}>
|
|
159
169
|
{filters
|
|
160
|
-
.filter(
|
|
161
|
-
.map(
|
|
170
|
+
.filter(filter => filter.displayName !== '')
|
|
171
|
+
.map(filter => {
|
|
162
172
|
if (filter.filterId === 'sort') {
|
|
163
173
|
return (
|
|
164
174
|
<SortFilter
|
|
@@ -172,7 +182,11 @@ export const SearchFilter = ({
|
|
|
172
182
|
);
|
|
173
183
|
}
|
|
174
184
|
return (
|
|
175
|
-
<Filter
|
|
185
|
+
<Filter
|
|
186
|
+
key={filter.filterId}
|
|
187
|
+
filter={filter}
|
|
188
|
+
selectFilterItem={selectFilterItem}
|
|
189
|
+
/>
|
|
176
190
|
);
|
|
177
191
|
})}
|
|
178
192
|
</div>
|
|
@@ -20,7 +20,10 @@ export const SearchFilterHeader = ({
|
|
|
20
20
|
headerClassName,
|
|
21
21
|
)}
|
|
22
22
|
>
|
|
23
|
-
<Typography
|
|
23
|
+
<Typography
|
|
24
|
+
variant="body2"
|
|
25
|
+
className="spiffy-tw-font-medium"
|
|
26
|
+
>
|
|
24
27
|
Filters ({productCount})
|
|
25
28
|
</Typography>
|
|
26
29
|
<button
|
|
@@ -28,13 +28,13 @@ export const SearchFilterItem = ({
|
|
|
28
28
|
aria-selected={isSelected}
|
|
29
29
|
className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-py-2"
|
|
30
30
|
onClick={() => onSelectFilterItem(filterItem)}
|
|
31
|
-
onKeyDown={
|
|
31
|
+
onKeyDown={event => {
|
|
32
32
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
33
33
|
event.preventDefault();
|
|
34
34
|
onSelectFilterItem(filterItem);
|
|
35
35
|
}
|
|
36
36
|
}}
|
|
37
|
-
onKeyUp={
|
|
37
|
+
onKeyUp={event => {
|
|
38
38
|
if (event.key === ' ') {
|
|
39
39
|
event.preventDefault();
|
|
40
40
|
}
|
|
@@ -44,7 +44,7 @@ export const SearchFilterItem = ({
|
|
|
44
44
|
<div className={radioClasses}>
|
|
45
45
|
{isSelected && (
|
|
46
46
|
<div
|
|
47
|
-
className={classNames('spiffy-tw-
|
|
47
|
+
className={classNames('spiffy-tw-h-2 spiffy-tw-w-2 spiffy-tw-rounded-full', {
|
|
48
48
|
'spiffy-tw-bg-white': radioButtonFillColor.includes('spiffy-tw-bg-'),
|
|
49
49
|
'spiffy-tw-bg-black': radioButtonFillColor.includes('spiffy-tw-bg-white'),
|
|
50
50
|
})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { SearchFilterDatum } from '@envive-ai/react-hooks/types';
|
|
3
3
|
|
|
4
4
|
export const useHasFilterStateChanged = (filters: SearchFilterDatum[], isOpen: boolean) => {
|
|
@@ -8,8 +8,8 @@ export const useHasFilterStateChanged = (filters: SearchFilterDatum[], isOpen: b
|
|
|
8
8
|
// Create current filter states map to check for filter changes
|
|
9
9
|
const currentFilterStates = useMemo(() => {
|
|
10
10
|
const states: Record<string, boolean> = {};
|
|
11
|
-
filters.forEach(
|
|
12
|
-
filter.items.forEach(
|
|
11
|
+
filters.forEach(filter => {
|
|
12
|
+
filter.items.forEach(item => {
|
|
13
13
|
states[`${filter.filterId}-${item.filterItemId}`] = item.isSelected;
|
|
14
14
|
});
|
|
15
15
|
});
|
|
@@ -24,7 +24,7 @@ export const useHasFilterStateChanged = (filters: SearchFilterDatum[], isOpen: b
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const changed = Object.keys(currentFilterStates).some(
|
|
27
|
-
|
|
27
|
+
key => currentFilterStates[key] !== initialFilterStates[key],
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return changed;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable react/display-name */
|
|
2
|
+
import React, { useImperativeHandle, useRef } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import MagnifyingGlassStarVariant from '@envive-ai/react-icons/MagnifyingGlassStarVariant';
|
|
4
5
|
import IconClose from '@envive-ai/react-icons/IconClose';
|
|
@@ -87,7 +88,10 @@ export const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(
|
|
|
87
88
|
]);
|
|
88
89
|
|
|
89
90
|
return (
|
|
90
|
-
<div
|
|
91
|
+
<div
|
|
92
|
+
className={containerClasses}
|
|
93
|
+
data-testid={dataTestId}
|
|
94
|
+
>
|
|
91
95
|
<div className="spiffy-tw-absolute spiffy-tw-left-3 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2">
|
|
92
96
|
<MagnifyingGlassStarVariant
|
|
93
97
|
className={
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColorNames, colorVar } from 'src/models/colorsConfig';
|
|
2
2
|
import { SearchInputVariant } from '../../atoms/search/types';
|
|
3
3
|
import { TypographyVariantMap } from '../Typography/typographyVariantClasses';
|
|
4
4
|
|
|
@@ -40,15 +40,12 @@ export const SearchInputForm = ({
|
|
|
40
40
|
}: SearchInputFormProps) => {
|
|
41
41
|
const { autocompleteIconColor } = searchInputVariantClasses[searchInputVariant];
|
|
42
42
|
|
|
43
|
-
const containerClasses = classNames(
|
|
44
|
-
'spiffy-tw-relative',
|
|
45
|
-
'spiffy-tw-w-full'
|
|
46
|
-
);
|
|
43
|
+
const containerClasses = classNames('spiffy-tw-relative', 'spiffy-tw-w-full');
|
|
47
44
|
|
|
48
45
|
const formClasses = classNames({
|
|
49
46
|
'spiffy-tw-grow': true,
|
|
50
47
|
'spiffy-tw-relative': true,
|
|
51
|
-
'spiffy-tw-z-20': shouldShowAutocomplete
|
|
48
|
+
'spiffy-tw-z-20': shouldShowAutocomplete,
|
|
52
49
|
});
|
|
53
50
|
|
|
54
51
|
const autocompleteContainerClasses = classNames(
|
|
@@ -62,13 +59,13 @@ export const SearchInputForm = ({
|
|
|
62
59
|
'spiffy-tw-rounded-b-lg',
|
|
63
60
|
'spiffy-tw-border',
|
|
64
61
|
'spiffy-tw-border-t-0',
|
|
65
|
-
'spiffy-tw-pt-4'
|
|
62
|
+
'spiffy-tw-pt-4',
|
|
66
63
|
);
|
|
67
64
|
|
|
68
65
|
return (
|
|
69
66
|
<div className={containerClasses}>
|
|
70
67
|
<form
|
|
71
|
-
onSubmit={
|
|
68
|
+
onSubmit={e => {
|
|
72
69
|
e.preventDefault();
|
|
73
70
|
onSearchSubmit();
|
|
74
71
|
}}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SearchFilterDatum, SelectFilterItem } from '@envive-ai/react-hooks/types';
|
|
2
2
|
import { SearchFilter, SearchFilterHeader } from '../SearchFilter';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
SearchFilterSidebarVariant,
|
|
5
|
+
searchFilterSidebarVariantClasses,
|
|
6
|
+
} from '../SearchResultsFilterSidebar';
|
|
4
7
|
|
|
5
8
|
export type SearchResultsFilterModalProps = {
|
|
6
9
|
productCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorNames, colorVar } from 'src/models/colorsConfig';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CloseIconVariant, SearchFilterSidebarVariant } from './types';
|
|
3
3
|
|
|
4
4
|
interface SearchFilterSidebarVariantClasses {
|
|
5
5
|
searchFilterHeaderClasses: string;
|
|
@@ -56,7 +56,7 @@ export const NoSearchResultsFound = ({
|
|
|
56
56
|
<div className="spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2">
|
|
57
57
|
<div>
|
|
58
58
|
<Sparkles
|
|
59
|
-
className="spiffy-tw-
|
|
59
|
+
className="spiffy-tw-h-[24px] spiffy-tw-w-[24px]"
|
|
60
60
|
style={{ color: sparkleIconColor }}
|
|
61
61
|
/>
|
|
62
62
|
</div>
|
|
@@ -70,4 +70,4 @@ export const NoSearchResultsFound = ({
|
|
|
70
70
|
/>
|
|
71
71
|
</div>
|
|
72
72
|
);
|
|
73
|
-
};
|
|
73
|
+
};
|
|
@@ -74,7 +74,7 @@ export const SearchResultsGrid = ({
|
|
|
74
74
|
|
|
75
75
|
return (
|
|
76
76
|
<motion.div
|
|
77
|
-
className="spiffy-tw-
|
|
77
|
+
className="spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden"
|
|
78
78
|
initial={{ opacity: 0 }}
|
|
79
79
|
animate={{ opacity: 1 }}
|
|
80
80
|
exit={{ opacity: 0 }}
|
|
@@ -105,4 +105,4 @@ export const SearchResultsGrid = ({
|
|
|
105
105
|
/>
|
|
106
106
|
</motion.div>
|
|
107
107
|
);
|
|
108
|
-
};
|
|
108
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/* eslint-disable react/no-array-index-key */
|
|
1
2
|
import { motion } from 'framer-motion';
|
|
2
3
|
import { Typography } from 'src/components/Typography';
|
|
3
|
-
import {
|
|
4
|
+
import { ProductCardSkeleton, ProductGridVariant } from '../ProductCard';
|
|
4
5
|
import { productGridVariantClasses } from '../ProductGrid';
|
|
5
6
|
import { SparkleAnimation } from '../SparkleAnimation';
|
|
6
7
|
|
|
@@ -18,17 +19,20 @@ export const SearchResultsLoadingGrid = ({
|
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
21
|
<motion.div
|
|
21
|
-
className="spiffy-tw-
|
|
22
|
+
className="spiffy-tw-w-full spiffy-tw-justify-center spiffy-tw-overflow-hidden"
|
|
22
23
|
initial={{ opacity: 0 }}
|
|
23
24
|
animate={{ opacity: 1 }}
|
|
24
25
|
exit={{ opacity: 0 }}
|
|
25
26
|
transition={{ duration: 0.2 }}
|
|
26
27
|
>
|
|
27
28
|
<div className="spiffy-tw-mt-6 spiffy-tw-w-full">
|
|
28
|
-
<div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between
|
|
29
|
-
<div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2
|
|
29
|
+
<div className="spiffy-tw-mb-4 spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between">
|
|
30
|
+
<div className="spiffy-tw-ml-[16px] spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 md:spiffy-tw-ml-[80px]">
|
|
30
31
|
<div className="spiffy-tw-width-[24px]">
|
|
31
|
-
<SparkleAnimation
|
|
32
|
+
<SparkleAnimation
|
|
33
|
+
color={sparkleIconColor}
|
|
34
|
+
animate
|
|
35
|
+
/>
|
|
32
36
|
</div>
|
|
33
37
|
<Typography variant="body2">Finding the best options for you...</Typography>
|
|
34
38
|
</div>
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { SearchInputVariant } from '@envive-ai/react-hooks/contexts/types';
|
|
4
4
|
import { SearchResultsFilterButton } from '../SearchResultsFilterButton';
|
|
5
5
|
import { SearchInputForm } from '../SearchInputForm';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
interface SearchResultsToolbarProps {
|
|
9
8
|
// From widgetConfig
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
searchInputVariant: SearchInputVariant;
|
|
10
|
+
searchBoxPlaceholder: string;
|
|
12
11
|
// From search hook
|
|
13
12
|
searchText: string;
|
|
14
13
|
focusedIndex: number;
|
|
@@ -59,7 +58,7 @@ export const SearchResultsToolbar = ({
|
|
|
59
58
|
className,
|
|
60
59
|
}: SearchResultsToolbarProps) => {
|
|
61
60
|
const [hasZIndex, setHasZIndex] = React.useState(false);
|
|
62
|
-
|
|
61
|
+
const searchInputRef = useRef<HTMLInputElement>(null);
|
|
63
62
|
// The following is to ensure the z-index is applied after the animation is complete
|
|
64
63
|
// because otherwise the z-index would be applied instantly when the component is mounted
|
|
65
64
|
// which would cause the search toolbar to appear over the top of the merchant header
|
|
@@ -84,7 +83,10 @@ export const SearchResultsToolbar = ({
|
|
|
84
83
|
const contentWrapperClasses = classNames('spiffy-tw-flex', containerXPaddingClasses);
|
|
85
84
|
|
|
86
85
|
return (
|
|
87
|
-
<div
|
|
86
|
+
<div
|
|
87
|
+
className={toolbarClasses}
|
|
88
|
+
ref={toolbarRef}
|
|
89
|
+
>
|
|
88
90
|
<div className={contentWrapperClasses}>
|
|
89
91
|
<SearchInputForm
|
|
90
92
|
searchInputVariant={searchInputVariant}
|
|
@@ -100,6 +102,7 @@ export const SearchResultsToolbar = ({
|
|
|
100
102
|
shouldShowAutocomplete={shouldShowAutocomplete}
|
|
101
103
|
onSearchSubmit={onSubmitSearch}
|
|
102
104
|
onAutocompleteSelect={onAutocompleteSelect}
|
|
105
|
+
searchInputRef={searchInputRef}
|
|
103
106
|
/>
|
|
104
107
|
<SearchResultsFilterButton
|
|
105
108
|
setIsOpen={setIsFilterOpen}
|
|
@@ -108,4 +111,4 @@ export const SearchResultsToolbar = ({
|
|
|
108
111
|
</div>
|
|
109
112
|
</div>
|
|
110
113
|
);
|
|
111
|
-
};
|
|
114
|
+
};
|
|
@@ -59,13 +59,16 @@ export const SparkleAnimation = ({ color, className, animate = true }: SparkleAn
|
|
|
59
59
|
<div
|
|
60
60
|
className={classNames(
|
|
61
61
|
SparkleAnimationOverride.STAR_ONE_CONTAINER,
|
|
62
|
-
'spiffy-tw-absolute -spiffy-tw-top-[2px]
|
|
62
|
+
'spiffy-tw-left-0 spiffy-tw-absolute -spiffy-tw-top-[2px]',
|
|
63
63
|
)}
|
|
64
64
|
>
|
|
65
|
-
<motion.div
|
|
65
|
+
<motion.div
|
|
66
|
+
animate={{ scale: mainStarScale }}
|
|
67
|
+
transition={starTransition}
|
|
68
|
+
>
|
|
66
69
|
<FourPointStar
|
|
67
70
|
fill={color}
|
|
68
|
-
className="spiffy-tw-
|
|
71
|
+
className="spiffy-tw-inline-block spiffy-tw-h-4 spiffy-tw-w-4"
|
|
69
72
|
/>
|
|
70
73
|
</motion.div>
|
|
71
74
|
</div>
|
|
@@ -77,10 +80,13 @@ export const SparkleAnimation = ({ color, className, animate = true }: SparkleAn
|
|
|
77
80
|
'spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]',
|
|
78
81
|
)}
|
|
79
82
|
>
|
|
80
|
-
<motion.div
|
|
83
|
+
<motion.div
|
|
84
|
+
animate={{ scale: smallStar1Scale }}
|
|
85
|
+
transition={starTransition}
|
|
86
|
+
>
|
|
81
87
|
<FourPointStar
|
|
82
88
|
fill={color}
|
|
83
|
-
className="spiffy-tw-
|
|
89
|
+
className="spiffy-tw-inline-block spiffy-tw-h-2 spiffy-tw-w-2"
|
|
84
90
|
/>
|
|
85
91
|
</motion.div>
|
|
86
92
|
</div>
|
|
@@ -89,13 +95,16 @@ export const SparkleAnimation = ({ color, className, animate = true }: SparkleAn
|
|
|
89
95
|
<div
|
|
90
96
|
className={classNames(
|
|
91
97
|
SparkleAnimationOverride.STAR_THREE_CONTAINER,
|
|
92
|
-
'spiffy-tw-absolute spiffy-tw-
|
|
98
|
+
'spiffy-tw-absolute spiffy-tw-left-[12px] spiffy-tw-top-[1px]',
|
|
93
99
|
)}
|
|
94
100
|
>
|
|
95
|
-
<motion.div
|
|
101
|
+
<motion.div
|
|
102
|
+
animate={{ scale: smallStar2Scale }}
|
|
103
|
+
transition={starTransition}
|
|
104
|
+
>
|
|
96
105
|
<FourPointStar
|
|
97
106
|
fill={color}
|
|
98
|
-
className="spiffy-tw-
|
|
107
|
+
className="spiffy-tw-inline-block spiffy-tw-h-2 spiffy-tw-w-2"
|
|
99
108
|
/>
|
|
100
109
|
</motion.div>
|
|
101
110
|
</div>
|
|
@@ -193,7 +193,7 @@ const borderedVariants = [
|
|
|
193
193
|
];
|
|
194
194
|
|
|
195
195
|
const hoverTransform = (variantClass: string[]): string[] =>
|
|
196
|
-
variantClass?.map(
|
|
196
|
+
variantClass?.map(className => `hover:${className}`);
|
|
197
197
|
|
|
198
198
|
export const SuggestionButton = ({
|
|
199
199
|
variant,
|
|
@@ -233,10 +233,10 @@ export const SuggestionButton = ({
|
|
|
233
233
|
const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
|
|
234
234
|
|
|
235
235
|
// Separate border classes for proper cascading
|
|
236
|
-
const baseBorderClasses = baseClasses.filter(
|
|
237
|
-
const baseNonBorderClasses = baseClasses.filter(
|
|
238
|
-
const hoverBorderClasses = hoverClasses.filter(
|
|
239
|
-
const hoverNonBorderClasses = hoverClasses.filter(
|
|
236
|
+
const baseBorderClasses = baseClasses.filter(cls => cls.includes('border'));
|
|
237
|
+
const baseNonBorderClasses = baseClasses.filter(cls => !cls.includes('border'));
|
|
238
|
+
const hoverBorderClasses = hoverClasses.filter(cls => cls.includes('border'));
|
|
239
|
+
const hoverNonBorderClasses = hoverClasses.filter(cls => !cls.includes('border'));
|
|
240
240
|
|
|
241
241
|
const variantClasses = [
|
|
242
242
|
...baseNonBorderClasses,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable react/display-name */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import { TypographyVariantMap, getVariantPlaceholderClassNames } from '../Typography';
|
|
5
6
|
|
|
6
7
|
export interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
7
8
|
borderRadius: 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -27,6 +28,12 @@ export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
|
|
|
27
28
|
className,
|
|
28
29
|
]);
|
|
29
30
|
|
|
30
|
-
return
|
|
31
|
+
return (
|
|
32
|
+
<input
|
|
33
|
+
ref={ref}
|
|
34
|
+
{...rest}
|
|
35
|
+
className={inputClasses}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
31
38
|
},
|
|
32
39
|
);
|