@envive-ai/react-toolkit 0.2.3 → 0.2.5
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.d.cts +2 -2
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/AnimatedChevron/index.d.cts +2 -2
- package/dist/AnimatedChevron/index.d.ts +2 -2
- package/dist/AppliedFiltersScrollbar/index.d.cts +2 -2
- package/dist/AppliedFiltersScrollbar/index.d.ts +2 -2
- package/dist/ButtonBase/index.d.cts +2 -2
- package/dist/ButtonBase/index.d.ts +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
- package/dist/FilterScrollbar/index.d.cts +3 -3
- package/dist/FilterScrollbar/index.d.ts +3 -3
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ImageWithFallback/index.d.ts +2 -2
- package/dist/ModalSheet/index.d.cts +2 -2
- package/dist/ModalSheet/index.d.ts +2 -2
- package/dist/ProductCard/index.cjs +2 -2
- package/dist/ProductCard/index.d.cts +1 -1
- package/dist/ProductCard/index.d.ts +1 -1
- package/dist/ProductCard/index.js +2 -2
- package/dist/{ProductCard-2aPkjS8z.js → ProductCard-BIlnM2nV.js} +1 -1
- package/dist/{ProductCard-D1F9A8Rw.cjs → ProductCard-CByKIsUN.cjs} +1 -1
- package/dist/ProductGrid/index.cjs +3 -3
- package/dist/ProductGrid/index.d.cts +3 -3
- package/dist/ProductGrid/index.d.ts +3 -3
- package/dist/ProductGrid/index.js +3 -3
- package/dist/{ProductGrid-Dcy7JxVN.cjs → ProductGrid-BeFeluHo.cjs} +1 -1
- package/dist/{ProductGrid-NtuMrOtp.js → ProductGrid-Cgkb4vNf.js} +1 -1
- package/dist/RadioButton/index.d.cts +2 -2
- package/dist/RadioButton/index.d.ts +2 -2
- package/dist/RadioButtonGroup/index.d.cts +2 -2
- package/dist/RadioButtonGroup/index.d.ts +2 -2
- package/dist/SearchAutocomplete/index.cjs +2 -1
- package/dist/SearchAutocomplete/index.d.cts +10 -2
- package/dist/SearchAutocomplete/index.d.ts +10 -2
- package/dist/SearchAutocomplete/index.js +2 -1
- package/dist/{SearchAutocomplete-TX8UTczp.cjs → SearchAutocomplete-BBBIDGP_.cjs} +26 -8
- package/dist/SearchAutocomplete-DEY_Cmf6.js +69 -0
- package/dist/SearchFilter/index.cjs +2 -2
- package/dist/SearchFilter/index.d.cts +5 -5
- package/dist/SearchFilter/index.d.ts +5 -5
- package/dist/SearchFilter/index.js +2 -2
- package/dist/{SearchFilter-BQW4o3Xf.js → SearchFilter-B0ICGnqG.js} +1 -1
- package/dist/{SearchFilter-t9or-lnj.cjs → SearchFilter-aSgPzPq-.cjs} +1 -1
- package/dist/SearchInput/index.cjs +4 -4
- package/dist/SearchInput/index.js +4 -4
- package/dist/{SearchInput-BaiWd0_O.js → SearchInput-DY2g3Bra.js} +2 -2
- package/dist/{SearchInput-CO1poiit.cjs → SearchInput-DkGDEb66.cjs} +2 -2
- package/dist/SearchInputForm/index.cjs +50 -30
- package/dist/SearchInputForm/index.d.cts +9 -7
- package/dist/SearchInputForm/index.d.ts +9 -7
- package/dist/SearchInputForm/index.js +49 -31
- package/dist/SearchResultsContent/index.cjs +6 -6
- package/dist/SearchResultsContent/index.d.cts +4 -4
- package/dist/SearchResultsContent/index.d.ts +4 -4
- package/dist/SearchResultsContent/index.js +6 -6
- package/dist/SearchResultsFilterSidebar/index.cjs +5 -5
- package/dist/SearchResultsFilterSidebar/index.d.cts +1 -1
- package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
- package/dist/SearchResultsFilterSidebar/index.js +5 -5
- package/dist/SearchResultsStates/index.cjs +6 -6
- package/dist/SearchResultsStates/index.d.cts +2 -2
- package/dist/SearchResultsStates/index.d.ts +6 -6
- package/dist/SearchResultsStates/index.js +6 -6
- package/dist/{SearchResultsStates-CalOf6QP.js → SearchResultsStates-DzNMYUKh.js} +3 -3
- package/dist/{SearchResultsStates-DQlstrHd.cjs → SearchResultsStates-e5W9Ok19.cjs} +3 -3
- package/dist/SparkleAnimation/index.d.cts +2 -2
- package/dist/SparkleAnimation/index.d.ts +2 -2
- 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 +8 -0
- package/dist/SuggestionButton/index.d.cts +3 -3
- package/dist/SuggestionButton/index.d.ts +3 -3
- package/dist/SuggestionButton/index.js +8 -0
- package/dist/TextInput/index.cjs +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/ToggleButton/index.cjs +1 -1
- package/dist/ToggleButton/index.d.cts +2 -2
- package/dist/ToggleButton/index.d.ts +2 -2
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{index-B-5pBFE7.d.cts → index-BQVJifDf.d.cts} +2 -2
- package/dist/{index-BzY_al-V.d.ts → index-BdNJ2gwC.d.ts} +4 -4
- package/dist/{index-cx3r6TgQ.d.cts → index-DWTTeC2a.d.cts} +4 -4
- package/dist/{index-BcvJf9Sr.d.ts → index-fXyRC79n.d.ts} +2 -2
- package/dist/{searchFilterSidebarVariants-DXabOauB.cjs → searchFilterSidebarVariants-CjDvgxxT.cjs} +1 -1
- package/dist/{searchFilterSidebarVariants-BD4SYugF.js → searchFilterSidebarVariants-Clm9ddD5.js} +1 -1
- package/package.json +1 -1
- package/src/components/SearchAutocomplete/SearchAutocomplete.tsx +51 -11
- package/src/components/SearchInputForm/SearchInputForm.tsx +52 -18
- package/src/components/SuggestionButton/SuggestionButton.tsx +15 -0
- package/src/components/SuggestionButton/types.ts +2 -1
- package/dist/SearchAutocomplete-obO19yzL.js +0 -51
- /package/dist/{SettingsVariant-BsBbdjV5.cjs → SettingsVariant-BzZSQvrw.cjs} +0 -0
- /package/dist/{SettingsVariant-CUSFlJEu.js → SettingsVariant-DMgNg4dw.js} +0 -0
- /package/dist/{Spinner-BrHoB-Zg.js → Spinner-BqTt55uu.js} +0 -0
- /package/dist/{Spinner-B1IEMa00.cjs → Spinner-DjK8ts9E.cjs} +0 -0
- /package/dist/{TextInput-iAKCKHwT.cjs → TextInput-BKNorxPl.cjs} +0 -0
- /package/dist/{TextInput-B_4Bu2vf.js → TextInput-NKOORtYu.js} +0 -0
- /package/dist/{ToggleButton-Br6MgjiG.js → ToggleButton-8P9eNKy1.js} +0 -0
- /package/dist/{ToggleButton-CJ74eu-N.cjs → ToggleButton-DCiR4sB5.cjs} +0 -0
- /package/dist/{colorsConfig-D-MZuBvt.cjs → colorsConfig-CRxY3SQ_.cjs} +0 -0
- /package/dist/{colorsConfig-DEfiLHH0.js → colorsConfig-D_IPWAUL.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
require('../Typography-CFNWgbM5.cjs');
|
|
2
2
|
require('../DynamicFiltersScrollbar-50i_InZz.cjs');
|
|
3
3
|
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
4
|
-
require('../
|
|
5
|
-
require('../
|
|
6
|
-
require('../
|
|
7
|
-
require('../colorsConfig-
|
|
8
|
-
const require_SearchResultsStates = require('../SearchResultsStates-
|
|
9
|
-
require('../searchFilterSidebarVariants-
|
|
4
|
+
require('../ProductCard-CByKIsUN.cjs');
|
|
5
|
+
require('../Spinner-DjK8ts9E.cjs');
|
|
6
|
+
require('../ProductGrid-BeFeluHo.cjs');
|
|
7
|
+
require('../colorsConfig-CRxY3SQ_.cjs');
|
|
8
|
+
const require_SearchResultsStates = require('../SearchResultsStates-e5W9Ok19.cjs');
|
|
9
|
+
require('../searchFilterSidebarVariants-CjDvgxxT.cjs');
|
|
10
10
|
require('../SparkleAnimation-Bm3fk2FJ.cjs');
|
|
11
11
|
|
|
12
12
|
exports.NoSearchResultsFound = require_SearchResultsStates.NoSearchResultsFound;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant } from "../index-
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant } from "../index-DWTTeC2a.cjs";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-BQVJifDf.cjs";
|
|
3
3
|
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
4
4
|
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
5
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant } from "../index-
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-
|
|
3
|
-
import * as
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant } from "../index-BdNJ2gwC.js";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-fXyRC79n.js";
|
|
3
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
4
4
|
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
5
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ declare const NoSearchResultsFound: ({
|
|
|
16
16
|
includeBottomMargin,
|
|
17
17
|
noResultsFoundText,
|
|
18
18
|
sparkleIconColor
|
|
19
|
-
}: NoSearchResultsFoundProps) =>
|
|
19
|
+
}: NoSearchResultsFoundProps) => react_jsx_runtime2.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/components/SearchResultsStates/SearchResultsGrid.d.ts
|
|
22
22
|
interface SearchResultsGridProps {
|
|
@@ -53,7 +53,7 @@ declare const SearchResultsGrid: ({
|
|
|
53
53
|
productGridClasses,
|
|
54
54
|
onRemoveFilter,
|
|
55
55
|
onToggleDynamicFilter
|
|
56
|
-
}: SearchResultsGridProps) =>
|
|
56
|
+
}: SearchResultsGridProps) => react_jsx_runtime2.JSX.Element;
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts
|
|
59
59
|
declare const SearchResultsLoadingGrid: ({
|
|
@@ -64,6 +64,6 @@ declare const SearchResultsLoadingGrid: ({
|
|
|
64
64
|
productGridVariant: ProductGridVariant;
|
|
65
65
|
productGridClasses: string;
|
|
66
66
|
sparkleIconColor?: string;
|
|
67
|
-
}) =>
|
|
67
|
+
}) => react_jsx_runtime2.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
69
|
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../Typography-D3vDkBMS.js";
|
|
2
2
|
import "../DynamicFiltersScrollbar-AhyHehrB.js";
|
|
3
3
|
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import "../colorsConfig-
|
|
8
|
-
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-
|
|
9
|
-
import "../searchFilterSidebarVariants-
|
|
4
|
+
import "../ProductCard-BIlnM2nV.js";
|
|
5
|
+
import "../Spinner-BqTt55uu.js";
|
|
6
|
+
import "../ProductGrid-Cgkb4vNf.js";
|
|
7
|
+
import "../colorsConfig-D_IPWAUL.js";
|
|
8
|
+
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-DzNMYUKh.js";
|
|
9
|
+
import "../searchFilterSidebarVariants-Clm9ddD5.js";
|
|
10
10
|
import "../SparkleAnimation-D1QjYho_.js";
|
|
11
11
|
|
|
12
12
|
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Typography } from "./Typography-D3vDkBMS.js";
|
|
2
2
|
import { AppliedFiltersScrollbar, DynamicFiltersScrollbar } from "./DynamicFiltersScrollbar-AhyHehrB.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { searchFilterSidebarVariantClasses } from "./searchFilterSidebarVariants-
|
|
3
|
+
import { ProductCardSkeleton } from "./ProductCard-BIlnM2nV.js";
|
|
4
|
+
import { ProductGrid, productGridVariantClasses } from "./ProductGrid-Cgkb4vNf.js";
|
|
5
|
+
import { searchFilterSidebarVariantClasses } from "./searchFilterSidebarVariants-Clm9ddD5.js";
|
|
6
6
|
import { SparkleAnimation } from "./SparkleAnimation-D1QjYho_.js";
|
|
7
7
|
import { motion } from "framer-motion";
|
|
8
8
|
import classNames from "classnames";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const require_Typography = require('./Typography-CFNWgbM5.cjs');
|
|
3
3
|
const require_DynamicFiltersScrollbar = require('./DynamicFiltersScrollbar-50i_InZz.cjs');
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-
|
|
4
|
+
const require_ProductCard = require('./ProductCard-CByKIsUN.cjs');
|
|
5
|
+
const require_ProductGrid = require('./ProductGrid-BeFeluHo.cjs');
|
|
6
|
+
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-CjDvgxxT.cjs');
|
|
7
7
|
const require_SparkleAnimation = require('./SparkleAnimation-Bm3fk2FJ.cjs');
|
|
8
8
|
let framer_motion = require("framer-motion");
|
|
9
9
|
framer_motion = require_chunk.__toESM(framer_motion);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
4
|
interface SparkleAnimationProps {
|
|
@@ -10,7 +10,7 @@ declare const SparkleAnimation: ({
|
|
|
10
10
|
color,
|
|
11
11
|
className,
|
|
12
12
|
animate
|
|
13
|
-
}: SparkleAnimationProps) =>
|
|
13
|
+
}: SparkleAnimationProps) => react_jsx_runtime2.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/components/SparkleAnimation/types.d.ts
|
|
16
16
|
declare enum SparkleAnimationOverride {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
4
|
interface SparkleAnimationProps {
|
|
@@ -10,7 +10,7 @@ declare const SparkleAnimation: ({
|
|
|
10
10
|
color,
|
|
11
11
|
className,
|
|
12
12
|
animate
|
|
13
|
-
}: SparkleAnimationProps) =>
|
|
13
|
+
}: SparkleAnimationProps) => react_jsx_runtime11.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/components/SparkleAnimation/types.d.ts
|
|
16
16
|
declare enum SparkleAnimationOverride {
|
package/dist/Spinner/index.cjs
CHANGED
package/dist/Spinner/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Spinner/Spinner.d.ts
|
|
4
4
|
type SpinnerProps = {
|
|
@@ -6,6 +6,6 @@ type SpinnerProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Spinner: ({
|
|
8
8
|
className
|
|
9
|
-
}: SpinnerProps) =>
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime1.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Spinner };
|
package/dist/Spinner/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Spinner/Spinner.d.ts
|
|
4
4
|
type SpinnerProps = {
|
|
@@ -6,6 +6,6 @@ type SpinnerProps = {
|
|
|
6
6
|
};
|
|
7
7
|
declare const Spinner: ({
|
|
8
8
|
className
|
|
9
|
-
}: SpinnerProps) =>
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime14.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Spinner };
|
package/dist/Spinner/index.js
CHANGED
|
@@ -78,6 +78,13 @@ const variantClassMap = new Map([
|
|
|
78
78
|
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
79
79
|
BORDER_CLASS
|
|
80
80
|
]],
|
|
81
|
+
["darkAccentContrast", [
|
|
82
|
+
...DARK_BACKGROUND_CLASSES,
|
|
83
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
84
|
+
"spiffy-tw-fill-[--spiffy-colors-accent-primary]",
|
|
85
|
+
"spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
|
|
86
|
+
BORDER_CLASS
|
|
87
|
+
]],
|
|
81
88
|
["transparent", [
|
|
82
89
|
"spiffy-tw-bg-transparent",
|
|
83
90
|
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
@@ -120,6 +127,7 @@ const borderedVariants = [
|
|
|
120
127
|
"tertiary",
|
|
121
128
|
"dark",
|
|
122
129
|
"darkAccent",
|
|
130
|
+
"darkAccentContrast",
|
|
123
131
|
"darkPrimary",
|
|
124
132
|
"transparent",
|
|
125
133
|
"transparentDark",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SuggestionButton/types.d.ts
|
|
5
|
-
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
5
|
+
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkAccentContrast' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/components/SuggestionButton/SuggestionButton.d.ts
|
|
8
8
|
declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
@@ -30,6 +30,6 @@ declare const SuggestionButton: ({
|
|
|
30
30
|
dataAttributes,
|
|
31
31
|
dataTestId,
|
|
32
32
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
33
|
+
}: SuggestionButtonProps) => react_jsx_runtime22.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SuggestionButton/types.d.ts
|
|
5
|
-
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
5
|
+
type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkAccentContrast' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/components/SuggestionButton/SuggestionButton.d.ts
|
|
8
8
|
declare const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
|
|
@@ -30,6 +30,6 @@ declare const SuggestionButton: ({
|
|
|
30
30
|
dataAttributes,
|
|
31
31
|
dataTestId,
|
|
32
32
|
onClick
|
|
33
|
-
}: SuggestionButtonProps) =>
|
|
33
|
+
}: SuggestionButtonProps) => react_jsx_runtime7.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton, SuggestionButtonVariant };
|
|
@@ -73,6 +73,13 @@ const variantClassMap = new Map([
|
|
|
73
73
|
"spiffy-tw-stroke-[--spiffy-colors-text-accent]",
|
|
74
74
|
BORDER_CLASS
|
|
75
75
|
]],
|
|
76
|
+
["darkAccentContrast", [
|
|
77
|
+
...DARK_BACKGROUND_CLASSES,
|
|
78
|
+
"spiffy-tw-text-[--spiffy-colors-text-light]",
|
|
79
|
+
"spiffy-tw-fill-[--spiffy-colors-accent-primary]",
|
|
80
|
+
"spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
|
|
81
|
+
BORDER_CLASS
|
|
82
|
+
]],
|
|
76
83
|
["transparent", [
|
|
77
84
|
"spiffy-tw-bg-transparent",
|
|
78
85
|
"spiffy-tw-border-[--spiffy-colors-background-light]",
|
|
@@ -115,6 +122,7 @@ const borderedVariants = [
|
|
|
115
122
|
"tertiary",
|
|
116
123
|
"dark",
|
|
117
124
|
"darkAccent",
|
|
125
|
+
"darkAccentContrast",
|
|
118
126
|
"darkPrimary",
|
|
119
127
|
"transparent",
|
|
120
128
|
"transparentDark",
|
package/dist/TextInput/index.cjs
CHANGED
package/dist/TextInput/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime28 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_runtime28.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 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_runtime6.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ToggleButton, ToggleButtonProps, ToggleButtonVariant };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
2
2
|
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
@@ -41,6 +41,6 @@ declare const SearchResultsFilter: ({
|
|
|
41
41
|
onSelectFilterItem,
|
|
42
42
|
onClearAllFilters,
|
|
43
43
|
filterButtonText
|
|
44
|
-
}: SearchResultsFilterProps) =>
|
|
44
|
+
}: SearchResultsFilterProps) => react_jsx_runtime27.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
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_runtime15 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_runtime15.JSX.Element;
|
|
265
265
|
interface PriceSectionProps {
|
|
266
266
|
originalPrice?: string;
|
|
267
267
|
salePrice?: string;
|
|
@@ -271,7 +271,7 @@ declare const PriceSection: ({
|
|
|
271
271
|
originalPrice,
|
|
272
272
|
salePrice,
|
|
273
273
|
pricePrefix
|
|
274
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime15.JSX.Element;
|
|
275
275
|
interface ProductCardProps extends TestProps {
|
|
276
276
|
productCardConfig?: ProductCardConfig;
|
|
277
277
|
merchantShortName: string;
|
|
@@ -308,7 +308,7 @@ declare const ProductCard: ({
|
|
|
308
308
|
aspectRatio,
|
|
309
309
|
growWithContainer,
|
|
310
310
|
handleClick
|
|
311
|
-
}: ProductCardProps) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime15.JSX.Element;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
314
314
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
import { TestProps } from "@envive-ai/react-hooks/types";
|
|
3
3
|
import { FC } from "react";
|
|
4
4
|
import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
|
|
|
261
261
|
stars,
|
|
262
262
|
reviewCount,
|
|
263
263
|
className
|
|
264
|
-
}: RatingSummaryProps) =>
|
|
264
|
+
}: RatingSummaryProps) => react_jsx_runtime15.JSX.Element;
|
|
265
265
|
interface PriceSectionProps {
|
|
266
266
|
originalPrice?: string;
|
|
267
267
|
salePrice?: string;
|
|
@@ -271,7 +271,7 @@ declare const PriceSection: ({
|
|
|
271
271
|
originalPrice,
|
|
272
272
|
salePrice,
|
|
273
273
|
pricePrefix
|
|
274
|
-
}: PriceSectionProps) =>
|
|
274
|
+
}: PriceSectionProps) => react_jsx_runtime15.JSX.Element;
|
|
275
275
|
interface ProductCardProps extends TestProps {
|
|
276
276
|
productCardConfig?: ProductCardConfig;
|
|
277
277
|
merchantShortName: string;
|
|
@@ -308,7 +308,7 @@ declare const ProductCard: ({
|
|
|
308
308
|
aspectRatio,
|
|
309
309
|
growWithContainer,
|
|
310
310
|
handleClick
|
|
311
|
-
}: ProductCardProps) =>
|
|
311
|
+
}: ProductCardProps) => react_jsx_runtime15.JSX.Element;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
314
314
|
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
2
2
|
import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchResultsFilterSidebar/types.d.ts
|
|
@@ -41,6 +41,6 @@ declare const SearchResultsFilter: ({
|
|
|
41
41
|
onSelectFilterItem,
|
|
42
42
|
onClearAllFilters,
|
|
43
43
|
filterButtonText
|
|
44
|
-
}: SearchResultsFilterProps) =>
|
|
44
|
+
}: SearchResultsFilterProps) => react_jsx_runtime4.JSX.Element;
|
|
45
45
|
//#endregion
|
|
46
46
|
export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
package/dist/{searchFilterSidebarVariants-DXabOauB.cjs → searchFilterSidebarVariants-CjDvgxxT.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_colorsConfig = require('./colorsConfig-
|
|
1
|
+
const require_colorsConfig = require('./colorsConfig-CRxY3SQ_.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
|
|
4
4
|
const searchFilterSidebarVariantClasses = {
|
package/package.json
CHANGED
|
@@ -2,26 +2,70 @@ import React from 'react';
|
|
|
2
2
|
import { motion } from 'framer-motion';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import OutlinedStar from '@envive-ai/react-icons/OutlinedStar';
|
|
5
|
+
import { Typography } from '../Typography';
|
|
5
6
|
|
|
6
7
|
interface GlobalSearchAutocompleteProps {
|
|
7
8
|
id: string;
|
|
8
9
|
results: string[];
|
|
9
10
|
focusedIndex: number;
|
|
11
|
+
searchText?: string;
|
|
10
12
|
onSuggestionSelect: (suggestion: string, rankPosition: number) => void;
|
|
11
13
|
iconColor?: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export const SearchAutocomplete
|
|
16
|
+
export const SearchAutocomplete = ({
|
|
15
17
|
id,
|
|
16
18
|
results,
|
|
17
19
|
focusedIndex,
|
|
20
|
+
searchText = '',
|
|
18
21
|
onSuggestionSelect,
|
|
19
22
|
iconColor,
|
|
20
|
-
}) => {
|
|
23
|
+
}: GlobalSearchAutocompleteProps) => {
|
|
21
24
|
if (results.length === 0) {
|
|
22
25
|
return null;
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
const highlightMatchingText = (text: string, searchQuery: string) => {
|
|
29
|
+
if (!searchQuery.trim()) {
|
|
30
|
+
return <Typography variant="body3">{text}</Typography>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const escapedQuery = searchQuery.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
34
|
+
const regex = new RegExp(`(${escapedQuery})`, 'gi');
|
|
35
|
+
const parts = text.split(regex);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Typography variant="body3">
|
|
39
|
+
{parts.map((part, index) => {
|
|
40
|
+
const isMatch = part.toLowerCase() === searchQuery.toLowerCase();
|
|
41
|
+
return isMatch ? (
|
|
42
|
+
<strong key={index} className="spiffy-tw-font-bold">
|
|
43
|
+
{part}
|
|
44
|
+
</strong>
|
|
45
|
+
) : (
|
|
46
|
+
<span key={index}>{part}</span>
|
|
47
|
+
);
|
|
48
|
+
})}
|
|
49
|
+
</Typography>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const containerClasses = classNames(
|
|
54
|
+
'spiffy-tw-mt-[16px]',
|
|
55
|
+
'spiffy-tw-mb-[8px]',
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const getListElementClasses = (index: number) => classNames(
|
|
59
|
+
'spiffy-tw-flex',
|
|
60
|
+
'spiffy-tw-items-center',
|
|
61
|
+
'spiffy-tw-cursor-pointer',
|
|
62
|
+
'spiffy-tw-py-[8px]',
|
|
63
|
+
'spiffy-tw-pl-[16px]',
|
|
64
|
+
'spiffy-tw-text-[--spiffy-colors-text-primary]',
|
|
65
|
+
'hover:spiffy-tw-bg-neutral-100',
|
|
66
|
+
{ 'spiffy-tw-bg-neutral-200': focusedIndex === index },
|
|
67
|
+
);
|
|
68
|
+
|
|
25
69
|
return (
|
|
26
70
|
<motion.div
|
|
27
71
|
className="spiffy-tw-h-full"
|
|
@@ -30,18 +74,14 @@ export const SearchAutocomplete: React.FC<GlobalSearchAutocompleteProps> = ({
|
|
|
30
74
|
exit={{ opacity: 0, y: -10 }}
|
|
31
75
|
transition={{ duration: 0.2 }}
|
|
32
76
|
>
|
|
33
|
-
<ul id={id} role="listbox" className=
|
|
77
|
+
<ul id={id} role="listbox" className={containerClasses}>
|
|
34
78
|
{results.map((result, index) => (
|
|
35
79
|
<li
|
|
36
80
|
key={index}
|
|
37
81
|
id={`option-${index}`}
|
|
38
82
|
role="option"
|
|
39
83
|
aria-selected={index === focusedIndex}
|
|
40
|
-
className={
|
|
41
|
-
'spiffy-tw-flex spiffy-tw-items-center spiffy-tw-cursor-pointer spiffy-tw-py-1',
|
|
42
|
-
{ 'spiffy-tw-bg-neutral-200': index === focusedIndex },
|
|
43
|
-
'hover:spiffy-tw-bg-neutral-100',
|
|
44
|
-
)}
|
|
84
|
+
className={getListElementClasses(index)}
|
|
45
85
|
onClick={() => onSuggestionSelect(result, index)}
|
|
46
86
|
onKeyDown={(event) => {
|
|
47
87
|
if (event.key === 'Enter' || event.keyCode === 13) {
|
|
@@ -50,13 +90,13 @@ export const SearchAutocomplete: React.FC<GlobalSearchAutocompleteProps> = ({
|
|
|
50
90
|
}}
|
|
51
91
|
>
|
|
52
92
|
<OutlinedStar
|
|
53
|
-
className="spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-
|
|
93
|
+
className="spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-[16px]"
|
|
54
94
|
fill={iconColor}
|
|
55
95
|
/>
|
|
56
|
-
|
|
96
|
+
{highlightMatchingText(result, searchText)}
|
|
57
97
|
</li>
|
|
58
98
|
))}
|
|
59
99
|
</ul>
|
|
60
100
|
</motion.div>
|
|
61
101
|
);
|
|
62
|
-
};
|
|
102
|
+
};
|