@envive-ai/react-toolkit 0.1.9 → 0.1.11

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.
Files changed (174) hide show
  1. package/dist/Accordion/index.cjs +3 -82
  2. package/dist/Accordion/index.d.cts +2 -2
  3. package/dist/Accordion/index.d.ts +2 -2
  4. package/dist/Accordion/index.js +2 -75
  5. package/dist/Accordion-Cp3Hx2zm.js +77 -0
  6. package/dist/Accordion-DBZpiQe7.cjs +88 -0
  7. package/dist/AppliedFiltersScrollbar/index.d.ts +2 -2
  8. package/dist/ButtonBase/index.cjs +2 -2
  9. package/dist/ButtonBase/index.d.cts +2 -2
  10. package/dist/ButtonBase/index.d.ts +2 -2
  11. package/dist/ButtonBase/index.js +2 -2
  12. package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
  13. package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
  14. package/dist/FilterScrollbar/index.cjs +1 -1
  15. package/dist/FilterScrollbar/index.d.cts +3 -3
  16. package/dist/FilterScrollbar/index.d.ts +3 -3
  17. package/dist/FilterScrollbar/index.js +1 -1
  18. package/dist/Headline/index.cjs +1 -1
  19. package/dist/Headline/index.d.cts +2 -2
  20. package/dist/Headline/index.d.ts +2 -2
  21. package/dist/Headline/index.js +1 -1
  22. package/dist/ImageWithFallback/index.cjs +1 -1
  23. package/dist/ImageWithFallback/index.d.cts +2 -2
  24. package/dist/ImageWithFallback/index.d.ts +2 -2
  25. package/dist/ImageWithFallback/index.js +1 -1
  26. package/dist/ModalSheet/index.cjs +3 -0
  27. package/dist/ModalSheet/index.d.cts +38 -0
  28. package/dist/ModalSheet/index.d.ts +38 -0
  29. package/dist/ModalSheet/index.js +3 -0
  30. package/dist/ModalSheet-CXZgyZ4a.cjs +335 -0
  31. package/dist/ModalSheet-CZd5pssv.js +324 -0
  32. package/dist/ProductCard/index.cjs +4 -4
  33. package/dist/ProductCard/index.d.cts +1 -1
  34. package/dist/ProductCard/index.d.ts +1 -1
  35. package/dist/ProductCard/index.js +4 -4
  36. package/dist/{ProductCard-D44lhkxO.js → ProductCard-D-lyh8uV.js} +4 -4
  37. package/dist/{ProductCard-BcQBegyj.cjs → ProductCard-F49krjHk.cjs} +5 -5
  38. package/dist/ProductGrid/index.cjs +5 -5
  39. package/dist/ProductGrid/index.d.cts +3 -3
  40. package/dist/ProductGrid/index.d.ts +3 -3
  41. package/dist/ProductGrid/index.js +5 -5
  42. package/dist/{ProductGrid-ZXF7LBVG.js → ProductGrid-FIf5wFQx.js} +1 -1
  43. package/dist/{ProductGrid-50PmrwA4.cjs → ProductGrid-QeoaIfcq.cjs} +1 -1
  44. package/dist/RadioButton/index.cjs +6 -0
  45. package/dist/RadioButton/index.d.cts +30 -0
  46. package/dist/RadioButton/index.d.ts +30 -0
  47. package/dist/RadioButton/index.js +6 -0
  48. package/dist/RadioButton-Bf68dZl7.js +68 -0
  49. package/dist/RadioButton-DZ6QXkrN.cjs +77 -0
  50. package/dist/RadioButtonGroup/index.cjs +8 -0
  51. package/dist/RadioButtonGroup/index.d.cts +36 -0
  52. package/dist/RadioButtonGroup/index.d.ts +36 -0
  53. package/dist/RadioButtonGroup/index.js +7 -0
  54. package/dist/RadioButtonGroup-8k7hkJYB.js +37 -0
  55. package/dist/RadioButtonGroup-Dc_n5amh.cjs +51 -0
  56. package/dist/SearchAutocomplete/index.cjs +1 -1
  57. package/dist/SearchAutocomplete/index.js +1 -1
  58. package/dist/SearchFilter/index.cjs +9 -2
  59. package/dist/SearchFilter/index.d.cts +15 -9
  60. package/dist/SearchFilter/index.d.ts +15 -9
  61. package/dist/SearchFilter/index.js +9 -2
  62. package/dist/SearchFilter-BOwErEyI.js +258 -0
  63. package/dist/SearchFilter-BtLKnFMm.cjs +279 -0
  64. package/dist/SearchInput/index.cjs +3 -3
  65. package/dist/SearchInput/index.d.cts +1 -1
  66. package/dist/SearchInput/index.d.ts +2 -2
  67. package/dist/SearchInput/index.js +3 -3
  68. package/dist/{SearchInput-DxDC1mcq.js → SearchInput-BBaYEwkR.js} +2 -2
  69. package/dist/{SearchInput-BFlu_3iT.cjs → SearchInput-BTNvgrIa.cjs} +2 -2
  70. package/dist/SearchInputForm/index.cjs +4 -4
  71. package/dist/SearchInputForm/index.d.cts +1 -1
  72. package/dist/SearchInputForm/index.d.ts +1 -1
  73. package/dist/SearchInputForm/index.js +4 -4
  74. package/dist/SearchResultsContent/index.cjs +16 -30
  75. package/dist/SearchResultsContent/index.d.cts +6 -21
  76. package/dist/SearchResultsContent/index.d.ts +6 -21
  77. package/dist/SearchResultsContent/index.js +12 -25
  78. package/dist/SearchResultsFilterSidebar/index.cjs +15 -8
  79. package/dist/SearchResultsFilterSidebar/index.d.cts +1 -1
  80. package/dist/SearchResultsFilterSidebar/index.d.ts +1 -1
  81. package/dist/SearchResultsFilterSidebar/index.js +13 -6
  82. package/dist/SearchResultsStates/index.cjs +10 -10
  83. package/dist/SearchResultsStates/index.d.cts +6 -6
  84. package/dist/SearchResultsStates/index.d.ts +6 -6
  85. package/dist/SearchResultsStates/index.js +10 -10
  86. package/dist/{SearchResultsStates-T--7xKI7.js → SearchResultsStates-CB5k1xkK.js} +5 -5
  87. package/dist/{SearchResultsStates-B7a6B6-P.cjs → SearchResultsStates-DywK7vvp.cjs} +5 -5
  88. package/dist/SparkleAnimation/index.cjs +1 -1
  89. package/dist/SparkleAnimation/index.d.cts +2 -2
  90. package/dist/SparkleAnimation/index.d.ts +2 -2
  91. package/dist/SparkleAnimation/index.js +1 -1
  92. package/dist/Spinner/index.cjs +1 -1
  93. package/dist/Spinner/index.d.cts +2 -2
  94. package/dist/Spinner/index.d.ts +2 -2
  95. package/dist/Spinner/index.js +1 -1
  96. package/dist/Styles/index.cjs +274 -0
  97. package/dist/Styles/index.d.cts +258 -0
  98. package/dist/Styles/index.d.ts +258 -0
  99. package/dist/Styles/index.js +274 -0
  100. package/dist/SuggestionButton/index.cjs +1 -1
  101. package/dist/SuggestionButton/index.d.cts +2 -2
  102. package/dist/SuggestionButton/index.d.ts +2 -2
  103. package/dist/SuggestionButton/index.js +1 -1
  104. package/dist/Text/index.d.cts +2 -2
  105. package/dist/Text/index.d.ts +3 -3
  106. package/dist/TextInput/index.cjs +1 -1
  107. package/dist/TextInput/index.d.ts +1 -1
  108. package/dist/TextInput/index.js +1 -1
  109. package/dist/ToggleButton/index.cjs +6 -0
  110. package/dist/ToggleButton/index.d.cts +30 -0
  111. package/dist/ToggleButton/index.d.ts +30 -0
  112. package/dist/ToggleButton/index.js +6 -0
  113. package/dist/ToggleButton-BKRR_-69.js +60 -0
  114. package/dist/ToggleButton-D90UO4qv.cjs +68 -0
  115. package/dist/{index-vrOLXtJO.d.ts → index-1x_hMlEf.d.cts} +5 -5
  116. package/dist/{index-ozZ5JSZp.d.cts → index-CgjZdKpL.d.cts} +5 -5
  117. package/dist/{index-CC5ru80z.d.ts → index-Cl4d_pDw.d.ts} +5 -5
  118. package/dist/{index-Bl5T42aR.d.ts → index-H_9LhS_1.d.cts} +2 -2
  119. package/dist/{index-C5sr5-A0.d.cts → index-QMTPxKA9.d.ts} +5 -5
  120. package/dist/{index-BkxuyRJ6.d.cts → index-gfYBM7Ul.d.ts} +2 -2
  121. package/dist/{searchFilterSidebarVariants-B8nMp970.js → searchFilterSidebarVariants-CDFCHVeZ.js} +1 -1
  122. package/dist/{searchFilterSidebarVariants-BMZs5kyL.cjs → searchFilterSidebarVariants-CtmuwSBQ.cjs} +1 -1
  123. package/package.json +30 -4
  124. package/src/components/AnimatedChevron/AnimatedChevron.tsx +37 -0
  125. package/src/components/ModalSheet/ModalSheet.tsx +42 -0
  126. package/src/components/ModalSheet/common/closeIcon.tsx +40 -0
  127. package/src/components/ModalSheet/common/enviveWatermark.tsx +30 -0
  128. package/src/components/ModalSheet/desktop/desktopHeader.tsx +24 -0
  129. package/src/components/ModalSheet/desktop/index.tsx +118 -0
  130. package/src/components/ModalSheet/index.ts +1 -0
  131. package/src/components/ModalSheet/mobile/index.tsx +117 -0
  132. package/src/components/ModalSheet/mobile/mobileHeader.tsx +42 -0
  133. package/src/components/ModalSheet/types.ts +33 -0
  134. package/src/components/RadioButton/RadioButton.tsx +88 -0
  135. package/src/components/RadioButton/index.ts +1 -0
  136. package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +72 -0
  137. package/src/components/RadioButtonGroup/index.ts +1 -0
  138. package/src/components/SearchFilter/SearchFilter.tsx +161 -64
  139. package/src/components/SearchFilter/SearchFilterFooter.tsx +55 -0
  140. package/src/components/SearchFilter/types.ts +2 -1
  141. package/src/components/SearchFilter/useHasFilterStateChanged.tsx +40 -0
  142. package/src/components/SearchFilter/utils.ts +15 -0
  143. package/src/components/SearchResultsContent/SearchResultsContent.tsx +1 -1
  144. package/src/components/SearchResultsContent/index.ts +0 -1
  145. package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +2 -2
  146. package/src/components/Styles/EnviveTailwindPreset.ts +285 -0
  147. package/src/components/Styles/index.ts +2 -0
  148. package/src/components/ToggleButton/ToggleButton.tsx +98 -0
  149. package/src/components/ToggleButton/index.ts +1 -0
  150. package/tailwind-preset.js +3 -0
  151. package/dist/SearchFilter-B3vl3aWK.js +0 -117
  152. package/dist/SearchFilter-QV5AH7gk.cjs +0 -137
  153. package/src/components/SearchResultsContent/utils.ts +0 -28
  154. /package/dist/{ButtonBase-C_uKnl48.js → ButtonBase-0NN6wmX-.js} +0 -0
  155. /package/dist/{ButtonBase-DGbSm0SJ.js → ButtonBase-BAf-nlCm.js} +0 -0
  156. /package/dist/{ButtonBase-DbWQ25n-.cjs → ButtonBase-BIXx56hq.cjs} +0 -0
  157. /package/dist/{ButtonBase-DGpQBeLR.cjs → ButtonBase-Do88ndKa.cjs} +0 -0
  158. /package/dist/{DynamicFiltersScrollbar-D4d6pGke.js → DynamicFiltersScrollbar-C4kdNSJ9.js} +0 -0
  159. /package/dist/{DynamicFiltersScrollbar-DCElnZJa.cjs → DynamicFiltersScrollbar-CVw1PINp.cjs} +0 -0
  160. /package/dist/{Headline-BkOW1lQj.js → Headline-DNEWF8ly.js} +0 -0
  161. /package/dist/{Headline-QpruZlcg.cjs → Headline-DTT4RSv2.cjs} +0 -0
  162. /package/dist/{ImageWithFallback-1LqhQK1q.cjs → ImageWithFallback-Cx-KNi-D.cjs} +0 -0
  163. /package/dist/{ImageWithFallback-Ckwsmd8P.js → ImageWithFallback-DqxjwO3i.js} +0 -0
  164. /package/dist/{SearchAutocomplete-C4RY0IoT.js → SearchAutocomplete-C6omCGJp.js} +0 -0
  165. /package/dist/{SearchAutocomplete-hQDnKtwQ.cjs → SearchAutocomplete-Cofuvwwp.cjs} +0 -0
  166. /package/dist/{SparkleAnimation-DT3coYkB.js → SparkleAnimation-AM4XoegD.js} +0 -0
  167. /package/dist/{SparkleAnimation-2m4gwmrY.cjs → SparkleAnimation-Edzqyb48.cjs} +0 -0
  168. /package/dist/{Spinner-BqTt55uu.js → Spinner-CjGLIRgs.js} +0 -0
  169. /package/dist/{Spinner-DjK8ts9E.cjs → Spinner-DFor2Szi.cjs} +0 -0
  170. /package/dist/{TextInput-BFPXhSAY.js → TextInput-BVPdz7e8.js} +0 -0
  171. /package/dist/{TextInput-DLSgpP6b.cjs → TextInput-CnXhppYn.cjs} +0 -0
  172. /package/dist/{colorsConfig-BQlaCfxi.js → colorsConfig-5Yf4nrEe.js} +0 -0
  173. /package/dist/{colorsConfig-DCvy_dV4.cjs → colorsConfig-DFL3mBwB.cjs} +0 -0
  174. /package/dist/{textVariantClasses-ypYGLq0h.d.ts → textVariantClasses-kyZtL8F5.d.ts} +0 -0
