@envive-ai/react-toolkit 0.1.11 → 0.1.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.
Files changed (189) hide show
  1. package/dist/Accordion/index.cjs +3 -3
  2. package/dist/Accordion/index.d.cts +2 -2
  3. package/dist/Accordion/index.d.ts +2 -2
  4. package/dist/Accordion/index.js +3 -3
  5. package/dist/{Accordion-DBZpiQe7.cjs → Accordion-D9gO9_y3.cjs} +1 -1
  6. package/dist/{Accordion-Cp3Hx2zm.js → Accordion-ZEdp99Ph.js} +1 -1
  7. package/dist/AppliedFiltersScrollbar/index.cjs +25 -27
  8. package/dist/AppliedFiltersScrollbar/index.d.cts +2 -2
  9. package/dist/AppliedFiltersScrollbar/index.d.ts +2 -2
  10. package/dist/AppliedFiltersScrollbar/index.js +25 -27
  11. package/dist/ButtonBase/index.cjs +3 -3
  12. package/dist/ButtonBase/index.d.cts +2 -3
  13. package/dist/ButtonBase/index.d.ts +2 -3
  14. package/dist/ButtonBase/index.js +3 -3
  15. package/dist/{ButtonBase-BAf-nlCm.js → ButtonBase-DgRupM53.js} +3 -3
  16. package/dist/{ButtonBase-Do88ndKa.cjs → ButtonBase-DrIwVGTR.cjs} +3 -3
  17. package/dist/DynamicFiltersScrollbar/index.cjs +23 -25
  18. package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
  19. package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
  20. package/dist/DynamicFiltersScrollbar/index.js +23 -25
  21. package/dist/DynamicFiltersScrollbar-B1j53y2q.cjs +81 -0
  22. package/dist/DynamicFiltersScrollbar-D7WYp6x9.js +66 -0
  23. package/dist/FilterScrollbar/index.cjs +3 -3
  24. package/dist/FilterScrollbar/index.d.cts +3 -3
  25. package/dist/FilterScrollbar/index.d.ts +3 -3
  26. package/dist/FilterScrollbar/index.js +3 -3
  27. package/dist/Headline/index.cjs +2 -2
  28. package/dist/Headline/index.d.cts +2 -2
  29. package/dist/Headline/index.d.ts +2 -2
  30. package/dist/Headline/index.js +2 -2
  31. package/dist/{Headline-DNEWF8ly.js → Headline-COv0Jbn8.js} +1 -1
  32. package/dist/{Headline-DTT4RSv2.cjs → Headline-Cp79THVF.cjs} +1 -1
  33. package/dist/ImageWithFallback/index.d.cts +2 -2
  34. package/dist/ImageWithFallback/index.d.ts +2 -2
  35. package/dist/ModalSheet/index.cjs +1 -1
  36. package/dist/ModalSheet/index.d.cts +2 -2
  37. package/dist/ModalSheet/index.d.ts +2 -2
  38. package/dist/ModalSheet/index.js +1 -1
  39. package/dist/{ModalSheet-CZd5pssv.js → ModalSheet-01pxpy_K.js} +5 -3
  40. package/dist/{ModalSheet-CXZgyZ4a.cjs → ModalSheet-Csz8HIxs.cjs} +7 -5
  41. package/dist/ProductCard/index.cjs +4 -4
  42. package/dist/ProductCard/index.d.cts +1 -1
  43. package/dist/ProductCard/index.d.ts +1 -1
  44. package/dist/ProductCard/index.js +4 -4
  45. package/dist/{ProductCard-D-lyh8uV.js → ProductCard-CNwmHggx.js} +33 -33
  46. package/dist/{ProductCard-F49krjHk.cjs → ProductCard-EmdDy2af.cjs} +35 -35
  47. package/dist/ProductGrid/index.cjs +5 -5
  48. package/dist/ProductGrid/index.d.cts +4 -8
  49. package/dist/ProductGrid/index.d.ts +4 -8
  50. package/dist/ProductGrid/index.js +5 -5
  51. package/dist/{ProductGrid-QeoaIfcq.cjs → ProductGrid-CMoomZLc.cjs} +3 -7
  52. package/dist/{ProductGrid-FIf5wFQx.js → ProductGrid-nmWSp0qX.js} +3 -7
  53. package/dist/RadioButton/index.cjs +3 -3
  54. package/dist/RadioButton/index.d.cts +5 -3
  55. package/dist/RadioButton/index.d.ts +5 -3
  56. package/dist/RadioButton/index.js +3 -3
  57. package/dist/{RadioButton-DZ6QXkrN.cjs → RadioButton-BdKJRzLM.cjs} +17 -10
  58. package/dist/{RadioButton-Bf68dZl7.js → RadioButton-S5dALI2f.js} +18 -11
  59. package/dist/RadioButtonGroup/index.cjs +4 -4
  60. package/dist/RadioButtonGroup/index.d.cts +2 -2
  61. package/dist/RadioButtonGroup/index.d.ts +2 -2
  62. package/dist/RadioButtonGroup/index.js +4 -4
  63. package/dist/{RadioButtonGroup-8k7hkJYB.js → RadioButtonGroup-BipNsoHL.js} +2 -1
  64. package/dist/{RadioButtonGroup-Dc_n5amh.cjs → RadioButtonGroup-TAJMA1j_.cjs} +2 -1
  65. package/dist/SearchAutocomplete/index.cjs +56 -2
  66. package/dist/SearchAutocomplete/index.js +49 -1
  67. package/dist/SearchFilter/index.cjs +9 -9
  68. package/dist/SearchFilter/index.d.cts +4 -4
  69. package/dist/SearchFilter/index.d.ts +4 -4
  70. package/dist/SearchFilter/index.js +9 -9
  71. package/dist/{SearchFilter-BtLKnFMm.cjs → SearchFilter-BcLc0TMq.cjs} +27 -17
  72. package/dist/{SearchFilter-BOwErEyI.js → SearchFilter-w-0s2YVu.js} +27 -17
  73. package/dist/SearchInput/index.cjs +96 -6
  74. package/dist/SearchInput/index.d.cts +1 -1
  75. package/dist/SearchInput/index.d.ts +2 -2
  76. package/dist/SearchInput/index.js +88 -4
  77. package/dist/SearchInputForm/index.cjs +0 -39
  78. package/dist/SearchInputForm/index.d.cts +2 -2
  79. package/dist/SearchInputForm/index.d.ts +2 -2
  80. package/dist/SearchInputForm/index.js +1 -37
  81. package/dist/SearchResultsContent/index.cjs +36 -39
  82. package/dist/SearchResultsContent/index.d.cts +5 -7
  83. package/dist/SearchResultsContent/index.d.ts +5 -7
  84. package/dist/SearchResultsContent/index.js +35 -38
  85. package/dist/SearchResultsFilterSidebar/index.cjs +11 -11
  86. package/dist/SearchResultsFilterSidebar/index.d.cts +1 -1
  87. package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
  88. package/dist/SearchResultsFilterSidebar/index.js +11 -11
  89. package/dist/SearchResultsStates/index.cjs +10 -10
  90. package/dist/SearchResultsStates/index.d.cts +6 -8
  91. package/dist/SearchResultsStates/index.d.ts +6 -8
  92. package/dist/SearchResultsStates/index.js +10 -10
  93. package/dist/{SearchResultsStates-CB5k1xkK.js → SearchResultsStates-DlZz14yy.js} +8 -10
  94. package/dist/{SearchResultsStates-DywK7vvp.cjs → SearchResultsStates-DwcPrsdd.cjs} +8 -10
  95. package/dist/SparkleAnimation/index.cjs +1 -1
  96. package/dist/SparkleAnimation/index.d.cts +2 -2
  97. package/dist/SparkleAnimation/index.d.ts +2 -2
  98. package/dist/SparkleAnimation/index.js +1 -1
  99. package/dist/{SparkleAnimation-Edzqyb48.cjs → SparkleAnimation-CvGlWUqv.cjs} +0 -1
  100. package/dist/{SparkleAnimation-AM4XoegD.js → SparkleAnimation-paLhSu5E.js} +0 -1
  101. package/dist/Spinner/index.d.cts +2 -2
  102. package/dist/Spinner/index.d.ts +2 -2
  103. package/dist/SuggestionButton/index.cjs +3 -3
  104. package/dist/SuggestionButton/index.d.cts +2 -2
  105. package/dist/SuggestionButton/index.d.ts +2 -2
  106. package/dist/SuggestionButton/index.js +3 -3
  107. package/dist/Text/index.cjs +2 -2
  108. package/dist/Text/index.d.cts +2 -2
  109. package/dist/Text/index.d.ts +3 -3
  110. package/dist/Text/index.js +2 -2
  111. package/dist/{Text-Bod4OMPk.js → Text-BLzNhX4H.js} +1 -1
  112. package/dist/{Text-MQjxqgZZ.cjs → Text-DllCE9_D.cjs} +1 -1
  113. package/dist/TextInput/index.cjs +2 -2
  114. package/dist/TextInput/index.d.ts +1 -1
  115. package/dist/TextInput/index.js +2 -2
  116. package/dist/{TextInput-BVPdz7e8.js → TextInput-DmsOxxPN.js} +1 -1
  117. package/dist/{TextInput-CnXhppYn.cjs → TextInput-HMW0hxLI.cjs} +1 -1
  118. package/dist/ToggleButton/index.cjs +3 -3
  119. package/dist/ToggleButton/index.d.cts +2 -2
  120. package/dist/ToggleButton/index.d.ts +2 -2
  121. package/dist/ToggleButton/index.js +3 -3
  122. package/dist/{ToggleButton-D90UO4qv.cjs → ToggleButton-DblAj4Cd.cjs} +1 -1
  123. package/dist/{ToggleButton-BKRR_-69.js → ToggleButton-r7Y7Kzzo.js} +1 -1
  124. package/dist/index-BKvXn5sj.d.ts +4 -0
  125. package/dist/{index-Cl4d_pDw.d.ts → index-Br1B7Jta.d.cts} +2 -3
  126. package/dist/{index-1x_hMlEf.d.cts → index-DADHwW6M.d.ts} +5 -9
  127. package/dist/{index-QMTPxKA9.d.ts → index-DDp-fLgm.d.cts} +5 -9
  128. package/dist/{index-CgjZdKpL.d.cts → index-Dh8rcWev.d.ts} +2 -3
  129. package/dist/index-W1wCDiw_.d.cts +4 -0
  130. package/dist/{searchFilterSidebarVariants-CDFCHVeZ.js → searchFilterSidebarVariants-J0FJ8pck.js} +1 -1
  131. package/dist/{searchFilterSidebarVariants-CtmuwSBQ.cjs → searchFilterSidebarVariants-kkTjYEIF.cjs} +1 -1
  132. package/dist/{textVariantClasses-Dgz7Zaql.cjs → textVariantClasses-CBre7vXv.cjs} +5 -7
  133. package/dist/{textVariantClasses-D77TGEy1.js → textVariantClasses-CRrTb43V.js} +5 -7
  134. package/package.json +3 -7
  135. package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +25 -27
  136. package/src/components/ButtonBase/ButtonBase.tsx +1 -2
  137. package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +26 -28
  138. package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +25 -27
  139. package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +26 -28
  140. package/src/components/ModalSheet/ModalSheet.tsx +1 -1
  141. package/src/components/ModalSheet/common/closeIcon.tsx +2 -2
  142. package/src/components/ModalSheet/desktop/index.tsx +1 -0
  143. package/src/components/ModalSheet/mobile/index.tsx +1 -0
  144. package/src/components/ModalSheet/mobile/mobileHeader.tsx +1 -1
  145. package/src/components/ProductCard/ProductCard.tsx +5 -28
  146. package/src/components/ProductGrid/ProductGrid.tsx +3 -11
  147. package/src/components/RadioButton/RadioButton.tsx +15 -6
  148. package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -0
  149. package/src/components/SearchFilter/SearchFilter.tsx +2 -2
  150. package/src/components/SearchFilter/SearchFilterFooter.tsx +1 -1
  151. package/src/components/SearchFilter/SearchFilterHeader.tsx +6 -1
  152. package/src/components/SearchFilter/SearchFilterItem.tsx +17 -3
  153. package/src/components/SearchFilter/useHasFilterStateChanged.tsx +1 -0
  154. package/src/components/SearchFilter/utils.ts +4 -6
  155. package/src/components/SearchInput/SearchInput.tsx +2 -2
  156. package/src/components/SearchInputForm/index.ts +0 -1
  157. package/src/components/SearchResultsContent/SearchResultsContent.tsx +33 -38
  158. package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -3
  159. package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +1 -1
  160. package/src/components/SearchResultsStates/SearchResultsGrid.tsx +4 -8
  161. package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +3 -3
  162. package/src/components/SparkleAnimation/SparkleAnimation.tsx +0 -1
  163. package/src/components/Spinner/Spinner.tsx +29 -14
  164. package/src/components/SuggestionButton/SuggestionButton.tsx +1 -1
  165. package/src/components/SuggestionButton/types.ts +1 -1
  166. package/src/components/Text/textVariantClasses.ts +12 -10
  167. package/src/components/TextInput/TextInput.tsx +1 -0
  168. package/src/util/camelCasedPropertiesDeep.ts +22 -22
  169. package/src/util/internal.ts +4 -2
  170. package/src/util/splitWords.ts +35 -31
  171. package/dist/DynamicFiltersScrollbar-C4kdNSJ9.js +0 -70
  172. package/dist/DynamicFiltersScrollbar-CVw1PINp.cjs +0 -85
  173. package/dist/SearchAutocomplete-C6omCGJp.js +0 -51
  174. package/dist/SearchAutocomplete-Cofuvwwp.cjs +0 -62
  175. package/dist/SearchInput-BBaYEwkR.js +0 -89
  176. package/dist/SearchInput-BTNvgrIa.cjs +0 -106
  177. package/dist/Styles/index.cjs +0 -274
  178. package/dist/Styles/index.d.cts +0 -258
  179. package/dist/Styles/index.d.ts +0 -258
  180. package/dist/Styles/index.js +0 -274
  181. package/dist/index-H_9LhS_1.d.cts +0 -36
  182. package/dist/index-gfYBM7Ul.d.ts +0 -36
  183. package/src/components/ModalSheet/common/enviveWatermark.tsx +0 -30
  184. package/src/components/Styles/EnviveTailwindPreset.ts +0 -285
  185. package/src/components/Styles/index.ts +0 -2
  186. package/tailwind-preset.js +0 -3
  187. /package/dist/{colorsConfig-DFL3mBwB.cjs → colorsConfig-B3-SMUSx.cjs} +0 -0
  188. /package/dist/{colorsConfig-5Yf4nrEe.js → colorsConfig-DZ-GSPWy.js} +0 -0
  189. /package/dist/{textVariantClasses-kyZtL8F5.d.ts → textVariantClasses-C8OCWZAw.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime25 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 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
@@ -28,7 +28,6 @@ type SearchResultsFilterProps = {
28
28
  setIsOpen: (isOpen: boolean) => void;
29
29
  searchFilters: SearchFilterDatum[];
30
30
  searchFilterSidebarVariant: SearchFilterSidebarVariant;
31
- searchText: string;
32
31
  onSelectFilterItem: SelectFilterItem;
33
32
  onClearAllFilters: () => void;
34
33
  filterButtonText: string;
@@ -42,6 +41,6 @@ declare const SearchResultsFilter: ({
42
41
  onSelectFilterItem,
43
42
  onClearAllFilters,
44
43
  filterButtonText
45
- }: SearchResultsFilterProps) => react_jsx_runtime25.JSX.Element;
44
+ }: SearchResultsFilterProps) => react_jsx_runtime0.JSX.Element;
46
45
  //#endregion
