@envive-ai/react-widgets 0.1.3 → 0.3.0

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 (212) hide show
  1. package/dist/SearchResults/SearchResults.cjs +8 -12
  2. package/dist/SearchResults/SearchResults.js +4 -8
  3. package/dist/SearchResults/SearchResultsWidget.cjs +1 -1
  4. package/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
  5. package/dist/SearchResults/SearchResultsWidget.js +1 -1
  6. package/dist/SearchResults/withSearchResults.cjs +1 -1
  7. package/dist/SearchResults/withSearchResults.js +1 -1
  8. package/dist/SearchZeroState/SearchIcon.cjs +2 -3
  9. package/dist/SearchZeroState/SearchIcon.js +1 -2
  10. package/dist/SearchZeroState/SearchZeroState.cjs +10 -14
  11. package/dist/SearchZeroState/SearchZeroState.js +5 -9
  12. package/dist/SearchZeroState/SearchZeroStateWidget.cjs +1 -1
  13. package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
  14. package/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
  15. package/dist/SearchZeroState/SearchZeroStateWidget.js +1 -1
  16. package/dist/SearchZeroState/components/RecommendedProducts.cjs +5 -7
  17. package/dist/SearchZeroState/components/RecommendedProducts.js +3 -5
  18. package/dist/SearchZeroState/index.d.cts +2 -1
  19. package/dist/SearchZeroState/index.d.ts +2 -1
  20. package/dist/SearchZeroState/types.d.cts +2 -2
  21. package/dist/SearchZeroState/types.d.ts +2 -2
  22. package/dist/SuggestionBar/SuggestionBar.cjs +1 -1
  23. package/dist/SuggestionBar/SuggestionBar.d.cts +1 -1
  24. package/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
  25. package/dist/SuggestionBar/SuggestionBar.js +2 -2
  26. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +6 -7
  27. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +2 -3
  28. package/dist/SuggestionButtonContainer/types.d.cts +2 -2
  29. package/dist/SuggestionButtonContainer/types.d.ts +2 -2
  30. package/dist/hooks/dist/contexts/types.d.cts +52 -0
  31. package/dist/hooks/dist/types/test-types.d.cts +8 -0
  32. package/dist/packages/hooks/dist/contexts/types.d.ts +52 -0
  33. package/dist/packages/hooks/dist/types/test-types.d.ts +8 -0
  34. package/package.json +3 -1
  35. package/dist/node_modules/react-icons/lib/iconBase.cjs +0 -121
  36. package/dist/node_modules/react-icons/lib/iconBase.js +0 -119
  37. package/dist/node_modules/react-icons/lib/iconContext.cjs +0 -17
  38. package/dist/node_modules/react-icons/lib/iconContext.js +0 -14
  39. package/dist/node_modules/react-icons/md/index.cjs +0 -35
  40. package/dist/node_modules/react-icons/md/index.js +0 -35
  41. package/dist/packages/components/dist/components/Accordion/Accordion.cjs +0 -80
  42. package/dist/packages/components/dist/components/Accordion/Accordion.js +0 -78
  43. package/dist/packages/components/dist/components/Accordion/index.cjs +0 -1
  44. package/dist/packages/components/dist/components/Accordion/index.js +0 -1
  45. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.cjs +0 -30
  46. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.js +0 -29
  47. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.cjs +0 -56
  48. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.js +0 -54
  49. package/dist/packages/components/dist/components/ButtonBase/index.cjs +0 -2
  50. package/dist/packages/components/dist/components/ButtonBase/index.js +0 -2
  51. package/dist/packages/components/dist/components/ButtonBase/types.cjs +0 -11
  52. package/dist/packages/components/dist/components/ButtonBase/types.js +0 -10
  53. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.cjs +0 -45
  54. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.js +0 -42
  55. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +0 -33
  56. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +0 -30
  57. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.cjs +0 -45
  58. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.js +0 -42
  59. package/dist/packages/components/dist/components/ImageWithFallback/index.cjs +0 -1
  60. package/dist/packages/components/dist/components/ImageWithFallback/index.js +0 -1
  61. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.cjs +0 -30
  62. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.js +0 -29
  63. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.cjs +0 -26
  64. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.js +0 -24
  65. package/dist/packages/components/dist/components/ModalSheet/desktop/index.cjs +0 -122
  66. package/dist/packages/components/dist/components/ModalSheet/desktop/index.js +0 -120
  67. package/dist/packages/components/dist/components/ModalSheet/index.cjs +0 -1
  68. package/dist/packages/components/dist/components/ModalSheet/index.js +0 -1
  69. package/dist/packages/components/dist/components/ModalSheet/mobile/index.cjs +0 -116
  70. package/dist/packages/components/dist/components/ModalSheet/mobile/index.js +0 -114
  71. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.cjs +0 -38
  72. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.js +0 -36
  73. package/dist/packages/components/dist/components/ProductCard/ProductCard.cjs +0 -153
  74. package/dist/packages/components/dist/components/ProductCard/ProductCard.js +0 -149
  75. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.cjs +0 -33
  76. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.js +0 -31
  77. package/dist/packages/components/dist/components/ProductCard/index.cjs +0 -4
  78. package/dist/packages/components/dist/components/ProductCard/index.js +0 -4
  79. package/dist/packages/components/dist/components/ProductCard/productCardVariants.cjs +0 -49
  80. package/dist/packages/components/dist/components/ProductCard/productCardVariants.js +0 -45
  81. package/dist/packages/components/dist/components/ProductCard/types.cjs +0 -10
  82. package/dist/packages/components/dist/components/ProductCard/types.js +0 -9
  83. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.cjs +0 -43
  84. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.js +0 -41
  85. package/dist/packages/components/dist/components/ProductGrid/index.cjs +0 -2
  86. package/dist/packages/components/dist/components/ProductGrid/index.js +0 -2
  87. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.cjs +0 -21
  88. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.js +0 -20
  89. package/dist/packages/components/dist/components/RadioButton/RadioButton.cjs +0 -74
  90. package/dist/packages/components/dist/components/RadioButton/RadioButton.js +0 -72
  91. package/dist/packages/components/dist/components/RadioButton/index.cjs +0 -1
  92. package/dist/packages/components/dist/components/RadioButton/index.js +0 -1
  93. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.cjs +0 -42
  94. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.js +0 -39
  95. package/dist/packages/components/dist/components/RadioButtonGroup/index.cjs +0 -1
  96. package/dist/packages/components/dist/components/RadioButtonGroup/index.js +0 -1
  97. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.cjs +0 -53
  98. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.js +0 -51
  99. package/dist/packages/components/dist/components/RecommendedProducts/index.cjs +0 -3
  100. package/dist/packages/components/dist/components/RecommendedProducts/index.js +0 -3
  101. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +0 -72
  102. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.js +0 -69
  103. package/dist/packages/components/dist/components/SearchAutocomplete/index.cjs +0 -1
  104. package/dist/packages/components/dist/components/SearchAutocomplete/index.js +0 -1
  105. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.cjs +0 -134
  106. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.js +0 -132
  107. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.cjs +0 -48
  108. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.js +0 -46
  109. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.cjs +0 -42
  110. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.js +0 -40
  111. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.cjs +0 -6
  112. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.js +0 -4
  113. package/dist/packages/components/dist/components/SearchFilter/index.cjs +0 -5
  114. package/dist/packages/components/dist/components/SearchFilter/index.js +0 -5
  115. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.cjs +0 -27
  116. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.js +0 -26
  117. package/dist/packages/components/dist/components/SearchFilter/utils.cjs +0 -11
  118. package/dist/packages/components/dist/components/SearchFilter/utils.js +0 -9
  119. package/dist/packages/components/dist/components/SearchInput/SearchInput.cjs +0 -81
  120. package/dist/packages/components/dist/components/SearchInput/SearchInput.js +0 -78
  121. package/dist/packages/components/dist/components/SearchInput/index.cjs +0 -2
  122. package/dist/packages/components/dist/components/SearchInput/index.js +0 -2
  123. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.cjs +0 -15
  124. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.js +0 -15
  125. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.cjs +0 -57
  126. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.js +0 -55
  127. package/dist/packages/components/dist/components/SearchInputForm/index.cjs +0 -1
  128. package/dist/packages/components/dist/components/SearchInputForm/index.js +0 -1
  129. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.cjs +0 -52
  130. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.js +0 -50
  131. package/dist/packages/components/dist/components/SearchResultsContent/index.cjs +0 -1
  132. package/dist/packages/components/dist/components/SearchResultsContent/index.js +0 -1
  133. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +0 -24
  134. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +0 -23
  135. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.cjs +0 -3
  136. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.js +0 -3
  137. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +0 -36
  138. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +0 -35
  139. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.cjs +0 -3
  140. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.js +0 -3
  141. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +0 -9
  142. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -9
  143. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.cjs +0 -2
  144. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.js +0 -2
  145. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs +0 -34
  146. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -34
  147. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +0 -56
  148. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.js +0 -54
  149. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.cjs +0 -53
  150. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.js +0 -51
  151. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +0 -52
  152. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +0 -51
  153. package/dist/packages/components/dist/components/SearchResultsStates/index.cjs +0 -3
  154. package/dist/packages/components/dist/components/SearchResultsStates/index.js +0 -3
  155. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +0 -60
  156. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +0 -57
  157. package/dist/packages/components/dist/components/SearchResultsToolbar/index.cjs +0 -3
  158. package/dist/packages/components/dist/components/SearchResultsToolbar/index.js +0 -3
  159. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.cjs +0 -77
  160. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.js +0 -75
  161. package/dist/packages/components/dist/components/SparkleAnimation/index.cjs +0 -2
  162. package/dist/packages/components/dist/components/SparkleAnimation/index.js +0 -2
  163. package/dist/packages/components/dist/components/SparkleAnimation/types.cjs +0 -12
  164. package/dist/packages/components/dist/components/SparkleAnimation/types.js +0 -11
  165. package/dist/packages/components/dist/components/Spinner/Spinner.cjs +0 -40
  166. package/dist/packages/components/dist/components/Spinner/Spinner.js +0 -38
  167. package/dist/packages/components/dist/components/Spinner/index.cjs +0 -1
  168. package/dist/packages/components/dist/components/Spinner/index.js +0 -1
  169. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.cjs +0 -193
  170. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.js +0 -188
  171. package/dist/packages/components/dist/components/SuggestionButton/index.cjs +0 -1
  172. package/dist/packages/components/dist/components/SuggestionButton/index.js +0 -1
  173. package/dist/packages/components/dist/components/TextInput/TextInput.cjs +0 -34
  174. package/dist/packages/components/dist/components/TextInput/TextInput.js +0 -31
  175. package/dist/packages/components/dist/components/TextInput/index.cjs +0 -1
  176. package/dist/packages/components/dist/components/TextInput/index.js +0 -1
  177. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.cjs +0 -63
  178. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.js +0 -61
  179. package/dist/packages/components/dist/components/ToggleButton/index.cjs +0 -1
  180. package/dist/packages/components/dist/components/ToggleButton/index.js +0 -1
  181. package/dist/packages/components/dist/components/Typography/Typography.cjs +0 -53
  182. package/dist/packages/components/dist/components/Typography/Typography.js +0 -50
  183. package/dist/packages/components/dist/components/Typography/index.cjs +0 -2
  184. package/dist/packages/components/dist/components/Typography/index.js +0 -2
  185. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.cjs +0 -99
  186. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.js +0 -96
  187. package/dist/packages/components/dist/components/Typography/util.cjs +0 -10
  188. package/dist/packages/components/dist/components/Typography/util.js +0 -10
  189. package/dist/packages/components/dist/logging/logger.cjs +0 -20
  190. package/dist/packages/components/dist/logging/logger.js +0 -19
  191. package/dist/packages/components/dist/models/colorsConfig.cjs +0 -28
  192. package/dist/packages/components/dist/models/colorsConfig.js +0 -26
  193. package/dist/packages/components/dist/util/formatPrice.cjs +0 -14
  194. package/dist/packages/components/dist/util/formatPrice.js +0 -13
  195. package/dist/packages/components/dist/util/index.cjs +0 -3
  196. package/dist/packages/components/dist/util/index.js +0 -3
  197. package/dist/packages/components/dist/util/useScrollDirection.cjs +0 -39
  198. package/dist/packages/components/dist/util/useScrollDirection.js +0 -38
  199. package/dist/packages/components/dist/util/useStickyVisibility.cjs +0 -38
  200. package/dist/packages/components/dist/util/useStickyVisibility.js +0 -37
  201. package/dist/packages/icons/dist/ChevronDown.cjs +0 -23
  202. package/dist/packages/icons/dist/ChevronDown.js +0 -23
  203. package/dist/packages/icons/dist/FourPointStar.cjs +0 -22
  204. package/dist/packages/icons/dist/FourPointStar.js +0 -22
  205. package/dist/packages/icons/dist/IconClose.cjs +0 -26
  206. package/dist/packages/icons/dist/IconClose.js +0 -26
  207. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.cjs +0 -39
  208. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.js +0 -39
  209. package/dist/packages/icons/dist/OutlinedStar.cjs +0 -22
  210. package/dist/packages/icons/dist/OutlinedStar.js +0 -22
  211. package/dist/packages/icons/dist/SettingsVariant.cjs +0 -72
  212. package/dist/packages/icons/dist/SettingsVariant.js +0 -72
