@plurix/ecom-components 1.14.1-bugfix.0 → 1.14.1-bugfix.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 (155) hide show
  1. package/dist/constants/index.js +1 -1
  2. package/dist/main.d.ts +9 -2
  3. package/dist/main.js +18 -12
  4. package/dist/node_modules/@faststore/components/dist/esm/atoms/Button/Button.js +45 -0
  5. package/dist/node_modules/@faststore/components/dist/esm/atoms/Loader/Loader.js +34 -0
  6. package/dist/node_modules/@faststore/components/dist/esm/molecules/IconButton/IconButton.js +29 -0
  7. package/dist/packages/Carousel/Carousel.js +96 -92
  8. package/dist/packages/CartClubAlert/CartClubAlert.js +1 -1
  9. package/dist/packages/ChangeOrderModal/ChangeOrderModal.js +1 -1
  10. package/dist/packages/ChangeOrderModal/assets/icons.js +30 -19
  11. package/dist/packages/ContactCard/ContactCard.d.ts +22 -0
  12. package/dist/packages/ContactCard/ContactCard.js +40 -0
  13. package/dist/packages/Coupons/Coupons.js +31 -31
  14. package/dist/packages/Coupons/components/CouponCard.js +28 -28
  15. package/dist/packages/Coupons/components/Modal.js +60 -32
  16. package/dist/packages/Coupons/views/CouponsView.js +22 -22
  17. package/dist/packages/Modal/Modal.js +1 -1
  18. package/dist/packages/Onboarding/Onboarding.js +1 -1
  19. package/dist/packages/ProductCard/ProducCardUnavailable/index.d.ts +3 -0
  20. package/dist/packages/ProductCard/ProducCardUnavailable/index.js +67 -0
  21. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeClube.d.ts +5 -0
  22. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeClube.js +5 -0
  23. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.d.ts +10 -0
  24. package/dist/packages/ProductCard/ProductCardBadge/ProductCardBadgeKg.js +15 -0
  25. package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.d.ts +13 -0
  26. package/dist/packages/ProductCard/ProductCardBadge/ProductCardDiscountBadge.js +42 -0
  27. package/dist/packages/ProductCard/ProductCardButton/AddToCartButton.d.ts +5 -0
  28. package/dist/packages/ProductCard/ProductCardButton/AddToCartButton.js +16 -0
  29. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.d.ts +12 -0
  30. package/dist/packages/ProductCard/ProductCardButton/CustomQuantitySelector/index.js +73 -0
  31. package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.d.ts +12 -0
  32. package/dist/packages/ProductCard/ProductCardButton/QuantitySelector.js +74 -0
  33. package/dist/packages/ProductCard/ProductCardButton/index.d.ts +10 -0
  34. package/dist/packages/ProductCard/ProductCardButton/index.js +24 -0
  35. package/dist/packages/ProductCard/ProductCardHorizontal/index.d.ts +3 -0
  36. package/dist/packages/ProductCard/ProductCardHorizontal/index.js +156 -0
  37. package/dist/packages/ProductCard/ProductCardImage/index.d.ts +14 -0
  38. package/dist/packages/ProductCard/ProductCardImage/index.js +36 -0
  39. package/dist/packages/{ProductCardUi/ProductCardUiName/ProductCardUiName.d.ts → ProductCard/ProductCardName/index.d.ts} +0 -1
  40. package/dist/packages/ProductCard/ProductCardName/index.js +5 -0
  41. package/dist/packages/{ProductCardUi/ProductCardUiPrice/ProductCardUiPrice.d.ts → ProductCard/ProductCardPrice/index.d.ts} +3 -4
  42. package/dist/packages/ProductCard/ProductCardPrice/index.js +39 -0
  43. package/dist/packages/ProductCard/ProductCardPromotionFlag/index.d.ts +12 -0
  44. package/dist/packages/ProductCard/ProductCardPromotionFlag/index.js +21 -0
  45. package/dist/packages/ProductCard/ProductCardVertical/index.d.ts +3 -0
  46. package/dist/packages/ProductCard/ProductCardVertical/index.js +128 -0
  47. package/dist/packages/ProductCard/index.d.ts +3 -0
  48. package/dist/packages/ProductCard/index.js +61 -0
  49. package/dist/packages/{ProductCardUiSeeMore/ProductCardUiSeeMore.js → ProductCardSeeMore/ProductCardSeeMore.js} +4 -4
  50. package/dist/packages/ProductCardSeeMore/ProductCardSeeMoreHorizontal.d.ts +3 -0
  51. package/dist/packages/{ProductCardUiSeeMore/ProductCardUiSeeMoreHorizontal.js → ProductCardSeeMore/ProductCardSeeMoreHorizontal.js} +2 -2
  52. package/dist/packages/Regionalization/Regionalization.js +1 -1
  53. package/dist/packages/SearchSugestions/components/Button/index.d.ts +13 -0
  54. package/dist/packages/SearchSugestions/components/Button/index.js +53 -0
  55. package/dist/packages/SearchSugestions/components/Button/showMoreOrLess.d.ts +1 -0
  56. package/dist/packages/SearchSugestions/components/Button/showMoreOrLess.js +6 -0
  57. package/dist/packages/SearchSugestions/components/Link/index.d.ts +10 -0
  58. package/dist/packages/SearchSugestions/components/Link/index.js +39 -0
  59. package/dist/packages/SearchSugestions/components/Link/navigation.d.ts +1 -0
  60. package/dist/packages/SearchSugestions/components/Link/navigation.js +8 -0
  61. package/dist/packages/SearchSugestions/components/SearchSuggestions/index.d.ts +4 -0
  62. package/dist/packages/SearchSugestions/components/SearchSuggestions/index.js +91 -0
  63. package/dist/packages/SearchSugestions/components/SearchText/Index.d.ts +10 -0
  64. package/dist/packages/SearchSugestions/components/SearchText/Index.js +48 -0
  65. package/dist/packages/SearchSugestions/index.d.ts +3 -0
  66. package/dist/packages/SearchSugestions/index.js +4 -0
  67. package/dist/packages/SearchSugestions/mocks.d.ts +4 -0
  68. package/dist/packages/SearchSugestions/mocks.js +16 -0
  69. package/dist/packages/SearchSugestions/styles/baseAllSuggestionsContainerStyle.d.ts +3 -0
  70. package/dist/packages/SearchSugestions/styles/baseAllSuggestionsContainerStyle.js +10 -0
  71. package/dist/packages/SearchSugestions/styles/baseButtonHoveredStyle.d.ts +3 -0
  72. package/dist/packages/SearchSugestions/styles/baseButtonHoveredStyle.js +7 -0
  73. package/dist/packages/SearchSugestions/styles/baseButtonStyle.d.ts +3 -0
  74. package/dist/packages/SearchSugestions/styles/baseButtonStyle.js +13 -0
  75. package/dist/packages/SearchSugestions/styles/baseSearchForStyle.d.ts +3 -0
  76. package/dist/packages/SearchSugestions/styles/baseSearchForStyle.js +9 -0
  77. package/dist/packages/SearchSugestions/styles/baseSearchForTermStyle.d.ts +3 -0
  78. package/dist/packages/SearchSugestions/styles/baseSearchForTermStyle.js +8 -0
  79. package/dist/packages/SearchSugestions/styles/baseSuggestionLinkHoveredStyle.d.ts +3 -0
  80. package/dist/packages/SearchSugestions/styles/baseSuggestionLinkHoveredStyle.js +7 -0
  81. package/dist/packages/SearchSugestions/styles/baseSuggestionLinkStyle.d.ts +3 -0
  82. package/dist/packages/SearchSugestions/styles/baseSuggestionLinkStyle.js +14 -0
  83. package/dist/packages/SearchSugestions/styles/baseTitleStyle.d.ts +3 -0
  84. package/dist/packages/SearchSugestions/styles/baseTitleStyle.js +9 -0
  85. package/dist/packages/SearchSugestions/types/ResponseApi.d.ts +10 -0
  86. package/dist/packages/SearchSugestions/types/SearchSuggestionsProps.d.ts +24 -0
  87. package/dist/packages/Skeleton/components/SkeletonAnimation/SkeletonAnimation.d.ts +9 -0
  88. package/dist/packages/Skeleton/components/SkeletonAnimation/SkeletonAnimation.js +14 -0
  89. package/dist/packages/Skeleton/components/SkeletonContainer/SkeletonContainer.d.ts +15 -0
  90. package/dist/packages/Skeleton/components/SkeletonContainer/SkeletonContainer.js +22 -0
  91. package/dist/packages/Skeleton/components/SkeletonRender/SkeletonRender.d.ts +21 -0
  92. package/dist/packages/Skeleton/components/SkeletonRender/SkeletonRender.js +57 -0
  93. package/dist/packages/Skeleton/components/SkeletonTable/SkeletonTable.d.ts +12 -0
  94. package/dist/packages/Skeleton/components/SkeletonTable/SkeletonTable.js +18 -0
  95. package/dist/packages/Skeleton/components/SkeletonWrapper/SkeletonWrapper.d.ts +10 -0
  96. package/dist/packages/Skeleton/components/SkeletonWrapper/SkeletonWrapper.js +20 -0
  97. package/dist/packages/Skeleton/hooks/useResponsiveImages.d.ts +9 -0
  98. package/dist/packages/Skeleton/hooks/useResponsiveImages.js +34 -0
  99. package/dist/packages/Skeleton/index.d.ts +32 -0
  100. package/dist/packages/Skeleton/index.js +91 -0
  101. package/dist/packages/Skeleton/types/types.d.ts +42 -0
  102. package/dist/packages/Skeleton/types/types.js +1 -0
  103. package/dist/packages/Skeleton/utils/createStyleAnimation.d.ts +7 -0
  104. package/dist/packages/Skeleton/utils/createStyleAnimation.js +7 -0
  105. package/dist/packages/Skeleton/utils/createStyleCell.d.ts +18 -0
  106. package/dist/packages/Skeleton/utils/createStyleCell.js +19 -0
  107. package/dist/packages/Skeleton/utils/createStyleContainers.d.ts +33 -0
  108. package/dist/packages/Skeleton/utils/createStyleContainers.js +45 -0
  109. package/dist/packages/Skeleton/utils/createStyleTable.d.ts +12 -0
  110. package/dist/packages/Skeleton/utils/createStyleTable.js +9 -0
  111. package/dist/packages/Tour/Tour.js +1 -1
  112. package/dist/styles/change-order-modal.global.css +1 -1
  113. package/dist/styles/modal.global.css +1 -1
  114. package/dist/styles/onboarding.global.css +1 -1
  115. package/dist/styles/product-card-see-more-horizontal.global.css +1 -0
  116. package/dist/styles/product-card.global.css +1 -0
  117. package/dist/types/ProductCard.d.js +1 -0
  118. package/dist/types/{ProductCardUi.d.ts → ProductCard.d.ts} +21 -5
  119. package/dist/types/ProductCard.js +1 -0
  120. package/package.json +1 -1
  121. package/dist/packages/ProductCardUi/ProducCardUIUnavailable/ProductCardUnavailable.d.ts +0 -13
  122. package/dist/packages/ProductCardUi/ProducCardUIUnavailable/ProductCardUnavailable.js +0 -43
  123. package/dist/packages/ProductCardUi/ProducCardUIUnavailable/ProductCardUnavailableHorizontal.d.ts +0 -12
  124. package/dist/packages/ProductCardUi/ProducCardUIUnavailable/ProductCardUnavailableHorizontal.js +0 -36
  125. package/dist/packages/ProductCardUi/ProductCardUi.d.ts +0 -3
  126. package/dist/packages/ProductCardUi/ProductCardUi.js +0 -58
  127. package/dist/packages/ProductCardUi/ProductCardUiBadge/ProductCardUiBadgeClube.d.ts +0 -5
  128. package/dist/packages/ProductCardUi/ProductCardUiBadge/ProductCardUiBadgeClube.js +0 -7
  129. package/dist/packages/ProductCardUi/ProductCardUiBadge/ProductCardUiBadgeKg.d.ts +0 -9
  130. package/dist/packages/ProductCardUi/ProductCardUiBadge/ProductCardUiBadgeKg.js +0 -17
  131. package/dist/packages/ProductCardUi/ProductCardUiBadge/ProductCardUiDiscountBadge.d.ts +0 -12
  132. package/dist/packages/ProductCardUi/ProductCardUiBadge/ProductCardUiDiscountBadge.js +0 -35
  133. package/dist/packages/ProductCardUi/ProductCardUiButton/ProductCardUiButton.d.ts +0 -7
  134. package/dist/packages/ProductCardUi/ProductCardUiButton/ProductCardUiButton.js +0 -5
  135. package/dist/packages/ProductCardUi/ProductCardUiHorizontal/ProductCardUiHorizontal.d.ts +0 -3
  136. package/dist/packages/ProductCardUi/ProductCardUiHorizontal/ProductCardUiHorizontal.js +0 -132
  137. package/dist/packages/ProductCardUi/ProductCardUiImage/ProductCardUiImage.d.ts +0 -14
  138. package/dist/packages/ProductCardUi/ProductCardUiImage/ProductCardUiImage.js +0 -36
  139. package/dist/packages/ProductCardUi/ProductCardUiName/ProductCardUiName.js +0 -5
  140. package/dist/packages/ProductCardUi/ProductCardUiPrice/ProductCardUiPrice.js +0 -43
  141. package/dist/packages/ProductCardUi/ProductCardUiPromotionFlag/ProductCardUiPromotionFlag.d.ts +0 -12
  142. package/dist/packages/ProductCardUi/ProductCardUiPromotionFlag/ProductCardUiPromotionFlag.js +0 -18
  143. package/dist/packages/ProductCardUi/ProductCardUiVertical/ProductCardUiVertical.d.ts +0 -3
  144. package/dist/packages/ProductCardUi/ProductCardUiVertical/ProductCardUiVertical.js +0 -104
  145. package/dist/packages/ProductCardUiSeeMore/ProductCardUiSeeMoreHorizontal.d.ts +0 -3
  146. package/dist/styles/productCardUi.global.css +0 -1
  147. package/dist/styles/productCardUiSeeMoreHorizontal.global.css +0 -1
  148. package/dist/styles/styles.css +0 -1
  149. package/dist/styles/styles2.css +0 -1
  150. package/dist/styles/styles3.css +0 -1
  151. package/dist/styles/styles4.css +0 -1
  152. package/dist/styles/styles5.css +0 -1
  153. /package/dist/packages/{ProductCardUiSeeMore/ProductCardUiSeeMore.d.ts → ProductCardSeeMore/ProductCardSeeMore.d.ts} +0 -0
  154. /package/dist/{types/ProductCardUi.d.js → packages/SearchSugestions/types/ResponseApi.js} +0 -0
  155. /package/dist/{types/ProductCardUi.js → packages/SearchSugestions/types/SearchSuggestionsProps.js} +0 -0