47
46
  export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
2
- import { TestProps } from "@envive-ai/react-hooks/types";
3
1
  import { FC } from "react";
2
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
3
+ import { TestProps } from "@envive-ai/react-hooks/types";
4
4
  import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
5
5
 
6
6
  //#region src/util/trim.d.ts
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
261
261
  stars,
262
262
  reviewCount,
263
263
  className
264
- }: RatingSummaryProps) => react_jsx_runtime5.JSX.Element;
264
+ }: RatingSummaryProps) => react_jsx_runtime7.JSX.Element;
265
265
  interface PriceSectionProps {
266
266
  originalPrice?: string;
267
267
  salePrice?: string;
@@ -271,15 +271,12 @@ declare const PriceSection: ({
271
271
  originalPrice,
272
272
  salePrice,
273
273
  pricePrefix
274
- }: PriceSectionProps) => react_jsx_runtime5.JSX.Element;
274
+ }: PriceSectionProps) => react_jsx_runtime7.JSX.Element;
275
275
  interface ProductCardProps extends TestProps {
276
276
  productCardConfig?: ProductCardConfig;
277
277
  merchantShortName: string;
278
278
  title: string;
279
279
  url: string;
280
- searchResponseId?: string;
281
- productResponseId?: string;
282
- cardDisplayLocation: string;
283
280
  imageUrl?: string;
284
281
  originalPrice?: number;
285
282
  averageRating?: number;
@@ -290,7 +287,6 @@ interface ProductCardProps extends TestProps {
290
287
  layoutVariant?: ProductCardLayoutVariant;
291
288
  zoomOnHover?: boolean;
292
289
  aspectRatio?: '3:4' | 'square' | 'none';
293
- clickPosition?: number | null;
294
290
  growWithContainer?: boolean;
295
291
  handleClick?: (clickedUrl: string) => void;
296
292
  }
@@ -312,7 +308,7 @@ declare const ProductCard: ({
312
308
  aspectRatio,
313
309
  growWithContainer,
314
310
  handleClick
315
- }: ProductCardProps) => react_jsx_runtime5.JSX.Element;
311
+ }: ProductCardProps) => react_jsx_runtime7.JSX.Element;
316
312
  //#endregion
