@envive-ai/react-widgets 0.1.3 → 0.3.1

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 (197) 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.js +1 -1
  5. package/dist/SearchResults/withSearchResults.cjs +1 -1
  6. package/dist/SearchResults/withSearchResults.js +1 -1
  7. package/dist/SearchZeroState/SearchIcon.cjs +2 -3
  8. package/dist/SearchZeroState/SearchIcon.js +1 -2
  9. package/dist/SearchZeroState/SearchZeroState.cjs +12 -16
  10. package/dist/SearchZeroState/SearchZeroState.js +7 -11
  11. package/dist/SearchZeroState/SearchZeroStateWidget.cjs +1 -1
  12. package/dist/SearchZeroState/SearchZeroStateWidget.js +1 -1
  13. package/dist/SearchZeroState/components/RecommendedProducts.cjs +5 -7
  14. package/dist/SearchZeroState/components/RecommendedProducts.js +3 -5
  15. package/dist/SuggestionBar/SuggestionBar.cjs +1 -1
  16. package/dist/SuggestionBar/SuggestionBar.js +2 -2
  17. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +6 -7
  18. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +2 -3
  19. package/package.json +3 -1
  20. package/dist/node_modules/react-icons/lib/iconBase.cjs +0 -121
  21. package/dist/node_modules/react-icons/lib/iconBase.js +0 -119
  22. package/dist/node_modules/react-icons/lib/iconContext.cjs +0 -17
  23. package/dist/node_modules/react-icons/lib/iconContext.js +0 -14
  24. package/dist/node_modules/react-icons/md/index.cjs +0 -35
  25. package/dist/node_modules/react-icons/md/index.js +0 -35
  26. package/dist/packages/components/dist/components/Accordion/Accordion.cjs +0 -80
  27. package/dist/packages/components/dist/components/Accordion/Accordion.js +0 -78
  28. package/dist/packages/components/dist/components/Accordion/index.cjs +0 -1
  29. package/dist/packages/components/dist/components/Accordion/index.js +0 -1
  30. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.cjs +0 -30
  31. package/dist/packages/components/dist/components/AnimatedChevron/AnimatedChevron.js +0 -29
  32. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.cjs +0 -56
  33. package/dist/packages/components/dist/components/ButtonBase/ButtonBase.js +0 -54
  34. package/dist/packages/components/dist/components/ButtonBase/index.cjs +0 -2
  35. package/dist/packages/components/dist/components/ButtonBase/index.js +0 -2
  36. package/dist/packages/components/dist/components/ButtonBase/types.cjs +0 -11
  37. package/dist/packages/components/dist/components/ButtonBase/types.js +0 -10
  38. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.cjs +0 -45
  39. package/dist/packages/components/dist/components/FilterScrollbar/AppliedFiltersScrollbar.js +0 -42
  40. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.cjs +0 -33
  41. package/dist/packages/components/dist/components/FilterScrollbar/DynamicFiltersScrollbar.js +0 -30
  42. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.cjs +0 -45
  43. package/dist/packages/components/dist/components/ImageWithFallback/ImageWithFallback.js +0 -42
  44. package/dist/packages/components/dist/components/ImageWithFallback/index.cjs +0 -1
  45. package/dist/packages/components/dist/components/ImageWithFallback/index.js +0 -1
  46. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.cjs +0 -30
  47. package/dist/packages/components/dist/components/ModalSheet/ModalSheet.js +0 -29
  48. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.cjs +0 -26
  49. package/dist/packages/components/dist/components/ModalSheet/desktop/desktopHeader.js +0 -24
  50. package/dist/packages/components/dist/components/ModalSheet/desktop/index.cjs +0 -122
  51. package/dist/packages/components/dist/components/ModalSheet/desktop/index.js +0 -120
  52. package/dist/packages/components/dist/components/ModalSheet/index.cjs +0 -1
  53. package/dist/packages/components/dist/components/ModalSheet/index.js +0 -1
  54. package/dist/packages/components/dist/components/ModalSheet/mobile/index.cjs +0 -116
  55. package/dist/packages/components/dist/components/ModalSheet/mobile/index.js +0 -114
  56. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.cjs +0 -38
  57. package/dist/packages/components/dist/components/ModalSheet/mobile/mobileHeader.js +0 -36
  58. package/dist/packages/components/dist/components/ProductCard/ProductCard.cjs +0 -153
  59. package/dist/packages/components/dist/components/ProductCard/ProductCard.js +0 -149
  60. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.cjs +0 -33
  61. package/dist/packages/components/dist/components/ProductCard/ProductCardSkeleton.js +0 -31
  62. package/dist/packages/components/dist/components/ProductCard/index.cjs +0 -4
  63. package/dist/packages/components/dist/components/ProductCard/index.js +0 -4
  64. package/dist/packages/components/dist/components/ProductCard/productCardVariants.cjs +0 -49
  65. package/dist/packages/components/dist/components/ProductCard/productCardVariants.js +0 -45
  66. package/dist/packages/components/dist/components/ProductCard/types.cjs +0 -10
  67. package/dist/packages/components/dist/components/ProductCard/types.js +0 -9
  68. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.cjs +0 -43
  69. package/dist/packages/components/dist/components/ProductGrid/ProductGrid.js +0 -41
  70. package/dist/packages/components/dist/components/ProductGrid/index.cjs +0 -2
  71. package/dist/packages/components/dist/components/ProductGrid/index.js +0 -2
  72. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.cjs +0 -21
  73. package/dist/packages/components/dist/components/ProductGrid/productGridVariants.js +0 -20
  74. package/dist/packages/components/dist/components/RadioButton/RadioButton.cjs +0 -74
  75. package/dist/packages/components/dist/components/RadioButton/RadioButton.js +0 -72
  76. package/dist/packages/components/dist/components/RadioButton/index.cjs +0 -1
  77. package/dist/packages/components/dist/components/RadioButton/index.js +0 -1
  78. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.cjs +0 -42
  79. package/dist/packages/components/dist/components/RadioButtonGroup/RadioButtonGroup.js +0 -39
  80. package/dist/packages/components/dist/components/RadioButtonGroup/index.cjs +0 -1
  81. package/dist/packages/components/dist/components/RadioButtonGroup/index.js +0 -1
  82. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.cjs +0 -53
  83. package/dist/packages/components/dist/components/RecommendedProducts/RecommendedProducts.js +0 -51
  84. package/dist/packages/components/dist/components/RecommendedProducts/index.cjs +0 -3
  85. package/dist/packages/components/dist/components/RecommendedProducts/index.js +0 -3
  86. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +0 -72
  87. package/dist/packages/components/dist/components/SearchAutocomplete/SearchAutocomplete.js +0 -69
  88. package/dist/packages/components/dist/components/SearchAutocomplete/index.cjs +0 -1
  89. package/dist/packages/components/dist/components/SearchAutocomplete/index.js +0 -1
  90. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.cjs +0 -134
  91. package/dist/packages/components/dist/components/SearchFilter/SearchFilter.js +0 -132
  92. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.cjs +0 -48
  93. package/dist/packages/components/dist/components/SearchFilter/SearchFilterFooter.js +0 -46
  94. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.cjs +0 -42
  95. package/dist/packages/components/dist/components/SearchFilter/SearchFilterHeader.js +0 -40
  96. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.cjs +0 -6
  97. package/dist/packages/components/dist/components/SearchFilter/SearchFilterItem.js +0 -4
  98. package/dist/packages/components/dist/components/SearchFilter/index.cjs +0 -5
  99. package/dist/packages/components/dist/components/SearchFilter/index.js +0 -5
  100. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.cjs +0 -27
  101. package/dist/packages/components/dist/components/SearchFilter/useHasFilterStateChanged.js +0 -26
  102. package/dist/packages/components/dist/components/SearchFilter/utils.cjs +0 -11
  103. package/dist/packages/components/dist/components/SearchFilter/utils.js +0 -9
  104. package/dist/packages/components/dist/components/SearchInput/SearchInput.cjs +0 -81
  105. package/dist/packages/components/dist/components/SearchInput/SearchInput.js +0 -78
  106. package/dist/packages/components/dist/components/SearchInput/index.cjs +0 -2
  107. package/dist/packages/components/dist/components/SearchInput/index.js +0 -2
  108. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.cjs +0 -15
  109. package/dist/packages/components/dist/components/SearchInput/searchInputVariants.js +0 -15
  110. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.cjs +0 -57
  111. package/dist/packages/components/dist/components/SearchInputForm/SearchInputForm.js +0 -55
  112. package/dist/packages/components/dist/components/SearchInputForm/index.cjs +0 -1
  113. package/dist/packages/components/dist/components/SearchInputForm/index.js +0 -1
  114. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.cjs +0 -52
  115. package/dist/packages/components/dist/components/SearchResultsContent/SearchResultsContent.js +0 -50
  116. package/dist/packages/components/dist/components/SearchResultsContent/index.cjs +0 -1
  117. package/dist/packages/components/dist/components/SearchResultsContent/index.js +0 -1
  118. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.cjs +0 -24
  119. package/dist/packages/components/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.js +0 -23
  120. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.cjs +0 -3
  121. package/dist/packages/components/dist/components/SearchResultsFilterButton/index.js +0 -3
  122. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.cjs +0 -36
  123. package/dist/packages/components/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.js +0 -35
  124. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.cjs +0 -3
  125. package/dist/packages/components/dist/components/SearchResultsFilterModal/index.js +0 -3
  126. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.cjs +0 -9
  127. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.js +0 -9
  128. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.cjs +0 -2
  129. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/index.js +0 -2
  130. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.cjs +0 -34
  131. package/dist/packages/components/dist/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.js +0 -34
  132. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.cjs +0 -56
  133. package/dist/packages/components/dist/components/SearchResultsStates/NoSearchResultsFound.js +0 -54
  134. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.cjs +0 -53
  135. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsGrid.js +0 -51
  136. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +0 -52
  137. package/dist/packages/components/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +0 -51
  138. package/dist/packages/components/dist/components/SearchResultsStates/index.cjs +0 -3
  139. package/dist/packages/components/dist/components/SearchResultsStates/index.js +0 -3
  140. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.cjs +0 -60
  141. package/dist/packages/components/dist/components/SearchResultsToolbar/SearchResultsToolbar.js +0 -57
  142. package/dist/packages/components/dist/components/SearchResultsToolbar/index.cjs +0 -3
  143. package/dist/packages/components/dist/components/SearchResultsToolbar/index.js +0 -3
  144. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.cjs +0 -77
  145. package/dist/packages/components/dist/components/SparkleAnimation/SparkleAnimation.js +0 -75
  146. package/dist/packages/components/dist/components/SparkleAnimation/index.cjs +0 -2
  147. package/dist/packages/components/dist/components/SparkleAnimation/index.js +0 -2
  148. package/dist/packages/components/dist/components/SparkleAnimation/types.cjs +0 -12
  149. package/dist/packages/components/dist/components/SparkleAnimation/types.js +0 -11
  150. package/dist/packages/components/dist/components/Spinner/Spinner.cjs +0 -40
  151. package/dist/packages/components/dist/components/Spinner/Spinner.js +0 -38
  152. package/dist/packages/components/dist/components/Spinner/index.cjs +0 -1
  153. package/dist/packages/components/dist/components/Spinner/index.js +0 -1
  154. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.cjs +0 -193
  155. package/dist/packages/components/dist/components/SuggestionButton/SuggestionButton.js +0 -188
  156. package/dist/packages/components/dist/components/SuggestionButton/index.cjs +0 -1
  157. package/dist/packages/components/dist/components/SuggestionButton/index.js +0 -1
  158. package/dist/packages/components/dist/components/TextInput/TextInput.cjs +0 -34
  159. package/dist/packages/components/dist/components/TextInput/TextInput.js +0 -31
  160. package/dist/packages/components/dist/components/TextInput/index.cjs +0 -1
  161. package/dist/packages/components/dist/components/TextInput/index.js +0 -1
  162. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.cjs +0 -63
  163. package/dist/packages/components/dist/components/ToggleButton/ToggleButton.js +0 -61
  164. package/dist/packages/components/dist/components/ToggleButton/index.cjs +0 -1
  165. package/dist/packages/components/dist/components/ToggleButton/index.js +0 -1
  166. package/dist/packages/components/dist/components/Typography/Typography.cjs +0 -53
  167. package/dist/packages/components/dist/components/Typography/Typography.js +0 -50
  168. package/dist/packages/components/dist/components/Typography/index.cjs +0 -2
  169. package/dist/packages/components/dist/components/Typography/index.js +0 -2
  170. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.cjs +0 -99
  171. package/dist/packages/components/dist/components/Typography/typographyVariantClasses.js +0 -96
  172. package/dist/packages/components/dist/components/Typography/util.cjs +0 -10
  173. package/dist/packages/components/dist/components/Typography/util.js +0 -10
  174. package/dist/packages/components/dist/logging/logger.cjs +0 -20
  175. package/dist/packages/components/dist/logging/logger.js +0 -19
  176. package/dist/packages/components/dist/models/colorsConfig.cjs +0 -28
  177. package/dist/packages/components/dist/models/colorsConfig.js +0 -26
  178. package/dist/packages/components/dist/util/formatPrice.cjs +0 -14
  179. package/dist/packages/components/dist/util/formatPrice.js +0 -13
  180. package/dist/packages/components/dist/util/index.cjs +0 -3
  181. package/dist/packages/components/dist/util/index.js +0 -3
  182. package/dist/packages/components/dist/util/useScrollDirection.cjs +0 -39
  183. package/dist/packages/components/dist/util/useScrollDirection.js +0 -38
  184. package/dist/packages/components/dist/util/useStickyVisibility.cjs +0 -38
  185. package/dist/packages/components/dist/util/useStickyVisibility.js +0 -37
  186. package/dist/packages/icons/dist/ChevronDown.cjs +0 -23
  187. package/dist/packages/icons/dist/ChevronDown.js +0 -23
  188. package/dist/packages/icons/dist/FourPointStar.cjs +0 -22
  189. package/dist/packages/icons/dist/FourPointStar.js +0 -22
  190. package/dist/packages/icons/dist/IconClose.cjs +0 -26
  191. package/dist/packages/icons/dist/IconClose.js +0 -26
  192. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.cjs +0 -39
  193. package/dist/packages/icons/dist/MagnifyingGlassStarVariant.js +0 -39
  194. package/dist/packages/icons/dist/OutlinedStar.cjs +0 -22
  195. package/dist/packages/icons/dist/OutlinedStar.js +0 -22
  196. package/dist/packages/icons/dist/SettingsVariant.cjs +0 -72
  197. package/dist/packages/icons/dist/SettingsVariant.js +0 -72
