@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.
Files changed (158) hide show
  1. package/dist/Accordion/index.cjs +4 -0
  2. package/dist/Accordion/index.d.cts +13 -0
  3. package/dist/Accordion/index.d.ts +13 -0
  4. package/dist/Accordion/index.js +4 -0
  5. package/dist/Accordion-DxtXK__u.js +77 -0
  6. package/dist/Accordion-RpyCFs2a.cjs +88 -0
  7. package/dist/AnimatedChevron/index.cjs +3 -0
  8. package/dist/AnimatedChevron/index.d.cts +14 -0
  9. package/dist/AnimatedChevron/index.d.ts +14 -0
  10. package/dist/AnimatedChevron/index.js +3 -0
  11. package/dist/AnimatedChevron-Bik7GMSe.js +29 -0
  12. package/dist/AnimatedChevron-Q96FneFy.cjs +37 -0
  13. package/dist/AppliedFiltersScrollbar/index.cjs +46 -0
  14. package/dist/AppliedFiltersScrollbar/index.d.cts +22 -0
  15. package/dist/AppliedFiltersScrollbar/index.d.ts +22 -0
  16. package/dist/AppliedFiltersScrollbar/index.js +42 -0
  17. package/dist/ButtonBase/index.cjs +6 -0
  18. package/dist/ButtonBase/index.d.cts +42 -0
  19. package/dist/ButtonBase/index.d.ts +42 -0
  20. package/dist/ButtonBase/index.js +5 -0
  21. package/dist/ButtonBase-6wjsZ1tU.js +60 -0
  22. package/dist/ButtonBase-AU23oGQr.cjs +75 -0
  23. package/dist/ButtonBase-C_uKnl48.js +1 -0
  24. package/dist/ButtonBase-DbWQ25n-.cjs +0 -0
  25. package/dist/DynamicFiltersScrollbar/index.cjs +34 -0
  26. package/dist/DynamicFiltersScrollbar/index.d.cts +28 -0
  27. package/dist/DynamicFiltersScrollbar/index.d.ts +28 -0
  28. package/dist/DynamicFiltersScrollbar/index.js +30 -0
  29. package/dist/DynamicFiltersScrollbar-50i_InZz.cjs +81 -0
  30. package/dist/DynamicFiltersScrollbar-AhyHehrB.js +66 -0
  31. package/dist/FilterScrollbar/index.cjs +5 -0
  32. package/dist/FilterScrollbar/index.d.cts +47 -0
  33. package/dist/FilterScrollbar/index.d.ts +47 -0
  34. package/dist/FilterScrollbar/index.js +4 -0
  35. package/dist/ImageWithFallback/index.cjs +3 -0
  36. package/dist/ImageWithFallback/index.d.cts +26 -0
  37. package/dist/ImageWithFallback/index.d.ts +26 -0
  38. package/dist/ImageWithFallback/index.js +3 -0
  39. package/dist/ImageWithFallback-1LqhQK1q.cjs +51 -0
  40. package/dist/ImageWithFallback-Ckwsmd8P.js +42 -0
  41. package/dist/ModalSheet/index.cjs +4 -0
  42. package/dist/ModalSheet/index.d.cts +38 -0
  43. package/dist/ModalSheet/index.d.ts +38 -0
  44. package/dist/ModalSheet/index.js +4 -0
  45. package/dist/ModalSheet-BSj_g9JF.js +302 -0
  46. package/dist/ModalSheet-CcthFeMD.cjs +313 -0
  47. package/dist/ProductCard/index.cjs +15 -0
  48. package/dist/ProductCard/index.d.cts +2 -0
  49. package/dist/ProductCard/index.d.ts +2 -0
  50. package/dist/ProductCard/index.js +6 -0
  51. package/dist/ProductCard-BIlnM2nV.js +254 -0
  52. package/dist/ProductCard-CByKIsUN.cjs +318 -0
  53. package/dist/ProductGrid/index.cjs +8 -0
  54. package/dist/ProductGrid/index.d.cts +33 -0
  55. package/dist/ProductGrid/index.d.ts +33 -0
  56. package/dist/ProductGrid/index.js +7 -0
  57. package/dist/ProductGrid-BeFeluHo.cjs +74 -0
  58. package/dist/ProductGrid-Cgkb4vNf.js +60 -0
  59. package/dist/RadioButton/index.cjs +4 -0
  60. package/dist/RadioButton/index.d.cts +32 -0
  61. package/dist/RadioButton/index.d.ts +32 -0
  62. package/dist/RadioButton/index.js +4 -0
  63. package/dist/RadioButton-C_soBi7w.js +75 -0
  64. package/dist/RadioButton-DG0PgZbz.cjs +84 -0
  65. package/dist/RadioButtonGroup/index.cjs +6 -0
  66. package/dist/RadioButtonGroup/index.d.cts +36 -0
  67. package/dist/RadioButtonGroup/index.d.ts +36 -0
  68. package/dist/RadioButtonGroup/index.js +5 -0
  69. package/dist/RadioButtonGroup-3t2kqSFA.cjs +52 -0
  70. package/dist/RadioButtonGroup-DMbVgPQH.js +38 -0
  71. package/dist/SearchAutocomplete/index.cjs +3 -0
  72. package/dist/SearchAutocomplete/index.d.cts +13 -0
  73. package/dist/SearchAutocomplete/index.d.ts +13 -0
  74. package/dist/SearchAutocomplete/index.js +3 -0
  75. package/dist/SearchAutocomplete-TX8UTczp.cjs +62 -0
  76. package/dist/SearchAutocomplete-obO19yzL.js +51 -0
  77. package/dist/SearchFilter/index.cjs +17 -0
  78. package/dist/SearchFilter/index.d.cts +91 -0
  79. package/dist/SearchFilter/index.d.ts +91 -0
  80. package/dist/SearchFilter/index.js +12 -0
  81. package/dist/SearchFilter-BQW4o3Xf.js +268 -0
  82. package/dist/SearchFilter-t9or-lnj.cjs +307 -0
  83. package/dist/SearchInput/index.cjs +8 -0
  84. package/dist/SearchInput/index.d.cts +34 -0
  85. package/dist/SearchInput/index.d.ts +34 -0
  86. package/dist/SearchInput/index.js +7 -0
  87. package/dist/SearchInput-BaiWd0_O.js +108 -0
  88. package/dist/SearchInput-CO1poiit.cjs +124 -0
  89. package/dist/SearchInputForm/index.cjs +40 -0
  90. package/dist/SearchInputForm/index.d.cts +34 -0
  91. package/dist/SearchInputForm/index.d.ts +34 -0
  92. package/dist/SearchInputForm/index.js +38 -0
  93. package/dist/SearchResultsContent/index.cjs +44 -0
  94. package/dist/SearchResultsContent/index.d.cts +48 -0
  95. package/dist/SearchResultsContent/index.d.ts +48 -0
  96. package/dist/SearchResultsContent/index.js +41 -0
  97. package/dist/SearchResultsFilterSidebar/index.cjs +59 -0
  98. package/dist/SearchResultsFilterSidebar/index.d.cts +2 -0
  99. package/dist/SearchResultsFilterSidebar/index.d.ts +2 -0
  100. package/dist/SearchResultsFilterSidebar/index.js +55 -0
  101. package/dist/SearchResultsStates/index.cjs +14 -0
  102. package/dist/SearchResultsStates/index.d.cts +69 -0
  103. package/dist/SearchResultsStates/index.d.ts +69 -0
  104. package/dist/SearchResultsStates/index.js +12 -0
  105. package/dist/SearchResultsStates-Bv5NyxPn.cjs +132 -0
  106. package/dist/SearchResultsStates-DUG-117h.js +110 -0
  107. package/dist/SettingsVariant-BsBbdjV5.cjs +63 -0
  108. package/dist/SettingsVariant-CUSFlJEu.js +55 -0
  109. package/dist/SparkleAnimation/index.cjs +4 -0
  110. package/dist/SparkleAnimation/index.d.cts +23 -0
  111. package/dist/SparkleAnimation/index.d.ts +23 -0
  112. package/dist/SparkleAnimation/index.js +3 -0
  113. package/dist/SparkleAnimation-Bm3fk2FJ.cjs +101 -0
  114. package/dist/SparkleAnimation-D1QjYho_.js +84 -0
  115. package/dist/Spinner/index.cjs +3 -0
  116. package/dist/Spinner/index.d.cts +11 -0
  117. package/dist/Spinner/index.d.ts +11 -0
  118. package/dist/Spinner/index.js +3 -0
  119. package/dist/Spinner-BqTt55uu.js +38 -0
  120. package/dist/Spinner-DjK8ts9E.cjs +46 -0
  121. package/dist/SuggestionButton/index.cjs +187 -0
  122. package/dist/SuggestionButton/index.d.cts +35 -0
  123. package/dist/SuggestionButton/index.d.ts +35 -0
  124. package/dist/SuggestionButton/index.js +179 -0
  125. package/dist/TextInput/index.cjs +4 -0
  126. package/dist/TextInput/index.d.cts +13 -0
  127. package/dist/TextInput/index.d.ts +13 -0
  128. package/dist/TextInput/index.js +4 -0
  129. package/dist/TextInput-B_4Bu2vf.js +31 -0
  130. package/dist/TextInput-iAKCKHwT.cjs +40 -0
  131. package/dist/ToggleButton/index.cjs +4 -0
  132. package/dist/ToggleButton/index.d.cts +30 -0
  133. package/dist/ToggleButton/index.d.ts +30 -0
  134. package/dist/ToggleButton/index.js +4 -0
  135. package/dist/ToggleButton-Br6MgjiG.js +60 -0
  136. package/dist/ToggleButton-CJ74eu-N.cjs +68 -0
  137. package/dist/Typography/index.cjs +6 -0
  138. package/dist/Typography/index.d.cts +3 -0
  139. package/dist/Typography/index.d.ts +3 -0
  140. package/dist/Typography/index.js +3 -0
  141. package/dist/Typography-CFNWgbM5.cjs +176 -0
  142. package/dist/Typography-D3vDkBMS.js +150 -0
  143. package/dist/chunk-CUT6urMc.cjs +30 -0
  144. package/dist/colorsConfig-D-MZuBvt.cjs +38 -0
  145. package/dist/colorsConfig-DEfiLHH0.js +26 -0
  146. package/dist/index-B5p2z61Y.d.ts +325 -0
  147. package/dist/index-BH-QK27q.d.ts +31 -0
  148. package/dist/index-BMHF0IWd.d.cts +31 -0
  149. package/dist/index-BcvJf9Sr.d.ts +46 -0
  150. package/dist/index-DDp-fLgm.d.cts +325 -0
  151. package/dist/index-Dfe_lkL2.d.cts +46 -0
  152. package/dist/searchFilterSidebarVariants-BD4SYugF.js +34 -0
  153. package/dist/searchFilterSidebarVariants-DXabOauB.cjs +39 -0
  154. package/dist/types-BhGjnuWx.d.cts +4 -0
  155. package/dist/types-CGRog8XL.d.ts +4 -0
  156. package/dist/typographyVariantClasses-COmQXqcN.d.ts +119 -0
  157. package/dist/typographyVariantClasses-DTSltxPN.d.cts +119 -0
  158. package/package.json +3 -3