@@ -0,0 +1,6 @@
1
+ import "../textVariantClasses-D77TGEy1.js";
2
+ import "../Text-Bod4OMPk.js";
3
+ import "../Text-BMsncrpY.js";
4
+ import { ToggleButton } from "../ToggleButton-BKRR_-69.js";
5
+
6
+ export { ToggleButton };
@@ -0,0 +1,60 @@
1
+ import { Text } from "./Text-Bod4OMPk.js";
2
+ import classNames from "classnames";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+
5
+ //#region src/components/ToggleButton/ToggleButton.tsx
6
+ const toggleButtonVariants = { default: {
7
+ button: ({ isSelected }) => classNames({
8
+ "spiffy-tw-bg-[--spiffy-colors-background-dark]": isSelected,
9
+ "spiffy-tw-border-[--spiffy-colors-background-dark]": isSelected,
10
+ "spiffy-tw-text-[--spiffy-colors-text-light]": isSelected,
11
+ "hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]": true,
12
+ "hover:spiffy-tw-text-[--spiffy-colors-text-primary]": isSelected,
13
+ "spiffy-tw-bg-[--spiffy-colors-background-light]": !isSelected,
14
+ "spiffy-tw-border-[--spiffy-colors-border-light]": !isSelected,
15
+ "spiffy-tw-text-[--spiffy-colors-text-primary]": !isSelected
16
+ }),
17
+ label: () => "",
18
+ secondaryLabel: ({ isSelected }) => classNames({
19
+ "spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected,
20
+ "hover:spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected
21
+ })
22
+ } };
23
+ const ToggleButton = ({ isSelected, onClick, label, buttonClassName, labelClassName, secondaryLabel, secondaryLabelClassName, icon, iconClassName, variant }) => {
24
+ const buttonClassNames = classNames({
25
+ "spiffy-tw-flex": true,
26
+ "spiffy-tw-items-center": true,
27
+ "spiffy-tw-gap-[4px]": true,
28
+ "spiffy-tw-cursor-pointer": true,
29
+ "spiffy-tw-py-[8px]": true,
30
+ "spiffy-tw-px-[12px]": true,
31
+ "spiffy-tw-rounded-[200px]": true,
32
+ "spiffy-tw-border": true
33
+ }, toggleButtonVariants?.[variant]?.button({ isSelected }), buttonClassName);
34
+ const labelClassNames = classNames({}, toggleButtonVariants?.[variant]?.label({ isSelected }), labelClassName);
35
+ const secondaryLabelClassNames = classNames({}, toggleButtonVariants?.[variant]?.secondaryLabel({ isSelected }), secondaryLabelClassName);
36
+ return /* @__PURE__ */ jsxs("button", {
37
+ className: buttonClassNames,
38
+ onClick,
39
+ type: "button",
40
+ children: [
41
+ icon && /* @__PURE__ */ jsx("div", {
42
+ className: iconClassName,
43
+ children: icon
44
+ }),
45
+ /* @__PURE__ */ jsx(Text, {
46
+ variant: "body3",
47
+ className: labelClassNames,
48
+ children: label
49
+ }),
50
+ secondaryLabel && /* @__PURE__ */ jsx(Text, {
51
+ variant: "body4",
52
+ className: secondaryLabelClassNames,
53
+ children: secondaryLabel
54
+ })
55
+ ]
56
+ });
57
+ };
58
+
59
+ //#endregion
60
+ export { ToggleButton };
@@ -0,0 +1,68 @@
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
+
8
+ //#region src/components/ToggleButton/ToggleButton.tsx
9
+ const toggleButtonVariants = { default: {
10
+ button: ({ isSelected }) => (0, classnames.default)({
11
+ "spiffy-tw-bg-[--spiffy-colors-background-dark]": isSelected,
12
+ "spiffy-tw-border-[--spiffy-colors-background-dark]": isSelected,
13
+ "spiffy-tw-text-[--spiffy-colors-text-light]": isSelected,
14
+ "hover:spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]": true,
15
+ "hover:spiffy-tw-text-[--spiffy-colors-text-primary]": isSelected,
16
+ "spiffy-tw-bg-[--spiffy-colors-background-light]": !isSelected,
17
+ "spiffy-tw-border-[--spiffy-colors-border-light]": !isSelected,
18
+ "spiffy-tw-text-[--spiffy-colors-text-primary]": !isSelected
19
+ }),
20
+ label: () => "",
21
+ secondaryLabel: ({ isSelected }) => (0, classnames.default)({
22
+ "spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected,
23
+ "hover:spiffy-tw-text-[--spiffy-colors-text-secondary]": !isSelected
24
+ })
25
+ } };
26
+ const ToggleButton = ({ isSelected, onClick, label, buttonClassName, labelClassName, secondaryLabel, secondaryLabelClassName, icon, iconClassName, variant }) => {
27
+ const buttonClassNames = (0, classnames.default)({
28
+ "spiffy-tw-flex": true,
29
+ "spiffy-tw-items-center": true,
30
+ "spiffy-tw-gap-[4px]": true,
31
+ "spiffy-tw-cursor-pointer": true,
32
+ "spiffy-tw-py-[8px]": true,
33
+ "spiffy-tw-px-[12px]": true,
34
+ "spiffy-tw-rounded-[200px]": true,
35
+ "spiffy-tw-border": true
36
+ }, toggleButtonVariants?.[variant]?.button({ isSelected }), buttonClassName);
37
+ const labelClassNames = (0, classnames.default)({}, toggleButtonVariants?.[variant]?.label({ isSelected }), labelClassName);
38
+ const secondaryLabelClassNames = (0, classnames.default)({}, toggleButtonVariants?.[variant]?.secondaryLabel({ isSelected }), secondaryLabelClassName);
39
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
40
+ className: buttonClassNames,
41
+ onClick,
42
+ type: "button",
43
+ children: [
44
+ icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
45
+ className: iconClassName,
46
+ children: icon
47
+ }),
48
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
49
+ variant: "body3",
50
+ className: labelClassNames,
51
+ children: label
52
+ }),
53
+ secondaryLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Text.Text, {
54
+ variant: "body4",
55
+ className: secondaryLabelClassNames,
56
+ children: secondaryLabel
57
+ })
58
+ ]
59
+ });
60
+ };
61
+
62
+ //#endregion
63
+ Object.defineProperty(exports, 'ToggleButton', {
64
+ enumerable: true,
65
+ get: function () {
66
+ return ToggleButton;
67
+ }
68
+ });
@@ -1,6 +1,6 @@
1
- import { FC } from "react";
2
- import * as react_jsx_runtime19 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
2
  import { TestProps } from "@envive-ai/react-hooks/types";