@@ -1,75 +0,0 @@
1
- import { FourPointStar_default } from "../../../../icons/dist/FourPointStar.js";
2
- import { SparkleAnimationOverride } from "./types.js";
3
- import { useEffect, useState } from "react";
4
- import classNames from "classnames";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
- import { motion } from "framer-motion";
7
-
8
- //#region ../components/dist/components/SparkleAnimation/SparkleAnimation.js
9
- const ANIMATION_CYCLE_TIME = 1e3;
10
- const STAR_DELAY_OFFSET = 250;
11
- const SparkleAnimation = ({ color, className, animate = true }) => {
12
- const [mainStarScale, setMainStarScale] = useState(animate ? 0 : 1);
13
- const [smallStar1Scale, setSmallStar1Scale] = useState(animate ? 0 : 1);
14
- const [smallStar2Scale, setSmallStar2Scale] = useState(animate ? 0 : 1);
15
- const containerClasses = classNames(SparkleAnimationOverride.CONTAINER, "spiffy-tw-w-6 spiffy-tw-h-6 spiffy-tw-relative", className);
16
- useEffect(() => {
17
- if (!animate) {
18
- setMainStarScale(1);
19
- setSmallStar1Scale(1);
20
- setSmallStar2Scale(1);
21
- }
22
- }, [animate]);
23
- useEffect(() => {
24
- if (!animate) return;
25
- const newScale = mainStarScale === 1 ? 0 : 1;
26
- setTimeout(() => setMainStarScale(newScale), ANIMATION_CYCLE_TIME);
27
- setTimeout(() => setSmallStar1Scale(newScale), ANIMATION_CYCLE_TIME + STAR_DELAY_OFFSET);
28
- setTimeout(() => setSmallStar2Scale(newScale), ANIMATION_CYCLE_TIME + 2 * STAR_DELAY_OFFSET);
29
- }, [mainStarScale, animate]);
30
- const starTransition = {
31
- duration: .3,
32
- ease: "easeOut"
33
- };
34
- return /* @__PURE__ */ jsxs("div", {
35
- className: containerClasses,
36
- children: [
37
- /* @__PURE__ */ jsx("div", {
38
- className: classNames(SparkleAnimationOverride.STAR_ONE_CONTAINER, "spiffy-tw-left-0 spiffy-tw-absolute -spiffy-tw-top-[2px]"),
39
- children: /* @__PURE__ */ jsx(motion.div, {
40
- animate: { scale: mainStarScale },
41
- transition: starTransition,
42
- children: /* @__PURE__ */ jsx(FourPointStar_default, {
43
- fill: color,
44
- className: "spiffy-tw-inline-block spiffy-tw-h-4 spiffy-tw-w-4"
45
- })
46
- })
47
- }),
48
- /* @__PURE__ */ jsx("div", {
49
- className: classNames(SparkleAnimationOverride.STAR_TWO_CONTAINER, "spiffy-tw-absolute -spiffy-tw-top-[7px] spiffy-tw-left-[10px]"),
50
- children: /* @__PURE__ */ jsx(motion.div, {
51
- animate: { scale: smallStar1Scale },
52
- transition: starTransition,
53
- children: /* @__PURE__ */ jsx(FourPointStar_default, {
54
- fill: color,
55
- className: "spiffy-tw-inline-block spiffy-tw-h-2 spiffy-tw-w-2"
56
- })
57
- })
58
- }),
59
- /* @__PURE__ */ jsx("div", {
60
- className: classNames(SparkleAnimationOverride.STAR_THREE_CONTAINER, "spiffy-tw-absolute spiffy-tw-left-[12px] spiffy-tw-top-[1px]"),
61
- children: /* @__PURE__ */ jsx(motion.div, {
62
- animate: { scale: smallStar2Scale },
63
- transition: starTransition,
64
- children: /* @__PURE__ */ jsx(FourPointStar_default, {
65
- fill: color,
66
- className: "spiffy-tw-inline-block spiffy-tw-h-2 spiffy-tw-w-2"
67
- })
68
- })
69
- })
70
- ]
71
- });
72
- };
73
-
74
- //#endregion
75
- export { SparkleAnimation };
@@ -1,2 +0,0 @@
1
- const require_types = require('./types.cjs');
2
- const require_SparkleAnimation = require('./SparkleAnimation.cjs');
@@ -1,2 +0,0 @@
1
- import { SparkleAnimationOverride } from "./types.js";
2
- import { SparkleAnimation } from "./SparkleAnimation.js";
@@ -1,12 +0,0 @@
1
-
2
- //#region ../components/dist/components/SparkleAnimation/types.js
3
- let SparkleAnimationOverride = /* @__PURE__ */ function(SparkleAnimationOverride$1) {
4
- SparkleAnimationOverride$1["CONTAINER"] = "spiffy-sparkle-animation-container";
5
- SparkleAnimationOverride$1["STAR_ONE_CONTAINER"] = "spiffy-sparkle-animation-star-one-container";
6
- SparkleAnimationOverride$1["STAR_TWO_CONTAINER"] = "spiffy-sparkle-animation-star-two-container";
7
- SparkleAnimationOverride$1["STAR_THREE_CONTAINER"] = "spiffy-sparkle-animation-star-three-container";
8
- return SparkleAnimationOverride$1;
9
- }({});
10
-
11
- //#endregion
12
- exports.SparkleAnimationOverride = SparkleAnimationOverride;
@@ -1,11 +0,0 @@
1
- //#region ../components/dist/components/SparkleAnimation/types.js
2
- let SparkleAnimationOverride = /* @__PURE__ */ function(SparkleAnimationOverride$1) {
3
- SparkleAnimationOverride$1["CONTAINER"] = "spiffy-sparkle-animation-container";
4
- SparkleAnimationOverride$1["STAR_ONE_CONTAINER"] = "spiffy-sparkle-animation-star-one-container";
5
- SparkleAnimationOverride$1["STAR_TWO_CONTAINER"] = "spiffy-sparkle-animation-star-two-container";
6
- SparkleAnimationOverride$1["STAR_THREE_CONTAINER"] = "spiffy-sparkle-animation-star-three-container";
7
- return SparkleAnimationOverride$1;
8
- }({});
9
-
10
- //#endregion
11
- export { SparkleAnimationOverride };
@@ -1,40 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
2
- let classnames = require("classnames");
3
- classnames = require_rolldown_runtime.__toESM(classnames);
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
-
6
- //#region ../components/dist/components/Spinner/Spinner.js
7
- const Spinner = ({ className }) => {
8
- const svgClassnames = (0, classnames.default)({
9
- "spiffy-tw-w-4": true,
10
- "spiffy-tw-h-4": true,
11
- "spiffy-tw-text-gray-200": true,
12
- "spiffy-tw-animate-spin": true,
13
- "spiffy-tw-dark:text-gray-600": true,
14
- "spiffy-tw-fill-black": true
15
- }, className);
16
- const spanClassnames = (0, classnames.default)({ "spiffy-tw-sr-only": true });
17
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
18
- role: "status",
19
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
20
- "aria-hidden": "true",
21
- className: svgClassnames,
22
- viewBox: "0 0 100 101",
23
- fill: "none",
24
- xmlns: "http://www.w3.org/2000/svg",
25
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
26
- d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
27
- fill: "currentColor"
28
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
29
- d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
30
- fill: "currentFill"
31
- })]
32
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
33
- className: spanClassnames,
34
- children: "Loading..."
35
- })]
36
- });
37
- };
38
-
39
- //#endregion
40
- exports.Spinner = Spinner;
@@ -1,38 +0,0 @@
1
- import classNames from "classnames";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
-
4
- //#region ../components/dist/components/Spinner/Spinner.js
5
- const Spinner = ({ className }) => {
6
- const svgClassnames = classNames({
7
- "spiffy-tw-w-4": true,
8
- "spiffy-tw-h-4": true,
9
- "spiffy-tw-text-gray-200": true,
10
- "spiffy-tw-animate-spin": true,
11
- "spiffy-tw-dark:text-gray-600": true,
12
- "spiffy-tw-fill-black": true
13
- }, className);
14
- const spanClassnames = classNames({ "spiffy-tw-sr-only": true });
15
- return /* @__PURE__ */ jsxs("div", {
16
- role: "status",
17
- children: [/* @__PURE__ */ jsxs("svg", {
18
- "aria-hidden": "true",
19
- className: svgClassnames,
20
- viewBox: "0 0 100 101",
21
- fill: "none",
22
- xmlns: "http://www.w3.org/2000/svg",
23
- children: [/* @__PURE__ */ jsx("path", {
24
- d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
25
- fill: "currentColor"
26
- }), /* @__PURE__ */ jsx("path", {
27
- d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
28
- fill: "currentFill"
29
- })]
30
- }), /* @__PURE__ */ jsx("span", {
31
- className: spanClassnames,
32
- children: "Loading..."
33
- })]
34
- });
35
- };
36
-
37
- //#endregion
38
- export { Spinner };
@@ -1 +0,0 @@
1
- const require_Spinner = require('./Spinner.cjs');
@@ -1 +0,0 @@
1
- import { Spinner } from "./Spinner.js";
@@ -1,193 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_ButtonBase = require('../ButtonBase/ButtonBase.cjs');
3
- const require_OutlinedStar = require('../../../../icons/dist/OutlinedStar.cjs');
4
- const require_FourPointStar = require('../../../../icons/dist/FourPointStar.cjs');
5
- let classnames = require("classnames");
6
- classnames = require_rolldown_runtime.__toESM(classnames);
7
- let react_jsx_runtime = require("react/jsx-runtime");
8
-
9
- //#region ../components/dist/components/SuggestionButton/SuggestionButton.js
10
- const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
11
- const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
12
- const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
13
- const BORDER_CLASS = "spiffy-tw-border";
14
- const TEXT_LINK_CLASSES = [
15
- "spiffy-tw-text-[--spiffy-colors-text-link]",
16
- "spiffy-tw-fill-[--spiffy-colors-text-link]",
17
- "spiffy-tw-stroke-[--spiffy-colors-text-link]"
18
- ];
19
- const TEXT_LIGHT_CLASSES = [
20
- "spiffy-tw-text-[--spiffy-colors-text-light]",
21
- "spiffy-tw-fill-[--spiffy-colors-text-light]",
22
- "spiffy-tw-stroke-[--spiffy-colors-text-light]"
23
- ];
24
- const TEXT_PRIMARY_CLASSES = [
25
- "spiffy-tw-text-[--spiffy-colors-text-primary]",
26
- "spiffy-tw-fill-[--spiffy-colors-text-primary]",
27
- "spiffy-tw-stroke-[--spiffy-colors-text-primary]"
28
- ];
29
- const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
30
- const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
31
- const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
32
- const variantClassMap = new Map([
33
- ["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
34
- ["outlinedLight", [
35
- "spiffy-tw-border-[--spiffy-colors-border-outline]",
36
- "spiffy-tw-bg-[--spiffy-colors-background-light]",
37
- ...TEXT_LINK_CLASSES,
38
- BORDER_CLASS
39
- ]],
40
- ["primary", [
41
- "spiffy-tw-bg-[--spiffy-colors-background-primary]",
42
- "spiffy-tw-border-[--spiffy-colors-background-primary]",
43
- ...TEXT_LIGHT_CLASSES,
44
- BORDER_CLASS
45
- ]],
46
- ["secondary", [
47
- "spiffy-tw-bg-[--spiffy-colors-background-secondary]",
48
- "spiffy-tw-text-[--spiffy-colors-text-link]",
49
- "spiffy-tw-border-[--spiffy-colors-background-secondary]",
50
- ...ACCENT_PRIMARY_CLASSES,
51
- BORDER_CLASS
52
- ]],
53
- ["tertiary", [
54
- "spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
55
- "spiffy-tw-border-[--spiffy-colors-background-tertiary]",
56
- ...TEXT_LINK_CLASSES,
57
- BORDER_CLASS
58
- ]],
59
- ["dark", [
60
- ...DARK_BACKGROUND_CLASSES,
61
- ...TEXT_LIGHT_CLASSES,
62
- BORDER_CLASS
63
- ]],
64
- ["darkPrimary", [
65
- ...DARK_BACKGROUND_CLASSES,
66
- "spiffy-tw-text-[--spiffy-colors-text-light]",
67
- ...ACCENT_PRIMARY_CLASSES,
68
- BORDER_CLASS
69
- ]],
70
- ["darkAccent", [
71
- ...DARK_BACKGROUND_CLASSES,
72
- "spiffy-tw-text-[--spiffy-colors-text-light]",
73
- "spiffy-tw-fill-[--spiffy-colors-text-accent]",
74
- "spiffy-tw-stroke-[--spiffy-colors-text-accent]",
75
- BORDER_CLASS
76
- ]],
77
- ["darkAccentContrast", [
78
- ...DARK_BACKGROUND_CLASSES,
79
- "spiffy-tw-text-[--spiffy-colors-text-light]",
80
- "spiffy-tw-fill-[--spiffy-colors-accent-primary]",
81
- "spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
82
- BORDER_CLASS
83
- ]],
84
- ["transparent", [
85
- "spiffy-tw-bg-transparent",
86
- "spiffy-tw-border-[--spiffy-colors-background-light]",
87
- "spiffy-tw-text-[--spiffy-colors-text-light]",
88
- "spiffy-tw-fill-transparent",
89
- "spiffy-tw-stroke-[--spiffy-colors-text-light]",
90
- BORDER_CLASS
91
- ]],
92
- ["transparentDark", [
93
- "spiffy-tw-bg-transparent",
94
- "spiffy-tw-border-[--spiffy-colors-border-light]",
95
- "spiffy-tw-text-[--spiffy-colors-text-primary]",
96
- "spiffy-tw-fill-transparent",
97
- "spiffy-tw-stroke-[--spiffy-colors-text-primary]",
98
- BORDER_CLASS
99
- ]],
100
- ["secondaryDark", [
101
- ...SECONDARY_DARK_BACKGROUND_CLASSES,
102
- ...TEXT_LINK_CLASSES,
103
- BORDER_CLASS
104
- ]],
105
- ["secondaryAccent", [
106
- ...SECONDARY_DARK_BACKGROUND_CLASSES,
107
- "spiffy-tw-text-[--spiffy-colors-text-link]",
108
- ...ACCENT_PRIMARY_CLASSES,
109
- BORDER_CLASS
110
- ]],
111
- ["lightDark", [
112
- "spiffy-tw-bg-[--spiffy-colors-background-light]",
113
- "spiffy-tw-border-[--spiffy-colors-background-dark]",
114
- ...TEXT_PRIMARY_CLASSES,
115
- BORDER_CLASS
116
- ]]
117
- ]);
118
- const Icon = ({ isAnswer, variant }) => {
119
- if (isAnswer) return void 0;
120
- if (variant === "transparentDark") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_OutlinedStar.OutlinedStar_default, {});
121
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FourPointStar.FourPointStar_default, {});
122
- };
123
- const borderedVariants = [
124
- "outlined",
125
- "outlinedLight",
126
- "primary",
127
- "secondary",
128
- "tertiary",
129
- "dark",
130
- "darkAccent",
131
- "darkAccentContrast",
132
- "darkPrimary",
133
- "transparent",
134
- "transparentDark",
135
- "secondaryDark",
136
- "secondaryAccent",
137
- "lightDark"
138
- ];
139
- const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
140
- const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
141
- const buttonClassName = (0, classnames.default)({
142
- [SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
143
- [SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
144
- "!spiffy-tw-rounded-[20px]": borderRadius === "lg",
145
- "!spiffy-tw-rounded-[8px]": borderRadius === "md",
146
- "!spiffy-tw-rounded-[0px]": borderRadius === "sm",
147
- "spiffy-tw-border-[1px]": borderedVariants.includes(variant),
148
- "spiffy-tw-border-solid": borderedVariants.includes(variant)
149
- });
150
- const textClassName = (0, classnames.default)({
151
- "spiffy-tw-text-[14px]": true,
152
- "spiffy-tw-leading-[100%]": true,
153
- "!spiffy-tw-font-bold": boldText
154
- });
155
- const iconClass = (0, classnames.default)({
156
- "spiffy-tw-w-[11px]": true,
157
- "spiffy-tw-h-[11px]": true,
158
- "spiffy-tw-stroke-inherit": true,
159
- "spiffy-tw-fill-inherit": true
160
- });
161
- const baseClasses = variantClassMap.get(variant) ?? [];
162
- const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
163
- const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
164
- const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
165
- const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
166
- const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
167
- const buttonClass = `${buttonClassName} ${[
168
- ...baseNonBorderClasses,
169
- ...hoverTransform(hoverNonBorderClasses),
170
- ...baseBorderClasses,
171
- ...hoverTransform(hoverBorderClasses)
172
- ].join(" ")}`;
173
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ButtonBase.ButtonBase, {
174
- text: content,
175
- dataAttributes,
176
- dataTestId,
177
- isDisabled,
178
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
179
- isAnswer,
180
- variant
181
- }),
182
- iconClass: isAnswer ? void 0 : iconClass,
183
- textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
184
- buttonClass,
185
- onClick
186
- });
187
- };
188
-
189
- //#endregion
190
- exports.SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS;
191
- exports.SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS;
192
- exports.SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS;
193
- exports.SuggestionButton = SuggestionButton;
@@ -1,188 +0,0 @@
1
- import { ButtonBase } from "../ButtonBase/ButtonBase.js";
2
- import { OutlinedStar_default } from "../../../../icons/dist/OutlinedStar.js";
3
- import { FourPointStar_default } from "../../../../icons/dist/FourPointStar.js";
4
- import classNames from "classnames";
5
- import { jsx } from "react/jsx-runtime";
6
-
7
- //#region ../components/dist/components/SuggestionButton/SuggestionButton.js
8
- const SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS = "spiffy-suggestion-button-question-class";
9
- const SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS = "spiffy-suggestion-button-answer-class";
10
- const SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS = "spiffy-suggestion-button-text-class";
11
- const BORDER_CLASS = "spiffy-tw-border";
12
- const TEXT_LINK_CLASSES = [
13
- "spiffy-tw-text-[--spiffy-colors-text-link]",
14
- "spiffy-tw-fill-[--spiffy-colors-text-link]",
15
- "spiffy-tw-stroke-[--spiffy-colors-text-link]"
16
- ];
17
- const TEXT_LIGHT_CLASSES = [
18
- "spiffy-tw-text-[--spiffy-colors-text-light]",
19
- "spiffy-tw-fill-[--spiffy-colors-text-light]",
20
- "spiffy-tw-stroke-[--spiffy-colors-text-light]"
21
- ];
22
- const TEXT_PRIMARY_CLASSES = [
23
- "spiffy-tw-text-[--spiffy-colors-text-primary]",
24
- "spiffy-tw-fill-[--spiffy-colors-text-primary]",
25
- "spiffy-tw-stroke-[--spiffy-colors-text-primary]"
26
- ];
27
- const ACCENT_PRIMARY_CLASSES = ["spiffy-tw-fill-[--spiffy-colors-accent-primary]", "spiffy-tw-stroke-[--spiffy-colors-accent-primary]"];
28
- const DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-dark]", "spiffy-tw-border-[--spiffy-colors-background-dark]"];
29
- const SECONDARY_DARK_BACKGROUND_CLASSES = ["spiffy-tw-bg-[--spiffy-colors-background-secondary-dark]", "spiffy-tw-border-[--spiffy-colors-background-secondary-dark]"];
30
- const variantClassMap = new Map([
31
- ["outlined", ["spiffy-tw-border-[--spiffy-colors-border-outline]", ...TEXT_LINK_CLASSES]],
32
- ["outlinedLight", [
33
- "spiffy-tw-border-[--spiffy-colors-border-outline]",
34
- "spiffy-tw-bg-[--spiffy-colors-background-light]",
35
- ...TEXT_LINK_CLASSES,
36
- BORDER_CLASS
37
- ]],
38
- ["primary", [
39
- "spiffy-tw-bg-[--spiffy-colors-background-primary]",
40
- "spiffy-tw-border-[--spiffy-colors-background-primary]",
41
- ...TEXT_LIGHT_CLASSES,
42
- BORDER_CLASS
43
- ]],
44
- ["secondary", [
45
- "spiffy-tw-bg-[--spiffy-colors-background-secondary]",
46
- "spiffy-tw-text-[--spiffy-colors-text-link]",
47
- "spiffy-tw-border-[--spiffy-colors-background-secondary]",
48
- ...ACCENT_PRIMARY_CLASSES,
49
- BORDER_CLASS
50
- ]],
51
- ["tertiary", [
52
- "spiffy-tw-bg-[--spiffy-colors-background-tertiary]",
53
- "spiffy-tw-border-[--spiffy-colors-background-tertiary]",
54
- ...TEXT_LINK_CLASSES,
55
- BORDER_CLASS
56
- ]],
57
- ["dark", [
58
- ...DARK_BACKGROUND_CLASSES,
59
- ...TEXT_LIGHT_CLASSES,
60
- BORDER_CLASS
61
- ]],
62
- ["darkPrimary", [
63
- ...DARK_BACKGROUND_CLASSES,
64
- "spiffy-tw-text-[--spiffy-colors-text-light]",
65
- ...ACCENT_PRIMARY_CLASSES,
66
- BORDER_CLASS
67
- ]],
68
- ["darkAccent", [
69
- ...DARK_BACKGROUND_CLASSES,
70
- "spiffy-tw-text-[--spiffy-colors-text-light]",
71
- "spiffy-tw-fill-[--spiffy-colors-text-accent]",
72
- "spiffy-tw-stroke-[--spiffy-colors-text-accent]",
73
- BORDER_CLASS
74
- ]],
75
- ["darkAccentContrast", [
76
- ...DARK_BACKGROUND_CLASSES,
77
- "spiffy-tw-text-[--spiffy-colors-text-light]",
78
- "spiffy-tw-fill-[--spiffy-colors-accent-primary]",
79
- "spiffy-tw-stroke-[--spiffy-colors-accent-primary]",
80
- BORDER_CLASS
81
- ]],
82
- ["transparent", [
83
- "spiffy-tw-bg-transparent",
84
- "spiffy-tw-border-[--spiffy-colors-background-light]",
85
- "spiffy-tw-text-[--spiffy-colors-text-light]",
86
- "spiffy-tw-fill-transparent",
87
- "spiffy-tw-stroke-[--spiffy-colors-text-light]",
88
- BORDER_CLASS
89
- ]],
90
- ["transparentDark", [
91
- "spiffy-tw-bg-transparent",
92
- "spiffy-tw-border-[--spiffy-colors-border-light]",
93
- "spiffy-tw-text-[--spiffy-colors-text-primary]",
94
- "spiffy-tw-fill-transparent",
95
- "spiffy-tw-stroke-[--spiffy-colors-text-primary]",
96
- BORDER_CLASS
97
- ]],
98
- ["secondaryDark", [
99
- ...SECONDARY_DARK_BACKGROUND_CLASSES,
100
- ...TEXT_LINK_CLASSES,
101
- BORDER_CLASS
102
- ]],
103
- ["secondaryAccent", [
104
- ...SECONDARY_DARK_BACKGROUND_CLASSES,
105
- "spiffy-tw-text-[--spiffy-colors-text-link]",
106
- ...ACCENT_PRIMARY_CLASSES,
107
- BORDER_CLASS
108
- ]],
109
- ["lightDark", [
110
- "spiffy-tw-bg-[--spiffy-colors-background-light]",
111
- "spiffy-tw-border-[--spiffy-colors-background-dark]",
112
- ...TEXT_PRIMARY_CLASSES,
113
- BORDER_CLASS
114
- ]]
115
- ]);
116
- const Icon = ({ isAnswer, variant }) => {
117
- if (isAnswer) return void 0;
118
- if (variant === "transparentDark") return /* @__PURE__ */ jsx(OutlinedStar_default, {});
119
- return /* @__PURE__ */ jsx(FourPointStar_default, {});
120
- };
121
- const borderedVariants = [
122
- "outlined",
123
- "outlinedLight",
124
- "primary",
125
- "secondary",
126
- "tertiary",
127
- "dark",
128
- "darkAccent",
129
- "darkAccentContrast",
130
- "darkPrimary",
131
- "transparent",
132
- "transparentDark",
133
- "secondaryDark",
134
- "secondaryAccent",
135
- "lightDark"
136
- ];
137
- const hoverTransform = (variantClass) => variantClass?.map((className) => `hover:${className}`);
138
- const SuggestionButton = ({ variant, hoverVariant, isDisabled, content, boldText, borderRadius = "lg", isAnswer = false, dataAttributes, dataTestId, onClick }) => {
139
- const buttonClassName = classNames({
140
- [SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS]: !isAnswer,
141
- [SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS]: isAnswer,
142
- "!spiffy-tw-rounded-[20px]": borderRadius === "lg",
143
- "!spiffy-tw-rounded-[8px]": borderRadius === "md",
144
- "!spiffy-tw-rounded-[0px]": borderRadius === "sm",
145
- "spiffy-tw-border-[1px]": borderedVariants.includes(variant),
146
- "spiffy-tw-border-solid": borderedVariants.includes(variant)
147
- });
148
- const textClassName = classNames({
149
- "spiffy-tw-text-[14px]": true,
150
- "spiffy-tw-leading-[100%]": true,
151
- "!spiffy-tw-font-bold": boldText
152
- });
153
- const iconClass = classNames({
154
- "spiffy-tw-w-[11px]": true,
155
- "spiffy-tw-h-[11px]": true,
156
- "spiffy-tw-stroke-inherit": true,
157
- "spiffy-tw-fill-inherit": true
158
- });
159
- const baseClasses = variantClassMap.get(variant) ?? [];
160
- const hoverClasses = variantClassMap.get(hoverVariant) ?? [];
161
- const baseBorderClasses = baseClasses.filter((cls) => cls.includes("border"));
162
- const baseNonBorderClasses = baseClasses.filter((cls) => !cls.includes("border"));
163
- const hoverBorderClasses = hoverClasses.filter((cls) => cls.includes("border"));
164
- const hoverNonBorderClasses = hoverClasses.filter((cls) => !cls.includes("border"));
165
- const buttonClass = `${buttonClassName} ${[
166
- ...baseNonBorderClasses,
167
- ...hoverTransform(hoverNonBorderClasses),
168
- ...baseBorderClasses,
169
- ...hoverTransform(hoverBorderClasses)
170
- ].join(" ")}`;
171
- return /* @__PURE__ */ jsx(ButtonBase, {
172
- text: content,
173
- dataAttributes,
174
- dataTestId,
175
- isDisabled,
176
- icon: /* @__PURE__ */ jsx(Icon, {
177
- isAnswer,
178
- variant
179
- }),
180
- iconClass: isAnswer ? void 0 : iconClass,
181
- textClass: `${SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS} ${textClassName}`,
182
- buttonClass,
183
- onClick
184
- });
185
- };
186
-
187
- //#endregion
188
- export { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton };
@@ -1 +0,0 @@
1
- const require_SuggestionButton = require('./SuggestionButton.cjs');
@@ -1 +0,0 @@
1
- import { SPIFFY_SUGGESTION_BUTTON_ANSWER_CLASS, SPIFFY_SUGGESTION_BUTTON_QUESTION_CLASS, SPIFFY_SUGGESTION_BUTTON_TEXT_CLASS, SuggestionButton } from "./SuggestionButton.js";
@@ -1,34 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_typographyVariantClasses = require('../Typography/typographyVariantClasses.cjs');
3
- require('../Typography/index.cjs');
4
- let react = require("react");
5
- react = require_rolldown_runtime.__toESM(react);
6
- let classnames = require("classnames");
7
- classnames = require_rolldown_runtime.__toESM(classnames);
8
- let react_jsx_runtime = require("react/jsx-runtime");
9
-
10
- //#region ../components/dist/components/TextInput/TextInput.js
11
- const TextInput = react.default.forwardRef(({ className, borderRadius, borderColorClass, placeholderVariant, ...rest }, ref) => {
12
- const placeholderVariantClassNames = require_typographyVariantClasses.getVariantPlaceholderClassNames(placeholderVariant ? require_typographyVariantClasses.TypographyVariantMap[placeholderVariant] : {});
13
- const inputClasses = (0, classnames.default)([
14
- {
15
- "spiffy-text-input": true,
16
- "spiffy-tw-outline-none": true,
17
- "spiffy-tw-rounded-[64px]": borderRadius === "xl",
18
- "spiffy-tw-rounded-[20px]": borderRadius === "lg",
19
- "spiffy-tw-rounded-[8px]": borderRadius === "md",
20
- "spiffy-tw-rounded-[0px]": borderRadius === "sm",
21
- ...placeholderVariantClassNames
22
- },
23
- borderColorClass,
24
- className
25
- ]);
26
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
27
- ref,
28
- ...rest,
29
- className: inputClasses
30
- });
31
- });
32
-
33
- //#endregion
34
- exports.TextInput = TextInput;
@@ -1,31 +0,0 @@
1
- import { TypographyVariantMap, getVariantPlaceholderClassNames } from "../Typography/typographyVariantClasses.js";
2
- import "../Typography/index.js";
3
- import React from "react";
4
- import classNames from "classnames";
5
- import { jsx } from "react/jsx-runtime";
6
-
7
- //#region ../components/dist/components/TextInput/TextInput.js
8
- const TextInput = React.forwardRef(({ className, borderRadius, borderColorClass, placeholderVariant, ...rest }, ref) => {
9
- const placeholderVariantClassNames = getVariantPlaceholderClassNames(placeholderVariant ? TypographyVariantMap[placeholderVariant] : {});
10
- const inputClasses = classNames([
11
- {
12
- "spiffy-text-input": true,
13
- "spiffy-tw-outline-none": true,
14
- "spiffy-tw-rounded-[64px]": borderRadius === "xl",
15
- "spiffy-tw-rounded-[20px]": borderRadius === "lg",
16
- "spiffy-tw-rounded-[8px]": borderRadius === "md",
17
- "spiffy-tw-rounded-[0px]": borderRadius === "sm",
18
- ...placeholderVariantClassNames
19
- },
20
- borderColorClass,
21
- className
22
- ]);
23
- return /* @__PURE__ */ jsx("input", {
24
- ref,
25
- ...rest,
26
- className: inputClasses
27
- });
28
- });
29
-
30
- //#endregion
31
- export { TextInput };
@@ -1 +0,0 @@
1
- const require_TextInput = require('./TextInput.cjs');
@@ -1 +0,0 @@
1
- import { TextInput } from "./TextInput.js";