@envive-ai/react-toolkit 0.2.1 → 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 (159) 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
  159. package/src/components/AnimatedChevron/AnimatedChevron.tsx +1 -2
@@ -0,0 +1,38 @@
1
+ import * as react_jsx_runtime21 from "react/jsx-runtime";
2
+
3
+ //#region src/components/ModalSheet/types.d.ts
4
+ type ModalSheetProps = {
5
+ children: React.ReactNode;
6
+ isOpen: boolean;
7
+ closeModal: () => void;
8
+ desktopWidth?: number;
9
+ mobileFullHeight?: number;
10
+ animationDuration?: number;
11
+ headerProps: ModalSheetHeaderProps;
12
+ footerProps?: ModalSheetFooterProps;
13
+ showOverlay?: boolean;
14
+ };
15
+ type ModalSheetHeaderProps = {
16
+ headerVariant?: ModalSheetHeaderVariant;
17
+ headerContent: React.ReactNode;
18
+ handleHeaderClick?: () => void;
19
+ chevronColor: string;
20
+ };
21
+ type ModalSheetFooterProps = {
22
+ footerContent: React.ReactNode;
23
+ footerClassName?: string;
24
+ };
25
+ type ModalSheetHeaderVariant = 'primary';
26
+ //#endregion
27
+ //#region src/components/ModalSheet/ModalSheet.d.ts
28
+ declare const ModalSheet: ({
29
+ children,
30
+ isOpen,
31
+ closeModal,
32
+ animationDuration,
33
+ desktopWidth,
34
+ headerProps,
35
+ footerProps
36
+ }: ModalSheetProps) => react_jsx_runtime21.JSX.Element;
37
+ //#endregion
38
+ export { ModalSheet };
@@ -0,0 +1,4 @@
1
+ import "../AnimatedChevron-Bik7GMSe.js";
2
+ import { ModalSheet } from "../ModalSheet-BSj_g9JF.js";
3
+
4
+ export { ModalSheet };
@@ -0,0 +1,302 @@
1
+ import { AnimatedChevron } from "./AnimatedChevron-Bik7GMSe.js";
2
+ import { motion, useMotionValue } from "framer-motion";
3
+ import { useEffect, useState } from "react";
4
+ import classNames from "classnames";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
7
+
8
+ //#region src/components/ModalSheet/mobile/mobileHeader.tsx
9
+ const modalSheetVariants$1 = { primary: {
10
+ "spiffy-tw-bg-[--spiffy-colors-background-primary]": true,
11
+ "spiffy-tw-text-[--spiffy-colors-text-light]": true
12
+ } };
13
+ const ModalSheetMobileHeader = ({ headerVariant = "primary", headerContent, handleHeaderClick, chevronColor }) => {
14
+ const animationKey = useMotionValue(-1);
15
+ const headerClassName = 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
+ "spiffy-tw-flex-col": true,
22
+ "spiffy-tw-pt-[16px]": true,
23
+ "spiffy-tw-shadow-[0px_-8px_16px_0px_#0000001A]": true,
24
+ ...modalSheetVariants$1[headerVariant]
25
+ });
26
+ return /* @__PURE__ */ jsxs(motion.div, {
27
+ className: headerClassName,
28
+ onTouchStart: handleHeaderClick,
29
+ onMouseDown: handleHeaderClick,
30
+ children: [/* @__PURE__ */ jsx(AnimatedChevron, {
31
+ animationKey,
32
+ chevronColor
33
+ }), headerContent]
34
+ });
35
+ };
36
+
37
+ //#endregion
38
+ //#region src/components/ModalSheet/mobile/index.tsx
39
+ const ModalSheetMobile = ({ children, isOpen, closeModal, mobileFullHeight = 180, animationDuration, headerProps, footerProps }) => {
40
+ const [isHidden, setIsHidden] = useState(isOpen ? "block" : "none");
41
+ const [bottom, setBottom] = useState(isOpen ? 0 : 0 - mobileFullHeight);
42
+ const [overlayOpacity, setOverlayOpacity] = useState(isOpen ? 1 : 0);
43
+ useEffect(() => {
44
+ setIsHidden(isOpen ? "block" : "none");
45
+ setBottom(isOpen ? 0 : 0 - mobileFullHeight);
46
+ setOverlayOpacity(isOpen ? 1 : 0);
47
+ }, [mobileFullHeight, isOpen]);
48
+ const overlayClassNames = classNames({
49
+ "spiffy-modal-sheet-overlay": true,
50
+ "spiffy-tw-fixed": true,
51
+ "spiffy-tw-inset-0": true,
52
+ "spiffy-tw-top-[0]": true,
53
+ "spiffy-tw-bottom-[0]": true,
54
+ "spiffy-tw-left-[0]": true,
55
+ "spiffy-tw-right-[0]": true,
56
+ "spiffy-tw-bg-black/30": true,
57
+ "spiffy-tw-z-[100]": true
58
+ });
59
+ const modalClassNames = classNames({
60
+ "spiffy-modal-sheet": true,
61
+ "spiffy-modal-sheet-open": isOpen,
62
+ "spiffy-tw-w-full": true,
63
+ "spiffy-tw-overflow-y-auto": true,
64
+ "spiffy-tw-shadow-lg": true,
65
+ "spiffy-tw-fixed": true,
66
+ "spiffy-tw-bg-white": true,
67
+ "spiffy-tw-border-box": true,
68
+ "spiffy-tw-rounded-t-[16px]": true,
69
+ "spiffy-tw-h-[89%]": true,
70
+ "spiffy-tw-max-h-[89%]": true
71
+ });
72
+ const contentClassNames = classNames({
73
+ "spiffy-modal-sheet-content": true,
74
+ "spiffy-tw-flex": true,
75
+ "spiffy-tw-flex-col": true,
76
+ "spiffy-tw-w-full": true,
77
+ "spiffy-tw-h-full": true
78
+ });
79
+ const headerClassNames = classNames({
80
+ "spiffy-tw-sticky": true,
81
+ "spiffy-tw-top-[0px]": true,
82
+ "spiffy-tw-flex": true,
83
+ "spiffy-tw-flex-col": true
84
+ });
85
+ const { footerContent, footerClassName } = footerProps || {};
86
+ const footerClassNames = classNames({
87
+ "spiffy-tw-sticky": true,
88
+ "spiffy-tw-bottom-[0px]": true,
89
+ "spiffy-modal-sheet-footer": true,
90
+ "spiffy-tw-flex": true,
91
+ "spiffy-tw-flex-col": true
92
+ }, footerClassName);
93
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(motion.div, {
94
+ className: overlayClassNames,
95
+ animate: {
96
+ opacity: overlayOpacity,
97
+ display: isHidden
98
+ },
99
+ onClick: closeModal,
100
+ children: /* @__PURE__ */ jsx(motion.div, {
101
+ role: "dialog",
102
+ className: modalClassNames,
103
+ initial: {
104
+ bottom,
105
+ display: isHidden
106
+ },
107
+ animate: {
108
+ bottom,
109
+ display: isHidden
110
+ },
111
+ exit: {
112
+ bottom,
113
+ display: isHidden
114
+ },
115
+ transition: {
116
+ duration: animationDuration,
117
+ ease: "easeIn"
118
+ },
119
+ onClick: (e) => e.stopPropagation(),
120
+ children: /* @__PURE__ */ jsxs("div", {
121
+ className: contentClassNames,
122
+ children: [
123
+ /* @__PURE__ */ jsx("div", {
124
+ className: headerClassNames,
125
+ children: /* @__PURE__ */ jsx(ModalSheetMobileHeader, {
126
+ headerContent: headerProps.headerContent,
127
+ headerVariant: headerProps?.headerVariant,
128
+ handleHeaderClick: closeModal,
129
+ chevronColor: "#000"
130
+ })
131
+ }),
132
+ children,
133
+ /* @__PURE__ */ jsx("div", { className: "spiffy-tw-flex-grow" }),
134
+ footerContent && /* @__PURE__ */ jsx("div", {
135
+ className: footerClassNames,
136
+ children: footerContent
137
+ })
138
+ ]
139
+ })
140
+ })
141
+ }) });
142
+ };
143
+
144
+ //#endregion
145
+ //#region src/components/ModalSheet/desktop/desktopHeader.tsx
146
+ const modalSheetVariants = { primary: {
147
+ "spiffy-tw-bg-[--spiffy-colors-background-primary]": true,
148
+ "spiffy-tw-text-[--spiffy-colors-text-light]": true
149
+ } };
150
+ const ModalSheetDesktopHeader = ({ headerVariant = "primary", headerContent }) => {
151
+ const headerStyles = classNames({
152
+ "spiffy-modal-sheet-header": true,
153
+ "spiffy-tw-flex": true,
154
+ "spiffy-tw-items-center": true,
155
+ "spiffy-tw-justify-between": true,
156
+ "spiffy-tw-w-full": true,
157
+ ...modalSheetVariants[headerVariant]
158
+ });
159
+ return /* @__PURE__ */ jsx("div", {
160
+ className: headerStyles,
161
+ children: headerContent
162
+ });
163
+ };
164
+
165
+ //#endregion
166
+ //#region src/components/ModalSheet/desktop/index.tsx
167
+ const ModalSheetDesktop = ({ children, isOpen, closeModal, desktopWidth = 512, animationDuration, headerProps, footerProps, showOverlay = false }) => {
168
+ const [isHidden, setIsHidden] = useState(isOpen ? "block" : "none");
169
+ const [right, setRight] = useState(isOpen ? 0 : 0 - desktopWidth);
170
+ const [overlayOpacity, setOverlayOpacity] = useState(0);
171
+ useEffect(() => {
172
+ setIsHidden(isOpen ? "block" : "none");
173
+ setRight(isOpen ? 0 : 0 - desktopWidth);
174
+ setOverlayOpacity(isOpen ? 1 : 0);
175
+ }, [desktopWidth, isOpen]);
176
+ const overlayClassNames = classNames({
177
+ "spiffy-modal-sheet-overlay": true,
178
+ "spiffy-tw-fixed": true,
179
+ "spiffy-tw-inset-0": true,
180
+ "spiffy-tw-top-[0]": true,
181
+ "spiffy-tw-bottom-[0]": true,
182
+ "spiffy-tw-left-[0]": true,
183
+ "spiffy-tw-right-[0]": true,
184
+ "spiffy-tw-z-[2147483647]": true,
185
+ "spiffy-tw-bg-black/30": showOverlay
186
+ });
187
+ const modalClassNames = classNames({
188
+ "spiffy-modal-sheet": true,
189
+ "spiffy-modal-sheet-open": isOpen,
190
+ "spiffy-tw-max-h-full": true,
191
+ "spiffy-tw-h-screen": true,
192
+ "spiffy-tw-w-[512px]": true,
193
+ "spiffy-tw-shadow-lg": true,
194
+ "spiffy-tw-top-[0]": true,
195
+ "spiffy-tw-bottom-[0]": true,
196
+ "spiffy-tw-fixed": true,
197
+ "spiffy-tw-bg-white": true,
198
+ "spiffy-tw-border-box": true
199
+ });
200
+ const contentClassNames = classNames({
201
+ "spiffy-modal-sheet-content": true,
202
+ "spiffy-tw-overflow-y-auto": true,
203
+ "spiffy-tw-overflow-x-hidden": true,
204
+ "spiffy-tw-flex": true,
205
+ "spiffy-tw-flex-col": true,
206
+ "spiffy-tw-h-full": true,
207
+ "spiffy-tw-w-full": true
208
+ });
209
+ const headerClassNames = classNames({
210
+ "spiffy-tw-sticky": true,
211
+ "spiffy-tw-top-0": true,
212
+ "spiffy-tw-flex": true,
213
+ "spiffy-tw-flex-col": true
214
+ });
215
+ const { footerContent, footerClassName } = footerProps || {};
216
+ const footerClassNames = classNames({
217
+ "spiffy-tw-sticky": true,
218
+ "spiffy-tw-bottom-0": true,
219
+ "spiffy-modal-sheet-footer": true,
220
+ "spiffy-tw-flex": true,
221
+ "spiffy-tw-flex-col": true
222
+ }, footerClassName);
223
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(motion.div, {
224
+ className: overlayClassNames,
225
+ initial: {
226
+ opacity: 0,
227
+ display: "none"
228
+ },
229
+ animate: {
230
+ opacity: overlayOpacity,
231
+ display: isHidden
232
+ },
233
+ onClick: closeModal,
234
+ children: /* @__PURE__ */ jsx(motion.div, {
235
+ role: "dialog",
236
+ className: modalClassNames,
237
+ initial: {
238
+ right,
239
+ display: isHidden
240
+ },
241
+ animate: {
242
+ right,
243
+ display: isHidden
244
+ },
245
+ exit: {
246
+ right,
247
+ display: isHidden
248
+ },
249
+ transition: {
250
+ duration: animationDuration,
251
+ ease: "easeIn"
252
+ },
253
+ style: { width: desktopWidth },
254
+ onClick: (e) => e.stopPropagation(),
255
+ children: /* @__PURE__ */ jsxs("div", {
256
+ className: contentClassNames,
257
+ children: [
258
+ /* @__PURE__ */ jsx("div", {
259
+ className: headerClassNames,
260
+ children: /* @__PURE__ */ jsx(ModalSheetDesktopHeader, {
261
+ headerContent: headerProps.headerContent,
262
+ headerVariant: headerProps?.headerVariant,
263
+ chevronColor: "#000"
264
+ })
265
+ }),
266
+ children,
267
+ /* @__PURE__ */ jsx("div", { className: "spiffy-tw-flex-grow" }),
268
+ footerContent && /* @__PURE__ */ jsx("div", {
269
+ className: footerClassNames,
270
+ children: footerContent
271
+ })
272
+ ]
273
+ })
274
+ })
275
+ }) });
276
+ };
277
+
278
+ //#endregion
279
+ //#region src/components/ModalSheet/ModalSheet.tsx
280
+ const ANIMATION_DURATION = .3;
281
+ const ModalSheet = ({ children, isOpen, closeModal, animationDuration = ANIMATION_DURATION, desktopWidth = 512, headerProps, footerProps }) => {
282
+ return useIsSmallScreen() ? /* @__PURE__ */ jsx(ModalSheetMobile, {
283
+ isOpen,
284
+ closeModal,
285
+ desktopWidth,
286
+ animationDuration,
287
+ headerProps,
288
+ footerProps,
289
+ children
290
+ }) : /* @__PURE__ */ jsx(ModalSheetDesktop, {
291
+ isOpen,
292
+ closeModal,
293
+ desktopWidth,
294
+ animationDuration,
295
+ headerProps,
296
+ footerProps,
297
+ children
298
+ });
299
+ };
300
+
301
+ //#endregion
302
+ export { ModalSheet };
@@ -0,0 +1,313 @@
1
+ const require_chunk = require('./chunk-CUT6urMc.cjs');
2
+ const require_AnimatedChevron = require('./AnimatedChevron-Q96FneFy.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 react_jsx_runtime = require("react/jsx-runtime");
10
+ react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
11
+ let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
12
+ __envive_ai_react_hooks_hooks_IsSmallScreen = require_chunk.__toESM(__envive_ai_react_hooks_hooks_IsSmallScreen);
13
+
14
+ //#region src/components/ModalSheet/mobile/mobileHeader.tsx
15
+ const modalSheetVariants$1 = { primary: {
16
+ "spiffy-tw-bg-[--spiffy-colors-background-primary]": true,
17
+ "spiffy-tw-text-[--spiffy-colors-text-light]": true
18
+ } };
19
+ const ModalSheetMobileHeader = ({ headerVariant = "primary", headerContent, handleHeaderClick, chevronColor }) => {
20
+ const animationKey = (0, framer_motion.useMotionValue)(-1);
21
+ const headerClassName = (0, classnames.default)({
22
+ "spiffy-modal-sheet-header": true,
23
+ "spiffy-tw-flex": true,
24
+ "spiffy-tw-items-center": true,
25
+ "spiffy-tw-justify-between": true,
26
+ "spiffy-tw-w-full": true,
27
+ "spiffy-tw-flex-col": true,
28
+ "spiffy-tw-pt-[16px]": true,
29
+ "spiffy-tw-shadow-[0px_-8px_16px_0px_#0000001A]": true,
30
+ ...modalSheetVariants$1[headerVariant]
31
+ });
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(framer_motion.motion.div, {
33
+ className: headerClassName,
34
+ onTouchStart: handleHeaderClick,
35
+ onMouseDown: handleHeaderClick,
36
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_AnimatedChevron.AnimatedChevron, {
37
+ animationKey,
38
+ chevronColor
39
+ }), headerContent]
40
+ });
41
+ };
42
+
43
+ //#endregion
44
+ //#region src/components/ModalSheet/mobile/index.tsx
45
+ const ModalSheetMobile = ({ children, isOpen, closeModal, mobileFullHeight = 180, animationDuration, headerProps, footerProps }) => {
46
+ const [isHidden, setIsHidden] = (0, react.useState)(isOpen ? "block" : "none");
47
+ const [bottom, setBottom] = (0, react.useState)(isOpen ? 0 : 0 - mobileFullHeight);
48
+ const [overlayOpacity, setOverlayOpacity] = (0, react.useState)(isOpen ? 1 : 0);
49
+ (0, react.useEffect)(() => {
50
+ setIsHidden(isOpen ? "block" : "none");
51
+ setBottom(isOpen ? 0 : 0 - mobileFullHeight);
52
+ setOverlayOpacity(isOpen ? 1 : 0);
53
+ }, [mobileFullHeight, isOpen]);
54
+ const overlayClassNames = (0, classnames.default)({
55
+ "spiffy-modal-sheet-overlay": true,
56
+ "spiffy-tw-fixed": true,
57
+ "spiffy-tw-inset-0": true,
58
+ "spiffy-tw-top-[0]": true,
59
+ "spiffy-tw-bottom-[0]": true,
60
+ "spiffy-tw-left-[0]": true,
61
+ "spiffy-tw-right-[0]": true,
62
+ "spiffy-tw-bg-black/30": true,
63
+ "spiffy-tw-z-[100]": true
64
+ });
65
+ const modalClassNames = (0, classnames.default)({
66
+ "spiffy-modal-sheet": true,
67
+ "spiffy-modal-sheet-open": isOpen,
68
+ "spiffy-tw-w-full": true,
69
+ "spiffy-tw-overflow-y-auto": true,
70
+ "spiffy-tw-shadow-lg": true,
71
+ "spiffy-tw-fixed": true,
72
+ "spiffy-tw-bg-white": true,
73
+ "spiffy-tw-border-box": true,
74
+ "spiffy-tw-rounded-t-[16px]": true,
75
+ "spiffy-tw-h-[89%]": true,
76
+ "spiffy-tw-max-h-[89%]": true
77
+ });
78
+ const contentClassNames = (0, classnames.default)({
79
+ "spiffy-modal-sheet-content": true,
80
+ "spiffy-tw-flex": true,
81
+ "spiffy-tw-flex-col": true,
82
+ "spiffy-tw-w-full": true,
83
+ "spiffy-tw-h-full": true
84
+ });
85
+ const headerClassNames = (0, classnames.default)({
86
+ "spiffy-tw-sticky": true,
87
+ "spiffy-tw-top-[0px]": true,
88
+ "spiffy-tw-flex": true,
89
+ "spiffy-tw-flex-col": true
90
+ });
91
+ const { footerContent, footerClassName } = footerProps || {};
92
+ const footerClassNames = (0, classnames.default)({
93
+ "spiffy-tw-sticky": true,
94
+ "spiffy-tw-bottom-[0px]": true,
95
+ "spiffy-modal-sheet-footer": true,
96
+ "spiffy-tw-flex": true,
97
+ "spiffy-tw-flex-col": true
98
+ }, footerClassName);
99
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
100
+ className: overlayClassNames,
101
+ animate: {
102
+ opacity: overlayOpacity,
103
+ display: isHidden
104
+ },
105
+ onClick: closeModal,
106
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
107
+ role: "dialog",
108
+ className: modalClassNames,
109
+ initial: {
110
+ bottom,
111
+ display: isHidden
112
+ },
113
+ animate: {
114
+ bottom,
115
+ display: isHidden
116
+ },
117
+ exit: {
118
+ bottom,
119
+ display: isHidden
120
+ },
121
+ transition: {
122
+ duration: animationDuration,
123
+ ease: "easeIn"
124
+ },
125
+ onClick: (e) => e.stopPropagation(),
126
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
127
+ className: contentClassNames,
128
+ children: [
129
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
130
+ className: headerClassNames,
131
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalSheetMobileHeader, {
132
+ headerContent: headerProps.headerContent,
133
+ headerVariant: headerProps?.headerVariant,
134
+ handleHeaderClick: closeModal,
135
+ chevronColor: "#000"
136
+ })
137
+ }),
138
+ children,
139
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "spiffy-tw-flex-grow" }),
140
+ footerContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
141
+ className: footerClassNames,
142
+ children: footerContent
143
+ })
144
+ ]
145
+ })
146
+ })
147
+ }) });
148
+ };
149
+
150
+ //#endregion
151
+ //#region src/components/ModalSheet/desktop/desktopHeader.tsx
152
+ const modalSheetVariants = { primary: {
153
+ "spiffy-tw-bg-[--spiffy-colors-background-primary]": true,
154
+ "spiffy-tw-text-[--spiffy-colors-text-light]": true
155
+ } };
156
+ const ModalSheetDesktopHeader = ({ headerVariant = "primary", headerContent }) => {
157
+ const headerStyles = (0, classnames.default)({
158
+ "spiffy-modal-sheet-header": true,
159
+ "spiffy-tw-flex": true,
160
+ "spiffy-tw-items-center": true,
161
+ "spiffy-tw-justify-between": true,
162
+ "spiffy-tw-w-full": true,
163
+ ...modalSheetVariants[headerVariant]
164
+ });
165
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
166
+ className: headerStyles,
167
+ children: headerContent
168
+ });
169
+ };
170
+
171
+ //#endregion
172
+ //#region src/components/ModalSheet/desktop/index.tsx
173
+ const ModalSheetDesktop = ({ children, isOpen, closeModal, desktopWidth = 512, animationDuration, headerProps, footerProps, showOverlay = false }) => {
174
+ const [isHidden, setIsHidden] = (0, react.useState)(isOpen ? "block" : "none");
175
+ const [right, setRight] = (0, react.useState)(isOpen ? 0 : 0 - desktopWidth);
176
+ const [overlayOpacity, setOverlayOpacity] = (0, react.useState)(0);
177
+ (0, react.useEffect)(() => {
178
+ setIsHidden(isOpen ? "block" : "none");
179
+ setRight(isOpen ? 0 : 0 - desktopWidth);
180
+ setOverlayOpacity(isOpen ? 1 : 0);
181
+ }, [desktopWidth, isOpen]);
182
+ const overlayClassNames = (0, classnames.default)({
183
+ "spiffy-modal-sheet-overlay": true,
184
+ "spiffy-tw-fixed": true,
185
+ "spiffy-tw-inset-0": true,
186
+ "spiffy-tw-top-[0]": true,
187
+ "spiffy-tw-bottom-[0]": true,
188
+ "spiffy-tw-left-[0]": true,
189
+ "spiffy-tw-right-[0]": true,
190
+ "spiffy-tw-z-[2147483647]": true,
191
+ "spiffy-tw-bg-black/30": showOverlay
192
+ });
193
+ const modalClassNames = (0, classnames.default)({
194
+ "spiffy-modal-sheet": true,
195
+ "spiffy-modal-sheet-open": isOpen,
196
+ "spiffy-tw-max-h-full": true,
197
+ "spiffy-tw-h-screen": true,
198
+ "spiffy-tw-w-[512px]": true,
199
+ "spiffy-tw-shadow-lg": true,
200
+ "spiffy-tw-top-[0]": true,
201
+ "spiffy-tw-bottom-[0]": true,
202
+ "spiffy-tw-fixed": true,
203
+ "spiffy-tw-bg-white": true,
204
+ "spiffy-tw-border-box": true
205
+ });
206
+ const contentClassNames = (0, classnames.default)({
207
+ "spiffy-modal-sheet-content": true,
208
+ "spiffy-tw-overflow-y-auto": true,
209
+ "spiffy-tw-overflow-x-hidden": true,
210
+ "spiffy-tw-flex": true,
211
+ "spiffy-tw-flex-col": true,
212
+ "spiffy-tw-h-full": true,
213
+ "spiffy-tw-w-full": true
214
+ });
215
+ const headerClassNames = (0, classnames.default)({
216
+ "spiffy-tw-sticky": true,
217
+ "spiffy-tw-top-0": true,
218
+ "spiffy-tw-flex": true,
219
+ "spiffy-tw-flex-col": true
220
+ });
221
+ const { footerContent, footerClassName } = footerProps || {};
222
+ const footerClassNames = (0, classnames.default)({
223
+ "spiffy-tw-sticky": true,
224
+ "spiffy-tw-bottom-0": true,
225
+ "spiffy-modal-sheet-footer": true,
226
+ "spiffy-tw-flex": true,
227
+ "spiffy-tw-flex-col": true
228
+ }, footerClassName);
229
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
230
+ className: overlayClassNames,
231
+ initial: {
232
+ opacity: 0,
233
+ display: "none"
234
+ },
235
+ animate: {
236
+ opacity: overlayOpacity,
237
+ display: isHidden
238
+ },
239
+ onClick: closeModal,
240
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
241
+ role: "dialog",
242
+ className: modalClassNames,
243
+ initial: {
244
+ right,
245
+ display: isHidden
246
+ },
247
+ animate: {
248
+ right,
249
+ display: isHidden
250
+ },
251
+ exit: {
252
+ right,
253
+ display: isHidden
254
+ },
255
+ transition: {
256
+ duration: animationDuration,
257
+ ease: "easeIn"
258
+ },
259
+ style: { width: desktopWidth },
260
+ onClick: (e) => e.stopPropagation(),
261
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
262
+ className: contentClassNames,
263
+ children: [
264
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
265
+ className: headerClassNames,
266
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalSheetDesktopHeader, {
267
+ headerContent: headerProps.headerContent,
268
+ headerVariant: headerProps?.headerVariant,
269
+ chevronColor: "#000"
270
+ })
271
+ }),
272
+ children,
273
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "spiffy-tw-flex-grow" }),
274
+ footerContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
275
+ className: footerClassNames,
276
+ children: footerContent
277
+ })
278
+ ]
279
+ })
280
+ })
281
+ }) });
282
+ };
283
+
284
+ //#endregion
285
+ //#region src/components/ModalSheet/ModalSheet.tsx
286
+ const ANIMATION_DURATION = .3;
287
+ const ModalSheet = ({ children, isOpen, closeModal, animationDuration = ANIMATION_DURATION, desktopWidth = 512, headerProps, footerProps }) => {
288
+ return (0, __envive_ai_react_hooks_hooks_IsSmallScreen.useIsSmallScreen)() ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalSheetMobile, {
289
+ isOpen,
290
+ closeModal,
291
+ desktopWidth,
292
+ animationDuration,
293
+ headerProps,
294
+ footerProps,
295
+ children
296
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ModalSheetDesktop, {
297
+ isOpen,
298
+ closeModal,
299
+ desktopWidth,
300
+ animationDuration,
301
+ headerProps,
302
+ footerProps,
303
+ children
304
+ });
305
+ };
306
+
307
+ //#endregion
308
+ Object.defineProperty(exports, 'ModalSheet', {
309
+ enumerable: true,
310
+ get: function () {
311
+ return ModalSheet;
312
+ }
313
+ });
@@ -0,0 +1,15 @@
1
+ require('../Typography-CFNWgbM5.cjs');
2
+ require('../ImageWithFallback-1LqhQK1q.cjs');
3
+ const require_ProductCard = require('../ProductCard-D1F9A8Rw.cjs');
4
+ require('../Spinner-B1IEMa00.cjs');
5
+
6
+ exports.AnimatedProductCardOverrides = require_ProductCard.AnimatedProductCardOverrides;
7
+ exports.PriceSection = require_ProductCard.PriceSection;
8
+ exports.ProductCard = require_ProductCard.ProductCard;
9
+ exports.ProductCardSkeleton = require_ProductCard.ProductCardSkeleton;
10
+ exports.ProductCardSkeletonOverrides = require_ProductCard.ProductCardSkeletonOverrides;
11
+ exports.RatingSummary = require_ProductCard.RatingSummary;
12
+ exports.productCardLayoutVariantClasses = require_ProductCard.productCardLayoutVariantClasses;
13
+ exports.variantClassMap = require_ProductCard.variantClassMap;
14
+ exports.variantHoverClassMap = require_ProductCard.variantHoverClassMap;
15
+ exports.variantTitleColorMap = require_ProductCard.variantTitleColorMap;
@@ -0,0 +1,2 @@
1
+ import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, RatingSummaryProps, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../index-cx3r6TgQ.cjs";
2
+ export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, RatingSummaryProps, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
@@ -0,0 +1,2 @@
1
+ import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, RatingSummaryProps, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../index-BzY_al-V.js";
2
+ export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, RatingSummaryProps, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
@@ -0,0 +1,6 @@
1
+ import "../Typography-D3vDkBMS.js";
2
+ import "../ImageWithFallback-Ckwsmd8P.js";
3
+ import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../ProductCard-2aPkjS8z.js";
4
+ import "../Spinner-BrHoB-Zg.js";
5
+
6
+ export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };