@envive-ai/react-toolkit 0.2.0 → 0.2.1
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/package.json +10 -13
- package/src/components/Accordion/Accordion.tsx +3 -3
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/ButtonBase/ButtonBase.tsx +2 -2
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +2 -2
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/FilterScrollbar/DynamicFiltersScrollbar.tsx +2 -2
- package/src/components/ProductCard/ProductCard.tsx +10 -9
- package/src/components/RadioButton/RadioButton.tsx +2 -2
- package/src/components/SearchFilter/SearchFilterHeader.tsx +3 -3
- package/src/components/SearchFilter/SearchFilterItem.tsx +2 -2
- package/src/components/SearchInput/searchInputVariants.ts +2 -2
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +3 -3
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +2 -2
- package/src/components/TextInput/TextInput.tsx +4 -3
- package/src/components/ToggleButton/ToggleButton.tsx +5 -5
- package/src/components/Typography/Typography.spec.tsx +22 -0
- package/src/components/Typography/Typography.tsx +73 -0
- package/src/components/Typography/index.ts +2 -0
- package/src/components/{Text/textVariantClasses.ts → Typography/typographyVariantClasses.ts} +36 -38
- package/src/components/Typography/util.ts +19 -0
- package/dist/Accordion/index.cjs +0 -6
- package/dist/Accordion/index.d.cts +0 -13
- package/dist/Accordion/index.d.ts +0 -13
- package/dist/Accordion/index.js +0 -6
- package/dist/Accordion-D9gO9_y3.cjs +0 -88
- package/dist/Accordion-ZEdp99Ph.js +0 -77
- package/dist/AnimatedChevron/index.cjs +0 -3
- package/dist/AnimatedChevron/index.d.cts +0 -11
- package/dist/AnimatedChevron/index.d.ts +0 -11
- package/dist/AnimatedChevron/index.js +0 -3
- package/dist/AnimatedChevron-CwuXgR2r.js +0 -29
- package/dist/AnimatedChevron-e_UzWBl0.cjs +0 -37
- package/dist/AppliedFiltersScrollbar/index.cjs +0 -48
- package/dist/AppliedFiltersScrollbar/index.d.cts +0 -22
- package/dist/AppliedFiltersScrollbar/index.d.ts +0 -22
- package/dist/AppliedFiltersScrollbar/index.js +0 -44
- package/dist/ButtonBase/index.cjs +0 -7
- package/dist/ButtonBase/index.d.cts +0 -42
- package/dist/ButtonBase/index.d.ts +0 -42
- package/dist/ButtonBase/index.js +0 -6
- package/dist/ButtonBase-BJ0qXMWD.js +0 -60
- package/dist/ButtonBase-BktteD9c.js +0 -1
- package/dist/ButtonBase-Cb6Iec6f.cjs +0 -0
- package/dist/ButtonBase-VIv-tn7H.cjs +0 -75
- package/dist/DynamicFiltersScrollbar/index.cjs +0 -36
- package/dist/DynamicFiltersScrollbar/index.d.cts +0 -28
- package/dist/DynamicFiltersScrollbar/index.d.ts +0 -28
- package/dist/DynamicFiltersScrollbar/index.js +0 -32
- package/dist/DynamicFiltersScrollbar-HCYZjI14.cjs +0 -81
- package/dist/DynamicFiltersScrollbar-O0ai3cIG.js +0 -66
- package/dist/FilterScrollbar/index.cjs +0 -6
- package/dist/FilterScrollbar/index.d.cts +0 -47
- package/dist/FilterScrollbar/index.d.ts +0 -47
- package/dist/FilterScrollbar/index.js +0 -5
- package/dist/Headline/index.cjs +0 -4
- package/dist/Headline/index.d.cts +0 -21
- package/dist/Headline/index.d.ts +0 -21
- package/dist/Headline/index.js +0 -4
- package/dist/Headline-CKJmd2w4.cjs +0 -72
- package/dist/Headline-DtjTB4xS.js +0 -64
- package/dist/ImageWithFallback/index.cjs +0 -3
- package/dist/ImageWithFallback/index.d.cts +0 -26
- package/dist/ImageWithFallback/index.d.ts +0 -26
- package/dist/ImageWithFallback/index.js +0 -3
- package/dist/ImageWithFallback-CbYsD1_a.js +0 -42
- package/dist/ImageWithFallback-Km9h16Vz.cjs +0 -51
- package/dist/ModalSheet/index.cjs +0 -4
- package/dist/ModalSheet/index.d.cts +0 -38
- package/dist/ModalSheet/index.d.ts +0 -38
- package/dist/ModalSheet/index.js +0 -4
- package/dist/ModalSheet-DwnbbFh7.cjs +0 -313
- package/dist/ModalSheet-sMg44OLz.js +0 -302
- package/dist/ProductCard/index.cjs +0 -17
- package/dist/ProductCard/index.d.cts +0 -2
- package/dist/ProductCard/index.d.ts +0 -2
- package/dist/ProductCard/index.js +0 -8
- package/dist/ProductCard-BDz80MCQ.cjs +0 -319
- package/dist/ProductCard-CqhNJShq.js +0 -255
- package/dist/ProductGrid/index.cjs +0 -10
- package/dist/ProductGrid/index.d.cts +0 -33
- package/dist/ProductGrid/index.d.ts +0 -33
- package/dist/ProductGrid/index.js +0 -9
- package/dist/ProductGrid-8n4XgcMr.js +0 -60
- package/dist/ProductGrid-RRcdkY5J.cjs +0 -74
- package/dist/RadioButton/index.cjs +0 -6
- package/dist/RadioButton/index.d.cts +0 -32
- package/dist/RadioButton/index.d.ts +0 -32
- package/dist/RadioButton/index.js +0 -6
- package/dist/RadioButton-BWnaUI8o.cjs +0 -84
- package/dist/RadioButton-CG8_M0hY.js +0 -75
- package/dist/RadioButtonGroup/index.cjs +0 -8
- package/dist/RadioButtonGroup/index.d.cts +0 -36
- package/dist/RadioButtonGroup/index.d.ts +0 -36
- package/dist/RadioButtonGroup/index.js +0 -7
- package/dist/RadioButtonGroup-B7EuiEP1.js +0 -38
- package/dist/RadioButtonGroup-ReQqakpS.cjs +0 -52
- package/dist/SearchAutocomplete/index.cjs +0 -3
- package/dist/SearchAutocomplete/index.d.cts +0 -13
- package/dist/SearchAutocomplete/index.d.ts +0 -13
- package/dist/SearchAutocomplete/index.js +0 -3
- package/dist/SearchAutocomplete-BMNYZiJL.js +0 -51
- package/dist/SearchAutocomplete-BmHdijOv.cjs +0 -62
- package/dist/SearchFilter/index.cjs +0 -19
- package/dist/SearchFilter/index.d.cts +0 -91
- package/dist/SearchFilter/index.d.ts +0 -91
- package/dist/SearchFilter/index.js +0 -14
- package/dist/SearchFilter-C8mgj84o.js +0 -268
- package/dist/SearchFilter-FrdHPM5O.cjs +0 -307
- package/dist/SearchInput/index.cjs +0 -7
- package/dist/SearchInput/index.d.cts +0 -34
- package/dist/SearchInput/index.d.ts +0 -34
- package/dist/SearchInput/index.js +0 -6
- package/dist/SearchInput--x9NTMTb.cjs +0 -106
- package/dist/SearchInput-IBq83nqF.js +0 -89
- package/dist/SearchInputForm/index.cjs +0 -39
- package/dist/SearchInputForm/index.d.cts +0 -34
- package/dist/SearchInputForm/index.d.ts +0 -34
- package/dist/SearchInputForm/index.js +0 -37
- package/dist/SearchResultsContent/index.cjs +0 -47
- package/dist/SearchResultsContent/index.d.cts +0 -48
- package/dist/SearchResultsContent/index.d.ts +0 -48
- package/dist/SearchResultsContent/index.js +0 -44
- package/dist/SearchResultsFilterSidebar/index.cjs +0 -62
- package/dist/SearchResultsFilterSidebar/index.d.cts +0 -2
- package/dist/SearchResultsFilterSidebar/index.d.ts +0 -2
- package/dist/SearchResultsFilterSidebar/index.js +0 -57
- package/dist/SearchResultsStates/index.cjs +0 -17
- package/dist/SearchResultsStates/index.d.cts +0 -69
- package/dist/SearchResultsStates/index.d.ts +0 -69
- package/dist/SearchResultsStates/index.js +0 -15
- package/dist/SearchResultsStates-D7dM35qq.js +0 -110
- package/dist/SearchResultsStates-nlaPbkj3.cjs +0 -132
- package/dist/SparkleAnimation/index.cjs +0 -4
- package/dist/SparkleAnimation/index.d.cts +0 -23
- package/dist/SparkleAnimation/index.d.ts +0 -23
- package/dist/SparkleAnimation/index.js +0 -3
- package/dist/SparkleAnimation-D1aZE-7A.cjs +0 -101
- package/dist/SparkleAnimation-DtWkXmkN.js +0 -84
- package/dist/Spinner/index.cjs +0 -3
- package/dist/Spinner/index.d.cts +0 -11
- package/dist/Spinner/index.d.ts +0 -11
- package/dist/Spinner/index.js +0 -3
- package/dist/Spinner-bg6jb_ks.js +0 -38
- package/dist/Spinner-rcWX566W.cjs +0 -46
- package/dist/SuggestionButton/index.cjs +0 -188
- package/dist/SuggestionButton/index.d.cts +0 -35
- package/dist/SuggestionButton/index.d.ts +0 -35
- package/dist/SuggestionButton/index.js +0 -180
- package/dist/Text/index.cjs +0 -10
- package/dist/Text/index.d.cts +0 -42
- package/dist/Text/index.d.ts +0 -42
- package/dist/Text/index.js +0 -5
- package/dist/Text-BLzNhX4H.js +0 -42
- package/dist/Text-BMsncrpY.js +0 -10
- package/dist/Text-C8t_iEj6.cjs +0 -16
- package/dist/Text-DllCE9_D.cjs +0 -50
- package/dist/TextInput/index.cjs +0 -4
- package/dist/TextInput/index.d.cts +0 -12
- package/dist/TextInput/index.d.ts +0 -12
- package/dist/TextInput/index.js +0 -4
- package/dist/TextInput-BeHPlVHT.js +0 -31
- package/dist/TextInput-CGs4BY1q.cjs +0 -40
- package/dist/ToggleButton/index.cjs +0 -6
- package/dist/ToggleButton/index.d.cts +0 -30
- package/dist/ToggleButton/index.d.ts +0 -30
- package/dist/ToggleButton/index.js +0 -6
- package/dist/ToggleButton-CRiPqTCb.js +0 -60
- package/dist/ToggleButton-DfJZ8POQ.cjs +0 -68
- package/dist/chunk-CUT6urMc.cjs +0 -30
- package/dist/colorsConfig-Ck2jeqWe.js +0 -26
- package/dist/colorsConfig-CqCKftuM.cjs +0 -38
- package/dist/index-B9WeFNlO.d.cts +0 -325
- package/dist/index-CLGe_Pam.d.cts +0 -46
- package/dist/index-CeECGrFM.d.ts +0 -325
- package/dist/index-PSzeHU2s.d.ts +0 -46
- package/dist/searchFilterSidebarVariants-B05f5SD5.js +0 -34
- package/dist/searchFilterSidebarVariants-NQhqq-NT.cjs +0 -39
- package/dist/textVariantClasses-B0gNjzl4.d.cts +0 -174
- package/dist/textVariantClasses-Bl8SAGwZ.d.ts +0 -174
- package/dist/textVariantClasses-CBre7vXv.cjs +0 -123
- package/dist/textVariantClasses-CRrTb43V.js +0 -99
- package/dist/types-BhGjnuWx.d.cts +0 -4
- package/dist/types-CTOdb0G0.d.ts +0 -4
- package/src/components/Headline/Headline.tsx +0 -81
- package/src/components/Headline/index.ts +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -3
- package/src/components/Text/types.ts +0 -23
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
require('../textVariantClasses-CBre7vXv.cjs');
|
|
2
|
-
require('../Text-DllCE9_D.cjs');
|
|
3
|
-
require('../Text-C8t_iEj6.cjs');
|
|
4
|
-
require('../DynamicFiltersScrollbar-HCYZjI14.cjs');
|
|
5
|
-
require('../Headline-CKJmd2w4.cjs');
|
|
6
|
-
require('../ImageWithFallback-Km9h16Vz.cjs');
|
|
7
|
-
require('../ProductCard-BDz80MCQ.cjs');
|
|
8
|
-
require('../Spinner-rcWX566W.cjs');
|
|
9
|
-
require('../ProductGrid-RRcdkY5J.cjs');
|
|
10
|
-
require('../colorsConfig-CqCKftuM.cjs');
|
|
11
|
-
const require_SearchResultsStates = require('../SearchResultsStates-nlaPbkj3.cjs');
|
|
12
|
-
require('../searchFilterSidebarVariants-NQhqq-NT.cjs');
|
|
13
|
-
require('../SparkleAnimation-D1aZE-7A.cjs');
|
|
14
|
-
|
|
15
|
-
exports.NoSearchResultsFound = require_SearchResultsStates.NoSearchResultsFound;
|
|
16
|
-
exports.SearchResultsGrid = require_SearchResultsStates.SearchResultsGrid;
|
|
17
|
-
exports.SearchResultsLoadingGrid = require_SearchResultsStates.SearchResultsLoadingGrid;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant } from "../index-B9WeFNlO.cjs";
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-CLGe_Pam.cjs";
|
|
3
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
4
|
-
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
|
-
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
6
|
-
|
|
7
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.d.ts
|
|
8
|
-
interface NoSearchResultsFoundProps {
|
|
9
|
-
containerPaddingClasses: string;
|
|
10
|
-
includeBottomMargin?: boolean;
|
|
11
|
-
noResultsFoundText?: string;
|
|
12
|
-
sparkleIconColor?: string;
|
|
13
|
-
}
|
|
14
|
-
declare const NoSearchResultsFound: ({
|
|
15
|
-
containerPaddingClasses,
|
|
16
|
-
includeBottomMargin,
|
|
17
|
-
noResultsFoundText,
|
|
18
|
-
sparkleIconColor
|
|
19
|
-
}: NoSearchResultsFoundProps) => react_jsx_runtime3.JSX.Element;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.d.ts
|
|
22
|
-
interface SearchResultsGridProps {
|
|
23
|
-
productList: SearchResponseProduct[];
|
|
24
|
-
productCardConfig: ProductCardConfig;
|
|
25
|
-
merchantShortName: string;
|
|
26
|
-
availableDynamicFilters: {
|
|
27
|
-
name: string;
|
|
28
|
-
displayName: string;
|
|
29
|
-
}[];
|
|
30
|
-
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
31
|
-
productGridVariant: ProductGridVariant;
|
|
32
|
-
selectedFilterOptions: SelectedFilterOption[];
|
|
33
|
-
containerXPaddingClasses: string;
|
|
34
|
-
productGridClasses: string;
|
|
35
|
-
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
36
|
-
onToggleDynamicFilter: ({
|
|
37
|
-
filter,
|
|
38
|
-
dynamicFilterDisplayName
|
|
39
|
-
}: {
|
|
40
|
-
filter: string;
|
|
41
|
-
dynamicFilterDisplayName: string;
|
|
42
|
-
}) => void;
|
|
43
|
-
}
|
|
44
|
-
declare const SearchResultsGrid: ({
|
|
45
|
-
productList,
|
|
46
|
-
productCardConfig,
|
|
47
|
-
merchantShortName,
|
|
48
|
-
availableDynamicFilters,
|
|
49
|
-
searchFilterSidebarVariant,
|
|
50
|
-
productGridVariant,
|
|
51
|
-
selectedFilterOptions,
|
|
52
|
-
containerXPaddingClasses,
|
|
53
|
-
productGridClasses,
|
|
54
|
-
onRemoveFilter,
|
|
55
|
-
onToggleDynamicFilter
|
|
56
|
-
}: SearchResultsGridProps) => react_jsx_runtime3.JSX.Element;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts
|
|
59
|
-
declare const SearchResultsLoadingGrid: ({
|
|
60
|
-
productGridVariant,
|
|
61
|
-
productGridClasses,
|
|
62
|
-
sparkleIconColor
|
|
63
|
-
}: {
|
|
64
|
-
productGridVariant: ProductGridVariant;
|
|
65
|
-
productGridClasses: string;
|
|
66
|
-
sparkleIconColor?: string;
|
|
67
|
-
}) => react_jsx_runtime3.JSX.Element;
|
|
68
|
-
//#endregion
|
|
69
|
-
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ProductCardConfig, ProductGridVariant } from "../index-CeECGrFM.js";
|
|
2
|
-
import { SearchFilterSidebarVariant } from "../index-PSzeHU2s.js";
|
|
3
|
-
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
4
|
-
import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
|
|
5
|
-
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
6
|
-
|
|
7
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.d.ts
|
|
8
|
-
interface NoSearchResultsFoundProps {
|
|
9
|
-
containerPaddingClasses: string;
|
|
10
|
-
includeBottomMargin?: boolean;
|
|
11
|
-
noResultsFoundText?: string;
|
|
12
|
-
sparkleIconColor?: string;
|
|
13
|
-
}
|
|
14
|
-
declare const NoSearchResultsFound: ({
|
|
15
|
-
containerPaddingClasses,
|
|
16
|
-
includeBottomMargin,
|
|
17
|
-
noResultsFoundText,
|
|
18
|
-
sparkleIconColor
|
|
19
|
-
}: NoSearchResultsFoundProps) => react_jsx_runtime18.JSX.Element;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.d.ts
|
|
22
|
-
interface SearchResultsGridProps {
|
|
23
|
-
productList: SearchResponseProduct[];
|
|
24
|
-
productCardConfig: ProductCardConfig;
|
|
25
|
-
merchantShortName: string;
|
|
26
|
-
availableDynamicFilters: {
|
|
27
|
-
name: string;
|
|
28
|
-
displayName: string;
|
|
29
|
-
}[];
|
|
30
|
-
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
31
|
-
productGridVariant: ProductGridVariant;
|
|
32
|
-
selectedFilterOptions: SelectedFilterOption[];
|
|
33
|
-
containerXPaddingClasses: string;
|
|
34
|
-
productGridClasses: string;
|
|
35
|
-
onRemoveFilter: (filter: SelectedFilterOption) => void;
|
|
36
|
-
onToggleDynamicFilter: ({
|
|
37
|
-
filter,
|
|
38
|
-
dynamicFilterDisplayName
|
|
39
|
-
}: {
|
|
40
|
-
filter: string;
|
|
41
|
-
dynamicFilterDisplayName: string;
|
|
42
|
-
}) => void;
|
|
43
|
-
}
|
|
44
|
-
declare const SearchResultsGrid: ({
|
|
45
|
-
productList,
|
|
46
|
-
productCardConfig,
|
|
47
|
-
merchantShortName,
|
|
48
|
-
availableDynamicFilters,
|
|
49
|
-
searchFilterSidebarVariant,
|
|
50
|
-
productGridVariant,
|
|
51
|
-
selectedFilterOptions,
|
|
52
|
-
containerXPaddingClasses,
|
|
53
|
-
productGridClasses,
|
|
54
|
-
onRemoveFilter,
|
|
55
|
-
onToggleDynamicFilter
|
|
56
|
-
}: SearchResultsGridProps) => react_jsx_runtime18.JSX.Element;
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts
|
|
59
|
-
declare const SearchResultsLoadingGrid: ({
|
|
60
|
-
productGridVariant,
|
|
61
|
-
productGridClasses,
|
|
62
|
-
sparkleIconColor
|
|
63
|
-
}: {
|
|
64
|
-
productGridVariant: ProductGridVariant;
|
|
65
|
-
productGridClasses: string;
|
|
66
|
-
sparkleIconColor?: string;
|
|
67
|
-
}) => react_jsx_runtime18.JSX.Element;
|
|
68
|
-
//#endregion
|
|
69
|
-
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "../textVariantClasses-CRrTb43V.js";
|
|
2
|
-
import "../Text-BLzNhX4H.js";
|
|
3
|
-
import "../Text-BMsncrpY.js";
|
|
4
|
-
import "../DynamicFiltersScrollbar-O0ai3cIG.js";
|
|
5
|
-
import "../Headline-DtjTB4xS.js";
|
|
6
|
-
import "../ImageWithFallback-CbYsD1_a.js";
|
|
7
|
-
import "../ProductCard-CqhNJShq.js";
|
|
8
|
-
import "../Spinner-bg6jb_ks.js";
|
|
9
|
-
import "../ProductGrid-8n4XgcMr.js";
|
|
10
|
-
import "../colorsConfig-Ck2jeqWe.js";
|
|
11
|
-
import { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid } from "../SearchResultsStates-D7dM35qq.js";
|
|
12
|
-
import "../searchFilterSidebarVariants-B05f5SD5.js";
|
|
13
|
-
import "../SparkleAnimation-DtWkXmkN.js";
|
|
14
|
-
|
|
15
|
-
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Text } from "./Text-BLzNhX4H.js";
|
|
2
|
-
import { AppliedFiltersScrollbar, DynamicFiltersScrollbar } from "./DynamicFiltersScrollbar-O0ai3cIG.js";
|
|
3
|
-
import { ProductCardSkeleton } from "./ProductCard-CqhNJShq.js";
|
|
4
|
-
import { ProductGrid, productGridVariantClasses } from "./ProductGrid-8n4XgcMr.js";
|
|
5
|
-
import { searchFilterSidebarVariantClasses } from "./searchFilterSidebarVariants-B05f5SD5.js";
|
|
6
|
-
import { SparkleAnimation } from "./SparkleAnimation-DtWkXmkN.js";
|
|
7
|
-
import { motion } from "framer-motion";
|
|
8
|
-
import classNames from "classnames";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import Sparkles from "@envive-ai/react-icons/Sparkles";
|
|
11
|
-
|
|
12
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.tsx
|
|
13
|
-
const NoSearchResultsFound = ({ containerPaddingClasses, includeBottomMargin = false, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
14
|
-
const containerClasses = classNames(containerPaddingClasses, includeBottomMargin ? "spiffy-tw-mb-[100vh]" : "", "spiffy-tw-mt-6");
|
|
15
|
-
return /* @__PURE__ */ jsx("div", {
|
|
16
|
-
className: containerClasses,
|
|
17
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
18
|
-
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
19
|
-
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Sparkles, {
|
|
20
|
-
className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]",
|
|
21
|
-
style: { color: sparkleIconColor }
|
|
22
|
-
}) }), /* @__PURE__ */ jsx(Text, {
|
|
23
|
-
variant: "body2",
|
|
24
|
-
children: noResultsFoundText || "I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query."
|
|
25
|
-
})]
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.tsx
|
|
32
|
-
const SearchResultsGrid = ({ productList, productCardConfig, merchantShortName, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter }) => {
|
|
33
|
-
const sharedFilterBarClasses = classNames("spiffy-suggestion-bar", "spiffy-tw-no-scrollbar", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-gap-2", "spiffy-tw-mb-[16px]", "spiffy-tw-overflow-x-scroll", containerXPaddingClasses);
|
|
34
|
-
const filterBarClasses = classNames(sharedFilterBarClasses, "spiffy-tw-mt-[24px]");
|
|
35
|
-
const appliedFilterBarClasses = classNames(sharedFilterBarClasses, "spiffy-tw-mb-[32px]", "spiffy-tw-mt-[8px]");
|
|
36
|
-
const { filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses } = searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
37
|
-
return /* @__PURE__ */ jsxs(motion.div, {
|
|
38
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
39
|
-
initial: { opacity: 0 },
|
|
40
|
-
animate: { opacity: 1 },
|
|
41
|
-
exit: { opacity: 0 },
|
|
42
|
-
transition: { duration: .2 },
|
|
43
|
-
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(AppliedFiltersScrollbar, {
|
|
45
|
-
selectedFilterOptions,
|
|
46
|
-
filterBarClassNames: appliedFilterBarClasses,
|
|
47
|
-
filterDefaultClasses,
|
|
48
|
-
filterHoverClasses,
|
|
49
|
-
appliedFilterBackgroundClasses,
|
|
50
|
-
onRemoveFilter
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ jsx(DynamicFiltersScrollbar, {
|
|
53
|
-
availableDynamicFilters,
|
|
54
|
-
filterBarClassNames: filterBarClasses,
|
|
55
|
-
filterDefaultClasses,
|
|
56
|
-
filterHoverClasses,
|
|
57
|
-
onToggleDynamicFilter
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ jsx(ProductGrid, {
|
|
60
|
-
productList,
|
|
61
|
-
productGridVariant,
|
|
62
|
-
productGridClasses,
|
|
63
|
-
productCardConfig,
|
|
64
|
-
merchantShortName
|
|
65
|
-
})
|
|
66
|
-
]
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx
|
|
72
|
-
const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
73
|
-
const { productCardLayoutVariant, productCardImageAspectRatio } = productGridVariantClasses[productGridVariant];
|
|
74
|
-
return /* @__PURE__ */ jsx(motion.div, {
|
|
75
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
76
|
-
initial: { opacity: 0 },
|
|
77
|
-
animate: { opacity: 1 },
|
|
78
|
-
exit: { opacity: 0 },
|
|
79
|
-
transition: { duration: .2 },
|
|
80
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
81
|
-
className: "spiffy-tw-mt-6 spiffy-tw-w-full",
|
|
82
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
83
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-mb-4",
|
|
84
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
85
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 spiffy-tw-ml-[16px] md:spiffy-tw-ml-[80px]",
|
|
86
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
87
|
-
className: "spiffy-tw-width-[24px]",
|
|
88
|
-
children: /* @__PURE__ */ jsx(SparkleAnimation, {
|
|
89
|
-
color: sparkleIconColor,
|
|
90
|
-
animate: true
|
|
91
|
-
})
|
|
92
|
-
}), /* @__PURE__ */ jsx(Text, {
|
|
93
|
-
variant: "body2",
|
|
94
|
-
children: "Finding the best options for you..."
|
|
95
|
-
})]
|
|
96
|
-
})
|
|
97
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
98
|
-
className: productGridClasses,
|
|
99
|
-
children: Array.from({ length: 8 }).map((_, index) => /* @__PURE__ */ jsx(ProductCardSkeleton, {
|
|
100
|
-
layoutVariant: productCardLayoutVariant,
|
|
101
|
-
aspectRatio: productCardImageAspectRatio,
|
|
102
|
-
growWithContainer: true
|
|
103
|
-
}, index))
|
|
104
|
-
})]
|
|
105
|
-
})
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
export { NoSearchResultsFound, SearchResultsGrid, SearchResultsLoadingGrid };
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_Text = require('./Text-DllCE9_D.cjs');
|
|
3
|
-
const require_DynamicFiltersScrollbar = require('./DynamicFiltersScrollbar-HCYZjI14.cjs');
|
|
4
|
-
const require_ProductCard = require('./ProductCard-BDz80MCQ.cjs');
|
|
5
|
-
const require_ProductGrid = require('./ProductGrid-RRcdkY5J.cjs');
|
|
6
|
-
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-NQhqq-NT.cjs');
|
|
7
|
-
const require_SparkleAnimation = require('./SparkleAnimation-D1aZE-7A.cjs');
|
|
8
|
-
let framer_motion = require("framer-motion");
|
|
9
|
-
framer_motion = require_chunk.__toESM(framer_motion);
|
|
10
|
-
let classnames = require("classnames");
|
|
11
|
-
classnames = require_chunk.__toESM(classnames);
|
|
12
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
|
-
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
14
|
-
let __envive_ai_react_icons_Sparkles = require("@envive-ai/react-icons/Sparkles");
|
|
15
|
-
__envive_ai_react_icons_Sparkles = require_chunk.__toESM(__envive_ai_react_icons_Sparkles);
|
|
16
|
-
|
|
17
|
-
//#region src/components/SearchResultsStates/NoSearchResultsFound.tsx
|
|
18
|
-
const NoSearchResultsFound = ({ containerPaddingClasses, includeBottomMargin = false, noResultsFoundText, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
19
|
-
const containerClasses = (0, classnames.default)(containerPaddingClasses, includeBottomMargin ? "spiffy-tw-mb-[100vh]" : "", "spiffy-tw-mt-6");
|
|
20
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21
|
-
className: containerClasses,
|
|
22
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
23
|
-
className: "spiffy-tw-flex spiffy-tw-items-start spiffy-tw-gap-2",
|
|
24
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_Sparkles.default, {
|
|
25
|
-
className: "spiffy-tw-w-[24px] spiffy-tw-h-[24px]",
|
|
26
|
-
style: { color: sparkleIconColor }
|
|
27
|
-
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
28
|
-
variant: "body2",
|
|
29
|
-
children: noResultsFoundText || "I’m sorry, I wasn’t able to find an exact match. Try changing your filters or adjusting your search query."
|
|
30
|
-
})]
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/components/SearchResultsStates/SearchResultsGrid.tsx
|
|
37
|
-
const SearchResultsGrid = ({ productList, productCardConfig, merchantShortName, availableDynamicFilters, searchFilterSidebarVariant, productGridVariant, selectedFilterOptions, containerXPaddingClasses, productGridClasses, onRemoveFilter, onToggleDynamicFilter }) => {
|
|
38
|
-
const sharedFilterBarClasses = (0, classnames.default)("spiffy-suggestion-bar", "spiffy-tw-no-scrollbar", "spiffy-tw-flex", "spiffy-tw-flex-row", "spiffy-tw-gap-2", "spiffy-tw-mb-[16px]", "spiffy-tw-overflow-x-scroll", containerXPaddingClasses);
|
|
39
|
-
const filterBarClasses = (0, classnames.default)(sharedFilterBarClasses, "spiffy-tw-mt-[24px]");
|
|
40
|
-
const appliedFilterBarClasses = (0, classnames.default)(sharedFilterBarClasses, "spiffy-tw-mb-[32px]", "spiffy-tw-mt-[8px]");
|
|
41
|
-
const { filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses } = require_searchFilterSidebarVariants.searchFilterSidebarVariantClasses[searchFilterSidebarVariant];
|
|
42
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(framer_motion.motion.div, {
|
|
43
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
44
|
-
initial: { opacity: 0 },
|
|
45
|
-
animate: { opacity: 1 },
|
|
46
|
-
exit: { opacity: 0 },
|
|
47
|
-
transition: { duration: .2 },
|
|
48
|
-
children: [
|
|
49
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DynamicFiltersScrollbar.AppliedFiltersScrollbar, {
|
|
50
|
-
selectedFilterOptions,
|
|
51
|
-
filterBarClassNames: appliedFilterBarClasses,
|
|
52
|
-
filterDefaultClasses,
|
|
53
|
-
filterHoverClasses,
|
|
54
|
-
appliedFilterBackgroundClasses,
|
|
55
|
-
onRemoveFilter
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DynamicFiltersScrollbar.DynamicFiltersScrollbar, {
|
|
58
|
-
availableDynamicFilters,
|
|
59
|
-
filterBarClassNames: filterBarClasses,
|
|
60
|
-
filterDefaultClasses,
|
|
61
|
-
filterHoverClasses,
|
|
62
|
-
onToggleDynamicFilter
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductGrid.ProductGrid, {
|
|
65
|
-
productList,
|
|
66
|
-
productGridVariant,
|
|
67
|
-
productGridClasses,
|
|
68
|
-
productCardConfig,
|
|
69
|
-
merchantShortName
|
|
70
|
-
})
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx
|
|
77
|
-
const SearchResultsLoadingGrid = ({ productGridVariant, productGridClasses, sparkleIconColor = "var(--spiffy-colors-accent-primary)" }) => {
|
|
78
|
-
const { productCardLayoutVariant, productCardImageAspectRatio } = require_ProductGrid.productGridVariantClasses[productGridVariant];
|
|
79
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
80
|
-
className: "spiffy-tw-justify-center spiffy-tw-w-full spiffy-tw-overflow-hidden",
|
|
81
|
-
initial: { opacity: 0 },
|
|
82
|
-
animate: { opacity: 1 },
|
|
83
|
-
exit: { opacity: 0 },
|
|
84
|
-
transition: { duration: .2 },
|
|
85
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
86
|
-
className: "spiffy-tw-mt-6 spiffy-tw-w-full",
|
|
87
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
88
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-justify-between spiffy-tw-mb-4",
|
|
89
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
90
|
-
className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-2 spiffy-tw-ml-[16px] md:spiffy-tw-ml-[80px]",
|
|
91
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
92
|
-
className: "spiffy-tw-width-[24px]",
|
|
93
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SparkleAnimation.SparkleAnimation, {
|
|
94
|
-
color: sparkleIconColor,
|
|
95
|
-
animate: true
|
|
96
|
-
})
|
|
97
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
|
|
98
|
-
variant: "body2",
|
|
99
|
-
children: "Finding the best options for you..."
|
|
100
|
-
})]
|
|
101
|
-
})
|
|
102
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
103
|
-
className: productGridClasses,
|
|
104
|
-
children: Array.from({ length: 8 }).map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductCard.ProductCardSkeleton, {
|
|
105
|
-
layoutVariant: productCardLayoutVariant,
|
|
106
|
-
aspectRatio: productCardImageAspectRatio,
|
|
107
|
-
growWithContainer: true
|
|
108
|
-
}, index))
|
|
109
|
-
})]
|
|
110
|
-
})
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
//#endregion
|
|
115
|
-
Object.defineProperty(exports, 'NoSearchResultsFound', {
|
|
116
|
-
enumerable: true,
|
|
117
|
-
get: function () {
|
|
118
|
-
return NoSearchResultsFound;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
Object.defineProperty(exports, 'SearchResultsGrid', {
|
|
122
|
-
enumerable: true,
|
|
123
|
-
get: function () {
|
|
124
|
-
return SearchResultsGrid;
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(exports, 'SearchResultsLoadingGrid', {
|
|
128
|
-
enumerable: true,
|
|
129
|
-
get: function () {
|
|
130
|
-
return SearchResultsLoadingGrid;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
|
-
interface SparkleAnimationProps {
|
|
5
|
-
color: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
animate?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const SparkleAnimation: ({
|
|
10
|
-
color,
|
|
11
|
-
className,
|
|
12
|
-
animate
|
|
13
|
-
}: SparkleAnimationProps) => react_jsx_runtime9.JSX.Element;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/components/SparkleAnimation/types.d.ts
|
|
16
|
-
declare enum SparkleAnimationOverride {
|
|
17
|
-
CONTAINER = "spiffy-sparkle-animation-container",
|
|
18
|
-
STAR_ONE_CONTAINER = "spiffy-sparkle-animation-star-one-container",
|
|
19
|
-
STAR_TWO_CONTAINER = "spiffy-sparkle-animation-star-two-container",
|
|
20
|
-
STAR_THREE_CONTAINER = "spiffy-sparkle-animation-star-three-container",
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { SparkleAnimation, SparkleAnimationOverride };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/components/SparkleAnimation/SparkleAnimation.d.ts
|
|
4
|
-
interface SparkleAnimationProps {
|
|
5
|
-
color: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
animate?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const SparkleAnimation: ({
|
|
10
|
-
color,
|
|
11
|
-
className,
|
|
12
|
-
animate
|
|
13
|
-
}: SparkleAnimationProps) => react_jsx_runtime21.JSX.Element;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/components/SparkleAnimation/types.d.ts
|
|
16
|
-
declare enum SparkleAnimationOverride {
|
|
17
|
-
CONTAINER = "spiffy-sparkle-animation-container",
|
|
18
|
-
STAR_ONE_CONTAINER = "spiffy-sparkle-animation-star-one-container",
|
|
19
|
-
STAR_TWO_CONTAINER = "spiffy-sparkle-animation-star-two-container",
|
|
20
|
-
STAR_THREE_CONTAINER = "spiffy-sparkle-animation-star-three-container",
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
|
-
export { SparkleAnimation, SparkleAnimationOverride };
|
|
@@ -1,101 +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_FourPointStar = require("@envive-ai/react-icons/FourPointStar");
|
|
11
|
-
__envive_ai_react_icons_FourPointStar = require_chunk.__toESM(__envive_ai_react_icons_FourPointStar);
|
|
12
|
-
|
|
13
|
-
//#region src/components/SparkleAnimation/types.ts
|
|
14
|
-
let SparkleAnimationOverride = /* @__PURE__ */ function(SparkleAnimationOverride$1) {
|
|
15
|
-
SparkleAnimationOverride$1["CONTAINER"] = "spiffy-sparkle-animation-container";
|
|
16
|
-
SparkleAnimationOverride$1["STAR_ONE_CONTAINER"] = "spiffy-sparkle-animation-star-one-container";
|
|
17
|
-
SparkleAnimationOverride$1["STAR_TWO_CONTAINER"] = "spiffy-sparkle-animation-star-two-container";
|
|
18
|
-
SparkleAnimationOverride$1["STAR_THREE_CONTAINER"] = "spiffy-sparkle-animation-star-three-container";
|
|
19
|
-
return SparkleAnimationOverride$1;
|
|
20
|
-
}({});
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/components/SparkleAnimation/SparkleAnimation.tsx
|
|
24
|
-
const ANIMATION_CYCLE_TIME = 1e3;
|
|
25
|
-
const STAR_DELAY_OFFSET = 250;
|
|
26
|
-
const SparkleAnimation = ({ color, className, animate = true }) => {
|
|
27
|
-
const [mainStarScale, setMainStarScale] = (0, react.useState)(animate ? 0 : 1);
|
|
28
|
-
const [smallStar1Scale, setSmallStar1Scale] = (0, react.useState)(animate ? 0 : 1);
|
|
29
|
-
const [smallStar2Scale, setSmallStar2Scale] = (0, react.useState)(animate ? 0 : 1);
|
|
30
|
-
const containerClasses = (0, classnames.default)(SparkleAnimationOverride.CONTAINER, "spiffy-tw-w-6 spiffy-tw-h-6 spiffy-tw-relative", className);
|
|
31
|
-
(0, react.useEffect)(() => {
|
|
32
|
-
if (!animate) {
|
|
33
|
-
setMainStarScale(1);
|
|
34
|
-
setSmallStar1Scale(1);
|
|
35
|
-
setSmallStar2Scale(1);
|
|
36
|
-
}
|
|
37
|
-
}, [animate]);
|
|
38
|
-
(0, react.useEffect)(() => {
|
|
39
|
-
if (!animate) return;
|
|
40
|
-
const newScale = mainStarScale === 1 ? 0 : 1;
|
|
41
|
-
setTimeout(() => setMainStarScale(newScale), ANIMATION_CYCLE_TIME);
|
|
42
|
-
setTimeout(() => setSmallStar1Scale(newScale), ANIMATION_CYCLE_TIME + STAR_DELAY_OFFSET);
|
|
43
|
-
setTimeout(() => setSmallStar2Scale(newScale), ANIMATION_CYCLE_TIME + 2 * STAR_DELAY_OFFSET);
|
|
44
|
-
}, [mainStarScale, animate]);
|
|
45
|
-
const starTransition = {
|
|
46
|
-
duration: .3,
|
|
47
|
-
ease: "easeOut"
|
|
48
|
-
};
|
|
49
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
50
|
-
className: containerClasses,
|
|
51
|
-
children: [
|
|
52
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
53
|
-
className: (0, classnames.default)(SparkleAnimationOverride.STAR_ONE_CONTAINER, "spiffy-tw-absolute -spiffy-tw-top-[2px] spiffy-tw-left-0"),
|
|
54
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
55
|
-
animate: { scale: mainStarScale },
|
|
56
|
-
transition: starTransition,
|
|
57
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_FourPointStar.default, {
|
|
58
|
-
fill: color,
|
|
59
|
-
className: "spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-inline-block"
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
}),
|
|
63
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
64
|
-
className: (0, classnames.default)(SparkleAnimationOverride.STAR_TWO_CONTAINER, "spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]"),
|
|
65
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
66
|
-
animate: { scale: smallStar1Scale },
|
|
67
|
-
transition: starTransition,
|
|
68
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_FourPointStar.default, {
|
|
69
|
-
fill: color,
|
|
70
|
-
className: "spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block"
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
75
|
-
className: (0, classnames.default)(SparkleAnimationOverride.STAR_THREE_CONTAINER, "spiffy-tw-absolute spiffy-tw-top-[1px] spiffy-tw-left-[12px]"),
|
|
76
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
|
|
77
|
-
animate: { scale: smallStar2Scale },
|
|
78
|
-
transition: starTransition,
|
|
79
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_FourPointStar.default, {
|
|
80
|
-
fill: color,
|
|
81
|
-
className: "spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block"
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
//#endregion
|
|
90
|
-
Object.defineProperty(exports, 'SparkleAnimation', {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return SparkleAnimation;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, 'SparkleAnimationOverride', {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return SparkleAnimationOverride;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { motion } from "framer-motion";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import FourPointStar from "@envive-ai/react-icons/FourPointStar";
|
|
6
|
-
|
|
7
|
-
//#region src/components/SparkleAnimation/types.ts
|
|
8
|
-
let SparkleAnimationOverride = /* @__PURE__ */ function(SparkleAnimationOverride$1) {
|
|
9
|
-
SparkleAnimationOverride$1["CONTAINER"] = "spiffy-sparkle-animation-container";
|
|
10
|
-
SparkleAnimationOverride$1["STAR_ONE_CONTAINER"] = "spiffy-sparkle-animation-star-one-container";
|
|
11
|
-
SparkleAnimationOverride$1["STAR_TWO_CONTAINER"] = "spiffy-sparkle-animation-star-two-container";
|
|
12
|
-
SparkleAnimationOverride$1["STAR_THREE_CONTAINER"] = "spiffy-sparkle-animation-star-three-container";
|
|
13
|
-
return SparkleAnimationOverride$1;
|
|
14
|
-
}({});
|
|
15
|
-
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/components/SparkleAnimation/SparkleAnimation.tsx
|
|
18
|
-
const ANIMATION_CYCLE_TIME = 1e3;
|
|
19
|
-
const STAR_DELAY_OFFSET = 250;
|
|
20
|
-
const SparkleAnimation = ({ color, className, animate = true }) => {
|
|
21
|
-
const [mainStarScale, setMainStarScale] = useState(animate ? 0 : 1);
|
|
22
|
-
const [smallStar1Scale, setSmallStar1Scale] = useState(animate ? 0 : 1);
|
|
23
|
-
const [smallStar2Scale, setSmallStar2Scale] = useState(animate ? 0 : 1);
|
|
24
|
-
const containerClasses = classNames(SparkleAnimationOverride.CONTAINER, "spiffy-tw-w-6 spiffy-tw-h-6 spiffy-tw-relative", className);
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (!animate) {
|
|
27
|
-
setMainStarScale(1);
|
|
28
|
-
setSmallStar1Scale(1);
|
|
29
|
-
setSmallStar2Scale(1);
|
|
30
|
-
}
|
|
31
|
-
}, [animate]);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (!animate) return;
|
|
34
|
-
const newScale = mainStarScale === 1 ? 0 : 1;
|
|
35
|
-
setTimeout(() => setMainStarScale(newScale), ANIMATION_CYCLE_TIME);
|
|
36
|
-
setTimeout(() => setSmallStar1Scale(newScale), ANIMATION_CYCLE_TIME + STAR_DELAY_OFFSET);
|
|
37
|
-
setTimeout(() => setSmallStar2Scale(newScale), ANIMATION_CYCLE_TIME + 2 * STAR_DELAY_OFFSET);
|
|
38
|
-
}, [mainStarScale, animate]);
|
|
39
|
-
const starTransition = {
|
|
40
|
-
duration: .3,
|
|
41
|
-
ease: "easeOut"
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
44
|
-
className: containerClasses,
|
|
45
|
-
children: [
|
|
46
|
-
/* @__PURE__ */ jsx("div", {
|
|
47
|
-
className: classNames(SparkleAnimationOverride.STAR_ONE_CONTAINER, "spiffy-tw-absolute -spiffy-tw-top-[2px] spiffy-tw-left-0"),
|
|
48
|
-
children: /* @__PURE__ */ jsx(motion.div, {
|
|
49
|
-
animate: { scale: mainStarScale },
|
|
50
|
-
transition: starTransition,
|
|
51
|
-
children: /* @__PURE__ */ jsx(FourPointStar, {
|
|
52
|
-
fill: color,
|
|
53
|
-
className: "spiffy-tw-w-4 spiffy-tw-h-4 spiffy-tw-inline-block"
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
}),
|
|
57
|
-
/* @__PURE__ */ jsx("div", {
|
|
58
|
-
className: classNames(SparkleAnimationOverride.STAR_TWO_CONTAINER, "spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]"),
|
|
59
|
-
children: /* @__PURE__ */ jsx(motion.div, {
|
|
60
|
-
animate: { scale: smallStar1Scale },
|
|
61
|
-
transition: starTransition,
|
|
62
|
-
children: /* @__PURE__ */ jsx(FourPointStar, {
|
|
63
|
-
fill: color,
|
|
64
|
-
className: "spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block"
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ jsx("div", {
|
|
69
|
-
className: classNames(SparkleAnimationOverride.STAR_THREE_CONTAINER, "spiffy-tw-absolute spiffy-tw-top-[1px] spiffy-tw-left-[12px]"),
|
|
70
|
-
children: /* @__PURE__ */ jsx(motion.div, {
|
|
71
|
-
animate: { scale: smallStar2Scale },
|
|
72
|
-
transition: starTransition,
|
|
73
|
-
children: /* @__PURE__ */ jsx(FourPointStar, {
|
|
74
|
-
fill: color,
|
|
75
|
-
className: "spiffy-tw-w-2 spiffy-tw-h-2 spiffy-tw-inline-block"
|
|
76
|
-
})
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
//#endregion
|
|
84
|
-
export { SparkleAnimation, SparkleAnimationOverride };
|
package/dist/Spinner/index.cjs
DELETED