317
313
  //#region src/components/ProductCard/ProductCardSkeleton.d.ts
318
314
  declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
@@ -1,6 +1,6 @@
1
- import { FC } from "react";
2
- import * as react_jsx_runtime14 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
3
2
  import { TestProps } from "@envive-ai/react-hooks/types";
3
+ import { FC } from "react";
4
4
  import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
5
5
 
6
6
  //#region src/util/trim.d.ts
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
261
261
  stars,
262
262
  reviewCount,
263
263
  className
264
- }: RatingSummaryProps) => react_jsx_runtime14.JSX.Element;
264
+ }: RatingSummaryProps) => react_jsx_runtime13.JSX.Element;
265
265
  interface PriceSectionProps {
266
266
  originalPrice?: string;
267
267
  salePrice?: string;
@@ -271,15 +271,12 @@ declare const PriceSection: ({
271
271
  originalPrice,
272
272
  salePrice,
273
273
  pricePrefix
274
- }: PriceSectionProps) => react_jsx_runtime14.JSX.Element;
274
+ }: PriceSectionProps) => react_jsx_runtime13.JSX.Element;
275
275
  interface ProductCardProps extends TestProps {
276
276
  productCardConfig?: ProductCardConfig;
277
277
  merchantShortName: string;
278
278
  title: string;
279
279
  url: string;
280
- searchResponseId?: string;
281
- productResponseId?: string;
282
- cardDisplayLocation: string;
283
280
  imageUrl?: string;
284
281
  originalPrice?: number;
285
282
  averageRating?: number;
@@ -290,7 +287,6 @@ interface ProductCardProps extends TestProps {
290
287
  layoutVariant?: ProductCardLayoutVariant;
291
288
  zoomOnHover?: boolean;
292
289
  aspectRatio?: '3:4' | 'square' | 'none';
293
- clickPosition?: number | null;
294
290
  growWithContainer?: boolean;
295
291
  handleClick?: (clickedUrl: string) => void;
296
292
  }
@@ -312,7 +308,7 @@ declare const ProductCard: ({
312
308
  aspectRatio,
313
309
  growWithContainer,
314
310
  handleClick
315
- }: ProductCardProps) => react_jsx_runtime14.JSX.Element;
311
+ }: ProductCardProps) => react_jsx_runtime13.JSX.Element;
316
312
  //#endregion