@@ -0,0 +1,61 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { ProductCardHorizontal as b } from "./ProductCardHorizontal/index.js";
3
+ import { ProductCardVertical as g } from "./ProductCardVertical/index.js";
4
+ /* empty css */const E = ({
5
+ product: l,
6
+ variant: r,
7
+ hasPlusFriendBadge: C = !1,
8
+ hasPromotionalPrice: f,
9
+ clubPrice: s,
10
+ defaultScListPrice: x,
11
+ hasClub: m,
12
+ isClubClient: H,
13
+ openModal: V,
14
+ promotion: d,
15
+ outOfStock: e,
16
+ addToCartAction: j,
17
+ quantitySelectorAction: p,
18
+ productInCart: t
19
+ }) => {
20
+ const z = !!(m && H);
21
+ return /* @__PURE__ */ i("div", { style: { height: "100%" }, children: r === "vertical" ? /* @__PURE__ */ i(
22
+ g,
23
+ {
24
+ isClubClient: z,
25
+ hasClub: m,
26
+ defaultScListPrice: x,
27
+ hasPromotionalPrice: f,
28
+ product: l,
29
+ variant: r,
30
+ outOfStock: e,
31
+ promotion: d,
32
+ clubPrice: s,
33
+ openModal: V,
34
+ hasPlusFriendBadge: C,
35
+ addToCartAction: j,
36
+ quantitySelectorAction: p,
37
+ productInCart: t
38
+ }
39
+ ) : /* @__PURE__ */ i(
40
+ b,
41
+ {
42
+ openModal: V,
43
+ isClubClient: z,
44
+ hasClub: m,
45
+ defaultScListPrice: x,
46
+ hasPromotionalPrice: f,
47
+ product: l,
48
+ variant: r,
49
+ hasPlusFriendBadge: C,
50
+ outOfStock: e,
51
+ promotion: d,
52
+ clubPrice: s,
53
+ addToCartAction: j,
54
+ quantitySelectorAction: p,
55
+ productInCart: t
56
+ }
57
+ ) });
58
+ };
59
+ export {
60
+ E as ProductCard
61
+ };
@@ -1,19 +1,19 @@
1
1
  import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
