@envive-ai/react-toolkit 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/index.cjs +3 -3
- package/dist/Accordion/index.d.cts +2 -2
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Accordion/index.js +3 -3
- package/dist/{Accordion-DBZpiQe7.cjs → Accordion-D9gO9_y3.cjs} +1 -1
- package/dist/{Accordion-Cp3Hx2zm.js → Accordion-ZEdp99Ph.js} +1 -1
- package/dist/AppliedFiltersScrollbar/index.cjs +25 -27
- package/dist/AppliedFiltersScrollbar/index.d.cts +2 -2
- package/dist/AppliedFiltersScrollbar/index.d.ts +2 -2
- package/dist/AppliedFiltersScrollbar/index.js +25 -27
- package/dist/ButtonBase/index.cjs +3 -3
- package/dist/ButtonBase/index.d.cts +2 -3
- package/dist/ButtonBase/index.d.ts +2 -3
- package/dist/ButtonBase/index.js +3 -3
- package/dist/{ButtonBase-BAf-nlCm.js → ButtonBase-DgRupM53.js} +3 -3
- package/dist/{ButtonBase-Do88ndKa.cjs → ButtonBase-DrIwVGTR.cjs} +3 -3
- package/dist/DynamicFiltersScrollbar/index.cjs +23 -25
- package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
- package/dist/DynamicFiltersScrollbar/index.js +23 -25
- package/dist/DynamicFiltersScrollbar-B1j53y2q.cjs +81 -0
- package/dist/DynamicFiltersScrollbar-D7WYp6x9.js +66 -0
- package/dist/FilterScrollbar/index.cjs +3 -3
- package/dist/FilterScrollbar/index.d.cts +3 -3
- package/dist/FilterScrollbar/index.d.ts +3 -3
- package/dist/FilterScrollbar/index.js +3 -3
- package/dist/Headline/index.cjs +2 -2
- package/dist/Headline/index.d.cts +2 -2
- package/dist/Headline/index.d.ts +2 -2
- package/dist/Headline/index.js +2 -2
- package/dist/{Headline-DNEWF8ly.js → Headline-COv0Jbn8.js} +1 -1
- package/dist/{Headline-DTT4RSv2.cjs → Headline-Cp79THVF.cjs} +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ImageWithFallback/index.d.ts +2 -2
- package/dist/ModalSheet/index.cjs +1 -1
- package/dist/ModalSheet/index.d.cts +2 -2
- package/dist/ModalSheet/index.d.ts +2 -2
- package/dist/ModalSheet/index.js +1 -1
- package/dist/{ModalSheet-CZd5pssv.js → ModalSheet-01pxpy_K.js} +5 -3
- package/dist/{ModalSheet-CXZgyZ4a.cjs → ModalSheet-Csz8HIxs.cjs} +7 -5
- package/dist/ProductCard/index.cjs +4 -4
- package/dist/ProductCard/index.d.cts +1 -1
- package/dist/ProductCard/index.d.ts +1 -1
- package/dist/ProductCard/index.js +4 -4
- package/dist/{ProductCard-D-lyh8uV.js → ProductCard-CNwmHggx.js} +33 -33
- package/dist/{ProductCard-F49krjHk.cjs → ProductCard-EmdDy2af.cjs} +35 -35
- package/dist/ProductGrid/index.cjs +5 -5
- package/dist/ProductGrid/index.d.cts +4 -8
- package/dist/ProductGrid/index.d.ts +4 -8
- package/dist/ProductGrid/index.js +5 -5
- package/dist/{ProductGrid-QeoaIfcq.cjs → ProductGrid-CMoomZLc.cjs} +3 -7
- package/dist/{ProductGrid-FIf5wFQx.js → ProductGrid-nmWSp0qX.js} +3 -7
- package/dist/RadioButton/index.cjs +3 -3
- package/dist/RadioButton/index.d.cts +5 -3
- package/dist/RadioButton/index.d.ts +5 -3
- package/dist/RadioButton/index.js +3 -3
- package/dist/{RadioButton-DZ6QXkrN.cjs → RadioButton-BdKJRzLM.cjs} +17 -10
- package/dist/{RadioButton-Bf68dZl7.js → RadioButton-S5dALI2f.js} +18 -11
- package/dist/RadioButtonGroup/index.cjs +4 -4
- package/dist/RadioButtonGroup/index.d.cts +2 -2
- package/dist/RadioButtonGroup/index.d.ts +2 -2
- package/dist/RadioButtonGroup/index.js +4 -4
- package/dist/{RadioButtonGroup-8k7hkJYB.js → RadioButtonGroup-BipNsoHL.js} +2 -1
- package/dist/{RadioButtonGroup-Dc_n5amh.cjs → RadioButtonGroup-TAJMA1j_.cjs} +2 -1
- package/dist/SearchAutocomplete/index.cjs +56 -2
- package/dist/SearchAutocomplete/index.js +49 -1
- package/dist/SearchFilter/index.cjs +9 -9
- package/dist/SearchFilter/index.d.cts +4 -4
- package/dist/SearchFilter/index.d.ts +4 -4
- package/dist/SearchFilter/index.js +9 -9
- package/dist/{SearchFilter-BtLKnFMm.cjs → SearchFilter-BcLc0TMq.cjs} +27 -17
- package/dist/{SearchFilter-BOwErEyI.js → SearchFilter-w-0s2YVu.js} +27 -17
- package/dist/SearchInput/index.cjs +96 -6
- package/dist/SearchInput/index.d.cts +1 -1
- package/dist/SearchInput/index.d.ts +2 -2
- package/dist/SearchInput/index.js +88 -4
- package/dist/SearchInputForm/index.cjs +0 -39
- package/dist/SearchInputForm/index.d.cts +2 -2
- package/dist/SearchInputForm/index.d.ts +2 -2
- package/dist/SearchInputForm/index.js +1 -37
- package/dist/SearchResultsContent/index.cjs +36 -39
- package/dist/SearchResultsContent/index.d.cts +5 -7
- package/dist/SearchResultsContent/index.d.ts +5 -7
- package/dist/SearchResultsContent/index.js +35 -38
- package/dist/SearchResultsFilterSidebar/index.cjs +11 -11
- package/dist/SearchResultsFilterSidebar/index.d.cts +1 -1
- package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
- package/dist/SearchResultsFilterSidebar/index.js +11 -11
- package/dist/SearchResultsStates/index.cjs +10 -10
- package/dist/SearchResultsStates/index.d.cts +6 -8
- package/dist/SearchResultsStates/index.d.ts +6 -8
- package/dist/SearchResultsStates/index.js +10 -10
- package/dist/{SearchResultsStates-CB5k1xkK.js → SearchResultsStates-DlZz14yy.js} +8 -10
- package/dist/{SearchResultsStates-DywK7vvp.cjs → SearchResultsStates-DwcPrsdd.cjs} +8 -10
- package/dist/SparkleAnimation/index.cjs +1 -1
- package/dist/SparkleAnimation/index.d.cts +2 -2
- package/dist/SparkleAnimation/index.d.ts +2 -2
- package/dist/SparkleAnimation/index.js +1 -1
- package/dist/{SparkleAnimation-Edzqyb48.cjs → SparkleAnimation-CvGlWUqv.cjs} +0 -1
- package/dist/{SparkleAnimation-AM4XoegD.js → SparkleAnimation-paLhSu5E.js} +0 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/SuggestionButton/index.cjs +3 -3
- package/dist/SuggestionButton/index.d.cts +2 -2
- package/dist/SuggestionButton/index.d.ts +2 -2
- package/dist/SuggestionButton/index.js +3 -3
- package/dist/Text/index.cjs +2 -2
- package/dist/Text/index.d.cts +2 -2
- package/dist/Text/index.d.ts +3 -3
- package/dist/Text/index.js +2 -2
- package/dist/{Text-Bod4OMPk.js → Text-BLzNhX4H.js} +1 -1
- package/dist/{Text-MQjxqgZZ.cjs → Text-DllCE9_D.cjs} +1 -1
- package/dist/TextInput/index.cjs +2 -2
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +2 -2
- package/dist/{TextInput-BVPdz7e8.js → TextInput-DmsOxxPN.js} +1 -1
- package/dist/{TextInput-CnXhppYn.cjs → TextInput-HMW0hxLI.cjs} +1 -1
- package/dist/ToggleButton/index.cjs +3 -3
- package/dist/ToggleButton/index.d.cts +2 -2
- package/dist/ToggleButton/index.d.ts +2 -2
- package/dist/ToggleButton/index.js +3 -3
- package/dist/{ToggleButton-D90UO4qv.cjs → ToggleButton-DblAj4Cd.cjs} +1 -1
- package/dist/{ToggleButton-BKRR_-69.js → ToggleButton-r7Y7Kzzo.js} +1 -1
- package/dist/index-BKvXn5sj.d.ts +4 -0
- package/dist/{index-Cl4d_pDw.d.ts → index-Br1B7Jta.d.cts} +2 -3
- package/dist/{index-1x_hMlEf.d.cts → index-DADHwW6M.d.ts} +5 -9
- package/dist/{index-QMTPxKA9.d.ts → index-DDp-fLgm.d.cts} +5 -9
- package/dist/{index-CgjZdKpL.d.cts → index-Dh8rcWev.d.ts} +2 -3
- package/dist/index-W1wCDiw_.d.cts +4 -0
- package/dist/{searchFilterSidebarVariants-CDFCHVeZ.js → searchFilterSidebarVariants-J0FJ8pck.js} +1 -1
- package/dist/{searchFilterSidebarVariants-CtmuwSBQ.cjs → searchFilterSidebarVariants-kkTjYEIF.cjs} +1 -1
- package/dist/{textVariantClasses-Dgz7Zaql.cjs → textVariantClasses-CBre7vXv.cjs} +5 -7
- package/dist/{textVariantClasses-D77TGEy1.js → textVariantClasses-CRrTb43V.js} +5 -7
- package/package.json +3 -7
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +25 -27
- package/src/components/ButtonBase/ButtonBase.tsx +1 -2
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +26 -28
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +25 -27
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +26 -28
- package/src/components/ModalSheet/ModalSheet.tsx +1 -1
- package/src/components/ModalSheet/common/closeIcon.tsx +2 -2
- package/src/components/ModalSheet/desktop/index.tsx +1 -0
- package/src/components/ModalSheet/mobile/index.tsx +1 -0
- package/src/components/ModalSheet/mobile/mobileHeader.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +5 -28
- package/src/components/ProductGrid/ProductGrid.tsx +3 -11
- package/src/components/RadioButton/RadioButton.tsx +15 -6
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -0
- package/src/components/SearchFilter/SearchFilter.tsx +2 -2
- package/src/components/SearchFilter/SearchFilterFooter.tsx +1 -1
- package/src/components/SearchFilter/SearchFilterHeader.tsx +6 -1
- package/src/components/SearchFilter/SearchFilterItem.tsx +17 -3
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +1 -0
- package/src/components/SearchFilter/utils.ts +4 -6
- package/src/components/SearchInput/SearchInput.tsx +2 -2
- package/src/components/SearchInputForm/index.ts +0 -1
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +33 -38
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -3
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +1 -1
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +4 -8
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +3 -3
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +0 -1
- package/src/components/Spinner/Spinner.tsx +29 -14
- package/src/components/SuggestionButton/SuggestionButton.tsx +1 -1
- package/src/components/SuggestionButton/types.ts +1 -1
- package/src/components/Text/textVariantClasses.ts +12 -10
- package/src/components/TextInput/TextInput.tsx +1 -0
- package/src/util/camelCasedPropertiesDeep.ts +22 -22
- package/src/util/internal.ts +4 -2
- package/src/util/splitWords.ts +35 -31
- package/dist/DynamicFiltersScrollbar-C4kdNSJ9.js +0 -70
- package/dist/DynamicFiltersScrollbar-CVw1PINp.cjs +0 -85
- package/dist/SearchAutocomplete-C6omCGJp.js +0 -51
- package/dist/SearchAutocomplete-Cofuvwwp.cjs +0 -62
- package/dist/SearchInput-BBaYEwkR.js +0 -89
- package/dist/SearchInput-BTNvgrIa.cjs +0 -106
- package/dist/Styles/index.cjs +0 -274
- package/dist/Styles/index.d.cts +0 -258
- package/dist/Styles/index.d.ts +0 -258
- package/dist/Styles/index.js +0 -274
- package/dist/index-H_9LhS_1.d.cts +0 -36
- package/dist/index-gfYBM7Ul.d.ts +0 -36
- package/src/components/ModalSheet/common/enviveWatermark.tsx +0 -30
- package/src/components/Styles/EnviveTailwindPreset.ts +0 -285
- package/src/components/Styles/index.ts +0 -2
- package/tailwind-preset.js +0 -3
- /package/dist/{colorsConfig-DFL3mBwB.cjs → colorsConfig-B3-SMUSx.cjs} +0 -0
- /package/dist/{colorsConfig-5Yf4nrEe.js → colorsConfig-DZ-GSPWy.js} +0 -0
- /package/dist/{textVariantClasses-kyZtL8F5.d.ts → textVariantClasses-C8OCWZAw.d.ts} +0 -0
package/src/util/splitWords.ts
CHANGED
|
@@ -38,35 +38,39 @@ export type SplitWords<
|
|
|
38
38
|
? // Skip word separator
|
|
39
39
|
[...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>]
|
|
40
40
|
: LastCharacter extends ''
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
41
|
+
? // Fist char of word
|
|
42
|
+
SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>
|
|
43
|
+
: // Case change: non-numeric to numeric, push word
|
|
44
|
+
[false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
|
|
45
|
+
? [
|
|
46
|
+
...SkipEmptyWord<CurrentWord>,
|
|
47
|
+
...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
|
|
48
|
+
]
|
|
49
|
+
: // Case change: numeric to non-numeric, push word
|
|
50
|
+
[true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
|
|
51
|
+
? [
|
|
52
|
+
...SkipEmptyWord<CurrentWord>,
|
|
53
|
+
...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
|
|
54
|
+
]
|
|
55
|
+
: // No case change: concat word
|
|
56
|
+
[true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
|
|
57
|
+
? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`>
|
|
58
|
+
: // Case change: lower to upper, push word
|
|
59
|
+
[true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>]
|
|
60
|
+
? [
|
|
61
|
+
...SkipEmptyWord<CurrentWord>,
|
|
62
|
+
...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
|
|
63
|
+
]
|
|
64
|
+
: // Case change: upper to lower, brings back the last character, push word
|
|
65
|
+
[true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>]
|
|
66
|
+
? [
|
|
67
|
+
...RemoveLastCharacter<CurrentWord, LastCharacter>,
|
|
68
|
+
...SplitWords<
|
|
69
|
+
RemainingCharacters,
|
|
70
|
+
FirstCharacter,
|
|
71
|
+
`${LastCharacter}${FirstCharacter}`
|
|
72
|
+
>,
|
|
73
|
+
]
|
|
74
|
+
: // No case change: concat word
|
|
75
|
+
SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`>
|
|
72
76
|
: [...SkipEmptyWord<CurrentWord>];
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Text } from "./Text-Bod4OMPk.js";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import ScrollContainer from "react-indiana-drag-scroll";
|
|
5
|
-
|
|
6
|
-
//#region src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx
|
|
7
|
-
const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter }) => {
|
|
8
|
-
if (selectedFilterOptions.length === 0) return null;
|
|
9
|
-
const filterDefaultWithoutBg = filterDefaultClasses.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, "").trim();
|
|
10
|
-
const buttonClasses = classNames(" spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap", filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
|
|
11
|
-
const iconColor = "currentColor";
|
|
12
|
-
return /* @__PURE__ */ jsx(ScrollContainer, {
|
|
13
|
-
className: filterBarClassNames,
|
|
14
|
-
hideScrollbars: true,
|
|
15
|
-
children: selectedFilterOptions.map((filter) => {
|
|
16
|
-
return /* @__PURE__ */ jsx("button", {
|
|
17
|
-
className: buttonClasses,
|
|
18
|
-
type: "button",
|
|
19
|
-
onClick: () => onRemoveFilter(filter),
|
|
20
|
-
"aria-label": `Remove filter: ${filter.displayName}`,
|
|
21
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
22
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]",
|
|
23
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
24
|
-
variant: "body3",
|
|
25
|
-
children: filter.displayName
|
|
26
|
-
}), /* @__PURE__ */ jsx("svg", {
|
|
27
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
-
width: "10",
|
|
29
|
-
height: "10",
|
|
30
|
-
viewBox: "0 0 10 10",
|
|
31
|
-
fill: "none",
|
|
32
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
33
|
-
d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z",
|
|
34
|
-
fill: iconColor
|
|
35
|
-
})
|
|
36
|
-
})]
|
|
37
|
-
})
|
|
38
|
-
}, filter.id);
|
|
39
|
-
})
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx
|
|
45
|
-
const DynamicFiltersScrollbar = ({ availableDynamicFilters, filterBarClassNames, filterDefaultClasses, filterHoverClasses, onToggleDynamicFilter }) => {
|
|
46
|
-
return /* @__PURE__ */ jsx(ScrollContainer, {
|
|
47
|
-
className: filterBarClassNames,
|
|
48
|
-
hideScrollbars: true,
|
|
49
|
-
children: availableDynamicFilters.map(({ name, displayName }) => {
|
|
50
|
-
const buttonClasses = classNames("spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ", filterHoverClasses, filterDefaultClasses);
|
|
51
|
-
return /* @__PURE__ */ jsx("button", {
|
|
52
|
-
type: "button",
|
|
53
|
-
className: buttonClasses,
|
|
54
|
-
onClick: () => {
|
|
55
|
-
onToggleDynamicFilter({
|
|
56
|
-
filter: name,
|
|
57
|
-
dynamicFilterDisplayName: displayName
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
children: /* @__PURE__ */ jsx(Text, {
|
|
61
|
-
variant: "body3",
|
|
62
|
-
children: displayName
|
|
63
|
-
})
|
|
64
|
-
}, name);
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
//#endregion
|
|
70
|
-
export { AppliedFiltersScrollbar, DynamicFiltersScrollbar };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Text = require('./Text-MQjxqgZZ.cjs');
|
|
3
|
-
let classnames = require("classnames");
|
|
4
|
-
classnames = require_chunk.__toESM(classnames);
|
|
5
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
7
|
-
let react_indiana_drag_scroll = require("react-indiana-drag-scroll");
|
|
8
|
-
react_indiana_drag_scroll = require_chunk.__toESM(react_indiana_drag_scroll);
|
|
9
|
-
|
|
10
|
-
//#region src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx
|
|
11
|
-
const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter }) => {
|
|
12
|
-
if (selectedFilterOptions.length === 0) return null;
|
|
13
|
-
const filterDefaultWithoutBg = filterDefaultClasses.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, "").trim();
|
|
14
|
-
const buttonClasses = (0, classnames.default)(" spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap", filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
|
|
15
|
-
const iconColor = "currentColor";
|
|
16
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_indiana_drag_scroll.default, {
|
|
17
|
-
className: filterBarClassNames,
|
|
18
|
-
hideScrollbars: true,
|
|
19
|
-
children: selectedFilterOptions.map((filter) => {
|
|
20
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
21
|
-
className: buttonClasses,
|
|
22
|
-
type: "button",
|
|
23
|
-
onClick: () => onRemoveFilter(filter),
|
|
24
|
-
"aria-label": `Remove filter: ${filter.displayName}`,
|
|
25
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
26
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]",
|
|
27
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
28
|
-
variant: "body3",
|
|
29
|
-
children: filter.displayName
|
|
30
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
31
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
-
width: "10",
|
|
33
|
-
height: "10",
|
|
34
|
-
viewBox: "0 0 10 10",
|
|
35
|
-
fill: "none",
|
|
36
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
37
|
-
d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z",
|
|
38
|
-
fill: iconColor
|
|
39
|
-
})
|
|
40
|
-
})]
|
|
41
|
-
})
|
|
42
|
-
}, filter.id);
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx
|
|
49
|
-
const DynamicFiltersScrollbar = ({ availableDynamicFilters, filterBarClassNames, filterDefaultClasses, filterHoverClasses, onToggleDynamicFilter }) => {
|
|
50
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_indiana_drag_scroll.default, {
|
|
51
|
-
className: filterBarClassNames,
|
|
52
|
-
hideScrollbars: true,
|
|
53
|
-
children: availableDynamicFilters.map(({ name, displayName }) => {
|
|
54
|
-
const buttonClasses = (0, classnames.default)("spiffy-tw-px-[12px] spiffy-tw-py-2 spiffy-tw-rounded-full spiffy-tw-border spiffy-tw-whitespace-nowrap ", filterHoverClasses, filterDefaultClasses);
|
|
55
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
56
|
-
type: "button",
|
|
57
|
-
className: buttonClasses,
|
|
58
|
-
onClick: () => {
|
|
59
|
-
onToggleDynamicFilter({
|
|
60
|
-
filter: name,
|
|
61
|
-
dynamicFilterDisplayName: displayName
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
65
|
-
variant: "body3",
|
|
66
|
-
children: displayName
|
|
67
|
-
})
|
|
68
|
-
}, name);
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
//#endregion
|
|
74
|
-
Object.defineProperty(exports, 'AppliedFiltersScrollbar', {
|
|
75
|
-
enumerable: true,
|
|
76
|
-
get: function () {
|
|
77
|
-
return AppliedFiltersScrollbar;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(exports, 'DynamicFiltersScrollbar', {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return DynamicFiltersScrollbar;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { motion } from "framer-motion";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import OutlinedStar from "@envive-ai/react-icons/OutlinedStar";
|
|
6
|
-
|
|
7
|
-
//#region src/components/SearchAutocomplete/SearchAutocomplete.tsx
|
|
8
|
-
const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, iconColor }) => {
|
|
9
|
-
if (results.length === 0) return null;
|
|
10
|
-
return /* @__PURE__ */ jsx(motion.div, {
|
|
11
|
-
className: "spiffy-tw-h-full",
|
|
12
|
-
initial: {
|
|
13
|
-
opacity: 0,
|
|
14
|
-
y: -10
|
|
15
|
-
},
|
|
16
|
-
animate: {
|
|
17
|
-
opacity: 1,
|
|
18
|
-
y: 0
|
|
19
|
-
},
|
|
20
|
-
exit: {
|
|
21
|
-
opacity: 0,
|
|
22
|
-
y: -10
|
|
23
|
-
},
|
|
24
|
-
transition: { duration: .2 },
|
|
25
|
-
children: /* @__PURE__ */ jsx("ul", {
|
|
26
|
-
id,
|
|
27
|
-
role: "listbox",
|
|
28
|
-
className: "spiffy-tw-mt-4 spiffy-tw-space-y-2",
|
|
29
|
-
children: results.map((result, index) => /* @__PURE__ */ jsxs("li", {
|
|
30
|
-
id: `option-${index}`,
|
|
31
|
-
role: "option",
|
|
32
|
-
"aria-selected": index === focusedIndex,
|
|
33
|
-
className: classNames("spiffy-tw-flex spiffy-tw-items-center spiffy-tw-cursor-pointer spiffy-tw-py-1", { "spiffy-tw-bg-neutral-200": index === focusedIndex }, "hover:spiffy-tw-bg-neutral-100"),
|
|
34
|
-
onClick: () => onSuggestionSelect(result, index),
|
|
35
|
-
onKeyDown: (event) => {
|
|
36
|
-
if (event.key === "Enter" || event.keyCode === 13) onSuggestionSelect(result, index);
|
|
37
|
-
},
|
|
38
|
-
children: [/* @__PURE__ */ jsx(OutlinedStar, {
|
|
39
|
-
className: "spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-2",
|
|
40
|
-
fill: iconColor
|
|
41
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
42
|
-
className: "spiffy-tw-font-bold",
|
|
43
|
-
children: result
|
|
44
|
-
})]
|
|
45
|
-
}, index))
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
export { SearchAutocomplete };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
let framer_motion = require("framer-motion");
|
|
3
|
-
framer_motion = require_chunk.__toESM(framer_motion);
|
|
4
|
-
let react = require("react");
|
|
5
|
-
react = require_chunk.__toESM(react);
|
|
6
|
-
let classnames = require("classnames");
|
|
7
|
-
classnames = require_chunk.__toESM(classnames);
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
10
|
-
let __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
|
|
11
|
-
__envive_ai_react_icons_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_OutlinedStar);
|
|
12
|
-
|
|
13
|
-
//#region src/components/SearchAutocomplete/SearchAutocomplete.tsx
|
|
14
|
-
const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, iconColor }) => {
|
|
15
|
-
if (results.length === 0) return null;
|
|
16
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
17
|
-
className: "spiffy-tw-h-full",
|
|
18
|
-
initial: {
|
|
19
|
-
opacity: 0,
|
|
20
|
-
y: -10
|
|
21
|
-
},
|
|
22
|
-
animate: {
|
|
23
|
-
opacity: 1,
|
|
24
|
-
y: 0
|
|
25
|
-
},
|
|
26
|
-
exit: {
|
|
27
|
-
opacity: 0,
|
|
28
|
-
y: -10
|
|
29
|
-
},
|
|
30
|
-
transition: { duration: .2 },
|
|
31
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
32
|
-
id,
|
|
33
|
-
role: "listbox",
|
|
34
|
-
className: "spiffy-tw-mt-4 spiffy-tw-space-y-2",
|
|
35
|
-
children: results.map((result, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
36
|
-
id: `option-${index}`,
|
|
37
|
-
role: "option",
|
|
38
|
-
"aria-selected": index === focusedIndex,
|
|
39
|
-
className: (0, classnames.default)("spiffy-tw-flex spiffy-tw-items-center spiffy-tw-cursor-pointer spiffy-tw-py-1", { "spiffy-tw-bg-neutral-200": index === focusedIndex }, "hover:spiffy-tw-bg-neutral-100"),
|
|
40
|
-
onClick: () => onSuggestionSelect(result, index),
|
|
41
|
-
onKeyDown: (event) => {
|
|
42
|
-
if (event.key === "Enter" || event.keyCode === 13) onSuggestionSelect(result, index);
|
|
43
|
-
},
|
|
44
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_OutlinedStar.default, {
|
|
45
|
-
className: "spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-2",
|
|
46
|
-
fill: iconColor
|
|
47
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
48
|
-
className: "spiffy-tw-font-bold",
|
|
49
|
-
children: result
|
|
50
|
-
})]
|
|
51
|
-
}, index))
|
|
52
|
-
})
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
//#endregion
|
|
57
|
-
Object.defineProperty(exports, 'SearchAutocomplete', {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: function () {
|
|
60
|
-
return SearchAutocomplete;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { TextInput } from "./TextInput-BVPdz7e8.js";
|
|
2
|
-
import { ColorNames, colorVar } from "./colorsConfig-5Yf4nrEe.js";
|
|
3
|
-
import React, { useImperativeHandle, useRef } from "react";
|
|
4
|
-
import classNames from "classnames";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import MagnifyingGlassStarVariant from "@envive-ai/react-icons/MagnifyingGlassStarVariant";
|
|
7
|
-
import { IconClose } from "@envive-ai/react-icons/src/index.js";
|
|
8
|
-
|
|
9
|
-
//#region src/components/SearchInput/searchInputVariants.ts
|
|
10
|
-
const searchInputVariantClasses = { standard: {
|
|
11
|
-
searchInputIconColor: "transparent",
|
|
12
|
-
searchInputBorderColor: "spiffy-tw-border-[--spiffy-colors-border-medium]",
|
|
13
|
-
searchInputCloseIconClasses: "[&>circle]:spiffy-tw-fill-[--spiffy-colors-text-secondary] [&>path]:spiffy-tw-fill-[#fff]",
|
|
14
|
-
searchInputActiveStarClasses: `first:[&>path]:spiffy-tw-stroke-[--spiffy-colors-accent-primary] first:[&>path]:spiffy-tw-fill-[--spiffy-colors-accent-primary]`,
|
|
15
|
-
autocompleteIconColor: colorVar(ColorNames.BackgroundPrimary),
|
|
16
|
-
searchInputClasses: "spiffy-tw-text-[--spiffy-colors-text-primary] placeholder:spiffy-tw-text-[--spiffy-colors-text-secondary] spiffy-tw-text-[16px] spiffy-tw-font-normal spiffy-tw-leading-[148%] placeholder:spiffy-tw-font-medium placeholder:spiffy-tw-leading-[124%]",
|
|
17
|
-
placeholderVariant: "h2"
|
|
18
|
-
} };
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/components/SearchInput/SearchInput.tsx
|
|
22
|
-
const SearchInput = React.forwardRef(({ searchInputVariant = "standard", value, placeholder, suggestions, className, dataTestId, ariaActivedescendant, onKeyDown, onChange, onFocus, onBlur }, ref) => {
|
|
23
|
-
const localInputRef = useRef(null);
|
|
24
|
-
const { searchInputClasses: inputClassName, searchInputIconColor: iconColor, searchInputBorderColor: borderColor, searchInputCloseIconClasses: closeIconClasses, searchInputActiveStarClasses, placeholderVariant } = searchInputVariantClasses[searchInputVariant];
|
|
25
|
-
useImperativeHandle(ref, () => localInputRef.current, []);
|
|
26
|
-
const magnifyingGlassClassesBase = [
|
|
27
|
-
"spiffy-tw-w-[24px]",
|
|
28
|
-
"spiffy-tw-h-[32px]",
|
|
29
|
-
"spiffy-tw-stroke-width-1",
|
|
30
|
-
"sm:spiffy-tw-w-[32px]"
|
|
31
|
-
];
|
|
32
|
-
const magnifyingGlassClassesInactive = classNames(magnifyingGlassClassesBase);
|
|
33
|
-
const magnifyingGlassClassesActive = classNames([...magnifyingGlassClassesBase, searchInputActiveStarClasses]);
|
|
34
|
-
const containerClasses = classNames("spiffy-global-search-input-container", "spiffy-tw-relative spiffy-tw-flex spiffy-tw-items-center", className);
|
|
35
|
-
const inputClasses = classNames("spiffy-global-search-input", "spiffy-tw-flex-grow spiffy-tw-p-2 spiffy-tw-px-[42px] sm:spiffy-tw-p-3 sm:spiffy-tw-px-[48px]", "spiffy-tw-border", "spiffy-tw-text-base", inputClassName);
|
|
36
|
-
const closeButtonIconClassName = classNames([
|
|
37
|
-
"spiffy-tw-w-[16px]",
|
|
38
|
-
"spiffy-tw-h-[16px]",
|
|
39
|
-
"sm:spiffy-tw-w-[24px]",
|
|
40
|
-
"sm:spiffy-tw-h-[24px]",
|
|
41
|
-
"spiffy-tw-cursor-pointer",
|
|
42
|
-
closeIconClasses
|
|
43
|
-
]);
|
|
44
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
45
|
-
className: containerClasses,
|
|
46
|
-
"data-testid": dataTestId,
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ jsx("div", {
|
|
49
|
-
className: "spiffy-tw-absolute spiffy-tw-left-3 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2",
|
|
50
|
-
children: /* @__PURE__ */ jsx(MagnifyingGlassStarVariant, {
|
|
51
|
-
className: value.length > 0 ? magnifyingGlassClassesActive : magnifyingGlassClassesInactive,
|
|
52
|
-
stroke: iconColor,
|
|
53
|
-
strokeWidth: "1px"
|
|
54
|
-
})
|
|
55
|
-
}),
|
|
56
|
-
/* @__PURE__ */ jsx(TextInput, {
|
|
57
|
-
value,
|
|
58
|
-
onChange: (event) => onChange(event.target.value),
|
|
59
|
-
onFocus,
|
|
60
|
-
onBlur,
|
|
61
|
-
onKeyDown,
|
|
62
|
-
placeholder,
|
|
63
|
-
className: inputClasses,
|
|
64
|
-
placeholderVariant,
|
|
65
|
-
"aria-label": "Search",
|
|
66
|
-
"aria-autocomplete": "list",
|
|
67
|
-
"aria-expanded": !!suggestions && suggestions.length > 0,
|
|
68
|
-
"aria-controls": "autocomplete-results",
|
|
69
|
-
"aria-activedescendant": ariaActivedescendant,
|
|
70
|
-
borderRadius: "xl",
|
|
71
|
-
borderColorClass: borderColor,
|
|
72
|
-
ref: localInputRef
|
|
73
|
-
}),
|
|
74
|
-
value && /* @__PURE__ */ jsx("button", {
|
|
75
|
-
onClick: () => {
|
|
76
|
-
onChange("");
|
|
77
|
-
localInputRef.current?.focus();
|
|
78
|
-
},
|
|
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",
|
|
80
|
-
"aria-label": "Clear search input",
|
|
81
|
-
type: "button",
|
|
82
|
-
children: /* @__PURE__ */ jsx(IconClose, { className: closeButtonIconClassName })
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
//#endregion
|
|
89
|
-
export { SearchInput, searchInputVariantClasses };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_TextInput = require('./TextInput-CnXhppYn.cjs');
|
|
3
|
-
const require_colorsConfig = require('./colorsConfig-DFL3mBwB.cjs');
|
|
4
|
-
let react = require("react");
|
|
5
|
-
react = require_chunk.__toESM(react);
|
|
6
|
-
let classnames = require("classnames");
|
|
7
|
-
classnames = require_chunk.__toESM(classnames);
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
10
|
-
let __envive_ai_react_icons_MagnifyingGlassStarVariant = require("@envive-ai/react-icons/MagnifyingGlassStarVariant");
|
|
11
|
-
__envive_ai_react_icons_MagnifyingGlassStarVariant = require_chunk.__toESM(__envive_ai_react_icons_MagnifyingGlassStarVariant);
|
|
12
|
-
let __envive_ai_react_icons_src_index_js = require("@envive-ai/react-icons/src/index.js");
|
|
13
|
-
__envive_ai_react_icons_src_index_js = require_chunk.__toESM(__envive_ai_react_icons_src_index_js);
|
|
14
|
-
|
|
15
|
-
//#region src/components/SearchInput/searchInputVariants.ts
|
|
16
|
-
const searchInputVariantClasses = { standard: {
|
|
17
|
-
searchInputIconColor: "transparent",
|
|
18
|
-
searchInputBorderColor: "spiffy-tw-border-[--spiffy-colors-border-medium]",
|
|
19
|
-
searchInputCloseIconClasses: "[&>circle]:spiffy-tw-fill-[--spiffy-colors-text-secondary] [&>path]:spiffy-tw-fill-[#fff]",
|
|
20
|
-
searchInputActiveStarClasses: `first:[&>path]:spiffy-tw-stroke-[--spiffy-colors-accent-primary] first:[&>path]:spiffy-tw-fill-[--spiffy-colors-accent-primary]`,
|
|
21
|
-
autocompleteIconColor: require_colorsConfig.colorVar(require_colorsConfig.ColorNames.BackgroundPrimary),
|
|
22
|
-
searchInputClasses: "spiffy-tw-text-[--spiffy-colors-text-primary] placeholder:spiffy-tw-text-[--spiffy-colors-text-secondary] spiffy-tw-text-[16px] spiffy-tw-font-normal spiffy-tw-leading-[148%] placeholder:spiffy-tw-font-medium placeholder:spiffy-tw-leading-[124%]",
|
|
23
|
-
placeholderVariant: "h2"
|
|
24
|
-
} };
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/components/SearchInput/SearchInput.tsx
|
|
28
|
-
const SearchInput = react.default.forwardRef(({ searchInputVariant = "standard", value, placeholder, suggestions, className, dataTestId, ariaActivedescendant, onKeyDown, onChange, onFocus, onBlur }, ref) => {
|
|
29
|
-
const localInputRef = (0, react.useRef)(null);
|
|
30
|
-
const { searchInputClasses: inputClassName, searchInputIconColor: iconColor, searchInputBorderColor: borderColor, searchInputCloseIconClasses: closeIconClasses, searchInputActiveStarClasses, placeholderVariant } = searchInputVariantClasses[searchInputVariant];
|
|
31
|
-
(0, react.useImperativeHandle)(ref, () => localInputRef.current, []);
|
|
32
|
-
const magnifyingGlassClassesBase = [
|
|
33
|
-
"spiffy-tw-w-[24px]",
|
|
34
|
-
"spiffy-tw-h-[32px]",
|
|
35
|
-
"spiffy-tw-stroke-width-1",
|
|
36
|
-
"sm:spiffy-tw-w-[32px]"
|
|
37
|
-
];
|
|
38
|
-
const magnifyingGlassClassesInactive = (0, classnames.default)(magnifyingGlassClassesBase);
|
|
39
|
-
const magnifyingGlassClassesActive = (0, classnames.default)([...magnifyingGlassClassesBase, searchInputActiveStarClasses]);
|
|
40
|
-
const containerClasses = (0, classnames.default)("spiffy-global-search-input-container", "spiffy-tw-relative spiffy-tw-flex spiffy-tw-items-center", className);
|
|
41
|
-
const inputClasses = (0, classnames.default)("spiffy-global-search-input", "spiffy-tw-flex-grow spiffy-tw-p-2 spiffy-tw-px-[42px] sm:spiffy-tw-p-3 sm:spiffy-tw-px-[48px]", "spiffy-tw-border", "spiffy-tw-text-base", inputClassName);
|
|
42
|
-
const closeButtonIconClassName = (0, classnames.default)([
|
|
43
|
-
"spiffy-tw-w-[16px]",
|
|
44
|
-
"spiffy-tw-h-[16px]",
|
|
45
|
-
"sm:spiffy-tw-w-[24px]",
|
|
46
|
-
"sm:spiffy-tw-h-[24px]",
|
|
47
|
-
"spiffy-tw-cursor-pointer",
|
|
48
|
-
closeIconClasses
|
|
49
|
-
]);
|
|
50
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
51
|
-
className: containerClasses,
|
|
52
|
-
"data-testid": dataTestId,
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
55
|
-
className: "spiffy-tw-absolute spiffy-tw-left-3 spiffy-tw-top-1/2 spiffy-tw--translate-y-1/2",
|
|
56
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_MagnifyingGlassStarVariant.default, {
|
|
57
|
-
className: value.length > 0 ? magnifyingGlassClassesActive : magnifyingGlassClassesInactive,
|
|
58
|
-
stroke: iconColor,
|
|
59
|
-
strokeWidth: "1px"
|
|
60
|
-
})
|
|
61
|
-
}),
|
|
62
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextInput.TextInput, {
|
|
63
|
-
value,
|
|
64
|
-
onChange: (event) => onChange(event.target.value),
|
|
65
|
-
onFocus,
|
|
66
|
-
onBlur,
|
|
67
|
-
onKeyDown,
|
|
68
|
-
placeholder,
|
|
69
|
-
className: inputClasses,
|
|
70
|
-
placeholderVariant,
|
|
71
|
-
"aria-label": "Search",
|
|
72
|
-
"aria-autocomplete": "list",
|
|
73
|
-
"aria-expanded": !!suggestions && suggestions.length > 0,
|
|
74
|
-
"aria-controls": "autocomplete-results",
|
|
75
|
-
"aria-activedescendant": ariaActivedescendant,
|
|
76
|
-
borderRadius: "xl",
|
|
77
|
-
borderColorClass: borderColor,
|
|
78
|
-
ref: localInputRef
|
|
79
|
-
}),
|
|
80
|
-
value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
81
|
-
onClick: () => {
|
|
82
|
-
onChange("");
|
|
83
|
-
localInputRef.current?.focus();
|
|
84
|
-
},
|
|
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",
|
|
86
|
-
"aria-label": "Clear search input",
|
|
87
|
-
type: "button",
|
|
88
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_src_index_js.IconClose, { className: closeButtonIconClassName })
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
//#endregion
|
|
95
|
-
Object.defineProperty(exports, 'SearchInput', {
|
|
96
|
-
enumerable: true,
|
|
97
|
-
get: function () {
|
|
98
|
-
return SearchInput;
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
Object.defineProperty(exports, 'searchInputVariantClasses', {
|
|
102
|
-
enumerable: true,
|
|
103
|
-
get: function () {
|
|
104
|
-
return searchInputVariantClasses;
|
|
105
|
-
}
|
|
106
|
-
});
|