@@ -0,0 +1,52 @@
1
+ //#region ../hooks/dist/contexts/types.d.ts
2
+
3
+ type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
4
+ interface SuggestionButtonConfig {
5
+ variant?: SuggestionButtonVariant;
6
+ hoverVariant?: SuggestionButtonVariant;
7
+ answerVariant?: SuggestionButtonVariant;
8
+ borderRadius?: 'sm' | 'md' | 'lg';
9
+ }
10
+ type SearchZeroStateVariant = 'backgroundTertiary' | 'backgroundDark' | 'backgroundPrimary';
11
+ type SearchZeroStateLayout = 'input' | 'icon';
12
+ type SearchInputVariant = 'standard';
13
+ type SearchIconVariant = 'thin' | 'bold';
14
+ declare enum WidgetType {
15
+ ChatPreview = "ChatPreview",
16
+ SocialProofV2 = "SocialProofV2",
17
+ ChatPreviewV2 = "ChatPreviewV2",
18
+ ChatPreviewIsLoading = "ChatPreviewIsLoading",
19
+ ChatPreviewPostInteraction = "ChatPreviewPostInteraction",
20
+ ChatPreviewProductComparison = "ChatPreviewProductComparison",
21
+ SuggestionBar = "SuggestionBar",
22
+ SuggestionBarV2 = "SuggestionBarV2",
23
+ ImagePromptCard = "ImagePromptCard",
24
+ ImageBanner = "ImageBanner",
25
+ SingleImagePrompt = "SingleImagePrompt",
26
+ SearchPrompt = "SearchPrompt",
27
+ SearchZeroStateEntryPoint = "SearchZeroStateEntryPoint",
28
+ SearchResultsEntryPoint = "SearchResultsEntryPoint",
29
+ SearchOverlayHost = "SearchOverlayHost",
30
+ NoOp = "NoOp",
31
+ }
32
+ interface BaseWidgetConfig<T extends WidgetType> {
33
+ widgetConfigId: string;
34
+ type: T;
35
+ contentId?: string;
36
+ }
37
+ interface SearchEntryPointWidgetConfig extends BaseWidgetConfig<WidgetType.SearchZeroStateEntryPoint> {
38
+ searchZeroStateVariant: SearchZeroStateVariant;
39
+ searchInputVariant: SearchInputVariant;
40
+ searchIconVariant?: SearchIconVariant;
41
+ searchIconSize?: number;
42
+ suggestionButtonConfig: SuggestionButtonConfig;
43
+ layout: SearchZeroStateLayout;
44
+ searchBoxPlaceholder: string;
45
+ animationSpeed?: 'standard' | 'slow' | 'none';
46
+ compactLabel?: string;
47
+ initialSuggestions?: string[];
48
+ usingPortal?: boolean;
49
+ includeSubtitle?: boolean;
50
+ }
51
+ //#endregion
52
+ export { type SearchEntryPointWidgetConfig, SearchInputVariant, type SuggestionButtonVariant };
@@ -0,0 +1,8 @@
1
+ //#region ../hooks/dist/types/test-types.d.ts
2
+ //#region src/types/test-types.d.ts
3
+ interface TestProps {
4
+ dataTestId?: string;
5
+ }
6
+ //#endregion
7
+ //#endregion
8
+ export { TestProps };
@@ -0,0 +1,52 @@
1
+ //#region ../hooks/dist/contexts/types.d.ts
2
+
3
+ type SuggestionButtonVariant = 'outlined' | 'outlinedLight' | 'primary' | 'secondary' | 'tertiary' | 'dark' | 'darkAccent' | 'darkPrimary' | 'secondaryDark' | 'secondaryAccent' | 'transparent' | 'transparentDark' | 'lightDark';
4
+ interface SuggestionButtonConfig {
5
+ variant?: SuggestionButtonVariant;
6
+ hoverVariant?: SuggestionButtonVariant;
7
+ answerVariant?: SuggestionButtonVariant;
8
+ borderRadius?: 'sm' | 'md' | 'lg';
9
+ }
10
+ type SearchZeroStateVariant = 'backgroundTertiary' | 'backgroundDark' | 'backgroundPrimary';
11
+ type SearchZeroStateLayout = 'input' | 'icon';
12
+ type SearchInputVariant = 'standard';
13
+ type SearchIconVariant = 'thin' | 'bold';
14
+ declare enum WidgetType {
15
+ ChatPreview = "ChatPreview",
16
+ SocialProofV2 = "SocialProofV2",
17
+ ChatPreviewV2 = "ChatPreviewV2",
18
+ ChatPreviewIsLoading = "ChatPreviewIsLoading",
19
+ ChatPreviewPostInteraction = "ChatPreviewPostInteraction",
20
+ ChatPreviewProductComparison = "ChatPreviewProductComparison",
21
+ SuggestionBar = "SuggestionBar",
22
+ SuggestionBarV2 = "SuggestionBarV2",
23
+ ImagePromptCard = "ImagePromptCard",
24
+ ImageBanner = "ImageBanner",
25
+ SingleImagePrompt = "SingleImagePrompt",
26
+ SearchPrompt = "SearchPrompt",
27
+ SearchZeroStateEntryPoint = "SearchZeroStateEntryPoint",
28
+ SearchResultsEntryPoint = "SearchResultsEntryPoint",
29
+ SearchOverlayHost = "SearchOverlayHost",
30
+ NoOp = "NoOp",
31
+ }
32
+ interface BaseWidgetConfig<T extends WidgetType> {
33
+ widgetConfigId: string;
34
+ type: T;
35
+ contentId?: string;
36
+ }
37
+ interface SearchEntryPointWidgetConfig extends BaseWidgetConfig<WidgetType.SearchZeroStateEntryPoint> {
38
+ searchZeroStateVariant: SearchZeroStateVariant;
39
+ searchInputVariant: SearchInputVariant;
40
+ searchIconVariant?: SearchIconVariant;
41
+ searchIconSize?: number;
42
+ suggestionButtonConfig: SuggestionButtonConfig;
43
+ layout: SearchZeroStateLayout;
44
+ searchBoxPlaceholder: string;
45
+ animationSpeed?: 'standard' | 'slow' | 'none';
46
+ compactLabel?: string;
47
+ initialSuggestions?: string[];
48
+ usingPortal?: boolean;
49
+ includeSubtitle?: boolean;
50
+ }
51
+ //#endregion
52
+ export { type SearchEntryPointWidgetConfig, SearchInputVariant, type SuggestionButtonVariant };
@@ -0,0 +1,8 @@
1
+ //#region ../hooks/dist/types/test-types.d.ts
2
+ //#region src/types/test-types.d.ts
3
+ interface TestProps {
4
+ dataTestId?: string;
5
+ }
6
+ //#endregion
7
+ //#endregion
8
+ export { TestProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-widgets",
3
- "version": "0.1.3",
3
+ "version": "0.3.0",
4
4
  "description": "React widget library for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -38,6 +38,8 @@
38
38
  "jotai": "^2.15.1"
39
39
  },
