@envive-ai/react-toolkit 0.2.2 → 0.2.3

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-2aPkjS8z.js +254 -0
  52. package/dist/ProductCard-D1F9A8Rw.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-Dcy7JxVN.cjs +74 -0
  58. package/dist/ProductGrid-NtuMrOtp.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-CalOf6QP.js +110 -0
  106. package/dist/SearchResultsStates-DQlstrHd.cjs +132 -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-B1IEMa00.cjs +46 -0
  120. package/dist/Spinner-BrHoB-Zg.js +38 -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-B-5pBFE7.d.cts +46 -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-BzY_al-V.d.ts +325 -0
  151. package/dist/index-cx3r6TgQ.d.cts +325 -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,4 @@
1
+ require('../Typography-CFNWgbM5.cjs');
2
+ const require_Accordion = require('../Accordion-RpyCFs2a.cjs');
3
+
4
+ exports.Accordion = require_Accordion.Accordion;
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
2
+
3
+ //#region src/components/Accordion/Accordion.d.ts
4
+ interface AccordionProps {
5
+ title: string;
6
+ content: React.ReactNode;
7
+ }
8
+ declare const Accordion: ({
9
+ title,
10
+ content
11
+ }: AccordionProps) => react_jsx_runtime22.JSX.Element;
12
+ //#endregion
13
+ export { Accordion };
@@ -0,0 +1,13 @@
1
+ import * as react_jsx_runtime24 from "react/jsx-runtime";
2
+
3
+ //#region src/components/Accordion/Accordion.d.ts
4
+ interface AccordionProps {
5
+ title: string;
6
+ content: React.ReactNode;
7
+ }
8
+ declare const Accordion: ({
9
+ title,
10
+ content
11
+ }: AccordionProps) => react_jsx_runtime24.JSX.Element;
12
+ //#endregion
13
+ export { Accordion };
@@ -0,0 +1,4 @@
1
+ import "../Typography-D3vDkBMS.js";
2
+ import { Accordion } from "../Accordion-DxtXK__u.js";
3
+
4
+ export { Accordion };
@@ -0,0 +1,77 @@
1
+ import { Typography } from "./Typography-D3vDkBMS.js";
2
+ import { motion } from "framer-motion";
3
+ import { useRef, useState } from "react";
4
+ import classNames from "classnames";
5
+ import ChevronDown from "@envive-ai/react-icons/ChevronDown";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+
8
+ //#region src/components/Accordion/Accordion.tsx
9
+ const ANIMATION_DURATION = .3;
10
+ const Accordion = ({ title, content }) => {
11
+ const [isOpen, setIsOpen] = useState(false);
12
+ const contentRef = useRef(null);
13
+ const titleWrapperClasses = classNames({
14
+ "spiffy-tw-border-b": true,
15
+ "spiffy-tw-border-[--spiffy-colors-border-light]": true,
16
+ "spiffy-tw-pb-2": true,
17
+ "spiffy-tw-flex": true,
18
+ "spiffy-tw-justify-between": true,
19
+ "spiffy-tw-items-center": true,
20
+ "spiffy-tw-w-full": true,
21
+ "spiffy-tw-group": true
22
+ });
23
+ const titleClasses = classNames({
24
+ "spiffy-tw-uppercase": true,
25
+ "spiffy-tw-text-[--spiffy-colors-text-primary]": true,
26
+ "!spiffy-tw-font-[400]": true,
27
+ "group-aria-expanded:!spiffy-tw-font-medium": true
28
+ });
29
+ const contentClasses = classNames({ "spiffy-tw-overflow-hidden": true });
30
+ return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("button", {
31
+ "aria-expanded": isOpen,
32
+ type: "button",
33
+ className: titleWrapperClasses,
34
+ onClick: () => setIsOpen(!isOpen),
35
+ children: [/* @__PURE__ */ jsx(Typography, {
36
+ variant: "body4",
37
+ className: titleClasses,
38
+ children: title
39
+ }), /* @__PURE__ */ jsx(motion.div, {
40
+ variants: {
41
+ open: { rotate: 180 },
42
+ closed: { rotate: 360 }
43
+ },
44
+ animate: isOpen ? "open" : "closed",
45
+ transition: {
46
+ duration: ANIMATION_DURATION,
47
+ ease: "easeOut"
48
+ },
49
+ children: /* @__PURE__ */ jsx(ChevronDown, {})
50
+ })]
51
+ }), /* @__PURE__ */ jsx(motion.div, {
52
+ variants: {
53
+ open: {
54
+ height: "auto",
55
+ marginTop: "24px",
56
+ marginBottom: "24px"
57
+ },
58
+ closed: {
59
+ height: "0px",
60
+ marginTop: "0px",
61
+ marginBottom: "0px"
62
+ }
63
+ },
64
+ className: contentClasses,
65
+ initial: { height: 0 },
66
+ animate: isOpen ? "open" : "closed",
67
+ transition: {
68
+ duration: ANIMATION_DURATION,
69
+ ease: "easeOut"
70
+ },
71
+ ref: contentRef,
72
+ children: content
73
+ })] });
74
+ };
75
+
76
+ //#endregion
77
+ export { Accordion };
@@ -0,0 +1,88 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_Typography = require('./Typography-CFNWgbM5.cjs');
3
+ let framer_motion = require("framer-motion");
4
+ framer_motion = require_chunk.__toESM(framer_motion);
5
+ let react = require("react");
6
+ react = require_chunk.__toESM(react);
7
+ let classnames = require("classnames");
8
+ classnames = require_chunk.__toESM(classnames);
9
+ let __envive_ai_react_icons_ChevronDown = require("@envive-ai/react-icons/ChevronDown");
10
+ __envive_ai_react_icons_ChevronDown = require_chunk.__toESM(__envive_ai_react_icons_ChevronDown);
11
+ let react_jsx_runtime = require("react/jsx-runtime");
12
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
13
+
14
+ //#region src/components/Accordion/Accordion.tsx
15
+ const ANIMATION_DURATION = .3;
16
+ const Accordion = ({ title, content }) => {
17
+ const [isOpen, setIsOpen] = (0, react.useState)(false);
18
+ const contentRef = (0, react.useRef)(null);
19
+ const titleWrapperClasses = (0, classnames.default)({
20
+ "spiffy-tw-border-b": true,
21
+ "spiffy-tw-border-[--spiffy-colors-border-light]": true,
22
+ "spiffy-tw-pb-2": true,
23
+ "spiffy-tw-flex": true,
24
+ "spiffy-tw-justify-between": true,
25
+ "spiffy-tw-items-center": true,
26
+ "spiffy-tw-w-full": true,
27
+ "spiffy-tw-group": true
28
+ });
29
+ const titleClasses = (0, classnames.default)({
30
+ "spiffy-tw-uppercase": true,
31
+ "spiffy-tw-text-[--spiffy-colors-text-primary]": true,
32
+ "!spiffy-tw-font-[400]": true,
33
+ "group-aria-expanded:!spiffy-tw-font-medium": true
34
+ });
35
+ const contentClasses = (0, classnames.default)({ "spiffy-tw-overflow-hidden": true });
36
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
37
+ "aria-expanded": isOpen,
38
+ type: "button",
39
+ className: titleWrapperClasses,
40
+ onClick: () => setIsOpen(!isOpen),
41
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
42
+ variant: "body4",
43
+ className: titleClasses,
44
+ children: title
45
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
46
+ variants: {
47
+ open: { rotate: 180 },
48
+ closed: { rotate: 360 }
49
+ },
50
+ animate: isOpen ? "open" : "closed",
51
+ transition: {
52
+ duration: ANIMATION_DURATION,
53
+ ease: "easeOut"
54
+ },
55
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_icons_ChevronDown.default, {})
56
+ })]
57
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
58
+ variants: {
59
+ open: {
60
+ height: "auto",
61
+ marginTop: "24px",
62
+ marginBottom: "24px"
63
+ },
64
+ closed: {
65
+ height: "0px",
66
+ marginTop: "0px",
67
+ marginBottom: "0px"
68
+ }
69
+ },
70
+ className: contentClasses,
71
+ initial: { height: 0 },
72
+ animate: isOpen ? "open" : "closed",
73
+ transition: {
74
+ duration: ANIMATION_DURATION,
75
+ ease: "easeOut"
76
+ },
77
+ ref: contentRef,
78
+ children: content
79
+ })] });
80
+ };
81
+
82
+ //#endregion
83
+ Object.defineProperty(exports, 'Accordion', {
84
+ enumerable: true,
85
+ get: function () {
86
+ return Accordion;
87
+ }
88
+ });
@@ -0,0 +1,3 @@
1
+ const require_AnimatedChevron = require('../AnimatedChevron-Q96FneFy.cjs');
2
+
3
+ exports.AnimatedChevron = require_AnimatedChevron.AnimatedChevron;
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import { MotionValue } from "framer-motion";
3
+
4
+ //#region src/components/AnimatedChevron/AnimatedChevron.d.ts
5
+ interface AnimatedChevronProps {
6
+ animationKey: MotionValue;
7
+ chevronColor: string;
8
+ }
9
+ declare const AnimatedChevron: ({
10
+ animationKey,
11
+ chevronColor
12
+ }: AnimatedChevronProps) => react_jsx_runtime3.JSX.Element;
13
+ //#endregion
14
+ export { AnimatedChevron };
@@ -0,0 +1,14 @@
1
+ import { MotionValue } from "framer-motion";
2
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
3
+
4
+ //#region src/components/AnimatedChevron/AnimatedChevron.d.ts
5
+ interface AnimatedChevronProps {
6
+ animationKey: MotionValue;
7
+ chevronColor: string;
8
+ }
9
+ declare const AnimatedChevron: ({
10
+ animationKey,
11
+ chevronColor
12
+ }: AnimatedChevronProps) => react_jsx_runtime10.JSX.Element;
13
+ //#endregion
14
+ export { AnimatedChevron };
@@ -0,0 +1,3 @@
1
+ import { AnimatedChevron } from "../AnimatedChevron-Bik7GMSe.js";
2
+
3
+ export { AnimatedChevron };
@@ -0,0 +1,29 @@
1
+ import { motion, useTransform } from "framer-motion";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+
4
+ //#region src/components/AnimatedChevron/AnimatedChevron.tsx
5
+ const AnimatedChevron = ({ animationKey, chevronColor }) => {
6
+ const leftRotation = useTransform(animationKey, [300, 0], [-12, 0]);
7
+ const rightRotation = useTransform(animationKey, [300, 0], [12, 0]);
8
+ return /* @__PURE__ */ jsxs("div", {
9
+ style: { display: "flex" },
10
+ children: [/* @__PURE__ */ jsx(motion.div, { style: {
11
+ x: 1,
12
+ width: "25px",
13
+ height: "4px",
14
+ background: chevronColor,
15
+ borderRadius: "8px",
16
+ rotate: leftRotation
17
+ } }), /* @__PURE__ */ jsx(motion.div, { style: {
18
+ x: -1,
19
+ width: "25px",
20
+ height: "4px",
21
+ background: chevronColor,
22
+ borderRadius: "8px",
23
+ rotate: rightRotation
24
+ } })]
25
+ });
26
+ };
27
+
28
+ //#endregion
29
+ export { AnimatedChevron };
@@ -0,0 +1,37 @@
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_jsx_runtime = require("react/jsx-runtime");
5
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
6
+
7
+ //#region src/components/AnimatedChevron/AnimatedChevron.tsx
8
+ const AnimatedChevron = ({ animationKey, chevronColor }) => {
9
+ const leftRotation = (0, framer_motion.useTransform)(animationKey, [300, 0], [-12, 0]);
10
+ const rightRotation = (0, framer_motion.useTransform)(animationKey, [300, 0], [12, 0]);
11
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12
+ style: { display: "flex" },
13
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, { style: {
14
+ x: 1,
15
+ width: "25px",
16
+ height: "4px",
17
+ background: chevronColor,
18
+ borderRadius: "8px",
19
+ rotate: leftRotation
20
+ } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, { style: {
21
+ x: -1,
22
+ width: "25px",
23
+ height: "4px",
24
+ background: chevronColor,
25
+ borderRadius: "8px",
26
+ rotate: rightRotation
27
+ } })]
28
+ });
29
+ };
30
+
31
+ //#endregion
32
+ Object.defineProperty(exports, 'AnimatedChevron', {
33
+ enumerable: true,
34
+ get: function () {
35
+ return AnimatedChevron;
36
+ }
37
+ });
@@ -0,0 +1,46 @@
1
+ const require_chunk = require('../chunk-CUT6urMc.cjs');
2
+ const require_Typography = require('../Typography-CFNWgbM5.cjs');
3
+ let classnames = require("classnames");
4
+ classnames = require_chunk.__toESM(classnames);
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
7
+ let react_indiana_drag_scroll = require("react-indiana-drag-scroll");
8
+ react_indiana_drag_scroll = require_chunk.__toESM(react_indiana_drag_scroll);
9
+
10
+ //#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx
11
+ const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter }) => {
12
+ if (selectedFilterOptions.length === 0) return null;
13
+ const filterDefaultWithoutBg = filterDefaultClasses.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, "").trim();
14
+ const buttonClasses = (0, classnames.default)(" spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap", filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
15
+ const iconColor = "currentColor";
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_indiana_drag_scroll.default, {
17
+ className: filterBarClassNames,
18
+ hideScrollbars: true,
19
+ children: selectedFilterOptions.map((filter) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
20
+ className: buttonClasses,
21
+ type: "button",
22
+ onClick: () => onRemoveFilter(filter),
23
+ "aria-label": `Remove filter: ${filter.displayName}`,
24
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
25
+ className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]",
26
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
27
+ variant: "body3",
28
+ children: filter.displayName
29
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
30
+ xmlns: "http://www.w3.org/2000/svg",
31
+ width: "10",
32
+ height: "10",
33
+ viewBox: "0 0 10 10",
34
+ fill: "none",
35
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
36
+ d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z",
37
+ fill: iconColor
38
+ })
39
+ })]
40
+ })
41
+ }, filter.id))
42
+ });
43
+ };
44
+
45
+ //#endregion
46
+ exports.AppliedFiltersScrollbar = AppliedFiltersScrollbar;
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime27 from "react/jsx-runtime";
2
+ import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
3
+
4
+ //#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.ts
5
+ interface AppliedFiltersScrollbarProps {
6
+ selectedFilterOptions: SelectedFilterOption[];
7
+ filterBarClassNames: string;
8
+ filterDefaultClasses: string;
9
+ filterHoverClasses: string;
10
+ appliedFilterBackgroundClasses: string;
11
+ onRemoveFilter: (filter: SelectedFilterOption) => void;
12
+ }
13
+ declare const AppliedFiltersScrollbar: ({
14
+ selectedFilterOptions,
15
+ filterBarClassNames,
16
+ filterDefaultClasses,
17
+ filterHoverClasses,
18
+ appliedFilterBackgroundClasses,
19
+ onRemoveFilter
20
+ }: AppliedFiltersScrollbarProps) => react_jsx_runtime27.JSX.Element;
21
+ //#endregion
22
+ export { AppliedFiltersScrollbar };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
+ import { SelectedFilterOption } from "@envive-ai/react-hooks/atoms/search";
3
+
4
+ //#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.ts
5
+ interface AppliedFiltersScrollbarProps {
6
+ selectedFilterOptions: SelectedFilterOption[];
7
+ filterBarClassNames: string;
8
+ filterDefaultClasses: string;
9
+ filterHoverClasses: string;
10
+ appliedFilterBackgroundClasses: string;
11
+ onRemoveFilter: (filter: SelectedFilterOption) => void;
12
+ }
13
+ declare const AppliedFiltersScrollbar: ({
14
+ selectedFilterOptions,
15
+ filterBarClassNames,
16
+ filterDefaultClasses,
17
+ filterHoverClasses,
18
+ appliedFilterBackgroundClasses,
19
+ onRemoveFilter
20
+ }: AppliedFiltersScrollbarProps) => react_jsx_runtime20.JSX.Element;
21
+ //#endregion
22
+ export { AppliedFiltersScrollbar };
@@ -0,0 +1,42 @@
1
+ import { Typography } from "../Typography-D3vDkBMS.js";
2
+ import classNames from "classnames";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import ScrollContainer from "react-indiana-drag-scroll";
5
+
6
+ //#region src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx
7
+ const AppliedFiltersScrollbar = ({ selectedFilterOptions, filterBarClassNames, filterDefaultClasses, filterHoverClasses, appliedFilterBackgroundClasses, onRemoveFilter }) => {
8
+ if (selectedFilterOptions.length === 0) return null;
9
+ const filterDefaultWithoutBg = filterDefaultClasses.replace(/spiffy-tw-bg-\[--spiffy-colors-[^\]]+\]/g, "").trim();
10
+ const buttonClasses = classNames(" spiffy-tw-flex spiffy-tw-items-center spiffy-tw-rounded-full spiffy-tw-px-[8px] spiffy-tw-py-[4px] spiffy-tw-whitespace-nowrap", filterHoverClasses, filterDefaultWithoutBg, appliedFilterBackgroundClasses);
11
+ const iconColor = "currentColor";
12
+ return /* @__PURE__ */ jsx(ScrollContainer, {
13
+ className: filterBarClassNames,
14
+ hideScrollbars: true,
15
+ children: selectedFilterOptions.map((filter) => /* @__PURE__ */ jsx("button", {
16
+ className: buttonClasses,
17
+ type: "button",
18
+ onClick: () => onRemoveFilter(filter),
19
+ "aria-label": `Remove filter: ${filter.displayName}`,
20
+ children: /* @__PURE__ */ jsxs("div", {
21
+ className: "spiffy-tw-flex spiffy-tw-items-center spiffy-tw-gap-[8px]",
22
+ children: [/* @__PURE__ */ jsx(Typography, {
23
+ variant: "body3",
24
+ children: filter.displayName
25
+ }), /* @__PURE__ */ jsx("svg", {
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ width: "10",
28
+ height: "10",
29
+ viewBox: "0 0 10 10",
30
+ fill: "none",
31
+ children: /* @__PURE__ */ jsx("path", {
32
+ d: "M4.59766 4.29297L8.48535 0.405273L9.19238 1.1123L5.30469 5L9.19238 8.8877L8.48535 9.59473L4.59766 5.70703L0.707031 9.59766L0 8.89062L3.89062 5L0 1.10938L0.707031 0.402344L4.59766 4.29297Z",
33
+ fill: iconColor
34
+ })
35
+ })]
36
+ })
37
+ }, filter.id))
38
+ });
39
+ };
40
+
41
+ //#endregion
42
+ export { AppliedFiltersScrollbar };
@@ -0,0 +1,6 @@
1
+ require('../Typography-CFNWgbM5.cjs');
2
+ const require_ButtonBase = require('../ButtonBase-AU23oGQr.cjs');
3
+ require('../ButtonBase-DbWQ25n-.cjs');
4
+
5
+ exports.ButtonBase = require_ButtonBase.ButtonBase;
6
+ exports.ButtonBaseOverrides = require_ButtonBase.ButtonBaseOverrides;
@@ -0,0 +1,42 @@
1
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
2
+ import { TestProps } from "@envive-ai/react-hooks/types";
3
+ import { ButtonHTMLAttributes, CSSProperties } from "react";
4
+
5
+ //#region src/components/ButtonBase/types.d.ts
6
+ interface ButtonHoverStyles extends CSSProperties {
7
+ backgroundColor?: string;
8
+ color?: string;
9
+ }
10
+ interface ButtonBaseProps extends TestProps {
11
+ type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
12
+ isDisabled?: boolean;
13
+ dataAttributes?: Record<string, string>;
14
+ buttonClass?: string;
15
+ text: string;
16
+ textClass?: string;
17
+ icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
18
+ iconClass?: string;
19
+ onClick?: () => void;
20
+ disablePadding?: boolean;
21
+ }
22
+ declare enum ButtonBaseOverrides {
23
+ BUTTON = "spiffy-button-base-button",
24
+ BUTTON_TEXT = "spiffy-button-base-button-text",
25
+ BUTTON_ICON = "spiffy-button-base-button-icon",
26
+ }
27
+ //#endregion
28
+ //#region src/components/ButtonBase/ButtonBase.d.ts
29
+ declare const ButtonBase: ({
30
+ isDisabled,
31
+ dataAttributes,
32
+ buttonClass,
33
+ text,
34
+ textClass,
35
+ icon,
36
+ iconClass,
37
+ dataTestId,
38
+ onClick,
39
+ disablePadding
40
+ }: ButtonBaseProps) => react_jsx_runtime21.JSX.Element;
41
+ //#endregion
42
+ export { ButtonBase, ButtonBaseOverrides, ButtonBaseProps, ButtonHoverStyles };
@@ -0,0 +1,42 @@
1
+ import { ButtonHTMLAttributes, CSSProperties } from "react";
2
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
3
+ import { TestProps } from "@envive-ai/react-hooks/types";
4
+
5
+ //#region src/components/ButtonBase/types.d.ts
6
+ interface ButtonHoverStyles extends CSSProperties {
7
+ backgroundColor?: string;
8
+ color?: string;
9
+ }
10
+ interface ButtonBaseProps extends TestProps {
11
+ type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
12
+ isDisabled?: boolean;
13
+ dataAttributes?: Record<string, string>;
14
+ buttonClass?: string;
15
+ text: string;
16
+ textClass?: string;
17
+ icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
18
+ iconClass?: string;
19
+ onClick?: () => void;
20
+ disablePadding?: boolean;
21
+ }
22
+ declare enum ButtonBaseOverrides {
23
+ BUTTON = "spiffy-button-base-button",
24
+ BUTTON_TEXT = "spiffy-button-base-button-text",
25
+ BUTTON_ICON = "spiffy-button-base-button-icon",
26
+ }
27
+ //#endregion
28
+ //#region src/components/ButtonBase/ButtonBase.d.ts
29
+ declare const ButtonBase: ({
30
+ isDisabled,
31
+ dataAttributes,
32
+ buttonClass,
33
+ text,
34
+ textClass,
35
+ icon,
36
+ iconClass,
37
+ dataTestId,
38
+ onClick,
39
+ disablePadding
40
+ }: ButtonBaseProps) => react_jsx_runtime26.JSX.Element;
41
+ //#endregion
42
+ export { ButtonBase, ButtonBaseOverrides, ButtonBaseProps, ButtonHoverStyles };
@@ -0,0 +1,5 @@
1
+ import "../Typography-D3vDkBMS.js";
2
+ import { ButtonBase, ButtonBaseOverrides } from "../ButtonBase-6wjsZ1tU.js";
3
+ import "../ButtonBase-C_uKnl48.js";
4
+
5
+ export { ButtonBase, ButtonBaseOverrides };
@@ -0,0 +1,60 @@
1
+ import { Typography } from "./Typography-D3vDkBMS.js";
2
+ import { createElement, useEffect, useRef } from "react";
3
+ import classNames from "classnames";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/components/ButtonBase/types.ts
7
+ let ButtonBaseOverrides = /* @__PURE__ */ function(ButtonBaseOverrides$1) {
8
+ ButtonBaseOverrides$1["BUTTON"] = "spiffy-button-base-button";
9
+ ButtonBaseOverrides$1["BUTTON_TEXT"] = "spiffy-button-base-button-text";
10
+ ButtonBaseOverrides$1["BUTTON_ICON"] = "spiffy-button-base-button-icon";
11
+ return ButtonBaseOverrides$1;
12
+ }({});
13
+
14
+ //#endregion
15
+ //#region src/components/ButtonBase/ButtonBase.tsx
16
+ const ButtonBase = ({ isDisabled = false, dataAttributes, buttonClass, text, textClass, icon, iconClass = "spiffy-tw-w-[21px] spiffy-tw-h-[21px]", dataTestId, onClick, disablePadding = false }) => {
17
+ const buttonRef = useRef(null);
18
+ const buttonClassName = classNames({
19
+ [ButtonBaseOverrides.BUTTON]: true,
20
+ "spiffy-tw-flex": true,
21
+ "spiffy-tw-min-h-[36px]": true,
22
+ "spiffy-tw-cursor-pointer": true,
23
+ "spiffy-tw-items-center": true,
24
+ "spiffy-tw-gap-2": true,
25
+ "spiffy-tw-px-4": !disablePadding,
26
+ "spiffy-tw-transition-colors": true,
27
+ "spiffy-tw-opacity-40": isDisabled,
28
+ "spiffy-tw-cursor-not-allowed": isDisabled,
29
+ [`${buttonClass}`]: buttonClass != null
30
+ });
31
+ const textClassName = classNames({
32
+ [ButtonBaseOverrides.BUTTON_TEXT]: true,
33
+ "spiffy-tw-whitespace-nowrap": true,
34
+ [`${textClass}`]: textClass != null
35
+ });
36
+ const iconClassName = classNames({
37
+ [ButtonBaseOverrides.BUTTON_ICON]: true,
38
+ [`${iconClass}`]: iconClass != null
39
+ });
40
+ useEffect(() => {
41
+ if (dataAttributes && buttonRef.current) Object.entries(dataAttributes).forEach(([key, value]) => {
42
+ buttonRef.current?.setAttribute(key, value);
43
+ });
44
+ }, [dataAttributes]);
45
+ return /* @__PURE__ */ jsxs("button", {
46
+ type: "button",
47
+ ref: buttonRef,
48
+ className: buttonClassName,
49
+ disabled: isDisabled,
50
+ "data-testid": dataTestId,
51
+ onClick,
52
+ children: [icon && createElement(icon, { className: iconClassName }), /* @__PURE__ */ jsx(Typography, {
53
+ className: textClassName,
54
+ children: text
55
+ })]
56
+ });
57
+ };
58
+
59
+ //#endregion
60
+ export { ButtonBase, ButtonBaseOverrides };