3
+ import { FC } from "react";
4
4
  import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
5
5
 
6
6
  //#region src/util/trim.d.ts
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
261
261
  stars,
262
262
  reviewCount,
263
263
  className
264
- }: RatingSummaryProps) => react_jsx_runtime19.JSX.Element;
264
+ }: RatingSummaryProps) => react_jsx_runtime5.JSX.Element;
265
265
  interface PriceSectionProps {
266
266
  originalPrice?: string;
267
267
  salePrice?: string;
@@ -271,7 +271,7 @@ declare const PriceSection: ({
271
271
  originalPrice,
272
272
  salePrice,
273
273
  pricePrefix
274
- }: PriceSectionProps) => react_jsx_runtime19.JSX.Element;
274
+ }: PriceSectionProps) => react_jsx_runtime5.JSX.Element;
275
275
  interface ProductCardProps extends TestProps {
276
276
  productCardConfig?: ProductCardConfig;
277
277
  merchantShortName: string;
@@ -312,7 +312,7 @@ declare const ProductCard: ({
312
312
  aspectRatio,
313
313
  growWithContainer,
314
314
  handleClick
315
- }: ProductCardProps) => react_jsx_runtime19.JSX.Element;
315
+ }: ProductCardProps) => react_jsx_runtime5.JSX.Element;
316
316
  //#endregion
317
317
  //#region src/components/ProductCard/ProductCardSkeleton.d.ts
318
318
  declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
@@ -1,9 +1,9 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
  import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
3
3
 
4
4
  //#region src/components/SearchResultsFilterSidebar/types.d.ts
5
5
  type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
6
- type CloseIconVariant = 'light' | 'tertiary' | 'dark';
6
+ type CloseIconVariant$1 = 'light' | 'tertiary' | 'dark';
7
7
  //#endregion
8
8
  //#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts
9
9
  interface SearchFilterSidebarVariantClasses {
@@ -17,7 +17,7 @@ interface SearchFilterSidebarVariantClasses {
17
17
  appliedFilterBackgroundClasses: string;
18
18
  applyFiltersUnchangedClasses: string;
19
19
  applyFiltersChangedClasses: string;
20
- filterCloseIconVariant: CloseIconVariant;
20
+ filterCloseIconVariant: CloseIconVariant$1;
21
21
  }
22
22
  declare const searchFilterSidebarVariantClasses: Record<SearchFilterSidebarVariant, SearchFilterSidebarVariantClasses>;
23
23
  //#endregion
@@ -42,6 +42,6 @@ declare const SearchResultsFilter: ({
42
42
  onSelectFilterItem,
43
43
  onClearAllFilters,
44
44
  filterButtonText
45
- }: SearchResultsFilterProps) => react_jsx_runtime11.JSX.Element;
45
+ }: SearchResultsFilterProps) => react_jsx_runtime20.JSX.Element;
46
46
  //#endregion
