@envive-ai/react-toolkit 0.2.4 → 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.d.cts +1 -1
- package/dist/ProductCard/index.d.ts +1 -1
- package/dist/ProductGrid/index.d.cts +3 -3
- package/dist/ProductGrid/index.d.ts +3 -3
- 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 +7 -5
- package/dist/SearchInputForm/index.d.ts +9 -7
- package/dist/SearchInputForm/index.js +49 -31
- package/dist/SearchResultsContent/index.cjs +3 -3
- package/dist/SearchResultsContent/index.d.cts +4 -4
- package/dist/SearchResultsContent/index.d.ts +4 -4
- package/dist/SearchResultsContent/index.js +3 -3
- 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 +3 -3
- package/dist/SearchResultsStates/index.d.cts +6 -6
- package/dist/SearchResultsStates/index.d.ts +6 -6
- package/dist/SearchResultsStates/index.js +3 -3
- package/dist/{SearchResultsStates-DUG-117h.js → SearchResultsStates-DzNMYUKh.js} +1 -1
- package/dist/{SearchResultsStates-Bv5NyxPn.cjs → SearchResultsStates-e5W9Ok19.cjs} +1 -1
- package/dist/SparkleAnimation/index.d.ts +2 -2
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- 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.js +1 -1
- package/dist/{index-Dfe_lkL2.d.cts → index-BQVJifDf.d.cts} +2 -2
- package/dist/{index-DDp-fLgm.d.cts → index-BdNJ2gwC.d.ts} +5 -5
- package/dist/{index-B5p2z61Y.d.ts → index-DWTTeC2a.d.cts} +5 -5
- 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/{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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
import { CloseIconVariant, FilterFooterProps, SearchFilterDatum, SearchFilterItemDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchFilter/types.d.ts
|
|
@@ -55,7 +55,7 @@ declare const SearchFilter: ({
|
|
|
55
55
|
radioButtonHoverColor,
|
|
56
56
|
radioButtonUncheckedBorderColor,
|
|
57
57
|
filterCloseIconVariant
|
|
58
|
-
}: SearchFilterProps) =>
|
|
58
|
+
}: SearchFilterProps) => react_jsx_runtime8.JSX.Element;
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/components/SearchFilter/SearchFilterHeader.d.ts
|
|
61
61
|
declare const SearchFilterHeader: ({
|
|
@@ -63,7 +63,7 @@ declare const SearchFilterHeader: ({
|
|
|
63
63
|
productCount,
|
|
64
64
|
headerClassName,
|
|
65
65
|
filterCloseIconVariant
|
|
66
|
-
}: SearchFilterHeaderProps) =>
|
|
66
|
+
}: SearchFilterHeaderProps) => react_jsx_runtime8.JSX.Element;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/components/SearchFilter/SearchFilterFooter.d.ts
|
|
69
69
|
declare const SearchFilterFooter: ({
|
|
@@ -73,7 +73,7 @@ declare const SearchFilterFooter: ({
|
|
|
73
73
|
applyFiltersUnchangedClasses,
|
|
74
74
|
applyFiltersChangedClasses,
|
|
75
75
|
hasFiltersChanged
|
|
76
|
-
}: FilterFooterProps) =>
|
|
76
|
+
}: FilterFooterProps) => react_jsx_runtime8.JSX.Element;
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/components/SearchFilter/SearchFilterItem.d.ts
|
|
79
79
|
declare const SearchFilterItem: ({
|
|
@@ -82,7 +82,7 @@ declare const SearchFilterItem: ({
|
|
|
82
82
|
radioButtonFillColor,
|
|
83
83
|
radioButtonHoverColor,
|
|
84
84
|
radioButtonUncheckedBorderColor
|
|
85
|
-
}: SearchFilterItemProps) =>
|
|
85
|
+
}: SearchFilterItemProps) => react_jsx_runtime8.JSX.Element;
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/components/SearchFilter/utils.d.ts
|
|
88
88
|
declare const getSelectedFilterItemsCount: (filter: SearchFilterDatum) => number;
|
|
@@ -6,7 +6,7 @@ import "../ButtonBase-C_uKnl48.js";
|
|
|
6
6
|
import "../ModalSheet-BSj_g9JF.js";
|
|
7
7
|
import "../RadioButton-C_soBi7w.js";
|
|
8
8
|
import "../RadioButtonGroup-DMbVgPQH.js";
|
|
9
|
-
import { SearchFilter, SearchFilterFooter, SearchFilterHeader, SearchFilterItem, getSelectedFilterItemsCount, getTotalSelectedFilterItemsCount } from "../SearchFilter-
|
|
10
|
-
import "../ToggleButton-
|
|
9
|
+
import { SearchFilter, SearchFilterFooter, SearchFilterHeader, SearchFilterItem, getSelectedFilterItemsCount, getTotalSelectedFilterItemsCount } from "../SearchFilter-B0ICGnqG.js";
|
|
10
|
+
import "../ToggleButton-8P9eNKy1.js";
|
|
11
11
|
|
|
12
12
|
export { SearchFilter, SearchFilterFooter, SearchFilterHeader, SearchFilterItem, getSelectedFilterItemsCount, getTotalSelectedFilterItemsCount };
|
|
@@ -3,7 +3,7 @@ import { Accordion } from "./Accordion-DxtXK__u.js";
|
|
|
3
3
|
import { ButtonBase } from "./ButtonBase-6wjsZ1tU.js";
|
|
4
4
|
import { ModalSheet } from "./ModalSheet-BSj_g9JF.js";
|
|
5
5
|
import { RadioButtonGroup } from "./RadioButtonGroup-DMbVgPQH.js";
|
|
6
|
-
import { ToggleButton } from "./ToggleButton-
|
|
6
|
+
import { ToggleButton } from "./ToggleButton-8P9eNKy1.js";
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -4,7 +4,7 @@ const require_Accordion = require('./Accordion-RpyCFs2a.cjs');
|
|
|
4
4
|
const require_ButtonBase = require('./ButtonBase-AU23oGQr.cjs');
|
|
5
5
|
const require_ModalSheet = require('./ModalSheet-CcthFeMD.cjs');
|
|
6
6
|
const require_RadioButtonGroup = require('./RadioButtonGroup-3t2kqSFA.cjs');
|
|
7
|
-
const require_ToggleButton = require('./ToggleButton-
|
|
7
|
+
const require_ToggleButton = require('./ToggleButton-DCiR4sB5.cjs');
|
|
8
8
|
let react = require("react");
|
|
9
9
|
react = require_chunk.__toESM(react);
|
|
10
10
|
let classnames = require("classnames");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require('../Typography-CFNWgbM5.cjs');
|
|
2
|
-
const require_SearchInput = require('../SearchInput-
|
|
3
|
-
require('../SettingsVariant-
|
|
4
|
-
require('../TextInput-
|
|
5
|
-
require('../colorsConfig-
|
|
2
|
+
const require_SearchInput = require('../SearchInput-DkGDEb66.cjs');
|
|
3
|
+
require('../SettingsVariant-BzZSQvrw.cjs');
|
|
4
|
+
require('../TextInput-BKNorxPl.cjs');
|
|
5
|
+
require('../colorsConfig-CRxY3SQ_.cjs');
|
|
6
6
|
|
|
7
7
|
exports.SearchInput = require_SearchInput.SearchInput;
|
|
8
8
|
exports.searchInputVariantClasses = require_SearchInput.searchInputVariantClasses;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../Typography-D3vDkBMS.js";
|
|
2
|
-
import { SearchInput, searchInputVariantClasses } from "../SearchInput-
|
|
3
|
-
import "../SettingsVariant-
|
|
4
|
-
import "../TextInput-
|
|
5
|
-
import "../colorsConfig-
|
|
2
|
+
import { SearchInput, searchInputVariantClasses } from "../SearchInput-DY2g3Bra.js";
|
|
3
|
+
import "../SettingsVariant-DMgNg4dw.js";
|
|
4
|
+
import "../TextInput-NKOORtYu.js";
|
|
5
|
+
import "../colorsConfig-D_IPWAUL.js";
|
|
6
6
|
|
|
7
7
|
export { SearchInput, searchInputVariantClasses };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextInput } from "./TextInput-
|
|
2
|
-
import { ColorNames, colorVar } from "./colorsConfig-
|
|
1
|
+
import { TextInput } from "./TextInput-NKOORtYu.js";
|
|
2
|
+
import { ColorNames, colorVar } from "./colorsConfig-D_IPWAUL.js";
|
|
3
3
|
import React, { useImperativeHandle, useRef } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_TextInput = require('./TextInput-
|
|
3
|
-
const require_colorsConfig = require('./colorsConfig-
|
|
2
|
+
const require_TextInput = require('./TextInput-BKNorxPl.cjs');
|
|
3
|
+
const require_colorsConfig = require('./colorsConfig-CRxY3SQ_.cjs');
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
6
|
let classnames = require("classnames");
|
|
@@ -1,39 +1,59 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
2
|
require('../Typography-CFNWgbM5.cjs');
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
require('../
|
|
6
|
-
require('../
|
|
7
|
-
require('../
|
|
3
|
+
const require_SearchInput = require('../SearchInput-DkGDEb66.cjs');
|
|
4
|
+
require('../SettingsVariant-BzZSQvrw.cjs');
|
|
5
|
+
require('../TextInput-BKNorxPl.cjs');
|
|
6
|
+
require('../colorsConfig-CRxY3SQ_.cjs');
|
|
7
|
+
const require_SearchAutocomplete = require('../SearchAutocomplete-BBBIDGP_.cjs');
|
|
8
|
+
let classnames = require("classnames");
|
|
9
|
+
classnames = require_chunk.__toESM(classnames);
|
|
8
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
11
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
12
|
+
let __envive_ai_react_hooks_config_locators_components_search = require("@envive-ai/react-hooks/config/locators/components/search");
|
|
13
|
+
__envive_ai_react_hooks_config_locators_components_search = require_chunk.__toESM(__envive_ai_react_hooks_config_locators_components_search);
|
|
10
14
|
|
|
11
15
|
//#region src/components/SearchInputForm/SearchInputForm.tsx
|
|
12
|
-
const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId,
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
16
|
+
const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId, shouldShowAutocomplete, focusedIndex, onKeyDown, onAutocompleteSelect, onSearchInputChange, onSearchSubmit, onSearchInputFocus, onSearchInputBlur }) => {
|
|
17
|
+
const { autocompleteIconColor } = require_SearchInput.searchInputVariantClasses[searchInputVariant];
|
|
18
|
+
const containerClasses = (0, classnames.default)("spiffy-tw-relative", "spiffy-tw-w-full");
|
|
19
|
+
const formClasses = (0, classnames.default)({
|
|
20
|
+
"spiffy-tw-grow": true,
|
|
21
|
+
"spiffy-tw-relative": true,
|
|
22
|
+
"spiffy-tw-z-20": shouldShowAutocomplete
|
|
23
|
+
});
|
|
24
|
+
const autocompleteContainerClasses = (0, classnames.default)("spiffy-tw-absolute", "spiffy-tw-top-1/2", "spiffy-tw-z-10", "spiffy-tw-left-0", "spiffy-tw-right-0", "spiffy-tw-bg-white", "spiffy-tw-w-full", "spiffy-tw-rounded-b-lg", "spiffy-tw-border", "spiffy-tw-border-t-0", "spiffy-tw-pt-4");
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26
|
+
className: containerClasses,
|
|
27
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
|
|
28
|
+
onSubmit: (e) => {
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
onSearchSubmit();
|
|
31
|
+
},
|
|
32
|
+
className: formClasses,
|
|
33
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchInput.SearchInput, {
|
|
34
|
+
value: searchText,
|
|
35
|
+
placeholder: searchBoxPlaceholder,
|
|
36
|
+
suggestions: autocompleteResults,
|
|
37
|
+
ariaActivedescendant: focusedOptionId,
|
|
38
|
+
searchInputVariant,
|
|
39
|
+
dataTestId: __envive_ai_react_hooks_config_locators_components_search.SEARCH_INPUT_TESTID,
|
|
40
|
+
onKeyDown,
|
|
41
|
+
onChange: onSearchInputChange,
|
|
42
|
+
onFocus: onSearchInputFocus,
|
|
43
|
+
onBlur: onSearchInputBlur
|
|
44
|
+
})
|
|
45
|
+
}), shouldShowAutocomplete && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
46
|
+
className: autocompleteContainerClasses,
|
|
47
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchAutocomplete.SearchAutocomplete, {
|
|
48
|
+
id: "autocomplete-results",
|
|
49
|
+
results: autocompleteResults,
|
|
50
|
+
focusedIndex,
|
|
51
|
+
searchText,
|
|
52
|
+
iconColor: autocompleteIconColor,
|
|
53
|
+
onSuggestionSelect: onAutocompleteSelect
|
|
54
|
+
})
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
37
57
|
};
|
|
38
58
|
|
|
39
59
|
//#endregion
|
|
@@ -8,13 +8,14 @@ interface SearchInputFormProps {
|
|
|
8
8
|
autocompleteResults: string[];
|
|
9
9
|
searchBoxPlaceholder: string;
|
|
10
10
|
focusedOptionId: string | undefined;
|
|
11
|
-
isDirty: boolean;
|
|
12
11
|
focusedIndex: number;
|
|
13
12
|
onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
-
onAutocompleteSelect: (suggestion: string) => void;
|
|
13
|
+
onAutocompleteSelect: (suggestion: string, rankPosition?: number) => void;
|
|
15
14
|
onSearchInputChange: (value: string) => void;
|
|
16
15
|
onSearchSubmit: () => void;
|
|
17
|
-
|
|
16
|
+
onSearchInputFocus: () => void;
|
|
17
|
+
onSearchInputBlur: () => void;
|
|
18
|
+
shouldShowAutocomplete: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare const SearchInputForm: ({
|
|
20
21
|
searchInputVariant,
|
|
@@ -22,13 +23,14 @@ declare const SearchInputForm: ({
|
|
|
22
23
|
autocompleteResults,
|
|
23
24
|
searchBoxPlaceholder,
|
|
24
25
|
focusedOptionId,
|
|
25
|
-
|
|
26
|
+
shouldShowAutocomplete,
|
|
26
27
|
focusedIndex,
|
|
27
28
|
onKeyDown,
|
|
28
29
|
onAutocompleteSelect,
|
|
29
30
|
onSearchInputChange,
|
|
30
31
|
onSearchSubmit,
|
|
31
|
-
|
|
32
|
+
onSearchInputFocus,
|
|
33
|
+
onSearchInputBlur
|
|
32
34
|
}: SearchInputFormProps) => react_jsx_runtime0.JSX.Element;
|
|
33
35
|
//#endregion
|
|
34
36
|
export { SearchInputForm };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchInputVariant } from "../types-CGRog8XL.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SearchInputForm/SearchInputForm.d.ts
|
|
5
5
|
interface SearchInputFormProps {
|
|
@@ -8,13 +8,14 @@ interface SearchInputFormProps {
|
|
|
8
8
|
autocompleteResults: string[];
|
|
9
9
|
searchBoxPlaceholder: string;
|
|
10
10
|
focusedOptionId: string | undefined;
|
|
11
|
-
isDirty: boolean;
|
|
12
11
|
focusedIndex: number;
|
|
13
12
|
onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
-
onAutocompleteSelect: (suggestion: string) => void;
|
|
13
|
+
onAutocompleteSelect: (suggestion: string, rankPosition?: number) => void;
|
|
15
14
|
onSearchInputChange: (value: string) => void;
|
|
16
15
|
onSearchSubmit: () => void;
|
|
17
|
-
|
|
16
|
+
onSearchInputFocus: () => void;
|
|
17
|
+
onSearchInputBlur: () => void;
|
|
18
|
+
shouldShowAutocomplete: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare const SearchInputForm: ({
|
|
20
21
|
searchInputVariant,
|
|
@@ -22,13 +23,14 @@ declare const SearchInputForm: ({
|
|
|
22
23
|
autocompleteResults,
|
|
23
24
|
searchBoxPlaceholder,
|
|
24
25
|
focusedOptionId,
|
|
25
|
-
|
|
26
|
+
shouldShowAutocomplete,
|
|
26
27
|
focusedIndex,
|
|
27
28
|
onKeyDown,
|
|
28
29
|
onAutocompleteSelect,
|
|
29
30
|
onSearchInputChange,
|
|
30
31
|
onSearchSubmit,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
onSearchInputFocus,
|
|
33
|
+
onSearchInputBlur
|
|
34
|
+
}: SearchInputFormProps) => react_jsx_runtime5.JSX.Element;
|
|
33
35
|
//#endregion
|
|
34
36
|
export { SearchInputForm };
|
|
@@ -1,37 +1,55 @@
|
|
|
1
1
|
import "../Typography-D3vDkBMS.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import
|
|
2
|
+
import { SearchInput, searchInputVariantClasses } from "../SearchInput-DY2g3Bra.js";
|
|
3
|
+
import "../SettingsVariant-DMgNg4dw.js";
|
|
4
|
+
import "../TextInput-NKOORtYu.js";
|
|
5
|
+
import "../colorsConfig-D_IPWAUL.js";
|
|
6
|
+
import { SearchAutocomplete } from "../SearchAutocomplete-DEY_Cmf6.js";
|
|
7
|
+
import classNames from "classnames";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { SEARCH_INPUT_TESTID } from "@envive-ai/react-hooks/config/locators/components/search";
|
|
8
10
|
|
|
9
11
|
//#region src/components/SearchInputForm/SearchInputForm.tsx
|
|
10
|
-
const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId,
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId, shouldShowAutocomplete, focusedIndex, onKeyDown, onAutocompleteSelect, onSearchInputChange, onSearchSubmit, onSearchInputFocus, onSearchInputBlur }) => {
|
|
13
|
+
const { autocompleteIconColor } = searchInputVariantClasses[searchInputVariant];
|
|
14
|
+
const containerClasses = classNames("spiffy-tw-relative", "spiffy-tw-w-full");
|
|
15
|
+
const formClasses = classNames({
|
|
16
|
+
"spiffy-tw-grow": true,
|
|
17
|
+
"spiffy-tw-relative": true,
|
|
18
|
+
"spiffy-tw-z-20": shouldShowAutocomplete
|
|
19
|
+
});
|
|
20
|
+
const autocompleteContainerClasses = classNames("spiffy-tw-absolute", "spiffy-tw-top-1/2", "spiffy-tw-z-10", "spiffy-tw-left-0", "spiffy-tw-right-0", "spiffy-tw-bg-white", "spiffy-tw-w-full", "spiffy-tw-rounded-b-lg", "spiffy-tw-border", "spiffy-tw-border-t-0", "spiffy-tw-pt-4");
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: containerClasses,
|
|
23
|
+
children: [/* @__PURE__ */ jsx("form", {
|
|
24
|
+
onSubmit: (e) => {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
onSearchSubmit();
|
|
27
|
+
},
|
|
28
|
+
className: formClasses,
|
|
29
|
+
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
30
|
+
value: searchText,
|
|
31
|
+
placeholder: searchBoxPlaceholder,
|
|
32
|
+
suggestions: autocompleteResults,
|
|
33
|
+
ariaActivedescendant: focusedOptionId,
|
|
34
|
+
searchInputVariant,
|
|
35
|
+
dataTestId: SEARCH_INPUT_TESTID,
|
|
36
|
+
onKeyDown,
|
|
37
|
+
onChange: onSearchInputChange,
|
|
38
|
+
onFocus: onSearchInputFocus,
|
|
39
|
+
onBlur: onSearchInputBlur
|
|
40
|
+
})
|
|
41
|
+
}), shouldShowAutocomplete && /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: autocompleteContainerClasses,
|
|
43
|
+
children: /* @__PURE__ */ jsx(SearchAutocomplete, {
|
|
44
|
+
id: "autocomplete-results",
|
|
45
|
+
results: autocompleteResults,
|
|
46
|
+
focusedIndex,
|
|
47
|
+
searchText,
|
|
48
|
+
iconColor: autocompleteIconColor,
|
|
49
|
+
onSuggestionSelect: onAutocompleteSelect
|
|
50
|
+
})
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
35
53
|
};
|
|
36
54
|
|
|
37
55
|
//#endregion
|
|
@@ -5,9 +5,9 @@ require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
|
5
5
|
require('../ProductCard-CByKIsUN.cjs');
|
|
6
6
|
require('../Spinner-DjK8ts9E.cjs');
|
|
7
7
|
require('../ProductGrid-BeFeluHo.cjs');
|
|
8
|
-
require('../colorsConfig-
|
|
9
|
-
const require_SearchResultsStates = require('../SearchResultsStates-
|
|
10
|
-
require('../searchFilterSidebarVariants-
|
|
8
|
+
require('../colorsConfig-CRxY3SQ_.cjs');
|
|
9
|
+
const require_SearchResultsStates = require('../SearchResultsStates-e5W9Ok19.cjs');
|
|
10
|
+
require('../searchFilterSidebarVariants-CjDvgxxT.cjs');
|
|
11
11
|
require('../SparkleAnimation-Bm3fk2FJ.cjs');
|
|
12
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
13
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-
|
|
3
|
-
import * as
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-DWTTeC2a.cjs";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-BQVJifDf.cjs";
|
|
3
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
4
4
|
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
5
|
import { SearchResultsState } from "@envive-ai/react-hooks/hooks/utils";
|
|
6
6
|
|
|
@@ -43,6 +43,6 @@ declare const SearchResultsContent: ({
|
|
|
43
43
|
onRemoveFilter,
|
|
44
44
|
onToggleDynamicFilter,
|
|
45
45
|
noResultsFoundText
|
|
46
|
-
}: SearchResultsContentProps) =>
|
|
46
|
+
}: SearchResultsContentProps) => react_jsx_runtime3.JSX.Element;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { SearchResultsContent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-
|
|
3
|
-
import * as
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-BdNJ2gwC.js";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-fXyRC79n.js";
|
|
3
|
+
import * as react_jsx_runtime28 from "react/jsx-runtime";
|
|
4
4
|
import { SearchResultsState } from "@envive-ai/react-hooks/hooks/utils";
|
|
5
5
|
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
6
6
|
|
|
@@ -43,6 +43,6 @@ declare const SearchResultsContent: ({
|
|
|
43
43
|
onRemoveFilter,
|
|
44
44
|
onToggleDynamicFilter,
|
|
45
45
|
noResultsFoundText
|
|
46
|
-
}: SearchResultsContentProps) =>
|
|
46
|
+
}: SearchResultsContentProps) => react_jsx_runtime28.JSX.Element;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { SearchResultsContent };
|
|
@@ -4,9 +4,9 @@ import "../ImageWithFallback-Ckwsmd8P.js";
|
|
|
4
4
|
import "../ProductCard-BIlnM2nV.js";
|
|
5
5
|
import "../Spinner-BqTt55uu.js";
|
|
6
6
|
import "../ProductGrid-Cgkb4vNf.js";
|
|
7
|
-
import "../colorsConfig-
|
|
8
|
-
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-
|
|
9
|
-
import "../searchFilterSidebarVariants-
|
|
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
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { SearchResultsState } from "@envive-ai/react-hooks/hooks/utils";
|
|
@@ -7,11 +7,11 @@ require('../ButtonBase-DbWQ25n-.cjs');
|
|
|
7
7
|
require('../ModalSheet-CcthFeMD.cjs');
|
|
8
8
|
require('../RadioButton-DG0PgZbz.cjs');
|
|
9
9
|
require('../RadioButtonGroup-3t2kqSFA.cjs');
|
|
10
|
-
const
|
|
11
|
-
require('../
|
|
12
|
-
const
|
|
13
|
-
require('../
|
|
14
|
-
const require_searchFilterSidebarVariants = require('../searchFilterSidebarVariants-
|
|
10
|
+
const require_SettingsVariant = require('../SettingsVariant-BzZSQvrw.cjs');
|
|
11
|
+
require('../colorsConfig-CRxY3SQ_.cjs');
|
|
12
|
+
const require_SearchFilter = require('../SearchFilter-aSgPzPq-.cjs');
|
|
13
|
+
require('../ToggleButton-DCiR4sB5.cjs');
|
|
14
|
+
const require_searchFilterSidebarVariants = require('../searchFilterSidebarVariants-CjDvgxxT.cjs');
|
|
15
15
|
let react = require("react");
|
|
16
16
|
react = require_chunk.__toESM(react);
|
|
17
17
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses } from "../index-
|
|
1
|
+
import { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses } from "../index-BQVJifDf.cjs";
|
|
2
2
|
export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses } from "../index-
|
|
1
|
+
import { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses } from "../index-fXyRC79n.js";
|
|
2
2
|
export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
|
|
@@ -6,11 +6,11 @@ import "../ButtonBase-C_uKnl48.js";
|
|
|
6
6
|
import "../ModalSheet-BSj_g9JF.js";
|
|
7
7
|
import "../RadioButton-C_soBi7w.js";
|
|
8
8
|
import "../RadioButtonGroup-DMbVgPQH.js";
|
|
9
|
-
import {
|
|
10
|
-
import "../
|
|
11
|
-
import {
|
|
12
|
-
import "../
|
|
13
|
-
import { searchFilterSidebarVariantClasses } from "../searchFilterSidebarVariants-
|
|
9
|
+
import { SettingsVariant_default } from "../SettingsVariant-DMgNg4dw.js";
|
|
10
|
+
import "../colorsConfig-D_IPWAUL.js";
|
|
11
|
+
import { SearchFilter, SearchFilterHeader } from "../SearchFilter-B0ICGnqG.js";
|
|
12
|
+
import "../ToggleButton-8P9eNKy1.js";
|
|
13
|
+
import { searchFilterSidebarVariantClasses } from "../searchFilterSidebarVariants-Clm9ddD5.js";
|
|
14
14
|
import { useCallback } from "react";
|
|
15
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
|
|
@@ -4,9 +4,9 @@ require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
|
4
4
|
require('../ProductCard-CByKIsUN.cjs');
|
|
5
5
|
require('../Spinner-DjK8ts9E.cjs');
|
|
6
6
|
require('../ProductGrid-BeFeluHo.cjs');
|
|
7
|
-
require('../colorsConfig-
|
|
8
|
-
const require_SearchResultsStates = require('../SearchResultsStates-
|
|
9
|
-
require('../searchFilterSidebarVariants-
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant } from "../index-
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-
|
|
3
|
-
import * as
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant } from "../index-DWTTeC2a.cjs";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index-BQVJifDf.cjs";
|
|
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";
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ declare const NoSearchResultsFound: ({
|
|
|
16
16
|
includeBottomMargin,
|
|
17
17
|
noResultsFoundText,
|
|
18
18
|
sparkleIconColor
|
|
19
|
-
}: NoSearchResultsFoundProps) =>
|
|
19
|
+
}: NoSearchResultsFoundProps) => react_jsx_runtime7.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_runtime7.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_runtime7.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
69
|
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -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 };
|
|
@@ -4,9 +4,9 @@ import "../ImageWithFallback-Ckwsmd8P.js";
|
|
|
4
4
|
import "../ProductCard-BIlnM2nV.js";
|
|
5
5
|
import "../Spinner-BqTt55uu.js";
|
|
6
6
|
import "../ProductGrid-Cgkb4vNf.js";
|
|
7
|
-
import "../colorsConfig-
|
|
8
|
-
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-
|
|
9
|
-
import "../searchFilterSidebarVariants-
|
|
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 };
|
|
@@ -2,7 +2,7 @@ import { Typography } from "./Typography-D3vDkBMS.js";
|
|
|
2
2
|
import { AppliedFiltersScrollbar, DynamicFiltersScrollbar } from "./DynamicFiltersScrollbar-AhyHehrB.js";
|
|
3
3
|
import { ProductCardSkeleton } from "./ProductCard-BIlnM2nV.js";
|
|
4
4
|
import { ProductGrid, productGridVariantClasses } from "./ProductGrid-Cgkb4vNf.js";
|
|
5
|
-
import { searchFilterSidebarVariantClasses } from "./searchFilterSidebarVariants-
|
|
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";
|
|
@@ -3,7 +3,7 @@ const require_Typography = require('./Typography-CFNWgbM5.cjs');
|
|
|
3
3
|
const require_DynamicFiltersScrollbar = require('./DynamicFiltersScrollbar-50i_InZz.cjs');
|
|
4
4
|
const require_ProductCard = require('./ProductCard-CByKIsUN.cjs');
|
|
5
5
|
const require_ProductGrid = require('./ProductGrid-BeFeluHo.cjs');
|
|
6
|
-
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-
|
|
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);
|