317
313
  //#region src/components/ProductCard/ProductCardSkeleton.d.ts
318
314
  declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime20 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime22 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
@@ -28,7 +28,6 @@ type SearchResultsFilterProps = {
28
28
  setIsOpen: (isOpen: boolean) => void;
29
29
  searchFilters: SearchFilterDatum[];
30
30
  searchFilterSidebarVariant: SearchFilterSidebarVariant;
31
- searchText: string;
32
31
  onSelectFilterItem: SelectFilterItem;
33
32
  onClearAllFilters: () => void;
34
33
  filterButtonText: string;
@@ -42,6 +41,6 @@ declare const SearchResultsFilter: ({
42
41
  onSelectFilterItem,
43
42
  onClearAllFilters,
44
43
  filterButtonText
45
- }: SearchResultsFilterProps) => react_jsx_runtime20.JSX.Element;
44
+ }: SearchResultsFilterProps) => react_jsx_runtime22.JSX.Element;
46
45
  //#endregion
47
46
  export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
@@ -0,0 +1,4 @@
1
+ //#region src/components/SearchInputForm/types.d.ts
2
+ type SearchInputVariant = 'standard';
3
+ //#endregion
4
+ export { SearchInputVariant };
@@ -1,4 +1,4 @@
1
- import { ColorNames, colorVar } from "./colorsConfig-5Yf4nrEe.js";
1
+ import { ColorNames, colorVar } from "./colorsConfig-DZ-GSPWy.js";
2
2
 