40
40
  "peerDependencies": {
41
+ "@envive-ai/react-hooks": "*",
42
+ "@envive-ai/react-toolkit": "*",
41
43
  "react": ">=18.3.1",
42
44
  "react-dom": ">=18.3.1"
43
45
  },
@@ -1,121 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_iconContext = require('./iconContext.cjs');
3
- let react = require("react");
4
- react = require_rolldown_runtime.__toESM(react);
5
-
6
- //#region ../../node_modules/react-icons/lib/iconBase.mjs
7
- var _excluded = [
8
- "attr",
9
- "size",
10
- "title"
11
- ];
12
- function _objectWithoutProperties(source, excluded) {
13
- if (source == null) return {};
14
- var target = _objectWithoutPropertiesLoose(source, excluded);
15
- var key, i;
16
- if (Object.getOwnPropertySymbols) {
17
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
18
- for (i = 0; i < sourceSymbolKeys.length; i++) {
19
- key = sourceSymbolKeys[i];
20
- if (excluded.indexOf(key) >= 0) continue;
21
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
22
- target[key] = source[key];
23
- }
24
- }
25
- return target;
26
- }
27
- function _objectWithoutPropertiesLoose(source, excluded) {
28
- if (source == null) return {};
29
- var target = {};
30
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) {
31
- if (excluded.indexOf(key) >= 0) continue;
32
- target[key] = source[key];
33
- }
34
- return target;
35
- }
36
- function _extends() {
37
- _extends = Object.assign ? Object.assign.bind() : function(target) {
38
- for (var i = 1; i < arguments.length; i++) {
39
- var source = arguments[i];
40
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
41
- }
42
- return target;
43
- };
44
- return _extends.apply(this, arguments);
45
- }
46
- function ownKeys(e, r) {
47
- var t = Object.keys(e);
48
- if (Object.getOwnPropertySymbols) {
49
- var o = Object.getOwnPropertySymbols(e);
50
- r && (o = o.filter(function(r$1) {
51
- return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
52
- })), t.push.apply(t, o);
53
- }
54
- return t;
55
- }
56
- function _objectSpread(e) {
57
- for (var r = 1; r < arguments.length; r++) {
58
- var t = null != arguments[r] ? arguments[r] : {};
59
- r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
60
- _defineProperty(e, r$1, t[r$1]);
61
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
62
- Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
63
- });
64
- }
65
- return e;
66
- }
67
- function _defineProperty(obj, key, value) {
68
- key = _toPropertyKey(key);
69
- if (key in obj) Object.defineProperty(obj, key, {
70
- value,
71
- enumerable: true,
72
- configurable: true,
73
- writable: true
74
- });
75
- else obj[key] = value;
76
- return obj;
77
- }
78
- function _toPropertyKey(t) {
79
- var i = _toPrimitive(t, "string");
80
- return "symbol" == typeof i ? i : i + "";
81
- }
82
- function _toPrimitive(t, r) {
83
- if ("object" != typeof t || !t) return t;
84
- var e = t[Symbol.toPrimitive];
85
- if (void 0 !== e) {
86
- var i = e.call(t, r || "default");
87
- if ("object" != typeof i) return i;
88
- throw new TypeError("@@toPrimitive must return a primitive value.");
89
- }
90
- return ("string" === r ? String : Number)(t);
91
- }
92
- function Tree2Element(tree) {
93
- return tree && tree.map((node, i) => /* @__PURE__ */ react.default.createElement(node.tag, _objectSpread({ key: i }, node.attr), Tree2Element(node.child)));
94
- }
95
- function GenIcon(data) {
96
- return (props) => /* @__PURE__ */ react.default.createElement(IconBase, _extends({ attr: _objectSpread({}, data.attr) }, props), Tree2Element(data.child));
97
- }
98
- function IconBase(props) {
99
- var elem = (conf) => {
100
- var { attr, size, title } = props, svgProps = _objectWithoutProperties(props, _excluded);
101
- var computedSize = size || conf.size || "1em";
102
- var className;
103
- if (conf.className) className = conf.className;
104
- if (props.className) className = (className ? className + " " : "") + props.className;
105
- return /* @__PURE__ */ react.default.createElement("svg", _extends({
106
- stroke: "currentColor",
107
- fill: "currentColor",
108
- strokeWidth: "0"
109
- }, conf.attr, attr, svgProps, {
110
- className,
111
- style: _objectSpread(_objectSpread({ color: props.color || conf.color }, conf.style), props.style),
112
- height: computedSize,
113
- width: computedSize,
114
- xmlns: "http://www.w3.org/2000/svg"
115
- }), title && /* @__PURE__ */ react.default.createElement("title", null, title), props.children);
116
- };
117
- return require_iconContext.IconContext !== void 0 ? /* @__PURE__ */ react.default.createElement(require_iconContext.IconContext.Consumer, null, (conf) => elem(conf)) : elem(require_iconContext.DefaultContext);
118
- }
119
-
120
- //#endregion
121
- exports.GenIcon = GenIcon;
@@ -1,119 +0,0 @@
1
- import { DefaultContext, IconContext } from "./iconContext.js";
2
- import React from "react";
3
-
4
- //#region ../../node_modules/react-icons/lib/iconBase.mjs
5
- var _excluded = [
6
- "attr",
7
- "size",
8
- "title"
9
- ];
10
- function _objectWithoutProperties(source, excluded) {
11
- if (source == null) return {};
12
- var target = _objectWithoutPropertiesLoose(source, excluded);
13
- var key, i;
14
- if (Object.getOwnPropertySymbols) {
15
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
16
- for (i = 0; i < sourceSymbolKeys.length; i++) {
17
- key = sourceSymbolKeys[i];
18
- if (excluded.indexOf(key) >= 0) continue;
19
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
20
- target[key] = source[key];
21
- }
22
- }
23
- return target;
24
- }
25
- function _objectWithoutPropertiesLoose(source, excluded) {
26
- if (source == null) return {};
27
- var target = {};
28
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) {
29
- if (excluded.indexOf(key) >= 0) continue;
30
- target[key] = source[key];
31
- }
32
- return target;
33
- }
34
- function _extends() {
35
- _extends = Object.assign ? Object.assign.bind() : function(target) {
36
- for (var i = 1; i < arguments.length; i++) {
37
- var source = arguments[i];
38
- for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
39
- }
40
- return target;
41
- };
42
- return _extends.apply(this, arguments);
43
- }
44
- function ownKeys(e, r) {
45
- var t = Object.keys(e);
46
- if (Object.getOwnPropertySymbols) {
47
- var o = Object.getOwnPropertySymbols(e);
48
- r && (o = o.filter(function(r$1) {
49
- return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
50
- })), t.push.apply(t, o);
51
- }
52
- return t;
53
- }
54
- function _objectSpread(e) {
55
- for (var r = 1; r < arguments.length; r++) {
56
- var t = null != arguments[r] ? arguments[r] : {};
57
- r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
58
- _defineProperty(e, r$1, t[r$1]);
59
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
60
- Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
61
- });
62
- }
63
- return e;
64
- }
65
- function _defineProperty(obj, key, value) {
66
- key = _toPropertyKey(key);
67
- if (key in obj) Object.defineProperty(obj, key, {
68
- value,
69
- enumerable: true,
70
- configurable: true,
71
- writable: true
72
- });
73
- else obj[key] = value;
74
- return obj;
75
- }
76
- function _toPropertyKey(t) {
77
- var i = _toPrimitive(t, "string");
78
- return "symbol" == typeof i ? i : i + "";
79
- }
80
- function _toPrimitive(t, r) {
81
- if ("object" != typeof t || !t) return t;
82
- var e = t[Symbol.toPrimitive];
83
- if (void 0 !== e) {
84
- var i = e.call(t, r || "default");
85
- if ("object" != typeof i) return i;
86
- throw new TypeError("@@toPrimitive must return a primitive value.");
87
- }
88
- return ("string" === r ? String : Number)(t);
89
- }
90
- function Tree2Element(tree) {
91
- return tree && tree.map((node, i) => /* @__PURE__ */ React.createElement(node.tag, _objectSpread({ key: i }, node.attr), Tree2Element(node.child)));
92
- }
93
- function GenIcon(data) {
94
- return (props) => /* @__PURE__ */ React.createElement(IconBase, _extends({ attr: _objectSpread({}, data.attr) }, props), Tree2Element(data.child));
95
- }
96
- function IconBase(props) {
97
- var elem = (conf) => {
98
- var { attr, size, title } = props, svgProps = _objectWithoutProperties(props, _excluded);
99
- var computedSize = size || conf.size || "1em";
100
- var className;
101
- if (conf.className) className = conf.className;
102
- if (props.className) className = (className ? className + " " : "") + props.className;
103
- return /* @__PURE__ */ React.createElement("svg", _extends({
104
- stroke: "currentColor",
105
- fill: "currentColor",
106
- strokeWidth: "0"
107
- }, conf.attr, attr, svgProps, {
108
- className,
109
- style: _objectSpread(_objectSpread({ color: props.color || conf.color }, conf.style), props.style),
110
- height: computedSize,
111
- width: computedSize,
112
- xmlns: "http://www.w3.org/2000/svg"
113
- }), title && /* @__PURE__ */ React.createElement("title", null, title), props.children);
114
- };
115
- return IconContext !== void 0 ? /* @__PURE__ */ React.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
116
- }
117
-
118
- //#endregion
119
- export { GenIcon };
@@ -1,17 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- let react = require("react");
3
- react = require_rolldown_runtime.__toESM(react);
4
-
5
- //#region ../../node_modules/react-icons/lib/iconContext.mjs
6
- var DefaultContext = {
7
- color: void 0,
8
- size: void 0,
9
- className: void 0,
10
- style: void 0,
11
- attr: void 0
12
- };
13
- var IconContext = react.default.createContext && /* @__PURE__ */ react.default.createContext(DefaultContext);
14
-
15
- //#endregion
16
- exports.DefaultContext = DefaultContext;
17
- exports.IconContext = IconContext;
@@ -1,14 +0,0 @@
1
- import React from "react";
2
-
3
- //#region ../../node_modules/react-icons/lib/iconContext.mjs
4
- var DefaultContext = {
5
- color: void 0,
6
- size: void 0,
7
- className: void 0,
8
- style: void 0,
9
- attr: void 0
10
- };
11
- var IconContext = React.createContext && /* @__PURE__ */ React.createContext(DefaultContext);
12
-
13
- //#endregion
14
- export { DefaultContext, IconContext };
@@ -1,35 +0,0 @@
1
- const require_iconBase = require('../lib/iconBase.cjs');
2
-
3
- //#region ../../node_modules/react-icons/md/index.mjs
4
- function MdStar(props) {
5
- return require_iconBase.GenIcon({
6
- "tag": "svg",
7
- "attr": { "viewBox": "0 0 24 24" },
8
- "child": [
9
- {
10
- "tag": "path",
11
- "attr": {
12
- "fill": "none",
13
- "d": "M0 0h24v24H0z"
14
- },
15
- "child": []
16
- },
17
- {
18
- "tag": "path",
19
- "attr": {
20
- "fill": "none",
21
- "d": "M0 0h24v24H0z"
22
- },
23
- "child": []
24
- },
25
- {
26
- "tag": "path",
27
- "attr": { "d": "M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" },
28
- "child": []
29
- }
30
- ]
31
- })(props);
32
- }
33
-
34
- //#endregion
35
- exports.MdStar = MdStar;
@@ -1,35 +0,0 @@
1
- import { GenIcon } from "../lib/iconBase.js";
2
-
3
- //#region ../../node_modules/react-icons/md/index.mjs
4
- function MdStar(props) {
5
- return GenIcon({
6
- "tag": "svg",
7
- "attr": { "viewBox": "0 0 24 24" },
8
- "child": [
9
- {
10
- "tag": "path",
11
- "attr": {
12
- "fill": "none",
13
- "d": "M0 0h24v24H0z"
14
- },
15
- "child": []
16
- },
17
- {
18
- "tag": "path",
19
- "attr": {
20
- "fill": "none",
21
- "d": "M0 0h24v24H0z"
22
- },
23
- "child": []
24
- },
25
- {
26
- "tag": "path",
27
- "attr": { "d": "M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" },
28
- "child": []
29
- }
30
- ]
31
- })(props);
32
- }
33
-
34
- //#endregion
35
- export { MdStar };
@@ -1,80 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_Typography = require('../Typography/Typography.cjs');
3
- require('../Typography/index.cjs');
4
- const require_ChevronDown = require('../../../../icons/dist/ChevronDown.cjs');
5
- let react = require("react");
6
- let classnames = require("classnames");
7
- classnames = require_rolldown_runtime.__toESM(classnames);
8
- let react_jsx_runtime = require("react/jsx-runtime");
9
- let framer_motion = require("framer-motion");
10
-
11
- //#region ../components/dist/components/Accordion/Accordion.js
12
- const ANIMATION_DURATION = .3;
13
- const Accordion = ({ title, content }) => {
14
- const [isOpen, setIsOpen] = (0, react.useState)(false);
15
- const contentRef = (0, react.useRef)(null);
16
- const titleWrapperClasses = (0, classnames.default)({
17
- "spiffy-tw-border-b": true,
18
- "spiffy-tw-border-[--spiffy-colors-border-light]": true,
19
- "spiffy-tw-pb-2": true,
20
- "spiffy-tw-flex": true,
21
- "spiffy-tw-justify-between": true,
22
- "spiffy-tw-items-center": true,
23
- "spiffy-tw-w-full": true,
24
- "spiffy-tw-group": true
25
- });
26
- const titleClasses = (0, classnames.default)({
27
- "spiffy-tw-uppercase": true,
28
- "spiffy-tw-text-[--spiffy-colors-text-primary]": true,
29
- "!spiffy-tw-font-[400]": true,
30
- "group-aria-expanded:!spiffy-tw-font-medium": true
31
- });
32
- const contentClasses = (0, classnames.default)({ "spiffy-tw-overflow-hidden": true });
33
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
34
- "aria-expanded": isOpen,
35
- type: "button",
36
- className: titleWrapperClasses,
37
- onClick: () => setIsOpen(!isOpen),
38
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
39
- variant: "body4",
40
- className: titleClasses,
41
- children: title
42
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
43
- variants: {
44
- open: { rotate: 180 },
45
- closed: { rotate: 360 }
46
- },
47
- animate: isOpen ? "open" : "closed",
48
- transition: {
49
- duration: ANIMATION_DURATION,
50
- ease: "easeOut"
51
- },
52
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ChevronDown.ChevronDown_default, {})
53
- })]
54
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
55
- variants: {
56
- open: {
57
- height: "auto",
58
- marginTop: "24px",
59
- marginBottom: "24px"
60
- },
61
- closed: {
62
- height: "0px",
63
- marginTop: "0px",
64
- marginBottom: "0px"
65
- }
66
- },
67
- className: contentClasses,
68
- initial: { height: 0 },
69
- animate: isOpen ? "open" : "closed",
70
- transition: {
71
- duration: ANIMATION_DURATION,
72
- ease: "easeOut"
73
- },
74
- ref: contentRef,
75
- children: content
76
- })] });
77
- };
78
-
79
- //#endregion
80
- exports.Accordion = Accordion;
@@ -1,78 +0,0 @@
1
- import { Typography } from "../Typography/Typography.js";
2
- import "../Typography/index.js";
3
- import { ChevronDown_default } from "../../../../icons/dist/ChevronDown.js";
4
- import { useRef, useState } from "react";
5
- import classNames from "classnames";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- import { motion } from "framer-motion";
8
-
9
- //#region ../components/dist/components/Accordion/Accordion.js
10
- const ANIMATION_DURATION = .3;
11
- const Accordion = ({ title, content }) => {
12
- const [isOpen, setIsOpen] = useState(false);
13
- const contentRef = useRef(null);
14
- const titleWrapperClasses = classNames({
15
- "spiffy-tw-border-b": true,
16
- "spiffy-tw-border-[--spiffy-colors-border-light]": true,
17
- "spiffy-tw-pb-2": true,
18
- "spiffy-tw-flex": true,
19
- "spiffy-tw-justify-between": true,
20
- "spiffy-tw-items-center": true,
21
- "spiffy-tw-w-full": true,
22
- "spiffy-tw-group": true
23
- });
24
- const titleClasses = classNames({
25
- "spiffy-tw-uppercase": true,
26
- "spiffy-tw-text-[--spiffy-colors-text-primary]": true,
27
- "!spiffy-tw-font-[400]": true,
28
- "group-aria-expanded:!spiffy-tw-font-medium": true
29
- });
30
- const contentClasses = classNames({ "spiffy-tw-overflow-hidden": true });
31
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("button", {
32
- "aria-expanded": isOpen,
33
- type: "button",
34
- className: titleWrapperClasses,
35
- onClick: () => setIsOpen(!isOpen),
36
- children: [/* @__PURE__ */ jsx(Typography, {
37
- variant: "body4",
38
- className: titleClasses,
39
- children: title
40
- }), /* @__PURE__ */ jsx(motion.div, {
41
- variants: {
42
- open: { rotate: 180 },
43
- closed: { rotate: 360 }
44
- },
45
- animate: isOpen ? "open" : "closed",
46
- transition: {
47
- duration: ANIMATION_DURATION,
48
- ease: "easeOut"
49
- },
50
- children: /* @__PURE__ */ jsx(ChevronDown_default, {})
51
- })]
52
- }), /* @__PURE__ */ jsx(motion.div, {
53
- variants: {
54
- open: {
55
- height: "auto",
56
- marginTop: "24px",
57
- marginBottom: "24px"
58
- },
59
- closed: {
60
- height: "0px",
61
- marginTop: "0px",
62
- marginBottom: "0px"
63
- }
64
- },
65
- className: contentClasses,
66
- initial: { height: 0 },
67
- animate: isOpen ? "open" : "closed",
68
- transition: {
69
- duration: ANIMATION_DURATION,
70
- ease: "easeOut"
71
- },
72
- ref: contentRef,
73
- children: content
74
- })] });
75
- };
76
-
77
- //#endregion
78
- export { Accordion };
@@ -1 +0,0 @@
1
- const require_Accordion = require('./Accordion.cjs');
@@ -1 +0,0 @@
1
- import { Accordion } from "./Accordion.js";