47
- export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
47
+ export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
@@ -1,9 +1,9 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime25 from "react/jsx-runtime";
2
2
  import { SearchFilterDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
3
3
 
4
4
  //#region src/components/SearchResultsFilterSidebar/types.d.ts
5
5
  type SearchFilterSidebarVariant = 'darkButton' | 'lightButton';
6
- type CloseIconVariant = 'light' | 'tertiary' | 'dark';
6
+ type CloseIconVariant$1 = 'light' | 'tertiary' | 'dark';
7
7
  //#endregion
8
8
  //#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.d.ts
9
9
  interface SearchFilterSidebarVariantClasses {
@@ -17,7 +17,7 @@ interface SearchFilterSidebarVariantClasses {
17
17
  appliedFilterBackgroundClasses: string;
18
18
  applyFiltersUnchangedClasses: string;
19
19
  applyFiltersChangedClasses: string;
20
- filterCloseIconVariant: CloseIconVariant;
20
+ filterCloseIconVariant: CloseIconVariant$1;
21
21
  }
22
22
  declare const searchFilterSidebarVariantClasses: Record<SearchFilterSidebarVariant, SearchFilterSidebarVariantClasses>;
23
23
  //#endregion
@@ -42,6 +42,6 @@ declare const SearchResultsFilter: ({
42
42
  onSelectFilterItem,
43
43
  onClearAllFilters,
44
44
  filterButtonText
45
- }: SearchResultsFilterProps) => react_jsx_runtime1.JSX.Element;
45
+ }: SearchResultsFilterProps) => react_jsx_runtime25.JSX.Element;
46
46
  //#endregion
