@envive-ai/react-toolkit 0.2.4 → 0.2.6
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/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/ProductCard/index.d.cts +1 -1
- package/dist/ProductCard/index.d.ts +1 -1
- package/dist/ProductGrid/index.cjs +1 -1
- package/dist/ProductGrid/index.d.cts +3 -3
- package/dist/ProductGrid/index.d.ts +3 -3
- package/dist/ProductGrid/index.js +1 -1
- package/dist/RadioButton/index.cjs +1 -1
- package/dist/RadioButton/index.d.cts +2 -2
- package/dist/RadioButton/index.d.ts +2 -2
- package/dist/RadioButton/index.js +1 -1
- package/dist/RadioButtonGroup/index.cjs +2 -2
- package/dist/RadioButtonGroup/index.d.cts +2 -2
- package/dist/RadioButtonGroup/index.d.ts +2 -2
- package/dist/RadioButtonGroup/index.js +2 -2
- package/dist/{RadioButtonGroup-3t2kqSFA.cjs → RadioButtonGroup-BbVqccni.cjs} +1 -1
- package/dist/{RadioButtonGroup-DMbVgPQH.js → RadioButtonGroup-Dgt2ub6s.js} +1 -1
- 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-B690CIZB.js +69 -0
- package/dist/{SearchAutocomplete-TX8UTczp.cjs → SearchAutocomplete-DAEDHeqr.cjs} +26 -8
- package/dist/SearchFilter/index.cjs +4 -4
- package/dist/SearchFilter/index.d.cts +5 -5
- package/dist/SearchFilter/index.d.ts +5 -5
- package/dist/SearchFilter/index.js +4 -4
- package/dist/{SearchFilter-t9or-lnj.cjs → SearchFilter-BHFHWmpK.cjs} +2 -2
- package/dist/{SearchFilter-BQW4o3Xf.js → SearchFilter-DWii-Y_g.js} +2 -2
- package/dist/SearchInput/index.cjs +3 -4
- package/dist/SearchInput/index.d.ts +2 -2
- package/dist/SearchInput/index.js +3 -4
- package/dist/{SearchInput-CO1poiit.cjs → SearchInput-Bn6wD39s.cjs} +5 -23
- package/dist/{SearchInput-BaiWd0_O.js → SearchInput-DFoKyqJV.js} +4 -23
- package/dist/SearchInputForm/index.cjs +49 -30
- package/dist/SearchInputForm/index.d.cts +9 -7
- package/dist/SearchInputForm/index.d.ts +10 -8
- package/dist/SearchInputForm/index.js +48 -31
- package/dist/SearchResultsContent/index.cjs +5 -5
- package/dist/SearchResultsContent/index.d.cts +3 -3
- package/dist/SearchResultsContent/index.d.ts +4 -4
- package/dist/SearchResultsContent/index.js +5 -5
- package/dist/SearchResultsFilterSidebar/index.cjs +74 -8
- package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
- package/dist/SearchResultsFilterSidebar/index.js +73 -7
- package/dist/SearchResultsStates/index.cjs +5 -5
- package/dist/SearchResultsStates/index.d.cts +5 -5
- package/dist/SearchResultsStates/index.d.ts +6 -6
- package/dist/SearchResultsStates/index.js +5 -5
- package/dist/{SearchResultsStates-Bv5NyxPn.cjs → SearchResultsStates-BJPkHdXG.cjs} +3 -3
- package/dist/{SearchResultsStates-DUG-117h.js → SearchResultsStates-BiVIsfIe.js} +3 -3
- 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/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.d.ts +2 -2
- 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/Typography/index.d.ts +2 -2
- package/dist/{index-BcvJf9Sr.d.ts → index--SpI4Sdw.d.ts} +2 -2
- package/dist/{index-DDp-fLgm.d.cts → index-4oRWfY5a.d.cts} +4 -4
- package/dist/{index-B5p2z61Y.d.ts → index-DGfkVcQx.d.ts} +4 -4
- package/dist/{index-BH-QK27q.d.ts → index-Qtr26aUO.d.ts} +1 -1
- package/dist/{searchFilterSidebarVariants-DXabOauB.cjs → searchFilterSidebarVariants-B1P8YS86.cjs} +1 -1
- package/dist/{searchFilterSidebarVariants-BD4SYugF.js → searchFilterSidebarVariants-CN9_kzJ8.js} +1 -1
- package/package.json +1 -1
- package/src/components/SearchAutocomplete/SearchAutocomplete.tsx +51 -11
- package/src/components/SearchInput/SearchInput.tsx +1 -1
- 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/src/components/TextInput/TextInput.tsx +0 -4
- package/dist/SearchAutocomplete-obO19yzL.js +0 -51
- package/dist/SettingsVariant-BsBbdjV5.cjs +0 -63
- package/dist/SettingsVariant-CUSFlJEu.js +0 -55
- /package/dist/{ProductGrid-Cgkb4vNf.js → ProductGrid-BFFojT9P.js} +0 -0
- /package/dist/{ProductGrid-BeFeluHo.cjs → ProductGrid-BfgnDGUq.cjs} +0 -0
- /package/dist/{RadioButton-C_soBi7w.js → RadioButton-BYq1JQtD.js} +0 -0
- /package/dist/{RadioButton-DG0PgZbz.cjs → RadioButton-DT5srptW.cjs} +0 -0
- /package/dist/{SparkleAnimation-Bm3fk2FJ.cjs → SparkleAnimation-CvGlWUqv.cjs} +0 -0
- /package/dist/{SparkleAnimation-D1QjYho_.js → SparkleAnimation-paLhSu5E.js} +0 -0
- /package/dist/{TextInput-iAKCKHwT.cjs → TextInput-BTTG_drp.cjs} +0 -0
- /package/dist/{TextInput-B_4Bu2vf.js → TextInput-BfUhaQUc.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-BjmNL7s7.cjs} +0 -0
- /package/dist/{colorsConfig-DEfiLHH0.js → colorsConfig-E7w6Ol6W.js} +0 -0
- /package/dist/{types-CGRog8XL.d.ts → types-DlqhqT_S.d.ts} +0 -0
- /package/dist/{typographyVariantClasses-COmQXqcN.d.ts → typographyVariantClasses-B6wiawat.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 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_runtime6.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_runtime6.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_runtime6.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_runtime6.JSX.Element;
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/components/SearchFilter/utils.d.ts
|
|
88
88
|
declare const getSelectedFilterItemsCount: (filter: SearchFilterDatum) => number;
|
|
@@ -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;
|
|
@@ -4,9 +4,9 @@ import "../AnimatedChevron-Bik7GMSe.js";
|
|
|
4
4
|
import "../ButtonBase-6wjsZ1tU.js";
|
|
5
5
|
import "../ButtonBase-C_uKnl48.js";
|
|
6
6
|
import "../ModalSheet-BSj_g9JF.js";
|
|
7
|
-
import "../RadioButton-
|
|
8
|
-
import "../RadioButtonGroup-
|
|
9
|
-
import { SearchFilter, SearchFilterFooter, SearchFilterHeader, SearchFilterItem, getSelectedFilterItemsCount, getTotalSelectedFilterItemsCount } from "../SearchFilter-
|
|
10
|
-
import "../ToggleButton-
|
|
7
|
+
import "../RadioButton-BYq1JQtD.js";
|
|
8
|
+
import "../RadioButtonGroup-Dgt2ub6s.js";
|
|
9
|
+
import { SearchFilter, SearchFilterFooter, SearchFilterHeader, SearchFilterItem, getSelectedFilterItemsCount, getTotalSelectedFilterItemsCount } from "../SearchFilter-DWii-Y_g.js";
|
|
10
|
+
import "../ToggleButton-8P9eNKy1.js";
|
|
11
11
|
|
|
12
12
|
export { SearchFilter, SearchFilterFooter, SearchFilterHeader, SearchFilterItem, getSelectedFilterItemsCount, getTotalSelectedFilterItemsCount };
|
|
@@ -3,8 +3,8 @@ const require_Typography = require('./Typography-CFNWgbM5.cjs');
|
|
|
3
3
|
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
|
-
const require_RadioButtonGroup = require('./RadioButtonGroup-
|
|
7
|
-
const require_ToggleButton = require('./ToggleButton-
|
|
6
|
+
const require_RadioButtonGroup = require('./RadioButtonGroup-BbVqccni.cjs');
|
|
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");
|
|
@@ -2,8 +2,8 @@ import { Typography } from "./Typography-D3vDkBMS.js";
|
|
|
2
2
|
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
|
-
import { RadioButtonGroup } from "./RadioButtonGroup-
|
|
6
|
-
import { ToggleButton } from "./ToggleButton-
|
|
5
|
+
import { RadioButtonGroup } from "./RadioButtonGroup-Dgt2ub6s.js";
|
|
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";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
require('../Typography-CFNWgbM5.cjs');
|
|
2
|
-
|
|
3
|
-
require('../
|
|
4
|
-
require('../
|
|
5
|
-
require('../colorsConfig-D-MZuBvt.cjs');
|
|
2
|
+
require('../TextInput-BTTG_drp.cjs');
|
|
3
|
+
require('../colorsConfig-BjmNL7s7.cjs');
|
|
4
|
+
const require_SearchInput = require('../SearchInput-Bn6wD39s.cjs');
|
|
6
5
|
|
|
7
6
|
exports.SearchInput = require_SearchInput.SearchInput;
|
|
8
7
|
exports.searchInputVariantClasses = require_SearchInput.searchInputVariantClasses;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchInputVariant as SearchInputVariant$1 } from "../types-
|
|
2
|
-
import { TypographyVariantMap } from "../typographyVariantClasses-
|
|
1
|
+
import { SearchInputVariant as SearchInputVariant$1 } from "../types-DlqhqT_S.js";
|
|
2
|
+
import { TypographyVariantMap } from "../typographyVariantClasses-B6wiawat.js";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
|
|
5
5
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "../Typography-D3vDkBMS.js";
|
|
2
|
-
import
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../colorsConfig-DEfiLHH0.js";
|
|
2
|
+
import "../TextInput-BfUhaQUc.js";
|
|
3
|
+
import "../colorsConfig-E7w6Ol6W.js";
|
|
4
|
+
import { SearchInput, searchInputVariantClasses } from "../SearchInput-DFoKyqJV.js";
|
|
6
5
|
|
|
7
6
|
export { SearchInput, searchInputVariantClasses };
|
|
@@ -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-BTTG_drp.cjs');
|
|
3
|
+
const require_colorsConfig = require('./colorsConfig-BjmNL7s7.cjs');
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
6
|
let classnames = require("classnames");
|
|
@@ -9,27 +9,9 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
9
9
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
10
10
|
let __envive_ai_react_icons_MagnifyingGlassStarVariant = require("@envive-ai/react-icons/MagnifyingGlassStarVariant");
|
|
11
11
|
__envive_ai_react_icons_MagnifyingGlassStarVariant = require_chunk.__toESM(__envive_ai_react_icons_MagnifyingGlassStarVariant);
|
|
12
|
+
let __envive_ai_react_icons_IconClose = require("@envive-ai/react-icons/IconClose");
|
|
13
|
+
__envive_ai_react_icons_IconClose = require_chunk.__toESM(__envive_ai_react_icons_IconClose);
|
|
12
14
|
|
|
13
|
-
//#region ../icons/src/IconClose.tsx
|
|
14
|
-
const SvgIconClose = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
15
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
-
width: 24,
|
|
17
|
-
height: 24,
|
|
18
|
-
fill: "none",
|
|
19
|
-
...props,
|
|
20
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
21
|
-
cx: 12,
|
|
22
|
-
cy: 12,
|
|
23
|
-
r: 12,
|
|
24
|
-
fill: "#FCFCF9"
|
|
25
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
26
|
-
fill: "currentColor",
|
|
27
|
-
d: "M16.167 6 11.5 10.667 6.833 6 5 7.833 9.667 12.5 5 17.167 6.833 19l4.667-4.667L16.167 19 18 17.167 13.333 12.5 18 7.833z"
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
30
|
-
var IconClose_default = SvgIconClose;
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
15
|
//#region src/components/SearchInput/searchInputVariants.ts
|
|
34
16
|
const searchInputVariantClasses = { standard: {
|
|
35
17
|
searchInputIconColor: "transparent",
|
|
@@ -103,7 +85,7 @@ const SearchInput = react.default.forwardRef(({ searchInputVariant = "standard",
|
|
|
103
85
|
className: "spiffy-tw-absolute spiffy-tw-right-5 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2 spiffy-tw-text-neutral-500 hover:spiffy-tw-text-neutral-700",
|
|
104
86
|
"aria-label": "Clear search input",
|
|
105
87
|
type: "button",
|
|
106
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
88
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_IconClose.default, { className: closeButtonIconClassName })
|
|
107
89
|
})
|
|
108
90
|
]
|
|
109
91
|
});
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
-
import { TextInput } from "./TextInput-
|
|
2
|
-
import { ColorNames, colorVar } from "./colorsConfig-
|
|
1
|
+
import { TextInput } from "./TextInput-BfUhaQUc.js";
|
|
2
|
+
import { ColorNames, colorVar } from "./colorsConfig-E7w6Ol6W.js";
|
|
3
3
|
import React, { useImperativeHandle, useRef } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import MagnifyingGlassStarVariant from "@envive-ai/react-icons/MagnifyingGlassStarVariant";
|
|
7
|
+
import IconClose from "@envive-ai/react-icons/IconClose";
|
|
7
8
|
|
|
8
|
-
//#region ../icons/src/IconClose.tsx
|
|
9
|
-
const SvgIconClose = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
-
width: 24,
|
|
12
|
-
height: 24,
|
|
13
|
-
fill: "none",
|
|
14
|
-
...props,
|
|
15
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
16
|
-
cx: 12,
|
|
17
|
-
cy: 12,
|
|
18
|
-
r: 12,
|
|
19
|
-
fill: "#FCFCF9"
|
|
20
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
21
|
-
fill: "currentColor",
|
|
22
|
-
d: "M16.167 6 11.5 10.667 6.833 6 5 7.833 9.667 12.5 5 17.167 6.833 19l4.667-4.667L16.167 19 18 17.167 13.333 12.5 18 7.833z"
|
|
23
|
-
})]
|
|
24
|
-
});
|
|
25
|
-
var IconClose_default = SvgIconClose;
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
9
|
//#region src/components/SearchInput/searchInputVariants.ts
|
|
29
10
|
const searchInputVariantClasses = { standard: {
|
|
30
11
|
searchInputIconColor: "transparent",
|
|
@@ -98,7 +79,7 @@ const SearchInput = React.forwardRef(({ searchInputVariant = "standard", value,
|
|
|
98
79
|
className: "spiffy-tw-absolute spiffy-tw-right-5 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2 spiffy-tw-text-neutral-500 hover:spiffy-tw-text-neutral-700",
|
|
99
80
|
"aria-label": "Clear search input",
|
|
100
81
|
type: "button",
|
|
101
|
-
children: /* @__PURE__ */ jsx(
|
|
82
|
+
children: /* @__PURE__ */ jsx(IconClose, { className: closeButtonIconClassName })
|
|
102
83
|
})
|
|
103
84
|
]
|
|
104
85
|
});
|
|
@@ -1,39 +1,58 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
2
|
require('../Typography-CFNWgbM5.cjs');
|
|
3
|
-
const require_SearchAutocomplete = require('../SearchAutocomplete-
|
|
4
|
-
|
|
5
|
-
require('../
|
|
6
|
-
require('../
|
|
7
|
-
require(
|
|
3
|
+
const require_SearchAutocomplete = require('../SearchAutocomplete-DAEDHeqr.cjs');
|
|
4
|
+
require('../TextInput-BTTG_drp.cjs');
|
|
5
|
+
require('../colorsConfig-BjmNL7s7.cjs');
|
|
6
|
+
const require_SearchInput = require('../SearchInput-Bn6wD39s.cjs');
|
|
7
|
+
let classnames = require("classnames");
|
|
8
|
+
classnames = require_chunk.__toESM(classnames);
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
11
|
+
let __envive_ai_react_hooks_config_locators_components_search = require("@envive-ai/react-hooks/config/locators/components/search");
|
|
12
|
+
__envive_ai_react_hooks_config_locators_components_search = require_chunk.__toESM(__envive_ai_react_hooks_config_locators_components_search);
|
|
10
13
|
|
|
11
14
|
//#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
|
-
|
|
15
|
+
const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId, shouldShowAutocomplete, focusedIndex, onKeyDown, onAutocompleteSelect, onSearchInputChange, onSearchSubmit, onSearchInputFocus, onSearchInputBlur }) => {
|
|
16
|
+
const { autocompleteIconColor } = require_SearchInput.searchInputVariantClasses[searchInputVariant];
|
|
17
|
+
const containerClasses = (0, classnames.default)("spiffy-tw-relative", "spiffy-tw-w-full");
|
|
18
|
+
const formClasses = (0, classnames.default)({
|
|
19
|
+
"spiffy-tw-grow": true,
|
|
20
|
+
"spiffy-tw-relative": true,
|
|
21
|
+
"spiffy-tw-z-20": shouldShowAutocomplete
|
|
22
|
+
});
|
|
23
|
+
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");
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
25
|
+
className: containerClasses,
|
|
26
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
|
|
27
|
+
onSubmit: (e) => {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
onSearchSubmit();
|
|
30
|
+
},
|
|
31
|
+
className: formClasses,
|
|
32
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchInput.SearchInput, {
|
|
33
|
+
value: searchText,
|
|
34
|
+
placeholder: searchBoxPlaceholder,
|
|
35
|
+
suggestions: autocompleteResults,
|
|
36
|
+
ariaActivedescendant: focusedOptionId,
|
|
37
|
+
searchInputVariant,
|
|
38
|
+
dataTestId: __envive_ai_react_hooks_config_locators_components_search.SEARCH_INPUT_TESTID,
|
|
39
|
+
onKeyDown,
|
|
40
|
+
onChange: onSearchInputChange,
|
|
41
|
+
onFocus: onSearchInputFocus,
|
|
42
|
+
onBlur: onSearchInputBlur
|
|
43
|
+
})
|
|
44
|
+
}), shouldShowAutocomplete && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
45
|
+
className: autocompleteContainerClasses,
|
|
46
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchAutocomplete.SearchAutocomplete, {
|
|
47
|
+
id: "autocomplete-results",
|
|
48
|
+
results: autocompleteResults,
|
|
49
|
+
focusedIndex,
|
|
50
|
+
searchText,
|
|
51
|
+
iconColor: autocompleteIconColor,
|
|
52
|
+
onSuggestionSelect: onAutocompleteSelect
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
37
56
|
};
|
|
38
57
|
|
|
39
58
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchInputVariant } from "../types-BhGjnuWx.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime11 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_runtime11.JSX.Element;
|
|
33
35
|
//#endregion
|
|
34
36
|
export { SearchInputForm };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SearchInputVariant } from "../types-
|
|
2
|
-
import * as
|
|
1
|
+
import { SearchInputVariant } from "../types-DlqhqT_S.js";
|
|
2
|
+
import * as react_jsx_runtime6 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_runtime6.JSX.Element;
|
|
33
35
|
//#endregion
|
|
34
36
|
export { SearchInputForm };
|
|
@@ -1,37 +1,54 @@
|
|
|
1
1
|
import "../Typography-D3vDkBMS.js";
|
|
2
|
-
import { SearchAutocomplete } from "../SearchAutocomplete-
|
|
3
|
-
import
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
2
|
+
import { SearchAutocomplete } from "../SearchAutocomplete-B690CIZB.js";
|
|
3
|
+
import "../TextInput-BfUhaQUc.js";
|
|
4
|
+
import "../colorsConfig-E7w6Ol6W.js";
|
|
5
|
+
import { SearchInput, searchInputVariantClasses } from "../SearchInput-DFoKyqJV.js";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { SEARCH_INPUT_TESTID } from "@envive-ai/react-hooks/config/locators/components/search";
|
|
8
9
|
|
|
9
10
|
//#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
|
-
|
|
11
|
+
const SearchInputForm = ({ searchInputVariant, searchText, autocompleteResults, searchBoxPlaceholder, focusedOptionId, shouldShowAutocomplete, focusedIndex, onKeyDown, onAutocompleteSelect, onSearchInputChange, onSearchSubmit, onSearchInputFocus, onSearchInputBlur }) => {
|
|
12
|
+
const { autocompleteIconColor } = searchInputVariantClasses[searchInputVariant];
|
|
13
|
+
const containerClasses = classNames("spiffy-tw-relative", "spiffy-tw-w-full");
|
|
14
|
+
const formClasses = classNames({
|
|
15
|
+
"spiffy-tw-grow": true,
|
|
16
|
+
"spiffy-tw-relative": true,
|
|
17
|
+
"spiffy-tw-z-20": shouldShowAutocomplete
|
|
18
|
+
});
|
|
19
|
+
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");
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: containerClasses,
|
|
22
|
+
children: [/* @__PURE__ */ jsx("form", {
|
|
23
|
+
onSubmit: (e) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
onSearchSubmit();
|
|
26
|
+
},
|
|
27
|
+
className: formClasses,
|
|
28
|
+
children: /* @__PURE__ */ jsx(SearchInput, {
|
|
29
|
+
value: searchText,
|
|
30
|
+
placeholder: searchBoxPlaceholder,
|
|
31
|
+
suggestions: autocompleteResults,
|
|
32
|
+
ariaActivedescendant: focusedOptionId,
|
|
33
|
+
searchInputVariant,
|
|
34
|
+
dataTestId: SEARCH_INPUT_TESTID,
|
|
35
|
+
onKeyDown,
|
|
36
|
+
onChange: onSearchInputChange,
|
|
37
|
+
onFocus: onSearchInputFocus,
|
|
38
|
+
onBlur: onSearchInputBlur
|
|
39
|
+
})
|
|
40
|
+
}), shouldShowAutocomplete && /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: autocompleteContainerClasses,
|
|
42
|
+
children: /* @__PURE__ */ jsx(SearchAutocomplete, {
|
|
43
|
+
id: "autocomplete-results",
|
|
44
|
+
results: autocompleteResults,
|
|
45
|
+
focusedIndex,
|
|
46
|
+
searchText,
|
|
47
|
+
iconColor: autocompleteIconColor,
|
|
48
|
+
onSuggestionSelect: onAutocompleteSelect
|
|
49
|
+
})
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
35
52
|
};
|
|
36
53
|
|
|
37
54
|
//#endregion
|
|
@@ -4,11 +4,11 @@ require('../DynamicFiltersScrollbar-50i_InZz.cjs');
|
|
|
4
4
|
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
5
5
|
require('../ProductCard-CByKIsUN.cjs');
|
|
6
6
|
require('../Spinner-DjK8ts9E.cjs');
|
|
7
|
-
require('../ProductGrid-
|
|
8
|
-
require('../colorsConfig-
|
|
9
|
-
const require_SearchResultsStates = require('../SearchResultsStates-
|
|
10
|
-
require('../searchFilterSidebarVariants-
|
|
11
|
-
require('../SparkleAnimation-
|
|
7
|
+
require('../ProductGrid-BfgnDGUq.cjs');
|
|
8
|
+
require('../colorsConfig-BjmNL7s7.cjs');
|
|
9
|
+
const require_SearchResultsStates = require('../SearchResultsStates-BJPkHdXG.cjs');
|
|
10
|
+
require('../searchFilterSidebarVariants-B1P8YS86.cjs');
|
|
11
|
+
require('../SparkleAnimation-CvGlWUqv.cjs');
|
|
12
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
13
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
14
14
|
let __envive_ai_react_hooks_hooks_utils = require("@envive-ai/react-hooks/hooks/utils");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-
|
|
1
|
+
import { ProductCardConfig, ProductGridVariant, SearchResponseProductAttributes } from "../index-4oRWfY5a.cjs";
|
|
2
2
|
import { SearchFilterSidebarVariant } from "../index-Dfe_lkL2.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime13 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_runtime13.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-DGfkVcQx.js";
|
|
2
|
+
import { SearchFilterSidebarVariant } from "../index--SpI4Sdw.js";
|
|
3
|
+
import * as react_jsx_runtime2 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_runtime2.JSX.Element;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { SearchResultsContent };
|
|
@@ -3,11 +3,11 @@ import "../DynamicFiltersScrollbar-AhyHehrB.js";
|
|
|
3
3
|
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
4
4
|
import "../ProductCard-BIlnM2nV.js";
|
|
5
5
|
import "../Spinner-BqTt55uu.js";
|
|
6
|
-
import "../ProductGrid-
|
|
7
|
-
import "../colorsConfig-
|
|
8
|
-
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-
|
|
9
|
-
import "../searchFilterSidebarVariants-
|
|
10
|
-
import "../SparkleAnimation-
|
|
6
|
+
import "../ProductGrid-BFFojT9P.js";
|
|
7
|
+
import "../colorsConfig-E7w6Ol6W.js";
|
|
8
|
+
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-BiVIsfIe.js";
|
|
9
|
+
import "../searchFilterSidebarVariants-CN9_kzJ8.js";
|
|
10
|
+
import "../SparkleAnimation-paLhSu5E.js";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { SearchResultsState } from "@envive-ai/react-hooks/hooks/utils";
|
|
13
13
|
|