@envive-ai/react-toolkit 0.1.12 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/index.cjs +3 -3
- package/dist/Accordion/index.d.cts +2 -2
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Accordion/index.js +3 -3
- package/dist/{Accordion-DBZpiQe7.cjs → Accordion-D9gO9_y3.cjs} +1 -1
- package/dist/{Accordion-Cp3Hx2zm.js → Accordion-ZEdp99Ph.js} +1 -1
- package/dist/AnimatedChevron/index.cjs +3 -0
- package/dist/AnimatedChevron/index.d.cts +11 -0
- package/dist/AnimatedChevron/index.d.ts +11 -0
- package/dist/AnimatedChevron/index.js +3 -0
- package/dist/AnimatedChevron-CwuXgR2r.js +29 -0
- package/dist/AnimatedChevron-e_UzWBl0.cjs +37 -0
- package/dist/AppliedFiltersScrollbar/index.cjs +25 -27
- package/dist/AppliedFiltersScrollbar/index.d.ts +2 -2
- package/dist/AppliedFiltersScrollbar/index.js +25 -27
- package/dist/ButtonBase/index.cjs +4 -4
- package/dist/ButtonBase/index.d.cts +3 -4
- package/dist/ButtonBase/index.d.ts +2 -3
- package/dist/ButtonBase/index.js +4 -4
- package/dist/{ButtonBase-BAf-nlCm.js → ButtonBase-BJ0qXMWD.js} +3 -3
- package/dist/{ButtonBase-Do88ndKa.cjs → ButtonBase-VIv-tn7H.cjs} +3 -3
- package/dist/DynamicFiltersScrollbar/index.cjs +23 -25
- package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
- package/dist/DynamicFiltersScrollbar/index.js +23 -25
- package/dist/DynamicFiltersScrollbar-HCYZjI14.cjs +81 -0
- package/dist/DynamicFiltersScrollbar-O0ai3cIG.js +66 -0
- package/dist/FilterScrollbar/index.cjs +3 -3
- package/dist/FilterScrollbar/index.d.cts +3 -3
- package/dist/FilterScrollbar/index.d.ts +3 -3
- package/dist/FilterScrollbar/index.js +3 -3
- package/dist/Headline/index.cjs +2 -2
- package/dist/Headline/index.d.cts +2 -2
- package/dist/Headline/index.d.ts +2 -2
- package/dist/Headline/index.js +2 -2
- package/dist/{Headline-DTT4RSv2.cjs → Headline-CKJmd2w4.cjs} +1 -1
- package/dist/{Headline-DNEWF8ly.js → Headline-DtjTB4xS.js} +1 -1
- package/dist/ImageWithFallback/index.cjs +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ImageWithFallback/index.d.ts +2 -2
- package/dist/ImageWithFallback/index.js +1 -1
- package/dist/ModalSheet/index.cjs +2 -1
- package/dist/ModalSheet/index.d.cts +2 -2
- package/dist/ModalSheet/index.d.ts +2 -2
- package/dist/ModalSheet/index.js +2 -1
- package/dist/{ModalSheet-Csz8HIxs.cjs → ModalSheet-DwnbbFh7.cjs} +2 -26
- package/dist/{ModalSheet-01pxpy_K.js → ModalSheet-sMg44OLz.js} +2 -26
- package/dist/ProductCard/index.cjs +6 -6
- package/dist/ProductCard/index.d.cts +1 -1
- package/dist/ProductCard/index.d.ts +1 -1
- package/dist/ProductCard/index.js +6 -6
- package/dist/{ProductCard-FDyIMnZs.cjs → ProductCard-BDz80MCQ.cjs} +34 -34
- package/dist/{ProductCard-C3MjnfZJ.js → ProductCard-CqhNJShq.js} +34 -34
- package/dist/ProductGrid/index.cjs +7 -7
- package/dist/ProductGrid/index.d.cts +4 -8
- package/dist/ProductGrid/index.d.ts +4 -8
- package/dist/ProductGrid/index.js +7 -7
- package/dist/{ProductGrid-C9OKsyB2.js → ProductGrid-8n4XgcMr.js} +3 -7
- package/dist/{ProductGrid-TlntVJ6h.cjs → ProductGrid-RRcdkY5J.cjs} +3 -7
- package/dist/RadioButton/index.cjs +3 -3
- package/dist/RadioButton/index.d.cts +5 -3
- package/dist/RadioButton/index.d.ts +5 -3
- package/dist/RadioButton/index.js +3 -3
- package/dist/{RadioButton-DZ6QXkrN.cjs → RadioButton-BWnaUI8o.cjs} +17 -10
- package/dist/{RadioButton-Bf68dZl7.js → RadioButton-CG8_M0hY.js} +18 -11
- package/dist/RadioButtonGroup/index.cjs +4 -4
- package/dist/RadioButtonGroup/index.d.cts +2 -2
- package/dist/RadioButtonGroup/index.d.ts +2 -2
- package/dist/RadioButtonGroup/index.js +4 -4
- package/dist/{RadioButtonGroup-8k7hkJYB.js → RadioButtonGroup-B7EuiEP1.js} +2 -1
- package/dist/{RadioButtonGroup-Dc_n5amh.cjs → RadioButtonGroup-ReQqakpS.cjs} +2 -1
- package/dist/SearchAutocomplete/index.cjs +1 -1
- package/dist/SearchAutocomplete/index.js +1 -1
- package/dist/SearchFilter/index.cjs +15 -11
- package/dist/SearchFilter/index.d.cts +20 -6
- package/dist/SearchFilter/index.d.ts +20 -6
- package/dist/SearchFilter/index.js +12 -11
- package/dist/{SearchFilter-DvqBIXa1.js → SearchFilter-C8mgj84o.js} +28 -18
- package/dist/{SearchFilter-CTVBi5s3.cjs → SearchFilter-FrdHPM5O.cjs} +45 -17
- package/dist/SearchInput/index.cjs +4 -4
- package/dist/SearchInput/index.d.cts +3 -2
- package/dist/SearchInput/index.d.ts +4 -3
- package/dist/SearchInput/index.js +4 -4
- package/dist/{SearchInput-vJMWoLzS.cjs → SearchInput--x9NTMTb.cjs} +2 -2
- package/dist/{SearchInput-CVaCPWCE.js → SearchInput-IBq83nqF.js} +2 -2
- package/dist/SearchInputForm/index.cjs +5 -5
- package/dist/SearchInputForm/index.d.cts +34 -2
- package/dist/SearchInputForm/index.d.ts +34 -2
- package/dist/SearchInputForm/index.js +5 -5
- package/dist/SearchResultsContent/index.cjs +36 -39
- package/dist/SearchResultsContent/index.d.cts +4 -6
- package/dist/SearchResultsContent/index.d.ts +4 -6
- package/dist/SearchResultsContent/index.js +36 -39
- package/dist/SearchResultsFilterSidebar/index.cjs +13 -12
- package/dist/SearchResultsFilterSidebar/index.d.cts +1 -1
- package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
- package/dist/SearchResultsFilterSidebar/index.js +13 -12
- package/dist/SearchResultsStates/index.cjs +12 -12
- package/dist/SearchResultsStates/index.d.cts +6 -8
- package/dist/SearchResultsStates/index.d.ts +6 -8
- package/dist/SearchResultsStates/index.js +12 -12
- package/dist/{SearchResultsStates-iKz64Pd4.js → SearchResultsStates-D7dM35qq.js} +8 -10
- package/dist/{SearchResultsStates-CH4agenX.cjs → SearchResultsStates-nlaPbkj3.cjs} +8 -10
- package/dist/SparkleAnimation/index.cjs +1 -1
- package/dist/SparkleAnimation/index.d.cts +2 -2
- package/dist/SparkleAnimation/index.d.ts +2 -2
- package/dist/SparkleAnimation/index.js +1 -1
- package/dist/{SparkleAnimation-qi5WCJ9B.cjs → SparkleAnimation-D1aZE-7A.cjs} +0 -1
- package/dist/{SparkleAnimation-BLfNojLv.js → SparkleAnimation-DtWkXmkN.js} +0 -1
- package/dist/Spinner/index.cjs +1 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Spinner/index.js +1 -1
- package/dist/SuggestionButton/index.cjs +3 -3
- package/dist/SuggestionButton/index.d.ts +2 -2
- package/dist/SuggestionButton/index.js +3 -3
- package/dist/Text/index.cjs +2 -2
- package/dist/Text/index.d.cts +2 -2
- package/dist/Text/index.d.ts +3 -3
- package/dist/Text/index.js +2 -2
- package/dist/{Text-Bod4OMPk.js → Text-BLzNhX4H.js} +1 -1
- package/dist/{Text-MQjxqgZZ.cjs → Text-DllCE9_D.cjs} +1 -1
- package/dist/TextInput/index.cjs +2 -2
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +2 -2
- package/dist/{TextInput-DoM41M53.js → TextInput-BeHPlVHT.js} +1 -1
- package/dist/{TextInput-B3dTeD3q.cjs → TextInput-CGs4BY1q.cjs} +1 -1
- package/dist/ToggleButton/index.cjs +3 -3
- package/dist/ToggleButton/index.d.cts +2 -2
- package/dist/ToggleButton/index.d.ts +2 -2
- package/dist/ToggleButton/index.js +3 -3
- package/dist/{ToggleButton-GIVd2-Z4.js → ToggleButton-CRiPqTCb.js} +1 -1
- package/dist/{ToggleButton-CK_vkMvt.cjs → ToggleButton-DfJZ8POQ.cjs} +1 -1
- package/dist/{index-CFH3KUVw.d.cts → index-B9WeFNlO.d.cts} +5 -9
- package/dist/{index-B8l3muO3.d.ts → index-CLGe_Pam.d.cts} +2 -3
- package/dist/{index-Vck3pox6.d.ts → index-CeECGrFM.d.ts} +4 -8
- package/dist/{index-BMt66uqr.d.cts → index-PSzeHU2s.d.ts} +2 -3
- package/dist/{searchFilterSidebarVariants-CI782ylo.js → searchFilterSidebarVariants-B05f5SD5.js} +1 -1
- package/dist/{searchFilterSidebarVariants-DFfOTqjc.cjs → searchFilterSidebarVariants-NQhqq-NT.cjs} +1 -1
- package/dist/{textVariantClasses-Dgz7Zaql.cjs → textVariantClasses-CBre7vXv.cjs} +5 -7
- package/dist/{textVariantClasses-D77TGEy1.js → textVariantClasses-CRrTb43V.js} +5 -7
- package/dist/types-BhGjnuWx.d.cts +4 -0
- package/dist/types-CTOdb0G0.d.ts +4 -0
- package/package.json +7 -7
- package/src/atoms/search/types.ts +1 -5
- package/src/components/AnimatedChevron/index.ts +1 -0
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +25 -27
- package/src/components/ButtonBase/ButtonBase.tsx +1 -2
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +26 -28
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +25 -27
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +26 -28
- package/src/components/ModalSheet/ModalSheet.tsx +1 -1
- package/src/components/ModalSheet/common/closeIcon.tsx +2 -2
- package/src/components/ModalSheet/mobile/mobileHeader.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +5 -28
- package/src/components/ProductGrid/ProductGrid.tsx +3 -11
- package/src/components/RadioButton/RadioButton.tsx +15 -6
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -0
- package/src/components/SearchFilter/SearchFilter.tsx +2 -2
- package/src/components/SearchFilter/SearchFilterFooter.tsx +1 -1
- package/src/components/SearchFilter/SearchFilterHeader.tsx +6 -1
- package/src/components/SearchFilter/SearchFilterItem.tsx +17 -3
- package/src/components/SearchFilter/index.ts +4 -2
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +1 -0
- package/src/components/SearchFilter/utils.ts +4 -6
- package/src/components/SearchInput/SearchInput.tsx +2 -2
- package/src/components/SearchInput/searchInputVariants.ts +1 -1
- package/src/components/SearchInputForm/SearchInputForm.tsx +1 -1
- package/src/components/SearchInputForm/index.ts +0 -1
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +33 -38
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -3
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +1 -1
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +4 -8
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +3 -3
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +0 -1
- package/src/components/Spinner/Spinner.tsx +29 -14
- package/src/components/SuggestionButton/SuggestionButton.tsx +1 -1
- package/src/components/SuggestionButton/types.ts +1 -1
- package/src/components/Text/textVariantClasses.ts +12 -10
- package/src/components/TextInput/TextInput.tsx +1 -0
- package/src/util/camelCasedPropertiesDeep.ts +22 -22
- package/src/util/internal.ts +4 -2
- package/src/util/splitWords.ts +35 -31
- package/dist/DynamicFiltersScrollbar-C4kdNSJ9.js +0 -70
- package/dist/DynamicFiltersScrollbar-CVw1PINp.cjs +0 -85
- package/dist/Styles/index.cjs +0 -274
- package/dist/Styles/index.d.cts +0 -258
- package/dist/Styles/index.d.ts +0 -258
- package/dist/Styles/index.js +0 -274
- package/dist/index-H_9LhS_1.d.cts +0 -36
- package/dist/index-h-QwQNnu.d.ts +0 -36
- package/src/components/SearchInputForm/types.ts +0 -1
- package/src/components/Styles/EnviveTailwindPreset.ts +0 -285
- package/src/components/Styles/index.ts +0 -2
- package/tailwind-preset.js +0 -3
- /package/dist/{ButtonBase-0NN6wmX-.js → ButtonBase-BktteD9c.js} +0 -0
- /package/dist/{ButtonBase-BIXx56hq.cjs → ButtonBase-Cb6Iec6f.cjs} +0 -0
- /package/dist/{ImageWithFallback-DqxjwO3i.js → ImageWithFallback-CbYsD1_a.js} +0 -0
- /package/dist/{ImageWithFallback-Cx-KNi-D.cjs → ImageWithFallback-Km9h16Vz.cjs} +0 -0
- /package/dist/{SearchAutocomplete-BlpII8Xs.js → SearchAutocomplete-BMNYZiJL.js} +0 -0
- /package/dist/{SearchAutocomplete-DIEhLT4C.cjs → SearchAutocomplete-BmHdijOv.cjs} +0 -0
- /package/dist/{Spinner-CjGLIRgs.js → Spinner-bg6jb_ks.js} +0 -0
- /package/dist/{Spinner-DFor2Szi.cjs → Spinner-rcWX566W.cjs} +0 -0
- /package/dist/{colorsConfig-DEfiLHH0.js → colorsConfig-Ck2jeqWe.js} +0 -0
- /package/dist/{colorsConfig-D-MZuBvt.cjs → colorsConfig-CqCKftuM.cjs} +0 -0
- /package/dist/{textVariantClasses-kyZtL8F5.d.ts → textVariantClasses-Bl8SAGwZ.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextStyleVariantMap, getVariantPlaceholderClassNames } from "./textVariantClasses-
|
|
1
|
+
import { TextStyleVariantMap, getVariantPlaceholderClassNames } from "./textVariantClasses-CRrTb43V.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_textVariantClasses = require('./textVariantClasses-
|
|
2
|
+
const require_textVariantClasses = require('./textVariantClasses-CBre7vXv.cjs');
|
|
3
3
|
let react = require("react");
|
|
4
4
|
react = require_chunk.__toESM(react);
|
|
5
5
|
let classnames = require("classnames");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('../textVariantClasses-
|
|
2
|
-
require('../Text-
|
|
1
|
+
require('../textVariantClasses-CBre7vXv.cjs');
|
|
2
|
+
require('../Text-DllCE9_D.cjs');
|
|
3
3
|
require('../Text-C8t_iEj6.cjs');
|
|
4
|
-
const require_ToggleButton = require('../ToggleButton-
|
|
4
|
+
const require_ToggleButton = require('../ToggleButton-DfJZ8POQ.cjs');
|
|
5
5
|
|
|
6
6
|
exports.ToggleButton = require_ToggleButton.ToggleButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 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_runtime2.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 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_runtime2.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../textVariantClasses-
|
|
2
|
-
import "../Text-
|
|
1
|
+
import "../textVariantClasses-CRrTb43V.js";
|
|
2
|
+
import "../Text-BLzNhX4H.js";
|
|
3
3
|
import "../Text-BMsncrpY.js";
|
|
4
|
-
import { ToggleButton } from "../ToggleButton-
|
|
4
|
+
import { ToggleButton } from "../ToggleButton-CRiPqTCb.js";
|
|
5
5
|
|
|
6
6
|
export { ToggleButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Text = require('./Text-
|
|
2
|
+
const require_Text = require('./Text-DllCE9_D.cjs');
|
|
3
3
|
let classnames = require("classnames");
|
|
4
4
|
classnames = require_chunk.__toESM(classnames);
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
1
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
2
|
import { FC } from "react";
|
|
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) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime22.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) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime22.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) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime22.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
|
|
1
|
+
import * as react_jsx_runtime11 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) =>
|
|
44
|
+
}: SearchResultsFilterProps) => react_jsx_runtime11.JSX.Element;
|
|
46
45
|
//#endregion
|
|
47
46
|
export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime7 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_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) =>
|
|
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) =>
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime23 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) =>
|
|
44
|
+
}: SearchResultsFilterProps) => react_jsx_runtime23.JSX.Element;
|
|
46
45
|
//#endregion
|
|
47
46
|
export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
package/dist/{searchFilterSidebarVariants-DFfOTqjc.cjs → searchFilterSidebarVariants-NQhqq-NT.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_colorsConfig = require('./colorsConfig-
|
|
1
|
+
const require_colorsConfig = require('./colorsConfig-CqCKftuM.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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React component library for Envive services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"tailwind-preset.js"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "tsdown",
|
|
24
|
+
"build": "npm run typecheck && tsdown",
|
|
25
25
|
"build:watch": "tsdown --watch",
|
|
26
26
|
"prepublish": "npm run build",
|
|
27
27
|
"typecheck": "tsc"
|
|
@@ -45,13 +45,17 @@
|
|
|
45
45
|
"postcss": "^8.5.6",
|
|
46
46
|
"tailwindcss": "^3.4.17",
|
|
47
47
|
"tsdown": "^0.14.2",
|
|
48
|
-
"typescript": "
|
|
48
|
+
"typescript": "^5.4.3"
|
|
49
49
|
},
|
|
50
50
|
"exports": {
|
|
51
51
|
"./Accordion": {
|
|
52
52
|
"import": "./dist/Accordion/index.js",
|
|
53
53
|
"require": "./dist/Accordion/index.cjs"
|
|
54
54
|
},
|
|
55
|
+
"./AnimatedChevron": {
|
|
56
|
+
"import": "./dist/AnimatedChevron/index.js",
|
|
57
|
+
"require": "./dist/AnimatedChevron/index.cjs"
|
|
58
|
+
},
|
|
55
59
|
"./AppliedFiltersScrollbar": {
|
|
56
60
|
"import": "./dist/AppliedFiltersScrollbar/index.js",
|
|
57
61
|
"require": "./dist/AppliedFiltersScrollbar/index.cjs"
|
|
@@ -132,10 +136,6 @@
|
|
|
132
136
|
"import": "./dist/Spinner/index.js",
|
|
133
137
|
"require": "./dist/Spinner/index.cjs"
|
|
134
138
|
},
|
|
135
|
-
"./Styles": {
|
|
136
|
-
"import": "./dist/Styles/index.js",
|
|
137
|
-
"require": "./dist/Styles/index.cjs"
|
|
138
|
-
},
|
|
139
139
|
"./SuggestionButton": {
|
|
140
140
|
"import": "./dist/SuggestionButton/index.js",
|
|
141
141
|
"require": "./dist/SuggestionButton/index.cjs"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AnimatedChevron';
|
|
@@ -38,33 +38,31 @@ export const AppliedFiltersScrollbar = ({
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<ScrollContainer className={filterBarClassNames} hideScrollbars>
|
|
41
|
-
{selectedFilterOptions.map((filter) =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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=
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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/IsSmallScreen';
|
|
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
|
-
<
|
|
36
|
+
<button type="button" className={closeIconClassNames} onClick={closeModal}>
|
|
37
37
|
<IconContext.Provider value={closeIconContextValue}>{closeIcon}</IconContext.Provider>
|
|
38
|
-
</
|
|
38
|
+
</button>
|
|
39
39
|
);
|
|
40
40
|
};
|
|
@@ -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: {
|