47
- export { CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
47
+ export { CloseIconVariant$1 as CloseIconVariant, SearchFilterSidebarVariant, SearchResultsFilter, SearchResultsFilterProps, searchFilterSidebarVariantClasses };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime16 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/SearchInputForm/types.d.ts
4
4
  type SearchInputVariant = 'standard';
@@ -31,6 +31,6 @@ declare const SearchInputForm: ({
31
31
  onSearchInputChange,
32
32
  onSearchSubmit,
33
33
  searchInputDataTestId
34
- }: SearchInputFormProps) => react_jsx_runtime16.JSX.Element;
34
+ }: SearchInputFormProps) => react_jsx_runtime11.JSX.Element;
35
35
  //#endregion
36
36
  export { SearchInputForm, SearchInputVariant };
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime20 from "react/jsx-runtime";
2
- import { TestProps } from "@envive-ai/react-hooks/types";
3
1
  import { FC } from "react";
2
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
3
+ import { TestProps } from "@envive-ai/react-hooks/types";
4
4
  import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
5
5
 
6
6
  //#region src/util/trim.d.ts
@@ -261,7 +261,7 @@ declare const RatingSummary: ({
261
261
  stars,
262
262
  reviewCount,
263
263
  className
264
- }: RatingSummaryProps) => react_jsx_runtime20.JSX.Element;
264
+ }: RatingSummaryProps) => react_jsx_runtime14.JSX.Element;
265
265
  interface PriceSectionProps {
266
266
  originalPrice?: string;
267
267
  salePrice?: string;
@@ -271,7 +271,7 @@ declare const PriceSection: ({
271
271
  originalPrice,
272
272
  salePrice,
273
273
  pricePrefix
274
- }: PriceSectionProps) => react_jsx_runtime20.JSX.Element;
274
+ }: PriceSectionProps) => react_jsx_runtime14.JSX.Element;
275
275
  interface ProductCardProps extends TestProps {
276
276
  productCardConfig?: ProductCardConfig;
277
277
  merchantShortName: string;
@@ -312,7 +312,7 @@ declare const ProductCard: ({
312
312
  aspectRatio,
313
313
  growWithContainer,
314
314
  handleClick
315
- }: ProductCardProps) => react_jsx_runtime20.JSX.Element;
315
+ }: ProductCardProps) => react_jsx_runtime14.JSX.Element;
316
316
  //#endregion
317
317
  //#region src/components/ProductCard/ProductCardSkeleton.d.ts
318
318
  declare const ProductCardSkeleton: FC<ProductCardSkeletonProps>;
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/SearchInputForm/types.d.ts
4
4
  type SearchInputVariant = 'standard';
@@ -31,6 +31,6 @@ declare const SearchInputForm: ({
31
31
  onSearchInputChange,
32
32
  onSearchSubmit,
33
33
  searchInputDataTestId
34
- }: SearchInputFormProps) => react_jsx_runtime5.JSX.Element;
34
+ }: SearchInputFormProps) => react_jsx_runtime0.JSX.Element;
35
35
  //#endregion
36
36
  export { SearchInputForm, SearchInputVariant };
@@ -1,4 +1,4 @@
1
- import { ColorNames, colorVar } from "./colorsConfig-BQlaCfxi.js";
1
+ import { ColorNames, colorVar } from "./colorsConfig-5Yf4nrEe.js";
2
2
 
3
3
  //#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
4
4
  const searchFilterSidebarVariantClasses = {
@@ -1,4 +1,4 @@
1
- const require_colorsConfig = require('./colorsConfig-DCvy_dV4.cjs');
1
+ const require_colorsConfig = require('./colorsConfig-DFL3mBwB.cjs');
2
2
 
3
3
  //#region src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts
4
4
  const searchFilterSidebarVariantClasses = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-toolkit",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "React component library for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -17,15 +17,18 @@
17
17
  "files": [
18
18
  "dist",
19
19
  "src",
20
- "!**/*.tsbuildinfo"
20
+ "!**/*.tsbuildinfo",
21
+ "tailwind-preset.js"
21
22
  ],
22
23
  "scripts": {
23
24
  "build": "tsdown",
24
- "prepublish": "npm run build"
25
+ "build:watch": "tsdown --watch",
26
+ "prepublish": "npm run build",
27
+ "typecheck": "tsc"
25
28
  },
26
29
  "dependencies": {
27
- "@envive-ai/react-hooks": "^0.1.4",
28
30
  "@envive-ai/react-icons": "0.1.1",
31
+ "@envive-ai/react-hooks": "^0.1.6",
29
32
  "@tailwindcss/typography": "^0.5.15",
30
33
  "classnames": "^2.5.1",
31
34
  "framer-motion": "^12.23.12",
@@ -37,7 +40,10 @@
37
40
  "react-dom": "^18.3.1"
38
41
  },
39
42
  "devDependencies": {
43
+ "@types/node": "^24.3.2",
40
44
  "@types/react": "^19.1.12",
45
+ "postcss": "^8.5.6",
46
+ "tailwindcss": "^3.4.17",
41
47
  "tsdown": "^0.14.2",
42
48
  "typescript": "~5.8.3"
43
49
  },
@@ -70,6 +76,10 @@
70
76
  "import": "./dist/ImageWithFallback/index.js",
71
77
  "require": "./dist/ImageWithFallback/index.cjs"
72
78
  },