3
3
  //#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
4
4
  const searchFilterSidebarVariantClasses = {
@@ -1,4 +1,4 @@
1
- const require_colorsConfig = require('./colorsConfig-DFL3mBwB.cjs');
1
+ const require_colorsConfig = require('./colorsConfig-B3-SMUSx.cjs');
2
2
 
3
3
  //#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
4
4
  const searchFilterSidebarVariantClasses = {
@@ -90,13 +90,11 @@ const TextStyleVariantMap = {
90
90
  ...TextVariantMap,
91
91
  ...HeadlineVariantMap
92
92
  };
93
- const getVariantPlaceholderClassNames = (classes) => {
94
- return Object.keys(classes).reduce((acc, key) => {
95
- if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
96
- else acc[`${key}-placeholder`] = classes[key];
97
- return acc;
98
- }, {});
99
- };
93
+ const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
94
+ if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
95
+ else acc[`${key}-placeholder`] = classes[key];
96
+ return acc;
97
+ }, {});
100
98
 
101
99
  //#endregion
102
100
  Object.defineProperty(exports, 'HeadlineVariantMap', {
@@ -89,13 +89,11 @@ const TextStyleVariantMap = {
89
89
  ...TextVariantMap,
90
90
  ...HeadlineVariantMap
91
91
  };
92
- const getVariantPlaceholderClassNames = (classes) => {
93
- return Object.keys(classes).reduce((acc, key) => {
94
- if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
95
- else acc[`${key}-placeholder`] = classes[key];
96
- return acc;
97
- }, {});
98
- };
92
+ const getVariantPlaceholderClassNames = (classes) => Object.keys(classes).reduce((acc, key) => {
93
+ if (key.includes("spiffy-tw")) acc[`placeholder:${key}`] = classes[key];
94
+ else acc[`${key}-placeholder`] = classes[key];
95
+ return acc;
96
+ }, {});
99
97
 
100
98
  //#endregion
101
99
  export { HeadlineVariantMap, TextStyleVariantMap, TextVariantMap, getVariantPlaceholderClassNames };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-toolkit",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "React component library for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@envive-ai/react-icons": "0.1.1",
31
- "@envive-ai/react-hooks": "^0.1.6",
31
+ "@envive-ai/react-hooks": "^0.1.8",
32
32
  "@tailwindcss/typography": "^0.5.15",
33
33
  "classnames": "^2.5.1",
34
34
  "framer-motion": "^12.23.12",
@@ -45,7 +45,7 @@
45
45
  "postcss": "^8.5.6",
46
46
  "tailwindcss": "^3.4.17",
47
47
  "tsdown": "^0.14.2",
48
- "typescript": "~5.8.3"
48
+ "typescript": "^5.4.3"
49
49
  },
50
50
  "exports": {
51
51
  "./Accordion": {
@@ -132,10 +132,6 @@
132
132
  "import": "./dist/Spinner/index.js",
133
133
  "require": "./dist/Spinner/index.cjs"
134
134
  },
135
- "./Styles": {
136
- "import": "./dist/Styles/index.js",
137
- "require": "./dist/Styles/index.cjs"
138
- },
139
135
  "./SuggestionButton": {
140
136
  "import": "./dist/SuggestionButton/index.js",
141
137
  "require": "./dist/SuggestionButton/index.cjs"
@@ -38,33 +38,31 @@ export const AppliedFiltersScrollbar = ({
38
38
 
39
39
  return (
40
40
  <ScrollContainer className={filterBarClassNames} hideScrollbars>
41
- {selectedFilterOptions.map((filter) => {
42
- return (
43
- <button
44
- key={filter.id}
45
- className={buttonClasses}
46
- type="button"
47
- onClick={() => onRemoveFilter(filter)}
48
- aria-label={`Remove filter: ${filter.displayName}`}
49
- >
50
- <div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]">
51
- <Text variant="body3">{filter.displayName}</Text>
52
- <svg
53
- xmlns="http://www.w3.org/2000/svg"
54
- width="10"
55
- height="10"
56
- viewBox="0 0 10 10"
57
- fill="none"
58
- >
59
- <path
60
- d="M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z"
61
- fill={iconColor}
62
- />
63
- </svg>
64
- </div>
65
- </button>
66
- );
67
- })}
41
+ {selectedFilterOptions.map((filter) => (
42
+ <button
43
+ key={filter.id}
44
+ className={buttonClasses}
45
+ type="button"
46
+ onClick={() => onRemoveFilter(filter)}
47
+ aria-label={`Remove filter: ${filter.displayName}`}
48
+ >
49
+ <div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]">
50
+ <Text variant="body3">{filter.displayName}</Text>
51
+ <svg
52
+ xmlns="http://www.w3.org/2000/svg"
53
+ width="10"
54
+ height="10"
55
+ viewBox="0 0 10 10"
56
+ fill="none"
57
+ >
58
+ <path
59
+ d="M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z"
60
+ fill={iconColor}
61
+ />
62
+ </svg>
63
+ </div>
64
+ </button>
65
+ ))}
68
66
  </ScrollContainer>
69
67
  );
70
68
  };
@@ -4,7 +4,6 @@ import { ButtonBaseOverrides, ButtonBaseProps } from './types';
4
4
  import { Text } from '../Text/Text';
5
5
 
6
6
  export const ButtonBase = ({
7
- type = 'button',
8
7
  isDisabled = false,
9
8
  dataAttributes,
10
9
  buttonClass,
@@ -53,7 +52,7 @@ export const ButtonBase = ({
53
52
 
54
53
  return (
55
54
  <button
56
- type={type}
55
+ type="button"
57
56
  ref={buttonRef}
58
57
  className={buttonClassName}
59
58
  disabled={isDisabled}
@@ -22,31 +22,29 @@ export const DynamicFiltersScrollbar = ({
22
22
  filterDefaultClasses,
23
23
  filterHoverClasses,
24
24
  onToggleDynamicFilter,
25
- }: DynamicFiltersScrollbarProps) => {
26
- return (
27
- <ScrollContainer className={filterBarClassNames} hideScrollbars>
28
- {availableDynamicFilters.map(({ name, displayName }) => {
29
- const buttonClasses = classNames(
30
- 'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
31
- filterHoverClasses,
32
- filterDefaultClasses,
33
- );
34
- return (
35
- <button
36
- key={name}
37
- type="button"
38
- className={buttonClasses}
39
- onClick={() => {
40
- onToggleDynamicFilter({
41
- filter: name,
42
- dynamicFilterDisplayName: displayName,
43
- });
44
- }}
45
- >
46
- <Text variant="body3">{displayName}</Text>
47
- </button>
48
- );
49
- })}
50
- </ScrollContainer>
51
- );
52
- };
25
+ }: DynamicFiltersScrollbarProps) => (
26
+ <ScrollContainer className={filterBarClassNames} hideScrollbars>
27
+ {availableDynamicFilters.map(({ name, displayName }) => {
28
+ const buttonClasses = classNames(
29
+ 'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
30
+ filterHoverClasses,
31
+ filterDefaultClasses,
32
+ );
33
+ return (
34
+ <button
35
+ key={name}
36
+ type="button"
37
+ className={buttonClasses}
38
+ onClick={() => {
39
+ onToggleDynamicFilter({
40
+ filter: name,
41
+ dynamicFilterDisplayName: displayName,
42
+ });
43
+ }}
44
+ >
45
+ <Text variant="body3">{displayName}</Text>
46
+ </button>
47
+ );
48
+ })}
49
+ </ScrollContainer>
50
+ );
@@ -38,33 +38,31 @@ export const AppliedFiltersScrollbar = ({
38
38
 
39
39
  return (
40
40
  <ScrollContainer className={filterBarClassNames} hideScrollbars>
41
- {selectedFilterOptions.map((filter) => {
42
- return (
43
- <button
44
- key={filter.id}
45
- className={buttonClasses}
46
- type="button"
47
- onClick={() => onRemoveFilter(filter)}
48
- aria-label={`Remove filter: ${filter.displayName}`}
49
- >
50
- <div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]">
51
- <Text variant="body3">{filter.displayName}</Text>
52
- <svg
53
- xmlns="http://www.w3.org/2000/svg"
54
- width="10"
55
- height="10"
56
- viewBox="0 0 10 10"
57
- fill="none"
58
- >
59
- <path
60
- d="M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z"
61
- fill={iconColor}
62
- />
63
- </svg>
64
- </div>
65
- </button>
66
- );
67
- })}
41
+ {selectedFilterOptions.map((filter) => (
42
+ <button
43
+ key={filter.id}
44
+ className={buttonClasses}
45
+ type="button"
46
+ onClick={() => onRemoveFilter(filter)}
47
+ aria-label={`Remove filter: ${filter.displayName}`}
48
+ >
49
+ <div className="spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]">
50
+ <Text variant="body3">{filter.displayName}</Text>
51
+ <svg
52
+ xmlns="http://www.w3.org/2000/svg"
53
+ width="10"
54
+ height="10"
55
+ viewBox="0 0 10 10"
56
+ fill="none"
57
+ >
58
+ <path
59
+ d="M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z"
60
+ fill={iconColor}
61
+ />
62
+ </svg>
63
+ </div>
64
+ </button>
65
+ ))}
68
66
  </ScrollContainer>
69
67
  );
70
68
  };
@@ -22,31 +22,29 @@ export const DynamicFiltersScrollbar = ({
22
22
  filterDefaultClasses,
23
23
  filterHoverClasses,
24
24
  onToggleDynamicFilter,
25
- }: DynamicFiltersScrollbarProps) => {
26
- return (
27
- <ScrollContainer className={filterBarClassNames} hideScrollbars>
28
- {availableDynamicFilters.map(({ name, displayName }) => {
29
- const buttonClasses = classNames(
30
- 'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
31
- filterHoverClasses,
32
- filterDefaultClasses,
33
- );
34
- return (
35
- <button
36
- key={name}
37
- type="button"
38
- className={buttonClasses}
39
- onClick={() => {
40
- onToggleDynamicFilter({
41
- filter: name,
42
- dynamicFilterDisplayName: displayName,
43
- });
44
- }}
45
- >
46
- <Text variant="body3">{displayName}</Text>
47
- </button>
48
- );
49
- })}
50
- </ScrollContainer>
51
- );
52
- };
25
+ }: DynamicFiltersScrollbarProps) => (
26
+ <ScrollContainer className={filterBarClassNames} hideScrollbars>
27
+ {availableDynamicFilters.map(({ name, displayName }) => {
28
+ const buttonClasses = classNames(
29
+ 'spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ',
30
+ filterHoverClasses,
31
+ filterDefaultClasses,
32
+ );
33
+ return (
34
+ <button
35
+ key={name}
36
+ type="button"
37
+ className={buttonClasses}
38
+ onClick={() => {
39
+ onToggleDynamicFilter({
40
+ filter: name,
41
+ dynamicFilterDisplayName: displayName,
42
+ });
43
+ }}
44
+ >
45
+ <Text variant="body3">{displayName}</Text>
46
+ </button>
47
+ );
48
+ })}
49
+ </ScrollContainer>
50
+ );
@@ -1,7 +1,7 @@
1
+ import { useIsSmallScreen } from '@envive-ai/react-hooks/hooks/IsSmallScreen';
1
2
  import { ModalSheetMobile } from './mobile';
2
3
  import { ModalSheetDesktop } from './desktop';
3
4
  import { ModalSheetProps } from './types';
4
- import { useIsSmallScreen } from '@envive-ai/react-hooks/hooks';
5
5
 
6
6
  const ANIMATION_DURATION = 0.3;
7
7
 
@@ -33,8 +33,8 @@ export const ModalSheetCloseIcon = ({
33
33
 
34
34
  const closeIconContextValue = useMemo(() => ({ size: iconSize }), [iconSize]);
35
35
  return (
36
- <div className={closeIconClassNames} onClick={closeModal}>
36
+ <button type="button" className={closeIconClassNames} onClick={closeModal}>
37
37
  <IconContext.Provider value={closeIconContextValue}>{closeIcon}</IconContext.Provider>
38
- </div>
38
+ </button>
39
39
  );
40
40
  };
@@ -104,6 +104,7 @@ export const ModalSheetDesktop = ({
104
104
  <ModalSheetDesktopHeader
105
105
  headerContent={headerProps.headerContent}
106
106
  headerVariant={headerProps?.headerVariant}
107
+ chevronColor="#000"
107
108
  />
108
109
  </div>
109
110
  {children}
@@ -102,6 +102,7 @@ export const ModalSheetMobile = ({
102
102
  headerContent={headerProps.headerContent}
103
103
  headerVariant={headerProps?.headerVariant}
104
104
  handleHeaderClick={closeModal}
105
+ chevronColor="#000"
105
106
  />
106
107
  </div>
107
108
  {children}
@@ -1,7 +1,7 @@
1
1
  import classNames from 'classnames';
2
2
  import { motion, useMotionValue } from 'framer-motion';
3
- import { ModalSheetHeaderProps } from '../types';
4
3
  import { AnimatedChevron } from 'src/components/AnimatedChevron/AnimatedChevron';
4
+ import { ModalSheetHeaderProps } from '../types';
5
5
 
6
6
  const modalSheetVariants = {
7
7
  primary: {
@@ -1,12 +1,16 @@
1
1
  import classNames from 'classnames';
2
2
  import { MdStar } from 'react-icons/md';
3
+ import Logger from 'src/logging/logger';
4
+ import { Text } from 'src/components/Text/Text';
5
+ import { formatPrice } from 'src/util/formatPrice';
6
+ import { TestProps } from '@envive-ai/react-hooks/types';
7
+ import { useImageResolver } from '@envive-ai/react-hooks/hooks/ImageResolver';
3
8
  import {
4
9
  variantClassMap,
5
10
  variantHoverClassMap,
6
11
  productCardLayoutVariantClasses,
7
12
  variantTitleColorMap,
8
13
  } from './productCardVariants';
9
- import Logger from 'src/logging/logger';
10
14
  import { Headline } from '../Headline';
11
15
  import { ImageWithFallback } from '../ImageWithFallback';
12
16
  import { Spinner } from '../Spinner';
@@ -16,10 +20,6 @@ import {
16
20
  ProductCardHoverVariant,
17
21
  ProductCardLayoutVariant,
18
22
  } from './types';
19
- import { Text } from 'src/components/Text/Text';
20
- import { formatPrice } from 'src/util/formatPrice';
21
- import { useImageResolver } from '@envive-ai/react-hooks/hooks';
22
- import { TestProps } from '@envive-ai/react-hooks/types';
23
23
 
24
24
  const formatReviews = (stars: number) =>
25
25
  String(
@@ -95,29 +95,11 @@ export const PriceSection = ({ originalPrice, salePrice, pricePrefix }: PriceSec
95
95
  );
96
96
  };
97
97
 
98
- // export const formatPrice = (price?: number, currency: string = '$'): string => {
99
- // if (price == null) {
100
- // return '';
101
- // }
102
-
103
- // const options: Intl.NumberFormatOptions = {};
104
-
105
- // if (!Number.isInteger(price)) {
106
- // options.minimumFractionDigits = 2;
107
- // options.maximumFractionDigits = 2;
108
- // }
109
-
110
- // return `${currency}${price.toLocaleString('en-US', options)}`;
111
- // };
112
-
113
98
  interface ProductCardProps extends TestProps {
114
99
  productCardConfig?: ProductCardConfig;
115
100
  merchantShortName: string;
116
101
  title: string;
117
102
  url: string;
118
- searchResponseId?: string;
119
- productResponseId?: string;
120
- cardDisplayLocation: string;
121
103
  imageUrl?: string;
122
104
  originalPrice?: number;
123
105
  averageRating?: number;
@@ -128,7 +110,6 @@ interface ProductCardProps extends TestProps {
128
110
  layoutVariant?: ProductCardLayoutVariant;
129
111
  zoomOnHover?: boolean;
130
112
  aspectRatio?: '3:4' | 'square' | 'none';
131
- clickPosition?: number | null;
132
113
  growWithContainer?: boolean;
133
114
  handleClick?: (clickedUrl: string) => void;
134
115
  }
@@ -139,8 +120,6 @@ export const ProductCard = ({
139
120
  imageUrl,
140
121
  title,
141
122
  url,
142
- // searchResponseId,
143
- // productResponseId,
144
123
  originalPrice,
145
124
  averageRating,
146
125
  numberReviews,
@@ -149,10 +128,8 @@ export const ProductCard = ({
149
128
  hoverVariant,
150
129
  dataTestId,
151
130
  layoutVariant = 'normal',
152
- // cardDisplayLocation,
153
131
  zoomOnHover = false,
154
132
  aspectRatio = 'none',
155
- // clickPosition = null,
156
133
  growWithContainer = false,
157
134
  handleClick,
158
135
  }: ProductCardProps) => {