- import { ProductCardUiSeeMoreHorizontal as i } from "./ProductCardUiSeeMoreHorizontal.js";
3
- /* empty css */const l = ({
2
+ import { ProductCardSeeMoreHorizontal as s } from "./ProductCardSeeMoreHorizontal.js";
3
+ /* empty css */const l = ({
4
4
  text: e,
5
5
  link: o,
6
6
  taggingEvent: c,
7
7
  variant: d
8
8
  }) => d === "horizontal" ? /* @__PURE__ */ r(
9
- i,
9
+ s,
10
10
  {
11
11
  text: e,
12
12
  link: o,
13
13
  taggingEvent: c
14
14
  }
15
15
  ) : /* @__PURE__ */ a("div", { className: "product-card-see-more", children: [
16
- /* @__PURE__ */ r("div", { children: /* @__PURE__ */ a("p", { className: "product-card-see-more-text", children: [
16
+ /* @__PURE__ */ r("div", { className: "product-card-see-more-text-container", children: /* @__PURE__ */ a("p", { className: "product-card-see-more-text", children: [
17
17
  "Veja mais ",
18
18
  /* @__PURE__ */ r("br", {}),
19
19
  /* @__PURE__ */ r("span", { children: e })
@@ -0,0 +1,3 @@
1
+ import { ProductCardSeeMoreProps } from '../../types/ProductCardSeeMore';
2
+
3
+ export declare const ProductCardSeeMoreHorizontal: ({ link, text, taggingEvent }: ProductCardSeeMoreProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- const s = ({
2
+ const i = ({
3
3
  link: o,
4
4
  text: a,
5
5
  taggingEvent: c
@@ -20,5 +20,5 @@ const s = ({
20
20
  )
21
21
  ] });
22
22
  export {
23
- s as ProductCardUiSeeMoreHorizontal
23
+ i as ProductCardSeeMoreHorizontal
24
24
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { RegionalizationContextProvider as C } from "./context/RegionalizationContext.js";
3
3
  import { ViewsContainer as S } from "./views/ViewsContainer.js";
4
- /* empty css */const z = ({
4
+ /* empty css */const z = ({
5
5
  setMethod: r,
6
6
  setPickupName: a,
7
7
  setCity: o,
@@ -0,0 +1,13 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+
3
+ interface ButtonProps {
4
+ itemsToShowQuantity: number;
5
+ itemsToShow: number;
6
+ setItemsToShowQuantity: (itemsToShowQuantity: number) => void;
7
+ showMoreSuggestionsText?: string;
8
+ showLessSuggestionsText?: string;
9
+ buttonStyle?: CSSProperties;
10
+ buttonHoveredStyle?: CSSProperties;
11
+ }
12
+ export declare const Button: React.FC<ButtonProps>;
13
+ export {};
@@ -0,0 +1,53 @@
1
+ var p = Object.defineProperty;
2
+ var a = Object.getOwnPropertySymbols;
3
+ var v = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
+ var l = (s, t, e) => t in s ? p(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, o = (s, t) => {
5
+ for (var e in t || (t = {}))
6
+ v.call(t, e) && l(s, e, t[e]);
7
+ if (a)
8
+ for (var e of a(t))
9
+ b.call(t, e) && l(s, e, t[e]);
10
+ return s;
11
+ };
12
+ import { jsx as u } from "react/jsx-runtime";
13
+ import { useState as B } from "react";
14
+ import { showMoreOrLess as y } from "./showMoreOrLess.js";
15
+ import { baseButtonStyle as H } from "../../styles/baseButtonStyle.js";
16
+ import { baseButtonHoveredStyle as x } from "../../styles/baseButtonHoveredStyle.js";
17
+ const k = ({
18
+ itemsToShowQuantity: s,
19
+ itemsToShow: t,
20
+ setItemsToShowQuantity: e,
21
+ showMoreSuggestionsText: i,
22
+ showLessSuggestionsText: c,
23
+ buttonStyle: g,
24
+ buttonHoveredStyle: d
25
+ }) => {
26
+ const [f, n] = B(!1), r = o(o({}, H), g), m = o(o({}, x), d);
27
+ return /* @__PURE__ */ u(
28
+ "div",
29
+ {
30
+ className: "suggestion-button-container",
31
+ style: { textAlign: "center" },
32
+ children: /* @__PURE__ */ u(
33
+ "button",
34
+ {
35
+ onClick: () => y(
36
+ t,
37
+ s,
38
+ e
39
+ ),
40
+ onMouseEnter: () => n(!0),
41
+ onMouseLeave: () => n(!1),
42
+ className: "suggestion-button",
43
+ style: f ? o(o({}, r), m) : o({}, r),
44
+ "data-testid": s === t ? "show" : "hide",
45
+ children: s === t ? i || "Ver todas as sugestões" : c || "Ocultar algumas sugestões"
46
+ }
47
+ )
48
+ }
49
+ );
50
+ };
51
+ export {
52
+ k as Button
53
+ };
@@ -0,0 +1 @@
1
+ export declare const showMoreOrLess: (itemsToShow: number, itemsToShowQuantity: number, setItemsToShowQuantity: (itemsToShow: number) => void) => void;
@@ -0,0 +1,6 @@
1
+ const f = (r, c, n) => {
2
+ n(c === r ? 1 / 0 : r);
3
+ };
4
+ export {
5
+ f as showMoreOrLess
6
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+
3
+ interface LinkProps {
4
+ href: string;
5
+ children: React.ReactNode;
6
+ suggestionLinkStyle?: CSSProperties;
7
+ suggestionLinkHoveredStyle?: CSSProperties;
8
+ }
9
+ export declare const Link: React.FC<LinkProps>;
10
+ export {};
@@ -0,0 +1,39 @@
1
+ var S = Object.defineProperty;
2
+ var r = Object.getOwnPropertySymbols;
3
+ var f = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
4
+ var a = (t, e, o) => e in t ? S(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, n = (t, e) => {
5
+ for (var o in e || (e = {}))
6
+ f.call(e, o) && a(t, o, e[o]);
7
+ if (r)
8
+ for (var o of r(e))
9
+ k.call(e, o) && a(t, o, e[o]);
10
+ return t;
11
+ };
12
+ import { jsx as c } from "react/jsx-runtime";
13
+ import { useState as p } from "react";
14
+ import { navigation as v } from "./navigation.js";
15
+ import { baseSuggestionLinkStyle as L } from "../../styles/baseSuggestionLinkStyle.js";
16
+ import { baseSuggestionLinkHoveredStyle as y } from "../../styles/baseSuggestionLinkHoveredStyle.js";
17
+ const C = ({
18
+ href: t,
19
+ children: e,
20
+ suggestionLinkStyle: o,
21
+ suggestionLinkHoveredStyle: g
22
+ }) => {
23
+ const [l, i] = p(!1), s = n(n({}, L), o), m = n(n({}, y), g);
24
+ return /* @__PURE__ */ c(
25
+ "a",
26
+ {
27
+ href: t,
28
+ onClick: (u) => v(u, t),
29
+ onMouseEnter: () => i(!0),
30
+ onMouseLeave: () => i(!1),
31
+ className: "suggestion-link",
32
+ style: l ? n(n({}, s), m) : n({}, s),
33
+ children: e
34
+ }
35
+ );
36
+ };
37
+ export {
38
+ C as Link
39
+ };
@@ -0,0 +1 @@
1
+ export declare const navigation: (event: React.MouseEvent<HTMLElement>, href: string) => void;
@@ -0,0 +1,8 @@
1
+ const o = (t, n) => {
2
+ t.preventDefault(), window.history.pushState({}, "", n);
3
+ const e = new PopStateEvent("popstate");
4
+ window.dispatchEvent(e);
5
+ };
6
+ export {
7
+ o as navigation
8
+ };
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { SearchSuggestionsProps } from '../../types/SearchSuggestionsProps';
3
+
4
+ export declare const SearchSuggestions: React.FC<SearchSuggestionsProps>;
@@ -0,0 +1,91 @@
1
+ var k = Object.defineProperty;
2
+ var g = Object.getOwnPropertySymbols;
3
+ var q = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
4
+ var u = (s, e, t) => e in s ? k(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, i = (s, e) => {
5
+ for (var t in e || (e = {}))
6
+ q.call(e, t) && u(s, t, e[t]);
7
+ if (g)
8
+ for (var t of g(e))
9
+ A.call(e, t) && u(s, t, e[t]);
10
+ return s;
11
+ };
12
+ import { jsxs as E, jsx as r } from "react/jsx-runtime";
13
+ import { useState as L, useEffect as V } from "react";
14
+ import { Link as $ } from "../Link/index.js";
15
+ import { Button as z } from "../Button/index.js";
16
+ import { SearchText as D } from "../SearchText/Index.js";
17
+ import { baseTitleStyle as G } from "../../styles/baseTitleStyle.js";
18
+ import { baseAllSuggestionsContainerStyle as H } from "../../styles/baseAllSuggestionsContainerStyle.js";
19
+ const X = ({
20
+ searchSuggestions: s,
21
+ loading: e,
22
+ itemsToShow: t = 1 / 0,
23
+ searchFor: o,
24
+ loadingText: f,
25
+ searchForText: m,
26
+ titleText: p,
27
+ showMoreSuggestionsText: d,
28
+ showLessSuggestionsText: y,
29
+ searchForStyle: h,
30
+ searchForTermStyle: x,
31
+ titleStyle: N,
32
+ allSuggestionsContainerStyle: v,
33
+ suggestionLinkStyle: b,
34
+ suggestionLinkHoveredStyle: j,
35
+ buttonStyle: B,
36
+ buttonHoveredStyle: C,
37
+ urlSearch: a
38
+ }) => {
39
+ const [l, c] = L(t);
40
+ V(() => {
41
+ c(t);
42
+ }, [t]);
43
+ const I = t > 0 && s.length > t, Q = (n) => a ? a.replace("{{term}}", n) : `/s/?q=${n}&sort=score_desc&page=0`;
44
+ return /* @__PURE__ */ E("div", { className: "suggestions-main-container", children: [
45
+ o && /* @__PURE__ */ r(
46
+ D,
47
+ {
48
+ searchFor: o,
49
+ searchForText: m,
50
+ searchForStyle: h,
51
+ searchForTermStyle: x
52
+ }
53
+ ),
54
+ /* @__PURE__ */ r("h2", { style: i(i({}, G), N), children: p || "Ver por interesse:" }),
55
+ /* @__PURE__ */ r(
56
+ "div",
57
+ {
58
+ className: "suggestions-all_suggestions-container",
59
+ style: i(i({}, H), v),
60
+ children: e ? /* @__PURE__ */ r("span", { className: "suggestions-loading", children: f || "Carregando sugestões..." }) : s.map(({ term: n }, S) => {
61
+ const _ = /* @__PURE__ */ r(
62
+ $,
63
+ {
64
+ href: Q(n),
65
+ suggestionLinkStyle: b,
66
+ suggestionLinkHoveredStyle: j,
67
+ children: n
68
+ },
69
+ n
70
+ );
71
+ return t >= 0 && S + 1 <= l ? _ : null;
72
+ })
73
+ }
74
+ ),
75
+ I && /* @__PURE__ */ r(
76
+ z,
77
+ {
78
+ itemsToShowQuantity: l,
79
+ setItemsToShowQuantity: c,
80
+ itemsToShow: t,
81
+ showMoreSuggestionsText: d,
82
+ showLessSuggestionsText: y,
83
+ buttonStyle: B,
84
+ buttonHoveredStyle: C
85
+ }
86
+ )
87
+ ] });
88
+ };
89
+ export {
90
+ X as SearchSuggestions
91
+ };
@@ -0,0 +1,10 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+
3
+ interface SearchForProps {
4
+ searchFor: string;
5
+ searchForText?: string;
6
+ searchForStyle?: CSSProperties;
7
+ searchForTermStyle?: CSSProperties;
8
+ }
9
+ export declare const SearchText: React.FC<SearchForProps>;
10
+ export {};
@@ -0,0 +1,48 @@
1
+ var m = Object.defineProperty;
2
+ var a = Object.getOwnPropertySymbols;
3
+ var i = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
4
+ var o = (s, e, r) => e in s ? m(s, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[e] = r, t = (s, e) => {
5
+ for (var r in e || (e = {}))
6
+ i.call(e, r) && o(s, r, e[r]);
7
+ if (a)
8
+ for (var r of a(e))
9
+ l.call(e, r) && o(s, r, e[r]);
10
+ return s;
11
+ };
12
+ import { jsxs as c } from "react/jsx-runtime";
13
+ import { baseSearchForStyle as h } from "../../styles/baseSearchForStyle.js";
14
+ import { baseSearchForTermStyle as n } from "../../styles/baseSearchForTermStyle.js";
15
+ const g = ({
16
+ searchFor: s,
17
+ searchForText: e,
18
+ searchForStyle: r,
19
+ searchForTermStyle: p
20
+ }) => /* @__PURE__ */ c(
21
+ "p",
22
+ {
23
+ className: "suggestion-search_for",
24
+ style: t(t({}, h), r),
25
+ "data-testid": "search-for",
26
+ children: [
27
+ e || "Você pesquisou por ",
28
+ /* @__PURE__ */ c(
29
+ "span",
30
+ {
31
+ className: "suggestion-search_for-term",
32
+ style: t(t({}, n), p),
33
+ children: [
34
+ "“",
35
+ s.replace(
36
+ s.charAt(0),
37
+ s.charAt(0).toUpperCase()
38
+ ),
39
+ "”"
40
+ ]
41
+ }
42
+ )
43
+ ]
44
+ }
45
+ );
46
+ export {
47
+ g as SearchText
48
+ };
@@ -0,0 +1,3 @@
1
+ export { SearchSuggestions } from './components/SearchSuggestions';
2
+ export type { SearchSuggestionsProps } from './types/SearchSuggestionsProps';
3
+ export type { SearchSuggestionsApiResponse, Searches } from './types/ResponseApi';
@@ -0,0 +1,4 @@
1
+ import { SearchSuggestions as r } from "./components/SearchSuggestions/index.js";
2
+ export {
3
+ r as SearchSuggestions
4
+ };
@@ -0,0 +1,4 @@
1
+ export declare const mockSearchSuggestions: {
2
+ term: string;
3
+ }[];
4
+ export declare const mockSearchFor = "user search";
@@ -0,0 +1,16 @@
1
+ const t = [
2
+ { term: "test-term-1" },
3
+ { term: "test-term-2" },
4
+ { term: "test-term-3" },
5
+ { term: "test-term-4" },
6
+ { term: "test-term-5" },
7
+ { term: "test-term-6" },
8
+ { term: "test-term-7" },
9
+ { term: "test-term-8" },
10
+ { term: "test-term-9" },
11
+ { term: "test-term-10" }
12
+ ], e = "user search";
13
+ export {
14
+ e as mockSearchFor,
15
+ t as mockSearchSuggestions
16
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseAllSuggestionsContainerStyle: CSSProperties;
@@ -0,0 +1,10 @@
1
+ const e = {
2
+ display: "flex",
3
+ alignItems: "center",
4
+ flexWrap: "wrap",
5
+ gap: "8px 4px",
6
+ margin: "8px 0"
7
+ };
8
+ export {
9
+ e as baseAllSuggestionsContainerStyle
10
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseButtonHoveredStyle: CSSProperties;
@@ -0,0 +1,7 @@
1
+ const o = {
2
+ background: "transparent",
3
+ color: "var(--color-support-links, #00289C)"
4
+ };
5
+ export {
6
+ o as baseButtonHoveredStyle
7
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseButtonStyle: CSSProperties;
@@ -0,0 +1,13 @@
1
+ const o = {
2
+ display: "inline-block",
3
+ border: "none",
4
+ background: "transparent",
5
+ color: "var(--color-support-links, #00289C)",
6
+ fontSize: "14px",
7
+ lineHeight: "18px",
8
+ textDecoration: "underline",
9
+ cursor: "pointer"
10
+ };
11
+ export {
12
+ o as baseButtonStyle
13
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseSearchForStyle: CSSProperties;
@@ -0,0 +1,9 @@
1
+ const c = {
2
+ margin: "0 0 24px 0",
3
+ color: "var(--color-grayScale, #1c1c1c)",
4
+ fontSize: "16px",
5
+ lineHeight: "20px"
6
+ };
7
+ export {
8
+ c as baseSearchForStyle
9
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseSearchForTermStyle: CSSProperties;
@@ -0,0 +1,8 @@
1
+ const e = {
2
+ fontSize: "20px",
3
+ fontWeight: 700,
4
+ lineHeight: "24px"
5
+ };
6
+ export {
7
+ e as baseSearchForTermStyle
8
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseSuggestionLinkHoveredStyle: CSSProperties;
@@ -0,0 +1,7 @@
1
+ const o = {
2
+ background: "var(--color-main, #004A93)",
3
+ color: "var(--color-grayScale-white, #fff)"
4
+ };
5
+ export {
6
+ o as baseSuggestionLinkHoveredStyle
7
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseSuggestionLinkStyle: CSSProperties;
@@ -0,0 +1,14 @@
1
+ const o = {
2
+ display: "inline-block",
3
+ padding: "8.5px 8px",
4
+ border: "1px solid var(--color-main, #004A93)",
5
+ borderRadius: "16px",
6
+ color: "var(--color-main, #004A93)",
7
+ fontSize: "11px",
8
+ lineHeight: "15px",
9
+ textTransform: "capitalize",
10
+ textDecoration: "none"
11
+ };
12
+ export {
13
+ o as baseSuggestionLinkStyle
14
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export declare const baseTitleStyle: CSSProperties;
@@ -0,0 +1,9 @@
1
+ const e = {
2
+ margin: 0,
3
+ fontSize: 20,
4
+ lineHeight: "24px",
5
+ color: "var(--color-grayScale, #1c1c1c)"
6
+ };
7
+ export {
8
+ e as baseTitleStyle
9
+ };
@@ -0,0 +1,10 @@
1
+ export interface SearchSuggestionsApiResponse {
2
+ data: {
3
+ searchSuggestions: {
4
+ searches: Searches[];
5
+ };
6
+ };
7
+ }
8
+ export interface Searches {
9
+ term: string;
10
+ }
@@ -0,0 +1,24 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export interface SearchSuggestionsProps {
4
+ searchSuggestions: Array<{
5
+ term: string;
6
+ }>;
7
+ loading: boolean;
8
+ itemsToShow?: number;
9
+ searchFor?: string;
10
+ loadingText?: string;
11
+ searchForText?: string;
12
+ titleText?: string;
13
+ showMoreSuggestionsText?: string;
14
+ showLessSuggestionsText?: string;
15
+ searchForStyle?: CSSProperties;
16
+ searchForTermStyle?: CSSProperties;
17
+ titleStyle?: CSSProperties;
18
+ allSuggestionsContainerStyle?: CSSProperties;
19
+ suggestionLinkStyle?: CSSProperties;
20
+ suggestionLinkHoveredStyle?: CSSProperties;
21
+ buttonStyle?: CSSProperties;
22
+ buttonHoveredStyle?: CSSProperties;
23
+ urlSearch?: string;
24
+ }
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { StyleAnimation } from '../../types/types';
3
+
4
+ interface SkeletonAnimationProps {
5
+ styleAnimation?: StyleAnimation;
6
+ children?: React.ReactNode;
7
+ }
8
+ export declare const SkeletonAnimation: React.FC<SkeletonAnimationProps>;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const o = ({
3
+ styleAnimation: t
4
+ }) => /* @__PURE__ */ e(
5
+ "div",
6
+ {
7
+ "data-testid": "skeleton-animation",
8
+ style: t,
9
+ className: "skeleton-animation"
10
+ }
11
+ );
12
+ export {
13
+ o as SkeletonAnimation
14
+ };