@envive-ai/react-toolkit 0.2.2 → 0.2.4
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 +4 -0
- package/dist/Accordion/index.d.cts +13 -0
- package/dist/Accordion/index.d.ts +13 -0
- package/dist/Accordion/index.js +4 -0
- package/dist/Accordion-DxtXK__u.js +77 -0
- package/dist/Accordion-RpyCFs2a.cjs +88 -0
- package/dist/AnimatedChevron/index.cjs +3 -0
- package/dist/AnimatedChevron/index.d.cts +14 -0
- package/dist/AnimatedChevron/index.d.ts +14 -0
- package/dist/AnimatedChevron/index.js +3 -0
- package/dist/AnimatedChevron-Bik7GMSe.js +29 -0
- package/dist/AnimatedChevron-Q96FneFy.cjs +37 -0
- package/dist/AppliedFiltersScrollbar/index.cjs +46 -0
- package/dist/AppliedFiltersScrollbar/index.d.cts +22 -0
- package/dist/AppliedFiltersScrollbar/index.d.ts +22 -0
- package/dist/AppliedFiltersScrollbar/index.js +42 -0
- package/dist/ButtonBase/index.cjs +6 -0
- package/dist/ButtonBase/index.d.cts +42 -0
- package/dist/ButtonBase/index.d.ts +42 -0
- package/dist/ButtonBase/index.js +5 -0
- package/dist/ButtonBase-6wjsZ1tU.js +60 -0
- package/dist/ButtonBase-AU23oGQr.cjs +75 -0
- package/dist/ButtonBase-C_uKnl48.js +1 -0
- package/dist/ButtonBase-DbWQ25n-.cjs +0 -0
- package/dist/DynamicFiltersScrollbar/index.cjs +34 -0
- package/dist/DynamicFiltersScrollbar/index.d.cts +28 -0
- package/dist/DynamicFiltersScrollbar/index.d.ts +28 -0
- package/dist/DynamicFiltersScrollbar/index.js +30 -0
- package/dist/DynamicFiltersScrollbar-50i_InZz.cjs +81 -0
- package/dist/DynamicFiltersScrollbar-AhyHehrB.js +66 -0
- package/dist/FilterScrollbar/index.cjs +5 -0
- package/dist/FilterScrollbar/index.d.cts +47 -0
- package/dist/FilterScrollbar/index.d.ts +47 -0
- package/dist/FilterScrollbar/index.js +4 -0
- package/dist/ImageWithFallback/index.cjs +3 -0
- package/dist/ImageWithFallback/index.d.cts +26 -0
- package/dist/ImageWithFallback/index.d.ts +26 -0
- package/dist/ImageWithFallback/index.js +3 -0
- package/dist/ImageWithFallback-1LqhQK1q.cjs +51 -0
- package/dist/ImageWithFallback-Ckwsmd8P.js +42 -0
- package/dist/ModalSheet/index.cjs +4 -0
- package/dist/ModalSheet/index.d.cts +38 -0
- package/dist/ModalSheet/index.d.ts +38 -0
- package/dist/ModalSheet/index.js +4 -0
- package/dist/ModalSheet-BSj_g9JF.js +302 -0
- package/dist/ModalSheet-CcthFeMD.cjs +313 -0
- package/dist/ProductCard/index.cjs +15 -0
- package/dist/ProductCard/index.d.cts +2 -0
- package/dist/ProductCard/index.d.ts +2 -0
- package/dist/ProductCard/index.js +6 -0
- package/dist/ProductCard-BIlnM2nV.js +254 -0
- package/dist/ProductCard-CByKIsUN.cjs +318 -0
- package/dist/ProductGrid/index.cjs +8 -0
- package/dist/ProductGrid/index.d.cts +33 -0
- package/dist/ProductGrid/index.d.ts +33 -0
- package/dist/ProductGrid/index.js +7 -0
- package/dist/ProductGrid-BeFeluHo.cjs +74 -0
- package/dist/ProductGrid-Cgkb4vNf.js +60 -0
- package/dist/RadioButton/index.cjs +4 -0
- package/dist/RadioButton/index.d.cts +32 -0
- package/dist/RadioButton/index.d.ts +32 -0
- package/dist/RadioButton/index.js +4 -0
- package/dist/RadioButton-C_soBi7w.js +75 -0
- package/dist/RadioButton-DG0PgZbz.cjs +84 -0
- package/dist/RadioButtonGroup/index.cjs +6 -0
- package/dist/RadioButtonGroup/index.d.cts +36 -0
- package/dist/RadioButtonGroup/index.d.ts +36 -0
- package/dist/RadioButtonGroup/index.js +5 -0
- package/dist/RadioButtonGroup-3t2kqSFA.cjs +52 -0
- package/dist/RadioButtonGroup-DMbVgPQH.js +38 -0
- package/dist/SearchAutocomplete/index.cjs +3 -0
- package/dist/SearchAutocomplete/index.d.cts +13 -0
- package/dist/SearchAutocomplete/index.d.ts +13 -0
- package/dist/SearchAutocomplete/index.js +3 -0
- package/dist/SearchAutocomplete-TX8UTczp.cjs +62 -0
- package/dist/SearchAutocomplete-obO19yzL.js +51 -0
- package/dist/SearchFilter/index.cjs +17 -0
- package/dist/SearchFilter/index.d.cts +91 -0
- package/dist/SearchFilter/index.d.ts +91 -0
- package/dist/SearchFilter/index.js +12 -0
- package/dist/SearchFilter-BQW4o3Xf.js +268 -0
- package/dist/SearchFilter-t9or-lnj.cjs +307 -0
- package/dist/SearchInput/index.cjs +8 -0
- package/dist/SearchInput/index.d.cts +34 -0
- package/dist/SearchInput/index.d.ts +34 -0
- package/dist/SearchInput/index.js +7 -0
- package/dist/SearchInput-BaiWd0_O.js +108 -0
- package/dist/SearchInput-CO1poiit.cjs +124 -0
- package/dist/SearchInputForm/index.cjs +40 -0
- package/dist/SearchInputForm/index.d.cts +34 -0
- package/dist/SearchInputForm/index.d.ts +34 -0
- package/dist/SearchInputForm/index.js +38 -0
- package/dist/SearchResultsContent/index.cjs +44 -0
- package/dist/SearchResultsContent/index.d.cts +48 -0
- package/dist/SearchResultsContent/index.d.ts +48 -0
- package/dist/SearchResultsContent/index.js +41 -0
- package/dist/SearchResultsFilterSidebar/index.cjs +59 -0
- package/dist/SearchResultsFilterSidebar/index.d.cts +2 -0
- package/dist/SearchResultsFilterSidebar/index.d.ts +2 -0
- package/dist/SearchResultsFilterSidebar/index.js +55 -0
- package/dist/SearchResultsStates/index.cjs +14 -0
- package/dist/SearchResultsStates/index.d.cts +69 -0
- package/dist/SearchResultsStates/index.d.ts +69 -0
- package/dist/SearchResultsStates/index.js +12 -0
- package/dist/SearchResultsStates-Bv5NyxPn.cjs +132 -0
- package/dist/SearchResultsStates-DUG-117h.js +110 -0
- package/dist/SettingsVariant-BsBbdjV5.cjs +63 -0
- package/dist/SettingsVariant-CUSFlJEu.js +55 -0
- package/dist/SparkleAnimation/index.cjs +4 -0
- package/dist/SparkleAnimation/index.d.cts +23 -0
- package/dist/SparkleAnimation/index.d.ts +23 -0
- package/dist/SparkleAnimation/index.js +3 -0
- package/dist/SparkleAnimation-Bm3fk2FJ.cjs +101 -0
- package/dist/SparkleAnimation-D1QjYho_.js +84 -0
- package/dist/Spinner/index.cjs +3 -0
- package/dist/Spinner/index.d.cts +11 -0
- package/dist/Spinner/index.d.ts +11 -0
- package/dist/Spinner/index.js +3 -0
- package/dist/Spinner-BqTt55uu.js +38 -0
- package/dist/Spinner-DjK8ts9E.cjs +46 -0
- package/dist/SuggestionButton/index.cjs +187 -0
- package/dist/SuggestionButton/index.d.cts +35 -0
- package/dist/SuggestionButton/index.d.ts +35 -0
- package/dist/SuggestionButton/index.js +179 -0
- package/dist/TextInput/index.cjs +4 -0
- package/dist/TextInput/index.d.cts +13 -0
- package/dist/TextInput/index.d.ts +13 -0
- package/dist/TextInput/index.js +4 -0
- package/dist/TextInput-B_4Bu2vf.js +31 -0
- package/dist/TextInput-iAKCKHwT.cjs +40 -0
- package/dist/ToggleButton/index.cjs +4 -0
- package/dist/ToggleButton/index.d.cts +30 -0
- package/dist/ToggleButton/index.d.ts +30 -0
- package/dist/ToggleButton/index.js +4 -0
- package/dist/ToggleButton-Br6MgjiG.js +60 -0
- package/dist/ToggleButton-CJ74eu-N.cjs +68 -0
- package/dist/Typography/index.cjs +6 -0
- package/dist/Typography/index.d.cts +3 -0
- package/dist/Typography/index.d.ts +3 -0
- package/dist/Typography/index.js +3 -0
- package/dist/Typography-CFNWgbM5.cjs +176 -0
- package/dist/Typography-D3vDkBMS.js +150 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/colorsConfig-D-MZuBvt.cjs +38 -0
- package/dist/colorsConfig-DEfiLHH0.js +26 -0
- package/dist/index-B5p2z61Y.d.ts +325 -0
- package/dist/index-BH-QK27q.d.ts +31 -0
- package/dist/index-BMHF0IWd.d.cts +31 -0
- package/dist/index-BcvJf9Sr.d.ts +46 -0
- package/dist/index-DDp-fLgm.d.cts +325 -0
- package/dist/index-Dfe_lkL2.d.cts +46 -0
- package/dist/searchFilterSidebarVariants-BD4SYugF.js +34 -0
- package/dist/searchFilterSidebarVariants-DXabOauB.cjs +39 -0
- package/dist/types-BhGjnuWx.d.cts +4 -0
- package/dist/types-CGRog8XL.d.ts +4 -0
- package/dist/typographyVariantClasses-COmQXqcN.d.ts +119 -0
- package/dist/typographyVariantClasses-DTSltxPN.d.cts +119 -0
- package/package.json +3 -3
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
const require_Typography = require('./Typography-CFNWgbM5.cjs');
|
|
3
|
+
const require_DynamicFiltersScrollbar = require('./DynamicFiltersScrollbar-50i_InZz.cjs');
|
|
4
|
+
const require_ProductCard = require('./ProductCard-CByKIsUN.cjs');
|
|
5
|
+
const require_ProductGrid = require('./ProductGrid-BeFeluHo.cjs');
|
|
6
|
+
const require_searchFilterSidebarVariants = require('./searchFilterSidebarVariants-DXabOauB.cjs');
|
|
7
|
+
const require_SparkleAnimation = require('./SparkleAnimation-Bm3fk2FJ.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_Typography.Typography, {
|
|
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_Typography.Typography, {
|
|
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
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Typography } from "./Typography-D3vDkBMS.js";
|
|
2
|
+
import { AppliedFiltersScrollbar, DynamicFiltersScrollbar } from "./DynamicFiltersScrollbar-AhyHehrB.js";
|
|
3
|
+
import { ProductCardSkeleton } from "./ProductCard-BIlnM2nV.js";
|
|
4
|
+
import { ProductGrid, productGridVariantClasses } from "./ProductGrid-Cgkb4vNf.js";
|
|
5
|
+
import { searchFilterSidebarVariantClasses } from "./searchFilterSidebarVariants-BD4SYugF.js";
|
|
6
|
+
import { SparkleAnimation } from "./SparkleAnimation-D1QjYho_.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(Typography, {
|
|
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(Typography, {
|
|
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 };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_chunk.__toESM(react);
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
6
|
+
|
|
7
|
+
//#region ../icons/src/SettingsVariant.tsx
|
|
8
|
+
const SvgSettingsVariant = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
width: 28,
|
|
11
|
+
height: 28,
|
|
12
|
+
fill: "none",
|
|
13
|
+
...props,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
16
|
+
cx: 3.5,
|
|
17
|
+
cy: 3.5,
|
|
18
|
+
r: 3.033,
|
|
19
|
+
stroke: "#767676",
|
|
20
|
+
strokeWidth: .933,
|
|
21
|
+
transform: "matrix(-1 0 0 1 22.4 0)"
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
24
|
+
stroke: "#767676",
|
|
25
|
+
strokeWidth: .933,
|
|
26
|
+
d: "M14 3.5H0M28 3.5h-4.5"
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
29
|
+
cx: 9.1,
|
|
30
|
+
cy: 13.5,
|
|
31
|
+
r: 3.033,
|
|
32
|
+
stroke: "#767676",
|
|
33
|
+
strokeWidth: .933
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
36
|
+
stroke: "#767676",
|
|
37
|
+
strokeWidth: .933,
|
|
38
|
+
d: "M14 13.5h14M0 13.5h4.5"
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
41
|
+
cx: 3.5,
|
|
42
|
+
cy: 3.5,
|
|
43
|
+
r: 3.033,
|
|
44
|
+
stroke: "#767676",
|
|
45
|
+
strokeWidth: .933,
|
|
46
|
+
transform: "matrix(-1 0 0 1 22.4 20)"
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
49
|
+
stroke: "#767676",
|
|
50
|
+
strokeWidth: .933,
|
|
51
|
+
d: "M14 23.5H0M28 23.5h-4.5"
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
var SettingsVariant_default = SvgSettingsVariant;
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
Object.defineProperty(exports, 'SettingsVariant_default', {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () {
|
|
61
|
+
return SettingsVariant_default;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region ../icons/src/SettingsVariant.tsx
|
|
5
|
+
const SvgSettingsVariant = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
width: 28,
|
|
8
|
+
height: 28,
|
|
9
|
+
fill: "none",
|
|
10
|
+
...props,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx("circle", {
|
|
13
|
+
cx: 3.5,
|
|
14
|
+
cy: 3.5,
|
|
15
|
+
r: 3.033,
|
|
16
|
+
stroke: "#767676",
|
|
17
|
+
strokeWidth: .933,
|
|
18
|
+
transform: "matrix(-1 0 0 1 22.4 0)"
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx("path", {
|
|
21
|
+
stroke: "#767676",
|
|
22
|
+
strokeWidth: .933,
|
|
23
|
+
d: "M14 3.5H0M28 3.5h-4.5"
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx("circle", {
|
|
26
|
+
cx: 9.1,
|
|
27
|
+
cy: 13.5,
|
|
28
|
+
r: 3.033,
|
|
29
|
+
stroke: "#767676",
|
|
30
|
+
strokeWidth: .933
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx("path", {
|
|
33
|
+
stroke: "#767676",
|
|
34
|
+
strokeWidth: .933,
|
|
35
|
+
d: "M14 13.5h14M0 13.5h4.5"
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx("circle", {
|
|
38
|
+
cx: 3.5,
|
|
39
|
+
cy: 3.5,
|
|
40
|
+
r: 3.033,
|
|
41
|
+
stroke: "#767676",
|
|
42
|
+
strokeWidth: .933,
|
|
43
|
+
transform: "matrix(-1 0 0 1 22.4 20)"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("path", {
|
|
46
|
+
stroke: "#767676",
|
|
47
|
+
strokeWidth: .933,
|
|
48
|
+
d: "M14 23.5H0M28 23.5h-4.5"
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
var SettingsVariant_default = SvgSettingsVariant;
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { SettingsVariant_default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime2 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_runtime2.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 };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime4 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_runtime4.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 };
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/Spinner/Spinner.d.ts
|
|
4
|
+
type SpinnerProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const Spinner: ({
|
|
8
|
+
className
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime12.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Spinner };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/Spinner/Spinner.d.ts
|
|
4
|
+
type SpinnerProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const Spinner: ({
|
|
8
|
+
className
|
|
9
|
+
}: SpinnerProps) => react_jsx_runtime3.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Spinner };
|