79
+ "./ModalSheet": {
80
+ "import": "./dist/ModalSheet/index.js",
81
+ "require": "./dist/ModalSheet/index.cjs"
82
+ },
73
83
  "./ProductCard": {
74
84
  "import": "./dist/ProductCard/index.js",
75
85
  "require": "./dist/ProductCard/index.cjs"
@@ -78,6 +88,14 @@
78
88
  "import": "./dist/ProductGrid/index.js",
79
89
  "require": "./dist/ProductGrid/index.cjs"
80
90
  },
91
+ "./RadioButton": {
92
+ "import": "./dist/RadioButton/index.js",
93
+ "require": "./dist/RadioButton/index.cjs"
94
+ },
95
+ "./RadioButtonGroup": {
96
+ "import": "./dist/RadioButtonGroup/index.js",
97
+ "require": "./dist/RadioButtonGroup/index.cjs"
98
+ },
81
99
  "./SearchAutocomplete": {
82
100
  "import": "./dist/SearchAutocomplete/index.js",
83
101
  "require": "./dist/SearchAutocomplete/index.cjs"
@@ -114,6 +132,10 @@
114
132
  "import": "./dist/Spinner/index.js",
115
133
  "require": "./dist/Spinner/index.cjs"
116
134
  },
135
+ "./Styles": {
136
+ "import": "./dist/Styles/index.js",
137
+ "require": "./dist/Styles/index.cjs"
138
+ },
117
139
  "./SuggestionButton": {
118
140
  "import": "./dist/SuggestionButton/index.js",
119
141
  "require": "./dist/SuggestionButton/index.cjs"
@@ -126,6 +148,10 @@
126
148
  "import": "./dist/TextInput/index.js",
127
149
  "require": "./dist/TextInput/index.cjs"
128
150
  },
151
+ "./ToggleButton": {
152
+ "import": "./dist/ToggleButton/index.js",
153
+ "require": "./dist/ToggleButton/index.cjs"
154
+ },
129
155
  "./package.json": "./package.json"
130
156
  }
131
157
  }