@@ -0,0 +1,74 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_ProductCard = require('./ProductCard-CByKIsUN.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/ProductGrid/productGridVariants.ts
9
+ const productGridVariantClasses = {
10
+ standard: {
11
+ productCardVariant: "minimal",
12
+ productCardHoverVariant: "backgroundDark",
13
+ productCardLayoutVariant: "tall",
14
+ productCardImageAspectRatio: "3:4",
15
+ zoomOnHover: true
16
+ },
17
+ square: {
18
+ productCardVariant: "minimal",
19
+ productCardHoverVariant: "backgroundDark",
20
+ productCardLayoutVariant: "square",
21
+ productCardImageAspectRatio: "square",
22
+ zoomOnHover: true
23
+ }
24
+ };
25
+
26
+ //#endregion
27
+ //#region src/components/ProductGrid/ProductGrid.tsx
28
+ const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, cardsGrowWithContainer = true }) => {
29
+ const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
30
+ const cardContainerClasses = (0, classnames.default)({
31
+ "spiffy-tw-w-full": cardsGrowWithContainer,
32
+ "spiffy-tw-h-full": cardsGrowWithContainer
33
+ });
34
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
35
+ className: productGridClasses,
36
+ children: productList.map((product) => {
37
+ const camelCasedProduct = product;
38
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
39
+ className: cardContainerClasses,
40
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductCard.ProductCard, {
41
+ productCardConfig,
42
+ merchantShortName,
43
+ imageUrl: camelCasedProduct.imageUrl,
44
+ title: camelCasedProduct.title,
45
+ url: camelCasedProduct.url,
46
+ originalPrice: camelCasedProduct.originalPrice,
47
+ salePrice: camelCasedProduct.salePrice,
48
+ averageRating: camelCasedProduct.averageRating,
49
+ numberReviews: camelCasedProduct.numberReviews,
50
+ layoutVariant: productCardLayoutVariant,
51
+ variant: productCardVariant,
52
+ hoverVariant: productCardHoverVariant,
53
+ zoomOnHover,
54
+ aspectRatio: productCardImageAspectRatio,
55
+ growWithContainer: cardsGrowWithContainer
56
+ }, camelCasedProduct.id)
57
+ }, camelCasedProduct.id);
58
+ })
59
+ });
60
+ };
61
+
62
+ //#endregion
63
+ Object.defineProperty(exports, 'ProductGrid', {
64
+ enumerable: true,
65
+ get: function () {
66
+ return ProductGrid;
67
+ }
68
+ });
69
+ Object.defineProperty(exports, 'productGridVariantClasses', {
70
+ enumerable: true,
71
+ get: function () {
72
+ return productGridVariantClasses;
73
+ }
74
+ });
@@ -0,0 +1,60 @@
1
+ import { ProductCard } from "./ProductCard-BIlnM2nV.js";
2
+ import classNames from "classnames";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/components/ProductGrid/productGridVariants.ts
6
+ const productGridVariantClasses = {
7
+ standard: {
8
+ productCardVariant: "minimal",
9
+ productCardHoverVariant: "backgroundDark",
10
+ productCardLayoutVariant: "tall",
11
+ productCardImageAspectRatio: "3:4",
12
+ zoomOnHover: true
13
+ },
14
+ square: {
15
+ productCardVariant: "minimal",
16
+ productCardHoverVariant: "backgroundDark",
17
+ productCardLayoutVariant: "square",
18
+ productCardImageAspectRatio: "square",
19
+ zoomOnHover: true
20
+ }
21
+ };
22
+
23
+ //#endregion
24
+ //#region src/components/ProductGrid/ProductGrid.tsx
25
+ const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, cardsGrowWithContainer = true }) => {
26
+ const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
27
+ const cardContainerClasses = classNames({
28
+ "spiffy-tw-w-full": cardsGrowWithContainer,
29
+ "spiffy-tw-h-full": cardsGrowWithContainer
30
+ });
31
+ return /* @__PURE__ */ jsx("div", {
32
+ className: productGridClasses,
33
+ children: productList.map((product) => {
34
+ const camelCasedProduct = product;
35
+ return /* @__PURE__ */ jsx("div", {
36
+ className: cardContainerClasses,
37
+ children: /* @__PURE__ */ jsx(ProductCard, {
38
+ productCardConfig,
39
+ merchantShortName,
40
+ imageUrl: camelCasedProduct.imageUrl,
41
+ title: camelCasedProduct.title,
42
+ url: camelCasedProduct.url,
43
+ originalPrice: camelCasedProduct.originalPrice,
44
+ salePrice: camelCasedProduct.salePrice,
45
+ averageRating: camelCasedProduct.averageRating,
46
+ numberReviews: camelCasedProduct.numberReviews,
47
+ layoutVariant: productCardLayoutVariant,
48
+ variant: productCardVariant,
49
+ hoverVariant: productCardHoverVariant,
50
+ zoomOnHover,
51
+ aspectRatio: productCardImageAspectRatio,
52
+ growWithContainer: cardsGrowWithContainer
53
+ }, camelCasedProduct.id)
54
+ }, camelCasedProduct.id);
55
+ })
56
+ });
57
+ };
58
+
59
+ //#endregion
60
+ export { ProductGrid, productGridVariantClasses };
@@ -0,0 +1,4 @@
1
+ require('../Typography-CFNWgbM5.cjs');
2
+ const require_RadioButton = require('../RadioButton-DG0PgZbz.cjs');
3
+
4
+ exports.RadioButton = require_RadioButton.RadioButton;
@@ -0,0 +1,32 @@
1
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
2
+ import { TestProps } from "@envive-ai/react-hooks/types";
3
+
4
+ //#region src/components/RadioButton/RadioButton.d.ts
5
+ interface RadioButtonProps extends TestProps {
6
+ isDisabled?: boolean;
7
+ label: string;
8
+ name: string;
9
+ value: string;
10
+ textButtonGap?: 'small' | 'medium' | 'large';
11
+ fillColor?: string;
12
+ hoverColor?: string;
13
+ uncheckedBorderColor?: string;
14
+ checked?: boolean;
15
+ onChange: (value: string) => void;
16
+ id: any;
17
+ }
18
+ declare const RadioButton: ({
19
+ isDisabled,
20
+ label,
21
+ name,
22
+ value,
23
+ textButtonGap,
24
+ fillColor,
25
+ hoverColor,
26
+ uncheckedBorderColor,
27
+ checked,
28
+ onChange,
29
+ id
30
+ }: RadioButtonProps) => react_jsx_runtime16.JSX.Element;
31
+ //#endregion
32
+ export { RadioButton };
@@ -0,0 +1,32 @@
1
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import { TestProps } from "@envive-ai/react-hooks/types";
3
+
4
+ //#region src/components/RadioButton/RadioButton.d.ts
5
+ interface RadioButtonProps extends TestProps {
6
+ isDisabled?: boolean;
7
+ label: string;
8
+ name: string;
9
+ value: string;
10
+ textButtonGap?: 'small' | 'medium' | 'large';
11
+ fillColor?: string;
12
+ hoverColor?: string;
13
+ uncheckedBorderColor?: string;
14
+ checked?: boolean;
15
+ onChange: (value: string) => void;
16
+ id: any;
17
+ }
18
+ declare const RadioButton: ({
19
+ isDisabled,
20
+ label,
21
+ name,
22
+ value,
23
+ textButtonGap,
24
+ fillColor,
25
+ hoverColor,
26
+ uncheckedBorderColor,
27
+ checked,
28
+ onChange,
29
+ id
30
+ }: RadioButtonProps) => react_jsx_runtime18.JSX.Element;
31
+ //#endregion
32
+ export { RadioButton };
@@ -0,0 +1,4 @@
1
+ import "../Typography-D3vDkBMS.js";
2
+ import { RadioButton } from "../RadioButton-C_soBi7w.js";
3
+
4
+ export { RadioButton };
@@ -0,0 +1,75 @@
1
+ import { Typography } from "./Typography-D3vDkBMS.js";
2
+ import { useState } from "react";
3
+ import classNames from "classnames";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/components/RadioButton/RadioButton.tsx
7
+ const RadioButton = ({ isDisabled = false, label, name, value, textButtonGap = "medium", fillColor, hoverColor, uncheckedBorderColor, checked = false, onChange, id }) => {
8
+ const [isHovered, setIsHovered] = useState(false);
9
+ const containerClassName = classNames({
10
+ "spiffy-tw-flex": true,
11
+ "spiffy-tw-items-center": true,
12
+ "spiffy-tw-group": true,
13
+ "spiffy-tw-gap-1": textButtonGap === "small",
14
+ "spiffy-tw-gap-2": textButtonGap === "medium",
15
+ "spiffy-tw-gap-4": textButtonGap === "large",
16
+ "spiffy-tw-cursor-pointer": !isDisabled,
17
+ "spiffy-tw-opacity-40": isDisabled
18
+ });
19
+ const getFillColor = () => {
20
+ if (isHovered && hoverColor) return hoverColor;
21
+ if (checked) return fillColor;
22
+ return uncheckedBorderColor;
23
+ };
24
+ const handleChange = () => {
25
+ if (!isDisabled) onChange(value);
26
+ };
27
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
28
+ /* @__PURE__ */ jsx("label", {
29
+ className: containerClassName,
30
+ onMouseEnter: () => !isDisabled && setIsHovered(true),
31
+ onMouseLeave: () => setIsHovered(false),
32
+ "aria-label": label,
33
+ htmlFor: id,
34
+ children: label
35
+ }),
36
+ /* @__PURE__ */ jsxs("div", {
37
+ className: "spiffy-tw-relative",
38
+ children: [/* @__PURE__ */ jsx("input", {
39
+ type: "radio",
40
+ id,
41
+ name,
42
+ value,
43
+ checked,
44
+ disabled: isDisabled,
45
+ onChange: handleChange,
46
+ className: "spiffy-tw-sr-only"
47
+ }), /* @__PURE__ */ jsxs("svg", {
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ width: "24",
50
+ height: "24",
51
+ viewBox: "0 0 24 24",
52
+ fill: "none",
53
+ children: [/* @__PURE__ */ jsx("circle", {
54
+ cx: "12",
55
+ cy: "12",
56
+ r: "11.5",
57
+ fill: "white",
58
+ stroke: getFillColor()
59
+ }), checked && /* @__PURE__ */ jsx("circle", {
60
+ cx: "12",
61
+ cy: "12",
62
+ r: "9",
63
+ fill: getFillColor()
64
+ })]
65
+ })]
66
+ }),
67
+ /* @__PURE__ */ jsx(Typography, {
68
+ variant: "body3",
69
+ children: label
70
+ })
71
+ ] });
72
+ };
73
+
74
+ //#endregion
75
+ export { RadioButton };
@@ -0,0 +1,84 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_Typography = require('./Typography-CFNWgbM5.cjs');
3
+ let react = require("react");
4
+ react = require_chunk.__toESM(react);
5
+ let classnames = require("classnames");
6
+ classnames = require_chunk.__toESM(classnames);
7
+ let react_jsx_runtime = require("react/jsx-runtime");
8
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
9
+
10
+ //#region src/components/RadioButton/RadioButton.tsx
11
+ const RadioButton = ({ isDisabled = false, label, name, value, textButtonGap = "medium", fillColor, hoverColor, uncheckedBorderColor, checked = false, onChange, id }) => {
12
+ const [isHovered, setIsHovered] = (0, react.useState)(false);
13
+ const containerClassName = (0, classnames.default)({
14
+ "spiffy-tw-flex": true,
15
+ "spiffy-tw-items-center": true,
16
+ "spiffy-tw-group": true,
17
+ "spiffy-tw-gap-1": textButtonGap === "small",
18
+ "spiffy-tw-gap-2": textButtonGap === "medium",
19
+ "spiffy-tw-gap-4": textButtonGap === "large",
20
+ "spiffy-tw-cursor-pointer": !isDisabled,
21
+ "spiffy-tw-opacity-40": isDisabled
22
+ });
23
+ const getFillColor = () => {
24
+ if (isHovered && hoverColor) return hoverColor;
25
+ if (checked) return fillColor;
26
+ return uncheckedBorderColor;
27
+ };
28
+ const handleChange = () => {
29
+ if (!isDisabled) onChange(value);
30
+ };
31
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
32
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
33
+ className: containerClassName,
34
+ onMouseEnter: () => !isDisabled && setIsHovered(true),
35
+ onMouseLeave: () => setIsHovered(false),
36
+ "aria-label": label,
37
+ htmlFor: id,
38
+ children: label
39
+ }),
40
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
41
+ className: "spiffy-tw-relative",
42
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
43
+ type: "radio",
44
+ id,
45
+ name,
46
+ value,
47
+ checked,
48
+ disabled: isDisabled,
49
+ onChange: handleChange,
50
+ className: "spiffy-tw-sr-only"
51
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
52
+ xmlns: "http://www.w3.org/2000/svg",
53
+ width: "24",
54
+ height: "24",
55
+ viewBox: "0 0 24 24",
56
+ fill: "none",
57
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
58
+ cx: "12",
59
+ cy: "12",
60
+ r: "11.5",
61
+ fill: "white",
62
+ stroke: getFillColor()
63
+ }), checked && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
64
+ cx: "12",
65
+ cy: "12",
66
+ r: "9",
67
+ fill: getFillColor()
68
+ })]
69
+ })]
70
+ }),
71
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
72
+ variant: "body3",
73
+ children: label
74
+ })
75
+ ] });
76
+ };
77
+
78
+ //#endregion
79
+ Object.defineProperty(exports, 'RadioButton', {
80
+ enumerable: true,
81
+ get: function () {
82
+ return RadioButton;
83
+ }
84
+ });
@@ -0,0 +1,6 @@
1
+ require('../Typography-CFNWgbM5.cjs');
2
+ require('../RadioButton-DG0PgZbz.cjs');
3
+ const require_RadioButtonGroup = require('../RadioButtonGroup-3t2kqSFA.cjs');
4
+
5
+ exports.RadioButtonGroup = require_RadioButtonGroup.RadioButtonGroup;
6
+ exports.SPIFFY_RADIO_BUTTON_GROUP_CLASS = require_RadioButtonGroup.SPIFFY_RADIO_BUTTON_GROUP_CLASS;
@@ -0,0 +1,36 @@
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import { TestProps } from "@envive-ai/react-hooks/types";
3
+
4
+ //#region src/components/RadioButtonGroup/RadioButtonGroup.d.ts
5
+ declare const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
6
+ interface RadioButtonOption {
7
+ label: string;
8
+ value: string;
9
+ disabled?: boolean;
10
+ }
11
+ interface RadioButtonGroupProps extends TestProps {
12
+ name: string;
13
+ options: RadioButtonOption[];
14
+ fillColor?: string;
15
+ hoverColor?: string;
16
+ value?: string;
17
+ isDisabled?: boolean;
18
+ gap?: 'small' | 'medium' | 'large';
19
+ textButtonGap?: 'small' | 'medium' | 'large';
20
+ onChange: (value: string) => void;
21
+ uncheckedBorderColor?: string;
22
+ }
23
+ declare const RadioButtonGroup: ({
24
+ name,
25
+ options,
26
+ fillColor,
27
+ hoverColor,
28
+ uncheckedBorderColor,
29
+ value,
30
+ isDisabled,
31
+ gap,
32
+ textButtonGap,
33
+ onChange
34
+ }: RadioButtonGroupProps) => react_jsx_runtime6.JSX.Element;
35
+ //#endregion
36
+ export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
@@ -0,0 +1,36 @@
1
+ import * as react_jsx_runtime24 from "react/jsx-runtime";
2
+ import { TestProps } from "@envive-ai/react-hooks/types";
3
+
4
+ //#region src/components/RadioButtonGroup/RadioButtonGroup.d.ts
5
+ declare const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
6
+ interface RadioButtonOption {
7
+ label: string;
8
+ value: string;
9
+ disabled?: boolean;
10
+ }
11
+ interface RadioButtonGroupProps extends TestProps {
12
+ name: string;
13
+ options: RadioButtonOption[];
14
+ fillColor?: string;
15
+ hoverColor?: string;
16
+ value?: string;
17
+ isDisabled?: boolean;
18
+ gap?: 'small' | 'medium' | 'large';
19
+ textButtonGap?: 'small' | 'medium' | 'large';
20
+ onChange: (value: string) => void;
21
+ uncheckedBorderColor?: string;
22
+ }
23
+ declare const RadioButtonGroup: ({
24
+ name,
25
+ options,
26
+ fillColor,
27
+ hoverColor,
28
+ uncheckedBorderColor,
29
+ value,
30
+ isDisabled,
31
+ gap,
32
+ textButtonGap,
33
+ onChange
34
+ }: RadioButtonGroupProps) => react_jsx_runtime24.JSX.Element;
35
+ //#endregion
36
+ export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
@@ -0,0 +1,5 @@
1
+ import "../Typography-D3vDkBMS.js";
2
+ import "../RadioButton-C_soBi7w.js";
3
+ import { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS } from "../RadioButtonGroup-DMbVgPQH.js";
4
+
5
+ export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
@@ -0,0 +1,52 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_RadioButton = require('./RadioButton-DG0PgZbz.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/RadioButtonGroup/RadioButtonGroup.tsx
9
+ const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
10
+ const RadioButtonGroup = ({ name, options, fillColor, hoverColor, uncheckedBorderColor, value, isDisabled = false, gap = "medium", textButtonGap = "medium", onChange }) => {
11
+ const groupClassName = (0, classnames.default)({
12
+ [SPIFFY_RADIO_BUTTON_GROUP_CLASS]: true,
13
+ "spiffy-tw-flex": true,
14
+ "spiffy-tw-flex-col": true,
15
+ "spiffy-tw-gap-1": gap === "small",
16
+ "spiffy-tw-gap-2": gap === "medium",
17
+ "spiffy-tw-gap-4": gap === "large"
18
+ });
19
+ const handleChange = (selectedValue) => {
20
+ if (!isDisabled) onChange(selectedValue);
21
+ };
22
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
23
+ className: groupClassName,
24
+ children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_RadioButton.RadioButton, {
25
+ id: option.value,
26
+ name,
27
+ value: option.value,
28
+ fillColor,
29
+ hoverColor,
30
+ uncheckedBorderColor,
31
+ label: option.label,
32
+ checked: value === option.value,
33
+ isDisabled: isDisabled || option.disabled,
34
+ onChange: handleChange,
35
+ textButtonGap
36
+ }, option.value))
37
+ });
38
+ };
39
+
40
+ //#endregion
41
+ Object.defineProperty(exports, 'RadioButtonGroup', {
42
+ enumerable: true,
43
+ get: function () {
44
+ return RadioButtonGroup;
45
+ }
46
+ });
47
+ Object.defineProperty(exports, 'SPIFFY_RADIO_BUTTON_GROUP_CLASS', {
48
+ enumerable: true,
49
+ get: function () {
50
+ return SPIFFY_RADIO_BUTTON_GROUP_CLASS;
51
+ }
52
+ });
@@ -0,0 +1,38 @@
1
+ import { RadioButton } from "./RadioButton-C_soBi7w.js";
2
+ import classNames from "classnames";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/components/RadioButtonGroup/RadioButtonGroup.tsx
6
+ const SPIFFY_RADIO_BUTTON_GROUP_CLASS = "spiffy-radio-button-group-class";
7
+ const RadioButtonGroup = ({ name, options, fillColor, hoverColor, uncheckedBorderColor, value, isDisabled = false, gap = "medium", textButtonGap = "medium", onChange }) => {
8
+ const groupClassName = classNames({
9
+ [SPIFFY_RADIO_BUTTON_GROUP_CLASS]: true,
10
+ "spiffy-tw-flex": true,
11
+ "spiffy-tw-flex-col": true,
12
+ "spiffy-tw-gap-1": gap === "small",
13
+ "spiffy-tw-gap-2": gap === "medium",
14
+ "spiffy-tw-gap-4": gap === "large"
15
+ });
16
+ const handleChange = (selectedValue) => {
17
+ if (!isDisabled) onChange(selectedValue);
18
+ };
19
+ return /* @__PURE__ */ jsx("div", {
20
+ className: groupClassName,
21
+ children: options.map((option) => /* @__PURE__ */ jsx(RadioButton, {
22
+ id: option.value,
23
+ name,
24
+ value: option.value,
25
+ fillColor,
26
+ hoverColor,
27
+ uncheckedBorderColor,
28
+ label: option.label,
29
+ checked: value === option.value,
30
+ isDisabled: isDisabled || option.disabled,
31
+ onChange: handleChange,
32
+ textButtonGap
33
+ }, option.value))
34
+ });
35
+ };
36
+
37
+ //#endregion
38
+ export { RadioButtonGroup, SPIFFY_RADIO_BUTTON_GROUP_CLASS };
@@ -0,0 +1,3 @@
1
+ const require_SearchAutocomplete = require('../SearchAutocomplete-TX8UTczp.cjs');
2
+
3
+ exports.SearchAutocomplete = require_SearchAutocomplete.SearchAutocomplete;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+
3
+ //#region src/components/SearchAutocomplete/SearchAutocomplete.d.ts
4
+ interface GlobalSearchAutocompleteProps {
5
+ id: string;
6
+ results: string[];
7
+ focusedIndex: number;
8
+ onSuggestionSelect: (suggestion: string, rankPosition: number) => void;
9
+ iconColor?: string;
10
+ }
11
+ declare const SearchAutocomplete: React.FC<GlobalSearchAutocompleteProps>;
12
+ //#endregion
13
+ export { SearchAutocomplete };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+
3
+ //#region src/components/SearchAutocomplete/SearchAutocomplete.d.ts
4
+ interface GlobalSearchAutocompleteProps {
5
+ id: string;
6
+ results: string[];
7
+ focusedIndex: number;
8
+ onSuggestionSelect: (suggestion: string, rankPosition: number) => void;
9
+ iconColor?: string;
10
+ }
11
+ declare const SearchAutocomplete: React.FC<GlobalSearchAutocompleteProps>;
12
+ //#endregion
13
+ export { SearchAutocomplete };
@@ -0,0 +1,3 @@
1
+ import { SearchAutocomplete } from "../SearchAutocomplete-obO19yzL.js";
2
+
3
+ export { SearchAutocomplete };
@@ -0,0 +1,62 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ let framer_motion = require("framer-motion");
3
+ framer_motion = require_chunk.__toESM(framer_motion);
4
+ let react = require("react");
5
+ react = require_chunk.__toESM(react);
6
+ let classnames = require("classnames");
7
+ classnames = require_chunk.__toESM(classnames);
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
10
+ let __envive_ai_react_icons_OutlinedStar = require("@envive-ai/react-icons/OutlinedStar");
11
+ __envive_ai_react_icons_OutlinedStar = require_chunk.__toESM(__envive_ai_react_icons_OutlinedStar);
12
+
13
+ //#region src/components/SearchAutocomplete/SearchAutocomplete.tsx
14
+ const SearchAutocomplete = ({ id, results, focusedIndex, onSuggestionSelect, iconColor }) => {
15
+ if (results.length === 0) return null;
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
17
+ className: "spiffy-tw-h-full",
18
+ initial: {
19
+ opacity: 0,
20
+ y: -10
21
+ },
22
+ animate: {
23
+ opacity: 1,
24
+ y: 0
25
+ },
26
+ exit: {
27
+ opacity: 0,
28
+ y: -10
29
+ },
30
+ transition: { duration: .2 },
31
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
32
+ id,
33
+ role: "listbox",
34
+ className: "spiffy-tw-mt-4 spiffy-tw-space-y-2",
35
+ children: results.map((result, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
36
+ id: `option-${index}`,
37
+ role: "option",
38
+ "aria-selected": index === focusedIndex,
39
+ className: (0, classnames.default)("spiffy-tw-flex spiffy-tw-items-center spiffy-tw-cursor-pointer spiffy-tw-py-1", { "spiffy-tw-bg-neutral-200": index === focusedIndex }, "hover:spiffy-tw-bg-neutral-100"),
40
+ onClick: () => onSuggestionSelect(result, index),
41
+ onKeyDown: (event) => {
42
+ if (event.key === "Enter" || event.keyCode === 13) onSuggestionSelect(result, index);
43
+ },
44
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_OutlinedStar.default, {
45
+ className: "spiffy-tw-w-[16px] spiffy-tw-h-[16px] spiffy-tw-mr-2",
46
+ fill: iconColor
47
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
48
+ className: "spiffy-tw-font-bold",
49
+ children: result
50
+ })]
51
+ }, index))
52
+ })
53
+ });
54
+ };
55
+
56
+ //#endregion
57
+ Object.defineProperty(exports, 'SearchAutocomplete', {
58
+ enumerable: true,
59
+ get: function () {
60
+ return SearchAutocomplete;
61
+ }
62
+ });