@@ -0,0 +1,37 @@
1
+ import { MotionValue, motion, useTransform } from 'framer-motion';
2
+ import { FC } from 'react';
3
+
4
+ interface AnimatedChevronProps {
5
+ animationKey: MotionValue;
6
+ chevronColor: string;
7
+ }
8
+
9
+ export const AnimatedChevron: FC<AnimatedChevronProps> = ({ animationKey, chevronColor }) => {
10
+ const leftRotation = useTransform(animationKey, [300, 0], [-12, 0]);
11
+ const rightRotation = useTransform(animationKey, [300, 0], [12, 0]);
12
+
13
+ return (
14
+ <div style={{ display: 'flex' }}>
15
+ <motion.div
16
+ style={{
17
+ x: 1,
18
+ width: '25px',
19
+ height: '4px',
20
+ background: chevronColor,
21
+ borderRadius: '8px',
22
+ rotate: leftRotation,
23
+ }}
24
+ />
25
+ <motion.div
26
+ style={{
27
+ x: -1,
28
+ width: '25px',
29
+ height: '4px',
30
+ background: chevronColor,
31
+ borderRadius: '8px',
32
+ rotate: rightRotation,
33
+ }}
34
+ />
35
+ </div>
36
+ );
37
+ };
@@ -0,0 +1,42 @@
1
+ import { ModalSheetMobile } from './mobile';
2
+ import { ModalSheetDesktop } from './desktop';
3
+ import { ModalSheetProps } from './types';
4
+ import { useIsSmallScreen } from '@envive-ai/react-hooks/hooks';
5
+
6
+ const ANIMATION_DURATION = 0.3;
7
+
8
+ export const ModalSheet = ({
9
+ children,
10
+ isOpen,
11
+ closeModal,
12
+ animationDuration = ANIMATION_DURATION,
13
+ desktopWidth = 512,
14
+ headerProps,
15
+ footerProps,
16
+ }: ModalSheetProps) => {
17
+ const isSmallScreen = useIsSmallScreen();
18
+
19
+ return isSmallScreen ? (
20
+ <ModalSheetMobile
21
+ isOpen={isOpen}
22
+ closeModal={closeModal}
23
+ desktopWidth={desktopWidth}
24
+ animationDuration={animationDuration}
25
+ headerProps={headerProps}
26
+ footerProps={footerProps}
27
+ >
28
+ {children}
29
+ </ModalSheetMobile>
30
+ ) : (
31
+ <ModalSheetDesktop
32
+ isOpen={isOpen}
33
+ closeModal={closeModal}
34
+ desktopWidth={desktopWidth}
35
+ animationDuration={animationDuration}
36
+ headerProps={headerProps}
37
+ footerProps={footerProps}
38
+ >
39
+ {children}
40
+ </ModalSheetDesktop>
41
+ );
42
+ };
@@ -0,0 +1,40 @@
1
+ import { useMemo } from 'react';
2
+ import classNames from 'classnames';
3
+ import { GrFormClose } from 'react-icons/gr';
4
+ import { IconContext } from 'react-icons/lib';
5
+ import { ModalSheetCloseIconProps } from '../types';
6
+
7
+ const closeIconVariantMapping = {
8
+ light: {
9
+ 'spiffy-tw-bg-[--spiffy-colors-background-light]': true,
10
+ 'spiffy-tw-text-[--spiffy-colors-text-primary]': true,
11
+ },
12
+ dark: {
13
+ 'spiffy-tw-bg-[--spiffy-colors-background-dark]': true,
14
+ 'spiffy-tw-text-[--spiffy-colors-background-primary]': true,
15
+ },
16
+ tertiary: {
17
+ 'spiffy-tw-text-[--spiffy-colors-background-primary]': true,
18
+ 'spiffy-tw-bg-[--spiffy-colors-background-tertiary]': true,
19
+ },
20
+ };
21
+
22
+ export const ModalSheetCloseIcon = ({
23
+ closeIconVariant = 'tertiary',
24
+ closeIcon = <GrFormClose />,
25
+ iconSize = '20px',
26
+ closeModal,
27
+ }: ModalSheetCloseIconProps) => {
28
+ const closeIconClassNames = classNames({
29
+ 'spiffy-modal-sheet-close-icon': true,
30
+ 'spiffy-tw-rounded-[99px]': true,
31
+ ...closeIconVariantMapping[closeIconVariant],
32
+ });
33
+
34
+ const closeIconContextValue = useMemo(() => ({ size: iconSize }), [iconSize]);
35
+ return (
36
+ <div className={closeIconClassNames} onClick={closeModal}>
37
+ <IconContext.Provider value={closeIconContextValue}>{closeIcon}</IconContext.Provider>
38
+ </div>
39
+ );
40
+ };
@@ -0,0 +1,30 @@
1
+ import classNames from 'classnames';
2
+ import { useAtomValue } from 'jotai';
3
+ import { WatermarkLogo } from 'src/assets';
4
+ import { orgUIConfigAtom } from 'src/atoms/org/orgUIConfig';
5
+
6
+ export const EnviveWatermark = () => {
7
+ const { floatingChatConfig } = useAtomValue(orgUIConfigAtom);
8
+ if (!floatingChatConfig.enableWatermark) {
9
+ return null;
10
+ }
11
+ const wrapperClasses = classNames({
12
+ 'spiffy-watermark-wrapper': true,
13
+ 'spiffy-tw-flex': true,
14
+ 'spiffy-tw-align-middle': true,
15
+ 'spiffy-tw-pt-[4px]': true,
16
+ 'spiffy-tw-justify-center': true,
17
+ });
18
+ const watermarkClasses = classNames({
19
+ 'spiffy-watermark-logo': true,
20
+ 'spiffy-tw-py-[4px]': true,
21
+ 'spiffy-tw-px-[8px]': true,
22
+ });
23
+ return (
24
+ <a className={wrapperClasses} target="_blank" rel="noreferrer" href="https://www.envive.ai/">
25
+ <div title="Powered by Envive" className={watermarkClasses}>
26
+ <WatermarkLogo />
27
+ </div>
28
+ </a>
29
+ );
30
+ };
@@ -0,0 +1,24 @@
1
+ import classNames from 'classnames';
2
+ import { ModalSheetHeaderProps } from '../types';
3
+
4
+ const modalSheetVariants = {
5
+ primary: {
6
+ 'spiffy-tw-bg-[--spiffy-colors-background-primary]': true,
7
+ 'spiffy-tw-text-[--spiffy-colors-text-light]': true,
8
+ },
9
+ };
10
+
11
+ export const ModalSheetDesktopHeader = ({
12
+ headerVariant = 'primary',
13
+ headerContent,
14
+ }: ModalSheetHeaderProps) => {
15
+ const headerStyles = classNames({
16
+ 'spiffy-modal-sheet-header': true,
17
+ 'spiffy-tw-flex': true,
18
+ 'spiffy-tw-items-center': true,
19
+ 'spiffy-tw-justify-between': true,
20
+ 'spiffy-tw-w-full': true,
21
+ ...modalSheetVariants[headerVariant],
22
+ });
23
+ return <div className={headerStyles}>{headerContent}</div>;
24
+ };